mirror of https://github.com/Mai-with-u/MaiBot.git
158 lines
1.3 MiB
158 lines
1.3 MiB
function LV(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var gp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function St(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y0={exports:{}},qd={};var $k;function BV(){if($k)return qd;$k=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var l=null;if(i!==void 0&&(l=""+i),a.key!==void 0&&(l=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:i}}return qd.Fragment=t,qd.jsx=n,qd.jsxs=n,qd}var Ik;function zV(){return Ik||(Ik=1,y0.exports=BV()),y0.exports}var o=zV(),x0={exports:{}},Ve={};var Lk;function qV(){if(Lk)return Ve;Lk=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function N(I,B,Y){this.props=I,this.context=B,this.refs=w,this.updater=Y||j}N.prototype.isReactComponent={},N.prototype.setState=function(I,B){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,B,"setState")},N.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function O(){}O.prototype=N.prototype;function C(I,B,Y){this.props=I,this.context=B,this.refs=w,this.updater=Y||j}var A=C.prototype=new O;A.constructor=C,b(A,N.prototype),A.isPureReactComponent=!0;var E=Array.isArray;function k(){}var T={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(I,B,Y){var ne=Y.ref;return{$$typeof:e,type:I,key:B,ref:ne!==void 0?ne:null,props:Y}}function z(I,B){return $(I.type,B,I.props)}function D(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function U(I){var B={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(Y){return B[Y]})}var V=/\/+/g;function H(I,B){return typeof I=="object"&&I!==null&&I.key!=null?U(""+I.key):B.toString(36)}function G(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(k,k):(I.status="pending",I.then(function(B){I.status==="pending"&&(I.status="fulfilled",I.value=B)},function(B){I.status==="pending"&&(I.status="rejected",I.reason=B)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function L(I,B,Y,ne,oe){var xe=typeof I;(xe==="undefined"||xe==="boolean")&&(I=null);var ee=!1;if(I===null)ee=!0;else switch(xe){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(I.$$typeof){case e:case t:ee=!0;break;case m:return ee=I._init,L(ee(I._payload),B,Y,ne,oe)}}if(ee)return oe=oe(I),ee=ne===""?"."+H(I,0):ne,E(oe)?(Y="",ee!=null&&(Y=ee.replace(V,"$&/")+"/"),L(oe,B,Y,"",function(pe){return pe})):oe!=null&&(D(oe)&&(oe=z(oe,Y+(oe.key==null||I&&I.key===oe.key?"":(""+oe.key).replace(V,"$&/")+"/")+ee)),B.push(oe)),1;ee=0;var ae=ne===""?".":ne+":";if(E(I))for(var Z=0;Z<I.length;Z++)ne=I[Z],xe=ae+H(ne,Z),ee+=L(ne,B,Y,xe,oe);else if(Z=x(I),typeof Z=="function")for(I=Z.call(I),Z=0;!(ne=I.next()).done;)ne=ne.value,xe=ae+H(ne,Z++),ee+=L(ne,B,Y,xe,oe);else if(xe==="object"){if(typeof I.then=="function")return L(G(I),B,Y,ne,oe);throw B=String(I),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ee}function R(I,B,Y){if(I==null)return I;var ne=[],oe=0;return L(I,ne,"","",function(xe){return B.call(Y,xe,oe++)}),ne}function F(I){if(I._status===-1){var B=I._result;B=B(),B.then(function(Y){(I._status===0||I._status===-1)&&(I._status=1,I._result=Y)},function(Y){(I._status===0||I._status===-1)&&(I._status=2,I._result=Y)}),I._status===-1&&(I._status=0,I._result=B)}if(I._status===1)return I._result.default;throw I._result}var K=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},te={map:R,forEach:function(I,B,Y){R(I,function(){B.apply(this,arguments)},Y)},count:function(I){var B=0;return R(I,function(){B++}),B},toArray:function(I){return R(I,function(B){return B})||[]},only:function(I){if(!D(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Ve.Activity=p,Ve.Children=te,Ve.Component=N,Ve.Fragment=n,Ve.Profiler=a,Ve.PureComponent=C,Ve.StrictMode=r,Ve.Suspense=d,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(I){return T.H.useMemoCache(I)}},Ve.cache=function(I){return function(){return I.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(I,B,Y){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var ne=b({},I.props),oe=I.key;if(B!=null)for(xe in B.key!==void 0&&(oe=""+B.key),B)!P.call(B,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&B.ref===void 0||(ne[xe]=B[xe]);var xe=arguments.length-2;if(xe===1)ne.children=Y;else if(1<xe){for(var ee=Array(xe),ae=0;ae<xe;ae++)ee[ae]=arguments[ae+2];ne.children=ee}return $(I.type,oe,ne)},Ve.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:i,_context:I},I},Ve.createElement=function(I,B,Y){var ne,oe={},xe=null;if(B!=null)for(ne in B.key!==void 0&&(xe=""+B.key),B)P.call(B,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(oe[ne]=B[ne]);var ee=arguments.length-2;if(ee===1)oe.children=Y;else if(1<ee){for(var ae=Array(ee),Z=0;Z<ee;Z++)ae[Z]=arguments[Z+2];oe.children=ae}if(I&&I.defaultProps)for(ne in ee=I.defaultProps,ee)oe[ne]===void 0&&(oe[ne]=ee[ne]);return $(I,xe,oe)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(I){return{$$typeof:u,render:I}},Ve.isValidElement=D,Ve.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:F}},Ve.memo=function(I,B){return{$$typeof:f,type:I,compare:B===void 0?null:B}},Ve.startTransition=function(I){var B=T.T,Y={};T.T=Y;try{var ne=I(),oe=T.S;oe!==null&&oe(Y,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(k,K)}catch(xe){K(xe)}finally{B!==null&&Y.types!==null&&(B.types=Y.types),T.T=B}},Ve.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Ve.use=function(I){return T.H.use(I)},Ve.useActionState=function(I,B,Y){return T.H.useActionState(I,B,Y)},Ve.useCallback=function(I,B){return T.H.useCallback(I,B)},Ve.useContext=function(I){return T.H.useContext(I)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(I,B){return T.H.useDeferredValue(I,B)},Ve.useEffect=function(I,B){return T.H.useEffect(I,B)},Ve.useEffectEvent=function(I){return T.H.useEffectEvent(I)},Ve.useId=function(){return T.H.useId()},Ve.useImperativeHandle=function(I,B,Y){return T.H.useImperativeHandle(I,B,Y)},Ve.useInsertionEffect=function(I,B){return T.H.useInsertionEffect(I,B)},Ve.useLayoutEffect=function(I,B){return T.H.useLayoutEffect(I,B)},Ve.useMemo=function(I,B){return T.H.useMemo(I,B)},Ve.useOptimistic=function(I,B){return T.H.useOptimistic(I,B)},Ve.useReducer=function(I,B,Y){return T.H.useReducer(I,B,Y)},Ve.useRef=function(I){return T.H.useRef(I)},Ve.useState=function(I){return T.H.useState(I)},Ve.useSyncExternalStore=function(I,B,Y){return T.H.useSyncExternalStore(I,B,Y)},Ve.useTransition=function(){return T.H.useTransition()},Ve.version="19.2.0",Ve}var Bk;function xh(){return Bk||(Bk=1,x0.exports=qV()),x0.exports}var y=xh();const W=St(y),gO=LV({__proto__:null,default:W},[y]);var b0={exports:{}},Fd={},w0={exports:{}},j0={};var zk;function FV(){return zk||(zk=1,(function(e){function t(L,R){var F=L.length;L.push(R);e:for(;0<F;){var K=F-1>>>1,te=L[K];if(0<a(te,R))L[K]=R,L[F]=te,F=K;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var R=L[0],F=L.pop();if(F!==R){L[0]=F;e:for(var K=0,te=L.length,I=te>>>1;K<I;){var B=2*(K+1)-1,Y=L[B],ne=B+1,oe=L[ne];if(0>a(Y,F))ne<te&&0>a(oe,Y)?(L[K]=oe,L[ne]=F,K=ne):(L[K]=Y,L[B]=F,K=B);else if(ne<te&&0>a(oe,F))L[K]=oe,L[ne]=F,K=ne;else break e}}return R}function a(L,R){var F=L.sortIndex-R.sortIndex;return F!==0?F:L.id-R.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,p=null,g=3,x=!1,j=!1,b=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var R=n(f);R!==null;){if(R.callback===null)r(f);else if(R.startTime<=L)r(f),R.sortIndex=R.expirationTime,t(d,R);else break;R=n(f)}}function E(L){if(b=!1,A(L),!j)if(n(d)!==null)j=!0,k||(k=!0,U());else{var R=n(f);R!==null&&G(E,R.startTime-L)}}var k=!1,T=-1,P=5,$=-1;function z(){return w?!0:!(e.unstable_now()-$<P)}function D(){if(w=!1,k){var L=e.unstable_now();$=L;var R=!0;try{e:{j=!1,b&&(b=!1,O(T),T=-1),x=!0;var F=g;try{t:{for(A(L),p=n(d);p!==null&&!(p.expirationTime>L&&z());){var K=p.callback;if(typeof K=="function"){p.callback=null,g=p.priorityLevel;var te=K(p.expirationTime<=L);if(L=e.unstable_now(),typeof te=="function"){p.callback=te,A(L),R=!0;break t}p===n(d)&&r(d),A(L)}else r(d);p=n(d)}if(p!==null)R=!0;else{var I=n(f);I!==null&&G(E,I.startTime-L),R=!1}}break e}finally{p=null,g=F,x=!1}R=void 0}}finally{R?U():k=!1}}}var U;if(typeof C=="function")U=function(){C(D)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,H=V.port2;V.port1.onmessage=D,U=function(){H.postMessage(null)}}else U=function(){N(D,0)};function G(L,R){T=N(function(){L(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(L){switch(g){case 1:case 2:case 3:var R=3;break;default:R=g}var F=g;g=R;try{return L()}finally{g=F}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(L,R){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var F=g;g=L;try{return R()}finally{g=F}},e.unstable_scheduleCallback=function(L,R,F){var K=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?K+F:K):F=K,L){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=F+te,L={id:m++,callback:R,priorityLevel:L,startTime:F,expirationTime:te,sortIndex:-1},F>K?(L.sortIndex=F,t(f,L),n(d)===null&&L===n(f)&&(b?(O(T),T=-1):b=!0,G(E,F-K))):(L.sortIndex=te,t(d,L),j||x||(j=!0,k||(k=!0,U()))),L},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(L){var R=g;return function(){var F=g;g=R;try{return L.apply(this,arguments)}finally{g=F}}}})(j0)),j0}var qk;function UV(){return qk||(qk=1,w0.exports=FV()),w0.exports}var S0={exports:{}},ar={};var Fk;function HV(){if(Fk)return ar;Fk=1;var e=xh();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ar.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(d,f,null,m)},ar.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},ar.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},ar.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},ar.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,x=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:x}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:x,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ar.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},ar.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ar.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},ar.requestFormReset=function(d){r.d.r(d)},ar.unstable_batchedUpdates=function(d,f){return d(f)},ar.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},ar.useFormStatus=function(){return l.H.useHostTransitionStatus()},ar.version="19.2.0",ar}var Uk;function IL(){if(Uk)return S0.exports;Uk=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),S0.exports=HV(),S0.exports}var Hk;function WV(){if(Hk)return Fd;Hk=1;var e=UV(),t=xh(),n=IL();function r(s){var c="https://react.dev/errors/"+s;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)c+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function i(s){var c=s,h=s;if(s.alternate)for(;c.return;)c=c.return;else{s=c;do c=s,(c.flags&4098)!==0&&(h=c.return),s=c.return;while(s)}return c.tag===3?h:null}function l(s){if(s.tag===13){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function u(s){if(s.tag===31){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function d(s){if(i(s)!==s)throw Error(r(188))}function f(s){var c=s.alternate;if(!c){if(c=i(s),c===null)throw Error(r(188));return c!==s?null:s}for(var h=s,v=c;;){var S=h.return;if(S===null)break;var _=S.alternate;if(_===null){if(v=S.return,v!==null){h=v;continue}break}if(S.child===_.child){for(_=S.child;_;){if(_===h)return d(S),s;if(_===v)return d(S),c;_=_.sibling}throw Error(r(188))}if(h.return!==v.return)h=S,v=_;else{for(var M=!1,q=S.child;q;){if(q===h){M=!0,h=S,v=_;break}if(q===v){M=!0,v=S,h=_;break}q=q.sibling}if(!M){for(q=_.child;q;){if(q===h){M=!0,h=_,v=S;break}if(q===v){M=!0,v=_,h=S;break}q=q.sibling}if(!M)throw Error(r(189))}}if(h.alternate!==v)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?s:c}function m(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s;for(s=s.child;s!==null;){if(c=m(s),c!==null)return c;s=s.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),C=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function U(s){return s===null||typeof s!="object"?null:(s=D&&s[D]||s["@@iterator"],typeof s=="function"?s:null)}var V=Symbol.for("react.client.reference");function H(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===V?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case b:return"Fragment";case N:return"Profiler";case w:return"StrictMode";case E:return"Suspense";case k:return"SuspenseList";case $:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case j:return"Portal";case C:return s.displayName||"Context";case O:return(s._context.displayName||"Context")+".Consumer";case A:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case T:return c=s.displayName||null,c!==null?c:H(s.type)||"Memo";case P:c=s._payload,s=s._init;try{return H(s(c))}catch{}}return null}var G=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},K=[],te=-1;function I(s){return{current:s}}function B(s){0>te||(s.current=K[te],K[te]=null,te--)}function Y(s,c){te++,K[te]=s.current,s.current=c}var ne=I(null),oe=I(null),xe=I(null),ee=I(null);function ae(s,c){switch(Y(xe,c),Y(oe,s),Y(ne,null),c.nodeType){case 9:case 11:s=(s=c.documentElement)&&(s=s.namespaceURI)?ik(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=ik(c),s=ok(c,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}B(ne),Y(ne,s)}function Z(){B(ne),B(oe),B(xe)}function pe(s){s.memoizedState!==null&&Y(ee,s);var c=ne.current,h=ok(c,s.type);c!==h&&(Y(oe,s),Y(ne,h))}function je(s){oe.current===s&&(B(ne),B(oe)),ee.current===s&&(B(ee),Id._currentValue=F)}var le,Re;function _e(s){if(le===void 0)try{throw Error()}catch(h){var c=h.stack.trim().match(/\n( *(at )?)/);le=c&&c[1]||"",Re=-1<h.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+le+s+Re}var me=!1;function ve(s,c){if(!s||me)return"";me=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(c){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(he){var ce=he}Reflect.construct(s,[],we)}else{try{we.call()}catch(he){ce=he}s.call(we.prototype)}}else{try{throw Error()}catch(he){ce=he}(we=s())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(he){if(he&&ce&&typeof he.stack=="string")return[he.stack,ce.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=v.DetermineComponentFrameRoot(),M=_[0],q=_[1];if(M&&q){var X=M.split(`
|
||
`),se=q.split(`
|
||
`);for(S=v=0;v<X.length&&!X[v].includes("DetermineComponentFrameRoot");)v++;for(;S<se.length&&!se[S].includes("DetermineComponentFrameRoot");)S++;if(v===X.length||S===se.length)for(v=X.length-1,S=se.length-1;1<=v&&0<=S&&X[v]!==se[S];)S--;for(;1<=v&&0<=S;v--,S--)if(X[v]!==se[S]){if(v!==1||S!==1)do if(v--,S--,0>S||X[v]!==se[S]){var ge=`
|
||
`+X[v].replace(" at new "," at ");return s.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",s.displayName)),ge}while(1<=v&&0<=S);break}}}finally{me=!1,Error.prepareStackTrace=h}return(h=s?s.displayName||s.name:"")?_e(h):""}function Le(s,c){switch(s.tag){case 26:case 27:case 5:return _e(s.type);case 16:return _e("Lazy");case 13:return s.child!==c&&c!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return ve(s.type,!1);case 11:return ve(s.type.render,!1);case 1:return ve(s.type,!0);case 31:return _e("Activity");default:return""}}function Dt(s){try{var c="",h=null;do c+=Le(s,h),h=s,s=s.return;while(s);return c}catch(v){return`
|
||
Error generating stack: `+v.message+`
|
||
`+v.stack}}var Nn=Object.prototype.hasOwnProperty,pr=e.unstable_scheduleCallback,nr=e.unstable_cancelCallback,vr=e.unstable_shouldYield,lt=e.unstable_requestPaint,rt=e.unstable_now,Dn=e.unstable_getCurrentPriorityLevel,hs=e.unstable_ImmediatePriority,rm=e.unstable_UserBlockingPriority,kl=e.unstable_NormalPriority,nx=e.unstable_LowPriority,am=e.unstable_IdlePriority,rx=e.log,ax=e.unstable_setDisableYieldValue,ms=null,gr=null;function Ga(s){if(typeof rx=="function"&&ax(s),gr&&typeof gr.setStrictMode=="function")try{gr.setStrictMode(ms,s)}catch{}}var rr=Math.clz32?Math.clz32:Lt,ix=Math.log,et=Math.LN2;function Lt(s){return s>>>=0,s===0?32:31-(ix(s)/et|0)|0}var He=256,gt=262144,$n=4194304;function tt(s){var c=s&42;if(c!==0)return c;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Pl(s,c,h){var v=s.pendingLanes;if(v===0)return 0;var S=0,_=s.suspendedLanes,M=s.pingedLanes;s=s.warmLanes;var q=v&134217727;return q!==0?(v=q&~_,v!==0?S=tt(v):(M&=q,M!==0?S=tt(M):h||(h=q&~s,h!==0&&(S=tt(h))))):(q=v&~_,q!==0?S=tt(q):M!==0?S=tt(M):h||(h=v&~s,h!==0&&(S=tt(h)))),S===0?0:c!==0&&c!==S&&(c&_)===0&&(_=S&-S,h=c&-c,_>=h||_===32&&(h&4194048)!==0)?c:S}function ps(s,c){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function ox(s,c){switch(s){case 1:case 2:case 4:case 8:case 64:return c+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 c+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 Ml(){var s=$n;return $n<<=1,($n&62914560)===0&&($n=4194304),s}function vs(s){for(var c=[],h=0;31>h;h++)c.push(s);return c}function Zu(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function OW(s,c,h,v,S,_){var M=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var q=s.entanglements,X=s.expirationTimes,se=s.hiddenUpdates;for(h=M&~h;0<h;){var ge=31-rr(h),we=1<<ge;q[ge]=0,X[ge]=-1;var ce=se[ge];if(ce!==null)for(se[ge]=null,ge=0;ge<ce.length;ge++){var he=ce[ge];he!==null&&(he.lane&=-536870913)}h&=~we}v!==0&&qE(s,v,0),_!==0&&S===0&&s.tag!==0&&(s.suspendedLanes|=_&~(M&~c))}function qE(s,c,h){s.pendingLanes|=c,s.suspendedLanes&=~c;var v=31-rr(c);s.entangledLanes|=c,s.entanglements[v]=s.entanglements[v]|1073741824|h&261930}function FE(s,c){var h=s.entangledLanes|=c;for(s=s.entanglements;h;){var v=31-rr(h),S=1<<v;S&c|s[v]&c&&(s[v]|=c),h&=~S}}function UE(s,c){var h=c&-c;return h=(h&42)!==0?1:sx(h),(h&(s.suspendedLanes|c))!==0?0:h}function sx(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function lx(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function HE(){var s=R.p;return s!==0?s:(s=window.event,s===void 0?32:Ak(s.type))}function WE(s,c){var h=R.p;try{return R.p=s,c()}finally{R.p=h}}var ho=Math.random().toString(36).slice(2),Gn="__reactFiber$"+ho,Sr="__reactProps$"+ho,Rl="__reactContainer$"+ho,cx="__reactEvents$"+ho,CW="__reactListeners$"+ho,EW="__reactHandles$"+ho,VE="__reactResources$"+ho,Qu="__reactMarker$"+ho;function ux(s){delete s[Gn],delete s[Sr],delete s[cx],delete s[CW],delete s[EW]}function Dl(s){var c=s[Gn];if(c)return c;for(var h=s.parentNode;h;){if(c=h[Rl]||h[Gn]){if(h=c.alternate,c.child!==null||h!==null&&h.child!==null)for(s=hk(s);s!==null;){if(h=s[Gn])return h;s=hk(s)}return c}s=h,h=s.parentNode}return null}function $l(s){if(s=s[Gn]||s[Rl]){var c=s.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return s}return null}function Ju(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s.stateNode;throw Error(r(33))}function Il(s){var c=s[VE];return c||(c=s[VE]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function In(s){s[Qu]=!0}var GE=new Set,YE={};function gs(s,c){Ll(s,c),Ll(s+"Capture",c)}function Ll(s,c){for(YE[s]=c,s=0;s<c.length;s++)GE.add(c[s])}var AW=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]*$"),KE={},XE={};function TW(s){return Nn.call(XE,s)?!0:Nn.call(KE,s)?!1:AW.test(s)?XE[s]=!0:(KE[s]=!0,!1)}function im(s,c,h){if(TW(c))if(h===null)s.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":s.removeAttribute(c);return;case"boolean":var v=c.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){s.removeAttribute(c);return}}s.setAttribute(c,""+h)}}function om(s,c,h){if(h===null)s.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(c);return}s.setAttribute(c,""+h)}}function ji(s,c,h,v){if(v===null)s.removeAttribute(h);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(h);return}s.setAttributeNS(c,h,""+v)}}function oa(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ZE(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function kW(s,c,h){var v=Object.getOwnPropertyDescriptor(s.constructor.prototype,c);if(!s.hasOwnProperty(c)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var S=v.get,_=v.set;return Object.defineProperty(s,c,{configurable:!0,get:function(){return S.call(this)},set:function(M){h=""+M,_.call(this,M)}}),Object.defineProperty(s,c,{enumerable:v.enumerable}),{getValue:function(){return h},setValue:function(M){h=""+M},stopTracking:function(){s._valueTracker=null,delete s[c]}}}}function dx(s){if(!s._valueTracker){var c=ZE(s)?"checked":"value";s._valueTracker=kW(s,c,""+s[c])}}function QE(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var h=c.getValue(),v="";return s&&(v=ZE(s)?s.checked?"true":"false":s.value),s=v,s!==h?(c.setValue(s),!0):!1}function sm(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var PW=/[\n"\\]/g;function sa(s){return s.replace(PW,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function fx(s,c,h,v,S,_,M,q){s.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?s.type=M:s.removeAttribute("type"),c!=null?M==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+oa(c)):s.value!==""+oa(c)&&(s.value=""+oa(c)):M!=="submit"&&M!=="reset"||s.removeAttribute("value"),c!=null?hx(s,M,oa(c)):h!=null?hx(s,M,oa(h)):v!=null&&s.removeAttribute("value"),S==null&&_!=null&&(s.defaultChecked=!!_),S!=null&&(s.checked=S&&typeof S!="function"&&typeof S!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?s.name=""+oa(q):s.removeAttribute("name")}function JE(s,c,h,v,S,_,M,q){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(s.type=_),c!=null||h!=null){if(!(_!=="submit"&&_!=="reset"||c!=null)){dx(s);return}h=h!=null?""+oa(h):"",c=c!=null?""+oa(c):h,q||c===s.value||(s.value=c),s.defaultValue=c}v=v??S,v=typeof v!="function"&&typeof v!="symbol"&&!!v,s.checked=q?s.checked:!!v,s.defaultChecked=!!v,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(s.name=M),dx(s)}function hx(s,c,h){c==="number"&&sm(s.ownerDocument)===s||s.defaultValue===""+h||(s.defaultValue=""+h)}function Bl(s,c,h,v){if(s=s.options,c){c={};for(var S=0;S<h.length;S++)c["$"+h[S]]=!0;for(h=0;h<s.length;h++)S=c.hasOwnProperty("$"+s[h].value),s[h].selected!==S&&(s[h].selected=S),S&&v&&(s[h].defaultSelected=!0)}else{for(h=""+oa(h),c=null,S=0;S<s.length;S++){if(s[S].value===h){s[S].selected=!0,v&&(s[S].defaultSelected=!0);return}c!==null||s[S].disabled||(c=s[S])}c!==null&&(c.selected=!0)}}function eA(s,c,h){if(c!=null&&(c=""+oa(c),c!==s.value&&(s.value=c),h==null)){s.defaultValue!==c&&(s.defaultValue=c);return}s.defaultValue=h!=null?""+oa(h):""}function tA(s,c,h,v){if(c==null){if(v!=null){if(h!=null)throw Error(r(92));if(G(v)){if(1<v.length)throw Error(r(93));v=v[0]}h=v}h==null&&(h=""),c=h}h=oa(c),s.defaultValue=h,v=s.textContent,v===h&&v!==""&&v!==null&&(s.value=v),dx(s)}function zl(s,c){if(c){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=c;return}}s.textContent=c}var MW=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 nA(s,c,h){var v=c.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?v?s.setProperty(c,""):c==="float"?s.cssFloat="":s[c]="":v?s.setProperty(c,h):typeof h!="number"||h===0||MW.has(c)?c==="float"?s.cssFloat=h:s[c]=(""+h).trim():s[c]=h+"px"}function rA(s,c,h){if(c!=null&&typeof c!="object")throw Error(r(62));if(s=s.style,h!=null){for(var v in h)!h.hasOwnProperty(v)||c!=null&&c.hasOwnProperty(v)||(v.indexOf("--")===0?s.setProperty(v,""):v==="float"?s.cssFloat="":s[v]="");for(var S in c)v=c[S],c.hasOwnProperty(S)&&h[S]!==v&&nA(s,S,v)}else for(var _ in c)c.hasOwnProperty(_)&&nA(s,_,c[_])}function mx(s){if(s.indexOf("-")===-1)return!1;switch(s){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 RW=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"]]),DW=/^[\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 lm(s){return DW.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Si(){}var px=null;function vx(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var ql=null,Fl=null;function aA(s){var c=$l(s);if(c&&(s=c.stateNode)){var h=s[Sr]||null;e:switch(s=c.stateNode,c.type){case"input":if(fx(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),c=h.name,h.type==="radio"&&c!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+sa(""+c)+'"][type="radio"]'),c=0;c<h.length;c++){var v=h[c];if(v!==s&&v.form===s.form){var S=v[Sr]||null;if(!S)throw Error(r(90));fx(v,S.value,S.defaultValue,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name)}}for(c=0;c<h.length;c++)v=h[c],v.form===s.form&&QE(v)}break e;case"textarea":eA(s,h.value,h.defaultValue);break e;case"select":c=h.value,c!=null&&Bl(s,!!h.multiple,c,!1)}}}var gx=!1;function iA(s,c,h){if(gx)return s(c,h);gx=!0;try{var v=s(c);return v}finally{if(gx=!1,(ql!==null||Fl!==null)&&(Km(),ql&&(c=ql,s=Fl,Fl=ql=null,aA(c),s)))for(c=0;c<s.length;c++)aA(s[c])}}function ed(s,c){var h=s.stateNode;if(h===null)return null;var v=h[Sr]||null;if(v===null)return null;h=v[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(s=s.type,v=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!v;break e;default:s=!1}if(s)return null;if(h&&typeof h!="function")throw Error(r(231,c,typeof h));return h}var _i=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yx=!1;if(_i)try{var td={};Object.defineProperty(td,"passive",{get:function(){yx=!0}}),window.addEventListener("test",td,td),window.removeEventListener("test",td,td)}catch{yx=!1}var mo=null,xx=null,cm=null;function oA(){if(cm)return cm;var s,c=xx,h=c.length,v,S="value"in mo?mo.value:mo.textContent,_=S.length;for(s=0;s<h&&c[s]===S[s];s++);var M=h-s;for(v=1;v<=M&&c[h-v]===S[_-v];v++);return cm=S.slice(s,1<v?1-v:void 0)}function um(s){var c=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&c===13&&(s=13)):s=c,s===10&&(s=13),32<=s||s===13?s:0}function dm(){return!0}function sA(){return!1}function _r(s){function c(h,v,S,_,M){this._reactName=h,this._targetInst=S,this.type=v,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var q in s)s.hasOwnProperty(q)&&(h=s[q],this[q]=h?h(_):_[q]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?dm:sA,this.isPropagationStopped=sA,this}return p(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=dm)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=dm)},persist:function(){},isPersistent:dm}),c}var ys={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fm=_r(ys),nd=p({},ys,{view:0,detail:0}),$W=_r(nd),bx,wx,rd,hm=p({},nd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sx,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==rd&&(rd&&s.type==="mousemove"?(bx=s.screenX-rd.screenX,wx=s.screenY-rd.screenY):wx=bx=0,rd=s),bx)},movementY:function(s){return"movementY"in s?s.movementY:wx}}),lA=_r(hm),IW=p({},hm,{dataTransfer:0}),LW=_r(IW),BW=p({},nd,{relatedTarget:0}),jx=_r(BW),zW=p({},ys,{animationName:0,elapsedTime:0,pseudoElement:0}),qW=_r(zW),FW=p({},ys,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),UW=_r(FW),HW=p({},ys,{data:0}),cA=_r(HW),WW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VW={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"},GW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YW(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=GW[s])?!!c[s]:!1}function Sx(){return YW}var KW=p({},nd,{key:function(s){if(s.key){var c=WW[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=um(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?VW[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sx,charCode:function(s){return s.type==="keypress"?um(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?um(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),XW=_r(KW),ZW=p({},hm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uA=_r(ZW),QW=p({},nd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sx}),JW=_r(QW),e7=p({},ys,{propertyName:0,elapsedTime:0,pseudoElement:0}),t7=_r(e7),n7=p({},hm,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),r7=_r(n7),a7=p({},ys,{newState:0,oldState:0}),i7=_r(a7),o7=[9,13,27,32],_x=_i&&"CompositionEvent"in window,ad=null;_i&&"documentMode"in document&&(ad=document.documentMode);var s7=_i&&"TextEvent"in window&&!ad,dA=_i&&(!_x||ad&&8<ad&&11>=ad),fA=" ",hA=!1;function mA(s,c){switch(s){case"keyup":return o7.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ul=!1;function l7(s,c){switch(s){case"compositionend":return pA(c);case"keypress":return c.which!==32?null:(hA=!0,fA);case"textInput":return s=c.data,s===fA&&hA?null:s;default:return null}}function c7(s,c){if(Ul)return s==="compositionend"||!_x&&mA(s,c)?(s=oA(),cm=xx=mo=null,Ul=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return dA&&c.locale!=="ko"?null:c.data;default:return null}}var u7={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 vA(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!u7[s.type]:c==="textarea"}function gA(s,c,h,v){ql?Fl?Fl.push(v):Fl=[v]:ql=v,c=np(c,"onChange"),0<c.length&&(h=new fm("onChange","change",null,h,v),s.push({event:h,listeners:c}))}var id=null,od=null;function d7(s){J2(s,0)}function mm(s){var c=Ju(s);if(QE(c))return s}function yA(s,c){if(s==="change")return c}var xA=!1;if(_i){var Nx;if(_i){var Ox="oninput"in document;if(!Ox){var bA=document.createElement("div");bA.setAttribute("oninput","return;"),Ox=typeof bA.oninput=="function"}Nx=Ox}else Nx=!1;xA=Nx&&(!document.documentMode||9<document.documentMode)}function wA(){id&&(id.detachEvent("onpropertychange",jA),od=id=null)}function jA(s){if(s.propertyName==="value"&&mm(od)){var c=[];gA(c,od,s,vx(s)),iA(d7,c)}}function f7(s,c,h){s==="focusin"?(wA(),id=c,od=h,id.attachEvent("onpropertychange",jA)):s==="focusout"&&wA()}function h7(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return mm(od)}function m7(s,c){if(s==="click")return mm(c)}function p7(s,c){if(s==="input"||s==="change")return mm(c)}function v7(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var Br=typeof Object.is=="function"?Object.is:v7;function sd(s,c){if(Br(s,c))return!0;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return!1;var h=Object.keys(s),v=Object.keys(c);if(h.length!==v.length)return!1;for(v=0;v<h.length;v++){var S=h[v];if(!Nn.call(c,S)||!Br(s[S],c[S]))return!1}return!0}function SA(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function _A(s,c){var h=SA(s);s=0;for(var v;h;){if(h.nodeType===3){if(v=s+h.textContent.length,s<=c&&v>=c)return{node:h,offset:c-s};s=v}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=SA(h)}}function NA(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?NA(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function OA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=sm(s.document);c instanceof s.HTMLIFrameElement;){try{var h=typeof c.contentWindow.location.href=="string"}catch{h=!1}if(h)s=c.contentWindow;else break;c=sm(s.document)}return c}function Cx(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}var g7=_i&&"documentMode"in document&&11>=document.documentMode,Hl=null,Ex=null,ld=null,Ax=!1;function CA(s,c,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Ax||Hl==null||Hl!==sm(v)||(v=Hl,"selectionStart"in v&&Cx(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),ld&&sd(ld,v)||(ld=v,v=np(Ex,"onSelect"),0<v.length&&(c=new fm("onSelect","select",null,c,h),s.push({event:c,listeners:v}),c.target=Hl)))}function xs(s,c){var h={};return h[s.toLowerCase()]=c.toLowerCase(),h["Webkit"+s]="webkit"+c,h["Moz"+s]="moz"+c,h}var Wl={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionrun:xs("Transition","TransitionRun"),transitionstart:xs("Transition","TransitionStart"),transitioncancel:xs("Transition","TransitionCancel"),transitionend:xs("Transition","TransitionEnd")},Tx={},EA={};_i&&(EA=document.createElement("div").style,"AnimationEvent"in window||(delete Wl.animationend.animation,delete Wl.animationiteration.animation,delete Wl.animationstart.animation),"TransitionEvent"in window||delete Wl.transitionend.transition);function bs(s){if(Tx[s])return Tx[s];if(!Wl[s])return s;var c=Wl[s],h;for(h in c)if(c.hasOwnProperty(h)&&h in EA)return Tx[s]=c[h];return s}var AA=bs("animationend"),TA=bs("animationiteration"),kA=bs("animationstart"),y7=bs("transitionrun"),x7=bs("transitionstart"),b7=bs("transitioncancel"),PA=bs("transitionend"),MA=new Map,kx="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(" ");kx.push("scrollEnd");function Aa(s,c){MA.set(s,c),gs(c,[s])}var pm=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},la=[],Vl=0,Px=0;function vm(){for(var s=Vl,c=Px=Vl=0;c<s;){var h=la[c];la[c++]=null;var v=la[c];la[c++]=null;var S=la[c];la[c++]=null;var _=la[c];if(la[c++]=null,v!==null&&S!==null){var M=v.pending;M===null?S.next=S:(S.next=M.next,M.next=S),v.pending=S}_!==0&&RA(h,S,_)}}function gm(s,c,h,v){la[Vl++]=s,la[Vl++]=c,la[Vl++]=h,la[Vl++]=v,Px|=v,s.lanes|=v,s=s.alternate,s!==null&&(s.lanes|=v)}function Mx(s,c,h,v){return gm(s,c,h,v),ym(s)}function ws(s,c){return gm(s,null,null,c),ym(s)}function RA(s,c,h){s.lanes|=h;var v=s.alternate;v!==null&&(v.lanes|=h);for(var S=!1,_=s.return;_!==null;)_.childLanes|=h,v=_.alternate,v!==null&&(v.childLanes|=h),_.tag===22&&(s=_.stateNode,s===null||s._visibility&1||(S=!0)),s=_,_=_.return;return s.tag===3?(_=s.stateNode,S&&c!==null&&(S=31-rr(h),s=_.hiddenUpdates,v=s[S],v===null?s[S]=[c]:v.push(c),c.lane=h|536870912),_):null}function ym(s){if(50<Td)throw Td=0,Fb=null,Error(r(185));for(var c=s.return;c!==null;)s=c,c=s.return;return s.tag===3?s.stateNode:null}var Gl={};function w7(s,c,h,v){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(s,c,h,v){return new w7(s,c,h,v)}function Rx(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Ni(s,c){var h=s.alternate;return h===null?(h=zr(s.tag,c,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=c,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&65011712,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,c=s.dependencies,h.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h.refCleanup=s.refCleanup,h}function DA(s,c){s.flags&=65011714;var h=s.alternate;return h===null?(s.childLanes=0,s.lanes=c,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,c=h.dependencies,s.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),s}function xm(s,c,h,v,S,_){var M=0;if(v=s,typeof s=="function")Rx(s)&&(M=1);else if(typeof s=="string")M=OV(s,h,ne.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case $:return s=zr(31,h,c,S),s.elementType=$,s.lanes=_,s;case b:return js(h.children,S,_,c);case w:M=8,S|=24;break;case N:return s=zr(12,h,c,S|2),s.elementType=N,s.lanes=_,s;case E:return s=zr(13,h,c,S),s.elementType=E,s.lanes=_,s;case k:return s=zr(19,h,c,S),s.elementType=k,s.lanes=_,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case C:M=10;break e;case O:M=9;break e;case A:M=11;break e;case T:M=14;break e;case P:M=16,v=null;break e}M=29,h=Error(r(130,s===null?"null":typeof s,"")),v=null}return c=zr(M,h,c,S),c.elementType=s,c.type=v,c.lanes=_,c}function js(s,c,h,v){return s=zr(7,s,v,c),s.lanes=h,s}function Dx(s,c,h){return s=zr(6,s,null,c),s.lanes=h,s}function $A(s){var c=zr(18,null,null,0);return c.stateNode=s,c}function $x(s,c,h){return c=zr(4,s.children!==null?s.children:[],s.key,c),c.lanes=h,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}var IA=new WeakMap;function ca(s,c){if(typeof s=="object"&&s!==null){var h=IA.get(s);return h!==void 0?h:(c={value:s,source:c,stack:Dt(c)},IA.set(s,c),c)}return{value:s,source:c,stack:Dt(c)}}var Yl=[],Kl=0,bm=null,cd=0,ua=[],da=0,po=null,Ya=1,Ka="";function Oi(s,c){Yl[Kl++]=cd,Yl[Kl++]=bm,bm=s,cd=c}function LA(s,c,h){ua[da++]=Ya,ua[da++]=Ka,ua[da++]=po,po=s;var v=Ya;s=Ka;var S=32-rr(v)-1;v&=~(1<<S),h+=1;var _=32-rr(c)+S;if(30<_){var M=S-S%5;_=(v&(1<<M)-1).toString(32),v>>=M,S-=M,Ya=1<<32-rr(c)+S|h<<S|v,Ka=_+s}else Ya=1<<_|h<<S|v,Ka=s}function Ix(s){s.return!==null&&(Oi(s,1),LA(s,1,0))}function Lx(s){for(;s===bm;)bm=Yl[--Kl],Yl[Kl]=null,cd=Yl[--Kl],Yl[Kl]=null;for(;s===po;)po=ua[--da],ua[da]=null,Ka=ua[--da],ua[da]=null,Ya=ua[--da],ua[da]=null}function BA(s,c){ua[da++]=Ya,ua[da++]=Ka,ua[da++]=po,Ya=c.id,Ka=c.overflow,po=s}var Yn=null,Ht=null,ft=!1,vo=null,fa=!1,Bx=Error(r(519));function go(s){var c=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ud(ca(c,s)),Bx}function zA(s){var c=s.stateNode,h=s.type,v=s.memoizedProps;switch(c[Gn]=s,c[Sr]=v,h){case"dialog":ot("cancel",c),ot("close",c);break;case"iframe":case"object":case"embed":ot("load",c);break;case"video":case"audio":for(h=0;h<Pd.length;h++)ot(Pd[h],c);break;case"source":ot("error",c);break;case"img":case"image":case"link":ot("error",c),ot("load",c);break;case"details":ot("toggle",c);break;case"input":ot("invalid",c),JE(c,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":ot("invalid",c);break;case"textarea":ot("invalid",c),tA(c,v.value,v.defaultValue,v.children)}h=v.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||c.textContent===""+h||v.suppressHydrationWarning===!0||rk(c.textContent,h)?(v.popover!=null&&(ot("beforetoggle",c),ot("toggle",c)),v.onScroll!=null&&ot("scroll",c),v.onScrollEnd!=null&&ot("scrollend",c),v.onClick!=null&&(c.onclick=Si),c=!0):c=!1,c||go(s,!0)}function qA(s){for(Yn=s.return;Yn;)switch(Yn.tag){case 5:case 31:case 13:fa=!1;return;case 27:case 3:fa=!0;return;default:Yn=Yn.return}}function Xl(s){if(s!==Yn)return!1;if(!ft)return qA(s),ft=!0,!1;var c=s.tag,h;if((h=c!==3&&c!==27)&&((h=c===5)&&(h=s.type,h=!(h!=="form"&&h!=="button")||r0(s.type,s.memoizedProps)),h=!h),h&&Ht&&go(s),qA(s),c===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Ht=fk(s)}else if(c===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Ht=fk(s)}else c===27?(c=Ht,ko(s.type)?(s=l0,l0=null,Ht=s):Ht=c):Ht=Yn?ma(s.stateNode.nextSibling):null;return!0}function Ss(){Ht=Yn=null,ft=!1}function zx(){var s=vo;return s!==null&&(Er===null?Er=s:Er.push.apply(Er,s),vo=null),s}function ud(s){vo===null?vo=[s]:vo.push(s)}var qx=I(null),_s=null,Ci=null;function yo(s,c,h){Y(qx,c._currentValue),c._currentValue=h}function Ei(s){s._currentValue=qx.current,B(qx)}function Fx(s,c,h){for(;s!==null;){var v=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,v!==null&&(v.childLanes|=c)):v!==null&&(v.childLanes&c)!==c&&(v.childLanes|=c),s===h)break;s=s.return}}function Ux(s,c,h,v){var S=s.child;for(S!==null&&(S.return=s);S!==null;){var _=S.dependencies;if(_!==null){var M=S.child;_=_.firstContext;e:for(;_!==null;){var q=_;_=S;for(var X=0;X<c.length;X++)if(q.context===c[X]){_.lanes|=h,q=_.alternate,q!==null&&(q.lanes|=h),Fx(_.return,h,s),v||(M=null);break e}_=q.next}}else if(S.tag===18){if(M=S.return,M===null)throw Error(r(341));M.lanes|=h,_=M.alternate,_!==null&&(_.lanes|=h),Fx(M,h,s),M=null}else M=S.child;if(M!==null)M.return=S;else for(M=S;M!==null;){if(M===s){M=null;break}if(S=M.sibling,S!==null){S.return=M.return,M=S;break}M=M.return}S=M}}function Zl(s,c,h,v){s=null;for(var S=c,_=!1;S!==null;){if(!_){if((S.flags&524288)!==0)_=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var M=S.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var q=S.type;Br(S.pendingProps.value,M.value)||(s!==null?s.push(q):s=[q])}}else if(S===ee.current){if(M=S.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(s!==null?s.push(Id):s=[Id])}S=S.return}s!==null&&Ux(c,s,h,v),c.flags|=262144}function wm(s){for(s=s.firstContext;s!==null;){if(!Br(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Ns(s){_s=s,Ci=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Kn(s){return FA(_s,s)}function jm(s,c){return _s===null&&Ns(s),FA(s,c)}function FA(s,c){var h=c._currentValue;if(c={context:c,memoizedValue:h,next:null},Ci===null){if(s===null)throw Error(r(308));Ci=c,s.dependencies={lanes:0,firstContext:c},s.flags|=524288}else Ci=Ci.next=c;return h}var j7=typeof AbortController<"u"?AbortController:function(){var s=[],c=this.signal={aborted:!1,addEventListener:function(h,v){s.push(v)}};this.abort=function(){c.aborted=!0,s.forEach(function(h){return h()})}},S7=e.unstable_scheduleCallback,_7=e.unstable_NormalPriority,un={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hx(){return{controller:new j7,data:new Map,refCount:0}}function dd(s){s.refCount--,s.refCount===0&&S7(_7,function(){s.controller.abort()})}var fd=null,Wx=0,Ql=0,Jl=null;function N7(s,c){if(fd===null){var h=fd=[];Wx=0,Ql=Yb(),Jl={status:"pending",value:void 0,then:function(v){h.push(v)}}}return Wx++,c.then(UA,UA),c}function UA(){if(--Wx===0&&fd!==null){Jl!==null&&(Jl.status="fulfilled");var s=fd;fd=null,Ql=0,Jl=null;for(var c=0;c<s.length;c++)(0,s[c])()}}function O7(s,c){var h=[],v={status:"pending",value:null,reason:null,then:function(S){h.push(S)}};return s.then(function(){v.status="fulfilled",v.value=c;for(var S=0;S<h.length;S++)(0,h[S])(c)},function(S){for(v.status="rejected",v.reason=S,S=0;S<h.length;S++)(0,h[S])(void 0)}),v}var HA=L.S;L.S=function(s,c){C2=rt(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&N7(s,c),HA!==null&&HA(s,c)};var Os=I(null);function Vx(){var s=Os.current;return s!==null?s:$t.pooledCache}function Sm(s,c){c===null?Y(Os,Os.current):Y(Os,c.pool)}function WA(){var s=Vx();return s===null?null:{parent:un._currentValue,pool:s}}var ec=Error(r(460)),Gx=Error(r(474)),_m=Error(r(542)),Nm={then:function(){}};function VA(s){return s=s.status,s==="fulfilled"||s==="rejected"}function GA(s,c,h){switch(h=s[h],h===void 0?s.push(c):h!==c&&(c.then(Si,Si),c=h),c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,KA(s),s;default:if(typeof c.status=="string")c.then(Si,Si);else{if(s=$t,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=c,s.status="pending",s.then(function(v){if(c.status==="pending"){var S=c;S.status="fulfilled",S.value=v}},function(v){if(c.status==="pending"){var S=c;S.status="rejected",S.reason=v}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,KA(s),s}throw Es=c,ec}}function Cs(s){try{var c=s._init;return c(s._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Es=h,ec):h}}var Es=null;function YA(){if(Es===null)throw Error(r(459));var s=Es;return Es=null,s}function KA(s){if(s===ec||s===_m)throw Error(r(483))}var tc=null,hd=0;function Om(s){var c=hd;return hd+=1,tc===null&&(tc=[]),GA(tc,s,c)}function md(s,c){c=c.props.ref,s.ref=c!==void 0?c:null}function Cm(s,c){throw c.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(c),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s)))}function XA(s){function c(re,Q){if(s){var ie=re.deletions;ie===null?(re.deletions=[Q],re.flags|=16):ie.push(Q)}}function h(re,Q){if(!s)return null;for(;Q!==null;)c(re,Q),Q=Q.sibling;return null}function v(re){for(var Q=new Map;re!==null;)re.key!==null?Q.set(re.key,re):Q.set(re.index,re),re=re.sibling;return Q}function S(re,Q){return re=Ni(re,Q),re.index=0,re.sibling=null,re}function _(re,Q,ie){return re.index=ie,s?(ie=re.alternate,ie!==null?(ie=ie.index,ie<Q?(re.flags|=67108866,Q):ie):(re.flags|=67108866,Q)):(re.flags|=1048576,Q)}function M(re){return s&&re.alternate===null&&(re.flags|=67108866),re}function q(re,Q,ie,be){return Q===null||Q.tag!==6?(Q=Dx(ie,re.mode,be),Q.return=re,Q):(Q=S(Q,ie),Q.return=re,Q)}function X(re,Q,ie,be){var Ie=ie.type;return Ie===b?ge(re,Q,ie.props.children,be,ie.key):Q!==null&&(Q.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===P&&Cs(Ie)===Q.type)?(Q=S(Q,ie.props),md(Q,ie),Q.return=re,Q):(Q=xm(ie.type,ie.key,ie.props,null,re.mode,be),md(Q,ie),Q.return=re,Q)}function se(re,Q,ie,be){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ie.containerInfo||Q.stateNode.implementation!==ie.implementation?(Q=$x(ie,re.mode,be),Q.return=re,Q):(Q=S(Q,ie.children||[]),Q.return=re,Q)}function ge(re,Q,ie,be,Ie){return Q===null||Q.tag!==7?(Q=js(ie,re.mode,be,Ie),Q.return=re,Q):(Q=S(Q,ie),Q.return=re,Q)}function we(re,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Dx(""+Q,re.mode,ie),Q.return=re,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return ie=xm(Q.type,Q.key,Q.props,null,re.mode,ie),md(ie,Q),ie.return=re,ie;case j:return Q=$x(Q,re.mode,ie),Q.return=re,Q;case P:return Q=Cs(Q),we(re,Q,ie)}if(G(Q)||U(Q))return Q=js(Q,re.mode,ie,null),Q.return=re,Q;if(typeof Q.then=="function")return we(re,Om(Q),ie);if(Q.$$typeof===C)return we(re,jm(re,Q),ie);Cm(re,Q)}return null}function ce(re,Q,ie,be){var Ie=Q!==null?Q.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Ie!==null?null:q(re,Q,""+ie,be);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return ie.key===Ie?X(re,Q,ie,be):null;case j:return ie.key===Ie?se(re,Q,ie,be):null;case P:return ie=Cs(ie),ce(re,Q,ie,be)}if(G(ie)||U(ie))return Ie!==null?null:ge(re,Q,ie,be,null);if(typeof ie.then=="function")return ce(re,Q,Om(ie),be);if(ie.$$typeof===C)return ce(re,Q,jm(re,ie),be);Cm(re,ie)}return null}function he(re,Q,ie,be,Ie){if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return re=re.get(ie)||null,q(Q,re,""+be,Ie);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case x:return re=re.get(be.key===null?ie:be.key)||null,X(Q,re,be,Ie);case j:return re=re.get(be.key===null?ie:be.key)||null,se(Q,re,be,Ie);case P:return be=Cs(be),he(re,Q,ie,be,Ie)}if(G(be)||U(be))return re=re.get(ie)||null,ge(Q,re,be,Ie,null);if(typeof be.then=="function")return he(re,Q,ie,Om(be),Ie);if(be.$$typeof===C)return he(re,Q,ie,jm(Q,be),Ie);Cm(Q,be)}return null}function Ae(re,Q,ie,be){for(var Ie=null,ht=null,De=Q,Qe=Q=0,ut=null;De!==null&&Qe<ie.length;Qe++){De.index>Qe?(ut=De,De=null):ut=De.sibling;var mt=ce(re,De,ie[Qe],be);if(mt===null){De===null&&(De=ut);break}s&&De&&mt.alternate===null&&c(re,De),Q=_(mt,Q,Qe),ht===null?Ie=mt:ht.sibling=mt,ht=mt,De=ut}if(Qe===ie.length)return h(re,De),ft&&Oi(re,Qe),Ie;if(De===null){for(;Qe<ie.length;Qe++)De=we(re,ie[Qe],be),De!==null&&(Q=_(De,Q,Qe),ht===null?Ie=De:ht.sibling=De,ht=De);return ft&&Oi(re,Qe),Ie}for(De=v(De);Qe<ie.length;Qe++)ut=he(De,re,Qe,ie[Qe],be),ut!==null&&(s&&ut.alternate!==null&&De.delete(ut.key===null?Qe:ut.key),Q=_(ut,Q,Qe),ht===null?Ie=ut:ht.sibling=ut,ht=ut);return s&&De.forEach(function($o){return c(re,$o)}),ft&&Oi(re,Qe),Ie}function ze(re,Q,ie,be){if(ie==null)throw Error(r(151));for(var Ie=null,ht=null,De=Q,Qe=Q=0,ut=null,mt=ie.next();De!==null&&!mt.done;Qe++,mt=ie.next()){De.index>Qe?(ut=De,De=null):ut=De.sibling;var $o=ce(re,De,mt.value,be);if($o===null){De===null&&(De=ut);break}s&&De&&$o.alternate===null&&c(re,De),Q=_($o,Q,Qe),ht===null?Ie=$o:ht.sibling=$o,ht=$o,De=ut}if(mt.done)return h(re,De),ft&&Oi(re,Qe),Ie;if(De===null){for(;!mt.done;Qe++,mt=ie.next())mt=we(re,mt.value,be),mt!==null&&(Q=_(mt,Q,Qe),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return ft&&Oi(re,Qe),Ie}for(De=v(De);!mt.done;Qe++,mt=ie.next())mt=he(De,re,Qe,mt.value,be),mt!==null&&(s&&mt.alternate!==null&&De.delete(mt.key===null?Qe:mt.key),Q=_(mt,Q,Qe),ht===null?Ie=mt:ht.sibling=mt,ht=mt);return s&&De.forEach(function(IV){return c(re,IV)}),ft&&Oi(re,Qe),Ie}function Pt(re,Q,ie,be){if(typeof ie=="object"&&ie!==null&&ie.type===b&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:e:{for(var Ie=ie.key;Q!==null;){if(Q.key===Ie){if(Ie=ie.type,Ie===b){if(Q.tag===7){h(re,Q.sibling),be=S(Q,ie.props.children),be.return=re,re=be;break e}}else if(Q.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===P&&Cs(Ie)===Q.type){h(re,Q.sibling),be=S(Q,ie.props),md(be,ie),be.return=re,re=be;break e}h(re,Q);break}else c(re,Q);Q=Q.sibling}ie.type===b?(be=js(ie.props.children,re.mode,be,ie.key),be.return=re,re=be):(be=xm(ie.type,ie.key,ie.props,null,re.mode,be),md(be,ie),be.return=re,re=be)}return M(re);case j:e:{for(Ie=ie.key;Q!==null;){if(Q.key===Ie)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){h(re,Q.sibling),be=S(Q,ie.children||[]),be.return=re,re=be;break e}else{h(re,Q);break}else c(re,Q);Q=Q.sibling}be=$x(ie,re.mode,be),be.return=re,re=be}return M(re);case P:return ie=Cs(ie),Pt(re,Q,ie,be)}if(G(ie))return Ae(re,Q,ie,be);if(U(ie)){if(Ie=U(ie),typeof Ie!="function")throw Error(r(150));return ie=Ie.call(ie),ze(re,Q,ie,be)}if(typeof ie.then=="function")return Pt(re,Q,Om(ie),be);if(ie.$$typeof===C)return Pt(re,Q,jm(re,ie),be);Cm(re,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(h(re,Q.sibling),be=S(Q,ie),be.return=re,re=be):(h(re,Q),be=Dx(ie,re.mode,be),be.return=re,re=be),M(re)):h(re,Q)}return function(re,Q,ie,be){try{hd=0;var Ie=Pt(re,Q,ie,be);return tc=null,Ie}catch(De){if(De===ec||De===_m)throw De;var ht=zr(29,De,null,re.mode);return ht.lanes=be,ht.return=re,ht}finally{}}}var As=XA(!0),ZA=XA(!1),xo=!1;function Yx(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kx(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function wo(s,c,h){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(yt&2)!==0){var S=v.pending;return S===null?c.next=c:(c.next=S.next,S.next=c),v.pending=c,c=ym(s),RA(s,null,h),c}return gm(s,v,c,h),ym(s)}function pd(s,c,h){if(c=c.updateQueue,c!==null&&(c=c.shared,(h&4194048)!==0)){var v=c.lanes;v&=s.pendingLanes,h|=v,c.lanes=h,FE(s,h)}}function Xx(s,c){var h=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,h===v)){var S=null,_=null;if(h=h.firstBaseUpdate,h!==null){do{var M={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};_===null?S=_=M:_=_.next=M,h=h.next}while(h!==null);_===null?S=_=c:_=_.next=c}else S=_=c;h={baseState:v.baseState,firstBaseUpdate:S,lastBaseUpdate:_,shared:v.shared,callbacks:v.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=c:s.next=c,h.lastBaseUpdate=c}var Zx=!1;function vd(){if(Zx){var s=Jl;if(s!==null)throw s}}function gd(s,c,h,v){Zx=!1;var S=s.updateQueue;xo=!1;var _=S.firstBaseUpdate,M=S.lastBaseUpdate,q=S.shared.pending;if(q!==null){S.shared.pending=null;var X=q,se=X.next;X.next=null,M===null?_=se:M.next=se,M=X;var ge=s.alternate;ge!==null&&(ge=ge.updateQueue,q=ge.lastBaseUpdate,q!==M&&(q===null?ge.firstBaseUpdate=se:q.next=se,ge.lastBaseUpdate=X))}if(_!==null){var we=S.baseState;M=0,ge=se=X=null,q=_;do{var ce=q.lane&-536870913,he=ce!==q.lane;if(he?(ct&ce)===ce:(v&ce)===ce){ce!==0&&ce===Ql&&(Zx=!0),ge!==null&&(ge=ge.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var Ae=s,ze=q;ce=c;var Pt=h;switch(ze.tag){case 1:if(Ae=ze.payload,typeof Ae=="function"){we=Ae.call(Pt,we,ce);break e}we=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ze.payload,ce=typeof Ae=="function"?Ae.call(Pt,we,ce):Ae,ce==null)break e;we=p({},we,ce);break e;case 2:xo=!0}}ce=q.callback,ce!==null&&(s.flags|=64,he&&(s.flags|=8192),he=S.callbacks,he===null?S.callbacks=[ce]:he.push(ce))}else he={lane:ce,tag:q.tag,payload:q.payload,callback:q.callback,next:null},ge===null?(se=ge=he,X=we):ge=ge.next=he,M|=ce;if(q=q.next,q===null){if(q=S.shared.pending,q===null)break;he=q,q=he.next,he.next=null,S.lastBaseUpdate=he,S.shared.pending=null}}while(!0);ge===null&&(X=we),S.baseState=X,S.firstBaseUpdate=se,S.lastBaseUpdate=ge,_===null&&(S.shared.lanes=0),Oo|=M,s.lanes=M,s.memoizedState=we}}function QA(s,c){if(typeof s!="function")throw Error(r(191,s));s.call(c)}function JA(s,c){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)QA(h[s],c)}var nc=I(null),Em=I(0);function eT(s,c){s=Ii,Y(Em,s),Y(nc,c),Ii=s|c.baseLanes}function Qx(){Y(Em,Ii),Y(nc,nc.current)}function Jx(){Ii=Em.current,B(nc),B(Em)}var qr=I(null),ha=null;function jo(s){var c=s.alternate;Y(on,on.current&1),Y(qr,s),ha===null&&(c===null||nc.current!==null||c.memoizedState!==null)&&(ha=s)}function eb(s){Y(on,on.current),Y(qr,s),ha===null&&(ha=s)}function tT(s){s.tag===22?(Y(on,on.current),Y(qr,s),ha===null&&(ha=s)):So()}function So(){Y(on,on.current),Y(qr,qr.current)}function Fr(s){B(qr),ha===s&&(ha=null),B(on)}var on=I(0);function Am(s){for(var c=s;c!==null;){if(c.tag===13){var h=c.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||o0(h)||s0(h)))return c}else if(c.tag===19&&(c.memoizedProps.revealOrder==="forwards"||c.memoizedProps.revealOrder==="backwards"||c.memoizedProps.revealOrder==="unstable_legacy-backwards"||c.memoizedProps.revealOrder==="together")){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Ai=0,Ke=null,Tt=null,dn=null,Tm=!1,rc=!1,Ts=!1,km=0,yd=0,ac=null,C7=0;function nn(){throw Error(r(321))}function tb(s,c){if(c===null)return!1;for(var h=0;h<c.length&&h<s.length;h++)if(!Br(s[h],c[h]))return!1;return!0}function nb(s,c,h,v,S,_){return Ai=_,Ke=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,L.H=s===null||s.memoizedState===null?LT:gb,Ts=!1,_=h(v,S),Ts=!1,rc&&(_=rT(c,h,v,S)),nT(s),_}function nT(s){L.H=wd;var c=Tt!==null&&Tt.next!==null;if(Ai=0,dn=Tt=Ke=null,Tm=!1,yd=0,ac=null,c)throw Error(r(300));s===null||fn||(s=s.dependencies,s!==null&&wm(s)&&(fn=!0))}function rT(s,c,h,v){Ke=s;var S=0;do{if(rc&&(ac=null),yd=0,rc=!1,25<=S)throw Error(r(301));if(S+=1,dn=Tt=null,s.updateQueue!=null){var _=s.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}L.H=BT,_=c(h,v)}while(rc);return _}function E7(){var s=L.H,c=s.useState()[0];return c=typeof c.then=="function"?xd(c):c,s=s.useState()[0],(Tt!==null?Tt.memoizedState:null)!==s&&(Ke.flags|=1024),c}function rb(){var s=km!==0;return km=0,s}function ab(s,c,h){c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~h}function ib(s){if(Tm){for(s=s.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next}Tm=!1}Ai=0,dn=Tt=Ke=null,rc=!1,yd=km=0,ac=null}function yr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dn===null?Ke.memoizedState=dn=s:dn=dn.next=s,dn}function sn(){if(Tt===null){var s=Ke.alternate;s=s!==null?s.memoizedState:null}else s=Tt.next;var c=dn===null?Ke.memoizedState:dn.next;if(c!==null)dn=c,Tt=s;else{if(s===null)throw Ke.alternate===null?Error(r(467)):Error(r(310));Tt=s,s={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},dn===null?Ke.memoizedState=dn=s:dn=dn.next=s}return dn}function Pm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xd(s){var c=yd;return yd+=1,ac===null&&(ac=[]),s=GA(ac,s,c),c=Ke,(dn===null?c.memoizedState:dn.next)===null&&(c=c.alternate,L.H=c===null||c.memoizedState===null?LT:gb),s}function Mm(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return xd(s);if(s.$$typeof===C)return Kn(s)}throw Error(r(438,String(s)))}function ob(s){var c=null,h=Ke.updateQueue;if(h!==null&&(c=h.memoCache),c==null){var v=Ke.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(c={data:v.data.map(function(S){return S.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),h===null&&(h=Pm(),Ke.updateQueue=h),h.memoCache=c,h=c.data[c.index],h===void 0)for(h=c.data[c.index]=Array(s),v=0;v<s;v++)h[v]=z;return c.index++,h}function Ti(s,c){return typeof c=="function"?c(s):c}function Rm(s){var c=sn();return sb(c,Tt,s)}function sb(s,c,h){var v=s.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=h;var S=s.baseQueue,_=v.pending;if(_!==null){if(S!==null){var M=S.next;S.next=_.next,_.next=M}c.baseQueue=S=_,v.pending=null}if(_=s.baseState,S===null)s.memoizedState=_;else{c=S.next;var q=M=null,X=null,se=c,ge=!1;do{var we=se.lane&-536870913;if(we!==se.lane?(ct&we)===we:(Ai&we)===we){var ce=se.revertLane;if(ce===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),we===Ql&&(ge=!0);else if((Ai&ce)===ce){se=se.next,ce===Ql&&(ge=!0);continue}else we={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(q=X=we,M=_):X=X.next=we,Ke.lanes|=ce,Oo|=ce;we=se.action,Ts&&h(_,we),_=se.hasEagerState?se.eagerState:h(_,we)}else ce={lane:we,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(q=X=ce,M=_):X=X.next=ce,Ke.lanes|=we,Oo|=we;se=se.next}while(se!==null&&se!==c);if(X===null?M=_:X.next=q,!Br(_,s.memoizedState)&&(fn=!0,ge&&(h=Jl,h!==null)))throw h;s.memoizedState=_,s.baseState=M,s.baseQueue=X,v.lastRenderedState=_}return S===null&&(v.lanes=0),[s.memoizedState,v.dispatch]}function lb(s){var c=sn(),h=c.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=s;var v=h.dispatch,S=h.pending,_=c.memoizedState;if(S!==null){h.pending=null;var M=S=S.next;do _=s(_,M.action),M=M.next;while(M!==S);Br(_,c.memoizedState)||(fn=!0),c.memoizedState=_,c.baseQueue===null&&(c.baseState=_),h.lastRenderedState=_}return[_,v]}function aT(s,c,h){var v=Ke,S=sn(),_=ft;if(_){if(h===void 0)throw Error(r(407));h=h()}else h=c();var M=!Br((Tt||S).memoizedState,h);if(M&&(S.memoizedState=h,fn=!0),S=S.queue,db(sT.bind(null,v,S,s),[s]),S.getSnapshot!==c||M||dn!==null&&dn.memoizedState.tag&1){if(v.flags|=2048,ic(9,{destroy:void 0},oT.bind(null,v,S,h,c),null),$t===null)throw Error(r(349));_||(Ai&127)!==0||iT(v,c,h)}return h}function iT(s,c,h){s.flags|=16384,s={getSnapshot:c,value:h},c=Ke.updateQueue,c===null?(c=Pm(),Ke.updateQueue=c,c.stores=[s]):(h=c.stores,h===null?c.stores=[s]:h.push(s))}function oT(s,c,h,v){c.value=h,c.getSnapshot=v,lT(c)&&cT(s)}function sT(s,c,h){return h(function(){lT(c)&&cT(s)})}function lT(s){var c=s.getSnapshot;s=s.value;try{var h=c();return!Br(s,h)}catch{return!0}}function cT(s){var c=ws(s,2);c!==null&&Ar(c,s,2)}function cb(s){var c=yr();if(typeof s=="function"){var h=s;if(s=h(),Ts){Ga(!0);try{h()}finally{Ga(!1)}}}return c.memoizedState=c.baseState=s,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:s},c}function uT(s,c,h,v){return s.baseState=h,sb(s,Tt,typeof v=="function"?v:Ti)}function A7(s,c,h,v,S){if(Im(s))throw Error(r(485));if(s=c.action,s!==null){var _={payload:S,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){_.listeners.push(M)}};L.T!==null?h(!0):_.isTransition=!1,v(_),h=c.pending,h===null?(_.next=c.pending=_,dT(c,_)):(_.next=h.next,c.pending=h.next=_)}}function dT(s,c){var h=c.action,v=c.payload,S=s.state;if(c.isTransition){var _=L.T,M={};L.T=M;try{var q=h(S,v),X=L.S;X!==null&&X(M,q),fT(s,c,q)}catch(se){ub(s,c,se)}finally{_!==null&&M.types!==null&&(_.types=M.types),L.T=_}}else try{_=h(S,v),fT(s,c,_)}catch(se){ub(s,c,se)}}function fT(s,c,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){hT(s,c,v)},function(v){return ub(s,c,v)}):hT(s,c,h)}function hT(s,c,h){c.status="fulfilled",c.value=h,mT(c),s.state=h,c=s.pending,c!==null&&(h=c.next,h===c?s.pending=null:(h=h.next,c.next=h,dT(s,h)))}function ub(s,c,h){var v=s.pending;if(s.pending=null,v!==null){v=v.next;do c.status="rejected",c.reason=h,mT(c),c=c.next;while(c!==v)}s.action=null}function mT(s){s=s.listeners;for(var c=0;c<s.length;c++)(0,s[c])()}function pT(s,c){return c}function vT(s,c){if(ft){var h=$t.formState;if(h!==null){e:{var v=Ke;if(ft){if(Ht){t:{for(var S=Ht,_=fa;S.nodeType!==8;){if(!_){S=null;break t}if(S=ma(S.nextSibling),S===null){S=null;break t}}_=S.data,S=_==="F!"||_==="F"?S:null}if(S){Ht=ma(S.nextSibling),v=S.data==="F!";break e}}go(v)}v=!1}v&&(c=h[0])}}return h=yr(),h.memoizedState=h.baseState=c,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pT,lastRenderedState:c},h.queue=v,h=DT.bind(null,Ke,v),v.dispatch=h,v=cb(!1),_=vb.bind(null,Ke,!1,v.queue),v=yr(),S={state:c,dispatch:null,action:s,pending:null},v.queue=S,h=A7.bind(null,Ke,S,_,h),S.dispatch=h,v.memoizedState=s,[c,h,!1]}function gT(s){var c=sn();return yT(c,Tt,s)}function yT(s,c,h){if(c=sb(s,c,pT)[0],s=Rm(Ti)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var v=xd(c)}catch(M){throw M===ec?_m:M}else v=c;c=sn();var S=c.queue,_=S.dispatch;return h!==c.memoizedState&&(Ke.flags|=2048,ic(9,{destroy:void 0},T7.bind(null,S,h),null)),[v,_,s]}function T7(s,c){s.action=c}function xT(s){var c=sn(),h=Tt;if(h!==null)return yT(c,h,s);sn(),c=c.memoizedState,h=sn();var v=h.queue.dispatch;return h.memoizedState=s,[c,v,!1]}function ic(s,c,h,v){return s={tag:s,create:h,deps:v,inst:c,next:null},c=Ke.updateQueue,c===null&&(c=Pm(),Ke.updateQueue=c),h=c.lastEffect,h===null?c.lastEffect=s.next=s:(v=h.next,h.next=s,s.next=v,c.lastEffect=s),s}function bT(){return sn().memoizedState}function Dm(s,c,h,v){var S=yr();Ke.flags|=s,S.memoizedState=ic(1|c,{destroy:void 0},h,v===void 0?null:v)}function $m(s,c,h,v){var S=sn();v=v===void 0?null:v;var _=S.memoizedState.inst;Tt!==null&&v!==null&&tb(v,Tt.memoizedState.deps)?S.memoizedState=ic(c,_,h,v):(Ke.flags|=s,S.memoizedState=ic(1|c,_,h,v))}function wT(s,c){Dm(8390656,8,s,c)}function db(s,c){$m(2048,8,s,c)}function k7(s){Ke.flags|=4;var c=Ke.updateQueue;if(c===null)c=Pm(),Ke.updateQueue=c,c.events=[s];else{var h=c.events;h===null?c.events=[s]:h.push(s)}}function jT(s){var c=sn().memoizedState;return k7({ref:c,nextImpl:s}),function(){if((yt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}function ST(s,c){return $m(4,2,s,c)}function _T(s,c){return $m(4,4,s,c)}function NT(s,c){if(typeof c=="function"){s=s();var h=c(s);return function(){typeof h=="function"?h():c(null)}}if(c!=null)return s=s(),c.current=s,function(){c.current=null}}function OT(s,c,h){h=h!=null?h.concat([s]):null,$m(4,4,NT.bind(null,c,s),h)}function fb(){}function CT(s,c){var h=sn();c=c===void 0?null:c;var v=h.memoizedState;return c!==null&&tb(c,v[1])?v[0]:(h.memoizedState=[s,c],s)}function ET(s,c){var h=sn();c=c===void 0?null:c;var v=h.memoizedState;if(c!==null&&tb(c,v[1]))return v[0];if(v=s(),Ts){Ga(!0);try{s()}finally{Ga(!1)}}return h.memoizedState=[v,c],v}function hb(s,c,h){return h===void 0||(Ai&1073741824)!==0&&(ct&261930)===0?s.memoizedState=c:(s.memoizedState=h,s=A2(),Ke.lanes|=s,Oo|=s,h)}function AT(s,c,h,v){return Br(h,c)?h:nc.current!==null?(s=hb(s,h,v),Br(s,c)||(fn=!0),s):(Ai&42)===0||(Ai&1073741824)!==0&&(ct&261930)===0?(fn=!0,s.memoizedState=h):(s=A2(),Ke.lanes|=s,Oo|=s,c)}function TT(s,c,h,v,S){var _=R.p;R.p=_!==0&&8>_?_:8;var M=L.T,q={};L.T=q,vb(s,!1,c,h);try{var X=S(),se=L.S;if(se!==null&&se(q,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var ge=O7(X,v);bd(s,c,ge,Wr(s))}else bd(s,c,v,Wr(s))}catch(we){bd(s,c,{then:function(){},status:"rejected",reason:we},Wr())}finally{R.p=_,M!==null&&q.types!==null&&(M.types=q.types),L.T=M}}function P7(){}function mb(s,c,h,v){if(s.tag!==5)throw Error(r(476));var S=kT(s).queue;TT(s,S,c,F,h===null?P7:function(){return PT(s),h(v)})}function kT(s){var c=s.memoizedState;if(c!==null)return c;c={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:F},next:null};var h={};return c.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:h},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function PT(s){var c=kT(s);c.next===null&&(c=s.alternate.memoizedState),bd(s,c.next.queue,{},Wr())}function pb(){return Kn(Id)}function MT(){return sn().memoizedState}function RT(){return sn().memoizedState}function M7(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var h=Wr();s=bo(h);var v=wo(c,s,h);v!==null&&(Ar(v,c,h),pd(v,c,h)),c={cache:Hx()},s.payload=c;return}c=c.return}}function R7(s,c,h){var v=Wr();h={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Im(s)?$T(c,h):(h=Mx(s,c,h,v),h!==null&&(Ar(h,s,v),IT(h,c,v)))}function DT(s,c,h){var v=Wr();bd(s,c,h,v)}function bd(s,c,h,v){var S={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(Im(s))$T(c,S);else{var _=s.alternate;if(s.lanes===0&&(_===null||_.lanes===0)&&(_=c.lastRenderedReducer,_!==null))try{var M=c.lastRenderedState,q=_(M,h);if(S.hasEagerState=!0,S.eagerState=q,Br(q,M))return gm(s,c,S,0),$t===null&&vm(),!1}catch{}finally{}if(h=Mx(s,c,S,v),h!==null)return Ar(h,s,v),IT(h,c,v),!0}return!1}function vb(s,c,h,v){if(v={lane:2,revertLane:Yb(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Im(s)){if(c)throw Error(r(479))}else c=Mx(s,h,v,2),c!==null&&Ar(c,s,2)}function Im(s){var c=s.alternate;return s===Ke||c!==null&&c===Ke}function $T(s,c){rc=Tm=!0;var h=s.pending;h===null?c.next=c:(c.next=h.next,h.next=c),s.pending=c}function IT(s,c,h){if((h&4194048)!==0){var v=c.lanes;v&=s.pendingLanes,h|=v,c.lanes=h,FE(s,h)}}var wd={readContext:Kn,use:Mm,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useLayoutEffect:nn,useInsertionEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useSyncExternalStore:nn,useId:nn,useHostTransitionStatus:nn,useFormState:nn,useActionState:nn,useOptimistic:nn,useMemoCache:nn,useCacheRefresh:nn};wd.useEffectEvent=nn;var LT={readContext:Kn,use:Mm,useCallback:function(s,c){return yr().memoizedState=[s,c===void 0?null:c],s},useContext:Kn,useEffect:wT,useImperativeHandle:function(s,c,h){h=h!=null?h.concat([s]):null,Dm(4194308,4,NT.bind(null,c,s),h)},useLayoutEffect:function(s,c){return Dm(4194308,4,s,c)},useInsertionEffect:function(s,c){Dm(4,2,s,c)},useMemo:function(s,c){var h=yr();c=c===void 0?null:c;var v=s();if(Ts){Ga(!0);try{s()}finally{Ga(!1)}}return h.memoizedState=[v,c],v},useReducer:function(s,c,h){var v=yr();if(h!==void 0){var S=h(c);if(Ts){Ga(!0);try{h(c)}finally{Ga(!1)}}}else S=c;return v.memoizedState=v.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},v.queue=s,s=s.dispatch=R7.bind(null,Ke,s),[v.memoizedState,s]},useRef:function(s){var c=yr();return s={current:s},c.memoizedState=s},useState:function(s){s=cb(s);var c=s.queue,h=DT.bind(null,Ke,c);return c.dispatch=h,[s.memoizedState,h]},useDebugValue:fb,useDeferredValue:function(s,c){var h=yr();return hb(h,s,c)},useTransition:function(){var s=cb(!1);return s=TT.bind(null,Ke,s.queue,!0,!1),yr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,c,h){var v=Ke,S=yr();if(ft){if(h===void 0)throw Error(r(407));h=h()}else{if(h=c(),$t===null)throw Error(r(349));(ct&127)!==0||iT(v,c,h)}S.memoizedState=h;var _={value:h,getSnapshot:c};return S.queue=_,wT(sT.bind(null,v,_,s),[s]),v.flags|=2048,ic(9,{destroy:void 0},oT.bind(null,v,_,h,c),null),h},useId:function(){var s=yr(),c=$t.identifierPrefix;if(ft){var h=Ka,v=Ya;h=(v&~(1<<32-rr(v)-1)).toString(32)+h,c="_"+c+"R_"+h,h=km++,0<h&&(c+="H"+h.toString(32)),c+="_"}else h=C7++,c="_"+c+"r_"+h.toString(32)+"_";return s.memoizedState=c},useHostTransitionStatus:pb,useFormState:vT,useActionState:vT,useOptimistic:function(s){var c=yr();c.memoizedState=c.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=h,c=vb.bind(null,Ke,!0,h),h.dispatch=c,[s,c]},useMemoCache:ob,useCacheRefresh:function(){return yr().memoizedState=M7.bind(null,Ke)},useEffectEvent:function(s){var c=yr(),h={impl:s};return c.memoizedState=h,function(){if((yt&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},gb={readContext:Kn,use:Mm,useCallback:CT,useContext:Kn,useEffect:db,useImperativeHandle:OT,useInsertionEffect:ST,useLayoutEffect:_T,useMemo:ET,useReducer:Rm,useRef:bT,useState:function(){return Rm(Ti)},useDebugValue:fb,useDeferredValue:function(s,c){var h=sn();return AT(h,Tt.memoizedState,s,c)},useTransition:function(){var s=Rm(Ti)[0],c=sn().memoizedState;return[typeof s=="boolean"?s:xd(s),c]},useSyncExternalStore:aT,useId:MT,useHostTransitionStatus:pb,useFormState:gT,useActionState:gT,useOptimistic:function(s,c){var h=sn();return uT(h,Tt,s,c)},useMemoCache:ob,useCacheRefresh:RT};gb.useEffectEvent=jT;var BT={readContext:Kn,use:Mm,useCallback:CT,useContext:Kn,useEffect:db,useImperativeHandle:OT,useInsertionEffect:ST,useLayoutEffect:_T,useMemo:ET,useReducer:lb,useRef:bT,useState:function(){return lb(Ti)},useDebugValue:fb,useDeferredValue:function(s,c){var h=sn();return Tt===null?hb(h,s,c):AT(h,Tt.memoizedState,s,c)},useTransition:function(){var s=lb(Ti)[0],c=sn().memoizedState;return[typeof s=="boolean"?s:xd(s),c]},useSyncExternalStore:aT,useId:MT,useHostTransitionStatus:pb,useFormState:xT,useActionState:xT,useOptimistic:function(s,c){var h=sn();return Tt!==null?uT(h,Tt,s,c):(h.baseState=s,[s,h.queue.dispatch])},useMemoCache:ob,useCacheRefresh:RT};BT.useEffectEvent=jT;function yb(s,c,h,v){c=s.memoizedState,h=h(v,c),h=h==null?c:p({},c,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}var xb={enqueueSetState:function(s,c,h){s=s._reactInternals;var v=Wr(),S=bo(v);S.payload=c,h!=null&&(S.callback=h),c=wo(s,S,v),c!==null&&(Ar(c,s,v),pd(c,s,v))},enqueueReplaceState:function(s,c,h){s=s._reactInternals;var v=Wr(),S=bo(v);S.tag=1,S.payload=c,h!=null&&(S.callback=h),c=wo(s,S,v),c!==null&&(Ar(c,s,v),pd(c,s,v))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var h=Wr(),v=bo(h);v.tag=2,c!=null&&(v.callback=c),c=wo(s,v,h),c!==null&&(Ar(c,s,h),pd(c,s,h))}};function zT(s,c,h,v,S,_,M){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,_,M):c.prototype&&c.prototype.isPureReactComponent?!sd(h,v)||!sd(S,_):!0}function qT(s,c,h,v){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(h,v),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(h,v),c.state!==s&&xb.enqueueReplaceState(c,c.state,null)}function ks(s,c){var h=c;if("ref"in c){h={};for(var v in c)v!=="ref"&&(h[v]=c[v])}if(s=s.defaultProps){h===c&&(h=p({},h));for(var S in s)h[S]===void 0&&(h[S]=s[S])}return h}function FT(s){pm(s)}function UT(s){console.error(s)}function HT(s){pm(s)}function Lm(s,c){try{var h=s.onUncaughtError;h(c.value,{componentStack:c.stack})}catch(v){setTimeout(function(){throw v})}}function WT(s,c,h){try{var v=s.onCaughtError;v(h.value,{componentStack:h.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function bb(s,c,h){return h=bo(h),h.tag=3,h.payload={element:null},h.callback=function(){Lm(s,c)},h}function VT(s){return s=bo(s),s.tag=3,s}function GT(s,c,h,v){var S=h.type.getDerivedStateFromError;if(typeof S=="function"){var _=v.value;s.payload=function(){return S(_)},s.callback=function(){WT(c,h,v)}}var M=h.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(s.callback=function(){WT(c,h,v),typeof S!="function"&&(Co===null?Co=new Set([this]):Co.add(this));var q=v.stack;this.componentDidCatch(v.value,{componentStack:q!==null?q:""})})}function D7(s,c,h,v,S){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(c=h.alternate,c!==null&&Zl(c,h,S,!0),h=qr.current,h!==null){switch(h.tag){case 31:case 13:return ha===null?Xm():h.alternate===null&&rn===0&&(rn=3),h.flags&=-257,h.flags|=65536,h.lanes=S,v===Nm?h.flags|=16384:(c=h.updateQueue,c===null?h.updateQueue=new Set([v]):c.add(v),Wb(s,v,S)),!1;case 22:return h.flags|=65536,v===Nm?h.flags|=16384:(c=h.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([v])},h.updateQueue=c):(h=c.retryQueue,h===null?c.retryQueue=new Set([v]):h.add(v)),Wb(s,v,S)),!1}throw Error(r(435,h.tag))}return Wb(s,v,S),Xm(),!1}if(ft)return c=qr.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=S,v!==Bx&&(s=Error(r(422),{cause:v}),ud(ca(s,h)))):(v!==Bx&&(c=Error(r(423),{cause:v}),ud(ca(c,h))),s=s.current.alternate,s.flags|=65536,S&=-S,s.lanes|=S,v=ca(v,h),S=bb(s.stateNode,v,S),Xx(s,S),rn!==4&&(rn=2)),!1;var _=Error(r(520),{cause:v});if(_=ca(_,h),Ad===null?Ad=[_]:Ad.push(_),rn!==4&&(rn=2),c===null)return!0;v=ca(v,h),h=c;do{switch(h.tag){case 3:return h.flags|=65536,s=S&-S,h.lanes|=s,s=bb(h.stateNode,v,s),Xx(h,s),!1;case 1:if(c=h.type,_=h.stateNode,(h.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Co===null||!Co.has(_))))return h.flags|=65536,S&=-S,h.lanes|=S,S=VT(S),GT(S,s,h,v),Xx(h,S),!1}h=h.return}while(h!==null);return!1}var wb=Error(r(461)),fn=!1;function Xn(s,c,h,v){c.child=s===null?ZA(c,null,h,v):As(c,s.child,h,v)}function YT(s,c,h,v,S){h=h.render;var _=c.ref;if("ref"in v){var M={};for(var q in v)q!=="ref"&&(M[q]=v[q])}else M=v;return Ns(c),v=nb(s,c,h,M,_,S),q=rb(),s!==null&&!fn?(ab(s,c,S),ki(s,c,S)):(ft&&q&&Ix(c),c.flags|=1,Xn(s,c,v,S),c.child)}function KT(s,c,h,v,S){if(s===null){var _=h.type;return typeof _=="function"&&!Rx(_)&&_.defaultProps===void 0&&h.compare===null?(c.tag=15,c.type=_,XT(s,c,_,v,S)):(s=xm(h.type,null,v,c,c.mode,S),s.ref=c.ref,s.return=c,c.child=s)}if(_=s.child,!Ab(s,S)){var M=_.memoizedProps;if(h=h.compare,h=h!==null?h:sd,h(M,v)&&s.ref===c.ref)return ki(s,c,S)}return c.flags|=1,s=Ni(_,v),s.ref=c.ref,s.return=c,c.child=s}function XT(s,c,h,v,S){if(s!==null){var _=s.memoizedProps;if(sd(_,v)&&s.ref===c.ref)if(fn=!1,c.pendingProps=v=_,Ab(s,S))(s.flags&131072)!==0&&(fn=!0);else return c.lanes=s.lanes,ki(s,c,S)}return jb(s,c,h,v,S)}function ZT(s,c,h,v){var S=v.children,_=s!==null?s.memoizedState:null;if(s===null&&c.stateNode===null&&(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((c.flags&128)!==0){if(_=_!==null?_.baseLanes|h:h,s!==null){for(v=c.child=s.child,S=0;v!==null;)S=S|v.lanes|v.childLanes,v=v.sibling;v=S&~_}else v=0,c.child=null;return QT(s,c,_,h,v)}if((h&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},s!==null&&Sm(c,_!==null?_.cachePool:null),_!==null?eT(c,_):Qx(),tT(c);else return v=c.lanes=536870912,QT(s,c,_!==null?_.baseLanes|h:h,h,v)}else _!==null?(Sm(c,_.cachePool),eT(c,_),So(),c.memoizedState=null):(s!==null&&Sm(c,null),Qx(),So());return Xn(s,c,S,h),c.child}function jd(s,c){return s!==null&&s.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function QT(s,c,h,v,S){var _=Vx();return _=_===null?null:{parent:un._currentValue,pool:_},c.memoizedState={baseLanes:h,cachePool:_},s!==null&&Sm(c,null),Qx(),tT(c),s!==null&&Zl(s,c,v,!0),c.childLanes=S,null}function Bm(s,c){return c=qm({mode:c.mode,children:c.children},s.mode),c.ref=s.ref,s.child=c,c.return=s,c}function JT(s,c,h){return As(c,s.child,null,h),s=Bm(c,c.pendingProps),s.flags|=2,Fr(c),c.memoizedState=null,s}function $7(s,c,h){var v=c.pendingProps,S=(c.flags&128)!==0;if(c.flags&=-129,s===null){if(ft){if(v.mode==="hidden")return s=Bm(c,v),c.lanes=536870912,jd(null,s);if(eb(c),(s=Ht)?(s=dk(s,fa),s=s!==null&&s.data==="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:po!==null?{id:Ya,overflow:Ka}:null,retryLane:536870912,hydrationErrors:null},h=$A(s),h.return=c,c.child=h,Yn=c,Ht=null)):s=null,s===null)throw go(c);return c.lanes=536870912,null}return Bm(c,v)}var _=s.memoizedState;if(_!==null){var M=_.dehydrated;if(eb(c),S)if(c.flags&256)c.flags&=-257,c=JT(s,c,h);else if(c.memoizedState!==null)c.child=s.child,c.flags|=128,c=null;else throw Error(r(558));else if(fn||Zl(s,c,h,!1),S=(h&s.childLanes)!==0,fn||S){if(v=$t,v!==null&&(M=UE(v,h),M!==0&&M!==_.retryLane))throw _.retryLane=M,ws(s,M),Ar(v,s,M),wb;Xm(),c=JT(s,c,h)}else s=_.treeContext,Ht=ma(M.nextSibling),Yn=c,ft=!0,vo=null,fa=!1,s!==null&&BA(c,s),c=Bm(c,v),c.flags|=4096;return c}return s=Ni(s.child,{mode:v.mode,children:v.children}),s.ref=c.ref,c.child=s,s.return=c,s}function zm(s,c){var h=c.ref;if(h===null)s!==null&&s.ref!==null&&(c.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(s===null||s.ref!==h)&&(c.flags|=4194816)}}function jb(s,c,h,v,S){return Ns(c),h=nb(s,c,h,v,void 0,S),v=rb(),s!==null&&!fn?(ab(s,c,S),ki(s,c,S)):(ft&&v&&Ix(c),c.flags|=1,Xn(s,c,h,S),c.child)}function e2(s,c,h,v,S,_){return Ns(c),c.updateQueue=null,h=rT(c,v,h,S),nT(s),v=rb(),s!==null&&!fn?(ab(s,c,_),ki(s,c,_)):(ft&&v&&Ix(c),c.flags|=1,Xn(s,c,h,_),c.child)}function t2(s,c,h,v,S){if(Ns(c),c.stateNode===null){var _=Gl,M=h.contextType;typeof M=="object"&&M!==null&&(_=Kn(M)),_=new h(v,_),c.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=xb,c.stateNode=_,_._reactInternals=c,_=c.stateNode,_.props=v,_.state=c.memoizedState,_.refs={},Yx(c),M=h.contextType,_.context=typeof M=="object"&&M!==null?Kn(M):Gl,_.state=c.memoizedState,M=h.getDerivedStateFromProps,typeof M=="function"&&(yb(c,h,M,v),_.state=c.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(M=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),M!==_.state&&xb.enqueueReplaceState(_,_.state,null),gd(c,v,_,S),vd(),_.state=c.memoizedState),typeof _.componentDidMount=="function"&&(c.flags|=4194308),v=!0}else if(s===null){_=c.stateNode;var q=c.memoizedProps,X=ks(h,q);_.props=X;var se=_.context,ge=h.contextType;M=Gl,typeof ge=="object"&&ge!==null&&(M=Kn(ge));var we=h.getDerivedStateFromProps;ge=typeof we=="function"||typeof _.getSnapshotBeforeUpdate=="function",q=c.pendingProps!==q,ge||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(q||se!==M)&&qT(c,_,v,M),xo=!1;var ce=c.memoizedState;_.state=ce,gd(c,v,_,S),vd(),se=c.memoizedState,q||ce!==se||xo?(typeof we=="function"&&(yb(c,h,we,v),se=c.memoizedState),(X=xo||zT(c,h,X,v,ce,se,M))?(ge||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(c.flags|=4194308)):(typeof _.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=v,c.memoizedState=se),_.props=v,_.state=se,_.context=M,v=X):(typeof _.componentDidMount=="function"&&(c.flags|=4194308),v=!1)}else{_=c.stateNode,Kx(s,c),M=c.memoizedProps,ge=ks(h,M),_.props=ge,we=c.pendingProps,ce=_.context,se=h.contextType,X=Gl,typeof se=="object"&&se!==null&&(X=Kn(se)),q=h.getDerivedStateFromProps,(se=typeof q=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==we||ce!==X)&&qT(c,_,v,X),xo=!1,ce=c.memoizedState,_.state=ce,gd(c,v,_,S),vd();var he=c.memoizedState;M!==we||ce!==he||xo||s!==null&&s.dependencies!==null&&wm(s.dependencies)?(typeof q=="function"&&(yb(c,h,q,v),he=c.memoizedState),(ge=xo||zT(c,h,ge,v,ce,he,X)||s!==null&&s.dependencies!==null&&wm(s.dependencies))?(se||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(v,he,X),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(v,he,X)),typeof _.componentDidUpdate=="function"&&(c.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),c.memoizedProps=v,c.memoizedState=he),_.props=v,_.state=he,_.context=X,v=ge):(typeof _.componentDidUpdate!="function"||M===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),v=!1)}return _=v,zm(s,c),v=(c.flags&128)!==0,_||v?(_=c.stateNode,h=v&&typeof h.getDerivedStateFromError!="function"?null:_.render(),c.flags|=1,s!==null&&v?(c.child=As(c,s.child,null,S),c.child=As(c,null,h,S)):Xn(s,c,h,S),c.memoizedState=_.state,s=c.child):s=ki(s,c,S),s}function n2(s,c,h,v){return Ss(),c.flags|=256,Xn(s,c,h,v),c.child}var Sb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _b(s){return{baseLanes:s,cachePool:WA()}}function Nb(s,c,h){return s=s!==null?s.childLanes&~h:0,c&&(s|=Hr),s}function r2(s,c,h){var v=c.pendingProps,S=!1,_=(c.flags&128)!==0,M;if((M=_)||(M=s!==null&&s.memoizedState===null?!1:(on.current&2)!==0),M&&(S=!0,c.flags&=-129),M=(c.flags&32)!==0,c.flags&=-33,s===null){if(ft){if(S?jo(c):So(),(s=Ht)?(s=dk(s,fa),s=s!==null&&s.data!=="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:po!==null?{id:Ya,overflow:Ka}:null,retryLane:536870912,hydrationErrors:null},h=$A(s),h.return=c,c.child=h,Yn=c,Ht=null)):s=null,s===null)throw go(c);return s0(s)?c.lanes=32:c.lanes=536870912,null}var q=v.children;return v=v.fallback,S?(So(),S=c.mode,q=qm({mode:"hidden",children:q},S),v=js(v,S,h,null),q.return=c,v.return=c,q.sibling=v,c.child=q,v=c.child,v.memoizedState=_b(h),v.childLanes=Nb(s,M,h),c.memoizedState=Sb,jd(null,v)):(jo(c),Ob(c,q))}var X=s.memoizedState;if(X!==null&&(q=X.dehydrated,q!==null)){if(_)c.flags&256?(jo(c),c.flags&=-257,c=Cb(s,c,h)):c.memoizedState!==null?(So(),c.child=s.child,c.flags|=128,c=null):(So(),q=v.fallback,S=c.mode,v=qm({mode:"visible",children:v.children},S),q=js(q,S,h,null),q.flags|=2,v.return=c,q.return=c,v.sibling=q,c.child=v,As(c,s.child,null,h),v=c.child,v.memoizedState=_b(h),v.childLanes=Nb(s,M,h),c.memoizedState=Sb,c=jd(null,v));else if(jo(c),s0(q)){if(M=q.nextSibling&&q.nextSibling.dataset,M)var se=M.dgst;M=se,v=Error(r(419)),v.stack="",v.digest=M,ud({value:v,source:null,stack:null}),c=Cb(s,c,h)}else if(fn||Zl(s,c,h,!1),M=(h&s.childLanes)!==0,fn||M){if(M=$t,M!==null&&(v=UE(M,h),v!==0&&v!==X.retryLane))throw X.retryLane=v,ws(s,v),Ar(M,s,v),wb;o0(q)||Xm(),c=Cb(s,c,h)}else o0(q)?(c.flags|=192,c.child=s.child,c=null):(s=X.treeContext,Ht=ma(q.nextSibling),Yn=c,ft=!0,vo=null,fa=!1,s!==null&&BA(c,s),c=Ob(c,v.children),c.flags|=4096);return c}return S?(So(),q=v.fallback,S=c.mode,X=s.child,se=X.sibling,v=Ni(X,{mode:"hidden",children:v.children}),v.subtreeFlags=X.subtreeFlags&65011712,se!==null?q=Ni(se,q):(q=js(q,S,h,null),q.flags|=2),q.return=c,v.return=c,v.sibling=q,c.child=v,jd(null,v),v=c.child,q=s.child.memoizedState,q===null?q=_b(h):(S=q.cachePool,S!==null?(X=un._currentValue,S=S.parent!==X?{parent:X,pool:X}:S):S=WA(),q={baseLanes:q.baseLanes|h,cachePool:S}),v.memoizedState=q,v.childLanes=Nb(s,M,h),c.memoizedState=Sb,jd(s.child,v)):(jo(c),h=s.child,s=h.sibling,h=Ni(h,{mode:"visible",children:v.children}),h.return=c,h.sibling=null,s!==null&&(M=c.deletions,M===null?(c.deletions=[s],c.flags|=16):M.push(s)),c.child=h,c.memoizedState=null,h)}function Ob(s,c){return c=qm({mode:"visible",children:c},s.mode),c.return=s,s.child=c}function qm(s,c){return s=zr(22,s,null,c),s.lanes=0,s}function Cb(s,c,h){return As(c,s.child,null,h),s=Ob(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function a2(s,c,h){s.lanes|=c;var v=s.alternate;v!==null&&(v.lanes|=c),Fx(s.return,c,h)}function Eb(s,c,h,v,S,_){var M=s.memoizedState;M===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:S,treeForkCount:_}:(M.isBackwards=c,M.rendering=null,M.renderingStartTime=0,M.last=v,M.tail=h,M.tailMode=S,M.treeForkCount=_)}function i2(s,c,h){var v=c.pendingProps,S=v.revealOrder,_=v.tail;v=v.children;var M=on.current,q=(M&2)!==0;if(q?(M=M&1|2,c.flags|=128):M&=1,Y(on,M),Xn(s,c,v,h),v=ft?cd:0,!q&&s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&a2(s,h,c);else if(s.tag===19)a2(s,h,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break e;for(;s.sibling===null;){if(s.return===null||s.return===c)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(S){case"forwards":for(h=c.child,S=null;h!==null;)s=h.alternate,s!==null&&Am(s)===null&&(S=h),h=h.sibling;h=S,h===null?(S=c.child,c.child=null):(S=h.sibling,h.sibling=null),Eb(c,!1,S,h,_,v);break;case"backwards":case"unstable_legacy-backwards":for(h=null,S=c.child,c.child=null;S!==null;){if(s=S.alternate,s!==null&&Am(s)===null){c.child=S;break}s=S.sibling,S.sibling=h,h=S,S=s}Eb(c,!0,h,null,_,v);break;case"together":Eb(c,!1,null,null,void 0,v);break;default:c.memoizedState=null}return c.child}function ki(s,c,h){if(s!==null&&(c.dependencies=s.dependencies),Oo|=c.lanes,(h&c.childLanes)===0)if(s!==null){if(Zl(s,c,h,!1),(h&c.childLanes)===0)return null}else return null;if(s!==null&&c.child!==s.child)throw Error(r(153));if(c.child!==null){for(s=c.child,h=Ni(s,s.pendingProps),c.child=h,h.return=c;s.sibling!==null;)s=s.sibling,h=h.sibling=Ni(s,s.pendingProps),h.return=c;h.sibling=null}return c.child}function Ab(s,c){return(s.lanes&c)!==0?!0:(s=s.dependencies,!!(s!==null&&wm(s)))}function I7(s,c,h){switch(c.tag){case 3:ae(c,c.stateNode.containerInfo),yo(c,un,s.memoizedState.cache),Ss();break;case 27:case 5:pe(c);break;case 4:ae(c,c.stateNode.containerInfo);break;case 10:yo(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,eb(c),null;break;case 13:var v=c.memoizedState;if(v!==null)return v.dehydrated!==null?(jo(c),c.flags|=128,null):(h&c.child.childLanes)!==0?r2(s,c,h):(jo(c),s=ki(s,c,h),s!==null?s.sibling:null);jo(c);break;case 19:var S=(s.flags&128)!==0;if(v=(h&c.childLanes)!==0,v||(Zl(s,c,h,!1),v=(h&c.childLanes)!==0),S){if(v)return i2(s,c,h);c.flags|=128}if(S=c.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),Y(on,on.current),v)break;return null;case 22:return c.lanes=0,ZT(s,c,h,c.pendingProps);case 24:yo(c,un,s.memoizedState.cache)}return ki(s,c,h)}function o2(s,c,h){if(s!==null)if(s.memoizedProps!==c.pendingProps)fn=!0;else{if(!Ab(s,h)&&(c.flags&128)===0)return fn=!1,I7(s,c,h);fn=(s.flags&131072)!==0}else fn=!1,ft&&(c.flags&1048576)!==0&&LA(c,cd,c.index);switch(c.lanes=0,c.tag){case 16:e:{var v=c.pendingProps;if(s=Cs(c.elementType),c.type=s,typeof s=="function")Rx(s)?(v=ks(s,v),c.tag=1,c=t2(null,c,s,v,h)):(c.tag=0,c=jb(null,c,s,v,h));else{if(s!=null){var S=s.$$typeof;if(S===A){c.tag=11,c=YT(null,c,s,v,h);break e}else if(S===T){c.tag=14,c=KT(null,c,s,v,h);break e}}throw c=H(s)||s,Error(r(306,c,""))}}return c;case 0:return jb(s,c,c.type,c.pendingProps,h);case 1:return v=c.type,S=ks(v,c.pendingProps),t2(s,c,v,S,h);case 3:e:{if(ae(c,c.stateNode.containerInfo),s===null)throw Error(r(387));v=c.pendingProps;var _=c.memoizedState;S=_.element,Kx(s,c),gd(c,v,null,h);var M=c.memoizedState;if(v=M.cache,yo(c,un,v),v!==_.cache&&Ux(c,[un],h,!0),vd(),v=M.element,_.isDehydrated)if(_={element:v,isDehydrated:!1,cache:M.cache},c.updateQueue.baseState=_,c.memoizedState=_,c.flags&256){c=n2(s,c,v,h);break e}else if(v!==S){S=ca(Error(r(424)),c),ud(S),c=n2(s,c,v,h);break e}else{switch(s=c.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Ht=ma(s.firstChild),Yn=c,ft=!0,vo=null,fa=!0,h=ZA(c,null,v,h),c.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(Ss(),v===S){c=ki(s,c,h);break e}Xn(s,c,v,h)}c=c.child}return c;case 26:return zm(s,c),s===null?(h=gk(c.type,null,c.pendingProps,null))?c.memoizedState=h:ft||(h=c.type,s=c.pendingProps,v=rp(xe.current).createElement(h),v[Gn]=c,v[Sr]=s,Zn(v,h,s),In(v),c.stateNode=v):c.memoizedState=gk(c.type,s.memoizedProps,c.pendingProps,s.memoizedState),null;case 27:return pe(c),s===null&&ft&&(v=c.stateNode=mk(c.type,c.pendingProps,xe.current),Yn=c,fa=!0,S=Ht,ko(c.type)?(l0=S,Ht=ma(v.firstChild)):Ht=S),Xn(s,c,c.pendingProps.children,h),zm(s,c),s===null&&(c.flags|=4194304),c.child;case 5:return s===null&&ft&&((S=v=Ht)&&(v=hV(v,c.type,c.pendingProps,fa),v!==null?(c.stateNode=v,Yn=c,Ht=ma(v.firstChild),fa=!1,S=!0):S=!1),S||go(c)),pe(c),S=c.type,_=c.pendingProps,M=s!==null?s.memoizedProps:null,v=_.children,r0(S,_)?v=null:M!==null&&r0(S,M)&&(c.flags|=32),c.memoizedState!==null&&(S=nb(s,c,E7,null,null,h),Id._currentValue=S),zm(s,c),Xn(s,c,v,h),c.child;case 6:return s===null&&ft&&((s=h=Ht)&&(h=mV(h,c.pendingProps,fa),h!==null?(c.stateNode=h,Yn=c,Ht=null,s=!0):s=!1),s||go(c)),null;case 13:return r2(s,c,h);case 4:return ae(c,c.stateNode.containerInfo),v=c.pendingProps,s===null?c.child=As(c,null,v,h):Xn(s,c,v,h),c.child;case 11:return YT(s,c,c.type,c.pendingProps,h);case 7:return Xn(s,c,c.pendingProps,h),c.child;case 8:return Xn(s,c,c.pendingProps.children,h),c.child;case 12:return Xn(s,c,c.pendingProps.children,h),c.child;case 10:return v=c.pendingProps,yo(c,c.type,v.value),Xn(s,c,v.children,h),c.child;case 9:return S=c.type._context,v=c.pendingProps.children,Ns(c),S=Kn(S),v=v(S),c.flags|=1,Xn(s,c,v,h),c.child;case 14:return KT(s,c,c.type,c.pendingProps,h);case 15:return XT(s,c,c.type,c.pendingProps,h);case 19:return i2(s,c,h);case 31:return $7(s,c,h);case 22:return ZT(s,c,h,c.pendingProps);case 24:return Ns(c),v=Kn(un),s===null?(S=Vx(),S===null&&(S=$t,_=Hx(),S.pooledCache=_,_.refCount++,_!==null&&(S.pooledCacheLanes|=h),S=_),c.memoizedState={parent:v,cache:S},Yx(c),yo(c,un,S)):((s.lanes&h)!==0&&(Kx(s,c),gd(c,null,null,h),vd()),S=s.memoizedState,_=c.memoizedState,S.parent!==v?(S={parent:v,cache:v},c.memoizedState=S,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=S),yo(c,un,v)):(v=_.cache,yo(c,un,v),v!==S.cache&&Ux(c,[un],h,!0))),Xn(s,c,c.pendingProps.children,h),c.child;case 29:throw c.pendingProps}throw Error(r(156,c.tag))}function Pi(s){s.flags|=4}function Tb(s,c,h,v,S){if((c=(s.mode&32)!==0)&&(c=!1),c){if(s.flags|=16777216,(S&335544128)===S)if(s.stateNode.complete)s.flags|=8192;else if(M2())s.flags|=8192;else throw Es=Nm,Gx}else s.flags&=-16777217}function s2(s,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!jk(c))if(M2())s.flags|=8192;else throw Es=Nm,Gx}function Fm(s,c){c!==null&&(s.flags|=4),s.flags&16384&&(c=s.tag!==22?Ml():536870912,s.lanes|=c,cc|=c)}function Sd(s,c){if(!ft)switch(s.tailMode){case"hidden":c=s.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:v.sibling=null}}function Wt(s){var c=s.alternate!==null&&s.alternate.child===s.child,h=0,v=0;if(c)for(var S=s.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags&65011712,v|=S.flags&65011712,S.return=s,S=S.sibling;else for(S=s.child;S!==null;)h|=S.lanes|S.childLanes,v|=S.subtreeFlags,v|=S.flags,S.return=s,S=S.sibling;return s.subtreeFlags|=v,s.childLanes=h,c}function L7(s,c,h){var v=c.pendingProps;switch(Lx(c),c.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(c),null;case 1:return Wt(c),null;case 3:return h=c.stateNode,v=null,s!==null&&(v=s.memoizedState.cache),c.memoizedState.cache!==v&&(c.flags|=2048),Ei(un),Z(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(Xl(c)?Pi(c):s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,zx())),Wt(c),null;case 26:var S=c.type,_=c.memoizedState;return s===null?(Pi(c),_!==null?(Wt(c),s2(c,_)):(Wt(c),Tb(c,S,null,v,h))):_?_!==s.memoizedState?(Pi(c),Wt(c),s2(c,_)):(Wt(c),c.flags&=-16777217):(s=s.memoizedProps,s!==v&&Pi(c),Wt(c),Tb(c,S,s,v,h)),null;case 27:if(je(c),h=xe.current,S=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Pi(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return Wt(c),null}s=ne.current,Xl(c)?zA(c):(s=mk(S,v,h),c.stateNode=s,Pi(c))}return Wt(c),null;case 5:if(je(c),S=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Pi(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return Wt(c),null}if(_=ne.current,Xl(c))zA(c);else{var M=rp(xe.current);switch(_){case 1:_=M.createElementNS("http://www.w3.org/2000/svg",S);break;case 2:_=M.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;default:switch(S){case"svg":_=M.createElementNS("http://www.w3.org/2000/svg",S);break;case"math":_=M.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;case"script":_=M.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof v.is=="string"?M.createElement("select",{is:v.is}):M.createElement("select"),v.multiple?_.multiple=!0:v.size&&(_.size=v.size);break;default:_=typeof v.is=="string"?M.createElement(S,{is:v.is}):M.createElement(S)}}_[Gn]=c,_[Sr]=v;e:for(M=c.child;M!==null;){if(M.tag===5||M.tag===6)_.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===c)break e;for(;M.sibling===null;){if(M.return===null||M.return===c)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}c.stateNode=_;e:switch(Zn(_,S,v),S){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Pi(c)}}return Wt(c),Tb(c,c.type,s===null?null:s.memoizedProps,c.pendingProps,h),null;case 6:if(s&&c.stateNode!=null)s.memoizedProps!==v&&Pi(c);else{if(typeof v!="string"&&c.stateNode===null)throw Error(r(166));if(s=xe.current,Xl(c)){if(s=c.stateNode,h=c.memoizedProps,v=null,S=Yn,S!==null)switch(S.tag){case 27:case 5:v=S.memoizedProps}s[Gn]=c,s=!!(s.nodeValue===h||v!==null&&v.suppressHydrationWarning===!0||rk(s.nodeValue,h)),s||go(c,!0)}else s=rp(s).createTextNode(v),s[Gn]=c,c.stateNode=s}return Wt(c),null;case 31:if(h=c.memoizedState,s===null||s.memoizedState!==null){if(v=Xl(c),h!==null){if(s===null){if(!v)throw Error(r(318));if(s=c.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Gn]=c}else Ss(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Wt(c),s=!1}else h=zx(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=h),s=!0;if(!s)return c.flags&256?(Fr(c),c):(Fr(c),null);if((c.flags&128)!==0)throw Error(r(558))}return Wt(c),null;case 13:if(v=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=Xl(c),v!==null&&v.dehydrated!==null){if(s===null){if(!S)throw Error(r(318));if(S=c.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[Gn]=c}else Ss(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Wt(c),S=!1}else S=zx(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=S),S=!0;if(!S)return c.flags&256?(Fr(c),c):(Fr(c),null)}return Fr(c),(c.flags&128)!==0?(c.lanes=h,c):(h=v!==null,s=s!==null&&s.memoizedState!==null,h&&(v=c.child,S=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(S=v.alternate.memoizedState.cachePool.pool),_=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(_=v.memoizedState.cachePool.pool),_!==S&&(v.flags|=2048)),h!==s&&h&&(c.child.flags|=8192),Fm(c,c.updateQueue),Wt(c),null);case 4:return Z(),s===null&&Qb(c.stateNode.containerInfo),Wt(c),null;case 10:return Ei(c.type),Wt(c),null;case 19:if(B(on),v=c.memoizedState,v===null)return Wt(c),null;if(S=(c.flags&128)!==0,_=v.rendering,_===null)if(S)Sd(v,!1);else{if(rn!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(_=Am(s),_!==null){for(c.flags|=128,Sd(v,!1),s=_.updateQueue,c.updateQueue=s,Fm(c,s),c.subtreeFlags=0,s=h,h=c.child;h!==null;)DA(h,s),h=h.sibling;return Y(on,on.current&1|2),ft&&Oi(c,v.treeForkCount),c.child}s=s.sibling}v.tail!==null&&rt()>Gm&&(c.flags|=128,S=!0,Sd(v,!1),c.lanes=4194304)}else{if(!S)if(s=Am(_),s!==null){if(c.flags|=128,S=!0,s=s.updateQueue,c.updateQueue=s,Fm(c,s),Sd(v,!0),v.tail===null&&v.tailMode==="hidden"&&!_.alternate&&!ft)return Wt(c),null}else 2*rt()-v.renderingStartTime>Gm&&h!==536870912&&(c.flags|=128,S=!0,Sd(v,!1),c.lanes=4194304);v.isBackwards?(_.sibling=c.child,c.child=_):(s=v.last,s!==null?s.sibling=_:c.child=_,v.last=_)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=rt(),s.sibling=null,h=on.current,Y(on,S?h&1|2:h&1),ft&&Oi(c,v.treeForkCount),s):(Wt(c),null);case 22:case 23:return Fr(c),Jx(),v=c.memoizedState!==null,s!==null?s.memoizedState!==null!==v&&(c.flags|=8192):v&&(c.flags|=8192),v?(h&536870912)!==0&&(c.flags&128)===0&&(Wt(c),c.subtreeFlags&6&&(c.flags|=8192)):Wt(c),h=c.updateQueue,h!==null&&Fm(c,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==h&&(c.flags|=2048),s!==null&&B(Os),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),c.memoizedState.cache!==h&&(c.flags|=2048),Ei(un),Wt(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function B7(s,c){switch(Lx(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Ei(un),Z(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 26:case 27:case 5:return je(c),null;case 31:if(c.memoizedState!==null){if(Fr(c),c.alternate===null)throw Error(r(340));Ss()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if(Fr(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));Ss()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return B(on),null;case 4:return Z(),null;case 10:return Ei(c.type),null;case 22:case 23:return Fr(c),Jx(),s!==null&&B(Os),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return Ei(un),null;case 25:return null;default:return null}}function l2(s,c){switch(Lx(c),c.tag){case 3:Ei(un),Z();break;case 26:case 27:case 5:je(c);break;case 4:Z();break;case 31:c.memoizedState!==null&&Fr(c);break;case 13:Fr(c);break;case 19:B(on);break;case 10:Ei(c.type);break;case 22:case 23:Fr(c),Jx(),s!==null&&B(Os);break;case 24:Ei(un)}}function _d(s,c){try{var h=c.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var S=v.next;h=S;do{if((h.tag&s)===s){v=void 0;var _=h.create,M=h.inst;v=_(),M.destroy=v}h=h.next}while(h!==S)}}catch(q){Nt(c,c.return,q)}}function _o(s,c,h){try{var v=c.updateQueue,S=v!==null?v.lastEffect:null;if(S!==null){var _=S.next;v=_;do{if((v.tag&s)===s){var M=v.inst,q=M.destroy;if(q!==void 0){M.destroy=void 0,S=c;var X=h,se=q;try{se()}catch(ge){Nt(S,X,ge)}}}v=v.next}while(v!==_)}}catch(ge){Nt(c,c.return,ge)}}function c2(s){var c=s.updateQueue;if(c!==null){var h=s.stateNode;try{JA(c,h)}catch(v){Nt(s,s.return,v)}}}function u2(s,c,h){h.props=ks(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount()}catch(v){Nt(s,c,v)}}function Nd(s,c){try{var h=s.ref;if(h!==null){switch(s.tag){case 26:case 27:case 5:var v=s.stateNode;break;case 30:v=s.stateNode;break;default:v=s.stateNode}typeof h=="function"?s.refCleanup=h(v):h.current=v}}catch(S){Nt(s,c,S)}}function Xa(s,c){var h=s.ref,v=s.refCleanup;if(h!==null)if(typeof v=="function")try{v()}catch(S){Nt(s,c,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(S){Nt(s,c,S)}else h.current=null}function d2(s){var c=s.type,h=s.memoizedProps,v=s.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":h.autoFocus&&v.focus();break e;case"img":h.src?v.src=h.src:h.srcSet&&(v.srcset=h.srcSet)}}catch(S){Nt(s,s.return,S)}}function kb(s,c,h){try{var v=s.stateNode;sV(v,s.type,h,c),v[Sr]=c}catch(S){Nt(s,s.return,S)}}function f2(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ko(s.type)||s.tag===4}function Pb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||f2(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&ko(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Mb(s,c,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(s,c):(c=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,c.appendChild(s),h=h._reactRootContainer,h!=null||c.onclick!==null||(c.onclick=Si));else if(v!==4&&(v===27&&ko(s.type)&&(h=s.stateNode,c=null),s=s.child,s!==null))for(Mb(s,c,h),s=s.sibling;s!==null;)Mb(s,c,h),s=s.sibling}function Um(s,c,h){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?h.insertBefore(s,c):h.appendChild(s);else if(v!==4&&(v===27&&ko(s.type)&&(h=s.stateNode),s=s.child,s!==null))for(Um(s,c,h),s=s.sibling;s!==null;)Um(s,c,h),s=s.sibling}function h2(s){var c=s.stateNode,h=s.memoizedProps;try{for(var v=s.type,S=c.attributes;S.length;)c.removeAttributeNode(S[0]);Zn(c,v,h),c[Gn]=s,c[Sr]=h}catch(_){Nt(s,s.return,_)}}var Mi=!1,hn=!1,Rb=!1,m2=typeof WeakSet=="function"?WeakSet:Set,Ln=null;function z7(s,c){if(s=s.containerInfo,t0=up,s=OA(s),Cx(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var v=h.getSelection&&h.getSelection();if(v&&v.rangeCount!==0){h=v.anchorNode;var S=v.anchorOffset,_=v.focusNode;v=v.focusOffset;try{h.nodeType,_.nodeType}catch{h=null;break e}var M=0,q=-1,X=-1,se=0,ge=0,we=s,ce=null;t:for(;;){for(var he;we!==h||S!==0&&we.nodeType!==3||(q=M+S),we!==_||v!==0&&we.nodeType!==3||(X=M+v),we.nodeType===3&&(M+=we.nodeValue.length),(he=we.firstChild)!==null;)ce=we,we=he;for(;;){if(we===s)break t;if(ce===h&&++se===S&&(q=M),ce===_&&++ge===v&&(X=M),(he=we.nextSibling)!==null)break;we=ce,ce=we.parentNode}we=he}h=q===-1||X===-1?null:{start:q,end:X}}else h=null}h=h||{start:0,end:0}}else h=null;for(n0={focusedElem:s,selectionRange:h},up=!1,Ln=c;Ln!==null;)if(c=Ln,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,Ln=s;else for(;Ln!==null;){switch(c=Ln,_=c.alternate,s=c.flags,c.tag){case 0:if((s&4)!==0&&(s=c.updateQueue,s=s!==null?s.events:null,s!==null))for(h=0;h<s.length;h++)S=s[h],S.ref.impl=S.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&_!==null){s=void 0,h=c,S=_.memoizedProps,_=_.memoizedState,v=h.stateNode;try{var Ae=ks(h.type,S);s=v.getSnapshotBeforeUpdate(Ae,_),v.__reactInternalSnapshotBeforeUpdate=s}catch(ze){Nt(h,h.return,ze)}}break;case 3:if((s&1024)!==0){if(s=c.stateNode.containerInfo,h=s.nodeType,h===9)i0(s);else if(h===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":i0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=c.sibling,s!==null){s.return=c.return,Ln=s;break}Ln=c.return}}function p2(s,c,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:Di(s,h),v&4&&_d(5,h);break;case 1:if(Di(s,h),v&4)if(s=h.stateNode,c===null)try{s.componentDidMount()}catch(M){Nt(h,h.return,M)}else{var S=ks(h.type,c.memoizedProps);c=c.memoizedState;try{s.componentDidUpdate(S,c,s.__reactInternalSnapshotBeforeUpdate)}catch(M){Nt(h,h.return,M)}}v&64&&c2(h),v&512&&Nd(h,h.return);break;case 3:if(Di(s,h),v&64&&(s=h.updateQueue,s!==null)){if(c=null,h.child!==null)switch(h.child.tag){case 27:case 5:c=h.child.stateNode;break;case 1:c=h.child.stateNode}try{JA(s,c)}catch(M){Nt(h,h.return,M)}}break;case 27:c===null&&v&4&&h2(h);case 26:case 5:Di(s,h),c===null&&v&4&&d2(h),v&512&&Nd(h,h.return);break;case 12:Di(s,h);break;case 31:Di(s,h),v&4&&y2(s,h);break;case 13:Di(s,h),v&4&&x2(s,h),v&64&&(s=h.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(h=K7.bind(null,h),pV(s,h))));break;case 22:if(v=h.memoizedState!==null||Mi,!v){c=c!==null&&c.memoizedState!==null||hn,S=Mi;var _=hn;Mi=v,(hn=c)&&!_?$i(s,h,(h.subtreeFlags&8772)!==0):Di(s,h),Mi=S,hn=_}break;case 30:break;default:Di(s,h)}}function v2(s){var c=s.alternate;c!==null&&(s.alternate=null,v2(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&ux(c)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Kt=null,Nr=!1;function Ri(s,c,h){for(h=h.child;h!==null;)g2(s,c,h),h=h.sibling}function g2(s,c,h){if(gr&&typeof gr.onCommitFiberUnmount=="function")try{gr.onCommitFiberUnmount(ms,h)}catch{}switch(h.tag){case 26:hn||Xa(h,c),Ri(s,c,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:hn||Xa(h,c);var v=Kt,S=Nr;ko(h.type)&&(Kt=h.stateNode,Nr=!1),Ri(s,c,h),Rd(h.stateNode),Kt=v,Nr=S;break;case 5:hn||Xa(h,c);case 6:if(v=Kt,S=Nr,Kt=null,Ri(s,c,h),Kt=v,Nr=S,Kt!==null)if(Nr)try{(Kt.nodeType===9?Kt.body:Kt.nodeName==="HTML"?Kt.ownerDocument.body:Kt).removeChild(h.stateNode)}catch(_){Nt(h,c,_)}else try{Kt.removeChild(h.stateNode)}catch(_){Nt(h,c,_)}break;case 18:Kt!==null&&(Nr?(s=Kt,ck(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,h.stateNode),gc(s)):ck(Kt,h.stateNode));break;case 4:v=Kt,S=Nr,Kt=h.stateNode.containerInfo,Nr=!0,Ri(s,c,h),Kt=v,Nr=S;break;case 0:case 11:case 14:case 15:_o(2,h,c),hn||_o(4,h,c),Ri(s,c,h);break;case 1:hn||(Xa(h,c),v=h.stateNode,typeof v.componentWillUnmount=="function"&&u2(h,c,v)),Ri(s,c,h);break;case 21:Ri(s,c,h);break;case 22:hn=(v=hn)||h.memoizedState!==null,Ri(s,c,h),hn=v;break;default:Ri(s,c,h)}}function y2(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{gc(s)}catch(h){Nt(c,c.return,h)}}}function x2(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{gc(s)}catch(h){Nt(c,c.return,h)}}function q7(s){switch(s.tag){case 31:case 13:case 19:var c=s.stateNode;return c===null&&(c=s.stateNode=new m2),c;case 22:return s=s.stateNode,c=s._retryCache,c===null&&(c=s._retryCache=new m2),c;default:throw Error(r(435,s.tag))}}function Hm(s,c){var h=q7(s);c.forEach(function(v){if(!h.has(v)){h.add(v);var S=X7.bind(null,s,v);v.then(S,S)}})}function Or(s,c){var h=c.deletions;if(h!==null)for(var v=0;v<h.length;v++){var S=h[v],_=s,M=c,q=M;e:for(;q!==null;){switch(q.tag){case 27:if(ko(q.type)){Kt=q.stateNode,Nr=!1;break e}break;case 5:Kt=q.stateNode,Nr=!1;break e;case 3:case 4:Kt=q.stateNode.containerInfo,Nr=!0;break e}q=q.return}if(Kt===null)throw Error(r(160));g2(_,M,S),Kt=null,Nr=!1,_=S.alternate,_!==null&&(_.return=null),S.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)b2(c,s),c=c.sibling}var Ta=null;function b2(s,c){var h=s.alternate,v=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Or(c,s),Cr(s),v&4&&(_o(3,s,s.return),_d(3,s),_o(5,s,s.return));break;case 1:Or(c,s),Cr(s),v&512&&(hn||h===null||Xa(h,h.return)),v&64&&Mi&&(s=s.updateQueue,s!==null&&(v=s.callbacks,v!==null&&(h=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=h===null?v:h.concat(v))));break;case 26:var S=Ta;if(Or(c,s),Cr(s),v&512&&(hn||h===null||Xa(h,h.return)),v&4){var _=h!==null?h.memoizedState:null;if(v=s.memoizedState,h===null)if(v===null)if(s.stateNode===null){e:{v=s.type,h=s.memoizedProps,S=S.ownerDocument||S;t:switch(v){case"title":_=S.getElementsByTagName("title")[0],(!_||_[Qu]||_[Gn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=S.createElement(v),S.head.insertBefore(_,S.querySelector("head > title"))),Zn(_,v,h),_[Gn]=s,In(_),v=_;break e;case"link":var M=bk("link","href",S).get(v+(h.href||""));if(M){for(var q=0;q<M.length;q++)if(_=M[q],_.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&_.getAttribute("rel")===(h.rel==null?null:h.rel)&&_.getAttribute("title")===(h.title==null?null:h.title)&&_.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){M.splice(q,1);break t}}_=S.createElement(v),Zn(_,v,h),S.head.appendChild(_);break;case"meta":if(M=bk("meta","content",S).get(v+(h.content||""))){for(q=0;q<M.length;q++)if(_=M[q],_.getAttribute("content")===(h.content==null?null:""+h.content)&&_.getAttribute("name")===(h.name==null?null:h.name)&&_.getAttribute("property")===(h.property==null?null:h.property)&&_.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&_.getAttribute("charset")===(h.charSet==null?null:h.charSet)){M.splice(q,1);break t}}_=S.createElement(v),Zn(_,v,h),S.head.appendChild(_);break;default:throw Error(r(468,v))}_[Gn]=s,In(_),v=_}s.stateNode=v}else wk(S,s.type,s.stateNode);else s.stateNode=xk(S,v,s.memoizedProps);else _!==v?(_===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):_.count--,v===null?wk(S,s.type,s.stateNode):xk(S,v,s.memoizedProps)):v===null&&s.stateNode!==null&&kb(s,s.memoizedProps,h.memoizedProps)}break;case 27:Or(c,s),Cr(s),v&512&&(hn||h===null||Xa(h,h.return)),h!==null&&v&4&&kb(s,s.memoizedProps,h.memoizedProps);break;case 5:if(Or(c,s),Cr(s),v&512&&(hn||h===null||Xa(h,h.return)),s.flags&32){S=s.stateNode;try{zl(S,"")}catch(Ae){Nt(s,s.return,Ae)}}v&4&&s.stateNode!=null&&(S=s.memoizedProps,kb(s,S,h!==null?h.memoizedProps:S)),v&1024&&(Rb=!0);break;case 6:if(Or(c,s),Cr(s),v&4){if(s.stateNode===null)throw Error(r(162));v=s.memoizedProps,h=s.stateNode;try{h.nodeValue=v}catch(Ae){Nt(s,s.return,Ae)}}break;case 3:if(op=null,S=Ta,Ta=ap(c.containerInfo),Or(c,s),Ta=S,Cr(s),v&4&&h!==null&&h.memoizedState.isDehydrated)try{gc(c.containerInfo)}catch(Ae){Nt(s,s.return,Ae)}Rb&&(Rb=!1,w2(s));break;case 4:v=Ta,Ta=ap(s.stateNode.containerInfo),Or(c,s),Cr(s),Ta=v;break;case 12:Or(c,s),Cr(s);break;case 31:Or(c,s),Cr(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Hm(s,v)));break;case 13:Or(c,s),Cr(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Vm=rt()),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Hm(s,v)));break;case 22:S=s.memoizedState!==null;var X=h!==null&&h.memoizedState!==null,se=Mi,ge=hn;if(Mi=se||S,hn=ge||X,Or(c,s),hn=ge,Mi=se,Cr(s),v&8192)e:for(c=s.stateNode,c._visibility=S?c._visibility&-2:c._visibility|1,S&&(h===null||X||Mi||hn||Ps(s)),h=null,c=s;;){if(c.tag===5||c.tag===26){if(h===null){X=h=c;try{if(_=X.stateNode,S)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{q=X.stateNode;var we=X.memoizedProps.style,ce=we!=null&&we.hasOwnProperty("display")?we.display:null;q.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(Ae){Nt(X,X.return,Ae)}}}else if(c.tag===6){if(h===null){X=c;try{X.stateNode.nodeValue=S?"":X.memoizedProps}catch(Ae){Nt(X,X.return,Ae)}}}else if(c.tag===18){if(h===null){X=c;try{var he=X.stateNode;S?uk(he,!0):uk(X.stateNode,!1)}catch(Ae){Nt(X,X.return,Ae)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===s)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break e;for(;c.sibling===null;){if(c.return===null||c.return===s)break e;h===c&&(h=null),c=c.return}h===c&&(h=null),c.sibling.return=c.return,c=c.sibling}v&4&&(v=s.updateQueue,v!==null&&(h=v.retryQueue,h!==null&&(v.retryQueue=null,Hm(s,h))));break;case 19:Or(c,s),Cr(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Hm(s,v)));break;case 30:break;case 21:break;default:Or(c,s),Cr(s)}}function Cr(s){var c=s.flags;if(c&2){try{for(var h,v=s.return;v!==null;){if(f2(v)){h=v;break}v=v.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var S=h.stateNode,_=Pb(s);Um(s,_,S);break;case 5:var M=h.stateNode;h.flags&32&&(zl(M,""),h.flags&=-33);var q=Pb(s);Um(s,q,M);break;case 3:case 4:var X=h.stateNode.containerInfo,se=Pb(s);Mb(s,se,X);break;default:throw Error(r(161))}}catch(ge){Nt(s,s.return,ge)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function w2(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var c=s;w2(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),s=s.sibling}}function Di(s,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)p2(s,c.alternate,c),c=c.sibling}function Ps(s){for(s=s.child;s!==null;){var c=s;switch(c.tag){case 0:case 11:case 14:case 15:_o(4,c,c.return),Ps(c);break;case 1:Xa(c,c.return);var h=c.stateNode;typeof h.componentWillUnmount=="function"&&u2(c,c.return,h),Ps(c);break;case 27:Rd(c.stateNode);case 26:case 5:Xa(c,c.return),Ps(c);break;case 22:c.memoizedState===null&&Ps(c);break;case 30:Ps(c);break;default:Ps(c)}s=s.sibling}}function $i(s,c,h){for(h=h&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var v=c.alternate,S=s,_=c,M=_.flags;switch(_.tag){case 0:case 11:case 15:$i(S,_,h),_d(4,_);break;case 1:if($i(S,_,h),v=_,S=v.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(se){Nt(v,v.return,se)}if(v=_,S=v.updateQueue,S!==null){var q=v.stateNode;try{var X=S.shared.hiddenCallbacks;if(X!==null)for(S.shared.hiddenCallbacks=null,S=0;S<X.length;S++)QA(X[S],q)}catch(se){Nt(v,v.return,se)}}h&&M&64&&c2(_),Nd(_,_.return);break;case 27:h2(_);case 26:case 5:$i(S,_,h),h&&v===null&&M&4&&d2(_),Nd(_,_.return);break;case 12:$i(S,_,h);break;case 31:$i(S,_,h),h&&M&4&&y2(S,_);break;case 13:$i(S,_,h),h&&M&4&&x2(S,_);break;case 22:_.memoizedState===null&&$i(S,_,h),Nd(_,_.return);break;case 30:break;default:$i(S,_,h)}c=c.sibling}}function Db(s,c){var h=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),s=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(s=c.memoizedState.cachePool.pool),s!==h&&(s!=null&&s.refCount++,h!=null&&dd(h))}function $b(s,c){s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&dd(s))}function ka(s,c,h,v){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)j2(s,c,h,v),c=c.sibling}function j2(s,c,h,v){var S=c.flags;switch(c.tag){case 0:case 11:case 15:ka(s,c,h,v),S&2048&&_d(9,c);break;case 1:ka(s,c,h,v);break;case 3:ka(s,c,h,v),S&2048&&(s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&dd(s)));break;case 12:if(S&2048){ka(s,c,h,v),s=c.stateNode;try{var _=c.memoizedProps,M=_.id,q=_.onPostCommit;typeof q=="function"&&q(M,c.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(X){Nt(c,c.return,X)}}else ka(s,c,h,v);break;case 31:ka(s,c,h,v);break;case 13:ka(s,c,h,v);break;case 23:break;case 22:_=c.stateNode,M=c.alternate,c.memoizedState!==null?_._visibility&2?ka(s,c,h,v):Od(s,c):_._visibility&2?ka(s,c,h,v):(_._visibility|=2,oc(s,c,h,v,(c.subtreeFlags&10256)!==0||!1)),S&2048&&Db(M,c);break;case 24:ka(s,c,h,v),S&2048&&$b(c.alternate,c);break;default:ka(s,c,h,v)}}function oc(s,c,h,v,S){for(S=S&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var _=s,M=c,q=h,X=v,se=M.flags;switch(M.tag){case 0:case 11:case 15:oc(_,M,q,X,S),_d(8,M);break;case 23:break;case 22:var ge=M.stateNode;M.memoizedState!==null?ge._visibility&2?oc(_,M,q,X,S):Od(_,M):(ge._visibility|=2,oc(_,M,q,X,S)),S&&se&2048&&Db(M.alternate,M);break;case 24:oc(_,M,q,X,S),S&&se&2048&&$b(M.alternate,M);break;default:oc(_,M,q,X,S)}c=c.sibling}}function Od(s,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var h=s,v=c,S=v.flags;switch(v.tag){case 22:Od(h,v),S&2048&&Db(v.alternate,v);break;case 24:Od(h,v),S&2048&&$b(v.alternate,v);break;default:Od(h,v)}c=c.sibling}}var Cd=8192;function sc(s,c,h){if(s.subtreeFlags&Cd)for(s=s.child;s!==null;)S2(s,c,h),s=s.sibling}function S2(s,c,h){switch(s.tag){case 26:sc(s,c,h),s.flags&Cd&&s.memoizedState!==null&&CV(h,Ta,s.memoizedState,s.memoizedProps);break;case 5:sc(s,c,h);break;case 3:case 4:var v=Ta;Ta=ap(s.stateNode.containerInfo),sc(s,c,h),Ta=v;break;case 22:s.memoizedState===null&&(v=s.alternate,v!==null&&v.memoizedState!==null?(v=Cd,Cd=16777216,sc(s,c,h),Cd=v):sc(s,c,h));break;default:sc(s,c,h)}}function _2(s){var c=s.alternate;if(c!==null&&(s=c.child,s!==null)){c.child=null;do c=s.sibling,s.sibling=null,s=c;while(s!==null)}}function Ed(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var h=0;h<c.length;h++){var v=c[h];Ln=v,O2(v,s)}_2(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)N2(s),s=s.sibling}function N2(s){switch(s.tag){case 0:case 11:case 15:Ed(s),s.flags&2048&&_o(9,s,s.return);break;case 3:Ed(s);break;case 12:Ed(s);break;case 22:var c=s.stateNode;s.memoizedState!==null&&c._visibility&2&&(s.return===null||s.return.tag!==13)?(c._visibility&=-3,Wm(s)):Ed(s);break;default:Ed(s)}}function Wm(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var h=0;h<c.length;h++){var v=c[h];Ln=v,O2(v,s)}_2(s)}for(s=s.child;s!==null;){switch(c=s,c.tag){case 0:case 11:case 15:_o(8,c,c.return),Wm(c);break;case 22:h=c.stateNode,h._visibility&2&&(h._visibility&=-3,Wm(c));break;default:Wm(c)}s=s.sibling}}function O2(s,c){for(;Ln!==null;){var h=Ln;switch(h.tag){case 0:case 11:case 15:_o(8,h,c);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var v=h.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:dd(h.memoizedState.cache)}if(v=h.child,v!==null)v.return=h,Ln=v;else e:for(h=s;Ln!==null;){v=Ln;var S=v.sibling,_=v.return;if(v2(v),v===h){Ln=null;break e}if(S!==null){S.return=_,Ln=S;break e}Ln=_}}}var F7={getCacheForType:function(s){var c=Kn(un),h=c.data.get(s);return h===void 0&&(h=s(),c.data.set(s,h)),h},cacheSignal:function(){return Kn(un).controller.signal}},U7=typeof WeakMap=="function"?WeakMap:Map,yt=0,$t=null,it=null,ct=0,_t=0,Ur=null,No=!1,lc=!1,Ib=!1,Ii=0,rn=0,Oo=0,Ms=0,Lb=0,Hr=0,cc=0,Ad=null,Er=null,Bb=!1,Vm=0,C2=0,Gm=1/0,Ym=null,Co=null,On=0,Eo=null,uc=null,Li=0,zb=0,qb=null,E2=null,Td=0,Fb=null;function Wr(){return(yt&2)!==0&&ct!==0?ct&-ct:L.T!==null?Yb():HE()}function A2(){if(Hr===0)if((ct&536870912)===0||ft){var s=gt;gt<<=1,(gt&3932160)===0&&(gt=262144),Hr=s}else Hr=536870912;return s=qr.current,s!==null&&(s.flags|=32),Hr}function Ar(s,c,h){(s===$t&&(_t===2||_t===9)||s.cancelPendingCommit!==null)&&(dc(s,0),Ao(s,ct,Hr,!1)),Zu(s,h),((yt&2)===0||s!==$t)&&(s===$t&&((yt&2)===0&&(Ms|=h),rn===4&&Ao(s,ct,Hr,!1)),Za(s))}function T2(s,c,h){if((yt&6)!==0)throw Error(r(327));var v=!h&&(c&127)===0&&(c&s.expiredLanes)===0||ps(s,c),S=v?V7(s,c):Hb(s,c,!0),_=v;do{if(S===0){lc&&!v&&Ao(s,c,0,!1);break}else{if(h=s.current.alternate,_&&!H7(h)){S=Hb(s,c,!1),_=!1;continue}if(S===2){if(_=c,s.errorRecoveryDisabledLanes&_)var M=0;else M=s.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){c=M;e:{var q=s;S=Ad;var X=q.current.memoizedState.isDehydrated;if(X&&(dc(q,M).flags|=256),M=Hb(q,M,!1),M!==2){if(Ib&&!X){q.errorRecoveryDisabledLanes|=_,Ms|=_,S=4;break e}_=Er,Er=S,_!==null&&(Er===null?Er=_:Er.push.apply(Er,_))}S=M}if(_=!1,S!==2)continue}}if(S===1){dc(s,0),Ao(s,c,0,!0);break}e:{switch(v=s,_=S,_){case 0:case 1:throw Error(r(345));case 4:if((c&4194048)!==c)break;case 6:Ao(v,c,Hr,!No);break e;case 2:Er=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(S=Vm+300-rt(),10<S)){if(Ao(v,c,Hr,!No),Pl(v,0,!0)!==0)break e;Li=c,v.timeoutHandle=sk(k2.bind(null,v,h,Er,Ym,Bb,c,Hr,Ms,cc,No,_,"Throttled",-0,0),S);break e}k2(v,h,Er,Ym,Bb,c,Hr,Ms,cc,No,_,null,-0,0)}}break}while(!0);Za(s)}function k2(s,c,h,v,S,_,M,q,X,se,ge,we,ce,he){if(s.timeoutHandle=-1,we=c.subtreeFlags,we&8192||(we&16785408)===16785408){we={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Si},S2(c,_,we);var Ae=(_&62914560)===_?Vm-rt():(_&4194048)===_?C2-rt():0;if(Ae=EV(we,Ae),Ae!==null){Li=_,s.cancelPendingCommit=Ae(B2.bind(null,s,c,_,h,v,S,M,q,X,ge,we,null,ce,he)),Ao(s,_,M,!se);return}}B2(s,c,_,h,v,S,M,q,X)}function H7(s){for(var c=s;;){var h=c.tag;if((h===0||h===11||h===15)&&c.flags&16384&&(h=c.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var v=0;v<h.length;v++){var S=h[v],_=S.getSnapshot;S=S.value;try{if(!Br(_(),S))return!1}catch{return!1}}if(h=c.child,c.subtreeFlags&16384&&h!==null)h.return=c,c=h;else{if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Ao(s,c,h,v){c&=~Lb,c&=~Ms,s.suspendedLanes|=c,s.pingedLanes&=~c,v&&(s.warmLanes|=c),v=s.expirationTimes;for(var S=c;0<S;){var _=31-rr(S),M=1<<_;v[_]=-1,S&=~M}h!==0&&qE(s,h,c)}function Km(){return(yt&6)===0?(kd(0),!1):!0}function Ub(){if(it!==null){if(_t===0)var s=it.return;else s=it,Ci=_s=null,ib(s),tc=null,hd=0,s=it;for(;s!==null;)l2(s.alternate,s),s=s.return;it=null}}function dc(s,c){var h=s.timeoutHandle;h!==-1&&(s.timeoutHandle=-1,uV(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),Li=0,Ub(),$t=s,it=h=Ni(s.current,null),ct=c,_t=0,Ur=null,No=!1,lc=ps(s,c),Ib=!1,cc=Hr=Lb=Ms=Oo=rn=0,Er=Ad=null,Bb=!1,(c&8)!==0&&(c|=c&32);var v=s.entangledLanes;if(v!==0)for(s=s.entanglements,v&=c;0<v;){var S=31-rr(v),_=1<<S;c|=s[S],v&=~_}return Ii=c,vm(),h}function P2(s,c){Ke=null,L.H=wd,c===ec||c===_m?(c=YA(),_t=3):c===Gx?(c=YA(),_t=4):_t=c===wb?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,Ur=c,it===null&&(rn=1,Lm(s,ca(c,s.current)))}function M2(){var s=qr.current;return s===null?!0:(ct&4194048)===ct?ha===null:(ct&62914560)===ct||(ct&536870912)!==0?s===ha:!1}function R2(){var s=L.H;return L.H=wd,s===null?wd:s}function D2(){var s=L.A;return L.A=F7,s}function Xm(){rn=4,No||(ct&4194048)!==ct&&qr.current!==null||(lc=!0),(Oo&134217727)===0&&(Ms&134217727)===0||$t===null||Ao($t,ct,Hr,!1)}function Hb(s,c,h){var v=yt;yt|=2;var S=R2(),_=D2();($t!==s||ct!==c)&&(Ym=null,dc(s,c)),c=!1;var M=rn;e:do try{if(_t!==0&&it!==null){var q=it,X=Ur;switch(_t){case 8:Ub(),M=6;break e;case 3:case 2:case 9:case 6:qr.current===null&&(c=!0);var se=_t;if(_t=0,Ur=null,fc(s,q,X,se),h&&lc){M=0;break e}break;default:se=_t,_t=0,Ur=null,fc(s,q,X,se)}}W7(),M=rn;break}catch(ge){P2(s,ge)}while(!0);return c&&s.shellSuspendCounter++,Ci=_s=null,yt=v,L.H=S,L.A=_,it===null&&($t=null,ct=0,vm()),M}function W7(){for(;it!==null;)$2(it)}function V7(s,c){var h=yt;yt|=2;var v=R2(),S=D2();$t!==s||ct!==c?(Ym=null,Gm=rt()+500,dc(s,c)):lc=ps(s,c);e:do try{if(_t!==0&&it!==null){c=it;var _=Ur;t:switch(_t){case 1:_t=0,Ur=null,fc(s,c,_,1);break;case 2:case 9:if(VA(_)){_t=0,Ur=null,I2(c);break}c=function(){_t!==2&&_t!==9||$t!==s||(_t=7),Za(s)},_.then(c,c);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:VA(_)?(_t=0,Ur=null,I2(c)):(_t=0,Ur=null,fc(s,c,_,7));break;case 5:var M=null;switch(it.tag){case 26:M=it.memoizedState;case 5:case 27:var q=it;if(M?jk(M):q.stateNode.complete){_t=0,Ur=null;var X=q.sibling;if(X!==null)it=X;else{var se=q.return;se!==null?(it=se,Zm(se)):it=null}break t}}_t=0,Ur=null,fc(s,c,_,5);break;case 6:_t=0,Ur=null,fc(s,c,_,6);break;case 8:Ub(),rn=6;break e;default:throw Error(r(462))}}G7();break}catch(ge){P2(s,ge)}while(!0);return Ci=_s=null,L.H=v,L.A=S,yt=h,it!==null?0:($t=null,ct=0,vm(),rn)}function G7(){for(;it!==null&&!vr();)$2(it)}function $2(s){var c=o2(s.alternate,s,Ii);s.memoizedProps=s.pendingProps,c===null?Zm(s):it=c}function I2(s){var c=s,h=c.alternate;switch(c.tag){case 15:case 0:c=e2(h,c,c.pendingProps,c.type,void 0,ct);break;case 11:c=e2(h,c,c.pendingProps,c.type.render,c.ref,ct);break;case 5:ib(c);default:l2(h,c),c=it=DA(c,Ii),c=o2(h,c,Ii)}s.memoizedProps=s.pendingProps,c===null?Zm(s):it=c}function fc(s,c,h,v){Ci=_s=null,ib(c),tc=null,hd=0;var S=c.return;try{if(D7(s,S,c,h,ct)){rn=1,Lm(s,ca(h,s.current)),it=null;return}}catch(_){if(S!==null)throw it=S,_;rn=1,Lm(s,ca(h,s.current)),it=null;return}c.flags&32768?(ft||v===1?s=!0:lc||(ct&536870912)!==0?s=!1:(No=s=!0,(v===2||v===9||v===3||v===6)&&(v=qr.current,v!==null&&v.tag===13&&(v.flags|=16384))),L2(c,s)):Zm(c)}function Zm(s){var c=s;do{if((c.flags&32768)!==0){L2(c,No);return}s=c.return;var h=L7(c.alternate,c,Ii);if(h!==null){it=h;return}if(c=c.sibling,c!==null){it=c;return}it=c=s}while(c!==null);rn===0&&(rn=5)}function L2(s,c){do{var h=B7(s.alternate,s);if(h!==null){h.flags&=32767,it=h;return}if(h=s.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!c&&(s=s.sibling,s!==null)){it=s;return}it=s=h}while(s!==null);rn=6,it=null}function B2(s,c,h,v,S,_,M,q,X){s.cancelPendingCommit=null;do Qm();while(On!==0);if((yt&6)!==0)throw Error(r(327));if(c!==null){if(c===s.current)throw Error(r(177));if(_=c.lanes|c.childLanes,_|=Px,OW(s,h,_,M,q,X),s===$t&&(it=$t=null,ct=0),uc=c,Eo=s,Li=h,zb=_,qb=S,E2=v,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Z7(kl,function(){return H2(),null})):(s.callbackNode=null,s.callbackPriority=0),v=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||v){v=L.T,L.T=null,S=R.p,R.p=2,M=yt,yt|=4;try{z7(s,c,h)}finally{yt=M,R.p=S,L.T=v}}On=1,z2(),q2(),F2()}}function z2(){if(On===1){On=0;var s=Eo,c=uc,h=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||h){h=L.T,L.T=null;var v=R.p;R.p=2;var S=yt;yt|=4;try{b2(c,s);var _=n0,M=OA(s.containerInfo),q=_.focusedElem,X=_.selectionRange;if(M!==q&&q&&q.ownerDocument&&NA(q.ownerDocument.documentElement,q)){if(X!==null&&Cx(q)){var se=X.start,ge=X.end;if(ge===void 0&&(ge=se),"selectionStart"in q)q.selectionStart=se,q.selectionEnd=Math.min(ge,q.value.length);else{var we=q.ownerDocument||document,ce=we&&we.defaultView||window;if(ce.getSelection){var he=ce.getSelection(),Ae=q.textContent.length,ze=Math.min(X.start,Ae),Pt=X.end===void 0?ze:Math.min(X.end,Ae);!he.extend&&ze>Pt&&(M=Pt,Pt=ze,ze=M);var re=_A(q,ze),Q=_A(q,Pt);if(re&&Q&&(he.rangeCount!==1||he.anchorNode!==re.node||he.anchorOffset!==re.offset||he.focusNode!==Q.node||he.focusOffset!==Q.offset)){var ie=we.createRange();ie.setStart(re.node,re.offset),he.removeAllRanges(),ze>Pt?(he.addRange(ie),he.extend(Q.node,Q.offset)):(ie.setEnd(Q.node,Q.offset),he.addRange(ie))}}}}for(we=[],he=q;he=he.parentNode;)he.nodeType===1&&we.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<we.length;q++){var be=we[q];be.element.scrollLeft=be.left,be.element.scrollTop=be.top}}up=!!t0,n0=t0=null}finally{yt=S,R.p=v,L.T=h}}s.current=c,On=2}}function q2(){if(On===2){On=0;var s=Eo,c=uc,h=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||h){h=L.T,L.T=null;var v=R.p;R.p=2;var S=yt;yt|=4;try{p2(s,c.alternate,c)}finally{yt=S,R.p=v,L.T=h}}On=3}}function F2(){if(On===4||On===3){On=0,lt();var s=Eo,c=uc,h=Li,v=E2;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?On=5:(On=0,uc=Eo=null,U2(s,s.pendingLanes));var S=s.pendingLanes;if(S===0&&(Co=null),lx(h),c=c.stateNode,gr&&typeof gr.onCommitFiberRoot=="function")try{gr.onCommitFiberRoot(ms,c,void 0,(c.current.flags&128)===128)}catch{}if(v!==null){c=L.T,S=R.p,R.p=2,L.T=null;try{for(var _=s.onRecoverableError,M=0;M<v.length;M++){var q=v[M];_(q.value,{componentStack:q.stack})}}finally{L.T=c,R.p=S}}(Li&3)!==0&&Qm(),Za(s),S=s.pendingLanes,(h&261930)!==0&&(S&42)!==0?s===Fb?Td++:(Td=0,Fb=s):Td=0,kd(0)}}function U2(s,c){(s.pooledCacheLanes&=c)===0&&(c=s.pooledCache,c!=null&&(s.pooledCache=null,dd(c)))}function Qm(){return z2(),q2(),F2(),H2()}function H2(){if(On!==5)return!1;var s=Eo,c=zb;zb=0;var h=lx(Li),v=L.T,S=R.p;try{R.p=32>h?32:h,L.T=null,h=qb,qb=null;var _=Eo,M=Li;if(On=0,uc=Eo=null,Li=0,(yt&6)!==0)throw Error(r(331));var q=yt;if(yt|=4,N2(_.current),j2(_,_.current,M,h),yt=q,kd(0,!1),gr&&typeof gr.onPostCommitFiberRoot=="function")try{gr.onPostCommitFiberRoot(ms,_)}catch{}return!0}finally{R.p=S,L.T=v,U2(s,c)}}function W2(s,c,h){c=ca(h,c),c=bb(s.stateNode,c,2),s=wo(s,c,2),s!==null&&(Zu(s,2),Za(s))}function Nt(s,c,h){if(s.tag===3)W2(s,s,h);else for(;c!==null;){if(c.tag===3){W2(c,s,h);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Co===null||!Co.has(v))){s=ca(h,s),h=VT(2),v=wo(c,h,2),v!==null&&(GT(h,v,c,s),Zu(v,2),Za(v));break}}c=c.return}}function Wb(s,c,h){var v=s.pingCache;if(v===null){v=s.pingCache=new U7;var S=new Set;v.set(c,S)}else S=v.get(c),S===void 0&&(S=new Set,v.set(c,S));S.has(h)||(Ib=!0,S.add(h),s=Y7.bind(null,s,c,h),c.then(s,s))}function Y7(s,c,h){var v=s.pingCache;v!==null&&v.delete(c),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,$t===s&&(ct&h)===h&&(rn===4||rn===3&&(ct&62914560)===ct&&300>rt()-Vm?(yt&2)===0&&dc(s,0):Lb|=h,cc===ct&&(cc=0)),Za(s)}function V2(s,c){c===0&&(c=Ml()),s=ws(s,c),s!==null&&(Zu(s,c),Za(s))}function K7(s){var c=s.memoizedState,h=0;c!==null&&(h=c.retryLane),V2(s,h)}function X7(s,c){var h=0;switch(s.tag){case 31:case 13:var v=s.stateNode,S=s.memoizedState;S!==null&&(h=S.retryLane);break;case 19:v=s.stateNode;break;case 22:v=s.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(c),V2(s,h)}function Z7(s,c){return pr(s,c)}var Jm=null,hc=null,Vb=!1,ep=!1,Gb=!1,To=0;function Za(s){s!==hc&&s.next===null&&(hc===null?Jm=hc=s:hc=hc.next=s),ep=!0,Vb||(Vb=!0,J7())}function kd(s,c){if(!Gb&&ep){Gb=!0;do for(var h=!1,v=Jm;v!==null;){if(s!==0){var S=v.pendingLanes;if(S===0)var _=0;else{var M=v.suspendedLanes,q=v.pingedLanes;_=(1<<31-rr(42|s)+1)-1,_&=S&~(M&~q),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(h=!0,X2(v,_))}else _=ct,_=Pl(v,v===$t?_:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(_&3)===0||ps(v,_)||(h=!0,X2(v,_));v=v.next}while(h);Gb=!1}}function Q7(){G2()}function G2(){ep=Vb=!1;var s=0;To!==0&&cV()&&(s=To);for(var c=rt(),h=null,v=Jm;v!==null;){var S=v.next,_=Y2(v,c);_===0?(v.next=null,h===null?Jm=S:h.next=S,S===null&&(hc=h)):(h=v,(s!==0||(_&3)!==0)&&(ep=!0)),v=S}On!==0&&On!==5||kd(s),To!==0&&(To=0)}function Y2(s,c){for(var h=s.suspendedLanes,v=s.pingedLanes,S=s.expirationTimes,_=s.pendingLanes&-62914561;0<_;){var M=31-rr(_),q=1<<M,X=S[M];X===-1?((q&h)===0||(q&v)!==0)&&(S[M]=ox(q,c)):X<=c&&(s.expiredLanes|=q),_&=~q}if(c=$t,h=ct,h=Pl(s,s===c?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v=s.callbackNode,h===0||s===c&&(_t===2||_t===9)||s.cancelPendingCommit!==null)return v!==null&&v!==null&&nr(v),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||ps(s,h)){if(c=h&-h,c===s.callbackPriority)return c;switch(v!==null&&nr(v),lx(h)){case 2:case 8:h=rm;break;case 32:h=kl;break;case 268435456:h=am;break;default:h=kl}return v=K2.bind(null,s),h=pr(h,v),s.callbackPriority=c,s.callbackNode=h,c}return v!==null&&v!==null&&nr(v),s.callbackPriority=2,s.callbackNode=null,2}function K2(s,c){if(On!==0&&On!==5)return s.callbackNode=null,s.callbackPriority=0,null;var h=s.callbackNode;if(Qm()&&s.callbackNode!==h)return null;var v=ct;return v=Pl(s,s===$t?v:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v===0?null:(T2(s,v,c),Y2(s,rt()),s.callbackNode!=null&&s.callbackNode===h?K2.bind(null,s):null)}function X2(s,c){if(Qm())return null;T2(s,c,!0)}function J7(){dV(function(){(yt&6)!==0?pr(hs,Q7):G2()})}function Yb(){if(To===0){var s=Ql;s===0&&(s=He,He<<=1,(He&261888)===0&&(He=256)),To=s}return To}function Z2(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:lm(""+s)}function Q2(s,c){var h=c.ownerDocument.createElement("input");return h.name=c.name,h.value=c.value,s.id&&h.setAttribute("form",s.id),c.parentNode.insertBefore(h,c),s=new FormData(s),h.parentNode.removeChild(h),s}function eV(s,c,h,v,S){if(c==="submit"&&h&&h.stateNode===S){var _=Z2((S[Sr]||null).action),M=v.submitter;M&&(c=(c=M[Sr]||null)?Z2(c.formAction):M.getAttribute("formAction"),c!==null&&(_=c,M=null));var q=new fm("action","action",null,v,S);s.push({event:q,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(To!==0){var X=M?Q2(S,M):new FormData(S);mb(h,{pending:!0,data:X,method:S.method,action:_},null,X)}}else typeof _=="function"&&(q.preventDefault(),X=M?Q2(S,M):new FormData(S),mb(h,{pending:!0,data:X,method:S.method,action:_},_,X))},currentTarget:S}]})}}for(var Kb=0;Kb<kx.length;Kb++){var Xb=kx[Kb],tV=Xb.toLowerCase(),nV=Xb[0].toUpperCase()+Xb.slice(1);Aa(tV,"on"+nV)}Aa(AA,"onAnimationEnd"),Aa(TA,"onAnimationIteration"),Aa(kA,"onAnimationStart"),Aa("dblclick","onDoubleClick"),Aa("focusin","onFocus"),Aa("focusout","onBlur"),Aa(y7,"onTransitionRun"),Aa(x7,"onTransitionStart"),Aa(b7,"onTransitionCancel"),Aa(PA,"onTransitionEnd"),Ll("onMouseEnter",["mouseout","mouseover"]),Ll("onMouseLeave",["mouseout","mouseover"]),Ll("onPointerEnter",["pointerout","pointerover"]),Ll("onPointerLeave",["pointerout","pointerover"]),gs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),gs("onBeforeInput",["compositionend","keypress","textInput","paste"]),gs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pd="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(" "),rV=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pd));function J2(s,c){c=(c&4)!==0;for(var h=0;h<s.length;h++){var v=s[h],S=v.event;v=v.listeners;e:{var _=void 0;if(c)for(var M=v.length-1;0<=M;M--){var q=v[M],X=q.instance,se=q.currentTarget;if(q=q.listener,X!==_&&S.isPropagationStopped())break e;_=q,S.currentTarget=se;try{_(S)}catch(ge){pm(ge)}S.currentTarget=null,_=X}else for(M=0;M<v.length;M++){if(q=v[M],X=q.instance,se=q.currentTarget,q=q.listener,X!==_&&S.isPropagationStopped())break e;_=q,S.currentTarget=se;try{_(S)}catch(ge){pm(ge)}S.currentTarget=null,_=X}}}}function ot(s,c){var h=c[cx];h===void 0&&(h=c[cx]=new Set);var v=s+"__bubble";h.has(v)||(ek(c,s,2,!1),h.add(v))}function Zb(s,c,h){var v=0;c&&(v|=4),ek(h,s,v,c)}var tp="_reactListening"+Math.random().toString(36).slice(2);function Qb(s){if(!s[tp]){s[tp]=!0,GE.forEach(function(h){h!=="selectionchange"&&(rV.has(h)||Zb(h,!1,s),Zb(h,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[tp]||(c[tp]=!0,Zb("selectionchange",!1,c))}}function ek(s,c,h,v){switch(Ak(c)){case 2:var S=kV;break;case 8:S=PV;break;default:S=h0}h=S.bind(null,c,h,s),S=void 0,!yx||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(S=!0),v?S!==void 0?s.addEventListener(c,h,{capture:!0,passive:S}):s.addEventListener(c,h,!0):S!==void 0?s.addEventListener(c,h,{passive:S}):s.addEventListener(c,h,!1)}function Jb(s,c,h,v,S){var _=v;if((c&1)===0&&(c&2)===0&&v!==null)e:for(;;){if(v===null)return;var M=v.tag;if(M===3||M===4){var q=v.stateNode.containerInfo;if(q===S)break;if(M===4)for(M=v.return;M!==null;){var X=M.tag;if((X===3||X===4)&&M.stateNode.containerInfo===S)return;M=M.return}for(;q!==null;){if(M=Dl(q),M===null)return;if(X=M.tag,X===5||X===6||X===26||X===27){v=_=M;continue e}q=q.parentNode}}v=v.return}iA(function(){var se=_,ge=vx(h),we=[];e:{var ce=MA.get(s);if(ce!==void 0){var he=fm,Ae=s;switch(s){case"keypress":if(um(h)===0)break e;case"keydown":case"keyup":he=XW;break;case"focusin":Ae="focus",he=jx;break;case"focusout":Ae="blur",he=jx;break;case"beforeblur":case"afterblur":he=jx;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=lA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=LW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=JW;break;case AA:case TA:case kA:he=qW;break;case PA:he=t7;break;case"scroll":case"scrollend":he=$W;break;case"wheel":he=r7;break;case"copy":case"cut":case"paste":he=UW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=uA;break;case"toggle":case"beforetoggle":he=i7}var ze=(c&4)!==0,Pt=!ze&&(s==="scroll"||s==="scrollend"),re=ze?ce!==null?ce+"Capture":null:ce;ze=[];for(var Q=se,ie;Q!==null;){var be=Q;if(ie=be.stateNode,be=be.tag,be!==5&&be!==26&&be!==27||ie===null||re===null||(be=ed(Q,re),be!=null&&ze.push(Md(Q,be,ie))),Pt)break;Q=Q.return}0<ze.length&&(ce=new he(ce,Ae,null,h,ge),we.push({event:ce,listeners:ze}))}}if((c&7)===0){e:{if(ce=s==="mouseover"||s==="pointerover",he=s==="mouseout"||s==="pointerout",ce&&h!==px&&(Ae=h.relatedTarget||h.fromElement)&&(Dl(Ae)||Ae[Rl]))break e;if((he||ce)&&(ce=ge.window===ge?ge:(ce=ge.ownerDocument)?ce.defaultView||ce.parentWindow:window,he?(Ae=h.relatedTarget||h.toElement,he=se,Ae=Ae?Dl(Ae):null,Ae!==null&&(Pt=i(Ae),ze=Ae.tag,Ae!==Pt||ze!==5&&ze!==27&&ze!==6)&&(Ae=null)):(he=null,Ae=se),he!==Ae)){if(ze=lA,be="onMouseLeave",re="onMouseEnter",Q="mouse",(s==="pointerout"||s==="pointerover")&&(ze=uA,be="onPointerLeave",re="onPointerEnter",Q="pointer"),Pt=he==null?ce:Ju(he),ie=Ae==null?ce:Ju(Ae),ce=new ze(be,Q+"leave",he,h,ge),ce.target=Pt,ce.relatedTarget=ie,be=null,Dl(ge)===se&&(ze=new ze(re,Q+"enter",Ae,h,ge),ze.target=ie,ze.relatedTarget=Pt,be=ze),Pt=be,he&&Ae)t:{for(ze=aV,re=he,Q=Ae,ie=0,be=re;be;be=ze(be))ie++;be=0;for(var Ie=Q;Ie;Ie=ze(Ie))be++;for(;0<ie-be;)re=ze(re),ie--;for(;0<be-ie;)Q=ze(Q),be--;for(;ie--;){if(re===Q||Q!==null&&re===Q.alternate){ze=re;break t}re=ze(re),Q=ze(Q)}ze=null}else ze=null;he!==null&&tk(we,ce,he,ze,!1),Ae!==null&&Pt!==null&&tk(we,Pt,Ae,ze,!0)}}e:{if(ce=se?Ju(se):window,he=ce.nodeName&&ce.nodeName.toLowerCase(),he==="select"||he==="input"&&ce.type==="file")var ht=yA;else if(vA(ce))if(xA)ht=p7;else{ht=h7;var De=f7}else he=ce.nodeName,!he||he.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?se&&mx(se.elementType)&&(ht=yA):ht=m7;if(ht&&(ht=ht(s,se))){gA(we,ht,h,ge);break e}De&&De(s,ce,se),s==="focusout"&&se&&ce.type==="number"&&se.memoizedProps.value!=null&&hx(ce,"number",ce.value)}switch(De=se?Ju(se):window,s){case"focusin":(vA(De)||De.contentEditable==="true")&&(Hl=De,Ex=se,ld=null);break;case"focusout":ld=Ex=Hl=null;break;case"mousedown":Ax=!0;break;case"contextmenu":case"mouseup":case"dragend":Ax=!1,CA(we,h,ge);break;case"selectionchange":if(g7)break;case"keydown":case"keyup":CA(we,h,ge)}var Qe;if(_x)e:{switch(s){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else Ul?mA(s,h)&&(ut="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(ut="onCompositionStart");ut&&(dA&&h.locale!=="ko"&&(Ul||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Ul&&(Qe=oA()):(mo=ge,xx="value"in mo?mo.value:mo.textContent,Ul=!0)),De=np(se,ut),0<De.length&&(ut=new cA(ut,s,null,h,ge),we.push({event:ut,listeners:De}),Qe?ut.data=Qe:(Qe=pA(h),Qe!==null&&(ut.data=Qe)))),(Qe=s7?l7(s,h):c7(s,h))&&(ut=np(se,"onBeforeInput"),0<ut.length&&(De=new cA("onBeforeInput","beforeinput",null,h,ge),we.push({event:De,listeners:ut}),De.data=Qe)),eV(we,s,se,h,ge)}J2(we,c)})}function Md(s,c,h){return{instance:s,listener:c,currentTarget:h}}function np(s,c){for(var h=c+"Capture",v=[];s!==null;){var S=s,_=S.stateNode;if(S=S.tag,S!==5&&S!==26&&S!==27||_===null||(S=ed(s,h),S!=null&&v.unshift(Md(s,S,_)),S=ed(s,c),S!=null&&v.push(Md(s,S,_))),s.tag===3)return v;s=s.return}return[]}function aV(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function tk(s,c,h,v,S){for(var _=c._reactName,M=[];h!==null&&h!==v;){var q=h,X=q.alternate,se=q.stateNode;if(q=q.tag,X!==null&&X===v)break;q!==5&&q!==26&&q!==27||se===null||(X=se,S?(se=ed(h,_),se!=null&&M.unshift(Md(h,se,X))):S||(se=ed(h,_),se!=null&&M.push(Md(h,se,X)))),h=h.return}M.length!==0&&s.push({event:c,listeners:M})}var iV=/\r\n?/g,oV=/\u0000|\uFFFD/g;function nk(s){return(typeof s=="string"?s:""+s).replace(iV,`
|
||
`).replace(oV,"")}function rk(s,c){return c=nk(c),nk(s)===c}function kt(s,c,h,v,S,_){switch(h){case"children":typeof v=="string"?c==="body"||c==="textarea"&&v===""||zl(s,v):(typeof v=="number"||typeof v=="bigint")&&c!=="body"&&zl(s,""+v);break;case"className":om(s,"class",v);break;case"tabIndex":om(s,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":om(s,h,v);break;case"style":rA(s,v,_);break;case"data":if(c!=="object"){om(s,"data",v);break}case"src":case"href":if(v===""&&(c!=="a"||h!=="href")){s.removeAttribute(h);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(h);break}v=lm(""+v),s.setAttribute(h,v);break;case"action":case"formAction":if(typeof v=="function"){s.setAttribute(h,"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 _=="function"&&(h==="formAction"?(c!=="input"&&kt(s,c,"name",S.name,S,null),kt(s,c,"formEncType",S.formEncType,S,null),kt(s,c,"formMethod",S.formMethod,S,null),kt(s,c,"formTarget",S.formTarget,S,null)):(kt(s,c,"encType",S.encType,S,null),kt(s,c,"method",S.method,S,null),kt(s,c,"target",S.target,S,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(h);break}v=lm(""+v),s.setAttribute(h,v);break;case"onClick":v!=null&&(s.onclick=Si);break;case"onScroll":v!=null&&ot("scroll",s);break;case"onScrollEnd":v!=null&&ot("scrollend",s);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(S.children!=null)throw Error(r(60));s.innerHTML=h}}break;case"multiple":s.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":s.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){s.removeAttribute("xlink:href");break}h=lm(""+v),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(h,""+v):s.removeAttribute(h);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":v&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(h,""):s.removeAttribute(h);break;case"capture":case"download":v===!0?s.setAttribute(h,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(h,v):s.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?s.setAttribute(h,v):s.removeAttribute(h);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?s.removeAttribute(h):s.setAttribute(h,v);break;case"popover":ot("beforetoggle",s),ot("toggle",s),im(s,"popover",v);break;case"xlinkActuate":ji(s,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":ji(s,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":ji(s,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":ji(s,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":ji(s,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":ji(s,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":ji(s,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":ji(s,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":ji(s,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":im(s,"is",v);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=RW.get(h)||h,im(s,h,v))}}function e0(s,c,h,v,S,_){switch(h){case"style":rA(s,v,_);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(h=v.__html,h!=null){if(S.children!=null)throw Error(r(60));s.innerHTML=h}}break;case"children":typeof v=="string"?zl(s,v):(typeof v=="number"||typeof v=="bigint")&&zl(s,""+v);break;case"onScroll":v!=null&&ot("scroll",s);break;case"onScrollEnd":v!=null&&ot("scrollend",s);break;case"onClick":v!=null&&(s.onclick=Si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!YE.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(S=h.endsWith("Capture"),c=h.slice(2,S?h.length-7:void 0),_=s[Sr]||null,_=_!=null?_[h]:null,typeof _=="function"&&s.removeEventListener(c,_,S),typeof v=="function")){typeof _!="function"&&_!==null&&(h in s?s[h]=null:s.hasAttribute(h)&&s.removeAttribute(h)),s.addEventListener(c,v,S);break e}h in s?s[h]=v:v===!0?s.setAttribute(h,""):im(s,h,v)}}}function Zn(s,c,h){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",s),ot("load",s);var v=!1,S=!1,_;for(_ in h)if(h.hasOwnProperty(_)){var M=h[_];if(M!=null)switch(_){case"src":v=!0;break;case"srcSet":S=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:kt(s,c,_,M,h,null)}}S&&kt(s,c,"srcSet",h.srcSet,h,null),v&&kt(s,c,"src",h.src,h,null);return;case"input":ot("invalid",s);var q=_=M=S=null,X=null,se=null;for(v in h)if(h.hasOwnProperty(v)){var ge=h[v];if(ge!=null)switch(v){case"name":S=ge;break;case"type":M=ge;break;case"checked":X=ge;break;case"defaultChecked":se=ge;break;case"value":_=ge;break;case"defaultValue":q=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,c));break;default:kt(s,c,v,ge,h,null)}}JE(s,_,q,X,se,M,S,!1);return;case"select":ot("invalid",s),v=M=_=null;for(S in h)if(h.hasOwnProperty(S)&&(q=h[S],q!=null))switch(S){case"value":_=q;break;case"defaultValue":M=q;break;case"multiple":v=q;default:kt(s,c,S,q,h,null)}c=_,h=M,s.multiple=!!v,c!=null?Bl(s,!!v,c,!1):h!=null&&Bl(s,!!v,h,!0);return;case"textarea":ot("invalid",s),_=S=v=null;for(M in h)if(h.hasOwnProperty(M)&&(q=h[M],q!=null))switch(M){case"value":v=q;break;case"defaultValue":S=q;break;case"children":_=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(91));break;default:kt(s,c,M,q,h,null)}tA(s,v,S,_);return;case"option":for(X in h)if(h.hasOwnProperty(X)&&(v=h[X],v!=null))switch(X){case"selected":s.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:kt(s,c,X,v,h,null)}return;case"dialog":ot("beforetoggle",s),ot("toggle",s),ot("cancel",s),ot("close",s);break;case"iframe":case"object":ot("load",s);break;case"video":case"audio":for(v=0;v<Pd.length;v++)ot(Pd[v],s);break;case"image":ot("error",s),ot("load",s);break;case"details":ot("toggle",s);break;case"embed":case"source":case"link":ot("error",s),ot("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in h)if(h.hasOwnProperty(se)&&(v=h[se],v!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:kt(s,c,se,v,h,null)}return;default:if(mx(c)){for(ge in h)h.hasOwnProperty(ge)&&(v=h[ge],v!==void 0&&e0(s,c,ge,v,h,void 0));return}}for(q in h)h.hasOwnProperty(q)&&(v=h[q],v!=null&&kt(s,c,q,v,h,null))}function sV(s,c,h,v){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var S=null,_=null,M=null,q=null,X=null,se=null,ge=null;for(he in h){var we=h[he];if(h.hasOwnProperty(he)&&we!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":X=we;default:v.hasOwnProperty(he)||kt(s,c,he,null,v,we)}}for(var ce in v){var he=v[ce];if(we=h[ce],v.hasOwnProperty(ce)&&(he!=null||we!=null))switch(ce){case"type":_=he;break;case"name":S=he;break;case"checked":se=he;break;case"defaultChecked":ge=he;break;case"value":M=he;break;case"defaultValue":q=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,c));break;default:he!==we&&kt(s,c,ce,he,v,we)}}fx(s,M,q,X,se,ge,_,S);return;case"select":he=M=q=ce=null;for(_ in h)if(X=h[_],h.hasOwnProperty(_)&&X!=null)switch(_){case"value":break;case"multiple":he=X;default:v.hasOwnProperty(_)||kt(s,c,_,null,v,X)}for(S in v)if(_=v[S],X=h[S],v.hasOwnProperty(S)&&(_!=null||X!=null))switch(S){case"value":ce=_;break;case"defaultValue":q=_;break;case"multiple":M=_;default:_!==X&&kt(s,c,S,_,v,X)}c=q,h=M,v=he,ce!=null?Bl(s,!!h,ce,!1):!!v!=!!h&&(c!=null?Bl(s,!!h,c,!0):Bl(s,!!h,h?[]:"",!1));return;case"textarea":he=ce=null;for(q in h)if(S=h[q],h.hasOwnProperty(q)&&S!=null&&!v.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:kt(s,c,q,null,v,S)}for(M in v)if(S=v[M],_=h[M],v.hasOwnProperty(M)&&(S!=null||_!=null))switch(M){case"value":ce=S;break;case"defaultValue":he=S;break;case"children":break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:S!==_&&kt(s,c,M,S,v,_)}eA(s,ce,he);return;case"option":for(var Ae in h)if(ce=h[Ae],h.hasOwnProperty(Ae)&&ce!=null&&!v.hasOwnProperty(Ae))switch(Ae){case"selected":s.selected=!1;break;default:kt(s,c,Ae,null,v,ce)}for(X in v)if(ce=v[X],he=h[X],v.hasOwnProperty(X)&&ce!==he&&(ce!=null||he!=null))switch(X){case"selected":s.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:kt(s,c,X,ce,v,he)}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 ze in h)ce=h[ze],h.hasOwnProperty(ze)&&ce!=null&&!v.hasOwnProperty(ze)&&kt(s,c,ze,null,v,ce);for(se in v)if(ce=v[se],he=h[se],v.hasOwnProperty(se)&&ce!==he&&(ce!=null||he!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,c));break;default:kt(s,c,se,ce,v,he)}return;default:if(mx(c)){for(var Pt in h)ce=h[Pt],h.hasOwnProperty(Pt)&&ce!==void 0&&!v.hasOwnProperty(Pt)&&e0(s,c,Pt,void 0,v,ce);for(ge in v)ce=v[ge],he=h[ge],!v.hasOwnProperty(ge)||ce===he||ce===void 0&&he===void 0||e0(s,c,ge,ce,v,he);return}}for(var re in h)ce=h[re],h.hasOwnProperty(re)&&ce!=null&&!v.hasOwnProperty(re)&&kt(s,c,re,null,v,ce);for(we in v)ce=v[we],he=h[we],!v.hasOwnProperty(we)||ce===he||ce==null&&he==null||kt(s,c,we,ce,v,he)}function ak(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lV(){if(typeof performance.getEntriesByType=="function"){for(var s=0,c=0,h=performance.getEntriesByType("resource"),v=0;v<h.length;v++){var S=h[v],_=S.transferSize,M=S.initiatorType,q=S.duration;if(_&&q&&ak(M)){for(M=0,q=S.responseEnd,v+=1;v<h.length;v++){var X=h[v],se=X.startTime;if(se>q)break;var ge=X.transferSize,we=X.initiatorType;ge&&ak(we)&&(X=X.responseEnd,M+=ge*(X<q?1:(q-se)/(X-se)))}if(--v,c+=8*(_+M)/(S.duration/1e3),s++,10<s)break}}if(0<s)return c/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var t0=null,n0=null;function rp(s){return s.nodeType===9?s:s.ownerDocument}function ik(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ok(s,c){if(s===0)switch(c){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&c==="foreignObject"?0:s}function r0(s,c){return s==="textarea"||s==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var a0=null;function cV(){var s=window.event;return s&&s.type==="popstate"?s===a0?!1:(a0=s,!0):(a0=null,!1)}var sk=typeof setTimeout=="function"?setTimeout:void 0,uV=typeof clearTimeout=="function"?clearTimeout:void 0,lk=typeof Promise=="function"?Promise:void 0,dV=typeof queueMicrotask=="function"?queueMicrotask:typeof lk<"u"?function(s){return lk.resolve(null).then(s).catch(fV)}:sk;function fV(s){setTimeout(function(){throw s})}function ko(s){return s==="head"}function ck(s,c){var h=c,v=0;do{var S=h.nextSibling;if(s.removeChild(h),S&&S.nodeType===8)if(h=S.data,h==="/$"||h==="/&"){if(v===0){s.removeChild(S),gc(c);return}v--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")v++;else if(h==="html")Rd(s.ownerDocument.documentElement);else if(h==="head"){h=s.ownerDocument.head,Rd(h);for(var _=h.firstChild;_;){var M=_.nextSibling,q=_.nodeName;_[Qu]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&_.rel.toLowerCase()==="stylesheet"||h.removeChild(_),_=M}}else h==="body"&&Rd(s.ownerDocument.body);h=S}while(h);gc(c)}function uk(s,c){var h=s;s=0;do{var v=h.nextSibling;if(h.nodeType===1?c?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(c?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),v&&v.nodeType===8)if(h=v.data,h==="/$"){if(s===0)break;s--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||s++;h=v}while(h)}function i0(s){var c=s.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var h=c;switch(c=c.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":i0(h),ux(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}s.removeChild(h)}}function hV(s,c,h,v){for(;s.nodeType===1;){var S=h;if(s.nodeName.toLowerCase()!==c.toLowerCase()){if(!v&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(v){if(!s[Qu])switch(c){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(_=s.getAttribute("rel"),_==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(_!==S.rel||s.getAttribute("href")!==(S.href==null||S.href===""?null:S.href)||s.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin)||s.getAttribute("title")!==(S.title==null?null:S.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(_=s.getAttribute("src"),(_!==(S.src==null?null:S.src)||s.getAttribute("type")!==(S.type==null?null:S.type)||s.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin))&&_&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(c==="input"&&s.type==="hidden"){var _=S.name==null?null:""+S.name;if(S.type==="hidden"&&s.getAttribute("name")===_)return s}else return s;if(s=ma(s.nextSibling),s===null)break}return null}function mV(s,c,h){if(c==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!h||(s=ma(s.nextSibling),s===null))return null;return s}function dk(s,c){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!c||(s=ma(s.nextSibling),s===null))return null;return s}function o0(s){return s.data==="$?"||s.data==="$~"}function s0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function pV(s,c){var h=s.ownerDocument;if(s.data==="$~")s._reactRetry=c;else if(s.data!=="$?"||h.readyState!=="loading")c();else{var v=function(){c(),h.removeEventListener("DOMContentLoaded",v)};h.addEventListener("DOMContentLoaded",v),s._reactRetry=v}}function ma(s){for(;s!=null;s=s.nextSibling){var c=s.nodeType;if(c===1||c===3)break;if(c===8){if(c=s.data,c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"||c==="F!"||c==="F")break;if(c==="/$"||c==="/&")return null}}return s}var l0=null;function fk(s){s=s.nextSibling;for(var c=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"||h==="/&"){if(c===0)return ma(s.nextSibling);c--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||c++}s=s.nextSibling}return null}function hk(s){s=s.previousSibling;for(var c=0;s;){if(s.nodeType===8){var h=s.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(c===0)return s;c--}else h!=="/$"&&h!=="/&"||c++}s=s.previousSibling}return null}function mk(s,c,h){switch(c=rp(h),s){case"html":if(s=c.documentElement,!s)throw Error(r(452));return s;case"head":if(s=c.head,!s)throw Error(r(453));return s;case"body":if(s=c.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function Rd(s){for(var c=s.attributes;c.length;)s.removeAttributeNode(c[0]);ux(s)}var pa=new Map,pk=new Set;function ap(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Bi=R.d;R.d={f:vV,r:gV,D:yV,C:xV,L:bV,m:wV,X:SV,S:jV,M:_V};function vV(){var s=Bi.f(),c=Km();return s||c}function gV(s){var c=$l(s);c!==null&&c.tag===5&&c.type==="form"?PT(c):Bi.r(s)}var mc=typeof document>"u"?null:document;function vk(s,c,h){var v=mc;if(v&&typeof c=="string"&&c){var S=sa(c);S='link[rel="'+s+'"][href="'+S+'"]',typeof h=="string"&&(S+='[crossorigin="'+h+'"]'),pk.has(S)||(pk.add(S),s={rel:s,crossOrigin:h,href:c},v.querySelector(S)===null&&(c=v.createElement("link"),Zn(c,"link",s),In(c),v.head.appendChild(c)))}}function yV(s){Bi.D(s),vk("dns-prefetch",s,null)}function xV(s,c){Bi.C(s,c),vk("preconnect",s,c)}function bV(s,c,h){Bi.L(s,c,h);var v=mc;if(v&&s&&c){var S='link[rel="preload"][as="'+sa(c)+'"]';c==="image"&&h&&h.imageSrcSet?(S+='[imagesrcset="'+sa(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(S+='[imagesizes="'+sa(h.imageSizes)+'"]')):S+='[href="'+sa(s)+'"]';var _=S;switch(c){case"style":_=pc(s);break;case"script":_=vc(s)}pa.has(_)||(s=p({rel:"preload",href:c==="image"&&h&&h.imageSrcSet?void 0:s,as:c},h),pa.set(_,s),v.querySelector(S)!==null||c==="style"&&v.querySelector(Dd(_))||c==="script"&&v.querySelector($d(_))||(c=v.createElement("link"),Zn(c,"link",s),In(c),v.head.appendChild(c)))}}function wV(s,c){Bi.m(s,c);var h=mc;if(h&&s){var v=c&&typeof c.as=="string"?c.as:"script",S='link[rel="modulepreload"][as="'+sa(v)+'"][href="'+sa(s)+'"]',_=S;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=vc(s)}if(!pa.has(_)&&(s=p({rel:"modulepreload",href:s},c),pa.set(_,s),h.querySelector(S)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector($d(_)))return}v=h.createElement("link"),Zn(v,"link",s),In(v),h.head.appendChild(v)}}}function jV(s,c,h){Bi.S(s,c,h);var v=mc;if(v&&s){var S=Il(v).hoistableStyles,_=pc(s);c=c||"default";var M=S.get(_);if(!M){var q={loading:0,preload:null};if(M=v.querySelector(Dd(_)))q.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":c},h),(h=pa.get(_))&&c0(s,h);var X=M=v.createElement("link");In(X),Zn(X,"link",s),X._p=new Promise(function(se,ge){X.onload=se,X.onerror=ge}),X.addEventListener("load",function(){q.loading|=1}),X.addEventListener("error",function(){q.loading|=2}),q.loading|=4,ip(M,c,v)}M={type:"stylesheet",instance:M,count:1,state:q},S.set(_,M)}}}function SV(s,c){Bi.X(s,c);var h=mc;if(h&&s){var v=Il(h).hoistableScripts,S=vc(s),_=v.get(S);_||(_=h.querySelector($d(S)),_||(s=p({src:s,async:!0},c),(c=pa.get(S))&&u0(s,c),_=h.createElement("script"),In(_),Zn(_,"link",s),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},v.set(S,_))}}function _V(s,c){Bi.M(s,c);var h=mc;if(h&&s){var v=Il(h).hoistableScripts,S=vc(s),_=v.get(S);_||(_=h.querySelector($d(S)),_||(s=p({src:s,async:!0,type:"module"},c),(c=pa.get(S))&&u0(s,c),_=h.createElement("script"),In(_),Zn(_,"link",s),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},v.set(S,_))}}function gk(s,c,h,v){var S=(S=xe.current)?ap(S):null;if(!S)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(c=pc(h.href),h=Il(S).hoistableStyles,v=h.get(c),v||(v={type:"style",instance:null,count:0,state:null},h.set(c,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){s=pc(h.href);var _=Il(S).hoistableStyles,M=_.get(s);if(M||(S=S.ownerDocument||S,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(s,M),(_=S.querySelector(Dd(s)))&&!_._p&&(M.instance=_,M.state.loading=5),pa.has(s)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},pa.set(s,h),_||NV(S,s,h,M.state))),c&&v===null)throw Error(r(528,""));return M}if(c&&v!==null)throw Error(r(529,""));return null;case"script":return c=h.async,h=h.src,typeof h=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=vc(h),h=Il(S).hoistableScripts,v=h.get(c),v||(v={type:"script",instance:null,count:0,state:null},h.set(c,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function pc(s){return'href="'+sa(s)+'"'}function Dd(s){return'link[rel="stylesheet"]['+s+"]"}function yk(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function NV(s,c,h,v){s.querySelector('link[rel="preload"][as="style"]['+c+"]")?v.loading=1:(c=s.createElement("link"),v.preload=c,c.addEventListener("load",function(){return v.loading|=1}),c.addEventListener("error",function(){return v.loading|=2}),Zn(c,"link",h),In(c),s.head.appendChild(c))}function vc(s){return'[src="'+sa(s)+'"]'}function $d(s){return"script[async]"+s}function xk(s,c,h){if(c.count++,c.instance===null)switch(c.type){case"style":var v=s.querySelector('style[data-href~="'+sa(h.href)+'"]');if(v)return c.instance=v,In(v),v;var S=p({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return v=(s.ownerDocument||s).createElement("style"),In(v),Zn(v,"style",S),ip(v,h.precedence,s),c.instance=v;case"stylesheet":S=pc(h.href);var _=s.querySelector(Dd(S));if(_)return c.state.loading|=4,c.instance=_,In(_),_;v=yk(h),(S=pa.get(S))&&c0(v,S),_=(s.ownerDocument||s).createElement("link"),In(_);var M=_;return M._p=new Promise(function(q,X){M.onload=q,M.onerror=X}),Zn(_,"link",v),c.state.loading|=4,ip(_,h.precedence,s),c.instance=_;case"script":return _=vc(h.src),(S=s.querySelector($d(_)))?(c.instance=S,In(S),S):(v=h,(S=pa.get(_))&&(v=p({},h),u0(v,S)),s=s.ownerDocument||s,S=s.createElement("script"),In(S),Zn(S,"link",v),s.head.appendChild(S),c.instance=S);case"void":return null;default:throw Error(r(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(v=c.instance,c.state.loading|=4,ip(v,h.precedence,s));return c.instance}function ip(s,c,h){for(var v=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=v.length?v[v.length-1]:null,_=S,M=0;M<v.length;M++){var q=v[M];if(q.dataset.precedence===c)_=q;else if(_!==S)break}_?_.parentNode.insertBefore(s,_.nextSibling):(c=h.nodeType===9?h.head:h,c.insertBefore(s,c.firstChild))}function c0(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.title==null&&(s.title=c.title)}function u0(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.integrity==null&&(s.integrity=c.integrity)}var op=null;function bk(s,c,h){if(op===null){var v=new Map,S=op=new Map;S.set(h,v)}else S=op,v=S.get(h),v||(v=new Map,S.set(h,v));if(v.has(s))return v;for(v.set(s,null),h=h.getElementsByTagName(s),S=0;S<h.length;S++){var _=h[S];if(!(_[Qu]||_[Gn]||s==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(c)||"";M=s+M;var q=v.get(M);q?q.push(_):v.set(M,[_])}}return v}function wk(s,c,h){s=s.ownerDocument||s,s.head.insertBefore(h,c==="title"?s.querySelector("head > title"):null)}function OV(s,c,h){if(h===1||c.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return s=c.disabled,typeof c.precedence=="string"&&s==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function jk(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function CV(s,c,h,v){if(h.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var S=pc(v.href),_=c.querySelector(Dd(S));if(_){c=_._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=sp.bind(s),c.then(s,s)),h.state.loading|=4,h.instance=_,In(_);return}_=c.ownerDocument||c,v=yk(v),(S=pa.get(S))&&c0(v,S),_=_.createElement("link"),In(_);var M=_;M._p=new Promise(function(q,X){M.onload=q,M.onerror=X}),Zn(_,"link",v),h.instance=_}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(h,c),(c=h.state.preload)&&(h.state.loading&3)===0&&(s.count++,h=sp.bind(s),c.addEventListener("load",h),c.addEventListener("error",h))}}var d0=0;function EV(s,c){return s.stylesheets&&s.count===0&&cp(s,s.stylesheets),0<s.count||0<s.imgCount?function(h){var v=setTimeout(function(){if(s.stylesheets&&cp(s,s.stylesheets),s.unsuspend){var _=s.unsuspend;s.unsuspend=null,_()}},6e4+c);0<s.imgBytes&&d0===0&&(d0=62500*lV());var S=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&cp(s,s.stylesheets),s.unsuspend)){var _=s.unsuspend;s.unsuspend=null,_()}},(s.imgBytes>d0?50:800)+c);return s.unsuspend=h,function(){s.unsuspend=null,clearTimeout(v),clearTimeout(S)}}:null}function sp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var lp=null;function cp(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,lp=new Map,c.forEach(AV,s),lp=null,sp.call(s))}function AV(s,c){if(!(c.state.loading&4)){var h=lp.get(s);if(h)var v=h.get(null);else{h=new Map,lp.set(s,h);for(var S=s.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<S.length;_++){var M=S[_];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(h.set(M.dataset.precedence,M),v=M)}v&&h.set(null,v)}S=c.instance,M=S.getAttribute("data-precedence"),_=h.get(M)||v,_===v&&h.set(null,S),h.set(M,S),this.count++,v=sp.bind(this),S.addEventListener("load",v),S.addEventListener("error",v),_?_.parentNode.insertBefore(S,_.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(S,s.firstChild)),c.state.loading|=4}}var Id={$$typeof:C,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function TV(s,c,h,v,S,_,M,q,X){this.tag=1,this.containerInfo=s,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=vs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vs(0),this.hiddenUpdates=vs(null),this.identifierPrefix=v,this.onUncaughtError=S,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Sk(s,c,h,v,S,_,M,q,X,se,ge,we){return s=new TV(s,c,h,M,X,se,ge,we,q),c=1,_===!0&&(c|=24),_=zr(3,null,null,c),s.current=_,_.stateNode=s,c=Hx(),c.refCount++,s.pooledCache=c,c.refCount++,_.memoizedState={element:v,isDehydrated:h,cache:c},Yx(_),s}function _k(s){return s?(s=Gl,s):Gl}function Nk(s,c,h,v,S,_){S=_k(S),v.context===null?v.context=S:v.pendingContext=S,v=bo(c),v.payload={element:h},_=_===void 0?null:_,_!==null&&(v.callback=_),h=wo(s,v,c),h!==null&&(Ar(h,s,c),pd(h,s,c))}function Ok(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<c?h:c}}function f0(s,c){Ok(s,c),(s=s.alternate)&&Ok(s,c)}function Ck(s){if(s.tag===13||s.tag===31){var c=ws(s,67108864);c!==null&&Ar(c,s,67108864),f0(s,67108864)}}function Ek(s){if(s.tag===13||s.tag===31){var c=Wr();c=sx(c);var h=ws(s,c);h!==null&&Ar(h,s,c),f0(s,c)}}var up=!0;function kV(s,c,h,v){var S=L.T;L.T=null;var _=R.p;try{R.p=2,h0(s,c,h,v)}finally{R.p=_,L.T=S}}function PV(s,c,h,v){var S=L.T;L.T=null;var _=R.p;try{R.p=8,h0(s,c,h,v)}finally{R.p=_,L.T=S}}function h0(s,c,h,v){if(up){var S=m0(v);if(S===null)Jb(s,c,v,dp,h),Tk(s,v);else if(RV(S,s,c,h,v))v.stopPropagation();else if(Tk(s,v),c&4&&-1<MV.indexOf(s)){for(;S!==null;){var _=$l(S);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=tt(_.pendingLanes);if(M!==0){var q=_;for(q.pendingLanes|=2,q.entangledLanes|=2;M;){var X=1<<31-rr(M);q.entanglements[1]|=X,M&=~X}Za(_),(yt&6)===0&&(Gm=rt()+500,kd(0))}}break;case 31:case 13:q=ws(_,2),q!==null&&Ar(q,_,2),Km(),f0(_,2)}if(_=m0(v),_===null&&Jb(s,c,v,dp,h),_===S)break;S=_}S!==null&&v.stopPropagation()}else Jb(s,c,v,null,h)}}function m0(s){return s=vx(s),p0(s)}var dp=null;function p0(s){if(dp=null,s=Dl(s),s!==null){var c=i(s);if(c===null)s=null;else{var h=c.tag;if(h===13){if(s=l(c),s!==null)return s;s=null}else if(h===31){if(s=u(c),s!==null)return s;s=null}else if(h===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;s=null}else c!==s&&(s=null)}}return dp=s,null}function Ak(s){switch(s){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(Dn()){case hs:return 2;case rm:return 8;case kl:case nx:return 32;case am:return 268435456;default:return 32}default:return 32}}var v0=!1,Po=null,Mo=null,Ro=null,Ld=new Map,Bd=new Map,Do=[],MV="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 Tk(s,c){switch(s){case"focusin":case"focusout":Po=null;break;case"dragenter":case"dragleave":Mo=null;break;case"mouseover":case"mouseout":Ro=null;break;case"pointerover":case"pointerout":Ld.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bd.delete(c.pointerId)}}function zd(s,c,h,v,S,_){return s===null||s.nativeEvent!==_?(s={blockedOn:c,domEventName:h,eventSystemFlags:v,nativeEvent:_,targetContainers:[S]},c!==null&&(c=$l(c),c!==null&&Ck(c)),s):(s.eventSystemFlags|=v,c=s.targetContainers,S!==null&&c.indexOf(S)===-1&&c.push(S),s)}function RV(s,c,h,v,S){switch(c){case"focusin":return Po=zd(Po,s,c,h,v,S),!0;case"dragenter":return Mo=zd(Mo,s,c,h,v,S),!0;case"mouseover":return Ro=zd(Ro,s,c,h,v,S),!0;case"pointerover":var _=S.pointerId;return Ld.set(_,zd(Ld.get(_)||null,s,c,h,v,S)),!0;case"gotpointercapture":return _=S.pointerId,Bd.set(_,zd(Bd.get(_)||null,s,c,h,v,S)),!0}return!1}function kk(s){var c=Dl(s.target);if(c!==null){var h=i(c);if(h!==null){if(c=h.tag,c===13){if(c=l(h),c!==null){s.blockedOn=c,WE(s.priority,function(){Ek(h)});return}}else if(c===31){if(c=u(h),c!==null){s.blockedOn=c,WE(s.priority,function(){Ek(h)});return}}else if(c===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null}function fp(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var h=m0(s.nativeEvent);if(h===null){h=s.nativeEvent;var v=new h.constructor(h.type,h);px=v,h.target.dispatchEvent(v),px=null}else return c=$l(h),c!==null&&Ck(c),s.blockedOn=h,!1;c.shift()}return!0}function Pk(s,c,h){fp(s)&&h.delete(c)}function DV(){v0=!1,Po!==null&&fp(Po)&&(Po=null),Mo!==null&&fp(Mo)&&(Mo=null),Ro!==null&&fp(Ro)&&(Ro=null),Ld.forEach(Pk),Bd.forEach(Pk)}function hp(s,c){s.blockedOn===c&&(s.blockedOn=null,v0||(v0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,DV)))}var mp=null;function Mk(s){mp!==s&&(mp=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){mp===s&&(mp=null);for(var c=0;c<s.length;c+=3){var h=s[c],v=s[c+1],S=s[c+2];if(typeof v!="function"){if(p0(v||h)===null)continue;break}var _=$l(h);_!==null&&(s.splice(c,3),c-=3,mb(_,{pending:!0,data:S,method:h.method,action:v},v,S))}}))}function gc(s){function c(X){return hp(X,s)}Po!==null&&hp(Po,s),Mo!==null&&hp(Mo,s),Ro!==null&&hp(Ro,s),Ld.forEach(c),Bd.forEach(c);for(var h=0;h<Do.length;h++){var v=Do[h];v.blockedOn===s&&(v.blockedOn=null)}for(;0<Do.length&&(h=Do[0],h.blockedOn===null);)kk(h),h.blockedOn===null&&Do.shift();if(h=(s.ownerDocument||s).$$reactFormReplay,h!=null)for(v=0;v<h.length;v+=3){var S=h[v],_=h[v+1],M=S[Sr]||null;if(typeof _=="function")M||Mk(h);else if(M){var q=null;if(_&&_.hasAttribute("formAction")){if(S=_,M=_[Sr]||null)q=M.formAction;else if(p0(S)!==null)continue}else q=M.action;typeof q=="function"?h[v+1]=q:(h.splice(v,3),v-=3),Mk(h)}}}function Rk(){function s(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(M){return S=M})},focusReset:"manual",scroll:"manual"})}function c(){S!==null&&(S(),S=null),v||setTimeout(h,20)}function h(){if(!v&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,S=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",c),navigation.addEventListener("navigateerror",c),setTimeout(h,100),function(){v=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",c),navigation.removeEventListener("navigateerror",c),S!==null&&(S(),S=null)}}}function g0(s){this._internalRoot=s}pp.prototype.render=g0.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));var h=c.current,v=Wr();Nk(h,v,s,c,null,null)},pp.prototype.unmount=g0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;Nk(s.current,2,null,s,null,null),Km(),c[Rl]=null}};function pp(s){this._internalRoot=s}pp.prototype.unstable_scheduleHydration=function(s){if(s){var c=HE();s={blockedOn:null,target:s,priority:c};for(var h=0;h<Do.length&&c!==0&&c<Do[h].priority;h++);Do.splice(h,0,s),h===0&&kk(s)}};var Dk=t.version;if(Dk!=="19.2.0")throw Error(r(527,Dk,"19.2.0"));R.findDOMNode=function(s){var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(c),s=s!==null?m(s):null,s=s===null?null:s.stateNode,s};var $V={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vp.isDisabled&&vp.supportsFiber)try{ms=vp.inject($V),gr=vp}catch{}}return Fd.createRoot=function(s,c){if(!a(s))throw Error(r(299));var h=!1,v="",S=FT,_=UT,M=HT;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(S=c.onUncaughtError),c.onCaughtError!==void 0&&(_=c.onCaughtError),c.onRecoverableError!==void 0&&(M=c.onRecoverableError)),c=Sk(s,1,!1,null,null,h,v,null,S,_,M,Rk),s[Rl]=c.current,Qb(s),new g0(c)},Fd.hydrateRoot=function(s,c,h){if(!a(s))throw Error(r(299));var v=!1,S="",_=FT,M=UT,q=HT,X=null;return h!=null&&(h.unstable_strictMode===!0&&(v=!0),h.identifierPrefix!==void 0&&(S=h.identifierPrefix),h.onUncaughtError!==void 0&&(_=h.onUncaughtError),h.onCaughtError!==void 0&&(M=h.onCaughtError),h.onRecoverableError!==void 0&&(q=h.onRecoverableError),h.formState!==void 0&&(X=h.formState)),c=Sk(s,1,!0,c,h??null,v,S,X,_,M,q,Rk),c.context=_k(null),h=c.current,v=Wr(),v=sx(v),S=bo(v),S.callback=null,wo(h,S,v),h=v,c.current.lanes=h,Zu(c,h),Za(c),s[Rl]=c.current,Qb(s),new pp(c)},Fd.version="19.2.0",Fd}var Wk;function VV(){if(Wk)return b0.exports;Wk=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),b0.exports=WV(),b0.exports}var GV=VV();const s_=new WeakMap,YV=new WeakMap,cv={current:[]};let _0=!1,pf=0;const of=new Set,yp=new Map;function LL(e){for(const t of e){if(cv.current.includes(t))continue;cv.current.push(t),t.recompute();const n=YV.get(t);if(n)for(const r of n){const a=s_.get(r);a?.length&&LL(a)}}}function KV(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function XV(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function BL(e){if(pf>0&&!yp.has(e)&&yp.set(e,e.prevState),of.add(e),!(pf>0)&&!_0)try{for(_0=!0;of.size>0;){const t=Array.from(of);of.clear();for(const n of t){const r=yp.get(n)??n.prevState;n.prevState=r,KV(n)}for(const n of t){const r=s_.get(n);r&&(cv.current.push(n),LL(r))}for(const n of t){const r=s_.get(n);if(r)for(const a of r)XV(a)}}}finally{_0=!1,cv.current=[],yp.clear()}}function vf(e){pf++;try{e()}finally{if(pf--,pf===0){const t=of.values().next().value;t&&BL(t)}}}function ZV(e){return typeof e=="function"}class QV{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const l=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,a;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):ZV(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),BL(this)}}const Wo="__TSR_index",Vk="popstate",Gk="beforeunload";function JV(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:l}))},a=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},i=async({task:l,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){l();return}const m=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const g of m){const x=uv(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:x,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,u,d)=>{const f=t.state[Wo];u=Yk(f+1,u),i({task:()=>{e.pushState(l,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:u})},replace:(l,u,d)=>{const f=t.state[Wo];u=Yk(f,u),i({task:()=>{e.replaceState(l,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:u})},go:(l,u)=>{i({task:()=>{e.go(l),a({type:"GO",index:l})},navigateOpts:u,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Wo]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Yk(e,t){t||(t={});const n=yO();return{...t,key:n,__TSR_key:n,[Wo]:e}}function eG(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,l=P=>a=P,u=(P=>P),d=(()=>uv(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=yO();t.history.replaceState({[Wo]:0,key:P,__TSR_key:P},"")}let f=d(),m,p=!1,g=!1,x=!1,j=!1;const b=()=>f;let w,N;const O=()=>{w&&(T._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),T._ignoreSubscribers=!1,w=void 0,N=void 0,m=void 0)},C=(P,$,z)=>{const D=u($);N||(m=f),f=uv($,z),w={href:D,state:z,isPush:w?.isPush||P==="push"},N||(N=Promise.resolve().then(()=>O()))},A=P=>{f=d(),T.notify({type:P})},E=async()=>{if(g){g=!1;return}const P=d(),$=P.state[Wo]-f.state[Wo],z=$===1,D=$===-1,U=!z&&!D||p;p=!1;const V=U?"GO":D?"BACK":"FORWARD",H=U?{type:"GO",index:$}:{type:D?"BACK":"FORWARD"};if(x)x=!1;else{const G=i();if(typeof document<"u"&&G.length){for(const L of G)if(await L.blockerFn({currentLocation:f,nextLocation:P,action:V})){g=!0,t.history.go(1),T.notify(H);return}}}f=d(),T.notify(H)},k=P=>{if(j){j=!1;return}let $=!1;const z=i();if(typeof document<"u"&&z.length)for(const D of z){const U=D.enableBeforeUnload??!0;if(U===!0){$=!0;break}if(typeof U=="function"&&U()===!0){$=!0;break}}if($)return P.preventDefault(),P.returnValue=""},T=JV({getLocation:b,getLength:()=>t.history.length,pushState:(P,$)=>C("push",P,$),replaceState:(P,$)=>C("replace",P,$),back:P=>(P&&(x=!0),j=!0,t.history.back()),forward:P=>{P&&(x=!0),j=!0,t.history.forward()},go:P=>{p=!0,t.history.go(P)},createHref:P=>u(P),flush:O,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Gk,k,{capture:!0}),t.removeEventListener(Vk,E)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(Gk,k,{capture:!0}),t.addEventListener(Vk,E),t.history.pushState=function(...P){const $=n.apply(t.history,P);return T._ignoreSubscribers||A("PUSH"),$},t.history.replaceState=function(...P){const $=r.apply(t.history,P);return T._ignoreSubscribers||A("REPLACE"),$},T}function uv(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=yO();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Wo]:0,key:a,__TSR_key:a}}}function yO(){return(Math.random()+1).toString(36).substring(7)}function l_(e){return e[e.length-1]}function tG(e){return typeof e=="function"}function Ys(e,t){return tG(e)?e(t):e}const nG=Object.prototype.hasOwnProperty;function ba(e,t){if(e===t)return e;const n=t,r=Zk(e)&&Zk(n);if(!r&&!(dv(e)&&dv(n)))return n;const a=r?e:Kk(e);if(!a)return n;const i=r?n:Kk(n);if(!i)return n;const l=a.length,u=i.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:i[m],g=e[p],x=n[p];if(g===x){d[p]=g,(r?m<l:nG.call(e,p))&&f++;continue}if(g===null||x===null||typeof g!="object"||typeof x!="object"){d[p]=x;continue}const j=ba(g,x);d[p]=j,j===g&&f++}return l===u&&f===l?e:d}function Kk(e){const t=[],n=Object.getOwnPropertyNames(e);for(const a of n){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}const r=Object.getOwnPropertySymbols(e);for(const a of r){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}return t}function dv(e){if(!Xk(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Xk(n)||!n.hasOwnProperty("isPrototypeOf"))}function Xk(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zk(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ks(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(!Ks(e[r],t[r],n))return!1;return!0}if(dv(e)&&dv(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Ks(e[l],t[l],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&a++;let i=0;for(const l in t)if((!r||t[l]!==void 0)&&(i++,i>a||!Ks(e[l],t[l],n)))return!1;return a===i}return!1}function Kc(e){let t,n;const r=new Promise((a,i)=>{t=a,n=i});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,t(a),e?.(a)},r.reject=a=>{r.status="rejected",n(a)},r}function Vo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}const rG=Array.from(new Map([["%","%25"],["\\","%5C"]]).values());function Qk(e,t=rG){function n(a,i,l=0){for(let u=l;u<i.length;u++){const d=i[u].toUpperCase();if(a.includes(d)){const f=a.split(d),m=[];for(const p of f)m.push(n(p,i,u+1));return m.join(d)}}try{return decodeURI(a)}catch{return a.replaceAll(/%[0-9A-F]{2}/g,u=>{try{return decodeURI(u)}catch{return u}})}}if(e===""||!/%[0-9A-Fa-f]{2}/g.test(e))return e;const r=e.replaceAll(/%[0-9a-f]{2}/g,a=>a.toUpperCase());return n(r,t)}var aG="Invariant failed";function cr(e,t){if(!e)throw new Error(aG)}const ci=0,al=1,Xc=2,Zc=3;function Xi(e){return xO(e.filter(t=>t!==void 0).join("/"))}function xO(e){return e.replace(/\/{2,}/g,"/")}function bO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Go(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Xp(e){return Go(bO(e))}function fv(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function iG(e,t,n){return fv(e,n)===fv(t,n)}function oG(e){const{type:t,value:n}=e;if(t===ci)return n;const{prefixSegment:r,suffixSegment:a}=e;if(t===al){const i=n.substring(1);if(r&&a)return`${r}{$${i}}${a}`;if(r)return`${r}{$${i}}`;if(a)return`{$${i}}${a}`}if(t===Zc){const i=n.substring(1);return r&&a?`${r}{-$${i}}${a}`:r?`${r}{-$${i}}`:a?`{-$${i}}${a}`:`{-$${i}}`}if(t===Xc){if(r&&a)return`${r}{$}${a}`;if(r)return`${r}{$}`;if(a)return`{$}${a}`}return n}function sG({base:e,to:t,trailingSlash:n="never",parseCache:r}){let a=Qc(e,r).slice();const i=Qc(t,r);a.length>1&&l_(a)?.value==="/"&&a.pop();for(let d=0,f=i.length;d<f;d++){const m=i[d],p=m.value;p==="/"?d?d===f-1&&a.push(m):a=[m]:p===".."?a.pop():p==="."||a.push(m)}a.length>1&&(l_(a).value==="/"?n==="never"&&a.pop():n==="always"&&a.push({type:ci,value:"/"}));const l=a.map(oG);return Xi(l)}const Qc=(e,t)=>{if(!e)return[];const n=t?.get(e);if(n)return n;const r=hG(e);return t?.set(e,r),r},lG=/^\$.{1,}$/,cG=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,uG=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,dG=/^\$$/,fG=/^(.*?)\{\$\}(.*)$/;function hG(e){e=xO(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:ci,value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(r=>{const a=r.match(fG);if(a){const u=a[1],d=a[2];return{type:Xc,value:"$",prefixSegment:u||void 0,suffixSegment:d||void 0}}const i=r.match(uG);if(i){const u=i[1],d=i[2],f=i[3];return{type:Zc,value:d,prefixSegment:u||void 0,suffixSegment:f||void 0}}const l=r.match(cG);if(l){const u=l[1],d=l[2],f=l[3];return{type:al,value:""+d,prefixSegment:u||void 0,suffixSegment:f||void 0}}if(lG.test(r)){const u=r.substring(1);return{type:al,value:"$"+u,prefixSegment:void 0,suffixSegment:void 0}}return dG.test(r)?{type:Xc,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:ci,value:r}})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:ci,value:"/"})),t}function N0({path:e,params:t,decodeCharMap:n,parseCache:r}){const a=Qc(e,r);function i(f){const m=t[f],p=typeof m=="string";return f==="*"||f==="_splat"?p?encodeURI(m):m:p?mG(m,n):m}let l=!1;const u={},d=Xi(a.map(f=>{if(f.type===ci)return f.value;if(f.type===Xc){u._splat=t._splat,u["*"]=t._splat;const m=f.prefixSegment||"",p=f.suffixSegment||"";if(!t._splat)return l=!0,m||p?`${m}${p}`:void 0;const g=i("_splat");return`${m}${g}${p}`}if(f.type===al){const m=f.value.substring(1);!l&&!(m in t)&&(l=!0),u[m]=t[m];const p=f.prefixSegment||"",g=f.suffixSegment||"";return`${p}${i(m)??"undefined"}${g}`}if(f.type===Zc){const m=f.value.substring(1),p=f.prefixSegment||"",g=f.suffixSegment||"";return!(m in t)||t[m]==null?p||g?`${p}${g}`:void 0:(u[m]=t[m],`${p}${i(m)??""}${g}`)}return f.value}));return{usedParams:u,interpolatedPath:d,isMissingParams:l}}function mG(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function c_(e,t,n){const r=pG(e,t,n);if(!(t.to&&!r))return r??{}}function pG(e,{to:t,fuzzy:n,caseSensitive:r},a){const i=t,l=Qc(e.startsWith("/")?e:`/${e}`,a),u=Qc(i.startsWith("/")?i:`/${i}`,a),d={};return vG(l,u,d,n,r)?d:void 0}function vG(e,t,n,r,a){let i=0,l=0;for(;i<e.length||l<t.length;){const u=e[i],d=t[l];if(d){if(d.type===Xc){const f=e.slice(i);let m;if(d.prefixSegment||d.suffixSegment){if(!u)return!1;const p=d.prefixSegment||"",g=d.suffixSegment||"",x=u.value;if("prefixSegment"in d&&!x.startsWith(p)||"suffixSegment"in d&&!e[e.length-1]?.value.endsWith(g))return!1;let j=decodeURI(Xi(f.map(b=>b.value)));p&&j.startsWith(p)&&(j=j.slice(p.length)),g&&j.endsWith(g)&&(j=j.slice(0,j.length-g.length)),m=j}else m=decodeURI(Xi(f.map(p=>p.value)));return n["*"]=m,n._splat=m,!0}if(d.type===ci){if(d.value==="/"&&!u?.value){l++;continue}if(u){if(a){if(d.value!==u.value)return!1}else if(d.value.toLowerCase()!==u.value.toLowerCase())return!1;i++,l++;continue}else return!1}if(d.type===al){if(!u||u.value==="/")return!1;let f="",m=!1;if(d.prefixSegment||d.suffixSegment){const p=d.prefixSegment||"",g=d.suffixSegment||"",x=u.value;if(p&&!x.startsWith(p)||g&&!x.endsWith(g))return!1;let j=x;p&&j.startsWith(p)&&(j=j.slice(p.length)),g&&j.endsWith(g)&&(j=j.slice(0,j.length-g.length)),f=decodeURIComponent(j),m=!0}else f=decodeURIComponent(u.value),m=!0;m&&(n[d.value.substring(1)]=f,i++),l++;continue}if(d.type===Zc){if(!u){l++;continue}if(u.value==="/"){l++;continue}let f="",m=!1;if(d.prefixSegment||d.suffixSegment){const p=d.prefixSegment||"",g=d.suffixSegment||"",x=u.value;if((!p||x.startsWith(p))&&(!g||x.endsWith(g))){let j=x;p&&j.startsWith(p)&&(j=j.slice(p.length)),g&&j.endsWith(g)&&(j=j.slice(0,j.length-g.length)),f=decodeURIComponent(j),m=!0}}else{let p=!0;for(let g=l+1;g<t.length;g++){const x=t[g];if(x?.type===ci&&x.value===u.value){p=!1;break}if(x?.type===al||x?.type===Xc){e.length<t.length&&(p=!1);break}}p&&(f=decodeURIComponent(u.value),m=!0)}m&&(n[d.value.substring(1)]=f,i++),l++;continue}}if(i<e.length&&l>=t.length)return n["**"]=Xi(e.slice(i).map(f=>f.value)),!!r&&t[t.length-1]?.value!=="/";if(l<t.length&&i>=e.length){for(let f=l;f<t.length;f++)if(t[f]?.type!==Zc)return!1;break}break}return!0}const gG=.75,yG=1,xG=.5,bG=.4,wG=.25,jG=.2,SG=.05,_G=.02,NG=.01,Jk=2e-4,eP=1e-4;function tP(e,t){return e.prefixSegment&&e.suffixSegment?t+SG+Jk*e.prefixSegment.length+eP*e.suffixSegment.length:e.prefixSegment?t+_G+Jk*e.prefixSegment.length:e.suffixSegment?t+NG+eP*e.suffixSegment.length:t}function OG(e){const t=[];return e.forEach((r,a)=>{if(r.isRoot||!r.path)return;const i=bO(r.fullPath);let l=Qc(i),u=0;for(;l.length>u+1&&l[u]?.value==="/";)u++;u>0&&(l=l.slice(u));let d=0,f=!1;const m=l.map((p,g)=>{if(p.value==="/")return gG;if(p.type===ci)return yG;let x;p.type===al?x=xG:p.type===Zc?(x=bG,d++):x=wG;for(let j=g+1;j<l.length;j++){const b=l[j];if(b.type===ci&&b.value!=="/")return f=!0,tP(p,x+jG)}return tP(p,x)});t.push({child:r,trimmed:i,parsed:l,index:a,scores:m,optionalParamCount:d,hasStaticAfter:f})}),t.sort((r,a)=>{const i=Math.min(r.scores.length,a.scores.length);for(let l=0;l<i;l++)if(r.scores[l]!==a.scores[l])return a.scores[l]-r.scores[l];if(r.scores.length!==a.scores.length){if(r.optionalParamCount!==a.optionalParamCount){if(r.hasStaticAfter===a.hasStaticAfter)return r.optionalParamCount-a.optionalParamCount;if(r.hasStaticAfter&&!a.hasStaticAfter)return-1;if(!r.hasStaticAfter&&a.hasStaticAfter)return 1}return a.scores.length-r.scores.length}for(let l=0;l<i;l++)if(r.parsed[l].value!==a.parsed[l].value)return r.parsed[l].value>a.parsed[l].value?1:-1;return r.index-a.index}).map((r,a)=>(r.child.rank=a,r.child))}function CG({routeTree:e,initRoute:t}){const n={},r={},a=l=>{l.forEach((u,d)=>{t?.(u,d);const f=n[u.id];if(cr(!f,`Duplicate routes found with id: ${String(u.id)}`),n[u.id]=u,!u.isRoot&&u.path){const p=Go(u.fullPath);(!r[p]||u.fullPath.endsWith("/"))&&(r[p]=u)}const m=u.children;m?.length&&a(m)})};a([e]);const i=OG(Object.values(n));return{routesById:n,routesByPath:r,flatRoutes:i}}function qa(e){return!!e?.isNotFound}function EG(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const hv="tsr-scroll-restoration-v1_3",AG=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function TG(){const e=EG();if(!e)return null;const t=e.getItem(hv);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ys(r,n)||n,e.setItem(hv,JSON.stringify(n)))}}const xp=TG(),u_=e=>e.state.__TSR_key||e.href;function kG(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let mv=!1;function zL({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=l[u];mv=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const p in d){const g=d[p];if(p==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(p){const x=document.querySelector(p);x&&(x.scrollLeft=g.scrollX,x.scrollTop=g.scrollY)}}break e}const f=(i??window.location).hash.split("#",2)[1];if(f){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const g=document.getElementById(f);g&&g.scrollIntoView(p)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),a)for(const p of a){if(p==="window")continue;const g=typeof p=="function"?p():document.querySelector(p);g&&g.scrollTo(m)}}mv=!1}function PG(e,t){if(!xp&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!xp))return;e.isScrollRestorationSetup=!0,mv=!1;const r=e.options.getScrollRestorationKey||u_;window.history.scrollRestoration="manual";const a=i=>{if(mv||!e.isScrollRestoring)return;let l="";if(i.target===document||i.target===window)l="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=kG(i.target)}const u=r(e.state.location);xp.set(d=>{const f=d[u]||={},m=f[l]||={};if(l==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(l){const p=document.querySelector(l);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",AG(a,100),!0),e.subscribe("onRendered",i=>{const l=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(zL({storageKey:hv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&xp.set(u=>(u[l]||={},u)))})}function MG(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function RG(e,t=String){const n=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&n.set(r,t(a))}return n.toString()}function O0(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function DG(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=O0(a):Array.isArray(i)?i.push(O0(a)):n[r]=[i,O0(a)]}return n}const $G=LG(JSON.parse),IG=BG(JSON.stringify,JSON.parse);function LG(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=DG(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function BG(e,t){const n=typeof t=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(n&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const i=RG(a,r);return i?`?${i}`:""}}const Xr="__root__";function qL(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ai(e){return e instanceof Response&&!!e.options}function zG(e){const t=new Map;let n,r;const a=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const l=t.get(i);if(l)return a(l),l.value},set(i,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const u=t.get(i);if(u)u.value=l,a(u);else{const d={key:i,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(i,d)}}}}const Zp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Mg=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),FL=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),cr(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);cr(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,FL(e,t))},Fo=(e,t,n)=>{if(!(!ai(n)&&!qa(n))){if(ai(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ai(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),qa(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ai(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(FL(e,n),n)}},UL=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Ud=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Fo(e,e.router.getMatch(a),n);try{l.options.onError?.(n)}catch(u){n=u,Fo(e,e.router.getMatch(a),n)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},qG=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,l=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Xr;return}if(l?.ssr===!1){a.ssr=!1;return}const u=x=>x===!0&&l?.ssr==="data-only"?"data-only":x,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){a.ssr=u(d);return}if(typeof r.options.ssr!="function"){a.ssr=u(r.options.ssr);return}const{search:f,params:m}=a,p={search:bp(f,a.searchError),params:bp(m,a.paramsError),location:e.location,matches:e.matches.map(x=>({index:x.index,pathname:x.pathname,fullPath:x.fullPath,staticData:x.staticData,id:x.id,routeId:x.routeId,search:bp(x.search,x.searchError),params:bp(x.params,x.paramsError),ssr:x.ssr}))},g=r.options.ssr(p);if(Vo(g))return g.then(x=>{a.ssr=u(x??d)});a.ssr=u(g??d)},HL=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Mg(e,t)&&(n.options.loader||n.options.beforeLoad||GL(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Zp(e)},a);r._nonReactive.pendingTimeout=l}},FG=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;HL(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Fo(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},UG=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=Kc(()=>{i?.resolve()});const{paramsError:l,searchError:u}=a;l&&Ud(e,n,l,"PARSE_PARAMS"),u&&Ud(e,n,u,"VALIDATE_SEARCH"),HL(e,t,r,a);const d=new AbortController,f=e.matches[n-1]?.id,g={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...a.__routeContext};let x=!1;const j=()=>{x||(x=!0,e.updateMatch(t,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:d,context:g})))},b=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!r.options.beforeLoad){vf(()=>{j(),b()});return}a._nonReactive.beforeLoadPromise=Kc();const{search:w,params:N,cause:O}=a,C=Mg(e,t),A={search:w,abortController:d,params:N,preload:C,context:g,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":O,matches:e.matches,...e.router.options.additionalContext},E=T=>{if(T===void 0){vf(()=>{j(),b()});return}(ai(T)||qa(T))&&(j(),Ud(e,n,T,"BEFORE_LOAD")),vf(()=>{j(),e.updateMatch(t,P=>({...P,__beforeLoadContext:T,context:{...P.context,...T}})),b()})};let k;try{if(k=r.options.beforeLoad(A),Vo(k))return j(),k.catch(T=>{Ud(e,n,T,"BEFORE_LOAD")}).then(E)}catch(T){j(),Ud(e,n,T,"BEFORE_LOAD")}E(k)},HG=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=qG(e,n,t,a);if(Vo(d))return d.then(u)}return u()},l=()=>UG(e,n,t,a),u=()=>{if(UL(e,n))return;const d=FG(e,n,a);return Vo(d)?d.then(l):l()};return i()},gf=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([i,l,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:l,styles:p}})},WL=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:l,abortController:u,cause:d}=e.router.getMatch(t);let f=e.router.options.context??{};for(let p=0;p<=n;p++){const g=e.matches[p];if(!g)continue;const x=e.router.getMatch(g.id);x&&(f={...f,...x.__routeContext??{},...x.__beforeLoadContext??{}})}const m=Mg(e,t);return{params:i,deps:l,preload:!!m,parentMatchPromise:a,abortController:u,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:m?"preload":d,route:r,...e.router.options.additionalContext}},nP=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&VL(r);const i=r.options.loader?.(WL(e,t,n,r)),l=r.options.loader&&Vo(i);if(!!(l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),r.options.loader){const p=l?await i:i;Fo(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=gf(e,t,r),f=d?await d:void 0,m=a._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(i){let l=i;const u=a._nonReactive.minPendingPromise;u&&await u,qa(i)&&await r.options.notFoundComponent?.preload?.(),Fo(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){l=m,Fo(e,e.router.getMatch(t),m)}const d=gf(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:l,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const l=gf(e,t,r);if(l){const u=await l;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}Fo(e,i,a)}},WG=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const l=e.router.looseRoutesById[r];if(UL(e,n)){if(e.router.isServer){const f=gf(e,n,l);if(f){const m=await f;e.updateMatch(n,p=>({...p,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&Fo(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Mg(e,n),g=p?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,x=l.options.shouldReload,j=typeof x=="function"?x(WL(e,n,t,l)):x,b=!!p&&!e.router.state.matches.some(C=>C.id===n),w=e.router.getMatch(n);w._nonReactive.loaderPromise=Kc(),b!==w.preload&&e.updateMatch(n,C=>({...C,preload:b}));const{status:N,invalid:O}=w;if(a=N==="success"&&(O||(j??m>g)),!(p&&l.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await nP(e,n,t,l);const C=e.router.getMatch(n);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0}catch(C){ai(C)&&await e.router.navigate(C.options)}})();else if(N!=="success"||a&&e.sync)await nP(e,n,t,l);else{const C=gf(e,n,l);if(C){const A=await C;e.updateMatch(n,E=>({...E,...A}))}}}}const u=e.router.getMatch(n);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):u};async function rP(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Zp(t);try{for(let a=0;a<t.matches.length;a++){const i=HG(t,a);Vo(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(WG(t,a));await Promise.all(t.matchPromises);const r=Zp(t);Vo(r)&&await r}catch(n){if(qa(n)&&!t.preload){const r=Zp(t);throw Vo(r)&&await r,n}if(ai(n))throw n}return t.matches}async function VL(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of YL){const a=e.options[r]?.preload;a&&n.push(a())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function bp(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function GL(e){for(const t of YL)if(e.options[t]?.preload)return!0;return!1}const YL=["component","errorComponent","pendingComponent","notFoundComponent"];function VG(e){return{input:({url:t})=>{for(const n of e)t=KL(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=XL(e[n],t);return t}}}function GG(e){const t=Xp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const u=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return u===a?l.pathname="/":u.startsWith(i)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Xi(["/",t,l.pathname]),l)}}function KL(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function XL(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Xs(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:i}}class YG{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,a=this.basepath??r?.basepath??"/",i=this.basepath===void 0,l=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=eG())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new QV(XG(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),PG(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||l!==f){this.basepath=d;const g=[];Xp(d)!==""&&g.push(GG({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:VG(g),this.history&&this.updateLatestLocation(),u=!0}u&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,flatRoutes:a}=CG({routeTree:this.routeTree,initRoute:(l,u)=>{l.init({originalIndex:u})}});this.routesById=n,this.routesByPath=r,this.flatRoutes=a;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const a={eventType:n,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const a=({href:d,state:f})=>{const m=new URL(d,this.origin),p=KL(this.rewrite,m),g=this.options.parseSearch(p.search),x=this.options.stringifySearch(g);p.search=x;const j=p.href.replace(p.origin,""),{pathname:b,hash:w}=p;return{href:j,publicHref:d,url:p.href,pathname:Qk(b),searchStr:x,search:ba(r?.search,g),hash:w.split("#").reverse()[0]??"",state:ba(r?.state,f)}},i=a(n),{__tempLocation:l,__tempKey:u}=i.state;if(l&&(!u||u===this.tempLocationKey)){const d=a(l);return d.state.key=i.state.key,d.state.__TSR_key=i.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:i}}return i},this.resolvePathWithBase=(n,r)=>sG({base:n,to:xO(r),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(n,r,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},a):this.matchRoutesInternal(n,r),this.parsePathnameCache=zG(1e3),this.getMatchedRoutes=(n,r)=>ZG({pathname:n,routePathname:r,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(l,{_buildLocation:!0}),d=l_(u);i.from;const f=i.unsafeRelative==="path"?l.pathname:i.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},x=i.to?this.resolvePathWithBase(m,`${i.to}`):this.resolvePathWithBase(m,"."),j=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,Ys(i.params,g)),b=N0({path:x,params:j,parseCache:this.parsePathnameCache}).interpolatedPath,w=this.matchRoutes(b,void 0,{_buildLocation:!0}).map(z=>this.looseRoutesById[z.routeId]);if(Object.keys(j).length>0)for(const z of w){const D=z.options.params?.stringify??z.options.stringifyParams;D&&Object.assign(j,D(j))}const N=n.leaveParams?x:Qk(N0({path:x,params:j,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath);let O=p;if(n._includeValidateSearch&&this.options.search?.strict){const z={};w.forEach(D=>{if(D.options.validateSearch)try{Object.assign(z,d_(D.options.validateSearch,{...z,...O}))}catch{}}),O=z}O=QG({search:O,dest:i,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),O=ba(p,O);const C=this.options.stringifySearch(O),A=i.hash===!0?l.hash:i.hash?Ys(i.hash,l.hash):void 0,E=A?`#${A}`:"";let k=i.state===!0?l.state:i.state?Ys(i.state,l.state):{};k=ba(l.state,k);const T=`${N}${C}${E}`,P=new URL(T,this.origin),$=XL(this.rewrite,P);return{publicHref:$.pathname+$.search+$.hash,href:T,url:$.href,pathname:N,search:O,searchStr:C,state:k,hash:A??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},l)=>{const u=r(i);let d=l?r(l):void 0;if(!d){let f={};const m=this.options.routeMasks?.find(p=>{const g=c_(u.pathname,{to:p.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return g?(f=g,!0):!1});if(m){const{from:p,...g}=m;l={from:n.from,...g,params:f},d=r(l)}}return d&&(u.maskedLocation=d),u};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...a})=>{const i=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Ks(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},l=Go(this.latestLocation.href)===Go(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=Kc(()=>{u?.resolve()}),l&&i())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=a;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:a,viewTransition:i,ignoreBlocker:l,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=uv(u,{__TSR_index:n?p:p+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const m=this.commitLocation({...f,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=({to:n,reloadDocument:r,href:a,...i})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}return r?(a||(a=this.buildLocation({to:n,...i}).url),i.replace?window.location.replace(a):window.location.href=a,Promise.resolve()):this.buildAndCommitLocation({...i,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),a=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(Xp(a(this.latestLocation.href))!==Xp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),qL({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(a=>!n.some(i=>i.id===a.id))}))},this.load=async n=>{let r,a,i;for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Xs({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Xs({resolvedLocation:f,location:d})}),await rP({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=[],p=[],g=[];vf(()=>{this.__store.setState(x=>{const j=x.matches,b=x.pendingMatches||x.matches;return m=j.filter(w=>!b.some(N=>N.id===w.id)),p=b.filter(w=>!j.some(N=>N.id===w.id)),g=b.filter(w=>j.some(N=>N.id===w.id)),{...x,isLoading:!1,loadedAt:Date.now(),matches:b,pendingMatches:void 0,cachedMatches:[...x.cachedMatches,...m.filter(w=>w.status!=="error")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([x,j])=>{x.forEach(b=>{this.looseRoutesById[b.routeId].options[j]?.(b)})})})})}})}catch(d){ai(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):qa(d)&&(a=d),this.__store.setState(f=>({...f,statusCode:r?r.status:a?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(u=>u.status==="error")&&(l=500),l!==void 0&&this.__store.setState(u=>({...u,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,l=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Xs({resolvedLocation:l,location:i})):r.types;if(u===!1){n();return}a={update:n,types:u}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";a&&this.__store.setState(i=>({...i,[a]:i[a]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=a=>a.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(r),cachedMatches:a.cachedMatches.map(r),pendingMatches:a.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let a=r.url;this.origin&&a.startsWith(this.origin)&&(a=a.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",a)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(i=>!r(i))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const i=(r.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=VL,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),l=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);vf(()=>{a.forEach(u=>{l.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await rP({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{i.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(ai(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});qa(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(a);if(r?.pending&&this.state.status!=="pending")return!1;const u=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=c_(u.pathname,{...r,to:i.pathname},this.parsePathnameCache);return!d||n.params&&!Ks(d,n.params,{partial:!0})?!1:d&&(r?.includeSearch??!0)?Ks(u.search,i.search,{partial:!0})?d:!1:d},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??IG,parseSearch:t.parseSearch??$G}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:r,matchedRoutes:a,routeParams:i}=this.getMatchedRoutes(t.pathname,n?.dest?.to);let l=!1;(r?r.path!=="/"&&i["**"]:Go(t.pathname))&&(this.options.notFoundRoute?a.push(this.options.notFoundRoute):l=!0);const u=(()=>{if(l){if(this.options.notFoundMode!=="root")for(let m=a.length-1;m>=0;m--){const p=a[m];if(p.children)return p.id}return Xr}})(),d=[],f=m=>m?.id?m.context??this.options.context??void 0:this.options.context??void 0;return a.forEach((m,p)=>{const g=d[p-1],[x,j,b]=(()=>{const U=g?.search??t.search,V=g?._strictSearch??void 0;try{const H=d_(m.options.validateSearch,{...U})??void 0;return[{...U,...H},{...V,...H},void 0]}catch(H){let G=H;if(H instanceof pv||(G=new pv(H.message,{cause:H})),n?.throwOnError)throw G;return[U,{},G]}})(),w=m.options.loaderDeps?.({search:x})??"",N=w?JSON.stringify(w):"",{interpolatedPath:O,usedParams:C}=N0({path:m.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),A=m.id+O+N,E=this.getMatch(A),k=this.state.matches.find(U=>U.routeId===m.id),T=E?._strictParams??C;let P;if(!E){const U=m.options.params?.parse??m.options.parseParams;if(U)try{Object.assign(T,U(T))}catch(V){if(P=new KG(V.message,{cause:V}),n?.throwOnError)throw P}}Object.assign(i,T);const $=k?"stay":"enter";let z;if(E)z={...E,cause:$,params:k?ba(k.params,i):i,_strictParams:T,search:ba(k?k.search:E.search,x),_strictSearch:j};else{const U=m.options.loader||m.options.beforeLoad||m.lazyFn||GL(m)?"pending":"success";z={id:A,index:p,routeId:m.id,params:k?ba(k.params,i):i,_strictParams:T,pathname:O,updatedAt:Date.now(),search:k?ba(k.search,x):x,_strictSearch:j,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Kc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:k?ba(k.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}n?.preload||(z.globalNotFound=u===m.id),z.searchError=b;const D=f(g);z.context={...D,...z.__routeContext,...z.__beforeLoadContext},d.push(z)}),d.forEach((m,p)=>{const g=this.looseRoutesById[m.routeId];if(!this.getMatch(m.id)&&n?._buildLocation!==!0){const j=d[p-1],b=f(j);if(g.options.context){const w={deps:m.loaderDeps,params:m.params,context:b??{},location:t,navigate:N=>this.navigate({...N,_fromLocation:t}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:d};m.__routeContext=g.options.context(w)??void 0}m.context={...b,...m.__routeContext,...m.__beforeLoadContext}}}),d}}class pv extends Error{}class KG extends Error{}function XG(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function d_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new pv("Async validation not supported");if(n.issues)throw new pv(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function ZG({pathname:e,routePathname:t,caseSensitive:n,routesByPath:r,routesById:a,flatRoutes:i,parseCache:l}){let u={};const d=Go(e),f=x=>c_(d,{to:x.fullPath,caseSensitive:x.options?.caseSensitive??n,fuzzy:!0},l);let m=t!==void 0?r[t]:void 0;if(m)u=f(m);else{let x;for(const j of i){const b=f(j);if(b)if(j.path!=="/"&&b["**"])x||(x={foundRoute:j,routeParams:b});else{m=j,u=b;break}}!m&&x&&(m=x.foundRoute,u=x.routeParams)}let p=m||a[Xr];const g=[p];for(;p.parentRoute;)p=p.parentRoute,g.push(p);return g.reverse(),{matchedRoutes:g,routeParams:u,foundRoute:m}}function QG({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const a=n.reduce((u,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:p,next:g})=>{let x=p;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(x=d.options.preSearchFilters.reduce((b,w)=>w(b),p));const j=g(x);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((b,w)=>w(b),j):j};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const x=g(p);try{return{...x,...d_(d.options.validateSearch,x)??void 0}}catch{return x}};f.push(m)}return u.concat(f)},[])??[],i=({search:u})=>t.search?t.search===!0?u:Ys(t.search,u):{};a.push(i);const l=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>l(u+1,p)})};return l(0,e)}const JG="Error preloading route! ☝️";class ZL{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Xr:this.parentRoute||cr(!1);let i=a?Xr:r?.path;i&&i!=="/"&&(i=bO(i));const l=r?.id||i;let u=a?Xr:Xi([this.parentRoute.id===Xr?"":this.parentRoute.id,l]);i===Xr&&(i="/"),u!==Xr&&(u=Xi(["/",u]));const d=u===Xr?"/":Xi([this.parentRoute.fullPath,i]);this._path=i,this._id=u,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class eY extends ZL{constructor(t){super(t)}}function wO(e){const t=e.errorComponent??Rg;return o.jsx(tY,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?y.createElement(t,{error:n,reset:r}):e.children})}class tY extends y.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Rg({error:e}){const[t,n]=y.useState(!1);return o.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[o.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),o.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),o.jsx("div",{style:{height:".25rem"}}),t?o.jsx("div",{children:o.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?o.jsx("code",{children:e.message}):null})}):null]})}function nY({children:e,fallback:t=null}){return rY()?o.jsx(W.Fragment,{children:e}):o.jsx(W.Fragment,{children:t})}function rY(){return W.useSyncExternalStore(aY,()=>!0,()=>!1)}function aY(){return()=>{}}var C0={exports:{}},E0={},A0={exports:{}},T0={};var aP;function iY(){if(aP)return T0;aP=1;var e=xh();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function u(p,g){var x=g(),j=r({inst:{value:x,getSnapshot:g}}),b=j[0].inst,w=j[1];return i(function(){b.value=x,b.getSnapshot=g,d(b)&&w({inst:b})},[p,x,g]),a(function(){return d(b)&&w({inst:b}),p(function(){d(b)&&w({inst:b})})},[p]),l(x),x}function d(p){var g=p.getSnapshot;p=p.value;try{var x=g();return!n(p,x)}catch{return!0}}function f(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return T0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,T0}var iP;function oY(){return iP||(iP=1,A0.exports=iY()),A0.exports}var oP;function sY(){if(oP)return E0;oP=1;var e=xh(),t=oY();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return E0.useSyncExternalStoreWithSelector=function(f,m,p,g,x){var j=i(null);if(j.current===null){var b={hasValue:!1,value:null};j.current=b}else b=j.current;j=u(function(){function N(k){if(!O){if(O=!0,C=k,k=g(k),x!==void 0&&b.hasValue){var T=b.value;if(x(T,k))return A=T}return A=k}if(T=A,r(C,k))return T;var P=g(k);return x!==void 0&&x(T,P)?(C=k,T):(C=k,A=P)}var O=!1,C,A,E=p===void 0?null:p;return[function(){return N(m())},E===null?void 0:function(){return N(E())}]},[m,p,g,x]);var w=a(f,j[0],j[1]);return l(function(){b.hasValue=!0,b.value=w},[w]),d(w),w},E0}var sP;function lY(){return sP||(sP=1,C0.exports=sY()),C0.exports}var cY=lY();function uY(e,t=r=>r,n={}){const r=n.equal??dY;return cY.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function dY(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!t.has(r)||!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=lP(e);if(n.length!==lP(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function lP(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const k0=y.createContext(null);function QL(){return typeof document>"u"?k0:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=k0,k0)}function $r(e){const t=y.useContext(QL());return e?.warn,t}function jr(e){const t=$r({warn:e?.router===void 0}),n=e?.router||t,r=y.useRef(void 0);return uY(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=ba(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const Dg=y.createContext(void 0),fY=y.createContext(void 0);function hi(e){const t=y.useContext(e.from?fY:Dg);return jr({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(cr(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function jO(e){return hi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function SO(e){const{select:t,...n}=e;return hi({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function _O(e){return hi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function NO(e){return hi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ia(e){const t=$r();return y.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var gl=IL();const hY=St(gl),wp=typeof window<"u"?y.useLayoutEffect:y.useEffect;function P0(e){const t=y.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function mY(e,t,n={},r={}){y.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([i])=>{t(i)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function pY(e){const t=y.useRef(null);return y.useImperativeHandle(e,()=>t.current,[]),t}function vY(e,t){const n=$r(),[r,a]=y.useState(!1),i=y.useRef(!1),l=pY(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:x,replace:j,startTransition:b,resetScroll:w,viewTransition:N,children:O,target:C,disabled:A,style:E,className:k,onClick:T,onFocus:P,onMouseEnter:$,onMouseLeave:z,onTouchStart:D,ignoreBlocker:U,params:V,search:H,hash:G,state:L,mask:R,reloadDocument:F,unsafeRelative:K,from:te,_fromLocation:I,...B}=e,Y=jr({select:lt=>lt.location.search,structuralSharing:!0}),ne=e.from,oe=y.useMemo(()=>({...e,from:ne}),[n,Y,ne,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),xe=y.useMemo(()=>n.buildLocation({...oe}),[n,oe]),ee=y.useMemo(()=>{if(A)return;let lt=xe.maskedLocation?xe.maskedLocation.url:xe.url,rt=!1;return n.origin&&(lt.startsWith(n.origin)?lt=n.history.createHref(lt.replace(n.origin,""))||"/":rt=!0),{href:lt,external:rt}},[A,xe.maskedLocation,xe.url,n.origin,n.history]),ae=y.useMemo(()=>{if(ee?.external)return ee.href;try{return new URL(m),m}catch{}},[m,ee]),Z=e.reloadDocument||ae?!1:p??n.options.defaultPreload,pe=g??n.options.defaultPreloadDelay??0,je=jr({select:lt=>{if(ae)return!1;if(f?.exact){if(!iG(lt.location.pathname,xe.pathname,n.basepath))return!1}else{const rt=fv(lt.location.pathname,n.basepath),Dn=fv(xe.pathname,n.basepath);if(!(rt.startsWith(Dn)&&(rt.length===Dn.length||rt[Dn.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ks(lt.location.search,xe.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?lt.location.hash===xe.hash:!0}}),le=y.useCallback(()=>{n.preloadRoute({...oe}).catch(lt=>{console.warn(lt),console.warn(JG)})},[n,oe]),Re=y.useCallback(lt=>{lt?.isIntersecting&&le()},[le]);mY(l,Re,wY,{disabled:!!A||Z!=="viewport"}),y.useEffect(()=>{i.current||!A&&Z==="render"&&(le(),i.current=!0)},[A,le,Z]);const _e=lt=>{const rt=lt.currentTarget.getAttribute("target"),Dn=C!==void 0?C:rt;if(!A&&!jY(lt)&&!lt.defaultPrevented&&(!Dn||Dn==="_self")&<.button===0){lt.preventDefault(),gl.flushSync(()=>{a(!0)});const hs=n.subscribe("onResolved",()=>{hs(),a(!1)});n.navigate({...oe,replace:j,resetScroll:w,hashScrollIntoView:x,startTransition:b,viewTransition:N,ignoreBlocker:U})}};if(ae)return{...B,ref:l,href:ae,...O&&{children:O},...C&&{target:C},...A&&{disabled:A},...E&&{style:E},...k&&{className:k},...T&&{onClick:T},...P&&{onFocus:P},...$&&{onMouseEnter:$},...z&&{onMouseLeave:z},...D&&{onTouchStart:D}};const me=lt=>{A||Z&&le()},ve=me,Le=lt=>{if(!(A||!Z))if(!pe)le();else{const rt=lt.target;if(Hd.has(rt))return;const Dn=setTimeout(()=>{Hd.delete(rt),le()},pe);Hd.set(rt,Dn)}},Dt=lt=>{if(A||!Z||!pe)return;const rt=lt.target,Dn=Hd.get(rt);Dn&&(clearTimeout(Dn),Hd.delete(rt))},Nn=je?Ys(u,{})??gY:M0,pr=je?M0:Ys(d,{})??M0,nr=[k,Nn.className,pr.className].filter(Boolean).join(" "),vr=(E||Nn.style||pr.style)&&{...E,...Nn.style,...pr.style};return{...B,...Nn,...pr,href:ee?.href,ref:l,onClick:Wd([T,_e]),onFocus:Wd([P,me]),onMouseEnter:Wd([$,Le]),onMouseLeave:Wd([z,Dt]),onTouchStart:Wd([D,ve]),disabled:!!A,target:C,...vr&&{style:vr},...nr&&{className:nr},...A&&yY,...je&&xY,...r&&bY}}const M0={},gY={className:"active"},yY={role:"link","aria-disabled":!0},xY={"data-status":"active","aria-current":"page"},bY={"data-transitioning":"transitioning"},Hd=new WeakMap,wY={rootMargin:"100px"},Wd=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},OO=y.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...l}=vY(r,t),u=typeof r.children=="function"?r.children({isActive:l["data-status"]==="active"}):r.children;return n===void 0&&delete l.disabled,y.createElement(n||"a",{...l,ref:i},u)});function jY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class SY extends ZL{constructor(t){super(t),this.useMatch=n=>hi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>hi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>NO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>_O({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>SO({...n,from:this.id}),this.useLoaderData=n=>jO({...n,from:this.id}),this.useNavigate=()=>ia({from:this.fullPath}),this.Link=W.forwardRef((n,r)=>o.jsx(OO,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function dr(e){return new SY(e)}class _Y extends eY{constructor(t){super(t),this.useMatch=n=>hi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>hi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>NO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>_O({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>SO({...n,from:this.id}),this.useLoaderData=n=>jO({...n,from:this.id}),this.useNavigate=()=>ia({from:this.fullPath}),this.Link=W.forwardRef((n,r)=>o.jsx(OO,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function NY(e){return new _Y(e)}function cP(e){return typeof e=="object"?new uP(e,{silent:!0}).createRoute(e):new uP(e,{silent:!0}).createRoute}class uP{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=dr(r);return a.isRoot=!1,a},this.silent=n?.silent}}class dP{constructor(t){this.useMatch=n=>hi({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>hi({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>NO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>_O({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>SO({...n,from:this.options.id}),this.useLoaderData=n=>jO({...n,from:this.options.id}),this.useNavigate=()=>{const n=$r();return ia({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function fP(e){return typeof e=="object"?new dP(e):t=>new dP({id:e,...t})}function OY(){const e=$r(),t=y.useRef({router:e,mounted:!1}),[n,r]=y.useState(!1),{hasPendingMatches:a,isLoading:i}=jr({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),l=P0(i),u=i||n||a,d=P0(u),f=i||a,m=P0(f);return e.startTransition=p=>{r(!0),y.startTransition(()=>{p(),r(!1)})},y.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Go(e.latestLocation.href)!==Go(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),wp(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),wp(()=>{l&&!i&&e.emit({type:"onLoad",...Xs(e.state)})},[l,e,i]),wp(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Xs(e.state)})},[f,m,e]),wp(()=>{d&&!u&&(e.emit({type:"onResolved",...Xs(e.state)}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),MG(e))},[u,d,e]),null}function CY(e){const t=jr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return o.jsx(wO,{getResetKey:()=>t,onCatch:(n,r)=>{if(qa(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(qa(n))return e.fallback?.(n);throw n},children:e.children})}function EY(){return o.jsx("p",{children:"Not Found"})}function Ec(e){return o.jsx(o.Fragment,{children:e.children})}function JL(e,t,n){return t.options.notFoundComponent?o.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?o.jsx(e.options.defaultNotFoundComponent,{data:n}):o.jsx(EY,{})}function AY({children:e}){const t=$r();return t.isServer?o.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[e].filter(Boolean).join(`
|
||
`)+";$_TSR.c()"}}):null}function TY(){const e=$r();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||u_)(e.latestLocation),r=n!==u_(e.latestLocation)?n:void 0,a={storageKey:hv,shouldScrollRestoration:!0};return r&&(a.key=r),o.jsx(AY,{children:`(${zL.toString()})(${JSON.stringify(a)})`})}const e5=y.memo(function({matchId:t}){const n=$r(),r=jr({select:N=>{const O=N.matches.find(C=>C.id===t);return cr(O),{routeId:O.routeId,ssr:O.ssr,_displayPending:O._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,l=i?o.jsx(i,{}):null,u=a.options.errorComponent??n.options.defaultErrorComponent,d=a.options.onCatch??n.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??n.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??i??(a.options.errorComponent?.preload||m))?y.Suspense:Ec,g=u?wO:Ec,x=f?CY:Ec,j=jr({select:N=>N.loadedAt}),b=jr({select:N=>{const O=N.matches.findIndex(C=>C.id===t);return N.matches[O-1]?.routeId}}),w=a.isRoot?a.options.shellComponent??Ec:Ec;return o.jsxs(w,{children:[o.jsx(Dg.Provider,{value:t,children:o.jsx(p,{fallback:l,children:o.jsx(g,{getResetKey:()=>j,errorComponent:u||Rg,onCatch:(N,O)=>{if(qa(N))throw N;d?.(N,O)},children:o.jsx(x,{fallback:N=>{if(!f||N.routeId&&N.routeId!==r.routeId||!N.routeId&&!a.isRoot)throw N;return y.createElement(f,N)},children:m||r._displayPending?o.jsx(nY,{fallback:l,children:o.jsx(hP,{matchId:t})}):o.jsx(hP,{matchId:t})})})})}),b===Xr&&n.options.scrollRestoration?o.jsxs(o.Fragment,{children:[o.jsx(kY,{}),o.jsx(TY,{})]}):null]})});function kY(){const e=$r(),t=y.useRef(void 0);return o.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Xs(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const hP=y.memo(function({matchId:t}){const n=$r(),{match:r,key:a,routeId:i}=jr({select:d=>{const f=d.matches.find(j=>j.id===t),m=f.routeId,g=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),l=n.routesById[i],u=y.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?o.jsx(d,{},a):o.jsx(CO,{})},[a,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=Kc();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return cr(qa(r.error)),JL(n,l,r.error);if(r.status==="redirected")throw cr(ai(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(l.options.errorComponent??n.options.defaultErrorComponent)||Rg;return o.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),CO=y.memo(function(){const t=$r(),n=y.useContext(Dg),r=jr({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=jr({select:f=>{const p=f.matches.find(g=>g.id===n);return cr(p),p.globalNotFound}}),l=jr({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?o.jsx(t.options.defaultPendingComponent,{}):null;if(i)return JL(t,a,void 0);if(!l)return null;const d=o.jsx(e5,{matchId:l});return r===Xr?o.jsx(y.Suspense,{fallback:u,children:d}):d});function PY(){const e=$r(),n=e.routesById[Xr].options.pendingComponent??e.options.defaultPendingComponent,r=n?o.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?Ec:y.Suspense,i=o.jsxs(a,{fallback:r,children:[!e.isServer&&o.jsx(OY,{}),o.jsx(MY,{})]});return e.options.InnerWrap?o.jsx(e.options.InnerWrap,{children:i}):i}function MY(){const e=$r(),t=jr({select:a=>a.matches[0]?.id}),n=jr({select:a=>a.loadedAt}),r=t?o.jsx(e5,{matchId:t}):null;return o.jsx(Dg.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:o.jsx(wO,{getResetKey:()=>n,errorComponent:Rg,onCatch:a=>{a.message||a.toString()},children:r})})}function RY(){const e=$r();return jr({select:t=>[t.location.href,t.resolvedLocation?.href,t.status],structuralSharing:!0}),y.useCallback(t=>{const{pending:n,caseSensitive:r,fuzzy:a,includeSearch:i,...l}=t;return e.matchRoute(l,{pending:n,caseSensitive:r,fuzzy:a,includeSearch:i})},[e])}const DY=e=>new $Y(e);class $Y extends YG{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=cP,globalThis.createLazyFileRoute=fP):typeof window<"u"&&(window.createFileRoute=cP,window.createLazyFileRoute=fP);function IY({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=QL(),a=o.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?o.jsx(e.options.Wrap,{children:a}):a}function LY({router:e,...t}){return o.jsx(IY,{router:e,...t,children:o.jsx(PY,{})})}function t5(e,t){return function(){return e.apply(t,arguments)}}const{toString:BY}=Object.prototype,{getPrototypeOf:EO}=Object,{iterator:$g,toStringTag:n5}=Symbol,Ig=(e=>t=>{const n=BY.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ha=e=>(e=e.toLowerCase(),t=>Ig(t)===e),Lg=e=>t=>typeof t===e,{isArray:Pu}=Array,Jc=Lg("undefined");function bh(e){return e!==null&&!Jc(e)&&e.constructor!==null&&!Jc(e.constructor)&&kr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const r5=Ha("ArrayBuffer");function zY(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&r5(e.buffer),t}const qY=Lg("string"),kr=Lg("function"),a5=Lg("number"),wh=e=>e!==null&&typeof e=="object",FY=e=>e===!0||e===!1,Qp=e=>{if(Ig(e)!=="object")return!1;const t=EO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(n5 in e)&&!($g in e)},UY=e=>{if(!wh(e)||bh(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},HY=Ha("Date"),WY=Ha("File"),VY=Ha("Blob"),GY=Ha("FileList"),YY=e=>wh(e)&&kr(e.pipe),KY=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||kr(e.append)&&((t=Ig(e))==="formdata"||t==="object"&&kr(e.toString)&&e.toString()==="[object FormData]"))},XY=Ha("URLSearchParams"),[ZY,QY,JY,eK]=["ReadableStream","Request","Response","Headers"].map(Ha),tK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jh(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Pu(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(bh(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),l=i.length;let u;for(r=0;r<l;r++)u=i[r],t.call(null,e[u],u,e)}}function i5(e,t){if(bh(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 Fs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,o5=e=>!Jc(e)&&e!==Fs;function f_(){const{caseless:e,skipUndefined:t}=o5(this)&&this||{},n={},r=(a,i)=>{const l=e&&i5(n,i)||i;Qp(n[l])&&Qp(a)?n[l]=f_(n[l],a):Qp(a)?n[l]=f_({},a):Pu(a)?n[l]=a.slice():(!t||!Jc(a))&&(n[l]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&jh(arguments[a],r);return n}const nK=(e,t,n,{allOwnKeys:r}={})=>(jh(t,(a,i)=>{n&&kr(a)?e[i]=t5(a,n):e[i]=a},{allOwnKeys:r}),e),rK=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),aK=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},iK=(e,t,n,r)=>{let a,i,l;const u={};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))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&EO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},oK=(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},sK=e=>{if(!e)return null;if(Pu(e))return e;let t=e.length;if(!a5(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},lK=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&EO(Uint8Array)),cK=(e,t)=>{const r=(e&&e[$g]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},uK=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},dK=Ha("HTMLFormElement"),fK=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),mP=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hK=Ha("RegExp"),s5=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jh(n,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(r[i]=l||a)}),Object.defineProperties(e,r)},mK=e=>{s5(e,(t,n)=>{if(kr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(kr(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+"'")})}})},pK=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return Pu(e)?r(e):r(String(e).split(t)),n},vK=()=>{},gK=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yK(e){return!!(e&&kr(e.append)&&e[n5]==="FormData"&&e[$g])}const xK=e=>{const t=new Array(10),n=(r,a)=>{if(wh(r)){if(t.indexOf(r)>=0)return;if(bh(r))return r;if(!("toJSON"in r)){t[a]=r;const i=Pu(r)?[]:{};return jh(r,(l,u)=>{const d=n(l,a+1);!Jc(d)&&(i[u]=d)}),t[a]=void 0,i}}return r};return n(e,0)},bK=Ha("AsyncFunction"),wK=e=>e&&(wh(e)||kr(e))&&kr(e.then)&&kr(e.catch),l5=((e,t)=>e?setImmediate:t?((n,r)=>(Fs.addEventListener("message",({source:a,data:i})=>{a===Fs&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Fs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",kr(Fs.postMessage)),jK=typeof queueMicrotask<"u"?queueMicrotask.bind(Fs):typeof process<"u"&&process.nextTick||l5,SK=e=>e!=null&&kr(e[$g]),de={isArray:Pu,isArrayBuffer:r5,isBuffer:bh,isFormData:KY,isArrayBufferView:zY,isString:qY,isNumber:a5,isBoolean:FY,isObject:wh,isPlainObject:Qp,isEmptyObject:UY,isReadableStream:ZY,isRequest:QY,isResponse:JY,isHeaders:eK,isUndefined:Jc,isDate:HY,isFile:WY,isBlob:VY,isRegExp:hK,isFunction:kr,isStream:YY,isURLSearchParams:XY,isTypedArray:lK,isFileList:GY,forEach:jh,merge:f_,extend:nK,trim:tK,stripBOM:rK,inherits:aK,toFlatObject:iK,kindOf:Ig,kindOfTest:Ha,endsWith:oK,toArray:sK,forEachEntry:cK,matchAll:uK,isHTMLForm:dK,hasOwnProperty:mP,hasOwnProp:mP,reduceDescriptors:s5,freezeMethods:mK,toObjectSet:pK,toCamelCase:fK,noop:vK,toFiniteNumber:gK,findKey:i5,global:Fs,isContextDefined:o5,isSpecCompliantForm:yK,toJSONObject:xK,isAsyncFn:bK,isThenable:wK,setImmediate:l5,asap:jK,isIterable:SK};function Xe(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}de.inherits(Xe,Error,{toJSON:function(){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:de.toJSONObject(this.config),code:this.code,status:this.status}}});const c5=Xe.prototype,u5={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{u5[e]={value:e}});Object.defineProperties(Xe,u5);Object.defineProperty(c5,"isAxiosError",{value:!0});Xe.from=(e,t,n,r,a,i)=>{const l=Object.create(c5);de.toFlatObject(e,l,function(m){return m!==Error.prototype},f=>f!=="isAxiosError");const u=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return Xe.call(l,u,d,n,r,a),e&&l.cause==null&&Object.defineProperty(l,"cause",{value:e,configurable:!0}),l.name=e&&e.name||"Error",i&&Object.assign(l,i),l};const _K=null;function h_(e){return de.isPlainObject(e)||de.isArray(e)}function d5(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function pP(e,t,n){return e?e.concat(t).map(function(a,i){return a=d5(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function NK(e){return de.isArray(e)&&!e.some(h_)}const OK=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function Bg(e,t,n){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=de.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,w){return!de.isUndefined(w[b])});const r=n.metaTokens,a=n.visitor||m,i=n.dots,l=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(a))throw new TypeError("visitor must be a function");function f(j){if(j===null)return"";if(de.isDate(j))return j.toISOString();if(de.isBoolean(j))return j.toString();if(!d&&de.isBlob(j))throw new Xe("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(j)||de.isTypedArray(j)?d&&typeof Blob=="function"?new Blob([j]):Buffer.from(j):j}function m(j,b,w){let N=j;if(j&&!w&&typeof j=="object"){if(de.endsWith(b,"{}"))b=r?b:b.slice(0,-2),j=JSON.stringify(j);else if(de.isArray(j)&&NK(j)||(de.isFileList(j)||de.endsWith(b,"[]"))&&(N=de.toArray(j)))return b=d5(b),N.forEach(function(C,A){!(de.isUndefined(C)||C===null)&&t.append(l===!0?pP([b],A,i):l===null?b:b+"[]",f(C))}),!1}return h_(j)?!0:(t.append(pP(w,b,i),f(j)),!1)}const p=[],g=Object.assign(OK,{defaultVisitor:m,convertValue:f,isVisitable:h_});function x(j,b){if(!de.isUndefined(j)){if(p.indexOf(j)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(j),de.forEach(j,function(N,O){(!(de.isUndefined(N)||N===null)&&a.call(t,N,de.isString(O)?O.trim():O,b,g))===!0&&x(N,b?b.concat(O):[O])}),p.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return x(e),t}function vP(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function AO(e,t){this._pairs=[],e&&Bg(e,this,t)}const f5=AO.prototype;f5.append=function(t,n){this._pairs.push([t,n])};f5.toString=function(t){const n=t?function(r){return t.call(this,r,vP)}:vP;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function CK(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function h5(e,t,n){if(!t)return e;const r=n&&n.encode||CK;de.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let i;if(a?i=a(t,n):i=de.isURLSearchParams(t)?t.toString():new AO(t,n).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class gP{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){de.forEach(this.handlers,function(r){r!==null&&t(r)})}}const m5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},EK=typeof URLSearchParams<"u"?URLSearchParams:AO,AK=typeof FormData<"u"?FormData:null,TK=typeof Blob<"u"?Blob:null,kK={isBrowser:!0,classes:{URLSearchParams:EK,FormData:AK,Blob:TK},protocols:["http","https","file","blob","url","data"]},TO=typeof window<"u"&&typeof document<"u",m_=typeof navigator=="object"&&navigator||void 0,PK=TO&&(!m_||["ReactNative","NativeScript","NS"].indexOf(m_.product)<0),MK=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",RK=TO&&window.location.href||"http://localhost",DK=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:TO,hasStandardBrowserEnv:PK,hasStandardBrowserWebWorkerEnv:MK,navigator:m_,origin:RK},Symbol.toStringTag,{value:"Module"})),lr={...DK,...kK};function $K(e,t){return Bg(e,new lr.classes.URLSearchParams,{visitor:function(n,r,a,i){return lr.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function IK(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LK(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 p5(e){function t(n,r,a,i){let l=n[i++];if(l==="__proto__")return!0;const u=Number.isFinite(+l),d=i>=n.length;return l=!l&&de.isArray(a)?a.length:l,d?(de.hasOwnProp(a,l)?a[l]=[a[l],r]:a[l]=r,!u):((!a[l]||!de.isObject(a[l]))&&(a[l]=[]),t(n,r,a[l],i)&&de.isArray(a[l])&&(a[l]=LK(a[l])),!u)}if(de.isFormData(e)&&de.isFunction(e.entries)){const n={};return de.forEachEntry(e,(r,a)=>{t(IK(r),a,n,0)}),n}return null}function BK(e,t,n){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Sh={transitional:m5,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=de.isObject(t);if(i&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return a?JSON.stringify(p5(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t)||de.isReadableStream(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $K(t,this.formSerializer).toString();if((u=de.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Bg(u?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),BK(t)):t}],transformResponse:[function(t){const n=this.transitional||Sh.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(de.isResponse(t)||de.isReadableStream(t))return t;if(t&&de.isString(t)&&(r&&!this.responseType||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(u){if(l)throw u.name==="SyntaxError"?Xe.from(u,Xe.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:lr.classes.FormData,Blob:lr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],e=>{Sh.headers[e]={}});const zK=de.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"]),qK=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]&&zK[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},yP=Symbol("internals");function Vd(e){return e&&String(e).trim().toLowerCase()}function Jp(e){return e===!1||e==null?e:de.isArray(e)?e.map(Jp):String(e)}function FK(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 UK=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function R0(e,t,n,r,a){if(de.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!de.isString(t)){if(de.isString(r))return t.indexOf(r)!==-1;if(de.isRegExp(r))return r.test(t)}}function HK(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function WK(e,t){const n=de.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,i,l){return this[r].call(this,t,a,i,l)},configurable:!0})})}let Pr=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(u,d,f){const m=Vd(d);if(!m)throw new Error("header name must be a non-empty string");const p=de.findKey(a,m);(!p||a[p]===void 0||f===!0||f===void 0&&a[p]!==!1)&&(a[p||d]=Jp(u))}const l=(u,d)=>de.forEach(u,(f,m)=>i(f,m,d));if(de.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(de.isString(t)&&(t=t.trim())&&!UK(t))l(qK(t),n);else if(de.isObject(t)&&de.isIterable(t)){let u={},d,f;for(const m of t){if(!de.isArray(m))throw TypeError("Object iterator must return a key-value pair");u[f=m[0]]=(d=u[f])?de.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}l(u,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Vd(t),t){const r=de.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return FK(a);if(de.isFunction(n))return n.call(this,a,r);if(de.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vd(t),t){const r=de.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||R0(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(l){if(l=Vd(l),l){const u=de.findKey(r,l);u&&(!n||R0(r,r[u],u,n))&&(delete r[u],a=!0)}}return de.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||R0(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return de.forEach(this,(a,i)=>{const l=de.findKey(r,i);if(l){n[l]=Jp(a),delete n[i];return}const u=t?HK(i):String(i).trim();u!==i&&delete n[i],n[u]=Jp(a),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return de.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&de.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[yP]=this[yP]={accessors:{}}).accessors,a=this.prototype;function i(l){const u=Vd(l);r[u]||(WK(a,l),r[u]=!0)}return de.isArray(t)?t.forEach(i):i(t),this}};Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(Pr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});de.freezeMethods(Pr);function D0(e,t){const n=this||Sh,r=t||n,a=Pr.from(r.headers);let i=r.data;return de.forEach(e,function(u){i=u.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function v5(e){return!!(e&&e.__CANCEL__)}function Mu(e,t,n){Xe.call(this,e??"canceled",Xe.ERR_CANCELED,t,n),this.name="CanceledError"}de.inherits(Mu,Xe,{__CANCEL__:!0});function g5(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Xe("Request failed with status code "+n.status,[Xe.ERR_BAD_REQUEST,Xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function VK(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function GK(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(d){const f=Date.now(),m=r[i];l||(l=f),n[a]=d,r[a]=f;let p=i,g=0;for(;p!==a;)g+=n[p++],p=p%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),f-l<t)return;const x=m&&f-m;return x?Math.round(g*1e3/x):void 0}}function YK(e,t){let n=0,r=1e3/t,a,i;const l=(f,m=Date.now())=>{n=m,a=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const m=Date.now(),p=m-n;p>=r?l(f,m):(a=f,i||(i=setTimeout(()=>{i=null,l(a)},r-p)))},()=>a&&l(a)]}const vv=(e,t,n=3)=>{let r=0;const a=GK(50,250);return YK(i=>{const l=i.loaded,u=i.lengthComputable?i.total:void 0,d=l-r,f=a(d),m=l<=u;r=l;const p={loaded:l,total:u,progress:u?l/u:void 0,bytes:d,rate:f||void 0,estimated:f&&u&&m?(u-l)/f:void 0,event:i,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(p)},n)},xP=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},bP=e=>(...t)=>de.asap(()=>e(...t)),KK=lr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,lr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(lr.origin),lr.navigator&&/(msie|trident)/i.test(lr.navigator.userAgent)):()=>!0,XK=lr.hasStandardBrowserEnv?{write(e,t,n,r,a,i,l){if(typeof document>"u")return;const u=[`${e}=${encodeURIComponent(t)}`];de.isNumber(n)&&u.push(`expires=${new Date(n).toUTCString()}`),de.isString(r)&&u.push(`path=${r}`),de.isString(a)&&u.push(`domain=${a}`),i===!0&&u.push("secure"),de.isString(l)&&u.push(`SameSite=${l}`),document.cookie=u.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ZK(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QK(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function y5(e,t,n){let r=!ZK(t);return e&&(r||n==!1)?QK(e,t):t}const wP=e=>e instanceof Pr?{...e}:e;function il(e,t){t=t||{};const n={};function r(f,m,p,g){return de.isPlainObject(f)&&de.isPlainObject(m)?de.merge.call({caseless:g},f,m):de.isPlainObject(m)?de.merge({},m):de.isArray(m)?m.slice():m}function a(f,m,p,g){if(de.isUndefined(m)){if(!de.isUndefined(f))return r(void 0,f,p,g)}else return r(f,m,p,g)}function i(f,m){if(!de.isUndefined(m))return r(void 0,m)}function l(f,m){if(de.isUndefined(m)){if(!de.isUndefined(f))return r(void 0,f)}else return r(void 0,m)}function u(f,m,p){if(p in t)return r(f,m);if(p in e)return r(void 0,f)}const d={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,responseEncoding:l,validateStatus:u,headers:(f,m,p)=>a(wP(f),wP(m),p,!0)};return de.forEach(Object.keys({...e,...t}),function(m){const p=d[m]||a,g=p(e[m],t[m],m);de.isUndefined(g)&&p!==u||(n[m]=g)}),n}const x5=e=>{const t=il({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:i,headers:l,auth:u}=t;if(t.headers=l=Pr.from(l),t.url=h5(y5(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),de.isFormData(n)){if(lr.hasStandardBrowserEnv||lr.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(de.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([m,p])=>{f.includes(m.toLowerCase())&&l.set(m,p)})}}if(lr.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(t)),r||r!==!1&&KK(t.url))){const d=a&&i&&XK.read(i);d&&l.set(a,d)}return t},JK=typeof XMLHttpRequest<"u",eX=JK&&function(e){return new Promise(function(n,r){const a=x5(e);let i=a.data;const l=Pr.from(a.headers).normalize();let{responseType:u,onUploadProgress:d,onDownloadProgress:f}=a,m,p,g,x,j;function b(){x&&x(),j&&j(),a.cancelToken&&a.cancelToken.unsubscribe(m),a.signal&&a.signal.removeEventListener("abort",m)}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,!0),w.timeout=a.timeout;function N(){if(!w)return;const C=Pr.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),E={data:!u||u==="text"||u==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:C,config:e,request:w};g5(function(T){n(T),b()},function(T){r(T),b()},E),w=null}"onloadend"in w?w.onloadend=N:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(N)},w.onabort=function(){w&&(r(new Xe("Request aborted",Xe.ECONNABORTED,e,w)),w=null)},w.onerror=function(A){const E=A&&A.message?A.message:"Network Error",k=new Xe(E,Xe.ERR_NETWORK,e,w);k.event=A||null,r(k),w=null},w.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const E=a.transitional||m5;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),r(new Xe(A,E.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,e,w)),w=null},i===void 0&&l.setContentType(null),"setRequestHeader"in w&&de.forEach(l.toJSON(),function(A,E){w.setRequestHeader(E,A)}),de.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),u&&u!=="json"&&(w.responseType=a.responseType),f&&([g,j]=vv(f,!0),w.addEventListener("progress",g)),d&&w.upload&&([p,x]=vv(d),w.upload.addEventListener("progress",p),w.upload.addEventListener("loadend",x)),(a.cancelToken||a.signal)&&(m=C=>{w&&(r(!C||C.type?new Mu(null,e,w):C),w.abort(),w=null)},a.cancelToken&&a.cancelToken.subscribe(m),a.signal&&(a.signal.aborted?m():a.signal.addEventListener("abort",m)));const O=VK(a.url);if(O&&lr.protocols.indexOf(O)===-1){r(new Xe("Unsupported protocol "+O+":",Xe.ERR_BAD_REQUEST,e));return}w.send(i||null)})},tX=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const i=function(f){if(!a){a=!0,u();const m=f instanceof Error?f:this.reason;r.abort(m instanceof Xe?m:new Mu(m instanceof Error?m.message:m))}};let l=t&&setTimeout(()=>{l=null,i(new Xe(`timeout ${t} of ms exceeded`,Xe.ETIMEDOUT))},t);const u=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>de.asap(u),d}},nX=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},rX=async function*(e,t){for await(const n of aX(e))yield*nX(n,t)},aX=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()}},jP=(e,t,n,r)=>{const a=rX(e,t);let i=0,l,u=d=>{l||(l=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:m}=await a.next();if(f){u(),d.close();return}let p=m.byteLength;if(n){let g=i+=p;n(g)}d.enqueue(new Uint8Array(m))}catch(f){throw u(f),f}},cancel(d){return u(d),a.return()}},{highWaterMark:2})},SP=64*1024,{isFunction:jp}=de,iX=(({Request:e,Response:t})=>({Request:e,Response:t}))(de.global),{ReadableStream:_P,TextEncoder:NP}=de.global,OP=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oX=e=>{e=de.merge.call({skipUndefined:!0},iX,e);const{fetch:t,Request:n,Response:r}=e,a=t?jp(t):typeof fetch=="function",i=jp(n),l=jp(r);if(!a)return!1;const u=a&&jp(_P),d=a&&(typeof NP=="function"?(j=>b=>j.encode(b))(new NP):async j=>new Uint8Array(await new n(j).arrayBuffer())),f=i&&u&&OP(()=>{let j=!1;const b=new n(lr.origin,{body:new _P,method:"POST",get duplex(){return j=!0,"half"}}).headers.has("Content-Type");return j&&!b}),m=l&&u&&OP(()=>de.isReadableStream(new r("").body)),p={stream:m&&(j=>j.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(j=>{!p[j]&&(p[j]=(b,w)=>{let N=b&&b[j];if(N)return N.call(b);throw new Xe(`Response type '${j}' is not supported`,Xe.ERR_NOT_SUPPORT,w)})});const g=async j=>{if(j==null)return 0;if(de.isBlob(j))return j.size;if(de.isSpecCompliantForm(j))return(await new n(lr.origin,{method:"POST",body:j}).arrayBuffer()).byteLength;if(de.isArrayBufferView(j)||de.isArrayBuffer(j))return j.byteLength;if(de.isURLSearchParams(j)&&(j=j+""),de.isString(j))return(await d(j)).byteLength},x=async(j,b)=>{const w=de.toFiniteNumber(j.getContentLength());return w??g(b)};return async j=>{let{url:b,method:w,data:N,signal:O,cancelToken:C,timeout:A,onDownloadProgress:E,onUploadProgress:k,responseType:T,headers:P,withCredentials:$="same-origin",fetchOptions:z}=x5(j),D=t||fetch;T=T?(T+"").toLowerCase():"text";let U=tX([O,C&&C.toAbortSignal()],A),V=null;const H=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let G;try{if(k&&f&&w!=="get"&&w!=="head"&&(G=await x(P,N))!==0){let I=new n(b,{method:"POST",body:N,duplex:"half"}),B;if(de.isFormData(N)&&(B=I.headers.get("content-type"))&&P.setContentType(B),I.body){const[Y,ne]=xP(G,vv(bP(k)));N=jP(I.body,SP,Y,ne)}}de.isString($)||($=$?"include":"omit");const L=i&&"credentials"in n.prototype,R={...z,signal:U,method:w.toUpperCase(),headers:P.normalize().toJSON(),body:N,duplex:"half",credentials:L?$:void 0};V=i&&new n(b,R);let F=await(i?D(V,z):D(b,R));const K=m&&(T==="stream"||T==="response");if(m&&(E||K&&H)){const I={};["status","statusText","headers"].forEach(oe=>{I[oe]=F[oe]});const B=de.toFiniteNumber(F.headers.get("content-length")),[Y,ne]=E&&xP(B,vv(bP(E),!0))||[];F=new r(jP(F.body,SP,Y,()=>{ne&&ne(),H&&H()}),I)}T=T||"text";let te=await p[de.findKey(p,T)||"text"](F,j);return!K&&H&&H(),await new Promise((I,B)=>{g5(I,B,{data:te,headers:Pr.from(F.headers),status:F.status,statusText:F.statusText,config:j,request:V})})}catch(L){throw H&&H(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new Xe("Network Error",Xe.ERR_NETWORK,j,V),{cause:L.cause||L}):Xe.from(L,L&&L.code,j,V)}}},sX=new Map,b5=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let l=i.length,u=l,d,f,m=sX;for(;u--;)d=i[u],f=m.get(d),f===void 0&&m.set(d,f=u?new Map:oX(t)),m=f;return f};b5();const kO={http:_K,xhr:eX,fetch:{get:b5}};de.forEach(kO,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const CP=e=>`- ${e}`,lX=e=>de.isFunction(e)||e===null||e===!1;function cX(e,t){e=de.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let l=0;l<n;l++){r=e[l];let u;if(a=r,!lX(r)&&(a=kO[(u=String(r)).toLowerCase()],a===void 0))throw new Xe(`Unknown adapter '${u}'`);if(a&&(de.isFunction(a)||(a=a.get(t))))break;i[u||"#"+l]=a}if(!a){const l=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let u=n?l.length>1?`since :
|
||
`+l.map(CP).join(`
|
||
`):" "+CP(l[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return a}const w5={getAdapter:cX,adapters:kO};function $0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mu(null,e)}function EP(e){return $0(e),e.headers=Pr.from(e.headers),e.data=D0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),w5.getAdapter(e.adapter||Sh.adapter,e)(e).then(function(r){return $0(e),r.data=D0.call(e,e.transformResponse,r),r.headers=Pr.from(r.headers),r},function(r){return v5(r)||($0(e),r&&r.response&&(r.response.data=D0.call(e,e.transformResponse,r.response),r.response.headers=Pr.from(r.response.headers))),Promise.reject(r)})}const j5="1.13.2",zg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const AP={};zg.transitional=function(t,n,r){function a(i,l){return"[Axios v"+j5+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,u)=>{if(t===!1)throw new Xe(a(l," has been removed"+(n?" in "+n:"")),Xe.ERR_DEPRECATED);return n&&!AP[l]&&(AP[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,u):!0}};zg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function uX(e,t,n){if(typeof e!="object")throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],l=t[i];if(l){const u=e[i],d=u===void 0||l(u,i,e);if(d!==!0)throw new Xe("option "+i+" must be "+d,Xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Xe("Unknown option "+i,Xe.ERR_BAD_OPTION)}}const ev={assertOptions:uX,validators:zg},Qa=ev.validators;let Zs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gP,response:new gP}}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=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=il(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&ev.assertOptions(r,{silentJSONParsing:Qa.transitional(Qa.boolean),forcedJSONParsing:Qa.transitional(Qa.boolean),clarifyTimeoutError:Qa.transitional(Qa.boolean)},!1),a!=null&&(de.isFunction(a)?n.paramsSerializer={serialize:a}:ev.assertOptions(a,{encode:Qa.function,serialize:Qa.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ev.assertOptions(n,{baseUrl:Qa.spelling("baseURL"),withXsrfToken:Qa.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&de.merge(i.common,i[n.method]);i&&de.forEach(["delete","get","head","post","put","patch","common"],j=>{delete i[j]}),n.headers=Pr.concat(l,i);const u=[];let d=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(d=d&&b.synchronous,u.unshift(b.fulfilled,b.rejected))});const f=[];this.interceptors.response.forEach(function(b){f.push(b.fulfilled,b.rejected)});let m,p=0,g;if(!d){const j=[EP.bind(this),void 0];for(j.unshift(...u),j.push(...f),g=j.length,m=Promise.resolve(n);p<g;)m=m.then(j[p++],j[p++]);return m}g=u.length;let x=n;for(;p<g;){const j=u[p++],b=u[p++];try{x=j(x)}catch(w){b.call(this,w);break}}try{m=EP.call(this,x)}catch(j){return Promise.reject(j)}for(p=0,g=f.length;p<g;)m=m.then(f[p++],f[p++]);return m}getUri(t){t=il(this.defaults,t);const n=y5(t.baseURL,t.url,t.allowAbsoluteUrls);return h5(n,t.params,t.paramsSerializer)}};de.forEach(["delete","get","head","options"],function(t){Zs.prototype[t]=function(n,r){return this.request(il(r||{},{method:t,url:n,data:(r||{}).data}))}});de.forEach(["post","put","patch"],function(t){function n(r){return function(i,l,u){return this.request(il(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}Zs.prototype[t]=n(),Zs.prototype[t+"Form"]=n(!0)});let dX=class S5{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(u=>{r.subscribe(u),i=u}).then(a);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,u){r.reason||(r.reason=new Mu(i,l,u),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 S5(function(a){t=a}),cancel:t}}};function fX(e){return function(n){return e.apply(null,n)}}function hX(e){return de.isObject(e)&&e.isAxiosError===!0}const p_={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(p_).forEach(([e,t])=>{p_[t]=e});function _5(e){const t=new Zs(e),n=t5(Zs.prototype.request,t);return de.extend(n,Zs.prototype,t,{allOwnKeys:!0}),de.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return _5(il(e,a))},n}const cn=_5(Sh);cn.Axios=Zs;cn.CanceledError=Mu;cn.CancelToken=dX;cn.isCancel=v5;cn.VERSION=j5;cn.toFormData=Bg;cn.AxiosError=Xe;cn.Cancel=cn.CanceledError;cn.all=function(t){return Promise.all(t)};cn.spread=fX;cn.isAxiosError=hX;cn.mergeConfig=il;cn.AxiosHeaders=Pr;cn.formToJSON=e=>p5(de.isHTMLForm(e)?new FormData(e):e);cn.getAdapter=w5.getAdapter;cn.HttpStatusCode=p_;cn.default=cn;const{Axios:uAe,AxiosError:dAe,CanceledError:fAe,isCancel:hAe,CancelToken:mAe,VERSION:pAe,all:vAe,Cancel:gAe,isAxiosError:yAe,spread:xAe,toFormData:bAe,AxiosHeaders:wAe,HttpStatusCode:jAe,formToJSON:SAe,getAdapter:_Ae,mergeConfig:NAe}=cn;function N5(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=N5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ye(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=N5(e))&&(r&&(r+=" "),r+=t);return r}const mX=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pX=(e,t)=>({classGroupId:e,validator:t}),O5=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gv="-",TP=[],vX="arbitrary..",gX=e=>{const t=xX(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return yX(l);const u=l.split(gv),d=u[0]===""&&u.length>1?1:0;return C5(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?mX(f,d):d:f||TP}return n[l]||TP}}},C5=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=C5(e,t+1,i);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(gv):e.slice(t).join(gv),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},yX=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?vX+r:void 0})(),xX=e=>{const{theme:t,classGroups:n}=e;return bX(n,t)},bX=(e,t)=>{const n=O5();for(const r in e){const a=e[r];PO(a,n,r,t)}return n},PO=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const l=e[i];wX(l,t,n,r)}},wX=(e,t,n,r)=>{if(typeof e=="string"){jX(e,t,n);return}if(typeof e=="function"){SX(e,t,n,r);return}_X(e,t,n,r)},jX=(e,t,n)=>{const r=e===""?t:E5(t,e);r.classGroupId=n},SX=(e,t,n,r)=>{if(NX(e)){PO(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pX(n,e))},_X=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let l=0;l<i;l++){const[u,d]=a[l];PO(d,E5(t,u),n,r)}},E5=(e,t)=>{let n=e;const r=t.split(gv),a=r.length;for(let i=0;i<a;i++){const l=r[i];let u=n.nextPart.get(l);u||(u=O5(),n.nextPart.set(l,u)),n=u}return n},NX=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,OX=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return a(i,l),l},set(i,l){i in n?n[i]=l:a(i,l)}}},v_="!",kP=":",CX=[],PP=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),EX=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let l=0,u=0,d=0,f;const m=a.length;for(let b=0;b<m;b++){const w=a[b];if(l===0&&u===0){if(w===kP){i.push(a.slice(d,b)),d=b+1;continue}if(w==="/"){f=b;continue}}w==="["?l++:w==="]"?l--:w==="("?u++:w===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,x=!1;p.endsWith(v_)?(g=p.slice(0,-1),x=!0):p.startsWith(v_)&&(g=p.slice(1),x=!0);const j=f&&f>d?f-d:void 0;return PP(i,x,g,j)};if(t){const a=t+kP,i=r;r=l=>l.startsWith(a)?i(l.slice(a.length)):PP(CX,!1,l,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},AX=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const l=n[i],u=l[0]==="[",d=t.has(l);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},TX=e=>({cache:OX(e.cacheSize),parseClassName:EX(e),sortModifiers:AX(e),...gX(e)}),kX=/\s+/,PX=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,l=[],u=e.trim().split(kX);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:x,baseClassName:j,maybePostfixModifierPosition:b}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let w=!!b,N=r(w?j.substring(0,b):j);if(!N){if(!w){d=m+(d.length>0?" "+d:d);continue}if(N=r(j),!N){d=m+(d.length>0?" "+d:d);continue}w=!1}const O=g.length===0?"":g.length===1?g[0]:i(g).join(":"),C=x?O+v_:O,A=C+N;if(l.indexOf(A)>-1)continue;l.push(A);const E=a(N,w);for(let k=0;k<E.length;++k){const T=E[k];l.push(C+T)}d=m+(d.length>0?" "+d:d)}return d},MX=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=A5(n))&&(a&&(a+=" "),a+=r);return a},A5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=A5(e[r]))&&(n&&(n+=" "),n+=t);return n},RX=(e,...t)=>{let n,r,a,i;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=TX(f),r=n.cache.get,a=n.cache.set,i=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=PX(d,n);return a(d,m),m};return i=l,(...d)=>i(MX(...d))},DX=[],Cn=e=>{const t=n=>n[e]||DX;return t.isThemeGetter=!0,t},T5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$X=/^\d+\/\d+$/,IX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LX=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,BX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yc=e=>$X.test(e),nt=e=>!!e&&!Number.isNaN(Number(e)),Io=e=>!!e&&Number.isInteger(Number(e)),I0=e=>e.endsWith("%")&&nt(e.slice(0,-1)),zi=e=>IX.test(e),FX=()=>!0,UX=e=>LX.test(e)&&!BX.test(e),P5=()=>!1,HX=e=>zX.test(e),WX=e=>qX.test(e),VX=e=>!Te(e)&&!ke(e),GX=e=>Ru(e,D5,P5),Te=e=>T5.test(e),Rs=e=>Ru(e,$5,UX),L0=e=>Ru(e,QX,nt),MP=e=>Ru(e,M5,P5),YX=e=>Ru(e,R5,WX),Sp=e=>Ru(e,I5,HX),ke=e=>k5.test(e),Gd=e=>Du(e,$5),KX=e=>Du(e,JX),RP=e=>Du(e,M5),XX=e=>Du(e,D5),ZX=e=>Du(e,R5),_p=e=>Du(e,I5,!0),Ru=(e,t,n)=>{const r=T5.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Du=(e,t,n=!1)=>{const r=k5.exec(e);return r?r[1]?t(r[1]):n:!1},M5=e=>e==="position"||e==="percentage",R5=e=>e==="image"||e==="url",D5=e=>e==="length"||e==="size"||e==="bg-size",$5=e=>e==="length",QX=e=>e==="number",JX=e=>e==="family-name",I5=e=>e==="shadow",eZ=()=>{const e=Cn("color"),t=Cn("font"),n=Cn("text"),r=Cn("font-weight"),a=Cn("tracking"),i=Cn("leading"),l=Cn("breakpoint"),u=Cn("container"),d=Cn("spacing"),f=Cn("radius"),m=Cn("shadow"),p=Cn("inset-shadow"),g=Cn("text-shadow"),x=Cn("drop-shadow"),j=Cn("blur"),b=Cn("perspective"),w=Cn("aspect"),N=Cn("ease"),O=Cn("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...A(),ke,Te],k=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],P=()=>[ke,Te,d],$=()=>[yc,"full","auto",...P()],z=()=>[Io,"none","subgrid",ke,Te],D=()=>["auto",{span:["full",Io,ke,Te]},Io,ke,Te],U=()=>[Io,"auto",ke,Te],V=()=>["auto","min","max","fr",ke,Te],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...P()],R=()=>[yc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],F=()=>[e,ke,Te],K=()=>[...A(),RP,MP,{position:[ke,Te]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",XX,GX,{size:[ke,Te]}],B=()=>[I0,Gd,Rs],Y=()=>["","none","full",f,ke,Te],ne=()=>["",nt,Gd,Rs],oe=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[nt,I0,RP,MP],ae=()=>["","none",j,ke,Te],Z=()=>["none",nt,ke,Te],pe=()=>["none",nt,ke,Te],je=()=>[nt,ke,Te],le=()=>[yc,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zi],breakpoint:[zi],color:[FX],container:[zi],"drop-shadow":[zi],ease:["in","out","in-out"],font:[VX],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zi],shadow:[zi],spacing:["px",nt],text:[zi],"text-shadow":[zi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yc,Te,ke,w]}],container:["container"],columns:[{columns:[nt,Te,ke,u]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Io,"auto",ke,Te]}],basis:[{basis:[yc,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nt,yc,"auto","initial","none",Te]}],grow:[{grow:["",nt,ke,Te]}],shrink:[{shrink:["",nt,ke,Te]}],order:[{order:[Io,"first","last","none",ke,Te]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],w:[{w:[u,"screen",...R()]}],"min-w":[{"min-w":[u,"screen","none",...R()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",n,Gd,Rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ke,L0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",I0,Te]}],"font-family":[{font:[KX,Te,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ke,Te]}],"line-clamp":[{"line-clamp":[nt,"none",ke,L0]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",ke,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[nt,"from-font","auto",ke,Rs]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[nt,"auto",ke,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Io,ke,Te],radial:["",ke,Te],conic:[Io,ke,Te]},ZX,YX]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[nt,ke,Te]}],"outline-w":[{outline:["",nt,Gd,Rs]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",m,_p,Sp]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,_p,Sp]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[nt,Rs]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",g,_p,Sp]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[nt,ke,Te]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[nt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[ke,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[nt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Te]}],filter:[{filter:["","none",ke,Te]}],blur:[{blur:ae()}],brightness:[{brightness:[nt,ke,Te]}],contrast:[{contrast:[nt,ke,Te]}],"drop-shadow":[{"drop-shadow":["","none",x,_p,Sp]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",nt,ke,Te]}],"hue-rotate":[{"hue-rotate":[nt,ke,Te]}],invert:[{invert:["",nt,ke,Te]}],saturate:[{saturate:[nt,ke,Te]}],sepia:[{sepia:["",nt,ke,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Te]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[nt,ke,Te]}],"backdrop-contrast":[{"backdrop-contrast":[nt,ke,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",nt,ke,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nt,ke,Te]}],"backdrop-invert":[{"backdrop-invert":["",nt,ke,Te]}],"backdrop-opacity":[{"backdrop-opacity":[nt,ke,Te]}],"backdrop-saturate":[{"backdrop-saturate":[nt,ke,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",nt,ke,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[nt,"initial",ke,Te]}],ease:[{ease:["linear","initial",N,ke,Te]}],delay:[{delay:[nt,ke,Te]}],animate:[{animate:["none",O,ke,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ke,Te]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Z()}],"rotate-x":[{"rotate-x":Z()}],"rotate-y":[{"rotate-y":Z()}],"rotate-z":[{"rotate-z":Z()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[ke,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,Te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,Te]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[nt,Gd,Rs,L0]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tZ=RX(eZ);function ue(...e){return tZ(Ye(e))}const dt=y.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:ue("rounded-xl border bg-card text-card-foreground shadow",e),...t}));dt.displayName="Card";const Vt=y.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:ue("flex flex-col space-y-1.5 p-6",e),...t}));Vt.displayName="CardHeader";const Gt=y.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:ue("font-semibold leading-none tracking-tight",e),...t}));Gt.displayName="CardTitle";const Jn=y.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));Jn.displayName="CardDescription";const ln=y.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:ue("p-6 pt-0",e),...t}));ln.displayName="CardContent";const L5=y.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:ue("flex items-center p-6 pt-0",e),...t}));L5.displayName="CardFooter";function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function nZ(e,t){const n=y.createContext(t),r=i=>{const{children:l,...u}=i,d=y.useMemo(()=>u,Object.values(u));return o.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(i){const l=y.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function fr(e,t=[]){let n=[];function r(i,l){const u=y.createContext(l),d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:x,...j}=p,b=g?.[e]?.[d]||u,w=y.useMemo(()=>j,Object.values(j));return o.jsx(b.Provider,{value:w,children:x})};f.displayName=i+"Provider";function m(p,g){const x=g?.[e]?.[d]||u,j=y.useContext(x);if(j)return j;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(l=>y.createContext(l));return function(u){const d=u?.[e]||i;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,rZ(a,...t)]}function rZ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function DP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mr(...e){return t=>{let n=!1;const r=e.map(a=>{const i=DP(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():DP(e[a],null)}}}}function qe(...e){return y.useCallback(Mr(...e),e)}function $P(e){const t=aZ(e),n=y.forwardRef((r,a)=>{const{children:i,...l}=r,u=y.Children.toArray(i),d=u.find(oZ);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return o.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return o.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function aZ(e){const t=y.forwardRef((n,r)=>{const{children:a,...i}=n;if(y.isValidElement(a)){const l=lZ(a),u=sZ(i,a.props);return a.type!==y.Fragment&&(u.ref=r?Mr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var iZ=Symbol("radix.slottable");function oZ(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iZ}function sZ(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function lZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _h(e){const t=e+"CollectionProvider",[n,r]=fr(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=b=>{const{scope:w,children:N}=b,O=W.useRef(null),C=W.useRef(new Map).current;return o.jsx(a,{scope:w,itemMap:C,collectionRef:O,children:N})};l.displayName=t;const u=e+"CollectionSlot",d=$P(u),f=W.forwardRef((b,w)=>{const{scope:N,children:O}=b,C=i(u,N),A=qe(w,C.collectionRef);return o.jsx(d,{ref:A,children:O})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=$P(m),x=W.forwardRef((b,w)=>{const{scope:N,children:O,...C}=b,A=W.useRef(null),E=qe(w,A),k=i(m,N);return W.useEffect(()=>(k.itemMap.set(A,{ref:A,...C}),()=>void k.itemMap.delete(A))),o.jsx(g,{[p]:"",ref:E,children:O})});x.displayName=m;function j(b){const w=i(e+"CollectionConsumer",b);return W.useCallback(()=>{const O=w.collectionRef.current;if(!O)return[];const C=Array.from(O.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((k,T)=>C.indexOf(k.ref.current)-C.indexOf(T.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:f,ItemSlot:x},j,r]}var Fn=globalThis?.document?y.useLayoutEffect:()=>{},cZ=gO[" useId ".trim().toString()]||(()=>{}),uZ=0;function qn(e){const[t,n]=y.useState(cZ());return Fn(()=>{n(r=>r??String(uZ++))},[e]),t?`radix-${t}`:""}function dZ(e){const t=fZ(e),n=y.forwardRef((r,a)=>{const{children:i,...l}=r,u=y.Children.toArray(i),d=u.find(mZ);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return o.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return o.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function fZ(e){const t=y.forwardRef((n,r)=>{const{children:a,...i}=n;if(y.isValidElement(a)){const l=vZ(a),u=pZ(i,a.props);return a.type!==y.Fragment&&(u.ref=r?Mr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hZ=Symbol("radix.slottable");function mZ(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hZ}function pZ(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function vZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Me=gZ.reduce((e,t)=>{const n=dZ(`Primitive.${t}`),r=y.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function MO(e,t){e&&gl.flushSync(()=>e.dispatchEvent(t))}function tn(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}var yZ=gO[" useInsertionEffect ".trim().toString()]||Fn;function _a({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,l]=xZ({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const f=y.useCallback(m=>{if(u){const p=bZ(m)?m(e):m;p!==e&&l.current?.(p)}else i(m)},[u,e,i,l]);return[d,f]}function xZ({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),a=y.useRef(n),i=y.useRef(t);return yZ(()=>{i.current=t},[t]),y.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}function bZ(e){return typeof e=="function"}var wZ=y.createContext(void 0);function $u(e){const t=y.useContext(wZ);return e||t||"ltr"}var B0="rovingFocusGroup.onEntryFocus",jZ={bubbles:!1,cancelable:!0},Nh="RovingFocusGroup",[g_,B5,SZ]=_h(Nh),[_Z,qg]=fr(Nh,[SZ]),[NZ,OZ]=_Z(Nh),z5=y.forwardRef((e,t)=>o.jsx(g_.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(g_.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(CZ,{...e,ref:t})})}));z5.displayName=Nh;var CZ=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=y.useRef(null),x=qe(t,g),j=$u(i),[b,w]=_a({prop:l,defaultProp:u??null,onChange:d,caller:Nh}),[N,O]=y.useState(!1),C=tn(f),A=B5(n),E=y.useRef(!1),[k,T]=y.useState(0);return y.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(B0,C),()=>P.removeEventListener(B0,C)},[C]),o.jsx(NZ,{scope:n,orientation:r,dir:j,loop:a,currentTabStopId:b,onItemFocus:y.useCallback(P=>w(P),[w]),onItemShiftTab:y.useCallback(()=>O(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:y.useCallback(()=>T(P=>P-1),[]),children:o.jsx(Me.div,{tabIndex:N||k===0?-1:0,"data-orientation":r,...p,ref:x,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{E.current=!0}),onFocus:Se(e.onFocus,P=>{const $=!E.current;if(P.target===P.currentTarget&&$&&!N){const z=new CustomEvent(B0,jZ);if(P.currentTarget.dispatchEvent(z),!z.defaultPrevented){const D=A().filter(L=>L.focusable),U=D.find(L=>L.active),V=D.find(L=>L.id===b),G=[U,V,...D].filter(Boolean).map(L=>L.ref.current);U5(G,m)}}E.current=!1}),onBlur:Se(e.onBlur,()=>O(!1))})})}),q5="RovingFocusGroupItem",F5=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:l,...u}=e,d=qn(),f=i||d,m=OZ(q5,n),p=m.currentTabStopId===f,g=B5(n),{onFocusableItemAdd:x,onFocusableItemRemove:j,currentTabStopId:b}=m;return y.useEffect(()=>{if(r)return x(),()=>j()},[r,x,j]),o.jsx(g_.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:o.jsx(Me.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:Se(e.onMouseDown,w=>{r?m.onItemFocus(f):w.preventDefault()}),onFocus:Se(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:Se(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const N=TZ(w,m.orientation,m.dir);if(N!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let C=g().filter(A=>A.focusable).map(A=>A.ref.current);if(N==="last")C.reverse();else if(N==="prev"||N==="next"){N==="prev"&&C.reverse();const A=C.indexOf(w.currentTarget);C=m.loop?kZ(C,A+1):C.slice(A+1)}setTimeout(()=>U5(C))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:b!=null}):l})})});F5.displayName=q5;var EZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function AZ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TZ(e,t,n){const r=AZ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return EZ[r]}function U5(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function kZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var H5=z5,W5=F5;function PZ(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Mn=e=>{const{present:t,children:n}=e,r=MZ(t),a=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=qe(r.ref,RZ(a));return typeof n=="function"||r.isPresent?y.cloneElement(a,{ref:i}):null};Mn.displayName="Presence";function MZ(e){const[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),i=y.useRef("none"),l=e?"mounted":"unmounted",[u,d]=PZ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=Np(r.current);i.current=u==="mounted"?f:"none"},[u]),Fn(()=>{const f=r.current,m=a.current;if(m!==e){const g=i.current,x=Np(f);e?d("MOUNT"):x==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==x?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),Fn(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=x=>{const b=Np(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&b&&(d("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=x=>{x.target===t&&(i.current=Np(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Np(e){return e?.animationName||"none"}function RZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fg="Tabs",[DZ]=fr(Fg,[qg]),V5=qg(),[$Z,RO]=DZ(Fg),G5=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:l="horizontal",dir:u,activationMode:d="automatic",...f}=e,m=$u(u),[p,g]=_a({prop:r,onChange:a,defaultProp:i??"",caller:Fg});return o.jsx($Z,{scope:n,baseId:qn(),value:p,onValueChange:g,orientation:l,dir:m,activationMode:d,children:o.jsx(Me.div,{dir:m,"data-orientation":l,...f,ref:t})})});G5.displayName=Fg;var Y5="TabsList",K5=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,i=RO(Y5,n),l=V5(n);return o.jsx(H5,{asChild:!0,...l,orientation:i.orientation,dir:i.dir,loop:r,children:o.jsx(Me.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});K5.displayName=Y5;var X5="TabsTrigger",Z5=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=e,l=RO(X5,n),u=V5(n),d=eB(l.baseId,r),f=tB(l.baseId,r),m=r===l.value;return o.jsx(W5,{asChild:!0,...u,focusable:!a,active:m,children:o.jsx(Me.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":f,"data-state":m?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:d,...i,ref:t,onMouseDown:Se(e.onMouseDown,p=>{!a&&p.button===0&&p.ctrlKey===!1?l.onValueChange(r):p.preventDefault()}),onKeyDown:Se(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&l.onValueChange(r)}),onFocus:Se(e.onFocus,()=>{const p=l.activationMode!=="manual";!m&&!a&&p&&l.onValueChange(r)})})})});Z5.displayName=X5;var Q5="TabsContent",J5=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:i,...l}=e,u=RO(Q5,n),d=eB(u.baseId,r),f=tB(u.baseId,r),m=r===u.value,p=y.useRef(m);return y.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),o.jsx(Mn,{present:a||m,children:({present:g})=>o.jsx(Me.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:f,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&i})})});J5.displayName=Q5;function eB(e,t){return`${e}-trigger-${t}`}function tB(e,t){return`${e}-content-${t}`}var IZ=G5,nB=K5,rB=Z5,aB=J5;const ol=IZ,Xo=y.forwardRef(({className:e,...t},n)=>o.jsx(nB,{ref:n,className:ue("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Xo.displayName=nB.displayName;const Ct=y.forwardRef(({className:e,...t},n)=>o.jsx(rB,{ref:n,className:ue("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Ct.displayName=rB.displayName;const Qt=y.forwardRef(({className:e,...t},n)=>o.jsx(aB,{ref:n,className:ue("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=active]:animate-in data-[state=active]:fade-in data-[state=active]:duration-300",e),...t}));Qt.displayName=aB.displayName;function Of(e,[t,n]){return Math.min(n,Math.max(t,e))}function LZ(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var DO="ScrollArea",[iB]=fr(DO),[BZ,Oa]=iB(DO),oB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...l}=e,[u,d]=y.useState(null),[f,m]=y.useState(null),[p,g]=y.useState(null),[x,j]=y.useState(null),[b,w]=y.useState(null),[N,O]=y.useState(0),[C,A]=y.useState(0),[E,k]=y.useState(!1),[T,P]=y.useState(!1),$=qe(t,D=>d(D)),z=$u(a);return o.jsx(BZ,{scope:n,type:r,dir:z,scrollHideDelay:i,scrollArea:u,viewport:f,onViewportChange:m,content:p,onContentChange:g,scrollbarX:x,onScrollbarXChange:j,scrollbarXEnabled:E,onScrollbarXEnabledChange:k,scrollbarY:b,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:P,onCornerWidthChange:O,onCornerHeightChange:A,children:o.jsx(Me.div,{dir:z,...l,ref:$,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});oB.displayName=DO;var sB="ScrollAreaViewport",lB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...i}=e,l=Oa(sB,n),u=y.useRef(null),d=qe(t,u,l.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),o.jsx(Me.div,{"data-radix-scroll-area-viewport":"",...i,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:o.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});lB.displayName=sB;var gi="ScrollAreaScrollbar",$O=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Oa(gi,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=a,u=e.orientation==="horizontal";return y.useEffect(()=>(u?i(!0):l(!0),()=>{u?i(!1):l(!1)}),[u,i,l]),a.type==="hover"?o.jsx(zZ,{...r,ref:t,forceMount:n}):a.type==="scroll"?o.jsx(qZ,{...r,ref:t,forceMount:n}):a.type==="auto"?o.jsx(cB,{...r,ref:t,forceMount:n}):a.type==="always"?o.jsx(IO,{...r,ref:t}):null});$O.displayName=gi;var zZ=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Oa(gi,e.__scopeScrollArea),[i,l]=y.useState(!1);return y.useEffect(()=>{const u=a.scrollArea;let d=0;if(u){const f=()=>{window.clearTimeout(d),l(!0)},m=()=>{d=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",m),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),o.jsx(Mn,{present:n||i,children:o.jsx(cB,{"data-state":i?"visible":"hidden",...r,ref:t})})}),qZ=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Oa(gi,e.__scopeScrollArea),i=e.orientation==="horizontal",l=Hg(()=>d("SCROLL_END"),100),[u,d]=LZ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,a.scrollHideDelay,d]),y.useEffect(()=>{const f=a.viewport,m=i?"scrollLeft":"scrollTop";if(f){let p=f[m];const g=()=>{const x=f[m];p!==x&&(d("SCROLL"),l()),p=x};return f.addEventListener("scroll",g),()=>f.removeEventListener("scroll",g)}},[a.viewport,i,d,l]),o.jsx(Mn,{present:n||u!=="hidden",children:o.jsx(IO,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Se(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Se(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),cB=y.forwardRef((e,t)=>{const n=Oa(gi,e.__scopeScrollArea),{forceMount:r,...a}=e,[i,l]=y.useState(!1),u=e.orientation==="horizontal",d=Hg(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?f:m)}},10);return eu(n.viewport,d),eu(n.content,d),o.jsx(Mn,{present:r||i,children:o.jsx(IO,{"data-state":i?"visible":"hidden",...a,ref:t})})}),IO=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=Oa(gi,e.__scopeScrollArea),i=y.useRef(null),l=y.useRef(0),[u,d]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=mB(u.viewport,u.content),m={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:g=>i.current=g,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:g=>l.current=g};function p(g,x){return GZ(g,l.current,u,x)}return n==="horizontal"?o.jsx(FZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const g=a.viewport.scrollLeft,x=IP(g,u,a.dir);i.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollLeft=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollLeft=p(g,a.dir))}}):n==="vertical"?o.jsx(UZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const g=a.viewport.scrollTop,x=IP(g,u);i.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollTop=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollTop=p(g))}}):null}),FZ=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Oa(gi,e.__scopeScrollArea),[l,u]=y.useState(),d=y.useRef(null),f=qe(t,d,i.onScrollbarXChange);return y.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),o.jsx(dB,{"data-orientation":"horizontal",...a,ref:f,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ug(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,p)=>{if(i.viewport){const g=i.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),vB(g,p)&&m.preventDefault()}},onResize:()=>{d.current&&i.viewport&&l&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:xv(l.paddingLeft),paddingEnd:xv(l.paddingRight)}})}})}),UZ=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Oa(gi,e.__scopeScrollArea),[l,u]=y.useState(),d=y.useRef(null),f=qe(t,d,i.onScrollbarYChange);return y.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),o.jsx(dB,{"data-orientation":"vertical",...a,ref:f,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ug(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,p)=>{if(i.viewport){const g=i.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),vB(g,p)&&m.preventDefault()}},onResize:()=>{d.current&&i.viewport&&l&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:xv(l.paddingTop),paddingEnd:xv(l.paddingBottom)}})}})}),[HZ,uB]=iB(gi),dB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:m,onResize:p,...g}=e,x=Oa(gi,n),[j,b]=y.useState(null),w=qe(t,$=>b($)),N=y.useRef(null),O=y.useRef(""),C=x.viewport,A=r.content-r.viewport,E=tn(m),k=tn(d),T=Hg(p,10);function P($){if(N.current){const z=$.clientX-N.current.left,D=$.clientY-N.current.top;f({x:z,y:D})}}return y.useEffect(()=>{const $=z=>{const D=z.target;j?.contains(D)&&E(z,A)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[C,j,A,E]),y.useEffect(k,[r,k]),eu(j,T),eu(x.content,T),o.jsx(HZ,{scope:n,scrollbar:j,hasThumb:a,onThumbChange:tn(i),onThumbPointerUp:tn(l),onThumbPositionChange:k,onThumbPointerDown:tn(u),children:o.jsx(Me.div,{...g,ref:w,style:{position:"absolute",...g.style},onPointerDown:Se(e.onPointerDown,$=>{$.button===0&&($.target.setPointerCapture($.pointerId),N.current=j.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),P($))}),onPointerMove:Se(e.onPointerMove,P),onPointerUp:Se(e.onPointerUp,$=>{const z=$.target;z.hasPointerCapture($.pointerId)&&z.releasePointerCapture($.pointerId),document.body.style.webkitUserSelect=O.current,x.viewport&&(x.viewport.style.scrollBehavior=""),N.current=null})})})}),yv="ScrollAreaThumb",fB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=uB(yv,e.__scopeScrollArea);return o.jsx(Mn,{present:n||a.hasThumb,children:o.jsx(WZ,{ref:t,...r})})}),WZ=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,i=Oa(yv,n),l=uB(yv,n),{onThumbPositionChange:u}=l,d=qe(t,p=>l.onThumbChange(p)),f=y.useRef(void 0),m=Hg(()=>{f.current&&(f.current(),f.current=void 0)},100);return y.useEffect(()=>{const p=i.viewport;if(p){const g=()=>{if(m(),!f.current){const x=YZ(p,u);f.current=x,u()}};return u(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[i.viewport,m,u]),o.jsx(Me.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Se(e.onPointerDownCapture,p=>{const x=p.target.getBoundingClientRect(),j=p.clientX-x.left,b=p.clientY-x.top;l.onThumbPointerDown({x:j,y:b})}),onPointerUp:Se(e.onPointerUp,l.onThumbPointerUp)})});fB.displayName=yv;var LO="ScrollAreaCorner",hB=y.forwardRef((e,t)=>{const n=Oa(LO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?o.jsx(VZ,{...e,ref:t}):null});hB.displayName=LO;var VZ=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Oa(LO,n),[i,l]=y.useState(0),[u,d]=y.useState(0),f=!!(i&&u);return eu(a.scrollbarX,()=>{const m=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(m),d(m)}),eu(a.scrollbarY,()=>{const m=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(m),l(m)}),f?o.jsx(Me.div,{...r,ref:t,style:{width:i,height:u,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function xv(e){return e?parseInt(e,10):0}function mB(e,t){const n=e/t;return isNaN(n)?0:n}function Ug(e){const t=mB(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function GZ(e,t,n,r="ltr"){const a=Ug(n),i=a/2,l=t||i,u=a-l,d=n.scrollbar.paddingStart+l,f=n.scrollbar.size-n.scrollbar.paddingEnd-u,m=n.content-n.viewport,p=r==="ltr"?[0,m]:[m*-1,0];return pB([d,f],p)(e)}function IP(e,t,n="ltr"){const r=Ug(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,l=t.content-t.viewport,u=i-r,d=n==="ltr"?[0,l]:[l*-1,0],f=Of(e,d);return pB([0,l],[0,u])(f)}function pB(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function vB(e,t){return e>0&&e<t}var YZ=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const i={left:e.scrollLeft,top:e.scrollTop},l=n.left!==i.left,u=n.top!==i.top;(l||u)&&t(),n=i,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function Hg(e,t){const n=tn(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function eu(e,t){const n=tn(t);Fn(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var gB=oB,KZ=lB,XZ=hB;const Xt=y.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(gB,{ref:r,className:ue("relative overflow-hidden",e),...n,children:[o.jsx(KZ,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(yB,{}),o.jsx(XZ,{})]}));Xt.displayName=gB.displayName;const yB=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>o.jsx($O,{ref:r,orientation:t,className:ue("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:o.jsx(fB,{className:"relative flex-1 rounded-full bg-border"})}));yB.displayName=$O.displayName;var z0,LP;function Ir(){if(LP)return z0;LP=1;var e=Array.isArray;return z0=e,z0}var q0,BP;function xB(){if(BP)return q0;BP=1;var e=typeof gp=="object"&&gp&&gp.Object===Object&&gp;return q0=e,q0}var F0,zP;function yi(){if(zP)return F0;zP=1;var e=xB(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return F0=n,F0}var U0,qP;function Oh(){if(qP)return U0;qP=1;var e=yi(),t=e.Symbol;return U0=t,U0}var H0,FP;function ZZ(){if(FP)return H0;FP=1;var e=Oh(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function i(l){var u=n.call(l,a),d=l[a];try{l[a]=void 0;var f=!0}catch{}var m=r.call(l);return f&&(u?l[a]=d:delete l[a]),m}return H0=i,H0}var W0,UP;function QZ(){if(UP)return W0;UP=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return W0=n,W0}var V0,HP;function so(){if(HP)return V0;HP=1;var e=Oh(),t=ZZ(),n=QZ(),r="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?a:r:i&&i in Object(u)?t(u):n(u)}return V0=l,V0}var G0,WP;function lo(){if(WP)return G0;WP=1;function e(t){return t!=null&&typeof t=="object"}return G0=e,G0}var Y0,VP;function Iu(){if(VP)return Y0;VP=1;var e=so(),t=lo(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return Y0=r,Y0}var K0,GP;function BO(){if(GP)return K0;GP=1;var e=Ir(),t=Iu(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,l){if(e(i))return!1;var u=typeof i;return u=="number"||u=="symbol"||u=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||l!=null&&i in Object(l)}return K0=a,K0}var X0,YP;function rs(){if(YP)return X0;YP=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return X0=e,X0}var Z0,KP;function zO(){if(KP)return Z0;KP=1;var e=so(),t=rs(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function l(u){if(!t(u))return!1;var d=e(u);return d==r||d==a||d==n||d==i}return Z0=l,Z0}var Q0,XP;function JZ(){if(XP)return Q0;XP=1;var e=yi(),t=e["__core-js_shared__"];return Q0=t,Q0}var J0,ZP;function eQ(){if(ZP)return J0;ZP=1;var e=JZ(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return J0=n,J0}var ew,QP;function bB(){if(QP)return ew;QP=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return ew=n,ew}var tw,JP;function tQ(){if(JP)return tw;JP=1;var e=zO(),t=eQ(),n=rs(),r=bB(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,f=u.hasOwnProperty,m=RegExp("^"+d.call(f).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(g){if(!n(g)||t(g))return!1;var x=e(g)?m:i;return x.test(r(g))}return tw=p,tw}var nw,eM;function nQ(){if(eM)return nw;eM=1;function e(t,n){return t?.[n]}return nw=e,nw}var rw,tM;function yl(){if(tM)return rw;tM=1;var e=tQ(),t=nQ();function n(r,a){var i=t(r,a);return e(i)?i:void 0}return rw=n,rw}var aw,nM;function Wg(){if(nM)return aw;nM=1;var e=yl(),t=e(Object,"create");return aw=t,aw}var iw,rM;function rQ(){if(rM)return iw;rM=1;var e=Wg();function t(){this.__data__=e?e(null):{},this.size=0}return iw=t,iw}var ow,aM;function aQ(){if(aM)return ow;aM=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return ow=e,ow}var sw,iM;function iQ(){if(iM)return sw;iM=1;var e=Wg(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(i){var l=this.__data__;if(e){var u=l[i];return u===t?void 0:u}return r.call(l,i)?l[i]:void 0}return sw=a,sw}var lw,oM;function oQ(){if(oM)return lw;oM=1;var e=Wg(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var i=this.__data__;return e?i[a]!==void 0:n.call(i,a)}return lw=r,lw}var cw,sM;function sQ(){if(sM)return cw;sM=1;var e=Wg(),t="__lodash_hash_undefined__";function n(r,a){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&a===void 0?t:a,this}return cw=n,cw}var uw,lM;function lQ(){if(lM)return uw;lM=1;var e=rQ(),t=aQ(),n=iQ(),r=oQ(),a=sQ();function i(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var f=l[u];this.set(f[0],f[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,uw=i,uw}var dw,cM;function cQ(){if(cM)return dw;cM=1;function e(){this.__data__=[],this.size=0}return dw=e,dw}var fw,uM;function qO(){if(uM)return fw;uM=1;function e(t,n){return t===n||t!==t&&n!==n}return fw=e,fw}var hw,dM;function Vg(){if(dM)return hw;dM=1;var e=qO();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return hw=t,hw}var mw,fM;function uQ(){if(fM)return mw;fM=1;var e=Vg(),t=Array.prototype,n=t.splice;function r(a){var i=this.__data__,l=e(i,a);if(l<0)return!1;var u=i.length-1;return l==u?i.pop():n.call(i,l,1),--this.size,!0}return mw=r,mw}var pw,hM;function dQ(){if(hM)return pw;hM=1;var e=Vg();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return pw=t,pw}var vw,mM;function fQ(){if(mM)return vw;mM=1;var e=Vg();function t(n){return e(this.__data__,n)>-1}return vw=t,vw}var gw,pM;function hQ(){if(pM)return gw;pM=1;var e=Vg();function t(n,r){var a=this.__data__,i=e(a,n);return i<0?(++this.size,a.push([n,r])):a[i][1]=r,this}return gw=t,gw}var yw,vM;function Gg(){if(vM)return yw;vM=1;var e=cQ(),t=uQ(),n=dQ(),r=fQ(),a=hQ();function i(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var f=l[u];this.set(f[0],f[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,yw=i,yw}var xw,gM;function FO(){if(gM)return xw;gM=1;var e=yl(),t=yi(),n=e(t,"Map");return xw=n,xw}var bw,yM;function mQ(){if(yM)return bw;yM=1;var e=lQ(),t=Gg(),n=FO();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return bw=r,bw}var ww,xM;function pQ(){if(xM)return ww;xM=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return ww=e,ww}var jw,bM;function Yg(){if(bM)return jw;bM=1;var e=pQ();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return jw=t,jw}var Sw,wM;function vQ(){if(wM)return Sw;wM=1;var e=Yg();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Sw=t,Sw}var _w,jM;function gQ(){if(jM)return _w;jM=1;var e=Yg();function t(n){return e(this,n).get(n)}return _w=t,_w}var Nw,SM;function yQ(){if(SM)return Nw;SM=1;var e=Yg();function t(n){return e(this,n).has(n)}return Nw=t,Nw}var Ow,_M;function xQ(){if(_M)return Ow;_M=1;var e=Yg();function t(n,r){var a=e(this,n),i=a.size;return a.set(n,r),this.size+=a.size==i?0:1,this}return Ow=t,Ow}var Cw,NM;function UO(){if(NM)return Cw;NM=1;var e=mQ(),t=vQ(),n=gQ(),r=yQ(),a=xQ();function i(l){var u=-1,d=l==null?0:l.length;for(this.clear();++u<d;){var f=l[u];this.set(f[0],f[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Cw=i,Cw}var Ew,OM;function wB(){if(OM)return Ew;OM=1;var e=UO(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var l=arguments,u=a?a.apply(this,l):l[0],d=i.cache;if(d.has(u))return d.get(u);var f=r.apply(this,l);return i.cache=d.set(u,f)||d,f};return i.cache=new(n.Cache||e),i}return n.Cache=e,Ew=n,Ew}var Aw,CM;function bQ(){if(CM)return Aw;CM=1;var e=wB(),t=500;function n(r){var a=e(r,function(l){return i.size===t&&i.clear(),l}),i=a.cache;return a}return Aw=n,Aw}var Tw,EM;function wQ(){if(EM)return Tw;EM=1;var e=bQ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(l,u,d,f){i.push(d?f.replace(n,"$1"):u||l)}),i});return Tw=r,Tw}var kw,AM;function HO(){if(AM)return kw;AM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=n(t[r],r,t);return i}return kw=e,kw}var Pw,TM;function jQ(){if(TM)return Pw;TM=1;var e=Oh(),t=HO(),n=Ir(),r=Iu(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function l(u){if(typeof u=="string")return u;if(n(u))return t(u,l)+"";if(r(u))return i?i.call(u):"";var d=u+"";return d=="0"&&1/u==-1/0?"-0":d}return Pw=l,Pw}var Mw,kM;function jB(){if(kM)return Mw;kM=1;var e=jQ();function t(n){return n==null?"":e(n)}return Mw=t,Mw}var Rw,PM;function SB(){if(PM)return Rw;PM=1;var e=Ir(),t=BO(),n=wQ(),r=jB();function a(i,l){return e(i)?i:t(i,l)?[i]:n(r(i))}return Rw=a,Rw}var Dw,MM;function Kg(){if(MM)return Dw;MM=1;var e=Iu();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Dw=t,Dw}var $w,RM;function WO(){if(RM)return $w;RM=1;var e=SB(),t=Kg();function n(r,a){a=e(a,r);for(var i=0,l=a.length;r!=null&&i<l;)r=r[t(a[i++])];return i&&i==l?r:void 0}return $w=n,$w}var Iw,DM;function _B(){if(DM)return Iw;DM=1;var e=WO();function t(n,r,a){var i=n==null?void 0:e(n,r);return i===void 0?a:i}return Iw=t,Iw}var SQ=_B();const ea=St(SQ);var Lw,$M;function _Q(){if($M)return Lw;$M=1;function e(t){return t==null}return Lw=e,Lw}var NQ=_Q();const Ge=St(NQ);var Bw,IM;function OQ(){if(IM)return Bw;IM=1;var e=so(),t=Ir(),n=lo(),r="[object String]";function a(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return Bw=a,Bw}var CQ=OQ();const sl=St(CQ);var EQ=zO();const We=St(EQ);var AQ=rs();const Lu=St(AQ);var zw={exports:{}},xt={};var LM;function TQ(){if(LM)return xt;LM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),j;j=Symbol.for("react.module.reference");function b(w){if(typeof w=="object"&&w!==null){var N=w.$$typeof;switch(N){case e:switch(w=w.type,w){case n:case a:case r:case f:case m:return w;default:switch(w=w&&w.$$typeof,w){case u:case l:case d:case g:case p:case i:return w;default:return N}}case t:return N}}}return xt.ContextConsumer=l,xt.ContextProvider=i,xt.Element=e,xt.ForwardRef=d,xt.Fragment=n,xt.Lazy=g,xt.Memo=p,xt.Portal=t,xt.Profiler=a,xt.StrictMode=r,xt.Suspense=f,xt.SuspenseList=m,xt.isAsyncMode=function(){return!1},xt.isConcurrentMode=function(){return!1},xt.isContextConsumer=function(w){return b(w)===l},xt.isContextProvider=function(w){return b(w)===i},xt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},xt.isForwardRef=function(w){return b(w)===d},xt.isFragment=function(w){return b(w)===n},xt.isLazy=function(w){return b(w)===g},xt.isMemo=function(w){return b(w)===p},xt.isPortal=function(w){return b(w)===t},xt.isProfiler=function(w){return b(w)===a},xt.isStrictMode=function(w){return b(w)===r},xt.isSuspense=function(w){return b(w)===f},xt.isSuspenseList=function(w){return b(w)===m},xt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===a||w===r||w===f||w===m||w===x||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===i||w.$$typeof===l||w.$$typeof===d||w.$$typeof===j||w.getModuleId!==void 0)},xt.typeOf=b,xt}var BM;function kQ(){return BM||(BM=1,zw.exports=TQ()),zw.exports}var PQ=kQ(),qw,zM;function NB(){if(zM)return qw;zM=1;var e=so(),t=lo(),n="[object Number]";function r(a){return typeof a=="number"||t(a)&&e(a)==n}return qw=r,qw}var Fw,qM;function MQ(){if(qM)return Fw;qM=1;var e=NB();function t(n){return e(n)&&n!=+n}return Fw=t,Fw}var RQ=MQ();const Ch=St(RQ);var DQ=NB();const $Q=St(DQ);var xr=function(t){return t===0?0:t>0?1:-1},Us=function(t){return sl(t)&&t.indexOf("%")===t.length-1},Oe=function(t){return $Q(t)&&!Ch(t)},IQ=function(t){return Ge(t)},kn=function(t){return Oe(t)||sl(t)},LQ=0,Bu=function(t){var n=++LQ;return"".concat(t||"").concat(n)},br=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(!Oe(t)&&!sl(t))return r;var i;if(Us(t)){var l=t.indexOf("%");i=n*parseFloat(t.slice(0,l))/100}else i=+t;return Ch(i)&&(i=r),a&&i>n&&(i=n),i},qo=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},BQ=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},Zr=function(t,n){return Oe(t)&&Oe(n)?function(r){return t+r*(n-t)}:function(){return n}};function bv(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ea(r,t))===n})}var zQ=function(t,n){return Oe(t)&&Oe(n)?t-n:sl(t)&&sl(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function zc(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 y_(e){"@babel/helpers - typeof";return y_=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},y_(e)}var qQ=["viewBox","children"],FQ=["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"],FM=["points","pathLength"],Uw={svg:qQ,polygon:FM,polyline:FM},VO=["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"],wv=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(y.isValidElement(t)&&(r=t.props),!Lu(r))return null;var a={};return Object.keys(r).forEach(function(i){VO.includes(i)&&(a[i]=n||function(l){return r[i](r,l)})}),a},UQ=function(t,n,r){return function(a){return t(n,r,a),null}},ll=function(t,n,r){if(!Lu(t)||y_(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var l=t[i];VO.includes(i)&&typeof l=="function"&&(a||(a={}),a[i]=UQ(l,n,r))}),a},HQ=["children"],WQ=["children"];function UM(e,t){if(e==null)return{};var n=VQ(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 VQ(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 x_(e){"@babel/helpers - typeof";return x_=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},x_(e)}var HM={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"},Zi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},WM=null,Hw=null,GO=function e(t){if(t===WM&&Array.isArray(Hw))return Hw;var n=[];return y.Children.forEach(t,function(r){Ge(r)||(PQ.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Hw=n,WM=t,n};function ta(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Zi(a)}):r=[Zi(t)],GO(e).forEach(function(a){var i=ea(a,"type.displayName")||ea(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Yr(e,t){var n=ta(e,t);return n&&n[0]}var VM=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Oe(r)||r<=0||!Oe(a)||a<=0)},GQ=["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"],YQ=function(t){return t&&t.type&&sl(t.type)&&GQ.indexOf(t.type)>=0},KQ=function(t){return t&&x_(t)==="object"&&"clipDot"in t},XQ=function(t,n,r,a){var i,l=(i=Uw?.[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!We(t)&&(a&&l.includes(n)||FQ.includes(n))||r&&VO.includes(n)},Be=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(y.isValidElement(t)&&(a=t.props),!Lu(a))return null;var i={};return Object.keys(a).forEach(function(l){var u;XQ((u=a)===null||u===void 0?void 0:u[l],l,n,r)&&(i[l]=a[l])}),i},b_=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return GM(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(!GM(i,l))return!1}return!0},GM=function(t,n){if(Ge(t)&&Ge(n))return!0;if(!Ge(t)&&!Ge(n)){var r=t.props||{},a=r.children,i=UM(r,HQ),l=n.props||{},u=l.children,d=UM(l,WQ);return a&&u?zc(i,d)&&b_(a,u):!a&&!u?zc(i,d):!1}return!1},YM=function(t,n){var r=[],a={};return GO(t).forEach(function(i,l){if(YQ(i))r.push(i);else if(i){var u=Zi(i.type),d=n[u]||{},f=d.handler,m=d.once;if(f&&(!m||!a[u])){var p=f(i,u,l);r.push(p),a[u]=!0}}}),r},ZQ=function(t){var n=t&&t.type;return n&&HM[n]?HM[n]:null},QQ=function(t,n){return GO(n).indexOf(t)},JQ=["children","width","height","viewBox","className","style","title","desc"];function w_(){return w_=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},w_.apply(this,arguments)}function eJ(e,t){if(e==null)return{};var n=tJ(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 tJ(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 j_(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,l=e.style,u=e.title,d=e.desc,f=eJ(e,JQ),m=a||{width:n,height:r,x:0,y:0},p=Ye("recharts-surface",i);return W.createElement("svg",w_({},Be(f,!0,"svg"),{className:p,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),W.createElement("title",null,u),W.createElement("desc",null,d),t)}var nJ=["children","className"];function S_(){return S_=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},S_.apply(this,arguments)}function rJ(e,t){if(e==null)return{};var n=aJ(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 aJ(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 pt=W.forwardRef(function(e,t){var n=e.children,r=e.className,a=rJ(e,nJ),i=Ye("recharts-layer",r);return W.createElement("g",S_({className:i},Be(a,!0),{ref:t}),n)}),za=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]},Ww,KM;function iJ(){if(KM)return Ww;KM=1;function e(t,n,r){var a=-1,i=t.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(i);++a<i;)l[a]=t[a+n];return l}return Ww=e,Ww}var Vw,XM;function oJ(){if(XM)return Vw;XM=1;var e=iJ();function t(n,r,a){var i=n.length;return a=a===void 0?i:a,!r&&a>=i?n:e(n,r,a)}return Vw=t,Vw}var Gw,ZM;function OB(){if(ZM)return Gw;ZM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+e+a+i+"]");function d(f){return u.test(f)}return Gw=d,Gw}var Yw,QM;function sJ(){if(QM)return Yw;QM=1;function e(t){return t.split("")}return Yw=e,Yw}var Kw,JM;function lJ(){if(JM)return Kw;JM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",l="["+e+"]",u="["+a+"]",d="\\ud83c[\\udffb-\\udfff]",f="(?:"+u+"|"+d+")",m="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",j=f+"?",b="["+i+"]?",w="(?:"+x+"(?:"+[m,p,g].join("|")+")"+b+j+")*",N=b+j+w,O="(?:"+[m+u+"?",u,p,g,l].join("|")+")",C=RegExp(d+"(?="+d+")|"+O+N,"g");function A(E){return E.match(C)||[]}return Kw=A,Kw}var Xw,eR;function cJ(){if(eR)return Xw;eR=1;var e=sJ(),t=OB(),n=lJ();function r(a){return t(a)?n(a):e(a)}return Xw=r,Xw}var Zw,tR;function uJ(){if(tR)return Zw;tR=1;var e=oJ(),t=OB(),n=cJ(),r=jB();function a(i){return function(l){l=r(l);var u=t(l)?n(l):void 0,d=u?u[0]:l.charAt(0),f=u?e(u,1).join(""):l.slice(1);return d[i]()+f}}return Zw=a,Zw}var Qw,nR;function dJ(){if(nR)return Qw;nR=1;var e=uJ(),t=e("toUpperCase");return Qw=t,Qw}var fJ=dJ();const Xg=St(fJ);function zt(e){return function(){return e}}const CB=Math.cos,jv=Math.sin,Wa=Math.sqrt,Sv=Math.PI,Zg=2*Sv,__=Math.PI,N_=2*__,Ls=1e-6,hJ=N_-Ls;function EB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function mJ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return EB;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 pJ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?EB:mJ(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,u=this._y1,d=r-t,f=a-n,m=l-t,p=u-n,g=m*m+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>Ls)if(!(Math.abs(p*d-f*m)>Ls)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-l,j=a-u,b=d*d+f*f,w=x*x+j*j,N=Math.sqrt(b),O=Math.sqrt(g),C=i*Math.tan((__-Math.acos((b+g-w)/(2*N*O)))/2),A=C/O,E=C/N;Math.abs(A-1)>Ls&&this._append`L${t+A*m},${n+A*p}`,this._append`A${i},${i},0,0,${+(p*x>m*j)},${this._x1=t+E*d},${this._y1=n+E*f}`}}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 u=r*Math.cos(a),d=r*Math.sin(a),f=t+u,m=n+d,p=1^l,g=l?a-i:i-a;this._x1===null?this._append`M${f},${m}`:(Math.abs(this._x1-f)>Ls||Math.abs(this._y1-m)>Ls)&&this._append`L${f},${m}`,r&&(g<0&&(g=g%N_+N_),g>hJ?this._append`A${r},${r},0,1,${p},${t-u},${n-d}A${r},${r},0,1,${p},${this._x1=f},${this._y1=m}`:g>Ls&&this._append`A${r},${r},0,${+(g>=__)},${p},${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 YO(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 pJ(t)}function KO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function AB(e){this._context=e}AB.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 Qg(e){return new AB(e)}function TB(e){return e[0]}function kB(e){return e[1]}function PB(e,t){var n=zt(!0),r=null,a=Qg,i=null,l=YO(u);e=typeof e=="function"?e:e===void 0?TB:zt(e),t=typeof t=="function"?t:t===void 0?kB:zt(t);function u(d){var f,m=(d=KO(d)).length,p,g=!1,x;for(r==null&&(i=a(x=l())),f=0;f<=m;++f)!(f<m&&n(p=d[f],f,d))===g&&((g=!g)?i.lineStart():i.lineEnd()),g&&i.point(+e(p,f,d),+t(p,f,d));if(x)return i=null,x+""||null}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:zt(+d),u):e},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:zt(+d),u):t},u.defined=function(d){return arguments.length?(n=typeof d=="function"?d:zt(!!d),u):n},u.curve=function(d){return arguments.length?(a=d,r!=null&&(i=a(r)),u):a},u.context=function(d){return arguments.length?(d==null?r=i=null:i=a(r=d),u):r},u}function Op(e,t,n){var r=null,a=zt(!0),i=null,l=Qg,u=null,d=YO(f);e=typeof e=="function"?e:e===void 0?TB:zt(+e),t=typeof t=="function"?t:zt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?kB:zt(+n);function f(p){var g,x,j,b=(p=KO(p)).length,w,N=!1,O,C=new Array(b),A=new Array(b);for(i==null&&(u=l(O=d())),g=0;g<=b;++g){if(!(g<b&&a(w=p[g],g,p))===N)if(N=!N)x=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),j=g-1;j>=x;--j)u.point(C[j],A[j]);u.lineEnd(),u.areaEnd()}N&&(C[g]=+e(w,g,p),A[g]=+t(w,g,p),u.point(r?+r(w,g,p):C[g],n?+n(w,g,p):A[g]))}if(O)return u=null,O+""||null}function m(){return PB().defined(a).curve(l).context(i)}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:zt(+p),r=null,f):e},f.x0=function(p){return arguments.length?(e=typeof p=="function"?p:zt(+p),f):e},f.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:zt(+p),f):r},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:zt(+p),n=null,f):t},f.y0=function(p){return arguments.length?(t=typeof p=="function"?p:zt(+p),f):t},f.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:zt(+p),f):n},f.lineX0=f.lineY0=function(){return m().x(e).y(t)},f.lineY1=function(){return m().x(e).y(n)},f.lineX1=function(){return m().x(r).y(t)},f.defined=function(p){return arguments.length?(a=typeof p=="function"?p:zt(!!p),f):a},f.curve=function(p){return arguments.length?(l=p,i!=null&&(u=l(i)),f):l},f.context=function(p){return arguments.length?(p==null?i=u=null:u=l(i=p),f):i},f}class MB{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 vJ(e){return new MB(e,!0)}function gJ(e){return new MB(e,!1)}const XO={draw(e,t){const n=Wa(t/Sv);e.moveTo(n,0),e.arc(0,0,n,0,Zg)}},yJ={draw(e,t){const n=Wa(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()}},RB=Wa(1/3),xJ=RB*2,bJ={draw(e,t){const n=Wa(t/xJ),r=n*RB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},wJ={draw(e,t){const n=Wa(t),r=-n/2;e.rect(r,r,n,n)}},jJ=.8908130915292852,DB=jv(Sv/10)/jv(7*Sv/10),SJ=jv(Zg/10)*DB,_J=-CB(Zg/10)*DB,NJ={draw(e,t){const n=Wa(t*jJ),r=SJ*n,a=_J*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const l=Zg*i/5,u=CB(l),d=jv(l);e.lineTo(d*n,-u*n),e.lineTo(u*r-d*a,d*r+u*a)}e.closePath()}},Jw=Wa(3),OJ={draw(e,t){const n=-Wa(t/(Jw*3));e.moveTo(0,n*2),e.lineTo(-Jw*n,-n),e.lineTo(Jw*n,-n),e.closePath()}},va=-.5,ga=Wa(3)/2,O_=1/Wa(12),CJ=(O_/2+1)*3,EJ={draw(e,t){const n=Wa(t/CJ),r=n/2,a=n*O_,i=r,l=n*O_+n,u=-i,d=l;e.moveTo(r,a),e.lineTo(i,l),e.lineTo(u,d),e.lineTo(va*r-ga*a,ga*r+va*a),e.lineTo(va*i-ga*l,ga*i+va*l),e.lineTo(va*u-ga*d,ga*u+va*d),e.lineTo(va*r+ga*a,va*a-ga*r),e.lineTo(va*i+ga*l,va*l-ga*i),e.lineTo(va*u+ga*d,va*d-ga*u),e.closePath()}};function AJ(e,t){let n=null,r=YO(a);e=typeof e=="function"?e:zt(e||XO),t=typeof t=="function"?t:zt(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:zt(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:zt(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function _v(){}function Nv(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 $B(e){this._context=e}$B.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:Nv(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:Nv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TJ(e){return new $B(e)}function IB(e){this._context=e}IB.prototype={areaStart:_v,areaEnd:_v,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:Nv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kJ(e){return new IB(e)}function LB(e){this._context=e}LB.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:Nv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PJ(e){return new LB(e)}function BB(e){this._context=e}BB.prototype={areaStart:_v,areaEnd:_v,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 MJ(e){return new BB(e)}function rR(e){return e<0?-1:1}function aR(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),u=(i*a+l*r)/(r+a);return(rR(i)+rR(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(u))||0}function iR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ej(e,t,n){var r=e._x0,a=e._y0,i=e._x1,l=e._y1,u=(i-r)/3;e._context.bezierCurveTo(r+u,a+u*t,i-u,l-u*n,i,l)}function Ov(e){this._context=e}Ov.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:ej(this,this._t0,iR(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,ej(this,iR(this,n=aR(this,e,t)),n);break;default:ej(this,this._t0,n=aR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function zB(e){this._context=new qB(e)}(zB.prototype=Object.create(Ov.prototype)).point=function(e,t){Ov.prototype.point.call(this,t,e)};function qB(e){this._context=e}qB.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 RJ(e){return new Ov(e)}function DJ(e){return new zB(e)}function FB(e){this._context=e}FB.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=oR(e),a=oR(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 oR(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 $J(e){return new FB(e)}function Jg(e,t){this._context=e,this._t=t}Jg.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 IJ(e){return new Jg(e,.5)}function LJ(e){return new Jg(e,0)}function BJ(e){return new Jg(e,1)}function tu(e,t){if((l=e.length)>1)for(var n=1,r,a,i=e[t[0]],l,u=i.length;n<l;++n)for(a=i,i=e[t[n]],r=0;r<u;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function C_(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function zJ(e,t){return e[t]}function qJ(e){const t=[];return t.key=e,t}function FJ(){var e=zt([]),t=C_,n=tu,r=zJ;function a(i){var l=Array.from(e.apply(this,arguments),qJ),u,d=l.length,f=-1,m;for(const p of i)for(u=0,++f;u<d;++u)(l[u][f]=[0,+r(p,l[u].key,f,i)]).data=p;for(u=0,m=KO(t(l));u<d;++u)l[m[u]].index=u;return n(l,m),l}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:zt(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:zt(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?C_:typeof i=="function"?i:zt(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??tu,a):n},a}function UJ(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}tu(e,t)}}function HJ(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,u=0;l<a;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}tu(e,t)}}function WJ(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 u=0,d=0,f=0;u<l;++u){for(var m=e[t[u]],p=m[r][1]||0,g=m[r-1][1]||0,x=(p-g)/2,j=0;j<u;++j){var b=e[t[j]],w=b[r][1]||0,N=b[r-1][1]||0;x+=w-N}d+=p,f+=x*p}a[r-1][1]+=a[r-1][0]=n,d&&(n-=f/d)}a[r-1][1]+=a[r-1][0]=n,tu(e,t)}}function Cf(e){"@babel/helpers - typeof";return Cf=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},Cf(e)}var VJ=["type","size","sizeType"];function E_(){return E_=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},E_.apply(this,arguments)}function sR(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 lR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sR(Object(n),!0).forEach(function(r){GJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GJ(e,t,n){return t=YJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YJ(e){var t=KJ(e,"string");return Cf(t)=="symbol"?t:t+""}function KJ(e,t){if(Cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XJ(e,t){if(e==null)return{};var n=ZJ(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 ZJ(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 UB={symbolCircle:XO,symbolCross:yJ,symbolDiamond:bJ,symbolSquare:wJ,symbolStar:NJ,symbolTriangle:OJ,symbolWye:EJ},QJ=Math.PI/180,JJ=function(t){var n="symbol".concat(Xg(t));return UB[n]||XO},eee=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*QJ;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}},tee=function(t,n){UB["symbol".concat(Xg(t))]=n},ZO=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,l=t.sizeType,u=l===void 0?"area":l,d=XJ(t,VJ),f=lR(lR({},d),{},{type:r,size:i,sizeType:u}),m=function(){var w=JJ(r),N=AJ().type(w).size(eee(i,u,r));return N()},p=f.className,g=f.cx,x=f.cy,j=Be(f,!0);return g===+g&&x===+x&&i===+i?W.createElement("path",E_({},j,{className:Ye("recharts-symbols",p),transform:"translate(".concat(g,", ").concat(x,")"),d:m()})):null};ZO.registerSymbol=tee;function nu(e){"@babel/helpers - typeof";return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nu(e)}function A_(){return A_=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},A_.apply(this,arguments)}function cR(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 nee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cR(Object(n),!0).forEach(function(r){Ef(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ree(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aee(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,WB(r.key),r)}}function iee(e,t,n){return t&&aee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oee(e,t,n){return t=Cv(t),see(e,HB()?Reflect.construct(t,n||[],Cv(e).constructor):t.apply(e,n))}function see(e,t){if(t&&(nu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lee(e)}function lee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HB=function(){return!!e})()}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function cee(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&&T_(e,t)}function T_(e,t){return T_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},T_(e,t)}function Ef(e,t,n){return t=WB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WB(e){var t=uee(e,"string");return nu(t)=="symbol"?t:t+""}function uee(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 String(e)}var ya=32,QO=(function(e){function t(){return ree(this,t),oee(this,t,arguments)}return cee(t,e),iee(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=ya/2,l=ya/6,u=ya/3,d=r.inactive?a:r.color;if(r.type==="plainline")return W.createElement("line",{strokeWidth:4,fill:"none",stroke:d,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:ya,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return W.createElement("path",{strokeWidth:4,fill:"none",stroke:d,d:"M0,".concat(i,"h").concat(u,`
|
||
A`).concat(l,",").concat(l,",0,1,1,").concat(2*u,",").concat(i,`
|
||
H`).concat(ya,"M").concat(2*u,",").concat(i,`
|
||
A`).concat(l,",").concat(l,",0,1,1,").concat(u,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return W.createElement("path",{stroke:"none",fill:d,d:"M0,".concat(ya/8,"h").concat(ya,"v").concat(ya*3/4,"h").concat(-ya,"z"),className:"recharts-legend-icon"});if(W.isValidElement(r.legendIcon)){var f=nee({},r);return delete f.legendIcon,W.cloneElement(r.legendIcon,f)}return W.createElement(ZO,{fill:d,cx:i,cy:i,size:ya,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,l=a.iconSize,u=a.layout,d=a.formatter,f=a.inactiveColor,m={x:0,y:0,width:ya,height:ya},p={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(x,j){var b=x.formatter||d,w=Ye(Ef(Ef({"recharts-legend-item":!0},"legend-item-".concat(j),!0),"inactive",x.inactive));if(x.type==="none")return null;var N=We(x.value)?null:x.value;za(!We(x.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 O=x.inactive?f:x.color;return W.createElement("li",A_({className:w,style:p,key:"legend-item-".concat(j)},ll(r.props,x,j)),W.createElement(j_,{width:l,height:l,viewBox:m,style:g},r.renderIcon(x)),W.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},b?b(N,x,j):N))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,l=r.align;if(!a||!a.length)return null;var u={padding:0,margin:0,textAlign:i==="horizontal"?l:"left"};return W.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(y.PureComponent);Ef(QO,"displayName","Legend");Ef(QO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var tj,uR;function dee(){if(uR)return tj;uR=1;var e=Gg();function t(){this.__data__=new e,this.size=0}return tj=t,tj}var nj,dR;function fee(){if(dR)return nj;dR=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return nj=e,nj}var rj,fR;function hee(){if(fR)return rj;fR=1;function e(t){return this.__data__.get(t)}return rj=e,rj}var aj,hR;function mee(){if(hR)return aj;hR=1;function e(t){return this.__data__.has(t)}return aj=e,aj}var ij,mR;function pee(){if(mR)return ij;mR=1;var e=Gg(),t=FO(),n=UO(),r=200;function a(i,l){var u=this.__data__;if(u instanceof e){var d=u.__data__;if(!t||d.length<r-1)return d.push([i,l]),this.size=++u.size,this;u=this.__data__=new n(d)}return u.set(i,l),this.size=u.size,this}return ij=a,ij}var oj,pR;function VB(){if(pR)return oj;pR=1;var e=Gg(),t=dee(),n=fee(),r=hee(),a=mee(),i=pee();function l(u){var d=this.__data__=new e(u);this.size=d.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=a,l.prototype.set=i,oj=l,oj}var sj,vR;function vee(){if(vR)return sj;vR=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return sj=t,sj}var lj,gR;function gee(){if(gR)return lj;gR=1;function e(t){return this.__data__.has(t)}return lj=e,lj}var cj,yR;function GB(){if(yR)return cj;yR=1;var e=UO(),t=vee(),n=gee();function r(a){var i=-1,l=a==null?0:a.length;for(this.__data__=new e;++i<l;)this.add(a[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,cj=r,cj}var uj,xR;function YB(){if(xR)return uj;xR=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return uj=e,uj}var dj,bR;function KB(){if(bR)return dj;bR=1;function e(t,n){return t.has(n)}return dj=e,dj}var fj,wR;function XB(){if(wR)return fj;wR=1;var e=GB(),t=YB(),n=KB(),r=1,a=2;function i(l,u,d,f,m,p){var g=d&r,x=l.length,j=u.length;if(x!=j&&!(g&&j>x))return!1;var b=p.get(l),w=p.get(u);if(b&&w)return b==u&&w==l;var N=-1,O=!0,C=d&a?new e:void 0;for(p.set(l,u),p.set(u,l);++N<x;){var A=l[N],E=u[N];if(f)var k=g?f(E,A,N,u,l,p):f(A,E,N,l,u,p);if(k!==void 0){if(k)continue;O=!1;break}if(C){if(!t(u,function(T,P){if(!n(C,P)&&(A===T||m(A,T,d,f,p)))return C.push(P)})){O=!1;break}}else if(!(A===E||m(A,E,d,f,p))){O=!1;break}}return p.delete(l),p.delete(u),O}return fj=i,fj}var hj,jR;function yee(){if(jR)return hj;jR=1;var e=yi(),t=e.Uint8Array;return hj=t,hj}var mj,SR;function xee(){if(SR)return mj;SR=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,i){r[++n]=[i,a]}),r}return mj=e,mj}var pj,_R;function JO(){if(_R)return pj;_R=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return pj=e,pj}var vj,NR;function bee(){if(NR)return vj;NR=1;var e=Oh(),t=yee(),n=qO(),r=XB(),a=xee(),i=JO(),l=1,u=2,d="[object Boolean]",f="[object Date]",m="[object Error]",p="[object Map]",g="[object Number]",x="[object RegExp]",j="[object Set]",b="[object String]",w="[object Symbol]",N="[object ArrayBuffer]",O="[object DataView]",C=e?e.prototype:void 0,A=C?C.valueOf:void 0;function E(k,T,P,$,z,D,U){switch(P){case O:if(k.byteLength!=T.byteLength||k.byteOffset!=T.byteOffset)return!1;k=k.buffer,T=T.buffer;case N:return!(k.byteLength!=T.byteLength||!D(new t(k),new t(T)));case d:case f:case g:return n(+k,+T);case m:return k.name==T.name&&k.message==T.message;case x:case b:return k==T+"";case p:var V=a;case j:var H=$&l;if(V||(V=i),k.size!=T.size&&!H)return!1;var G=U.get(k);if(G)return G==T;$|=u,U.set(k,T);var L=r(V(k),V(T),$,z,D,U);return U.delete(k),L;case w:if(A)return A.call(k)==A.call(T)}return!1}return vj=E,vj}var gj,OR;function ZB(){if(OR)return gj;OR=1;function e(t,n){for(var r=-1,a=n.length,i=t.length;++r<a;)t[i+r]=n[r];return t}return gj=e,gj}var yj,CR;function wee(){if(CR)return yj;CR=1;var e=ZB(),t=Ir();function n(r,a,i){var l=a(r);return t(r)?l:e(l,i(r))}return yj=n,yj}var xj,ER;function jee(){if(ER)return xj;ER=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=0,l=[];++r<a;){var u=t[r];n(u,r,t)&&(l[i++]=u)}return l}return xj=e,xj}var bj,AR;function See(){if(AR)return bj;AR=1;function e(){return[]}return bj=e,bj}var wj,TR;function _ee(){if(TR)return wj;TR=1;var e=jee(),t=See(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(l){return l==null?[]:(l=Object(l),e(a(l),function(u){return r.call(l,u)}))}:t;return wj=i,wj}var jj,kR;function Nee(){if(kR)return jj;kR=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return jj=e,jj}var Sj,PR;function Oee(){if(PR)return Sj;PR=1;var e=so(),t=lo(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return Sj=r,Sj}var _j,MR;function eC(){if(MR)return _j;MR=1;var e=Oee(),t=lo(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!a.call(l,"callee")};return _j=i,_j}var sf={exports:{}},Nj,RR;function Cee(){if(RR)return Nj;RR=1;function e(){return!1}return Nj=e,Nj}sf.exports;var DR;function QB(){return DR||(DR=1,(function(e,t){var n=yi(),r=Cee(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===a,u=l?n.Buffer:void 0,d=u?u.isBuffer:void 0,f=d||r;e.exports=f})(sf,sf.exports)),sf.exports}var Oj,$R;function tC(){if($R)return Oj;$R=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var i=typeof r;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return Oj=n,Oj}var Cj,IR;function nC(){if(IR)return Cj;IR=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Cj=t,Cj}var Ej,LR;function Eee(){if(LR)return Ej;LR=1;var e=so(),t=nC(),n=lo(),r="[object Arguments]",a="[object Array]",i="[object Boolean]",l="[object Date]",u="[object Error]",d="[object Function]",f="[object Map]",m="[object Number]",p="[object Object]",g="[object RegExp]",x="[object Set]",j="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",N="[object DataView]",O="[object Float32Array]",C="[object Float64Array]",A="[object Int8Array]",E="[object Int16Array]",k="[object Int32Array]",T="[object Uint8Array]",P="[object Uint8ClampedArray]",$="[object Uint16Array]",z="[object Uint32Array]",D={};D[O]=D[C]=D[A]=D[E]=D[k]=D[T]=D[P]=D[$]=D[z]=!0,D[r]=D[a]=D[w]=D[i]=D[N]=D[l]=D[u]=D[d]=D[f]=D[m]=D[p]=D[g]=D[x]=D[j]=D[b]=!1;function U(V){return n(V)&&t(V.length)&&!!D[e(V)]}return Ej=U,Ej}var Aj,BR;function JB(){if(BR)return Aj;BR=1;function e(t){return function(n){return t(n)}}return Aj=e,Aj}var lf={exports:{}};lf.exports;var zR;function Aee(){return zR||(zR=1,(function(e,t){var n=xB(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i&&n.process,u=(function(){try{var d=a&&a.require&&a.require("util").types;return d||l&&l.binding&&l.binding("util")}catch{}})();e.exports=u})(lf,lf.exports)),lf.exports}var Tj,qR;function ez(){if(qR)return Tj;qR=1;var e=Eee(),t=JB(),n=Aee(),r=n&&n.isTypedArray,a=r?t(r):e;return Tj=a,Tj}var kj,FR;function Tee(){if(FR)return kj;FR=1;var e=Nee(),t=eC(),n=Ir(),r=QB(),a=tC(),i=ez(),l=Object.prototype,u=l.hasOwnProperty;function d(f,m){var p=n(f),g=!p&&t(f),x=!p&&!g&&r(f),j=!p&&!g&&!x&&i(f),b=p||g||x||j,w=b?e(f.length,String):[],N=w.length;for(var O in f)(m||u.call(f,O))&&!(b&&(O=="length"||x&&(O=="offset"||O=="parent")||j&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||a(O,N)))&&w.push(O);return w}return kj=d,kj}var Pj,UR;function kee(){if(UR)return Pj;UR=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return Pj=t,Pj}var Mj,HR;function tz(){if(HR)return Mj;HR=1;function e(t,n){return function(r){return t(n(r))}}return Mj=e,Mj}var Rj,WR;function Pee(){if(WR)return Rj;WR=1;var e=tz(),t=e(Object.keys,Object);return Rj=t,Rj}var Dj,VR;function Mee(){if(VR)return Dj;VR=1;var e=kee(),t=Pee(),n=Object.prototype,r=n.hasOwnProperty;function a(i){if(!e(i))return t(i);var l=[];for(var u in Object(i))r.call(i,u)&&u!="constructor"&&l.push(u);return l}return Dj=a,Dj}var $j,GR;function Eh(){if(GR)return $j;GR=1;var e=zO(),t=nC();function n(r){return r!=null&&t(r.length)&&!e(r)}return $j=n,$j}var Ij,YR;function ey(){if(YR)return Ij;YR=1;var e=Tee(),t=Mee(),n=Eh();function r(a){return n(a)?e(a):t(a)}return Ij=r,Ij}var Lj,KR;function Ree(){if(KR)return Lj;KR=1;var e=wee(),t=_ee(),n=ey();function r(a){return e(a,n,t)}return Lj=r,Lj}var Bj,XR;function Dee(){if(XR)return Bj;XR=1;var e=Ree(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(i,l,u,d,f,m){var p=u&t,g=e(i),x=g.length,j=e(l),b=j.length;if(x!=b&&!p)return!1;for(var w=x;w--;){var N=g[w];if(!(p?N in l:r.call(l,N)))return!1}var O=m.get(i),C=m.get(l);if(O&&C)return O==l&&C==i;var A=!0;m.set(i,l),m.set(l,i);for(var E=p;++w<x;){N=g[w];var k=i[N],T=l[N];if(d)var P=p?d(T,k,N,l,i,m):d(k,T,N,i,l,m);if(!(P===void 0?k===T||f(k,T,u,d,m):P)){A=!1;break}E||(E=N=="constructor")}if(A&&!E){var $=i.constructor,z=l.constructor;$!=z&&"constructor"in i&&"constructor"in l&&!(typeof $=="function"&&$ instanceof $&&typeof z=="function"&&z instanceof z)&&(A=!1)}return m.delete(i),m.delete(l),A}return Bj=a,Bj}var zj,ZR;function $ee(){if(ZR)return zj;ZR=1;var e=yl(),t=yi(),n=e(t,"DataView");return zj=n,zj}var qj,QR;function Iee(){if(QR)return qj;QR=1;var e=yl(),t=yi(),n=e(t,"Promise");return qj=n,qj}var Fj,JR;function nz(){if(JR)return Fj;JR=1;var e=yl(),t=yi(),n=e(t,"Set");return Fj=n,Fj}var Uj,eD;function Lee(){if(eD)return Uj;eD=1;var e=yl(),t=yi(),n=e(t,"WeakMap");return Uj=n,Uj}var Hj,tD;function Bee(){if(tD)return Hj;tD=1;var e=$ee(),t=FO(),n=Iee(),r=nz(),a=Lee(),i=so(),l=bB(),u="[object Map]",d="[object Object]",f="[object Promise]",m="[object Set]",p="[object WeakMap]",g="[object DataView]",x=l(e),j=l(t),b=l(n),w=l(r),N=l(a),O=i;return(e&&O(new e(new ArrayBuffer(1)))!=g||t&&O(new t)!=u||n&&O(n.resolve())!=f||r&&O(new r)!=m||a&&O(new a)!=p)&&(O=function(C){var A=i(C),E=A==d?C.constructor:void 0,k=E?l(E):"";if(k)switch(k){case x:return g;case j:return u;case b:return f;case w:return m;case N:return p}return A}),Hj=O,Hj}var Wj,nD;function zee(){if(nD)return Wj;nD=1;var e=VB(),t=XB(),n=bee(),r=Dee(),a=Bee(),i=Ir(),l=QB(),u=ez(),d=1,f="[object Arguments]",m="[object Array]",p="[object Object]",g=Object.prototype,x=g.hasOwnProperty;function j(b,w,N,O,C,A){var E=i(b),k=i(w),T=E?m:a(b),P=k?m:a(w);T=T==f?p:T,P=P==f?p:P;var $=T==p,z=P==p,D=T==P;if(D&&l(b)){if(!l(w))return!1;E=!0,$=!1}if(D&&!$)return A||(A=new e),E||u(b)?t(b,w,N,O,C,A):n(b,w,T,N,O,C,A);if(!(N&d)){var U=$&&x.call(b,"__wrapped__"),V=z&&x.call(w,"__wrapped__");if(U||V){var H=U?b.value():b,G=V?w.value():w;return A||(A=new e),C(H,G,N,O,A)}}return D?(A||(A=new e),r(b,w,N,O,C,A)):!1}return Wj=j,Wj}var Vj,rD;function rC(){if(rD)return Vj;rD=1;var e=zee(),t=lo();function n(r,a,i,l,u){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,i,l,n,u)}return Vj=n,Vj}var Gj,aD;function qee(){if(aD)return Gj;aD=1;var e=VB(),t=rC(),n=1,r=2;function a(i,l,u,d){var f=u.length,m=f,p=!d;if(i==null)return!m;for(i=Object(i);f--;){var g=u[f];if(p&&g[2]?g[1]!==i[g[0]]:!(g[0]in i))return!1}for(;++f<m;){g=u[f];var x=g[0],j=i[x],b=g[1];if(p&&g[2]){if(j===void 0&&!(x in i))return!1}else{var w=new e;if(d)var N=d(j,b,x,i,l,w);if(!(N===void 0?t(b,j,n|r,d,w):N))return!1}}return!0}return Gj=a,Gj}var Yj,iD;function rz(){if(iD)return Yj;iD=1;var e=rs();function t(n){return n===n&&!e(n)}return Yj=t,Yj}var Kj,oD;function Fee(){if(oD)return Kj;oD=1;var e=rz(),t=ey();function n(r){for(var a=t(r),i=a.length;i--;){var l=a[i],u=r[l];a[i]=[l,u,e(u)]}return a}return Kj=n,Kj}var Xj,sD;function az(){if(sD)return Xj;sD=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Xj=e,Xj}var Zj,lD;function Uee(){if(lD)return Zj;lD=1;var e=qee(),t=Fee(),n=az();function r(a){var i=t(a);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(l){return l===a||e(l,a,i)}}return Zj=r,Zj}var Qj,cD;function Hee(){if(cD)return Qj;cD=1;function e(t,n){return t!=null&&n in Object(t)}return Qj=e,Qj}var Jj,uD;function Wee(){if(uD)return Jj;uD=1;var e=SB(),t=eC(),n=Ir(),r=tC(),a=nC(),i=Kg();function l(u,d,f){d=e(d,u);for(var m=-1,p=d.length,g=!1;++m<p;){var x=i(d[m]);if(!(g=u!=null&&f(u,x)))break;u=u[x]}return g||++m!=p?g:(p=u==null?0:u.length,!!p&&a(p)&&r(x,p)&&(n(u)||t(u)))}return Jj=l,Jj}var e1,dD;function Vee(){if(dD)return e1;dD=1;var e=Hee(),t=Wee();function n(r,a){return r!=null&&t(r,a,e)}return e1=n,e1}var t1,fD;function Gee(){if(fD)return t1;fD=1;var e=rC(),t=_B(),n=Vee(),r=BO(),a=rz(),i=az(),l=Kg(),u=1,d=2;function f(m,p){return r(m)&&a(p)?i(l(m),p):function(g){var x=t(g,m);return x===void 0&&x===p?n(g,m):e(p,x,u|d)}}return t1=f,t1}var n1,hD;function zu(){if(hD)return n1;hD=1;function e(t){return t}return n1=e,n1}var r1,mD;function Yee(){if(mD)return r1;mD=1;function e(t){return function(n){return n?.[t]}}return r1=e,r1}var a1,pD;function Kee(){if(pD)return a1;pD=1;var e=WO();function t(n){return function(r){return e(r,n)}}return a1=t,a1}var i1,vD;function Xee(){if(vD)return i1;vD=1;var e=Yee(),t=Kee(),n=BO(),r=Kg();function a(i){return n(i)?e(r(i)):t(i)}return i1=a,i1}var o1,gD;function xi(){if(gD)return o1;gD=1;var e=Uee(),t=Gee(),n=zu(),r=Ir(),a=Xee();function i(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):a(l)}return o1=i,o1}var s1,yD;function iz(){if(yD)return s1;yD=1;function e(t,n,r,a){for(var i=t.length,l=r+(a?1:-1);a?l--:++l<i;)if(n(t[l],l,t))return l;return-1}return s1=e,s1}var l1,xD;function Zee(){if(xD)return l1;xD=1;function e(t){return t!==t}return l1=e,l1}var c1,bD;function Qee(){if(bD)return c1;bD=1;function e(t,n,r){for(var a=r-1,i=t.length;++a<i;)if(t[a]===n)return a;return-1}return c1=e,c1}var u1,wD;function Jee(){if(wD)return u1;wD=1;var e=iz(),t=Zee(),n=Qee();function r(a,i,l){return i===i?n(a,i,l):e(a,t,l)}return u1=r,u1}var d1,jD;function ete(){if(jD)return d1;jD=1;var e=Jee();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return d1=t,d1}var f1,SD;function tte(){if(SD)return f1;SD=1;function e(t,n,r){for(var a=-1,i=t==null?0:t.length;++a<i;)if(r(n,t[a]))return!0;return!1}return f1=e,f1}var h1,_D;function nte(){if(_D)return h1;_D=1;function e(){}return h1=e,h1}var m1,ND;function rte(){if(ND)return m1;ND=1;var e=nz(),t=nte(),n=JO(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return m1=a,m1}var p1,OD;function ate(){if(OD)return p1;OD=1;var e=GB(),t=ete(),n=tte(),r=KB(),a=rte(),i=JO(),l=200;function u(d,f,m){var p=-1,g=t,x=d.length,j=!0,b=[],w=b;if(m)j=!1,g=n;else if(x>=l){var N=f?null:a(d);if(N)return i(N);j=!1,g=r,w=new e}else w=f?[]:b;e:for(;++p<x;){var O=d[p],C=f?f(O):O;if(O=m||O!==0?O:0,j&&C===C){for(var A=w.length;A--;)if(w[A]===C)continue e;f&&w.push(C),b.push(O)}else g(w,C,m)||(w!==b&&w.push(C),b.push(O))}return b}return p1=u,p1}var v1,CD;function ite(){if(CD)return v1;CD=1;var e=xi(),t=ate();function n(r,a){return r&&r.length?t(r,e(a,2)):[]}return v1=n,v1}var ote=ite();const ED=St(ote);function oz(e,t,n){return t===!0?ED(e,n):We(t)?ED(e,t):e}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 ste=["ref"];function AD(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 qi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AD(Object(n),!0).forEach(function(r){ty(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TD(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 cte(e,t,n){return t&&TD(e.prototype,t),n&&TD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ute(e,t,n){return t=Ev(t),dte(e,sz()?Reflect.construct(t,n||[],Ev(e).constructor):t.apply(e,n))}function dte(e,t){if(t&&(ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fte(e)}function fte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sz=function(){return!!e})()}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function hte(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&&k_(e,t)}function k_(e,t){return k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},k_(e,t)}function ty(e,t,n){return t=lz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lz(e){var t=mte(e,"string");return ru(t)=="symbol"?t:t+""}function mte(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 String(e)}function pte(e,t){if(e==null)return{};var n=vte(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 vte(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 gte(e){return e.value}function yte(e,t){if(W.isValidElement(e))return W.cloneElement(e,t);if(typeof e=="function")return W.createElement(e,t);t.ref;var n=pte(t,ste);return W.createElement(QO,n)}var kD=1,Qs=(function(e){function t(){var n;lte(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=ute(this,t,[].concat(a)),ty(n,"lastBoundingBox",{width:-1,height:-1}),n}return hte(t,e),cte(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)>kD||Math.abs(a.height-this.lastBoundingBox.height)>kD)&&(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?qi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,l=a.align,u=a.verticalAlign,d=a.margin,f=a.chartWidth,m=a.chartHeight,p,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&i==="vertical"){var x=this.getBBoxSnapshot();p={left:((f||0)-x.width)/2}}else p=l==="right"?{right:d&&d.right||0}:{left:d&&d.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var j=this.getBBoxSnapshot();g={top:((m||0)-j.height)/2}}else g=u==="bottom"?{bottom:d&&d.bottom||0}:{top:d&&d.top||0};return qi(qi({},p),g)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,l=a.width,u=a.height,d=a.wrapperStyle,f=a.payloadUniqBy,m=a.payload,p=qi(qi({position:"absolute",width:l||"auto",height:u||"auto"},this.getDefaultPosition(d)),d);return W.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(x){r.wrapperNode=x}},yte(i,qi(qi({},this.props),{},{payload:oz(m,f,gte)})))}}],[{key:"getWithHeight",value:function(r,a){var i=qi(qi({},this.defaultProps),r.props),l=i.layout;return l==="vertical"&&Oe(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])})(y.PureComponent);ty(Qs,"displayName","Legend");ty(Qs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var g1,PD;function xte(){if(PD)return g1;PD=1;var e=Oh(),t=eC(),n=Ir(),r=e?e.isConcatSpreadable:void 0;function a(i){return n(i)||t(i)||!!(r&&i&&i[r])}return g1=a,g1}var y1,MD;function cz(){if(MD)return y1;MD=1;var e=ZB(),t=xte();function n(r,a,i,l,u){var d=-1,f=r.length;for(i||(i=t),u||(u=[]);++d<f;){var m=r[d];a>0&&i(m)?a>1?n(m,a-1,i,l,u):e(u,m):l||(u[u.length]=m)}return u}return y1=n,y1}var x1,RD;function bte(){if(RD)return x1;RD=1;function e(t){return function(n,r,a){for(var i=-1,l=Object(n),u=a(n),d=u.length;d--;){var f=u[t?d:++i];if(r(l[f],f,l)===!1)break}return n}}return x1=e,x1}var b1,DD;function wte(){if(DD)return b1;DD=1;var e=bte(),t=e();return b1=t,b1}var w1,$D;function uz(){if($D)return w1;$D=1;var e=wte(),t=ey();function n(r,a){return r&&e(r,a,t)}return w1=n,w1}var j1,ID;function jte(){if(ID)return j1;ID=1;var e=Eh();function t(n,r){return function(a,i){if(a==null)return a;if(!e(a))return n(a,i);for(var l=a.length,u=r?l:-1,d=Object(a);(r?u--:++u<l)&&i(d[u],u,d)!==!1;);return a}}return j1=t,j1}var S1,LD;function aC(){if(LD)return S1;LD=1;var e=uz(),t=jte(),n=t(e);return S1=n,S1}var _1,BD;function dz(){if(BD)return _1;BD=1;var e=aC(),t=Eh();function n(r,a){var i=-1,l=t(r)?Array(r.length):[];return e(r,function(u,d,f){l[++i]=a(u,d,f)}),l}return _1=n,_1}var N1,zD;function Ste(){if(zD)return N1;zD=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return N1=e,N1}var O1,qD;function _te(){if(qD)return O1;qD=1;var e=Iu();function t(n,r){if(n!==r){var a=n!==void 0,i=n===null,l=n===n,u=e(n),d=r!==void 0,f=r===null,m=r===r,p=e(r);if(!f&&!p&&!u&&n>r||u&&d&&m&&!f&&!p||i&&d&&m||!a&&m||!l)return 1;if(!i&&!u&&!p&&n<r||p&&a&&l&&!i&&!u||f&&a&&l||!d&&l||!m)return-1}return 0}return O1=t,O1}var C1,FD;function Nte(){if(FD)return C1;FD=1;var e=_te();function t(n,r,a){for(var i=-1,l=n.criteria,u=r.criteria,d=l.length,f=a.length;++i<d;){var m=e(l[i],u[i]);if(m){if(i>=f)return m;var p=a[i];return m*(p=="desc"?-1:1)}}return n.index-r.index}return C1=t,C1}var E1,UD;function Ote(){if(UD)return E1;UD=1;var e=HO(),t=WO(),n=xi(),r=dz(),a=Ste(),i=JB(),l=Nte(),u=zu(),d=Ir();function f(m,p,g){p.length?p=e(p,function(b){return d(b)?function(w){return t(w,b.length===1?b[0]:b)}:b}):p=[u];var x=-1;p=e(p,i(n));var j=r(m,function(b,w,N){var O=e(p,function(C){return C(b)});return{criteria:O,index:++x,value:b}});return a(j,function(b,w){return l(b,w,g)})}return E1=f,E1}var A1,HD;function Cte(){if(HD)return A1;HD=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return A1=e,A1}var T1,WD;function Ete(){if(WD)return T1;WD=1;var e=Cte(),t=Math.max;function n(r,a,i){return a=t(a===void 0?r.length-1:a,0),function(){for(var l=arguments,u=-1,d=t(l.length-a,0),f=Array(d);++u<d;)f[u]=l[a+u];u=-1;for(var m=Array(a+1);++u<a;)m[u]=l[u];return m[a]=i(f),e(r,this,m)}}return T1=n,T1}var k1,VD;function Ate(){if(VD)return k1;VD=1;function e(t){return function(){return t}}return k1=e,k1}var P1,GD;function fz(){if(GD)return P1;GD=1;var e=yl(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return P1=t,P1}var M1,YD;function Tte(){if(YD)return M1;YD=1;var e=Ate(),t=fz(),n=zu(),r=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return M1=r,M1}var R1,KD;function kte(){if(KD)return R1;KD=1;var e=800,t=16,n=Date.now;function r(a){var i=0,l=0;return function(){var u=n(),d=t-(u-l);if(l=u,d>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return R1=r,R1}var D1,XD;function Pte(){if(XD)return D1;XD=1;var e=Tte(),t=kte(),n=t(e);return D1=n,D1}var $1,ZD;function Mte(){if(ZD)return $1;ZD=1;var e=zu(),t=Ete(),n=Pte();function r(a,i){return n(t(a,i,e),a+"")}return $1=r,$1}var I1,QD;function ny(){if(QD)return I1;QD=1;var e=qO(),t=Eh(),n=tC(),r=rs();function a(i,l,u){if(!r(u))return!1;var d=typeof l;return(d=="number"?t(u)&&n(l,u.length):d=="string"&&l in u)?e(u[l],i):!1}return I1=a,I1}var L1,JD;function Rte(){if(JD)return L1;JD=1;var e=cz(),t=Ote(),n=Mte(),r=ny(),a=n(function(i,l){if(i==null)return[];var u=l.length;return u>1&&r(i,l[0],l[1])?l=[]:u>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(i,e(l,1),[])});return L1=a,L1}var Dte=Rte();const iC=St(Dte);function Af(e){"@babel/helpers - typeof";return Af=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},Af(e)}function P_(){return P_=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},P_.apply(this,arguments)}function $te(e,t){return zte(e)||Bte(e,t)||Lte(e,t)||Ite()}function Ite(){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 Lte(e,t){if(e){if(typeof e=="string")return e4(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 e4(e,t)}}function e4(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 Bte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function zte(e){if(Array.isArray(e))return e}function t4(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 B1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t4(Object(n),!0).forEach(function(r){qte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qte(e,t,n){return t=Fte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fte(e){var t=Ute(e,"string");return Af(t)=="symbol"?t:t+""}function Ute(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hte(e){return Array.isArray(e)&&kn(e[0])&&kn(e[1])?e.join(" ~ "):e}var Wte=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,l=t.itemStyle,u=l===void 0?{}:l,d=t.labelStyle,f=d===void 0?{}:d,m=t.payload,p=t.formatter,g=t.itemSorter,x=t.wrapperClassName,j=t.labelClassName,b=t.label,w=t.labelFormatter,N=t.accessibilityLayer,O=N===void 0?!1:N,C=function(){if(m&&m.length){var U={padding:0,margin:0},V=(g?iC(m,g):m).map(function(H,G){if(H.type==="none")return null;var L=B1({display:"block",paddingTop:4,paddingBottom:4,color:H.color||"#000"},u),R=H.formatter||p||Hte,F=H.value,K=H.name,te=F,I=K;if(R&&te!=null&&I!=null){var B=R(F,K,H,G,m);if(Array.isArray(B)){var Y=$te(B,2);te=Y[0],I=Y[1]}else te=B}return W.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(G),style:L},kn(I)?W.createElement("span",{className:"recharts-tooltip-item-name"},I):null,kn(I)?W.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,W.createElement("span",{className:"recharts-tooltip-item-value"},te),W.createElement("span",{className:"recharts-tooltip-item-unit"},H.unit||""))});return W.createElement("ul",{className:"recharts-tooltip-item-list",style:U},V)}return null},A=B1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),E=B1({margin:0},f),k=!Ge(b),T=k?b:"",P=Ye("recharts-default-tooltip",x),$=Ye("recharts-tooltip-label",j);k&&w&&m!==void 0&&m!==null&&(T=w(b,m));var z=O?{role:"status","aria-live":"assertive"}:{};return W.createElement("div",P_({className:P,style:A},z),W.createElement("p",{className:$,style:E},W.isValidElement(T)?T:"".concat(T)),C())};function Tf(e){"@babel/helpers - typeof";return Tf=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},Tf(e)}function Cp(e,t,n){return t=Vte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vte(e){var t=Gte(e,"string");return Tf(t)=="symbol"?t:t+""}function Gte(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yd="recharts-tooltip-wrapper",Yte={visibility:"hidden"};function Kte(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ye(Yd,Cp(Cp(Cp(Cp({},"".concat(Yd,"-right"),Oe(n)&&t&&Oe(t.x)&&n>=t.x),"".concat(Yd,"-left"),Oe(n)&&t&&Oe(t.x)&&n<t.x),"".concat(Yd,"-bottom"),Oe(r)&&t&&Oe(t.y)&&r>=t.y),"".concat(Yd,"-top"),Oe(r)&&t&&Oe(t.y)&&r<t.y))}function n4(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,l=e.reverseDirection,u=e.tooltipDimension,d=e.viewBox,f=e.viewBoxDimension;if(i&&Oe(i[r]))return i[r];var m=n[r]-u-a,p=n[r]+a;if(t[r])return l[r]?m:p;if(l[r]){var g=m,x=d[r];return g<x?Math.max(p,d[r]):Math.max(m,d[r])}var j=p+u,b=d[r]+f;return j>b?Math.max(m,d[r]):Math.max(p,d[r])}function Xte(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 Zte(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipBox,u=e.useTranslate3d,d=e.viewBox,f,m,p;return l.height>0&&l.width>0&&n?(m=n4({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),p=n4({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),f=Xte({translateX:m,translateY:p,useTranslate3d:u})):f=Yte,{cssProperties:f,cssClasses:Kte({translateX:m,translateY:p,coordinate:n})}}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 r4(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 a4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r4(Object(n),!0).forEach(function(r){R_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jte(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,mz(r.key),r)}}function ene(e,t,n){return t&&Jte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tne(e,t,n){return t=Av(t),nne(e,hz()?Reflect.construct(t,n||[],Av(e).constructor):t.apply(e,n))}function nne(e,t){if(t&&(au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rne(e)}function rne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hz=function(){return!!e})()}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function ane(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&&M_(e,t)}function M_(e,t){return M_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},M_(e,t)}function R_(e,t,n){return t=mz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mz(e){var t=ine(e,"string");return au(t)=="symbol"?t:t+""}function ine(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 String(e)}var i4=1,one=(function(e){function t(){var n;Qte(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=tne(this,t,[].concat(a)),R_(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),R_(n,"handleKeyDown",function(l){if(l.key==="Escape"){var u,d,f,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.x)!==null&&u!==void 0?u:0,y:(f=(m=n.props.coordinate)===null||m===void 0?void 0:m.y)!==null&&f!==void 0?f:0}})}}),n}return ane(t,e),ene(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>i4||Math.abs(r.height-this.state.lastBoundingBox.height)>i4)&&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,u=a.animationDuration,d=a.animationEasing,f=a.children,m=a.coordinate,p=a.hasPayload,g=a.isAnimationActive,x=a.offset,j=a.position,b=a.reverseDirection,w=a.useTranslate3d,N=a.viewBox,O=a.wrapperStyle,C=Zte({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:x,position:j,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:N}),A=C.cssClasses,E=C.cssProperties,k=a4(a4({transition:g&&i?"transform ".concat(u,"ms ").concat(d):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&p?"visible":"hidden",position:"absolute",top:0,left:0},O);return W.createElement("div",{tabIndex:-1,className:A,style:k,ref:function(P){r.wrapperNode=P}},f)}}])})(y.PureComponent),sne=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},xl={isSsr:sne()};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 o4(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 s4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o4(Object(n),!0).forEach(function(r){oC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lne(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,vz(r.key),r)}}function une(e,t,n){return t&&cne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dne(e,t,n){return t=Tv(t),fne(e,pz()?Reflect.construct(t,n||[],Tv(e).constructor):t.apply(e,n))}function fne(e,t){if(t&&(iu(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 pz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pz=function(){return!!e})()}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function mne(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&&D_(e,t)}function D_(e,t){return D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},D_(e,t)}function oC(e,t,n){return t=vz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vz(e){var t=pne(e,"string");return iu(t)=="symbol"?t:t+""}function pne(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 String(e)}function vne(e){return e.dataKey}function gne(e,t){return W.isValidElement(e)?W.cloneElement(e,t):typeof e=="function"?W.createElement(e,t):W.createElement(Wte,t)}var ei=(function(e){function t(){return lne(this,t),dne(this,t,arguments)}return mne(t,e),une(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,u=a.animationDuration,d=a.animationEasing,f=a.content,m=a.coordinate,p=a.filterNull,g=a.isAnimationActive,x=a.offset,j=a.payload,b=a.payloadUniqBy,w=a.position,N=a.reverseDirection,O=a.useTranslate3d,C=a.viewBox,A=a.wrapperStyle,E=j??[];p&&E.length&&(E=oz(j.filter(function(T){return T.value!=null&&(T.hide!==!0||r.props.includeHidden)}),b,vne));var k=E.length>0;return W.createElement(one,{allowEscapeViewBox:l,animationDuration:u,animationEasing:d,isAnimationActive:g,active:i,coordinate:m,hasPayload:k,offset:x,position:w,reverseDirection:N,useTranslate3d:O,viewBox:C,wrapperStyle:A},gne(f,s4(s4({},this.props),{},{payload:E})))}}])})(y.PureComponent);oC(ei,"displayName","Tooltip");oC(ei,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!xl.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 z1,l4;function yne(){if(l4)return z1;l4=1;var e=yi(),t=function(){return e.Date.now()};return z1=t,z1}var q1,c4;function xne(){if(c4)return q1;c4=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return q1=t,q1}var F1,u4;function bne(){if(u4)return F1;u4=1;var e=xne(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return F1=n,F1}var U1,d4;function gz(){if(d4)return U1;d4=1;var e=bne(),t=rs(),n=Iu(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function d(f){if(typeof f=="number")return f;if(n(f))return r;if(t(f)){var m=typeof f.valueOf=="function"?f.valueOf():f;f=t(m)?m+"":m}if(typeof f!="string")return f===0?f:+f;f=e(f);var p=i.test(f);return p||l.test(f)?u(f.slice(2),p?2:8):a.test(f)?r:+f}return U1=d,U1}var H1,f4;function wne(){if(f4)return H1;f4=1;var e=rs(),t=yne(),n=gz(),r="Expected a function",a=Math.max,i=Math.min;function l(u,d,f){var m,p,g,x,j,b,w=0,N=!1,O=!1,C=!0;if(typeof u!="function")throw new TypeError(r);d=n(d)||0,e(f)&&(N=!!f.leading,O="maxWait"in f,g=O?a(n(f.maxWait)||0,d):g,C="trailing"in f?!!f.trailing:C);function A(V){var H=m,G=p;return m=p=void 0,w=V,x=u.apply(G,H),x}function E(V){return w=V,j=setTimeout(P,d),N?A(V):x}function k(V){var H=V-b,G=V-w,L=d-H;return O?i(L,g-G):L}function T(V){var H=V-b,G=V-w;return b===void 0||H>=d||H<0||O&&G>=g}function P(){var V=t();if(T(V))return $(V);j=setTimeout(P,k(V))}function $(V){return j=void 0,C&&m?A(V):(m=p=void 0,x)}function z(){j!==void 0&&clearTimeout(j),w=0,m=b=p=j=void 0}function D(){return j===void 0?x:$(t())}function U(){var V=t(),H=T(V);if(m=arguments,p=this,b=V,H){if(j===void 0)return E(b);if(O)return clearTimeout(j),j=setTimeout(P,d),A(b)}return j===void 0&&(j=setTimeout(P,d)),x}return U.cancel=z,U.flush=D,U}return H1=l,H1}var W1,h4;function jne(){if(h4)return W1;h4=1;var e=wne(),t=rs(),n="Expected a function";function r(a,i,l){var u=!0,d=!0;if(typeof a!="function")throw new TypeError(n);return t(l)&&(u="leading"in l?!!l.leading:u,d="trailing"in l?!!l.trailing:d),e(a,i,{leading:u,maxWait:i,trailing:d})}return W1=r,W1}var Sne=jne();const yz=St(Sne);function kf(e){"@babel/helpers - typeof";return kf=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},kf(e)}function m4(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 Ep(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m4(Object(n),!0).forEach(function(r){_ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ne(e,t,n){return t=Nne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nne(e){var t=One(e,"string");return kf(t)=="symbol"?t:t+""}function One(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cne(e,t){return kne(e)||Tne(e,t)||Ane(e,t)||Ene()}function Ene(){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 Ane(e,t){if(e){if(typeof e=="string")return p4(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 p4(e,t)}}function p4(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 Tne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function kne(e){if(Array.isArray(e))return e}var Pne=y.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,u=e.height,d=u===void 0?"100%":u,f=e.minWidth,m=f===void 0?0:f,p=e.minHeight,g=e.maxHeight,x=e.children,j=e.debounce,b=j===void 0?0:j,w=e.id,N=e.className,O=e.onResize,C=e.style,A=C===void 0?{}:C,E=y.useRef(null),k=y.useRef();k.current=O,y.useImperativeHandle(t,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var T=y.useState({containerWidth:a.width,containerHeight:a.height}),P=Cne(T,2),$=P[0],z=P[1],D=y.useCallback(function(V,H){z(function(G){var L=Math.round(V),R=Math.round(H);return G.containerWidth===L&&G.containerHeight===R?G:{containerWidth:L,containerHeight:R}})},[]);y.useEffect(function(){var V=function(K){var te,I=K[0].contentRect,B=I.width,Y=I.height;D(B,Y),(te=k.current)===null||te===void 0||te.call(k,B,Y)};b>0&&(V=yz(V,b,{trailing:!0,leading:!1}));var H=new ResizeObserver(V),G=E.current.getBoundingClientRect(),L=G.width,R=G.height;return D(L,R),H.observe(E.current),function(){H.disconnect()}},[D,b]);var U=y.useMemo(function(){var V=$.containerWidth,H=$.containerHeight;if(V<0||H<0)return null;za(Us(l)||Us(d),`The width(%s) and height(%s) are both fixed numbers,
|
||
maybe you don't need to use a ResponsiveContainer.`,l,d),za(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=Us(l)?V:l,L=Us(d)?H:d;n&&n>0&&(G?L=G/n:L&&(G=L*n),g&&L>g&&(L=g)),za(G>0||L>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.`,G,L,l,d,m,p,n);var R=!Array.isArray(x)&&Zi(x.type).endsWith("Chart");return W.Children.map(x,function(F){return W.isValidElement(F)?y.cloneElement(F,Ep({width:G,height:L},R?{style:Ep({height:"100%",width:"100%",maxHeight:L,maxWidth:G},F.props.style)}:{})):F})},[n,x,d,g,p,m,$,l]);return W.createElement("div",{id:w?"".concat(w):void 0,className:Ye("recharts-responsive-container",N),style:Ep(Ep({},A),{},{width:l,height:d,minWidth:m,minHeight:p,maxHeight:g}),ref:E},U)}),ry=function(t){return null};ry.displayName="Cell";function Pf(e){"@babel/helpers - typeof";return Pf=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},Pf(e)}function v4(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 $_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v4(Object(n),!0).forEach(function(r){Mne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mne(e,t,n){return t=Rne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rne(e){var t=Dne(e,"string");return Pf(t)=="symbol"?t:t+""}function Dne(e,t){if(Pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xc={widthCache:{},cacheCount:0},$ne=2e3,Ine={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},g4="recharts_measurement_span";function Lne(e){var t=$_({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var yf=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||xl.isSsr)return{width:0,height:0};var r=Lne(n),a=JSON.stringify({text:t,copyStyle:r});if(xc.widthCache[a])return xc.widthCache[a];try{var i=document.getElementById(g4);i||(i=document.createElement("span"),i.setAttribute("id",g4),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var l=$_($_({},Ine),r);Object.assign(i.style,l),i.textContent="".concat(t);var u=i.getBoundingClientRect(),d={width:u.width,height:u.height};return xc.widthCache[a]=d,++xc.cacheCount>$ne&&(xc.cacheCount=0,xc.widthCache={}),d}catch{return{width:0,height:0}}},Bne=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Mf(e){"@babel/helpers - typeof";return Mf=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},Mf(e)}function kv(e,t){return Une(e)||Fne(e,t)||qne(e,t)||zne()}function zne(){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 qne(e,t){if(e){if(typeof e=="string")return y4(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 y4(e,t)}}function y4(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 Fne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function Une(e){if(Array.isArray(e))return e}function Hne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x4(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,Vne(r.key),r)}}function Wne(e,t,n){return t&&x4(e.prototype,t),n&&x4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vne(e){var t=Gne(e,"string");return Mf(t)=="symbol"?t:t+""}function Gne(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var b4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,w4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Yne=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Kne=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,xz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Xne=Object.keys(xz),Dc="NaN";function Zne(e,t){return e*xz[t]}var Ap=(function(){function e(t,n){Hne(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Yne.test(n)&&(this.num=NaN,this.unit=""),Xne.includes(n)&&(this.num=Zne(t,n),this.unit="px")}return Wne(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=Kne.exec(n))!==null&&r!==void 0?r:[],i=kv(a,3),l=i[1],u=i[2];return new e(parseFloat(l),u??"")}}])})();function bz(e){if(e.includes(Dc))return Dc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=b4.exec(t))!==null&&n!==void 0?n:[],a=kv(r,4),i=a[1],l=a[2],u=a[3],d=Ap.parse(i??""),f=Ap.parse(u??""),m=l==="*"?d.multiply(f):d.divide(f);if(m.isNaN())return Dc;t=t.replace(b4,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,g=(p=w4.exec(t))!==null&&p!==void 0?p:[],x=kv(g,4),j=x[1],b=x[2],w=x[3],N=Ap.parse(j??""),O=Ap.parse(w??""),C=b==="+"?N.add(O):N.subtract(O);if(C.isNaN())return Dc;t=t.replace(w4,C.toString())}return t}var j4=/\(([^()]*)\)/;function Qne(e){for(var t=e;t.includes("(");){var n=j4.exec(t),r=kv(n,2),a=r[1];t=t.replace(j4,bz(a))}return t}function Jne(e){var t=e.replace(/\s+/g,"");return t=Qne(t),t=bz(t),t}function ere(e){try{return Jne(e)}catch{return Dc}}function V1(e){var t=ere(e.slice(5,-1));return t===Dc?"":t}var tre=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],nre=["dx","dy","angle","className","breakAll"];function I_(){return I_=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},I_.apply(this,arguments)}function S4(e,t){if(e==null)return{};var n=rre(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 rre(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 _4(e,t){return sre(e)||ore(e,t)||ire(e,t)||are()}function are(){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 ire(e,t){if(e){if(typeof e=="string")return N4(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 N4(e,t)}}function N4(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 ore(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function sre(e){if(Array.isArray(e))return e}var wz=/[ \f\n\r\t\v\u2028\u2029]+/,jz=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];Ge(n)||(r?i=n.toString().split(""):i=n.toString().split(wz));var l=i.map(function(d){return{word:d,width:yf(d,a).width}}),u=r?0:yf(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:u}}catch{return null}},lre=function(t,n,r,a,i){var l=t.maxLines,u=t.children,d=t.style,f=t.breakAll,m=Oe(l),p=u,g=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(L,R){var F=R.word,K=R.width,te=L[L.length-1];if(te&&(a==null||i||te.width+K+r<Number(a)))te.words.push(F),te.width+=K+r;else{var I={words:[F],width:K};L.push(I)}return L},[])},x=g(n),j=function(G){return G.reduce(function(L,R){return L.width>R.width?L:R})};if(!m)return x;for(var b="…",w=function(G){var L=p.slice(0,G),R=jz({breakAll:f,style:d,children:L+b}).wordsWithComputedWidth,F=g(R),K=F.length>l||j(F).width>Number(a);return[K,F]},N=0,O=p.length-1,C=0,A;N<=O&&C<=p.length-1;){var E=Math.floor((N+O)/2),k=E-1,T=w(k),P=_4(T,2),$=P[0],z=P[1],D=w(E),U=_4(D,1),V=U[0];if(!$&&!V&&(N=E+1),$&&V&&(O=E-1),!$&&V){A=z;break}C++}return A||x},O4=function(t){var n=Ge(t)?[]:t.toString().split(wz);return[{words:n}]},cre=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,l=t.breakAll,u=t.maxLines;if((n||r)&&!xl.isSsr){var d,f,m=jz({breakAll:l,children:a,style:i});if(m){var p=m.wordsWithComputedWidth,g=m.spaceWidth;d=p,f=g}else return O4(a);return lre({breakAll:l,children:a,maxLines:u,style:i},d,f,n,r)}return O4(a)},C4="#808080",cl=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.lineHeight,u=l===void 0?"1em":l,d=t.capHeight,f=d===void 0?"0.71em":d,m=t.scaleToFit,p=m===void 0?!1:m,g=t.textAnchor,x=g===void 0?"start":g,j=t.verticalAnchor,b=j===void 0?"end":j,w=t.fill,N=w===void 0?C4:w,O=S4(t,tre),C=y.useMemo(function(){return cre({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:p,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,p,O.style,O.width]),A=O.dx,E=O.dy,k=O.angle,T=O.className,P=O.breakAll,$=S4(O,nre);if(!kn(r)||!kn(i))return null;var z=r+(Oe(A)?A:0),D=i+(Oe(E)?E:0),U;switch(b){case"start":U=V1("calc(".concat(f,")"));break;case"middle":U=V1("calc(".concat((C.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:U=V1("calc(".concat(C.length-1," * -").concat(u,")"));break}var V=[];if(p){var H=C[0].width,G=O.width;V.push("scale(".concat((Oe(G)?G/H:1)/H,")"))}return k&&V.push("rotate(".concat(k,", ").concat(z,", ").concat(D,")")),V.length&&($.transform=V.join(" ")),W.createElement("text",I_({},Be($,!0),{x:z,y:D,className:Ye("recharts-text",T),textAnchor:x,fill:N.includes("url")?C4:N}),C.map(function(L,R){var F=L.words.join(P?"":" ");return W.createElement("tspan",{x:z,dy:R===0?U:u,key:"".concat(F,"-").concat(R)},F)}))};function Yo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ure(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function sC(e){let t,n,r;e.length!==2?(t=Yo,n=(u,d)=>Yo(e(u),d),r=(u,d)=>e(u)-d):(t=e===Yo||e===ure?e:dre,n=e,r=e);function a(u,d,f=0,m=u.length){if(f<m){if(t(d,d)!==0)return m;do{const p=f+m>>>1;n(u[p],d)<0?f=p+1:m=p}while(f<m)}return f}function i(u,d,f=0,m=u.length){if(f<m){if(t(d,d)!==0)return m;do{const p=f+m>>>1;n(u[p],d)<=0?f=p+1:m=p}while(f<m)}return f}function l(u,d,f=0,m=u.length){const p=a(u,d,f,m-1);return p>f&&r(u[p-1],d)>-r(u[p],d)?p-1:p}return{left:a,center:l,right:i}}function dre(){return 0}function Sz(e){return e===null?NaN:+e}function*fre(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const hre=sC(Yo),Ah=hre.right;sC(Sz).center;class E4 extends Map{constructor(t,n=vre){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(A4(this,t))}has(t){return super.has(A4(this,t))}set(t,n){return super.set(mre(this,t),n)}delete(t){return super.delete(pre(this,t))}}function A4({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function mre({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function pre({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function vre(e){return e!==null&&typeof e=="object"?e.valueOf():e}function gre(e=Yo){if(e===Yo)return _z;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 _z(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const yre=Math.sqrt(50),xre=Math.sqrt(10),bre=Math.sqrt(2);function Pv(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>=yre?10:i>=xre?5:i>=bre?2:1;let u,d,f;return a<0?(f=Math.pow(10,-a)/l,u=Math.round(e*f),d=Math.round(t*f),u/f<e&&++u,d/f>t&&--d,f=-f):(f=Math.pow(10,a)*l,u=Math.round(e/f),d=Math.round(t/f),u*f<e&&++u,d*f>t&&--d),d<u&&.5<=n&&n<2?Pv(e,t,n*2):[u,d,f]}function L_(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?Pv(t,e,n):Pv(e,t,n);if(!(i>=a))return[];const u=i-a+1,d=new Array(u);if(r)if(l<0)for(let f=0;f<u;++f)d[f]=(i-f)/-l;else for(let f=0;f<u;++f)d[f]=(i-f)*l;else if(l<0)for(let f=0;f<u;++f)d[f]=(a+f)/-l;else for(let f=0;f<u;++f)d[f]=(a+f)*l;return d}function B_(e,t,n){return t=+t,e=+e,n=+n,Pv(e,t,n)[2]}function z_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?B_(t,e,n):B_(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function T4(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function k4(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Nz(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?_z:gre(a);r>n;){if(r-n>600){const d=r-n+1,f=t-n+1,m=Math.log(d),p=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*p*(d-p)/d)*(f-d/2<0?-1:1),x=Math.max(n,Math.floor(t-f*p/d+g)),j=Math.min(r,Math.floor(t+(d-f)*p/d+g));Nz(e,t,x,j,a)}const i=e[t];let l=n,u=r;for(Kd(e,n,t),a(e[r],i)>0&&Kd(e,n,r);l<u;){for(Kd(e,l,u),++l,--u;a(e[l],i)<0;)++l;for(;a(e[u],i)>0;)--u}a(e[n],i)===0?Kd(e,n,u):(++u,Kd(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Kd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function wre(e,t,n){if(e=Float64Array.from(fre(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return k4(e);if(t>=1)return T4(e);var r,a=(r-1)*t,i=Math.floor(a),l=T4(Nz(e,i).subarray(0,i+1)),u=k4(e.subarray(i+1));return l+(u-l)*(a-i)}}function jre(e,t,n=Sz){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),u=+n(e[i+1],i+1,e);return l+(u-l)*(a-i)}}function Sre(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 Ca(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function co(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 q_=Symbol("implicit");function lC(){var e=new E4,t=[],n=[],r=q_;function a(i){let l=e.get(i);if(l===void 0){if(r!==q_)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 E4;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 lC(t,n).unknown(r)},Ca.apply(a,arguments),a}function Rf(){var e=lC().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,l,u=!1,d=0,f=0,m=.5;delete e.unknown;function p(){var g=t().length,x=a<r,j=x?a:r,b=x?r:a;i=(b-j)/Math.max(1,g-d+f*2),u&&(i=Math.floor(i)),j+=(b-j-i*(g-d))*m,l=i*(1-d),u&&(j=Math.round(j),l=Math.round(l));var w=Sre(g).map(function(N){return j+i*N});return n(x?w.reverse():w)}return e.domain=function(g){return arguments.length?(t(g),p()):t()},e.range=function(g){return arguments.length?([r,a]=g,r=+r,a=+a,p()):[r,a]},e.rangeRound=function(g){return[r,a]=g,r=+r,a=+a,u=!0,p()},e.bandwidth=function(){return l},e.step=function(){return i},e.round=function(g){return arguments.length?(u=!!g,p()):u},e.padding=function(g){return arguments.length?(d=Math.min(1,f=+g),p()):d},e.paddingInner=function(g){return arguments.length?(d=Math.min(1,g),p()):d},e.paddingOuter=function(g){return arguments.length?(f=+g,p()):f},e.align=function(g){return arguments.length?(m=Math.max(0,Math.min(1,g)),p()):m},e.copy=function(){return Rf(t(),[r,a]).round(u).paddingInner(d).paddingOuter(f).align(m)},Ca.apply(p(),arguments)}function Oz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Oz(t())},e}function xf(){return Oz(Rf.apply(null,arguments).paddingInner(1))}function cC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Th(){}var Df=.7,Mv=1/Df,qc="\\s*([+-]?\\d+)\\s*",$f="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ui="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_re=/^#([0-9a-f]{3,8})$/,Nre=new RegExp(`^rgb\\(${qc},${qc},${qc}\\)$`),Ore=new RegExp(`^rgb\\(${ui},${ui},${ui}\\)$`),Cre=new RegExp(`^rgba\\(${qc},${qc},${qc},${$f}\\)$`),Ere=new RegExp(`^rgba\\(${ui},${ui},${ui},${$f}\\)$`),Are=new RegExp(`^hsl\\(${$f},${ui},${ui}\\)$`),Tre=new RegExp(`^hsla\\(${$f},${ui},${ui},${$f}\\)$`),P4={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};cC(Th,If,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:M4,formatHex:M4,formatHex8:kre,formatHsl:Pre,formatRgb:R4,toString:R4});function M4(){return this.rgb().formatHex()}function kre(){return this.rgb().formatHex8()}function Pre(){return Ez(this).formatHsl()}function R4(){return this.rgb().formatRgb()}function If(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=_re.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?D4(t):n===3?new Tr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tp(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=Nre.exec(e))?new Tr(t[1],t[2],t[3],1):(t=Ore.exec(e))?new Tr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cre.exec(e))?Tp(t[1],t[2],t[3],t[4]):(t=Ere.exec(e))?Tp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Are.exec(e))?L4(t[1],t[2]/100,t[3]/100,1):(t=Tre.exec(e))?L4(t[1],t[2]/100,t[3]/100,t[4]):P4.hasOwnProperty(e)?D4(P4[e]):e==="transparent"?new Tr(NaN,NaN,NaN,0):null}function D4(e){return new Tr(e>>16&255,e>>8&255,e&255,1)}function Tp(e,t,n,r){return r<=0&&(e=t=n=NaN),new Tr(e,t,n,r)}function Mre(e){return e instanceof Th||(e=If(e)),e?(e=e.rgb(),new Tr(e.r,e.g,e.b,e.opacity)):new Tr}function F_(e,t,n,r){return arguments.length===1?Mre(e):new Tr(e,t,n,r??1)}function Tr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}cC(Tr,F_,Cz(Th,{brighter(e){return e=e==null?Mv:Math.pow(Mv,e),new Tr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Df:Math.pow(Df,e),new Tr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tr(Js(this.r),Js(this.g),Js(this.b),Rv(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:$4,formatHex:$4,formatHex8:Rre,formatRgb:I4,toString:I4}));function $4(){return`#${Hs(this.r)}${Hs(this.g)}${Hs(this.b)}`}function Rre(){return`#${Hs(this.r)}${Hs(this.g)}${Hs(this.b)}${Hs((isNaN(this.opacity)?1:this.opacity)*255)}`}function I4(){const e=Rv(this.opacity);return`${e===1?"rgb(":"rgba("}${Js(this.r)}, ${Js(this.g)}, ${Js(this.b)}${e===1?")":`, ${e})`}`}function Rv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Js(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hs(e){return e=Js(e),(e<16?"0":"")+e.toString(16)}function L4(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new La(e,t,n,r)}function Ez(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof Th||(e=If(e)),!e)return new La;if(e instanceof La)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,u=i-a,d=(i+a)/2;return u?(t===i?l=(n-r)/u+(n<r)*6:n===i?l=(r-t)/u+2:l=(t-n)/u+4,u/=d<.5?i+a:2-i-a,l*=60):u=d>0&&d<1?0:l,new La(l,u,d,e.opacity)}function Dre(e,t,n,r){return arguments.length===1?Ez(e):new La(e,t,n,r??1)}function La(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}cC(La,Dre,Cz(Th,{brighter(e){return e=e==null?Mv:Math.pow(Mv,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Df:Math.pow(Df,e),new La(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 Tr(G1(e>=240?e-240:e+120,a,r),G1(e,a,r),G1(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new La(B4(this.h),kp(this.s),kp(this.l),Rv(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=Rv(this.opacity);return`${e===1?"hsl(":"hsla("}${B4(this.h)}, ${kp(this.s)*100}%, ${kp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function B4(e){return e=(e||0)%360,e<0?e+360:e}function kp(e){return Math.max(0,Math.min(1,e||0))}function G1(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 uC=e=>()=>e;function $re(e,t){return function(n){return e+n*t}}function Ire(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 Lre(e){return(e=+e)==1?Az:function(t,n){return n-t?Ire(t,n,e):uC(isNaN(t)?n:t)}}function Az(e,t){var n=t-e;return n?$re(e,n):uC(isNaN(e)?t:e)}const z4=(function e(t){var n=Lre(t);function r(a,i){var l=n((a=F_(a)).r,(i=F_(i)).r),u=n(a.g,i.g),d=n(a.b,i.b),f=Az(a.opacity,i.opacity);return function(m){return a.r=l(m),a.g=u(m),a.b=d(m),a.opacity=f(m),a+""}}return r.gamma=e,r})(1);function Bre(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 zre(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qre(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]=qu(e[l],t[l]);for(;l<n;++l)i[l]=t[l];return function(u){for(l=0;l<r;++l)i[l]=a[l](u);return i}}function Fre(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Dv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ure(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]=qu(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var U_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Y1=new RegExp(U_.source,"g");function Hre(e){return function(){return e}}function Wre(e){return function(t){return e(t)+""}}function Vre(e,t){var n=U_.lastIndex=Y1.lastIndex=0,r,a,i,l=-1,u=[],d=[];for(e=e+"",t=t+"";(r=U_.exec(e))&&(a=Y1.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),u[l]?u[l]+=i:u[++l]=i),(r=r[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,d.push({i:l,x:Dv(r,a)})),n=Y1.lastIndex;return n<t.length&&(i=t.slice(n),u[l]?u[l]+=i:u[++l]=i),u.length<2?d[0]?Wre(d[0].x):Hre(t):(t=d.length,function(f){for(var m=0,p;m<t;++m)u[(p=d[m]).i]=p.x(f);return u.join("")})}function qu(e,t){var n=typeof t,r;return t==null||n==="boolean"?uC(t):(n==="number"?Dv:n==="string"?(r=If(t))?(t=r,z4):Vre:t instanceof If?z4:t instanceof Date?Fre:zre(t)?Bre:Array.isArray(t)?qre:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ure:Dv)(e,t)}function dC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Gre(e,t){t===void 0&&(t=e,e=qu);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 u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return i[u](l-u)}}function Yre(e){return function(){return e}}function $v(e){return+e}var q4=[0,1];function wr(e){return e}function H_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Yre(isNaN(t)?NaN:.5)}function Kre(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Xre(e,t,n){var r=e[0],a=e[1],i=t[0],l=t[1];return a<r?(r=H_(a,r),i=n(l,i)):(r=H_(r,a),i=n(i,l)),function(u){return i(r(u))}}function Zre(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]=H_(e[l],e[l+1]),i[l]=n(t[l],t[l+1]);return function(u){var d=Ah(e,u,1,r)-1;return i[d](a[d](u))}}function kh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ay(){var e=q4,t=q4,n=qu,r,a,i,l=wr,u,d,f;function m(){var g=Math.min(e.length,t.length);return l!==wr&&(l=Kre(e[0],e[g-1])),u=g>2?Zre:Xre,d=f=null,p}function p(g){return g==null||isNaN(g=+g)?i:(d||(d=u(e.map(r),t,n)))(r(l(g)))}return p.invert=function(g){return l(a((f||(f=u(t,e.map(r),Dv)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,$v),m()):e.slice()},p.range=function(g){return arguments.length?(t=Array.from(g),m()):t.slice()},p.rangeRound=function(g){return t=Array.from(g),n=dC,m()},p.clamp=function(g){return arguments.length?(l=g?!0:wr,m()):l!==wr},p.interpolate=function(g){return arguments.length?(n=g,m()):n},p.unknown=function(g){return arguments.length?(i=g,p):i},function(g,x){return r=g,a=x,m()}}function fC(){return ay()(wr,wr)}function Qre(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Iv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ou(e){return e=Iv(Math.abs(e)),e?e[1]:NaN}function Jre(e,t){return function(n,r){for(var a=n.length,i=[],l=0,u=e[0],d=0;a>0&&u>0&&(d+u+1>r&&(u=Math.max(1,r-d)),i.push(n.substring(a-=u,a+u)),!((d+=u+1)>r));)u=e[l=(l+1)%e.length];return i.reverse().join(t)}}function eae(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var tae=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lf(e){if(!(t=tae.exec(e)))throw new Error("invalid format: "+e);var t;return new hC({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]})}Lf.prototype=hC.prototype;function hC(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+""}hC.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 nae(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 Tz;function rae(e,t){var n=Iv(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(Tz=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")+Iv(e,Math.max(0,t+i-1))[0]}function F4(e,t){var n=Iv(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 U4={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Qre,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)=>F4(e*100,t),r:F4,s:rae,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function H4(e){return e}var W4=Array.prototype.map,V4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function aae(e){var t=e.grouping===void 0||e.thousands===void 0?H4:Jre(W4.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?H4:eae(W4.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function f(p){p=Lf(p);var g=p.fill,x=p.align,j=p.sign,b=p.symbol,w=p.zero,N=p.width,O=p.comma,C=p.precision,A=p.trim,E=p.type;E==="n"?(O=!0,E="g"):U4[E]||(C===void 0&&(C=12),A=!0,E="g"),(w||g==="0"&&x==="=")&&(w=!0,g="0",x="=");var k=b==="$"?n:b==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",T=b==="$"?r:/[%p]/.test(E)?l:"",P=U4[E],$=/[defgprs%]/.test(E);C=C===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function z(D){var U=k,V=T,H,G,L;if(E==="c")V=P(D)+V,D="";else{D=+D;var R=D<0||1/D<0;if(D=isNaN(D)?d:P(Math.abs(D),C),A&&(D=nae(D)),R&&+D==0&&j!=="+"&&(R=!1),U=(R?j==="("?j:u:j==="-"||j==="("?"":j)+U,V=(E==="s"?V4[8+Tz/3]:"")+V+(R&&j==="("?")":""),$){for(H=-1,G=D.length;++H<G;)if(L=D.charCodeAt(H),48>L||L>57){V=(L===46?a+D.slice(H+1):D.slice(H))+V,D=D.slice(0,H);break}}}O&&!w&&(D=t(D,1/0));var F=U.length+D.length+V.length,K=F<N?new Array(N-F+1).join(g):"";switch(O&&w&&(D=t(K+D,K.length?N-V.length:1/0),K=""),x){case"<":D=U+D+V+K;break;case"=":D=U+K+D+V;break;case"^":D=K.slice(0,F=K.length>>1)+U+D+V+K.slice(F);break;default:D=K+U+D+V;break}return i(D)}return z.toString=function(){return p+""},z}function m(p,g){var x=f((p=Lf(p),p.type="f",p)),j=Math.max(-8,Math.min(8,Math.floor(ou(g)/3)))*3,b=Math.pow(10,-j),w=V4[8+j/3];return function(N){return x(b*N)+w}}return{format:f,formatPrefix:m}}var Pp,mC,kz;iae({thousands:",",grouping:[3],currency:["$",""]});function iae(e){return Pp=aae(e),mC=Pp.format,kz=Pp.formatPrefix,Pp}function oae(e){return Math.max(0,-ou(Math.abs(e)))}function sae(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ou(t)/3)))*3-ou(Math.abs(e)))}function lae(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ou(t)-ou(e))+1}function Pz(e,t,n,r){var a=z_(e,t,n),i;switch(r=Lf(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=sae(a,l))&&(r.precision=i),kz(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=lae(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=oae(a))&&(r.precision=i-(r.type==="%")*2);break}}return mC(r)}function as(e){var t=e.domain;return e.ticks=function(n){var r=t();return L_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Pz(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],u=r[i],d,f,m=10;for(u<l&&(f=l,l=u,u=f,f=a,a=i,i=f);m-- >0;){if(f=B_(l,u,n),f===d)return r[a]=l,r[i]=u,t(r);if(f>0)l=Math.floor(l/f)*f,u=Math.ceil(u/f)*f;else if(f<0)l=Math.ceil(l*f)/f,u=Math.floor(u*f)/f;else break;d=f}return e},e}function Lv(){var e=fC();return e.copy=function(){return kh(e,Lv())},Ca.apply(e,arguments),as(e)}function Mz(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,$v),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Mz(e).unknown(t)},e=arguments.length?Array.from(e,$v):[0,1],as(n)}function Rz(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 G4(e){return Math.log(e)}function Y4(e){return Math.exp(e)}function cae(e){return-Math.log(-e)}function uae(e){return-Math.exp(-e)}function dae(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fae(e){return e===10?dae:e===Math.E?Math.exp:t=>Math.pow(e,t)}function hae(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 K4(e){return(t,n)=>-e(-t,n)}function pC(e){const t=e(G4,Y4),n=t.domain;let r=10,a,i;function l(){return a=hae(r),i=fae(r),n()[0]<0?(a=K4(a),i=K4(i),e(cae,uae)):e(G4,Y4),t}return t.base=function(u){return arguments.length?(r=+u,l()):r},t.domain=function(u){return arguments.length?(n(u),l()):n()},t.ticks=u=>{const d=n();let f=d[0],m=d[d.length-1];const p=m<f;p&&([f,m]=[m,f]);let g=a(f),x=a(m),j,b;const w=u==null?10:+u;let N=[];if(!(r%1)&&x-g<w){if(g=Math.floor(g),x=Math.ceil(x),f>0){for(;g<=x;++g)for(j=1;j<r;++j)if(b=g<0?j/i(-g):j*i(g),!(b<f)){if(b>m)break;N.push(b)}}else for(;g<=x;++g)for(j=r-1;j>=1;--j)if(b=g>0?j/i(-g):j*i(g),!(b<f)){if(b>m)break;N.push(b)}N.length*2<w&&(N=L_(f,m,w))}else N=L_(g,x,Math.min(x-g,w)).map(i);return p?N.reverse():N},t.tickFormat=(u,d)=>{if(u==null&&(u=10),d==null&&(d=r===10?"s":","),typeof d!="function"&&(!(r%1)&&(d=Lf(d)).precision==null&&(d.trim=!0),d=mC(d)),u===1/0)return d;const f=Math.max(1,r*u/t.ticks().length);return m=>{let p=m/i(Math.round(a(m)));return p*r<r-.5&&(p*=r),p<=f?d(m):""}},t.nice=()=>n(Rz(n(),{floor:u=>i(Math.floor(a(u))),ceil:u=>i(Math.ceil(a(u)))})),t}function Dz(){const e=pC(ay()).domain([1,10]);return e.copy=()=>kh(e,Dz()).base(e.base()),Ca.apply(e,arguments),e}function X4(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Z4(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function vC(e){var t=1,n=e(X4(t),Z4(t));return n.constant=function(r){return arguments.length?e(X4(t=+r),Z4(t)):t},as(n)}function $z(){var e=vC(ay());return e.copy=function(){return kh(e,$z()).constant(e.constant())},Ca.apply(e,arguments)}function Q4(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function mae(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pae(e){return e<0?-e*e:e*e}function gC(e){var t=e(wr,wr),n=1;function r(){return n===1?e(wr,wr):n===.5?e(mae,pae):e(Q4(n),Q4(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},as(t)}function yC(){var e=gC(ay());return e.copy=function(){return kh(e,yC()).exponent(e.exponent())},Ca.apply(e,arguments),e}function vae(){return yC.apply(null,arguments).exponent(.5)}function J4(e){return Math.sign(e)*e*e}function gae(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Iz(){var e=fC(),t=[0,1],n=!1,r;function a(i){var l=gae(e(i));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(i){return e.invert(J4(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,$v)).map(J4)),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 Iz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ca.apply(a,arguments),as(a)}function Lz(){var e=[],t=[],n=[],r;function a(){var l=0,u=Math.max(1,t.length);for(n=new Array(u-1);++l<u;)n[l-1]=jre(e,l/u);return i}function i(l){return l==null||isNaN(l=+l)?r:t[Ah(n,l)]}return i.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},i.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Yo),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 Lz().domain(e).range(t).unknown(r)},Ca.apply(i,arguments)}function Bz(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function l(d){return d!=null&&d<=d?a[Ah(r,d,0,n)]:i}function u(){var d=-1;for(r=new Array(n);++d<n;)r[d]=((d+1)*t-(d-n)*e)/(n+1);return l}return l.domain=function(d){return arguments.length?([e,t]=d,e=+e,t=+t,u()):[e,t]},l.range=function(d){return arguments.length?(n=(a=Array.from(d)).length-1,u()):a.slice()},l.invertExtent=function(d){var f=a.indexOf(d);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},l.unknown=function(d){return arguments.length&&(i=d),l},l.thresholds=function(){return r.slice()},l.copy=function(){return Bz().domain([e,t]).range(a).unknown(i)},Ca.apply(as(l),arguments)}function zz(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Ah(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 zz().domain(e).range(t).unknown(n)},Ca.apply(a,arguments)}const K1=new Date,X1=new Date;function Rn(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),u=a.ceil(i);return i-l<u-i?l:u},a.offset=(i,l)=>(t(i=new Date(+i),l==null?1:Math.floor(l)),i),a.range=(i,l,u)=>{const d=[];if(i=a.ceil(i),u=u==null?1:Math.floor(u),!(i<l)||!(u>0))return d;let f;do d.push(f=new Date(+i)),t(i,u),e(i);while(f<i&&i<l);return d},a.filter=i=>Rn(l=>{if(l>=l)for(;e(l),!i(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!i(l););else for(;--u>=0;)for(;t(l,1),!i(l););}),n&&(a.count=(i,l)=>(K1.setTime(+i),X1.setTime(+l),e(K1),e(X1),Math.floor(n(K1,X1))),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 Bv=Rn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Rn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Bv);Bv.range;const Wi=1e3,ja=Wi*60,Vi=ja*60,eo=Vi*24,xC=eo*7,e$=eo*30,Z1=eo*365,Ws=Rn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Wi)},(e,t)=>(t-e)/Wi,e=>e.getUTCSeconds());Ws.range;const bC=Rn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wi)},(e,t)=>{e.setTime(+e+t*ja)},(e,t)=>(t-e)/ja,e=>e.getMinutes());bC.range;const wC=Rn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ja)},(e,t)=>(t-e)/ja,e=>e.getUTCMinutes());wC.range;const jC=Rn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wi-e.getMinutes()*ja)},(e,t)=>{e.setTime(+e+t*Vi)},(e,t)=>(t-e)/Vi,e=>e.getHours());jC.range;const SC=Rn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Vi)},(e,t)=>(t-e)/Vi,e=>e.getUTCHours());SC.range;const Ph=Rn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ja)/eo,e=>e.getDate()-1);Ph.range;const iy=Rn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/eo,e=>e.getUTCDate()-1);iy.range;const qz=Rn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/eo,e=>Math.floor(e/eo));qz.range;function bl(e){return Rn(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())*ja)/xC)}const oy=bl(0),zv=bl(1),yae=bl(2),xae=bl(3),su=bl(4),bae=bl(5),wae=bl(6);oy.range;zv.range;yae.range;xae.range;su.range;bae.range;wae.range;function wl(e){return Rn(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)/xC)}const sy=wl(0),qv=wl(1),jae=wl(2),Sae=wl(3),lu=wl(4),_ae=wl(5),Nae=wl(6);sy.range;qv.range;jae.range;Sae.range;lu.range;_ae.range;Nae.range;const _C=Rn(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());_C.range;const NC=Rn(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());NC.range;const to=Rn(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());to.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Rn(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)});to.range;const no=Rn(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());no.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Rn(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)});no.range;function Fz(e,t,n,r,a,i){const l=[[Ws,1,Wi],[Ws,5,5*Wi],[Ws,15,15*Wi],[Ws,30,30*Wi],[i,1,ja],[i,5,5*ja],[i,15,15*ja],[i,30,30*ja],[a,1,Vi],[a,3,3*Vi],[a,6,6*Vi],[a,12,12*Vi],[r,1,eo],[r,2,2*eo],[n,1,xC],[t,1,e$],[t,3,3*e$],[e,1,Z1]];function u(f,m,p){const g=m<f;g&&([f,m]=[m,f]);const x=p&&typeof p.range=="function"?p:d(f,m,p),j=x?x.range(f,+m+1):[];return g?j.reverse():j}function d(f,m,p){const g=Math.abs(m-f)/p,x=sC(([,,w])=>w).right(l,g);if(x===l.length)return e.every(z_(f/Z1,m/Z1,p));if(x===0)return Bv.every(Math.max(z_(f,m,p),1));const[j,b]=l[g/l[x-1][2]<l[x][2]/g?x-1:x];return j.every(b)}return[u,d]}const[Oae,Cae]=Fz(no,NC,sy,qz,SC,wC),[Eae,Aae]=Fz(to,_C,oy,Ph,jC,bC);function Q1(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 J1(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 Xd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Tae(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,l=e.shortDays,u=e.months,d=e.shortMonths,f=Zd(a),m=Qd(a),p=Zd(i),g=Qd(i),x=Zd(l),j=Qd(l),b=Zd(u),w=Qd(u),N=Zd(d),O=Qd(d),C={a:R,A:F,b:K,B:te,c:null,d:o$,e:o$,f:Jae,g:cie,G:die,H:Xae,I:Zae,j:Qae,L:Uz,m:eie,M:tie,p:I,q:B,Q:c$,s:u$,S:nie,u:rie,U:aie,V:iie,w:oie,W:sie,x:null,X:null,y:lie,Y:uie,Z:fie,"%":l$},A={a:Y,A:ne,b:oe,B:xe,c:null,d:s$,e:s$,f:vie,g:Oie,G:Eie,H:hie,I:mie,j:pie,L:Wz,m:gie,M:yie,p:ee,q:ae,Q:c$,s:u$,S:xie,u:bie,U:wie,V:jie,w:Sie,W:_ie,x:null,X:null,y:Nie,Y:Cie,Z:Aie,"%":l$},E={a:z,A:D,b:U,B:V,c:H,d:a$,e:a$,f:Vae,g:r$,G:n$,H:i$,I:i$,j:Fae,L:Wae,m:qae,M:Uae,p:$,q:zae,Q:Yae,s:Kae,S:Hae,u:Dae,U:$ae,V:Iae,w:Rae,W:Lae,x:G,X:L,y:r$,Y:n$,Z:Bae,"%":Gae};C.x=k(n,C),C.X=k(r,C),C.c=k(t,C),A.x=k(n,A),A.X=k(r,A),A.c=k(t,A);function k(Z,pe){return function(je){var le=[],Re=-1,_e=0,me=Z.length,ve,Le,Dt;for(je instanceof Date||(je=new Date(+je));++Re<me;)Z.charCodeAt(Re)===37&&(le.push(Z.slice(_e,Re)),(Le=t$[ve=Z.charAt(++Re)])!=null?ve=Z.charAt(++Re):Le=ve==="e"?" ":"0",(Dt=pe[ve])&&(ve=Dt(je,Le)),le.push(ve),_e=Re+1);return le.push(Z.slice(_e,Re)),le.join("")}}function T(Z,pe){return function(je){var le=Xd(1900,void 0,1),Re=P(le,Z,je+="",0),_e,me;if(Re!=je.length)return null;if("Q"in le)return new Date(le.Q);if("s"in le)return new Date(le.s*1e3+("L"in le?le.L:0));if(pe&&!("Z"in le)&&(le.Z=0),"p"in le&&(le.H=le.H%12+le.p*12),le.m===void 0&&(le.m="q"in le?le.q:0),"V"in le){if(le.V<1||le.V>53)return null;"w"in le||(le.w=1),"Z"in le?(_e=J1(Xd(le.y,0,1)),me=_e.getUTCDay(),_e=me>4||me===0?qv.ceil(_e):qv(_e),_e=iy.offset(_e,(le.V-1)*7),le.y=_e.getUTCFullYear(),le.m=_e.getUTCMonth(),le.d=_e.getUTCDate()+(le.w+6)%7):(_e=Q1(Xd(le.y,0,1)),me=_e.getDay(),_e=me>4||me===0?zv.ceil(_e):zv(_e),_e=Ph.offset(_e,(le.V-1)*7),le.y=_e.getFullYear(),le.m=_e.getMonth(),le.d=_e.getDate()+(le.w+6)%7)}else("W"in le||"U"in le)&&("w"in le||(le.w="u"in le?le.u%7:"W"in le?1:0),me="Z"in le?J1(Xd(le.y,0,1)).getUTCDay():Q1(Xd(le.y,0,1)).getDay(),le.m=0,le.d="W"in le?(le.w+6)%7+le.W*7-(me+5)%7:le.w+le.U*7-(me+6)%7);return"Z"in le?(le.H+=le.Z/100|0,le.M+=le.Z%100,J1(le)):Q1(le)}}function P(Z,pe,je,le){for(var Re=0,_e=pe.length,me=je.length,ve,Le;Re<_e;){if(le>=me)return-1;if(ve=pe.charCodeAt(Re++),ve===37){if(ve=pe.charAt(Re++),Le=E[ve in t$?pe.charAt(Re++):ve],!Le||(le=Le(Z,je,le))<0)return-1}else if(ve!=je.charCodeAt(le++))return-1}return le}function $(Z,pe,je){var le=f.exec(pe.slice(je));return le?(Z.p=m.get(le[0].toLowerCase()),je+le[0].length):-1}function z(Z,pe,je){var le=x.exec(pe.slice(je));return le?(Z.w=j.get(le[0].toLowerCase()),je+le[0].length):-1}function D(Z,pe,je){var le=p.exec(pe.slice(je));return le?(Z.w=g.get(le[0].toLowerCase()),je+le[0].length):-1}function U(Z,pe,je){var le=N.exec(pe.slice(je));return le?(Z.m=O.get(le[0].toLowerCase()),je+le[0].length):-1}function V(Z,pe,je){var le=b.exec(pe.slice(je));return le?(Z.m=w.get(le[0].toLowerCase()),je+le[0].length):-1}function H(Z,pe,je){return P(Z,t,pe,je)}function G(Z,pe,je){return P(Z,n,pe,je)}function L(Z,pe,je){return P(Z,r,pe,je)}function R(Z){return l[Z.getDay()]}function F(Z){return i[Z.getDay()]}function K(Z){return d[Z.getMonth()]}function te(Z){return u[Z.getMonth()]}function I(Z){return a[+(Z.getHours()>=12)]}function B(Z){return 1+~~(Z.getMonth()/3)}function Y(Z){return l[Z.getUTCDay()]}function ne(Z){return i[Z.getUTCDay()]}function oe(Z){return d[Z.getUTCMonth()]}function xe(Z){return u[Z.getUTCMonth()]}function ee(Z){return a[+(Z.getUTCHours()>=12)]}function ae(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var pe=k(Z+="",C);return pe.toString=function(){return Z},pe},parse:function(Z){var pe=T(Z+="",!1);return pe.toString=function(){return Z},pe},utcFormat:function(Z){var pe=k(Z+="",A);return pe.toString=function(){return Z},pe},utcParse:function(Z){var pe=T(Z+="",!0);return pe.toString=function(){return Z},pe}}}var t$={"-":"",_:" ",0:"0"},Vn=/^\s*\d+/,kae=/^%/,Pae=/[\\^$*+?|[\]().{}]/g;function vt(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 Mae(e){return e.replace(Pae,"\\$&")}function Zd(e){return new RegExp("^(?:"+e.map(Mae).join("|")+")","i")}function Qd(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Rae(e,t,n){var r=Vn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Dae(e,t,n){var r=Vn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function $ae(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Iae(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Lae(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function n$(e,t,n){var r=Vn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function r$(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Bae(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 zae(e,t,n){var r=Vn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function qae(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function a$(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Fae(e,t,n){var r=Vn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function i$(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Uae(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Hae(e,t,n){var r=Vn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Wae(e,t,n){var r=Vn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Vae(e,t,n){var r=Vn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Gae(e,t,n){var r=kae.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Yae(e,t,n){var r=Vn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Kae(e,t,n){var r=Vn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function o$(e,t){return vt(e.getDate(),t,2)}function Xae(e,t){return vt(e.getHours(),t,2)}function Zae(e,t){return vt(e.getHours()%12||12,t,2)}function Qae(e,t){return vt(1+Ph.count(to(e),e),t,3)}function Uz(e,t){return vt(e.getMilliseconds(),t,3)}function Jae(e,t){return Uz(e,t)+"000"}function eie(e,t){return vt(e.getMonth()+1,t,2)}function tie(e,t){return vt(e.getMinutes(),t,2)}function nie(e,t){return vt(e.getSeconds(),t,2)}function rie(e){var t=e.getDay();return t===0?7:t}function aie(e,t){return vt(oy.count(to(e)-1,e),t,2)}function Hz(e){var t=e.getDay();return t>=4||t===0?su(e):su.ceil(e)}function iie(e,t){return e=Hz(e),vt(su.count(to(e),e)+(to(e).getDay()===4),t,2)}function oie(e){return e.getDay()}function sie(e,t){return vt(zv.count(to(e)-1,e),t,2)}function lie(e,t){return vt(e.getFullYear()%100,t,2)}function cie(e,t){return e=Hz(e),vt(e.getFullYear()%100,t,2)}function uie(e,t){return vt(e.getFullYear()%1e4,t,4)}function die(e,t){var n=e.getDay();return e=n>=4||n===0?su(e):su.ceil(e),vt(e.getFullYear()%1e4,t,4)}function fie(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vt(t/60|0,"0",2)+vt(t%60,"0",2)}function s$(e,t){return vt(e.getUTCDate(),t,2)}function hie(e,t){return vt(e.getUTCHours(),t,2)}function mie(e,t){return vt(e.getUTCHours()%12||12,t,2)}function pie(e,t){return vt(1+iy.count(no(e),e),t,3)}function Wz(e,t){return vt(e.getUTCMilliseconds(),t,3)}function vie(e,t){return Wz(e,t)+"000"}function gie(e,t){return vt(e.getUTCMonth()+1,t,2)}function yie(e,t){return vt(e.getUTCMinutes(),t,2)}function xie(e,t){return vt(e.getUTCSeconds(),t,2)}function bie(e){var t=e.getUTCDay();return t===0?7:t}function wie(e,t){return vt(sy.count(no(e)-1,e),t,2)}function Vz(e){var t=e.getUTCDay();return t>=4||t===0?lu(e):lu.ceil(e)}function jie(e,t){return e=Vz(e),vt(lu.count(no(e),e)+(no(e).getUTCDay()===4),t,2)}function Sie(e){return e.getUTCDay()}function _ie(e,t){return vt(qv.count(no(e)-1,e),t,2)}function Nie(e,t){return vt(e.getUTCFullYear()%100,t,2)}function Oie(e,t){return e=Vz(e),vt(e.getUTCFullYear()%100,t,2)}function Cie(e,t){return vt(e.getUTCFullYear()%1e4,t,4)}function Eie(e,t){var n=e.getUTCDay();return e=n>=4||n===0?lu(e):lu.ceil(e),vt(e.getUTCFullYear()%1e4,t,4)}function Aie(){return"+0000"}function l$(){return"%"}function c$(e){return+e}function u$(e){return Math.floor(+e/1e3)}var bc,Gz,Yz;Tie({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 Tie(e){return bc=Tae(e),Gz=bc.format,bc.parse,Yz=bc.utcFormat,bc.utcParse,bc}function kie(e){return new Date(e)}function Pie(e){return e instanceof Date?+e:+new Date(+e)}function OC(e,t,n,r,a,i,l,u,d,f){var m=fC(),p=m.invert,g=m.domain,x=f(".%L"),j=f(":%S"),b=f("%I:%M"),w=f("%I %p"),N=f("%a %d"),O=f("%b %d"),C=f("%B"),A=f("%Y");function E(k){return(d(k)<k?x:u(k)<k?j:l(k)<k?b:i(k)<k?w:r(k)<k?a(k)<k?N:O:n(k)<k?C:A)(k)}return m.invert=function(k){return new Date(p(k))},m.domain=function(k){return arguments.length?g(Array.from(k,Pie)):g().map(kie)},m.ticks=function(k){var T=g();return e(T[0],T[T.length-1],k??10)},m.tickFormat=function(k,T){return T==null?E:f(T)},m.nice=function(k){var T=g();return(!k||typeof k.range!="function")&&(k=t(T[0],T[T.length-1],k??10)),k?g(Rz(T,k)):m},m.copy=function(){return kh(m,OC(e,t,n,r,a,i,l,u,d,f))},m}function Mie(){return Ca.apply(OC(Eae,Aae,to,_C,oy,Ph,jC,bC,Ws,Gz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Rie(){return Ca.apply(OC(Oae,Cae,no,NC,sy,iy,SC,wC,Ws,Yz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ly(){var e=0,t=1,n,r,a,i,l=wr,u=!1,d;function f(p){return p==null||isNaN(p=+p)?d:l(a===0?.5:(p=(i(p)-n)*a,u?Math.max(0,Math.min(1,p)):p))}f.domain=function(p){return arguments.length?([e,t]=p,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(p){return arguments.length?(u=!!p,f):u},f.interpolator=function(p){return arguments.length?(l=p,f):l};function m(p){return function(g){var x,j;return arguments.length?([x,j]=g,l=p(x,j),f):[l(0),l(1)]}}return f.range=m(qu),f.rangeRound=m(dC),f.unknown=function(p){return arguments.length?(d=p,f):d},function(p){return i=p,n=p(e),r=p(t),a=n===r?0:1/(r-n),f}}function is(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Kz(){var e=as(ly()(wr));return e.copy=function(){return is(e,Kz())},co.apply(e,arguments)}function Xz(){var e=pC(ly()).domain([1,10]);return e.copy=function(){return is(e,Xz()).base(e.base())},co.apply(e,arguments)}function Zz(){var e=vC(ly());return e.copy=function(){return is(e,Zz()).constant(e.constant())},co.apply(e,arguments)}function CC(){var e=gC(ly());return e.copy=function(){return is(e,CC()).exponent(e.exponent())},co.apply(e,arguments)}function Die(){return CC.apply(null,arguments).exponent(.5)}function Qz(){var e=[],t=wr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Ah(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(Yo),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)=>wre(e,i/r))},n.copy=function(){return Qz(t).domain(e)},co.apply(n,arguments)}function cy(){var e=0,t=.5,n=1,r=1,a,i,l,u,d,f=wr,m,p=!1,g;function x(b){return isNaN(b=+b)?g:(b=.5+((b=+m(b))-i)*(r*b<r*i?u:d),f(p?Math.max(0,Math.min(1,b)):b))}x.domain=function(b){return arguments.length?([e,t,n]=b,a=m(e=+e),i=m(t=+t),l=m(n=+n),u=a===i?0:.5/(i-a),d=i===l?0:.5/(l-i),r=i<a?-1:1,x):[e,t,n]},x.clamp=function(b){return arguments.length?(p=!!b,x):p},x.interpolator=function(b){return arguments.length?(f=b,x):f};function j(b){return function(w){var N,O,C;return arguments.length?([N,O,C]=w,f=Gre(b,[N,O,C]),x):[f(0),f(.5),f(1)]}}return x.range=j(qu),x.rangeRound=j(dC),x.unknown=function(b){return arguments.length?(g=b,x):g},function(b){return m=b,a=b(e),i=b(t),l=b(n),u=a===i?0:.5/(i-a),d=i===l?0:.5/(l-i),r=i<a?-1:1,x}}function Jz(){var e=as(cy()(wr));return e.copy=function(){return is(e,Jz())},co.apply(e,arguments)}function e6(){var e=pC(cy()).domain([.1,1,10]);return e.copy=function(){return is(e,e6()).base(e.base())},co.apply(e,arguments)}function t6(){var e=vC(cy());return e.copy=function(){return is(e,t6()).constant(e.constant())},co.apply(e,arguments)}function EC(){var e=gC(cy());return e.copy=function(){return is(e,EC()).exponent(e.exponent())},co.apply(e,arguments)}function $ie(){return EC.apply(null,arguments).exponent(.5)}const d$=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Rf,scaleDiverging:Jz,scaleDivergingLog:e6,scaleDivergingPow:EC,scaleDivergingSqrt:$ie,scaleDivergingSymlog:t6,scaleIdentity:Mz,scaleImplicit:q_,scaleLinear:Lv,scaleLog:Dz,scaleOrdinal:lC,scalePoint:xf,scalePow:yC,scaleQuantile:Lz,scaleQuantize:Bz,scaleRadial:Iz,scaleSequential:Kz,scaleSequentialLog:Xz,scaleSequentialPow:CC,scaleSequentialQuantile:Qz,scaleSequentialSqrt:Die,scaleSequentialSymlog:Zz,scaleSqrt:vae,scaleSymlog:$z,scaleThreshold:zz,scaleTime:Mie,scaleUtc:Rie,tickFormat:Pz},Symbol.toStringTag,{value:"Module"}));var eS,f$;function uy(){if(f$)return eS;f$=1;var e=Iu();function t(n,r,a){for(var i=-1,l=n.length;++i<l;){var u=n[i],d=r(u);if(d!=null&&(f===void 0?d===d&&!e(d):a(d,f)))var f=d,m=u}return m}return eS=t,eS}var tS,h$;function n6(){if(h$)return tS;h$=1;function e(t,n){return t>n}return tS=e,tS}var nS,m$;function Iie(){if(m$)return nS;m$=1;var e=uy(),t=n6(),n=zu();function r(a){return a&&a.length?e(a,n,t):void 0}return nS=r,nS}var Lie=Iie();const dy=St(Lie);var rS,p$;function r6(){if(p$)return rS;p$=1;function e(t,n){return t<n}return rS=e,rS}var aS,v$;function Bie(){if(v$)return aS;v$=1;var e=uy(),t=r6(),n=zu();function r(a){return a&&a.length?e(a,n,t):void 0}return aS=r,aS}var zie=Bie();const fy=St(zie);var iS,g$;function qie(){if(g$)return iS;g$=1;var e=HO(),t=xi(),n=dz(),r=Ir();function a(i,l){var u=r(i)?e:n;return u(i,t(l,3))}return iS=a,iS}var oS,y$;function Fie(){if(y$)return oS;y$=1;var e=cz(),t=qie();function n(r,a){return e(t(r,a),1)}return oS=n,oS}var Uie=Fie();const Hie=St(Uie);var sS,x$;function Wie(){if(x$)return sS;x$=1;var e=rC();function t(n,r){return e(n,r)}return sS=t,sS}var Vie=Wie();const Mh=St(Vie);var Fu=1e9,Gie={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},TC,Zt=!0,Na="[DecimalError] ",el=Na+"Invalid argument: ",AC=Na+"Exponent out of range: ",Uu=Math.floor,Bs=Math.pow,Yie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Jr,Bn=1e7,Yt=7,a6=9007199254740991,Fv=Uu(a6/Yt),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)*Yt;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 Qi(this,new this.constructor(e))};Ee.dividedToIntegerBy=Ee.idiv=function(e){var t=this,n=t.constructor;return It(Qi(t,new n(e),0,1),n.precision)};Ee.equals=Ee.eq=function(e){return!this.cmp(e)};Ee.exponent=function(){return vn(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(Jr))throw Error(Na+"NaN");if(n.s<1)throw Error(Na+(n.s?"NaN":"-Infinity"));return n.eq(Jr)?new r(0):(Zt=!1,t=Qi(Bf(n,i),Bf(e,i),i),Zt=!0,It(t,a))};Ee.minus=Ee.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?s6(t,e):i6(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(Na+"NaN");return n.s?(Zt=!1,t=Qi(n,e,0,1).times(e),Zt=!0,n.minus(t)):It(new r(n),a)};Ee.naturalExponential=Ee.exp=function(){return o6(this)};Ee.naturalLogarithm=Ee.ln=function(){return Bf(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?i6(t,e):s6(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(el+e);if(t=vn(a)+1,r=a.d.length-1,n=r*Yt+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,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(Na+"NaN")}for(e=vn(u),Zt=!1,a=Math.sqrt(+u),a==0||a==1/0?(t=ii(u.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Uu((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 d(t)):r=new d(a.toString()),n=d.precision,a=l=n+3;;)if(i=r,r=i.plus(Qi(u,i,l+2)).times(.5),ii(i.d).slice(0,l)===(t=ii(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(It(i,n+1,0),i.times(i).eq(u)){r=i;break}}else if(t!="9999")break;l+=4}return Zt=!0,It(r,n)};Ee.times=Ee.mul=function(e){var t,n,r,a,i,l,u,d,f,m=this,p=m.constructor,g=m.d,x=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,n=m.e+e.e,d=g.length,f=x.length,d<f&&(i=g,g=x,x=i,l=d,d=f,f=l),i=[],l=d+f,r=l;r--;)i.push(0);for(r=f;--r>=0;){for(t=0,a=d+r;a>r;)u=i[a]+x[r]*g[a-r-1]+t,i[a--]=u%Bn|0,t=u/Bn|0;i[a]=(i[a]+t)%Bn|0}for(;!i[--l];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Zt?It(e,p.precision):e};Ee.toDecimalPlaces=Ee.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(mi(e,0,Fu),t===void 0?t=r.rounding:mi(t,0,8),It(n,e+vn(n)+1,t))};Ee.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=ul(r,!0):(mi(e,0,Fu),t===void 0?t=a.rounding:mi(t,0,8),r=It(new a(r),e+1,t),n=ul(r,!0,e+1)),n};Ee.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?ul(a):(mi(e,0,Fu),t===void 0?t=i.rounding:mi(t,0,8),r=It(new i(a),e+vn(a)+1,t),n=ul(r.abs(),!1,e+vn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Ee.toInteger=Ee.toint=function(){var e=this,t=e.constructor;return It(new t(e),vn(e)+1,t.rounding)};Ee.toNumber=function(){return+this};Ee.toPower=Ee.pow=function(e){var t,n,r,a,i,l,u=this,d=u.constructor,f=12,m=+(e=new d(e));if(!e.s)return new d(Jr);if(u=new d(u),!u.s){if(e.s<1)throw Error(Na+"Infinity");return u}if(u.eq(Jr))return u;if(r=d.precision,e.eq(Jr))return It(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,i=u.s,l){if((n=m<0?-m:m)<=a6){for(a=new d(Jr),t=Math.ceil(r/Yt+4),Zt=!1;n%2&&(a=a.times(u),w$(a.d,t)),n=Uu(n/2),n!==0;)u=u.times(u),w$(u.d,t);return Zt=!0,e.s<0?new d(Jr).div(a):It(a,r)}}else if(i<0)throw Error(Na+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Zt=!1,a=e.times(Bf(u,r+f)),Zt=!0,a=o6(a),a.s=i,a};Ee.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=vn(a),r=ul(a,n<=i.toExpNeg||n>=i.toExpPos)):(mi(e,1,Fu),t===void 0?t=i.rounding:mi(t,0,8),a=It(new i(a),e,t),n=vn(a),r=ul(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):(mi(e,1,Fu),t===void 0?t=r.rounding:mi(t,0,8)),It(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=vn(e),n=e.constructor;return ul(e,t<=n.toExpNeg||t>=n.toExpPos)};function i6(e,t){var n,r,a,i,l,u,d,f,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),Zt?It(t,p):t;if(d=e.d,f=t.d,l=e.e,a=t.e,d=d.slice(),i=l-a,i){for(i<0?(r=d,i=-i,u=f.length):(r=f,a=l,u=d.length),l=Math.ceil(p/Yt),u=l>u?l+1:u+1,i>u&&(i=u,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(u=d.length,i=f.length,u-i<0&&(i=u,r=f,f=d,d=r),n=0;i;)n=(d[--i]=d[i]+f[i]+n)/Bn|0,d[i]%=Bn;for(n&&(d.unshift(n),++a),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=a,Zt?It(t,p):t}function mi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(el+e)}function ii(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=Yt-r.length,n&&(i+=zo(n)),i+=r;l=e[t],r=l+"",n=Yt-r.length,n&&(i+=zo(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return i+l}var Qi=(function(){function e(r,a){var i,l=0,u=r.length;for(r=r.slice();u--;)i=r[u]*a+l,r[u]=i%Bn|0,l=i/Bn|0;return l&&r.unshift(l),r}function t(r,a,i,l){var u,d;if(i!=l)d=i>l?1:-1;else for(u=d=0;u<i;u++)if(r[u]!=a[u]){d=r[u]>a[u]?1:-1;break}return d}function n(r,a,i){for(var l=0;i--;)r[i]-=l,l=r[i]<a[i]?1:0,r[i]=l*Bn+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,l){var u,d,f,m,p,g,x,j,b,w,N,O,C,A,E,k,T,P,$=r.constructor,z=r.s==a.s?1:-1,D=r.d,U=a.d;if(!r.s)return new $(r);if(!a.s)throw Error(Na+"Division by zero");for(d=r.e-a.e,T=U.length,E=D.length,x=new $(z),j=x.d=[],f=0;U[f]==(D[f]||0);)++f;if(U[f]>(D[f]||0)&&--d,i==null?O=i=$.precision:l?O=i+(vn(r)-vn(a))+1:O=i,O<0)return new $(0);if(O=O/Yt+2|0,f=0,T==1)for(m=0,U=U[0],O++;(f<E||m)&&O--;f++)C=m*Bn+(D[f]||0),j[f]=C/U|0,m=C%U|0;else{for(m=Bn/(U[0]+1)|0,m>1&&(U=e(U,m),D=e(D,m),T=U.length,E=D.length),A=T,b=D.slice(0,T),w=b.length;w<T;)b[w++]=0;P=U.slice(),P.unshift(0),k=U[0],U[1]>=Bn/2&&++k;do m=0,u=t(U,b,T,w),u<0?(N=b[0],T!=w&&(N=N*Bn+(b[1]||0)),m=N/k|0,m>1?(m>=Bn&&(m=Bn-1),p=e(U,m),g=p.length,w=b.length,u=t(p,b,g,w),u==1&&(m--,n(p,T<g?P:U,g))):(m==0&&(u=m=1),p=U.slice()),g=p.length,g<w&&p.unshift(0),n(b,p,w),u==-1&&(w=b.length,u=t(U,b,T,w),u<1&&(m++,n(b,T<w?P:U,w))),w=b.length):u===0&&(m++,b=[0]),j[f++]=m,u&&b[0]?b[w++]=D[A]||0:(b=[D[A]],w=1);while((A++<E||b[0]!==void 0)&&O--)}return j[0]||j.shift(),x.e=d,It(x,l?i+vn(x)+1:i)}})();function o6(e,t){var n,r,a,i,l,u,d=0,f=0,m=e.constructor,p=m.precision;if(vn(e)>16)throw Error(AC+vn(e));if(!e.s)return new m(Jr);for(Zt=!1,u=p,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),f+=5;for(r=Math.log(Bs(2,f))/Math.LN10*2+5|0,u+=r,n=a=i=new m(Jr),m.precision=u;;){if(a=It(a.times(e),u),n=n.times(++d),l=i.plus(Qi(a,n,u)),ii(l.d).slice(0,u)===ii(i.d).slice(0,u)){for(;f--;)i=It(i.times(i),u);return m.precision=p,t==null?(Zt=!0,It(i,p)):i}i=l}}function vn(e){for(var t=e.e*Yt,n=e.d[0];n>=10;n/=10)t++;return t}function lS(e,t,n){if(t>e.LN10.sd())throw Zt=!0,n&&(e.precision=n),Error(Na+"LN10 precision limit exceeded");return It(new e(e.LN10),t)}function zo(e){for(var t="";e--;)t+="0";return t}function Bf(e,t){var n,r,a,i,l,u,d,f,m,p=1,g=10,x=e,j=x.d,b=x.constructor,w=b.precision;if(x.s<1)throw Error(Na+(x.s?"NaN":"-Infinity"));if(x.eq(Jr))return new b(0);if(t==null?(Zt=!1,f=w):f=t,x.eq(10))return t==null&&(Zt=!0),lS(b,f);if(f+=g,b.precision=f,n=ii(j),r=n.charAt(0),i=vn(x),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=ii(x.d),r=n.charAt(0),p++;i=vn(x),r>1?(x=new b("0."+n),i++):x=new b(r+"."+n.slice(1))}else return d=lS(b,f+2,w).times(i+""),x=Bf(new b(r+"."+n.slice(1)),f-g).plus(d),b.precision=w,t==null?(Zt=!0,It(x,w)):x;for(u=l=x=Qi(x.minus(Jr),x.plus(Jr),f),m=It(x.times(x),f),a=3;;){if(l=It(l.times(m),f),d=u.plus(Qi(l,new b(a),f)),ii(d.d).slice(0,f)===ii(u.d).slice(0,f))return u=u.times(2),i!==0&&(u=u.plus(lS(b,f+2,w).times(i+""))),u=Qi(u,new b(p),f),b.precision=w,t==null?(Zt=!0,It(u,w)):u;u=d,a+=2}}function b$(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=Uu(n/Yt),e.d=[],r=(n+1)%Yt,n<0&&(r+=Yt),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Yt;r<a;)e.d.push(+t.slice(r,r+=Yt));t=t.slice(r),r=Yt-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Zt&&(e.e>Fv||e.e<-Fv))throw Error(AC+n)}else e.s=0,e.e=0,e.d=[0];return e}function It(e,t,n){var r,a,i,l,u,d,f,m,p=e.d;for(l=1,i=p[0];i>=10;i/=10)l++;if(r=t-l,r<0)r+=Yt,a=t,f=p[m=0];else{if(m=Math.ceil((r+1)/Yt),i=p.length,m>=i)return e;for(f=i=p[m],l=1;i>=10;i/=10)l++;r%=Yt,a=r-Yt+l}if(n!==void 0&&(i=Bs(10,l-a-1),u=f/i%10|0,d=t<0||p[m+1]!==void 0||f%i,d=n<4?(u||d)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||d||n==6&&(r>0?a>0?f/Bs(10,l-a):0:p[m-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return d?(i=vn(e),p.length=1,t=t-i-1,p[0]=Bs(10,(Yt-t%Yt)%Yt),e.e=Uu(-t/Yt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=m,i=1,m--):(p.length=m+1,i=Bs(10,Yt-r),p[m]=a>0?(f/Bs(10,l-a)%Bs(10,a)|0)*i:0),d)for(;;)if(m==0){(p[0]+=i)==Bn&&(p[0]=1,++e.e);break}else{if(p[m]+=i,p[m]!=Bn)break;p[m--]=0,i=1}for(r=p.length;p[--r]===0;)p.pop();if(Zt&&(e.e>Fv||e.e<-Fv))throw Error(AC+vn(e));return e}function s6(e,t){var n,r,a,i,l,u,d,f,m,p,g=e.constructor,x=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Zt?It(t,x):t;if(d=e.d,p=t.d,r=t.e,f=e.e,d=d.slice(),l=f-r,l){for(m=l<0,m?(n=d,l=-l,u=p.length):(n=p,r=f,u=d.length),a=Math.max(Math.ceil(x/Yt),u)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=d.length,u=p.length,m=a<u,m&&(u=a),a=0;a<u;a++)if(d[a]!=p[a]){m=d[a]<p[a];break}l=0}for(m&&(n=d,d=p,p=n,t.s=-t.s),u=d.length,a=p.length-u;a>0;--a)d[u++]=0;for(a=p.length;a>l;){if(d[--a]<p[a]){for(i=a;i&&d[--i]===0;)d[i]=Bn-1;--d[i],d[a]+=Bn}d[a]-=p[a]}for(;d[--u]===0;)d.pop();for(;d[0]===0;d.shift())--r;return d[0]?(t.d=d,t.e=r,Zt?It(t,x):t):new g(0)}function ul(e,t,n){var r,a=vn(e),i=ii(e.d),l=i.length;return t?(n&&(r=n-l)>0?i=i.charAt(0)+"."+i.slice(1)+zo(r):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+zo(-a-1)+i,n&&(r=n-l)>0&&(i+=zo(r))):a>=l?(i+=zo(a+1-l),n&&(r=n-a-1)>0&&(i=i+"."+zo(r))):((r=a+1)<l&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(i+="."),i+=zo(r))),e.s<0?"-"+i:i}function w$(e,t){if(e.length>t)return e.length=t,!0}function l6(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(el+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 b$(l,i.toString())}else if(typeof i!="string")throw Error(el+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,Yie.test(i))b$(l,i);else throw Error(el+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=l6,a.config=a.set=Kie,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 Kie(e){if(!e||typeof e!="object")throw Error(Na+"Object expected");var t,n,r,a=["precision",1,Fu,"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(Uu(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(el+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(el+n+": "+r);return this}var TC=l6(Gie);Jr=new TC(1);const Mt=TC;function Xie(e){return eoe(e)||Jie(e)||Qie(e)||Zie()}function Zie(){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 Qie(e,t){if(e){if(typeof e=="string")return W_(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 W_(e,t)}}function Jie(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function eoe(e){if(Array.isArray(e))return W_(e)}function W_(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 toe=function(t){return t},c6={},u6=function(t){return t===c6},j$=function(t){return function n(){return arguments.length===0||arguments.length===1&&u6(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},noe=function e(t,n){return t===1?n:j$(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var l=a.filter(function(u){return u!==c6}).length;return l>=t?n.apply(void 0,a):e(t-l,j$(function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];var m=a.map(function(p){return u6(p)?d.shift():p});return n.apply(void 0,Xie(m).concat(d))}))})},hy=function(t){return noe(t.length,t)},V_=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},roe=hy(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),aoe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return toe;var a=n.reverse(),i=a[0],l=a.slice(1);return function(){return l.reduce(function(u,d){return d(u)},i.apply(void 0,arguments))}},G_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},d6=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(u,d){return u===n[d]})||(n=i,r=t.apply(void 0,i)),r}};function ioe(e){var t;return e===0?t=1:t=Math.floor(new Mt(e).abs().log(10).toNumber())+1,t}function ooe(e,t,n){for(var r=new Mt(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var soe=hy(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),loe=hy(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),coe=hy(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const my={rangeStep:ooe,getDigitCount:ioe,interpolateNumber:soe,uninterpolateNumber:loe,uninterpolateTruncation:coe};function Y_(e){return foe(e)||doe(e)||f6(e)||uoe()}function uoe(){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 doe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function foe(e){if(Array.isArray(e))return K_(e)}function zf(e,t){return poe(e)||moe(e,t)||f6(e,t)||hoe()}function hoe(){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 f6(e,t){if(e){if(typeof e=="string")return K_(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 K_(e,t)}}function K_(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 moe(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](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(d){a=!0,i=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw i}}return n}}function poe(e){if(Array.isArray(e))return e}function h6(e){var t=zf(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function m6(e,t,n){if(e.lte(0))return new Mt(0);var r=my.getDigitCount(e.toNumber()),a=new Mt(10).pow(r),i=e.div(a),l=r!==1?.05:.1,u=new Mt(Math.ceil(i.div(l).toNumber())).add(n).mul(l),d=u.mul(a);return t?d:new Mt(Math.ceil(d))}function voe(e,t,n){var r=1,a=new Mt(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Mt(10).pow(my.getDigitCount(e)-1),a=new Mt(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Mt(Math.floor(e)))}else e===0?a=new Mt(Math.floor((t-1)/2)):n||(a=new Mt(Math.floor(e)));var l=Math.floor((t-1)/2),u=aoe(roe(function(d){return a.add(new Mt(d-l).mul(r)).toNumber()}),V_);return u(0,t)}function p6(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 Mt(0),tickMin:new Mt(0),tickMax:new Mt(0)};var i=m6(new Mt(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Mt(0):(l=new Mt(e).add(t).div(2),l=l.sub(new Mt(l).mod(i)));var u=Math.ceil(l.sub(e).div(i).toNumber()),d=Math.ceil(new Mt(t).sub(l).div(i).toNumber()),f=u+d+1;return f>n?p6(e,t,n,r,a+1):(f<n&&(d=t>0?d+(n-f):d,u=t>0?u:u+(n-f)),{step:i,tickMin:l.sub(new Mt(u).mul(i)),tickMax:l.add(new Mt(d).mul(i))})}function goe(e){var t=zf(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),u=h6([n,r]),d=zf(u,2),f=d[0],m=d[1];if(f===-1/0||m===1/0){var p=m===1/0?[f].concat(Y_(V_(0,a-1).map(function(){return 1/0}))):[].concat(Y_(V_(0,a-1).map(function(){return-1/0})),[m]);return n>r?G_(p):p}if(f===m)return voe(f,a,i);var g=p6(f,m,l,i),x=g.step,j=g.tickMin,b=g.tickMax,w=my.rangeStep(j,b.add(new Mt(.1).mul(x)),x);return n>r?G_(w):w}function yoe(e,t){var n=zf(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=h6([r,a]),u=zf(l,2),d=u[0],f=u[1];if(d===-1/0||f===1/0)return[r,a];if(d===f)return[d];var m=Math.max(t,2),p=m6(new Mt(f).sub(d).div(m-1),i,0),g=[].concat(Y_(my.rangeStep(new Mt(d),new Mt(f).sub(new Mt(.99).mul(p)),p)),[f]);return r>a?G_(g):g}var xoe=d6(goe),boe=d6(yoe),woe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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)}function Uv(){return Uv=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},Uv.apply(this,arguments)}function joe(e,t){return Ooe(e)||Noe(e,t)||_oe(e,t)||Soe()}function Soe(){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 _oe(e,t){if(e){if(typeof e=="string")return S$(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 S$(e,t)}}function S$(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 Noe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function Ooe(e){if(Array.isArray(e))return e}function Coe(e,t){if(e==null)return{};var n=Eoe(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 Eoe(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 Aoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Toe(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,y6(r.key),r)}}function koe(e,t,n){return t&&Toe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Poe(e,t,n){return t=Hv(t),Moe(e,v6()?Reflect.construct(t,n||[],Hv(e).constructor):t.apply(e,n))}function Moe(e,t){if(t&&(cu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Roe(e)}function Roe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v6=function(){return!!e})()}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function Doe(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 g6(e,t,n){return t=y6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y6(e){var t=$oe(e,"string");return cu(t)=="symbol"?t:t+""}function $oe(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 String(e)}var Rh=(function(e){function t(){return Aoe(this,t),Poe(this,t,arguments)}return Doe(t,e),koe(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,l=r.width,u=r.dataKey,d=r.data,f=r.dataPointFormatter,m=r.xAxis,p=r.yAxis,g=Coe(r,woe),x=Be(g,!1);this.props.direction==="x"&&m.type!=="number"&&cr(!1);var j=d.map(function(b){var w=f(b,u),N=w.x,O=w.y,C=w.value,A=w.errorVal;if(!A)return null;var E=[],k,T;if(Array.isArray(A)){var P=joe(A,2);k=P[0],T=P[1]}else k=T=A;if(i==="vertical"){var $=m.scale,z=O+a,D=z+l,U=z-l,V=$(C-k),H=$(C+T);E.push({x1:H,y1:D,x2:H,y2:U}),E.push({x1:V,y1:z,x2:H,y2:z}),E.push({x1:V,y1:D,x2:V,y2:U})}else if(i==="horizontal"){var G=p.scale,L=N+a,R=L-l,F=L+l,K=G(C-k),te=G(C+T);E.push({x1:R,y1:te,x2:F,y2:te}),E.push({x1:L,y1:K,x2:L,y2:te}),E.push({x1:R,y1:K,x2:F,y2:K})}return W.createElement(pt,Uv({className:"recharts-errorBar",key:"bar-".concat(E.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},x),E.map(function(I){return W.createElement("line",Uv({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return W.createElement(pt,{className:"recharts-errorBars"},j)}}])})(W.Component);g6(Rh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});g6(Rh,"displayName","ErrorBar");function qf(e){"@babel/helpers - typeof";return qf=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},qf(e)}function _$(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 Ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(n),!0).forEach(function(r){Ioe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ioe(e,t,n){return t=Loe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Loe(e){var t=Boe(e,"string");return qf(t)=="symbol"?t:t+""}function Boe(e,t){if(qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x6=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,l=Yr(n,Qs);if(!l)return null;var u=Qs.defaultProps,d=u!==void 0?Ds(Ds({},u),l.props):{},f;return l.props&&l.props.payload?f=l.props&&l.props.payload:i==="children"?f=(r||[]).reduce(function(m,p){var g=p.item,x=p.props,j=x.sectors||x.data||[];return m.concat(j.map(function(b){return{type:l.props.iconType||g.props.legendType,value:b.name,color:b.fill,payload:b}}))},[]):f=(r||[]).map(function(m){var p=m.item,g=p.type.defaultProps,x=g!==void 0?Ds(Ds({},g),p.props):{},j=x.dataKey,b=x.name,w=x.legendType,N=x.hide;return{inactive:N,dataKey:j,type:d.iconType||w||"square",color:kC(p),value:b||j,payload:x}}),Ds(Ds(Ds({},d),Qs.getWithHeight(l,a)),{},{payload:f,item:l})};function Ff(e){"@babel/helpers - typeof";return Ff=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},Ff(e)}function N$(e){return Uoe(e)||Foe(e)||qoe(e)||zoe()}function zoe(){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 qoe(e,t){if(e){if(typeof e=="string")return Z_(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 Z_(e,t)}}function Foe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uoe(e){if(Array.isArray(e))return Z_(e)}function Z_(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 O$(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 an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O$(Object(n),!0).forEach(function(r){Fc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fc(e,t,n){return t=Hoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hoe(e){var t=Woe(e,"string");return Ff(t)=="symbol"?t:t+""}function Woe(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tn(e,t,n){return Ge(e)||Ge(t)?n:kn(t)?ea(e,t,n):We(t)?t(e):n}function bf(e,t,n,r){var a=Hie(e,function(u){return Tn(u,t)});if(n==="number"){var i=a.filter(function(u){return Oe(u)||parseFloat(u)});return i.length?[fy(i),dy(i)]:[1/0,-1/0]}var l=r?a.filter(function(u){return!Ge(u)}):a;return l.map(function(u){return kn(u)||u instanceof Date?u:""})}var Voe=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,u=(n=r?.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var d=i.range,f=0;f<u;f++){var m=f>0?a[f-1].coordinate:a[u-1].coordinate,p=a[f].coordinate,g=f>=u-1?a[0].coordinate:a[f+1].coordinate,x=void 0;if(xr(p-m)!==xr(g-p)){var j=[];if(xr(g-p)===xr(d[1]-d[0])){x=g;var b=p+d[1]-d[0];j[0]=Math.min(b,(b+m)/2),j[1]=Math.max(b,(b+m)/2)}else{x=m;var w=g+d[1]-d[0];j[0]=Math.min(p,(w+p)/2),j[1]=Math.max(p,(w+p)/2)}var N=[Math.min(p,(x+p)/2),Math.max(p,(x+p)/2)];if(t>N[0]&&t<=N[1]||t>=j[0]&&t<=j[1]){l=a[f].index;break}}else{var O=Math.min(m,g),C=Math.max(m,g);if(t>(O+p)/2&&t<=(C+p)/2){l=a[f].index;break}}}else for(var A=0;A<u;A++)if(A===0&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A>0&&A<u-1&&t>(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===u-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){l=r[A].index;break}return l},kC=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,l=i.stroke,u=i.fill,d;switch(a){case"Line":d=l;break;case"Area":case"Radar":d=l&&l!=="none"?l:u;break;default:d=u;break}return d},Goe=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var l={},u=Object.keys(i),d=0,f=u.length;d<f;d++)for(var m=i[u[d]].stackGroups,p=Object.keys(m),g=0,x=p.length;g<x;g++){var j=m[p[g]],b=j.items,w=j.cateAxisId,N=b.filter(function(T){return Zi(T.type).indexOf("Bar")>=0});if(N&&N.length){var O=N[0].type.defaultProps,C=O!==void 0?an(an({},O),N[0].props):N[0].props,A=C.barSize,E=C[w];l[E]||(l[E]=[]);var k=Ge(A)?n:A;l[E].push({item:N[0],stackList:N.slice(1),barSize:Ge(k)?void 0:br(k,r,0)})}}return l},Yoe=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,l=i===void 0?[]:i,u=t.maxBarSize,d=l.length;if(d<1)return null;var f=br(n,a,0,!0),m,p=[];if(l[0].barSize===+l[0].barSize){var g=!1,x=a/d,j=l.reduce(function(A,E){return A+E.barSize||0},0);j+=(d-1)*f,j>=a&&(j-=(d-1)*f,f=0),j>=a&&x>0&&(g=!0,x*=.9,j=d*x);var b=(a-j)/2>>0,w={offset:b-f,size:0};m=l.reduce(function(A,E){var k={item:E.item,position:{offset:w.offset+w.size+f,size:g?x:E.barSize}},T=[].concat(N$(A),[k]);return w=T[T.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(P){T.push({item:P,position:w})}),T},p)}else{var N=br(r,a,0,!0);a-2*N-(d-1)*f<=0&&(f=0);var O=(a-2*N-(d-1)*f)/d;O>1&&(O>>=0);var C=u===+u?Math.min(O,u):O;m=l.reduce(function(A,E,k){var T=[].concat(N$(A),[{item:E.item,position:{offset:N+(O+f)*k+(O-C)/2,size:C}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(P){T.push({item:P,position:T[T.length-1].position})}),T},p)}return m},Koe=function(t,n,r,a){var i=r.children,l=r.width,u=r.margin,d=l-(u.left||0)-(u.right||0),f=x6({children:i,legendWidth:d});if(f){var m=a||{},p=m.width,g=m.height,x=f.align,j=f.verticalAlign,b=f.layout;if((b==="vertical"||b==="horizontal"&&j==="middle")&&x!=="center"&&Oe(t[x]))return an(an({},t),{},Fc({},x,t[x]+(p||0)));if((b==="horizontal"||b==="vertical"&&x==="center")&&j!=="middle"&&Oe(t[j]))return an(an({},t),{},Fc({},j,t[j]+(g||0)))}return t},Xoe=function(t,n,r){return Ge(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},b6=function(t,n,r,a,i){var l=n.props.children,u=ta(l,Rh).filter(function(f){return Xoe(a,i,f.props.direction)});if(u&&u.length){var d=u.map(function(f){return f.props.dataKey});return t.reduce(function(f,m){var p=Tn(m,r);if(Ge(p))return f;var g=Array.isArray(p)?[fy(p),dy(p)]:[p,p],x=d.reduce(function(j,b){var w=Tn(m,b,0),N=g[0]-Math.abs(Array.isArray(w)?w[0]:w),O=g[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(N,j[0]),Math.max(O,j[1])]},[1/0,-1/0]);return[Math.min(x[0],f[0]),Math.max(x[1],f[1])]},[1/0,-1/0])}return null},Zoe=function(t,n,r,a,i){var l=n.map(function(u){return b6(t,u,r,i,a)}).filter(function(u){return!Ge(u)});return l&&l.length?l.reduce(function(u,d){return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]):null},w6=function(t,n,r,a,i){var l=n.map(function(d){var f=d.props.dataKey;return r==="number"&&f&&b6(t,d,f,a)||bf(t,f,r,i)});if(r==="number")return l.reduce(function(d,f){return[Math.min(d[0],f[0]),Math.max(d[1],f[1])]},[1/0,-1/0]);var u={};return l.reduce(function(d,f){for(var m=0,p=f.length;m<p;m++)u[f[m]]||(u[f[m]]=!0,d.push(f[m]));return d},[])},j6=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},S6=function(t,n,r,a){if(a)return t.map(function(d){return d.coordinate});var i,l,u=t.map(function(d){return d.coordinate===n&&(i=!0),d.coordinate===r&&(l=!0),d.coordinate});return i||u.push(n),l||u.push(r),u},Gi=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,l=t.type,u=t.range,d=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,f=(n||r)&&l==="category"&&a.bandwidth?a.bandwidth()/d:0;if(f=t.axisType==="angleAxis"&&u?.length>=2?xr(u[0]-u[1])*2*f:f,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(p){var g=i?i.indexOf(p):p;return{coordinate:a(g)+f,value:p,offset:f}});return m.filter(function(p){return!Ch(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,g){return{coordinate:a(p)+f,value:p,index:g,offset:f}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(p){return{coordinate:a(p)+f,value:p,offset:f}}):a.domain().map(function(p,g){return{coordinate:a(p)+f,value:i?i[p]:p,index:g,offset:f}})},cS=new WeakMap,Mp=function(t,n){if(typeof n!="function")return t;cS.has(t)||cS.set(t,new WeakMap);var r=cS.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},_6=function(t,n,r){var a=t.scale,i=t.type,l=t.layout,u=t.axisType;if(a==="auto")return l==="radial"&&u==="radiusAxis"?{scale:Rf(),realScaleType:"band"}:l==="radial"&&u==="angleAxis"?{scale:Lv(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:xf(),realScaleType:"point"}:i==="category"?{scale:Rf(),realScaleType:"band"}:{scale:Lv(),realScaleType:"linear"};if(sl(a)){var d="scale".concat(Xg(a));return{scale:(d$[d]||xf)(),realScaleType:d$[d]?d:"point"}}return We(a)?{scale:a}:{scale:xf(),realScaleType:"point"}},C$=1e-4,N6=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])-C$,l=Math.max(a[0],a[1])+C$,u=t(n[0]),d=t(n[r-1]);(u<i||u>l||d<i||d>l)&&t.domain([n[0],n[r-1]])}},Qoe=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},Joe=function(t,n){if(!n||n.length!==2||!Oe(n[0])||!Oe(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(!Oe(t[0])||t[0]<r)&&(i[0]=r),(!Oe(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},ese=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,u=0;u<n;++u){var d=Ch(t[u][r][1])?t[u][r][0]:t[u][r][1];d>=0?(t[u][r][0]=i,t[u][r][1]=i+d,i=t[u][r][1]):(t[u][r][0]=l,t[u][r][1]=l+d,l=t[u][r][1])}},tse=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 u=Ch(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=i,t[l][r][1]=i+u,i=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},nse={sign:ese,expand:UJ,none:tu,silhouette:HJ,wiggle:WJ,positive:tse},rse=function(t,n,r){var a=n.map(function(u){return u.props.dataKey}),i=nse[r],l=FJ().keys(a).value(function(u,d){return+Tn(u,d,0)}).order(C_).offset(i);return l(t)},ase=function(t,n,r,a,i,l){if(!t)return null;var u=l?n.reverse():n,d={},f=u.reduce(function(p,g){var x,j=(x=g.type)!==null&&x!==void 0&&x.defaultProps?an(an({},g.type.defaultProps),g.props):g.props,b=j.stackId,w=j.hide;if(w)return p;var N=j[r],O=p[N]||{hasStack:!1,stackGroups:{}};if(kn(b)){var C=O.stackGroups[b]||{numericAxisId:r,cateAxisId:a,items:[]};C.items.push(g),O.hasStack=!0,O.stackGroups[b]=C}else O.stackGroups[Bu("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[g]};return an(an({},p),{},Fc({},N,O))},d),m={};return Object.keys(f).reduce(function(p,g){var x=f[g];if(x.hasStack){var j={};x.stackGroups=Object.keys(x.stackGroups).reduce(function(b,w){var N=x.stackGroups[w];return an(an({},b),{},Fc({},w,{numericAxisId:r,cateAxisId:a,items:N.items,stackedData:rse(t,N.items,i)}))},j)}return an(an({},p),{},Fc({},g,x))},m)},O6=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,l=n.originalDomain,u=n.allowDecimals,d=r||n.scale;if(d!=="auto"&&d!=="linear")return null;if(i&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var f=t.domain();if(!f.length)return null;var m=xoe(f,i,u);return t.domain([fy(m),dy(m)]),{niceTicks:m}}if(i&&a==="number"){var p=t.domain(),g=boe(p,i,u);return{niceTicks:g}}return null};function E$(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&&!Ge(a[t.dataKey])){var u=bv(n,"value",a[t.dataKey]);if(u)return u.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var d=Tn(a,Ge(l)?t.dataKey:l);return Ge(d)?null:t.scale(d)}var A$=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,l=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+a:null;var d=Tn(l,n.dataKey,n.domain[u]);return Ge(d)?null:n.scale(d)-i/2+a},ise=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]},ose=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(kn(i)){var l=n[i];if(l){var u=l.items.indexOf(t);return u>=0?l.stackedData[u]:null}}return null},sse=function(t){return t.reduce(function(n,r){return[fy(r.concat([n[0]]).filter(Oe)),dy(r.concat([n[1]]).filter(Oe))]},[1/0,-1/0])},C6=function(t,n,r){return Object.keys(t).reduce(function(a,i){var l=t[i],u=l.stackedData,d=u.reduce(function(f,m){var p=sse(m.slice(n,r+1));return[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(d[0],a[0]),Math.max(d[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},T$=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,k$=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Q_=function(t,n,r){if(We(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Oe(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(T$.test(t[0])){var i=+T$.exec(t[0])[1];a[0]=n[0]-i}else We(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Oe(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(k$.test(t[1])){var l=+k$.exec(t[1])[1];a[1]=n[1]+l}else We(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},Wv=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=iC(n,function(p){return p.coordinate}),l=1/0,u=1,d=i.length;u<d;u++){var f=i[u],m=i[u-1];l=Math.min((f.coordinate||0)-(m.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},P$=function(t,n,r){return!t||!t.length||Mh(t,ea(r,"type.defaultProps.domain"))?n:t},E6=function(t,n){var r=t.type.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,l=r.unit,u=r.formatter,d=r.tooltipType,f=r.chartType,m=r.hide;return an(an({},Be(t,!1)),{},{dataKey:a,unit:l,formatter:u,name:i||a,color:kC(t),value:Tn(n,a),type:d,payload:n,chartType:f,hide:m})};function Uf(e){"@babel/helpers - typeof";return Uf=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},Uf(e)}function M$(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 Ui(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M$(Object(n),!0).forEach(function(r){A6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function A6(e,t,n){return t=lse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lse(e){var t=cse(e,"string");return Uf(t)=="symbol"?t:t+""}function cse(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function use(e,t){return mse(e)||hse(e,t)||fse(e,t)||dse()}function dse(){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 fse(e,t){if(e){if(typeof e=="string")return R$(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 R$(e,t)}}function R$(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 hse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function mse(e){if(Array.isArray(e))return e}var Vv=Math.PI/180,pse=function(t){return t*180/Math.PI},Ft=function(t,n,r,a){return{x:t+Math.cos(-Vv*a)*r,y:n+Math.sin(-Vv*a)*r}},T6=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},vse=function(t,n,r,a,i){var l=t.width,u=t.height,d=t.startAngle,f=t.endAngle,m=br(t.cx,l,l/2),p=br(t.cy,u,u/2),g=T6(l,u,r),x=br(t.innerRadius,g,0),j=br(t.outerRadius,g,g*.8),b=Object.keys(n);return b.reduce(function(w,N){var O=n[N],C=O.domain,A=O.reversed,E;if(Ge(O.range))a==="angleAxis"?E=[d,f]:a==="radiusAxis"&&(E=[x,j]),A&&(E=[E[1],E[0]]);else{E=O.range;var k=E,T=use(k,2);d=T[0],f=T[1]}var P=_6(O,i),$=P.realScaleType,z=P.scale;z.domain(C).range(E),N6(z);var D=O6(z,Ui(Ui({},O),{},{realScaleType:$})),U=Ui(Ui(Ui({},O),D),{},{range:E,radius:j,realScaleType:$,scale:z,cx:m,cy:p,innerRadius:x,outerRadius:j,startAngle:d,endAngle:f});return Ui(Ui({},w),{},A6({},N,U))},{})},gse=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))},yse=function(t,n){var r=t.x,a=t.y,i=n.cx,l=n.cy,u=gse({x:r,y:a},{x:i,y:l});if(u<=0)return{radius:u};var d=(r-i)/u,f=Math.acos(d);return a>l&&(f=2*Math.PI-f),{radius:u,angle:pse(f),angleInRadian:f}},xse=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}},bse=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),l=Math.floor(a/360),u=Math.min(i,l);return t+u*360},D$=function(t,n){var r=t.x,a=t.y,i=yse({x:r,y:a},n),l=i.radius,u=i.angle,d=n.innerRadius,f=n.outerRadius;if(l<d||l>f)return!1;if(l===0)return!0;var m=xse(n),p=m.startAngle,g=m.endAngle,x=u,j;if(p<=g){for(;x>g;)x-=360;for(;x<p;)x+=360;j=x>=p&&x<=g}else{for(;x>p;)x-=360;for(;x<g;)x+=360;j=x>=g&&x<=p}return j?Ui(Ui({},n),{},{radius:l,angle:bse(x,n)}):null},k6=function(t){return!y.isValidElement(t)&&!We(t)&&typeof t!="boolean"?t.className:""};function Hf(e){"@babel/helpers - typeof";return Hf=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},Hf(e)}var wse=["offset"];function jse(e){return Ose(e)||Nse(e)||_se(e)||Sse()}function Sse(){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 _se(e,t){if(e){if(typeof e=="string")return J_(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 J_(e,t)}}function Nse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ose(e){if(Array.isArray(e))return J_(e)}function J_(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 Cse(e,t){if(e==null)return{};var n=Ese(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 Ese(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 $$(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 An(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$$(Object(n),!0).forEach(function(r){Ase(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ase(e,t,n){return t=Tse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tse(e){var t=kse(e,"string");return Hf(t)=="symbol"?t:t+""}function kse(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wf(){return Wf=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},Wf.apply(this,arguments)}var Pse=function(t){var n=t.value,r=t.formatter,a=Ge(t.children)?n:t.children;return We(r)?r(a):a},Mse=function(t,n){var r=xr(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Rse=function(t,n,r){var a=t.position,i=t.viewBox,l=t.offset,u=t.className,d=i,f=d.cx,m=d.cy,p=d.innerRadius,g=d.outerRadius,x=d.startAngle,j=d.endAngle,b=d.clockWise,w=(p+g)/2,N=Mse(x,j),O=N>=0?1:-1,C,A;a==="insideStart"?(C=x+O*l,A=b):a==="insideEnd"?(C=j-O*l,A=!b):a==="end"&&(C=j+O*l,A=b),A=N<=0?A:!A;var E=Ft(f,m,w,C),k=Ft(f,m,w,C+(A?1:-1)*359),T="M".concat(E.x,",").concat(E.y,`
|
||
A`).concat(w,",").concat(w,",0,1,").concat(A?0:1,`,
|
||
`).concat(k.x,",").concat(k.y),P=Ge(t.id)?Bu("recharts-radial-line-"):t.id;return W.createElement("text",Wf({},r,{dominantBaseline:"central",className:Ye("recharts-radial-bar-label",u)}),W.createElement("defs",null,W.createElement("path",{id:P,d:T})),W.createElement("textPath",{xlinkHref:"#".concat(P)},n))},Dse=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,l=i.cx,u=i.cy,d=i.innerRadius,f=i.outerRadius,m=i.startAngle,p=i.endAngle,g=(m+p)/2;if(a==="outside"){var x=Ft(l,u,f+r,g),j=x.x,b=x.y;return{x:j,y:b,textAnchor:j>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"end"};var w=(d+f)/2,N=Ft(l,u,w,g),O=N.x,C=N.y;return{x:O,y:C,textAnchor:"middle",verticalAnchor:"middle"}},$se=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,l=n,u=l.x,d=l.y,f=l.width,m=l.height,p=m>=0?1:-1,g=p*a,x=p>0?"end":"start",j=p>0?"start":"end",b=f>=0?1:-1,w=b*a,N=b>0?"end":"start",O=b>0?"start":"end";if(i==="top"){var C={x:u+f/2,y:d-p*a,textAnchor:"middle",verticalAnchor:x};return An(An({},C),r?{height:Math.max(d-r.y,0),width:f}:{})}if(i==="bottom"){var A={x:u+f/2,y:d+m+g,textAnchor:"middle",verticalAnchor:j};return An(An({},A),r?{height:Math.max(r.y+r.height-(d+m),0),width:f}:{})}if(i==="left"){var E={x:u-w,y:d+m/2,textAnchor:N,verticalAnchor:"middle"};return An(An({},E),r?{width:Math.max(E.x-r.x,0),height:m}:{})}if(i==="right"){var k={x:u+f+w,y:d+m/2,textAnchor:O,verticalAnchor:"middle"};return An(An({},k),r?{width:Math.max(r.x+r.width-k.x,0),height:m}:{})}var T=r?{width:f,height:m}:{};return i==="insideLeft"?An({x:u+w,y:d+m/2,textAnchor:O,verticalAnchor:"middle"},T):i==="insideRight"?An({x:u+f-w,y:d+m/2,textAnchor:N,verticalAnchor:"middle"},T):i==="insideTop"?An({x:u+f/2,y:d+g,textAnchor:"middle",verticalAnchor:j},T):i==="insideBottom"?An({x:u+f/2,y:d+m-g,textAnchor:"middle",verticalAnchor:x},T):i==="insideTopLeft"?An({x:u+w,y:d+g,textAnchor:O,verticalAnchor:j},T):i==="insideTopRight"?An({x:u+f-w,y:d+g,textAnchor:N,verticalAnchor:j},T):i==="insideBottomLeft"?An({x:u+w,y:d+m-g,textAnchor:O,verticalAnchor:x},T):i==="insideBottomRight"?An({x:u+f-w,y:d+m-g,textAnchor:N,verticalAnchor:x},T):Lu(i)&&(Oe(i.x)||Us(i.x))&&(Oe(i.y)||Us(i.y))?An({x:u+br(i.x,f),y:d+br(i.y,m),textAnchor:"end",verticalAnchor:"end"},T):An({x:u+f/2,y:d+m/2,textAnchor:"middle",verticalAnchor:"middle"},T)},Ise=function(t){return"cx"in t&&Oe(t.cx)};function zn(e){var t=e.offset,n=t===void 0?5:t,r=Cse(e,wse),a=An({offset:n},r),i=a.viewBox,l=a.position,u=a.value,d=a.children,f=a.content,m=a.className,p=m===void 0?"":m,g=a.textBreakAll;if(!i||Ge(u)&&Ge(d)&&!y.isValidElement(f)&&!We(f))return null;if(y.isValidElement(f))return y.cloneElement(f,a);var x;if(We(f)){if(x=y.createElement(f,a),y.isValidElement(x))return x}else x=Pse(a);var j=Ise(i),b=Be(a,!0);if(j&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Rse(a,x,b);var w=j?Dse(a):$se(a);return W.createElement(cl,Wf({className:Ye("recharts-label",p)},b,w,{breakAll:g}),x)}zn.displayName="Label";var P6=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,l=t.endAngle,u=t.r,d=t.radius,f=t.innerRadius,m=t.outerRadius,p=t.x,g=t.y,x=t.top,j=t.left,b=t.width,w=t.height,N=t.clockWise,O=t.labelViewBox;if(O)return O;if(Oe(b)&&Oe(w)){if(Oe(p)&&Oe(g))return{x:p,y:g,width:b,height:w};if(Oe(x)&&Oe(j))return{x,y:j,width:b,height:w}}return Oe(p)&&Oe(g)?{x:p,y:g,width:0,height:0}:Oe(n)&&Oe(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:l||a||0,innerRadius:f||0,outerRadius:m||d||u||0,clockWise:N}:t.viewBox?t.viewBox:{}},Lse=function(t,n){return t?t===!0?W.createElement(zn,{key:"label-implicit",viewBox:n}):kn(t)?W.createElement(zn,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===zn?y.cloneElement(t,{key:"label-implicit",viewBox:n}):W.createElement(zn,{key:"label-implicit",content:t,viewBox:n}):We(t)?W.createElement(zn,{key:"label-implicit",content:t,viewBox:n}):Lu(t)?W.createElement(zn,Wf({viewBox:n},t,{key:"label-implicit"})):null:null},Bse=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=P6(t),l=ta(a,zn).map(function(d,f){return y.cloneElement(d,{viewBox:n||i,key:"label-".concat(f)})});if(!r)return l;var u=Lse(t.label,n||i);return[u].concat(jse(l))};zn.parseViewBox=P6;zn.renderCallByParent=Bse;var uS,I$;function zse(){if(I$)return uS;I$=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return uS=e,uS}var qse=zse();const Fse=St(qse);function Vf(e){"@babel/helpers - typeof";return Vf=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},Vf(e)}var Use=["valueAccessor"],Hse=["data","dataKey","clockWise","id","textBreakAll"];function Wse(e){return Kse(e)||Yse(e)||Gse(e)||Vse()}function Vse(){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 Gse(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 Yse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kse(e){if(Array.isArray(e))return eN(e)}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 Gv(){return Gv=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},Gv.apply(this,arguments)}function L$(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 B$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L$(Object(n),!0).forEach(function(r){Xse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xse(e,t,n){return t=Zse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zse(e){var t=Qse(e,"string");return Vf(t)=="symbol"?t:t+""}function Qse(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z$(e,t){if(e==null)return{};var n=Jse(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 Jse(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 ele=function(t){return Array.isArray(t.value)?Fse(t.value):t.value};function Ji(e){var t=e.valueAccessor,n=t===void 0?ele:t,r=z$(e,Use),a=r.data,i=r.dataKey,l=r.clockWise,u=r.id,d=r.textBreakAll,f=z$(r,Hse);return!a||!a.length?null:W.createElement(pt,{className:"recharts-label-list"},a.map(function(m,p){var g=Ge(i)?n(m,p):Tn(m&&m.payload,i),x=Ge(u)?{}:{id:"".concat(u,"-").concat(p)};return W.createElement(zn,Gv({},Be(m,!0),f,x,{parentViewBox:m.parentViewBox,value:g,textBreakAll:d,viewBox:zn.parseViewBox(Ge(l)?m:B$(B$({},m),{},{clockWise:l})),key:"label-".concat(p),index:p}))}))}Ji.displayName="LabelList";function tle(e,t){return e?e===!0?W.createElement(Ji,{key:"labelList-implicit",data:t}):W.isValidElement(e)||We(e)?W.createElement(Ji,{key:"labelList-implicit",data:t,content:e}):Lu(e)?W.createElement(Ji,Gv({data:t},e,{key:"labelList-implicit"})):null:null}function nle(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=ta(r,Ji).map(function(l,u){return y.cloneElement(l,{data:t,key:"labelList-".concat(u)})});if(!n)return a;var i=tle(e.label,t);return[i].concat(Wse(a))}Ji.renderCallByParent=nle;function Gf(e){"@babel/helpers - typeof";return Gf=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},Gf(e)}function tN(){return tN=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},tN.apply(this,arguments)}function q$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function F$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q$(Object(n),!0).forEach(function(r){rle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rle(e,t,n){return t=ale(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ale(e){var t=ile(e,"string");return Gf(t)=="symbol"?t:t+""}function ile(e,t){if(Gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ole=function(t,n){var r=xr(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},Rp=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,l=t.sign,u=t.isExternal,d=t.cornerRadius,f=t.cornerIsExternal,m=d*(u?1:-1)+a,p=Math.asin(d/m)/Vv,g=f?i:i+l*p,x=Ft(n,r,m,g),j=Ft(n,r,a,g),b=f?i-l*p:i,w=Ft(n,r,m*Math.cos(p*Vv),b);return{center:x,circleTangency:j,lineTangency:w,theta:p}},M6=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.startAngle,u=t.endAngle,d=ole(l,u),f=l+d,m=Ft(n,r,i,l),p=Ft(n,r,i,f),g="M ".concat(m.x,",").concat(m.y,`
|
||
A `).concat(i,",").concat(i,`,0,
|
||
`).concat(+(Math.abs(d)>180),",").concat(+(l>f),`,
|
||
`).concat(p.x,",").concat(p.y,`
|
||
`);if(a>0){var x=Ft(n,r,a,l),j=Ft(n,r,a,f);g+="L ".concat(j.x,",").concat(j.y,`
|
||
A `).concat(a,",").concat(a,`,0,
|
||
`).concat(+(Math.abs(d)>180),",").concat(+(l<=f),`,
|
||
`).concat(x.x,",").concat(x.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},sle=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,f=t.startAngle,m=t.endAngle,p=xr(m-f),g=Rp({cx:n,cy:r,radius:i,angle:f,sign:p,cornerRadius:l,cornerIsExternal:d}),x=g.circleTangency,j=g.lineTangency,b=g.theta,w=Rp({cx:n,cy:r,radius:i,angle:m,sign:-p,cornerRadius:l,cornerIsExternal:d}),N=w.circleTangency,O=w.lineTangency,C=w.theta,A=d?Math.abs(f-m):Math.abs(f-m)-b-C;if(A<0)return u?"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
|
||
`):M6({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:f,endAngle:m});var E="M ".concat(j.x,",").concat(j.y,`
|
||
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(x.x,",").concat(x.y,`
|
||
A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(p<0),",").concat(N.x,",").concat(N.y,`
|
||
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(O.x,",").concat(O.y,`
|
||
`);if(a>0){var k=Rp({cx:n,cy:r,radius:a,angle:f,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:d}),T=k.circleTangency,P=k.lineTangency,$=k.theta,z=Rp({cx:n,cy:r,radius:a,angle:m,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:d}),D=z.circleTangency,U=z.lineTangency,V=z.theta,H=d?Math.abs(f-m):Math.abs(f-m)-$-V;if(H<0&&l===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(U.x,",").concat(U.y,`
|
||
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(D.x,",").concat(D.y,`
|
||
A`).concat(a,",").concat(a,",0,").concat(+(H>180),",").concat(+(p>0),",").concat(T.x,",").concat(T.y,`
|
||
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(P.x,",").concat(P.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},lle={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},R6=function(t){var n=F$(F$({},lle),t),r=n.cx,a=n.cy,i=n.innerRadius,l=n.outerRadius,u=n.cornerRadius,d=n.forceCornerRadius,f=n.cornerIsExternal,m=n.startAngle,p=n.endAngle,g=n.className;if(l<i||m===p)return null;var x=Ye("recharts-sector",g),j=l-i,b=br(u,j,0,!0),w;return b>0&&Math.abs(m-p)<360?w=sle({cx:r,cy:a,innerRadius:i,outerRadius:l,cornerRadius:Math.min(b,j/2),forceCornerRadius:d,cornerIsExternal:f,startAngle:m,endAngle:p}):w=M6({cx:r,cy:a,innerRadius:i,outerRadius:l,startAngle:m,endAngle:p}),W.createElement("path",tN({},Be(n,!0),{className:x,d:w,role:"img"}))};function Yf(e){"@babel/helpers - typeof";return Yf=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},Yf(e)}function nN(){return nN=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},nN.apply(this,arguments)}function U$(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 H$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U$(Object(n),!0).forEach(function(r){cle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cle(e,t,n){return t=ule(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ule(e){var t=dle(e,"string");return Yf(t)=="symbol"?t:t+""}function dle(e,t){if(Yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W$={curveBasisClosed:kJ,curveBasisOpen:PJ,curveBasis:TJ,curveBumpX:vJ,curveBumpY:gJ,curveLinearClosed:MJ,curveLinear:Qg,curveMonotoneX:RJ,curveMonotoneY:DJ,curveNatural:$J,curveStep:IJ,curveStepAfter:BJ,curveStepBefore:LJ},Dp=function(t){return t.x===+t.x&&t.y===+t.y},Jd=function(t){return t.x},ef=function(t){return t.y},fle=function(t,n){if(We(t))return t;var r="curve".concat(Xg(t));return(r==="curveMonotone"||r==="curveBump")&&n?W$["".concat(r).concat(n==="vertical"?"Y":"X")]:W$[r]||Qg},hle=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,l=t.baseLine,u=t.layout,d=t.connectNulls,f=d===void 0?!1:d,m=fle(r,u),p=f?i.filter(function(b){return Dp(b)}):i,g;if(Array.isArray(l)){var x=f?l.filter(function(b){return Dp(b)}):l,j=p.map(function(b,w){return H$(H$({},b),{},{base:x[w]})});return u==="vertical"?g=Op().y(ef).x1(Jd).x0(function(b){return b.base.x}):g=Op().x(Jd).y1(ef).y0(function(b){return b.base.y}),g.defined(Dp).curve(m),g(j)}return u==="vertical"&&Oe(l)?g=Op().y(ef).x1(Jd).x0(l):Oe(l)?g=Op().x(Jd).y1(ef).y0(l):g=PB().x(Jd).y(ef),g.defined(Dp).curve(m),g(p)},Yv=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?hle(t):a;return y.createElement("path",nN({},Be(t,!1),wv(t),{className:Ye("recharts-curve",n),d:l,ref:i}))},dS={exports:{}},fS,V$;function mle(){if(V$)return fS;V$=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fS=e,fS}var hS,G$;function ple(){if(G$)return hS;G$=1;var e=mle();function t(){}function n(){}return n.resetWarningCache=t,hS=function(){function r(l,u,d,f,m,p){if(p!==e){var g=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 g.name="Invariant Violation",g}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},hS}var Y$;function vle(){return Y$||(Y$=1,dS.exports=ple()()),dS.exports}var gle=vle();const bt=St(gle);var yle=Object.getOwnPropertyNames,xle=Object.getOwnPropertySymbols,ble=Object.prototype.hasOwnProperty;function K$(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function $p(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);var i=a.cache,l=i.get(n),u=i.get(r);if(l&&u)return l===r&&u===n;i.set(n,r),i.set(r,n);var d=e(n,r,a);return i.delete(n),i.delete(r),d}}function wle(e){return e?.[Symbol.toStringTag]}function X$(e){return yle(e).concat(xle(e))}var jle=Object.hasOwn||(function(e,t){return ble.call(e,t)});function jl(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Sle="__v",_le="__o",Nle="_owner",Z$=Object.getOwnPropertyDescriptor,Q$=Object.keys;function Ole(e,t,n){var 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 Cle(e,t){return jl(e.getTime(),t.getTime())}function Ele(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Ale(e,t){return e===t}function J$(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var a=new Array(r),i=e.entries(),l,u,d=0;(l=i.next())&&!l.done;){for(var f=t.entries(),m=!1,p=0;(u=f.next())&&!u.done;){if(a[p]){p++;continue}var g=l.value,x=u.value;if(n.equals(g[0],x[0],d,p,e,t,n)&&n.equals(g[1],x[1],g[0],x[0],e,t,n)){m=a[p]=!0;break}p++}if(!m)return!1;d++}return!0}var Tle=jl;function kle(e,t,n){var r=Q$(e),a=r.length;if(Q$(t).length!==a)return!1;for(;a-- >0;)if(!D6(e,t,n,r[a]))return!1;return!0}function tf(e,t,n){var r=X$(e),a=r.length;if(X$(t).length!==a)return!1;for(var i,l,u;a-- >0;)if(i=r[a],!D6(e,t,n,i)||(l=Z$(e,i),u=Z$(t,i),(l||u)&&(!l||!u||l.configurable!==u.configurable||l.enumerable!==u.enumerable||l.writable!==u.writable)))return!1;return!0}function Ple(e,t){return jl(e.valueOf(),t.valueOf())}function Mle(e,t){return e.source===t.source&&e.flags===t.flags}function eI(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var a=new Array(r),i=e.values(),l,u;(l=i.next())&&!l.done;){for(var d=t.values(),f=!1,m=0;(u=d.next())&&!u.done;){if(!a[m]&&n.equals(l.value,u.value,l.value,u.value,e,t,n)){f=a[m]=!0;break}m++}if(!f)return!1}return!0}function Rle(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Dle(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 D6(e,t,n,r){return(r===Nle||r===_le||r===Sle)&&(e.$$typeof||t.$$typeof)?!0:jle(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var $le="[object Arguments]",Ile="[object Boolean]",Lle="[object Date]",Ble="[object Error]",zle="[object Map]",qle="[object Number]",Fle="[object Object]",Ule="[object RegExp]",Hle="[object Set]",Wle="[object String]",Vle="[object URL]",Gle=Array.isArray,tI=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,nI=Object.assign,Yle=Object.prototype.toString.call.bind(Object.prototype.toString);function Kle(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,l=e.areNumbersEqual,u=e.areObjectsEqual,d=e.arePrimitiveWrappersEqual,f=e.areRegExpsEqual,m=e.areSetsEqual,p=e.areTypedArraysEqual,g=e.areUrlsEqual,x=e.unknownTagComparators;return function(b,w,N){if(b===w)return!0;if(b==null||w==null)return!1;var O=typeof b;if(O!==typeof w)return!1;if(O!=="object")return O==="number"?l(b,w,N):O==="function"?a(b,w,N):!1;var C=b.constructor;if(C!==w.constructor)return!1;if(C===Object)return u(b,w,N);if(Gle(b))return t(b,w,N);if(tI!=null&&tI(b))return p(b,w,N);if(C===Date)return n(b,w,N);if(C===RegExp)return f(b,w,N);if(C===Map)return i(b,w,N);if(C===Set)return m(b,w,N);var A=Yle(b);if(A===Lle)return n(b,w,N);if(A===Ule)return f(b,w,N);if(A===zle)return i(b,w,N);if(A===Hle)return m(b,w,N);if(A===Fle)return typeof b.then!="function"&&typeof w.then!="function"&&u(b,w,N);if(A===Vle)return g(b,w,N);if(A===Ble)return r(b,w,N);if(A===$le)return u(b,w,N);if(A===Ile||A===qle||A===Wle)return d(b,w,N);if(x){var E=x[A];if(!E){var k=wle(b);k&&(E=x[k])}if(E)return E(b,w,N)}return!1}}function Xle(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,a={areArraysEqual:r?tf:Ole,areDatesEqual:Cle,areErrorsEqual:Ele,areFunctionsEqual:Ale,areMapsEqual:r?K$(J$,tf):J$,areNumbersEqual:Tle,areObjectsEqual:r?tf:kle,arePrimitiveWrappersEqual:Ple,areRegExpsEqual:Mle,areSetsEqual:r?K$(eI,tf):eI,areTypedArraysEqual:r?tf:Rle,areUrlsEqual:Dle,unknownTagComparators:void 0};if(n&&(a=nI({},a,n(a))),t){var i=$p(a.areArraysEqual),l=$p(a.areMapsEqual),u=$p(a.areObjectsEqual),d=$p(a.areSetsEqual);a=nI({},a,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:u,areSetsEqual:d})}return a}function Zle(e){return function(t,n,r,a,i,l,u){return e(t,n,u)}}function Qle(e){var t=e.circular,n=e.comparator,r=e.createState,a=e.equals,i=e.strict;if(r)return function(d,f){var m=r(),p=m.cache,g=p===void 0?t?new WeakMap:void 0:p,x=m.meta;return n(d,f,{cache:g,equals:a,meta:x,strict:i})};if(t)return function(d,f){return n(d,f,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var l={cache:void 0,equals:a,meta:void 0,strict:i};return function(d,f){return n(d,f,l)}}var Jle=os();os({strict:!0});os({circular:!0});os({circular:!0,strict:!0});os({createInternalComparator:function(){return jl}});os({strict:!0,createInternalComparator:function(){return jl}});os({circular:!0,createInternalComparator:function(){return jl}});os({circular:!0,createInternalComparator:function(){return jl},strict:!0});function os(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,a=e.createState,i=e.strict,l=i===void 0?!1:i,u=Xle(e),d=Kle(u),f=r?r(d):Zle(d);return Qle({circular:n,comparator:d,createState:a,equals:f,strict:l})}function ece(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function rI(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):ece(a)};requestAnimationFrame(r)}function rN(e){"@babel/helpers - typeof";return rN=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},rN(e)}function tce(e){return ice(e)||ace(e)||rce(e)||nce()}function nce(){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 rce(e,t){if(e){if(typeof e=="string")return aI(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 aI(e,t)}}function aI(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 ace(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ice(e){if(Array.isArray(e))return e}function oce(){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,u=tce(l),d=u[0],f=u.slice(1);if(typeof d=="number"){rI(a.bind(null,f),d);return}a(d),rI(a.bind(null,f));return}rN(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 Kf(e){"@babel/helpers - typeof";return Kf=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},Kf(e)}function iI(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 oI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iI(Object(n),!0).forEach(function(r){$6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $6(e,t,n){return t=sce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sce(e){var t=lce(e,"string");return Kf(t)==="symbol"?t:String(t)}function lce(e,t){if(Kf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cce=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},uce=function(t){return t},dce=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},wf=function(t,n){return Object.keys(n).reduce(function(r,a){return oI(oI({},r),{},$6({},a,t(a,n[a])))},{})},sI=function(t,n,r){return t.map(function(a){return"".concat(dce(a)," ").concat(n,"ms ").concat(r)}).join(",")};function fce(e,t){return pce(e)||mce(e,t)||I6(e,t)||hce()}function hce(){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 mce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function pce(e){if(Array.isArray(e))return e}function vce(e){return xce(e)||yce(e)||I6(e)||gce()}function gce(){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 I6(e,t){if(e){if(typeof e=="string")return aN(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 aN(e,t)}}function yce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xce(e){if(Array.isArray(e))return aN(e)}function aN(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 Kv=1e-4,L6=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},B6=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},lI=function(t,n){return function(r){var a=L6(t,n);return B6(a,r)}},bce=function(t,n){return function(r){var a=L6(t,n),i=[].concat(vce(a.map(function(l,u){return l*u}).slice(1)),[0]);return B6(i,r)}},cI=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],u=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,l=1,u=1;break;case"ease":a=.25,i=.1,l=.25,u=1;break;case"ease-in":a=.42,i=0,l=1,u=1;break;case"ease-out":a=.42,i=0,l=.58,u=1;break;case"ease-in-out":a=0,i=0,l=.58,u=1;break;default:{var d=n[0].split("(");if(d[0]==="cubic-bezier"&&d[1].split(")")[0].split(",").length===4){var f=d[1].split(")")[0].split(",").map(function(w){return parseFloat(w)}),m=fce(f,4);a=m[0],i=m[1],l=m[2],u=m[3]}}}var p=lI(a,l),g=lI(i,u),x=bce(a,l),j=function(N){return N>1?1:N<0?0:N},b=function(N){for(var O=N>1?1:N,C=O,A=0;A<8;++A){var E=p(C)-O,k=x(C);if(Math.abs(E-O)<Kv||k<Kv)return g(C);C=j(C-E/k)}return g(C)};return b.isStepper=!1,b},wce=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,u=l===void 0?17:l,d=function(m,p,g){var x=-(m-p)*r,j=g*i,b=g+(x-j)*u/1e3,w=g*u/1e3+m;return Math.abs(w-p)<Kv&&Math.abs(b)<Kv?[p,0]:[w,b]};return d.isStepper=!0,d.dt=u,d},jce=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 cI(a);case"spring":return wce();default:if(a.split("(")[0]==="cubic-bezier")return cI(a)}return typeof a=="function"?a:null};function Xf(e){"@babel/helpers - typeof";return Xf=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},Xf(e)}function uI(e){return Nce(e)||_ce(e)||z6(e)||Sce()}function Sce(){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 _ce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Nce(e){if(Array.isArray(e))return oN(e)}function dI(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 Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dI(Object(n),!0).forEach(function(r){iN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iN(e,t,n){return t=Oce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oce(e){var t=Cce(e,"string");return Xf(t)==="symbol"?t:String(t)}function Cce(e,t){if(Xf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ece(e,t){return kce(e)||Tce(e,t)||z6(e,t)||Ace()}function Ace(){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 z6(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 Tce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function kce(e){if(Array.isArray(e))return e}var Xv=function(t,n,r){return t+(n-t)*r},sN=function(t){var n=t.from,r=t.to;return n!==r},Pce=function e(t,n,r){var a=wf(function(i,l){if(sN(l)){var u=t(l.from,l.to,l.velocity),d=Ece(u,2),f=d[0],m=d[1];return Qn(Qn({},l),{},{from:f,velocity:m})}return l},n);return r<1?wf(function(i,l){return sN(l)?Qn(Qn({},l),{},{velocity:Xv(l.velocity,a[i].velocity,r),from:Xv(l.from,a[i].from,r)}):l},n):e(t,a,r-1)};const Mce=(function(e,t,n,r,a){var i=cce(e,t),l=i.reduce(function(w,N){return Qn(Qn({},w),{},iN({},N,[e[N],t[N]]))},{}),u=i.reduce(function(w,N){return Qn(Qn({},w),{},iN({},N,{from:e[N],velocity:0,to:t[N]}))},{}),d=-1,f,m,p=function(){return null},g=function(){return wf(function(N,O){return O.from},u)},x=function(){return!Object.values(u).filter(sN).length},j=function(N){f||(f=N);var O=N-f,C=O/n.dt;u=Pce(n,u,C),a(Qn(Qn(Qn({},e),t),g())),f=N,x()||(d=requestAnimationFrame(p))},b=function(N){m||(m=N);var O=(N-m)/r,C=wf(function(E,k){return Xv.apply(void 0,uI(k).concat([n(O)]))},l);if(a(Qn(Qn(Qn({},e),t),C)),O<1)d=requestAnimationFrame(p);else{var A=wf(function(E,k){return Xv.apply(void 0,uI(k).concat([n(1)]))},l);a(Qn(Qn(Qn({},e),t),A))}};return p=n.isStepper?j:b,function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(d)}}});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)}var Rce=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Dce(e,t){if(e==null)return{};var n=$ce(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 $ce(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 mS(e){return zce(e)||Bce(e)||Lce(e)||Ice()}function Ice(){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 Lce(e,t){if(e){if(typeof e=="string")return lN(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 lN(e,t)}}function Bce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zce(e){if(Array.isArray(e))return lN(e)}function lN(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 fI(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 Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fI(Object(n),!0).forEach(function(r){cf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cf(e,t,n){return t=q6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fce(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,q6(r.key),r)}}function Uce(e,t,n){return t&&Fce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q6(e){var t=Hce(e,"string");return uu(t)==="symbol"?t:String(t)}function Hce(e,t){if(uu(e)!=="object"||e===null)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 Wce(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&&cN(e,t)}function cN(e,t){return cN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},cN(e,t)}function Vce(e){var t=Gce();return function(){var r=Zv(e),a;if(t){var i=Zv(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return uN(this,a)}}function uN(e,t){if(t&&(uu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dN(e)}function dN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gce(){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 Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}var pi=(function(e){Wce(n,e);var t=Vce(n);function n(r,a){var i;qce(this,n),i=t.call(this,r,a);var l=i.props,u=l.isActive,d=l.attributeName,f=l.from,m=l.to,p=l.steps,g=l.children,x=l.duration;if(i.handleStyleChange=i.handleStyleChange.bind(dN(i)),i.changeStyle=i.changeStyle.bind(dN(i)),!u||x<=0)return i.state={style:{}},typeof g=="function"&&(i.state={style:m}),uN(i);if(p&&p.length)i.state={style:p[0].style};else if(f){if(typeof g=="function")return i.state={style:f},uN(i);i.state={style:d?cf({},d,f):f}}else i.state={style:{}};return i}return Uce(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,u=i.canBegin,d=i.attributeName,f=i.shouldReAnimate,m=i.to,p=i.from,g=this.state.style;if(u){if(!l){var x={style:d?cf({},d,m):m};this.state&&g&&(d&&g[d]!==m||!d&&g!==m)&&this.setState(x);return}if(!(Jle(a.to,m)&&a.canBegin&&a.isActive)){var j=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=j||f?p:a.to;if(this.state&&g){var w={style:d?cf({},d,b):b};(d&&g[d]!==b||!d&&g!==b)&&this.setState(w)}this.runAnimation(Pa(Pa({},this.props),{},{from:b,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,u=a.to,d=a.duration,f=a.easing,m=a.begin,p=a.onAnimationEnd,g=a.onAnimationStart,x=Mce(l,u,jce(f),d,this.changeStyle),j=function(){i.stopJSAnimation=x()};this.manager.start([g,m,j,d,p])}},{key:"runStepAnimation",value:function(a){var i=this,l=a.steps,u=a.begin,d=a.onAnimationStart,f=l[0],m=f.style,p=f.duration,g=p===void 0?0:p,x=function(b,w,N){if(N===0)return b;var O=w.duration,C=w.easing,A=C===void 0?"ease":C,E=w.style,k=w.properties,T=w.onAnimationEnd,P=N>0?l[N-1]:w,$=k||Object.keys(E);if(typeof A=="function"||A==="spring")return[].concat(mS(b),[i.runJSAnimation.bind(i,{from:P.style,to:E,duration:O,easing:A}),O]);var z=sI($,O,A),D=Pa(Pa(Pa({},P.style),E),{},{transition:z});return[].concat(mS(b),[D,O,T]).filter(uce)};return this.manager.start([d].concat(mS(l.reduce(x,[m,Math.max(g,u)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=oce());var i=a.begin,l=a.duration,u=a.attributeName,d=a.to,f=a.easing,m=a.onAnimationStart,p=a.onAnimationEnd,g=a.steps,x=a.children,j=this.manager;if(this.unSubscribe=j.subscribe(this.handleStyleChange),typeof f=="function"||typeof x=="function"||f==="spring"){this.runJSAnimation(a);return}if(g.length>1){this.runStepAnimation(a);return}var b=u?cf({},u,d):d,w=sI(Object.keys(b),l,f);j.start([m,i,Pa(Pa({},b),{},{transition:w}),l,p])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var u=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var d=Dce(a,Rce),f=y.Children.count(i),m=this.state.style;if(typeof i=="function")return i(m);if(!u||f===0||l<=0)return i;var p=function(x){var j=x.props,b=j.style,w=b===void 0?{}:b,N=j.className,O=y.cloneElement(x,Pa(Pa({},d),{},{style:Pa(Pa({},w),m),className:N}));return O};return f===1?p(y.Children.only(i)):W.createElement("div",null,y.Children.map(i,function(g){return p(g)}))}}]),n})(y.PureComponent);pi.displayName="Animate";pi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};pi.propTypes={from:bt.oneOfType([bt.object,bt.string]),to:bt.oneOfType([bt.object,bt.string]),attributeName:bt.string,duration:bt.number,begin:bt.number,easing:bt.oneOfType([bt.string,bt.func]),steps:bt.arrayOf(bt.shape({duration:bt.number.isRequired,style:bt.object.isRequired,easing:bt.oneOfType([bt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),bt.func]),properties:bt.arrayOf("string"),onAnimationEnd:bt.func})),children:bt.oneOfType([bt.node,bt.func]),isActive:bt.bool,canBegin:bt.bool,onAnimationEnd:bt.func,shouldReAnimate:bt.bool,onAnimationStart:bt.func,onAnimationReStart:bt.func};function Zf(e){"@babel/helpers - typeof";return Zf=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},Zf(e)}function Qv(){return Qv=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},Qv.apply(this,arguments)}function Yce(e,t){return Qce(e)||Zce(e,t)||Xce(e,t)||Kce()}function Kce(){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 Xce(e,t){if(e){if(typeof e=="string")return hI(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 hI(e,t)}}function hI(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 Zce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function Qce(e){if(Array.isArray(e))return e}function mI(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 pI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mI(Object(n),!0).forEach(function(r){Jce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jce(e,t,n){return t=eue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eue(e){var t=tue(e,"string");return Zf(t)=="symbol"?t:t+""}function tue(e,t){if(Zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vI=function(t,n,r,a,i){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),u=a>=0?1:-1,d=r>=0?1:-1,f=a>=0&&r>=0||a<0&&r<0?1:0,m;if(l>0&&i instanceof Array){for(var p=[0,0,0,0],g=0,x=4;g<x;g++)p[g]=i[g]>l?l:i[g];m="M".concat(t,",").concat(n+u*p[0]),p[0]>0&&(m+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(f,",").concat(t+d*p[0],",").concat(n)),m+="L ".concat(t+r-d*p[1],",").concat(n),p[1]>0&&(m+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(f,`,
|
||
`).concat(t+r,",").concat(n+u*p[1])),m+="L ".concat(t+r,",").concat(n+a-u*p[2]),p[2]>0&&(m+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(f,`,
|
||
`).concat(t+r-d*p[2],",").concat(n+a)),m+="L ".concat(t+d*p[3],",").concat(n+a),p[3]>0&&(m+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(f,`,
|
||
`).concat(t,",").concat(n+a-u*p[3])),m+="Z"}else if(l>0&&i===+i&&i>0){var j=Math.min(l,i);m="M ".concat(t,",").concat(n+u*j,`
|
||
A `).concat(j,",").concat(j,",0,0,").concat(f,",").concat(t+d*j,",").concat(n,`
|
||
L `).concat(t+r-d*j,",").concat(n,`
|
||
A `).concat(j,",").concat(j,",0,0,").concat(f,",").concat(t+r,",").concat(n+u*j,`
|
||
L `).concat(t+r,",").concat(n+a-u*j,`
|
||
A `).concat(j,",").concat(j,",0,0,").concat(f,",").concat(t+r-d*j,",").concat(n+a,`
|
||
L `).concat(t+d*j,",").concat(n+a,`
|
||
A `).concat(j,",").concat(j,",0,0,").concat(f,",").concat(t,",").concat(n+a-u*j," Z")}else m="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return m},nue=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,l=n.y,u=n.width,d=n.height;if(Math.abs(u)>0&&Math.abs(d)>0){var f=Math.min(i,i+u),m=Math.max(i,i+u),p=Math.min(l,l+d),g=Math.max(l,l+d);return r>=f&&r<=m&&a>=p&&a<=g}return!1},rue={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},PC=function(t){var n=pI(pI({},rue),t),r=y.useRef(),a=y.useState(-1),i=Yce(a,2),l=i[0],u=i[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&u(A)}catch{}},[]);var d=n.x,f=n.y,m=n.width,p=n.height,g=n.radius,x=n.className,j=n.animationEasing,b=n.animationDuration,w=n.animationBegin,N=n.isAnimationActive,O=n.isUpdateAnimationActive;if(d!==+d||f!==+f||m!==+m||p!==+p||m===0||p===0)return null;var C=Ye("recharts-rectangle",x);return O?W.createElement(pi,{canBegin:l>0,from:{width:m,height:p,x:d,y:f},to:{width:m,height:p,x:d,y:f},duration:b,animationEasing:j,isActive:O},function(A){var E=A.width,k=A.height,T=A.x,P=A.y;return W.createElement(pi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,isActive:N,easing:j},W.createElement("path",Qv({},Be(n,!0),{className:C,d:vI(T,P,E,k,g),ref:r})))}):W.createElement("path",Qv({},Be(n,!0),{className:C,d:vI(d,f,m,p,g)}))},aue=["points","className","baseLinePoints","connectNulls"];function $c(){return $c=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},$c.apply(this,arguments)}function iue(e,t){if(e==null)return{};var n=oue(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 oue(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 gI(e){return uue(e)||cue(e)||lue(e)||sue()}function sue(){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 lue(e,t){if(e){if(typeof e=="string")return fN(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 fN(e,t)}}function cue(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uue(e){if(Array.isArray(e))return fN(e)}function fN(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 yI=function(t){return t&&t.x===+t.x&&t.y===+t.y},due=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){yI(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),yI(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},jf=function(t,n){var r=due(t);n&&(r=[r.reduce(function(i,l){return[].concat(gI(i),gI(l))},[])]);var a=r.map(function(i){return i.reduce(function(l,u,d){return"".concat(l).concat(d===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},fue=function(t,n,r){var a=jf(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(jf(n.reverse(),r).slice(1))},hue=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,i=t.connectNulls,l=iue(t,aue);if(!n||!n.length)return null;var u=Ye("recharts-polygon",r);if(a&&a.length){var d=l.stroke&&l.stroke!=="none",f=fue(n,a,i);return W.createElement("g",{className:u},W.createElement("path",$c({},Be(l,!0),{fill:f.slice(-1)==="Z"?l.fill:"none",stroke:"none",d:f})),d?W.createElement("path",$c({},Be(l,!0),{fill:"none",d:jf(n,i)})):null,d?W.createElement("path",$c({},Be(l,!0),{fill:"none",d:jf(a,i)})):null)}var m=jf(n,i);return W.createElement("path",$c({},Be(l,!0),{fill:m.slice(-1)==="Z"?l.fill:"none",className:u,d:m}))};function hN(){return hN=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},hN.apply(this,arguments)}var py=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,l=Ye("recharts-dot",i);return n===+n&&r===+r&&a===+a?y.createElement("circle",hN({},Be(t,!1),wv(t),{className:l,cx:n,cy:r,r:a})):null};function Qf(e){"@babel/helpers - typeof";return Qf=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},Qf(e)}var mue=["x","y","top","left","width","height","className"];function mN(){return mN=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},mN.apply(this,arguments)}function xI(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 pue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xI(Object(n),!0).forEach(function(r){vue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xI(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=yue(e,"string");return Qf(t)=="symbol"?t:t+""}function yue(e,t){if(Qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xue(e,t){if(e==null)return{};var n=bue(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 bue(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 wue=function(t,n,r,a,i,l){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},jue=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.top,u=l===void 0?0:l,d=t.left,f=d===void 0?0:d,m=t.width,p=m===void 0?0:m,g=t.height,x=g===void 0?0:g,j=t.className,b=xue(t,mue),w=pue({x:r,y:i,top:u,left:f,width:p,height:x},b);return!Oe(r)||!Oe(i)||!Oe(p)||!Oe(x)||!Oe(u)||!Oe(f)?null:W.createElement("path",mN({},Be(w,!0),{className:Ye("recharts-cross",j),d:wue(r,i,p,x,u,f)}))},pS,bI;function Sue(){if(bI)return pS;bI=1;var e=uy(),t=n6(),n=xi();function r(a,i){return a&&a.length?e(a,n(i,2),t):void 0}return pS=r,pS}var _ue=Sue();const Nue=St(_ue);var vS,wI;function Oue(){if(wI)return vS;wI=1;var e=uy(),t=xi(),n=r6();function r(a,i){return a&&a.length?e(a,t(i,2),n):void 0}return vS=r,vS}var Cue=Oue();const Eue=St(Cue);var Aue=["cx","cy","angle","ticks","axisLine"],Tue=["ticks","tick","angle","tickFormatter","stroke"];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 Sf(){return Sf=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},Sf.apply(this,arguments)}function jI(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 $s(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jI(Object(n),!0).forEach(function(r){vy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SI(e,t){if(e==null)return{};var n=kue(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 kue(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 Pue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _I(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,U6(r.key),r)}}function Mue(e,t,n){return t&&_I(e.prototype,t),n&&_I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rue(e,t,n){return t=Jv(t),Due(e,F6()?Reflect.construct(t,n||[],Jv(e).constructor):t.apply(e,n))}function Due(e,t){if(t&&(du(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $ue(e)}function $ue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F6=function(){return!!e})()}function Jv(e){return Jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jv(e)}function Iue(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&&pN(e,t)}function pN(e,t){return pN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},pN(e,t)}function vy(e,t,n){return t=U6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U6(e){var t=Lue(e,"string");return du(t)=="symbol"?t:t+""}function Lue(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 String(e)}var gy=(function(e){function t(){return Pue(this,t),Rue(this,t,arguments)}return Iue(t,e),Mue(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,i=this.props,l=i.angle,u=i.cx,d=i.cy;return Ft(u,d,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,u=r.ticks,d=Nue(u,function(m){return m.coordinate||0}),f=Eue(u,function(m){return m.coordinate||0});return{cx:a,cy:i,startAngle:l,endAngle:l,innerRadius:f.coordinate||0,outerRadius:d.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.angle,u=r.ticks,d=r.axisLine,f=SI(r,Aue),m=u.reduce(function(j,b){return[Math.min(j[0],b.coordinate),Math.max(j[1],b.coordinate)]},[1/0,-1/0]),p=Ft(a,i,m[0],l),g=Ft(a,i,m[1],l),x=$s($s($s({},Be(f,!1)),{},{fill:"none"},Be(d,!1)),{},{x1:p.x,y1:p.y,x2:g.x,y2:g.y});return W.createElement("line",Sf({className:"recharts-polar-radius-axis-line"},x))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,u=a.angle,d=a.tickFormatter,f=a.stroke,m=SI(a,Tue),p=this.getTickTextAnchor(),g=Be(m,!1),x=Be(l,!1),j=i.map(function(b,w){var N=r.getTickValueCoord(b),O=$s($s($s($s({textAnchor:p,transform:"rotate(".concat(90-u,", ").concat(N.x,", ").concat(N.y,")")},g),{},{stroke:"none",fill:f},x),{},{index:w},N),{},{payload:b});return W.createElement(pt,Sf({className:Ye("recharts-polar-radius-axis-tick",k6(l)),key:"tick-".concat(b.coordinate)},ll(r.props,b,w)),t.renderTickItem(l,O,d?d(b.value,w):b.value))});return W.createElement(pt,{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:W.createElement(pt,{className:Ye("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),l&&this.renderTicks(),zn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,i){var l;return W.isValidElement(r)?l=W.cloneElement(r,a):We(r)?l=r(a):l=W.createElement(cl,Sf({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),l}}])})(y.PureComponent);vy(gy,"displayName","PolarRadiusAxis");vy(gy,"axisType","radiusAxis");vy(gy,"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 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 qs(){return qs=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},qs.apply(this,arguments)}function NI(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 Is(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NI(Object(n),!0).forEach(function(r){yy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OI(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,W6(r.key),r)}}function zue(e,t,n){return t&&OI(e.prototype,t),n&&OI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function que(e,t,n){return t=eg(t),Fue(e,H6()?Reflect.construct(t,n||[],eg(e).constructor):t.apply(e,n))}function Fue(e,t){if(t&&(fu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uue(e)}function Uue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H6=function(){return!!e})()}function eg(e){return eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},eg(e)}function Hue(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&&vN(e,t)}function vN(e,t){return vN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},vN(e,t)}function yy(e,t,n){return t=W6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W6(e){var t=Wue(e,"string");return fu(t)=="symbol"?t:t+""}function Wue(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 String(e)}var Vue=Math.PI/180,CI=1e-5,xy=(function(e){function t(){return Bue(this,t),que(this,t,arguments)}return Hue(t,e),zue(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.cx,l=a.cy,u=a.radius,d=a.orientation,f=a.tickSize,m=f||8,p=Ft(i,l,u,r.coordinate),g=Ft(i,l,u+(d==="inner"?-1:1)*m,r.coordinate);return{x1:p.x,y1:p.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,i=Math.cos(-r.coordinate*Vue),l;return i>CI?l=a==="outer"?"start":"end":i<-CI?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,u=r.axisLine,d=r.axisLineType,f=Is(Is({},Be(this.props,!1)),{},{fill:"none"},Be(u,!1));if(d==="circle")return W.createElement(py,qs({className:"recharts-polar-angle-axis-line"},f,{cx:a,cy:i,r:l}));var m=this.props.ticks,p=m.map(function(g){return Ft(a,i,l,g.coordinate)});return W.createElement(hue,qs({className:"recharts-polar-angle-axis-line"},f,{points:p}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,u=a.tickLine,d=a.tickFormatter,f=a.stroke,m=Be(this.props,!1),p=Be(l,!1),g=Is(Is({},m),{},{fill:"none"},Be(u,!1)),x=i.map(function(j,b){var w=r.getTickLineCoord(j),N=r.getTickTextAnchor(j),O=Is(Is(Is({textAnchor:N},m),{},{stroke:"none",fill:f},p),{},{index:b,payload:j,x:w.x2,y:w.y2});return W.createElement(pt,qs({className:Ye("recharts-polar-angle-axis-tick",k6(l)),key:"tick-".concat(j.coordinate)},ll(r.props,j,b)),u&&W.createElement("line",qs({className:"recharts-polar-angle-axis-tick-line"},g,w)),l&&t.renderTickItem(l,O,d?d(j.value,b):j.value))});return W.createElement(pt,{className:"recharts-polar-angle-axis-ticks"},x)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.radius,l=r.axisLine;return i<=0||!a||!a.length?null:W.createElement(pt,{className:Ye("recharts-polar-angle-axis",this.props.className)},l&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,i){var l;return W.isValidElement(r)?l=W.cloneElement(r,a):We(r)?l=r(a):l=W.createElement(cl,qs({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),l}}])})(y.PureComponent);yy(xy,"displayName","PolarAngleAxis");yy(xy,"axisType","angleAxis");yy(xy,"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 gS,EI;function Gue(){if(EI)return gS;EI=1;var e=tz(),t=e(Object.getPrototypeOf,Object);return gS=t,gS}var yS,AI;function Yue(){if(AI)return yS;AI=1;var e=so(),t=Gue(),n=lo(),r="[object Object]",a=Function.prototype,i=Object.prototype,l=a.toString,u=i.hasOwnProperty,d=l.call(Object);function f(m){if(!n(m)||e(m)!=r)return!1;var p=t(m);if(p===null)return!0;var g=u.call(p,"constructor")&&p.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==d}return yS=f,yS}var Kue=Yue();const Xue=St(Kue);var xS,TI;function Zue(){if(TI)return xS;TI=1;var e=so(),t=lo(),n="[object Boolean]";function r(a){return a===!0||a===!1||t(a)&&e(a)==n}return xS=r,xS}var Que=Zue();const Jue=St(Que);function Jf(e){"@babel/helpers - typeof";return Jf=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},Jf(e)}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 ede(e,t){return ade(e)||rde(e,t)||nde(e,t)||tde()}function tde(){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 nde(e,t){if(e){if(typeof e=="string")return kI(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 kI(e,t)}}function kI(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 rde(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function ade(e){if(Array.isArray(e))return e}function PI(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 MI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PI(Object(n),!0).forEach(function(r){ide(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ide(e,t,n){return t=ode(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ode(e){var t=sde(e,"string");return Jf(t)=="symbol"?t:t+""}function sde(e,t){if(Jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RI=function(t,n,r,a,i){var l=r-a,u;return u="M ".concat(t,",").concat(n),u+="L ".concat(t+r,",").concat(n),u+="L ".concat(t+r-l/2,",").concat(n+i),u+="L ".concat(t+r-l/2-a,",").concat(n+i),u+="L ".concat(t,",").concat(n," Z"),u},lde={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cde=function(t){var n=MI(MI({},lde),t),r=y.useRef(),a=y.useState(-1),i=ede(a,2),l=i[0],u=i[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&u(C)}catch{}},[]);var d=n.x,f=n.y,m=n.upperWidth,p=n.lowerWidth,g=n.height,x=n.className,j=n.animationEasing,b=n.animationDuration,w=n.animationBegin,N=n.isUpdateAnimationActive;if(d!==+d||f!==+f||m!==+m||p!==+p||g!==+g||m===0&&p===0||g===0)return null;var O=Ye("recharts-trapezoid",x);return N?W.createElement(pi,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:d,y:f},to:{upperWidth:m,lowerWidth:p,height:g,x:d,y:f},duration:b,animationEasing:j,isActive:N},function(C){var A=C.upperWidth,E=C.lowerWidth,k=C.height,T=C.x,P=C.y;return W.createElement(pi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,easing:j},W.createElement("path",tg({},Be(n,!0),{className:O,d:RI(T,P,A,E,k),ref:r})))}):W.createElement("g",null,W.createElement("path",tg({},Be(n,!0),{className:O,d:RI(d,f,m,p,g)})))},ude=["option","shapeType","propTransformer","activeClassName","isActive"];function eh(e){"@babel/helpers - typeof";return eh=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},eh(e)}function dde(e,t){if(e==null)return{};var n=fde(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 fde(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 DI(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 ng(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DI(Object(n),!0).forEach(function(r){hde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hde(e,t,n){return t=mde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mde(e){var t=pde(e,"string");return eh(t)=="symbol"?t:t+""}function pde(e,t){if(eh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(eh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vde(e,t){return ng(ng({},t),e)}function gde(e,t){return e==="symbols"}function $I(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return W.createElement(PC,n);case"trapezoid":return W.createElement(cde,n);case"sector":return W.createElement(R6,n);case"symbols":if(gde(t))return W.createElement(ZO,n);break;default:return null}}function yde(e){return y.isValidElement(e)?e.props:e}function V6(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?vde:r,i=e.activeClassName,l=i===void 0?"recharts-active-shape":i,u=e.isActive,d=dde(e,ude),f;if(y.isValidElement(t))f=y.cloneElement(t,ng(ng({},d),yde(t)));else if(We(t))f=t(d);else if(Xue(t)&&!Jue(t)){var m=a(t,d);f=W.createElement($I,{shapeType:n,elementProps:m})}else{var p=d;f=W.createElement($I,{shapeType:n,elementProps:p})}return u?W.createElement(pt,{className:l},f):f}function by(e,t){return t!=null&&"trapezoids"in e.props}function wy(e,t){return t!=null&&"sectors"in e.props}function th(e,t){return t!=null&&"points"in e.props}function xde(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 bde(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function wde(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function jde(e,t){var n;return by(e,t)?n=xde:wy(e,t)?n=bde:th(e,t)&&(n=wde),n}function Sde(e,t){var n;return by(e,t)?n="trapezoids":wy(e,t)?n="sectors":th(e,t)&&(n="points"),n}function _de(e,t){if(by(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(wy(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 th(e,t)?t.payload:{}}function Nde(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=Sde(n,t),i=_de(n,t),l=r.filter(function(d,f){var m=Mh(i,d),p=n.props[a].filter(function(j){var b=jde(n,t);return b(j,t)}),g=n.props[a].indexOf(p[p.length-1]),x=f===g;return m&&x}),u=r.indexOf(l[l.length-1]);return u}var tv;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 Ic(){return Ic=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},Ic.apply(this,arguments)}function II(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 Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?II(Object(n),!0).forEach(function(r){wa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):II(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ode(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LI(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,Y6(r.key),r)}}function Cde(e,t,n){return t&&LI(e.prototype,t),n&&LI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ede(e,t,n){return t=rg(t),Ade(e,G6()?Reflect.construct(t,n||[],rg(e).constructor):t.apply(e,n))}function Ade(e,t){if(t&&(hu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tde(e)}function Tde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G6=function(){return!!e})()}function rg(e){return rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rg(e)}function kde(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&&gN(e,t)}function gN(e,t){return gN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},gN(e,t)}function wa(e,t,n){return t=Y6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y6(e){var t=Pde(e,"string");return hu(t)=="symbol"?t:t+""}function Pde(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 String(e)}var uo=(function(e){function t(n){var r;return Ode(this,t),r=Ede(this,t,[n]),wa(r,"pieRef",null),wa(r,"sectorRefs",[]),wa(r,"id",Bu("recharts-pie-")),wa(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),We(a)&&a()}),wa(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),We(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return kde(t,e),Cde(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,u=i.labelLine,d=i.dataKey,f=i.valueKey,m=Be(this.props,!1),p=Be(l,!1),g=Be(u,!1),x=l&&l.offsetRadius||20,j=r.map(function(b,w){var N=(b.startAngle+b.endAngle)/2,O=Ft(b.cx,b.cy,b.outerRadius+x,N),C=Bt(Bt(Bt(Bt({},m),b),{},{stroke:"none"},p),{},{index:w,textAnchor:t.getTextAnchor(O.x,b.cx)},O),A=Bt(Bt(Bt(Bt({},m),b),{},{fill:"none",stroke:b.fill},g),{},{index:w,points:[Ft(b.cx,b.cy,b.outerRadius,N),O]}),E=d;return Ge(d)&&Ge(f)?E="value":Ge(d)&&(E=f),W.createElement(pt,{key:"label-".concat(b.startAngle,"-").concat(b.endAngle,"-").concat(b.midAngle,"-").concat(w)},u&&t.renderLabelLineItem(u,A,"line"),t.renderLabelItem(l,C,Tn(b,E)))});return W.createElement(pt,{className:"recharts-pie-labels"},j)}},{key:"renderSectorsStatically",value:function(r){var a=this,i=this.props,l=i.activeShape,u=i.blendStroke,d=i.inactiveShape;return r.map(function(f,m){if(f?.startAngle===0&&f?.endAngle===0&&r.length!==1)return null;var p=a.isActiveIndex(m),g=d&&a.hasActiveIndex()?d:null,x=p?l:g,j=Bt(Bt({},f),{},{stroke:u?f.fill:f.stroke,tabIndex:-1});return W.createElement(pt,Ic({ref:function(w){w&&!a.sectorRefs.includes(w)&&a.sectorRefs.push(w)},tabIndex:-1,className:"recharts-pie-sector"},ll(a.props,f,m),{key:"sector-".concat(f?.startAngle,"-").concat(f?.endAngle,"-").concat(f.midAngle,"-").concat(m)}),W.createElement(V6,Ic({option:x,isActive:p,shapeType:"sector"},j)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,i=a.sectors,l=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,m=a.animationId,p=this.state,g=p.prevSectors,x=p.prevIsAnimationActive;return W.createElement(pi,{begin:u,duration:d,isActive:l,easing:f,from:{t:0},to:{t:1},key:"pie-".concat(m,"-").concat(x),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(j){var b=j.t,w=[],N=i&&i[0],O=N.startAngle;return i.forEach(function(C,A){var E=g&&g[A],k=A>0?ea(C,"paddingAngle",0):0;if(E){var T=Zr(E.endAngle-E.startAngle,C.endAngle-C.startAngle),P=Bt(Bt({},C),{},{startAngle:O+k,endAngle:O+T(b)+k});w.push(P),O=P.endAngle}else{var $=C.endAngle,z=C.startAngle,D=Zr(0,$-z),U=D(b),V=Bt(Bt({},C),{},{startAngle:O+k,endAngle:O+U+k});w.push(V),O=V.endAngle}}),W.createElement(pt,null,r.renderSectorsStatically(w))})}},{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 u=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[u].focus(),a.setState({sectorToFocus:u});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||!Mh(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,u=a.className,d=a.label,f=a.cx,m=a.cy,p=a.innerRadius,g=a.outerRadius,x=a.isAnimationActive,j=this.state.isAnimationFinished;if(i||!l||!l.length||!Oe(f)||!Oe(m)||!Oe(p)||!Oe(g))return null;var b=Ye("recharts-pie",u);return W.createElement(pt,{tabIndex:this.props.rootTabIndex,className:b,ref:function(N){r.pieRef=N}},this.renderSectors(),d&&this.renderLabels(l),zn.renderCallByParent(this.props,null,!1),(!x||j)&&Ji.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(W.isValidElement(r))return W.cloneElement(r,a);if(We(r))return r(a);var l=Ye("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return W.createElement(Yv,Ic({},a,{key:i,type:"linear",className:l}))}},{key:"renderLabelItem",value:function(r,a,i){if(W.isValidElement(r))return W.cloneElement(r,a);var l=i;if(We(r)&&(l=r(a),W.isValidElement(l)))return l;var u=Ye("recharts-pie-label-text",typeof r!="boolean"&&!We(r)?r.className:"");return W.createElement(cl,Ic({},a,{alignmentBaseline:"middle",className:u}),l)}}])})(y.PureComponent);tv=uo;wa(uo,"displayName","Pie");wa(uo,"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:!xl.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});wa(uo,"parseDeltaAngle",function(e,t){var n=xr(t-e),r=Math.min(Math.abs(t-e),360);return n*r});wa(uo,"getRealPieData",function(e){var t=e.data,n=e.children,r=Be(e,!1),a=ta(n,ry);return t&&t.length?t.map(function(i,l){return Bt(Bt(Bt({payload:i},r),i),a&&a[l]&&a[l].props)}):a&&a.length?a.map(function(i){return Bt(Bt({},r),i.props)}):[]});wa(uo,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,l=T6(a,i),u=r+br(e.cx,a,a/2),d=n+br(e.cy,i,i/2),f=br(e.innerRadius,l,0),m=br(e.outerRadius,l,l*.8),p=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:u,cy:d,innerRadius:f,outerRadius:m,maxRadius:p}});wa(uo,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Bt(Bt({},t.type.defaultProps),t.props):t.props,a=tv.getRealPieData(r);if(!a||!a.length)return null;var i=r.cornerRadius,l=r.startAngle,u=r.endAngle,d=r.paddingAngle,f=r.dataKey,m=r.nameKey,p=r.valueKey,g=r.tooltipType,x=Math.abs(r.minAngle),j=tv.parseCoordinateOfPie(r,n),b=tv.parseDeltaAngle(l,u),w=Math.abs(b),N=f;Ge(f)&&Ge(p)?(za(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),N="value"):Ge(f)&&(za(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),N=p);var O=a.filter(function(P){return Tn(P,N,0)!==0}).length,C=(w>=360?O:O-1)*d,A=w-O*x-C,E=a.reduce(function(P,$){var z=Tn($,N,0);return P+(Oe(z)?z:0)},0),k;if(E>0){var T;k=a.map(function(P,$){var z=Tn(P,N,0),D=Tn(P,m,$),U=(Oe(z)?z:0)/E,V;$?V=T.endAngle+xr(b)*d*(z!==0?1:0):V=l;var H=V+xr(b)*((z!==0?x:0)+U*A),G=(V+H)/2,L=(j.innerRadius+j.outerRadius)/2,R=[{name:D,value:z,payload:P,dataKey:N,type:g}],F=Ft(j.cx,j.cy,L,G);return T=Bt(Bt(Bt({percent:U,cornerRadius:i,name:D,tooltipPayload:R,midAngle:G,middleRadius:L,tooltipPosition:F},P),j),{},{value:Tn(P,N),startAngle:V,endAngle:H,payload:P,paddingAngle:xr(b)*d}),T})}return Bt(Bt({},j),{},{sectors:k,data:a})});var bS,BI;function Mde(){if(BI)return bS;BI=1;var e=Math.ceil,t=Math.max;function n(r,a,i,l){for(var u=-1,d=t(e((a-r)/(i||1)),0),f=Array(d);d--;)f[l?d:++u]=r,r+=i;return f}return bS=n,bS}var wS,zI;function K6(){if(zI)return wS;zI=1;var e=gz(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*n}return a===a?a:0}return wS=r,wS}var jS,qI;function Rde(){if(qI)return jS;qI=1;var e=Mde(),t=ny(),n=K6();function r(a){return function(i,l,u){return u&&typeof u!="number"&&t(i,l,u)&&(l=u=void 0),i=n(i),l===void 0?(l=i,i=0):l=n(l),u=u===void 0?i<l?1:-1:n(u),e(i,l,u,a)}}return jS=r,jS}var SS,FI;function Dde(){if(FI)return SS;FI=1;var e=Rde(),t=e();return SS=t,SS}var $de=Dde();const ag=St($de);function nh(e){"@babel/helpers - typeof";return nh=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},nh(e)}function UI(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 HI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UI(Object(n),!0).forEach(function(r){X6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X6(e,t,n){return t=Ide(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ide(e){var t=Lde(e,"string");return nh(t)=="symbol"?t:t+""}function Lde(e,t){if(nh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bde=["Webkit","Moz","O","ms"],zde=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=Bde.reduce(function(i,l){return HI(HI({},i),{},X6({},l+r,n))},{});return a[t]=n,a};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 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 WI(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 _S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WI(Object(n),!0).forEach(function(r){Gr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VI(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,Q6(r.key),r)}}function Fde(e,t,n){return t&&VI(e.prototype,t),n&&VI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ude(e,t,n){return t=og(t),Hde(e,Z6()?Reflect.construct(t,n||[],og(e).constructor):t.apply(e,n))}function Hde(e,t){if(t&&(mu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wde(e)}function Wde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z6=function(){return!!e})()}function og(e){return og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},og(e)}function Vde(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&&yN(e,t)}function yN(e,t){return yN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},yN(e,t)}function Gr(e,t,n){return t=Q6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q6(e){var t=Gde(e,"string");return mu(t)=="symbol"?t:t+""}function Gde(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 Yde=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,l=t.width,u=t.travellerWidth;if(!n||!n.length)return{};var d=n.length,f=xf().domain(ag(0,d)).range([i,i+l-u]),m=f.domain().map(function(p){return f(p)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(r),endX:f(a),scale:f,scaleValues:m}},GI=function(t){return t.changedTouches&&!!t.changedTouches.length},pu=(function(e){function t(n){var r;return qde(this,t),r=Ude(this,t,[n]),Gr(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),Gr(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),Gr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,l=a.onDragEnd,u=a.startIndex;l?.({endIndex:i,startIndex:u})}),r.detachDragEndListener()}),Gr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Gr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Gr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Gr(r,"handleSlideDragStart",function(a){var i=GI(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 Vde(t,e),Fde(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,u=this.props,d=u.gap,f=u.data,m=f.length-1,p=Math.min(a,i),g=Math.max(a,i),x=t.getIndexInRange(l,p),j=t.getIndexInRange(l,g);return{startIndex:x-x%d,endIndex:j===m?m:j-j%d}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,l=a.tickFormatter,u=a.dataKey,d=Tn(i[r],u,r);return We(l)?l(d,r):d}},{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,u=a.endX,d=this.props,f=d.x,m=d.width,p=d.travellerWidth,g=d.startIndex,x=d.endIndex,j=d.onChange,b=r.pageX-i;b>0?b=Math.min(b,f+m-p-u,f+m-p-l):b<0&&(b=Math.max(b,f-l,f-u));var w=this.getIndex({startX:l+b,endX:u+b});(w.startIndex!==g||w.endIndex!==x)&&j&&j(w),this.setState({startX:l+b,endX:u+b,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=GI(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,u=a.endX,d=a.startX,f=this.state[l],m=this.props,p=m.x,g=m.width,x=m.travellerWidth,j=m.onChange,b=m.gap,w=m.data,N={startX:this.state.startX,endX:this.state.endX},O=r.pageX-i;O>0?O=Math.min(O,p+g-x-f):O<0&&(O=Math.max(O,p-f)),N[l]=f+O;var C=this.getIndex(N),A=C.startIndex,E=C.endIndex,k=function(){var P=w.length-1;return l==="startX"&&(u>d?A%b===0:E%b===0)||u<d&&E===P||l==="endX"&&(u>d?E%b===0:A%b===0)||u>d&&E===P};this.setState(Gr(Gr({},l,f+O),"brushMoveStartX",r.pageX),function(){j&&k()&&j(C)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,l=this.state,u=l.scaleValues,d=l.startX,f=l.endX,m=this.state[a],p=u.indexOf(m);if(p!==-1){var g=p+r;if(!(g===-1||g>=u.length)){var x=u[g];a==="startX"&&x>=f||a==="endX"&&x<=d||this.setState(Gr({},a,x),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,u=r.height,d=r.fill,f=r.stroke;return W.createElement("rect",{stroke:f,fill:d,x:a,y:i,width:l,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,u=r.height,d=r.data,f=r.children,m=r.padding,p=y.Children.only(f);return p?W.cloneElement(p,{x:a,y:i,width:l,height:u,margin:m,compact:!0,data:d}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,l,u=this,d=this.props,f=d.y,m=d.travellerWidth,p=d.height,g=d.traveller,x=d.ariaLabel,j=d.data,b=d.startIndex,w=d.endIndex,N=Math.max(r,this.props.x),O=_S(_S({},Be(this.props,!1)),{},{x:N,y:f,width:m,height:p}),C=x||"Min value: ".concat((i=j[b])===null||i===void 0?void 0:i.name,", Max value: ").concat((l=j[w])===null||l===void 0?void 0:l.name);return W.createElement(pt,{tabIndex:0,role:"slider","aria-label":C,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,a))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,O))}},{key:"renderSlide",value:function(r,a){var i=this.props,l=i.y,u=i.height,d=i.stroke,f=i.travellerWidth,m=Math.min(r,a)+f,p=Math.max(Math.abs(a-r)-f,0);return W.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:d,fillOpacity:.2,x:m,y:l,width:p,height:u})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,l=r.y,u=r.height,d=r.travellerWidth,f=r.stroke,m=this.state,p=m.startX,g=m.endX,x=5,j={pointerEvents:"none",fill:f};return W.createElement(pt,{className:"recharts-brush-texts"},W.createElement(cl,ig({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,g)-x,y:l+u/2},j),this.getTextOfTick(a)),W.createElement(cl,ig({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,g)+d+x,y:l+u/2},j),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,l=r.children,u=r.x,d=r.y,f=r.width,m=r.height,p=r.alwaysShowText,g=this.state,x=g.startX,j=g.endX,b=g.isTextActive,w=g.isSlideMoving,N=g.isTravellerMoving,O=g.isTravellerFocused;if(!a||!a.length||!Oe(u)||!Oe(d)||!Oe(f)||!Oe(m)||f<=0||m<=0)return null;var C=Ye("recharts-brush",i),A=W.Children.count(l)===1,E=zde("userSelect","none");return W.createElement(pt,{className:C,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(x,j),this.renderTravellerLayer(x,"startX"),this.renderTravellerLayer(j,"endX"),(b||w||N||O||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,l=r.width,u=r.height,d=r.stroke,f=Math.floor(i+u/2)-1;return W.createElement(W.Fragment,null,W.createElement("rect",{x:a,y:i,width:l,height:u,fill:d,stroke:"none"}),W.createElement("line",{x1:a+1,y1:f,x2:a+l-1,y2:f,fill:"none",stroke:"#fff"}),W.createElement("line",{x1:a+1,y1:f+2,x2:a+l-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return W.isValidElement(r)?i=W.cloneElement(r,a):We(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,l=r.width,u=r.x,d=r.travellerWidth,f=r.updateId,m=r.startIndex,p=r.endIndex;if(i!==a.prevData||f!==a.prevUpdateId)return _S({prevData:i,prevTravellerWidth:d,prevUpdateId:f,prevX:u,prevWidth:l},i&&i.length?Yde({data:i,width:l,x:u,travellerWidth:d,startIndex:m,endIndex:p}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||u!==a.prevX||d!==a.prevTravellerWidth)){a.scale.range([u,u+l-d]);var g=a.scale.domain().map(function(x){return a.scale(x)});return{prevData:i,prevTravellerWidth:d,prevUpdateId:f,prevX:u,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,l=0,u=i-1;u-l>1;){var d=Math.floor((l+u)/2);r[d]>a?u=d:l=d}return a>=r[u]?u:l}}])})(y.PureComponent);Gr(pu,"displayName","Brush");Gr(pu,"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 NS,YI;function Kde(){if(YI)return NS;YI=1;var e=aC();function t(n,r){var a;return e(n,function(i,l,u){return a=r(i,l,u),!a}),!!a}return NS=t,NS}var OS,KI;function Xde(){if(KI)return OS;KI=1;var e=YB(),t=xi(),n=Kde(),r=Ir(),a=ny();function i(l,u,d){var f=r(l)?e:n;return d&&a(l,u,d)&&(u=void 0),f(l,t(u,3))}return OS=i,OS}var Zde=Xde();const Qde=St(Zde);var di=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},CS,XI;function Jde(){if(XI)return CS;XI=1;var e=fz();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return CS=t,CS}var ES,ZI;function efe(){if(ZI)return ES;ZI=1;var e=Jde(),t=uz(),n=xi();function r(a,i){var l={};return i=n(i,3),t(a,function(u,d,f){e(l,d,i(u,d,f))}),l}return ES=r,ES}var tfe=efe();const nfe=St(tfe);var AS,QI;function rfe(){if(QI)return AS;QI=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(!n(t[r],r,t))return!1;return!0}return AS=e,AS}var TS,JI;function afe(){if(JI)return TS;JI=1;var e=aC();function t(n,r){var a=!0;return e(n,function(i,l,u){return a=!!r(i,l,u),a}),a}return TS=t,TS}var kS,e3;function ife(){if(e3)return kS;e3=1;var e=rfe(),t=afe(),n=xi(),r=Ir(),a=ny();function i(l,u,d){var f=r(l)?e:t;return d&&a(l,u,d)&&(u=void 0),f(l,n(u,3))}return kS=i,kS}var ofe=ife();const J6=St(ofe);var sfe=["x","y"];function rh(e){"@babel/helpers - typeof";return rh=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},rh(e)}function xN(){return xN=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},xN.apply(this,arguments)}function t3(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 nf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t3(Object(n),!0).forEach(function(r){lfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lfe(e,t,n){return t=cfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cfe(e){var t=ufe(e,"string");return rh(t)=="symbol"?t:t+""}function ufe(e,t){if(rh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dfe(e,t){if(e==null)return{};var n=ffe(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 ffe(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 hfe(e,t){var n=e.x,r=e.y,a=dfe(e,sfe),i="".concat(n),l=parseInt(i,10),u="".concat(r),d=parseInt(u,10),f="".concat(t.height||a.height),m=parseInt(f,10),p="".concat(t.width||a.width),g=parseInt(p,10);return nf(nf(nf(nf(nf({},t),a),l?{x:l}:{}),d?{y:d}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function n3(e){return W.createElement(V6,xN({shapeType:"rectangle",propTransformer:hfe,activeClassName:"recharts-active-bar"},e))}var mfe=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=Oe(r)||IQ(r);return i?t(r,a):(i||cr(!1),n)}},pfe=["value","background"],eq;function vu(e){"@babel/helpers - typeof";return vu=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},vu(e)}function vfe(e,t){if(e==null)return{};var n=gfe(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 gfe(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 sg(){return sg=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},sg.apply(this,arguments)}function r3(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 mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r3(Object(n),!0).forEach(function(r){Uo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a3(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,nq(r.key),r)}}function xfe(e,t,n){return t&&a3(e.prototype,t),n&&a3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bfe(e,t,n){return t=lg(t),wfe(e,tq()?Reflect.construct(t,n||[],lg(e).constructor):t.apply(e,n))}function wfe(e,t){if(t&&(vu(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 tq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tq=function(){return!!e})()}function lg(e){return lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lg(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&&bN(e,t)}function bN(e,t){return bN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},bN(e,t)}function Uo(e,t,n){return t=nq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nq(e){var t=_fe(e,"string");return vu(t)=="symbol"?t:t+""}function _fe(e,t){if(vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oi=(function(e){function t(){var n;yfe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=bfe(this,t,[].concat(a)),Uo(n,"state",{isAnimationFinished:!1}),Uo(n,"id",Bu("recharts-bar-")),Uo(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Uo(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Sfe(t,e),xfe(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,l=i.shape,u=i.dataKey,d=i.activeIndex,f=i.activeBar,m=Be(this.props,!1);return r&&r.map(function(p,g){var x=g===d,j=x?f:l,b=mn(mn(mn({},m),p),{},{isActive:x,option:j,index:g,dataKey:u,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return W.createElement(pt,sg({className:"recharts-bar-rectangle"},ll(a.props,p,g),{key:"rectangle-".concat(p?.x,"-").concat(p?.y,"-").concat(p?.value,"-").concat(g)}),W.createElement(n3,b))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,l=a.layout,u=a.isAnimationActive,d=a.animationBegin,f=a.animationDuration,m=a.animationEasing,p=a.animationId,g=this.state.prevData;return W.createElement(pi,{begin:d,duration:f,isActive:u,easing:m,from:{t:0},to:{t:1},key:"bar-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var j=x.t,b=i.map(function(w,N){var O=g&&g[N];if(O){var C=Zr(O.x,w.x),A=Zr(O.y,w.y),E=Zr(O.width,w.width),k=Zr(O.height,w.height);return mn(mn({},w),{},{x:C(j),y:A(j),width:E(j),height:k(j)})}if(l==="horizontal"){var T=Zr(0,w.height),P=T(j);return mn(mn({},w),{},{y:w.y+w.height-P,height:P})}var $=Zr(0,w.width),z=$(j);return mn(mn({},w),{},{width:z})});return W.createElement(pt,null,r.renderRectanglesStatically(b))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,l=this.state.prevData;return i&&a&&a.length&&(!l||!Mh(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,l=a.dataKey,u=a.activeIndex,d=Be(this.props.background,!1);return i.map(function(f,m){f.value;var p=f.background,g=vfe(f,pfe);if(!p)return null;var x=mn(mn(mn(mn(mn({},g),{},{fill:"#eee"},p),d),ll(r.props,f,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return W.createElement(n3,sg({key:"background-bar-".concat(m),option:r.props.background,isActive:m===u},x))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.data,u=i.xAxis,d=i.yAxis,f=i.layout,m=i.children,p=ta(m,Rh);if(!p)return null;var g=f==="vertical"?l[0].height/2:l[0].width/2,x=function(w,N){var O=Array.isArray(w.value)?w.value[1]:w.value;return{x:w.x,y:w.y,value:O,errorVal:Tn(w,N)}},j={clipPath:r?"url(#clipPath-".concat(a,")"):null};return W.createElement(pt,j,p.map(function(b){return W.cloneElement(b,{key:"error-bar-".concat(a,"-").concat(b.props.dataKey),data:l,xAxis:u,yAxis:d,layout:f,offset:g,dataPointFormatter:x})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,l=r.className,u=r.xAxis,d=r.yAxis,f=r.left,m=r.top,p=r.width,g=r.height,x=r.isAnimationActive,j=r.background,b=r.id;if(a||!i||!i.length)return null;var w=this.state.isAnimationFinished,N=Ye("recharts-bar",l),O=u&&u.allowDataOverflow,C=d&&d.allowDataOverflow,A=O||C,E=Ge(b)?this.id:b;return W.createElement(pt,{className:N},O||C?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(E)},W.createElement("rect",{x:O?f:f-p/2,y:C?m:m-g/2,width:O?p:p*2,height:C?g:g*2}))):null,W.createElement(pt,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(E,")"):null},j?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,E),(!x||w)&&Ji.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}}])})(y.PureComponent);eq=oi;Uo(oi,"displayName","Bar");Uo(oi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!xl.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Uo(oi,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,l=e.yAxis,u=e.xAxisTicks,d=e.yAxisTicks,f=e.stackedData,m=e.dataStartIndex,p=e.displayedData,g=e.offset,x=Qoe(r,n);if(!x)return null;var j=t.layout,b=n.type.defaultProps,w=b!==void 0?mn(mn({},b),n.props):n.props,N=w.dataKey,O=w.children,C=w.minPointSize,A=j==="horizontal"?l:i,E=f?A.scale.domain():null,k=ise({numericAxis:A}),T=ta(O,ry),P=p.map(function($,z){var D,U,V,H,G,L;f?D=Joe(f[m+z],E):(D=Tn($,N),Array.isArray(D)||(D=[k,D]));var R=mfe(C,eq.defaultProps.minPointSize)(D[1],z);if(j==="horizontal"){var F,K=[l.scale(D[0]),l.scale(D[1])],te=K[0],I=K[1];U=A$({axis:i,ticks:u,bandSize:a,offset:x.offset,entry:$,index:z}),V=(F=I??te)!==null&&F!==void 0?F:void 0,H=x.size;var B=te-I;if(G=Number.isNaN(B)?0:B,L={x:U,y:l.y,width:H,height:l.height},Math.abs(R)>0&&Math.abs(G)<Math.abs(R)){var Y=xr(G||R)*(Math.abs(R)-Math.abs(G));V-=Y,G+=Y}}else{var ne=[i.scale(D[0]),i.scale(D[1])],oe=ne[0],xe=ne[1];if(U=oe,V=A$({axis:l,ticks:d,bandSize:a,offset:x.offset,entry:$,index:z}),H=xe-oe,G=x.size,L={x:i.x,y:V,width:i.width,height:G},Math.abs(R)>0&&Math.abs(H)<Math.abs(R)){var ee=xr(H||R)*(Math.abs(R)-Math.abs(H));H+=ee}}return mn(mn(mn({},$),{},{x:U,y:V,width:H,height:G,value:f?D:D[1],payload:$,background:L},T&&T[z]&&T[z].props),{},{tooltipPayload:[E6(n,$)],tooltipPosition:{x:U+H/2,y:V+G/2}})});return mn({data:P,layout:j},g)});function ah(e){"@babel/helpers - typeof";return ah=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},ah(e)}function Nfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i3(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,rq(r.key),r)}}function Ofe(e,t,n){return t&&i3(e.prototype,t),n&&i3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o3(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 $a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o3(Object(n),!0).forEach(function(r){jy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jy(e,t,n){return t=rq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rq(e){var t=Cfe(e,"string");return ah(t)=="symbol"?t:t+""}function Cfe(e,t){if(ah(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ah(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aq=function(t,n,r,a,i){var l=t.width,u=t.height,d=t.layout,f=t.children,m=Object.keys(n),p={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:u-r.bottom,bottomMirror:u-r.bottom},g=!!Yr(f,oi);return m.reduce(function(x,j){var b=n[j],w=b.orientation,N=b.domain,O=b.padding,C=O===void 0?{}:O,A=b.mirror,E=b.reversed,k="".concat(w).concat(A?"Mirror":""),T,P,$,z,D;if(b.type==="number"&&(b.padding==="gap"||b.padding==="no-gap")){var U=N[1]-N[0],V=1/0,H=b.categoricalDomain.sort(zQ);if(H.forEach(function(ne,oe){oe>0&&(V=Math.min((ne||0)-(H[oe-1]||0),V))}),Number.isFinite(V)){var G=V/U,L=b.layout==="vertical"?r.height:r.width;if(b.padding==="gap"&&(T=G*L/2),b.padding==="no-gap"){var R=br(t.barCategoryGap,G*L),F=G*L/2;T=F-R-(F-R)/L*R}}}a==="xAxis"?P=[r.left+(C.left||0)+(T||0),r.left+r.width-(C.right||0)-(T||0)]:a==="yAxis"?P=d==="horizontal"?[r.top+r.height-(C.bottom||0),r.top+(C.top||0)]:[r.top+(C.top||0)+(T||0),r.top+r.height-(C.bottom||0)-(T||0)]:P=b.range,E&&(P=[P[1],P[0]]);var K=_6(b,i,g),te=K.scale,I=K.realScaleType;te.domain(N).range(P),N6(te);var B=O6(te,$a($a({},b),{},{realScaleType:I}));a==="xAxis"?(D=w==="top"&&!A||w==="bottom"&&A,$=r.left,z=p[k]-D*b.height):a==="yAxis"&&(D=w==="left"&&!A||w==="right"&&A,$=p[k]-D*b.width,z=r.top);var Y=$a($a($a({},b),B),{},{realScaleType:I,x:$,y:z,scale:te,width:a==="xAxis"?r.width:b.width,height:a==="yAxis"?r.height:b.height});return Y.bandSize=Wv(Y,B),!b.hide&&a==="xAxis"?p[k]+=(D?-1:1)*Y.height:b.hide||(p[k]+=(D?-1:1)*Y.width),$a($a({},x),{},jy({},j,Y))},{})},iq=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)}},Efe=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return iq({x:n,y:r},{x:a,y:i})},oq=(function(){function e(t){Nfe(this,e),this.scale=t}return Ofe(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 u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(a){var d=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+d}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)}}])})();jy(oq,"EPS",1e-4);var MC=function(t){var n=Object.keys(t).reduce(function(r,a){return $a($a({},r),{},jy({},a,oq.create(t[a])))},{});return $a($a({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.bandAware,u=i.position;return nfe(a,function(d,f){return n[f].apply(d,{bandAware:l,position:u})})},isInRange:function(a){return J6(a,function(i,l){return n[l].isInRange(i)})}})};function Afe(e){return(e%180+180)%180}var Tfe=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Afe(a),l=i*Math.PI/180,u=Math.atan(r/n),d=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(d)},PS,s3;function kfe(){if(s3)return PS;s3=1;var e=xi(),t=Eh(),n=ey();function r(a){return function(i,l,u){var d=Object(i);if(!t(i)){var f=e(l,3);i=n(i),l=function(p){return f(d[p],p,d)}}var m=a(i,l,u);return m>-1?d[f?i[m]:m]:void 0}}return PS=r,PS}var MS,l3;function Pfe(){if(l3)return MS;l3=1;var e=K6();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return MS=t,MS}var RS,c3;function Mfe(){if(c3)return RS;c3=1;var e=iz(),t=xi(),n=Pfe(),r=Math.max;function a(i,l,u){var d=i==null?0:i.length;if(!d)return-1;var f=u==null?0:n(u);return f<0&&(f=r(d+f,0)),e(i,t(l,3),f)}return RS=a,RS}var DS,u3;function Rfe(){if(u3)return DS;u3=1;var e=kfe(),t=Mfe(),n=e(t);return DS=n,DS}var Dfe=Rfe();const $fe=St(Dfe);var Ife=wB();const Lfe=St(Ife);var Bfe=Lfe(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("")}),RC=y.createContext(void 0),DC=y.createContext(void 0),sq=y.createContext(void 0),lq=y.createContext({}),cq=y.createContext(void 0),uq=y.createContext(0),dq=y.createContext(0),d3=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,l=t.clipPathId,u=t.children,d=t.width,f=t.height,m=Bfe(i);return W.createElement(RC.Provider,{value:r},W.createElement(DC.Provider,{value:a},W.createElement(lq.Provider,{value:i},W.createElement(sq.Provider,{value:m},W.createElement(cq.Provider,{value:l},W.createElement(uq.Provider,{value:f},W.createElement(dq.Provider,{value:d},u)))))))},zfe=function(){return y.useContext(cq)},fq=function(t){var n=y.useContext(RC);n==null&&cr(!1);var r=n[t];return r==null&&cr(!1),r},qfe=function(){var t=y.useContext(RC);return qo(t)},Ffe=function(){var t=y.useContext(DC),n=$fe(t,function(r){return J6(r.domain,Number.isFinite)});return n||qo(t)},hq=function(t){var n=y.useContext(DC);n==null&&cr(!1);var r=n[t];return r==null&&cr(!1),r},Ufe=function(){var t=y.useContext(sq);return t},Hfe=function(){return y.useContext(lq)},$C=function(){return y.useContext(dq)},IC=function(){return y.useContext(uq)};function gu(e){"@babel/helpers - typeof";return gu=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},gu(e)}function Wfe(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,pq(r.key),r)}}function Gfe(e,t,n){return t&&Vfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yfe(e,t,n){return t=cg(t),Kfe(e,mq()?Reflect.construct(t,n||[],cg(e).constructor):t.apply(e,n))}function Kfe(e,t){if(t&&(gu(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 mq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mq=function(){return!!e})()}function cg(e){return cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cg(e)}function Zfe(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&&wN(e,t)}function wN(e,t){return wN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},wN(e,t)}function f3(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 h3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f3(Object(n),!0).forEach(function(r){LC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LC(e,t,n){return t=pq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pq(e){var t=Qfe(e,"string");return gu(t)=="symbol"?t:t+""}function Qfe(e,t){if(gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Jfe(e,t){return rhe(e)||nhe(e,t)||the(e,t)||ehe()}function ehe(){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 the(e,t){if(e){if(typeof e=="string")return m3(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 m3(e,t)}}function m3(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 nhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function rhe(e){if(Array.isArray(e))return e}function jN(){return jN=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},jN.apply(this,arguments)}var ahe=function(t,n){var r;return W.isValidElement(t)?r=W.cloneElement(t,n):We(t)?r=t(n):r=W.createElement("line",jN({},n,{className:"recharts-reference-line-line"})),r},ihe=function(t,n,r,a,i,l,u,d,f){var m=i.x,p=i.y,g=i.width,x=i.height;if(r){var j=f.y,b=t.y.apply(j,{position:l});if(di(f,"discard")&&!t.y.isInRange(b))return null;var w=[{x:m+g,y:b},{x:m,y:b}];return d==="left"?w.reverse():w}if(n){var N=f.x,O=t.x.apply(N,{position:l});if(di(f,"discard")&&!t.x.isInRange(O))return null;var C=[{x:O,y:p+x},{x:O,y:p}];return u==="top"?C.reverse():C}if(a){var A=f.segment,E=A.map(function(k){return t.apply(k,{position:l})});return di(f,"discard")&&Qde(E,function(k){return!t.isInRange(k)})?null:E}return null};function ohe(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,l=e.shape,u=e.className,d=e.alwaysShow,f=zfe(),m=fq(a),p=hq(i),g=Ufe();if(!f||!g)return null;za(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=MC({x:m.scale,y:p.scale}),j=kn(t),b=kn(n),w=r&&r.length===2,N=ihe(x,j,b,w,g,e.position,m.orientation,p.orientation,e);if(!N)return null;var O=Jfe(N,2),C=O[0],A=C.x,E=C.y,k=O[1],T=k.x,P=k.y,$=di(e,"hidden")?"url(#".concat(f,")"):void 0,z=h3(h3({clipPath:$},Be(e,!0)),{},{x1:A,y1:E,x2:T,y2:P});return W.createElement(pt,{className:Ye("recharts-reference-line",u)},ahe(l,z),zn.renderCallByParent(e,Efe({x1:A,y1:E,x2:T,y2:P})))}var BC=(function(e){function t(){return Wfe(this,t),Yfe(this,t,arguments)}return Zfe(t,e),Gfe(t,[{key:"render",value:function(){return W.createElement(ohe,this.props)}}])})(W.Component);LC(BC,"displayName","ReferenceLine");LC(BC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function SN(){return SN=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},SN.apply(this,arguments)}function yu(e){"@babel/helpers - typeof";return yu=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},yu(e)}function p3(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 v3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p3(Object(n),!0).forEach(function(r){Sy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function she(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lhe(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,gq(r.key),r)}}function che(e,t,n){return t&&lhe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uhe(e,t,n){return t=ug(t),dhe(e,vq()?Reflect.construct(t,n||[],ug(e).constructor):t.apply(e,n))}function dhe(e,t){if(t&&(yu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fhe(e)}function fhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vq=function(){return!!e})()}function ug(e){return ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ug(e)}function hhe(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&&_N(e,t)}function _N(e,t){return _N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},_N(e,t)}function Sy(e,t,n){return t=gq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gq(e){var t=mhe(e,"string");return yu(t)=="symbol"?t:t+""}function mhe(e,t){if(yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var phe=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,l=MC({x:a.scale,y:i.scale}),u=l.apply({x:n,y:r},{bandAware:!0});return di(t,"discard")&&!l.isInRange(u)?null:u},_y=(function(e){function t(){return she(this,t),uhe(this,t,arguments)}return hhe(t,e),che(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,l=r.r,u=r.alwaysShow,d=r.clipPathId,f=kn(a),m=kn(i);if(za(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!m)return null;var p=phe(this.props);if(!p)return null;var g=p.x,x=p.y,j=this.props,b=j.shape,w=j.className,N=di(this.props,"hidden")?"url(#".concat(d,")"):void 0,O=v3(v3({clipPath:N},Be(this.props,!0)),{},{cx:g,cy:x});return W.createElement(pt,{className:Ye("recharts-reference-dot",w)},t.renderDot(b,O),zn.renderCallByParent(this.props,{x:g-l,y:x-l,width:2*l,height:2*l}))}}])})(W.Component);Sy(_y,"displayName","ReferenceDot");Sy(_y,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Sy(_y,"renderDot",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):We(e)?n=e(t):n=W.createElement(py,SN({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function NN(){return NN=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},NN.apply(this,arguments)}function xu(e){"@babel/helpers - typeof";return xu=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},xu(e)}function g3(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 y3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g3(Object(n),!0).forEach(function(r){Ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ghe(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,xq(r.key),r)}}function yhe(e,t,n){return t&&ghe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xhe(e,t,n){return t=dg(t),bhe(e,yq()?Reflect.construct(t,n||[],dg(e).constructor):t.apply(e,n))}function bhe(e,t){if(t&&(xu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return whe(e)}function whe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yq=function(){return!!e})()}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dg(e)}function jhe(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&&ON(e,t)}function ON(e,t){return ON=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ON(e,t)}function Ny(e,t,n){return t=xq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xq(e){var t=She(e,"string");return xu(t)=="symbol"?t:t+""}function She(e,t){if(xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _he=function(t,n,r,a,i){var l=i.x1,u=i.x2,d=i.y1,f=i.y2,m=i.xAxis,p=i.yAxis;if(!m||!p)return null;var g=MC({x:m.scale,y:p.scale}),x={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(d,{position:"start"}):g.y.rangeMin},j={x:n?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:a?g.y.apply(f,{position:"end"}):g.y.rangeMax};return di(i,"discard")&&(!g.isInRange(x)||!g.isInRange(j))?null:iq(x,j)},Oy=(function(e){function t(){return vhe(this,t),xhe(this,t,arguments)}return jhe(t,e),yhe(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,l=r.y1,u=r.y2,d=r.className,f=r.alwaysShow,m=r.clipPathId;za(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=kn(a),g=kn(i),x=kn(l),j=kn(u),b=this.props.shape;if(!p&&!g&&!x&&!j&&!b)return null;var w=_he(p,g,x,j,this.props);if(!w&&!b)return null;var N=di(this.props,"hidden")?"url(#".concat(m,")"):void 0;return W.createElement(pt,{className:Ye("recharts-reference-area",d)},t.renderRect(b,y3(y3({clipPath:N},Be(this.props,!0)),w)),zn.renderCallByParent(this.props,w))}}])})(W.Component);Ny(Oy,"displayName","ReferenceArea");Ny(Oy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Ny(Oy,"renderRect",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):We(e)?n=e(t):n=W.createElement(PC,NN({},t,{className:"recharts-reference-area-rect"})),n});function bq(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 Nhe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Tfe(r,n)}function Ohe(e,t,n){var r=n==="width",a=e.x,i=e.y,l=e.width,u=e.height;return t===1?{start:r?a:i,end:r?a+l:i+u}:{start:r?a+l:i+u,end:r?a:i}}function fg(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 Che(e,t){return bq(e,t+1)}function Ehe(e,t,n,r,a){for(var i=(r||[]).slice(),l=t.start,u=t.end,d=0,f=1,m=l,p=function(){var j=r?.[d];if(j===void 0)return{v:bq(r,f)};var b=d,w,N=function(){return w===void 0&&(w=n(j,b)),w},O=j.coordinate,C=d===0||fg(e,O,N,m,u);C||(d=0,m=l,f+=1),C&&(m=O+e*(N()/2+a),d+=f)},g;f<=i.length;)if(g=p(),g)return g.v;return[]}function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}function x3(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 ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x3(Object(n),!0).forEach(function(r){Ahe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ahe(e,t,n){return t=The(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function The(e){var t=khe(e,"string");return ih(t)=="symbol"?t:t+""}function khe(e,t){if(ih(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ih(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Phe(e,t,n,r,a){for(var i=(r||[]).slice(),l=i.length,u=t.start,d=t.end,f=function(g){var x=i[g],j,b=function(){return j===void 0&&(j=n(x,g)),j};if(g===l-1){var w=e*(x.coordinate+e*b()/2-d);i[g]=x=ir(ir({},x),{},{tickCoord:w>0?x.coordinate-w*e:x.coordinate})}else i[g]=x=ir(ir({},x),{},{tickCoord:x.coordinate});var N=fg(e,x.tickCoord,b,u,d);N&&(d=x.tickCoord-e*(b()/2+a),i[g]=ir(ir({},x),{},{isShow:!0}))},m=l-1;m>=0;m--)f(m);return i}function Mhe(e,t,n,r,a,i){var l=(r||[]).slice(),u=l.length,d=t.start,f=t.end;if(i){var m=r[u-1],p=n(m,u-1),g=e*(m.coordinate+e*p/2-f);l[u-1]=m=ir(ir({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var x=fg(e,m.tickCoord,function(){return p},d,f);x&&(f=m.tickCoord-e*(p/2+a),l[u-1]=ir(ir({},m),{},{isShow:!0}))}for(var j=i?u-1:u,b=function(O){var C=l[O],A,E=function(){return A===void 0&&(A=n(C,O)),A};if(O===0){var k=e*(C.coordinate-e*E()/2-d);l[O]=C=ir(ir({},C),{},{tickCoord:k<0?C.coordinate-k*e:C.coordinate})}else l[O]=C=ir(ir({},C),{},{tickCoord:C.coordinate});var T=fg(e,C.tickCoord,E,d,f);T&&(d=C.tickCoord+e*(E()/2+a),l[O]=ir(ir({},C),{},{isShow:!0}))},w=0;w<j;w++)b(w);return l}function zC(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,l=e.minTickGap,u=e.orientation,d=e.interval,f=e.tickFormatter,m=e.unit,p=e.angle;if(!a||!a.length||!r)return[];if(Oe(d)||xl.isSsr)return Che(a,typeof d=="number"&&Oe(d)?d:0);var g=[],x=u==="top"||u==="bottom"?"width":"height",j=m&&x==="width"?yf(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},b=function(C,A){var E=We(f)?f(C.value,A):C.value;return x==="width"?Nhe(yf(E,{fontSize:t,letterSpacing:n}),j,p):yf(E,{fontSize:t,letterSpacing:n})[x]},w=a.length>=2?xr(a[1].coordinate-a[0].coordinate):1,N=Ohe(i,w,x);return d==="equidistantPreserveStart"?Ehe(w,N,b,a,l):(d==="preserveStart"||d==="preserveStartEnd"?g=Mhe(w,N,b,a,l,d==="preserveStartEnd"):g=Phe(w,N,b,a,l),g.filter(function(O){return O.isShow}))}var Rhe=["viewBox"],Dhe=["viewBox"],$he=["ticks"];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 Lc(){return Lc=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},Lc.apply(this,arguments)}function b3(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 En(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b3(Object(n),!0).forEach(function(r){qC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $S(e,t){if(e==null)return{};var n=Ihe(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 Ihe(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 Lhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w3(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,jq(r.key),r)}}function Bhe(e,t,n){return t&&w3(e.prototype,t),n&&w3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zhe(e,t,n){return t=hg(t),qhe(e,wq()?Reflect.construct(t,n||[],hg(e).constructor):t.apply(e,n))}function qhe(e,t){if(t&&(bu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fhe(e)}function Fhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wq=function(){return!!e})()}function hg(e){return hg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hg(e)}function Uhe(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&&CN(e,t)}function CN(e,t){return CN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},CN(e,t)}function qC(e,t,n){return t=jq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jq(e){var t=Hhe(e,"string");return bu(t)=="symbol"?t:t+""}function Hhe(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 String(e)}var Hu=(function(e){function t(n){var r;return Lhe(this,t),r=zhe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Uhe(t,e),Bhe(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,l=$S(r,Rhe),u=this.props,d=u.viewBox,f=$S(u,Dhe);return!zc(i,d)||!zc(l,f)||!zc(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,u=a.width,d=a.height,f=a.orientation,m=a.tickSize,p=a.mirror,g=a.tickMargin,x,j,b,w,N,O,C=p?-1:1,A=r.tickSize||m,E=Oe(r.tickCoord)?r.tickCoord:r.coordinate;switch(f){case"top":x=j=r.coordinate,w=l+ +!p*d,b=w-C*A,O=b-C*g,N=E;break;case"left":b=w=r.coordinate,j=i+ +!p*u,x=j-C*A,N=x-C*g,O=E;break;case"right":b=w=r.coordinate,j=i+ +p*u,x=j+C*A,N=x+C*g,O=E;break;default:x=j=r.coordinate,w=l+ +p*d,b=w+C*A,O=b+C*g,N=E;break}return{line:{x1:x,y1:b,x2:j,y2:w},tick:{x:N,y:O}}}},{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,u=r.height,d=r.orientation,f=r.mirror,m=r.axisLine,p=En(En(En({},Be(this.props,!1)),Be(m,!1)),{},{fill:"none"});if(d==="top"||d==="bottom"){var g=+(d==="top"&&!f||d==="bottom"&&f);p=En(En({},p),{},{x1:a,y1:i+g*u,x2:a+l,y2:i+g*u})}else{var x=+(d==="left"&&!f||d==="right"&&f);p=En(En({},p),{},{x1:a+x*l,y1:i,x2:a+x*l,y2:i+u})}return W.createElement("line",Lc({},p,{className:Ye("recharts-cartesian-axis-line",ea(m,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var l=this,u=this.props,d=u.tickLine,f=u.stroke,m=u.tick,p=u.tickFormatter,g=u.unit,x=zC(En(En({},this.props),{},{ticks:r}),a,i),j=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),w=Be(this.props,!1),N=Be(m,!1),O=En(En({},w),{},{fill:"none"},Be(d,!1)),C=x.map(function(A,E){var k=l.getTickLineCoord(A),T=k.line,P=k.tick,$=En(En(En(En({textAnchor:j,verticalAnchor:b},w),{},{stroke:"none",fill:f},N),P),{},{index:E,payload:A,visibleTicksCount:x.length,tickFormatter:p});return W.createElement(pt,Lc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},ll(l.props,A,E)),d&&W.createElement("line",Lc({},O,T,{className:Ye("recharts-cartesian-axis-tick-line",ea(d,"className"))})),m&&t.renderTickItem(m,$,"".concat(We(p)?p(A.value,E):A.value).concat(g||"")))});return W.createElement("g",{className:"recharts-cartesian-axis-ticks"},C)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,l=a.width,u=a.height,d=a.ticksGenerator,f=a.className,m=a.hide;if(m)return null;var p=this.props,g=p.ticks,x=$S(p,$he),j=g;return We(d)&&(j=g&&g.length>0?d(this.props):d(x)),l<=0||u<=0||!j||!j.length?null:W.createElement(pt,{className:Ye("recharts-cartesian-axis",f),ref:function(w){r.layerReference=w}},i&&this.renderAxisLine(),this.renderTicks(j,this.state.fontSize,this.state.letterSpacing),zn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var l,u=Ye(a.className,"recharts-cartesian-axis-tick-value");return W.isValidElement(r)?l=W.cloneElement(r,En(En({},a),{},{className:u})):We(r)?l=r(En(En({},a),{},{className:u})):l=W.createElement(cl,Lc({},a,{className:"recharts-cartesian-axis-tick-value"}),i),l}}])})(y.Component);qC(Hu,"displayName","CartesianAxis");qC(Hu,"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 Whe=["x1","y1","x2","y2","key"],Vhe=["offset"];function dl(e){"@babel/helpers - typeof";return dl=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},dl(e)}function j3(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 sr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j3(Object(n),!0).forEach(function(r){Ghe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ghe(e,t,n){return t=Yhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yhe(e){var t=Khe(e,"string");return dl(t)=="symbol"?t:t+""}function Khe(e,t){if(dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vs(){return Vs=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},Vs.apply(this,arguments)}function S3(e,t){if(e==null)return{};var n=Xhe(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 Xhe(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 Zhe=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,u=t.height,d=t.ry;return W.createElement("rect",{x:a,y:i,ry:d,width:l,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Sq(e,t){var n;if(W.isValidElement(e))n=W.cloneElement(e,t);else if(We(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,l=t.y2,u=t.key,d=S3(t,Whe),f=Be(d,!1);f.offset;var m=S3(f,Vhe);n=W.createElement("line",Vs({},m,{x1:r,y1:a,x2:i,y2:l,fill:"none",key:u}))}return n}function Qhe(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(u,d){var f=sr(sr({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(d),index:d});return Sq(a,f)});return W.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Jhe(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(u,d){var f=sr(sr({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(d),index:d});return Sq(a,f)});return W.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function eme(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,l=e.height,u=e.horizontalPoints,d=e.horizontal,f=d===void 0?!0:d;if(!f||!t||!t.length)return null;var m=u.map(function(g){return Math.round(g+a-a)}).sort(function(g,x){return g-x});a!==m[0]&&m.unshift(0);var p=m.map(function(g,x){var j=!m[x+1],b=j?a+l-g:m[x+1]-g;if(b<=0)return null;var w=x%t.length;return W.createElement("rect",{key:"react-".concat(x),y:g,x:r,height:b,width:i,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function tme(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,l=e.y,u=e.width,d=e.height,f=e.verticalPoints;if(!n||!r||!r.length)return null;var m=f.map(function(g){return Math.round(g+i-i)}).sort(function(g,x){return g-x});i!==m[0]&&m.unshift(0);var p=m.map(function(g,x){var j=!m[x+1],b=j?i+u-g:m[x+1]-g;if(b<=0)return null;var w=x%r.length;return W.createElement("rect",{key:"react-".concat(x),x:g,y:l,width:b,height:d,stroke:"none",fill:r[w],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var nme=function(t,n){var r=t.xAxis,a=t.width,i=t.height,l=t.offset;return S6(zC(sr(sr(sr({},Hu.defaultProps),r),{},{ticks:Gi(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.left,l.left+l.width,n)},rme=function(t,n){var r=t.yAxis,a=t.width,i=t.height,l=t.offset;return S6(zC(sr(sr(sr({},Hu.defaultProps),r),{},{ticks:Gi(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.top,l.top+l.height,n)},wc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function uf(e){var t,n,r,a,i,l,u=$C(),d=IC(),f=Hfe(),m=sr(sr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:wc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:wc.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:wc.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:wc.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:wc.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:wc.verticalFill,x:Oe(e.x)?e.x:f.left,y:Oe(e.y)?e.y:f.top,width:Oe(e.width)?e.width:f.width,height:Oe(e.height)?e.height:f.height}),p=m.x,g=m.y,x=m.width,j=m.height,b=m.syncWithTicks,w=m.horizontalValues,N=m.verticalValues,O=qfe(),C=Ffe();if(!Oe(x)||x<=0||!Oe(j)||j<=0||!Oe(p)||p!==+p||!Oe(g)||g!==+g)return null;var A=m.verticalCoordinatesGenerator||nme,E=m.horizontalCoordinatesGenerator||rme,k=m.horizontalPoints,T=m.verticalPoints;if((!k||!k.length)&&We(E)){var P=w&&w.length,$=E({yAxis:C?sr(sr({},C),{},{ticks:P?w:C.ticks}):void 0,width:u,height:d,offset:f},P?!0:b);za(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(dl($),"]")),Array.isArray($)&&(k=$)}if((!T||!T.length)&&We(A)){var z=N&&N.length,D=A({xAxis:O?sr(sr({},O),{},{ticks:z?N:O.ticks}):void 0,width:u,height:d,offset:f},z?!0:b);za(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(dl(D),"]")),Array.isArray(D)&&(T=D)}return W.createElement("g",{className:"recharts-cartesian-grid"},W.createElement(Zhe,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),W.createElement(Qhe,Vs({},m,{offset:f,horizontalPoints:k,xAxis:O,yAxis:C})),W.createElement(Jhe,Vs({},m,{offset:f,verticalPoints:T,xAxis:O,yAxis:C})),W.createElement(eme,Vs({},m,{horizontalPoints:k})),W.createElement(tme,Vs({},m,{verticalPoints:T})))}uf.displayName="CartesianGrid";var ame=["type","layout","connectNulls","ref"],ime=["key"];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 _3(e,t){if(e==null)return{};var n=ome(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 ome(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 _f(){return _f=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},_f.apply(this,arguments)}function N3(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 Vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N3(Object(n),!0).forEach(function(r){Ia(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jc(e){return ume(e)||cme(e)||lme(e)||sme()}function sme(){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 lme(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 cme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ume(e){if(Array.isArray(e))return EN(e)}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 dme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O3(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,Nq(r.key),r)}}function fme(e,t,n){return t&&O3(e.prototype,t),n&&O3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hme(e,t,n){return t=mg(t),mme(e,_q()?Reflect.construct(t,n||[],mg(e).constructor):t.apply(e,n))}function mme(e,t){if(t&&(wu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pme(e)}function pme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_q=function(){return!!e})()}function mg(e){return mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mg(e)}function vme(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&&AN(e,t)}function AN(e,t){return AN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},AN(e,t)}function Ia(e,t,n){return t=Nq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nq(e){var t=gme(e,"string");return wu(t)=="symbol"?t:t+""}function gme(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 String(e)}var Dh=(function(e){function t(){var n;dme(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=hme(this,t,[].concat(a)),Ia(n,"state",{isAnimationFinished:!0,totalLength:0}),Ia(n,"generateSimpleStrokeDasharray",function(l,u){return"".concat(u,"px ").concat(l-u,"px")}),Ia(n,"getStrokeDasharray",function(l,u,d){var f=d.reduce(function(N,O){return N+O});if(!f)return n.generateSimpleStrokeDasharray(u,l);for(var m=Math.floor(l/f),p=l%f,g=u-l,x=[],j=0,b=0;j<d.length;b+=d[j],++j)if(b+d[j]>p){x=[].concat(jc(d.slice(0,j)),[p-b]);break}var w=x.length%2===0?[0,g]:[g];return[].concat(jc(t.repeat(d,m)),jc(x),w).map(function(N){return"".concat(N,"px")}).join(", ")}),Ia(n,"id",Bu("recharts-line-")),Ia(n,"pathRef",function(l){n.mainCurve=l}),Ia(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ia(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return vme(t,e),fme(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,u=i.xAxis,d=i.yAxis,f=i.layout,m=i.children,p=ta(m,Rh);if(!p)return null;var g=function(b,w){return{x:b.x,y:b.y,value:b.value,errorVal:Tn(b.payload,w)}},x={clipPath:r?"url(#clipPath-".concat(a,")"):null};return W.createElement(pt,x,p.map(function(j){return W.cloneElement(j,{key:"bar-".concat(j.props.dataKey),data:l,xAxis:u,yAxis:d,layout:f,dataPointFormatter:g})}))}},{key:"renderDots",value:function(r,a,i){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var u=this.props,d=u.dot,f=u.points,m=u.dataKey,p=Be(this.props,!1),g=Be(d,!0),x=f.map(function(b,w){var N=Vr(Vr(Vr({key:"dot-".concat(w),r:3},p),g),{},{index:w,cx:b.x,cy:b.y,value:b.value,dataKey:m,payload:b.payload,points:f});return t.renderDotItem(d,N)}),j={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return W.createElement(pt,_f({className:"recharts-line-dots",key:"dots"},j),x)}},{key:"renderCurveStatically",value:function(r,a,i,l){var u=this.props,d=u.type,f=u.layout,m=u.connectNulls;u.ref;var p=_3(u,ame),g=Vr(Vr(Vr({},Be(p,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:r},l),{},{type:d,layout:f,connectNulls:m});return W.createElement(Yv,_f({},g,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var i=this,l=this.props,u=l.points,d=l.strokeDasharray,f=l.isAnimationActive,m=l.animationBegin,p=l.animationDuration,g=l.animationEasing,x=l.animationId,j=l.animateNewValues,b=l.width,w=l.height,N=this.state,O=N.prevPoints,C=N.totalLength;return W.createElement(pi,{begin:m,duration:p,isActive:f,easing:g,from:{t:0},to:{t:1},key:"line-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var E=A.t;if(O){var k=O.length/u.length,T=u.map(function(U,V){var H=Math.floor(V*k);if(O[H]){var G=O[H],L=Zr(G.x,U.x),R=Zr(G.y,U.y);return Vr(Vr({},U),{},{x:L(E),y:R(E)})}if(j){var F=Zr(b*2,U.x),K=Zr(w/2,U.y);return Vr(Vr({},U),{},{x:F(E),y:K(E)})}return Vr(Vr({},U),{},{x:U.x,y:U.y})});return i.renderCurveStatically(T,r,a)}var P=Zr(0,C),$=P(E),z;if(d){var D="".concat(d).split(/[,\s]+/gim).map(function(U){return parseFloat(U)});z=i.getStrokeDasharray($,C,D)}else z=i.generateSimpleStrokeDasharray(C,$);return i.renderCurveStatically(u,r,a,{strokeDasharray:z})})}},{key:"renderCurve",value:function(r,a){var i=this.props,l=i.points,u=i.isAnimationActive,d=this.state,f=d.prevPoints,m=d.totalLength;return u&&l&&l.length&&(!f&&m>0||!Mh(f,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,u=a.points,d=a.className,f=a.xAxis,m=a.yAxis,p=a.top,g=a.left,x=a.width,j=a.height,b=a.isAnimationActive,w=a.id;if(i||!u||!u.length)return null;var N=this.state.isAnimationFinished,O=u.length===1,C=Ye("recharts-line",d),A=f&&f.allowDataOverflow,E=m&&m.allowDataOverflow,k=A||E,T=Ge(w)?this.id:w,P=(r=Be(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},$=P.r,z=$===void 0?3:$,D=P.strokeWidth,U=D===void 0?2:D,V=KQ(l)?l:{},H=V.clipDot,G=H===void 0?!0:H,L=z*2+U;return W.createElement(pt,{className:C},A||E?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(T)},W.createElement("rect",{x:A?g:g-x/2,y:E?p:p-j/2,width:A?x:x*2,height:E?j:j*2})),!G&&W.createElement("clipPath",{id:"clipPath-dots-".concat(T)},W.createElement("rect",{x:g-L/2,y:p-L/2,width:x+L,height:j+L}))):null,!O&&this.renderCurve(k,T),this.renderErrorBar(k,T),(O||l)&&this.renderDots(k,G,T),(!b||N)&&Ji.renderCallByParent(this.props,u))}}],[{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(jc(r),[0]):r,l=[],u=0;u<a;++u)l=[].concat(jc(l),jc(i));return l}},{key:"renderDotItem",value:function(r,a){var i;if(W.isValidElement(r))i=W.cloneElement(r,a);else if(We(r))i=r(a);else{var l=a.key,u=_3(a,ime),d=Ye("recharts-line-dot",typeof r!="boolean"?r.className:"");i=W.createElement(py,_f({key:l},u,{className:d}))}return i}}])})(y.PureComponent);Ia(Dh,"displayName","Line");Ia(Dh,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!xl.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Ia(Dh,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,l=e.dataKey,u=e.bandSize,d=e.displayedData,f=e.offset,m=t.layout,p=d.map(function(g,x){var j=Tn(g,l);return m==="horizontal"?{x:E$({axis:n,ticks:a,bandSize:u,entry:g,index:x}),y:Ge(j)?null:r.scale(j),value:j,payload:g}:{x:Ge(j)?null:n.scale(j),y:E$({axis:r,ticks:i,bandSize:u,entry:g,index:x}),value:j,payload:g}});return Vr({points:p,layout:m},f)});function ju(e){"@babel/helpers - typeof";return ju=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},ju(e)}function yme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xme(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,Eq(r.key),r)}}function bme(e,t,n){return t&&xme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wme(e,t,n){return t=pg(t),jme(e,Oq()?Reflect.construct(t,n||[],pg(e).constructor):t.apply(e,n))}function jme(e,t){if(t&&(ju(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sme(e)}function Sme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Oq=function(){return!!e})()}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pg(e)}function _me(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&&TN(e,t)}function TN(e,t){return TN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},TN(e,t)}function Cq(e,t,n){return t=Eq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eq(e){var t=Nme(e,"string");return ju(t)=="symbol"?t:t+""}function Nme(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kN(){return kN=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},kN.apply(this,arguments)}function Ome(e){var t=e.xAxisId,n=$C(),r=IC(),a=fq(t);return a==null?null:y.createElement(Hu,kN({},a,{className:Ye("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Gi(l,!0)}}))}var Ho=(function(e){function t(){return yme(this,t),wme(this,t,arguments)}return _me(t,e),bme(t,[{key:"render",value:function(){return y.createElement(Ome,this.props)}}])})(y.Component);Cq(Ho,"displayName","XAxis");Cq(Ho,"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 Su(e){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Su(e)}function Cme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eme(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,kq(r.key),r)}}function Ame(e,t,n){return t&&Eme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tme(e,t,n){return t=vg(t),kme(e,Aq()?Reflect.construct(t,n||[],vg(e).constructor):t.apply(e,n))}function kme(e,t){if(t&&(Su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pme(e)}function Pme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Aq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Aq=function(){return!!e})()}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vg(e)}function Mme(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&&PN(e,t)}function PN(e,t){return PN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},PN(e,t)}function Tq(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=Rme(e,"string");return Su(t)=="symbol"?t:t+""}function Rme(e,t){if(Su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MN(){return MN=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},MN.apply(this,arguments)}var Dme=function(t){var n=t.yAxisId,r=$C(),a=IC(),i=hq(n);return i==null?null:y.createElement(Hu,MN({},i,{className:Ye("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(u){return Gi(u,!0)}}))},Hi=(function(e){function t(){return Cme(this,t),Tme(this,t,arguments)}return Mme(t,e),Ame(t,[{key:"render",value:function(){return y.createElement(Dme,this.props)}}])})(y.Component);Tq(Hi,"displayName","YAxis");Tq(Hi,"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 C3(e){return Bme(e)||Lme(e)||Ime(e)||$me()}function $me(){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 Ime(e,t){if(e){if(typeof e=="string")return RN(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 RN(e,t)}}function Lme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bme(e){if(Array.isArray(e))return RN(e)}function RN(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 DN=function(t,n,r,a,i){var l=ta(t,BC),u=ta(t,_y),d=[].concat(C3(l),C3(u)),f=ta(t,Oy),m="".concat(a,"Id"),p=a[0],g=n;if(d.length&&(g=d.reduce(function(b,w){if(w.props[m]===r&&di(w.props,"extendDomain")&&Oe(w.props[p])){var N=w.props[p];return[Math.min(b[0],N),Math.max(b[1],N)]}return b},g)),f.length){var x="".concat(p,"1"),j="".concat(p,"2");g=f.reduce(function(b,w){if(w.props[m]===r&&di(w.props,"extendDomain")&&Oe(w.props[x])&&Oe(w.props[j])){var N=w.props[x],O=w.props[j];return[Math.min(b[0],N,O),Math.max(b[1],N,O)]}return b},g)}return i&&i.length&&(g=i.reduce(function(b,w){return Oe(w)?[Math.min(b[0],w),Math.max(b[1],w)]:b},g)),g},IS={exports:{}},E3;function zme(){return E3||(E3=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(d,f,m){this.fn=d,this.context=f,this.once=m||!1}function i(d,f,m,p,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new a(m,p||d,g),j=n?n+f:f;return d._events[j]?d._events[j].fn?d._events[j]=[d._events[j],x]:d._events[j].push(x):(d._events[j]=x,d._eventsCount++),d}function l(d,f){--d._eventsCount===0?d._events=new r:delete d._events[f]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],m,p;if(this._eventsCount===0)return f;for(p in m=this._events)t.call(m,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},u.prototype.listeners=function(f){var m=n?n+f:f,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var g=0,x=p.length,j=new Array(x);g<x;g++)j[g]=p[g].fn;return j},u.prototype.listenerCount=function(f){var m=n?n+f:f,p=this._events[m];return p?p.fn?1:p.length:0},u.prototype.emit=function(f,m,p,g,x,j){var b=n?n+f:f;if(!this._events[b])return!1;var w=this._events[b],N=arguments.length,O,C;if(w.fn){switch(w.once&&this.removeListener(f,w.fn,void 0,!0),N){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,m),!0;case 3:return w.fn.call(w.context,m,p),!0;case 4:return w.fn.call(w.context,m,p,g),!0;case 5:return w.fn.call(w.context,m,p,g,x),!0;case 6:return w.fn.call(w.context,m,p,g,x,j),!0}for(C=1,O=new Array(N-1);C<N;C++)O[C-1]=arguments[C];w.fn.apply(w.context,O)}else{var A=w.length,E;for(C=0;C<A;C++)switch(w[C].once&&this.removeListener(f,w[C].fn,void 0,!0),N){case 1:w[C].fn.call(w[C].context);break;case 2:w[C].fn.call(w[C].context,m);break;case 3:w[C].fn.call(w[C].context,m,p);break;case 4:w[C].fn.call(w[C].context,m,p,g);break;default:if(!O)for(E=1,O=new Array(N-1);E<N;E++)O[E-1]=arguments[E];w[C].fn.apply(w[C].context,O)}}return!0},u.prototype.on=function(f,m,p){return i(this,f,m,p,!1)},u.prototype.once=function(f,m,p){return i(this,f,m,p,!0)},u.prototype.removeListener=function(f,m,p,g){var x=n?n+f:f;if(!this._events[x])return this;if(!m)return l(this,x),this;var j=this._events[x];if(j.fn)j.fn===m&&(!g||j.once)&&(!p||j.context===p)&&l(this,x);else{for(var b=0,w=[],N=j.length;b<N;b++)(j[b].fn!==m||g&&!j[b].once||p&&j[b].context!==p)&&w.push(j[b]);w.length?this._events[x]=w.length===1?w[0]:w:l(this,x)}return this},u.prototype.removeAllListeners=function(f){var m;return f?(m=n?n+f:f,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(IS)),IS.exports}var qme=zme();const Fme=St(qme);var LS=new Fme,BS="recharts.syncMouseEvents";function oh(e){"@babel/helpers - typeof";return oh=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},oh(e)}function Ume(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hme(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,Pq(r.key),r)}}function Wme(e,t,n){return t&&Hme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zS(e,t,n){return t=Pq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pq(e){var t=Vme(e,"string");return oh(t)=="symbol"?t:t+""}function Vme(e,t){if(oh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gme=(function(){function e(){Ume(this,e),zS(this,"activeIndex",0),zS(this,"coordinateList",[]),zS(this,"layout","horizontal")}return Wme(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,l=n.container,u=l===void 0?null:l,d=n.layout,f=d===void 0?null:d,m=n.offset,p=m===void 0?null:m,g=n.mouseHandlerCallback,x=g===void 0?null:g;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=u??this.container,this.layout=f??this.layout,this.offset=p??this.offset,this.mouseHandlerCallback=x??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,u=a.height,d=this.coordinateList[this.activeIndex].coordinate,f=((n=window)===null||n===void 0?void 0:n.scrollX)||0,m=((r=window)===null||r===void 0?void 0:r.scrollY)||0,p=i+d+f,g=l+this.offset.top+u/2+m;this.mouseHandlerCallback({pageX:p,pageY:g})}}}])})();function Yme(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e?.[0],a=e?.[1];if(r&&a&&Oe(r)&&Oe(a))return!0}return!1}function Kme(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 Mq(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,l=Ft(t,n,r,a),u=Ft(t,n,r,i);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function Xme(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 u=t.cx,d=t.cy,f=t.innerRadius,m=t.outerRadius,p=t.angle,g=Ft(u,d,f,p),x=Ft(u,d,m,p);r=g.x,a=g.y,i=x.x,l=x.y}else return Mq(t);return[{x:r,y:a},{x:i,y:l}]}function sh(e){"@babel/helpers - typeof";return sh=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},sh(e)}function A3(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 Ip(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A3(Object(n),!0).forEach(function(r){Zme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zme(e,t,n){return t=Qme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qme(e){var t=Jme(e,"string");return sh(t)=="symbol"?t:t+""}function Jme(e,t){if(sh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function epe(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,l=e.activeCoordinate,u=e.activePayload,d=e.offset,f=e.activeTooltipIndex,m=e.tooltipAxisBandSize,p=e.layout,g=e.chartName,x=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!x||!i||!l||g!=="ScatterChart"&&a!=="axis")return null;var j,b=Yv;if(g==="ScatterChart")j=l,b=jue;else if(g==="BarChart")j=Kme(p,l,d,m),b=PC;else if(p==="radial"){var w=Mq(l),N=w.cx,O=w.cy,C=w.radius,A=w.startAngle,E=w.endAngle;j={cx:N,cy:O,startAngle:A,endAngle:E,innerRadius:C,outerRadius:C},b=R6}else j={points:Xme(p,l,d)},b=Yv;var k=Ip(Ip(Ip(Ip({stroke:"#ccc",pointerEvents:"none"},d),j),Be(x,!1)),{},{payload:u,payloadIndex:f,className:Ye("recharts-tooltip-cursor",x.className)});return y.isValidElement(x)?y.cloneElement(x,k):y.createElement(b,k)}var tpe=["item"],npe=["children","className","width","height","style","compact","title","desc"];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 Bc(){return Bc=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},Bc.apply(this,arguments)}function T3(e,t){return ipe(e)||ape(e,t)||Dq(e,t)||rpe()}function rpe(){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 ape(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function ipe(e){if(Array.isArray(e))return e}function k3(e,t){if(e==null)return{};var n=ope(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 ope(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 spe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lpe(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 cpe(e,t,n){return t&&lpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function upe(e,t,n){return t=gg(t),dpe(e,Rq()?Reflect.construct(t,n||[],gg(e).constructor):t.apply(e,n))}function dpe(e,t){if(t&&(_u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fpe(e)}function fpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rq=function(){return!!e})()}function gg(e){return gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gg(e)}function hpe(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&&$N(e,t)}function $N(e,t){return $N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},$N(e,t)}function Nu(e){return vpe(e)||ppe(e)||Dq(e)||mpe()}function mpe(){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 Dq(e,t){if(e){if(typeof e=="string")return IN(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 IN(e,t)}}function ppe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vpe(e){if(Array.isArray(e))return IN(e)}function IN(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 P3(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 ye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P3(Object(n),!0).forEach(function(r){Fe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fe(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=gpe(e,"string");return _u(t)=="symbol"?t:t+""}function gpe(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 ype={xAxis:["bottom","top"],yAxis:["left","right"]},xpe={width:"100%",height:"100%"},Iq={x:0,y:0};function Lp(e){return e}var bpe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},wpe=function(t,n,r,a){var i=n.find(function(m){return m&&m.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,u=a.radius;return ye(ye(ye({},a),Ft(a.cx,a.cy,u,l)),{},{angle:l,radius:u})}var d=i.coordinate,f=a.angle;return ye(ye(ye({},a),Ft(a.cx,a.cy,d,f)),{},{angle:f,radius:d})}return Iq},Cy=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,l=(r??[]).reduce(function(u,d){var f=d.props.data;return f&&f.length?[].concat(Nu(u),Nu(f)):u},[]);return l.length>0?l:t&&t.length&&Oe(a)&&Oe(i)?t.slice(a,i+1):[]};function Lq(e){return e==="number"?[0,"auto"]:void 0}var LN=function(t,n,r,a){var i=t.graphicalItems,l=t.tooltipAxis,u=Cy(n,t);return r<0||!i||!i.length||r>=u.length?null:i.reduce(function(d,f){var m,p=(m=f.props.data)!==null&&m!==void 0?m:n;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var x=p===void 0?u:p;g=bv(x,l.dataKey,a)}else g=p&&p[r]||u[r];return g?[].concat(Nu(d),[E6(f,g)]):d},[])},M3=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},l=bpe(i,r),u=t.orderedTooltipTicks,d=t.tooltipAxis,f=t.tooltipTicks,m=Voe(l,u,f,d);if(m>=0&&f){var p=f[m]&&f[m].value,g=LN(t,n,m,p),x=wpe(r,u,m,i);return{activeTooltipIndex:m,activeLabel:p,activePayload:g,activeCoordinate:x}}return null},jpe=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,f=n.dataEndIndex,m=t.layout,p=t.children,g=t.stackOffset,x=j6(m,i);return r.reduce(function(j,b){var w,N=b.type.defaultProps!==void 0?ye(ye({},b.type.defaultProps),b.props):b.props,O=N.type,C=N.dataKey,A=N.allowDataOverflow,E=N.allowDuplicatedCategory,k=N.scale,T=N.ticks,P=N.includeHidden,$=N[l];if(j[$])return j;var z=Cy(t.data,{graphicalItems:a.filter(function(B){var Y,ne=l in B.props?B.props[l]:(Y=B.type.defaultProps)===null||Y===void 0?void 0:Y[l];return ne===$}),dataStartIndex:d,dataEndIndex:f}),D=z.length,U,V,H;Yme(N.domain,A,O)&&(U=Q_(N.domain,null,A),x&&(O==="number"||k!=="auto")&&(H=bf(z,C,"category")));var G=Lq(O);if(!U||U.length===0){var L,R=(L=N.domain)!==null&&L!==void 0?L:G;if(C){if(U=bf(z,C,O),O==="category"&&x){var F=BQ(U);E&&F?(V=U,U=ag(0,D)):E||(U=P$(R,U,b).reduce(function(B,Y){return B.indexOf(Y)>=0?B:[].concat(Nu(B),[Y])},[]))}else if(O==="category")E?U=U.filter(function(B){return B!==""&&!Ge(B)}):U=P$(R,U,b).reduce(function(B,Y){return B.indexOf(Y)>=0||Y===""||Ge(Y)?B:[].concat(Nu(B),[Y])},[]);else if(O==="number"){var K=Zoe(z,a.filter(function(B){var Y,ne,oe=l in B.props?B.props[l]:(Y=B.type.defaultProps)===null||Y===void 0?void 0:Y[l],xe="hide"in B.props?B.props.hide:(ne=B.type.defaultProps)===null||ne===void 0?void 0:ne.hide;return oe===$&&(P||!xe)}),C,i,m);K&&(U=K)}x&&(O==="number"||k!=="auto")&&(H=bf(z,C,"category"))}else x?U=ag(0,D):u&&u[$]&&u[$].hasStack&&O==="number"?U=g==="expand"?[0,1]:C6(u[$].stackGroups,d,f):U=w6(z,a.filter(function(B){var Y=l in B.props?B.props[l]:B.type.defaultProps[l],ne="hide"in B.props?B.props.hide:B.type.defaultProps.hide;return Y===$&&(P||!ne)}),O,m,!0);if(O==="number")U=DN(p,U,$,i,T),R&&(U=Q_(R,U,A));else if(O==="category"&&R){var te=R,I=U.every(function(B){return te.indexOf(B)>=0});I&&(U=te)}}return ye(ye({},j),{},Fe({},$,ye(ye({},N),{},{axisType:i,domain:U,categoricalDomain:H,duplicateDomain:V,originalDomain:(w=N.domain)!==null&&w!==void 0?w:G,isCategorical:x,layout:m})))},{})},Spe=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,f=n.dataEndIndex,m=t.layout,p=t.children,g=Cy(t.data,{graphicalItems:r,dataStartIndex:d,dataEndIndex:f}),x=g.length,j=j6(m,i),b=-1;return r.reduce(function(w,N){var O=N.type.defaultProps!==void 0?ye(ye({},N.type.defaultProps),N.props):N.props,C=O[l],A=Lq("number");if(!w[C]){b++;var E;return j?E=ag(0,x):u&&u[C]&&u[C].hasStack?(E=C6(u[C].stackGroups,d,f),E=DN(p,E,C,i)):(E=Q_(A,w6(g,r.filter(function(k){var T,P,$=l in k.props?k.props[l]:(T=k.type.defaultProps)===null||T===void 0?void 0:T[l],z="hide"in k.props?k.props.hide:(P=k.type.defaultProps)===null||P===void 0?void 0:P.hide;return $===C&&!z}),"number",m),a.defaultProps.allowDataOverflow),E=DN(p,E,C,i)),ye(ye({},w),{},Fe({},C,ye(ye({axisType:i},a.defaultProps),{},{hide:!0,orientation:ea(ype,"".concat(i,".").concat(b%2),null),domain:E,originalDomain:A,isCategorical:j,layout:m})))}return w},{})},_pe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,l=n.graphicalItems,u=n.stackGroups,d=n.dataStartIndex,f=n.dataEndIndex,m=t.children,p="".concat(a,"Id"),g=ta(m,i),x={};return g&&g.length?x=jpe(t,{axes:g,graphicalItems:l,axisType:a,axisIdKey:p,stackGroups:u,dataStartIndex:d,dataEndIndex:f}):l&&l.length&&(x=Spe(t,{Axis:i,graphicalItems:l,axisType:a,axisIdKey:p,stackGroups:u,dataStartIndex:d,dataEndIndex:f})),x},Npe=function(t){var n=qo(t),r=Gi(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:iC(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Wv(n,r)}},R3=function(t){var n=t.children,r=t.defaultShowTooltip,a=Yr(n,pu),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}},Ope=function(t){return!t||!t.length?!1:t.some(function(n){var r=Zi(n&&n.type);return r&&r.indexOf("Bar")>=0})},D3=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"}},Cpe=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,l=i===void 0?{}:i,u=t.yAxisMap,d=u===void 0?{}:u,f=r.width,m=r.height,p=r.children,g=r.margin||{},x=Yr(p,pu),j=Yr(p,Qs),b=Object.keys(d).reduce(function(E,k){var T=d[k],P=T.orientation;return!T.mirror&&!T.hide?ye(ye({},E),{},Fe({},P,E[P]+T.width)):E},{left:g.left||0,right:g.right||0}),w=Object.keys(l).reduce(function(E,k){var T=l[k],P=T.orientation;return!T.mirror&&!T.hide?ye(ye({},E),{},Fe({},P,ea(E,"".concat(P))+T.height)):E},{top:g.top||0,bottom:g.bottom||0}),N=ye(ye({},w),b),O=N.bottom;x&&(N.bottom+=x.props.height||pu.defaultProps.height),j&&n&&(N=Koe(N,a,r,n));var C=f-N.left-N.right,A=m-N.top-N.bottom;return ye(ye({brushBottom:O},N),{},{width:Math.max(C,0),height:Math.max(A,0)})},Epe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},FC=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,l=t.validateTooltipEventTypes,u=l===void 0?["axis"]:l,d=t.axisComponents,f=t.legendContent,m=t.formatAxisMap,p=t.defaultProps,g=function(N,O){var C=O.graphicalItems,A=O.stackGroups,E=O.offset,k=O.updateId,T=O.dataStartIndex,P=O.dataEndIndex,$=N.barSize,z=N.layout,D=N.barGap,U=N.barCategoryGap,V=N.maxBarSize,H=D3(z),G=H.numericAxisName,L=H.cateAxisName,R=Ope(C),F=[];return C.forEach(function(K,te){var I=Cy(N.data,{graphicalItems:[K],dataStartIndex:T,dataEndIndex:P}),B=K.type.defaultProps!==void 0?ye(ye({},K.type.defaultProps),K.props):K.props,Y=B.dataKey,ne=B.maxBarSize,oe=B["".concat(G,"Id")],xe=B["".concat(L,"Id")],ee={},ae=d.reduce(function(nr,vr){var lt=O["".concat(vr.axisType,"Map")],rt=B["".concat(vr.axisType,"Id")];lt&<[rt]||vr.axisType==="zAxis"||cr(!1);var Dn=lt[rt];return ye(ye({},nr),{},Fe(Fe({},vr.axisType,Dn),"".concat(vr.axisType,"Ticks"),Gi(Dn)))},ee),Z=ae[L],pe=ae["".concat(L,"Ticks")],je=A&&A[oe]&&A[oe].hasStack&&ose(K,A[oe].stackGroups),le=Zi(K.type).indexOf("Bar")>=0,Re=Wv(Z,pe),_e=[],me=R&&Goe({barSize:$,stackGroups:A,totalSize:Epe(ae,L)});if(le){var ve,Le,Dt=Ge(ne)?V:ne,Nn=(ve=(Le=Wv(Z,pe,!0))!==null&&Le!==void 0?Le:Dt)!==null&&ve!==void 0?ve:0;_e=Yoe({barGap:D,barCategoryGap:U,bandSize:Nn!==Re?Nn:Re,sizeList:me[xe],maxBarSize:Dt}),Nn!==Re&&(_e=_e.map(function(nr){return ye(ye({},nr),{},{position:ye(ye({},nr.position),{},{offset:nr.position.offset-Nn/2})})}))}var pr=K&&K.type&&K.type.getComposedData;pr&&F.push({props:ye(ye({},pr(ye(ye({},ae),{},{displayedData:I,props:N,dataKey:Y,item:K,bandSize:Re,barPosition:_e,offset:E,stackedData:je,layout:z,dataStartIndex:T,dataEndIndex:P}))),{},Fe(Fe(Fe({key:K.key||"item-".concat(te)},G,ae[G]),L,ae[L]),"animationId",k)),childIndex:QQ(K,N.children),item:K})}),F},x=function(N,O){var C=N.props,A=N.dataStartIndex,E=N.dataEndIndex,k=N.updateId;if(!VM({props:C}))return null;var T=C.children,P=C.layout,$=C.stackOffset,z=C.data,D=C.reverseStackOrder,U=D3(P),V=U.numericAxisName,H=U.cateAxisName,G=ta(T,r),L=ase(z,G,"".concat(V,"Id"),"".concat(H,"Id"),$,D),R=d.reduce(function(B,Y){var ne="".concat(Y.axisType,"Map");return ye(ye({},B),{},Fe({},ne,_pe(C,ye(ye({},Y),{},{graphicalItems:G,stackGroups:Y.axisType===V&&L,dataStartIndex:A,dataEndIndex:E}))))},{}),F=Cpe(ye(ye({},R),{},{props:C,graphicalItems:G}),O?.legendBBox);Object.keys(R).forEach(function(B){R[B]=m(C,R[B],F,B.replace("Map",""),n)});var K=R["".concat(H,"Map")],te=Npe(K),I=g(C,ye(ye({},R),{},{dataStartIndex:A,dataEndIndex:E,updateId:k,graphicalItems:G,stackGroups:L,offset:F}));return ye(ye({formattedGraphicalItems:I,graphicalItems:G,offset:F,stackGroups:L},te),R)},j=(function(w){function N(O){var C,A,E;return spe(this,N),E=upe(this,N,[O]),Fe(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Fe(E,"accessibilityManager",new Gme),Fe(E,"handleLegendBBoxUpdate",function(k){if(k){var T=E.state,P=T.dataStartIndex,$=T.dataEndIndex,z=T.updateId;E.setState(ye({legendBBox:k},x({props:E.props,dataStartIndex:P,dataEndIndex:$,updateId:z},ye(ye({},E.state),{},{legendBBox:k}))))}}),Fe(E,"handleReceiveSyncEvent",function(k,T,P){if(E.props.syncId===k){if(P===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(T)}}),Fe(E,"handleBrushChange",function(k){var T=k.startIndex,P=k.endIndex;if(T!==E.state.dataStartIndex||P!==E.state.dataEndIndex){var $=E.state.updateId;E.setState(function(){return ye({dataStartIndex:T,dataEndIndex:P},x({props:E.props,dataStartIndex:T,dataEndIndex:P,updateId:$},E.state))}),E.triggerSyncEvent({dataStartIndex:T,dataEndIndex:P})}}),Fe(E,"handleMouseEnter",function(k){var T=E.getMouseInfo(k);if(T){var P=ye(ye({},T),{},{isTooltipActive:!0});E.setState(P),E.triggerSyncEvent(P);var $=E.props.onMouseEnter;We($)&&$(P,k)}}),Fe(E,"triggeredAfterMouseMove",function(k){var T=E.getMouseInfo(k),P=T?ye(ye({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(P),E.triggerSyncEvent(P);var $=E.props.onMouseMove;We($)&&$(P,k)}),Fe(E,"handleItemMouseEnter",function(k){E.setState(function(){return{isTooltipActive:!0,activeItem:k,activePayload:k.tooltipPayload,activeCoordinate:k.tooltipPosition||{x:k.cx,y:k.cy}}})}),Fe(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Fe(E,"handleMouseMove",function(k){k.persist(),E.throttleTriggeredAfterMouseMove(k)}),Fe(E,"handleMouseLeave",function(k){E.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};E.setState(T),E.triggerSyncEvent(T);var P=E.props.onMouseLeave;We(P)&&P(T,k)}),Fe(E,"handleOuterEvent",function(k){var T=ZQ(k),P=ea(E.props,"".concat(T));if(T&&We(P)){var $,z;/.*touch.*/i.test(T)?z=E.getMouseInfo(k.changedTouches[0]):z=E.getMouseInfo(k),P(($=z)!==null&&$!==void 0?$:{},k)}}),Fe(E,"handleClick",function(k){var T=E.getMouseInfo(k);if(T){var P=ye(ye({},T),{},{isTooltipActive:!0});E.setState(P),E.triggerSyncEvent(P);var $=E.props.onClick;We($)&&$(P,k)}}),Fe(E,"handleMouseDown",function(k){var T=E.props.onMouseDown;if(We(T)){var P=E.getMouseInfo(k);T(P,k)}}),Fe(E,"handleMouseUp",function(k){var T=E.props.onMouseUp;if(We(T)){var P=E.getMouseInfo(k);T(P,k)}}),Fe(E,"handleTouchMove",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(k.changedTouches[0])}),Fe(E,"handleTouchStart",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&E.handleMouseDown(k.changedTouches[0])}),Fe(E,"handleTouchEnd",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&E.handleMouseUp(k.changedTouches[0])}),Fe(E,"handleDoubleClick",function(k){var T=E.props.onDoubleClick;if(We(T)){var P=E.getMouseInfo(k);T(P,k)}}),Fe(E,"handleContextMenu",function(k){var T=E.props.onContextMenu;if(We(T)){var P=E.getMouseInfo(k);T(P,k)}}),Fe(E,"triggerSyncEvent",function(k){E.props.syncId!==void 0&&LS.emit(BS,E.props.syncId,k,E.eventEmitterSymbol)}),Fe(E,"applySyncEvent",function(k){var T=E.props,P=T.layout,$=T.syncMethod,z=E.state.updateId,D=k.dataStartIndex,U=k.dataEndIndex;if(k.dataStartIndex!==void 0||k.dataEndIndex!==void 0)E.setState(ye({dataStartIndex:D,dataEndIndex:U},x({props:E.props,dataStartIndex:D,dataEndIndex:U,updateId:z},E.state)));else if(k.activeTooltipIndex!==void 0){var V=k.chartX,H=k.chartY,G=k.activeTooltipIndex,L=E.state,R=L.offset,F=L.tooltipTicks;if(!R)return;if(typeof $=="function")G=$(F,k);else if($==="value"){G=-1;for(var K=0;K<F.length;K++)if(F[K].value===k.activeLabel){G=K;break}}var te=ye(ye({},R),{},{x:R.left,y:R.top}),I=Math.min(V,te.x+te.width),B=Math.min(H,te.y+te.height),Y=F[G]&&F[G].value,ne=LN(E.state,E.props.data,G),oe=F[G]?{x:P==="horizontal"?F[G].coordinate:I,y:P==="horizontal"?B:F[G].coordinate}:Iq;E.setState(ye(ye({},k),{},{activeLabel:Y,activeCoordinate:oe,activePayload:ne,activeTooltipIndex:G}))}else E.setState(k)}),Fe(E,"renderCursor",function(k){var T,P=E.state,$=P.isTooltipActive,z=P.activeCoordinate,D=P.activePayload,U=P.offset,V=P.activeTooltipIndex,H=P.tooltipAxisBandSize,G=E.getTooltipEventType(),L=(T=k.props.active)!==null&&T!==void 0?T:$,R=E.props.layout,F=k.key||"_recharts-cursor";return W.createElement(epe,{key:F,activeCoordinate:z,activePayload:D,activeTooltipIndex:V,chartName:n,element:k,isActive:L,layout:R,offset:U,tooltipAxisBandSize:H,tooltipEventType:G})}),Fe(E,"renderPolarAxis",function(k,T,P){var $=ea(k,"type.axisType"),z=ea(E.state,"".concat($,"Map")),D=k.type.defaultProps,U=D!==void 0?ye(ye({},D),k.props):k.props,V=z&&z[U["".concat($,"Id")]];return y.cloneElement(k,ye(ye({},V),{},{className:Ye($,V.className),key:k.key||"".concat(T,"-").concat(P),ticks:Gi(V,!0)}))}),Fe(E,"renderPolarGrid",function(k){var T=k.props,P=T.radialLines,$=T.polarAngles,z=T.polarRadius,D=E.state,U=D.radiusAxisMap,V=D.angleAxisMap,H=qo(U),G=qo(V),L=G.cx,R=G.cy,F=G.innerRadius,K=G.outerRadius;return y.cloneElement(k,{polarAngles:Array.isArray($)?$:Gi(G,!0).map(function(te){return te.coordinate}),polarRadius:Array.isArray(z)?z:Gi(H,!0).map(function(te){return te.coordinate}),cx:L,cy:R,innerRadius:F,outerRadius:K,key:k.key||"polar-grid",radialLines:P})}),Fe(E,"renderLegend",function(){var k=E.state.formattedGraphicalItems,T=E.props,P=T.children,$=T.width,z=T.height,D=E.props.margin||{},U=$-(D.left||0)-(D.right||0),V=x6({children:P,formattedGraphicalItems:k,legendWidth:U,legendContent:f});if(!V)return null;var H=V.item,G=k3(V,tpe);return y.cloneElement(H,ye(ye({},G),{},{chartWidth:$,chartHeight:z,margin:D,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),Fe(E,"renderTooltip",function(){var k,T=E.props,P=T.children,$=T.accessibilityLayer,z=Yr(P,ei);if(!z)return null;var D=E.state,U=D.isTooltipActive,V=D.activeCoordinate,H=D.activePayload,G=D.activeLabel,L=D.offset,R=(k=z.props.active)!==null&&k!==void 0?k:U;return y.cloneElement(z,{viewBox:ye(ye({},L),{},{x:L.left,y:L.top}),active:R,label:G,payload:R?H:[],coordinate:V,accessibilityLayer:$})}),Fe(E,"renderBrush",function(k){var T=E.props,P=T.margin,$=T.data,z=E.state,D=z.offset,U=z.dataStartIndex,V=z.dataEndIndex,H=z.updateId;return y.cloneElement(k,{key:k.key||"_recharts-brush",onChange:Mp(E.handleBrushChange,k.props.onChange),data:$,x:Oe(k.props.x)?k.props.x:D.left,y:Oe(k.props.y)?k.props.y:D.top+D.height+D.brushBottom-(P.bottom||0),width:Oe(k.props.width)?k.props.width:D.width,startIndex:U,endIndex:V,updateId:"brush-".concat(H)})}),Fe(E,"renderReferenceElement",function(k,T,P){if(!k)return null;var $=E,z=$.clipPathId,D=E.state,U=D.xAxisMap,V=D.yAxisMap,H=D.offset,G=k.type.defaultProps||{},L=k.props,R=L.xAxisId,F=R===void 0?G.xAxisId:R,K=L.yAxisId,te=K===void 0?G.yAxisId:K;return y.cloneElement(k,{key:k.key||"".concat(T,"-").concat(P),xAxis:U[F],yAxis:V[te],viewBox:{x:H.left,y:H.top,width:H.width,height:H.height},clipPathId:z})}),Fe(E,"renderActivePoints",function(k){var T=k.item,P=k.activePoint,$=k.basePoint,z=k.childIndex,D=k.isRange,U=[],V=T.props.key,H=T.item.type.defaultProps!==void 0?ye(ye({},T.item.type.defaultProps),T.item.props):T.item.props,G=H.activeDot,L=H.dataKey,R=ye(ye({index:z,dataKey:L,cx:P.x,cy:P.y,r:4,fill:kC(T.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},Be(G,!1)),wv(G));return U.push(N.renderActiveDot(G,R,"".concat(V,"-activePoint-").concat(z))),$?U.push(N.renderActiveDot(G,ye(ye({},R),{},{cx:$.x,cy:$.y}),"".concat(V,"-basePoint-").concat(z))):D&&U.push(null),U}),Fe(E,"renderGraphicChild",function(k,T,P){var $=E.filterFormatItem(k,T,P);if(!$)return null;var z=E.getTooltipEventType(),D=E.state,U=D.isTooltipActive,V=D.tooltipAxis,H=D.activeTooltipIndex,G=D.activeLabel,L=E.props.children,R=Yr(L,ei),F=$.props,K=F.points,te=F.isRange,I=F.baseLine,B=$.item.type.defaultProps!==void 0?ye(ye({},$.item.type.defaultProps),$.item.props):$.item.props,Y=B.activeDot,ne=B.hide,oe=B.activeBar,xe=B.activeShape,ee=!!(!ne&&U&&R&&(Y||oe||xe)),ae={};z!=="axis"&&R&&R.props.trigger==="click"?ae={onClick:Mp(E.handleItemMouseEnter,k.props.onClick)}:z!=="axis"&&(ae={onMouseLeave:Mp(E.handleItemMouseLeave,k.props.onMouseLeave),onMouseEnter:Mp(E.handleItemMouseEnter,k.props.onMouseEnter)});var Z=y.cloneElement(k,ye(ye({},$.props),ae));function pe(vr){return typeof V.dataKey=="function"?V.dataKey(vr.payload):null}if(ee)if(H>=0){var je,le;if(V.dataKey&&!V.allowDuplicatedCategory){var Re=typeof V.dataKey=="function"?pe:"payload.".concat(V.dataKey.toString());je=bv(K,Re,G),le=te&&I&&bv(I,Re,G)}else je=K?.[H],le=te&&I&&I[H];if(xe||oe){var _e=k.props.activeIndex!==void 0?k.props.activeIndex:H;return[y.cloneElement(k,ye(ye(ye({},$.props),ae),{},{activeIndex:_e})),null,null]}if(!Ge(je))return[Z].concat(Nu(E.renderActivePoints({item:$,activePoint:je,basePoint:le,childIndex:H,isRange:te})))}else{var me,ve=(me=E.getItemByXY(E.state.activeCoordinate))!==null&&me!==void 0?me:{graphicalItem:Z},Le=ve.graphicalItem,Dt=Le.item,Nn=Dt===void 0?k:Dt,pr=Le.childIndex,nr=ye(ye(ye({},$.props),ae),{},{activeIndex:pr});return[y.cloneElement(Nn,nr),null,null]}return te?[Z,null,null]:[Z,null]}),Fe(E,"renderCustomized",function(k,T,P){return y.cloneElement(k,ye(ye({key:"recharts-customized-".concat(P)},E.props),E.state))}),Fe(E,"renderMap",{CartesianGrid:{handler:Lp,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Lp},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Lp},YAxis:{handler:Lp},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((C=O.id)!==null&&C!==void 0?C:Bu("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=yz(E.triggeredAfterMouseMove,(A=O.throttleDelay)!==null&&A!==void 0?A:1e3/60),E.state={},E}return hpe(N,w),cpe(N,[{key:"componentDidMount",value:function(){var C,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var C=this.props,A=C.children,E=C.data,k=C.height,T=C.layout,P=Yr(A,ei);if(P){var $=P.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,D=LN(this.state,E,$,z),U=this.state.tooltipTicks[$].coordinate,V=(this.state.offset.top+k)/2,H=T==="horizontal",G=H?{x:U,y:V}:{y:U,x:V},L=this.state.formattedGraphicalItems.find(function(F){var K=F.item;return K.type.name==="Scatter"});L&&(G=ye(ye({},G),L.props.points[$].tooltipPosition),D=L.props.points[$].tooltipPayload);var R={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:z,activePayload:D,activeCoordinate:G};this.setState(R),this.renderCursor(P),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(C,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var E,k;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0}})}return null}},{key:"componentDidUpdate",value:function(C){b_([Yr(C.children,ei)],[Yr(this.props.children,ei)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=Yr(this.props.children,ei);if(C&&typeof C.props.shared=="boolean"){var A=C.props.shared?"axis":"item";return u.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var A=this.container,E=A.getBoundingClientRect(),k=Bne(E),T={chartX:Math.round(C.pageX-k.left),chartY:Math.round(C.pageY-k.top)},P=E.width/A.offsetWidth||1,$=this.inRange(T.chartX,T.chartY,P);if(!$)return null;var z=this.state,D=z.xAxisMap,U=z.yAxisMap,V=this.getTooltipEventType(),H=M3(this.state,this.props.data,this.props.layout,$);if(V!=="axis"&&D&&U){var G=qo(D).scale,L=qo(U).scale,R=G&&G.invert?G.invert(T.chartX):null,F=L&&L.invert?L.invert(T.chartY):null;return ye(ye({},T),{},{xValue:R,yValue:F},H)}return H?ye(ye({},T),H):null}},{key:"inRange",value:function(C,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,k=this.props.layout,T=C/E,P=A/E;if(k==="horizontal"||k==="vertical"){var $=this.state.offset,z=T>=$.left&&T<=$.left+$.width&&P>=$.top&&P<=$.top+$.height;return z?{x:T,y:P}:null}var D=this.state,U=D.angleAxisMap,V=D.radiusAxisMap;if(U&&V){var H=qo(U);return D$({x:T,y:P},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,A=this.getTooltipEventType(),E=Yr(C,ei),k={};E&&A==="axis"&&(E.props.trigger==="click"?k={onClick:this.handleClick}:k={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 T=wv(this.props,this.handleOuterEvent);return ye(ye({},T),k)}},{key:"addListener",value:function(){LS.on(BS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){LS.removeListener(BS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,A,E){for(var k=this.state.formattedGraphicalItems,T=0,P=k.length;T<P;T++){var $=k[T];if($.item===C||$.props.key===C.key||A===Zi($.item.type)&&E===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var C=this.clipPathId,A=this.state.offset,E=A.left,k=A.top,T=A.height,P=A.width;return W.createElement("defs",null,W.createElement("clipPath",{id:C},W.createElement("rect",{x:E,y:k,height:T,width:P})))}},{key:"getXScales",value:function(){var C=this.state.xAxisMap;return C?Object.entries(C).reduce(function(A,E){var k=T3(E,2),T=k[0],P=k[1];return ye(ye({},A),{},Fe({},T,P.scale))},{}):null}},{key:"getYScales",value:function(){var C=this.state.yAxisMap;return C?Object.entries(C).reduce(function(A,E){var k=T3(E,2),T=k[0],P=k[1];return ye(ye({},A),{},Fe({},T,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(C){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[C])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(C){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[C])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(C){var A=this.state,E=A.formattedGraphicalItems,k=A.activeItem;if(E&&E.length)for(var T=0,P=E.length;T<P;T++){var $=E[T],z=$.props,D=$.item,U=D.type.defaultProps!==void 0?ye(ye({},D.type.defaultProps),D.props):D.props,V=Zi(D.type);if(V==="Bar"){var H=(z.data||[]).find(function(F){return nue(C,F)});if(H)return{graphicalItem:$,payload:H}}else if(V==="RadialBar"){var G=(z.data||[]).find(function(F){return D$(C,F)});if(G)return{graphicalItem:$,payload:G}}else if(by($,k)||wy($,k)||th($,k)){var L=Nde({graphicalItem:$,activeTooltipItem:k,itemData:U.data}),R=U.activeIndex===void 0?L:U.activeIndex;return{graphicalItem:ye(ye({},$),{},{childIndex:R}),payload:th($,k)?U.data[L]:$.props.data[L]}}}return null}},{key:"render",value:function(){var C=this;if(!VM(this))return null;var A=this.props,E=A.children,k=A.className,T=A.width,P=A.height,$=A.style,z=A.compact,D=A.title,U=A.desc,V=k3(A,npe),H=Be(V,!1);if(z)return W.createElement(d3,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement(j_,Bc({},H,{width:T,height:P,title:D,desc:U}),this.renderClipPath(),YM(E,this.renderMap)));if(this.props.accessibilityLayer){var G,L;H.tabIndex=(G=this.props.tabIndex)!==null&&G!==void 0?G:0,H.role=(L=this.props.role)!==null&&L!==void 0?L:"application",H.onKeyDown=function(F){C.accessibilityManager.keyboardEvent(F)},H.onFocus=function(){C.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return W.createElement(d3,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement("div",Bc({className:Ye("recharts-wrapper",k),style:ye({position:"relative",cursor:"default",width:T,height:P},$)},R,{ref:function(K){C.container=K}}),W.createElement(j_,Bc({},H,{width:T,height:P,title:D,desc:U,style:xpe}),this.renderClipPath(),YM(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(y.Component);Fe(j,"displayName",n),Fe(j,"defaultProps",ye({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),Fe(j,"getDerivedStateFromProps",function(w,N){var O=w.dataKey,C=w.data,A=w.children,E=w.width,k=w.height,T=w.layout,P=w.stackOffset,$=w.margin,z=N.dataStartIndex,D=N.dataEndIndex;if(N.updateId===void 0){var U=R3(w);return ye(ye(ye({},U),{},{updateId:0},x(ye(ye({props:w},U),{},{updateId:0}),N)),{},{prevDataKey:O,prevData:C,prevWidth:E,prevHeight:k,prevLayout:T,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(O!==N.prevDataKey||C!==N.prevData||E!==N.prevWidth||k!==N.prevHeight||T!==N.prevLayout||P!==N.prevStackOffset||!zc($,N.prevMargin)){var V=R3(w),H={chartX:N.chartX,chartY:N.chartY,isTooltipActive:N.isTooltipActive},G=ye(ye({},M3(N,C,T)),{},{updateId:N.updateId+1}),L=ye(ye(ye({},V),H),G);return ye(ye(ye({},L),x(ye({props:w},L),N)),{},{prevDataKey:O,prevData:C,prevWidth:E,prevHeight:k,prevLayout:T,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(!b_(A,N.prevChildren)){var R,F,K,te,I=Yr(A,pu),B=I&&(R=(F=I.props)===null||F===void 0?void 0:F.startIndex)!==null&&R!==void 0?R:z,Y=I&&(K=(te=I.props)===null||te===void 0?void 0:te.endIndex)!==null&&K!==void 0?K:D,ne=B!==z||Y!==D,oe=!Ge(C),xe=oe&&!ne?N.updateId:N.updateId+1;return ye(ye({updateId:xe},x(ye(ye({props:w},N),{},{updateId:xe,dataStartIndex:B,dataEndIndex:Y}),N)),{},{prevChildren:A,dataStartIndex:B,dataEndIndex:Y})}return null}),Fe(j,"renderActiveDot",function(w,N,O){var C;return y.isValidElement(w)?C=y.cloneElement(w,N):We(w)?C=w(N):C=W.createElement(py,N),W.createElement(pt,{className:"recharts-active-dot",key:O},C)});var b=y.forwardRef(function(N,O){return W.createElement(j,Bc({},N,{ref:O}))});return b.displayName=j.displayName,b},Ape=FC({chartName:"LineChart",GraphicalChild:Dh,axisComponents:[{axisType:"xAxis",AxisComp:Ho},{axisType:"yAxis",AxisComp:Hi}],formatAxisMap:aq}),qS=FC({chartName:"BarChart",GraphicalChild:oi,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ho},{axisType:"yAxis",AxisComp:Hi}],formatAxisMap:aq}),Tpe=FC({chartName:"PieChart",GraphicalChild:uo,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:xy},{axisType:"radiusAxis",AxisComp:gy}],formatAxisMap:vse,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const kpe={light:"",dark:".dark"},Bq=y.createContext(null);function zq(){const e=y.useContext(Bq);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Ac=y.forwardRef(({id:e,className:t,children:n,config:r,...a},i)=>{const l=y.useId(),u=`chart-${e||l.replace(/:/g,"")}`;return o.jsx(Bq.Provider,{value:{config:r},children:o.jsxs("div",{"data-chart":u,ref:i,className:ue("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...a,children:[o.jsx(Ppe,{id:u,config:r}),o.jsx(Pne,{children:n})]})})});Ac.displayName="Chart";const Ppe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?o.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(kpe).map(([r,a])=>`
|
||
${a} [data-chart=${e}] {
|
||
${n.map(([i,l])=>{const u=l.theme?.[r]||l.color;return u?` --color-${i}: ${u};`:null}).join(`
|
||
`)}
|
||
}
|
||
`).join(`
|
||
`)}}):null},rf=ei,Tc=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:i=!1,label:l,labelFormatter:u,labelClassName:d,formatter:f,color:m,nameKey:p,labelKey:g},x)=>{const{config:j}=zq(),b=y.useMemo(()=>{if(a||!t?.length)return null;const[N]=t,O=`${g||N?.dataKey||N?.name||"value"}`,C=BN(j,N,O),A=!g&&typeof l=="string"?j[l]?.label||l:C?.label;return u?o.jsx("div",{className:ue("font-medium",d),children:u(A,t)}):A?o.jsx("div",{className:ue("font-medium",d),children:A}):null},[l,u,t,a,d,j,g]);if(!e||!t?.length)return null;const w=t.length===1&&r!=="dot";return o.jsxs("div",{ref:x,className:ue("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:b,o.jsx("div",{className:"grid gap-1.5",children:t.filter(N=>N.type!=="none").map((N,O)=>{const C=`${p||N.name||N.dataKey||"value"}`,A=BN(j,N,C),E=m||N.payload.fill||N.color;return o.jsx("div",{className:ue("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:f&&N?.value!==void 0&&N.name?f(N.value,N.name,N,O,N.payload):o.jsxs(o.Fragment,{children:[A?.icon?o.jsx(A.icon,{}):!i&&o.jsx("div",{className:ue("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":E,"--color-border":E}}),o.jsxs("div",{className:ue("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[o.jsxs("div",{className:"grid gap-1.5",children:[w?b:null,o.jsx("span",{className:"text-muted-foreground",children:A?.label||N.name})]}),N.value&&o.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:N.value.toLocaleString()})]})]})},N.dataKey)})})]})});Tc.displayName="ChartTooltip";const Mpe=Qs,qq=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},i)=>{const{config:l}=zq();return n?.length?o.jsx("div",{ref:i,className:ue("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.filter(u=>u.type!=="none").map(u=>{const d=`${a||u.dataKey||"value"}`,f=BN(l,u,d);return o.jsxs("div",{className:ue("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[f?.icon&&!t?o.jsx(f.icon,{}):o.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:u.color}}),f?.label]},u.value)})}):null});qq.displayName="ChartLegend";function BN(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let a=n;return n in t&&typeof t[n]=="string"?a=t[n]:r&&n in r&&typeof r[n]=="string"&&(a=r[n]),a in e?e[a]:e[n]}const Rpe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dpe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),$3=e=>{const t=Dpe(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fq=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),$pe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ipe={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"};const Lpe=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...u},d)=>y.createElement("svg",{ref:d,...Ipe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Fq("lucide",a),...!i&&!$pe(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,m])=>y.createElement(f,m)),...Array.isArray(i)?i:[i]]));const Ce=(e,t)=>{const n=y.forwardRef(({className:r,...a},i)=>y.createElement(Lpe,{ref:i,iconNode:t,className:Fq(`lucide-${Rpe($3(e))}`,`lucide-${e}`,r),...a}));return n.displayName=$3(e),n};const Bpe=[["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"}]],zpe=Ce("activity",Bpe);const qpe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Uq=Ce("arrow-left",qpe);const Fpe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Upe=Ce("arrow-right",Fpe);const Hpe=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wpe=Ce("ban",Hpe);const Vpe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Gpe=Ce("book-open",Vpe);const Ype=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Kpe=Ce("bot",Ype);const Xpe=[["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"}]],Hq=Ce("boxes",Xpe);const Zpe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],I3=Ce("calendar",Zpe);const Qpe=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Jpe=Ce("chart-column",Qpe);const eve=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tl=Ce("check",eve);const tve=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],lh=Ce("chevron-down",tve);const nve=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],UC=Ce("chevron-left",nve);const rve=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],HC=Ce("chevron-right",rve);const ave=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],zN=Ce("chevron-up",ave);const ive=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],ove=Ce("chevrons-up-down",ive);const sve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],yg=Ce("circle-alert",sve);const lve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ou=Ce("circle-check",lve);const cve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],uve=Ce("circle-question-mark",cve);const dve=[["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"}]],Wq=Ce("circle-user",dve);const fve=[["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"}]],Vq=Ce("circle-x",fve);const hve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mve=Ce("circle",hve);const pve=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nl=Ce("clock",pve);const vve=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],qN=Ce("copy",vve);const gve=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],yve=Ce("database",gve);const xve=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],bve=Ce("dollar-sign",xve);const wve=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],FN=Ce("download",wve);const jve=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],nv=Ce("external-link",jve);const Sve=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],UN=Ce("eye-off",Sve);const _ve=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ro=Ce("eye",_ve);const Nve=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],xg=Ce("file-search",Nve);const Ove=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],WC=Ce("file-text",Ove);const Cve=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],HN=Ce("funnel",Cve);const Eve=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],bg=Ce("hash",Eve);const Ave=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],wg=Ce("house",Ave);const Tve=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],kve=Ce("image",Tve);const Pve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Gq=Ce("info",Pve);const Mve=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Rve=Ce("key",Mve);const Dve=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],WN=Ce("loader-circle",Dve);const $ve=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],L3=Ce("lock",$ve);const Ive=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],B3=Ce("log-out",Ive);const Lve=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Bve=Ce("menu",Lve);const zve=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],$h=Ce("message-square",zve);const qve=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],VN=Ce("moon",qve);const Fve=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Yq=Ce("package",Fve);const Uve=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Kq=Ce("palette",Uve);const Hve=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Wve=Ce("pause",Hve);const Vve=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Cu=Ce("pencil",Vve);const Gve=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Yve=Ce("play",Gve);const Kve=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],er=Ce("plus",Kve);const Xve=[["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"}]],rl=Ce("refresh-cw",Xve);const Zve=[["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"}]],Qve=Ce("rotate-ccw",Zve);const Jve=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ege=Ce("rotate-cw",Jve);const tge=[["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"}]],VC=Ce("save",tge);const nge=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Rr=Ce("search",nge);const rge=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Xq=Ce("server",rge);const age=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ige=Ce("settings-2",age);const oge=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Uc=Ce("settings",oge);const sge=[["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"}]],lge=Ce("shield",sge);const cge=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],uge=Ce("skip-forward",cge);const dge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],GC=Ce("smile",dge);const fge=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],hge=Ce("sparkles",fge);const mge=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],YC=Ce("square-pen",mge);const pge=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],z3=Ce("star",pge);const vge=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],GN=Ce("sun",vge);const gge=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],yge=Ce("terminal",gge);const xge=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ut=Ce("trash-2",xge);const bge=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],wge=Ce("trending-up",bge);const jge=[["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"}]],Hc=Ce("triangle-alert",jge);const Sge=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Zq=Ce("user",Sge);const _ge=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Nge=Ce("users",_ge);const Oge=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ih=Ce("x",Oge);const Cge=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ch=Ce("zap",Cge);var Ege=Symbol.for("react.lazy"),jg=gO[" use ".trim().toString()];function Age(e){return typeof e=="object"&&e!==null&&"then"in e}function Qq(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ege&&"_payload"in e&&Age(e._payload)}function Lh(e){const t=kge(e),n=y.forwardRef((r,a)=>{let{children:i,...l}=r;Qq(i)&&typeof jg=="function"&&(i=jg(i._payload));const u=y.Children.toArray(i),d=u.find(Mge);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return o.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return o.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var Tge=Lh("Slot");function kge(e){const t=y.forwardRef((n,r)=>{let{children:a,...i}=n;if(Qq(a)&&typeof jg=="function"&&(a=jg(a._payload)),y.isValidElement(a)){const l=Dge(a),u=Rge(i,a.props);return a.type!==y.Fragment&&(u.ref=r?Mr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pge=Symbol("radix.slottable");function Mge(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pge}function Rge(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function Dge(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const q3=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,F3=Ye,Bh=(e,t)=>n=>{var r;if(t?.variants==null)return F3(e,n?.class,n?.className);const{variants:a,defaultVariants:i}=t,l=Object.keys(a).map(f=>{const m=n?.[f],p=i?.[f];if(m===null)return null;const g=q3(m)||q3(p);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...x}=m;return Object.entries(x).every(j=>{let[b,w]=j;return Array.isArray(w)?w.includes({...i,...u}[b]):{...i,...u}[b]===w})?[...f,p,g]:f},[]);return F3(e,l,d,n?.class,n?.className)},uh=Bh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),fe=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},i)=>{const l=r?Tge:"button";return o.jsx(l,{className:ue(uh({variant:t,size:n,className:e})),ref:i,...a})});fe.displayName="Button";function $ge(){const[e,t]=y.useState(null),[n,r]=y.useState(!0),[a,i]=y.useState(24),[l,u]=y.useState(!0),d=y.useCallback(async()=>{try{const O=localStorage.getItem("token"),C=await cn.get(`/api/webui/statistics/dashboard?hours=${a}`,{headers:{Authorization:`Bearer ${O}`}});t(C.data),r(!1)}catch(O){console.error("Failed to fetch dashboard data:",O),r(!1)}},[a]);if(y.useEffect(()=>{d()},[d]),y.useEffect(()=>{if(!l)return;const O=setInterval(()=>{d()},3e4);return()=>clearInterval(O)},[l,d]),n||!e)return o.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-200px)]",children:o.jsxs("div",{className:"text-center space-y-4",children:[o.jsx(rl,{className:"h-12 w-12 animate-spin mx-auto text-muted-foreground"}),o.jsx("p",{className:"text-muted-foreground",children:"加载统计数据中..."})]})});const{summary:f,model_stats:m,hourly_data:p,daily_data:g,recent_activity:x}=e,j=O=>{const C=Math.floor(O/3600),A=Math.floor(O%3600/60);return`${C}小时${A}分钟`},b=O=>new Date(O).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),w=m.slice(0,6).map(O=>({name:O.model_name,value:O.request_count,fill:`hsl(var(--chart-${m.indexOf(O)%5+1}))`})),N={requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"},tokens:{label:"Tokens",color:"hsl(var(--chart-3))"}};return o.jsx(Xt,{className:"h-full",children:o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"实时监控面板"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"麦麦运行状态和统计数据一览"})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(ol,{value:a.toString(),onValueChange:O=>i(Number(O)),children:o.jsxs(Xo,{className:"grid grid-cols-3 w-full sm:w-auto",children:[o.jsx(Ct,{value:"24",children:"24小时"}),o.jsx(Ct,{value:"168",children:"7天"}),o.jsx(Ct,{value:"720",children:"30天"})]})}),o.jsxs(fe,{variant:l?"default":"outline",size:"sm",onClick:()=>u(!l),className:"gap-2",children:[o.jsx(rl,{className:`h-4 w-4 ${l?"animate-spin":""}`}),o.jsx("span",{className:"hidden sm:inline",children:"自动刷新"})]}),o.jsx(fe,{variant:"outline",size:"sm",onClick:d,children:o.jsx(rl,{className:"h-4 w-4"})})]})]}),o.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-4",children:[o.jsxs(dt,{children:[o.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Gt,{className:"text-sm font-medium",children:"总请求数"}),o.jsx(zpe,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ln,{children:[o.jsx("div",{className:"text-2xl font-bold",children:f.total_requests.toLocaleString()}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["最近",a<48?a+"小时":Math.floor(a/24)+"天"]})]})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Gt,{className:"text-sm font-medium",children:"总花费"}),o.jsx(bve,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ln,{children:[o.jsxs("div",{className:"text-2xl font-bold",children:["¥",f.total_cost.toFixed(2)]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.cost_per_hour>0?`¥${f.cost_per_hour.toFixed(2)}/小时`:"暂无数据"})]})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Gt,{className:"text-sm font-medium",children:"Token消耗"}),o.jsx(yve,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ln,{children:[o.jsxs("div",{className:"text-2xl font-bold",children:[(f.total_tokens/1e3).toFixed(1),"K"]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.tokens_per_hour>0?`${(f.tokens_per_hour/1e3).toFixed(1)}K/小时`:"暂无数据"})]})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Gt,{className:"text-sm font-medium",children:"平均响应"}),o.jsx(ch,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ln,{children:[o.jsxs("div",{className:"text-2xl font-bold",children:[f.avg_response_time.toFixed(2),"s"]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"API平均耗时"})]})]})]}),o.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-3",children:[o.jsxs(dt,{children:[o.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Gt,{className:"text-sm font-medium",children:"在线时长"}),o.jsx(nl,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsx(ln,{children:o.jsx("div",{className:"text-xl font-bold",children:j(f.online_time)})})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Gt,{className:"text-sm font-medium",children:"消息处理"}),o.jsx($h,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ln,{children:[o.jsx("div",{className:"text-xl font-bold",children:f.total_messages.toLocaleString()}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["回复 ",f.total_replies.toLocaleString()," 条"]})]})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(Gt,{className:"text-sm font-medium",children:"成本效率"}),o.jsx(wge,{className:"h-4 w-4 text-muted-foreground"})]}),o.jsxs(ln,{children:[o.jsx("div",{className:"text-xl font-bold",children:f.total_messages>0?`¥${(f.total_cost/f.total_messages*100).toFixed(2)}`:"¥0.00"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"每100条消息"})]})]})]}),o.jsxs(ol,{defaultValue:"trends",className:"space-y-4",children:[o.jsxs(Xo,{className:"grid w-full grid-cols-2 sm:grid-cols-4",children:[o.jsx(Ct,{value:"trends",children:"趋势"}),o.jsx(Ct,{value:"models",children:"模型"}),o.jsx(Ct,{value:"activity",children:"活动"}),o.jsx(Ct,{value:"daily",children:"日统计"})]}),o.jsxs(Qt,{value:"trends",className:"space-y-4",children:[o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"请求趋势"}),o.jsxs(Jn,{children:["最近",a,"小时的请求量变化"]})]}),o.jsx(ln,{children:o.jsx(Ac,{config:N,className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:o.jsxs(Ape,{data:p,children:[o.jsx(uf,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),o.jsx(Ho,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(Hi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(rf,{content:o.jsx(Tc,{labelFormatter:O=>b(O)})}),o.jsx(Dh,{type:"monotone",dataKey:"requests",stroke:"var(--color-requests)",strokeWidth:2})]})})})]}),o.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"花费趋势"}),o.jsx(Jn,{children:"API调用成本变化"})]}),o.jsx(ln,{children:o.jsx(Ac,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:o.jsxs(qS,{data:p,children:[o.jsx(uf,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),o.jsx(Ho,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(Hi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(rf,{content:o.jsx(Tc,{labelFormatter:O=>b(O)})}),o.jsx(oi,{dataKey:"cost",fill:"var(--color-cost)"})]})})})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"Token消耗"}),o.jsx(Jn,{children:"Token使用量变化"})]}),o.jsx(ln,{children:o.jsx(Ac,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:o.jsxs(qS,{data:p,children:[o.jsx(uf,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),o.jsx(Ho,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(Hi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(rf,{content:o.jsx(Tc,{labelFormatter:O=>b(O)})}),o.jsx(oi,{dataKey:"tokens",fill:"var(--color-tokens)"})]})})})]})]})]}),o.jsx(Qt,{value:"models",className:"space-y-4",children:o.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"模型请求分布"}),o.jsx(Jn,{children:"各模型使用占比"})]}),o.jsx(ln,{children:o.jsx(Ac,{config:Object.fromEntries(m.slice(0,6).map((O,C)=>[O.model_name,{label:O.model_name,color:`hsl(var(--chart-${C%5+1}))`}])),className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:o.jsxs(Tpe,{children:[o.jsx(rf,{content:o.jsx(Tc,{})}),o.jsx(uo,{data:w,cx:"50%",cy:"50%",labelLine:!1,label:({name:O,percent:C})=>`${O} ${C?(C*100).toFixed(0):0}%`,outerRadius:100,dataKey:"value",children:w.map((O,C)=>o.jsx(ry,{fill:O.fill},`cell-${C}`))})]})})})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"模型详细统计"}),o.jsx(Jn,{children:"请求数、花费和性能"})]}),o.jsx(ln,{children:o.jsx(Xt,{className:"h-[300px] sm:h-[400px]",children:o.jsx("div",{className:"space-y-3",children:m.map((O,C)=>o.jsxs("div",{className:"p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("h4",{className:"font-semibold text-sm truncate flex-1 min-w-0",children:O.model_name}),o.jsx("div",{className:"w-3 h-3 rounded-full ml-2 flex-shrink-0",style:{backgroundColor:`hsl(var(--chart-${C%5+1}))`}})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"请求数:"}),o.jsx("span",{className:"ml-1 font-medium",children:O.request_count.toLocaleString()})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"花费:"}),o.jsxs("span",{className:"ml-1 font-medium",children:["¥",O.total_cost.toFixed(2)]})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),o.jsxs("span",{className:"ml-1 font-medium",children:[(O.total_tokens/1e3).toFixed(1),"K"]})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"平均耗时:"}),o.jsxs("span",{className:"ml-1 font-medium",children:[O.avg_response_time.toFixed(2),"s"]})]})]})]},C))})})})]})]})}),o.jsx(Qt,{value:"activity",children:o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"最近活动"}),o.jsx(Jn,{children:"最新的API调用记录"})]}),o.jsx(ln,{children:o.jsx(Xt,{className:"h-[400px] sm:h-[500px]",children:o.jsx("div",{className:"space-y-2",children:x.map((O,C)=>o.jsxs("div",{className:"p-3 sm:p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-sm truncate",children:O.model}),o.jsx("div",{className:"text-xs text-muted-foreground",children:O.request_type})]}),o.jsx("div",{className:"text-xs text-muted-foreground flex-shrink-0",children:b(O.timestamp)})]}),o.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),o.jsx("span",{className:"ml-1",children:O.tokens})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"花费:"}),o.jsxs("span",{className:"ml-1",children:["¥",O.cost.toFixed(4)]})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"耗时:"}),o.jsxs("span",{className:"ml-1",children:[O.time_cost.toFixed(2),"s"]})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground",children:"状态:"}),o.jsx("span",{className:`ml-1 ${O.status==="success"?"text-green-600":"text-red-600"}`,children:O.status})]})]})]},C))})})})]})}),o.jsx(Qt,{value:"daily",children:o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"每日统计"}),o.jsx(Jn,{children:"最近7天的数据汇总"})]}),o.jsx(ln,{children:o.jsx(Ac,{config:{requests:{label:"请求数",color:"hsl(var(--chart-1))"},cost:{label:"花费(¥)",color:"hsl(var(--chart-2))"}},className:"h-[400px] sm:h-[500px] w-full aspect-auto",children:o.jsxs(qS,{data:g,children:[o.jsx(uf,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),o.jsx(Ho,{dataKey:"timestamp",tickFormatter:O=>{const C=new Date(O);return`${C.getMonth()+1}/${C.getDate()}`},stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(Hi,{yAxisId:"left",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(Hi,{yAxisId:"right",orientation:"right",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),o.jsx(rf,{content:o.jsx(Tc,{labelFormatter:O=>new Date(O).toLocaleDateString("zh-CN")})}),o.jsx(Mpe,{content:o.jsx(qq,{})}),o.jsx(oi,{yAxisId:"left",dataKey:"requests",fill:"var(--color-requests)"}),o.jsx(oi,{yAxisId:"right",dataKey:"cost",fill:"var(--color-cost)"})]})})})]})})]})]})})}const Ige={theme:"system",setTheme:()=>null},Jq=y.createContext(Ige),KC=()=>{const e=y.useContext(Jq);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Lge=(e,t,n)=>{const r=document.documentElement.classList.contains("no-animations");if(!document.startViewTransition||r){t(e);return}const a=n.clientX,i=n.clientY,l=Math.hypot(Math.max(a,innerWidth-a),Math.max(i,innerHeight-i));document.startViewTransition(()=>{t(e)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${a}px ${i}px)`,`circle(${l}px at ${a}px ${i}px)`]},{duration:500,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})},eF=y.createContext(void 0),tF=()=>{const e=y.useContext(eF);if(e===void 0)throw new Error("useAnimation must be used within an AnimationProvider");return e};function Ey(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ay(e){const[t,n]=y.useState(void 0);return Fn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let l,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ty="Switch",[Bge]=fr(Ty),[zge,qge]=Bge(Ty),nF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:i,required:l,disabled:u,value:d="on",onCheckedChange:f,form:m,...p}=e,[g,x]=y.useState(null),j=qe(t,C=>x(C)),b=y.useRef(!1),w=g?m||!!g.closest("form"):!0,[N,O]=_a({prop:a,defaultProp:i??!1,onChange:f,caller:Ty});return o.jsxs(zge,{scope:n,checked:N,disabled:u,children:[o.jsx(Me.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":oF(N),"data-disabled":u?"":void 0,disabled:u,value:d,...p,ref:j,onClick:Se(e.onClick,C=>{O(A=>!A),w&&(b.current=C.isPropagationStopped(),b.current||C.stopPropagation())})}),w&&o.jsx(iF,{control:g,bubbles:!b.current,name:r,value:d,checked:N,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});nF.displayName=Ty;var rF="SwitchThumb",aF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=qge(rF,n);return o.jsx(Me.span,{"data-state":oF(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});aF.displayName=rF;var Fge="SwitchBubbleInput",iF=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},i)=>{const l=y.useRef(null),u=qe(l,i),d=Ey(n),f=Ay(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const p=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==n&&x){const j=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(j)}},[d,n,r]),o.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:u,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});iF.displayName=Fge;function oF(e){return e?"checked":"unchecked"}var sF=nF,Uge=aF;const at=y.forwardRef(({className:e,...t},n)=>o.jsx(sF,{className:ue("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:o.jsx(Uge,{className:ue("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));at.displayName=sF.displayName;var Hge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wge=Hge.reduce((e,t)=>{const n=Lh(`Primitive.${t}`),r=y.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Vge="Label",lF=y.forwardRef((e,t)=>o.jsx(Wge.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));lF.displayName=Vge;var cF=lF;const Gge=Bh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=y.forwardRef(({className:e,...t},n)=>o.jsx(cF,{ref:n,className:ue(Gge(),e),...t}));J.displayName=cF.displayName;const Ne=y.forwardRef(({className:e,type:t,...n},r)=>o.jsx("input",{type:t,className:ue("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ne.displayName="Input";const Yge=1,Kge=1e6;let FS=0;function Xge(){return FS=(FS+1)%Number.MAX_SAFE_INTEGER,FS.toString()}const US=new Map,U3=e=>{if(US.has(e))return;const t=setTimeout(()=>{US.delete(e),Nf({type:"REMOVE_TOAST",toastId:e})},Kge);US.set(e,t)},Zge=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Yge)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?U3(n):e.toasts.forEach(r=>{U3(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},rv=[];let av={toasts:[]};function Nf(e){av=Zge(av,e),rv.forEach(t=>{t(av)})}function Qge({...e}){const t=Xge(),n=a=>Nf({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Nf({type:"DISMISS_TOAST",toastId:t});return Nf({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function hr(){const[e,t]=y.useState(av);return y.useEffect(()=>(rv.push(t),()=>{const n=rv.indexOf(t);n>-1&&rv.splice(n,1)}),[e]),{...e,toast:Qge,dismiss:n=>Nf({type:"DISMISS_TOAST",toastId:n})}}const Jge=[{id:"minLength",label:"长度至少 10 位",description:"Token 长度必须大于等于 10 个字符",validate:e=>e.length>=10},{id:"hasUppercase",label:"包含大写字母",description:"至少包含一个大写字母 (A-Z)",validate:e=>/[A-Z]/.test(e)},{id:"hasLowercase",label:"包含小写字母",description:"至少包含一个小写字母 (a-z)",validate:e=>/[a-z]/.test(e)},{id:"hasSpecialChar",label:"包含特殊符号",description:"至少包含一个特殊符号 (!@#$%^&*()_+-=[]{}|;:,.<>?/)",validate:e=>/[!@#$%^&*()_+\-=[\]{}|;:,.<>?/]/.test(e)}];function eye(e){const t=Jge.map(r=>({id:r.id,label:r.label,description:r.description,passed:r.validate(e)}));return{isValid:t.every(r=>r.passed),rules:t}}const XC="0.11.3",ZC="MaiBot Dashboard",tye=`${ZC} v${XC}`,nye=(e="v")=>`${e}${XC}`;function rye(e,t=globalThis?.document){const n=tn(e);y.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var aye="DismissableLayer",YN="dismissableLayer.update",iye="dismissableLayer.pointerDownOutside",oye="dismissableLayer.focusOutside",H3,uF=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sl=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...d}=e,f=y.useContext(uF),[m,p]=y.useState(null),g=m?.ownerDocument??globalThis?.document,[,x]=y.useState({}),j=qe(t,T=>p(T)),b=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),N=b.indexOf(w),O=m?b.indexOf(m):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,A=O>=N,E=lye(T=>{const P=T.target,$=[...f.branches].some(z=>z.contains(P));!A||$||(a?.(T),l?.(T),T.defaultPrevented||u?.())},g),k=cye(T=>{const P=T.target;[...f.branches].some(z=>z.contains(P))||(i?.(T),l?.(T),T.defaultPrevented||u?.())},g);return rye(T=>{O===f.layers.size-1&&(r?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},g),y.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(H3=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),W3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=H3)}},[m,g,n,f]),y.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),W3())},[m,f]),y.useEffect(()=>{const T=()=>x({});return document.addEventListener(YN,T),()=>document.removeEventListener(YN,T)},[]),o.jsx(Me.div,{...d,ref:j,style:{pointerEvents:C?A?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,E.onPointerDownCapture)})});Sl.displayName=aye;var sye="DismissableLayerBranch",dF=y.forwardRef((e,t)=>{const n=y.useContext(uF),r=y.useRef(null),a=qe(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),o.jsx(Me.div,{...e,ref:a})});dF.displayName=sye;function lye(e,t=globalThis?.document){const n=tn(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let d=function(){fF(iye,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cye(e,t=globalThis?.document){const n=tn(e),r=y.useRef(!1);return y.useEffect(()=>{const a=i=>{i.target&&!r.current&&fF(oye,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function W3(){const e=new CustomEvent(YN);document.dispatchEvent(e)}function fF(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?MO(a,i):a.dispatchEvent(i)}var uye=Sl,dye=dF,HS="focusScope.autoFocusOnMount",WS="focusScope.autoFocusOnUnmount",V3={bubbles:!1,cancelable:!0},fye="FocusScope",zh=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...l}=e,[u,d]=y.useState(null),f=tn(a),m=tn(i),p=y.useRef(null),g=qe(t,b=>d(b)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let b=function(C){if(x.paused||!u)return;const A=C.target;u.contains(A)?p.current=A:Bo(p.current,{select:!0})},w=function(C){if(x.paused||!u)return;const A=C.relatedTarget;A!==null&&(u.contains(A)||Bo(p.current,{select:!0}))},N=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&Bo(u)};document.addEventListener("focusin",b),document.addEventListener("focusout",w);const O=new MutationObserver(N);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",w),O.disconnect()}}},[r,u,x.paused]),y.useEffect(()=>{if(u){Y3.add(x);const b=document.activeElement;if(!u.contains(b)){const N=new CustomEvent(HS,V3);u.addEventListener(HS,f),u.dispatchEvent(N),N.defaultPrevented||(hye(yye(hF(u)),{select:!0}),document.activeElement===b&&Bo(u))}return()=>{u.removeEventListener(HS,f),setTimeout(()=>{const N=new CustomEvent(WS,V3);u.addEventListener(WS,m),u.dispatchEvent(N),N.defaultPrevented||Bo(b??document.body,{select:!0}),u.removeEventListener(WS,m),Y3.remove(x)},0)}}},[u,f,m,x]);const j=y.useCallback(b=>{if(!n&&!r||x.paused)return;const w=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,N=document.activeElement;if(w&&N){const O=b.currentTarget,[C,A]=mye(O);C&&A?!b.shiftKey&&N===A?(b.preventDefault(),n&&Bo(C,{select:!0})):b.shiftKey&&N===C&&(b.preventDefault(),n&&Bo(A,{select:!0})):N===O&&b.preventDefault()}},[n,r,x.paused]);return o.jsx(Me.div,{tabIndex:-1,...l,ref:g,onKeyDown:j})});zh.displayName=fye;function hye(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Bo(r,{select:t}),document.activeElement!==n)return}function mye(e){const t=hF(e),n=G3(t,e),r=G3(t.reverse(),e);return[n,r]}function hF(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function G3(e,t){for(const n of e)if(!pye(n,{upTo:t}))return n}function pye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function vye(e){return e instanceof HTMLInputElement&&"select"in e}function Bo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&vye(e)&&t&&e.select()}}var Y3=gye();function gye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=K3(e,t),e.unshift(t)},remove(t){e=K3(e,t),e[0]?.resume()}}}function K3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yye(e){return e.filter(t=>t.tagName!=="A")}var xye="Portal",_l=y.forwardRef((e,t)=>{const{container:n,...r}=e,[a,i]=y.useState(!1);Fn(()=>i(!0),[]);const l=n||a&&globalThis?.document?.body;return l?hY.createPortal(o.jsx(Me.div,{...r,ref:t}),l):null});_l.displayName=xye;var VS=0;function ky(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??X3()),document.body.insertAdjacentElement("beforeend",e[1]??X3()),VS++,()=>{VS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),VS--}},[])}function X3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ti=function(){return ti=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ti.apply(this,arguments)};function mF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function bye(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var iv="right-scroll-bar-position",ov="width-before-scroll-bar",wye="with-scroll-bars-hidden",jye="--removed-body-scroll-bar-size";function GS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sye(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var _ye=typeof window<"u"?y.useLayoutEffect:y.useEffect,Z3=new WeakMap;function Nye(e,t){var n=Sye(null,function(r){return e.forEach(function(a){return GS(a,r)})});return _ye(function(){var r=Z3.get(n);if(r){var a=new Set(r),i=new Set(e),l=n.current;a.forEach(function(u){i.has(u)||GS(u,null)}),i.forEach(function(u){a.has(u)||GS(u,l)})}Z3.set(n,e)},[e]),n}function Oye(e){return e}function Cye(e,t){t===void 0&&(t=Oye);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(i),l=n}var d=function(){var m=l;l=[],m.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return a}function Eye(e){e===void 0&&(e={});var t=Cye(null);return t.options=ti({async:!0,ssr:!1},e),t}var pF=function(e){var t=e.sideCar,n=mF(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,ti({},n))};pF.isSideCarExport=!0;function Aye(e,t){return e.useMedium(t),pF}var vF=Eye(),YS=function(){},Py=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:YS,onWheelCapture:YS,onTouchMoveCapture:YS}),a=r[0],i=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,x=e.noRelative,j=e.noIsolation,b=e.inert,w=e.allowPinchZoom,N=e.as,O=N===void 0?"div":N,C=e.gapMode,A=mF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,k=Nye([n,t]),T=ti(ti({},A),a);return y.createElement(y.Fragment,null,m&&y.createElement(E,{sideCar:vF,removeScrollBar:f,shards:p,noRelative:x,noIsolation:j,inert:b,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:C}),l?y.cloneElement(y.Children.only(u),ti(ti({},T),{ref:k})):y.createElement(O,ti({},T,{className:d,ref:k}),u))});Py.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Py.classNames={fullWidth:ov,zeroRight:iv};var Tye=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kye(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Tye();return t&&e.setAttribute("nonce",t),e}function Pye(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mye(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rye=function(){var e=0,t=null;return{add:function(n){e==0&&(t=kye())&&(Pye(t,n),Mye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Dye=function(){var e=Rye();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gF=function(){var e=Dye(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},$ye={left:0,top:0,right:0,gap:0},KS=function(e){return parseInt(e||"",10)||0},Iye=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[KS(n),KS(r),KS(a)]},Lye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $ye;var t=Iye(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Bye=gF(),Wc="data-scroll-locked",zye=function(e,t,n,r){var a=e.left,i=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
||
.`.concat(wye,` {
|
||
overflow: hidden `).concat(r,`;
|
||
padding-right: `).concat(u,"px ").concat(r,`;
|
||
}
|
||
body[`).concat(Wc,`] {
|
||
overflow: hidden `).concat(r,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
||
padding-left: `.concat(a,`px;
|
||
padding-top: `).concat(i,`px;
|
||
padding-right: `).concat(l,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(u,"px ").concat(r,`;
|
||
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(iv,` {
|
||
right: `).concat(u,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(ov,` {
|
||
margin-right: `).concat(u,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(iv," .").concat(iv,` {
|
||
right: 0 `).concat(r,`;
|
||
}
|
||
|
||
.`).concat(ov," .").concat(ov,` {
|
||
margin-right: 0 `).concat(r,`;
|
||
}
|
||
|
||
body[`).concat(Wc,`] {
|
||
`).concat(jye,": ").concat(u,`px;
|
||
}
|
||
`)},Q3=function(){var e=parseInt(document.body.getAttribute(Wc)||"0",10);return isFinite(e)?e:0},qye=function(){y.useEffect(function(){return document.body.setAttribute(Wc,(Q3()+1).toString()),function(){var e=Q3()-1;e<=0?document.body.removeAttribute(Wc):document.body.setAttribute(Wc,e.toString())}},[])},Fye=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;qye();var i=y.useMemo(function(){return Lye(a)},[a]);return y.createElement(Bye,{styles:zye(i,!t,a,n?"":"!important")})},KN=!1;if(typeof window<"u")try{var Bp=Object.defineProperty({},"passive",{get:function(){return KN=!0,!0}});window.addEventListener("test",Bp,Bp),window.removeEventListener("test",Bp,Bp)}catch{KN=!1}var Sc=KN?{passive:!1}:!1,Uye=function(e){return e.tagName==="TEXTAREA"},yF=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Uye(e)&&n[t]==="visible")},Hye=function(e){return yF(e,"overflowY")},Wye=function(e){return yF(e,"overflowX")},J3=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=xF(e,r);if(a){var i=bF(e,r),l=i[1],u=i[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Vye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Gye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},xF=function(e,t){return e==="v"?Hye(t):Wye(t)},bF=function(e,t){return e==="v"?Vye(t):Gye(t)},Yye=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kye=function(e,t,n,r,a){var i=Yye(e,window.getComputedStyle(t).direction),l=i*r,u=n.target,d=t.contains(u),f=!1,m=l>0,p=0,g=0;do{if(!u)break;var x=bF(e,u),j=x[0],b=x[1],w=x[2],N=b-w-i*j;(j||N)&&xF(e,u)&&(p+=N,g+=j);var O=u.parentNode;u=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(f=!0),f},zp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eL=function(e){return[e.deltaX,e.deltaY]},tL=function(e){return e&&"current"in e?e.current:e},Xye=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zye=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},Qye=0,_c=[];function Jye(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(Qye++)[0],i=y.useState(gF)[0],l=y.useRef(e);y.useEffect(function(){l.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var b=bye([e.lockRef.current],(e.shards||[]).map(tL),!0).filter(Boolean);return b.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),b.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(b,w){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var N=zp(b),O=n.current,C="deltaX"in b?b.deltaX:O[0]-N[0],A="deltaY"in b?b.deltaY:O[1]-N[1],E,k=b.target,T=Math.abs(C)>Math.abs(A)?"h":"v";if("touches"in b&&T==="h"&&k.type==="range")return!1;var P=J3(T,k);if(!P)return!0;if(P?E=T:(E=T==="v"?"h":"v",P=J3(T,k)),!P)return!1;if(!r.current&&"changedTouches"in b&&(C||A)&&(r.current=E),!E)return!0;var $=r.current||E;return Kye($,w,b,$==="h"?C:A)},[]),d=y.useCallback(function(b){var w=b;if(!(!_c.length||_c[_c.length-1]!==i)){var N="deltaY"in w?eL(w):zp(w),O=t.current.filter(function(E){return E.name===w.type&&(E.target===w.target||w.target===E.shadowParent)&&Xye(E.delta,N)})[0];if(O&&O.should){w.cancelable&&w.preventDefault();return}if(!O){var C=(l.current.shards||[]).map(tL).filter(Boolean).filter(function(E){return E.contains(w.target)}),A=C.length>0?u(w,C[0]):!l.current.noIsolation;A&&w.cancelable&&w.preventDefault()}}},[]),f=y.useCallback(function(b,w,N,O){var C={name:b,delta:w,target:N,should:O,shadowParent:exe(N)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(A){return A!==C})},1)},[]),m=y.useCallback(function(b){n.current=zp(b),r.current=void 0},[]),p=y.useCallback(function(b){f(b.type,eL(b),b.target,u(b,e.lockRef.current))},[]),g=y.useCallback(function(b){f(b.type,zp(b),b.target,u(b,e.lockRef.current))},[]);y.useEffect(function(){return _c.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Sc),document.addEventListener("touchmove",d,Sc),document.addEventListener("touchstart",m,Sc),function(){_c=_c.filter(function(b){return b!==i}),document.removeEventListener("wheel",d,Sc),document.removeEventListener("touchmove",d,Sc),document.removeEventListener("touchstart",m,Sc)}},[]);var x=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(i,{styles:Zye(a)}):null,x?y.createElement(Fye,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function exe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const txe=Aye(vF,Jye);var qh=y.forwardRef(function(e,t){return y.createElement(Py,ti({},e,{ref:t,sideCar:txe}))});qh.classNames=Py.classNames;var nxe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Nc=new WeakMap,qp=new WeakMap,Fp={},XS=0,wF=function(e){return e&&(e.host||wF(e.parentNode))},rxe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wF(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},axe=function(e,t,n,r){var a=rxe(t,Array.isArray(e)?e:[e]);Fp[n]||(Fp[n]=new WeakMap);var i=Fp[n],l=[],u=new Set,d=new Set(a),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};a.forEach(f);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(u.has(g))m(g);else try{var x=g.getAttribute(r),j=x!==null&&x!=="false",b=(Nc.get(g)||0)+1,w=(i.get(g)||0)+1;Nc.set(g,b),i.set(g,w),l.push(g),b===1&&j&&qp.set(g,!0),w===1&&g.setAttribute(n,"true"),j||g.setAttribute(r,"true")}catch(N){console.error("aria-hidden: cannot operate on ",g,N)}})};return m(t),u.clear(),XS++,function(){l.forEach(function(p){var g=Nc.get(p)-1,x=i.get(p)-1;Nc.set(p,g),i.set(p,x),g||(qp.has(p)||p.removeAttribute(r),qp.delete(p)),x||p.removeAttribute(n)}),XS--,XS||(Nc=new WeakMap,Nc=new WeakMap,qp=new WeakMap,Fp={})}},My=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=nxe(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),axe(r,a,n,"aria-hidden")):function(){return null}};function ixe(e){const t=oxe(e),n=y.forwardRef((r,a)=>{const{children:i,...l}=r,u=y.Children.toArray(i),d=u.find(lxe);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return o.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return o.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function oxe(e){const t=y.forwardRef((n,r)=>{const{children:a,...i}=n;if(y.isValidElement(a)){const l=uxe(a),u=cxe(i,a.props);return a.type!==y.Fragment&&(u.ref=r?Mr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sxe=Symbol("radix.slottable");function lxe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sxe}function cxe(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function uxe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ry="Dialog",[jF,SF]=fr(Ry),[dxe,Va]=jF(Ry),_F=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=y.useRef(null),d=y.useRef(null),[f,m]=_a({prop:r,defaultProp:a??!1,onChange:i,caller:Ry});return o.jsx(dxe,{scope:t,triggerRef:u,contentRef:d,contentId:qn(),titleId:qn(),descriptionId:qn(),open:f,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};_F.displayName=Ry;var NF="DialogTrigger",OF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Va(NF,n),i=qe(t,a.triggerRef);return o.jsx(Me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":eE(a.open),...r,ref:i,onClick:Se(e.onClick,a.onOpenToggle)})});OF.displayName=NF;var QC="DialogPortal",[fxe,CF]=jF(QC,{forceMount:void 0}),EF=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=Va(QC,t);return o.jsx(fxe,{scope:t,forceMount:n,children:y.Children.map(r,l=>o.jsx(Mn,{present:n||i.open,children:o.jsx(_l,{asChild:!0,container:a,children:l})}))})};EF.displayName=QC;var Sg="DialogOverlay",AF=y.forwardRef((e,t)=>{const n=CF(Sg,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Va(Sg,e.__scopeDialog);return i.modal?o.jsx(Mn,{present:r||i.open,children:o.jsx(mxe,{...a,ref:t})}):null});AF.displayName=Sg;var hxe=ixe("DialogOverlay.RemoveScroll"),mxe=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Va(Sg,n);return o.jsx(qh,{as:hxe,allowPinchZoom:!0,shards:[a.contentRef],children:o.jsx(Me.div,{"data-state":eE(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fl="DialogContent",TF=y.forwardRef((e,t)=>{const n=CF(fl,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Va(fl,e.__scopeDialog);return o.jsx(Mn,{present:r||i.open,children:i.modal?o.jsx(pxe,{...a,ref:t}):o.jsx(vxe,{...a,ref:t})})});TF.displayName=fl;var pxe=y.forwardRef((e,t)=>{const n=Va(fl,e.__scopeDialog),r=y.useRef(null),a=qe(t,n.contentRef,r);return y.useEffect(()=>{const i=r.current;if(i)return My(i)},[]),o.jsx(kF,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&i.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,i=>i.preventDefault())})}),vxe=y.forwardRef((e,t)=>{const n=Va(fl,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return o.jsx(kF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=i.target;n.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),kF=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...l}=e,u=Va(fl,n),d=y.useRef(null),f=qe(t,d);return ky(),o.jsxs(o.Fragment,{children:[o.jsx(zh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:o.jsx(Sl,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":eE(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(yxe,{titleId:u.titleId}),o.jsx(bxe,{contentRef:d,descriptionId:u.descriptionId})]})]})}),JC="DialogTitle",PF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Va(JC,n);return o.jsx(Me.h2,{id:a.titleId,...r,ref:t})});PF.displayName=JC;var MF="DialogDescription",RF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Va(MF,n);return o.jsx(Me.p,{id:a.descriptionId,...r,ref:t})});RF.displayName=MF;var DF="DialogClose",$F=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Va(DF,n);return o.jsx(Me.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,()=>a.onOpenChange(!1))})});$F.displayName=DF;function eE(e){return e?"open":"closed"}var IF="DialogTitleWarning",[gxe,LF]=nZ(IF,{contentName:fl,titleName:JC,docsSlug:"dialog"}),yxe=({titleId:e})=>{const t=LF(IF),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
||
|
||
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},xxe="DialogDescriptionWarning",bxe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${LF(xxe).contentName}}.`;return y.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},tE=_F,BF=OF,nE=EF,Dy=AF,$y=TF,rE=PF,aE=RF,iE=$F;const tr=tE,zF=BF,wxe=nE,qF=y.forwardRef(({className:e,...t},n)=>o.jsx(Dy,{ref:n,className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qF.displayName=Dy.displayName;const Un=y.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(wxe,{children:[o.jsx(qF,{}),o.jsxs($y,{ref:r,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,o.jsxs(iE,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(Ih,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Un.displayName=$y.displayName;const Hn=({className:e,...t})=>o.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Hn.displayName="DialogHeader";const Dr=({className:e,...t})=>o.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dr.displayName="DialogFooter";const Wn=y.forwardRef(({className:e,...t},n)=>o.jsx(rE,{ref:n,className:ue("text-lg font-semibold leading-none tracking-tight",e),...t}));Wn.displayName=rE.displayName;const ur=y.forwardRef(({className:e,...t},n)=>o.jsx(aE,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));ur.displayName=aE.displayName;var jxe=Symbol("radix.slottable");function Sxe(e){const t=({children:n})=>o.jsx(o.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jxe,t}var FF="AlertDialog",[_xe]=fr(FF,[SF]),fo=SF(),UF=e=>{const{__scopeAlertDialog:t,...n}=e,r=fo(t);return o.jsx(tE,{...r,...n,modal:!0})};UF.displayName=FF;var Nxe="AlertDialogTrigger",HF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=fo(n);return o.jsx(BF,{...a,...r,ref:t})});HF.displayName=Nxe;var Oxe="AlertDialogPortal",WF=e=>{const{__scopeAlertDialog:t,...n}=e,r=fo(t);return o.jsx(nE,{...r,...n})};WF.displayName=Oxe;var Cxe="AlertDialogOverlay",VF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=fo(n);return o.jsx(Dy,{...a,...r,ref:t})});VF.displayName=Cxe;var Vc="AlertDialogContent",[Exe,Axe]=_xe(Vc),Txe=Sxe("AlertDialogContent"),GF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,i=fo(n),l=y.useRef(null),u=qe(t,l),d=y.useRef(null);return o.jsx(gxe,{contentName:Vc,titleName:YF,docsSlug:"alert-dialog",children:o.jsx(Exe,{scope:n,cancelRef:d,children:o.jsxs($y,{role:"alertdialog",...i,...a,ref:u,onOpenAutoFocus:Se(a.onOpenAutoFocus,f=>{f.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[o.jsx(Txe,{children:r}),o.jsx(Pxe,{contentRef:l})]})})})});GF.displayName=Vc;var YF="AlertDialogTitle",KF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=fo(n);return o.jsx(rE,{...a,...r,ref:t})});KF.displayName=YF;var XF="AlertDialogDescription",ZF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=fo(n);return o.jsx(aE,{...a,...r,ref:t})});ZF.displayName=XF;var kxe="AlertDialogAction",QF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=fo(n);return o.jsx(iE,{...a,...r,ref:t})});QF.displayName=kxe;var JF="AlertDialogCancel",e8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=Axe(JF,n),i=fo(n),l=qe(t,a);return o.jsx(iE,{...i,...r,ref:l})});e8.displayName=JF;var Pxe=({contentRef:e})=>{const t=`\`${Vc}\` requires a description for the component to be accessible for screen reader users.
|
||
|
||
You can add a description to the \`${Vc}\` by passing a \`${XF}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||
|
||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Vc}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Mxe=UF,Rxe=HF,Dxe=WF,t8=VF,n8=GF,r8=QF,a8=e8,i8=KF,o8=ZF;const Pn=Mxe,na=Rxe,$xe=Dxe,s8=y.forwardRef(({className:e,...t},n)=>o.jsx(t8,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));s8.displayName=t8.displayName;const gn=y.forwardRef(({className:e,...t},n)=>o.jsxs($xe,{children:[o.jsx(s8,{}),o.jsx(n8,{ref:n,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));gn.displayName=n8.displayName;const yn=({className:e,...t})=>o.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...t});yn.displayName="AlertDialogHeader";const xn=({className:e,...t})=>o.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xn.displayName="AlertDialogFooter";const bn=y.forwardRef(({className:e,...t},n)=>o.jsx(i8,{ref:n,className:ue("text-lg font-semibold",e),...t}));bn.displayName=i8.displayName;const wn=y.forwardRef(({className:e,...t},n)=>o.jsx(o8,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));wn.displayName=o8.displayName;const jn=y.forwardRef(({className:e,...t},n)=>o.jsx(r8,{ref:n,className:ue(uh(),e),...t}));jn.displayName=r8.displayName;const Sn=y.forwardRef(({className:e,...t},n)=>o.jsx(a8,{ref:n,className:ue(uh({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Sn.displayName=a8.displayName;function Ixe(){return o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"系统设置"}),o.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理您的应用偏好设置"})]})}),o.jsxs(ol,{defaultValue:"appearance",className:"w-full",children:[o.jsxs(Xo,{className:"grid w-full grid-cols-2 sm:grid-cols-4 gap-0.5 sm:gap-1 h-auto p-1",children:[o.jsxs(Ct,{value:"appearance",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[o.jsx(Kq,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),o.jsx("span",{children:"外观"})]}),o.jsxs(Ct,{value:"security",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[o.jsx(lge,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),o.jsx("span",{children:"安全"})]}),o.jsxs(Ct,{value:"other",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[o.jsx(Uc,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),o.jsx("span",{children:"其他"})]}),o.jsxs(Ct,{value:"about",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[o.jsx(Gq,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),o.jsx("span",{children:"关于"})]})]}),o.jsxs(Xt,{className:"h-[calc(100vh-240px)] sm:h-[calc(100vh-280px)] mt-4 sm:mt-6",children:[o.jsx(Qt,{value:"appearance",className:"mt-0",children:o.jsx(Lxe,{})}),o.jsx(Qt,{value:"security",className:"mt-0",children:o.jsx(Bxe,{})}),o.jsx(Qt,{value:"other",className:"mt-0",children:o.jsx(zxe,{})}),o.jsx(Qt,{value:"about",className:"mt-0",children:o.jsx(qxe,{})})]})]})]})}function nL(e){const t=document.documentElement,r={blue:{hsl:"221.2 83.2% 53.3%",darkHsl:"217.2 91.2% 59.8%",gradient:null},purple:{hsl:"271 91% 65%",darkHsl:"270 95% 75%",gradient:null},green:{hsl:"142 71% 45%",darkHsl:"142 76% 36%",gradient:null},orange:{hsl:"25 95% 53%",darkHsl:"20 90% 48%",gradient:null},pink:{hsl:"330 81% 60%",darkHsl:"330 85% 70%",gradient:null},red:{hsl:"0 84% 60%",darkHsl:"0 90% 70%",gradient:null},"gradient-sunset":{hsl:"15 95% 60%",darkHsl:"15 95% 65%",gradient:"linear-gradient(135deg, hsl(25 95% 53%) 0%, hsl(330 81% 60%) 100%)"},"gradient-ocean":{hsl:"200 90% 55%",darkHsl:"200 90% 60%",gradient:"linear-gradient(135deg, hsl(221.2 83.2% 53.3%) 0%, hsl(189 94% 43%) 100%)"},"gradient-forest":{hsl:"150 70% 45%",darkHsl:"150 75% 40%",gradient:"linear-gradient(135deg, hsl(142 71% 45%) 0%, hsl(158 64% 52%) 100%)"},"gradient-aurora":{hsl:"310 85% 65%",darkHsl:"310 90% 70%",gradient:"linear-gradient(135deg, hsl(271 91% 65%) 0%, hsl(330 81% 60%) 100%)"},"gradient-fire":{hsl:"15 95% 55%",darkHsl:"15 95% 60%",gradient:"linear-gradient(135deg, hsl(0 84% 60%) 0%, hsl(25 95% 53%) 100%)"},"gradient-twilight":{hsl:"250 90% 60%",darkHsl:"250 95% 65%",gradient:"linear-gradient(135deg, hsl(239 84% 67%) 0%, hsl(271 91% 65%) 100%)"}}[e];if(r)t.style.setProperty("--primary",r.hsl),r.gradient?(t.style.setProperty("--primary-gradient",r.gradient),t.classList.add("has-gradient")):(t.style.removeProperty("--primary-gradient"),t.classList.remove("has-gradient"));else if(e.startsWith("#")){const a=i=>{i=i.replace("#","");const l=parseInt(i.substring(0,2),16)/255,u=parseInt(i.substring(2,4),16)/255,d=parseInt(i.substring(4,6),16)/255,f=Math.max(l,u,d),m=Math.min(l,u,d);let p=0,g=0;const x=(f+m)/2;if(f!==m){const j=f-m;switch(g=x>.5?j/(2-f-m):j/(f+m),f){case l:p=((u-d)/j+(u<d?6:0))/6;break;case u:p=((d-l)/j+2)/6;break;case d:p=((l-u)/j+4)/6;break}}return`${Math.round(p*360)} ${Math.round(g*100)}% ${Math.round(x*100)}%`};t.style.setProperty("--primary",a(e)),t.style.removeProperty("--primary-gradient"),t.classList.remove("has-gradient")}}function Lxe(){const{theme:e,setTheme:t}=KC(),{enableAnimations:n,setEnableAnimations:r,enableWavesBackground:a,setEnableWavesBackground:i}=tF(),[l,u]=y.useState(()=>localStorage.getItem("accent-color")||"blue");y.useEffect(()=>{const f=localStorage.getItem("accent-color")||"blue";nL(f)},[]);const d=f=>{u(f),localStorage.setItem("accent-color",f),nL(f)};return o.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题模式"}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 sm:gap-4",children:[o.jsx(ZS,{value:"light",current:e,onChange:t,label:"浅色",description:"始终使用浅色主题"}),o.jsx(ZS,{value:"dark",current:e,onChange:t,label:"深色",description:"始终使用深色主题"}),o.jsx(ZS,{value:"system",current:e,onChange:t,label:"跟随系统",description:"根据系统设置自动切换"})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题色"}),o.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"单色"}),o.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[o.jsx(xa,{value:"blue",current:l,onChange:d,label:"蓝色",colorClass:"bg-blue-500"}),o.jsx(xa,{value:"purple",current:l,onChange:d,label:"紫色",colorClass:"bg-purple-500"}),o.jsx(xa,{value:"green",current:l,onChange:d,label:"绿色",colorClass:"bg-green-500"}),o.jsx(xa,{value:"orange",current:l,onChange:d,label:"橙色",colorClass:"bg-orange-500"}),o.jsx(xa,{value:"pink",current:l,onChange:d,label:"粉色",colorClass:"bg-pink-500"}),o.jsx(xa,{value:"red",current:l,onChange:d,label:"红色",colorClass:"bg-red-500"})]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"渐变色"}),o.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[o.jsx(xa,{value:"gradient-sunset",current:l,onChange:d,label:"日落",colorClass:"bg-gradient-to-r from-orange-500 to-pink-500"}),o.jsx(xa,{value:"gradient-ocean",current:l,onChange:d,label:"海洋",colorClass:"bg-gradient-to-r from-blue-500 to-cyan-500"}),o.jsx(xa,{value:"gradient-forest",current:l,onChange:d,label:"森林",colorClass:"bg-gradient-to-r from-green-500 to-emerald-500"}),o.jsx(xa,{value:"gradient-aurora",current:l,onChange:d,label:"极光",colorClass:"bg-gradient-to-r from-purple-500 to-pink-500"}),o.jsx(xa,{value:"gradient-fire",current:l,onChange:d,label:"烈焰",colorClass:"bg-gradient-to-r from-red-500 to-orange-500"}),o.jsx(xa,{value:"gradient-twilight",current:l,onChange:d,label:"暮光",colorClass:"bg-gradient-to-r from-indigo-500 to-purple-500"})]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"自定义颜色"}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4",children:[o.jsx("div",{className:"flex-1",children:o.jsx("input",{type:"color",value:l.startsWith("#")?l:"#3b82f6",onChange:f=>d(f.target.value),className:"h-10 sm:h-12 w-full rounded-lg border-2 border-border cursor-pointer",title:"选择自定义颜色"})}),o.jsx("div",{className:"flex-1",children:o.jsx(Ne,{type:"text",value:l,onChange:f=>d(f.target.value),placeholder:"#3b82f6",className:"font-mono text-sm"})})]}),o.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground mt-2",children:"点击色块选择颜色,或手动输入 HEX 颜色代码"})]})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"动画效果"}),o.jsxs("div",{className:"space-y-2 sm:space-y-3",children:[o.jsx("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5 flex-1",children:[o.jsx(J,{htmlFor:"animations",className:"text-base font-medium cursor-pointer",children:"启用动画效果"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后将禁用所有过渡动画和特效,提升性能"})]}),o.jsx(at,{id:"animations",checked:n,onCheckedChange:r})]})}),o.jsx("div",{className:"rounded-lg border bg-card p-4",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5 flex-1",children:[o.jsx(J,{htmlFor:"waves-background",className:"text-base font-medium cursor-pointer",children:"登录页波浪背景"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后登录页将使用纯色背景,适合低性能设备"})]}),o.jsx(at,{id:"waves-background",checked:a,onCheckedChange:i})]})})]})]})]})}function Bxe(){const e=ia(),[t,n]=y.useState(""),[r,a]=y.useState(""),[i,l]=y.useState(!1),[u,d]=y.useState(!1),[f,m]=y.useState(!1),[p,g]=y.useState(!1),[x,j]=y.useState(!1),[b,w]=y.useState(!1),[N,O]=y.useState(""),[C,A]=y.useState(!1),{toast:E}=hr(),k=y.useMemo(()=>eye(r),[r]),T=()=>localStorage.getItem("access-token")||"",P=async H=>{try{await navigator.clipboard.writeText(H),j(!0),E({title:"复制成功",description:"Token 已复制到剪贴板"}),setTimeout(()=>j(!1),2e3)}catch{E({title:"复制失败",description:"请手动复制 Token",variant:"destructive"})}},$=async()=>{if(!r.trim()){E({title:"输入错误",description:"请输入新的 Token",variant:"destructive"});return}if(!k.isValid){const H=k.rules.filter(G=>!G.passed).map(G=>G.label).join(", ");E({title:"格式错误",description:`Token 不符合要求: ${H}`,variant:"destructive"});return}m(!0);try{const H=T(),G=await fetch("/api/webui/auth/update",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${H}`},body:JSON.stringify({new_token:r.trim()})}),L=await G.json();G.ok&&L.success?(localStorage.setItem("access-token",r.trim()),a(""),t&&n(r.trim()),E({title:"更新成功",description:"Access Token 已更新,即将跳转到登录页"}),setTimeout(()=>{localStorage.removeItem("access-token"),e({to:"/auth"})},1500)):E({title:"更新失败",description:L.message||"无法更新 Token",variant:"destructive"})}catch(H){console.error("更新 Token 错误:",H),E({title:"更新失败",description:"连接服务器失败",variant:"destructive"})}finally{m(!1)}},z=async()=>{g(!0);try{const H=T(),G=await fetch("/api/webui/auth/regenerate",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${H}`}}),L=await G.json();G.ok&&L.success?(localStorage.setItem("access-token",L.token),n(L.token),O(L.token),w(!0),A(!1),E({title:"生成成功",description:"新的 Access Token 已生成,请及时保存"})):E({title:"生成失败",description:L.message||"无法生成新 Token",variant:"destructive"})}catch(H){console.error("生成 Token 错误:",H),E({title:"生成失败",description:"连接服务器失败",variant:"destructive"})}finally{g(!1)}},D=async()=>{try{await navigator.clipboard.writeText(N),A(!0),E({title:"复制成功",description:"Token 已复制到剪贴板"})}catch{E({title:"复制失败",description:"请手动复制 Token",variant:"destructive"})}},U=()=>{w(!1),setTimeout(()=>{O(""),A(!1)},300),setTimeout(()=>{localStorage.removeItem("access-token"),e({to:"/auth"})},500)},V=H=>{H||U()};return o.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[o.jsx(tr,{open:b,onOpenChange:V,children:o.jsxs(Un,{className:"sm:max-w-md",children:[o.jsxs(Hn,{children:[o.jsxs(Wn,{className:"flex items-center gap-2",children:[o.jsx(Hc,{className:"h-5 w-5 text-yellow-500"}),"新的 Access Token"]}),o.jsx(ur,{children:"这是您的新 Token,请立即保存。关闭此窗口后将跳转到登录页面。"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"rounded-lg border-2 border-primary/20 bg-primary/5 p-4",children:[o.jsx(J,{className:"text-xs text-muted-foreground mb-2 block",children:"您的新 Token (64位安全令牌)"}),o.jsx("div",{className:"font-mono text-sm break-all select-all bg-background p-3 rounded border",children:N})]}),o.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Hc,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[o.jsx("p",{className:"font-semibold",children:"重要提示"}),o.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[o.jsx("li",{children:"此 Token 仅显示一次,关闭后无法再查看"}),o.jsx("li",{children:"请立即复制并保存到安全的位置"}),o.jsx("li",{children:"关闭窗口后将自动跳转到登录页面"}),o.jsx("li",{children:"请使用新 Token 重新登录系统"})]})]})]})})]}),o.jsxs(Dr,{className:"gap-2 sm:gap-0",children:[o.jsx(fe,{variant:"outline",onClick:D,className:"gap-2",children:C?o.jsxs(o.Fragment,{children:[o.jsx(tl,{className:"h-4 w-4 text-green-500"}),"已复制"]}):o.jsxs(o.Fragment,{children:[o.jsx(qN,{className:"h-4 w-4"}),"复制 Token"]})}),o.jsx(fe,{onClick:U,children:"我已保存,关闭"})]})]})}),o.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[o.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"当前 Access Token"}),o.jsx("div",{className:"space-y-3 sm:space-y-4",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"current-token",className:"text-sm",children:"您的访问令牌"}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx(Ne,{id:"current-token",type:i?"text":"password",value:t||T(),readOnly:!0,className:"pr-10 font-mono text-sm",placeholder:"点击查看按钮显示 Token"}),o.jsx("button",{onClick:()=>{t||n(T()),l(!i)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 hover:bg-accent rounded",title:i?"隐藏":"显示",children:i?o.jsx(UN,{className:"h-4 w-4 text-muted-foreground"}):o.jsx(ro,{className:"h-4 w-4 text-muted-foreground"})})]}),o.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[o.jsx(fe,{variant:"outline",size:"icon",onClick:()=>P(T()),title:"复制到剪贴板",className:"flex-shrink-0",children:x?o.jsx(tl,{className:"h-4 w-4 text-green-500"}):o.jsx(qN,{className:"h-4 w-4"})}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsxs(fe,{variant:"outline",disabled:p,className:"gap-2 flex-1 sm:flex-none",children:[o.jsx(rl,{className:ue("h-4 w-4",p&&"animate-spin")}),o.jsx("span",{className:"hidden sm:inline",children:"重新生成"}),o.jsx("span",{className:"sm:hidden",children:"生成"})]})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认重新生成 Token"}),o.jsx(wn,{children:"这将生成一个新的 64 位安全令牌,并使当前 Token 立即失效。 您需要使用新 Token 重新登录系统。此操作不可撤销,确定要继续吗?"})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:z,children:"确认生成"})]})]})]})]})]}),o.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground",children:"请妥善保管您的 Access Token,不要泄露给他人"})]})})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[o.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"自定义 Access Token"}),o.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"new-token",className:"text-sm",children:"新的访问令牌"}),o.jsxs("div",{className:"relative",children:[o.jsx(Ne,{id:"new-token",type:u?"text":"password",value:r,onChange:H=>a(H.target.value),className:"pr-10 font-mono text-sm",placeholder:"输入自定义 Token"}),o.jsx("button",{onClick:()=>d(!u),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 hover:bg-accent rounded",title:u?"隐藏":"显示",children:u?o.jsx(UN,{className:"h-4 w-4 text-muted-foreground"}):o.jsx(ro,{className:"h-4 w-4 text-muted-foreground"})})]}),r&&o.jsxs("div",{className:"mt-3 space-y-2 p-3 rounded-lg bg-muted/50",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:"Token 安全要求:"}),o.jsx("div",{className:"space-y-1.5",children:k.rules.map(H=>o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[H.passed?o.jsx(Ou,{className:"h-4 w-4 text-green-500 flex-shrink-0"}):o.jsx(Vq,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),o.jsx("span",{className:ue(H.passed?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:H.label})]},H.id))}),k.isValid&&o.jsx("div",{className:"mt-2 pt-2 border-t border-border",children:o.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[o.jsx(tl,{className:"h-4 w-4"}),o.jsx("span",{className:"font-medium",children:"Token 格式正确,可以使用"})]})})]})]}),o.jsx(fe,{onClick:$,disabled:f||!k.isValid||!r,className:"w-full sm:w-auto",children:f?"更新中...":"更新自定义 Token"})]})]}),o.jsxs("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3 sm:p-4",children:[o.jsx("h4",{className:"text-sm sm:text-base font-semibold text-yellow-900 dark:text-yellow-200 mb-2",children:"安全提示"}),o.jsxs("ul",{className:"text-xs sm:text-sm text-yellow-800 dark:text-yellow-300 space-y-1 list-disc list-inside",children:[o.jsx("li",{children:"重新生成 Token 会创建系统随机生成的 64 位安全令牌"}),o.jsx("li",{children:"自定义 Token 必须满足所有安全要求才能使用"}),o.jsx("li",{children:"更新 Token 后,旧的 Token 将立即失效"}),o.jsx("li",{children:"请在安全的环境下查看和复制 Token"}),o.jsx("li",{children:"如果怀疑 Token 泄露,请立即重新生成或更新"}),o.jsx("li",{children:"建议使用系统生成的 Token 以获得最高安全性"})]})]})]})}function zxe(){const e=ia(),{toast:t}=hr(),[n,r]=y.useState(!1),a=async()=>{r(!0);try{const i=localStorage.getItem("access-token"),l=await fetch("/api/webui/setup/reset",{method:"POST",headers:{Authorization:`Bearer ${i}`}}),u=await l.json();l.ok&&u.success?(t({title:"重置成功",description:"即将进入初次配置向导"}),setTimeout(()=>{e({to:"/setup"})},1e3)):t({title:"重置失败",description:u.message||"无法重置配置状态",variant:"destructive"})}catch(i){console.error("重置配置状态错误:",i),t({title:"重置失败",description:"连接服务器失败",variant:"destructive"})}finally{r(!1)}};return o.jsx("div",{className:"space-y-4 sm:space-y-6",children:o.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[o.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"配置向导"}),o.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[o.jsx("div",{className:"space-y-2",children:o.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"重新进行初次配置向导,可以帮助您重新设置系统的基础配置。"})}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsxs(fe,{variant:"outline",disabled:n,className:"gap-2",children:[o.jsx(Qve,{className:ue("h-4 w-4",n&&"animate-spin")}),"重新进行初次配置"]})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认重新配置"}),o.jsx(wn,{children:"这将带您重新进入初次配置向导。您可以重新设置系统的基础配置项。确定要继续吗?"})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:a,children:"确认重置"})]})]})]})]})]})})}function qxe(){return o.jsx("div",{className:"space-y-4 sm:space-y-6",children:o.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[o.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:["关于 ",ZC]}),o.jsxs("div",{className:"space-y-2 text-xs sm:text-sm text-muted-foreground",children:[o.jsxs("p",{children:["版本: ",XC]}),o.jsx("p",{children:"基于 React 19 + Vite + TanStack Router"})]})]})})}function ZS({value:e,current:t,onChange:n,label:r,description:a}){const i=t===e;return o.jsxs("button",{onClick:()=>n(e),className:ue("relative rounded-lg border-2 p-3 sm:p-4 text-left transition-all","hover:border-primary/50 hover:bg-accent/50",i?"border-primary bg-accent":"border-border"),children:[i&&o.jsx("div",{className:"absolute top-2 right-2 sm:top-3 sm:right-3 h-2 w-2 rounded-full bg-primary"}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("div",{className:"text-sm sm:text-base font-medium",children:r}),o.jsx("div",{className:"text-[10px] sm:text-xs text-muted-foreground",children:a})]}),o.jsxs("div",{className:"mt-2 sm:mt-3 flex gap-1",children:[e==="light"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-200"}),o.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-300"}),o.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-400"})]}),e==="dark"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-700"}),o.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-800"}),o.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-900"})]}),e==="system"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-200 to-slate-700"}),o.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-300 to-slate-800"}),o.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-400 to-slate-900"})]})]})]})}function xa({value:e,current:t,onChange:n,label:r,colorClass:a}){const i=t===e;return o.jsxs("button",{onClick:()=>n(e),className:ue("relative rounded-lg border-2 p-2 sm:p-3 text-left transition-all","hover:border-primary/50 hover:bg-accent/50",i?"border-primary bg-accent":"border-border"),children:[i&&o.jsx("div",{className:"absolute top-1.5 right-1.5 sm:top-2 sm:right-2 h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-primary"}),o.jsxs("div",{className:"flex flex-col items-center gap-1.5 sm:gap-2",children:[o.jsx("div",{className:ue("h-8 w-8 sm:h-10 sm:w-10 rounded-full",a)}),o.jsx("div",{className:"text-[10px] sm:text-xs font-medium text-center",children:r})]})]})}class Fxe{grad3;p;perm;constructor(t=0){this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.p=[];for(let n=0;n<256;n++)this.p[n]=Math.floor(Math.random()*256);this.perm=[];for(let n=0;n<512;n++)this.perm[n]=this.p[n&255]}dot(t,n,r){return t[0]*n+t[1]*r}mix(t,n,r){return(1-r)*t+r*n}fade(t){return t*t*t*(t*(t*6-15)+10)}perlin2(t,n){const r=Math.floor(t)&255,a=Math.floor(n)&255;t-=Math.floor(t),n-=Math.floor(n);const i=this.fade(t),l=this.fade(n),u=this.perm[r]+a,d=this.perm[u],f=this.perm[u+1],m=this.perm[r+1]+a,p=this.perm[m],g=this.perm[m+1];return this.mix(this.mix(this.dot(this.grad3[d%12],t,n),this.dot(this.grad3[p%12],t-1,n),i),this.mix(this.dot(this.grad3[f%12],t,n-1),this.dot(this.grad3[g%12],t-1,n-1),i),l)}}function Uxe(){const e=y.useRef(null),t=y.useRef(null),n=y.useRef(void 0),r=y.useRef({mouse:{x:-10,y:0,lx:0,ly:0,sx:0,sy:0,v:0,vs:0,a:0,set:!1},lines:[],paths:[],noise:new Fxe(Math.random()),bounding:null});return y.useEffect(()=>{const a=t.current,i=e.current;if(!a||!i)return;const l=r.current,u=()=>{const b=a.getBoundingClientRect();l.bounding=b,i.style.width=`${b.width}px`,i.style.height=`${b.height}px`},d=()=>{if(!l.bounding)return;const{width:b,height:w}=l.bounding;l.lines=[],l.paths.forEach($=>$.remove()),l.paths=[];const N=10,O=32,C=b+200,A=w+30,E=Math.ceil(C/N),k=Math.ceil(A/O),T=(b-N*E)/2,P=(w-O*k)/2;for(let $=0;$<=E;$++){const z=[];for(let U=0;U<=k;U++){const V={x:T+N*$,y:P+O*U,wave:{x:0,y:0},cursor:{x:0,y:0,vx:0,vy:0}};z.push(V)}const D=document.createElementNS("http://www.w3.org/2000/svg","path");i.appendChild(D),l.paths.push(D),l.lines.push(z)}},f=b=>{const{lines:w,mouse:N,noise:O}=l;w.forEach(C=>{C.forEach(A=>{const E=O.perlin2((A.x+b*.0125)*.002,(A.y+b*.005)*.0015)*12;A.wave.x=Math.cos(E)*32,A.wave.y=Math.sin(E)*16;const k=A.x-N.sx,T=A.y-N.sy,P=Math.hypot(k,T),$=Math.max(175,N.vs);if(P<$){const z=1-P/$,D=Math.cos(P*.001)*z;A.cursor.vx+=Math.cos(N.a)*D*$*N.vs*65e-5,A.cursor.vy+=Math.sin(N.a)*D*$*N.vs*65e-5}A.cursor.vx+=(0-A.cursor.x)*.005,A.cursor.vy+=(0-A.cursor.y)*.005,A.cursor.vx*=.925,A.cursor.vy*=.925,A.cursor.x+=A.cursor.vx*2,A.cursor.y+=A.cursor.vy*2,A.cursor.x=Math.min(100,Math.max(-100,A.cursor.x)),A.cursor.y=Math.min(100,Math.max(-100,A.cursor.y))})})},m=(b,w=!0)=>{const N={x:b.x+b.wave.x+(w?b.cursor.x:0),y:b.y+b.wave.y+(w?b.cursor.y:0)};return N.x=Math.round(N.x*10)/10,N.y=Math.round(N.y*10)/10,N},p=()=>{const{lines:b,paths:w}=l;b.forEach((N,O)=>{let C=m(N[0],!1),A=`M ${C.x} ${C.y}`;N.forEach((E,k)=>{const T=k===N.length-1;C=m(E,!T),A+=`L ${C.x} ${C.y}`}),w[O].setAttribute("d",A)})},g=b=>{const{mouse:w}=l;w.sx+=(w.x-w.sx)*.1,w.sy+=(w.y-w.sy)*.1;const N=w.x-w.lx,O=w.y-w.ly,C=Math.hypot(N,O);w.v=C,w.vs+=(C-w.vs)*.1,w.vs=Math.min(100,w.vs),w.lx=w.x,w.ly=w.y,w.a=Math.atan2(O,N),a&&(a.style.setProperty("--x",`${w.sx}px`),a.style.setProperty("--y",`${w.sy}px`)),f(b),p(),n.current=requestAnimationFrame(g)},x=b=>{if(!l.bounding)return;const{mouse:w}=l;w.x=b.pageX-l.bounding.left,w.y=b.pageY-l.bounding.top+window.scrollY,w.set||(w.sx=w.x,w.sy=w.y,w.lx=w.x,w.ly=w.y,w.set=!0)},j=()=>{u(),d()};return u(),d(),window.addEventListener("resize",j),window.addEventListener("mousemove",x),n.current=requestAnimationFrame(g),()=>{window.removeEventListener("resize",j),window.removeEventListener("mousemove",x),n.current&&cancelAnimationFrame(n.current)}},[]),o.jsxs("div",{ref:t,className:"waves-background",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",pointerEvents:"none"},children:[o.jsx("div",{className:"waves-cursor",style:{position:"absolute",top:0,left:0,width:"0.5rem",height:"0.5rem",background:"hsl(var(--primary) / 0.3)",borderRadius:"50%",transform:"translate3d(calc(var(--x, -0.5rem) - 50%), calc(var(--y, 50%) - 50%), 0)",willChange:"transform",pointerEvents:"none"}}),o.jsx("svg",{ref:e,style:{display:"block",width:"100%",height:"100%"},children:o.jsx("style",{children:`
|
||
path {
|
||
fill: none;
|
||
stroke: hsl(var(--primary) / 0.20);
|
||
stroke-width: 1px;
|
||
}
|
||
`})})]})}function Hxe(){const e=ia();y.useEffect(()=>{localStorage.getItem("access-token")||e({to:"/auth"})},[e])}function l8(){return!!localStorage.getItem("access-token")}function Wxe(){const[e,t]=y.useState(""),[n,r]=y.useState(!1),[a,i]=y.useState(""),l=ia(),{enableWavesBackground:u,setEnableWavesBackground:d}=tF(),{theme:f,setTheme:m}=KC();y.useEffect(()=>{l8()&&l({to:"/"})},[l]);const g=f==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":f,x=()=>{m(g==="dark"?"light":"dark")},j=async b=>{if(b.preventDefault(),i(""),!e.trim()){i("请输入 Access Token");return}r(!0);try{const w=await fetch("/api/webui/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e.trim()})}),N=await w.json();if(w.ok&&N.valid){localStorage.setItem("access-token",e.trim());const O=await fetch("/api/webui/setup/status",{method:"GET",headers:{Authorization:`Bearer ${e.trim()}`}}),C=await O.json();O.ok&&C.is_first_setup?l({to:"/setup"}):l({to:"/"})}else i(N.message||"Token 验证失败,请检查后重试")}catch(w){console.error("Token 验证错误:",w),i("连接服务器失败,请检查网络连接")}finally{r(!1)}};return o.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4",children:[u&&o.jsx(Uxe,{}),o.jsxs(dt,{className:"relative z-10 w-full max-w-md shadow-2xl backdrop-blur-xl bg-card/80 border-border/50",children:[o.jsx("button",{onClick:x,className:"absolute right-4 top-4 rounded-lg p-2 hover:bg-accent transition-colors z-10 text-foreground",title:g==="dark"?"切换到浅色模式":"切换到深色模式",children:g==="dark"?o.jsx(GN,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"}):o.jsx(VN,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"})}),o.jsxs(Vt,{className:"space-y-4 text-center",children:[o.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-primary/10",children:o.jsx(L3,{className:"h-8 w-8 text-primary",strokeWidth:2,fill:"none"})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(Gt,{className:"text-2xl font-bold",children:"欢迎使用 MaiBot"}),o.jsx(Jn,{className:"text-base",children:"请输入您的 Access Token 以继续访问系统"})]})]}),o.jsx(ln,{children:o.jsxs("form",{onSubmit:j,className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"token",className:"text-sm font-medium",children:"Access Token"}),o.jsxs("div",{className:"relative",children:[o.jsx(Rve,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",strokeWidth:2,fill:"none"}),o.jsx(Ne,{id:"token",type:"password",placeholder:"请输入您的 Access Token",value:e,onChange:b=>t(b.target.value),className:ue("pl-10",a&&"border-red-500 focus-visible:ring-red-500"),disabled:n,autoFocus:!0,autoComplete:"off"})]})]}),a&&o.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-red-50 p-3 text-sm text-red-600 dark:bg-red-950/50 dark:text-red-400",children:[o.jsx(yg,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2,fill:"none"}),o.jsx("span",{children:a})]}),o.jsx(fe,{type:"submit",className:"w-full",disabled:n,children:n?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),"验证中..."]}):"验证并进入"}),o.jsxs(tr,{children:[o.jsx(zF,{asChild:!0,children:o.jsxs("button",{className:"w-full text-center text-sm text-primary hover:text-primary/80 transition-colors underline-offset-4 hover:underline flex items-center justify-center gap-1",children:[o.jsx(uve,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我没有 Token,我该去哪里获得 Token?"]})}),o.jsxs(Un,{className:"sm:max-w-md",children:[o.jsxs(Hn,{children:[o.jsxs(Wn,{className:"flex items-center gap-2",children:[o.jsx(L3,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"如何获取 Access Token"]}),o.jsx(ur,{children:"Access Token 是访问 MaiBot WebUI 的唯一凭证,请按以下方式获取"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(yge,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),o.jsxs("div",{className:"flex-1 space-y-2",children:[o.jsx("h4",{className:"font-semibold text-sm",children:"方式一:查看启动日志"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"在 MaiBot 启动时,控制台会显示 WebUI Access Token。"}),o.jsxs("div",{className:"rounded bg-background p-2 font-mono text-xs",children:[o.jsx("p",{className:"text-muted-foreground",children:"🔑 WebUI Access Token: abc123..."}),o.jsx("p",{className:"text-muted-foreground",children:"💡 请使用此 Token 登录 WebUI"})]})]})]})}),o.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(WC,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),o.jsxs("div",{className:"flex-1 space-y-2",children:[o.jsx("h4",{className:"font-semibold text-sm",children:"方式二:查看配置文件"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"Token 保存在项目根目录的配置文件中:"}),o.jsx("div",{className:"rounded bg-background p-2 font-mono text-xs break-all",children:o.jsx("code",{className:"text-primary",children:"data/webui.json"})}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:["打开此文件,复制 ",o.jsx("code",{className:"px-1 py-0.5 bg-background rounded",children:"access_token"})," 字段的值"]})]})]})}),o.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx(yg,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),o.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[o.jsx("p",{className:"font-semibold",children:"安全提示"}),o.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[o.jsx("li",{children:"请妥善保管您的 Token,不要泄露给他人"}),o.jsx("li",{children:"如需重置 Token,请在登录后前往系统设置"})]})]})]})})]})]})]}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsxs("button",{className:"w-full text-center text-sm text-muted-foreground hover:text-foreground transition-colors underline-offset-4 hover:underline flex items-center justify-center gap-1",children:[o.jsx(ch,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我觉得这个界面很卡怎么办?"]})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsxs(bn,{className:"flex items-center gap-2",children:[o.jsx(ch,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"关闭背景动画"]}),o.jsx(wn,{children:"背景动画可能会在低性能设备上造成卡顿。关闭动画可以显著提升界面流畅度。"})]}),o.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭动画后,背景将变为纯色,但不影响任何功能的使用。您可以随时在系统设置中重新开启动画。"})}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>d(!1),children:"关闭动画"})]})]})]})]})})]}),o.jsx("div",{className:"absolute bottom-4 left-0 right-0 text-center text-xs text-muted-foreground",children:o.jsx("p",{children:tye})})]})}function Vxe(e,t=[]){let n=[];function r(i,l){const u=y.createContext(l);u.displayName=i+"Context";const d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:x,...j}=p,b=g?.[e]?.[d]||u,w=y.useMemo(()=>j,Object.values(j));return o.jsx(b.Provider,{value:w,children:x})};f.displayName=i+"Provider";function m(p,g){const x=g?.[e]?.[d]||u,j=y.useContext(x);if(j)return j;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(l=>y.createContext(l));return function(u){const d=u?.[e]||i;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,Gxe(a,...t)]}function Gxe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Yxe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],c8=Yxe.reduce((e,t)=>{const n=Lh(`Primitive.${t}`),r=y.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),oE="Progress",sE=100,[Kxe]=Vxe(oE),[Xxe,Zxe]=Kxe(oE),u8=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:i=Qxe,...l}=e;(a||a===0)&&!rL(a)&&console.error(Jxe(`${a}`,"Progress"));const u=rL(a)?a:sE;r!==null&&!aL(r,u)&&console.error(ebe(`${r}`,"Progress"));const d=aL(r,u)?r:null,f=_g(d)?i(d,u):void 0;return o.jsx(Xxe,{scope:n,value:d,max:u,children:o.jsx(c8.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":_g(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":h8(d,u),"data-value":d??void 0,"data-max":u,...l,ref:t})})});u8.displayName=oE;var d8="ProgressIndicator",f8=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=Zxe(d8,n);return o.jsx(c8.div,{"data-state":h8(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});f8.displayName=d8;function Qxe(e,t){return`${Math.round(e/t*100)}%`}function h8(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function _g(e){return typeof e=="number"}function rL(e){return _g(e)&&!isNaN(e)&&e>0}function aL(e,t){return _g(e)&&!isNaN(e)&&e<=t&&e>=0}function Jxe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${sE}\`.`}function ebe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
||
- a positive number
|
||
- less than the value passed to \`max\` (or ${sE} if no \`max\` prop is set)
|
||
- \`null\` or \`undefined\` if the progress is indeterminate.
|
||
|
||
Defaulting to \`null\`.`}var m8=u8,tbe=f8;const lE=y.forwardRef(({className:e,value:t,...n},r)=>o.jsx(m8,{ref:r,className:ue("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:o.jsx(tbe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));lE.displayName=m8.displayName;const qt=y.forwardRef(({className:e,...t},n)=>o.jsx("textarea",{className:ue("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));qt.displayName="Textarea";var nbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rbe=nbe.reduce((e,t)=>{const n=Lh(`Primitive.${t}`),r=y.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),abe="Separator",iL="horizontal",ibe=["horizontal","vertical"],p8=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=iL,...a}=e,i=obe(r)?r:iL,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return o.jsx(rbe.div,{"data-orientation":i,...u,...a,ref:t})});p8.displayName=abe;function obe(e){return ibe.includes(e)}var v8=p8;const dh=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>o.jsx(v8,{ref:a,decorative:n,orientation:t,className:ue("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));dh.displayName=v8.displayName;const sbe=Bh("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function en({className:e,variant:t,...n}){return o.jsx("div",{className:ue(sbe({variant:t}),e),...n})}function lbe({config:e,onChange:t}){const n=a=>{a.trim()&&!e.alias_names.includes(a.trim())&&t({...e,alias_names:[...e.alias_names,a.trim()]})},r=a=>{t({...e,alias_names:e.alias_names.filter((i,l)=>l!==a)})};return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"qq_account",children:"QQ账号 *"}),o.jsx(Ne,{id:"qq_account",type:"number",placeholder:"请输入机器人的QQ账号",value:e.qq_account||"",onChange:a=>t({...e,qq_account:Number(a.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人登录使用的QQ账号"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"nickname",children:"昵称 *"}),o.jsx(Ne,{id:"nickname",placeholder:"请输入机器人的昵称",value:e.nickname,onChange:a=>t({...e,nickname:a.target.value})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的主要称呼名称"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{children:"别名"}),o.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:e.alias_names.map((a,i)=>o.jsxs(en,{variant:"secondary",className:"gap-1",children:[a,o.jsx("button",{type:"button",onClick:()=>r(i),className:"ml-1 hover:text-destructive",children:o.jsx(Ih,{className:"h-3 w-3"})})]},i))}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ne,{id:"alias_input",placeholder:"输入别名后按回车添加",onKeyPress:a=>{a.key==="Enter"&&(n(a.target.value),a.target.value="")}}),o.jsx(fe,{type:"button",variant:"outline",onClick:()=>{const a=document.getElementById("alias_input");a&&(n(a.value),a.value="")},children:"添加"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的其他称呼,可以添加多个"})]})]})}function cbe({config:e,onChange:t}){return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"personality",children:"人格特征 *"}),o.jsx(qt,{id:"personality",placeholder:"描述机器人的人格特质和身份特征(建议120字以内)",value:e.personality,onChange:n=>t({...e,personality:n.target.value}),rows:3}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:是一个女大学生,现在在读大二,会刷贴吧"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"reply_style",children:"表达风格 *"}),o.jsx(qt,{id:"reply_style",placeholder:"描述机器人说话的表达风格、表达习惯",value:e.reply_style,onChange:n=>t({...e,reply_style:n.target.value}),rows:3}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:回复平淡一些,简短一些,说中文,参考贴吧、知乎和微博的回复风格"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"interest",children:"兴趣 *"}),o.jsx(qt,{id:"interest",placeholder:"描述机器人感兴趣的话题",value:e.interest,onChange:n=>t({...e,interest:n.target.value}),rows:2}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"会影响机器人对什么话题进行回复"})]}),o.jsx(dh,{}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"plan_style",children:"群聊说话规则 *"}),o.jsx(qt,{id:"plan_style",placeholder:"机器人在群聊中的行为风格和规则",value:e.plan_style,onChange:n=>t({...e,plan_style:n.target.value}),rows:4}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在群聊中如何行动,例如回复频率、条件等"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"private_plan_style",children:"私聊说话规则 *"}),o.jsx(qt,{id:"private_plan_style",placeholder:"机器人在私聊中的行为风格和规则",value:e.private_plan_style,onChange:n=>t({...e,private_plan_style:n.target.value}),rows:3}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在私聊中的行为方式"})]})]})}function ube({config:e,onChange:t}){return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(J,{htmlFor:"emoji_chance",children:"表情包激活概率"}),o.jsxs("span",{className:"text-sm text-muted-foreground",children:[(e.emoji_chance*100).toFixed(0),"%"]})]}),o.jsx(Ne,{id:"emoji_chance",type:"range",min:"0",max:"1",step:"0.1",value:e.emoji_chance,onChange:n=>t({...e,emoji_chance:Number(n.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人发送表情包的概率"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"max_reg_num",children:"最大表情包数量"}),o.jsx(Ne,{id:"max_reg_num",type:"number",min:"1",max:"200",value:e.max_reg_num,onChange:n=>t({...e,max_reg_num:Number(n.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人最多保存的表情包数量"})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(J,{htmlFor:"do_replace",children:"达到最大数量时替换"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后会删除旧表情包,关闭则不再收集新表情包"})]}),o.jsx(at,{id:"do_replace",checked:e.do_replace,onCheckedChange:n=>t({...e,do_replace:n})})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),o.jsx(Ne,{id:"check_interval",type:"number",min:"1",max:"120",value:e.check_interval,onChange:n=>t({...e,check_interval:Number(n.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包注册、破损、删除的时间间隔"})]}),o.jsx(dh,{}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(J,{htmlFor:"steal_emoji",children:"偷取表情包"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人将一些表情包据为己有"})]}),o.jsx(at,{id:"steal_emoji",checked:e.steal_emoji,onCheckedChange:n=>t({...e,steal_emoji:n})})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(J,{htmlFor:"content_filtration",children:"启用表情包过滤"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"只保存符合要求的表情包"})]}),o.jsx(at,{id:"content_filtration",checked:e.content_filtration,onCheckedChange:n=>t({...e,content_filtration:n})})]}),e.content_filtration&&o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"filtration_prompt",children:"过滤要求"}),o.jsx(Ne,{id:"filtration_prompt",placeholder:"例如:符合公序良俗",value:e.filtration_prompt,onChange:n=>t({...e,filtration_prompt:n.target.value})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"描述表情包应该符合的要求"})]})]})}function dbe({config:e,onChange:t}){return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(J,{htmlFor:"enable_tool",children:"启用工具系统"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人使用各种工具增强功能"})]}),o.jsx(at,{id:"enable_tool",checked:e.enable_tool,onCheckedChange:n=>t({...e,enable_tool:n})})]}),o.jsx(dh,{}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(J,{htmlFor:"enable_mood",children:"启用情绪系统"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"让机器人具有情绪变化能力"})]}),o.jsx(at,{id:"enable_mood",checked:e.enable_mood,onCheckedChange:n=>t({...e,enable_mood:n})})]}),e.enable_mood&&o.jsxs("div",{className:"ml-6 space-y-6 border-l-2 border-primary/20 pl-6",children:[o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"mood_update_threshold",children:"情绪更新阈值"}),o.jsx(Ne,{id:"mood_update_threshold",type:"number",min:"0.1",max:"10",step:"0.1",value:e.mood_update_threshold||1,onChange:n=>t({...e,mood_update_threshold:Number(n.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"值越高,情绪更新越慢"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(J,{htmlFor:"emotion_style",children:"情感特征"}),o.jsx(qt,{id:"emotion_style",placeholder:"描述情绪的变化情况,例如:情绪较为稳定,但遭遇特定事件时起伏较大",value:e.emotion_style||"",onChange:n=>t({...e,emotion_style:n.target.value}),rows:2}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"影响机器人的情绪变化方式"})]})]}),o.jsx(dh,{}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(J,{htmlFor:"all_global",children:"启用全局黑话模式"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人学习和使用群组黑话"})]}),o.jsx(at,{id:"all_global",checked:e.all_global,onCheckedChange:n=>t({...e,all_global:n})})]})]})}async function Ze(e,t){const n=await fetch(e,t);if(n.status===401)throw localStorage.removeItem("access-token"),window.location.href="/auth",new Error("认证失败,请重新登录");return n}function st(){return{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("access-token")}`}}async function fbe(){const e=await Ze("/api/webui/config/bot",{method:"GET",headers:st()});if(!e.ok)throw new Error("读取Bot配置失败");const n=(await e.json()).config.bot||{};return{qq_account:n.qq_account||0,nickname:n.nickname||"",alias_names:n.alias_names||[]}}async function hbe(){const e=await Ze("/api/webui/config/bot",{method:"GET",headers:st()});if(!e.ok)throw new Error("读取人格配置失败");const n=(await e.json()).config.personality||{};return{personality:n.personality||"",reply_style:n.reply_style||"",interest:n.interest||"",plan_style:n.plan_style||"",private_plan_style:n.private_plan_style||""}}async function mbe(){const e=await Ze("/api/webui/config/bot",{method:"GET",headers:st()});if(!e.ok)throw new Error("读取表情包配置失败");const n=(await e.json()).config.emoji||{};return{emoji_chance:n.emoji_chance??.4,max_reg_num:n.max_reg_num??40,do_replace:n.do_replace??!0,check_interval:n.check_interval??10,steal_emoji:n.steal_emoji??!0,content_filtration:n.content_filtration??!1,filtration_prompt:n.filtration_prompt||""}}async function pbe(){const e=await Ze("/api/webui/config/bot",{method:"GET",headers:st()});if(!e.ok)throw new Error("读取其他配置失败");const n=(await e.json()).config,r=n.tool||{},a=n.mood||{},i=n.jargon||{};return{enable_tool:r.enable_tool??!0,enable_mood:a.enable_mood??!1,mood_update_threshold:a.mood_update_threshold,emotion_style:a.emotion_style,all_global:i.all_global??!0}}async function vbe(e){const t=await Ze("/api/webui/config/bot/section/bot",{method:"POST",headers:st(),body:JSON.stringify(e)});if(!t.ok){const n=await t.json();throw new Error(n.detail||"保存Bot基础配置失败")}return await t.json()}async function gbe(e){const t=await Ze("/api/webui/config/bot/section/personality",{method:"POST",headers:st(),body:JSON.stringify(e)});if(!t.ok){const n=await t.json();throw new Error(n.detail||"保存人格配置失败")}return await t.json()}async function ybe(e){const t=await Ze("/api/webui/config/bot/section/emoji",{method:"POST",headers:st(),body:JSON.stringify(e)});if(!t.ok){const n=await t.json();throw new Error(n.detail||"保存表情包配置失败")}return await t.json()}async function xbe(e){const t=[];t.push(Ze("/api/webui/config/bot/section/tool",{method:"POST",headers:st(),body:JSON.stringify({enable_tool:e.enable_tool})})),t.push(Ze("/api/webui/config/bot/section/jargon",{method:"POST",headers:st(),body:JSON.stringify({all_global:e.all_global})}));const n={enable_mood:e.enable_mood};e.enable_mood&&(n.mood_update_threshold=e.mood_update_threshold||1,n.emotion_style=e.emotion_style||""),t.push(Ze("/api/webui/config/bot/section/mood",{method:"POST",headers:st(),body:JSON.stringify(n)}));const r=await Promise.all(t);for(const a of r)if(!a.ok){const i=await a.json();throw new Error(i.detail||"保存其他配置失败")}return{success:!0}}async function oL(){const e=localStorage.getItem("access-token"),t=await Ze("/api/webui/setup/complete",{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!t.ok){const n=await t.json();throw new Error(n.message||"标记配置完成失败")}return await t.json()}function bbe(){const e=ia(),{toast:t}=hr(),[n,r]=y.useState(0),[a,i]=y.useState(!1),[l,u]=y.useState(!1),[d,f]=y.useState(!0),[m,p]=y.useState({qq_account:0,nickname:"",alias_names:[]}),[g,x]=y.useState({personality:"是一个女大学生,现在在读大二,会刷贴吧。",reply_style:"请回复的平淡一些,简短一些,说中文,不要刻意突出自身学科背景。可以参考贴吧,知乎和微博的回复风格。",interest:"对技术相关话题,游戏和动漫相关话题感兴趣,也对日常话题感兴趣,不喜欢太过沉重严肃的话题",plan_style:`1.思考**所有**的可用的action中的**每个动作**是否符合当下条件,如果动作使用条件符合聊天内容就使用
|
||
2.如果相同的内容已经被执行,请不要重复执行
|
||
3.请控制你的发言频率,不要太过频繁的发言
|
||
4.如果有人对你感到厌烦,请减少回复
|
||
5.如果有人对你进行攻击,或者情绪激动,请你以合适的方法应对`,private_plan_style:`1.思考**所有**的可用的action中的**每个动作**是否符合当下条件,如果动作使用条件符合聊天内容就使用
|
||
2.如果相同的内容已经被执行,请不要重复执行
|
||
3.某句话如果已经被回复过,不要重复回复`}),[j,b]=y.useState({emoji_chance:.4,max_reg_num:40,do_replace:!0,check_interval:10,steal_emoji:!0,content_filtration:!1,filtration_prompt:"符合公序良俗"}),[w,N]=y.useState({enable_tool:!0,enable_mood:!1,mood_update_threshold:1,emotion_style:"情绪较为稳定,但遭遇特定事件的时候起伏较大",all_global:!0}),O=[{id:"bot-basic",title:"Bot基础",description:"配置机器人的基本信息",icon:Kpe},{id:"personality",title:"人格配置",description:"定义机器人的性格和说话风格",icon:Zq},{id:"emoji",title:"表情包",description:"配置表情包相关设置",icon:GC},{id:"other",title:"其他设置",description:"工具、情绪系统等配置",icon:Uc},{id:"complete",title:"完成设置",description:"后续配置提示",icon:ch}],C=(n+1)/O.length*100;y.useEffect(()=>{(async()=>{try{f(!0);const[D,U,V,H]=await Promise.all([fbe(),hbe(),mbe(),pbe()]);p(D),x(U),b(V),N(H)}catch(D){t({title:"加载配置失败",description:D instanceof Error?D.message:"无法加载现有配置,将使用默认值",variant:"destructive"})}finally{f(!1)}})()},[t]);const A=async()=>{u(!0);try{switch(n){case 0:await vbe(m);break;case 1:await gbe(g);break;case 2:await ybe(j);break;case 3:await xbe(w);break}return t({title:"保存成功",description:`${O[n].title}配置已保存`}),!0}catch(z){return t({title:"保存失败",description:z instanceof Error?z.message:"未知错误",variant:"destructive"}),!1}finally{u(!1)}},E=async()=>{await A()&&n<O.length-1&&r(n+1)},k=()=>{n>0&&r(n-1)},T=async()=>{i(!0);try{if(!await A()){i(!1);return}await oL(),t({title:"配置完成",description:"所有配置已保存,正在跳转..."}),setTimeout(()=>{e({to:"/"})},500)}catch(z){t({title:"完成失败",description:z instanceof Error?z.message:"未知错误",variant:"destructive"})}finally{i(!1)}},P=async()=>{try{await oL(),e({to:"/"})}catch(z){t({title:"跳过失败",description:z instanceof Error?z.message:"未知错误",variant:"destructive"})}},$=()=>{switch(n){case 0:return o.jsx(lbe,{config:m,onChange:p});case 1:return o.jsx(cbe,{config:g,onChange:x});case 2:return o.jsx(ube,{config:j,onChange:b});case 3:return o.jsx(dbe,{config:w,onChange:N});case 4:return o.jsxs("div",{className:"space-y-6 text-center py-8",children:[o.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center",children:o.jsx(ch,{className:"h-8 w-8 text-primary",strokeWidth:2})}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h3",{className:"text-xl font-semibold",children:"模型配置"}),o.jsx("p",{className:"text-muted-foreground max-w-md mx-auto",children:"为了让机器人正常工作,您需要配置 AI 模型提供商和模型。"})]}),o.jsxs("div",{className:"rounded-lg border bg-muted/50 p-6 max-w-md mx-auto text-left space-y-4",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"mt-0.5",children:o.jsx("div",{className:"h-6 w-6 rounded-full bg-primary/20 flex items-center justify-center text-primary text-sm font-semibold",children:"1"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:"配置 API 提供商"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'在"系统设置 → 模型配置 → API 提供商"中添加您的 API 提供商信息'})]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"mt-0.5",children:o.jsx("div",{className:"h-6 w-6 rounded-full bg-primary/20 flex items-center justify-center text-primary text-sm font-semibold",children:"2"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:"添加模型"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'在"系统设置 → 模型配置 → 模型列表"中添加需要使用的模型'})]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"mt-0.5",children:o.jsx("div",{className:"h-6 w-6 rounded-full bg-primary/20 flex items-center justify-center text-primary text-sm font-semibold",children:"3"})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:"配置模型任务"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'在"系统设置 → 模型配置 → 模型任务配置"中为不同任务分配模型'})]})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"💡 提示:完成向导后,您可以在系统设置中进行详细的模型配置"})]});default:return null}};return o.jsxs("div",{className:"relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-gradient-to-br from-primary/5 via-background to-secondary/5 p-4 md:p-6",children:[o.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[o.jsx("div",{className:"absolute left-1/4 top-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-primary/5 blur-3xl"}),o.jsx("div",{className:"absolute right-1/4 bottom-1/4 h-64 w-64 md:h-96 md:w-96 rounded-full bg-secondary/5 blur-3xl"})]}),d?o.jsxs("div",{className:"relative z-10 text-center",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center",children:o.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),o.jsx("p",{className:"text-lg font-medium",children:"加载配置中..."}),o.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"正在读取现有配置"})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative z-10 w-full max-w-4xl",children:[o.jsxs("div",{className:"mb-6 md:mb-8 text-center",children:[o.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 md:h-16 md:w-16 items-center justify-center rounded-2xl bg-primary/10",children:o.jsx(hge,{className:"h-6 w-6 md:h-8 md:w-8 text-primary",strokeWidth:2,fill:"none"})}),o.jsx("h1",{className:"mb-2 text-2xl md:text-3xl font-bold",children:"首次配置向导"}),o.jsxs("p",{className:"text-sm md:text-base text-muted-foreground",children:["让我们一起完成 ",ZC," 的初始配置"]})]}),o.jsxs("div",{className:"mb-6 md:mb-8",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between text-xs md:text-sm",children:[o.jsxs("span",{className:"text-muted-foreground",children:["步骤 ",n+1," / ",O.length]}),o.jsxs("span",{className:"font-medium text-primary",children:[Math.round(C),"%"]})]}),o.jsx(lE,{value:C,className:"h-2"})]}),o.jsx("div",{className:"mb-6 md:mb-8 flex justify-between",children:O.map((z,D)=>{const U=z.icon;return o.jsxs("div",{className:ue("flex flex-1 flex-col items-center gap-1 md:gap-2",D<O.length-1&&"relative"),children:[D<O.length-1&&o.jsx("div",{className:ue("absolute left-1/2 top-3 md:top-4 h-0.5 w-full",D<n?"bg-primary":"bg-border")}),o.jsx("div",{className:ue("relative z-10 flex h-6 w-6 md:h-8 md:w-8 items-center justify-center rounded-full border-2 transition-all",D===n||D<n?"border-primary bg-primary text-primary-foreground":"border-border bg-background text-muted-foreground"),children:D<n?o.jsx(Ou,{className:"h-3 w-3 md:h-4 md:w-4",strokeWidth:2.5,fill:"none"}):o.jsx(U,{className:"h-3 w-3 md:h-4 md:w-4"})}),o.jsx("span",{className:ue("text-[10px] md:text-xs text-center max-w-[60px] md:max-w-none truncate md:whitespace-normal",D===n?"font-medium text-foreground":"text-muted-foreground"),title:z.title,children:z.title})]},z.id)})}),o.jsx(dt,{className:"mb-6 md:mb-8 shadow-lg",children:o.jsx(ln,{className:"p-4 md:p-8",children:o.jsxs("div",{className:"min-h-[300px] md:min-h-[400px]",children:[o.jsxs("div",{className:"mb-4 md:mb-6",children:[o.jsx("h2",{className:"mb-2 text-xl md:text-2xl font-semibold",children:O[n].title}),o.jsx("p",{className:"text-sm md:text-base text-muted-foreground",children:O[n].description})]}),o.jsx(Xt,{className:"h-[400px] md:h-[500px]",children:o.jsx("div",{className:"pr-2",children:$()})})]})})}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 sm:gap-0",children:[o.jsx(fe,{variant:"outline",onClick:k,disabled:n===0||l,className:"w-full sm:w-auto order-2 sm:order-1",children:"上一步"}),o.jsxs("div",{className:"flex gap-2 w-full sm:w-auto order-1 sm:order-2",children:[o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsxs(fe,{variant:"ghost",className:"flex-1 sm:flex-none gap-2",disabled:l||a,children:[o.jsx(uge,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"跳过向导"]})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认跳过配置向导"}),o.jsx(wn,{children:"您可以随时在系统设置中重新进入配置向导。确定要跳过吗?"})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:P,children:"确认跳过"})]})]})]}),n===O.length-1?o.jsx(fe,{onClick:T,disabled:a||l,className:"flex-1 sm:flex-none",children:a||l?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),l?"保存中...":"完成中..."]}):o.jsxs(o.Fragment,{children:["完成配置",o.jsx(Ou,{className:"ml-2 h-4 w-4",strokeWidth:2,fill:"none"})]})}):o.jsx(fe,{onClick:E,disabled:l,className:"flex-1 sm:flex-none",children:l?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),"保存中..."]}):o.jsxs(o.Fragment,{children:["下一步",o.jsx(Upe,{className:"ml-2 h-4 w-4",strokeWidth:2,fill:"none"})]})})]})]})]}),o.jsx("div",{className:"relative z-10 mt-6 md:mt-8 text-center text-xs text-muted-foreground",children:o.jsx("p",{children:"您可以随时在设置中修改这些配置"})})]})]})}function g8(){const e=ia();return o.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:o.jsxs("div",{className:"w-full max-w-2xl text-center",children:[o.jsxs("div",{className:"relative mb-8",children:[o.jsx("h1",{className:"text-[150px] font-black leading-none text-primary/10 select-none sm:text-[200px]",children:"404"}),o.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:o.jsx(Rr,{className:"h-20 w-20 text-primary/30 sm:h-24 sm:w-24"})})]}),o.jsxs("div",{className:"space-y-4 mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-foreground sm:text-3xl",children:"页面未找到"}),o.jsx("p",{className:"text-base text-muted-foreground sm:text-lg max-w-md mx-auto",children:"抱歉,您访问的页面不存在或已被移除。请检查 URL 是否正确,或返回首页继续浏览。"})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[o.jsxs(fe,{size:"lg",onClick:()=>e({to:"/"}),className:"gap-2 w-full sm:w-auto",children:[o.jsx(wg,{className:"h-4 w-4"}),"返回首页"]}),o.jsxs(fe,{size:"lg",variant:"outline",onClick:()=>window.history.back(),className:"gap-2 w-full sm:w-auto",children:[o.jsx(Uq,{className:"h-4 w-4"}),"返回上一页"]})]}),o.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"如果您认为这是一个错误,请联系系统管理员"})})]})})}var y8=["PageUp","PageDown"],x8=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],b8={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Wu="Slider",[XN,wbe,jbe]=_h(Wu),[w8]=fr(Wu,[jbe]),[Sbe,Iy]=w8(Wu),j8=y.forwardRef((e,t)=>{const{name:n,min:r=0,max:a=100,step:i=1,orientation:l="horizontal",disabled:u=!1,minStepsBetweenThumbs:d=0,defaultValue:f=[r],value:m,onValueChange:p=()=>{},onValueCommit:g=()=>{},inverted:x=!1,form:j,...b}=e,w=y.useRef(new Set),N=y.useRef(0),C=l==="horizontal"?_be:Nbe,[A=[],E]=_a({prop:m,defaultProp:f,onChange:D=>{[...w.current][N.current]?.focus(),p(D)}}),k=y.useRef(A);function T(D){const U=Tbe(A,D);z(D,U)}function P(D){z(D,N.current)}function $(){const D=k.current[N.current];A[N.current]!==D&&g(A)}function z(D,U,{commit:V}={commit:!1}){const H=Rbe(i),G=Dbe(Math.round((D-r)/i)*i+r,H),L=Of(G,[r,a]);E((R=[])=>{const F=Ebe(R,L,U);if(Mbe(F,d*i)){N.current=F.indexOf(L);const K=String(F)!==String(R);return K&&V&&g(F),K?F:R}else return R})}return o.jsx(Sbe,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:a,valueIndexToChangeRef:N,thumbs:w.current,values:A,orientation:l,form:j,children:o.jsx(XN.Provider,{scope:e.__scopeSlider,children:o.jsx(XN.Slot,{scope:e.__scopeSlider,children:o.jsx(C,{"aria-disabled":u,"data-disabled":u?"":void 0,...b,ref:t,onPointerDown:Se(b.onPointerDown,()=>{u||(k.current=A)}),min:r,max:a,inverted:x,onSlideStart:u?void 0:T,onSlideMove:u?void 0:P,onSlideEnd:u?void 0:$,onHomeKeyDown:()=>!u&&z(r,0,{commit:!0}),onEndKeyDown:()=>!u&&z(a,A.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:U})=>{if(!u){const G=y8.includes(D.key)||D.shiftKey&&x8.includes(D.key)?10:1,L=N.current,R=A[L],F=i*G*U;z(R+F,L,{commit:!0})}}})})})})});j8.displayName=Wu;var[S8,_8]=w8(Wu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),_be=y.forwardRef((e,t)=>{const{min:n,max:r,dir:a,inverted:i,onSlideStart:l,onSlideMove:u,onSlideEnd:d,onStepKeyDown:f,...m}=e,[p,g]=y.useState(null),x=qe(t,C=>g(C)),j=y.useRef(void 0),b=$u(a),w=b==="ltr",N=w&&!i||!w&&i;function O(C){const A=j.current||p.getBoundingClientRect(),E=[0,A.width],T=cE(E,N?[n,r]:[r,n]);return j.current=A,T(C-A.left)}return o.jsx(S8,{scope:e.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:o.jsx(N8,{dir:b,"data-orientation":"horizontal",...m,ref:x,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:C=>{const A=O(C.clientX);l?.(A)},onSlideMove:C=>{const A=O(C.clientX);u?.(A)},onSlideEnd:()=>{j.current=void 0,d?.()},onStepKeyDown:C=>{const E=b8[N?"from-left":"from-right"].includes(C.key);f?.({event:C,direction:E?-1:1})}})})}),Nbe=y.forwardRef((e,t)=>{const{min:n,max:r,inverted:a,onSlideStart:i,onSlideMove:l,onSlideEnd:u,onStepKeyDown:d,...f}=e,m=y.useRef(null),p=qe(t,m),g=y.useRef(void 0),x=!a;function j(b){const w=g.current||m.current.getBoundingClientRect(),N=[0,w.height],C=cE(N,x?[r,n]:[n,r]);return g.current=w,C(b-w.top)}return o.jsx(S8,{scope:e.__scopeSlider,startEdge:x?"bottom":"top",endEdge:x?"top":"bottom",size:"height",direction:x?1:-1,children:o.jsx(N8,{"data-orientation":"vertical",...f,ref:p,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const w=j(b.clientY);i?.(w)},onSlideMove:b=>{const w=j(b.clientY);l?.(w)},onSlideEnd:()=>{g.current=void 0,u?.()},onStepKeyDown:b=>{const N=b8[x?"from-bottom":"from-top"].includes(b.key);d?.({event:b,direction:N?-1:1})}})})}),N8=y.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:u,onStepKeyDown:d,...f}=e,m=Iy(Wu,n);return o.jsx(Me.span,{...f,ref:t,onKeyDown:Se(e.onKeyDown,p=>{p.key==="Home"?(l(p),p.preventDefault()):p.key==="End"?(u(p),p.preventDefault()):y8.concat(x8).includes(p.key)&&(d(p),p.preventDefault())}),onPointerDown:Se(e.onPointerDown,p=>{const g=p.target;g.setPointerCapture(p.pointerId),p.preventDefault(),m.thumbs.has(g)?g.focus():r(p)}),onPointerMove:Se(e.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&a(p)}),onPointerUp:Se(e.onPointerUp,p=>{const g=p.target;g.hasPointerCapture(p.pointerId)&&(g.releasePointerCapture(p.pointerId),i(p))})})}),O8="SliderTrack",C8=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=Iy(O8,n);return o.jsx(Me.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:t})});C8.displayName=O8;var ZN="SliderRange",E8=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=Iy(ZN,n),i=_8(ZN,n),l=y.useRef(null),u=qe(t,l),d=a.values.length,f=a.values.map(g=>k8(g,a.min,a.max)),m=d>1?Math.min(...f):0,p=100-Math.max(...f);return o.jsx(Me.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:u,style:{...e.style,[i.startEdge]:m+"%",[i.endEdge]:p+"%"}})});E8.displayName=ZN;var QN="SliderThumb",A8=y.forwardRef((e,t)=>{const n=wbe(e.__scopeSlider),[r,a]=y.useState(null),i=qe(t,u=>a(u)),l=y.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return o.jsx(Obe,{...e,ref:i,index:l})}),Obe=y.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:a,...i}=e,l=Iy(QN,n),u=_8(QN,n),[d,f]=y.useState(null),m=qe(t,O=>f(O)),p=d?l.form||!!d.closest("form"):!0,g=Ay(d),x=l.values[r],j=x===void 0?0:k8(x,l.min,l.max),b=Abe(r,l.values.length),w=g?.[u.size],N=w?kbe(w,j,u.direction):0;return y.useEffect(()=>{if(d)return l.thumbs.add(d),()=>{l.thumbs.delete(d)}},[d,l.thumbs]),o.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${j}% + ${N}px)`},children:[o.jsx(XN.ItemSlot,{scope:e.__scopeSlider,children:o.jsx(Me.span,{role:"slider","aria-label":e["aria-label"]||b,"aria-valuemin":l.min,"aria-valuenow":x,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:m,style:x===void 0?{display:"none"}:e.style,onFocus:Se(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),p&&o.jsx(T8,{name:a??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:x},r)]})});A8.displayName=QN;var Cbe="RadioBubbleInput",T8=y.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const a=y.useRef(null),i=qe(a,r),l=Ey(t);return y.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const p=new Event("input",{bubbles:!0});m.call(u,t),u.dispatchEvent(p)}},[l,t]),o.jsx(Me.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});T8.displayName=Cbe;function Ebe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((a,i)=>a-i)}function k8(e,t,n){const i=100/(n-t)*(e-t);return Of(i,[0,100])}function Abe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Tbe(e,t){if(e.length===1)return 0;const n=e.map(a=>Math.abs(a-t)),r=Math.min(...n);return n.indexOf(r)}function kbe(e,t,n){const r=e/2,i=cE([0,50],[0,r]);return(r-i(t)*n)*n}function Pbe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Mbe(e,t){if(t>0){const n=Pbe(e);return Math.min(...n)>=t}return!0}function cE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Rbe(e){return(String(e).split(".")[1]||"").length}function Dbe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var P8=j8,$be=C8,Ibe=E8,Lbe=A8;const uE=y.forwardRef(({className:e,...t},n)=>o.jsxs(P8,{ref:n,className:ue("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx($be,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:o.jsx(Ibe,{className:"absolute h-full bg-primary"})}),o.jsx(Lbe,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));uE.displayName=P8.displayName;const Bbe=["top","right","bottom","left"],Zo=Math.min,Qr=Math.max,Ng=Math.round,Up=Math.floor,fi=e=>({x:e,y:e}),zbe={left:"right",right:"left",bottom:"top",top:"bottom"},qbe={start:"end",end:"start"};function JN(e,t,n){return Qr(e,Zo(t,n))}function ao(e,t){return typeof e=="function"?e(t):e}function io(e){return e.split("-")[0]}function Vu(e){return e.split("-")[1]}function dE(e){return e==="x"?"y":"x"}function fE(e){return e==="y"?"height":"width"}const Fbe=new Set(["top","bottom"]);function si(e){return Fbe.has(io(e))?"y":"x"}function hE(e){return dE(si(e))}function Ube(e,t,n){n===void 0&&(n=!1);const r=Vu(e),a=hE(e),i=fE(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Og(l)),[l,Og(l)]}function Hbe(e){const t=Og(e);return[eO(e),t,eO(t)]}function eO(e){return e.replace(/start|end/g,t=>qbe[t])}const sL=["left","right"],lL=["right","left"],Wbe=["top","bottom"],Vbe=["bottom","top"];function Gbe(e,t,n){switch(e){case"top":case"bottom":return n?t?lL:sL:t?sL:lL;case"left":case"right":return t?Wbe:Vbe;default:return[]}}function Ybe(e,t,n,r){const a=Vu(e);let i=Gbe(io(e),n==="start",r);return a&&(i=i.map(l=>l+"-"+a),t&&(i=i.concat(i.map(eO)))),i}function Og(e){return e.replace(/left|right|bottom|top/g,t=>zbe[t])}function Kbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function M8(e){return typeof e!="number"?Kbe(e):{top:e,right:e,bottom:e,left:e}}function Cg(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function cL(e,t,n){let{reference:r,floating:a}=e;const i=si(t),l=hE(t),u=fE(l),d=io(t),f=i==="y",m=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let x;switch(d){case"top":x={x:m,y:r.y-a.height};break;case"bottom":x={x:m,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-a.width,y:p};break;default:x={x:r.x,y:r.y}}switch(Vu(t)){case"start":x[l]-=g*(n&&f?-1:1);break;case"end":x[l]+=g*(n&&f?-1:1);break}return x}const Xbe=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=cL(f,r,d),g=r,x={},j=0;for(let b=0;b<u.length;b++){const{name:w,fn:N}=u[b],{x:O,y:C,data:A,reset:E}=await N({x:m,y:p,initialPlacement:r,placement:g,strategy:a,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});m=O??m,p=C??p,x={...x,[w]:{...x[w],...A}},E&&j<=50&&(j++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(f=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):E.rects),{x:m,y:p}=cL(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:x}};async function fh(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:x=0}=ao(t,e),j=M8(x),w=u[g?p==="floating"?"reference":"floating":p],N=Cg(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),O=p==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),A=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},E=Cg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:O,offsetParent:C,strategy:d}):O);return{top:(N.top-E.top+j.top)/A.y,bottom:(E.bottom-N.bottom+j.bottom)/A.y,left:(N.left-E.left+j.left)/A.x,right:(E.right-N.right+j.right)/A.x}}const Zbe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=ao(e,t)||{};if(f==null)return{};const p=M8(m),g={x:n,y:r},x=hE(a),j=fE(x),b=await l.getDimensions(f),w=x==="y",N=w?"top":"left",O=w?"bottom":"right",C=w?"clientHeight":"clientWidth",A=i.reference[j]+i.reference[x]-g[x]-i.floating[j],E=g[x]-i.reference[x],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let T=k?k[C]:0;(!T||!await(l.isElement==null?void 0:l.isElement(k)))&&(T=u.floating[C]||i.floating[j]);const P=A/2-E/2,$=T/2-b[j]/2-1,z=Zo(p[N],$),D=Zo(p[O],$),U=z,V=T-b[j]-D,H=T/2-b[j]/2+P,G=JN(U,H,V),L=!d.arrow&&Vu(a)!=null&&H!==G&&i.reference[j]/2-(H<U?z:D)-b[j]/2<0,R=L?H<U?H-U:H-V:0;return{[x]:g[x]+R,data:{[x]:G,centerOffset:H-G-R,...L&&{alignmentOffset:R}},reset:L}}}),Qbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:b=!0,...w}=ao(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const N=io(a),O=si(u),C=io(u)===u,A=await(d.isRTL==null?void 0:d.isRTL(f.floating)),E=g||(C||!b?[Og(u)]:Hbe(u)),k=j!=="none";!g&&k&&E.push(...Ybe(u,b,j,A));const T=[u,...E],P=await fh(t,w),$=[];let z=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&$.push(P[N]),p){const H=Ube(a,l,A);$.push(P[H[0]],P[H[1]])}if(z=[...z,{placement:a,overflows:$}],!$.every(H=>H<=0)){var D,U;const H=(((D=i.flip)==null?void 0:D.index)||0)+1,G=T[H];if(G&&(!(p==="alignment"?O!==si(G):!1)||z.every(F=>si(F.placement)===O?F.overflows[0]>0:!0)))return{data:{index:H,overflows:z},reset:{placement:G}};let L=(U=z.filter(R=>R.overflows[0]<=0).sort((R,F)=>R.overflows[1]-F.overflows[1])[0])==null?void 0:U.placement;if(!L)switch(x){case"bestFit":{var V;const R=(V=z.filter(F=>{if(k){const K=si(F.placement);return K===O||K==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(K=>K>0).reduce((K,te)=>K+te,0)]).sort((F,K)=>F[1]-K[1])[0])==null?void 0:V[0];R&&(L=R);break}case"initialPlacement":L=u;break}if(a!==L)return{reset:{placement:L}}}return{}}}};function uL(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dL(e){return Bbe.some(t=>e[t]>=0)}const Jbe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=ao(e,t);switch(r){case"referenceHidden":{const i=await fh(t,{...a,elementContext:"reference"}),l=uL(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:dL(l)}}}case"escaped":{const i=await fh(t,{...a,altBoundary:!0}),l=uL(i,n.floating);return{data:{escapedOffsets:l,escaped:dL(l)}}}default:return{}}}}},R8=new Set(["left","top"]);async function e0e(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=io(n),u=Vu(n),d=si(n)==="y",f=R8.has(l)?-1:1,m=i&&d?-1:1,p=ao(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:j}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof j=="number"&&(x=u==="end"?j*-1:j),d?{x:x*m,y:g*f}:{x:g*f,y:x*m}}const t0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:l,middlewareData:u}=t,d=await e0e(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:i+d.y,data:{...d,placement:l}}}}},n0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:w=>{let{x:N,y:O}=w;return{x:N,y:O}}},...d}=ao(e,t),f={x:n,y:r},m=await fh(t,d),p=si(io(a)),g=dE(p);let x=f[g],j=f[p];if(i){const w=g==="y"?"top":"left",N=g==="y"?"bottom":"right",O=x+m[w],C=x-m[N];x=JN(O,x,C)}if(l){const w=p==="y"?"top":"left",N=p==="y"?"bottom":"right",O=j+m[w],C=j-m[N];j=JN(O,j,C)}const b=u.fn({...t,[g]:x,[p]:j});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:i,[p]:l}}}}}},r0e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=ao(e,t),m={x:n,y:r},p=si(a),g=dE(p);let x=m[g],j=m[p];const b=ao(u,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const C=g==="y"?"height":"width",A=i.reference[g]-i.floating[C]+w.mainAxis,E=i.reference[g]+i.reference[C]-w.mainAxis;x<A?x=A:x>E&&(x=E)}if(f){var N,O;const C=g==="y"?"width":"height",A=R8.has(io(a)),E=i.reference[p]-i.floating[C]+(A&&((N=l.offset)==null?void 0:N[p])||0)+(A?0:w.crossAxis),k=i.reference[p]+i.reference[C]+(A?0:((O=l.offset)==null?void 0:O[p])||0)-(A?w.crossAxis:0);j<E?j=E:j>k&&(j=k)}return{[g]:x,[p]:j}}}},a0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:l,elements:u}=t,{apply:d=()=>{},...f}=ao(e,t),m=await fh(t,f),p=io(a),g=Vu(a),x=si(a)==="y",{width:j,height:b}=i.floating;let w,N;p==="top"||p==="bottom"?(w=p,N=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(N=p,w=g==="end"?"top":"bottom");const O=b-m.top-m.bottom,C=j-m.left-m.right,A=Zo(b-m[w],O),E=Zo(j-m[N],C),k=!t.middlewareData.shift;let T=A,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=O),k&&!g){const z=Qr(m.left,0),D=Qr(m.right,0),U=Qr(m.top,0),V=Qr(m.bottom,0);x?P=j-2*(z!==0||D!==0?z+D:Qr(m.left,m.right)):T=b-2*(U!==0||V!==0?U+V:Qr(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:T});const $=await l.getDimensions(u.floating);return j!==$.width||b!==$.height?{reset:{rects:!0}}:{}}}};function Ly(){return typeof window<"u"}function Gu(e){return D8(e)?(e.nodeName||"").toLowerCase():"#document"}function ra(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bi(e){var t;return(t=(D8(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function D8(e){return Ly()?e instanceof Node||e instanceof ra(e).Node:!1}function Fa(e){return Ly()?e instanceof Element||e instanceof ra(e).Element:!1}function vi(e){return Ly()?e instanceof HTMLElement||e instanceof ra(e).HTMLElement:!1}function fL(e){return!Ly()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ra(e).ShadowRoot}const i0e=new Set(["inline","contents"]);function Fh(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Ua(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!i0e.has(a)}const o0e=new Set(["table","td","th"]);function s0e(e){return o0e.has(Gu(e))}const l0e=[":popover-open",":modal"];function By(e){return l0e.some(t=>{try{return e.matches(t)}catch{return!1}})}const c0e=["transform","translate","scale","rotate","perspective"],u0e=["transform","translate","scale","rotate","perspective","filter"],d0e=["paint","layout","strict","content"];function mE(e){const t=pE(),n=Fa(e)?Ua(e):e;return c0e.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||u0e.some(r=>(n.willChange||"").includes(r))||d0e.some(r=>(n.contain||"").includes(r))}function f0e(e){let t=Qo(e);for(;vi(t)&&!Eu(t);){if(mE(t))return t;if(By(t))return null;t=Qo(t)}return null}function pE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const h0e=new Set(["html","body","#document"]);function Eu(e){return h0e.has(Gu(e))}function Ua(e){return ra(e).getComputedStyle(e)}function zy(e){return Fa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qo(e){if(Gu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fL(e)&&e.host||bi(e);return fL(t)?t.host:t}function $8(e){const t=Qo(e);return Eu(t)?e.ownerDocument?e.ownerDocument.body:e.body:vi(t)&&Fh(t)?t:$8(t)}function hh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=$8(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),l=ra(a);if(i){const u=tO(l);return t.concat(l,l.visualViewport||[],Fh(a)?a:[],u&&n?hh(u):[])}return t.concat(a,hh(a,[],n))}function tO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function I8(e){const t=Ua(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=vi(e),i=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Ng(n)!==i||Ng(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function vE(e){return Fa(e)?e:e.contextElement}function Gc(e){const t=vE(e);if(!vi(t))return fi(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=I8(t);let l=(i?Ng(n.width):n.width)/r,u=(i?Ng(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const m0e=fi(0);function L8(e){const t=ra(e);return!pE()||!t.visualViewport?m0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function p0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ra(e)?!1:t}function hl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=vE(e);let l=fi(1);t&&(r?Fa(r)&&(l=Gc(r)):l=Gc(e));const u=p0e(i,n,r)?L8(i):fi(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,p=a.height/l.y;if(i){const g=ra(i),x=r&&Fa(r)?ra(r):r;let j=g,b=tO(j);for(;b&&r&&x!==j;){const w=Gc(b),N=b.getBoundingClientRect(),O=Ua(b),C=N.left+(b.clientLeft+parseFloat(O.paddingLeft))*w.x,A=N.top+(b.clientTop+parseFloat(O.paddingTop))*w.y;d*=w.x,f*=w.y,m*=w.x,p*=w.y,d+=C,f+=A,j=ra(b),b=tO(j)}}return Cg({width:m,height:p,x:d,y:f})}function qy(e,t){const n=zy(e).scrollLeft;return t?t.left+n:hl(bi(e)).left+n}function B8(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qy(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function v0e(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",l=bi(r),u=t?By(t.floating):!1;if(r===l||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=fi(1);const m=fi(0),p=vi(r);if((p||!p&&!i)&&((Gu(r)!=="body"||Fh(l))&&(d=zy(r)),vi(r))){const x=hl(r);f=Gc(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const g=l&&!p&&!i?B8(l,d):fi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function g0e(e){return Array.from(e.getClientRects())}function y0e(e){const t=bi(e),n=zy(e),r=e.ownerDocument.body,a=Qr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+qy(e);const u=-n.scrollTop;return Ua(r).direction==="rtl"&&(l+=Qr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:l,y:u}}const hL=25;function x0e(e,t){const n=ra(e),r=bi(e),a=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){i=a.width,l=a.height;const m=pE();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=qy(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),x=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,j=Math.abs(r.clientWidth-p.clientWidth-x);j<=hL&&(i-=j)}else f<=hL&&(i+=f);return{width:i,height:l,x:u,y:d}}const b0e=new Set(["absolute","fixed"]);function w0e(e,t){const n=hl(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=vi(e)?Gc(e):fi(1),l=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:l,height:u,x:d,y:f}}function mL(e,t,n){let r;if(t==="viewport")r=x0e(e,n);else if(t==="document")r=y0e(bi(e));else if(Fa(t))r=w0e(t,n);else{const a=L8(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Cg(r)}function z8(e,t){const n=Qo(e);return n===t||!Fa(n)||Eu(n)?!1:Ua(n).position==="fixed"||z8(n,t)}function j0e(e,t){const n=t.get(e);if(n)return n;let r=hh(e,[],!1).filter(u=>Fa(u)&&Gu(u)!=="body"),a=null;const i=Ua(e).position==="fixed";let l=i?Qo(e):e;for(;Fa(l)&&!Eu(l);){const u=Ua(l),d=mE(l);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&b0e.has(a.position)||Fh(l)&&!d&&z8(e,l))?r=r.filter(m=>m!==l):a=u,l=Qo(l)}return t.set(e,r),r}function S0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?By(t)?[]:j0e(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const p=mL(t,m,a);return f.top=Qr(p.top,f.top),f.right=Zo(p.right,f.right),f.bottom=Zo(p.bottom,f.bottom),f.left=Qr(p.left,f.left),f},mL(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function _0e(e){const{width:t,height:n}=I8(e);return{width:t,height:n}}function N0e(e,t,n){const r=vi(t),a=bi(t),i=n==="fixed",l=hl(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=fi(0);function f(){d.x=qy(a)}if(r||!r&&!i)if((Gu(t)!=="body"||Fh(a))&&(u=zy(t)),r){const x=hl(t,!0,i,t);d.x=x.x+t.clientLeft,d.y=x.y+t.clientTop}else a&&f();i&&!r&&a&&f();const m=a&&!r&&!i?B8(a,u):fi(0),p=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function QS(e){return Ua(e).position==="static"}function pL(e,t){if(!vi(e)||Ua(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return bi(e)===n&&(n=n.ownerDocument.body),n}function q8(e,t){const n=ra(e);if(By(e))return n;if(!vi(e)){let a=Qo(e);for(;a&&!Eu(a);){if(Fa(a)&&!QS(a))return a;a=Qo(a)}return n}let r=pL(e,t);for(;r&&s0e(r)&&QS(r);)r=pL(r,t);return r&&Eu(r)&&QS(r)&&!mE(r)?n:r||f0e(e)||n}const O0e=async function(e){const t=this.getOffsetParent||q8,n=this.getDimensions,r=await n(e.floating);return{reference:N0e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C0e(e){return Ua(e).direction==="rtl"}const E0e={convertOffsetParentRelativeRectToViewportRelativeRect:v0e,getDocumentElement:bi,getClippingRect:S0e,getOffsetParent:q8,getElementRects:O0e,getClientRects:g0e,getDimensions:_0e,getScale:Gc,isElement:Fa,isRTL:C0e};function F8(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function A0e(e,t){let n=null,r;const a=bi(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),i();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:x}=f;if(u||t(),!g||!x)return;const j=Up(p),b=Up(a.clientWidth-(m+g)),w=Up(a.clientHeight-(p+x)),N=Up(m),C={rootMargin:-j+"px "+-b+"px "+-w+"px "+-N+"px",threshold:Qr(0,Zo(1,d))||1};let A=!0;function E(k){const T=k[0].intersectionRatio;if(T!==d){if(!A)return l();T?l(!1,T):r=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!F8(f,e.getBoundingClientRect())&&l(),A=!1}try{n=new IntersectionObserver(E,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return l(!0),i}function T0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=vE(e),m=a||i?[...f?hh(f):[],...hh(t)]:[];m.forEach(N=>{a&&N.addEventListener("scroll",n,{passive:!0}),i&&N.addEventListener("resize",n)});const p=f&&u?A0e(f,n):null;let g=-1,x=null;l&&(x=new ResizeObserver(N=>{let[O]=N;O&&O.target===f&&x&&(x.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=x)==null||C.observe(t)})),n()}),f&&!d&&x.observe(f),x.observe(t));let j,b=d?hl(e):null;d&&w();function w(){const N=hl(e);b&&!F8(b,N)&&n(),b=N,j=requestAnimationFrame(w)}return n(),()=>{var N;m.forEach(O=>{a&&O.removeEventListener("scroll",n),i&&O.removeEventListener("resize",n)}),p?.(),(N=x)==null||N.disconnect(),x=null,d&&cancelAnimationFrame(j)}}const k0e=t0e,P0e=n0e,M0e=Qbe,R0e=a0e,D0e=Jbe,vL=Zbe,$0e=r0e,I0e=(e,t,n)=>{const r=new Map,a={platform:E0e,...n},i={...a.platform,_c:r};return Xbe(e,t,{...a,platform:i})};var L0e=typeof document<"u",B0e=function(){},sv=L0e?y.useLayoutEffect:B0e;function Eg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Eg(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!Eg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function U8(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gL(e,t){const n=U8(e);return Math.round(t*n)/n}function JS(e){const t=y.useRef(e);return sv(()=>{t.current=e}),t}function z0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,p]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=y.useState(r);Eg(g,r)||x(r);const[j,b]=y.useState(null),[w,N]=y.useState(null),O=y.useCallback(F=>{F!==k.current&&(k.current=F,b(F))},[]),C=y.useCallback(F=>{F!==T.current&&(T.current=F,N(F))},[]),A=i||j,E=l||w,k=y.useRef(null),T=y.useRef(null),P=y.useRef(m),$=d!=null,z=JS(d),D=JS(a),U=JS(f),V=y.useCallback(()=>{if(!k.current||!T.current)return;const F={placement:t,strategy:n,middleware:g};D.current&&(F.platform=D.current),I0e(k.current,T.current,F).then(K=>{const te={...K,isPositioned:U.current!==!1};H.current&&!Eg(P.current,te)&&(P.current=te,gl.flushSync(()=>{p(te)}))})},[g,t,n,D,U]);sv(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[f]);const H=y.useRef(!1);sv(()=>(H.current=!0,()=>{H.current=!1}),[]),sv(()=>{if(A&&(k.current=A),E&&(T.current=E),A&&E){if(z.current)return z.current(A,E,V);V()}},[A,E,V,z,$]);const G=y.useMemo(()=>({reference:k,floating:T,setReference:O,setFloating:C}),[O,C]),L=y.useMemo(()=>({reference:A,floating:E}),[A,E]),R=y.useMemo(()=>{const F={position:n,left:0,top:0};if(!L.floating)return F;const K=gL(L.floating,m.x),te=gL(L.floating,m.y);return u?{...F,transform:"translate("+K+"px, "+te+"px)",...U8(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:te}},[n,u,L.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:V,refs:G,elements:L,floatingStyles:R}),[m,V,G,L,R])}const q0e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?vL({element:r.current,padding:a}).fn(n):{}:r?vL({element:r,padding:a}).fn(n):{}}}},F0e=(e,t)=>({...k0e(e),options:[e,t]}),U0e=(e,t)=>({...P0e(e),options:[e,t]}),H0e=(e,t)=>({...$0e(e),options:[e,t]}),W0e=(e,t)=>({...M0e(e),options:[e,t]}),V0e=(e,t)=>({...R0e(e),options:[e,t]}),G0e=(e,t)=>({...D0e(e),options:[e,t]}),Y0e=(e,t)=>({...q0e(e),options:[e,t]});var K0e="Arrow",H8=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return o.jsx(Me.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});H8.displayName=K0e;var X0e=H8,gE="Popper",[W8,ss]=fr(gE),[Z0e,V8]=W8(gE),G8=e=>{const{__scopePopper:t,children:n}=e,[r,a]=y.useState(null);return o.jsx(Z0e,{scope:t,anchor:r,onAnchorChange:a,children:n})};G8.displayName=gE;var Y8="PopperAnchor",K8=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=V8(Y8,n),l=y.useRef(null),u=qe(t,l),d=y.useRef(null);return y.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:o.jsx(Me.div,{...a,ref:u})});K8.displayName=Y8;var yE="PopperContent",[Q0e,J0e]=W8(yE),X8=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:x="optimized",onPlaced:j,...b}=e,w=V8(yE,n),[N,O]=y.useState(null),C=qe(t,ee=>O(ee)),[A,E]=y.useState(null),k=Ay(A),T=k?.width??0,P=k?.height??0,$=r+(i!=="center"?"-"+i:""),z=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},D=Array.isArray(f)?f:[f],U=D.length>0,V={padding:z,boundary:D.filter(twe),altBoundary:U},{refs:H,floatingStyles:G,placement:L,isPositioned:R,middlewareData:F}=z0e({strategy:"fixed",placement:$,whileElementsMounted:(...ee)=>T0e(...ee,{animationFrame:x==="always"}),elements:{reference:w.anchor},middleware:[F0e({mainAxis:a+P,alignmentAxis:l}),d&&U0e({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?H0e():void 0,...V}),d&&W0e({...V}),V0e({...V,apply:({elements:ee,rects:ae,availableWidth:Z,availableHeight:pe})=>{const{width:je,height:le}=ae.reference,Re=ee.floating.style;Re.setProperty("--radix-popper-available-width",`${Z}px`),Re.setProperty("--radix-popper-available-height",`${pe}px`),Re.setProperty("--radix-popper-anchor-width",`${je}px`),Re.setProperty("--radix-popper-anchor-height",`${le}px`)}}),A&&Y0e({element:A,padding:u}),nwe({arrowWidth:T,arrowHeight:P}),g&&G0e({strategy:"referenceHidden",...V})]}),[K,te]=J8(L),I=tn(j);Fn(()=>{R&&I?.()},[R,I]);const B=F.arrow?.x,Y=F.arrow?.y,ne=F.arrow?.centerOffset!==0,[oe,xe]=y.useState();return Fn(()=>{N&&xe(window.getComputedStyle(N).zIndex)},[N]),o.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:R?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Q0e,{scope:n,placedSide:K,onArrowChange:E,arrowX:B,arrowY:Y,shouldHideArrow:ne,children:o.jsx(Me.div,{"data-side":K,"data-align":te,...b,ref:C,style:{...b.style,animation:R?void 0:"none"}})})})});X8.displayName=yE;var Z8="PopperArrow",ewe={top:"bottom",right:"left",bottom:"top",left:"right"},Q8=y.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=J0e(Z8,r),l=ewe[i.placedSide];return o.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:o.jsx(X0e,{...a,ref:n,style:{...a.style,display:"block"}})})});Q8.displayName=Z8;function twe(e){return e!==null}var nwe=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=J8(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(a.arrow?.x??0)+u/2,x=(a.arrow?.y??0)+d/2;let j="",b="";return f==="bottom"?(j=l?p:`${g}px`,b=`${-d}px`):f==="top"?(j=l?p:`${g}px`,b=`${r.floating.height+d}px`):f==="right"?(j=`${-d}px`,b=l?p:`${x}px`):f==="left"&&(j=`${r.floating.width+d}px`,b=l?p:`${x}px`),{data:{x:j,y:b}}}});function J8(e){const[t,n="center"]=e.split("-");return[t,n]}var Uh=G8,Hh=K8,Fy=X8,Uy=Q8;function rwe(e){const t=awe(e),n=y.forwardRef((r,a)=>{const{children:i,...l}=r,u=y.Children.toArray(i),d=u.find(owe);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return o.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return o.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function awe(e){const t=y.forwardRef((n,r)=>{const{children:a,...i}=n;if(y.isValidElement(a)){const l=lwe(a),u=swe(i,a.props);return a.type!==y.Fragment&&(u.ref=r?Mr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var iwe=Symbol("radix.slottable");function owe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iwe}function swe(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function lwe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var eU=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),cwe="VisuallyHidden",Hy=y.forwardRef((e,t)=>o.jsx(Me.span,{...e,ref:t,style:{...eU,...e.style}}));Hy.displayName=cwe;var uwe=Hy,dwe=[" ","Enter","ArrowUp","ArrowDown"],fwe=[" ","Enter"],ml="Select",[Wy,Vy,hwe]=_h(ml),[Yu]=fr(ml,[hwe,ss]),Gy=ss(),[mwe,ls]=Yu(ml),[pwe,vwe]=Yu(ml),tU=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:p,disabled:g,required:x,form:j}=e,b=Gy(t),[w,N]=y.useState(null),[O,C]=y.useState(null),[A,E]=y.useState(!1),k=$u(f),[T,P]=_a({prop:r,defaultProp:a??!1,onChange:i,caller:ml}),[$,z]=_a({prop:l,defaultProp:u,onChange:d,caller:ml}),D=y.useRef(null),U=w?j||!!w.closest("form"):!0,[V,H]=y.useState(new Set),G=Array.from(V).map(L=>L.props.value).join(";");return o.jsx(Uh,{...b,children:o.jsxs(mwe,{required:x,scope:t,trigger:w,onTriggerChange:N,valueNode:O,onValueNodeChange:C,valueNodeHasChildren:A,onValueNodeHasChildrenChange:E,contentId:qn(),value:$,onValueChange:z,open:T,onOpenChange:P,dir:k,triggerPointerDownPosRef:D,disabled:g,children:[o.jsx(Wy.Provider,{scope:t,children:o.jsx(pwe,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(L=>{H(R=>new Set(R).add(L))},[]),onNativeOptionRemove:y.useCallback(L=>{H(R=>{const F=new Set(R);return F.delete(L),F})},[]),children:n})}),U?o.jsxs(NU,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:p,value:$,onChange:L=>z(L.target.value),disabled:g,form:j,children:[$===void 0?o.jsx("option",{value:""}):null,Array.from(V)]},G):null]})})};tU.displayName=ml;var nU="SelectTrigger",rU=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=Gy(n),l=ls(nU,n),u=l.disabled||r,d=qe(t,l.onTriggerChange),f=Vy(n),m=y.useRef("touch"),[p,g,x]=CU(b=>{const w=f().filter(C=>!C.disabled),N=w.find(C=>C.value===l.value),O=EU(w,b,N);O!==void 0&&l.onValueChange(O.value)}),j=b=>{u||(l.onOpenChange(!0),x()),b&&(l.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return o.jsx(Hh,{asChild:!0,...i,children:o.jsx(Me.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":OU(l.value)?"":void 0,...a,ref:d,onClick:Se(a.onClick,b=>{b.currentTarget.focus(),m.current!=="mouse"&&j(b)}),onPointerDown:Se(a.onPointerDown,b=>{m.current=b.pointerType;const w=b.target;w.hasPointerCapture(b.pointerId)&&w.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(j(b),b.preventDefault())}),onKeyDown:Se(a.onKeyDown,b=>{const w=p.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&g(b.key),!(w&&b.key===" ")&&dwe.includes(b.key)&&(j(),b.preventDefault())})})})});rU.displayName=nU;var aU="SelectValue",iU=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:l="",...u}=e,d=ls(aU,n),{onValueNodeHasChildrenChange:f}=d,m=i!==void 0,p=qe(t,d.onValueNodeChange);return Fn(()=>{f(m)},[f,m]),o.jsx(Me.span,{...u,ref:p,style:{pointerEvents:"none"},children:OU(d.value)?o.jsx(o.Fragment,{children:l}):i})});iU.displayName=aU;var gwe="SelectIcon",oU=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return o.jsx(Me.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});oU.displayName=gwe;var ywe="SelectPortal",sU=e=>o.jsx(_l,{asChild:!0,...e});sU.displayName=ywe;var pl="SelectContent",lU=y.forwardRef((e,t)=>{const n=ls(pl,e.__scopeSelect),[r,a]=y.useState();if(Fn(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?gl.createPortal(o.jsx(cU,{scope:e.__scopeSelect,children:o.jsx(Wy.Slot,{scope:e.__scopeSelect,children:o.jsx("div",{children:e.children})})}),i):null}return o.jsx(uU,{...e,ref:t})});lU.displayName=pl;var Da=10,[cU,cs]=Yu(pl),xwe="SelectContentImpl",bwe=rwe("SelectContent.RemoveScroll"),uU=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:x,sticky:j,hideWhenDetached:b,avoidCollisions:w,...N}=e,O=ls(pl,n),[C,A]=y.useState(null),[E,k]=y.useState(null),T=qe(t,ee=>A(ee)),[P,$]=y.useState(null),[z,D]=y.useState(null),U=Vy(n),[V,H]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(C)return My(C)},[C]),ky();const L=y.useCallback(ee=>{const[ae,...Z]=U().map(le=>le.ref.current),[pe]=Z.slice(-1),je=document.activeElement;for(const le of ee)if(le===je||(le?.scrollIntoView({block:"nearest"}),le===ae&&E&&(E.scrollTop=0),le===pe&&E&&(E.scrollTop=E.scrollHeight),le?.focus(),document.activeElement!==je))return},[U,E]),R=y.useCallback(()=>L([P,C]),[L,P,C]);y.useEffect(()=>{V&&R()},[V,R]);const{onOpenChange:F,triggerPointerDownPosRef:K}=O;y.useEffect(()=>{if(C){let ee={x:0,y:0};const ae=pe=>{ee={x:Math.abs(Math.round(pe.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(pe.pageY)-(K.current?.y??0))}},Z=pe=>{ee.x<=10&&ee.y<=10?pe.preventDefault():C.contains(pe.target)||F(!1),document.removeEventListener("pointermove",ae),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",Z,{capture:!0})}}},[C,F,K]),y.useEffect(()=>{const ee=()=>F(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[F]);const[te,I]=CU(ee=>{const ae=U().filter(je=>!je.disabled),Z=ae.find(je=>je.ref.current===document.activeElement),pe=EU(ae,ee,Z);pe&&setTimeout(()=>pe.ref.current.focus())}),B=y.useCallback((ee,ae,Z)=>{const pe=!G.current&&!Z;(O.value!==void 0&&O.value===ae||pe)&&($(ee),pe&&(G.current=!0))},[O.value]),Y=y.useCallback(()=>C?.focus(),[C]),ne=y.useCallback((ee,ae,Z)=>{const pe=!G.current&&!Z;(O.value!==void 0&&O.value===ae||pe)&&D(ee)},[O.value]),oe=r==="popper"?nO:dU,xe=oe===nO?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:x,sticky:j,hideWhenDetached:b,avoidCollisions:w}:{};return o.jsx(cU,{scope:n,content:C,viewport:E,onViewportChange:k,itemRefCallback:B,selectedItem:P,onItemLeave:Y,itemTextRefCallback:ne,focusSelectedItem:R,selectedItemText:z,position:r,isPositioned:V,searchRef:te,children:o.jsx(qh,{as:bwe,allowPinchZoom:!0,children:o.jsx(zh,{asChild:!0,trapped:O.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:Se(a,ee=>{O.trigger?.focus({preventScroll:!0}),ee.preventDefault()}),children:o.jsx(Sl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:o.jsx(oe,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ee=>ee.preventDefault(),...N,...xe,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Se(N.onKeyDown,ee=>{const ae=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ae&&ee.key.length===1&&I(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let pe=U().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const je=ee.target,le=pe.indexOf(je);pe=pe.slice(le+1)}setTimeout(()=>L(pe)),ee.preventDefault()}})})})})})})});uU.displayName=xwe;var wwe="SelectItemAlignedPosition",dU=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=ls(pl,n),l=cs(pl,n),[u,d]=y.useState(null),[f,m]=y.useState(null),p=qe(t,T=>m(T)),g=Vy(n),x=y.useRef(!1),j=y.useRef(!0),{viewport:b,selectedItem:w,selectedItemText:N,focusSelectedItem:O}=l,C=y.useCallback(()=>{if(i.trigger&&i.valueNode&&u&&f&&b&&w&&N){const T=i.trigger.getBoundingClientRect(),P=f.getBoundingClientRect(),$=i.valueNode.getBoundingClientRect(),z=N.getBoundingClientRect();if(i.dir!=="rtl"){const je=z.left-P.left,le=$.left-je,Re=T.left-le,_e=T.width+Re,me=Math.max(_e,P.width),ve=window.innerWidth-Da,Le=Of(le,[Da,Math.max(Da,ve-me)]);u.style.minWidth=_e+"px",u.style.left=Le+"px"}else{const je=P.right-z.right,le=window.innerWidth-$.right-je,Re=window.innerWidth-T.right-le,_e=T.width+Re,me=Math.max(_e,P.width),ve=window.innerWidth-Da,Le=Of(le,[Da,Math.max(Da,ve-me)]);u.style.minWidth=_e+"px",u.style.right=Le+"px"}const D=g(),U=window.innerHeight-Da*2,V=b.scrollHeight,H=window.getComputedStyle(f),G=parseInt(H.borderTopWidth,10),L=parseInt(H.paddingTop,10),R=parseInt(H.borderBottomWidth,10),F=parseInt(H.paddingBottom,10),K=G+L+V+F+R,te=Math.min(w.offsetHeight*5,K),I=window.getComputedStyle(b),B=parseInt(I.paddingTop,10),Y=parseInt(I.paddingBottom,10),ne=T.top+T.height/2-Da,oe=U-ne,xe=w.offsetHeight/2,ee=w.offsetTop+xe,ae=G+L+ee,Z=K-ae;if(ae<=ne){const je=D.length>0&&w===D[D.length-1].ref.current;u.style.bottom="0px";const le=f.clientHeight-b.offsetTop-b.offsetHeight,Re=Math.max(oe,xe+(je?Y:0)+le+R),_e=ae+Re;u.style.height=_e+"px"}else{const je=D.length>0&&w===D[0].ref.current;u.style.top="0px";const Re=Math.max(ne,G+b.offsetTop+(je?B:0)+xe)+Z;u.style.height=Re+"px",b.scrollTop=ae-ne+b.offsetTop}u.style.margin=`${Da}px 0`,u.style.minHeight=te+"px",u.style.maxHeight=U+"px",r?.(),requestAnimationFrame(()=>x.current=!0)}},[g,i.trigger,i.valueNode,u,f,b,w,N,i.dir,r]);Fn(()=>C(),[C]);const[A,E]=y.useState();Fn(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);const k=y.useCallback(T=>{T&&j.current===!0&&(C(),O?.(),j.current=!1)},[C,O]);return o.jsx(Swe,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:k,children:o.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:o.jsx(Me.div,{...a,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});dU.displayName=wwe;var jwe="SelectPopperPosition",nO=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Da,...i}=e,l=Gy(n);return o.jsx(Fy,{...l,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});nO.displayName=jwe;var[Swe,xE]=Yu(pl,{}),rO="SelectViewport",fU=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=cs(rO,n),l=xE(rO,n),u=qe(t,i.onViewportChange),d=y.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),o.jsx(Wy.Slot,{scope:n,children:o.jsx(Me.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Se(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=l;if(g?.current&&p){const x=Math.abs(d.current-m.scrollTop);if(x>0){const j=window.innerHeight-Da*2,b=parseFloat(p.style.minHeight),w=parseFloat(p.style.height),N=Math.max(b,w);if(N<j){const O=N+x,C=Math.min(j,O),A=O-C;p.style.height=C+"px",p.style.bottom==="0px"&&(m.scrollTop=A>0?A:0,p.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});fU.displayName=rO;var hU="SelectGroup",[_we,Nwe]=Yu(hU),Owe=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=qn();return o.jsx(_we,{scope:n,id:a,children:o.jsx(Me.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Owe.displayName=hU;var mU="SelectLabel",pU=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Nwe(mU,n);return o.jsx(Me.div,{id:a.id,...r,ref:t})});pU.displayName=mU;var Ag="SelectItem",[Cwe,vU]=Yu(Ag),gU=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...l}=e,u=ls(Ag,n),d=cs(Ag,n),f=u.value===r,[m,p]=y.useState(i??""),[g,x]=y.useState(!1),j=qe(t,O=>d.itemRefCallback?.(O,r,a)),b=qn(),w=y.useRef("touch"),N=()=>{a||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.jsx(Cwe,{scope:n,value:r,disabled:a,textId:b,isSelected:f,onItemTextChange:y.useCallback(O=>{p(C=>C||(O?.textContent??"").trim())},[]),children:o.jsx(Wy.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:o.jsx(Me.div,{role:"option","aria-labelledby":b,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:j,onFocus:Se(l.onFocus,()=>x(!0)),onBlur:Se(l.onBlur,()=>x(!1)),onClick:Se(l.onClick,()=>{w.current!=="mouse"&&N()}),onPointerUp:Se(l.onPointerUp,()=>{w.current==="mouse"&&N()}),onPointerDown:Se(l.onPointerDown,O=>{w.current=O.pointerType}),onPointerMove:Se(l.onPointerMove,O=>{w.current=O.pointerType,a?d.onItemLeave?.():w.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(l.onPointerLeave,O=>{O.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Se(l.onKeyDown,O=>{d.searchRef?.current!==""&&O.key===" "||(fwe.includes(O.key)&&N(),O.key===" "&&O.preventDefault())})})})})});gU.displayName=Ag;var df="SelectItemText",yU=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,l=ls(df,n),u=cs(df,n),d=vU(df,n),f=vwe(df,n),[m,p]=y.useState(null),g=qe(t,N=>p(N),d.onItemTextChange,N=>u.itemTextRefCallback?.(N,d.value,d.disabled)),x=m?.textContent,j=y.useMemo(()=>o.jsx("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:b,onNativeOptionRemove:w}=f;return Fn(()=>(b(j),()=>w(j)),[b,w,j]),o.jsxs(o.Fragment,{children:[o.jsx(Me.span,{id:d.textId,...i,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?gl.createPortal(i.children,l.valueNode):null]})});yU.displayName=df;var xU="SelectItemIndicator",bU=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return vU(xU,n).isSelected?o.jsx(Me.span,{"aria-hidden":!0,...r,ref:t}):null});bU.displayName=xU;var aO="SelectScrollUpButton",wU=y.forwardRef((e,t)=>{const n=cs(aO,e.__scopeSelect),r=xE(aO,e.__scopeSelect),[a,i]=y.useState(!1),l=qe(t,r.onScrollButtonChange);return Fn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;i(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?o.jsx(SU,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});wU.displayName=aO;var iO="SelectScrollDownButton",jU=y.forwardRef((e,t)=>{const n=cs(iO,e.__scopeSelect),r=xE(iO,e.__scopeSelect),[a,i]=y.useState(!1),l=qe(t,r.onScrollButtonChange);return Fn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;i(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?o.jsx(SU,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});jU.displayName=iO;var SU=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=cs("SelectScrollButton",n),l=y.useRef(null),u=Vy(n),d=y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return y.useEffect(()=>()=>d(),[d]),Fn(()=>{u().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),o.jsx(Me.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Se(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Se(a.onPointerMove,()=>{i.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Se(a.onPointerLeave,()=>{d()})})}),Ewe="SelectSeparator",_U=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return o.jsx(Me.div,{"aria-hidden":!0,...r,ref:t})});_U.displayName=Ewe;var oO="SelectArrow",Awe=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Gy(n),i=ls(oO,n),l=cs(oO,n);return i.open&&l.position==="popper"?o.jsx(Uy,{...a,...r,ref:t}):null});Awe.displayName=oO;var Twe="SelectBubbleInput",NU=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=y.useRef(null),i=qe(r,a),l=Ey(t);return y.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const p=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(p)}},[l,t]),o.jsx(Me.select,{...n,style:{...eU,...n.style},ref:i,defaultValue:t})});NU.displayName=Twe;function OU(e){return e===""||e===void 0}function CU(e){const t=tn(e),n=y.useRef(""),r=y.useRef(0),a=y.useCallback(l=>{const u=n.current+l;t(u),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),i=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function EU(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=kwe(e,Math.max(i,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function kwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Pwe=tU,AU=rU,Mwe=iU,Rwe=oU,Dwe=sU,TU=lU,$we=fU,kU=pU,PU=gU,Iwe=yU,Lwe=bU,MU=wU,RU=jU,DU=_U;const Et=Pwe,At=Mwe,wt=y.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(AU,{ref:r,className:ue("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,o.jsx(Rwe,{asChild:!0,children:o.jsx(lh,{className:"h-4 w-4 opacity-50"})})]}));wt.displayName=AU.displayName;const $U=y.forwardRef(({className:e,...t},n)=>o.jsx(MU,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(zN,{className:"h-4 w-4"})}));$U.displayName=MU.displayName;const IU=y.forwardRef(({className:e,...t},n)=>o.jsx(RU,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(lh,{className:"h-4 w-4"})}));IU.displayName=RU.displayName;const jt=y.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>o.jsx(Dwe,{children:o.jsxs(TU,{ref:a,className:ue("relative z-[100] max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-hidden rounded-md border border-border bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[o.jsx($U,{}),o.jsx($we,{className:ue("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(IU,{})]})}));jt.displayName=TU.displayName;const Bwe=y.forwardRef(({className:e,...t},n)=>o.jsx(kU,{ref:n,className:ue("px-2 py-1.5 text-sm font-semibold",e),...t}));Bwe.displayName=kU.displayName;const Pe=y.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(PU,{ref:r,className:ue("relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2 pr-8 text-sm outline-none bg-white dark:bg-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 focus:bg-gray-100 dark:focus:bg-gray-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Lwe,{children:o.jsx(tl,{className:"h-4 w-4"})})}),o.jsx(Iwe,{children:t})]}));Pe.displayName=PU.displayName;const zwe=y.forwardRef(({className:e,...t},n)=>o.jsx(DU,{ref:n,className:ue("-mx-1 my-1 h-px bg-muted",e),...t}));zwe.displayName=DU.displayName;function qwe(e){const t=Fwe(e),n=y.forwardRef((r,a)=>{const{children:i,...l}=r,u=y.Children.toArray(i),d=u.find(Hwe);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return o.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return o.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function Fwe(e){const t=y.forwardRef((n,r)=>{const{children:a,...i}=n;if(y.isValidElement(a)){const l=Vwe(a),u=Wwe(i,a.props);return a.type!==y.Fragment&&(u.ref=r?Mr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Uwe=Symbol("radix.slottable");function Hwe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Uwe}function Wwe(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function Vwe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yy="Popover",[LU]=fr(Yy,[ss]),Wh=ss(),[Gwe,us]=LU(Yy),BU=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!1}=e,u=Wh(t),d=y.useRef(null),[f,m]=y.useState(!1),[p,g]=_a({prop:r,defaultProp:a??!1,onChange:i,caller:Yy});return o.jsx(Uh,{...u,children:o.jsx(Gwe,{scope:t,contentId:qn(),triggerRef:d,open:p,onOpenChange:g,onOpenToggle:y.useCallback(()=>g(x=>!x),[g]),hasCustomAnchor:f,onCustomAnchorAdd:y.useCallback(()=>m(!0),[]),onCustomAnchorRemove:y.useCallback(()=>m(!1),[]),modal:l,children:n})})};BU.displayName=Yy;var zU="PopoverAnchor",Ywe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=us(zU,n),i=Wh(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=a;return y.useEffect(()=>(l(),()=>u()),[l,u]),o.jsx(Hh,{...i,...r,ref:t})});Ywe.displayName=zU;var qU="PopoverTrigger",FU=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=us(qU,n),i=Wh(n),l=qe(t,a.triggerRef),u=o.jsx(Me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":GU(a.open),...r,ref:l,onClick:Se(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?u:o.jsx(Hh,{asChild:!0,...i,children:u})});FU.displayName=qU;var bE="PopoverPortal",[Kwe,Xwe]=LU(bE,{forceMount:void 0}),UU=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,i=us(bE,t);return o.jsx(Kwe,{scope:t,forceMount:n,children:o.jsx(Mn,{present:n||i.open,children:o.jsx(_l,{asChild:!0,container:a,children:r})})})};UU.displayName=bE;var Au="PopoverContent",HU=y.forwardRef((e,t)=>{const n=Xwe(Au,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,i=us(Au,e.__scopePopover);return o.jsx(Mn,{present:r||i.open,children:i.modal?o.jsx(Qwe,{...a,ref:t}):o.jsx(Jwe,{...a,ref:t})})});HU.displayName=Au;var Zwe=qwe("PopoverContent.RemoveScroll"),Qwe=y.forwardRef((e,t)=>{const n=us(Au,e.__scopePopover),r=y.useRef(null),a=qe(t,r),i=y.useRef(!1);return y.useEffect(()=>{const l=r.current;if(l)return My(l)},[]),o.jsx(qh,{as:Zwe,allowPinchZoom:!0,children:o.jsx(WU,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,l=>{l.preventDefault(),i.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;i.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Se(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),Jwe=y.forwardRef((e,t)=>{const n=us(Au,e.__scopePopover),r=y.useRef(!1),a=y.useRef(!1);return o.jsx(WU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=i.target;n.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),WU=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,...p}=e,g=us(Au,n),x=Wh(n);return ky(),o.jsx(zh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:o.jsx(Sl,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:m,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onDismiss:()=>g.onOpenChange(!1),children:o.jsx(Fy,{"data-state":GU(g.open),role:"dialog",id:g.contentId,...x,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),VU="PopoverClose",eje=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=us(VU,n);return o.jsx(Me.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,()=>a.onOpenChange(!1))})});eje.displayName=VU;var tje="PopoverArrow",nje=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Wh(n);return o.jsx(Uy,{...a,...r,ref:t})});nje.displayName=tje;function GU(e){return e?"open":"closed"}var rje=BU,aje=FU,ije=UU,YU=HU;const Jo=rje,es=aje,oo=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>o.jsx(ije,{children:o.jsx(YU,{ref:a,align:t,sideOffset:n,className:ue("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...r})}));oo.displayName=YU.displayName;const Ku="/api/webui/config";async function oje(){const t=await(await Ze(`${Ku}/bot`)).json();if(!t.success)throw new Error("获取配置数据失败");return t.config}async function Tg(){const t=await(await Ze(`${Ku}/model`)).json();if(!t.success)throw new Error("获取模型配置数据失败");return t.config}async function sje(e){const n=await(await Ze(`${Ku}/bot`,{method:"POST",headers:st(),body:JSON.stringify(e)})).json();if(!n.success)throw new Error(n.message||"保存配置失败")}async function KU(e){const n=await(await Ze(`${Ku}/model`,{method:"POST",headers:st(),body:JSON.stringify(e)})).json();if(!n.success)throw new Error(n.message||"保存配置失败")}async function lje(e,t){const r=await(await Ze(`${Ku}/bot/section/${e}`,{method:"POST",headers:st(),body:JSON.stringify(t)})).json();if(!r.success)throw new Error(r.message||`保存配置节 ${e} 失败`)}async function sO(e,t){const r=await(await Ze(`${Ku}/model/section/${e}`,{method:"POST",headers:st(),body:JSON.stringify(t)})).json();if(!r.success)throw new Error(r.message||`保存配置节 ${e} 失败`)}function cje(){const[e,t]=y.useState(!0),[n,r]=y.useState(!1),[a,i]=y.useState(!1),[l,u]=y.useState(!1),{toast:d}=hr(),[f,m]=y.useState(null),[p,g]=y.useState(null),[x,j]=y.useState(null),[b,w]=y.useState(null),[N,O]=y.useState(null),[C,A]=y.useState(null),[E,k]=y.useState(null),[T,P]=y.useState(null),[$,z]=y.useState(null),[D,U]=y.useState(null),[V,H]=y.useState(null),[G,L]=y.useState(null),[R,F]=y.useState(null),[K,te]=y.useState(null),[I,B]=y.useState(null),[Y,ne]=y.useState(null),[oe,xe]=y.useState(null),[ee,ae]=y.useState(null),Z=y.useRef(null),pe=y.useRef(!0),je=y.useRef({}),le=y.useCallback(async()=>{try{t(!0);const ve=await oje();je.current=ve,m(ve.bot),g(ve.personality);const Le=ve.chat;Le.talk_value_rules||(Le.talk_value_rules=[]),j(Le),w(ve.expression),O(ve.emoji),A(ve.memory),k(ve.tool),P(ve.mood),z(ve.voice),U(ve.lpmm_knowledge),H(ve.keyword_reaction),L(ve.response_post_process),F(ve.chinese_typo),te(ve.response_splitter),B(ve.log),ne(ve.debug),xe(ve.maim_message),ae(ve.telemetry),u(!1),pe.current=!1}catch(ve){console.error("加载配置失败:",ve),d({title:"加载失败",description:"无法加载配置文件",variant:"destructive"})}finally{t(!1)}},[d]);y.useEffect(()=>{le()},[le]);const Re=y.useCallback(async(ve,Le)=>{if(!pe.current)try{i(!0),await lje(ve,Le),u(!1)}catch(Dt){console.error(`自动保存 ${ve} 失败:`,Dt),u(!0)}finally{i(!1)}},[]),_e=y.useCallback((ve,Le)=>{pe.current||(u(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>{Re(ve,Le)},2e3))},[Re]);y.useEffect(()=>{f&&!pe.current&&_e("bot",f)},[f,_e]),y.useEffect(()=>{p&&!pe.current&&_e("personality",p)},[p,_e]),y.useEffect(()=>{x&&!pe.current&&_e("chat",x)},[x,_e]),y.useEffect(()=>{b&&!pe.current&&_e("expression",b)},[b,_e]),y.useEffect(()=>{N&&!pe.current&&_e("emoji",N)},[N,_e]),y.useEffect(()=>{C&&!pe.current&&_e("memory",C)},[C,_e]),y.useEffect(()=>{E&&!pe.current&&_e("tool",E)},[E,_e]),y.useEffect(()=>{T&&!pe.current&&_e("mood",T)},[T,_e]),y.useEffect(()=>{$&&!pe.current&&_e("voice",$)},[$,_e]),y.useEffect(()=>{D&&!pe.current&&_e("lpmm_knowledge",D)},[D,_e]),y.useEffect(()=>{V&&!pe.current&&_e("keyword_reaction",V)},[V,_e]),y.useEffect(()=>{G&&!pe.current&&_e("response_post_process",G)},[G,_e]),y.useEffect(()=>{R&&!pe.current&&_e("chinese_typo",R)},[R,_e]),y.useEffect(()=>{K&&!pe.current&&_e("response_splitter",K)},[K,_e]),y.useEffect(()=>{I&&!pe.current&&_e("log",I)},[I,_e]),y.useEffect(()=>{Y&&!pe.current&&_e("debug",Y)},[Y,_e]),y.useEffect(()=>{oe&&!pe.current&&_e("maim_message",oe)},[oe,_e]),y.useEffect(()=>{ee&&!pe.current&&_e("telemetry",ee)},[ee,_e]);const me=async()=>{try{r(!0),Z.current&&clearTimeout(Z.current);const ve={...je.current,bot:f,personality:p,chat:x,expression:b,emoji:N,memory:C,tool:E,mood:T,voice:$,lpmm_knowledge:D,keyword_reaction:V,response_post_process:G,chinese_typo:R,response_splitter:K,log:I,debug:Y,maim_message:oe,telemetry:ee};await sje(ve),u(!1),d({title:"保存成功",description:"麦麦主程序配置已保存"})}catch(ve){console.error("保存配置失败:",ve),d({title:"保存失败",description:ve.message,variant:"destructive"})}finally{r(!1)}};return e?o.jsx(Xt,{className:"h-full",children:o.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:o.jsx("div",{className:"flex items-center justify-center h-64",children:o.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):o.jsx(Xt,{className:"h-full",children:o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"麦麦主程序配置"}),o.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦的核心功能和行为设置"})]}),o.jsxs(fe,{onClick:me,disabled:n||a||!l,size:"sm",className:"w-full sm:w-auto",children:[o.jsx(VC,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),n?"保存中...":a?"自动保存中...":l?"保存配置":"已保存"]})]}),o.jsxs(ol,{defaultValue:"bot",className:"w-full",children:[o.jsx("div",{className:"overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0",children:o.jsxs(Xo,{className:"inline-flex w-auto min-w-full sm:grid sm:w-full sm:grid-cols-5 lg:grid-cols-10",children:[o.jsx(Ct,{value:"bot",className:"flex-shrink-0",children:"基本信息"}),o.jsx(Ct,{value:"personality",className:"flex-shrink-0",children:"人格"}),o.jsx(Ct,{value:"chat",className:"flex-shrink-0",children:"聊天"}),o.jsx(Ct,{value:"expression",className:"flex-shrink-0",children:"表达"}),o.jsx(Ct,{value:"features",className:"flex-shrink-0",children:"功能"}),o.jsx(Ct,{value:"processing",className:"flex-shrink-0",children:"处理"}),o.jsx(Ct,{value:"mood",className:"flex-shrink-0",children:"情绪"}),o.jsx(Ct,{value:"voice",className:"flex-shrink-0",children:"语音"}),o.jsx(Ct,{value:"lpmm",className:"flex-shrink-0",children:"知识库"}),o.jsx(Ct,{value:"other",className:"flex-shrink-0",children:"其他"})]})}),o.jsx(Qt,{value:"bot",className:"space-y-4",children:f&&o.jsx(uje,{config:f,onChange:m})}),o.jsx(Qt,{value:"personality",className:"space-y-4",children:p&&o.jsx(dje,{config:p,onChange:g})}),o.jsx(Qt,{value:"chat",className:"space-y-4",children:x&&o.jsx(fje,{config:x,onChange:j})}),o.jsx(Qt,{value:"expression",className:"space-y-4",children:b&&o.jsx(hje,{config:b,onChange:w})}),o.jsx(Qt,{value:"features",className:"space-y-4",children:N&&C&&E&&o.jsx(mje,{emojiConfig:N,memoryConfig:C,toolConfig:E,onEmojiChange:O,onMemoryChange:A,onToolChange:k})}),o.jsx(Qt,{value:"processing",className:"space-y-4",children:V&&G&&R&&K&&o.jsx(pje,{keywordReactionConfig:V,responsePostProcessConfig:G,chineseTypoConfig:R,responseSplitterConfig:K,onKeywordReactionChange:H,onResponsePostProcessChange:L,onChineseTypoChange:F,onResponseSplitterChange:te})}),o.jsx(Qt,{value:"mood",className:"space-y-4",children:T&&o.jsx(vje,{config:T,onChange:P})}),o.jsx(Qt,{value:"voice",className:"space-y-4",children:$&&o.jsx(gje,{config:$,onChange:z})}),o.jsx(Qt,{value:"lpmm",className:"space-y-4",children:D&&o.jsx(yje,{config:D,onChange:U})}),o.jsxs(Qt,{value:"other",className:"space-y-4",children:[I&&o.jsx(xje,{config:I,onChange:B}),Y&&o.jsx(bje,{config:Y,onChange:ne}),oe&&o.jsx(wje,{config:oe,onChange:xe}),ee&&o.jsx(jje,{config:ee,onChange:ae})]})]})]})})}function uje({config:e,onChange:t}){const n=()=>{t({...e,platforms:[...e.platforms,""]})},r=d=>{t({...e,platforms:e.platforms.filter((f,m)=>m!==d)})},a=(d,f)=>{const m=[...e.platforms];m[d]=f,t({...e,platforms:m})},i=()=>{t({...e,alias_names:[...e.alias_names,""]})},l=d=>{t({...e,alias_names:e.alias_names.filter((f,m)=>m!==d)})},u=(d,f)=>{const m=[...e.alias_names];m[d]=f,t({...e,alias_names:m})};return o.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"基本信息"}),o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"platform",children:"平台"}),o.jsx(Ne,{id:"platform",value:e.platform,onChange:d=>t({...e,platform:d.target.value}),placeholder:"qq"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"qq_account",children:"QQ账号"}),o.jsx(Ne,{id:"qq_account",value:e.qq_account,onChange:d=>t({...e,qq_account:d.target.value}),placeholder:"123456789"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"nickname",children:"昵称"}),o.jsx(Ne,{id:"nickname",value:e.nickname,onChange:d=>t({...e,nickname:d.target.value}),placeholder:"麦麦"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(J,{children:"其他平台账号"}),o.jsxs(fe,{onClick:n,size:"sm",variant:"outline",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加"]})]}),o.jsxs("div",{className:"space-y-2",children:[e.platforms.map((d,f)=>o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ne,{value:d,onChange:m=>a(f,m.target.value),placeholder:"wx:114514"}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"icon",variant:"outline",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:['确定要删除平台账号 "',d||"(空)",'" 吗?此操作无法撤销。']})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>r(f),children:"删除"})]})]})]})]},f)),e.platforms.length===0&&o.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无其他平台账号"})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(J,{children:"别名"}),o.jsxs(fe,{onClick:i,size:"sm",variant:"outline",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加"]})]}),o.jsxs("div",{className:"space-y-2",children:[e.alias_names.map((d,f)=>o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ne,{value:d,onChange:m=>u(f,m.target.value),placeholder:"小麦"}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"icon",variant:"outline",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:['确定要删除别名 "',d||"(空)",'" 吗?此操作无法撤销。']})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>l(f),children:"删除"})]})]})]})]},f)),e.alias_names.length===0&&o.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无别名"})]})]})]})]})})}function dje({config:e,onChange:t}){const n=()=>{t({...e,states:[...e.states,""]})},r=i=>{t({...e,states:e.states.filter((l,u)=>u!==i)})},a=(i,l)=>{const u=[...e.states];u[i]=l,t({...e,states:u})};return o.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"人格设置"}),o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"personality",children:"人格特质"}),o.jsx(qt,{id:"personality",value:e.personality,onChange:i=>t({...e,personality:i.target.value}),placeholder:"描述人格特质和身份特征(建议120字以内)",rows:3}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"建议120字以内,描述人格特质和身份特征"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"reply_style",children:"表达风格"}),o.jsx(qt,{id:"reply_style",value:e.reply_style,onChange:i=>t({...e,reply_style:i.target.value}),placeholder:"描述说话的表达风格和习惯",rows:3})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"interest",children:"兴趣"}),o.jsx(qt,{id:"interest",value:e.interest,onChange:i=>t({...e,interest:i.target.value}),placeholder:"会影响麦麦对什么话题进行回复",rows:2})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"plan_style",children:"说话规则与行为风格"}),o.jsx(qt,{id:"plan_style",value:e.plan_style,onChange:i=>t({...e,plan_style:i.target.value}),placeholder:"麦麦的说话规则和行为风格",rows:5})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"visual_style",children:"识图规则"}),o.jsx(qt,{id:"visual_style",value:e.visual_style,onChange:i=>t({...e,visual_style:i.target.value}),placeholder:"识图时的处理规则",rows:3})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"private_plan_style",children:"私聊规则"}),o.jsx(qt,{id:"private_plan_style",value:e.private_plan_style,onChange:i=>t({...e,private_plan_style:i.target.value}),placeholder:"私聊的说话规则和行为风格",rows:4})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(J,{children:"状态列表(人格多样性)"}),o.jsxs(fe,{onClick:n,size:"sm",variant:"outline",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加状态"]})]}),o.jsx("div",{className:"space-y-2",children:e.states.map((i,l)=>o.jsxs("div",{className:"flex gap-2",children:[o.jsx(qt,{value:i,onChange:u=>a(l,u.target.value),placeholder:"描述一个人格状态",rows:2}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"icon",variant:"outline",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsx(wn,{children:"确定要删除这个人格状态吗?此操作无法撤销。"})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>r(l),children:"删除"})]})]})]})]},l))})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"state_probability",children:"状态替换概率"}),o.jsx(Ne,{id:"state_probability",type:"number",step:"0.1",min:"0",max:"1",value:e.state_probability,onChange:i=>t({...e,state_probability:parseFloat(i.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"每次构建人格时替换 personality 的概率(0.0-1.0)"})]})]})]})})}function fje({config:e,onChange:t}){const n=()=>{t({...e,talk_value_rules:[...e.talk_value_rules,{target:"",time:"00:00-23:59",value:1}]})},r=u=>{t({...e,talk_value_rules:e.talk_value_rules.filter((d,f)=>f!==u)})},a=(u,d,f)=>{const m=[...e.talk_value_rules];m[u]={...m[u],[d]:f},t({...e,talk_value_rules:m})},i=({value:u,onChange:d})=>{const[f,m]=y.useState("00"),[p,g]=y.useState("00"),[x,j]=y.useState("23"),[b,w]=y.useState("59");y.useEffect(()=>{const O=u.split("-");if(O.length===2){const[C,A]=O,[E,k]=C.split(":"),[T,P]=A.split(":");E&&m(E.padStart(2,"0")),k&&g(k.padStart(2,"0")),T&&j(T.padStart(2,"0")),P&&w(P.padStart(2,"0"))}},[u]);const N=(O,C,A,E)=>{const k=`${O}:${C}-${A}:${E}`;d(k)};return o.jsxs(Jo,{children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",className:"w-full justify-start font-mono text-sm",children:[o.jsx(nl,{className:"h-4 w-4 mr-2"}),u||"选择时间段"]})}),o.jsx(oo,{className:"w-80",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-sm mb-3",children:"开始时间"}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[o.jsxs("div",{children:[o.jsx(J,{className:"text-xs",children:"小时"}),o.jsxs(Et,{value:f,onValueChange:O=>{m(O),N(O,p,x,b)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:Array.from({length:24},(O,C)=>C).map(O=>o.jsx(Pe,{value:O.toString().padStart(2,"0"),children:O.toString().padStart(2,"0")},O))})]})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-xs",children:"分钟"}),o.jsxs(Et,{value:p,onValueChange:O=>{g(O),N(f,O,x,b)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:Array.from({length:60},(O,C)=>C).map(O=>o.jsx(Pe,{value:O.toString().padStart(2,"0"),children:O.toString().padStart(2,"0")},O))})]})]})]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-sm mb-3",children:"结束时间"}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[o.jsxs("div",{children:[o.jsx(J,{className:"text-xs",children:"小时"}),o.jsxs(Et,{value:x,onValueChange:O=>{j(O),N(f,p,O,b)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:Array.from({length:24},(O,C)=>C).map(O=>o.jsx(Pe,{value:O.toString().padStart(2,"0"),children:O.toString().padStart(2,"0")},O))})]})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-xs",children:"分钟"}),o.jsxs(Et,{value:b,onValueChange:O=>{w(O),N(f,p,x,O)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:Array.from({length:60},(O,C)=>C).map(O=>o.jsx(Pe,{value:O.toString().padStart(2,"0"),children:O.toString().padStart(2,"0")},O))})]})]})]})]})]})})]})},l=({rule:u})=>{const d=`{ target = "${u.target}", time = "${u.time}", value = ${u.value.toFixed(1)} }`;return o.jsxs(Jo,{children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",size:"sm",children:[o.jsx(ro,{className:"h-4 w-4 mr-1"}),"预览"]})}),o.jsx(oo,{className:"w-96",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),o.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:d}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})};return o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"聊天设置"}),o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"talk_value",children:"聊天频率(基础值)"}),o.jsx(Ne,{id:"talk_value",type:"number",step:"0.1",min:"0",max:"1",value:e.talk_value,onChange:u=>t({...e,talk_value:parseFloat(u.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"越小越沉默,范围 0-1"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"mentioned_bot_reply",children:"提及回复增幅"}),o.jsx(Ne,{id:"mentioned_bot_reply",type:"number",step:"0.1",min:"0",max:"1",value:e.mentioned_bot_reply,onChange:u=>t({...e,mentioned_bot_reply:parseFloat(u.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"提及时回复概率增幅,1 为 100% 回复"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"max_context_size",children:"上下文长度"}),o.jsx(Ne,{id:"max_context_size",type:"number",min:"1",value:e.max_context_size,onChange:u=>t({...e,max_context_size:parseInt(u.target.value)})})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"planner_smooth",children:"规划器平滑"}),o.jsx(Ne,{id:"planner_smooth",type:"number",step:"1",min:"0",value:e.planner_smooth,onChange:u=>t({...e,planner_smooth:parseFloat(u.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"增大数值会减小 planner 负荷,推荐 1-5,0 为关闭"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"enable_talk_value_rules",checked:e.enable_talk_value_rules,onCheckedChange:u=>t({...e,enable_talk_value_rules:u})}),o.jsx(J,{htmlFor:"enable_talk_value_rules",className:"cursor-pointer",children:"启用动态发言频率规则"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"include_planner_reasoning",checked:e.include_planner_reasoning,onCheckedChange:u=>t({...e,include_planner_reasoning:u})}),o.jsx(J,{htmlFor:"include_planner_reasoning",className:"cursor-pointer",children:"将 planner 推理加入 replyer"})]})]})]}),e.enable_talk_value_rules&&o.jsxs("div",{className:"border-t pt-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-base font-semibold",children:"动态发言频率规则"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"按时段或聊天流ID调整发言频率,优先匹配具体聊天,再匹配全局规则"})]}),o.jsxs(fe,{onClick:n,size:"sm",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),e.talk_value_rules&&e.talk_value_rules.length>0?o.jsx("div",{className:"space-y-4",children:e.talk_value_rules.map((u,d)=>o.jsxs("div",{className:"rounded-lg border p-4 bg-muted/50 space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["规则 #",d+1]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(l,{rule:u}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{variant:"ghost",size:"sm",children:o.jsx(Ut,{className:"h-4 w-4 text-destructive"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:["确定要删除规则 #",d+1," 吗?此操作无法撤销。"]})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>r(d),children:"删除"})]})]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"配置类型"}),o.jsxs(Et,{value:u.target===""?"global":"specific",onValueChange:f=>{f==="global"?a(d,"target",""):a(d,"target","qq::group")},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"global",children:"全局配置"}),o.jsx(Pe,{value:"specific",children:"详细配置"})]})]})]}),u.target!==""&&(()=>{const f=u.target.split(":"),m=f[0]||"qq",p=f[1]||"",g=f[2]||"group";return o.jsxs("div",{className:"grid gap-4 p-4 rounded-lg bg-muted/50",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"平台"}),o.jsxs(Et,{value:m,onValueChange:x=>{a(d,"target",`${x}:${p}:${g}`)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"qq",children:"QQ"}),o.jsx(Pe,{value:"wx",children:"微信"})]})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"群 ID"}),o.jsx(Ne,{value:p,onChange:x=>{a(d,"target",`${m}:${x.target.value}:${g}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"类型"}),o.jsxs(Et,{value:g,onValueChange:x=>{a(d,"target",`${m}:${p}:${x}`)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"group",children:"群组(group)"}),o.jsx(Pe,{value:"private",children:"私聊(private)"})]})]})]})]}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",u.target||"(未设置)"]})]})})(),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"时间段 (Time)"}),o.jsx(i,{value:u.time,onChange:f=>a(d,"time",f)}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"支持跨夜区间,例如 23:00-02:00"})]}),o.jsxs("div",{className:"grid gap-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(J,{htmlFor:`rule-value-${d}`,className:"text-xs font-medium",children:"发言频率值 (Value)"}),o.jsx(Ne,{id:`rule-value-${d}`,type:"number",step:"0.01",min:"0",max:"1",value:u.value,onChange:f=>{const m=parseFloat(f.target.value);isNaN(m)||a(d,"value",Math.max(0,Math.min(1,m)))},className:"w-20 h-8 text-xs"})]}),o.jsx(uE,{value:[u.value],onValueChange:f=>a(d,"value",f[0]),min:0,max:1,step:.01,className:"w-full"}),o.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[o.jsx("span",{children:"0 (完全沉默)"}),o.jsx("span",{children:"0.5"}),o.jsx("span",{children:"1.0 (正常)"})]})]})]})]},d))}):o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:o.jsx("p",{className:"text-sm",children:'暂无规则,点击"添加规则"按钮创建'})}),o.jsxs("div",{className:"mt-4 p-4 bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:[o.jsx("h5",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"📝 规则说明"}),o.jsxs("ul",{className:"text-xs text-blue-800 dark:text-blue-200 space-y-1",children:[o.jsxs("li",{children:["• ",o.jsx("strong",{children:"Target 为空"}),":全局规则,对所有聊天生效"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"Target 指定"}),":仅对特定聊天流生效(格式:platform:id:type)"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"优先级"}),":先匹配具体聊天流规则,再匹配全局规则"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"时间支持跨夜"}),":例如 23:00-02:00 表示晚上11点到次日凌晨2点"]}),o.jsxs("li",{children:["• ",o.jsx("strong",{children:"数值范围"}),":建议 0-1,0 表示完全沉默,1 表示正常发言"]})]})]})]})]})}function hje({config:e,onChange:t}){const n=()=>{t({...e,learning_list:[...e.learning_list,["","enable","enable","1.0"]]})},r=g=>{t({...e,learning_list:e.learning_list.filter((x,j)=>j!==g)})},a=(g,x,j)=>{const b=[...e.learning_list];b[g][x]=j,t({...e,learning_list:b})},i=({rule:g})=>{const x=`["${g[0]}", "${g[1]}", "${g[2]}", "${g[3]}"]`;return o.jsxs(Jo,{children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",size:"sm",children:[o.jsx(ro,{className:"h-4 w-4 mr-1"}),"预览"]})}),o.jsx(oo,{className:"w-96",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),o.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:x}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})},l=({member:g,groupIndex:x,memberIndex:j,availableChatIds:b})=>{const w=b.includes(g)||g==="*",[N,O]=y.useState(!w);return o.jsxs("div",{className:"flex gap-2",children:[o.jsx("div",{className:"flex-1 flex gap-2",children:N?o.jsxs(o.Fragment,{children:[o.jsx(Ne,{value:g,onChange:C=>p(x,j,C.target.value),placeholder:'输入 "*" 或 "qq:123456:group"',className:"flex-1"}),b.length>0&&o.jsx(fe,{size:"sm",variant:"outline",onClick:()=>O(!1),title:"切换到下拉选择",children:"下拉"})]}):o.jsxs(o.Fragment,{children:[o.jsxs(Et,{value:g,onValueChange:C=>p(x,j,C),children:[o.jsx(wt,{className:"flex-1",children:o.jsx(At,{placeholder:"选择聊天流"})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"*",children:"* (全局共享)"}),b.map((C,A)=>o.jsx(Pe,{value:C,children:C},A))]})]}),o.jsx(fe,{size:"sm",variant:"outline",onClick:()=>O(!0),title:"切换到手动输入",children:"输入"})]})}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"icon",variant:"outline",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:['确定要删除组成员 "',g||"(空)",'" 吗?此操作无法撤销。']})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>m(x,j),children:"删除"})]})]})]})]})},u=()=>{t({...e,expression_groups:[...e.expression_groups,[]]})},d=g=>{t({...e,expression_groups:e.expression_groups.filter((x,j)=>j!==g)})},f=g=>{const x=[...e.expression_groups];x[g]=[...x[g],""],t({...e,expression_groups:x})},m=(g,x)=>{const j=[...e.expression_groups];j[g]=j[g].filter((b,w)=>w!==x),t({...e,expression_groups:j})},p=(g,x,j)=>{const b=[...e.expression_groups];b[g][x]=j,t({...e,expression_groups:b})};return o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold",children:"表达学习配置"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置麦麦如何学习和使用表达方式"})]}),o.jsxs(fe,{onClick:n,size:"sm",variant:"outline",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),o.jsxs("div",{className:"space-y-4",children:[e.learning_list.map((g,x)=>{const j=e.learning_list.some((A,E)=>E!==x&&A[0]===""),b=g[0]==="",w=g[0].split(":"),N=w[0]||"qq",O=w[1]||"",C=w[2]||"group";return o.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-sm font-medium",children:["规则 ",x+1," ",b&&"(全局配置)"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(i,{rule:g}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"sm",variant:"ghost",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:["确定要删除学习规则 ",x+1," 吗?此操作无法撤销。"]})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>r(x),children:"删除"})]})]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"配置类型"}),o.jsxs(Et,{value:b?"global":"specific",onValueChange:A=>{A==="global"?a(x,0,""):a(x,0,"qq::group")},disabled:j&&!b,children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"global",children:"全局配置"}),o.jsx(Pe,{value:"specific",disabled:j&&!b,children:"详细配置"})]})]}),j&&!b&&o.jsx("p",{className:"text-xs text-amber-600",children:"已存在全局配置,无法创建新的全局配置"})]}),!b&&o.jsxs("div",{className:"grid gap-4 p-4 rounded-lg bg-muted/50",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"平台"}),o.jsxs(Et,{value:N,onValueChange:A=>{a(x,0,`${A}:${O}:${C}`)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"qq",children:"QQ"}),o.jsx(Pe,{value:"wx",children:"微信"})]})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"群 ID"}),o.jsx(Ne,{value:O,onChange:A=>{a(x,0,`${N}:${A.target.value}:${C}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"类型"}),o.jsxs(Et,{value:C,onValueChange:A=>{a(x,0,`${N}:${O}:${A}`)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"group",children:"群组(group)"}),o.jsx(Pe,{value:"private",children:"私聊(private)"})]})]})]})]}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",g[0]||"(未设置)"]})]}),o.jsx("div",{className:"grid gap-2",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx(J,{className:"text-xs font-medium",children:"使用学到的表达"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦使用从聊天中学到的表达方式"})]}),o.jsx(at,{checked:g[1]==="enable",onCheckedChange:A=>a(x,1,A?"enable":"disable")})]})}),o.jsx("div",{className:"grid gap-2",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx(J,{className:"text-xs font-medium",children:"学习表达"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦从聊天中学习新的表达方式"})]}),o.jsx(at,{checked:g[2]==="enable",onCheckedChange:A=>a(x,2,A?"enable":"disable")})]})}),o.jsxs("div",{className:"grid gap-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(J,{className:"text-xs font-medium",children:"学习强度"}),o.jsx(Ne,{type:"number",step:"0.1",min:"0",max:"5",value:g[3],onChange:A=>{const E=parseFloat(A.target.value);isNaN(E)||a(x,3,Math.max(0,Math.min(5,E)).toFixed(1))},className:"w-20 h-8 text-xs"})]}),o.jsx(uE,{value:[parseFloat(g[3])||1],onValueChange:A=>a(x,3,A[0].toFixed(1)),min:0,max:5,step:.1,className:"w-full"}),o.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[o.jsx("span",{children:"0 (不学习)"}),o.jsx("span",{children:"2.5"}),o.jsx("span",{children:"5.0 (快速学习)"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"影响学习频率,最短学习间隔 = 300/学习强度(秒)"})]})]})]},x)}),e.learning_list.length===0&&o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无学习规则,点击"添加规则"开始配置'})]})]})}),o.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold",children:"表达共享组配置"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置不同聊天流之间如何共享学到的表达方式"})]}),o.jsxs(fe,{onClick:u,size:"sm",variant:"outline",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加共享组"]})]}),o.jsxs("div",{className:"space-y-4",children:[e.expression_groups.map((g,x)=>{const j=e.learning_list.map(b=>b[0]).filter(b=>b!=="");return o.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-sm font-medium",children:["共享组 ",x+1,g.length===1&&g[0]==="*"&&"(全局共享)"]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(fe,{onClick:()=>f(x),size:"sm",variant:"outline",children:o.jsx(er,{className:"h-4 w-4"})}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"sm",variant:"ghost",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:["确定要删除共享组 ",x+1," 吗?此操作无法撤销。"]})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>d(x),children:"删除"})]})]})]})]})]}),o.jsx("div",{className:"space-y-2",children:g.map((b,w)=>o.jsx(l,{member:b,groupIndex:x,memberIndex:w,availableChatIds:j},w))}),o.jsx("p",{className:"text-xs text-muted-foreground",children:'提示:可以从下拉框选择已配置的聊天流,或手动输入。输入 "*" 启用全局共享'})]},x)}),e.expression_groups.length===0&&o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无共享组,点击"添加共享组"开始配置'})]})]})})]})}function mje({emojiConfig:e,memoryConfig:t,toolConfig:n,onEmojiChange:r,onMemoryChange:a,onToolChange:i}){return o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"工具设置"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"enable_tool",checked:n.enable_tool,onCheckedChange:l=>i({...n,enable_tool:l})}),o.jsx(J,{htmlFor:"enable_tool",className:"cursor-pointer",children:"启用工具系统"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"允许麦麦使用各种工具来增强功能"})]})}),o.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"记忆设置"}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"max_agent_iterations",children:"记忆思考深度"}),o.jsx(Ne,{id:"max_agent_iterations",type:"number",min:"1",value:t.max_agent_iterations,onChange:l=>a({...t,max_agent_iterations:parseInt(l.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"最低为 1(不深入思考)"})]})]})}),o.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"表情包设置"}),o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"emoji_chance",children:"表情包激活概率"}),o.jsx(Ne,{id:"emoji_chance",type:"number",step:"0.1",min:"0",max:"1",value:e.emoji_chance,onChange:l=>r({...e,emoji_chance:parseFloat(l.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"范围 0-1,越大越容易发送表情包"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"max_reg_num",children:"最大注册数量"}),o.jsx(Ne,{id:"max_reg_num",type:"number",min:"1",value:e.max_reg_num,onChange:l=>r({...e,max_reg_num:parseInt(l.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦最多可以注册的表情包数量"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),o.jsx(Ne,{id:"check_interval",type:"number",min:"1",value:e.check_interval,onChange:l=>r({...e,check_interval:parseInt(l.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包(注册、破损、删除)的时间间隔"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"do_replace",checked:e.do_replace,onCheckedChange:l=>r({...e,do_replace:l})}),o.jsx(J,{htmlFor:"do_replace",className:"cursor-pointer",children:"达到最大数量时替换表情包"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"steal_emoji",checked:e.steal_emoji,onCheckedChange:l=>r({...e,steal_emoji:l})}),o.jsx(J,{htmlFor:"steal_emoji",className:"cursor-pointer",children:"偷取表情包"})]}),o.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许麦麦将看到的表情包据为己有"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"content_filtration",checked:e.content_filtration,onCheckedChange:l=>r({...e,content_filtration:l})}),o.jsx(J,{htmlFor:"content_filtration",className:"cursor-pointer",children:"启用表情包过滤"})]}),e.content_filtration&&o.jsxs("div",{className:"grid gap-2 pl-6 border-l-2 border-primary/20",children:[o.jsx(J,{htmlFor:"filtration_prompt",children:"过滤要求"}),o.jsx(Ne,{id:"filtration_prompt",value:e.filtration_prompt,onChange:l=>r({...e,filtration_prompt:l.target.value}),placeholder:"符合公序良俗"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"只有符合此要求的表情包才会被保存"})]})]})]})})]})}function pje({keywordReactionConfig:e,responsePostProcessConfig:t,chineseTypoConfig:n,responseSplitterConfig:r,onKeywordReactionChange:a,onResponsePostProcessChange:i,onChineseTypoChange:l,onResponseSplitterChange:u}){const d=()=>{a({...e,regex_rules:[...e.regex_rules,{regex:[""],reaction:""}]})},f=A=>{a({...e,regex_rules:e.regex_rules.filter((E,k)=>k!==A)})},m=(A,E,k)=>{const T=[...e.regex_rules];E==="regex"&&typeof k=="string"?T[A]={...T[A],regex:[k]}:E==="reaction"&&typeof k=="string"&&(T[A]={...T[A],reaction:k}),a({...e,regex_rules:T})},p=({regex:A,reaction:E,onRegexChange:k,onReactionChange:T})=>{const[P,$]=y.useState(!1),[z,D]=y.useState(""),[U,V]=y.useState(null),[H,G]=y.useState(""),[L,R]=y.useState({}),[F,K]=y.useState(""),te=y.useRef(null),[I,B]=y.useState("build"),Y=ee=>ee.replace(/\(\?P<([^>]+)>/g,"(?<$1>"),ne=(ee,ae=0)=>{const Z=te.current;if(!Z)return;const pe=Z.selectionStart||0,je=Z.selectionEnd||0,le=A.substring(0,pe)+ee+A.substring(je);k(le),setTimeout(()=>{const Re=pe+ee.length+ae;Z.setSelectionRange(Re,Re),Z.focus()},0)};y.useEffect(()=>{if(!A||!z){V(null),R({}),K(E),G("");return}try{const ee=Y(A),ae=new RegExp(ee,"g"),Z=z.match(ae);V(Z),G("");const je=new RegExp(ee).exec(z);if(je&&je.groups){R(je.groups);let le=E;Object.entries(je.groups).forEach(([Re,_e])=>{le=le.replace(new RegExp(`\\[${Re}\\]`,"g"),_e||"")}),K(le)}else R({}),K(E)}catch(ee){G(ee.message),V(null),R({}),K(E)}},[A,z,E]);const oe=()=>{if(!z||!U||U.length===0)return o.jsx("span",{className:"text-muted-foreground",children:z||"请输入测试文本"});try{const ee=Y(A),ae=new RegExp(ee,"g");let Z=0;const pe=[];let je;for(;(je=ae.exec(z))!==null;)je.index>Z&&pe.push(o.jsx("span",{children:z.substring(Z,je.index)},`text-${Z}`)),pe.push(o.jsx("span",{className:"bg-yellow-200 dark:bg-yellow-900 font-semibold",children:je[0]},`match-${je.index}`)),Z=je.index+je[0].length;return Z<z.length&&pe.push(o.jsx("span",{children:z.substring(Z)},`text-${Z}`)),o.jsx(o.Fragment,{children:pe})}catch{return o.jsx("span",{children:z})}},xe=[{category:"基础匹配",items:[{label:"任意字符",pattern:".",desc:"匹配除换行符外的任意字符"},{label:"数字",pattern:"\\d",desc:"匹配 0-9"},{label:"非数字",pattern:"\\D",desc:"匹配非数字字符"},{label:"字母数字",pattern:"\\w",desc:"匹配字母、数字、下划线"},{label:"非字母数字",pattern:"\\W",desc:"匹配非字母数字字符"},{label:"空白符",pattern:"\\s",desc:"匹配空格、制表符等"},{label:"非空白符",pattern:"\\S",desc:"匹配非空白字符"}]},{category:"位置锚点",items:[{label:"行首",pattern:"^",desc:"匹配行的开始"},{label:"行尾",pattern:"$",desc:"匹配行的结束"},{label:"单词边界",pattern:"\\b",desc:"匹配单词边界"}]},{category:"重复次数",items:[{label:"0或多次",pattern:"*",desc:"匹配前面的元素0次或多次"},{label:"1或多次",pattern:"+",desc:"匹配前面的元素1次或多次"},{label:"0或1次",pattern:"?",desc:"匹配前面的元素0次或1次"},{label:"指定次数",pattern:"{n}",desc:"匹配n次,将n替换为数字"},{label:"次数范围",pattern:"{m,n}",desc:"匹配m到n次"}]},{category:"分组和捕获",items:[{label:"普通分组",pattern:"()",desc:"分组但不捕获",moveCursor:-1},{label:"命名捕获",pattern:"(?P<name>)",desc:"Python风格命名捕获组",moveCursor:-1},{label:"非捕获组",pattern:"(?:)",desc:"分组但不保存匹配结果",moveCursor:-1}]},{category:"字符类",items:[{label:"字符集",pattern:"[]",desc:"匹配括号内的任意字符",moveCursor:-1},{label:"排除字符",pattern:"[^]",desc:"匹配不在括号内的字符",moveCursor:-1},{label:"范围",pattern:"[a-z]",desc:"匹配a到z的字符"},{label:"中文字符",pattern:"[\\u4e00-\\u9fa5]",desc:"匹配中文汉字"}]},{category:"常用模板",items:[{label:"捕获词语",pattern:"(?P<word>\\S+)",desc:"捕获一个词语"},{label:"捕获句子",pattern:"(?P<sentence>.+)",desc:"捕获整个句子"},{label:"捕获数字",pattern:"(?P<num>\\d+)",desc:"捕获一个或多个数字"},{label:"可选词语",pattern:"(?:词语1|词语2)",desc:"匹配多个可选项之一"}]}];return o.jsxs(tr,{open:P,onOpenChange:$,children:[o.jsx(zF,{asChild:!0,children:o.jsxs(fe,{variant:"outline",size:"sm",children:[o.jsx(xg,{className:"h-4 w-4 mr-1"}),"正则编辑器"]})}),o.jsxs(Un,{className:"max-w-[95vw] sm:max-w-[900px] max-h-[90vh]",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"正则表达式编辑器"}),o.jsx(ur,{className:"text-sm",children:"使用可视化工具构建正则表达式,并实时测试效果"})]}),o.jsx(Xt,{className:"max-h-[calc(90vh-120px)]",children:o.jsxs(ol,{value:I,onValueChange:ee=>B(ee),className:"w-full",children:[o.jsxs(Xo,{className:"grid w-full grid-cols-2",children:[o.jsx(Ct,{value:"build",children:"🔧 构建器"}),o.jsx(Ct,{value:"test",children:"🧪 测试器"})]}),o.jsxs(Qt,{value:"build",className:"space-y-4 mt-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{className:"text-sm font-medium",children:"正则表达式"}),o.jsx(Ne,{ref:te,value:A,onChange:ee=>k(ee.target.value),className:"font-mono text-sm",placeholder:"点击下方按钮构建正则表达式..."})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{className:"text-sm font-medium",children:"Reaction 内容"}),o.jsx(qt,{value:E,onChange:ee=>T(ee.target.value),placeholder:"使用 [捕获组名] 引用捕获的内容...",rows:3,className:"text-sm"})]}),o.jsxs("div",{className:"space-y-4 border-t pt-4",children:[xe.map(ee=>o.jsxs("div",{className:"space-y-2",children:[o.jsx("h5",{className:"text-xs font-semibold text-primary",children:ee.category}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:ee.items.map(ae=>o.jsx(fe,{variant:"outline",size:"sm",className:"justify-start h-auto py-2 px-3",onClick:()=>ne(ae.pattern,ae.moveCursor||0),children:o.jsxs("div",{className:"flex flex-col items-start w-full",children:[o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o.jsx("span",{className:"text-xs font-medium",children:ae.label}),o.jsx("code",{className:"ml-auto text-xs bg-muted px-1.5 py-0.5 rounded font-mono",children:ae.pattern})]}),o.jsx("span",{className:"text-xs text-muted-foreground mt-0.5",children:ae.desc})]})},ae.label))})]},ee.category)),o.jsxs("div",{className:"space-y-2 border-t pt-4",children:[o.jsx("h5",{className:"text-xs font-semibold text-primary",children:"完整示例模板"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(fe,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>k("^(?P<n>\\S{1,20})是这样的$"),children:o.jsxs("div",{className:"flex flex-col items-start w-full",children:[o.jsxs("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:["^(?P<n>\\S","{1,20}",")是这样的$"]}),o.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「某事物是这样的」并捕获事物名称"})]})}),o.jsx(fe,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>k("(?:[^,。.\\s]+,\\s*)?我(?:也)?[没沒]要求你\\s*(?P<action>.+?)[.。,,]?$"),children:o.jsxs("div",{className:"flex flex-col items-start w-full",children:[o.jsx("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:"(?:[^,。.\\s]+,\\s*)?我(?:也)?[没沒]要求你\\s*(?P<action>.+?)[.。,,]?$"}),o.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「我没要求你做某事」并捕获具体行为"})]})}),o.jsx(fe,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>k("(?P<subject>.+?)(?:是|为什么|怎么)"),children:o.jsxs("div",{className:"flex flex-col items-start w-full",children:[o.jsx("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:"(?P<subject>.+?)(?:是|为什么|怎么)"}),o.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"捕获问题主题词"})]})})]})]})]}),o.jsxs("div",{className:"rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3 space-y-1",children:[o.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 使用提示"}),o.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[o.jsx("li",{children:"点击输入框设置光标位置,然后点击按钮插入模式"}),o.jsxs("li",{children:["命名捕获组格式:",o.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"(?P<名称>模式)"})]}),o.jsxs("li",{children:["在 reaction 中使用 ",o.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"[名称]"})," 引用捕获的内容"]}),o.jsx("li",{children:"切换到测试器标签页验证正则表达式效果"})]})]})]}),o.jsxs(Qt,{value:"test",className:"space-y-4 mt-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{className:"text-sm font-medium",children:"当前正则表达式"}),o.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:A||"(未设置)"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"test-text",className:"text-sm font-medium",children:"测试文本"}),o.jsx(qt,{id:"test-text",value:z,onChange:ee=>D(ee.target.value),placeholder:`在此输入要测试的文本...
|
||
例如:打游戏是这样的`,className:"min-h-[100px] text-sm"})]}),H&&o.jsxs("div",{className:"rounded-md bg-destructive/10 border border-destructive/20 p-3",children:[o.jsx("p",{className:"text-sm text-destructive font-medium",children:"正则表达式错误"}),o.jsx("p",{className:"text-xs text-destructive/80 mt-1",children:H})]}),!H&&z&&o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"flex items-center gap-2",children:U&&U.length>0?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),o.jsxs("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:["匹配成功 (",U.length," 处)"]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-2 w-2 rounded-full bg-gray-400"}),o.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"无匹配"})]})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{className:"text-sm font-medium",children:"匹配高亮"}),o.jsx(Xt,{className:"h-40 rounded-md bg-muted p-3",children:o.jsx("div",{className:"text-sm break-words",children:oe()})})]}),Object.keys(L).length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{className:"text-sm font-medium",children:"命名捕获组"}),o.jsx(Xt,{className:"h-32 rounded-md border p-3",children:o.jsx("div",{className:"space-y-2",children:Object.entries(L).map(([ee,ae])=>o.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[o.jsxs("span",{className:"font-mono font-semibold text-primary min-w-[80px]",children:["[",ee,"]"]}),o.jsx("span",{className:"text-muted-foreground",children:"="}),o.jsx("span",{className:"font-mono bg-muted px-2 py-0.5 rounded",children:ae})]},ee))})})]}),Object.keys(L).length>0&&E&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{className:"text-sm font-medium",children:"Reaction 替换预览"}),o.jsx(Xt,{className:"h-48 rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3",children:o.jsx("div",{className:"text-sm break-words",children:F})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"reaction 中的 [name] 已被替换为对应的捕获组值"})]})]}),o.jsxs("div",{className:"rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3 space-y-1",children:[o.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 测试说明"}),o.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[o.jsx("li",{children:"匹配的文本会以黄色背景高亮显示"}),o.jsx("li",{children:"命名捕获组的值会显示在下方列表中"}),o.jsx("li",{children:"Reaction 替换预览显示最终生成的反应内容"}),o.jsx("li",{children:"如需修改正则,切换回构建器标签页"})]})]})]})]})})]})]})},g=()=>{a({...e,keyword_rules:[...e.keyword_rules,{keywords:[],reaction:""}]})},x=A=>{a({...e,keyword_rules:e.keyword_rules.filter((E,k)=>k!==A)})},j=(A,E,k)=>{const T=[...e.keyword_rules];typeof k=="string"&&(T[A]={...T[A],reaction:k}),a({...e,keyword_rules:T})},b=A=>{const E=[...e.keyword_rules];E[A]={...E[A],keywords:[...E[A].keywords||[],""]},a({...e,keyword_rules:E})},w=(A,E)=>{const k=[...e.keyword_rules];k[A]={...k[A],keywords:(k[A].keywords||[]).filter((T,P)=>P!==E)},a({...e,keyword_rules:k})},N=(A,E,k)=>{const T=[...e.keyword_rules],P=[...T[A].keywords||[]];P[E]=k,T[A]={...T[A],keywords:P},a({...e,keyword_rules:T})},O=({rule:A})=>{const E=`{ regex = [${(A.regex||[]).map(k=>`"${k}"`).join(", ")}], reaction = "${A.reaction}" }`;return o.jsxs(Jo,{children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",size:"sm",children:[o.jsx(ro,{className:"h-4 w-4 mr-1"}),"预览"]})}),o.jsx(oo,{className:"w-[95vw] sm:w-[500px]",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),o.jsx(Xt,{className:"h-60 rounded-md bg-muted p-3",children:o.jsx("pre",{className:"font-mono text-xs break-all",children:E})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})},C=({rule:A})=>{const E=`[[keyword_reaction.keyword_rules]]
|
||
keywords = [${(A.keywords||[]).map(k=>`"${k}"`).join(", ")}]
|
||
reaction = "${A.reaction}"`;return o.jsxs(Jo,{children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",size:"sm",children:[o.jsx(ro,{className:"h-4 w-4 mr-1"}),"预览"]})}),o.jsx(oo,{className:"w-[95vw] sm:w-[500px]",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),o.jsx(Xt,{className:"h-60 rounded-md bg-muted p-3",children:o.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap break-all",children:E})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})};return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-2",children:"关键词反应配置"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"配置触发特定反应的关键词和正则表达式规则"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-base font-semibold",children:"正则表达式规则"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用正则表达式匹配消息内容"})]}),o.jsxs(fe,{onClick:d,size:"sm",variant:"outline",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加正则规则"]})]}),o.jsxs("div",{className:"space-y-3",children:[e.regex_rules.map((A,E)=>o.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-sm font-medium",children:["正则规则 ",E+1]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(p,{regex:A.regex&&A.regex[0]||"",reaction:A.reaction,onRegexChange:k=>m(E,"regex",k),onReactionChange:k=>m(E,"reaction",k)}),o.jsx(O,{rule:A}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"sm",variant:"ghost",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:["确定要删除正则规则 ",E+1," 吗?此操作无法撤销。"]})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>f(E),children:"删除"})]})]})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"正则表达式(Python 语法)"}),o.jsx(Ne,{value:A.regex&&A.regex[0]||"",onChange:k=>m(E,"regex",k.target.value),placeholder:"例如:^(?P<n>\\\\S{1,20})是这样的$ (点击正则编辑器按钮可视化构建)",className:"font-mono text-sm"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:'支持命名捕获组 (?P<name>pattern),可在 reaction 中使用 [name] 引用。点击"正则编辑器"可视化构建和测试!'})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"反应内容"}),o.jsx(qt,{value:A.reaction,onChange:k=>m(E,"reaction",k.target.value),placeholder:`触发后麦麦的反应...
|
||
可以使用 [捕获组名] 来引用正则表达式中的内容`,rows:3,className:"text-sm"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"使用 [捕获组名] 引用正则表达式中的命名捕获组,例如 [n] 会被替换为捕获的内容"})]})]})]},E)),e.regex_rules.length===0&&o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无正则规则,点击"添加正则规则"开始配置'})]})]}),o.jsxs("div",{className:"space-y-4 border-t pt-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"text-base font-semibold",children:"关键词规则"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用关键词列表匹配消息内容"})]}),o.jsxs(fe,{onClick:g,size:"sm",variant:"outline",children:[o.jsx(er,{className:"h-4 w-4 mr-1"}),"添加关键词规则"]})]}),o.jsxs("div",{className:"space-y-3",children:[e.keyword_rules.map((A,E)=>o.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-sm font-medium",children:["关键词规则 ",E+1]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(C,{rule:A}),o.jsxs(Pn,{children:[o.jsx(na,{asChild:!0,children:o.jsx(fe,{size:"sm",variant:"ghost",children:o.jsx(Ut,{className:"h-4 w-4"})})}),o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:["确定要删除关键词规则 ",E+1," 吗?此操作无法撤销。"]})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>x(E),children:"删除"})]})]})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(J,{className:"text-xs font-medium",children:"关键词列表"}),o.jsxs(fe,{onClick:()=>b(E),size:"sm",variant:"ghost",children:[o.jsx(er,{className:"h-3 w-3 mr-1"}),"添加关键词"]})]}),o.jsxs("div",{className:"space-y-2",children:[(A.keywords||[]).map((k,T)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ne,{value:k,onChange:P=>N(E,T,P.target.value),placeholder:"关键词",className:"flex-1"}),o.jsx(fe,{onClick:()=>w(E,T),size:"sm",variant:"ghost",children:o.jsx(Ut,{className:"h-4 w-4"})})]},T)),(!A.keywords||A.keywords.length===0)&&o.jsx("p",{className:"text-xs text-muted-foreground text-center py-2",children:'暂无关键词,点击"添加关键词"开始配置'})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{className:"text-xs font-medium",children:"反应内容"}),o.jsx(qt,{value:A.reaction,onChange:k=>j(E,"reaction",k.target.value),placeholder:"触发后麦麦的反应...",rows:3,className:"text-sm"})]})]})]},E)),e.keyword_rules.length===0&&o.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无关键词规则,点击"添加关键词规则"开始配置'})]})]})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"回复后处理配置"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"enable_response_post_process",checked:t.enable_response_post_process,onCheckedChange:A=>i({...t,enable_response_post_process:A})}),o.jsx(J,{htmlFor:"enable_response_post_process",className:"cursor-pointer",children:"启用回复后处理"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"包括错别字生成器和回复分割器"})]}),t.enable_response_post_process&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t pt-6 space-y-4",children:o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[o.jsx(at,{id:"enable_chinese_typo",checked:n.enable,onCheckedChange:A=>l({...n,enable:A})}),o.jsx(J,{htmlFor:"enable_chinese_typo",className:"cursor-pointer font-semibold",children:"中文错别字生成器"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"为回复添加随机错别字,让麦麦的回复更自然"}),n.enable&&o.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"error_rate",className:"text-xs font-medium",children:"单字替换概率"}),o.jsx(Ne,{id:"error_rate",type:"number",step:"0.001",min:"0",max:"1",value:n.error_rate,onChange:A=>l({...n,error_rate:parseFloat(A.target.value)})})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"min_freq",className:"text-xs font-medium",children:"最小字频阈值"}),o.jsx(Ne,{id:"min_freq",type:"number",min:"0",value:n.min_freq,onChange:A=>l({...n,min_freq:parseInt(A.target.value)})})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"tone_error_rate",className:"text-xs font-medium",children:"声调错误概率"}),o.jsx(Ne,{id:"tone_error_rate",type:"number",step:"0.01",min:"0",max:"1",value:n.tone_error_rate,onChange:A=>l({...n,tone_error_rate:parseFloat(A.target.value)})})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"word_replace_rate",className:"text-xs font-medium",children:"整词替换概率"}),o.jsx(Ne,{id:"word_replace_rate",type:"number",step:"0.001",min:"0",max:"1",value:n.word_replace_rate,onChange:A=>l({...n,word_replace_rate:parseFloat(A.target.value)})})]})]})]})}),o.jsx("div",{className:"border-t pt-6 space-y-4",children:o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[o.jsx(at,{id:"enable_response_splitter",checked:r.enable,onCheckedChange:A=>u({...r,enable:A})}),o.jsx(J,{htmlFor:"enable_response_splitter",className:"cursor-pointer font-semibold",children:"回复分割器"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"控制回复的长度和句子数量"}),r.enable&&o.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"max_length",className:"text-xs font-medium",children:"最大长度"}),o.jsx(Ne,{id:"max_length",type:"number",min:"1",value:r.max_length,onChange:A=>u({...r,max_length:parseInt(A.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大字符数"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"max_sentence_num",className:"text-xs font-medium",children:"最大句子数"}),o.jsx(Ne,{id:"max_sentence_num",type:"number",min:"1",value:r.max_sentence_num,onChange:A=>u({...r,max_sentence_num:parseInt(A.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大句子数量"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"enable_kaomoji_protection",checked:r.enable_kaomoji_protection,onCheckedChange:A=>u({...r,enable_kaomoji_protection:A})}),o.jsx(J,{htmlFor:"enable_kaomoji_protection",className:"cursor-pointer",children:"启用颜文字保护"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"enable_overflow_return_all",checked:r.enable_overflow_return_all,onCheckedChange:A=>u({...r,enable_overflow_return_all:A})}),o.jsx(J,{htmlFor:"enable_overflow_return_all",className:"cursor-pointer",children:"超出时一次性返回全部"})]}),o.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"当句子数量超出限制时,合并后一次性返回所有内容"})]})]})})]})]})]})}function vje({config:e,onChange:t}){return o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"情绪设置"}),o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{checked:e.enable_mood,onCheckedChange:n=>t({...e,enable_mood:n})}),o.jsx(J,{className:"cursor-pointer",children:"启用情绪系统"})]}),e.enable_mood&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"情绪更新阈值"}),o.jsx(Ne,{type:"number",min:"1",value:e.mood_update_threshold,onChange:n=>t({...e,mood_update_threshold:parseInt(n.target.value)})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"越高,更新越慢"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"情感特征"}),o.jsx(qt,{value:e.emotion_style,onChange:n=>t({...e,emotion_style:n.target.value}),placeholder:"影响情绪的变化情况",rows:2})]})]})]})]})}function gje({config:e,onChange:t}){return o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"语音设置"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{checked:e.enable_asr,onCheckedChange:n=>t({...e,enable_asr:n})}),o.jsx(J,{className:"cursor-pointer",children:"启用语音识别"})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后麦麦可以识别语音消息,需要配置语音识别模型"})]})}function yje({config:e,onChange:t}){return o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库设置"}),o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{checked:e.enable,onCheckedChange:n=>t({...e,enable:n})}),o.jsx(J,{className:"cursor-pointer",children:"启用 LPMM 知识库"})]}),e.enable&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"LPMM 模式"}),o.jsxs(Et,{value:e.lpmm_mode,onValueChange:n=>t({...e,lpmm_mode:n}),children:[o.jsx(wt,{children:o.jsx(At,{placeholder:"选择 LPMM 模式"})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"classic",children:"经典模式"}),o.jsx(Pe,{value:"agent",children:"Agent 模式"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"同义词搜索 TopK"}),o.jsx(Ne,{type:"number",min:"1",value:e.rag_synonym_search_top_k,onChange:n=>t({...e,rag_synonym_search_top_k:parseInt(n.target.value)})})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"同义词阈值"}),o.jsx(Ne,{type:"number",step:"0.1",min:"0",max:"1",value:e.rag_synonym_threshold,onChange:n=>t({...e,rag_synonym_threshold:parseFloat(n.target.value)})})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"实体提取线程数"}),o.jsx(Ne,{type:"number",min:"1",value:e.info_extraction_workers,onChange:n=>t({...e,info_extraction_workers:parseInt(n.target.value)})})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"嵌入向量维度"}),o.jsx(Ne,{type:"number",min:"1",value:e.embedding_dimension,onChange:n=>t({...e,embedding_dimension:parseInt(n.target.value)})})]})]})]})]})]})}function xje({config:e,onChange:t}){const[n,r]=y.useState(""),[a,i]=y.useState("WARNING"),l=()=>{n&&!e.suppress_libraries.includes(n)&&(t({...e,suppress_libraries:[...e.suppress_libraries,n]}),r(""))},u=x=>{t({...e,suppress_libraries:e.suppress_libraries.filter(j=>j!==x)})},d=()=>{n&&!e.library_log_levels[n]&&(t({...e,library_log_levels:{...e.library_log_levels,[n]:a}}),r(""),i("WARNING"))},f=x=>{const j={...e.library_log_levels};delete j[x],t({...e,library_log_levels:j})},m=["DEBUG","INFO","WARNING","ERROR","CRITICAL"],p=["FULL","compact","lite"],g=["none","title","full"];return o.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"日志配置"}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"日期格式"}),o.jsx(Ne,{value:e.date_style,onChange:x=>t({...e,date_style:x.target.value}),placeholder:"例如: m-d H:i:s"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"m=月, d=日, H=时, i=分, s=秒"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"日志级别样式"}),o.jsxs(Et,{value:e.log_level_style,onValueChange:x=>t({...e,log_level_style:x}),children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:p.map(x=>o.jsx(Pe,{value:x,children:x},x))})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"日志文本颜色"}),o.jsxs(Et,{value:e.color_text,onValueChange:x=>t({...e,color_text:x}),children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:g.map(x=>o.jsx(Pe,{value:x,children:x},x))})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"全局日志级别"}),o.jsxs(Et,{value:e.log_level,onValueChange:x=>t({...e,log_level:x}),children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:m.map(x=>o.jsx(Pe,{value:x,children:x},x))})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"控制台日志级别"}),o.jsxs(Et,{value:e.console_log_level,onValueChange:x=>t({...e,console_log_level:x}),children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:m.map(x=>o.jsx(Pe,{value:x,children:x},x))})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"文件日志级别"}),o.jsxs(Et,{value:e.file_log_level,onValueChange:x=>t({...e,file_log_level:x}),children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsx(jt,{children:m.map(x=>o.jsx(Pe,{value:x,children:x},x))})]})]})]})]}),o.jsxs("div",{children:[o.jsx(J,{className:"mb-2 block",children:"完全屏蔽的库"}),o.jsxs("div",{className:"flex gap-2 mb-2",children:[o.jsx(Ne,{value:n,onChange:x=>r(x.target.value),placeholder:"输入库名",className:"flex-1",onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),l())}}),o.jsx(fe,{onClick:l,size:"sm",className:"flex-shrink-0",children:o.jsx(er,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),o.jsx("div",{className:"flex flex-wrap gap-2",children:e.suppress_libraries.map(x=>o.jsxs("div",{className:"flex items-center gap-1 bg-secondary px-3 py-1 rounded-md",children:[o.jsx("span",{className:"text-sm",children:x}),o.jsx(fe,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>u(x),children:o.jsx(Ut,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},x))})]}),o.jsxs("div",{children:[o.jsx(J,{className:"mb-2 block",children:"特定库的日志级别"}),o.jsxs("div",{className:"flex gap-2 mb-2",children:[o.jsx(Ne,{value:n,onChange:x=>r(x.target.value),placeholder:"输入库名",className:"flex-1"}),o.jsxs(Et,{value:a,onValueChange:i,children:[o.jsx(wt,{className:"w-32",children:o.jsx(At,{})}),o.jsx(jt,{children:m.map(x=>o.jsx(Pe,{value:x,children:x},x))})]}),o.jsx(fe,{onClick:d,size:"sm",children:o.jsx(er,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),o.jsx("div",{className:"space-y-2",children:Object.entries(e.library_log_levels).map(([x,j])=>o.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[o.jsx("span",{className:"text-sm font-medium",children:x}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:j}),o.jsx(fe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>f(x),children:o.jsx(Ut,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]})]},x))})]})]})}function bje({config:e,onChange:t}){return o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"调试配置"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsx(J,{children:"显示 Prompt"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"是否在日志中显示提示词"})]}),o.jsx(at,{checked:e.show_prompt,onCheckedChange:n=>t({...e,show_prompt:n})})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsx(J,{children:"显示回复器 Prompt"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的提示词"})]}),o.jsx(at,{checked:e.show_replyer_prompt,onCheckedChange:n=>t({...e,show_replyer_prompt:n})})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsx(J,{children:"显示回复器推理"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的推理过程"})]}),o.jsx(at,{checked:e.show_replyer_reasoning,onCheckedChange:n=>t({...e,show_replyer_reasoning:n})})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsx(J,{children:"显示 Jargon Prompt"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示术语相关的提示词"})]}),o.jsx(at,{checked:e.show_jargon_prompt,onCheckedChange:n=>t({...e,show_jargon_prompt:n})})]})]})]})}function wje({config:e,onChange:t}){const[n,r]=y.useState(""),a=()=>{n&&!e.auth_token.includes(n)&&(t({...e,auth_token:[...e.auth_token,n]}),r(""))},i=l=>{t({...e,auth_token:e.auth_token.filter((u,d)=>d!==l)})};return o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",children:"MaimMessage 服务配置"}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsx(J,{children:"启用自定义服务器"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"是否使用自定义的 MaimMessage 服务器"})]}),o.jsx(at,{checked:e.use_custom,onCheckedChange:l=>t({...e,use_custom:l})})]}),e.use_custom&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"主机地址"}),o.jsx(Ne,{value:e.host,onChange:l=>t({...e,host:l.target.value}),placeholder:"127.0.0.1"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"端口号"}),o.jsx(Ne,{type:"number",value:e.port,onChange:l=>t({...e,port:parseInt(l.target.value)}),placeholder:"8090"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"连接模式"}),o.jsxs(Et,{value:e.mode,onValueChange:l=>t({...e,mode:l}),children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"ws",children:"WebSocket (ws)"}),o.jsx(Pe,{value:"tcp",children:"TCP"})]})]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{checked:e.use_wss,onCheckedChange:l=>t({...e,use_wss:l}),disabled:e.mode!=="ws"}),o.jsx(J,{children:"使用 WSS 安全连接"})]})]}),e.use_wss&&e.mode==="ws"&&o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"SSL 证书文件路径"}),o.jsx(Ne,{value:e.cert_file,onChange:l=>t({...e,cert_file:l.target.value}),placeholder:"cert.pem"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"SSL 密钥文件路径"}),o.jsx(Ne,{value:e.key_file,onChange:l=>t({...e,key_file:l.target.value}),placeholder:"key.pem"})]})]})]})]})]}),o.jsxs("div",{children:[o.jsx(J,{className:"mb-2 block",children:"认证令牌"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"用于 API 验证,为空则不启用验证"}),o.jsxs("div",{className:"flex gap-2 mb-2",children:[o.jsx(Ne,{value:n,onChange:l=>r(l.target.value),placeholder:"输入认证令牌",onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),a())}}),o.jsx(fe,{onClick:a,size:"sm",children:o.jsx(er,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),o.jsx("div",{className:"space-y-2",children:e.auth_token.map((l,u)=>o.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[o.jsx("span",{className:"text-sm font-mono",children:l}),o.jsx(fe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>i(u),children:o.jsx(Ut,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},u))})]})]})}function jje({config:e,onChange:t}){return o.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"统计信息"}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"space-y-0.5",children:[o.jsx(J,{children:"启用统计信息发送"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"发送匿名统计信息,帮助我们了解全球有多少只麦麦在运行"})]}),o.jsx(at,{checked:e.enable,onCheckedChange:n=>t({...e,enable:n})})]})]})}const Nl=y.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:n,className:ue("w-full caption-bottom text-sm",e),...t})}));Nl.displayName="Table";const Ol=y.forwardRef(({className:e,...t},n)=>o.jsx("thead",{ref:n,className:ue("[&_tr]:border-b",e),...t}));Ol.displayName="TableHeader";const Cl=y.forwardRef(({className:e,...t},n)=>o.jsx("tbody",{ref:n,className:ue("[&_tr:last-child]:border-0",e),...t}));Cl.displayName="TableBody";const Sje=y.forwardRef(({className:e,...t},n)=>o.jsx("tfoot",{ref:n,className:ue("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Sje.displayName="TableFooter";const pn=y.forwardRef(({className:e,...t},n)=>o.jsx("tr",{ref:n,className:ue("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));pn.displayName="TableRow";const Je=y.forwardRef(({className:e,...t},n)=>o.jsx("th",{ref:n,className:ue("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Je.displayName="TableHead";const Ue=y.forwardRef(({className:e,...t},n)=>o.jsx("td",{ref:n,className:ue("px-4 py-3 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Ue.displayName="TableCell";const _je=y.forwardRef(({className:e,...t},n)=>o.jsx("caption",{ref:n,className:ue("mt-4 text-sm text-muted-foreground",e),...t}));_je.displayName="TableCaption";var Ky="Checkbox",[Nje]=fr(Ky),[Oje,wE]=Nje(Ky);function Cje(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:l,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,x]=_a({prop:n,defaultProp:a??!1,onChange:d,caller:Ky}),[j,b]=y.useState(null),[w,N]=y.useState(null),O=y.useRef(!1),C=j?!!l||!!j.closest("form"):!0,A={checked:g,disabled:i,setChecked:x,control:j,setControl:b,name:u,form:l,value:m,hasConsumerStoppedPropagationRef:O,required:f,defaultChecked:Ko(a)?!1:a,isFormControl:C,bubbleInput:w,setBubbleInput:N};return o.jsx(Oje,{scope:t,...A,children:Eje(p)?p(A):r})}var XU="CheckboxTrigger",ZU=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:l,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:x,bubbleInput:j}=wE(XU,e),b=qe(a,m),w=y.useRef(d);return y.useEffect(()=>{const N=i?.form;if(N){const O=()=>p(w.current);return N.addEventListener("reset",O),()=>N.removeEventListener("reset",O)}},[i,p]),o.jsx(Me.button,{type:"button",role:"checkbox","aria-checked":Ko(d)?"mixed":d,"aria-required":f,"data-state":nH(d),"data-disabled":u?"":void 0,disabled:u,value:l,...r,ref:b,onKeyDown:Se(t,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:Se(n,N=>{p(O=>Ko(O)?!0:!O),j&&x&&(g.current=N.isPropagationStopped(),g.current||N.stopPropagation())})})});ZU.displayName=XU;var jE=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:l,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return o.jsx(Cje,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:l,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>o.jsxs(o.Fragment,{children:[o.jsx(ZU,{...p,ref:t,__scopeCheckbox:n}),g&&o.jsx(tH,{__scopeCheckbox:n})]})})});jE.displayName=Ky;var QU="CheckboxIndicator",JU=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=wE(QU,n);return o.jsx(Mn,{present:r||Ko(i.checked)||i.checked===!0,children:o.jsx(Me.span,{"data-state":nH(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});JU.displayName=QU;var eH="CheckboxBubbleInput",tH=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:l,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:x}=wE(eH,e),j=qe(n,x),b=Ey(i),w=Ay(r);y.useEffect(()=>{const O=g;if(!O)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,k=!a.current;if(b!==i&&E){const T=new Event("click",{bubbles:k});O.indeterminate=Ko(i),E.call(O,Ko(i)?!1:i),O.dispatchEvent(T)}},[g,b,i,a]);const N=y.useRef(Ko(i)?!1:i);return o.jsx(Me.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??N.current,required:u,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:j,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});tH.displayName=eH;function Eje(e){return typeof e=="function"}function Ko(e){return e==="indeterminate"}function nH(e){return Ko(e)?"indeterminate":e?"checked":"unchecked"}const Tu=y.forwardRef(({className:e,...t},n)=>o.jsx(jE,{ref:n,className:ue("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:o.jsx(JU,{className:ue("grid place-content-center text-current"),children:o.jsx(tl,{className:"h-4 w-4"})})}));Tu.displayName=jE.displayName;function Aje(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[a,i]=y.useState(!1),[l,u]=y.useState(!1),[d,f]=y.useState(!1),[m,p]=y.useState(!1),[g,x]=y.useState(null),[j,b]=y.useState(null),[w,N]=y.useState(!1),[O,C]=y.useState(null),[A,E]=y.useState(!1),[k,T]=y.useState(""),[P,$]=y.useState(new Set),[z,D]=y.useState(!1),{toast:U}=hr(),V=y.useRef(null),H=y.useRef(!0);y.useEffect(()=>{G()},[]);const G=async()=>{try{r(!0);const ae=await Tg();t(ae.api_providers||[]),f(!1),H.current=!1}catch(ae){console.error("加载配置失败:",ae)}finally{r(!1)}},L=y.useCallback(async ae=>{if(!H.current)try{u(!0),await sO("api_providers",ae),f(!1)}catch(Z){console.error("自动保存失败:",Z),f(!0)}finally{u(!1)}},[]);y.useEffect(()=>{if(!H.current)return f(!0),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{L(e)},2e3),()=>{V.current&&clearTimeout(V.current)}},[e,L]);const R=async()=>{try{i(!0),V.current&&clearTimeout(V.current);const ae=await Tg();ae.api_providers=e,await KU(ae),f(!1),U({title:"保存成功",description:"模型提供商配置已保存"})}catch(ae){console.error("保存配置失败:",ae),U({title:"保存失败",description:ae.message,variant:"destructive"})}finally{i(!1)}},F=(ae,Z)=>{x(ae||{name:"",base_url:"",api_key:"",client_type:"openai",max_retry:2,timeout:30,retry_interval:10}),b(Z),E(!1),p(!0)},K=async()=>{if(g?.api_key)try{await navigator.clipboard.writeText(g.api_key),U({title:"复制成功",description:"API Key 已复制到剪贴板"})}catch{U({title:"复制失败",description:"无法访问剪贴板",variant:"destructive"})}},te=()=>{if(g){if(j!==null){const ae=[...e];ae[j]=g,t(ae)}else t([...e,g]);p(!1),x(null),b(null)}},I=ae=>{C(ae),N(!0)},B=()=>{if(O!==null){const ae=e.filter((Z,pe)=>pe!==O);t(ae),U({title:"删除成功",description:"提供商已从列表中移除"})}N(!1),C(null)},Y=ae=>{const Z=new Set(P);Z.has(ae)?Z.delete(ae):Z.add(ae),$(Z)},ne=()=>{if(P.size===ee.length)$(new Set);else{const ae=ee.map((Z,pe)=>e.findIndex(je=>je===ee[pe]));$(new Set(ae))}},oe=()=>{if(P.size===0){U({title:"提示",description:"请先选择要删除的提供商",variant:"default"});return}D(!0)},xe=()=>{const ae=e.filter((Z,pe)=>!P.has(pe));t(ae),$(new Set),D(!1),U({title:"批量删除成功",description:`已删除 ${P.size} 个提供商`})},ee=e.filter(ae=>{if(!k)return!0;const Z=k.toLowerCase();return ae.name.toLowerCase().includes(Z)||ae.base_url.toLowerCase().includes(Z)||ae.client_type.toLowerCase().includes(Z)});return n?o.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:o.jsx("div",{className:"flex items-center justify-center h-64",children:o.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})}):o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"模型提供商配置"}),o.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理 API 提供商配置"})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[P.size>0&&o.jsxs(fe,{onClick:oe,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[o.jsx(Ut,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",P.size,")"]}),o.jsxs(fe,{onClick:()=>F(null,null),size:"sm",className:"w-full sm:w-auto",children:[o.jsx(er,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加提供商"]}),o.jsxs(fe,{onClick:R,disabled:a||l||!d,size:"sm",variant:"default",className:"w-full sm:w-auto",children:[o.jsx(VC,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),a?"保存中...":l?"自动保存中...":d?"保存配置":"已保存"]})]})]}),o.jsxs(Xt,{className:"h-[calc(100vh-260px)]",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 mb-4",children:[o.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[o.jsx(Rr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(Ne,{placeholder:"搜索提供商名称、URL 或类型...",value:k,onChange:ae=>T(ae.target.value),className:"pl-9"})]}),k&&o.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",ee.length," 个结果"]})]}),o.jsx("div",{className:"md:hidden space-y-3",children:ee.length===0?o.jsx("div",{className:"text-center text-muted-foreground py-8 rounded-lg border bg-card",children:k?"未找到匹配的提供商":'暂无提供商配置,点击"添加提供商"开始配置'}):ee.map((ae,Z)=>o.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"font-semibold text-base truncate",children:ae.name}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1 break-all",children:ae.base_url})]}),o.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>F(ae,Z),children:o.jsx(Cu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>I(Z),children:o.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"客户端类型"}),o.jsx("p",{className:"font-medium",children:ae.client_type})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"最大重试"}),o.jsx("p",{className:"font-medium",children:ae.max_retry})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"超时(秒)"}),o.jsx("p",{className:"font-medium",children:ae.timeout})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"重试间隔(秒)"}),o.jsx("p",{className:"font-medium",children:ae.retry_interval})]})]})]},Z))}),o.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:o.jsxs(Nl,{children:[o.jsx(Ol,{children:o.jsxs(pn,{children:[o.jsx(Je,{className:"w-12",children:o.jsx(Tu,{checked:P.size===ee.length&&ee.length>0,onCheckedChange:ne})}),o.jsx(Je,{children:"名称"}),o.jsx(Je,{children:"基础URL"}),o.jsx(Je,{children:"客户端类型"}),o.jsx(Je,{className:"text-right",children:"最大重试"}),o.jsx(Je,{className:"text-right",children:"超时(秒)"}),o.jsx(Je,{className:"text-right",children:"重试间隔(秒)"}),o.jsx(Je,{className:"text-right",children:"操作"})]})}),o.jsx(Cl,{children:ee.length===0?o.jsx(pn,{children:o.jsx(Ue,{colSpan:8,className:"text-center text-muted-foreground py-8",children:k?"未找到匹配的提供商":'暂无提供商配置,点击"添加提供商"开始配置'})}):ee.map((ae,Z)=>{const pe=e.findIndex(je=>je===ae);return o.jsxs(pn,{children:[o.jsx(Ue,{children:o.jsx(Tu,{checked:P.has(pe),onCheckedChange:()=>Y(pe)})}),o.jsx(Ue,{className:"font-medium",children:ae.name}),o.jsx(Ue,{className:"max-w-xs truncate",title:ae.base_url,children:ae.base_url}),o.jsx(Ue,{children:ae.client_type}),o.jsx(Ue,{className:"text-right",children:ae.max_retry}),o.jsx(Ue,{className:"text-right",children:ae.timeout}),o.jsx(Ue,{className:"text-right",children:ae.retry_interval}),o.jsx(Ue,{className:"text-right",children:o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>F(ae,pe),children:o.jsx(Cu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>I(pe),children:o.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})})]},Z)})})]})})]}),o.jsx(tr,{open:m,onOpenChange:p,children:o.jsxs(Un,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:j!==null?"编辑提供商":"添加提供商"}),o.jsx(ur,{children:"配置 API 提供商的连接信息和参数"})]}),o.jsxs("div",{className:"grid gap-4 py-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"name",children:"名称 *"}),o.jsx(Ne,{id:"name",value:g?.name||"",onChange:ae=>x(Z=>Z?{...Z,name:ae.target.value}:null),placeholder:"例如: DeepSeek, SiliconFlow"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"base_url",children:"基础 URL *"}),o.jsx(Ne,{id:"base_url",value:g?.base_url||"",onChange:ae=>x(Z=>Z?{...Z,base_url:ae.target.value}:null),placeholder:"https://api.example.com/v1"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"api_key",children:"API Key *"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Ne,{id:"api_key",type:A?"text":"password",value:g?.api_key||"",onChange:ae=>x(Z=>Z?{...Z,api_key:ae.target.value}:null),placeholder:"sk-...",className:"flex-1"}),o.jsx(fe,{type:"button",variant:"outline",size:"icon",onClick:()=>E(!A),title:A?"隐藏密钥":"显示密钥",children:A?o.jsx(UN,{className:"h-4 w-4"}):o.jsx(ro,{className:"h-4 w-4"})}),o.jsx(fe,{type:"button",variant:"outline",size:"icon",onClick:K,title:"复制密钥",children:o.jsx(qN,{className:"h-4 w-4"})})]})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"client_type",children:"客户端类型"}),o.jsxs(Et,{value:g?.client_type||"openai",onValueChange:ae=>x(Z=>Z?{...Z,client_type:ae}:null),children:[o.jsx(wt,{id:"client_type",children:o.jsx(At,{placeholder:"选择客户端类型"})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"openai",children:"OpenAI"}),o.jsx(Pe,{value:"gemini",children:"Gemini"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"max_retry",children:"最大重试"}),o.jsx(Ne,{id:"max_retry",type:"number",min:"0",value:g?.max_retry||2,onChange:ae=>x(Z=>Z?{...Z,max_retry:parseInt(ae.target.value)}:null)})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"timeout",children:"超时(秒)"}),o.jsx(Ne,{id:"timeout",type:"number",min:"1",value:g?.timeout||30,onChange:ae=>x(Z=>Z?{...Z,timeout:parseInt(ae.target.value)}:null)})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"retry_interval",children:"重试间隔(秒)"}),o.jsx(Ne,{id:"retry_interval",type:"number",min:"1",value:g?.retry_interval||10,onChange:ae=>x(Z=>Z?{...Z,retry_interval:parseInt(ae.target.value)}:null)})]})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>p(!1),children:"取消"}),o.jsx(fe,{onClick:te,children:"保存"})]})]})}),o.jsx(Pn,{open:w,onOpenChange:N,children:o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:['确定要删除提供商 "',O!==null?e[O]?.name:"",'" 吗? 此操作无法撤销。']})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:B,children:"删除"})]})]})}),o.jsx(Pn,{open:z,onOpenChange:D,children:o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认批量删除"}),o.jsxs(wn,{children:["确定要删除选中的 ",P.size," 个提供商吗? 此操作无法撤销。"]})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:xe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})})]})}var yL=1,Tje=.9,kje=.8,Pje=.17,e_=.1,t_=.999,Mje=.9999,Rje=.99,Dje=/[\\\/_+.#"@\[\(\{&]/,$je=/[\\\/_+.#"@\[\(\{&]/g,Ije=/[\s-]/,rH=/[\s-]/g;function lO(e,t,n,r,a,i,l){if(i===t.length)return a===e.length?yL:Rje;var u=`${a},${i}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(i),f=n.indexOf(d,a),m=0,p,g,x,j;f>=0;)p=lO(e,t,n,r,f+1,i+1,l),p>m&&(f===a?p*=yL:Dje.test(e.charAt(f-1))?(p*=kje,x=e.slice(a,f-1).match($je),x&&a>0&&(p*=Math.pow(t_,x.length))):Ije.test(e.charAt(f-1))?(p*=Tje,j=e.slice(a,f-1).match(rH),j&&a>0&&(p*=Math.pow(t_,j.length))):(p*=Pje,a>0&&(p*=Math.pow(t_,f-a))),e.charAt(f)!==t.charAt(i)&&(p*=Mje)),(p<e_&&n.charAt(f-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(f-1)!==r.charAt(i))&&(g=lO(e,t,n,r,f+1,i+2,l),g*e_>p&&(p=g*e_)),p>m&&(m=p),f=n.indexOf(d,f+1);return l[u]=m,m}function xL(e){return e.toLowerCase().replace(rH," ")}function Lje(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,lO(e,t,xL(e),xL(t),0,0,{})}var Bje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ds=Bje.reduce((e,t)=>{const n=Lh(`Primitive.${t}`),r=y.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),af='[cmdk-group=""]',n_='[cmdk-group-items=""]',zje='[cmdk-group-heading=""]',aH='[cmdk-item=""]',bL=`${aH}:not([aria-disabled="true"])`,cO="cmdk-item-select",kc="data-value",qje=(e,t,n)=>Lje(e,t,n),iH=y.createContext(void 0),Vh=()=>y.useContext(iH),oH=y.createContext(void 0),SE=()=>y.useContext(oH),sH=y.createContext(void 0),lH=y.forwardRef((e,t)=>{let n=Pc(()=>{var B,Y;return{search:"",value:(Y=(B=e.value)!=null?B:e.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Pc(()=>new Set),a=Pc(()=>new Map),i=Pc(()=>new Map),l=Pc(()=>new Set),u=cH(e),{label:d,children:f,value:m,onValueChange:p,filter:g,shouldFilter:x,loop:j,disablePointerSelection:b=!1,vimBindings:w=!0,...N}=e,O=qn(),C=qn(),A=qn(),E=y.useRef(null),k=Qje();vl(()=>{if(m!==void 0){let B=m.trim();n.current.value=B,T.emit()}},[m]),vl(()=>{k(6,V)},[]);let T=y.useMemo(()=>({subscribe:B=>(l.current.add(B),()=>l.current.delete(B)),snapshot:()=>n.current,setState:(B,Y,ne)=>{var oe,xe,ee,ae;if(!Object.is(n.current[B],Y)){if(n.current[B]=Y,B==="search")U(),z(),k(1,D);else if(B==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(A);Z?Z.focus():(oe=document.getElementById(O))==null||oe.focus()}if(k(7,()=>{var Z;n.current.selectedItemId=(Z=H())==null?void 0:Z.id,T.emit()}),ne||k(5,V),((xe=u.current)==null?void 0:xe.value)!==void 0){let Z=Y??"";(ae=(ee=u.current).onValueChange)==null||ae.call(ee,Z);return}}T.emit()}},emit:()=>{l.current.forEach(B=>B())}}),[]),P=y.useMemo(()=>({value:(B,Y,ne)=>{var oe;Y!==((oe=i.current.get(B))==null?void 0:oe.value)&&(i.current.set(B,{value:Y,keywords:ne}),n.current.filtered.items.set(B,$(Y,ne)),k(2,()=>{z(),T.emit()}))},item:(B,Y)=>(r.current.add(B),Y&&(a.current.has(Y)?a.current.get(Y).add(B):a.current.set(Y,new Set([B]))),k(3,()=>{U(),z(),n.current.value||D(),T.emit()}),()=>{i.current.delete(B),r.current.delete(B),n.current.filtered.items.delete(B);let ne=H();k(4,()=>{U(),ne?.getAttribute("id")===B&&D(),T.emit()})}),group:B=>(a.current.has(B)||a.current.set(B,new Set),()=>{i.current.delete(B),a.current.delete(B)}),filter:()=>u.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:O,inputId:A,labelId:C,listInnerRef:E}),[]);function $(B,Y){var ne,oe;let xe=(oe=(ne=u.current)==null?void 0:ne.filter)!=null?oe:qje;return B?xe(B,n.current.search,Y):0}function z(){if(!n.current.search||u.current.shouldFilter===!1)return;let B=n.current.filtered.items,Y=[];n.current.filtered.groups.forEach(oe=>{let xe=a.current.get(oe),ee=0;xe.forEach(ae=>{let Z=B.get(ae);ee=Math.max(Z,ee)}),Y.push([oe,ee])});let ne=E.current;G().sort((oe,xe)=>{var ee,ae;let Z=oe.getAttribute("id"),pe=xe.getAttribute("id");return((ee=B.get(pe))!=null?ee:0)-((ae=B.get(Z))!=null?ae:0)}).forEach(oe=>{let xe=oe.closest(n_);xe?xe.appendChild(oe.parentElement===xe?oe:oe.closest(`${n_} > *`)):ne.appendChild(oe.parentElement===ne?oe:oe.closest(`${n_} > *`))}),Y.sort((oe,xe)=>xe[1]-oe[1]).forEach(oe=>{var xe;let ee=(xe=E.current)==null?void 0:xe.querySelector(`${af}[${kc}="${encodeURIComponent(oe[0])}"]`);ee?.parentElement.appendChild(ee)})}function D(){let B=G().find(ne=>ne.getAttribute("aria-disabled")!=="true"),Y=B?.getAttribute(kc);T.setState("value",Y||void 0)}function U(){var B,Y,ne,oe;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let xe=0;for(let ee of r.current){let ae=(Y=(B=i.current.get(ee))==null?void 0:B.value)!=null?Y:"",Z=(oe=(ne=i.current.get(ee))==null?void 0:ne.keywords)!=null?oe:[],pe=$(ae,Z);n.current.filtered.items.set(ee,pe),pe>0&&xe++}for(let[ee,ae]of a.current)for(let Z of ae)if(n.current.filtered.items.get(Z)>0){n.current.filtered.groups.add(ee);break}n.current.filtered.count=xe}function V(){var B,Y,ne;let oe=H();oe&&(((B=oe.parentElement)==null?void 0:B.firstChild)===oe&&((ne=(Y=oe.closest(af))==null?void 0:Y.querySelector(zje))==null||ne.scrollIntoView({block:"nearest"})),oe.scrollIntoView({block:"nearest"}))}function H(){var B;return(B=E.current)==null?void 0:B.querySelector(`${aH}[aria-selected="true"]`)}function G(){var B;return Array.from(((B=E.current)==null?void 0:B.querySelectorAll(bL))||[])}function L(B){let Y=G()[B];Y&&T.setState("value",Y.getAttribute(kc))}function R(B){var Y;let ne=H(),oe=G(),xe=oe.findIndex(ae=>ae===ne),ee=oe[xe+B];(Y=u.current)!=null&&Y.loop&&(ee=xe+B<0?oe[oe.length-1]:xe+B===oe.length?oe[0]:oe[xe+B]),ee&&T.setState("value",ee.getAttribute(kc))}function F(B){let Y=H(),ne=Y?.closest(af),oe;for(;ne&&!oe;)ne=B>0?Xje(ne,af):Zje(ne,af),oe=ne?.querySelector(bL);oe?T.setState("value",oe.getAttribute(kc)):R(B)}let K=()=>L(G().length-1),te=B=>{B.preventDefault(),B.metaKey?K():B.altKey?F(1):R(1)},I=B=>{B.preventDefault(),B.metaKey?L(0):B.altKey?F(-1):R(-1)};return y.createElement(ds.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:B=>{var Y;(Y=N.onKeyDown)==null||Y.call(N,B);let ne=B.nativeEvent.isComposing||B.keyCode===229;if(!(B.defaultPrevented||ne))switch(B.key){case"n":case"j":{w&&B.ctrlKey&&te(B);break}case"ArrowDown":{te(B);break}case"p":case"k":{w&&B.ctrlKey&&I(B);break}case"ArrowUp":{I(B);break}case"Home":{B.preventDefault(),L(0);break}case"End":{B.preventDefault(),K();break}case"Enter":{B.preventDefault();let oe=H();if(oe){let xe=new Event(cO);oe.dispatchEvent(xe)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:e1e},d),Xy(e,B=>y.createElement(oH.Provider,{value:T},y.createElement(iH.Provider,{value:P},B))))}),Fje=y.forwardRef((e,t)=>{var n,r;let a=qn(),i=y.useRef(null),l=y.useContext(sH),u=Vh(),d=cH(e),f=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l?.forceMount;vl(()=>{if(!f)return u.item(a,l?.id)},[f]);let m=uH(a,i,[e.value,e.children,i],e.keywords),p=SE(),g=ts(k=>k.value&&k.value===m.current),x=ts(k=>f||u.filter()===!1?!0:k.search?k.filtered.items.get(a)>0:!0);y.useEffect(()=>{let k=i.current;if(!(!k||e.disabled))return k.addEventListener(cO,j),()=>k.removeEventListener(cO,j)},[x,e.onSelect,e.disabled]);function j(){var k,T;b(),(T=(k=d.current).onSelect)==null||T.call(k,m.current)}function b(){p.setState("value",m.current,!0)}if(!x)return null;let{disabled:w,value:N,onSelect:O,forceMount:C,keywords:A,...E}=e;return y.createElement(ds.div,{ref:Mr(i,t),...E,id:a,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!g,"data-disabled":!!w,"data-selected":!!g,onPointerMove:w||u.getDisablePointerSelection()?void 0:b,onClick:w?void 0:j},e.children)}),Uje=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...i}=e,l=qn(),u=y.useRef(null),d=y.useRef(null),f=qn(),m=Vh(),p=ts(x=>a||m.filter()===!1?!0:x.search?x.filtered.groups.has(l):!0);vl(()=>m.group(l),[]),uH(l,u,[e.value,e.heading,d]);let g=y.useMemo(()=>({id:l,forceMount:a}),[a]);return y.createElement(ds.div,{ref:Mr(u,t),...i,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&y.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Xy(e,x=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},y.createElement(sH.Provider,{value:g},x))))}),Hje=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=y.useRef(null),i=ts(l=>!l.search);return!n&&!i?null:y.createElement(ds.div,{ref:Mr(a,t),...r,"cmdk-separator":"",role:"separator"})}),Wje=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,i=SE(),l=ts(f=>f.search),u=ts(f=>f.selectedItemId),d=Vh();return y.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),y.createElement(ds.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":u,id:d.inputId,type:"text",value:a?e.value:l,onChange:f=>{a||i.setState("search",f.target.value),n?.(f.target.value)}})}),Vje=y.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,i=y.useRef(null),l=y.useRef(null),u=ts(f=>f.selectedItemId),d=Vh();return y.useEffect(()=>{if(l.current&&i.current){let f=l.current,m=i.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let x=f.offsetHeight;m.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return g.observe(f),()=>{cancelAnimationFrame(p),g.unobserve(f)}}},[]),y.createElement(ds.div,{ref:Mr(i,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:d.listId},Xy(e,f=>y.createElement("div",{ref:Mr(l,d.listInnerRef),"cmdk-list-sizer":""},f)))}),Gje=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:i,container:l,...u}=e;return y.createElement(tE,{open:n,onOpenChange:r},y.createElement(nE,{container:l},y.createElement(Dy,{"cmdk-overlay":"",className:a}),y.createElement($y,{"aria-label":e.label,"cmdk-dialog":"",className:i},y.createElement(lH,{ref:t,...u}))))}),Yje=y.forwardRef((e,t)=>ts(n=>n.filtered.count===0)?y.createElement(ds.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Kje=y.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...i}=e;return y.createElement(ds.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Xy(e,l=>y.createElement("div",{"aria-hidden":!0},l)))}),Lr=Object.assign(lH,{List:Vje,Item:Fje,Input:Wje,Group:Uje,Separator:Hje,Dialog:Gje,Empty:Yje,Loading:Kje});function Xje(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Zje(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function cH(e){let t=y.useRef(e);return vl(()=>{t.current=e}),t}var vl=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Pc(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ts(e){let t=SE(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function uH(e,t,n,r=[]){let a=y.useRef(),i=Vh();return vl(()=>{var l;let u=(()=>{var f;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),d=r.map(f=>f.trim());i.value(e,u,d),(l=t.current)==null||l.setAttribute(kc,u),a.current=u}),a}var Qje=()=>{let[e,t]=y.useState(),n=Pc(()=>new Map);return vl(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function Jje(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Xy({asChild:e,children:t},n){return e&&y.isValidElement(t)?y.cloneElement(Jje(t),{ref:t.ref},n(t.props.children)):n(t)}var e1e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const dH=y.forwardRef(({className:e,...t},n)=>o.jsx(Lr,{ref:n,className:ue("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));dH.displayName=Lr.displayName;const fH=y.forwardRef(({className:e,...t},n)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(Rr,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(Lr.Input,{ref:n,className:ue("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));fH.displayName=Lr.Input.displayName;const hH=y.forwardRef(({className:e,...t},n)=>o.jsx(Lr.List,{ref:n,className:ue("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));hH.displayName=Lr.List.displayName;const mH=y.forwardRef((e,t)=>o.jsx(Lr.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));mH.displayName=Lr.Empty.displayName;const pH=y.forwardRef(({className:e,...t},n)=>o.jsx(Lr.Group,{ref:n,className:ue("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));pH.displayName=Lr.Group.displayName;const t1e=y.forwardRef(({className:e,...t},n)=>o.jsx(Lr.Separator,{ref:n,className:ue("-mx-1 h-px bg-border",e),...t}));t1e.displayName=Lr.Separator.displayName;const vH=y.forwardRef(({className:e,...t},n)=>o.jsx(Lr.Item,{ref:n,className:ue("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));vH.displayName=Lr.Item.displayName;function n1e({options:e,selected:t,onChange:n,placeholder:r="选择选项...",emptyText:a="未找到选项",className:i}){const[l,u]=y.useState(!1),d=m=>{t.includes(m)?n(t.filter(p=>p!==m)):n([...t,m])},f=m=>{n(t.filter(p=>p!==m))};return o.jsxs(Jo,{open:l,onOpenChange:u,children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",role:"combobox","aria-expanded":l,className:ue("w-full justify-between min-h-10 h-auto",i),children:[o.jsx("div",{className:"flex gap-1 flex-wrap flex-1",children:t.length===0?o.jsx("span",{className:"text-muted-foreground",children:r}):t.map(m=>{const p=e.find(g=>g.value===m);return o.jsxs(en,{variant:"secondary",className:"cursor-pointer hover:bg-secondary/80",onClick:g=>{g.stopPropagation(),f(m)},children:[p?.label||m,o.jsx(Ih,{className:"ml-1 h-3 w-3",strokeWidth:2,fill:"none"})]},m)})}),o.jsx(ove,{className:"ml-2 h-4 w-4 shrink-0 opacity-50",strokeWidth:2,fill:"none"})]})}),o.jsx(oo,{className:"w-full p-0",align:"start",children:o.jsxs(dH,{children:[o.jsx(fH,{placeholder:"搜索...",className:"h-9"}),o.jsxs(hH,{children:[o.jsx(mH,{children:a}),o.jsx(pH,{children:e.map(m=>{const p=t.includes(m.value);return o.jsxs(vH,{value:m.value,onSelect:()=>d(m.value),children:[o.jsx("div",{className:ue("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",p?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:o.jsx(tl,{className:"h-3 w-3",strokeWidth:2,fill:"none"})}),o.jsx("span",{children:m.label})]},m.value)})})]})]})})]})}function r1e(){const[e,t]=y.useState([]),[n,r]=y.useState([]),[a,i]=y.useState([]),[l,u]=y.useState(null),[d,f]=y.useState(!0),[m,p]=y.useState(!1),[g,x]=y.useState(!1),[j,b]=y.useState(!1),[w,N]=y.useState(!1),[O,C]=y.useState(null),[A,E]=y.useState(null),[k,T]=y.useState(!1),[P,$]=y.useState(null),[z,D]=y.useState(""),[U,V]=y.useState(new Set),[H,G]=y.useState(!1),{toast:L}=hr(),R=y.useRef(null),F=y.useRef(null),K=y.useRef(!0);y.useEffect(()=>{te()},[]);const te=async()=>{try{f(!0);const me=await Tg(),ve=me.models||[];t(ve),i(ve.map(Dt=>Dt.name));const Le=me.api_providers||[];r(Le.map(Dt=>Dt.name)),u(me.model_task_config||null),b(!1),K.current=!1}catch(me){console.error("加载配置失败:",me)}finally{f(!1)}},I=y.useCallback(async me=>{if(!K.current)try{x(!0),await sO("models",me),b(!1)}catch(ve){console.error("自动保存模型列表失败:",ve),b(!0)}finally{x(!1)}},[]),B=y.useCallback(async me=>{if(!K.current)try{x(!0),await sO("model_task_config",me),b(!1)}catch(ve){console.error("自动保存任务配置失败:",ve),b(!0)}finally{x(!1)}},[]);y.useEffect(()=>{if(!K.current)return b(!0),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{I(e)},2e3),()=>{R.current&&clearTimeout(R.current)}},[e,I]),y.useEffect(()=>{if(!(K.current||!l))return b(!0),F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{B(l)},2e3),()=>{F.current&&clearTimeout(F.current)}},[l,B]);const Y=async()=>{try{p(!0),R.current&&clearTimeout(R.current),F.current&&clearTimeout(F.current);const me=await Tg();me.models=e,me.model_task_config=l,await KU(me),b(!1),L({title:"保存成功",description:"模型配置已保存"}),await te()}catch(me){console.error("保存配置失败:",me),L({title:"保存失败",description:me.message,variant:"destructive"})}finally{p(!1)}},ne=(me,ve)=>{C(me||{model_identifier:"",name:"",api_provider:n[0]||"",price_in:0,price_out:0,force_stream_mode:!1,extra_params:{}}),E(ve),N(!0)},oe=()=>{if(O){if(A!==null){const me=[...e];me[A]=O,t(me)}else t([...e,O]);N(!1),C(null),E(null)}},xe=me=>{$(me),T(!0)},ee=()=>{if(P!==null){const me=e.filter((ve,Le)=>Le!==P);t(me),L({title:"删除成功",description:"模型已从列表中移除"})}T(!1),$(null)},ae=me=>{const ve=new Set(U);ve.has(me)?ve.delete(me):ve.add(me),V(ve)},Z=()=>{if(U.size===Re.length)V(new Set);else{const me=Re.map((ve,Le)=>e.findIndex(Dt=>Dt===Re[Le]));V(new Set(me))}},pe=()=>{if(U.size===0){L({title:"提示",description:"请先选择要删除的模型",variant:"default"});return}G(!0)},je=()=>{const me=e.filter((ve,Le)=>!U.has(Le));t(me),V(new Set),G(!1),L({title:"批量删除成功",description:`已删除 ${U.size} 个模型`})},le=(me,ve,Le)=>{l&&u({...l,[me]:{...l[me],[ve]:Le}})},Re=e.filter(me=>{if(!z)return!0;const ve=z.toLowerCase();return me.name.toLowerCase().includes(ve)||me.model_identifier.toLowerCase().includes(ve)||me.api_provider.toLowerCase().includes(ve)}),_e=me=>l?[l.utils?.model_list||[],l.utils_small?.model_list||[],l.tool_use?.model_list||[],l.replyer?.model_list||[],l.planner?.model_list||[],l.vlm?.model_list||[],l.voice?.model_list||[],l.embedding?.model_list||[],l.lpmm_entity_extract?.model_list||[],l.lpmm_rdf_build?.model_list||[],l.lpmm_qa?.model_list||[]].some(Le=>Le.includes(me)):!1;return d?o.jsx(Xt,{className:"h-full",children:o.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:o.jsx("div",{className:"flex items-center justify-center h-64",children:o.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):o.jsx(Xt,{className:"h-full",children:o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"模型配置"}),o.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理模型和任务配置"})]}),o.jsxs(fe,{onClick:Y,disabled:m||g||!j,size:"sm",className:"w-full sm:w-auto",children:[o.jsx(VC,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),m?"保存中...":g?"自动保存中...":j?"保存配置":"已保存"]})]}),o.jsxs(ol,{defaultValue:"models",className:"w-full",children:[o.jsxs(Xo,{className:"grid w-full max-w-full sm:max-w-md grid-cols-2",children:[o.jsx(Ct,{value:"models",children:"模型配置"}),o.jsx(Ct,{value:"tasks",children:"模型任务配置"})]}),o.jsxs(Qt,{value:"models",className:"space-y-4 mt-0",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-2",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"配置可用的模型列表"}),o.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[U.size>0&&o.jsxs(fe,{onClick:pe,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[o.jsx(Ut,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",U.size,")"]}),o.jsxs(fe,{onClick:()=>ne(null,null),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[o.jsx(er,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加模型"]})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2",children:[o.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[o.jsx(Rr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(Ne,{placeholder:"搜索模型名称、标识符或提供商...",value:z,onChange:me=>D(me.target.value),className:"pl-9"})]}),z&&o.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",Re.length," 个结果"]})]}),o.jsx("div",{className:"md:hidden space-y-3",children:Re.length===0?o.jsx("div",{className:"text-center text-muted-foreground py-8 rounded-lg border bg-card",children:z?"未找到匹配的模型":"暂无模型配置"}):Re.map((me,ve)=>{const Le=_e(me.name);return o.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx("h3",{className:"font-semibold text-base",children:me.name}),o.jsx(en,{variant:Le?"default":"secondary",className:Le?"bg-green-600 hover:bg-green-700":"",children:Le?"已使用":"未使用"})]}),o.jsx("p",{className:"text-xs text-muted-foreground break-all",title:me.model_identifier,children:me.model_identifier})]}),o.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>ne(me,ve),children:o.jsx(Cu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>xe(ve),children:o.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"提供商"}),o.jsx("p",{className:"font-medium",children:me.api_provider})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"强制流式"}),o.jsx("p",{className:"font-medium",children:me.force_stream_mode?"是":"否"})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"输入价格"}),o.jsxs("p",{className:"font-medium",children:["¥",me.price_in,"/M"]})]}),o.jsxs("div",{children:[o.jsx("span",{className:"text-muted-foreground text-xs",children:"输出价格"}),o.jsxs("p",{className:"font-medium",children:["¥",me.price_out,"/M"]})]})]})]},ve)})}),o.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:o.jsxs(Nl,{children:[o.jsx(Ol,{children:o.jsxs(pn,{children:[o.jsx(Je,{className:"w-12",children:o.jsx(Tu,{checked:U.size===Re.length&&Re.length>0,onCheckedChange:Z})}),o.jsx(Je,{className:"w-24",children:"使用状态"}),o.jsx(Je,{children:"模型名称"}),o.jsx(Je,{children:"模型标识符"}),o.jsx(Je,{children:"提供商"}),o.jsx(Je,{className:"text-right",children:"输入价格"}),o.jsx(Je,{className:"text-right",children:"输出价格"}),o.jsx(Je,{className:"text-center",children:"强制流式"}),o.jsx(Je,{className:"text-right",children:"操作"})]})}),o.jsx(Cl,{children:Re.length===0?o.jsx(pn,{children:o.jsx(Ue,{colSpan:9,className:"text-center text-muted-foreground py-8",children:z?"未找到匹配的模型":"暂无模型配置"})}):Re.map((me,ve)=>{const Le=e.findIndex(Nn=>Nn===me),Dt=_e(me.name);return o.jsxs(pn,{children:[o.jsx(Ue,{children:o.jsx(Tu,{checked:U.has(Le),onCheckedChange:()=>ae(Le)})}),o.jsx(Ue,{children:o.jsx(en,{variant:Dt?"default":"secondary",className:Dt?"bg-green-600 hover:bg-green-700":"",children:Dt?"已使用":"未使用"})}),o.jsx(Ue,{className:"font-medium",children:me.name}),o.jsx(Ue,{className:"max-w-xs truncate",title:me.model_identifier,children:me.model_identifier}),o.jsx(Ue,{children:me.api_provider}),o.jsxs(Ue,{className:"text-right",children:["¥",me.price_in,"/M"]}),o.jsxs(Ue,{className:"text-right",children:["¥",me.price_out,"/M"]}),o.jsx(Ue,{className:"text-center",children:me.force_stream_mode?"是":"否"}),o.jsx(Ue,{className:"text-right",children:o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>ne(me,Le),children:o.jsx(Cu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>xe(Le),children:o.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})})]},ve)})})]})})]}),o.jsxs(Qt,{value:"tasks",className:"space-y-6 mt-0",children:[o.jsx("p",{className:"text-sm text-muted-foreground",children:"为不同的任务配置使用的模型和参数"}),l&&o.jsxs("div",{className:"grid gap-4 sm:gap-6",children:[o.jsx(Ma,{title:"组件模型 (utils)",description:"用于表情包、取名、关系、情绪变化等组件",taskConfig:l.utils,modelNames:a,onChange:(me,ve)=>le("utils",me,ve)}),o.jsx(Ma,{title:"组件小模型 (utils_small)",description:"消耗量较大的组件,建议使用速度较快的小模型",taskConfig:l.utils_small,modelNames:a,onChange:(me,ve)=>le("utils_small",me,ve)}),o.jsx(Ma,{title:"工具调用模型 (tool_use)",description:"需要使用支持工具调用的模型",taskConfig:l.tool_use,modelNames:a,onChange:(me,ve)=>le("tool_use",me,ve)}),o.jsx(Ma,{title:"首要回复模型 (replyer)",description:"用于表达器和表达方式学习",taskConfig:l.replyer,modelNames:a,onChange:(me,ve)=>le("replyer",me,ve)}),o.jsx(Ma,{title:"决策模型 (planner)",description:"负责决定麦麦该什么时候回复",taskConfig:l.planner,modelNames:a,onChange:(me,ve)=>le("planner",me,ve)}),o.jsx(Ma,{title:"图像识别模型 (vlm)",description:"视觉语言模型",taskConfig:l.vlm,modelNames:a,onChange:(me,ve)=>le("vlm",me,ve),hideTemperature:!0}),o.jsx(Ma,{title:"语音识别模型 (voice)",description:"语音转文字",taskConfig:l.voice,modelNames:a,onChange:(me,ve)=>le("voice",me,ve),hideTemperature:!0,hideMaxTokens:!0}),o.jsx(Ma,{title:"嵌入模型 (embedding)",description:"用于向量化",taskConfig:l.embedding,modelNames:a,onChange:(me,ve)=>le("embedding",me,ve),hideTemperature:!0,hideMaxTokens:!0}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库模型"}),o.jsx(Ma,{title:"实体提取模型 (lpmm_entity_extract)",description:"从文本中提取实体",taskConfig:l.lpmm_entity_extract,modelNames:a,onChange:(me,ve)=>le("lpmm_entity_extract",me,ve)}),o.jsx(Ma,{title:"RDF 构建模型 (lpmm_rdf_build)",description:"构建知识图谱",taskConfig:l.lpmm_rdf_build,modelNames:a,onChange:(me,ve)=>le("lpmm_rdf_build",me,ve)}),o.jsx(Ma,{title:"问答模型 (lpmm_qa)",description:"知识库问答",taskConfig:l.lpmm_qa,modelNames:a,onChange:(me,ve)=>le("lpmm_qa",me,ve)})]})]})]})]}),o.jsx(tr,{open:w,onOpenChange:N,children:o.jsxs(Un,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:A!==null?"编辑模型":"添加模型"}),o.jsx(ur,{children:"配置模型的基本信息和参数"})]}),o.jsxs("div",{className:"grid gap-4 py-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"model_name",children:"模型名称 *"}),o.jsx(Ne,{id:"model_name",value:O?.name||"",onChange:me=>C(ve=>ve?{...ve,name:me.target.value}:null),placeholder:"例如: qwen3-30b"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"用于在任务配置中引用此模型"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"model_identifier",children:"模型标识符 *"}),o.jsx(Ne,{id:"model_identifier",value:O?.model_identifier||"",onChange:me=>C(ve=>ve?{...ve,model_identifier:me.target.value}:null),placeholder:"Qwen/Qwen3-30B-A3B-Instruct-2507"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"API 提供商提供的模型 ID"})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"api_provider",children:"API 提供商 *"}),o.jsxs(Et,{value:O?.api_provider||"",onValueChange:me=>C(ve=>ve?{...ve,api_provider:me}:null),children:[o.jsx(wt,{id:"api_provider",children:o.jsx(At,{placeholder:"选择提供商"})}),o.jsx(jt,{children:n.map(me=>o.jsx(Pe,{value:me,children:me},me))})]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"price_in",children:"输入价格 (¥/M token)"}),o.jsx(Ne,{id:"price_in",type:"number",step:"0.1",min:"0",value:O?.price_in||0,onChange:me=>C(ve=>ve?{...ve,price_in:parseFloat(me.target.value)}:null)})]}),o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{htmlFor:"price_out",children:"输出价格 (¥/M token)"}),o.jsx(Ne,{id:"price_out",type:"number",step:"0.1",min:"0",value:O?.price_out||0,onChange:me=>C(ve=>ve?{...ve,price_out:parseFloat(me.target.value)}:null)})]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"force_stream_mode",checked:O?.force_stream_mode||!1,onCheckedChange:me=>C(ve=>ve?{...ve,force_stream_mode:me}:null)}),o.jsx(J,{htmlFor:"force_stream_mode",className:"cursor-pointer",children:"强制流式输出模式"})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>N(!1),children:"取消"}),o.jsx(fe,{onClick:oe,children:"保存"})]})]})}),o.jsx(Pn,{open:k,onOpenChange:T,children:o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:['确定要删除模型 "',P!==null?e[P]?.name:"",'" 吗? 此操作无法撤销。']})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:ee,children:"删除"})]})]})}),o.jsx(Pn,{open:H,onOpenChange:G,children:o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认批量删除"}),o.jsxs(wn,{children:["确定要删除选中的 ",U.size," 个模型吗? 此操作无法撤销。"]})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:je,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})})]})})}function Ma({title:e,description:t,taskConfig:n,modelNames:r,onChange:a,hideTemperature:i=!1,hideMaxTokens:l=!1}){const u=d=>{a("model_list",d)};return o.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"font-semibold text-base sm:text-lg",children:e}),o.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mt-1",children:t})]}),o.jsxs("div",{className:"grid gap-4",children:[o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"模型列表"}),o.jsx(n1e,{options:r.map(d=>({label:d,value:d})),selected:n.model_list||[],onChange:u,placeholder:"选择模型...",emptyText:"暂无可用模型"})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[!i&&o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"温度"}),o.jsx(Ne,{type:"number",step:"0.1",min:"0",max:"2",value:n.temperature||.3,onChange:d=>a("temperature",parseFloat(d.target.value))})]}),!l&&o.jsxs("div",{className:"grid gap-2",children:[o.jsx(J,{children:"最大 Token"}),o.jsx(Ne,{type:"number",step:"1",min:"1",value:n.max_tokens||1024,onChange:d=>a("max_tokens",parseInt(d.target.value))})]})]})]})]})}const El="/api/webui/emoji";async function a1e(e){const t=new URLSearchParams;e.page&&t.append("page",e.page.toString()),e.page_size&&t.append("page_size",e.page_size.toString()),e.search&&t.append("search",e.search),e.is_registered!==void 0&&t.append("is_registered",e.is_registered.toString()),e.is_banned!==void 0&&t.append("is_banned",e.is_banned.toString()),e.format&&t.append("format",e.format),e.sort_by&&t.append("sort_by",e.sort_by),e.sort_order&&t.append("sort_order",e.sort_order);const n=await Ze(`${El}/list?${t}`,{headers:st()});if(!n.ok)throw new Error(`获取表情包列表失败: ${n.statusText}`);return n.json()}async function i1e(e){const t=await Ze(`${El}/${e}`,{headers:st()});if(!t.ok)throw new Error(`获取表情包详情失败: ${t.statusText}`);return t.json()}async function o1e(e,t){const n=await Ze(`${El}/${e}`,{method:"PATCH",headers:st(),body:JSON.stringify(t)});if(!n.ok)throw new Error(`更新表情包失败: ${n.statusText}`);return n.json()}async function s1e(e){const t=await Ze(`${El}/${e}`,{method:"DELETE",headers:st()});if(!t.ok)throw new Error(`删除表情包失败: ${t.statusText}`);return t.json()}async function l1e(){const e=await Ze(`${El}/stats/summary`,{headers:st()});if(!e.ok)throw new Error(`获取统计数据失败: ${e.statusText}`);return e.json()}async function c1e(e){const t=await Ze(`${El}/${e}/register`,{method:"POST",headers:st()});if(!t.ok)throw new Error(`注册表情包失败: ${t.statusText}`);return t.json()}async function u1e(e){const t=await Ze(`${El}/${e}/ban`,{method:"POST",headers:st()});if(!t.ok)throw new Error(`封禁表情包失败: ${t.statusText}`);return t.json()}function d1e(){const[e,t]=y.useState([]),[n,r]=y.useState(null),[a,i]=y.useState(!1),[l,u]=y.useState(1),[d,f]=y.useState(0),[m]=y.useState(20),[p,g]=y.useState(""),[x,j]=y.useState("all"),[b,w]=y.useState("all"),[N,O]=y.useState("all"),[C,A]=y.useState(null),[E,k]=y.useState(!1),[T,P]=y.useState(!1),[$,z]=y.useState(!1),{toast:D}=hr(),U=y.useCallback(async()=>{try{i(!0);const I=await a1e({page:l,page_size:m,search:p||void 0,is_registered:x==="all"?void 0:x==="registered",is_banned:b==="all"?void 0:b==="banned",format:N==="all"?void 0:N,sort_by:"usage_count",sort_order:"desc"});t(I.data),f(I.total)}catch(I){const B=I instanceof Error?I.message:"加载表情包列表失败";D({title:"错误",description:B,variant:"destructive"})}finally{i(!1)}},[l,m,p,x,b,N,D]),V=async()=>{try{const I=await l1e();r(I.data)}catch(I){console.error("加载统计数据失败:",I)}};y.useEffect(()=>{U()},[U]),y.useEffect(()=>{V()},[]);const H=async I=>{try{const B=await i1e(I.id);A(B.data),k(!0)}catch(B){const Y=B instanceof Error?B.message:"加载详情失败";D({title:"错误",description:Y,variant:"destructive"})}},G=I=>{A(I),P(!0)},L=I=>{A(I),z(!0)},R=async()=>{if(C)try{await s1e(C.id),D({title:"成功",description:"表情包已删除"}),z(!1),A(null),U(),V()}catch(I){const B=I instanceof Error?I.message:"删除失败";D({title:"错误",description:B,variant:"destructive"})}},F=async I=>{try{await c1e(I.id),D({title:"成功",description:"表情包已注册"}),U(),V()}catch(B){const Y=B instanceof Error?B.message:"注册失败";D({title:"错误",description:Y,variant:"destructive"})}},K=async I=>{try{await u1e(I.id),D({title:"成功",description:"表情包已封禁"}),U(),V()}catch(B){const Y=B instanceof Error?B.message:"封禁失败";D({title:"错误",description:Y,variant:"destructive"})}},te=n?.formats?Object.keys(n.formats):[];return o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"表情包管理"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理麦麦的表情包资源"})]}),n&&o.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[o.jsx(dt,{children:o.jsxs(Vt,{className:"pb-2",children:[o.jsx(Jn,{children:"总数"}),o.jsx(Gt,{className:"text-2xl",children:n.total})]})}),o.jsx(dt,{children:o.jsxs(Vt,{className:"pb-2",children:[o.jsx(Jn,{children:"已注册"}),o.jsx(Gt,{className:"text-2xl text-green-600",children:n.registered})]})}),o.jsx(dt,{children:o.jsxs(Vt,{className:"pb-2",children:[o.jsx(Jn,{children:"已封禁"}),o.jsx(Gt,{className:"text-2xl text-red-600",children:n.banned})]})}),o.jsx(dt,{children:o.jsxs(Vt,{className:"pb-2",children:[o.jsx(Jn,{children:"未注册"}),o.jsx(Gt,{className:"text-2xl text-gray-600",children:n.unregistered})]})})]}),o.jsxs(dt,{children:[o.jsx(Vt,{children:o.jsxs(Gt,{className:"flex items-center gap-2",children:[o.jsx(HN,{className:"h-5 w-5"}),"搜索和筛选"]})}),o.jsxs(ln,{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{children:"搜索"}),o.jsxs("div",{className:"relative",children:[o.jsx(Rr,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),o.jsx(Ne,{placeholder:"描述或哈希值...",value:p,onChange:I=>{g(I.target.value),u(1)},className:"pl-8"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{children:"注册状态"}),o.jsxs(Et,{value:x,onValueChange:I=>{j(I),u(1)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部"}),o.jsx(Pe,{value:"registered",children:"已注册"}),o.jsx(Pe,{value:"unregistered",children:"未注册"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{children:"封禁状态"}),o.jsxs(Et,{value:b,onValueChange:I=>{w(I),u(1)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部"}),o.jsx(Pe,{value:"banned",children:"已封禁"}),o.jsx(Pe,{value:"unbanned",children:"未封禁"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{children:"格式"}),o.jsxs(Et,{value:N,onValueChange:I=>{O(I),u(1)},children:[o.jsx(wt,{children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部"}),te.map(I=>o.jsxs(Pe,{value:I,children:[I.toUpperCase()," (",n?.formats[I],")"]},I))]})]})]})]}),o.jsx("div",{className:"flex justify-end",children:o.jsxs(fe,{variant:"outline",size:"sm",onClick:U,disabled:a,children:[o.jsx(rl,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"刷新"]})})]})]}),o.jsxs(dt,{children:[o.jsxs(Vt,{children:[o.jsx(Gt,{children:"表情包列表"}),o.jsxs(Jn,{children:["共 ",d," 个表情包,当前第 ",l," 页"]})]}),o.jsxs(ln,{children:[o.jsx("div",{className:"rounded-md border",children:o.jsxs(Nl,{children:[o.jsx(Ol,{children:o.jsxs(pn,{children:[o.jsx(Je,{className:"w-16",children:"预览"}),o.jsx(Je,{children:"描述"}),o.jsx(Je,{children:"格式"}),o.jsx(Je,{className:"text-center",children:"状态"}),o.jsx(Je,{className:"text-right",children:"使用次数"}),o.jsx(Je,{className:"text-right",children:"操作"})]})}),o.jsx(Cl,{children:e.length===0?o.jsx(pn,{children:o.jsx(Ue,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):e.map(I=>o.jsxs(pn,{children:[o.jsx(Ue,{children:o.jsx("div",{className:"w-12 h-12 bg-muted rounded flex items-center justify-center",children:o.jsx(kve,{className:"h-6 w-6 text-muted-foreground"})})}),o.jsx(Ue,{children:o.jsxs("div",{className:"space-y-1",children:[o.jsx("div",{className:"font-medium",children:I.description||"无描述"}),o.jsxs("div",{className:"text-xs text-muted-foreground font-mono",children:[I.emoji_hash.slice(0,16),"..."]})]})}),o.jsx(Ue,{children:o.jsx(en,{variant:"outline",children:I.format.toUpperCase()})}),o.jsx(Ue,{children:o.jsxs("div",{className:"flex gap-2 justify-center",children:[I.is_registered&&o.jsxs(en,{variant:"default",className:"bg-green-600",children:[o.jsx(Ou,{className:"h-3 w-3 mr-1"}),"已注册"]}),I.is_banned&&o.jsxs(en,{variant:"destructive",children:[o.jsx(Vq,{className:"h-3 w-3 mr-1"}),"已封禁"]})]})}),o.jsx(Ue,{className:"text-right font-mono",children:I.usage_count}),o.jsx(Ue,{children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>H(I),children:o.jsx(Gq,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>G(I),children:o.jsx(YC,{className:"h-4 w-4"})}),!I.is_registered&&o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>F(I),className:"text-green-600 hover:text-green-700",children:o.jsx(Ou,{className:"h-4 w-4"})}),!I.is_banned&&o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>K(I),className:"text-orange-600 hover:text-orange-700",children:o.jsx(Wpe,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>L(I),className:"text-red-600 hover:text-red-700",children:o.jsx(Ut,{className:"h-4 w-4"})})]})})]},I.id))})]})}),d>m&&o.jsxs("div",{className:"flex items-center justify-between mt-4",children:[o.jsxs("div",{className:"text-sm text-muted-foreground",children:["显示 ",(l-1)*m+1," 到"," ",Math.min(l*m,d)," 条,共 ",d," 条"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(fe,{variant:"outline",size:"sm",onClick:()=>u(I=>Math.max(1,I-1)),disabled:l===1,children:[o.jsx(UC,{className:"h-4 w-4"}),"上一页"]}),o.jsxs("div",{className:"text-sm",children:["第 ",l," / ",Math.ceil(d/m)," 页"]}),o.jsxs(fe,{variant:"outline",size:"sm",onClick:()=>u(I=>I+1),disabled:l>=Math.ceil(d/m),children:["下一页",o.jsx(HC,{className:"h-4 w-4"})]})]})]})]})]}),o.jsx(f1e,{emoji:C,open:E,onOpenChange:k}),o.jsx(h1e,{emoji:C,open:T,onOpenChange:P,onSuccess:()=>{U(),V()}}),o.jsx(tr,{open:$,onOpenChange:z,children:o.jsxs(Un,{children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"确认删除"}),o.jsx(ur,{children:"确定要删除这个表情包吗?此操作无法撤销。"})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>z(!1),children:"取消"}),o.jsx(fe,{variant:"destructive",onClick:R,children:"删除"})]})]})})]})}function f1e({emoji:e,open:t,onOpenChange:n}){if(!e)return null;const r=a=>a?new Date(a*1e3).toLocaleString("zh-CN"):"-";return o.jsx(tr,{open:t,onOpenChange:n,children:o.jsxs(Un,{className:"max-w-2xl",children:[o.jsx(Hn,{children:o.jsx(Wn,{children:"表情包详情"})}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"ID"}),o.jsx("div",{className:"mt-1 font-mono",children:e.id})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"格式"}),o.jsx("div",{className:"mt-1",children:o.jsx(en,{variant:"outline",children:e.format.toUpperCase()})})]})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"文件路径"}),o.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:e.full_path})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"哈希值"}),o.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:e.emoji_hash})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"描述"}),o.jsx("div",{className:"mt-1",children:e.description||"-"})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"情绪标签"}),o.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.emotion&&e.emotion.length>0?e.emotion.map((a,i)=>o.jsx(en,{variant:"secondary",children:a},i)):o.jsx("span",{className:"text-sm text-muted-foreground",children:"无"})})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"状态"}),o.jsxs("div",{className:"mt-2 flex gap-2",children:[e.is_registered&&o.jsx(en,{variant:"default",className:"bg-green-600",children:"已注册"}),e.is_banned&&o.jsx(en,{variant:"destructive",children:"已封禁"}),!e.is_registered&&!e.is_banned&&o.jsx(en,{variant:"outline",children:"未注册"})]})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"使用次数"}),o.jsx("div",{className:"mt-1 font-mono text-lg",children:e.usage_count})]})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"记录时间"}),o.jsx("div",{className:"mt-1 text-sm",children:r(e.record_time)})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"注册时间"}),o.jsx("div",{className:"mt-1 text-sm",children:r(e.register_time)})]})]}),o.jsxs("div",{children:[o.jsx(J,{className:"text-muted-foreground",children:"最后使用"}),o.jsx("div",{className:"mt-1 text-sm",children:r(e.last_used_time)})]})]})]})})}function h1e({emoji:e,open:t,onOpenChange:n,onSuccess:r}){const[a,i]=y.useState(""),[l,u]=y.useState(""),[d,f]=y.useState(!1),[m,p]=y.useState(!1),[g,x]=y.useState(!1),{toast:j}=hr();y.useEffect(()=>{e&&(i(e.description||""),u(e.emotion?e.emotion.join(", "):""),f(e.is_registered),p(e.is_banned))},[e]);const b=async()=>{if(e)try{x(!0);const w=l.split(",").map(N=>N.trim()).filter(Boolean);await o1e(e.id,{description:a||void 0,emotion:w.length>0?w:void 0,is_registered:d,is_banned:m}),j({title:"成功",description:"表情包信息已更新"}),n(!1),r()}catch(w){const N=w instanceof Error?w.message:"保存失败";j({title:"错误",description:N,variant:"destructive"})}finally{x(!1)}};return e?o.jsx(tr,{open:t,onOpenChange:n,children:o.jsxs(Un,{className:"max-w-2xl",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"编辑表情包"}),o.jsx(ur,{children:"修改表情包的描述和标签信息"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx(J,{children:"描述"}),o.jsx(qt,{value:a,onChange:w=>i(w.target.value),placeholder:"输入表情包描述...",rows:3,className:"mt-1"})]}),o.jsxs("div",{children:[o.jsx(J,{children:"情绪标签"}),o.jsx(Ne,{value:l,onChange:w=>u(w.target.value),placeholder:"使用逗号分隔多个标签,如:开心, 微笑, 快乐",className:"mt-1"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"输入多个标签时使用逗号分隔"})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("input",{type:"checkbox",id:"is_registered",checked:d,onChange:w=>f(w.target.checked),className:"rounded border-gray-300"}),o.jsx(J,{htmlFor:"is_registered",className:"cursor-pointer",children:"已注册"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("input",{type:"checkbox",id:"is_banned",checked:m,onChange:w=>p(w.target.checked),className:"rounded border-gray-300"}),o.jsx(J,{htmlFor:"is_banned",className:"cursor-pointer",children:"已封禁"})]})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>n(!1),children:"取消"}),o.jsx(fe,{onClick:b,disabled:g,children:g?"保存中...":"保存"})]})]})}):null}const Xu="/api/webui/expression";async function m1e(e){const t=new URLSearchParams;e.page&&t.append("page",e.page.toString()),e.page_size&&t.append("page_size",e.page_size.toString()),e.search&&t.append("search",e.search),e.chat_id&&t.append("chat_id",e.chat_id);const n=await Ze(`${Xu}/list?${t}`,{headers:st()});if(!n.ok){const r=await n.json();throw new Error(r.detail||"获取表达方式列表失败")}return n.json()}async function p1e(e){const t=await Ze(`${Xu}/${e}`,{headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"获取表达方式详情失败")}return t.json()}async function v1e(e){const t=await Ze(`${Xu}/`,{method:"POST",headers:st(),body:JSON.stringify(e)});if(!t.ok){const n=await t.json();throw new Error(n.detail||"创建表达方式失败")}return t.json()}async function g1e(e,t){const n=await Ze(`${Xu}/${e}`,{method:"PATCH",headers:st(),body:JSON.stringify(t)});if(!n.ok){const r=await n.json();throw new Error(r.detail||"更新表达方式失败")}return n.json()}async function y1e(e){const t=await Ze(`${Xu}/${e}`,{method:"DELETE",headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"删除表达方式失败")}return t.json()}async function x1e(){const e=await Ze(`${Xu}/stats/summary`,{headers:st()});if(!e.ok){const t=await e.json();throw new Error(t.detail||"获取统计数据失败")}return e.json()}function b1e(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[a,i]=y.useState(0),[l,u]=y.useState(1),[d]=y.useState(20),[f,m]=y.useState(""),[p,g]=y.useState(null),[x,j]=y.useState(!1),[b,w]=y.useState(!1),[N,O]=y.useState(!1),[C,A]=y.useState(null),[E,k]=y.useState({total:0,recent_7days:0,chat_count:0,top_chats:{}}),{toast:T}=hr(),P=async()=>{try{r(!0);const H=await m1e({page:l,page_size:d,search:f||void 0});t(H.data),i(H.total)}catch(H){T({title:"加载失败",description:H instanceof Error?H.message:"无法加载表达方式",variant:"destructive"})}finally{r(!1)}},$=async()=>{try{const H=await x1e();k(H.data)}catch(H){console.error("加载统计数据失败:",H)}};y.useEffect(()=>{P(),$()},[l,d,f]);const z=async H=>{try{const G=await p1e(H.id);g(G.data),j(!0)}catch(G){T({title:"加载详情失败",description:G instanceof Error?G.message:"无法加载表达方式详情",variant:"destructive"})}},D=H=>{g(H),w(!0)},U=async H=>{try{await y1e(H.id),T({title:"删除成功",description:`已删除表达方式: ${H.situation}`}),A(null),P(),$()}catch(G){T({title:"删除失败",description:G instanceof Error?G.message:"无法删除表达方式",variant:"destructive"})}},V=H=>H?new Date(H*1e3).toLocaleString("zh-CN"):"-";return o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[o.jsx($h,{className:"h-8 w-8",strokeWidth:2}),"表达方式管理"]}),o.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦的表达方式和话术模板"})]}),o.jsxs(fe,{onClick:()=>O(!0),className:"gap-2",children:[o.jsx(er,{className:"h-4 w-4"}),"新增表达方式"]})]}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"总数量"}),o.jsx("div",{className:"text-2xl font-bold mt-1",children:E.total})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"近7天新增"}),o.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:E.recent_7days})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"关联聊天数"}),o.jsx("div",{className:"text-2xl font-bold mt-1 text-blue-600",children:E.chat_count})]})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsx(J,{htmlFor:"search",children:"搜索"}),o.jsxs("div",{className:"relative mt-1.5",children:[o.jsx(Rr,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),o.jsx(Ne,{id:"search",placeholder:"搜索情境、风格或上下文...",value:f,onChange:H=>m(H.target.value),className:"pl-9"})]})]}),o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsx(Xt,{className:"h-[calc(100vh-500px)]",children:o.jsxs(Nl,{children:[o.jsx(Ol,{children:o.jsxs(pn,{children:[o.jsx(Je,{children:"情境"}),o.jsx(Je,{children:"风格"}),o.jsx(Je,{children:"聊天ID"}),o.jsx(Je,{children:"最后活跃"}),o.jsx(Je,{className:"text-right",children:"操作"})]})}),o.jsx(Cl,{children:n?o.jsx(pn,{children:o.jsx(Ue,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):e.length===0?o.jsx(pn,{children:o.jsx(Ue,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):e.map(H=>o.jsxs(pn,{children:[o.jsx(Ue,{className:"font-medium max-w-xs truncate",children:H.situation}),o.jsx(Ue,{className:"max-w-xs truncate",children:H.style}),o.jsx(Ue,{className:"font-mono text-sm",children:H.chat_id}),o.jsx(Ue,{className:"text-sm text-muted-foreground",children:V(H.last_active_time)}),o.jsx(Ue,{className:"text-right",children:o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>z(H),children:o.jsx(ro,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>D(H),children:o.jsx(YC,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>A(H),children:o.jsx(Ut,{className:"h-4 w-4 text-destructive"})})]})})]},H.id))})]})}),a>d&&o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t",children:[o.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",a," 条记录,第 ",l," / ",Math.ceil(a/d)," 页"]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l-1),disabled:l===1,children:"上一页"}),o.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l+1),disabled:l>=Math.ceil(a/d),children:"下一页"})]})]})]}),o.jsx(w1e,{expression:p,open:x,onOpenChange:j}),o.jsx(j1e,{open:N,onOpenChange:O,onSuccess:()=>{P(),$(),O(!1)}}),o.jsx(S1e,{expression:p,open:b,onOpenChange:w,onSuccess:()=>{P(),$(),w(!1)}}),o.jsx(Pn,{open:!!C,onOpenChange:()=>A(null),children:o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:['确定要删除表达方式 "',C?.situation,'" 吗? 此操作不可撤销。']})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>C&&U(C),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})})]})}function w1e({expression:e,open:t,onOpenChange:n}){if(!e)return null;const r=a=>a?new Date(a*1e3).toLocaleString("zh-CN"):"-";return o.jsx(tr,{open:t,onOpenChange:n,children:o.jsxs(Un,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"表达方式详情"}),o.jsx(ur,{children:"查看表达方式的完整信息"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx(Oc,{label:"情境",value:e.situation}),o.jsx(Oc,{label:"风格",value:e.style}),o.jsx(Oc,{icon:bg,label:"聊天ID",value:e.chat_id,mono:!0}),o.jsx(Oc,{icon:bg,label:"记录ID",value:e.id.toString(),mono:!0})]}),e.context&&o.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[o.jsx(J,{className:"text-xs text-muted-foreground",children:"上下文"}),o.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:e.context})]}),e.up_content&&o.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[o.jsx(J,{className:"text-xs text-muted-foreground",children:"上文内容"}),o.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:e.up_content})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx(Oc,{icon:nl,label:"最后活跃",value:r(e.last_active_time)}),o.jsx(Oc,{icon:nl,label:"创建时间",value:r(e.create_date)})]})]}),o.jsx(Dr,{children:o.jsx(fe,{onClick:()=>n(!1),children:"关闭"})})]})})}function Oc({icon:e,label:t,value:n,mono:r=!1}){return o.jsxs("div",{className:"space-y-1",children:[o.jsxs(J,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e&&o.jsx(e,{className:"h-3 w-3"}),t]}),o.jsx("div",{className:ue("text-sm",r&&"font-mono",!n&&"text-muted-foreground"),children:n||"-"})]})}function j1e({open:e,onOpenChange:t,onSuccess:n}){const[r,a]=y.useState({situation:"",style:"",context:"",up_content:"",chat_id:""}),[i,l]=y.useState(!1),{toast:u}=hr(),d=async()=>{if(!r.situation||!r.style||!r.chat_id){u({title:"验证失败",description:"请填写必填字段:情境、风格和聊天ID",variant:"destructive"});return}try{l(!0),await v1e(r),u({title:"创建成功",description:"表达方式已创建"}),a({situation:"",style:"",context:"",up_content:"",chat_id:""}),n()}catch(f){u({title:"创建失败",description:f instanceof Error?f.message:"无法创建表达方式",variant:"destructive"})}finally{l(!1)}};return o.jsx(tr,{open:e,onOpenChange:t,children:o.jsxs(Un,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"新增表达方式"}),o.jsx(ur,{children:"创建新的表达方式记录"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(J,{htmlFor:"situation",children:["情境 ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(Ne,{id:"situation",value:r.situation,onChange:f=>a({...r,situation:f.target.value}),placeholder:"描述使用场景"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(J,{htmlFor:"style",children:["风格 ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(Ne,{id:"style",value:r.style,onChange:f=>a({...r,style:f.target.value}),placeholder:"描述表达风格"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(J,{htmlFor:"chat_id",children:["聊天ID ",o.jsx("span",{className:"text-destructive",children:"*"})]}),o.jsx(Ne,{id:"chat_id",value:r.chat_id,onChange:f=>a({...r,chat_id:f.target.value}),placeholder:"关联的聊天ID"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"context",children:"上下文"}),o.jsx(qt,{id:"context",value:r.context,onChange:f=>a({...r,context:f.target.value}),placeholder:"上下文信息(可选)",rows:3})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"up_content",children:"上文内容"}),o.jsx(qt,{id:"up_content",value:r.up_content,onChange:f=>a({...r,up_content:f.target.value}),placeholder:"上文内容(可选)",rows:3})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>t(!1),children:"取消"}),o.jsx(fe,{onClick:d,disabled:i,children:i?"创建中...":"创建"})]})]})})}function S1e({expression:e,open:t,onOpenChange:n,onSuccess:r}){const[a,i]=y.useState({}),[l,u]=y.useState(!1),{toast:d}=hr();y.useEffect(()=>{e&&i({situation:e.situation,style:e.style,context:e.context||"",up_content:e.up_content||"",chat_id:e.chat_id})},[e]);const f=async()=>{if(e)try{u(!0),await g1e(e.id,a),d({title:"保存成功",description:"表达方式已更新"}),r()}catch(m){d({title:"保存失败",description:m instanceof Error?m.message:"无法更新表达方式",variant:"destructive"})}finally{u(!1)}};return e?o.jsx(tr,{open:t,onOpenChange:n,children:o.jsxs(Un,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"编辑表达方式"}),o.jsx(ur,{children:"修改表达方式的信息"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit_situation",children:"情境"}),o.jsx(Ne,{id:"edit_situation",value:a.situation||"",onChange:m=>i({...a,situation:m.target.value}),placeholder:"描述使用场景"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit_style",children:"风格"}),o.jsx(Ne,{id:"edit_style",value:a.style||"",onChange:m=>i({...a,style:m.target.value}),placeholder:"描述表达风格"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit_chat_id",children:"聊天ID"}),o.jsx(Ne,{id:"edit_chat_id",value:a.chat_id||"",onChange:m=>i({...a,chat_id:m.target.value}),placeholder:"关联的聊天ID"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit_context",children:"上下文"}),o.jsx(qt,{id:"edit_context",value:a.context||"",onChange:m=>i({...a,context:m.target.value}),placeholder:"上下文信息",rows:3})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit_up_content",children:"上文内容"}),o.jsx(qt,{id:"edit_up_content",value:a.up_content||"",onChange:m=>i({...a,up_content:m.target.value}),placeholder:"上文内容",rows:3})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>n(!1),children:"取消"}),o.jsx(fe,{onClick:f,disabled:l,children:l?"保存中...":"保存"})]})]})}):null}const Gh="/api/webui/person";async function _1e(e){const t=new URLSearchParams;e.page&&t.append("page",e.page.toString()),e.page_size&&t.append("page_size",e.page_size.toString()),e.search&&t.append("search",e.search),e.is_known!==void 0&&t.append("is_known",e.is_known.toString()),e.platform&&t.append("platform",e.platform);const n=await Ze(`${Gh}/list?${t}`,{headers:st()});if(!n.ok){const r=await n.json();throw new Error(r.detail||"获取人物列表失败")}return n.json()}async function N1e(e){const t=await Ze(`${Gh}/${e}`,{headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"获取人物详情失败")}return t.json()}async function O1e(e,t){const n=await Ze(`${Gh}/${e}`,{method:"PATCH",headers:st(),body:JSON.stringify(t)});if(!n.ok){const r=await n.json();throw new Error(r.detail||"更新人物信息失败")}return n.json()}async function C1e(e){const t=await Ze(`${Gh}/${e}`,{method:"DELETE",headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"删除人物信息失败")}return t.json()}async function E1e(){const e=await Ze(`${Gh}/stats/summary`,{headers:st()});if(!e.ok){const t=await e.json();throw new Error(t.detail||"获取统计数据失败")}return e.json()}function A1e(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[a,i]=y.useState(0),[l,u]=y.useState(1),[d]=y.useState(20),[f,m]=y.useState(""),[p,g]=y.useState(void 0),[x,j]=y.useState(void 0),[b,w]=y.useState(null),[N,O]=y.useState(!1),[C,A]=y.useState(!1),[E,k]=y.useState(null),[T,P]=y.useState({total:0,known:0,unknown:0,platforms:{}}),{toast:$}=hr(),z=async()=>{try{r(!0);const R=await _1e({page:l,page_size:d,search:f||void 0,is_known:p,platform:x});t(R.data),i(R.total)}catch(R){$({title:"加载失败",description:R instanceof Error?R.message:"无法加载人物信息",variant:"destructive"})}finally{r(!1)}},D=async()=>{try{const R=await E1e();P(R.data)}catch(R){console.error("加载统计数据失败:",R)}};y.useEffect(()=>{z(),D()},[l,d,f,p,x]);const U=async R=>{try{const F=await N1e(R.person_id);w(F.data),O(!0)}catch(F){$({title:"加载详情失败",description:F instanceof Error?F.message:"无法加载人物详情",variant:"destructive"})}},V=R=>{w(R),A(!0)},H=async R=>{try{await C1e(R.person_id),$({title:"删除成功",description:`已删除人物信息: ${R.person_name||R.nickname||R.user_id}`}),k(null),z(),D()}catch(F){$({title:"删除失败",description:F instanceof Error?F.message:"无法删除人物信息",variant:"destructive"})}},G=y.useMemo(()=>Object.keys(T.platforms),[T.platforms]),L=R=>R?new Date(R*1e3).toLocaleString("zh-CN"):"-";return o.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[o.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:o.jsxs("div",{children:[o.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[o.jsx(Nge,{className:"h-8 w-8",strokeWidth:2}),"人物信息管理"]}),o.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦认识的所有人物信息"})]})}),o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"总人数"}),o.jsx("div",{className:"text-2xl font-bold mt-1",children:T.total})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"已认识"}),o.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:T.known})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"未认识"}),o.jsx("div",{className:"text-2xl font-bold mt-1 text-muted-foreground",children:T.unknown})]})]}),o.jsx("div",{className:"rounded-lg border bg-card p-4",children:o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-4",children:[o.jsxs("div",{className:"sm:col-span-2",children:[o.jsx(J,{htmlFor:"search",children:"搜索"}),o.jsxs("div",{className:"relative mt-1.5",children:[o.jsx(Rr,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),o.jsx(Ne,{id:"search",placeholder:"搜索名称、昵称或用户ID...",value:f,onChange:R=>m(R.target.value),className:"pl-9"})]})]}),o.jsxs("div",{children:[o.jsx(J,{htmlFor:"filter-known",children:"认识状态"}),o.jsxs(Et,{value:p===void 0?"all":p.toString(),onValueChange:R=>{g(R==="all"?void 0:R==="true"),u(1)},children:[o.jsx(wt,{id:"filter-known",className:"mt-1.5",children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部"}),o.jsx(Pe,{value:"true",children:"已认识"}),o.jsx(Pe,{value:"false",children:"未认识"})]})]})]}),o.jsxs("div",{children:[o.jsx(J,{htmlFor:"filter-platform",children:"平台"}),o.jsxs(Et,{value:x||"all",onValueChange:R=>{j(R==="all"?void 0:R),u(1)},children:[o.jsx(wt,{id:"filter-platform",className:"mt-1.5",children:o.jsx(At,{})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部平台"}),G.map(R=>o.jsxs(Pe,{value:R,children:[R," (",T.platforms[R],")"]},R))]})]})]})]})}),o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsx(Xt,{className:"h-[calc(100vh-500px)]",children:o.jsxs(Nl,{children:[o.jsx(Ol,{children:o.jsxs(pn,{children:[o.jsx(Je,{children:"状态"}),o.jsx(Je,{children:"名称"}),o.jsx(Je,{children:"昵称"}),o.jsx(Je,{children:"平台"}),o.jsx(Je,{children:"用户ID"}),o.jsx(Je,{children:"最后更新"}),o.jsx(Je,{className:"text-right",children:"操作"})]})}),o.jsx(Cl,{children:n?o.jsx(pn,{children:o.jsx(Ue,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):e.length===0?o.jsx(pn,{children:o.jsx(Ue,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):e.map(R=>o.jsxs(pn,{children:[o.jsx(Ue,{children:o.jsx("div",{className:ue("inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium",R.is_known?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-400"),children:R.is_known?"已认识":"未认识"})}),o.jsx(Ue,{className:"font-medium",children:R.person_name||o.jsx("span",{className:"text-muted-foreground",children:"-"})}),o.jsx(Ue,{children:R.nickname||"-"}),o.jsx(Ue,{children:R.platform}),o.jsx(Ue,{className:"font-mono text-sm",children:R.user_id}),o.jsx(Ue,{className:"text-sm text-muted-foreground",children:L(R.last_know)}),o.jsx(Ue,{className:"text-right",children:o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>U(R),children:o.jsx(ro,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>V(R),children:o.jsx(YC,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>k(R),children:o.jsx(Ut,{className:"h-4 w-4 text-destructive"})})]})})]},R.id))})]})}),a>d&&o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t",children:[o.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",a," 条记录,第 ",l," / ",Math.ceil(a/d)," 页"]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l-1),disabled:l===1,children:"上一页"}),o.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l+1),disabled:l>=Math.ceil(a/d),children:"下一页"})]})]})]}),o.jsx(T1e,{person:b,open:N,onOpenChange:O}),o.jsx(k1e,{person:b,open:C,onOpenChange:A,onSuccess:()=>{z(),D(),A(!1)}}),o.jsx(Pn,{open:!!E,onOpenChange:()=>k(null),children:o.jsxs(gn,{children:[o.jsxs(yn,{children:[o.jsx(bn,{children:"确认删除"}),o.jsxs(wn,{children:['确定要删除人物信息 "',E?.person_name||E?.nickname||E?.user_id,'" 吗? 此操作不可撤销。']})]}),o.jsxs(xn,{children:[o.jsx(Sn,{children:"取消"}),o.jsx(jn,{onClick:()=>E&&H(E),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})})]})}function T1e({person:e,open:t,onOpenChange:n}){if(!e)return null;const r=a=>a?new Date(a*1e3).toLocaleString("zh-CN"):"-";return o.jsx(tr,{open:t,onOpenChange:n,children:o.jsxs(Un,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"人物详情"}),o.jsxs(ur,{children:["查看 ",e.person_name||e.nickname||e.user_id," 的完整信息"]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx(Fi,{icon:Zq,label:"人物名称",value:e.person_name}),o.jsx(Fi,{icon:$h,label:"昵称",value:e.nickname}),o.jsx(Fi,{icon:bg,label:"用户ID",value:e.user_id,mono:!0}),o.jsx(Fi,{icon:bg,label:"人物ID",value:e.person_id,mono:!0}),o.jsx(Fi,{label:"平台",value:e.platform}),o.jsx(Fi,{label:"状态",value:e.is_known?"已认识":"未认识"})]}),e.name_reason&&o.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[o.jsx(J,{className:"text-xs text-muted-foreground",children:"名称设定原因"}),o.jsx("p",{className:"mt-1 text-sm",children:e.name_reason})]}),e.memory_points&&o.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[o.jsx(J,{className:"text-xs text-muted-foreground",children:"个人印象"}),o.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:e.memory_points})]}),e.group_nick_name&&e.group_nick_name.length>0&&o.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[o.jsx(J,{className:"text-xs text-muted-foreground",children:"群昵称"}),o.jsx("div",{className:"mt-2 space-y-1",children:e.group_nick_name.map((a,i)=>o.jsxs("div",{className:"text-sm flex items-center gap-2",children:[o.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:a.group_id}),o.jsx("span",{children:"→"}),o.jsx("span",{children:a.group_nick_name})]},i))})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[o.jsx(Fi,{icon:nl,label:"认识时间",value:r(e.know_times)}),o.jsx(Fi,{icon:nl,label:"首次记录",value:r(e.know_since)}),o.jsx(Fi,{icon:nl,label:"最后更新",value:r(e.last_know)})]})]}),o.jsx(Dr,{children:o.jsx(fe,{onClick:()=>n(!1),children:"关闭"})})]})})}function Fi({icon:e,label:t,value:n,mono:r=!1}){return o.jsxs("div",{className:"space-y-1",children:[o.jsxs(J,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e&&o.jsx(e,{className:"h-3 w-3"}),t]}),o.jsx("div",{className:ue("text-sm",r&&"font-mono",!n&&"text-muted-foreground"),children:n||"-"})]})}function k1e({person:e,open:t,onOpenChange:n,onSuccess:r}){const[a,i]=y.useState({}),[l,u]=y.useState(!1),{toast:d}=hr();y.useEffect(()=>{e&&i({person_name:e.person_name||"",name_reason:e.name_reason||"",nickname:e.nickname||"",memory_points:e.memory_points||"",is_known:e.is_known})},[e]);const f=async()=>{if(e)try{u(!0),await O1e(e.person_id,a),d({title:"保存成功",description:"人物信息已更新"}),r()}catch(m){d({title:"保存失败",description:m instanceof Error?m.message:"无法更新人物信息",variant:"destructive"})}finally{u(!1)}};return e?o.jsx(tr,{open:t,onOpenChange:n,children:o.jsxs(Un,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"编辑人物信息"}),o.jsxs(ur,{children:["修改 ",e.person_name||e.nickname||e.user_id," 的信息"]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"person_name",children:"人物名称"}),o.jsx(Ne,{id:"person_name",value:a.person_name||"",onChange:m=>i({...a,person_name:m.target.value}),placeholder:"为这个人设置一个名称"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"nickname",children:"昵称"}),o.jsx(Ne,{id:"nickname",value:a.nickname||"",onChange:m=>i({...a,nickname:m.target.value}),placeholder:"昵称"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"name_reason",children:"名称设定原因"}),o.jsx(qt,{id:"name_reason",value:a.name_reason||"",onChange:m=>i({...a,name_reason:m.target.value}),placeholder:"为什么这样称呼这个人?",rows:2})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"memory_points",children:"个人印象"}),o.jsx(qt,{id:"memory_points",value:a.memory_points||"",onChange:m=>i({...a,memory_points:m.target.value}),placeholder:"对这个人的印象和记忆点...",rows:4})]}),o.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[o.jsxs("div",{children:[o.jsx(J,{htmlFor:"is_known",className:"text-base font-medium",children:"已认识"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"标记是否已经认识这个人"})]}),o.jsx(at,{id:"is_known",checked:a.is_known,onCheckedChange:m=>i({...a,is_known:m})})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>n(!1),children:"取消"}),o.jsx(fe,{onClick:f,disabled:l,children:l?"保存中...":"保存"})]})]})}):null}function P1e(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const M1e={},ff={};function Gs(e,t){try{const r=(M1e[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in ff?ff[r]:wL(r,r.split(":"))}catch{if(e in ff)return ff[e];const n=e?.match(R1e);return n?wL(e,n.slice(1)):NaN}}const R1e=/([+-]\d\d):?(\d\d)?/;function wL(e,t){const n=+(t[0]||0),r=+(t[1]||0),a=+(t[2]||0)/60;return ff[e]=n*60+r>0?n*60+r+a:n*60-r-a}class li extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Gs(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),gH(this),uO(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new li(...n,t):new li(Date.now(),t)}withTimeZone(t){return new li(+this,t)}getTimezoneOffset(){const t=-Gs(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),uO(this),+this}[Symbol.for("constructDateFrom")](t){return new li(+new Date(t),this.timeZone)}}const jL=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!jL.test(e))return;const t=e.replace(jL,"$1UTC");li.prototype[t]&&(e.startsWith("get")?li.prototype[e]=function(){return this.internal[t]()}:(li.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),D1e(this),+this},li.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),uO(this),+this}))});function uO(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Gs(e.timeZone,e)*60))}function D1e(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),gH(e)}function gH(e){const t=Gs(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const a=-new Date(+e).getTimezoneOffset(),i=-new Date(+r).getTimezoneOffset(),l=a-i,u=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();l&&u&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+l);const d=a-n;d&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const f=new Date(+e);f.setUTCSeconds(0);const m=a>0?f.getSeconds():(f.getSeconds()-60)%60,p=Math.round(-(Gs(e.timeZone,e)*60))%60;(p||m)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+p),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+m));const g=Gs(e.timeZone,e),x=g>0?Math.floor(g):Math.ceil(g),b=-new Date(+e).getTimezoneOffset()-x,w=x!==n,N=b-d;if(w&&N){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+N);const O=Gs(e.timeZone,e),C=O>0?Math.floor(O):Math.ceil(O),A=x-C;A&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+A),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+A))}}class or extends li{static tz(t,...n){return n.length?new or(...n,t):new or(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),a=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,a]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,a]=this.tzComponents();return`${t} GMT${n}${r}${a} (${P1e(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[n,r,a]}withTimeZone(t){return new or(+this,t)}[Symbol.for("constructDateFrom")](t){return new or(+new Date(t),this.timeZone)}}const yH=6048e5,$1e=864e5,SL=Symbol.for("constructDateFrom");function _n(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&SL in e?e[SL](t):e instanceof Date?new e.constructor(t):new Date(t)}function Rt(e,t){return _n(t||e,e)}function xH(e,t,n){const r=Rt(e,n?.in);return isNaN(t)?_n(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function bH(e,t,n){const r=Rt(e,n?.in);if(isNaN(t))return _n(e,NaN);if(!t)return r;const a=r.getDate(),i=_n(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const l=i.getDate();return a>=l?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}let I1e={};function Yh(){return I1e}function ns(e,t){const n=Yh(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Rt(e,t?.in),i=a.getDay(),l=(i<r?7:0)+i-r;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function mh(e,t){return ns(e,{...t,weekStartsOn:1})}function wH(e,t){const n=Rt(e,t?.in),r=n.getFullYear(),a=_n(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=mh(a),l=_n(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const u=mh(l);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function _L(e){const t=Rt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Al(e,...t){const n=_n.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function ph(e,t){const n=Rt(e,t?.in);return n.setHours(0,0,0,0),n}function jH(e,t,n){const[r,a]=Al(n?.in,e,t),i=ph(r),l=ph(a),u=+i-_L(i),d=+l-_L(l);return Math.round((u-d)/$1e)}function L1e(e,t){const n=wH(e,t),r=_n(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),mh(r)}function B1e(e,t,n){return xH(e,t*7,n)}function z1e(e,t,n){return bH(e,t*12,n)}function q1e(e,t){let n,r=t?.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=_n.bind(null,a));const i=Rt(a,r);(!n||n<i||isNaN(+i))&&(n=i)}),_n(r,n||NaN)}function F1e(e,t){let n,r=t?.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=_n.bind(null,a));const i=Rt(a,r);(!n||n>i||isNaN(+i))&&(n=i)}),_n(r,n||NaN)}function U1e(e,t,n){const[r,a]=Al(n?.in,e,t);return+ph(r)==+ph(a)}function SH(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function H1e(e){return!(!SH(e)&&typeof e!="number"||isNaN(+Rt(e)))}function W1e(e,t,n){const[r,a]=Al(n?.in,e,t),i=r.getFullYear()-a.getFullYear(),l=r.getMonth()-a.getMonth();return i*12+l}function V1e(e,t){const n=Rt(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function _H(e,t){const[n,r]=Al(e,t.start,t.end);return{start:n,end:r}}function G1e(e,t){const{start:n,end:r}=_H(t?.in,e);let a=+n>+r;const i=a?+n:+r,l=a?r:n;l.setHours(0,0,0,0),l.setDate(1);let u=1;const d=[];for(;+l<=i;)d.push(_n(n,l)),l.setMonth(l.getMonth()+u);return a?d.reverse():d}function Y1e(e,t){const n=Rt(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function K1e(e,t){const n=Rt(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function NH(e,t){const n=Rt(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function X1e(e,t){const{start:n,end:r}=_H(t?.in,e);let a=+n>+r;const i=a?+n:+r,l=a?r:n;l.setHours(0,0,0,0),l.setMonth(0,1);let u=1;const d=[];for(;+l<=i;)d.push(_n(n,l)),l.setFullYear(l.getFullYear()+u);return a?d.reverse():d}function OH(e,t){const n=Yh(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Rt(e,t?.in),i=a.getDay(),l=(i<r?-7:0)+6-(i-r);return a.setDate(a.getDate()+l),a.setHours(23,59,59,999),a}function Z1e(e,t){return OH(e,{...t,weekStartsOn:1})}const Q1e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},J1e=(e,t,n)=>{let r;const a=Q1e[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Yc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const eSe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},tSe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},nSe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rSe={date:Yc({formats:eSe,defaultWidth:"full"}),time:Yc({formats:tSe,defaultWidth:"full"}),dateTime:Yc({formats:nSe,defaultWidth:"full"})},aSe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iSe=(e,t,n,r)=>aSe[e];function ni(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):l;a=e.formattingValues[u]||e.formattingValues[l]}else{const l=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;a=e.values[u]||e.values[l]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const oSe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},sSe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lSe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},cSe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},uSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},dSe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fSe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},hSe={ordinalNumber:fSe,era:ni({values:oSe,defaultWidth:"wide"}),quarter:ni({values:sSe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ni({values:lSe,defaultWidth:"wide"}),day:ni({values:cSe,defaultWidth:"wide"}),dayPeriod:ni({values:uSe,defaultWidth:"wide",formattingValues:dSe,defaultFormattingWidth:"wide"})};function ri(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const l=i[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?pSe(u,p=>p.test(l)):mSe(u,p=>p.test(l));let f;f=e.valueCallback?e.valueCallback(d):d,f=n.valueCallback?n.valueCallback(f):f;const m=t.slice(l.length);return{value:f,rest:m}}}function mSe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function pSe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function CH(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let l=e.valueCallback?e.valueCallback(i[0]):i[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(a.length);return{value:l,rest:u}}}const vSe=/^(\d+)(th|st|nd|rd)?/i,gSe=/\d+/i,ySe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xSe={any:[/^b/i,/^(a|c)/i]},bSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},wSe={any:[/1/i,/2/i,/3/i,/4/i]},jSe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},SSe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_Se={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},NSe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},OSe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},CSe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ESe={ordinalNumber:CH({matchPattern:vSe,parsePattern:gSe,valueCallback:e=>parseInt(e,10)}),era:ri({matchPatterns:ySe,defaultMatchWidth:"wide",parsePatterns:xSe,defaultParseWidth:"any"}),quarter:ri({matchPatterns:bSe,defaultMatchWidth:"wide",parsePatterns:wSe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ri({matchPatterns:jSe,defaultMatchWidth:"wide",parsePatterns:SSe,defaultParseWidth:"any"}),day:ri({matchPatterns:_Se,defaultMatchWidth:"wide",parsePatterns:NSe,defaultParseWidth:"any"}),dayPeriod:ri({matchPatterns:OSe,defaultMatchWidth:"any",parsePatterns:CSe,defaultParseWidth:"any"})},_E={code:"en-US",formatDistance:J1e,formatLong:rSe,formatRelative:iSe,localize:hSe,match:ESe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ASe(e,t){const n=Rt(e,t?.in);return jH(n,NH(n))+1}function EH(e,t){const n=Rt(e,t?.in),r=+mh(n)-+L1e(n);return Math.round(r/yH)+1}function AH(e,t){const n=Rt(e,t?.in),r=n.getFullYear(),a=Yh(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=_n(t?.in||e,0);l.setFullYear(r+1,0,i),l.setHours(0,0,0,0);const u=ns(l,t),d=_n(t?.in||e,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const f=ns(d,t);return+n>=+u?r+1:+n>=+f?r:r-1}function TSe(e,t){const n=Yh(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=AH(e,t),i=_n(t?.in||e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),ns(i,t)}function TH(e,t){const n=Rt(e,t?.in),r=+ns(n,t)-+TSe(n,t);return Math.round(r/yH)+1}function Ot(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Lo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ot(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ot(n+1,2)},d(e,t){return Ot(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ot(e.getHours()%12||12,t.length)},H(e,t){return Ot(e.getHours(),t.length)},m(e,t){return Ot(e.getMinutes(),t.length)},s(e,t){return Ot(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return Ot(a,t.length)}},Cc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},NL={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Lo.y(e,t)},Y:function(e,t,n,r){const a=AH(e,r),i=a>0?a:1-a;if(t==="YY"){const l=i%100;return Ot(l,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ot(i,t.length)},R:function(e,t){const n=wH(e);return Ot(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ot(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ot(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ot(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Lo.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ot(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=TH(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):Ot(a,t.length)},I:function(e,t,n){const r=EH(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ot(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Lo.d(e,t)},D:function(e,t,n){const r=ASe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ot(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ot(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ot(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Ot(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Cc.noon:r===0?a=Cc.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Cc.evening:r>=12?a=Cc.afternoon:r>=4?a=Cc.morning:a=Cc.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Lo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Lo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ot(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ot(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Lo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Lo.s(e,t)},S:function(e,t){return Lo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return CL(r);case"XXXX":case"XX":return zs(r);case"XXXXX":case"XXX":default:return zs(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return CL(r);case"xxxx":case"xx":return zs(r);case"xxxxx":case"xxx":default:return zs(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+OL(r,":");case"OOOO":default:return"GMT"+zs(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+OL(r,":");case"zzzz":default:return"GMT"+zs(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ot(r,t.length)},T:function(e,t,n){return Ot(+e,t.length)}};function OL(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+Ot(i,2)}function CL(e,t){return e%60===0?(e>0?"-":"+")+Ot(Math.abs(e)/60,2):zs(e,t)}function zs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Ot(Math.trunc(r/60),2),i=Ot(r%60,2);return n+a+t+i}const EL=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kH=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},kSe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return EL(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",EL(r,t)).replace("{{time}}",kH(a,t))},PSe={p:kH,P:kSe},MSe=/^D+$/,RSe=/^Y+$/,DSe=["D","DD","YY","YYYY"];function $Se(e){return MSe.test(e)}function ISe(e){return RSe.test(e)}function LSe(e,t,n){const r=BSe(e,t,n);if(console.warn(r),DSe.includes(e))throw new RangeError(r)}function BSe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const zSe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qSe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,FSe=/^'([^]*?)'?$/,USe=/''/g,HSe=/[a-zA-Z]/;function lv(e,t,n){const r=Yh(),a=n?.locale??r.locale??_E,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=Rt(e,n?.in);if(!H1e(u))throw new RangeError("Invalid time value");let d=t.match(qSe).map(m=>{const p=m[0];if(p==="p"||p==="P"){const g=PSe[p];return g(m,a.formatLong)}return m}).join("").match(zSe).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const p=m[0];if(p==="'")return{isToken:!1,value:WSe(m)};if(NL[p])return{isToken:!0,value:m};if(p.match(HSe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(d=a.localize.preprocessor(u,d));const f={firstWeekContainsDate:i,weekStartsOn:l,locale:a};return d.map(m=>{if(!m.isToken)return m.value;const p=m.value;(!n?.useAdditionalWeekYearTokens&&ISe(p)||!n?.useAdditionalDayOfYearTokens&&$Se(p))&&LSe(p,t,String(e));const g=NL[p[0]];return g(u,p,a.localize,f)}).join("")}function WSe(e){const t=e.match(FSe);return t?t[1].replace(USe,"'"):e}function VSe(e,t){const n=Rt(e,t?.in),r=n.getFullYear(),a=n.getMonth(),i=_n(n,0);return i.setFullYear(r,a+1,0),i.setHours(0,0,0,0),i.getDate()}function GSe(e,t){return Rt(e,t?.in).getMonth()}function YSe(e,t){return Rt(e,t?.in).getFullYear()}function KSe(e,t){return+Rt(e)>+Rt(t)}function XSe(e,t){return+Rt(e)<+Rt(t)}function ZSe(e,t,n){const[r,a]=Al(n?.in,e,t);return+ns(r,n)==+ns(a,n)}function QSe(e,t,n){const[r,a]=Al(n?.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function JSe(e,t,n){const[r,a]=Al(n?.in,e,t);return r.getFullYear()===a.getFullYear()}function e_e(e,t,n){const r=Rt(e,n?.in),a=r.getFullYear(),i=r.getDate(),l=_n(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const u=VSe(l);return r.setMonth(t,Math.min(i,u)),r}function t_e(e,t,n){const r=Rt(e,n?.in);return isNaN(+r)?_n(e,NaN):(r.setFullYear(t),r)}const AL=5,n_e=4;function r_e(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,a=t.addDays(e,-r+1),i=t.addDays(a,AL*7-1);return t.getMonth(e)===t.getMonth(i)?AL:n_e}function PH(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function a_e(e,t){const n=PH(e,t),r=r_e(e,t);return t.addDays(n,r*7-1)}class aa{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?or.tz(this.options.timeZone):new this.Date,this.newDate=(r,a,i)=>this.overrides?.newDate?this.overrides.newDate(r,a,i):this.options.timeZone?new or(r,a,i,this.options.timeZone):new Date(r,a,i),this.addDays=(r,a)=>this.overrides?.addDays?this.overrides.addDays(r,a):xH(r,a),this.addMonths=(r,a)=>this.overrides?.addMonths?this.overrides.addMonths(r,a):bH(r,a),this.addWeeks=(r,a)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,a):B1e(r,a),this.addYears=(r,a)=>this.overrides?.addYears?this.overrides.addYears(r,a):z1e(r,a),this.differenceInCalendarDays=(r,a)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,a):jH(r,a),this.differenceInCalendarMonths=(r,a)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,a):W1e(r,a),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):G1e(r),this.eachYearOfInterval=r=>{const a=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):X1e(r),i=new Set(a.map(u=>this.getYear(u)));if(i.size===a.length)return a;const l=[];return i.forEach(u=>{l.push(new Date(u,0,1))}),l},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):a_e(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):Z1e(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):V1e(r),this.endOfWeek=(r,a)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,a):OH(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):K1e(r),this.format=(r,a,i)=>{const l=this.overrides?.format?this.overrides.format(r,a,this.options):lv(r,a,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(l):l},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):EH(r),this.getMonth=(r,a)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):GSe(r,this.options),this.getYear=(r,a)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):YSe(r,this.options),this.getWeek=(r,a)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):TH(r,this.options),this.isAfter=(r,a)=>this.overrides?.isAfter?this.overrides.isAfter(r,a):KSe(r,a),this.isBefore=(r,a)=>this.overrides?.isBefore?this.overrides.isBefore(r,a):XSe(r,a),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):SH(r),this.isSameDay=(r,a)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,a):U1e(r,a),this.isSameMonth=(r,a)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,a):QSe(r,a),this.isSameYear=(r,a)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,a):JSe(r,a),this.max=r=>this.overrides?.max?this.overrides.max(r):q1e(r),this.min=r=>this.overrides?.min?this.overrides.min(r):F1e(r),this.setMonth=(r,a)=>this.overrides?.setMonth?this.overrides.setMonth(r,a):e_e(r,a),this.setYear=(r,a)=>this.overrides?.setYear?this.overrides.setYear(r,a):t_e(r,a),this.startOfBroadcastWeek=(r,a)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):PH(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):ph(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):mh(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Y1e(r),this.startOfWeek=(r,a)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):ns(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):NH(r),this.options={locale:_E,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let a=0;a<10;a++)r[a.toString()]=n.format(a);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&aa.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:a}=this.options,i=n?.code;if(i&&aa.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:r,numberingSystem:a}).format(t)}catch{}const l=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,l)}}aa.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const wi=new aa;class MH{constructor(t,n,r=wi){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class i_e{constructor(t,n){this.date=t,this.weeks=n}}class o_e{constructor(t,n){this.days=n,this.weekNumber=t}}function s_e(e){return W.createElement("button",{...e})}function l_e(e){return W.createElement("span",{...e})}function c_e(e){const{size:t=24,orientation:n="left",className:r}=e;return W.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&W.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&W.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&W.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&W.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function u_e(e){const{day:t,modifiers:n,...r}=e;return W.createElement("td",{...r})}function d_e(e){const{day:t,modifiers:n,...r}=e,a=W.useRef(null);return W.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),W.createElement("button",{ref:a,...r})}var $e;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})($e||($e={}));var Jt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Jt||(Jt={}));var Ba;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Ba||(Ba={}));var Kr;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Kr||(Kr={}));function f_e(e){const{options:t,className:n,components:r,classNames:a,...i}=e,l=[a[$e.Dropdown],n].join(" "),u=t?.find(({value:d})=>d===i.value);return W.createElement("span",{"data-disabled":i.disabled,className:a[$e.DropdownRoot]},W.createElement(r.Select,{className:l,...i},t?.map(({value:d,label:f,disabled:m})=>W.createElement(r.Option,{key:d,value:d,disabled:m},f))),W.createElement("span",{className:a[$e.CaptionLabel],"aria-hidden":!0},u?.label,W.createElement(r.Chevron,{orientation:"down",size:18,className:a[$e.Chevron]})))}function h_e(e){return W.createElement("div",{...e})}function m_e(e){return W.createElement("div",{...e})}function p_e(e){const{calendarMonth:t,displayIndex:n,...r}=e;return W.createElement("div",{...r},e.children)}function v_e(e){const{calendarMonth:t,displayIndex:n,...r}=e;return W.createElement("div",{...r})}function g_e(e){return W.createElement("table",{...e})}function y_e(e){return W.createElement("div",{...e})}const RH=y.createContext(void 0);function Kh(){const e=y.useContext(RH);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function x_e(e){const{components:t}=Kh();return W.createElement(t.Dropdown,{...e})}function b_e(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:a,...i}=e,{components:l,classNames:u,labels:{labelPrevious:d,labelNext:f}}=Kh(),m=y.useCallback(g=>{a&&n?.(g)},[a,n]),p=y.useCallback(g=>{r&&t?.(g)},[r,t]);return W.createElement("nav",{...i},W.createElement(l.PreviousMonthButton,{type:"button",className:u[$e.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":d(r),onClick:p},W.createElement(l.Chevron,{disabled:r?void 0:!0,className:u[$e.Chevron],orientation:"left"})),W.createElement(l.NextMonthButton,{type:"button",className:u[$e.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":a?void 0:!0,"aria-label":f(a),onClick:m},W.createElement(l.Chevron,{disabled:a?void 0:!0,orientation:"right",className:u[$e.Chevron]})))}function w_e(e){const{components:t}=Kh();return W.createElement(t.Button,{...e})}function j_e(e){return W.createElement("option",{...e})}function S_e(e){const{components:t}=Kh();return W.createElement(t.Button,{...e})}function __e(e){const{rootRef:t,...n}=e;return W.createElement("div",{...n,ref:t})}function N_e(e){return W.createElement("select",{...e})}function O_e(e){const{week:t,...n}=e;return W.createElement("tr",{...n})}function C_e(e){return W.createElement("th",{...e})}function E_e(e){return W.createElement("thead",{"aria-hidden":!0},W.createElement("tr",{...e}))}function A_e(e){const{week:t,...n}=e;return W.createElement("th",{...n})}function T_e(e){return W.createElement("th",{...e})}function k_e(e){return W.createElement("tbody",{...e})}function P_e(e){const{components:t}=Kh();return W.createElement(t.Dropdown,{...e})}const M_e=Object.freeze(Object.defineProperty({__proto__:null,Button:s_e,CaptionLabel:l_e,Chevron:c_e,Day:u_e,DayButton:d_e,Dropdown:f_e,DropdownNav:h_e,Footer:m_e,Month:p_e,MonthCaption:v_e,MonthGrid:g_e,Months:y_e,MonthsDropdown:x_e,Nav:b_e,NextMonthButton:w_e,Option:j_e,PreviousMonthButton:S_e,Root:__e,Select:N_e,Week:O_e,WeekNumber:A_e,WeekNumberHeader:T_e,Weekday:C_e,Weekdays:E_e,Weeks:k_e,YearsDropdown:P_e},Symbol.toStringTag,{value:"Module"}));function Yi(e,t,n=!1,r=wi){let{from:a,to:i}=e;const{differenceInCalendarDays:l,isSameDay:u}=r;return a&&i?(l(i,a)<0&&([a,i]=[i,a]),l(t,a)>=(n?1:0)&&l(i,t)>=(n?1:0)):!n&&i?u(i,t):!n&&a?u(a,t):!1}function DH(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function NE(e){return!!(e&&typeof e=="object"&&"from"in e)}function $H(e){return!!(e&&typeof e=="object"&&"after"in e)}function IH(e){return!!(e&&typeof e=="object"&&"before"in e)}function LH(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function BH(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ki(e,t,n=wi){const r=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:i,isAfter:l}=n;return r.some(u=>{if(typeof u=="boolean")return u;if(n.isDate(u))return a(e,u);if(BH(u,n))return u.includes(e);if(NE(u))return Yi(u,e,!1,n);if(LH(u))return Array.isArray(u.dayOfWeek)?u.dayOfWeek.includes(e.getDay()):u.dayOfWeek===e.getDay();if(DH(u)){const d=i(u.before,e),f=i(u.after,e),m=d>0,p=f<0;return l(u.before,u.after)?p&&m:m||p}return $H(u)?i(e,u.after)>0:IH(u)?i(u.before,e)>0:typeof u=="function"?u(e):!1})}function R_e(e,t,n,r,a){const{disabled:i,hidden:l,modifiers:u,showOutsideDays:d,broadcastCalendar:f,today:m}=t,{isSameDay:p,isSameMonth:g,startOfMonth:x,isBefore:j,endOfMonth:b,isAfter:w}=a,N=n&&x(n),O=r&&b(r),C={[Jt.focused]:[],[Jt.outside]:[],[Jt.disabled]:[],[Jt.hidden]:[],[Jt.today]:[]},A={};for(const E of e){const{date:k,displayMonth:T}=E,P=!!(T&&!g(k,T)),$=!!(N&&j(k,N)),z=!!(O&&w(k,O)),D=!!(i&&Ki(k,i,a)),U=!!(l&&Ki(k,l,a))||$||z||!f&&!d&&P||f&&d===!1&&P,V=p(k,m??a.today());P&&C.outside.push(E),D&&C.disabled.push(E),U&&C.hidden.push(E),V&&C.today.push(E),u&&Object.keys(u).forEach(H=>{const G=u?.[H];G&&Ki(k,G,a)&&(A[H]?A[H].push(E):A[H]=[E])})}return E=>{const k={[Jt.focused]:!1,[Jt.disabled]:!1,[Jt.hidden]:!1,[Jt.outside]:!1,[Jt.today]:!1},T={};for(const P in C){const $=C[P];k[P]=$.some(z=>z===E)}for(const P in A)T[P]=A[P].some($=>$===E);return{...k,...T}}}function D_e(e,t,n={}){return Object.entries(e).filter(([,a])=>a===!0).reduce((a,[i])=>(n[i]?a.push(n[i]):t[Jt[i]]?a.push(t[Jt[i]]):t[Ba[i]]&&a.push(t[Ba[i]]),a),[t[$e.Day]])}function $_e(e){return{...M_e,...e}}function I_e(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function OE(){const e={};for(const t in $e)e[$e[t]]=`rdp-${$e[t]}`;for(const t in Jt)e[Jt[t]]=`rdp-${Jt[t]}`;for(const t in Ba)e[Ba[t]]=`rdp-${Ba[t]}`;for(const t in Kr)e[Kr[t]]=`rdp-${Kr[t]}`;return e}function zH(e,t,n){return(n??new aa(t)).formatMonthYear(e)}const L_e=zH;function B_e(e,t,n){return(n??new aa(t)).format(e,"d")}function z_e(e,t=wi){return t.format(e,"LLLL")}function q_e(e,t,n){return(n??new aa(t)).format(e,"cccccc")}function F_e(e,t=wi){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function U_e(){return""}function qH(e,t=wi){return t.format(e,"yyyy")}const H_e=qH,W_e=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:zH,formatDay:B_e,formatMonthCaption:L_e,formatMonthDropdown:z_e,formatWeekNumber:F_e,formatWeekNumberHeader:U_e,formatWeekdayName:q_e,formatYearCaption:H_e,formatYearDropdown:qH},Symbol.toStringTag,{value:"Module"}));function V_e(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...W_e,...e}}function G_e(e,t,n,r,a){const{startOfMonth:i,startOfYear:l,endOfYear:u,eachMonthOfInterval:d,getMonth:f}=a;return d({start:l(e),end:u(e)}).map(g=>{const x=r.formatMonthDropdown(g,a),j=f(g),b=t&&g<i(t)||n&&g>i(n)||!1;return{value:j,label:x,disabled:b}})}function Y_e(e,t={},n={}){let r={...t?.[$e.Day]};return Object.entries(e).filter(([,a])=>a===!0).forEach(([a])=>{r={...r,...n?.[a]}}),r}function K_e(e,t,n){const r=e.today(),a=t?e.startOfISOWeek(r):e.startOfWeek(r),i=[];for(let l=0;l<7;l++){const u=e.addDays(a,l);i.push(u)}return i}function X_e(e,t,n,r,a=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:l,eachYearOfInterval:u,getYear:d}=r,f=i(e),m=l(t),p=u({start:f,end:m});return a&&p.reverse(),p.map(g=>{const x=n.formatYearDropdown(g,r);return{value:d(g),label:x,disabled:!1}})}function FH(e,t,n,r){let a=(r??new aa(n)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const Z_e=FH;function UH(e,t,n){return(n??new aa(t)).formatMonthYear(e)}const Q_e=UH;function J_e(e,t,n,r){let a=(r??new aa(n)).format(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a}function eNe(e){return"Choose the Month"}function tNe(){return""}function nNe(e){return"Go to the Next Month"}function rNe(e){return"Go to the Previous Month"}function aNe(e,t,n){return(n??new aa(t)).format(e,"cccc")}function iNe(e,t){return`Week ${e}`}function oNe(e){return"Week Number"}function sNe(e){return"Choose the Year"}const lNe=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Q_e,labelDay:Z_e,labelDayButton:FH,labelGrid:UH,labelGridcell:J_e,labelMonthDropdown:eNe,labelNav:tNe,labelNext:nNe,labelPrevious:rNe,labelWeekNumber:iNe,labelWeekNumberHeader:oNe,labelWeekday:aNe,labelYearDropdown:sNe},Symbol.toStringTag,{value:"Module"})),Xh=e=>e instanceof HTMLElement?e:null,r_=e=>[...e.querySelectorAll("[data-animated-month]")??[]],cNe=e=>Xh(e.querySelector("[data-animated-month]")),a_=e=>Xh(e.querySelector("[data-animated-caption]")),i_=e=>Xh(e.querySelector("[data-animated-weeks]")),uNe=e=>Xh(e.querySelector("[data-animated-nav]")),dNe=e=>Xh(e.querySelector("[data-animated-weekdays]"));function fNe(e,t,{classNames:n,months:r,focused:a,dateLib:i}){const l=y.useRef(null),u=y.useRef(r),d=y.useRef(!1);y.useLayoutEffect(()=>{const f=u.current;if(u.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||f.length===0||r.length!==f.length)return;const m=i.isSameMonth(r[0].date,f[0].date),p=i.isAfter(r[0].date,f[0].date),g=p?n[Kr.caption_after_enter]:n[Kr.caption_before_enter],x=p?n[Kr.weeks_after_enter]:n[Kr.weeks_before_enter],j=l.current,b=e.current.cloneNode(!0);if(b instanceof HTMLElement?(r_(b).forEach(C=>{if(!(C instanceof HTMLElement))return;const A=cNe(C);A&&C.contains(A)&&C.removeChild(A);const E=a_(C);E&&E.classList.remove(g);const k=i_(C);k&&k.classList.remove(x)}),l.current=b):l.current=null,d.current||m||a)return;const w=j instanceof HTMLElement?r_(j):[],N=r_(e.current);if(N?.every(O=>O instanceof HTMLElement)&&w&&w.every(O=>O instanceof HTMLElement)){d.current=!0,e.current.style.isolation="isolate";const O=uNe(e.current);O&&(O.style.zIndex="1"),N.forEach((C,A)=>{const E=w[A];if(!E)return;C.style.position="relative",C.style.overflow="hidden";const k=a_(C);k&&k.classList.add(g);const T=i_(C);T&&T.classList.add(x);const P=()=>{d.current=!1,e.current&&(e.current.style.isolation=""),O&&(O.style.zIndex=""),k&&k.classList.remove(g),T&&T.classList.remove(x),C.style.position="",C.style.overflow="",C.contains(E)&&C.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const $=dNe(E);$&&($.style.opacity="0");const z=a_(E);z&&(z.classList.add(p?n[Kr.caption_before_exit]:n[Kr.caption_after_exit]),z.addEventListener("animationend",P));const D=i_(E);D&&D.classList.add(p?n[Kr.weeks_before_exit]:n[Kr.weeks_after_exit]),C.insertBefore(E,C.firstChild)})}})}function hNe(e,t,n,r){const a=e[0],i=e[e.length-1],{ISOWeek:l,fixedWeeks:u,broadcastCalendar:d}=n??{},{addDays:f,differenceInCalendarDays:m,differenceInCalendarMonths:p,endOfBroadcastWeek:g,endOfISOWeek:x,endOfMonth:j,endOfWeek:b,isAfter:w,startOfBroadcastWeek:N,startOfISOWeek:O,startOfWeek:C}=r,A=d?N(a,r):l?O(a):C(a),E=d?g(i):l?x(j(i)):b(j(i)),k=m(E,A),T=p(i,a)+1,P=[];for(let D=0;D<=k;D++){const U=f(A,D);if(t&&w(U,t))break;P.push(U)}const z=(d?35:42)*T;if(u&&P.length<z){const D=z-P.length;for(let U=0;U<D;U++){const V=f(P[P.length-1],1);P.push(V)}}return P}function mNe(e){const t=[];return e.reduce((n,r)=>{const a=r.weeks.reduce((i,l)=>i.concat(l.days.slice()),t.slice());return n.concat(a.slice())},t.slice())}function pNe(e,t,n,r){const{numberOfMonths:a=1}=n,i=[];for(let l=0;l<a;l++){const u=r.addMonths(e,l);if(t&&u>t)break;i.push(u)}return i}function TL(e,t,n,r){const{month:a,defaultMonth:i,today:l=r.today(),numberOfMonths:u=1}=e;let d=a||i||l;const{differenceInCalendarMonths:f,addMonths:m,startOfMonth:p}=r;if(n&&f(n,d)<u-1){const g=-1*(u-1);d=m(n,g)}return t&&f(d,t)<0&&(d=t),p(d)}function vNe(e,t,n,r){const{addDays:a,endOfBroadcastWeek:i,endOfISOWeek:l,endOfMonth:u,endOfWeek:d,getISOWeek:f,getWeek:m,startOfBroadcastWeek:p,startOfISOWeek:g,startOfWeek:x}=r,j=e.reduce((b,w)=>{const N=n.broadcastCalendar?p(w,r):n.ISOWeek?g(w):x(w),O=n.broadcastCalendar?i(w):n.ISOWeek?l(u(w)):d(u(w)),C=t.filter(T=>T>=N&&T<=O),A=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<A){const T=t.filter(P=>{const $=A-C.length;return P>O&&P<=a(O,$)});C.push(...T)}const E=C.reduce((T,P)=>{const $=n.ISOWeek?f(P):m(P),z=T.find(U=>U.weekNumber===$),D=new MH(P,w,r);return z?z.days.push(D):T.push(new o_e($,[D])),T},[]),k=new i_e(w,E);return b.push(k),b},[]);return n.reverseMonths?j.reverse():j}function gNe(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:a,startOfDay:i,startOfMonth:l,endOfMonth:u,addYears:d,endOfYear:f,newDate:m,today:p}=t,{fromYear:g,toYear:x,fromMonth:j,toMonth:b}=e;!n&&j&&(n=j),!n&&g&&(n=t.newDate(g,0,1)),!r&&b&&(r=b),!r&&x&&(r=m(x,11,31));const w=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=l(n):g?n=m(g,0,1):!n&&w&&(n=a(d(e.today??p(),-100))),r?r=u(r):x?r=m(x,11,31):!r&&w&&(r=f(e.today??p())),[n&&i(n),r&&i(r)]}function yNe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:i=1}=n,{startOfMonth:l,addMonths:u,differenceInCalendarMonths:d}=r,f=a?i:1,m=l(e);if(!t)return u(m,f);if(!(d(t,e)<i))return u(m,f)}function xNe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:i}=n,{startOfMonth:l,addMonths:u,differenceInCalendarMonths:d}=r,f=a?i??1:1,m=l(e);if(!t)return u(m,-f);if(!(d(m,t)<=0))return u(m,-f)}function bNe(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Zy(e,t){const[n,r]=y.useState(e);return[t===void 0?n:t,r]}function wNe(e,t){const[n,r]=gNe(e,t),{startOfMonth:a,endOfMonth:i}=t,l=TL(e,n,r,t),[u,d]=Zy(l,e.month?l:void 0);y.useEffect(()=>{const k=TL(e,n,r,t);d(k)},[e.timeZone]);const f=pNe(u,r,e,t),m=hNe(f,e.endMonth?i(e.endMonth):void 0,e,t),p=vNe(f,m,e,t),g=bNe(p),x=mNe(p),j=xNe(u,n,e,t),b=yNe(u,r,e,t),{disableNavigation:w,onMonthChange:N}=e,O=k=>g.some(T=>T.days.some(P=>P.isEqualTo(k))),C=k=>{if(w)return;let T=a(k);n&&T<a(n)&&(T=a(n)),r&&T>a(r)&&(T=a(r)),d(T),N?.(T)};return{months:p,weeks:g,days:x,navStart:n,navEnd:r,previousMonth:j,nextMonth:b,goToMonth:C,goToDay:k=>{O(k)||C(k.date)}}}var Ja;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ja||(Ja={}));function kL(e){return!e[Jt.disabled]&&!e[Jt.hidden]&&!e[Jt.outside]}function jNe(e,t,n,r){let a,i=-1;for(const l of e){const u=t(l);kL(u)&&(u[Jt.focused]&&i<Ja.FocusedModifier?(a=l,i=Ja.FocusedModifier):r?.isEqualTo(l)&&i<Ja.LastFocused?(a=l,i=Ja.LastFocused):n(l.date)&&i<Ja.Selected?(a=l,i=Ja.Selected):u[Jt.today]&&i<Ja.Today&&(a=l,i=Ja.Today))}return a||(a=e.find(l=>kL(t(l)))),a}function SNe(e,t,n,r,a,i,l){const{ISOWeek:u,broadcastCalendar:d}=i,{addDays:f,addMonths:m,addWeeks:p,addYears:g,endOfBroadcastWeek:x,endOfISOWeek:j,endOfWeek:b,max:w,min:N,startOfBroadcastWeek:O,startOfISOWeek:C,startOfWeek:A}=l;let k={day:f,week:p,month:m,year:g,startOfWeek:T=>d?O(T,l):u?C(T):A(T),endOfWeek:T=>d?x(T):u?j(T):b(T)}[e](n,t==="after"?1:-1);return t==="before"&&r?k=w([r,k]):t==="after"&&a&&(k=N([a,k])),k}function HH(e,t,n,r,a,i,l,u=0){if(u>365)return;const d=SNe(e,t,n.date,r,a,i,l),f=!!(i.disabled&&Ki(d,i.disabled,l)),m=!!(i.hidden&&Ki(d,i.hidden,l)),p=d,g=new MH(d,p,l);return!f&&!m?g:HH(e,t,g,r,a,i,l,u+1)}function _Ne(e,t,n,r,a){const{autoFocus:i}=e,[l,u]=y.useState(),d=jNe(t.days,n,r||(()=>!1),l),[f,m]=y.useState(i?d:void 0);return{isFocusTarget:b=>!!d?.isEqualTo(b),setFocused:m,focused:f,blur:()=>{u(f),m(void 0)},moveFocus:(b,w)=>{if(!f)return;const N=HH(b,w,f,t.navStart,t.navEnd,e,a);N&&(e.disableNavigation&&!t.days.some(C=>C.isEqualTo(N))||(t.goToDay(N),m(N)))}}}function NNe(e,t){const{selected:n,required:r,onSelect:a}=e,[i,l]=Zy(n,a?n:void 0),u=a?n:i,{isSameDay:d}=t,f=x=>u?.some(j=>d(j,x))??!1,{min:m,max:p}=e;return{selected:u,select:(x,j,b)=>{let w=[...u??[]];if(f(x)){if(u?.length===m||r&&u?.length===1)return;w=u?.filter(N=>!d(N,x))}else u?.length===p?w=[x]:w=[...w,x];return a||l(w),a?.(w,x,j,b),w},isSelected:f}}function ONe(e,t,n=0,r=0,a=!1,i=wi){const{from:l,to:u}=t||{},{isSameDay:d,isAfter:f,isBefore:m}=i;let p;if(!l&&!u)p={from:e,to:n>0?void 0:e};else if(l&&!u)d(l,e)?n===0?p={from:l,to:e}:a?p={from:l,to:void 0}:p=void 0:m(e,l)?p={from:e,to:l}:p={from:l,to:e};else if(l&&u)if(d(l,e)&&d(u,e))a?p={from:l,to:u}:p=void 0;else if(d(l,e))p={from:l,to:n>0?void 0:e};else if(d(u,e))p={from:e,to:n>0?void 0:e};else if(m(e,l))p={from:e,to:u};else if(f(e,l))p={from:l,to:e};else if(f(e,u))p={from:l,to:e};else throw new Error("Invalid range");if(p?.from&&p?.to){const g=i.differenceInCalendarDays(p.to,p.from);r>0&&g>r?p={from:e,to:void 0}:n>1&&g<n&&(p={from:e,to:void 0})}return p}function CNe(e,t,n=wi){const r=Array.isArray(t)?t:[t];let a=e.from;const i=n.differenceInCalendarDays(e.to,e.from),l=Math.min(i,6);for(let u=0;u<=l;u++){if(r.includes(a.getDay()))return!0;a=n.addDays(a,1)}return!1}function PL(e,t,n=wi){return Yi(e,t.from,!1,n)||Yi(e,t.to,!1,n)||Yi(t,e.from,!1,n)||Yi(t,e.to,!1,n)}function ENe(e,t,n=wi){const r=Array.isArray(t)?t:[t];if(r.filter(u=>typeof u!="function").some(u=>typeof u=="boolean"?u:n.isDate(u)?Yi(e,u,!1,n):BH(u,n)?u.some(d=>Yi(e,d,!1,n)):NE(u)?u.from&&u.to?PL(e,{from:u.from,to:u.to},n):!1:LH(u)?CNe(e,u.dayOfWeek,n):DH(u)?n.isAfter(u.before,u.after)?PL(e,{from:n.addDays(u.after,1),to:n.addDays(u.before,-1)},n):Ki(e.from,u,n)||Ki(e.to,u,n):$H(u)||IH(u)?Ki(e.from,u,n)||Ki(e.to,u,n):!1))return!0;const l=r.filter(u=>typeof u=="function");if(l.length){let u=e.from;const d=n.differenceInCalendarDays(e.to,e.from);for(let f=0;f<=d;f++){if(l.some(m=>m(u)))return!0;u=n.addDays(u,1)}}return!1}function ANe(e,t){const{disabled:n,excludeDisabled:r,selected:a,required:i,onSelect:l}=e,[u,d]=Zy(a,l?a:void 0),f=l?a:u;return{selected:f,select:(g,x,j)=>{const{min:b,max:w}=e,N=g?ONe(g,f,b,w,i,t):void 0;return r&&n&&N?.from&&N.to&&ENe({from:N.from,to:N.to},n,t)&&(N.from=g,N.to=void 0),l||d(N),l?.(N,g,x,j),N},isSelected:g=>f&&Yi(f,g,!1,t)}}function TNe(e,t){const{selected:n,required:r,onSelect:a}=e,[i,l]=Zy(n,a?n:void 0),u=a?n:i,{isSameDay:d}=t;return{selected:u,select:(p,g,x)=>{let j=p;return!r&&u&&u&&d(p,u)&&(j=void 0),a||l(j),a?.(j,p,g,x),j},isSelected:p=>u?d(u,p):!1}}function kNe(e,t){const n=TNe(e,t),r=NNe(e,t),a=ANe(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return a;default:return}}function PNe(e){let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new or(t.today,t.timeZone)),t.month&&(t.month=new or(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new or(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new or(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new or(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new or(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(et=>new or(et,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new or(t.selected.from,t.timeZone):void 0,to:t.selected.to?new or(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:a,dateLib:i,locale:l,classNames:u}=y.useMemo(()=>{const et={..._E,...t.locale};return{dateLib:new aa({locale:et,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:$_e(t.components),formatters:V_e(t.formatters),labels:{...lNe,...t.labels},locale:et,classNames:{...OE(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:d,mode:f,navLayout:m,numberOfMonths:p=1,onDayBlur:g,onDayClick:x,onDayFocus:j,onDayKeyDown:b,onDayMouseEnter:w,onDayMouseLeave:N,onNextClick:O,onPrevClick:C,showWeekNumber:A,styles:E}=t,{formatCaption:k,formatDay:T,formatMonthDropdown:P,formatWeekNumber:$,formatWeekNumberHeader:z,formatWeekdayName:D,formatYearDropdown:U}=r,V=wNe(t,i),{days:H,months:G,navStart:L,navEnd:R,previousMonth:F,nextMonth:K,goToMonth:te}=V,I=R_e(H,t,L,R,i),{isSelected:B,select:Y,selected:ne}=kNe(t,i)??{},{blur:oe,focused:xe,isFocusTarget:ee,moveFocus:ae,setFocused:Z}=_Ne(t,V,I,B??(()=>!1),i),{labelDayButton:pe,labelGridcell:je,labelGrid:le,labelMonthDropdown:Re,labelNav:_e,labelPrevious:me,labelNext:ve,labelWeekday:Le,labelWeekNumber:Dt,labelWeekNumberHeader:Nn,labelYearDropdown:pr}=a,nr=y.useMemo(()=>K_e(i,t.ISOWeek),[i,t.ISOWeek]),vr=f!==void 0||x!==void 0,lt=y.useCallback(()=>{F&&(te(F),C?.(F))},[F,te,C]),rt=y.useCallback(()=>{K&&(te(K),O?.(K))},[te,K,O]),Dn=y.useCallback((et,Lt)=>He=>{He.preventDefault(),He.stopPropagation(),Z(et),Y?.(et.date,Lt,He),x?.(et.date,Lt,He)},[Y,x,Z]),hs=y.useCallback((et,Lt)=>He=>{Z(et),j?.(et.date,Lt,He)},[j,Z]),rm=y.useCallback((et,Lt)=>He=>{oe(),g?.(et.date,Lt,He)},[oe,g]),kl=y.useCallback((et,Lt)=>He=>{const gt={ArrowLeft:[He.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[He.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[He.shiftKey?"year":"week","after"],ArrowUp:[He.shiftKey?"year":"week","before"],PageUp:[He.shiftKey?"year":"month","before"],PageDown:[He.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(gt[He.key]){He.preventDefault(),He.stopPropagation();const[$n,tt]=gt[He.key];ae($n,tt)}b?.(et.date,Lt,He)},[ae,b,t.dir]),nx=y.useCallback((et,Lt)=>He=>{w?.(et.date,Lt,He)},[w]),am=y.useCallback((et,Lt)=>He=>{N?.(et.date,Lt,He)},[N]),rx=y.useCallback(et=>Lt=>{const He=Number(Lt.target.value),gt=i.setMonth(i.startOfMonth(et),He);te(gt)},[i,te]),ax=y.useCallback(et=>Lt=>{const He=Number(Lt.target.value),gt=i.setYear(i.startOfMonth(et),He);te(gt)},[i,te]),{className:ms,style:gr}=y.useMemo(()=>({className:[u[$e.Root],t.className].filter(Boolean).join(" "),style:{...E?.[$e.Root],...t.style}}),[u,t.className,t.style,E]),Ga=I_e(t),rr=y.useRef(null);fNe(rr,!!t.animate,{classNames:u,months:G,focused:xe,dateLib:i});const ix={dayPickerProps:t,selected:ne,select:Y,isSelected:B,months:G,nextMonth:K,previousMonth:F,goToMonth:te,getModifiers:I,components:n,classNames:u,styles:E,labels:a,formatters:r};return W.createElement(RH.Provider,{value:ix},W.createElement(n.Root,{rootRef:t.animate?rr:void 0,className:ms,style:gr,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Ga},W.createElement(n.Months,{className:u[$e.Months],style:E?.[$e.Months]},!t.hideNavigation&&!m&&W.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[$e.Nav],style:E?.[$e.Nav],"aria-label":_e(),onPreviousClick:lt,onNextClick:rt,previousMonth:F,nextMonth:K}),G.map((et,Lt)=>W.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:u[$e.Month],style:E?.[$e.Month],key:Lt,displayIndex:Lt,calendarMonth:et},m==="around"&&!t.hideNavigation&&Lt===0&&W.createElement(n.PreviousMonthButton,{type:"button",className:u[$e.PreviousMonthButton],tabIndex:F?void 0:-1,"aria-disabled":F?void 0:!0,"aria-label":me(F),onClick:lt,"data-animated-button":t.animate?"true":void 0},W.createElement(n.Chevron,{disabled:F?void 0:!0,className:u[$e.Chevron],orientation:t.dir==="rtl"?"right":"left"})),W.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:u[$e.MonthCaption],style:E?.[$e.MonthCaption],calendarMonth:et,displayIndex:Lt},d?.startsWith("dropdown")?W.createElement(n.DropdownNav,{className:u[$e.Dropdowns],style:E?.[$e.Dropdowns]},(()=>{const He=d==="dropdown"||d==="dropdown-months"?W.createElement(n.MonthsDropdown,{key:"month",className:u[$e.MonthsDropdown],"aria-label":Re(),classNames:u,components:n,disabled:!!t.disableNavigation,onChange:rx(et.date),options:G_e(et.date,L,R,r,i),style:E?.[$e.Dropdown],value:i.getMonth(et.date)}):W.createElement("span",{key:"month"},P(et.date,i)),gt=d==="dropdown"||d==="dropdown-years"?W.createElement(n.YearsDropdown,{key:"year",className:u[$e.YearsDropdown],"aria-label":pr(i.options),classNames:u,components:n,disabled:!!t.disableNavigation,onChange:ax(et.date),options:X_e(L,R,r,i,!!t.reverseYears),style:E?.[$e.Dropdown],value:i.getYear(et.date)}):W.createElement("span",{key:"year"},U(et.date,i));return i.getMonthYearOrder()==="year-first"?[gt,He]:[He,gt]})(),W.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},k(et.date,i.options,i))):W.createElement(n.CaptionLabel,{className:u[$e.CaptionLabel],role:"status","aria-live":"polite"},k(et.date,i.options,i))),m==="around"&&!t.hideNavigation&&Lt===p-1&&W.createElement(n.NextMonthButton,{type:"button",className:u[$e.NextMonthButton],tabIndex:K?void 0:-1,"aria-disabled":K?void 0:!0,"aria-label":ve(K),onClick:rt,"data-animated-button":t.animate?"true":void 0},W.createElement(n.Chevron,{disabled:K?void 0:!0,className:u[$e.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Lt===p-1&&m==="after"&&!t.hideNavigation&&W.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[$e.Nav],style:E?.[$e.Nav],"aria-label":_e(),onPreviousClick:lt,onNextClick:rt,previousMonth:F,nextMonth:K}),W.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":le(et.date,i.options,i)||void 0,className:u[$e.MonthGrid],style:E?.[$e.MonthGrid]},!t.hideWeekdays&&W.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:u[$e.Weekdays],style:E?.[$e.Weekdays]},A&&W.createElement(n.WeekNumberHeader,{"aria-label":Nn(i.options),className:u[$e.WeekNumberHeader],style:E?.[$e.WeekNumberHeader],scope:"col"},z()),nr.map(He=>W.createElement(n.Weekday,{"aria-label":Le(He,i.options,i),className:u[$e.Weekday],key:String(He),style:E?.[$e.Weekday],scope:"col"},D(He,i.options,i)))),W.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:u[$e.Weeks],style:E?.[$e.Weeks]},et.weeks.map(He=>W.createElement(n.Week,{className:u[$e.Week],key:He.weekNumber,style:E?.[$e.Week],week:He},A&&W.createElement(n.WeekNumber,{week:He,style:E?.[$e.WeekNumber],"aria-label":Dt(He.weekNumber,{locale:l}),className:u[$e.WeekNumber],scope:"row",role:"rowheader"},$(He.weekNumber,i)),He.days.map(gt=>{const{date:$n}=gt,tt=I(gt);if(tt[Jt.focused]=!tt.hidden&&!!xe?.isEqualTo(gt),tt[Ba.selected]=B?.($n)||tt.selected,NE(ne)){const{from:Ml,to:vs}=ne;tt[Ba.range_start]=!!(Ml&&vs&&i.isSameDay($n,Ml)),tt[Ba.range_end]=!!(Ml&&vs&&i.isSameDay($n,vs)),tt[Ba.range_middle]=Yi(ne,$n,!0,i)}const Pl=Y_e(tt,E,t.modifiersStyles),ps=D_e(tt,u,t.modifiersClassNames),ox=!vr&&!tt.hidden?je($n,tt,i.options,i):void 0;return W.createElement(n.Day,{key:`${i.format($n,"yyyy-MM-dd")}_${i.format(gt.displayMonth,"yyyy-MM")}`,day:gt,modifiers:tt,className:ps.join(" "),style:Pl,role:"gridcell","aria-selected":tt.selected||void 0,"aria-label":ox,"data-day":i.format($n,"yyyy-MM-dd"),"data-month":gt.outside?i.format($n,"yyyy-MM"):void 0,"data-selected":tt.selected||void 0,"data-disabled":tt.disabled||void 0,"data-hidden":tt.hidden||void 0,"data-outside":gt.outside||void 0,"data-focused":tt.focused||void 0,"data-today":tt.today||void 0},!tt.hidden&&vr?W.createElement(n.DayButton,{className:u[$e.DayButton],style:E?.[$e.DayButton],type:"button",day:gt,modifiers:tt,disabled:tt.disabled||void 0,tabIndex:ee(gt)?0:-1,"aria-label":pe($n,tt,i.options,i),onClick:Dn(gt,tt),onBlur:rm(gt,tt),onFocus:hs(gt,tt),onKeyDown:kl(gt,tt),onMouseEnter:nx(gt,tt),onMouseLeave:am(gt,tt)},T($n,i.options,i)):!tt.hidden&&T(gt.date,i.options,i))})))))))),t.footer&&W.createElement(n.Footer,{className:u[$e.Footer],style:E?.[$e.Footer],role:"status","aria-live":"polite"},t.footer)))}function ML({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:a="ghost",formatters:i,components:l,...u}){const d=OE();return o.jsx(PNe,{showOutsideDays:n,className:ue("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:f=>f.toLocaleString("default",{month:"short"}),...i},classNames:{root:ue("w-fit",d.root),months:ue("relative flex flex-col gap-4 md:flex-row",d.months),month:ue("flex w-full flex-col gap-4",d.month),nav:ue("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",d.nav),button_previous:ue(uh({variant:a}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",d.button_previous),button_next:ue(uh({variant:a}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",d.button_next),month_caption:ue("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",d.month_caption),dropdowns:ue("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",d.dropdowns),dropdown_root:ue("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",d.dropdown_root),dropdown:ue("bg-popover absolute inset-0 opacity-0",d.dropdown),caption_label:ue("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",d.caption_label),table:"w-full border-collapse",weekdays:ue("flex",d.weekdays),weekday:ue("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",d.weekday),week:ue("mt-2 flex w-full",d.week),week_number_header:ue("w-[--cell-size] select-none",d.week_number_header),week_number:ue("text-muted-foreground select-none text-[0.8rem]",d.week_number),day:ue("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",d.day),range_start:ue("bg-accent rounded-l-md",d.range_start),range_middle:ue("rounded-none",d.range_middle),range_end:ue("bg-accent rounded-r-md",d.range_end),today:ue("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",d.today),outside:ue("text-muted-foreground aria-selected:text-muted-foreground",d.outside),disabled:ue("text-muted-foreground opacity-50",d.disabled),hidden:ue("invisible",d.hidden),...t},components:{Root:({className:f,rootRef:m,...p})=>o.jsx("div",{"data-slot":"calendar",ref:m,className:ue(f),...p}),Chevron:({className:f,orientation:m,...p})=>m==="left"?o.jsx(UC,{className:ue("size-4",f),...p}):m==="right"?o.jsx(HC,{className:ue("size-4",f),...p}):o.jsx(lh,{className:ue("size-4",f),...p}),DayButton:MNe,WeekNumber:({children:f,...m})=>o.jsx("td",{...m,children:o.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:f})}),...l},...u})}function MNe({className:e,day:t,modifiers:n,...r}){const a=OE(),i=y.useRef(null);return y.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),o.jsx(fe,{ref:i,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:ue("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",a.day,e),...r})}class RNe{ws=null;reconnectTimeout=null;reconnectAttempts=0;maxReconnectAttempts=10;heartbeatInterval=null;logCallbacks=new Set;connectionCallbacks=new Set;isConnected=!1;logCache=[];maxCacheSize=1e3;getWebSocketUrl(){{const t=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return`${t}//${n}/ws/logs`}}connect(){if(this.ws?.readyState===WebSocket.OPEN||this.ws?.readyState===WebSocket.CONNECTING)return;const t=this.getWebSocketUrl();try{this.ws=new WebSocket(t),this.ws.onopen=()=>{this.isConnected=!0,this.reconnectAttempts=0,this.notifyConnection(!0),this.startHeartbeat()},this.ws.onmessage=n=>{try{if(n.data==="pong")return;const r=JSON.parse(n.data);this.notifyLog(r)}catch(r){console.error("解析日志消息失败:",r)}},this.ws.onerror=n=>{console.error("❌ WebSocket 错误:",n),this.isConnected=!1,this.notifyConnection(!1)},this.ws.onclose=()=>{this.isConnected=!1,this.notifyConnection(!1),this.stopHeartbeat(),this.attemptReconnect()}}catch(n){console.error("创建 WebSocket 连接失败:",n),this.attemptReconnect()}}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts)return;this.reconnectAttempts+=1;const t=Math.min(1e3*this.reconnectAttempts,1e4);this.reconnectTimeout=window.setTimeout(()=>{this.connect()},t)}startHeartbeat(){this.heartbeatInterval=window.setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send("ping")},3e4)}stopHeartbeat(){this.heartbeatInterval!==null&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null)}disconnect(){this.reconnectTimeout!==null&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.stopHeartbeat(),this.ws&&(this.ws.close(),this.ws=null),this.isConnected=!1,this.reconnectAttempts=0}onLog(t){return this.logCallbacks.add(t),()=>this.logCallbacks.delete(t)}onConnectionChange(t){return this.connectionCallbacks.add(t),t(this.isConnected),()=>this.connectionCallbacks.delete(t)}notifyLog(t){this.logCache.some(r=>r.id===t.id)||(this.logCache.push(t),this.logCache.length>this.maxCacheSize&&(this.logCache=this.logCache.slice(-this.maxCacheSize)),this.logCallbacks.forEach(r=>{try{r(t)}catch(a){console.error("日志回调执行失败:",a)}}))}notifyConnection(t){this.connectionCallbacks.forEach(n=>{try{n(t)}catch(r){console.error("连接状态回调执行失败:",r)}})}getAllLogs(){return[...this.logCache]}clearLogs(){this.logCache=[]}getConnectionStatus(){return this.isConnected}}const Mc=new RNe;typeof window<"u"&&Mc.connect();const DNe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},$Ne=(e,t,n)=>{let r;const a=DNe[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},INe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},LNe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},BNe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},zNe={date:Yc({formats:INe,defaultWidth:"full"}),time:Yc({formats:LNe,defaultWidth:"full"}),dateTime:Yc({formats:BNe,defaultWidth:"full"})};function RL(e,t,n){const r="eeee p";return ZSe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const qNe={lastWeek:RL,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:RL,other:"PP p"},FNe=(e,t,n,r)=>{const a=qNe[e];return typeof a=="function"?a(t,n,r):a},UNe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},HNe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},WNe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},VNe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},GNe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},YNe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},KNe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},XNe={ordinalNumber:KNe,era:ni({values:UNe,defaultWidth:"wide"}),quarter:ni({values:HNe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ni({values:WNe,defaultWidth:"wide"}),day:ni({values:VNe,defaultWidth:"wide"}),dayPeriod:ni({values:GNe,defaultWidth:"wide",formattingValues:YNe,defaultFormattingWidth:"wide"})},ZNe=/^(第\s*)?\d+(日|时|分|秒)?/i,QNe=/\d+/i,JNe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},eOe={any:[/^(前)/i,/^(公元)/i]},tOe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},nOe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},rOe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},aOe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},iOe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},oOe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},sOe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},lOe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},cOe={ordinalNumber:CH({matchPattern:ZNe,parsePattern:QNe,valueCallback:e=>parseInt(e,10)}),era:ri({matchPatterns:JNe,defaultMatchWidth:"wide",parsePatterns:eOe,defaultParseWidth:"any"}),quarter:ri({matchPatterns:tOe,defaultMatchWidth:"wide",parsePatterns:nOe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ri({matchPatterns:rOe,defaultMatchWidth:"wide",parsePatterns:aOe,defaultParseWidth:"any"}),day:ri({matchPatterns:iOe,defaultMatchWidth:"wide",parsePatterns:oOe,defaultParseWidth:"any"}),dayPeriod:ri({matchPatterns:sOe,defaultMatchWidth:"any",parsePatterns:lOe,defaultParseWidth:"any"})},Hp={code:"zh-CN",formatDistance:$Ne,formatLong:zNe,formatRelative:FNe,localize:XNe,match:cOe,options:{weekStartsOn:1,firstWeekContainsDate:4}};function uOe(){const[e,t]=y.useState([]),[n,r]=y.useState(""),[a,i]=y.useState("all"),[l,u]=y.useState("all"),[d,f]=y.useState(void 0),[m,p]=y.useState(void 0),[g,x]=y.useState(!0),[j,b]=y.useState(!1),w=y.useRef(null),N=y.useRef(null);y.useEffect(()=>{const D=Mc.getAllLogs();t(D);const U=Mc.onLog(()=>{t(Mc.getAllLogs())}),V=Mc.onConnectionChange(H=>{b(H)});return()=>{U(),V()}},[]),y.useEffect(()=>{g&&N.current&&N.current.scrollIntoView({behavior:"smooth",block:"end"})},[e,g]);const O=y.useMemo(()=>{const D=new Set(e.map(U=>U.module));return Array.from(D).sort()},[e]),C=D=>{switch(D){case"DEBUG":return"text-muted-foreground";case"INFO":return"text-blue-500 dark:text-blue-400";case"WARNING":return"text-yellow-600 dark:text-yellow-500";case"ERROR":return"text-red-600 dark:text-red-500";case"CRITICAL":return"text-red-700 dark:text-red-400 font-bold";default:return"text-foreground"}},A=D=>{switch(D){case"DEBUG":return"bg-secondary/50";case"INFO":return"bg-blue-500/10 dark:bg-blue-500/20";case"WARNING":return"bg-yellow-500/10 dark:bg-yellow-500/20";case"ERROR":return"bg-red-500/10 dark:bg-red-500/20";case"CRITICAL":return"bg-red-600/20 dark:bg-red-600/30";default:return"bg-muted/50"}},E=()=>{window.location.reload()},k=()=>{Mc.clearLogs(),t([])},T=()=>{const D=z.map(G=>`${G.timestamp} [${G.level.padEnd(8)}] [${G.module}] ${G.message}`).join(`
|
||
`),U=new Blob([D],{type:"text/plain;charset=utf-8"}),V=URL.createObjectURL(U),H=document.createElement("a");H.href=V,H.download=`logs-${lv(new Date,"yyyy-MM-dd-HHmmss")}.txt`,H.click(),URL.revokeObjectURL(V)},P=()=>{x(!g)},$=()=>{f(void 0),p(void 0)},z=y.useMemo(()=>e.filter(D=>{const U=n===""||D.message.toLowerCase().includes(n.toLowerCase())||D.module.toLowerCase().includes(n.toLowerCase()),V=a==="all"||D.level===a,H=l==="all"||D.module===l;let G=!0;if(d||m){const L=new Date(D.timestamp);if(d){const R=new Date(d);R.setHours(0,0,0,0),G=G&&L>=R}if(m){const R=new Date(m);R.setHours(23,59,59,999),G=G&&L<=R}}return U&&V&&H&&G}),[e,n,a,l,d,m]);return o.jsx(Xt,{className:"h-full",children:o.jsxs("div",{className:"space-y-4 p-3 sm:p-4 lg:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold",children:"日志查看器"}),o.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mt-1",children:"实时查看和分析麦麦运行日志"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:ue("h-2.5 w-2.5 sm:h-3 sm:w-3 rounded-full",j?"bg-green-500 animate-pulse":"bg-red-500")}),o.jsx("span",{className:"text-xs sm:text-sm text-muted-foreground",children:j?"已连接":"未连接"})]})]}),o.jsx(dt,{className:"p-3 sm:p-4",children:o.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[o.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:gap-4",children:[o.jsxs("div",{className:"flex-1 relative",children:[o.jsx(Rr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(Ne,{placeholder:"搜索日志...",value:n,onChange:D=>r(D.target.value),className:"pl-9 h-9 text-sm"})]}),o.jsxs(Et,{value:a,onValueChange:i,children:[o.jsxs(wt,{className:"w-full sm:w-[140px] lg:w-[180px] h-9 text-sm",children:[o.jsx(HN,{className:"h-4 w-4 mr-2"}),o.jsx(At,{placeholder:"级别"})]}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部级别"}),o.jsx(Pe,{value:"DEBUG",children:"DEBUG"}),o.jsx(Pe,{value:"INFO",children:"INFO"}),o.jsx(Pe,{value:"WARNING",children:"WARNING"}),o.jsx(Pe,{value:"ERROR",children:"ERROR"}),o.jsx(Pe,{value:"CRITICAL",children:"CRITICAL"})]})]}),o.jsxs(Et,{value:l,onValueChange:u,children:[o.jsxs(wt,{className:"w-full sm:w-[160px] lg:w-[200px] h-9 text-sm",children:[o.jsx(HN,{className:"h-4 w-4 mr-2"}),o.jsx(At,{placeholder:"模块"})]}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部模块"}),O.map(D=>o.jsx(Pe,{value:D,children:D},D))]})]})]}),o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:gap-4",children:[o.jsxs(Jo,{children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",size:"sm",className:ue("w-full sm:w-[200px] lg:w-[240px] justify-start text-left font-normal h-9",!d&&"text-muted-foreground"),children:[o.jsx(I3,{className:"mr-2 h-4 w-4"}),o.jsx("span",{className:"text-xs sm:text-sm",children:d?lv(d,"PPP",{locale:Hp}):"开始日期"})]})}),o.jsx(oo,{className:"w-auto p-0",align:"start",children:o.jsx(ML,{mode:"single",selected:d,onSelect:f,initialFocus:!0,locale:Hp})})]}),o.jsxs(Jo,{children:[o.jsx(es,{asChild:!0,children:o.jsxs(fe,{variant:"outline",size:"sm",className:ue("w-full sm:w-[200px] lg:w-[240px] justify-start text-left font-normal h-9",!m&&"text-muted-foreground"),children:[o.jsx(I3,{className:"mr-2 h-4 w-4"}),o.jsx("span",{className:"text-xs sm:text-sm",children:m?lv(m,"PPP",{locale:Hp}):"结束日期"})]})}),o.jsx(oo,{className:"w-auto p-0",align:"start",children:o.jsx(ML,{mode:"single",selected:m,onSelect:p,initialFocus:!0,locale:Hp})})]}),(d||m)&&o.jsxs(fe,{variant:"outline",size:"sm",onClick:$,className:"w-full sm:w-auto h-9",children:[o.jsx(Ih,{className:"h-4 w-4 sm:mr-2"}),o.jsx("span",{className:"hidden sm:inline text-sm",children:"清除时间筛选"}),o.jsx("span",{className:"sm:hidden text-sm",children:"清除"})]})]}),o.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center",children:[o.jsxs("div",{className:"flex gap-2 flex-wrap",children:[o.jsxs(fe,{variant:g?"default":"outline",size:"sm",onClick:P,className:"flex-1 sm:flex-none h-9",children:[g?o.jsx(Wve,{className:"h-4 w-4"}):o.jsx(Yve,{className:"h-4 w-4"}),o.jsx("span",{className:"ml-2 text-sm",children:g?"自动滚动":"已暂停"})]}),o.jsxs(fe,{variant:"outline",size:"sm",onClick:E,className:"flex-1 sm:flex-none h-9",children:[o.jsx(rl,{className:"h-4 w-4"}),o.jsx("span",{className:"ml-2 text-sm",children:"刷新"})]}),o.jsxs(fe,{variant:"outline",size:"sm",onClick:k,className:"flex-1 sm:flex-none h-9",children:[o.jsx(Ut,{className:"h-4 w-4"}),o.jsx("span",{className:"ml-2 text-sm",children:"清空"})]}),o.jsxs(fe,{variant:"outline",size:"sm",onClick:T,className:"flex-1 sm:flex-none h-9",children:[o.jsx(FN,{className:"h-4 w-4"}),o.jsx("span",{className:"ml-2 text-sm",children:"导出"})]})]}),o.jsx("div",{className:"flex-1 hidden sm:block"}),o.jsxs("div",{className:"text-xs sm:text-sm text-muted-foreground flex items-center justify-center sm:justify-end",children:[o.jsxs("span",{className:"font-mono",children:[z.length," / ",e.length]}),o.jsx("span",{className:"ml-1",children:"条日志"})]})]})]})}),o.jsx(dt,{className:"bg-black dark:bg-gray-950 border-gray-800 dark:border-gray-900",children:o.jsx(Xt,{className:"h-[calc(100vh-280px)] sm:h-[calc(100vh-320px)] lg:h-[calc(100vh-400px)]",children:o.jsxs("div",{ref:w,className:"p-2 sm:p-3 lg:p-4 font-mono text-xs sm:text-sm space-y-1",children:[z.length===0?o.jsx("div",{className:"text-gray-500 dark:text-gray-600 text-center py-8 text-sm",children:"暂无日志数据"}):z.map(D=>o.jsxs("div",{className:ue("py-2 px-2 sm:px-3 rounded hover:bg-white/5 transition-colors group",A(D.level)),children:[o.jsxs("div",{className:"flex flex-col gap-1 sm:hidden",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-gray-500 dark:text-gray-600 text-xs",children:D.timestamp}),o.jsxs("span",{className:ue("text-xs font-semibold",C(D.level)),children:["[",D.level,"]"]})]}),o.jsx("div",{className:"text-cyan-400 dark:text-cyan-500 text-xs truncate",children:D.module}),o.jsx("div",{className:"text-gray-300 dark:text-gray-400 text-xs break-all",children:D.message})]}),o.jsxs("div",{className:"hidden sm:flex gap-3 items-start",children:[o.jsx("span",{className:"text-gray-500 dark:text-gray-600 flex-shrink-0 w-[140px] lg:w-[180px] text-xs lg:text-sm",children:D.timestamp}),o.jsxs("span",{className:ue("flex-shrink-0 w-[70px] lg:w-[80px] font-semibold text-xs lg:text-sm",C(D.level)),children:["[",D.level,"]"]}),o.jsx("span",{className:"text-cyan-400 dark:text-cyan-500 flex-shrink-0 w-[120px] lg:w-[150px] truncate text-xs lg:text-sm",children:D.module}),o.jsx("span",{className:"text-gray-300 dark:text-gray-400 flex-1 break-all text-xs lg:text-sm",children:D.message})]})]},D.id)),o.jsx("div",{ref:N,className:"h-4"})]})})})]})})}const dOe="Mai-with-u",fOe="plugin-repo",hOe="main",mOe="plugin_details.json";async function pOe(){try{const e=await Ze("/api/webui/plugins/fetch-raw",{method:"POST",headers:st(),body:JSON.stringify({owner:dOe,repo:fOe,branch:hOe,file_path:mOe})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success||!t.data)throw new Error(t.error||"获取插件列表失败");return JSON.parse(t.data).filter(a=>!a?.id||!a?.manifest?(console.warn("跳过无效插件数据:",a),!1):!a.manifest.name||!a.manifest.version?(console.warn("跳过缺少必需字段的插件:",a.id),!1):!0).map(a=>({id:a.id,manifest:{manifest_version:a.manifest.manifest_version||1,name:a.manifest.name,version:a.manifest.version,description:a.manifest.description||"",author:a.manifest.author||{name:"Unknown"},license:a.manifest.license||"Unknown",host_application:a.manifest.host_application||{min_version:"0.0.0"},homepage_url:a.manifest.homepage_url,repository_url:a.manifest.repository_url,keywords:a.manifest.keywords||[],categories:a.manifest.categories||[],default_locale:a.manifest.default_locale||"zh-CN",locales_path:a.manifest.locales_path},downloads:0,rating:0,review_count:0,installed:!1,published_at:new Date().toISOString(),updated_at:new Date().toISOString()}))}catch(e){throw console.error("Failed to fetch plugin list:",e),e}}async function vOe(){try{const e=await Ze("/api/webui/plugins/git-status");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return await e.json()}catch(e){return console.error("Failed to check Git status:",e),{installed:!1,error:"无法检测 Git 安装状态"}}}async function gOe(){try{const e=await Ze("/api/webui/plugins/version");if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);return await e.json()}catch(e){return console.error("Failed to get Maimai version:",e),{version:"0.0.0",version_major:0,version_minor:0,version_patch:0}}}function yOe(e,t,n){const r=e.split(".").map(u=>parseInt(u)||0),a=r[0]||0,i=r[1]||0,l=r[2]||0;if(n.version_major<a||n.version_major===a&&n.version_minor<i||n.version_major===a&&n.version_minor===i&&n.version_patch<l)return!1;if(t){const u=t.split(".").map(p=>parseInt(p)||0),d=u[0]||0,f=u[1]||0,m=u[2]||0;if(n.version_major>d||n.version_major===d&&n.version_minor>f||n.version_major===d&&n.version_minor===f&&n.version_patch>m)return!1}return!0}function xOe(e,t){const n=window.location.protocol==="https:"?"wss:":"ws:",r=window.location.host,a=new WebSocket(`${n}//${r}/api/webui/ws/plugin-progress`);return a.onopen=()=>{console.log("Plugin progress WebSocket connected");const i=setInterval(()=>{a.readyState===WebSocket.OPEN?a.send("ping"):clearInterval(i)},3e4)},a.onmessage=i=>{try{if(i.data==="pong")return;const l=JSON.parse(i.data);e(l)}catch(l){console.error("Failed to parse progress data:",l)}},a.onerror=i=>{console.error("Plugin progress WebSocket error:",i),t?.(i)},a.onclose=()=>{console.log("Plugin progress WebSocket disconnected")},a}async function Wp(){try{const e=await Ze("/api/webui/plugins/installed",{headers:st()});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.message||"获取已安装插件列表失败");return t.plugins||[]}catch(e){return console.error("Failed to get installed plugins:",e),[]}}function Vp(e,t){return t.some(n=>n.id===e)}function Gp(e,t){const n=t.find(r=>r.id===e);if(n)return n.manifest?.version||n.version}async function bOe(e,t,n="main"){const r=await Ze("/api/webui/plugins/install",{method:"POST",headers:st(),body:JSON.stringify({plugin_id:e,repository_url:t,branch:n})});if(!r.ok){const a=await r.json();throw new Error(a.detail||"安装失败")}return await r.json()}async function wOe(e){const t=await Ze("/api/webui/plugins/uninstall",{method:"POST",headers:st(),body:JSON.stringify({plugin_id:e})});if(!t.ok){const n=await t.json();throw new Error(n.detail||"卸载失败")}return await t.json()}async function jOe(e,t,n="main"){const r=await Ze("/api/webui/plugins/update",{method:"POST",headers:st(),body:JSON.stringify({plugin_id:e,repository_url:t,branch:n})});if(!r.ok){const a=await r.json();throw new Error(a.detail||"更新失败")}return await r.json()}function SOe(){const e=ia(),[t,n]=y.useState(null),[r,a]=y.useState(""),[i,l]=y.useState("all"),[u,d]=y.useState("all"),[f,m]=y.useState(!1),[p,g]=y.useState([]),[x,j]=y.useState(!0),[b,w]=y.useState(null),[N,O]=y.useState(null),[C,A]=y.useState(null),[E,k]=y.useState(null),[,T]=y.useState([]),{toast:P}=hr();y.useEffect(()=>{let R=null,F=!1;return(async()=>{if(R=xOe(te=>{F||(A(te),te.stage==="success"?setTimeout(()=>{F||A(null)},2e3):te.stage==="error"&&(j(!1),w(te.error||"加载失败")))},te=>{console.error("WebSocket error:",te),F||P({title:"WebSocket 连接失败",description:"无法实时显示加载进度",variant:"destructive"})}),await new Promise(te=>{if(!R){te();return}const I=()=>{R&&R.readyState===WebSocket.OPEN?(console.log("WebSocket connected, starting to load plugins"),te()):R&&R.readyState===WebSocket.CLOSED?(console.warn("WebSocket closed before loading plugins"),te()):setTimeout(I,100)};I()}),!F){const te=await vOe();O(te),te.installed||P({title:"Git 未安装",description:te.error||"请先安装 Git 才能使用插件安装功能",variant:"destructive"})}if(!F){const te=await gOe();k(te)}if(!F)try{j(!0),w(null);const te=await pOe();if(!F){const I=await Wp();T(I);const B=te.map(Y=>{const ne=Vp(Y.id,I),oe=Gp(Y.id,I);return{...Y,installed:ne,installed_version:oe}});for(const Y of I)!B.some(oe=>oe.id===Y.id)&&Y.manifest&&B.push({id:Y.id,manifest:{manifest_version:Y.manifest.manifest_version||1,name:Y.manifest.name,version:Y.manifest.version,description:Y.manifest.description||"",author:Y.manifest.author,license:Y.manifest.license||"Unknown",host_application:Y.manifest.host_application,homepage_url:Y.manifest.homepage_url,repository_url:Y.manifest.repository_url,keywords:Y.manifest.keywords||[],categories:Y.manifest.categories||[],default_locale:Y.manifest.default_locale||"zh-CN",locales_path:Y.manifest.locales_path},downloads:0,rating:0,review_count:0,installed:!0,installed_version:Y.manifest.version,published_at:new Date().toISOString(),updated_at:new Date().toISOString()});g(B)}}catch(te){if(!F){const I=te instanceof Error?te.message:"加载插件列表失败";w(I),P({title:"加载失败",description:I,variant:"destructive"})}}finally{F||j(!1)}})(),()=>{F=!0,R&&R.close()}},[P]);const $=R=>{if(!R.installed&&E&&!z(R))return o.jsxs(en,{variant:"destructive",className:"gap-1",children:[o.jsx(yg,{className:"h-3 w-3"}),"不兼容"]});if(R.installed){const F=R.installed_version?.trim(),K=R.manifest.version?.trim();if(F!==K){const te=F?.split(".").map(Number)||[0,0,0],I=K?.split(".").map(Number)||[0,0,0];for(let B=0;B<3;B++){if((I[B]||0)>(te[B]||0))return o.jsxs(en,{variant:"outline",className:"gap-1 text-orange-600 border-orange-600",children:[o.jsx(yg,{className:"h-3 w-3"}),"可更新"]});if((I[B]||0)<(te[B]||0))break}}return o.jsxs(en,{variant:"default",className:"gap-1",children:[o.jsx(Ou,{className:"h-3 w-3"}),"已安装"]})}return null},z=R=>!E||!R.manifest?.host_application?!0:yOe(R.manifest.host_application.min_version,R.manifest.host_application.max_version,E),D=R=>{if(!R.installed||!R.installed_version||!R.manifest?.version)return!1;const F=R.installed_version.trim(),K=R.manifest.version.trim();if(F===K)return!1;const te=F.split(".").map(Number),I=K.split(".").map(Number);for(let B=0;B<3;B++){if((I[B]||0)>(te[B]||0))return!0;if((I[B]||0)<(te[B]||0))return!1}return!1},U=p.filter(R=>{if(!R.manifest)return console.warn("[过滤] 跳过无 manifest 的插件:",R.id),!1;const F=r===""||R.manifest.name?.toLowerCase().includes(r.toLowerCase())||R.manifest.description?.toLowerCase().includes(r.toLowerCase())||R.manifest.keywords&&R.manifest.keywords.some(B=>B.toLowerCase().includes(r.toLowerCase())),K=i==="all"||R.manifest.categories&&R.manifest.categories.includes(i);let te=!0;u==="installed"?te=R.installed===!0:u==="updates"&&(te=R.installed===!0&&D(R));const I=!f||!E||z(R);return F&&K&&te&&I}),V=()=>{n(null)},H=async R=>{if(!N?.installed){P({title:"无法安装",description:"Git 未安装",variant:"destructive"});return}if(E&&!z(R)){P({title:"无法安装",description:"插件与当前麦麦版本不兼容",variant:"destructive"});return}try{await bOe(R.id,R.manifest.repository_url||"","main"),P({title:"安装成功",description:`${R.manifest.name} 已成功安装`});const F=await Wp();T(F),g(K=>K.map(te=>{if(te.id===R.id){const I=Vp(te.id,F),B=Gp(te.id,F);return{...te,installed:I,installed_version:B}}return te}))}catch(F){P({title:"安装失败",description:F instanceof Error?F.message:"未知错误",variant:"destructive"})}},G=async R=>{try{await wOe(R.id),P({title:"卸载成功",description:`${R.manifest.name} 已成功卸载`});const F=await Wp();T(F),g(K=>K.map(te=>{if(te.id===R.id){const I=Vp(te.id,F),B=Gp(te.id,F);return{...te,installed:I,installed_version:B}}return te}))}catch(F){P({title:"卸载失败",description:F instanceof Error?F.message:"未知错误",variant:"destructive"})}},L=async R=>{if(!N?.installed){P({title:"无法更新",description:"Git 未安装",variant:"destructive"});return}try{const F=await jOe(R.id,R.manifest.repository_url||"","main");P({title:"更新成功",description:`${R.manifest.name} 已从 ${F.old_version} 更新到 ${F.new_version}`});const K=await Wp();T(K),g(te=>te.map(I=>{if(I.id===R.id){const B=Vp(I.id,K),Y=Gp(I.id,K);return{...I,installed:B,installed_version:Y}}return I}))}catch(F){P({title:"更新失败",description:F instanceof Error?F.message:"未知错误",variant:"destructive"})}};return o.jsx(Xt,{className:"h-full",children:o.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件市场"}),o.jsx("p",{className:"text-muted-foreground mt-2",children:"浏览和管理麦麦的插件"})]}),o.jsxs(fe,{onClick:()=>e({to:"/plugin-mirrors"}),children:[o.jsx(ige,{className:"h-4 w-4 mr-2"}),"配置镜像源"]})]}),N&&!N.installed&&o.jsxs(dt,{className:"border-orange-600 bg-orange-50 dark:bg-orange-950/20",children:[o.jsx(Vt,{children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Hc,{className:"h-5 w-5 text-orange-600"}),o.jsxs("div",{children:[o.jsx(Gt,{className:"text-lg text-orange-900 dark:text-orange-100",children:"Git 未安装"}),o.jsx(Jn,{className:"text-orange-800 dark:text-orange-200",children:N.error||"请先安装 Git 才能使用插件安装功能"})]})]})}),o.jsx(ln,{children:o.jsxs("p",{className:"text-sm text-orange-800 dark:text-orange-200",children:["您可以从 ",o.jsx("a",{href:"https://git-scm.com/downloads",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"git-scm.com"})," 下载并安装 Git。 安装完成后,请重启麦麦应用。"]})})]}),o.jsx(dt,{className:"p-4",children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[o.jsxs("div",{className:"flex-1 relative",children:[o.jsx(Rr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),o.jsx(Ne,{placeholder:"搜索插件...",value:r,onChange:R=>a(R.target.value),className:"pl-9"})]}),o.jsxs(Et,{value:i,onValueChange:l,children:[o.jsx(wt,{className:"w-full sm:w-[200px]",children:o.jsx(At,{placeholder:"选择分类"})}),o.jsxs(jt,{children:[o.jsx(Pe,{value:"all",children:"全部分类"}),o.jsx(Pe,{value:"Developer Tools",children:"开发工具"}),o.jsx(Pe,{value:"AI Enhancement",children:"AI 增强"}),o.jsx(Pe,{value:"Utility",children:"工具类"}),o.jsx(Pe,{value:"Entertainment",children:"娱乐"}),o.jsx(Pe,{value:"Integration",children:"集成"}),o.jsx(Pe,{value:"Data Analysis",children:"数据分析"}),o.jsx(Pe,{value:"Automation",children:"自动化"}),o.jsx(Pe,{value:"Other",children:"其他"})]})]})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Tu,{id:"compatible-only",checked:f,onCheckedChange:R=>m(R===!0)}),o.jsx("label",{htmlFor:"compatible-only",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"只显示兼容当前版本的插件"})]})]})}),o.jsx(ol,{value:u,onValueChange:d,className:"w-full",children:o.jsxs(Xo,{className:"grid w-full grid-cols-3",children:[o.jsxs(Ct,{value:"all",children:["全部插件 (",p.length,")"]}),o.jsxs(Ct,{value:"installed",children:["已安装 (",p.filter(R=>R.installed).length,")"]}),o.jsxs(Ct,{value:"updates",children:["可更新 (",p.filter(R=>R.installed&&D(R)).length,")"]})]})}),C&&C.stage==="loading"&&o.jsx(dt,{className:"p-4",children:o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(WN,{className:"h-4 w-4 animate-spin"}),o.jsxs("span",{className:"text-sm font-medium",children:[C.operation==="fetch"&&"加载插件列表",C.operation==="install"&&`安装插件${C.plugin_id?`: ${C.plugin_id}`:""}`,C.operation==="uninstall"&&`卸载插件${C.plugin_id?`: ${C.plugin_id}`:""}`,C.operation==="update"&&`更新插件${C.plugin_id?`: ${C.plugin_id}`:""}`]})]}),o.jsxs("span",{className:"text-sm font-medium",children:[C.progress,"%"]})]}),o.jsx(lE,{value:C.progress,className:"h-2"}),o.jsx("div",{className:"text-xs text-muted-foreground",children:C.message}),C.operation==="fetch"&&C.total_plugins>0&&o.jsxs("div",{className:"text-xs text-muted-foreground text-center",children:["已加载 ",C.loaded_plugins," / ",C.total_plugins," 个插件"]})]})}),C&&C.stage==="error"&&C.error&&o.jsx(dt,{className:"border-destructive bg-destructive/10",children:o.jsx(Vt,{children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Hc,{className:"h-5 w-5 text-destructive"}),o.jsxs("div",{children:[o.jsx(Gt,{className:"text-lg text-destructive",children:"加载失败"}),o.jsx(Jn,{className:"text-destructive/80",children:C.error})]})]})})}),x?o.jsxs("div",{className:"flex items-center justify-center py-12",children:[o.jsx(WN,{className:"h-8 w-8 animate-spin text-muted-foreground"}),o.jsx("span",{className:"ml-3 text-muted-foreground",children:"加载插件列表中..."})]}):b?o.jsx(dt,{className:"p-6",children:o.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[o.jsx(Hc,{className:"h-12 w-12 text-destructive mb-4"}),o.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:b}),o.jsx(fe,{onClick:()=>window.location.reload(),children:"重新加载"})]})}):U.length===0?o.jsx(dt,{className:"p-6",children:o.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[o.jsx(Rr,{className:"h-12 w-12 text-muted-foreground mb-4"}),o.jsx("h3",{className:"text-lg font-semibold mb-2",children:"未找到插件"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:r||i!=="all"?"尝试调整搜索条件或筛选器":"暂无可用插件"})]})}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:U.map(R=>o.jsxs(dt,{className:"flex flex-col hover:shadow-lg transition-shadow h-full",children:[o.jsxs(Vt,{children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsx(Gt,{className:"text-xl",children:R.manifest?.name||R.id}),o.jsxs("div",{className:"flex flex-col gap-1",children:[R.manifest?.categories&&R.manifest.categories[0]&&o.jsx(en,{variant:"secondary",className:"text-xs whitespace-nowrap",children:R.manifest.categories[0]}),$(R)]})]}),o.jsx(Jn,{className:"line-clamp-2",children:R.manifest?.description||"无描述"})]}),o.jsx(ln,{className:"flex-1",children:o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(FN,{className:"h-4 w-4"}),o.jsx("span",{children:R.downloads.toLocaleString()})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(z3,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),o.jsx("span",{children:R.rating.toFixed(1)})]})]}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[R.manifest?.keywords&&R.manifest.keywords.slice(0,3).map(F=>o.jsx(en,{variant:"outline",className:"text-xs",children:F},F)),R.manifest?.keywords&&R.manifest.keywords.length>3&&o.jsxs(en,{variant:"outline",className:"text-xs",children:["+",R.manifest.keywords.length-3]})]}),o.jsxs("div",{className:"text-xs text-muted-foreground pt-2 border-t space-y-1",children:[o.jsxs("div",{children:["v",R.manifest?.version||"unknown"," · ",R.manifest?.author?.name||"Unknown"]}),R.manifest?.host_application&&o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{children:"支持:"}),o.jsxs("span",{className:"font-medium",children:[R.manifest.host_application.min_version,R.manifest.host_application.max_version?` - ${R.manifest.host_application.max_version}`:" - 最新版本"]})]})]})]})}),o.jsx(L5,{className:"pt-4",children:o.jsxs("div",{className:"flex items-center justify-end gap-2 w-full",children:[o.jsx(fe,{variant:"outline",size:"sm",onClick:()=>n(R),children:"查看详情"}),R.installed?D(R)?o.jsxs(fe,{size:"sm",disabled:!N?.installed,title:N?.installed?void 0:"Git 未安装",onClick:()=>L(R),children:[o.jsx(rl,{className:"h-4 w-4 mr-1"}),"更新"]}):o.jsxs(fe,{variant:"destructive",size:"sm",disabled:!N?.installed,title:N?.installed?void 0:"Git 未安装",onClick:()=>G(R),children:[o.jsx(Ut,{className:"h-4 w-4 mr-1"}),"卸载"]}):o.jsxs(fe,{size:"sm",disabled:!N?.installed||C?.operation==="install"||E!==null&&!z(R),title:N?.installed?E!==null&&!z(R)?`不兼容当前版本 (需要 ${R.manifest?.host_application?.min_version||"未知"}${R.manifest?.host_application?.max_version?` - ${R.manifest.host_application.max_version}`:"+"},当前 ${E?.version})`:void 0:"Git 未安装",onClick:()=>H(R),children:[o.jsx(FN,{className:"h-4 w-4 mr-1"}),C?.operation==="install"&&C?.plugin_id===R.id?"安装中...":"安装"]})]})})]},R.id))}),o.jsx(tr,{open:t!==null,onOpenChange:V,children:t&&t.manifest&&o.jsxs(Un,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[o.jsx(Hn,{children:o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"space-y-2 flex-1",children:[o.jsx(Wn,{className:"text-2xl",children:t.manifest.name}),o.jsxs(ur,{children:["作者: ",t.manifest.author?.name||"Unknown",t.manifest.author?.url&&o.jsx("a",{href:t.manifest.author.url,target:"_blank",rel:"noopener noreferrer",className:"ml-2 text-primary hover:underline",children:o.jsx(nv,{className:"h-3 w-3 inline"})})]})]}),o.jsxs("div",{className:"flex flex-col gap-2",children:[t.manifest.categories&&t.manifest.categories[0]&&o.jsx(en,{variant:"secondary",children:t.manifest.categories[0]}),$(t)]})]})}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium",children:"版本"}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["v",t.manifest?.version||"unknown"]}),t.installed&&t.installed_version&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:["已安装: v",t.installed_version]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium",children:"下载量"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:t.downloads.toLocaleString()})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium",children:"评分"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(z3,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),o.jsxs("span",{className:"text-sm text-muted-foreground",children:[t.rating.toFixed(1)," (",t.review_count,")"]})]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium",children:"许可证"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:t.manifest.license||"Unknown"})]}),o.jsxs("div",{className:"col-span-2",children:[o.jsx("p",{className:"text-sm font-medium",children:"支持版本"}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.manifest.host_application?.min_version||"未知",t.manifest.host_application?.max_version?` - ${t.manifest.host_application.max_version}`:" - 最新版本"]})]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2",children:"关键词"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:t.manifest.keywords&&t.manifest.keywords.map(R=>o.jsx(en,{variant:"outline",children:R},R))})]}),t.detailed_description&&o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2",children:"详细说明"}),o.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:t.detailed_description})]}),!t.detailed_description&&o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium mb-2",children:"说明"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:t.manifest.description||"无描述"})]}),o.jsxs("div",{className:"space-y-2",children:[t.manifest.homepage_url&&o.jsxs("div",{className:"text-sm",children:[o.jsx("span",{className:"font-medium",children:"主页: "}),o.jsx("a",{href:t.manifest.homepage_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:t.manifest.homepage_url})]}),t.manifest.repository_url&&o.jsxs("div",{className:"text-sm",children:[o.jsx("span",{className:"font-medium",children:"仓库: "}),o.jsx("a",{href:t.manifest.repository_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:t.manifest.repository_url})]})]})]}),o.jsxs(Dr,{children:[t.manifest.homepage_url&&o.jsxs(fe,{onClick:()=>window.open(t.manifest.homepage_url,"_blank"),children:[o.jsx(nv,{className:"h-4 w-4 mr-2"}),"访问主页"]}),t.manifest.repository_url&&o.jsxs(fe,{variant:"outline",onClick:()=>window.open(t.manifest.repository_url,"_blank"),children:[o.jsx(nv,{className:"h-4 w-4 mr-2"}),"查看仓库"]})]})]})})]})})}function _Oe(){const e=ia(),{toast:t}=hr(),[n,r]=y.useState([]),[a,i]=y.useState(!0),[l,u]=y.useState(null),[d,f]=y.useState(null),[m,p]=y.useState(!1),[g,x]=y.useState(!1),[j,b]=y.useState({id:"",name:"",raw_prefix:"",clone_prefix:"",enabled:!0,priority:1}),w=y.useCallback(async()=>{try{i(!0),u(null);const T=localStorage.getItem("access-token"),P=await fetch("/api/webui/plugins/mirrors",{headers:{Authorization:`Bearer ${T}`}});if(!P.ok)throw new Error("获取镜像源列表失败");const $=await P.json();r($.mirrors||[])}catch(T){const P=T instanceof Error?T.message:"加载镜像源失败";u(P),t({title:"加载失败",description:P,variant:"destructive"})}finally{i(!1)}},[t]);y.useEffect(()=>{w()},[w]);const N=async()=>{try{const T=localStorage.getItem("access-token"),P=await fetch("/api/webui/plugins/mirrors",{method:"POST",headers:{Authorization:`Bearer ${T}`,"Content-Type":"application/json"},body:JSON.stringify(j)});if(!P.ok){const $=await P.json();throw new Error($.detail||"添加镜像源失败")}t({title:"添加成功",description:"镜像源已添加"}),p(!1),b({id:"",name:"",raw_prefix:"",clone_prefix:"",enabled:!0,priority:1}),w()}catch(T){t({title:"添加失败",description:T instanceof Error?T.message:"未知错误",variant:"destructive"})}},O=async()=>{if(d)try{const T=localStorage.getItem("access-token");if(!(await fetch(`/api/webui/plugins/mirrors/${d.id}`,{method:"PUT",headers:{Authorization:`Bearer ${T}`,"Content-Type":"application/json"},body:JSON.stringify({name:j.name,raw_prefix:j.raw_prefix,clone_prefix:j.clone_prefix,enabled:j.enabled,priority:j.priority})})).ok)throw new Error("更新镜像源失败");t({title:"更新成功",description:"镜像源已更新"}),x(!1),f(null),w()}catch(T){t({title:"更新失败",description:T instanceof Error?T.message:"未知错误",variant:"destructive"})}},C=async T=>{if(confirm("确定要删除这个镜像源吗?"))try{const P=localStorage.getItem("access-token");if(!(await fetch(`/api/webui/plugins/mirrors/${T}`,{method:"DELETE",headers:{Authorization:`Bearer ${P}`}})).ok)throw new Error("删除镜像源失败");t({title:"删除成功",description:"镜像源已删除"}),w()}catch(P){t({title:"删除失败",description:P instanceof Error?P.message:"未知错误",variant:"destructive"})}},A=async T=>{try{const P=localStorage.getItem("access-token");if(!(await fetch(`/api/webui/plugins/mirrors/${T.id}`,{method:"PUT",headers:{Authorization:`Bearer ${P}`,"Content-Type":"application/json"},body:JSON.stringify({enabled:!T.enabled})})).ok)throw new Error("更新状态失败");w()}catch(P){t({title:"更新失败",description:P instanceof Error?P.message:"未知错误",variant:"destructive"})}},E=T=>{f(T),b({id:T.id,name:T.name,raw_prefix:T.raw_prefix,clone_prefix:T.clone_prefix,enabled:T.enabled,priority:T.priority}),x(!0)},k=async(T,P)=>{const $=P==="up"?T.priority-1:T.priority+1;if(!($<1))try{const z=localStorage.getItem("access-token");if(!(await fetch(`/api/webui/plugins/mirrors/${T.id}`,{method:"PUT",headers:{Authorization:`Bearer ${z}`,"Content-Type":"application/json"},body:JSON.stringify({priority:$})})).ok)throw new Error("更新优先级失败");w()}catch(z){t({title:"更新失败",description:z instanceof Error?z.message:"未知错误",variant:"destructive"})}};return o.jsx(Xt,{className:"h-full",children:o.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[o.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>e({to:"/plugins"}),children:o.jsx(Uq,{className:"h-5 w-5"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"镜像源配置"}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理 Git 克隆和文件下载的镜像源"})]})]}),o.jsxs(fe,{onClick:()=>p(!0),children:[o.jsx(er,{className:"h-4 w-4 mr-2"}),"添加镜像源"]})]}),a?o.jsx(dt,{className:"p-6",children:o.jsx("div",{className:"flex items-center justify-center py-8",children:o.jsx(WN,{className:"h-8 w-8 animate-spin text-primary"})})}):l?o.jsx(dt,{className:"p-6",children:o.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[o.jsx(Hc,{className:"h-12 w-12 text-destructive mb-4"}),o.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:l}),o.jsx(fe,{onClick:w,children:"重新加载"})]})}):o.jsxs(dt,{children:[o.jsx("div",{className:"hidden md:block",children:o.jsxs(Nl,{children:[o.jsx(Ol,{children:o.jsxs(pn,{children:[o.jsx(Je,{children:"状态"}),o.jsx(Je,{children:"名称"}),o.jsx(Je,{children:"ID"}),o.jsx(Je,{children:"优先级"}),o.jsx(Je,{className:"text-right",children:"操作"})]})}),o.jsx(Cl,{children:n.map(T=>o.jsxs(pn,{children:[o.jsx(Ue,{children:o.jsx(at,{checked:T.enabled,onCheckedChange:()=>A(T)})}),o.jsx(Ue,{children:o.jsxs("div",{children:[o.jsx("div",{className:"font-medium",children:T.name}),o.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Raw: ",T.raw_prefix]})]})}),o.jsx(Ue,{children:o.jsx(en,{variant:"outline",children:T.id})}),o.jsx(Ue,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"font-mono",children:T.priority}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx(fe,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>k(T,"up"),disabled:T.priority===1,children:o.jsx(zN,{className:"h-3 w-3"})}),o.jsx(fe,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>k(T,"down"),children:o.jsx(lh,{className:"h-3 w-3"})})]})]})}),o.jsx(Ue,{className:"text-right",children:o.jsxs("div",{className:"flex items-center justify-end gap-2",children:[o.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>E(T),children:o.jsx(Cu,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>C(T.id),children:o.jsx(Ut,{className:"h-4 w-4 text-destructive"})})]})})]},T.id))})]})}),o.jsx("div",{className:"md:hidden p-4 space-y-4",children:n.map(T=>o.jsx(dt,{className:"p-4",children:o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"font-semibold",children:T.name}),T.enabled&&o.jsx(en,{variant:"default",className:"text-xs",children:"启用"})]}),o.jsx(en,{variant:"outline",className:"mt-1 text-xs",children:T.id})]}),o.jsx(at,{checked:T.enabled,onCheckedChange:()=>A(T)})]}),o.jsxs("div",{className:"text-sm space-y-1",children:[o.jsxs("div",{className:"text-muted-foreground",children:[o.jsx("span",{className:"font-medium",children:"Raw: "}),o.jsx("span",{className:"break-all",children:T.raw_prefix})]}),o.jsxs("div",{className:"text-muted-foreground",children:[o.jsx("span",{className:"font-medium",children:"优先级: "}),o.jsx("span",{className:"font-mono",children:T.priority})]})]}),o.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t",children:[o.jsxs(fe,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>E(T),children:[o.jsx(Cu,{className:"h-4 w-4 mr-1"}),"编辑"]}),o.jsx(fe,{variant:"outline",size:"sm",onClick:()=>k(T,"up"),disabled:T.priority===1,children:o.jsx(zN,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"outline",size:"sm",onClick:()=>k(T,"down"),children:o.jsx(lh,{className:"h-4 w-4"})}),o.jsx(fe,{variant:"destructive",size:"sm",onClick:()=>C(T.id),children:o.jsx(Ut,{className:"h-4 w-4"})})]})]})},T.id))})]}),o.jsx(tr,{open:m,onOpenChange:p,children:o.jsxs(Un,{className:"max-w-lg",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"添加镜像源"}),o.jsx(ur,{children:"添加新的 Git 镜像源配置"})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"add-id",children:"镜像源 ID *"}),o.jsx(Ne,{id:"add-id",placeholder:"例如: my-mirror",value:j.id,onChange:T=>b({...j,id:T.target.value})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"add-name",children:"名称 *"}),o.jsx(Ne,{id:"add-name",placeholder:"例如: 我的镜像源",value:j.name,onChange:T=>b({...j,name:T.target.value})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"add-raw",children:"Raw 文件前缀 *"}),o.jsx(Ne,{id:"add-raw",placeholder:"https://example.com/raw",value:j.raw_prefix,onChange:T=>b({...j,raw_prefix:T.target.value})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"add-clone",children:"克隆前缀 *"}),o.jsx(Ne,{id:"add-clone",placeholder:"https://example.com/clone",value:j.clone_prefix,onChange:T=>b({...j,clone_prefix:T.target.value})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"add-priority",children:"优先级"}),o.jsx(Ne,{id:"add-priority",type:"number",min:"1",value:j.priority,onChange:T=>b({...j,priority:parseInt(T.target.value)||1})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"add-enabled",checked:j.enabled,onCheckedChange:T=>b({...j,enabled:T})}),o.jsx(J,{htmlFor:"add-enabled",children:"启用此镜像源"})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>p(!1),children:"取消"}),o.jsx(fe,{onClick:N,children:"添加"})]})]})}),o.jsx(tr,{open:g,onOpenChange:x,children:o.jsxs(Un,{className:"max-w-lg",children:[o.jsxs(Hn,{children:[o.jsx(Wn,{children:"编辑镜像源"}),o.jsx(ur,{children:"修改镜像源配置"})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{children:"镜像源 ID"}),o.jsx(Ne,{value:j.id,disabled:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit-name",children:"名称 *"}),o.jsx(Ne,{id:"edit-name",value:j.name,onChange:T=>b({...j,name:T.target.value})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit-raw",children:"Raw 文件前缀 *"}),o.jsx(Ne,{id:"edit-raw",value:j.raw_prefix,onChange:T=>b({...j,raw_prefix:T.target.value})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit-clone",children:"克隆前缀 *"}),o.jsx(Ne,{id:"edit-clone",value:j.clone_prefix,onChange:T=>b({...j,clone_prefix:T.target.value})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(J,{htmlFor:"edit-priority",children:"优先级"}),o.jsx(Ne,{id:"edit-priority",type:"number",min:"1",value:j.priority,onChange:T=>b({...j,priority:parseInt(T.target.value)||1})}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(at,{id:"edit-enabled",checked:j.enabled,onCheckedChange:T=>b({...j,enabled:T})}),o.jsx(J,{htmlFor:"edit-enabled",children:"启用此镜像源"})]})]}),o.jsxs(Dr,{children:[o.jsx(fe,{variant:"outline",onClick:()=>x(!1),children:"取消"}),o.jsx(fe,{onClick:O,children:"保存"})]})]})})]})})}const NOe=Bh("pointer-events-none inline-flex select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono font-medium opacity-100",{variants:{size:{sm:"h-5 text-[10px]",default:"h-6 text-xs",lg:"h-7 text-sm"}},defaultVariants:{size:"default"}}),WH=y.forwardRef(({className:e,size:t,abbrTitle:n,children:r,...a},i)=>o.jsx("kbd",{className:ue(NOe({size:t,className:e})),ref:i,...a,children:n?o.jsx("abbr",{title:n,children:r}):r}));WH.displayName="Kbd";const OOe=[{icon:wg,title:"首页",description:"查看仪表板概览",path:"/",category:"概览"},{icon:WC,title:"麦麦主程序配置",description:"配置麦麦的核心设置",path:"/config/bot",category:"配置"},{icon:Xq,title:"麦麦模型提供商配置",description:"配置模型提供商",path:"/config/modelProvider",category:"配置"},{icon:Hq,title:"麦麦模型配置",description:"配置模型参数",path:"/config/model",category:"配置"},{icon:GC,title:"表情包管理",description:"管理麦麦的表情包",path:"/resource/emoji",category:"资源"},{icon:$h,title:"表达方式管理",description:"管理麦麦的表达方式",path:"/resource/expression",category:"资源"},{icon:Wq,title:"人物信息管理",description:"管理人物信息",path:"/resource/person",category:"资源"},{icon:Jpe,title:"统计信息",description:"查看使用统计",path:"/statistics",category:"监控"},{icon:Yq,title:"插件市场",description:"浏览和安装插件",path:"/plugins",category:"扩展"},{icon:xg,title:"日志查看器",description:"查看系统日志",path:"/logs",category:"监控"},{icon:Uc,title:"系统设置",description:"配置系统参数",path:"/settings",category:"系统"}];function COe({open:e,onOpenChange:t}){const[n,r]=y.useState(""),[a,i]=y.useState(0),l=ia(),u=OOe.filter(m=>m.title.toLowerCase().includes(n.toLowerCase())||m.description.toLowerCase().includes(n.toLowerCase())||m.category.toLowerCase().includes(n.toLowerCase()));y.useEffect(()=>{e&&(r(""),i(0))},[e]);const d=y.useCallback(m=>{l({to:m}),t(!1)},[l,t]),f=y.useCallback(m=>{m.key==="ArrowDown"?(m.preventDefault(),i(p=>(p+1)%u.length)):m.key==="ArrowUp"?(m.preventDefault(),i(p=>(p-1+u.length)%u.length)):m.key==="Enter"&&u[a]&&(m.preventDefault(),d(u[a].path))},[u,a,d]);return o.jsx(tr,{open:e,onOpenChange:t,children:o.jsxs(Un,{className:"max-w-2xl p-0 gap-0",children:[o.jsxs(Hn,{className:"px-4 pt-4 pb-0",children:[o.jsx(Wn,{className:"sr-only",children:"搜索"}),o.jsxs("div",{className:"relative",children:[o.jsx(Rr,{className:"absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground"}),o.jsx(Ne,{value:n,onChange:m=>{r(m.target.value),i(0)},onKeyDown:f,placeholder:"搜索页面...",className:"h-12 pl-11 text-base border-0 focus-visible:ring-0 shadow-none",autoFocus:!0})]})]}),o.jsx("div",{className:"border-t",children:o.jsx(Xt,{className:"h-[400px]",children:u.length>0?o.jsx("div",{className:"p-2",children:u.map((m,p)=>{const g=m.icon;return o.jsxs("button",{onClick:()=>d(m.path),onMouseEnter:()=>i(p),className:ue("w-full flex items-center gap-3 px-3 py-2.5 rounded-md text-left transition-colors",p===a?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:[o.jsx(g,{className:"h-5 w-5 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-sm",children:m.title}),o.jsx("div",{className:"text-xs text-muted-foreground truncate",children:m.description})]}),o.jsx("div",{className:"text-xs text-muted-foreground px-2 py-1 bg-muted rounded",children:m.category})]},m.path)})}):o.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[o.jsx(Rr,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:n?"未找到匹配的页面":"输入关键词开始搜索"})]})})}),o.jsx("div",{className:"border-t px-4 py-3 flex items-center justify-between text-xs text-muted-foreground",children:o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↑"}),o.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↓"}),"导航"]}),o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Enter"}),"选择"]}),o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Esc"}),"关闭"]})]})})]})})}function EOe(e){const t=AOe(e),n=y.forwardRef((r,a)=>{const{children:i,...l}=r,u=y.Children.toArray(i),d=u.find(kOe);if(d){const f=d.props.children,m=u.map(p=>p===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:p);return o.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return o.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function AOe(e){const t=y.forwardRef((n,r)=>{const{children:a,...i}=n;if(y.isValidElement(a)){const l=MOe(a),u=POe(i,a.props);return a.type!==y.Fragment&&(u.ref=r?Mr(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TOe=Symbol("radix.slottable");function kOe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TOe}function POe(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function MOe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dO=["Enter"," "],ROe=["ArrowDown","PageUp","Home"],VH=["ArrowUp","PageDown","End"],DOe=[...ROe,...VH],$Oe={ltr:[...dO,"ArrowRight"],rtl:[...dO,"ArrowLeft"]},IOe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Zh="Menu",[vh,LOe,BOe]=_h(Zh),[Tl,GH]=fr(Zh,[BOe,ss,qg]),Qh=ss(),YH=qg(),[KH,fs]=Tl(Zh),[zOe,Jh]=Tl(Zh),XH=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:l=!0}=e,u=Qh(t),[d,f]=y.useState(null),m=y.useRef(!1),p=tn(i),g=$u(a);return y.useEffect(()=>{const x=()=>{m.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>m.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),o.jsx(Uh,{...u,children:o.jsx(KH,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:o.jsx(zOe,{scope:t,onClose:y.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};XH.displayName=Zh;var qOe="MenuAnchor",CE=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Qh(n);return o.jsx(Hh,{...a,...r,ref:t})});CE.displayName=qOe;var EE="MenuPortal",[FOe,ZH]=Tl(EE,{forceMount:void 0}),QH=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=fs(EE,t);return o.jsx(FOe,{scope:t,forceMount:n,children:o.jsx(Mn,{present:n||i.open,children:o.jsx(_l,{asChild:!0,container:a,children:r})})})};QH.displayName=EE;var Sa="MenuContent",[UOe,AE]=Tl(Sa),JH=y.forwardRef((e,t)=>{const n=ZH(Sa,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=fs(Sa,e.__scopeMenu),l=Jh(Sa,e.__scopeMenu);return o.jsx(vh.Provider,{scope:e.__scopeMenu,children:o.jsx(Mn,{present:r||i.open,children:o.jsx(vh.Slot,{scope:e.__scopeMenu,children:l.modal?o.jsx(HOe,{...a,ref:t}):o.jsx(WOe,{...a,ref:t})})})})}),HOe=y.forwardRef((e,t)=>{const n=fs(Sa,e.__scopeMenu),r=y.useRef(null),a=qe(t,r);return y.useEffect(()=>{const i=r.current;if(i)return My(i)},[]),o.jsx(TE,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Se(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),WOe=y.forwardRef((e,t)=>{const n=fs(Sa,e.__scopeMenu);return o.jsx(TE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),VOe=EOe("MenuContent.ScrollLock"),TE=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:x,disableOutsideScroll:j,...b}=e,w=fs(Sa,n),N=Jh(Sa,n),O=Qh(n),C=YH(n),A=LOe(n),[E,k]=y.useState(null),T=y.useRef(null),P=qe(t,T,w.onContentChange),$=y.useRef(0),z=y.useRef(""),D=y.useRef(0),U=y.useRef(null),V=y.useRef("right"),H=y.useRef(0),G=j?qh:y.Fragment,L=j?{as:VOe,allowPinchZoom:!0}:void 0,R=K=>{const te=z.current+K,I=A().filter(ee=>!ee.disabled),B=document.activeElement,Y=I.find(ee=>ee.ref.current===B)?.textValue,ne=I.map(ee=>ee.textValue),oe=aCe(ne,te,Y),xe=I.find(ee=>ee.textValue===oe)?.ref.current;(function ee(ae){z.current=ae,window.clearTimeout($.current),ae!==""&&($.current=window.setTimeout(()=>ee(""),1e3))})(te),xe&&setTimeout(()=>xe.focus())};y.useEffect(()=>()=>window.clearTimeout($.current),[]),ky();const F=y.useCallback(K=>V.current===U.current?.side&&oCe(K,U.current?.area),[]);return o.jsx(UOe,{scope:n,searchRef:z,onItemEnter:y.useCallback(K=>{F(K)&&K.preventDefault()},[F]),onItemLeave:y.useCallback(K=>{F(K)||(T.current?.focus(),k(null))},[F]),onTriggerLeave:y.useCallback(K=>{F(K)&&K.preventDefault()},[F]),pointerGraceTimerRef:D,onPointerGraceIntentChange:y.useCallback(K=>{U.current=K},[]),children:o.jsx(G,{...L,children:o.jsx(zh,{asChild:!0,trapped:a,onMountAutoFocus:Se(i,K=>{K.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:o.jsx(Sl,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:x,children:o.jsx(H5,{asChild:!0,...C,dir:N.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:k,onEntryFocus:Se(d,K=>{N.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(Fy,{role:"menu","aria-orientation":"vertical","data-state":v9(w.open),"data-radix-menu-content":"",dir:N.dir,...O,...b,ref:P,style:{outline:"none",...b.style},onKeyDown:Se(b.onKeyDown,K=>{const I=K.target.closest("[data-radix-menu-content]")===K.currentTarget,B=K.ctrlKey||K.altKey||K.metaKey,Y=K.key.length===1;I&&(K.key==="Tab"&&K.preventDefault(),!B&&Y&&R(K.key));const ne=T.current;if(K.target!==ne||!DOe.includes(K.key))return;K.preventDefault();const xe=A().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);VH.includes(K.key)&&xe.reverse(),nCe(xe)}),onBlur:Se(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout($.current),z.current="")}),onPointerMove:Se(e.onPointerMove,gh(K=>{const te=K.target,I=H.current!==K.clientX;if(K.currentTarget.contains(te)&&I){const B=K.clientX>H.current?"right":"left";V.current=B,H.current=K.clientX}}))})})})})})})});JH.displayName=Sa;var GOe="MenuGroup",kE=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(Me.div,{role:"group",...r,ref:t})});kE.displayName=GOe;var YOe="MenuLabel",e9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(Me.div,{...r,ref:t})});e9.displayName=YOe;var kg="MenuItem",DL="menu.itemSelect",Qy=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=y.useRef(null),l=Jh(kg,e.__scopeMenu),u=AE(kg,e.__scopeMenu),d=qe(t,i),f=y.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(DL,{bubbles:!0,cancelable:!0});p.addEventListener(DL,x=>r?.(x),{once:!0}),MO(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return o.jsx(t9,{...a,ref:d,disabled:n,onClick:Se(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:Se(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:Se(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||dO.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Qy.displayName=kg;var t9=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,l=AE(kg,n),u=YH(n),d=y.useRef(null),f=qe(t,d),[m,p]=y.useState(!1),[g,x]=y.useState("");return y.useEffect(()=>{const j=d.current;j&&x((j.textContent??"").trim())},[i.children]),o.jsx(vh.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:o.jsx(W5,{asChild:!0,...u,focusable:!r,children:o.jsx(Me.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:Se(e.onPointerMove,gh(j=>{r?l.onItemLeave(j):(l.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Se(e.onPointerLeave,gh(j=>l.onItemLeave(j))),onFocus:Se(e.onFocus,()=>p(!0)),onBlur:Se(e.onBlur,()=>p(!1))})})})}),KOe="MenuCheckboxItem",n9=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return o.jsx(s9,{scope:e.__scopeMenu,checked:n,children:o.jsx(Qy,{role:"menuitemcheckbox","aria-checked":Pg(n)?"mixed":n,...a,ref:t,"data-state":RE(n),onSelect:Se(a.onSelect,()=>r?.(Pg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});n9.displayName=KOe;var r9="MenuRadioGroup",[XOe,ZOe]=Tl(r9,{value:void 0,onValueChange:()=>{}}),a9=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=tn(r);return o.jsx(XOe,{scope:e.__scopeMenu,value:n,onValueChange:i,children:o.jsx(kE,{...a,ref:t})})});a9.displayName=r9;var i9="MenuRadioItem",o9=y.forwardRef((e,t)=>{const{value:n,...r}=e,a=ZOe(i9,e.__scopeMenu),i=n===a.value;return o.jsx(s9,{scope:e.__scopeMenu,checked:i,children:o.jsx(Qy,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":RE(i),onSelect:Se(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});o9.displayName=i9;var PE="MenuItemIndicator",[s9,QOe]=Tl(PE,{checked:!1}),l9=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=QOe(PE,n);return o.jsx(Mn,{present:r||Pg(i.checked)||i.checked===!0,children:o.jsx(Me.span,{...a,ref:t,"data-state":RE(i.checked)})})});l9.displayName=PE;var JOe="MenuSeparator",c9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(Me.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});c9.displayName=JOe;var eCe="MenuArrow",u9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Qh(n);return o.jsx(Uy,{...a,...r,ref:t})});u9.displayName=eCe;var ME="MenuSub",[tCe,d9]=Tl(ME),f9=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=fs(ME,t),l=Qh(t),[u,d]=y.useState(null),[f,m]=y.useState(null),p=tn(a);return y.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),o.jsx(Uh,{...l,children:o.jsx(KH,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:o.jsx(tCe,{scope:t,contentId:qn(),triggerId:qn(),trigger:u,onTriggerChange:d,children:n})})})};f9.displayName=ME;var hf="MenuSubTrigger",h9=y.forwardRef((e,t)=>{const n=fs(hf,e.__scopeMenu),r=Jh(hf,e.__scopeMenu),a=d9(hf,e.__scopeMenu),i=AE(hf,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=y.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return y.useEffect(()=>m,[m]),y.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),o.jsx(CE,{asChild:!0,...f,children:o.jsx(t9,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":v9(n.open),...e,ref:Mr(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Se(e.onPointerMove,gh(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Se(e.onPointerLeave,gh(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const x=n.content?.dataset.side,j=x==="right",b=j?-5:5,w=g[j?"left":"right"],N=g[j?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+b,y:p.clientY},{x:w,y:g.top},{x:N,y:g.top},{x:N,y:g.bottom},{x:w,y:g.bottom}],side:x}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(p),p.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Se(e.onKeyDown,p=>{const g=i.searchRef.current!=="";e.disabled||g&&p.key===" "||$Oe[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});h9.displayName=hf;var m9="MenuSubContent",p9=y.forwardRef((e,t)=>{const n=ZH(Sa,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=fs(Sa,e.__scopeMenu),l=Jh(Sa,e.__scopeMenu),u=d9(m9,e.__scopeMenu),d=y.useRef(null),f=qe(t,d);return o.jsx(vh.Provider,{scope:e.__scopeMenu,children:o.jsx(Mn,{present:r||i.open,children:o.jsx(vh.Slot,{scope:e.__scopeMenu,children:o.jsx(TE,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{l.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Se(e.onFocusOutside,m=>{m.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Se(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:Se(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=IOe[l.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});p9.displayName=m9;function v9(e){return e?"open":"closed"}function Pg(e){return e==="indeterminate"}function RE(e){return Pg(e)?"indeterminate":e?"checked":"unchecked"}function nCe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rCe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function aCe(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=rCe(e,Math.max(i,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function iCe(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const u=t[i],d=t[l],f=u.x,m=u.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(a=!a)}return a}function oCe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return iCe(n,t)}function gh(e){return t=>t.pointerType==="mouse"?e(t):void 0}var sCe=XH,lCe=CE,cCe=QH,uCe=JH,dCe=kE,fCe=e9,hCe=Qy,mCe=n9,pCe=a9,vCe=o9,gCe=l9,yCe=c9,xCe=u9,bCe=f9,wCe=h9,jCe=p9,DE="ContextMenu",[SCe]=fr(DE,[GH]),mr=GH(),[_Ce,g9]=SCe(DE),y9=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:a,modal:i=!0}=e,[l,u]=y.useState(!1),d=mr(t),f=tn(r),m=y.useCallback(p=>{u(p),f(p)},[f]);return o.jsx(_Ce,{scope:t,open:l,onOpenChange:m,modal:i,children:o.jsx(sCe,{...d,dir:a,open:l,onOpenChange:m,modal:i,children:n})})};y9.displayName=DE;var x9="ContextMenuTrigger",b9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...a}=e,i=g9(x9,n),l=mr(n),u=y.useRef({x:0,y:0}),d=y.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),f=y.useRef(0),m=y.useCallback(()=>window.clearTimeout(f.current),[]),p=g=>{u.current={x:g.clientX,y:g.clientY},i.onOpenChange(!0)};return y.useEffect(()=>m,[m]),y.useEffect(()=>void(r&&m()),[r,m]),o.jsxs(o.Fragment,{children:[o.jsx(lCe,{...l,virtualRef:d}),o.jsx(Me.span,{"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,...a,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:Se(e.onContextMenu,g=>{m(),p(g),g.preventDefault()}),onPointerDown:r?e.onPointerDown:Se(e.onPointerDown,Yp(g=>{m(),f.current=window.setTimeout(()=>p(g),700)})),onPointerMove:r?e.onPointerMove:Se(e.onPointerMove,Yp(m)),onPointerCancel:r?e.onPointerCancel:Se(e.onPointerCancel,Yp(m)),onPointerUp:r?e.onPointerUp:Se(e.onPointerUp,Yp(m))})]})});b9.displayName=x9;var NCe="ContextMenuPortal",w9=e=>{const{__scopeContextMenu:t,...n}=e,r=mr(t);return o.jsx(cCe,{...r,...n})};w9.displayName=NCe;var j9="ContextMenuContent",S9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=g9(j9,n),i=mr(n),l=y.useRef(!1);return o.jsx(uCe,{...i,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),!u.defaultPrevented&&l.current&&u.preventDefault(),l.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),!u.defaultPrevented&&!a.modal&&(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});S9.displayName=j9;var OCe="ContextMenuGroup",CCe=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(dCe,{...a,...r,ref:t})});CCe.displayName=OCe;var ECe="ContextMenuLabel",_9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(fCe,{...a,...r,ref:t})});_9.displayName=ECe;var ACe="ContextMenuItem",N9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(hCe,{...a,...r,ref:t})});N9.displayName=ACe;var TCe="ContextMenuCheckboxItem",O9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(mCe,{...a,...r,ref:t})});O9.displayName=TCe;var kCe="ContextMenuRadioGroup",PCe=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(pCe,{...a,...r,ref:t})});PCe.displayName=kCe;var MCe="ContextMenuRadioItem",C9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(vCe,{...a,...r,ref:t})});C9.displayName=MCe;var RCe="ContextMenuItemIndicator",E9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(gCe,{...a,...r,ref:t})});E9.displayName=RCe;var DCe="ContextMenuSeparator",A9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(yCe,{...a,...r,ref:t})});A9.displayName=DCe;var $Ce="ContextMenuArrow",ICe=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(xCe,{...a,...r,ref:t})});ICe.displayName=$Ce;var T9="ContextMenuSub",k9=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:a,defaultOpen:i}=e,l=mr(t),[u,d]=_a({prop:a,defaultProp:i??!1,onChange:r,caller:T9});return o.jsx(bCe,{...l,open:u,onOpenChange:d,children:n})};k9.displayName=T9;var LCe="ContextMenuSubTrigger",P9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(wCe,{...a,...r,ref:t})});P9.displayName=LCe;var BCe="ContextMenuSubContent",M9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=mr(n);return o.jsx(jCe,{...a,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});M9.displayName=BCe;function Yp(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var zCe=y9,qCe=b9,FCe=w9,R9=S9,D9=_9,$9=N9,I9=O9,L9=C9,B9=E9,z9=A9,UCe=k9,q9=P9,F9=M9;const HCe=zCe,WCe=qCe,VCe=UCe,U9=y.forwardRef(({className:e,inset:t,children:n,...r},a)=>o.jsxs(q9,{ref:a,className:ue("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[n,o.jsx(HC,{className:"ml-auto h-4 w-4"})]}));U9.displayName=q9.displayName;const H9=y.forwardRef(({className:e,...t},n)=>o.jsx(F9,{ref:n,className:ue("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t}));H9.displayName=F9.displayName;const W9=y.forwardRef(({className:e,...t},n)=>o.jsx(FCe,{children:o.jsx(R9,{ref:n,className:ue("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t})}));W9.displayName=R9.displayName;const Ra=y.forwardRef(({className:e,inset:t,...n},r)=>o.jsx($9,{ref:r,className:ue("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Ra.displayName=$9.displayName;const GCe=y.forwardRef(({className:e,children:t,checked:n,...r},a)=>o.jsxs(I9,{ref:a,className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(B9,{children:o.jsx(tl,{className:"h-4 w-4"})})}),t]}));GCe.displayName=I9.displayName;const YCe=y.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(L9,{ref:r,className:ue("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(B9,{children:o.jsx(mve,{className:"h-2 w-2 fill-current"})})}),t]}));YCe.displayName=L9.displayName;const KCe=y.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(D9,{ref:r,className:ue("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));KCe.displayName=D9.displayName;const mf=y.forwardRef(({className:e,...t},n)=>o.jsx(z9,{ref:n,className:ue("-mx-1 my-1 h-px bg-border",e),...t}));mf.displayName=z9.displayName;const Rc=({className:e,...t})=>o.jsx("span",{className:ue("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Rc.displayName="ContextMenuShortcut";var XCe=Symbol("radix.slottable");function ZCe(e){const t=({children:n})=>o.jsx(o.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=XCe,t}var[Jy]=fr("Tooltip",[ss]),ex=ss(),V9="TooltipProvider",QCe=700,fO="tooltip.open",[JCe,$E]=Jy(V9),G9=e=>{const{__scopeTooltip:t,delayDuration:n=QCe,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,l=y.useRef(!0),u=y.useRef(!1),d=y.useRef(0);return y.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),o.jsx(JCe,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(f=>{u.current=f},[]),disableHoverableContent:a,children:i})};G9.displayName=V9;var yh="Tooltip",[eEe,em]=Jy(yh),Y9=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:l,delayDuration:u}=e,d=$E(yh,e.__scopeTooltip),f=ex(t),[m,p]=y.useState(null),g=qn(),x=y.useRef(0),j=l??d.disableHoverableContent,b=u??d.delayDuration,w=y.useRef(!1),[N,O]=_a({prop:r,defaultProp:a??!1,onChange:T=>{T?(d.onOpen(),document.dispatchEvent(new CustomEvent(fO))):d.onClose(),i?.(T)},caller:yh}),C=y.useMemo(()=>N?w.current?"delayed-open":"instant-open":"closed",[N]),A=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,w.current=!1,O(!0)},[O]),E=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,O(!1)},[O]),k=y.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{w.current=!0,O(!0),x.current=0},b)},[b,O]);return y.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),o.jsx(Uh,{...f,children:o.jsx(eEe,{scope:t,contentId:g,open:N,stateAttribute:C,trigger:m,onTriggerChange:p,onTriggerEnter:y.useCallback(()=>{d.isOpenDelayedRef.current?k():A()},[d.isOpenDelayedRef,k,A]),onTriggerLeave:y.useCallback(()=>{j?E():(window.clearTimeout(x.current),x.current=0)},[E,j]),onOpen:A,onClose:E,disableHoverableContent:j,children:n})})};Y9.displayName=yh;var hO="TooltipTrigger",K9=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=em(hO,n),i=$E(hO,n),l=ex(n),u=y.useRef(null),d=qe(t,u,a.onTriggerChange),f=y.useRef(!1),m=y.useRef(!1),p=y.useCallback(()=>f.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),o.jsx(Hh,{asChild:!0,...l,children:o.jsx(Me.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:d,onPointerMove:Se(e.onPointerMove,g=>{g.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:Se(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:Se(e.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Se(e.onFocus,()=>{f.current||a.onOpen()}),onBlur:Se(e.onBlur,a.onClose),onClick:Se(e.onClick,a.onClose)})})});K9.displayName=hO;var IE="TooltipPortal",[tEe,nEe]=Jy(IE,{forceMount:void 0}),X9=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,i=em(IE,t);return o.jsx(tEe,{scope:t,forceMount:n,children:o.jsx(Mn,{present:n||i.open,children:o.jsx(_l,{asChild:!0,container:a,children:r})})})};X9.displayName=IE;var ku="TooltipContent",Z9=y.forwardRef((e,t)=>{const n=nEe(ku,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,l=em(ku,e.__scopeTooltip);return o.jsx(Mn,{present:r||l.open,children:l.disableHoverableContent?o.jsx(Q9,{side:a,...i,ref:t}):o.jsx(rEe,{side:a,...i,ref:t})})}),rEe=y.forwardRef((e,t)=>{const n=em(ku,e.__scopeTooltip),r=$E(ku,e.__scopeTooltip),a=y.useRef(null),i=qe(t,a),[l,u]=y.useState(null),{trigger:d,onClose:f}=n,m=a.current,{onPointerInTransitChange:p}=r,g=y.useCallback(()=>{u(null),p(!1)},[p]),x=y.useCallback((j,b)=>{const w=j.currentTarget,N={x:j.clientX,y:j.clientY},O=lEe(N,w.getBoundingClientRect()),C=cEe(N,O),A=uEe(b.getBoundingClientRect()),E=fEe([...C,...A]);u(E),p(!0)},[p]);return y.useEffect(()=>()=>g(),[g]),y.useEffect(()=>{if(d&&m){const j=w=>x(w,m),b=w=>x(w,d);return d.addEventListener("pointerleave",j),m.addEventListener("pointerleave",b),()=>{d.removeEventListener("pointerleave",j),m.removeEventListener("pointerleave",b)}}},[d,m,x,g]),y.useEffect(()=>{if(l){const j=b=>{const w=b.target,N={x:b.clientX,y:b.clientY},O=d?.contains(w)||m?.contains(w),C=!dEe(N,l);O?g():C&&(g(),f())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[d,m,l,f,g]),o.jsx(Q9,{...e,ref:i})}),[aEe,iEe]=Jy(yh,{isInside:!1}),oEe=ZCe("TooltipContent"),Q9=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:l,...u}=e,d=em(ku,n),f=ex(n),{onClose:m}=d;return y.useEffect(()=>(document.addEventListener(fO,m),()=>document.removeEventListener(fO,m)),[m]),y.useEffect(()=>{if(d.trigger){const p=g=>{g.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,m]),o.jsx(Sl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:m,children:o.jsxs(Fy,{"data-state":d.stateAttribute,...f,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(oEe,{children:r}),o.jsx(aEe,{scope:n,isInside:!0,children:o.jsx(uwe,{id:d.contentId,role:"tooltip",children:a||r})})]})})});Z9.displayName=ku;var J9="TooltipArrow",sEe=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=ex(n);return iEe(J9,n).isInside?null:o.jsx(Uy,{...a,...r,ref:t})});sEe.displayName=J9;function lEe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function cEe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function uEe(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function dEe(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const u=t[i],d=t[l],f=u.x,m=u.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(a=!a)}return a}function fEe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),hEe(t)}function hEe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(a.y-l.y)>=(i.y-l.y)*(a.x-l.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(a.y-l.y)>=(i.y-l.y)*(a.x-l.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var mEe=G9,pEe=Y9,vEe=K9,gEe=X9,eW=Z9;const yEe=mEe,xEe=pEe,bEe=vEe,tW=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(gEe,{children:o.jsx(eW,{ref:r,sideOffset:t,className:ue("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));tW.displayName=eW.displayName;function wEe({children:e}){Hxe();const[t,n]=y.useState(!0),[r,a]=y.useState(!1),[i,l]=y.useState(!1),{theme:u,setTheme:d}=KC(),f=RY(),m=ia();y.useEffect(()=>{const b=w=>{(w.metaKey||w.ctrlKey)&&w.key==="k"&&(w.preventDefault(),l(!0))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]);const p=[{title:"概览",items:[{icon:wg,label:"首页",path:"/"}]},{title:"麦麦配置编辑",items:[{icon:WC,label:"麦麦主程序配置",path:"/config/bot"},{icon:Xq,label:"麦麦模型提供商配置",path:"/config/modelProvider"},{icon:Hq,label:"麦麦模型配置",path:"/config/model"}]},{title:"麦麦资源管理",items:[{icon:GC,label:"表情包管理",path:"/resource/emoji"},{icon:$h,label:"表达方式管理",path:"/resource/expression"},{icon:Wq,label:"人物信息管理",path:"/resource/person"}]},{title:"扩展与监控",items:[{icon:Yq,label:"插件市场",path:"/plugins"},{icon:xg,label:"日志查看器",path:"/logs"}]},{title:"系统",items:[{icon:Uc,label:"系统设置",path:"/settings"}]}],x=u==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":u,j=()=>{localStorage.removeItem("access-token"),m({to:"/auth"})};return o.jsx(yEe,{delayDuration:300,children:o.jsxs("div",{className:"flex h-screen overflow-hidden",children:[o.jsxs("aside",{className:ue("fixed inset-y-0 left-0 z-50 flex flex-col border-r bg-card transition-all duration-300 lg:relative lg:z-0","w-64 lg:w-auto",t?"lg:w-64":"lg:w-16",r?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:[o.jsx("div",{className:"flex h-16 items-center border-b px-4",children:o.jsxs("div",{className:ue("relative flex items-center justify-center flex-1 transition-all overflow-hidden","lg:flex-1",!t&&"lg:flex-none lg:w-8"),children:[o.jsxs("div",{className:ue("flex items-baseline gap-2",!t&&"lg:hidden"),children:[o.jsx("span",{className:"font-bold text-xl text-primary-gradient whitespace-nowrap",children:"MaiBot WebUI"}),o.jsx("span",{className:"text-xs text-primary/60 whitespace-nowrap",children:nye()})]}),!t&&o.jsx("span",{className:"hidden lg:block font-bold text-primary-gradient text-2xl",children:"M"})]})}),o.jsx("nav",{className:"flex-1 overflow-y-auto p-4",children:o.jsx("ul",{className:ue("space-y-6",!t&&"lg:space-y-3"),children:p.map((b,w)=>o.jsxs("li",{children:[o.jsx("div",{className:ue("px-3 h-[1.25rem]","mb-2",!t&&"lg:mb-1 lg:invisible"),children:o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground/60 whitespace-nowrap",children:b.title})}),!t&&w>0&&o.jsx("div",{className:"hidden lg:block mb-2 border-t border-border"}),o.jsx("ul",{className:"space-y-1",children:b.items.map(N=>{const O=f({to:N.path}),C=N.icon,A=o.jsxs(o.Fragment,{children:[O&&o.jsx("div",{className:"absolute left-0 top-1/2 h-8 w-1 -translate-y-1/2 rounded-r-full bg-primary transition-opacity duration-300"}),o.jsxs("div",{className:ue("flex items-center transition-all duration-300",t?"gap-3":"lg:gap-0"),children:[o.jsx(C,{className:ue("h-5 w-5 flex-shrink-0",O&&"text-primary"),strokeWidth:2,fill:"none"}),o.jsx("span",{className:ue("text-sm font-medium whitespace-nowrap transition-all duration-300",O&&"font-semibold",t?"opacity-100 max-w-[200px]":"lg:opacity-0 lg:max-w-0 lg:overflow-hidden"),children:N.label})]})]});return o.jsx("li",{className:"relative",children:o.jsxs(xEe,{children:[o.jsx(bEe,{asChild:!0,children:o.jsx(OO,{to:N.path,className:ue("relative flex items-center rounded-lg py-2 transition-all duration-300","hover:bg-accent hover:text-accent-foreground",O?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground",t?"px-3":"lg:px-0 lg:justify-center"),onClick:()=>a(!1),children:A})}),!t&&o.jsx(tW,{side:"right",className:"hidden lg:block",children:o.jsx("p",{children:N.label})})]})},N.path)})})]},b.title))})})]}),r&&o.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 lg:hidden",onClick:()=>a(!1)}),o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsxs("header",{className:"flex h-16 items-center justify-between border-b bg-card/80 backdrop-blur-md px-4 sticky top-0 z-10",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("button",{onClick:()=>a(!r),className:"rounded-lg p-2 hover:bg-accent lg:hidden",children:o.jsx(Bve,{className:"h-5 w-5"})}),o.jsx("button",{onClick:()=>n(!t),className:"hidden rounded-lg p-2 hover:bg-accent lg:block",title:t?"收起侧边栏":"展开侧边栏",children:o.jsx(UC,{className:ue("h-5 w-5 transition-transform",!t&&"rotate-180")})})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>l(!0),className:"relative hidden md:flex items-center w-64 h-9 pl-9 pr-16 bg-background/50 border rounded-md hover:bg-accent/50 transition-colors text-left",children:[o.jsx(Rr,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),o.jsx("span",{className:"text-sm text-muted-foreground",children:"搜索..."}),o.jsxs(WH,{size:"sm",className:"absolute right-2 top-1/2 -translate-y-1/2",children:[o.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),o.jsx(COe,{open:i,onOpenChange:l}),o.jsxs(fe,{variant:"ghost",size:"sm",onClick:()=>window.open("https://docs.mai-mai.org","_blank"),className:"gap-2",title:"查看麦麦文档",children:[o.jsx(Gpe,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"麦麦文档"})]}),o.jsx("button",{onClick:b=>{Lge(x==="dark"?"light":"dark",d,b)},className:"rounded-lg p-2 hover:bg-accent",title:x==="dark"?"切换到浅色模式":"切换到深色模式",children:x==="dark"?o.jsx(GN,{className:"h-5 w-5"}):o.jsx(VN,{className:"h-5 w-5"})}),o.jsx("div",{className:"h-6 w-px bg-border"}),o.jsxs(fe,{variant:"ghost",size:"sm",onClick:j,className:"gap-2",title:"登出系统",children:[o.jsx(B3,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline",children:"登出"})]})]})]}),o.jsxs(HCe,{children:[o.jsx(WCe,{asChild:!0,children:o.jsx("main",{className:"flex-1 overflow-hidden bg-background",children:e})}),o.jsxs(W9,{className:"w-64",children:[o.jsxs(Ra,{onClick:()=>m({to:"/"}),children:[o.jsx(wg,{className:"mr-2 h-4 w-4"}),"首页"]}),o.jsxs(Ra,{onClick:()=>m({to:"/settings"}),children:[o.jsx(Uc,{className:"mr-2 h-4 w-4"}),"系统设置"]}),o.jsxs(Ra,{onClick:()=>m({to:"/logs"}),children:[o.jsx(xg,{className:"mr-2 h-4 w-4"}),"日志查看器"]}),o.jsx(mf,{}),o.jsxs(VCe,{children:[o.jsxs(U9,{children:[o.jsx(Kq,{className:"mr-2 h-4 w-4"}),"切换主题"]}),o.jsxs(H9,{className:"w-48",children:[o.jsxs(Ra,{onClick:()=>d("light"),disabled:u==="light",children:[o.jsx(GN,{className:"mr-2 h-4 w-4"}),"浅色",u==="light"&&o.jsx(Rc,{children:"✓"})]}),o.jsxs(Ra,{onClick:()=>d("dark"),disabled:u==="dark",children:[o.jsx(VN,{className:"mr-2 h-4 w-4"}),"深色",u==="dark"&&o.jsx(Rc,{children:"✓"})]}),o.jsxs(Ra,{onClick:()=>d("system"),disabled:u==="system",children:[o.jsx(Uc,{className:"mr-2 h-4 w-4"}),"跟随系统",u==="system"&&o.jsx(Rc,{children:"✓"})]})]})]}),o.jsx(mf,{}),o.jsxs(Ra,{onClick:()=>window.location.reload(),children:[o.jsx(ege,{className:"mr-2 h-4 w-4"}),"刷新页面",o.jsx(Rc,{children:"⌘R"})]}),o.jsxs(Ra,{onClick:()=>l(!0),children:[o.jsx(Rr,{className:"mr-2 h-4 w-4"}),"搜索",o.jsx(Rc,{children:"⌘K"})]}),o.jsx(mf,{}),o.jsxs(Ra,{onClick:()=>window.open("https://docs.mai-mai.org","_blank"),children:[o.jsx(nv,{className:"mr-2 h-4 w-4"}),"麦麦文档"]}),o.jsx(mf,{}),o.jsxs(Ra,{onClick:j,className:"text-destructive focus:text-destructive",children:[o.jsx(B3,{className:"mr-2 h-4 w-4"}),"登出系统"]})]})]})]})]})})}const tm=NY({component:()=>o.jsxs(o.Fragment,{children:[o.jsx(CO,{}),!1]}),beforeLoad:()=>{if(window.location.pathname==="/"&&!l8())throw qL({to:"/auth"})}}),jEe=dr({getParentRoute:()=>tm,path:"/auth",component:Wxe}),SEe=dr({getParentRoute:()=>tm,path:"/setup",component:bbe}),Ea=dr({getParentRoute:()=>tm,id:"protected",component:()=>o.jsx(wEe,{children:o.jsx(CO,{})})}),_Ee=dr({getParentRoute:()=>Ea,path:"/",component:$ge}),NEe=dr({getParentRoute:()=>Ea,path:"/config/bot",component:cje}),OEe=dr({getParentRoute:()=>Ea,path:"/config/modelProvider",component:Aje}),CEe=dr({getParentRoute:()=>Ea,path:"/config/model",component:r1e}),EEe=dr({getParentRoute:()=>Ea,path:"/resource/emoji",component:d1e}),AEe=dr({getParentRoute:()=>Ea,path:"/resource/expression",component:b1e}),TEe=dr({getParentRoute:()=>Ea,path:"/resource/person",component:A1e}),kEe=dr({getParentRoute:()=>Ea,path:"/logs",component:uOe}),PEe=dr({getParentRoute:()=>Ea,path:"/plugins",component:SOe}),MEe=dr({getParentRoute:()=>Ea,path:"/plugin-mirrors",component:_Oe}),REe=dr({getParentRoute:()=>Ea,path:"/settings",component:Ixe}),DEe=dr({getParentRoute:()=>tm,path:"*",component:g8}),$Ee=tm.addChildren([jEe,SEe,Ea.addChildren([_Ee,NEe,OEe,CEe,EEe,AEe,TEe,PEe,MEe,kEe,REe]),DEe]),IEe=DY({routeTree:$Ee,defaultNotFoundComponent:g8});function LEe({children:e,defaultTheme:t="system",storageKey:n="ui-theme",...r}){const[a,i]=y.useState(()=>localStorage.getItem(n)||t);y.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),a==="system"){const d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(d);return}u.classList.add(a)},[a]),y.useEffect(()=>{const u=localStorage.getItem("accent-color");if(u){const d=document.documentElement,m={blue:{hsl:"221.2 83.2% 53.3%",darkHsl:"217.2 91.2% 59.8%"},purple:{hsl:"271 91% 65%",darkHsl:"270 95% 75%"},green:{hsl:"142 71% 45%",darkHsl:"142 76% 36%"},orange:{hsl:"25 95% 53%",darkHsl:"20 90% 48%"},pink:{hsl:"330 81% 60%",darkHsl:"330 85% 70%"}}[u];m&&d.style.setProperty("--primary",m.hsl)}},[]);const l={theme:a,setTheme:u=>{localStorage.setItem(n,u),i(u)}};return o.jsx(Jq.Provider,{...r,value:l,children:e})}function BEe({children:e,defaultEnabled:t=!0,defaultWavesEnabled:n=!0,storageKey:r="enable-animations",wavesStorageKey:a="enable-waves-background"}){const[i,l]=y.useState(()=>{const m=localStorage.getItem(r);return m!==null?m==="true":t}),[u,d]=y.useState(()=>{const m=localStorage.getItem(a);return m!==null?m==="true":n});y.useEffect(()=>{const m=document.documentElement;i?m.classList.remove("no-animations"):m.classList.add("no-animations"),localStorage.setItem(r,String(i))},[i,r]),y.useEffect(()=>{localStorage.setItem(a,String(u))},[u,a]);const f={enableAnimations:i,setEnableAnimations:l,enableWavesBackground:u,setEnableWavesBackground:d};return o.jsx(eF.Provider,{value:f,children:e})}var LE="ToastProvider",[BE,zEe,qEe]=_h("Toast"),[nW]=fr("Toast",[qEe]),[FEe,tx]=nW(LE),rW=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:l}=e,[u,d]=y.useState(null),[f,m]=y.useState(0),p=y.useRef(!1),g=y.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${LE}\`. Expected non-empty \`string\`.`),o.jsx(BE.Provider,{scope:t,children:o.jsx(FEe,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:i,toastCount:f,viewport:u,onViewportChange:d,onToastAdd:y.useCallback(()=>m(x=>x+1),[]),onToastRemove:y.useCallback(()=>m(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:g,children:l})})};rW.displayName=LE;var aW="ToastViewport",UEe=["F8"],mO="toast.viewportPause",pO="toast.viewportResume",iW=y.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=UEe,label:a="Notifications ({hotkey})",...i}=e,l=tx(aW,n),u=zEe(n),d=y.useRef(null),f=y.useRef(null),m=y.useRef(null),p=y.useRef(null),g=qe(t,p,l.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=l.toastCount>0;y.useEffect(()=>{const w=N=>{r.length!==0&&r.every(C=>N[C]||N.code===C)&&p.current?.focus()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),y.useEffect(()=>{const w=d.current,N=p.current;if(j&&w&&N){const O=()=>{if(!l.isClosePausedRef.current){const k=new CustomEvent(mO);N.dispatchEvent(k),l.isClosePausedRef.current=!0}},C=()=>{if(l.isClosePausedRef.current){const k=new CustomEvent(pO);N.dispatchEvent(k),l.isClosePausedRef.current=!1}},A=k=>{!w.contains(k.relatedTarget)&&C()},E=()=>{w.contains(document.activeElement)||C()};return w.addEventListener("focusin",O),w.addEventListener("focusout",A),w.addEventListener("pointermove",O),w.addEventListener("pointerleave",E),window.addEventListener("blur",O),window.addEventListener("focus",C),()=>{w.removeEventListener("focusin",O),w.removeEventListener("focusout",A),w.removeEventListener("pointermove",O),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",O),window.removeEventListener("focus",C)}}},[j,l.isClosePausedRef]);const b=y.useCallback(({tabbingDirection:w})=>{const O=u().map(C=>{const A=C.ref.current,E=[A,...nAe(A)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?O.reverse():O).flat()},[u]);return y.useEffect(()=>{const w=p.current;if(w){const N=O=>{const C=O.altKey||O.ctrlKey||O.metaKey;if(O.key==="Tab"&&!C){const E=document.activeElement,k=O.shiftKey;if(O.target===w&&k){f.current?.focus();return}const $=b({tabbingDirection:k?"backwards":"forwards"}),z=$.findIndex(D=>D===E);o_($.slice(z+1))?O.preventDefault():k?f.current?.focus():m.current?.focus()}};return w.addEventListener("keydown",N),()=>w.removeEventListener("keydown",N)}},[u,b]),o.jsxs(dye,{ref:d,role:"region","aria-label":a.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&o.jsx(vO,{ref:f,onFocusFromOutsideViewport:()=>{const w=b({tabbingDirection:"forwards"});o_(w)}}),o.jsx(BE.Slot,{scope:n,children:o.jsx(Me.ol,{tabIndex:-1,...i,ref:g})}),j&&o.jsx(vO,{ref:m,onFocusFromOutsideViewport:()=>{const w=b({tabbingDirection:"backwards"});o_(w)}})]})});iW.displayName=aW;var oW="ToastFocusProxy",vO=y.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,i=tx(oW,n);return o.jsx(Hy,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{const u=l.relatedTarget;!i.viewport?.contains(u)&&r()}})});vO.displayName=oW;var nm="Toast",HEe="toast.swipeStart",WEe="toast.swipeMove",VEe="toast.swipeCancel",GEe="toast.swipeEnd",sW=y.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:i,...l}=e,[u,d]=_a({prop:r,defaultProp:a??!0,onChange:i,caller:nm});return o.jsx(Mn,{present:n||u,children:o.jsx(XEe,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:tn(e.onPause),onResume:tn(e.onResume),onSwipeStart:Se(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Se(e.onSwipeMove,f=>{const{x:m,y:p}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:Se(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Se(e.onSwipeEnd,f=>{const{x:m,y:p}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),d(!1)})})})});sW.displayName=nm;var[YEe,KEe]=nW(nm,{onClose(){}}),XEe=y.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:i,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:m,onSwipeMove:p,onSwipeCancel:g,onSwipeEnd:x,...j}=e,b=tx(nm,n),[w,N]=y.useState(null),O=qe(t,H=>N(H)),C=y.useRef(null),A=y.useRef(null),E=a||b.duration,k=y.useRef(0),T=y.useRef(E),P=y.useRef(0),{onToastAdd:$,onToastRemove:z}=b,D=tn(()=>{w?.contains(document.activeElement)&&b.viewport?.focus(),l()}),U=y.useCallback(H=>{!H||H===1/0||(window.clearTimeout(P.current),k.current=new Date().getTime(),P.current=window.setTimeout(D,H))},[D]);y.useEffect(()=>{const H=b.viewport;if(H){const G=()=>{U(T.current),f?.()},L=()=>{const R=new Date().getTime()-k.current;T.current=T.current-R,window.clearTimeout(P.current),d?.()};return H.addEventListener(mO,L),H.addEventListener(pO,G),()=>{H.removeEventListener(mO,L),H.removeEventListener(pO,G)}}},[b.viewport,E,d,f,U]),y.useEffect(()=>{i&&!b.isClosePausedRef.current&&U(E)},[i,E,b.isClosePausedRef,U]),y.useEffect(()=>($(),()=>z()),[$,z]);const V=y.useMemo(()=>w?mW(w):null,[w]);return b.viewport?o.jsxs(o.Fragment,{children:[V&&o.jsx(ZEe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:V}),o.jsx(YEe,{scope:n,onClose:D,children:gl.createPortal(o.jsx(BE.ItemSlot,{scope:n,children:o.jsx(uye,{asChild:!0,onEscapeKeyDown:Se(u,()=>{b.isFocusedToastEscapeKeyDownRef.current||D(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(Me.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":b.swipeDirection,...j,ref:O,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Se(e.onKeyDown,H=>{H.key==="Escape"&&(u?.(H.nativeEvent),H.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:Se(e.onPointerDown,H=>{H.button===0&&(C.current={x:H.clientX,y:H.clientY})}),onPointerMove:Se(e.onPointerMove,H=>{if(!C.current)return;const G=H.clientX-C.current.x,L=H.clientY-C.current.y,R=!!A.current,F=["left","right"].includes(b.swipeDirection),K=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,te=F?K(0,G):0,I=F?0:K(0,L),B=H.pointerType==="touch"?10:2,Y={x:te,y:I},ne={originalEvent:H,delta:Y};R?(A.current=Y,Kp(WEe,p,ne,{discrete:!1})):$L(Y,b.swipeDirection,B)?(A.current=Y,Kp(HEe,m,ne,{discrete:!1}),H.target.setPointerCapture(H.pointerId)):(Math.abs(G)>B||Math.abs(L)>B)&&(C.current=null)}),onPointerUp:Se(e.onPointerUp,H=>{const G=A.current,L=H.target;if(L.hasPointerCapture(H.pointerId)&&L.releasePointerCapture(H.pointerId),A.current=null,C.current=null,G){const R=H.currentTarget,F={originalEvent:H,delta:G};$L(G,b.swipeDirection,b.swipeThreshold)?Kp(GEe,x,F,{discrete:!0}):Kp(VEe,g,F,{discrete:!0}),R.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),ZEe=e=>{const{__scopeToast:t,children:n,...r}=e,a=tx(nm,t),[i,l]=y.useState(!1),[u,d]=y.useState(!1);return eAe(()=>l(!0)),y.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:o.jsx(_l,{asChild:!0,children:o.jsx(Hy,{...r,children:i&&o.jsxs(o.Fragment,{children:[a.label," ",n]})})})},QEe="ToastTitle",lW=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return o.jsx(Me.div,{...r,ref:t})});lW.displayName=QEe;var JEe="ToastDescription",cW=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return o.jsx(Me.div,{...r,ref:t})});cW.displayName=JEe;var uW="ToastAction",dW=y.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?o.jsx(hW,{altText:n,asChild:!0,children:o.jsx(zE,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${uW}\`. Expected non-empty \`string\`.`),null)});dW.displayName=uW;var fW="ToastClose",zE=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=KEe(fW,n);return o.jsx(hW,{asChild:!0,children:o.jsx(Me.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,a.onClose)})})});zE.displayName=fW;var hW=y.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return o.jsx(Me.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function mW(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),tAe(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...mW(r))}}),t}function Kp(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?MO(a,i):a.dispatchEvent(i)}var $L=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),i=r>a;return t==="left"||t==="right"?i&&r>n:!i&&a>n};function eAe(e=()=>{}){const t=tn(e);Fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function tAe(e){return e.nodeType===e.ELEMENT_NODE}function nAe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function o_(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var rAe=rW,pW=iW,vW=sW,gW=lW,yW=cW,xW=dW,bW=zE;const aAe=rAe,wW=y.forwardRef(({className:e,...t},n)=>o.jsx(pW,{ref:n,className:ue("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));wW.displayName=pW.displayName;const iAe=Bh("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),jW=y.forwardRef(({className:e,variant:t,...n},r)=>o.jsx(vW,{ref:r,className:ue(iAe({variant:t}),e),...n}));jW.displayName=vW.displayName;const oAe=y.forwardRef(({className:e,...t},n)=>o.jsx(xW,{ref:n,className:ue("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));oAe.displayName=xW.displayName;const SW=y.forwardRef(({className:e,...t},n)=>o.jsx(bW,{ref:n,className:ue("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:o.jsx(Ih,{className:"h-4 w-4"})}));SW.displayName=bW.displayName;const _W=y.forwardRef(({className:e,...t},n)=>o.jsx(gW,{ref:n,className:ue("text-sm font-semibold [&+div]:text-xs",e),...t}));_W.displayName=gW.displayName;const NW=y.forwardRef(({className:e,...t},n)=>o.jsx(yW,{ref:n,className:ue("text-sm opacity-90",e),...t}));NW.displayName=yW.displayName;function sAe(){const{toasts:e}=hr();return o.jsxs(aAe,{children:[e.map(function({id:t,title:n,description:r,action:a,...i}){return o.jsxs(jW,{...i,children:[o.jsxs("div",{className:"grid gap-1",children:[n&&o.jsx(_W,{children:n}),r&&o.jsx(NW,{children:r})]}),a,o.jsx(SW,{})]},t)}),o.jsx(wW,{})]})}GV.createRoot(document.getElementById("root")).render(o.jsx(y.StrictMode,{children:o.jsx(LEe,{defaultTheme:"system",children:o.jsxs(BEe,{children:[o.jsx(LY,{router:IEe}),o.jsx(sAe,{})]})})}));
|