mirror of https://github.com/Mai-with-u/MaiBot.git
158 lines
1.3 MiB
158 lines
1.3 MiB
function BV(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 o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{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 o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var yp=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 x0={exports:{}},Fd={};var Ik;function zV(){if(Ik)return Fd;Ik=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Fd.Fragment=t,Fd.jsx=n,Fd.jsxs=n,Fd}var Lk;function qV(){return Lk||(Lk=1,x0.exports=zV()),x0.exports}var i=qV(),b0={exports:{}},Ve={};var Bk;function FV(){if(Bk)return Ve;Bk=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"),o=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},M=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)!M.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:o,_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)M.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 zk;function bh(){return zk||(zk=1,b0.exports=FV()),b0.exports}var y=bh();const W=St(y),yO=BV({__proto__:null,default:W},[y]);var w0={exports:{}},Ud={},j0={exports:{}},S0={};var qk;function UV(){return qk||(qk=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 o=performance;e.unstable_now=function(){return o.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,M=5,$=-1;function z(){return w?!0:!(e.unstable_now()-$<M)}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"):M=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}}}})(S0)),S0}var Fk;function HV(){return Fk||(Fk=1,j0.exports=UV()),j0.exports}var _0={exports:{}},ir={};var Uk;function WV(){if(Uk)return ir;Uk=1;var e=bh();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 o(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 ir.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ir.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 o(d,f,null,m)},ir.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()}},ir.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))},ir.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},ir.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})}},ir.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)},ir.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})}},ir.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)},ir.requestFormReset=function(d){r.d.r(d)},ir.unstable_batchedUpdates=function(d,f){return d(f)},ir.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},ir.useFormStatus=function(){return l.H.useHostTransitionStatus()},ir.version="19.2.0",ir}var Hk;function LL(){if(Hk)return _0.exports;Hk=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(),_0.exports=WV(),_0.exports}var Wk;function VV(){if(Wk)return Ud;Wk=1;var e=HV(),t=bh(),n=LL();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 o(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(o(s)!==s)throw Error(r(188))}function f(s){var c=s.alternate;if(!c){if(c=o(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 P=!1,q=S.child;q;){if(q===h){P=!0,h=S,v=_;break}if(q===v){P=!0,v=S,h=_;break}q=q.sibling}if(!P){for(q=_.child;q;){if(q===h){P=!0,h=_,v=S;break}if(q===v){P=!0,v=_,h=S;break}q=q.sibling}if(!P)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"),M=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 M: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)?ok(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=ok(c),s=sk(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=sk(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),Ld._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(),P=_[0],q=_[1];if(P&&q){var X=P.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 On=Object.prototype.hasOwnProperty,vr=e.unstable_scheduleCallback,rr=e.unstable_cancelCallback,gr=e.unstable_shouldYield,lt=e.unstable_requestPaint,rt=e.unstable_now,$n=e.unstable_getCurrentPriorityLevel,ms=e.unstable_ImmediatePriority,am=e.unstable_UserBlockingPriority,Ml=e.unstable_NormalPriority,rx=e.unstable_LowPriority,im=e.unstable_IdlePriority,ax=e.log,ix=e.unstable_setDisableYieldValue,ps=null,yr=null;function Ya(s){if(typeof ax=="function"&&ix(s),yr&&typeof yr.setStrictMode=="function")try{yr.setStrictMode(ps,s)}catch{}}var ar=Math.clz32?Math.clz32:Lt,ox=Math.log,et=Math.LN2;function Lt(s){return s>>>=0,s===0?32:31-(ox(s)/et|0)|0}var He=256,gt=262144,In=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,P=s.pingedLanes;s=s.warmLanes;var q=v&134217727;return q!==0?(v=q&~_,v!==0?S=tt(v):(P&=q,P!==0?S=tt(P):h||(h=q&~s,h!==0&&(S=tt(h))))):(q=v&~_,q!==0?S=tt(q):P!==0?S=tt(P):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 vs(s,c){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function sx(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 Rl(){var s=In;return In<<=1,(In&62914560)===0&&(In=4194304),s}function gs(s){for(var c=[],h=0;31>h;h++)c.push(s);return c}function Qu(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function CW(s,c,h,v,S,_){var P=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=P&~h;0<h;){var ge=31-ar(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&&FE(s,v,0),_!==0&&S===0&&s.tag!==0&&(s.suspendedLanes|=_&~(P&~c))}function FE(s,c,h){s.pendingLanes|=c,s.suspendedLanes&=~c;var v=31-ar(c);s.entangledLanes|=c,s.entanglements[v]=s.entanglements[v]|1073741824|h&261930}function UE(s,c){var h=s.entangledLanes|=c;for(s=s.entanglements;h;){var v=31-ar(h),S=1<<v;S&c|s[v]&c&&(s[v]|=c),h&=~S}}function HE(s,c){var h=c&-c;return h=(h&42)!==0?1:lx(h),(h&(s.suspendedLanes|c))!==0?0:h}function lx(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 cx(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function WE(){var s=R.p;return s!==0?s:(s=window.event,s===void 0?32:Tk(s.type))}function VE(s,c){var h=R.p;try{return R.p=s,c()}finally{R.p=h}}var mo=Math.random().toString(36).slice(2),Yn="__reactFiber$"+mo,_r="__reactProps$"+mo,Dl="__reactContainer$"+mo,ux="__reactEvents$"+mo,EW="__reactListeners$"+mo,AW="__reactHandles$"+mo,GE="__reactResources$"+mo,Ju="__reactMarker$"+mo;function dx(s){delete s[Yn],delete s[_r],delete s[ux],delete s[EW],delete s[AW]}function $l(s){var c=s[Yn];if(c)return c;for(var h=s.parentNode;h;){if(c=h[Dl]||h[Yn]){if(h=c.alternate,c.child!==null||h!==null&&h.child!==null)for(s=mk(s);s!==null;){if(h=s[Yn])return h;s=mk(s)}return c}s=h,h=s.parentNode}return null}function Il(s){if(s=s[Yn]||s[Dl]){var c=s.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return s}return null}function ed(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s.stateNode;throw Error(r(33))}function Ll(s){var c=s[GE];return c||(c=s[GE]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function Ln(s){s[Ju]=!0}var YE=new Set,KE={};function ys(s,c){Bl(s,c),Bl(s+"Capture",c)}function Bl(s,c){for(KE[s]=c,s=0;s<c.length;s++)YE.add(c[s])}var TW=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]*$"),XE={},ZE={};function kW(s){return On.call(ZE,s)?!0:On.call(XE,s)?!1:TW.test(s)?ZE[s]=!0:(XE[s]=!0,!1)}function om(s,c,h){if(kW(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 sm(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 Si(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 sa(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function QE(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function MW(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(P){h=""+P,_.call(this,P)}}),Object.defineProperty(s,c,{enumerable:v.enumerable}),{getValue:function(){return h},setValue:function(P){h=""+P},stopTracking:function(){s._valueTracker=null,delete s[c]}}}}function fx(s){if(!s._valueTracker){var c=QE(s)?"checked":"value";s._valueTracker=MW(s,c,""+s[c])}}function JE(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var h=c.getValue(),v="";return s&&(v=QE(s)?s.checked?"true":"false":s.value),s=v,s!==h?(c.setValue(s),!0):!1}function lm(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 la(s){return s.replace(PW,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function hx(s,c,h,v,S,_,P,q){s.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?s.type=P:s.removeAttribute("type"),c!=null?P==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+sa(c)):s.value!==""+sa(c)&&(s.value=""+sa(c)):P!=="submit"&&P!=="reset"||s.removeAttribute("value"),c!=null?mx(s,P,sa(c)):h!=null?mx(s,P,sa(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=""+sa(q):s.removeAttribute("name")}function eA(s,c,h,v,S,_,P,q){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(s.type=_),c!=null||h!=null){if(!(_!=="submit"&&_!=="reset"||c!=null)){fx(s);return}h=h!=null?""+sa(h):"",c=c!=null?""+sa(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,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(s.name=P),fx(s)}function mx(s,c,h){c==="number"&&lm(s.ownerDocument)===s||s.defaultValue===""+h||(s.defaultValue=""+h)}function zl(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=""+sa(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 tA(s,c,h){if(c!=null&&(c=""+sa(c),c!==s.value&&(s.value=c),h==null)){s.defaultValue!==c&&(s.defaultValue=c);return}s.defaultValue=h!=null?""+sa(h):""}function nA(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=sa(c),s.defaultValue=h,v=s.textContent,v===h&&v!==""&&v!==null&&(s.value=v),fx(s)}function ql(s,c){if(c){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=c;return}}s.textContent=c}var RW=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 rA(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||RW.has(c)?c==="float"?s.cssFloat=h:s[c]=(""+h).trim():s[c]=h+"px"}function aA(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&&rA(s,S,v)}else for(var _ in c)c.hasOwnProperty(_)&&rA(s,_,c[_])}function px(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 DW=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"]]),$W=/^[\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 cm(s){return $W.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function _i(){}var vx=null;function gx(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Fl=null,Ul=null;function iA(s){var c=Il(s);if(c&&(s=c.stateNode)){var h=s[_r]||null;e:switch(s=c.stateNode,c.type){case"input":if(hx(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="'+la(""+c)+'"][type="radio"]'),c=0;c<h.length;c++){var v=h[c];if(v!==s&&v.form===s.form){var S=v[_r]||null;if(!S)throw Error(r(90));hx(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&&JE(v)}break e;case"textarea":tA(s,h.value,h.defaultValue);break e;case"select":c=h.value,c!=null&&zl(s,!!h.multiple,c,!1)}}}var yx=!1;function oA(s,c,h){if(yx)return s(c,h);yx=!0;try{var v=s(c);return v}finally{if(yx=!1,(Fl!==null||Ul!==null)&&(Xm(),Fl&&(c=Fl,s=Ul,Ul=Fl=null,iA(c),s)))for(c=0;c<s.length;c++)iA(s[c])}}function td(s,c){var h=s.stateNode;if(h===null)return null;var v=h[_r]||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 Ni=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xx=!1;if(Ni)try{var nd={};Object.defineProperty(nd,"passive",{get:function(){xx=!0}}),window.addEventListener("test",nd,nd),window.removeEventListener("test",nd,nd)}catch{xx=!1}var po=null,bx=null,um=null;function sA(){if(um)return um;var s,c=bx,h=c.length,v,S="value"in po?po.value:po.textContent,_=S.length;for(s=0;s<h&&c[s]===S[s];s++);var P=h-s;for(v=1;v<=P&&c[h-v]===S[_-v];v++);return um=S.slice(s,1<v?1-v:void 0)}function dm(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 fm(){return!0}function lA(){return!1}function Nr(s){function c(h,v,S,_,P){this._reactName=h,this._targetInst=S,this.type=v,this.nativeEvent=_,this.target=P,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)?fm:lA,this.isPropagationStopped=lA,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=fm)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=fm)},persist:function(){},isPersistent:fm}),c}var xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hm=Nr(xs),rd=p({},xs,{view:0,detail:0}),IW=Nr(rd),wx,jx,ad,mm=p({},rd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_x,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!==ad&&(ad&&s.type==="mousemove"?(wx=s.screenX-ad.screenX,jx=s.screenY-ad.screenY):jx=wx=0,ad=s),wx)},movementY:function(s){return"movementY"in s?s.movementY:jx}}),cA=Nr(mm),LW=p({},mm,{dataTransfer:0}),BW=Nr(LW),zW=p({},rd,{relatedTarget:0}),Sx=Nr(zW),qW=p({},xs,{animationName:0,elapsedTime:0,pseudoElement:0}),FW=Nr(qW),UW=p({},xs,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),HW=Nr(UW),WW=p({},xs,{data:0}),uA=Nr(WW),VW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},GW={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"},YW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KW(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=YW[s])?!!c[s]:!1}function _x(){return KW}var XW=p({},rd,{key:function(s){if(s.key){var c=VW[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=dm(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?GW[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_x,charCode:function(s){return s.type==="keypress"?dm(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?dm(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),ZW=Nr(XW),QW=p({},mm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dA=Nr(QW),JW=p({},rd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_x}),e7=Nr(JW),t7=p({},xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),n7=Nr(t7),r7=p({},mm,{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}),a7=Nr(r7),i7=p({},xs,{newState:0,oldState:0}),o7=Nr(i7),s7=[9,13,27,32],Nx=Ni&&"CompositionEvent"in window,id=null;Ni&&"documentMode"in document&&(id=document.documentMode);var l7=Ni&&"TextEvent"in window&&!id,fA=Ni&&(!Nx||id&&8<id&&11>=id),hA=" ",mA=!1;function pA(s,c){switch(s){case"keyup":return s7.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Hl=!1;function c7(s,c){switch(s){case"compositionend":return vA(c);case"keypress":return c.which!==32?null:(mA=!0,hA);case"textInput":return s=c.data,s===hA&&mA?null:s;default:return null}}function u7(s,c){if(Hl)return s==="compositionend"||!Nx&&pA(s,c)?(s=sA(),um=bx=po=null,Hl=!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 fA&&c.locale!=="ko"?null:c.data;default:return null}}var d7={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 gA(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!d7[s.type]:c==="textarea"}function yA(s,c,h,v){Fl?Ul?Ul.push(v):Ul=[v]:Fl=v,c=rp(c,"onChange"),0<c.length&&(h=new hm("onChange","change",null,h,v),s.push({event:h,listeners:c}))}var od=null,sd=null;function f7(s){ek(s,0)}function pm(s){var c=ed(s);if(JE(c))return s}function xA(s,c){if(s==="change")return c}var bA=!1;if(Ni){var Ox;if(Ni){var Cx="oninput"in document;if(!Cx){var wA=document.createElement("div");wA.setAttribute("oninput","return;"),Cx=typeof wA.oninput=="function"}Ox=Cx}else Ox=!1;bA=Ox&&(!document.documentMode||9<document.documentMode)}function jA(){od&&(od.detachEvent("onpropertychange",SA),sd=od=null)}function SA(s){if(s.propertyName==="value"&&pm(sd)){var c=[];yA(c,sd,s,gx(s)),oA(f7,c)}}function h7(s,c,h){s==="focusin"?(jA(),od=c,sd=h,od.attachEvent("onpropertychange",SA)):s==="focusout"&&jA()}function m7(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return pm(sd)}function p7(s,c){if(s==="click")return pm(c)}function v7(s,c){if(s==="input"||s==="change")return pm(c)}function g7(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var zr=typeof Object.is=="function"?Object.is:g7;function ld(s,c){if(zr(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(!On.call(c,S)||!zr(s[S],c[S]))return!1}return!0}function _A(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function NA(s,c){var h=_A(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=_A(h)}}function OA(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?OA(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function CA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=lm(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=lm(s.document)}return c}function Ex(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 y7=Ni&&"documentMode"in document&&11>=document.documentMode,Wl=null,Ax=null,cd=null,Tx=!1;function EA(s,c,h){var v=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Tx||Wl==null||Wl!==lm(v)||(v=Wl,"selectionStart"in v&&Ex(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}),cd&&ld(cd,v)||(cd=v,v=rp(Ax,"onSelect"),0<v.length&&(c=new hm("onSelect","select",null,c,h),s.push({event:c,listeners:v}),c.target=Wl)))}function bs(s,c){var h={};return h[s.toLowerCase()]=c.toLowerCase(),h["Webkit"+s]="webkit"+c,h["Moz"+s]="moz"+c,h}var Vl={animationend:bs("Animation","AnimationEnd"),animationiteration:bs("Animation","AnimationIteration"),animationstart:bs("Animation","AnimationStart"),transitionrun:bs("Transition","TransitionRun"),transitionstart:bs("Transition","TransitionStart"),transitioncancel:bs("Transition","TransitionCancel"),transitionend:bs("Transition","TransitionEnd")},kx={},AA={};Ni&&(AA=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function ws(s){if(kx[s])return kx[s];if(!Vl[s])return s;var c=Vl[s],h;for(h in c)if(c.hasOwnProperty(h)&&h in AA)return kx[s]=c[h];return s}var TA=ws("animationend"),kA=ws("animationiteration"),MA=ws("animationstart"),x7=ws("transitionrun"),b7=ws("transitionstart"),w7=ws("transitioncancel"),PA=ws("transitionend"),RA=new Map,Mx="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(" ");Mx.push("scrollEnd");function Ta(s,c){RA.set(s,c),ys(c,[s])}var vm=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)},ca=[],Gl=0,Px=0;function gm(){for(var s=Gl,c=Px=Gl=0;c<s;){var h=ca[c];ca[c++]=null;var v=ca[c];ca[c++]=null;var S=ca[c];ca[c++]=null;var _=ca[c];if(ca[c++]=null,v!==null&&S!==null){var P=v.pending;P===null?S.next=S:(S.next=P.next,P.next=S),v.pending=S}_!==0&&DA(h,S,_)}}function ym(s,c,h,v){ca[Gl++]=s,ca[Gl++]=c,ca[Gl++]=h,ca[Gl++]=v,Px|=v,s.lanes|=v,s=s.alternate,s!==null&&(s.lanes|=v)}function Rx(s,c,h,v){return ym(s,c,h,v),xm(s)}function js(s,c){return ym(s,null,null,c),xm(s)}function DA(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-ar(h),s=_.hiddenUpdates,v=s[S],v===null?s[S]=[c]:v.push(c),c.lane=h|536870912),_):null}function xm(s){if(50<kd)throw kd=0,Ub=null,Error(r(185));for(var c=s.return;c!==null;)s=c,c=s.return;return s.tag===3?s.stateNode:null}var Yl={};function j7(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 qr(s,c,h,v){return new j7(s,c,h,v)}function Dx(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Oi(s,c){var h=s.alternate;return h===null?(h=qr(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 $A(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 bm(s,c,h,v,S,_){var P=0;if(v=s,typeof s=="function")Dx(s)&&(P=1);else if(typeof s=="string")P=CV(s,h,ne.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case $:return s=qr(31,h,c,S),s.elementType=$,s.lanes=_,s;case b:return Ss(h.children,S,_,c);case w:P=8,S|=24;break;case N:return s=qr(12,h,c,S|2),s.elementType=N,s.lanes=_,s;case E:return s=qr(13,h,c,S),s.elementType=E,s.lanes=_,s;case k:return s=qr(19,h,c,S),s.elementType=k,s.lanes=_,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case C:P=10;break e;case O:P=9;break e;case A:P=11;break e;case T:P=14;break e;case M:P=16,v=null;break e}P=29,h=Error(r(130,s===null?"null":typeof s,"")),v=null}return c=qr(P,h,c,S),c.elementType=s,c.type=v,c.lanes=_,c}function Ss(s,c,h,v){return s=qr(7,s,v,c),s.lanes=h,s}function $x(s,c,h){return s=qr(6,s,null,c),s.lanes=h,s}function IA(s){var c=qr(18,null,null,0);return c.stateNode=s,c}function Ix(s,c,h){return c=qr(4,s.children!==null?s.children:[],s.key,c),c.lanes=h,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}var LA=new WeakMap;function ua(s,c){if(typeof s=="object"&&s!==null){var h=LA.get(s);return h!==void 0?h:(c={value:s,source:c,stack:Dt(c)},LA.set(s,c),c)}return{value:s,source:c,stack:Dt(c)}}var Kl=[],Xl=0,wm=null,ud=0,da=[],fa=0,vo=null,Ka=1,Xa="";function Ci(s,c){Kl[Xl++]=ud,Kl[Xl++]=wm,wm=s,ud=c}function BA(s,c,h){da[fa++]=Ka,da[fa++]=Xa,da[fa++]=vo,vo=s;var v=Ka;s=Xa;var S=32-ar(v)-1;v&=~(1<<S),h+=1;var _=32-ar(c)+S;if(30<_){var P=S-S%5;_=(v&(1<<P)-1).toString(32),v>>=P,S-=P,Ka=1<<32-ar(c)+S|h<<S|v,Xa=_+s}else Ka=1<<_|h<<S|v,Xa=s}function Lx(s){s.return!==null&&(Ci(s,1),BA(s,1,0))}function Bx(s){for(;s===wm;)wm=Kl[--Xl],Kl[Xl]=null,ud=Kl[--Xl],Kl[Xl]=null;for(;s===vo;)vo=da[--fa],da[fa]=null,Xa=da[--fa],da[fa]=null,Ka=da[--fa],da[fa]=null}function zA(s,c){da[fa++]=Ka,da[fa++]=Xa,da[fa++]=vo,Ka=c.id,Xa=c.overflow,vo=s}var Kn=null,Ht=null,ft=!1,go=null,ha=!1,zx=Error(r(519));function yo(s){var c=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dd(ua(c,s)),zx}function qA(s){var c=s.stateNode,h=s.type,v=s.memoizedProps;switch(c[Yn]=s,c[_r]=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),eA(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),nA(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||ak(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=_i),c=!0):c=!1,c||yo(s,!0)}function FA(s){for(Kn=s.return;Kn;)switch(Kn.tag){case 5:case 31:case 13:ha=!1;return;case 27:case 3:ha=!0;return;default:Kn=Kn.return}}function Zl(s){if(s!==Kn)return!1;if(!ft)return FA(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")||a0(s.type,s.memoizedProps)),h=!h),h&&Ht&&yo(s),FA(s),c===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Ht=hk(s)}else if(c===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Ht=hk(s)}else c===27?(c=Ht,Mo(s.type)?(s=c0,c0=null,Ht=s):Ht=c):Ht=Kn?pa(s.stateNode.nextSibling):null;return!0}function _s(){Ht=Kn=null,ft=!1}function qx(){var s=go;return s!==null&&(Ar===null?Ar=s:Ar.push.apply(Ar,s),go=null),s}function dd(s){go===null?go=[s]:go.push(s)}var Fx=I(null),Ns=null,Ei=null;function xo(s,c,h){Y(Fx,c._currentValue),c._currentValue=h}function Ai(s){s._currentValue=Fx.current,B(Fx)}function Ux(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 Hx(s,c,h,v){var S=s.child;for(S!==null&&(S.return=s);S!==null;){var _=S.dependencies;if(_!==null){var P=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),Ux(_.return,h,s),v||(P=null);break e}_=q.next}}else if(S.tag===18){if(P=S.return,P===null)throw Error(r(341));P.lanes|=h,_=P.alternate,_!==null&&(_.lanes|=h),Ux(P,h,s),P=null}else P=S.child;if(P!==null)P.return=S;else for(P=S;P!==null;){if(P===s){P=null;break}if(S=P.sibling,S!==null){S.return=P.return,P=S;break}P=P.return}S=P}}function Ql(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 P=S.alternate;if(P===null)throw Error(r(387));if(P=P.memoizedProps,P!==null){var q=S.type;zr(S.pendingProps.value,P.value)||(s!==null?s.push(q):s=[q])}}else if(S===ee.current){if(P=S.alternate,P===null)throw Error(r(387));P.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(s!==null?s.push(Ld):s=[Ld])}S=S.return}s!==null&&Hx(c,s,h,v),c.flags|=262144}function jm(s){for(s=s.firstContext;s!==null;){if(!zr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Os(s){Ns=s,Ei=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Xn(s){return UA(Ns,s)}function Sm(s,c){return Ns===null&&Os(s),UA(s,c)}function UA(s,c){var h=c._currentValue;if(c={context:c,memoizedValue:h,next:null},Ei===null){if(s===null)throw Error(r(308));Ei=c,s.dependencies={lanes:0,firstContext:c},s.flags|=524288}else Ei=Ei.next=c;return h}var S7=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()})}},_7=e.unstable_scheduleCallback,N7=e.unstable_NormalPriority,dn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wx(){return{controller:new S7,data:new Map,refCount:0}}function fd(s){s.refCount--,s.refCount===0&&_7(N7,function(){s.controller.abort()})}var hd=null,Vx=0,Jl=0,ec=null;function O7(s,c){if(hd===null){var h=hd=[];Vx=0,Jl=Kb(),ec={status:"pending",value:void 0,then:function(v){h.push(v)}}}return Vx++,c.then(HA,HA),c}function HA(){if(--Vx===0&&hd!==null){ec!==null&&(ec.status="fulfilled");var s=hd;hd=null,Jl=0,ec=null;for(var c=0;c<s.length;c++)(0,s[c])()}}function C7(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 WA=L.S;L.S=function(s,c){E2=rt(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&O7(s,c),WA!==null&&WA(s,c)};var Cs=I(null);function Gx(){var s=Cs.current;return s!==null?s:$t.pooledCache}function _m(s,c){c===null?Y(Cs,Cs.current):Y(Cs,c.pool)}function VA(){var s=Gx();return s===null?null:{parent:dn._currentValue,pool:s}}var tc=Error(r(460)),Yx=Error(r(474)),Nm=Error(r(542)),Om={then:function(){}};function GA(s){return s=s.status,s==="fulfilled"||s==="rejected"}function YA(s,c,h){switch(h=s[h],h===void 0?s.push(c):h!==c&&(c.then(_i,_i),c=h),c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,XA(s),s;default:if(typeof c.status=="string")c.then(_i,_i);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,XA(s),s}throw As=c,tc}}function Es(s){try{var c=s._init;return c(s._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(As=h,tc):h}}var As=null;function KA(){if(As===null)throw Error(r(459));var s=As;return As=null,s}function XA(s){if(s===tc||s===Nm)throw Error(r(483))}var nc=null,md=0;function Cm(s){var c=md;return md+=1,nc===null&&(nc=[]),YA(nc,s,c)}function pd(s,c){c=c.props.ref,s.ref=c!==void 0?c:null}function Em(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 ZA(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=Oi(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 P(re){return s&&re.alternate===null&&(re.flags|=67108866),re}function q(re,Q,ie,be){return Q===null||Q.tag!==6?(Q=$x(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===M&&Es(Ie)===Q.type)?(Q=S(Q,ie.props),pd(Q,ie),Q.return=re,Q):(Q=bm(ie.type,ie.key,ie.props,null,re.mode,be),pd(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=Ix(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=Ss(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=$x(""+Q,re.mode,ie),Q.return=re,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return ie=bm(Q.type,Q.key,Q.props,null,re.mode,ie),pd(ie,Q),ie.return=re,ie;case j:return Q=Ix(Q,re.mode,ie),Q.return=re,Q;case M:return Q=Es(Q),we(re,Q,ie)}if(G(Q)||U(Q))return Q=Ss(Q,re.mode,ie,null),Q.return=re,Q;if(typeof Q.then=="function")return we(re,Cm(Q),ie);if(Q.$$typeof===C)return we(re,Sm(re,Q),ie);Em(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 M:return ie=Es(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,Cm(ie),be);if(ie.$$typeof===C)return ce(re,Q,Sm(re,ie),be);Em(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 M:return be=Es(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,Cm(be),Ie);if(be.$$typeof===C)return he(re,Q,ie,Sm(Q,be),Ie);Em(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&&Ci(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&&Ci(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(Io){return c(re,Io)}),ft&&Ci(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 Io=ce(re,De,mt.value,be);if(Io===null){De===null&&(De=ut);break}s&&De&&Io.alternate===null&&c(re,De),Q=_(Io,Q,Qe),ht===null?Ie=Io:ht.sibling=Io,ht=Io,De=ut}if(mt.done)return h(re,De),ft&&Ci(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&&Ci(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(LV){return c(re,LV)}),ft&&Ci(re,Qe),Ie}function Mt(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===M&&Es(Ie)===Q.type){h(re,Q.sibling),be=S(Q,ie.props),pd(be,ie),be.return=re,re=be;break e}h(re,Q);break}else c(re,Q);Q=Q.sibling}ie.type===b?(be=Ss(ie.props.children,re.mode,be,ie.key),be.return=re,re=be):(be=bm(ie.type,ie.key,ie.props,null,re.mode,be),pd(be,ie),be.return=re,re=be)}return P(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=Ix(ie,re.mode,be),be.return=re,re=be}return P(re);case M:return ie=Es(ie),Mt(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 Mt(re,Q,Cm(ie),be);if(ie.$$typeof===C)return Mt(re,Q,Sm(re,ie),be);Em(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=$x(ie,re.mode,be),be.return=re,re=be),P(re)):h(re,Q)}return function(re,Q,ie,be){try{md=0;var Ie=Mt(re,Q,ie,be);return nc=null,Ie}catch(De){if(De===tc||De===Nm)throw De;var ht=qr(29,De,null,re.mode);return ht.lanes=be,ht.return=re,ht}finally{}}}var Ts=ZA(!0),QA=ZA(!1),bo=!1;function Kx(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xx(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 wo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function jo(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=xm(s),DA(s,null,h),c}return ym(s,v,c,h),xm(s)}function vd(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,UE(s,h)}}function Zx(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 P={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};_===null?S=_=P:_=_.next=P,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 Qx=!1;function gd(){if(Qx){var s=ec;if(s!==null)throw s}}function yd(s,c,h,v){Qx=!1;var S=s.updateQueue;bo=!1;var _=S.firstBaseUpdate,P=S.lastBaseUpdate,q=S.shared.pending;if(q!==null){S.shared.pending=null;var X=q,se=X.next;X.next=null,P===null?_=se:P.next=se,P=X;var ge=s.alternate;ge!==null&&(ge=ge.updateQueue,q=ge.lastBaseUpdate,q!==P&&(q===null?ge.firstBaseUpdate=se:q.next=se,ge.lastBaseUpdate=X))}if(_!==null){var we=S.baseState;P=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===Jl&&(Qx=!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 Mt=h;switch(ze.tag){case 1:if(Ae=ze.payload,typeof Ae=="function"){we=Ae.call(Mt,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(Mt,we,ce):Ae,ce==null)break e;we=p({},we,ce);break e;case 2:bo=!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,P|=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),Co|=P,s.lanes=P,s.memoizedState=we}}function JA(s,c){if(typeof s!="function")throw Error(r(191,s));s.call(c)}function eT(s,c){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)JA(h[s],c)}var rc=I(null),Am=I(0);function tT(s,c){s=Li,Y(Am,s),Y(rc,c),Li=s|c.baseLanes}function Jx(){Y(Am,Li),Y(rc,rc.current)}function eb(){Li=Am.current,B(rc),B(Am)}var Fr=I(null),ma=null;function So(s){var c=s.alternate;Y(sn,sn.current&1),Y(Fr,s),ma===null&&(c===null||rc.current!==null||c.memoizedState!==null)&&(ma=s)}function tb(s){Y(sn,sn.current),Y(Fr,s),ma===null&&(ma=s)}function nT(s){s.tag===22?(Y(sn,sn.current),Y(Fr,s),ma===null&&(ma=s)):_o()}function _o(){Y(sn,sn.current),Y(Fr,Fr.current)}function Ur(s){B(Fr),ma===s&&(ma=null),B(sn)}var sn=I(0);function Tm(s){for(var c=s;c!==null;){if(c.tag===13){var h=c.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||s0(h)||l0(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 Ti=0,Ke=null,Tt=null,fn=null,km=!1,ac=!1,ks=!1,Mm=0,xd=0,ic=null,E7=0;function rn(){throw Error(r(321))}function nb(s,c){if(c===null)return!1;for(var h=0;h<c.length&&h<s.length;h++)if(!zr(s[h],c[h]))return!1;return!0}function rb(s,c,h,v,S,_){return Ti=_,Ke=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,L.H=s===null||s.memoizedState===null?BT:yb,ks=!1,_=h(v,S),ks=!1,ac&&(_=aT(c,h,v,S)),rT(s),_}function rT(s){L.H=jd;var c=Tt!==null&&Tt.next!==null;if(Ti=0,fn=Tt=Ke=null,km=!1,xd=0,ic=null,c)throw Error(r(300));s===null||hn||(s=s.dependencies,s!==null&&jm(s)&&(hn=!0))}function aT(s,c,h,v){Ke=s;var S=0;do{if(ac&&(ic=null),xd=0,ac=!1,25<=S)throw Error(r(301));if(S+=1,fn=Tt=null,s.updateQueue!=null){var _=s.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}L.H=zT,_=c(h,v)}while(ac);return _}function A7(){var s=L.H,c=s.useState()[0];return c=typeof c.then=="function"?bd(c):c,s=s.useState()[0],(Tt!==null?Tt.memoizedState:null)!==s&&(Ke.flags|=1024),c}function ab(){var s=Mm!==0;return Mm=0,s}function ib(s,c,h){c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~h}function ob(s){if(km){for(s=s.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next}km=!1}Ti=0,fn=Tt=Ke=null,ac=!1,xd=Mm=0,ic=null}function xr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?Ke.memoizedState=fn=s:fn=fn.next=s,fn}function ln(){if(Tt===null){var s=Ke.alternate;s=s!==null?s.memoizedState:null}else s=Tt.next;var c=fn===null?Ke.memoizedState:fn.next;if(c!==null)fn=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},fn===null?Ke.memoizedState=fn=s:fn=fn.next=s}return fn}function Pm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bd(s){var c=xd;return xd+=1,ic===null&&(ic=[]),s=YA(ic,s,c),c=Ke,(fn===null?c.memoizedState:fn.next)===null&&(c=c.alternate,L.H=c===null||c.memoizedState===null?BT:yb),s}function Rm(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return bd(s);if(s.$$typeof===C)return Xn(s)}throw Error(r(438,String(s)))}function sb(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 ki(s,c){return typeof c=="function"?c(s):c}function Dm(s){var c=ln();return lb(c,Tt,s)}function lb(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 P=S.next;S.next=_.next,_.next=P}c.baseQueue=S=_,v.pending=null}if(_=s.baseState,S===null)s.memoizedState=_;else{c=S.next;var q=P=null,X=null,se=c,ge=!1;do{var we=se.lane&-536870913;if(we!==se.lane?(ct&we)===we:(Ti&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===Jl&&(ge=!0);else if((Ti&ce)===ce){se=se.next,ce===Jl&&(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,P=_):X=X.next=we,Ke.lanes|=ce,Co|=ce;we=se.action,ks&&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,P=_):X=X.next=ce,Ke.lanes|=we,Co|=we;se=se.next}while(se!==null&&se!==c);if(X===null?P=_:X.next=q,!zr(_,s.memoizedState)&&(hn=!0,ge&&(h=ec,h!==null)))throw h;s.memoizedState=_,s.baseState=P,s.baseQueue=X,v.lastRenderedState=_}return S===null&&(v.lanes=0),[s.memoizedState,v.dispatch]}function cb(s){var c=ln(),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 P=S=S.next;do _=s(_,P.action),P=P.next;while(P!==S);zr(_,c.memoizedState)||(hn=!0),c.memoizedState=_,c.baseQueue===null&&(c.baseState=_),h.lastRenderedState=_}return[_,v]}function iT(s,c,h){var v=Ke,S=ln(),_=ft;if(_){if(h===void 0)throw Error(r(407));h=h()}else h=c();var P=!zr((Tt||S).memoizedState,h);if(P&&(S.memoizedState=h,hn=!0),S=S.queue,fb(lT.bind(null,v,S,s),[s]),S.getSnapshot!==c||P||fn!==null&&fn.memoizedState.tag&1){if(v.flags|=2048,oc(9,{destroy:void 0},sT.bind(null,v,S,h,c),null),$t===null)throw Error(r(349));_||(Ti&127)!==0||oT(v,c,h)}return h}function oT(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 sT(s,c,h,v){c.value=h,c.getSnapshot=v,cT(c)&&uT(s)}function lT(s,c,h){return h(function(){cT(c)&&uT(s)})}function cT(s){var c=s.getSnapshot;s=s.value;try{var h=c();return!zr(s,h)}catch{return!0}}function uT(s){var c=js(s,2);c!==null&&Tr(c,s,2)}function ub(s){var c=xr();if(typeof s=="function"){var h=s;if(s=h(),ks){Ya(!0);try{h()}finally{Ya(!1)}}}return c.memoizedState=c.baseState=s,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:s},c}function dT(s,c,h,v){return s.baseState=h,lb(s,Tt,typeof v=="function"?v:ki)}function T7(s,c,h,v,S){if(Lm(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(P){_.listeners.push(P)}};L.T!==null?h(!0):_.isTransition=!1,v(_),h=c.pending,h===null?(_.next=c.pending=_,fT(c,_)):(_.next=h.next,c.pending=h.next=_)}}function fT(s,c){var h=c.action,v=c.payload,S=s.state;if(c.isTransition){var _=L.T,P={};L.T=P;try{var q=h(S,v),X=L.S;X!==null&&X(P,q),hT(s,c,q)}catch(se){db(s,c,se)}finally{_!==null&&P.types!==null&&(_.types=P.types),L.T=_}}else try{_=h(S,v),hT(s,c,_)}catch(se){db(s,c,se)}}function hT(s,c,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(v){mT(s,c,v)},function(v){return db(s,c,v)}):mT(s,c,h)}function mT(s,c,h){c.status="fulfilled",c.value=h,pT(c),s.state=h,c=s.pending,c!==null&&(h=c.next,h===c?s.pending=null:(h=h.next,c.next=h,fT(s,h)))}function db(s,c,h){var v=s.pending;if(s.pending=null,v!==null){v=v.next;do c.status="rejected",c.reason=h,pT(c),c=c.next;while(c!==v)}s.action=null}function pT(s){s=s.listeners;for(var c=0;c<s.length;c++)(0,s[c])()}function vT(s,c){return c}function gT(s,c){if(ft){var h=$t.formState;if(h!==null){e:{var v=Ke;if(ft){if(Ht){t:{for(var S=Ht,_=ha;S.nodeType!==8;){if(!_){S=null;break t}if(S=pa(S.nextSibling),S===null){S=null;break t}}_=S.data,S=_==="F!"||_==="F"?S:null}if(S){Ht=pa(S.nextSibling),v=S.data==="F!";break e}}yo(v)}v=!1}v&&(c=h[0])}}return h=xr(),h.memoizedState=h.baseState=c,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vT,lastRenderedState:c},h.queue=v,h=$T.bind(null,Ke,v),v.dispatch=h,v=ub(!1),_=gb.bind(null,Ke,!1,v.queue),v=xr(),S={state:c,dispatch:null,action:s,pending:null},v.queue=S,h=T7.bind(null,Ke,S,_,h),S.dispatch=h,v.memoizedState=s,[c,h,!1]}function yT(s){var c=ln();return xT(c,Tt,s)}function xT(s,c,h){if(c=lb(s,c,vT)[0],s=Dm(ki)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var v=bd(c)}catch(P){throw P===tc?Nm:P}else v=c;c=ln();var S=c.queue,_=S.dispatch;return h!==c.memoizedState&&(Ke.flags|=2048,oc(9,{destroy:void 0},k7.bind(null,S,h),null)),[v,_,s]}function k7(s,c){s.action=c}function bT(s){var c=ln(),h=Tt;if(h!==null)return xT(c,h,s);ln(),c=c.memoizedState,h=ln();var v=h.queue.dispatch;return h.memoizedState=s,[c,v,!1]}function oc(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 wT(){return ln().memoizedState}function $m(s,c,h,v){var S=xr();Ke.flags|=s,S.memoizedState=oc(1|c,{destroy:void 0},h,v===void 0?null:v)}function Im(s,c,h,v){var S=ln();v=v===void 0?null:v;var _=S.memoizedState.inst;Tt!==null&&v!==null&&nb(v,Tt.memoizedState.deps)?S.memoizedState=oc(c,_,h,v):(Ke.flags|=s,S.memoizedState=oc(1|c,_,h,v))}function jT(s,c){$m(8390656,8,s,c)}function fb(s,c){Im(2048,8,s,c)}function M7(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 ST(s){var c=ln().memoizedState;return M7({ref:c,nextImpl:s}),function(){if((yt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}function _T(s,c){return Im(4,2,s,c)}function NT(s,c){return Im(4,4,s,c)}function OT(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 CT(s,c,h){h=h!=null?h.concat([s]):null,Im(4,4,OT.bind(null,c,s),h)}function hb(){}function ET(s,c){var h=ln();c=c===void 0?null:c;var v=h.memoizedState;return c!==null&&nb(c,v[1])?v[0]:(h.memoizedState=[s,c],s)}function AT(s,c){var h=ln();c=c===void 0?null:c;var v=h.memoizedState;if(c!==null&&nb(c,v[1]))return v[0];if(v=s(),ks){Ya(!0);try{s()}finally{Ya(!1)}}return h.memoizedState=[v,c],v}function mb(s,c,h){return h===void 0||(Ti&1073741824)!==0&&(ct&261930)===0?s.memoizedState=c:(s.memoizedState=h,s=T2(),Ke.lanes|=s,Co|=s,h)}function TT(s,c,h,v){return zr(h,c)?h:rc.current!==null?(s=mb(s,h,v),zr(s,c)||(hn=!0),s):(Ti&42)===0||(Ti&1073741824)!==0&&(ct&261930)===0?(hn=!0,s.memoizedState=h):(s=T2(),Ke.lanes|=s,Co|=s,c)}function kT(s,c,h,v,S){var _=R.p;R.p=_!==0&&8>_?_:8;var P=L.T,q={};L.T=q,gb(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=C7(X,v);wd(s,c,ge,Vr(s))}else wd(s,c,v,Vr(s))}catch(we){wd(s,c,{then:function(){},status:"rejected",reason:we},Vr())}finally{R.p=_,P!==null&&q.types!==null&&(P.types=q.types),L.T=P}}function P7(){}function pb(s,c,h,v){if(s.tag!==5)throw Error(r(476));var S=MT(s).queue;kT(s,S,c,F,h===null?P7:function(){return PT(s),h(v)})}function MT(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:ki,lastRenderedState:F},next:null};var h={};return c.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:h},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function PT(s){var c=MT(s);c.next===null&&(c=s.alternate.memoizedState),wd(s,c.next.queue,{},Vr())}function vb(){return Xn(Ld)}function RT(){return ln().memoizedState}function DT(){return ln().memoizedState}function R7(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var h=Vr();s=wo(h);var v=jo(c,s,h);v!==null&&(Tr(v,c,h),vd(v,c,h)),c={cache:Wx()},s.payload=c;return}c=c.return}}function D7(s,c,h){var v=Vr();h={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Lm(s)?IT(c,h):(h=Rx(s,c,h,v),h!==null&&(Tr(h,s,v),LT(h,c,v)))}function $T(s,c,h){var v=Vr();wd(s,c,h,v)}function wd(s,c,h,v){var S={lane:v,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(Lm(s))IT(c,S);else{var _=s.alternate;if(s.lanes===0&&(_===null||_.lanes===0)&&(_=c.lastRenderedReducer,_!==null))try{var P=c.lastRenderedState,q=_(P,h);if(S.hasEagerState=!0,S.eagerState=q,zr(q,P))return ym(s,c,S,0),$t===null&&gm(),!1}catch{}finally{}if(h=Rx(s,c,S,v),h!==null)return Tr(h,s,v),LT(h,c,v),!0}return!1}function gb(s,c,h,v){if(v={lane:2,revertLane:Kb(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Lm(s)){if(c)throw Error(r(479))}else c=Rx(s,h,v,2),c!==null&&Tr(c,s,2)}function Lm(s){var c=s.alternate;return s===Ke||c!==null&&c===Ke}function IT(s,c){ac=km=!0;var h=s.pending;h===null?c.next=c:(c.next=h.next,h.next=c),s.pending=c}function LT(s,c,h){if((h&4194048)!==0){var v=c.lanes;v&=s.pendingLanes,h|=v,c.lanes=h,UE(s,h)}}var jd={readContext:Xn,use:Rm,useCallback:rn,useContext:rn,useEffect:rn,useImperativeHandle:rn,useLayoutEffect:rn,useInsertionEffect:rn,useMemo:rn,useReducer:rn,useRef:rn,useState:rn,useDebugValue:rn,useDeferredValue:rn,useTransition:rn,useSyncExternalStore:rn,useId:rn,useHostTransitionStatus:rn,useFormState:rn,useActionState:rn,useOptimistic:rn,useMemoCache:rn,useCacheRefresh:rn};jd.useEffectEvent=rn;var BT={readContext:Xn,use:Rm,useCallback:function(s,c){return xr().memoizedState=[s,c===void 0?null:c],s},useContext:Xn,useEffect:jT,useImperativeHandle:function(s,c,h){h=h!=null?h.concat([s]):null,$m(4194308,4,OT.bind(null,c,s),h)},useLayoutEffect:function(s,c){return $m(4194308,4,s,c)},useInsertionEffect:function(s,c){$m(4,2,s,c)},useMemo:function(s,c){var h=xr();c=c===void 0?null:c;var v=s();if(ks){Ya(!0);try{s()}finally{Ya(!1)}}return h.memoizedState=[v,c],v},useReducer:function(s,c,h){var v=xr();if(h!==void 0){var S=h(c);if(ks){Ya(!0);try{h(c)}finally{Ya(!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=D7.bind(null,Ke,s),[v.memoizedState,s]},useRef:function(s){var c=xr();return s={current:s},c.memoizedState=s},useState:function(s){s=ub(s);var c=s.queue,h=$T.bind(null,Ke,c);return c.dispatch=h,[s.memoizedState,h]},useDebugValue:hb,useDeferredValue:function(s,c){var h=xr();return mb(h,s,c)},useTransition:function(){var s=ub(!1);return s=kT.bind(null,Ke,s.queue,!0,!1),xr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,c,h){var v=Ke,S=xr();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||oT(v,c,h)}S.memoizedState=h;var _={value:h,getSnapshot:c};return S.queue=_,jT(lT.bind(null,v,_,s),[s]),v.flags|=2048,oc(9,{destroy:void 0},sT.bind(null,v,_,h,c),null),h},useId:function(){var s=xr(),c=$t.identifierPrefix;if(ft){var h=Xa,v=Ka;h=(v&~(1<<32-ar(v)-1)).toString(32)+h,c="_"+c+"R_"+h,h=Mm++,0<h&&(c+="H"+h.toString(32)),c+="_"}else h=E7++,c="_"+c+"r_"+h.toString(32)+"_";return s.memoizedState=c},useHostTransitionStatus:vb,useFormState:gT,useActionState:gT,useOptimistic:function(s){var c=xr();c.memoizedState=c.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=h,c=gb.bind(null,Ke,!0,h),h.dispatch=c,[s,c]},useMemoCache:sb,useCacheRefresh:function(){return xr().memoizedState=R7.bind(null,Ke)},useEffectEvent:function(s){var c=xr(),h={impl:s};return c.memoizedState=h,function(){if((yt&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},yb={readContext:Xn,use:Rm,useCallback:ET,useContext:Xn,useEffect:fb,useImperativeHandle:CT,useInsertionEffect:_T,useLayoutEffect:NT,useMemo:AT,useReducer:Dm,useRef:wT,useState:function(){return Dm(ki)},useDebugValue:hb,useDeferredValue:function(s,c){var h=ln();return TT(h,Tt.memoizedState,s,c)},useTransition:function(){var s=Dm(ki)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:bd(s),c]},useSyncExternalStore:iT,useId:RT,useHostTransitionStatus:vb,useFormState:yT,useActionState:yT,useOptimistic:function(s,c){var h=ln();return dT(h,Tt,s,c)},useMemoCache:sb,useCacheRefresh:DT};yb.useEffectEvent=ST;var zT={readContext:Xn,use:Rm,useCallback:ET,useContext:Xn,useEffect:fb,useImperativeHandle:CT,useInsertionEffect:_T,useLayoutEffect:NT,useMemo:AT,useReducer:cb,useRef:wT,useState:function(){return cb(ki)},useDebugValue:hb,useDeferredValue:function(s,c){var h=ln();return Tt===null?mb(h,s,c):TT(h,Tt.memoizedState,s,c)},useTransition:function(){var s=cb(ki)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:bd(s),c]},useSyncExternalStore:iT,useId:RT,useHostTransitionStatus:vb,useFormState:bT,useActionState:bT,useOptimistic:function(s,c){var h=ln();return Tt!==null?dT(h,Tt,s,c):(h.baseState=s,[s,h.queue.dispatch])},useMemoCache:sb,useCacheRefresh:DT};zT.useEffectEvent=ST;function xb(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 bb={enqueueSetState:function(s,c,h){s=s._reactInternals;var v=Vr(),S=wo(v);S.payload=c,h!=null&&(S.callback=h),c=jo(s,S,v),c!==null&&(Tr(c,s,v),vd(c,s,v))},enqueueReplaceState:function(s,c,h){s=s._reactInternals;var v=Vr(),S=wo(v);S.tag=1,S.payload=c,h!=null&&(S.callback=h),c=jo(s,S,v),c!==null&&(Tr(c,s,v),vd(c,s,v))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var h=Vr(),v=wo(h);v.tag=2,c!=null&&(v.callback=c),c=jo(s,v,h),c!==null&&(Tr(c,s,h),vd(c,s,h))}};function qT(s,c,h,v,S,_,P){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,_,P):c.prototype&&c.prototype.isPureReactComponent?!ld(h,v)||!ld(S,_):!0}function FT(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&&bb.enqueueReplaceState(c,c.state,null)}function Ms(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 UT(s){vm(s)}function HT(s){console.error(s)}function WT(s){vm(s)}function Bm(s,c){try{var h=s.onUncaughtError;h(c.value,{componentStack:c.stack})}catch(v){setTimeout(function(){throw v})}}function VT(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 wb(s,c,h){return h=wo(h),h.tag=3,h.payload={element:null},h.callback=function(){Bm(s,c)},h}function GT(s){return s=wo(s),s.tag=3,s}function YT(s,c,h,v){var S=h.type.getDerivedStateFromError;if(typeof S=="function"){var _=v.value;s.payload=function(){return S(_)},s.callback=function(){VT(c,h,v)}}var P=h.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(s.callback=function(){VT(c,h,v),typeof S!="function"&&(Eo===null?Eo=new Set([this]):Eo.add(this));var q=v.stack;this.componentDidCatch(v.value,{componentStack:q!==null?q:""})})}function $7(s,c,h,v,S){if(h.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(c=h.alternate,c!==null&&Ql(c,h,S,!0),h=Fr.current,h!==null){switch(h.tag){case 31:case 13:return ma===null?Zm():h.alternate===null&&an===0&&(an=3),h.flags&=-257,h.flags|=65536,h.lanes=S,v===Om?h.flags|=16384:(c=h.updateQueue,c===null?h.updateQueue=new Set([v]):c.add(v),Vb(s,v,S)),!1;case 22:return h.flags|=65536,v===Om?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)),Vb(s,v,S)),!1}throw Error(r(435,h.tag))}return Vb(s,v,S),Zm(),!1}if(ft)return c=Fr.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=S,v!==zx&&(s=Error(r(422),{cause:v}),dd(ua(s,h)))):(v!==zx&&(c=Error(r(423),{cause:v}),dd(ua(c,h))),s=s.current.alternate,s.flags|=65536,S&=-S,s.lanes|=S,v=ua(v,h),S=wb(s.stateNode,v,S),Zx(s,S),an!==4&&(an=2)),!1;var _=Error(r(520),{cause:v});if(_=ua(_,h),Td===null?Td=[_]:Td.push(_),an!==4&&(an=2),c===null)return!0;v=ua(v,h),h=c;do{switch(h.tag){case 3:return h.flags|=65536,s=S&-S,h.lanes|=s,s=wb(h.stateNode,v,s),Zx(h,s),!1;case 1:if(c=h.type,_=h.stateNode,(h.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Eo===null||!Eo.has(_))))return h.flags|=65536,S&=-S,h.lanes|=S,S=GT(S),YT(S,s,h,v),Zx(h,S),!1}h=h.return}while(h!==null);return!1}var jb=Error(r(461)),hn=!1;function Zn(s,c,h,v){c.child=s===null?QA(c,null,h,v):Ts(c,s.child,h,v)}function KT(s,c,h,v,S){h=h.render;var _=c.ref;if("ref"in v){var P={};for(var q in v)q!=="ref"&&(P[q]=v[q])}else P=v;return Os(c),v=rb(s,c,h,P,_,S),q=ab(),s!==null&&!hn?(ib(s,c,S),Mi(s,c,S)):(ft&&q&&Lx(c),c.flags|=1,Zn(s,c,v,S),c.child)}function XT(s,c,h,v,S){if(s===null){var _=h.type;return typeof _=="function"&&!Dx(_)&&_.defaultProps===void 0&&h.compare===null?(c.tag=15,c.type=_,ZT(s,c,_,v,S)):(s=bm(h.type,null,v,c,c.mode,S),s.ref=c.ref,s.return=c,c.child=s)}if(_=s.child,!Tb(s,S)){var P=_.memoizedProps;if(h=h.compare,h=h!==null?h:ld,h(P,v)&&s.ref===c.ref)return Mi(s,c,S)}return c.flags|=1,s=Oi(_,v),s.ref=c.ref,s.return=c,c.child=s}function ZT(s,c,h,v,S){if(s!==null){var _=s.memoizedProps;if(ld(_,v)&&s.ref===c.ref)if(hn=!1,c.pendingProps=v=_,Tb(s,S))(s.flags&131072)!==0&&(hn=!0);else return c.lanes=s.lanes,Mi(s,c,S)}return Sb(s,c,h,v,S)}function QT(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 JT(s,c,_,h,v)}if((h&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},s!==null&&_m(c,_!==null?_.cachePool:null),_!==null?tT(c,_):Jx(),nT(c);else return v=c.lanes=536870912,JT(s,c,_!==null?_.baseLanes|h:h,h,v)}else _!==null?(_m(c,_.cachePool),tT(c,_),_o(),c.memoizedState=null):(s!==null&&_m(c,null),Jx(),_o());return Zn(s,c,S,h),c.child}function Sd(s,c){return s!==null&&s.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function JT(s,c,h,v,S){var _=Gx();return _=_===null?null:{parent:dn._currentValue,pool:_},c.memoizedState={baseLanes:h,cachePool:_},s!==null&&_m(c,null),Jx(),nT(c),s!==null&&Ql(s,c,v,!0),c.childLanes=S,null}function zm(s,c){return c=Fm({mode:c.mode,children:c.children},s.mode),c.ref=s.ref,s.child=c,c.return=s,c}function e2(s,c,h){return Ts(c,s.child,null,h),s=zm(c,c.pendingProps),s.flags|=2,Ur(c),c.memoizedState=null,s}function I7(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=zm(c,v),c.lanes=536870912,Sd(null,s);if(tb(c),(s=Ht)?(s=fk(s,ha),s=s!==null&&s.data==="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:vo!==null?{id:Ka,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},h=IA(s),h.return=c,c.child=h,Kn=c,Ht=null)):s=null,s===null)throw yo(c);return c.lanes=536870912,null}return zm(c,v)}var _=s.memoizedState;if(_!==null){var P=_.dehydrated;if(tb(c),S)if(c.flags&256)c.flags&=-257,c=e2(s,c,h);else if(c.memoizedState!==null)c.child=s.child,c.flags|=128,c=null;else throw Error(r(558));else if(hn||Ql(s,c,h,!1),S=(h&s.childLanes)!==0,hn||S){if(v=$t,v!==null&&(P=HE(v,h),P!==0&&P!==_.retryLane))throw _.retryLane=P,js(s,P),Tr(v,s,P),jb;Zm(),c=e2(s,c,h)}else s=_.treeContext,Ht=pa(P.nextSibling),Kn=c,ft=!0,go=null,ha=!1,s!==null&&zA(c,s),c=zm(c,v),c.flags|=4096;return c}return s=Oi(s.child,{mode:v.mode,children:v.children}),s.ref=c.ref,c.child=s,s.return=c,s}function qm(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 Sb(s,c,h,v,S){return Os(c),h=rb(s,c,h,v,void 0,S),v=ab(),s!==null&&!hn?(ib(s,c,S),Mi(s,c,S)):(ft&&v&&Lx(c),c.flags|=1,Zn(s,c,h,S),c.child)}function t2(s,c,h,v,S,_){return Os(c),c.updateQueue=null,h=aT(c,v,h,S),rT(s),v=ab(),s!==null&&!hn?(ib(s,c,_),Mi(s,c,_)):(ft&&v&&Lx(c),c.flags|=1,Zn(s,c,h,_),c.child)}function n2(s,c,h,v,S){if(Os(c),c.stateNode===null){var _=Yl,P=h.contextType;typeof P=="object"&&P!==null&&(_=Xn(P)),_=new h(v,_),c.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=bb,c.stateNode=_,_._reactInternals=c,_=c.stateNode,_.props=v,_.state=c.memoizedState,_.refs={},Kx(c),P=h.contextType,_.context=typeof P=="object"&&P!==null?Xn(P):Yl,_.state=c.memoizedState,P=h.getDerivedStateFromProps,typeof P=="function"&&(xb(c,h,P,v),_.state=c.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(P=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),P!==_.state&&bb.enqueueReplaceState(_,_.state,null),yd(c,v,_,S),gd(),_.state=c.memoizedState),typeof _.componentDidMount=="function"&&(c.flags|=4194308),v=!0}else if(s===null){_=c.stateNode;var q=c.memoizedProps,X=Ms(h,q);_.props=X;var se=_.context,ge=h.contextType;P=Yl,typeof ge=="object"&&ge!==null&&(P=Xn(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!==P)&&FT(c,_,v,P),bo=!1;var ce=c.memoizedState;_.state=ce,yd(c,v,_,S),gd(),se=c.memoizedState,q||ce!==se||bo?(typeof we=="function"&&(xb(c,h,we,v),se=c.memoizedState),(X=bo||qT(c,h,X,v,ce,se,P))?(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=P,v=X):(typeof _.componentDidMount=="function"&&(c.flags|=4194308),v=!1)}else{_=c.stateNode,Xx(s,c),P=c.memoizedProps,ge=Ms(h,P),_.props=ge,we=c.pendingProps,ce=_.context,se=h.contextType,X=Yl,typeof se=="object"&&se!==null&&(X=Xn(se)),q=h.getDerivedStateFromProps,(se=typeof q=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(P!==we||ce!==X)&&FT(c,_,v,X),bo=!1,ce=c.memoizedState,_.state=ce,yd(c,v,_,S),gd();var he=c.memoizedState;P!==we||ce!==he||bo||s!==null&&s.dependencies!==null&&jm(s.dependencies)?(typeof q=="function"&&(xb(c,h,q,v),he=c.memoizedState),(ge=bo||qT(c,h,ge,v,ce,he,X)||s!==null&&s.dependencies!==null&&jm(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"||P===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||P===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"||P===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),v=!1)}return _=v,qm(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=Ts(c,s.child,null,S),c.child=Ts(c,null,h,S)):Zn(s,c,h,S),c.memoizedState=_.state,s=c.child):s=Mi(s,c,S),s}function r2(s,c,h,v){return _s(),c.flags|=256,Zn(s,c,h,v),c.child}var _b={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nb(s){return{baseLanes:s,cachePool:VA()}}function Ob(s,c,h){return s=s!==null?s.childLanes&~h:0,c&&(s|=Wr),s}function a2(s,c,h){var v=c.pendingProps,S=!1,_=(c.flags&128)!==0,P;if((P=_)||(P=s!==null&&s.memoizedState===null?!1:(sn.current&2)!==0),P&&(S=!0,c.flags&=-129),P=(c.flags&32)!==0,c.flags&=-33,s===null){if(ft){if(S?So(c):_o(),(s=Ht)?(s=fk(s,ha),s=s!==null&&s.data!=="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:vo!==null?{id:Ka,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},h=IA(s),h.return=c,c.child=h,Kn=c,Ht=null)):s=null,s===null)throw yo(c);return l0(s)?c.lanes=32:c.lanes=536870912,null}var q=v.children;return v=v.fallback,S?(_o(),S=c.mode,q=Fm({mode:"hidden",children:q},S),v=Ss(v,S,h,null),q.return=c,v.return=c,q.sibling=v,c.child=q,v=c.child,v.memoizedState=Nb(h),v.childLanes=Ob(s,P,h),c.memoizedState=_b,Sd(null,v)):(So(c),Cb(c,q))}var X=s.memoizedState;if(X!==null&&(q=X.dehydrated,q!==null)){if(_)c.flags&256?(So(c),c.flags&=-257,c=Eb(s,c,h)):c.memoizedState!==null?(_o(),c.child=s.child,c.flags|=128,c=null):(_o(),q=v.fallback,S=c.mode,v=Fm({mode:"visible",children:v.children},S),q=Ss(q,S,h,null),q.flags|=2,v.return=c,q.return=c,v.sibling=q,c.child=v,Ts(c,s.child,null,h),v=c.child,v.memoizedState=Nb(h),v.childLanes=Ob(s,P,h),c.memoizedState=_b,c=Sd(null,v));else if(So(c),l0(q)){if(P=q.nextSibling&&q.nextSibling.dataset,P)var se=P.dgst;P=se,v=Error(r(419)),v.stack="",v.digest=P,dd({value:v,source:null,stack:null}),c=Eb(s,c,h)}else if(hn||Ql(s,c,h,!1),P=(h&s.childLanes)!==0,hn||P){if(P=$t,P!==null&&(v=HE(P,h),v!==0&&v!==X.retryLane))throw X.retryLane=v,js(s,v),Tr(P,s,v),jb;s0(q)||Zm(),c=Eb(s,c,h)}else s0(q)?(c.flags|=192,c.child=s.child,c=null):(s=X.treeContext,Ht=pa(q.nextSibling),Kn=c,ft=!0,go=null,ha=!1,s!==null&&zA(c,s),c=Cb(c,v.children),c.flags|=4096);return c}return S?(_o(),q=v.fallback,S=c.mode,X=s.child,se=X.sibling,v=Oi(X,{mode:"hidden",children:v.children}),v.subtreeFlags=X.subtreeFlags&65011712,se!==null?q=Oi(se,q):(q=Ss(q,S,h,null),q.flags|=2),q.return=c,v.return=c,v.sibling=q,c.child=v,Sd(null,v),v=c.child,q=s.child.memoizedState,q===null?q=Nb(h):(S=q.cachePool,S!==null?(X=dn._currentValue,S=S.parent!==X?{parent:X,pool:X}:S):S=VA(),q={baseLanes:q.baseLanes|h,cachePool:S}),v.memoizedState=q,v.childLanes=Ob(s,P,h),c.memoizedState=_b,Sd(s.child,v)):(So(c),h=s.child,s=h.sibling,h=Oi(h,{mode:"visible",children:v.children}),h.return=c,h.sibling=null,s!==null&&(P=c.deletions,P===null?(c.deletions=[s],c.flags|=16):P.push(s)),c.child=h,c.memoizedState=null,h)}function Cb(s,c){return c=Fm({mode:"visible",children:c},s.mode),c.return=s,s.child=c}function Fm(s,c){return s=qr(22,s,null,c),s.lanes=0,s}function Eb(s,c,h){return Ts(c,s.child,null,h),s=Cb(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function i2(s,c,h){s.lanes|=c;var v=s.alternate;v!==null&&(v.lanes|=c),Ux(s.return,c,h)}function Ab(s,c,h,v,S,_){var P=s.memoizedState;P===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:h,tailMode:S,treeForkCount:_}:(P.isBackwards=c,P.rendering=null,P.renderingStartTime=0,P.last=v,P.tail=h,P.tailMode=S,P.treeForkCount=_)}function o2(s,c,h){var v=c.pendingProps,S=v.revealOrder,_=v.tail;v=v.children;var P=sn.current,q=(P&2)!==0;if(q?(P=P&1|2,c.flags|=128):P&=1,Y(sn,P),Zn(s,c,v,h),v=ft?ud:0,!q&&s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&i2(s,h,c);else if(s.tag===19)i2(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&&Tm(s)===null&&(S=h),h=h.sibling;h=S,h===null?(S=c.child,c.child=null):(S=h.sibling,h.sibling=null),Ab(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&&Tm(s)===null){c.child=S;break}s=S.sibling,S.sibling=h,h=S,S=s}Ab(c,!0,h,null,_,v);break;case"together":Ab(c,!1,null,null,void 0,v);break;default:c.memoizedState=null}return c.child}function Mi(s,c,h){if(s!==null&&(c.dependencies=s.dependencies),Co|=c.lanes,(h&c.childLanes)===0)if(s!==null){if(Ql(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=Oi(s,s.pendingProps),c.child=h,h.return=c;s.sibling!==null;)s=s.sibling,h=h.sibling=Oi(s,s.pendingProps),h.return=c;h.sibling=null}return c.child}function Tb(s,c){return(s.lanes&c)!==0?!0:(s=s.dependencies,!!(s!==null&&jm(s)))}function L7(s,c,h){switch(c.tag){case 3:ae(c,c.stateNode.containerInfo),xo(c,dn,s.memoizedState.cache),_s();break;case 27:case 5:pe(c);break;case 4:ae(c,c.stateNode.containerInfo);break;case 10:xo(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,tb(c),null;break;case 13:var v=c.memoizedState;if(v!==null)return v.dehydrated!==null?(So(c),c.flags|=128,null):(h&c.child.childLanes)!==0?a2(s,c,h):(So(c),s=Mi(s,c,h),s!==null?s.sibling:null);So(c);break;case 19:var S=(s.flags&128)!==0;if(v=(h&c.childLanes)!==0,v||(Ql(s,c,h,!1),v=(h&c.childLanes)!==0),S){if(v)return o2(s,c,h);c.flags|=128}if(S=c.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),Y(sn,sn.current),v)break;return null;case 22:return c.lanes=0,QT(s,c,h,c.pendingProps);case 24:xo(c,dn,s.memoizedState.cache)}return Mi(s,c,h)}function s2(s,c,h){if(s!==null)if(s.memoizedProps!==c.pendingProps)hn=!0;else{if(!Tb(s,h)&&(c.flags&128)===0)return hn=!1,L7(s,c,h);hn=(s.flags&131072)!==0}else hn=!1,ft&&(c.flags&1048576)!==0&&BA(c,ud,c.index);switch(c.lanes=0,c.tag){case 16:e:{var v=c.pendingProps;if(s=Es(c.elementType),c.type=s,typeof s=="function")Dx(s)?(v=Ms(s,v),c.tag=1,c=n2(null,c,s,v,h)):(c.tag=0,c=Sb(null,c,s,v,h));else{if(s!=null){var S=s.$$typeof;if(S===A){c.tag=11,c=KT(null,c,s,v,h);break e}else if(S===T){c.tag=14,c=XT(null,c,s,v,h);break e}}throw c=H(s)||s,Error(r(306,c,""))}}return c;case 0:return Sb(s,c,c.type,c.pendingProps,h);case 1:return v=c.type,S=Ms(v,c.pendingProps),n2(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,Xx(s,c),yd(c,v,null,h);var P=c.memoizedState;if(v=P.cache,xo(c,dn,v),v!==_.cache&&Hx(c,[dn],h,!0),gd(),v=P.element,_.isDehydrated)if(_={element:v,isDehydrated:!1,cache:P.cache},c.updateQueue.baseState=_,c.memoizedState=_,c.flags&256){c=r2(s,c,v,h);break e}else if(v!==S){S=ua(Error(r(424)),c),dd(S),c=r2(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=pa(s.firstChild),Kn=c,ft=!0,go=null,ha=!0,h=QA(c,null,v,h),c.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(_s(),v===S){c=Mi(s,c,h);break e}Zn(s,c,v,h)}c=c.child}return c;case 26:return qm(s,c),s===null?(h=yk(c.type,null,c.pendingProps,null))?c.memoizedState=h:ft||(h=c.type,s=c.pendingProps,v=ap(xe.current).createElement(h),v[Yn]=c,v[_r]=s,Qn(v,h,s),Ln(v),c.stateNode=v):c.memoizedState=yk(c.type,s.memoizedProps,c.pendingProps,s.memoizedState),null;case 27:return pe(c),s===null&&ft&&(v=c.stateNode=pk(c.type,c.pendingProps,xe.current),Kn=c,ha=!0,S=Ht,Mo(c.type)?(c0=S,Ht=pa(v.firstChild)):Ht=S),Zn(s,c,c.pendingProps.children,h),qm(s,c),s===null&&(c.flags|=4194304),c.child;case 5:return s===null&&ft&&((S=v=Ht)&&(v=mV(v,c.type,c.pendingProps,ha),v!==null?(c.stateNode=v,Kn=c,Ht=pa(v.firstChild),ha=!1,S=!0):S=!1),S||yo(c)),pe(c),S=c.type,_=c.pendingProps,P=s!==null?s.memoizedProps:null,v=_.children,a0(S,_)?v=null:P!==null&&a0(S,P)&&(c.flags|=32),c.memoizedState!==null&&(S=rb(s,c,A7,null,null,h),Ld._currentValue=S),qm(s,c),Zn(s,c,v,h),c.child;case 6:return s===null&&ft&&((s=h=Ht)&&(h=pV(h,c.pendingProps,ha),h!==null?(c.stateNode=h,Kn=c,Ht=null,s=!0):s=!1),s||yo(c)),null;case 13:return a2(s,c,h);case 4:return ae(c,c.stateNode.containerInfo),v=c.pendingProps,s===null?c.child=Ts(c,null,v,h):Zn(s,c,v,h),c.child;case 11:return KT(s,c,c.type,c.pendingProps,h);case 7:return Zn(s,c,c.pendingProps,h),c.child;case 8:return Zn(s,c,c.pendingProps.children,h),c.child;case 12:return Zn(s,c,c.pendingProps.children,h),c.child;case 10:return v=c.pendingProps,xo(c,c.type,v.value),Zn(s,c,v.children,h),c.child;case 9:return S=c.type._context,v=c.pendingProps.children,Os(c),S=Xn(S),v=v(S),c.flags|=1,Zn(s,c,v,h),c.child;case 14:return XT(s,c,c.type,c.pendingProps,h);case 15:return ZT(s,c,c.type,c.pendingProps,h);case 19:return o2(s,c,h);case 31:return I7(s,c,h);case 22:return QT(s,c,h,c.pendingProps);case 24:return Os(c),v=Xn(dn),s===null?(S=Gx(),S===null&&(S=$t,_=Wx(),S.pooledCache=_,_.refCount++,_!==null&&(S.pooledCacheLanes|=h),S=_),c.memoizedState={parent:v,cache:S},Kx(c),xo(c,dn,S)):((s.lanes&h)!==0&&(Xx(s,c),yd(c,null,null,h),gd()),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),xo(c,dn,v)):(v=_.cache,xo(c,dn,v),v!==S.cache&&Hx(c,[dn],h,!0))),Zn(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 kb(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(R2())s.flags|=8192;else throw As=Om,Yx}else s.flags&=-16777217}function l2(s,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!Sk(c))if(R2())s.flags|=8192;else throw As=Om,Yx}function Um(s,c){c!==null&&(s.flags|=4),s.flags&16384&&(c=s.tag!==22?Rl():536870912,s.lanes|=c,uc|=c)}function _d(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 B7(s,c,h){var v=c.pendingProps;switch(Bx(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),Ai(dn),Z(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(Zl(c)?Pi(c):s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,qx())),Wt(c),null;case 26:var S=c.type,_=c.memoizedState;return s===null?(Pi(c),_!==null?(Wt(c),l2(c,_)):(Wt(c),kb(c,S,null,v,h))):_?_!==s.memoizedState?(Pi(c),Wt(c),l2(c,_)):(Wt(c),c.flags&=-16777217):(s=s.memoizedProps,s!==v&&Pi(c),Wt(c),kb(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,Zl(c)?qA(c):(s=pk(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,Zl(c))qA(c);else{var P=ap(xe.current);switch(_){case 1:_=P.createElementNS("http://www.w3.org/2000/svg",S);break;case 2:_=P.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;default:switch(S){case"svg":_=P.createElementNS("http://www.w3.org/2000/svg",S);break;case"math":_=P.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;case"script":_=P.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof v.is=="string"?P.createElement("select",{is:v.is}):P.createElement("select"),v.multiple?_.multiple=!0:v.size&&(_.size=v.size);break;default:_=typeof v.is=="string"?P.createElement(S,{is:v.is}):P.createElement(S)}}_[Yn]=c,_[_r]=v;e:for(P=c.child;P!==null;){if(P.tag===5||P.tag===6)_.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===c)break e;for(;P.sibling===null;){if(P.return===null||P.return===c)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}c.stateNode=_;e:switch(Qn(_,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),kb(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,Zl(c)){if(s=c.stateNode,h=c.memoizedProps,v=null,S=Kn,S!==null)switch(S.tag){case 27:case 5:v=S.memoizedProps}s[Yn]=c,s=!!(s.nodeValue===h||v!==null&&v.suppressHydrationWarning===!0||ak(s.nodeValue,h)),s||yo(c,!0)}else s=ap(s).createTextNode(v),s[Yn]=c,c.stateNode=s}return Wt(c),null;case 31:if(h=c.memoizedState,s===null||s.memoizedState!==null){if(v=Zl(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[Yn]=c}else _s(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Wt(c),s=!1}else h=qx(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=h),s=!0;if(!s)return c.flags&256?(Ur(c),c):(Ur(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=Zl(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[Yn]=c}else _s(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Wt(c),S=!1}else S=qx(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=S),S=!0;if(!S)return c.flags&256?(Ur(c),c):(Ur(c),null)}return Ur(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),Um(c,c.updateQueue),Wt(c),null);case 4:return Z(),s===null&&Jb(c.stateNode.containerInfo),Wt(c),null;case 10:return Ai(c.type),Wt(c),null;case 19:if(B(sn),v=c.memoizedState,v===null)return Wt(c),null;if(S=(c.flags&128)!==0,_=v.rendering,_===null)if(S)_d(v,!1);else{if(an!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(_=Tm(s),_!==null){for(c.flags|=128,_d(v,!1),s=_.updateQueue,c.updateQueue=s,Um(c,s),c.subtreeFlags=0,s=h,h=c.child;h!==null;)$A(h,s),h=h.sibling;return Y(sn,sn.current&1|2),ft&&Ci(c,v.treeForkCount),c.child}s=s.sibling}v.tail!==null&&rt()>Ym&&(c.flags|=128,S=!0,_d(v,!1),c.lanes=4194304)}else{if(!S)if(s=Tm(_),s!==null){if(c.flags|=128,S=!0,s=s.updateQueue,c.updateQueue=s,Um(c,s),_d(v,!0),v.tail===null&&v.tailMode==="hidden"&&!_.alternate&&!ft)return Wt(c),null}else 2*rt()-v.renderingStartTime>Ym&&h!==536870912&&(c.flags|=128,S=!0,_d(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=sn.current,Y(sn,S?h&1|2:h&1),ft&&Ci(c,v.treeForkCount),s):(Wt(c),null);case 22:case 23:return Ur(c),eb(),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&&Um(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(Cs),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),c.memoizedState.cache!==h&&(c.flags|=2048),Ai(dn),Wt(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function z7(s,c){switch(Bx(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Ai(dn),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(Ur(c),c.alternate===null)throw Error(r(340));_s()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if(Ur(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));_s()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return B(sn),null;case 4:return Z(),null;case 10:return Ai(c.type),null;case 22:case 23:return Ur(c),eb(),s!==null&&B(Cs),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return Ai(dn),null;case 25:return null;default:return null}}function c2(s,c){switch(Bx(c),c.tag){case 3:Ai(dn),Z();break;case 26:case 27:case 5:je(c);break;case 4:Z();break;case 31:c.memoizedState!==null&&Ur(c);break;case 13:Ur(c);break;case 19:B(sn);break;case 10:Ai(c.type);break;case 22:case 23:Ur(c),eb(),s!==null&&B(Cs);break;case 24:Ai(dn)}}function Nd(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,P=h.inst;v=_(),P.destroy=v}h=h.next}while(h!==S)}}catch(q){Nt(c,c.return,q)}}function No(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 P=v.inst,q=P.destroy;if(q!==void 0){P.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 u2(s){var c=s.updateQueue;if(c!==null){var h=s.stateNode;try{eT(c,h)}catch(v){Nt(s,s.return,v)}}}function d2(s,c,h){h.props=Ms(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount()}catch(v){Nt(s,c,v)}}function Od(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 Za(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 f2(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 Mb(s,c,h){try{var v=s.stateNode;lV(v,s.type,h,c),v[_r]=c}catch(S){Nt(s,s.return,S)}}function h2(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Mo(s.type)||s.tag===4}function Pb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||h2(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&&Mo(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 Rb(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=_i));else if(v!==4&&(v===27&&Mo(s.type)&&(h=s.stateNode,c=null),s=s.child,s!==null))for(Rb(s,c,h),s=s.sibling;s!==null;)Rb(s,c,h),s=s.sibling}function Hm(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&&Mo(s.type)&&(h=s.stateNode),s=s.child,s!==null))for(Hm(s,c,h),s=s.sibling;s!==null;)Hm(s,c,h),s=s.sibling}function m2(s){var c=s.stateNode,h=s.memoizedProps;try{for(var v=s.type,S=c.attributes;S.length;)c.removeAttributeNode(S[0]);Qn(c,v,h),c[Yn]=s,c[_r]=h}catch(_){Nt(s,s.return,_)}}var Ri=!1,mn=!1,Db=!1,p2=typeof WeakSet=="function"?WeakSet:Set,Bn=null;function q7(s,c){if(s=s.containerInfo,n0=dp,s=CA(s),Ex(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 P=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=P+S),we!==_||v!==0&&we.nodeType!==3||(X=P+v),we.nodeType===3&&(P+=we.nodeValue.length),(he=we.firstChild)!==null;)ce=we,we=he;for(;;){if(we===s)break t;if(ce===h&&++se===S&&(q=P),ce===_&&++ge===v&&(X=P),(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(r0={focusedElem:s,selectionRange:h},dp=!1,Bn=c;Bn!==null;)if(c=Bn,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,Bn=s;else for(;Bn!==null;){switch(c=Bn,_=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=Ms(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)o0(s);else if(h===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":o0(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,Bn=s;break}Bn=c.return}}function v2(s,c,h){var v=h.flags;switch(h.tag){case 0:case 11:case 15:$i(s,h),v&4&&Nd(5,h);break;case 1:if($i(s,h),v&4)if(s=h.stateNode,c===null)try{s.componentDidMount()}catch(P){Nt(h,h.return,P)}else{var S=Ms(h.type,c.memoizedProps);c=c.memoizedState;try{s.componentDidUpdate(S,c,s.__reactInternalSnapshotBeforeUpdate)}catch(P){Nt(h,h.return,P)}}v&64&&u2(h),v&512&&Od(h,h.return);break;case 3:if($i(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{eT(s,c)}catch(P){Nt(h,h.return,P)}}break;case 27:c===null&&v&4&&m2(h);case 26:case 5:$i(s,h),c===null&&v&4&&f2(h),v&512&&Od(h,h.return);break;case 12:$i(s,h);break;case 31:$i(s,h),v&4&&x2(s,h);break;case 13:$i(s,h),v&4&&b2(s,h),v&64&&(s=h.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(h=X7.bind(null,h),vV(s,h))));break;case 22:if(v=h.memoizedState!==null||Ri,!v){c=c!==null&&c.memoizedState!==null||mn,S=Ri;var _=mn;Ri=v,(mn=c)&&!_?Ii(s,h,(h.subtreeFlags&8772)!==0):$i(s,h),Ri=S,mn=_}break;case 30:break;default:$i(s,h)}}function g2(s){var c=s.alternate;c!==null&&(s.alternate=null,g2(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&dx(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 Xt=null,Or=!1;function Di(s,c,h){for(h=h.child;h!==null;)y2(s,c,h),h=h.sibling}function y2(s,c,h){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(ps,h)}catch{}switch(h.tag){case 26:mn||Za(h,c),Di(s,c,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:mn||Za(h,c);var v=Xt,S=Or;Mo(h.type)&&(Xt=h.stateNode,Or=!1),Di(s,c,h),Dd(h.stateNode),Xt=v,Or=S;break;case 5:mn||Za(h,c);case 6:if(v=Xt,S=Or,Xt=null,Di(s,c,h),Xt=v,Or=S,Xt!==null)if(Or)try{(Xt.nodeType===9?Xt.body:Xt.nodeName==="HTML"?Xt.ownerDocument.body:Xt).removeChild(h.stateNode)}catch(_){Nt(h,c,_)}else try{Xt.removeChild(h.stateNode)}catch(_){Nt(h,c,_)}break;case 18:Xt!==null&&(Or?(s=Xt,uk(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,h.stateNode),yc(s)):uk(Xt,h.stateNode));break;case 4:v=Xt,S=Or,Xt=h.stateNode.containerInfo,Or=!0,Di(s,c,h),Xt=v,Or=S;break;case 0:case 11:case 14:case 15:No(2,h,c),mn||No(4,h,c),Di(s,c,h);break;case 1:mn||(Za(h,c),v=h.stateNode,typeof v.componentWillUnmount=="function"&&d2(h,c,v)),Di(s,c,h);break;case 21:Di(s,c,h);break;case 22:mn=(v=mn)||h.memoizedState!==null,Di(s,c,h),mn=v;break;default:Di(s,c,h)}}function x2(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{yc(s)}catch(h){Nt(c,c.return,h)}}}function b2(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{yc(s)}catch(h){Nt(c,c.return,h)}}function F7(s){switch(s.tag){case 31:case 13:case 19:var c=s.stateNode;return c===null&&(c=s.stateNode=new p2),c;case 22:return s=s.stateNode,c=s._retryCache,c===null&&(c=s._retryCache=new p2),c;default:throw Error(r(435,s.tag))}}function Wm(s,c){var h=F7(s);c.forEach(function(v){if(!h.has(v)){h.add(v);var S=Z7.bind(null,s,v);v.then(S,S)}})}function Cr(s,c){var h=c.deletions;if(h!==null)for(var v=0;v<h.length;v++){var S=h[v],_=s,P=c,q=P;e:for(;q!==null;){switch(q.tag){case 27:if(Mo(q.type)){Xt=q.stateNode,Or=!1;break e}break;case 5:Xt=q.stateNode,Or=!1;break e;case 3:case 4:Xt=q.stateNode.containerInfo,Or=!0;break e}q=q.return}if(Xt===null)throw Error(r(160));y2(_,P,S),Xt=null,Or=!1,_=S.alternate,_!==null&&(_.return=null),S.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)w2(c,s),c=c.sibling}var ka=null;function w2(s,c){var h=s.alternate,v=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Cr(c,s),Er(s),v&4&&(No(3,s,s.return),Nd(3,s),No(5,s,s.return));break;case 1:Cr(c,s),Er(s),v&512&&(mn||h===null||Za(h,h.return)),v&64&&Ri&&(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=ka;if(Cr(c,s),Er(s),v&512&&(mn||h===null||Za(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],(!_||_[Ju]||_[Yn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=S.createElement(v),S.head.insertBefore(_,S.querySelector("head > title"))),Qn(_,v,h),_[Yn]=s,Ln(_),v=_;break e;case"link":var P=wk("link","href",S).get(v+(h.href||""));if(P){for(var q=0;q<P.length;q++)if(_=P[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)){P.splice(q,1);break t}}_=S.createElement(v),Qn(_,v,h),S.head.appendChild(_);break;case"meta":if(P=wk("meta","content",S).get(v+(h.content||""))){for(q=0;q<P.length;q++)if(_=P[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)){P.splice(q,1);break t}}_=S.createElement(v),Qn(_,v,h),S.head.appendChild(_);break;default:throw Error(r(468,v))}_[Yn]=s,Ln(_),v=_}s.stateNode=v}else jk(S,s.type,s.stateNode);else s.stateNode=bk(S,v,s.memoizedProps);else _!==v?(_===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):_.count--,v===null?jk(S,s.type,s.stateNode):bk(S,v,s.memoizedProps)):v===null&&s.stateNode!==null&&Mb(s,s.memoizedProps,h.memoizedProps)}break;case 27:Cr(c,s),Er(s),v&512&&(mn||h===null||Za(h,h.return)),h!==null&&v&4&&Mb(s,s.memoizedProps,h.memoizedProps);break;case 5:if(Cr(c,s),Er(s),v&512&&(mn||h===null||Za(h,h.return)),s.flags&32){S=s.stateNode;try{ql(S,"")}catch(Ae){Nt(s,s.return,Ae)}}v&4&&s.stateNode!=null&&(S=s.memoizedProps,Mb(s,S,h!==null?h.memoizedProps:S)),v&1024&&(Db=!0);break;case 6:if(Cr(c,s),Er(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(sp=null,S=ka,ka=ip(c.containerInfo),Cr(c,s),ka=S,Er(s),v&4&&h!==null&&h.memoizedState.isDehydrated)try{yc(c.containerInfo)}catch(Ae){Nt(s,s.return,Ae)}Db&&(Db=!1,j2(s));break;case 4:v=ka,ka=ip(s.stateNode.containerInfo),Cr(c,s),Er(s),ka=v;break;case 12:Cr(c,s),Er(s);break;case 31:Cr(c,s),Er(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Wm(s,v)));break;case 13:Cr(c,s),Er(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Gm=rt()),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Wm(s,v)));break;case 22:S=s.memoizedState!==null;var X=h!==null&&h.memoizedState!==null,se=Ri,ge=mn;if(Ri=se||S,mn=ge||X,Cr(c,s),mn=ge,Ri=se,Er(s),v&8192)e:for(c=s.stateNode,c._visibility=S?c._visibility&-2:c._visibility|1,S&&(h===null||X||Ri||mn||Ps(s)),h=null,c=s;;){if(c.tag===5||c.tag===26){if(h===null){X=h=c;try{if(_=X.stateNode,S)P=_.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.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?dk(he,!0):dk(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,Wm(s,h))));break;case 19:Cr(c,s),Er(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,Wm(s,v)));break;case 30:break;case 21:break;default:Cr(c,s),Er(s)}}function Er(s){var c=s.flags;if(c&2){try{for(var h,v=s.return;v!==null;){if(h2(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);Hm(s,_,S);break;case 5:var P=h.stateNode;h.flags&32&&(ql(P,""),h.flags&=-33);var q=Pb(s);Hm(s,q,P);break;case 3:case 4:var X=h.stateNode.containerInfo,se=Pb(s);Rb(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 j2(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var c=s;j2(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),s=s.sibling}}function $i(s,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)v2(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:No(4,c,c.return),Ps(c);break;case 1:Za(c,c.return);var h=c.stateNode;typeof h.componentWillUnmount=="function"&&d2(c,c.return,h),Ps(c);break;case 27:Dd(c.stateNode);case 26:case 5:Za(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 Ii(s,c,h){for(h=h&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var v=c.alternate,S=s,_=c,P=_.flags;switch(_.tag){case 0:case 11:case 15:Ii(S,_,h),Nd(4,_);break;case 1:if(Ii(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++)JA(X[S],q)}catch(se){Nt(v,v.return,se)}}h&&P&64&&u2(_),Od(_,_.return);break;case 27:m2(_);case 26:case 5:Ii(S,_,h),h&&v===null&&P&4&&f2(_),Od(_,_.return);break;case 12:Ii(S,_,h);break;case 31:Ii(S,_,h),h&&P&4&&x2(S,_);break;case 13:Ii(S,_,h),h&&P&4&&b2(S,_);break;case 22:_.memoizedState===null&&Ii(S,_,h),Od(_,_.return);break;case 30:break;default:Ii(S,_,h)}c=c.sibling}}function $b(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&&fd(h))}function Ib(s,c){s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&fd(s))}function Ma(s,c,h,v){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)S2(s,c,h,v),c=c.sibling}function S2(s,c,h,v){var S=c.flags;switch(c.tag){case 0:case 11:case 15:Ma(s,c,h,v),S&2048&&Nd(9,c);break;case 1:Ma(s,c,h,v);break;case 3:Ma(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&&fd(s)));break;case 12:if(S&2048){Ma(s,c,h,v),s=c.stateNode;try{var _=c.memoizedProps,P=_.id,q=_.onPostCommit;typeof q=="function"&&q(P,c.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(X){Nt(c,c.return,X)}}else Ma(s,c,h,v);break;case 31:Ma(s,c,h,v);break;case 13:Ma(s,c,h,v);break;case 23:break;case 22:_=c.stateNode,P=c.alternate,c.memoizedState!==null?_._visibility&2?Ma(s,c,h,v):Cd(s,c):_._visibility&2?Ma(s,c,h,v):(_._visibility|=2,sc(s,c,h,v,(c.subtreeFlags&10256)!==0||!1)),S&2048&&$b(P,c);break;case 24:Ma(s,c,h,v),S&2048&&Ib(c.alternate,c);break;default:Ma(s,c,h,v)}}function sc(s,c,h,v,S){for(S=S&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var _=s,P=c,q=h,X=v,se=P.flags;switch(P.tag){case 0:case 11:case 15:sc(_,P,q,X,S),Nd(8,P);break;case 23:break;case 22:var ge=P.stateNode;P.memoizedState!==null?ge._visibility&2?sc(_,P,q,X,S):Cd(_,P):(ge._visibility|=2,sc(_,P,q,X,S)),S&&se&2048&&$b(P.alternate,P);break;case 24:sc(_,P,q,X,S),S&&se&2048&&Ib(P.alternate,P);break;default:sc(_,P,q,X,S)}c=c.sibling}}function Cd(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:Cd(h,v),S&2048&&$b(v.alternate,v);break;case 24:Cd(h,v),S&2048&&Ib(v.alternate,v);break;default:Cd(h,v)}c=c.sibling}}var Ed=8192;function lc(s,c,h){if(s.subtreeFlags&Ed)for(s=s.child;s!==null;)_2(s,c,h),s=s.sibling}function _2(s,c,h){switch(s.tag){case 26:lc(s,c,h),s.flags&Ed&&s.memoizedState!==null&&EV(h,ka,s.memoizedState,s.memoizedProps);break;case 5:lc(s,c,h);break;case 3:case 4:var v=ka;ka=ip(s.stateNode.containerInfo),lc(s,c,h),ka=v;break;case 22:s.memoizedState===null&&(v=s.alternate,v!==null&&v.memoizedState!==null?(v=Ed,Ed=16777216,lc(s,c,h),Ed=v):lc(s,c,h));break;default:lc(s,c,h)}}function N2(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 Ad(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];Bn=v,C2(v,s)}N2(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)O2(s),s=s.sibling}function O2(s){switch(s.tag){case 0:case 11:case 15:Ad(s),s.flags&2048&&No(9,s,s.return);break;case 3:Ad(s);break;case 12:Ad(s);break;case 22:var c=s.stateNode;s.memoizedState!==null&&c._visibility&2&&(s.return===null||s.return.tag!==13)?(c._visibility&=-3,Vm(s)):Ad(s);break;default:Ad(s)}}function Vm(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];Bn=v,C2(v,s)}N2(s)}for(s=s.child;s!==null;){switch(c=s,c.tag){case 0:case 11:case 15:No(8,c,c.return),Vm(c);break;case 22:h=c.stateNode,h._visibility&2&&(h._visibility&=-3,Vm(c));break;default:Vm(c)}s=s.sibling}}function C2(s,c){for(;Bn!==null;){var h=Bn;switch(h.tag){case 0:case 11:case 15:No(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:fd(h.memoizedState.cache)}if(v=h.child,v!==null)v.return=h,Bn=v;else e:for(h=s;Bn!==null;){v=Bn;var S=v.sibling,_=v.return;if(g2(v),v===h){Bn=null;break e}if(S!==null){S.return=_,Bn=S;break e}Bn=_}}}var U7={getCacheForType:function(s){var c=Xn(dn),h=c.data.get(s);return h===void 0&&(h=s(),c.data.set(s,h)),h},cacheSignal:function(){return Xn(dn).controller.signal}},H7=typeof WeakMap=="function"?WeakMap:Map,yt=0,$t=null,it=null,ct=0,_t=0,Hr=null,Oo=!1,cc=!1,Lb=!1,Li=0,an=0,Co=0,Rs=0,Bb=0,Wr=0,uc=0,Td=null,Ar=null,zb=!1,Gm=0,E2=0,Ym=1/0,Km=null,Eo=null,Cn=0,Ao=null,dc=null,Bi=0,qb=0,Fb=null,A2=null,kd=0,Ub=null;function Vr(){return(yt&2)!==0&&ct!==0?ct&-ct:L.T!==null?Kb():WE()}function T2(){if(Wr===0)if((ct&536870912)===0||ft){var s=gt;gt<<=1,(gt&3932160)===0&&(gt=262144),Wr=s}else Wr=536870912;return s=Fr.current,s!==null&&(s.flags|=32),Wr}function Tr(s,c,h){(s===$t&&(_t===2||_t===9)||s.cancelPendingCommit!==null)&&(fc(s,0),To(s,ct,Wr,!1)),Qu(s,h),((yt&2)===0||s!==$t)&&(s===$t&&((yt&2)===0&&(Rs|=h),an===4&&To(s,ct,Wr,!1)),Qa(s))}function k2(s,c,h){if((yt&6)!==0)throw Error(r(327));var v=!h&&(c&127)===0&&(c&s.expiredLanes)===0||vs(s,c),S=v?G7(s,c):Wb(s,c,!0),_=v;do{if(S===0){cc&&!v&&To(s,c,0,!1);break}else{if(h=s.current.alternate,_&&!W7(h)){S=Wb(s,c,!1),_=!1;continue}if(S===2){if(_=c,s.errorRecoveryDisabledLanes&_)var P=0;else P=s.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){c=P;e:{var q=s;S=Td;var X=q.current.memoizedState.isDehydrated;if(X&&(fc(q,P).flags|=256),P=Wb(q,P,!1),P!==2){if(Lb&&!X){q.errorRecoveryDisabledLanes|=_,Rs|=_,S=4;break e}_=Ar,Ar=S,_!==null&&(Ar===null?Ar=_:Ar.push.apply(Ar,_))}S=P}if(_=!1,S!==2)continue}}if(S===1){fc(s,0),To(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:To(v,c,Wr,!Oo);break e;case 2:Ar=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(S=Gm+300-rt(),10<S)){if(To(v,c,Wr,!Oo),Pl(v,0,!0)!==0)break e;Bi=c,v.timeoutHandle=lk(M2.bind(null,v,h,Ar,Km,zb,c,Wr,Rs,uc,Oo,_,"Throttled",-0,0),S);break e}M2(v,h,Ar,Km,zb,c,Wr,Rs,uc,Oo,_,null,-0,0)}}break}while(!0);Qa(s)}function M2(s,c,h,v,S,_,P,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:_i},_2(c,_,we);var Ae=(_&62914560)===_?Gm-rt():(_&4194048)===_?E2-rt():0;if(Ae=AV(we,Ae),Ae!==null){Bi=_,s.cancelPendingCommit=Ae(z2.bind(null,s,c,_,h,v,S,P,q,X,ge,we,null,ce,he)),To(s,_,P,!se);return}}z2(s,c,_,h,v,S,P,q,X)}function W7(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(!zr(_(),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 To(s,c,h,v){c&=~Bb,c&=~Rs,s.suspendedLanes|=c,s.pingedLanes&=~c,v&&(s.warmLanes|=c),v=s.expirationTimes;for(var S=c;0<S;){var _=31-ar(S),P=1<<_;v[_]=-1,S&=~P}h!==0&&FE(s,h,c)}function Xm(){return(yt&6)===0?(Md(0),!1):!0}function Hb(){if(it!==null){if(_t===0)var s=it.return;else s=it,Ei=Ns=null,ob(s),nc=null,md=0,s=it;for(;s!==null;)c2(s.alternate,s),s=s.return;it=null}}function fc(s,c){var h=s.timeoutHandle;h!==-1&&(s.timeoutHandle=-1,dV(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),Bi=0,Hb(),$t=s,it=h=Oi(s.current,null),ct=c,_t=0,Hr=null,Oo=!1,cc=vs(s,c),Lb=!1,uc=Wr=Bb=Rs=Co=an=0,Ar=Td=null,zb=!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-ar(v),_=1<<S;c|=s[S],v&=~_}return Li=c,gm(),h}function P2(s,c){Ke=null,L.H=jd,c===tc||c===Nm?(c=KA(),_t=3):c===Yx?(c=KA(),_t=4):_t=c===jb?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,Hr=c,it===null&&(an=1,Bm(s,ua(c,s.current)))}function R2(){var s=Fr.current;return s===null?!0:(ct&4194048)===ct?ma===null:(ct&62914560)===ct||(ct&536870912)!==0?s===ma:!1}function D2(){var s=L.H;return L.H=jd,s===null?jd:s}function $2(){var s=L.A;return L.A=U7,s}function Zm(){an=4,Oo||(ct&4194048)!==ct&&Fr.current!==null||(cc=!0),(Co&134217727)===0&&(Rs&134217727)===0||$t===null||To($t,ct,Wr,!1)}function Wb(s,c,h){var v=yt;yt|=2;var S=D2(),_=$2();($t!==s||ct!==c)&&(Km=null,fc(s,c)),c=!1;var P=an;e:do try{if(_t!==0&&it!==null){var q=it,X=Hr;switch(_t){case 8:Hb(),P=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(c=!0);var se=_t;if(_t=0,Hr=null,hc(s,q,X,se),h&&cc){P=0;break e}break;default:se=_t,_t=0,Hr=null,hc(s,q,X,se)}}V7(),P=an;break}catch(ge){P2(s,ge)}while(!0);return c&&s.shellSuspendCounter++,Ei=Ns=null,yt=v,L.H=S,L.A=_,it===null&&($t=null,ct=0,gm()),P}function V7(){for(;it!==null;)I2(it)}function G7(s,c){var h=yt;yt|=2;var v=D2(),S=$2();$t!==s||ct!==c?(Km=null,Ym=rt()+500,fc(s,c)):cc=vs(s,c);e:do try{if(_t!==0&&it!==null){c=it;var _=Hr;t:switch(_t){case 1:_t=0,Hr=null,hc(s,c,_,1);break;case 2:case 9:if(GA(_)){_t=0,Hr=null,L2(c);break}c=function(){_t!==2&&_t!==9||$t!==s||(_t=7),Qa(s)},_.then(c,c);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:GA(_)?(_t=0,Hr=null,L2(c)):(_t=0,Hr=null,hc(s,c,_,7));break;case 5:var P=null;switch(it.tag){case 26:P=it.memoizedState;case 5:case 27:var q=it;if(P?Sk(P):q.stateNode.complete){_t=0,Hr=null;var X=q.sibling;if(X!==null)it=X;else{var se=q.return;se!==null?(it=se,Qm(se)):it=null}break t}}_t=0,Hr=null,hc(s,c,_,5);break;case 6:_t=0,Hr=null,hc(s,c,_,6);break;case 8:Hb(),an=6;break e;default:throw Error(r(462))}}Y7();break}catch(ge){P2(s,ge)}while(!0);return Ei=Ns=null,L.H=v,L.A=S,yt=h,it!==null?0:($t=null,ct=0,gm(),an)}function Y7(){for(;it!==null&&!gr();)I2(it)}function I2(s){var c=s2(s.alternate,s,Li);s.memoizedProps=s.pendingProps,c===null?Qm(s):it=c}function L2(s){var c=s,h=c.alternate;switch(c.tag){case 15:case 0:c=t2(h,c,c.pendingProps,c.type,void 0,ct);break;case 11:c=t2(h,c,c.pendingProps,c.type.render,c.ref,ct);break;case 5:ob(c);default:c2(h,c),c=it=$A(c,Li),c=s2(h,c,Li)}s.memoizedProps=s.pendingProps,c===null?Qm(s):it=c}function hc(s,c,h,v){Ei=Ns=null,ob(c),nc=null,md=0;var S=c.return;try{if($7(s,S,c,h,ct)){an=1,Bm(s,ua(h,s.current)),it=null;return}}catch(_){if(S!==null)throw it=S,_;an=1,Bm(s,ua(h,s.current)),it=null;return}c.flags&32768?(ft||v===1?s=!0:cc||(ct&536870912)!==0?s=!1:(Oo=s=!0,(v===2||v===9||v===3||v===6)&&(v=Fr.current,v!==null&&v.tag===13&&(v.flags|=16384))),B2(c,s)):Qm(c)}function Qm(s){var c=s;do{if((c.flags&32768)!==0){B2(c,Oo);return}s=c.return;var h=B7(c.alternate,c,Li);if(h!==null){it=h;return}if(c=c.sibling,c!==null){it=c;return}it=c=s}while(c!==null);an===0&&(an=5)}function B2(s,c){do{var h=z7(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);an=6,it=null}function z2(s,c,h,v,S,_,P,q,X){s.cancelPendingCommit=null;do Jm();while(Cn!==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,CW(s,h,_,P,q,X),s===$t&&(it=$t=null,ct=0),dc=c,Ao=s,Bi=h,qb=_,Fb=S,A2=v,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Q7(Ml,function(){return W2(),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,P=yt,yt|=4;try{q7(s,c,h)}finally{yt=P,R.p=S,L.T=v}}Cn=1,q2(),F2(),U2()}}function q2(){if(Cn===1){Cn=0;var s=Ao,c=dc,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{w2(c,s);var _=r0,P=CA(s.containerInfo),q=_.focusedElem,X=_.selectionRange;if(P!==q&&q&&q.ownerDocument&&OA(q.ownerDocument.documentElement,q)){if(X!==null&&Ex(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),Mt=X.end===void 0?ze:Math.min(X.end,Ae);!he.extend&&ze>Mt&&(P=Mt,Mt=ze,ze=P);var re=NA(q,ze),Q=NA(q,Mt);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>Mt?(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}}dp=!!n0,r0=n0=null}finally{yt=S,R.p=v,L.T=h}}s.current=c,Cn=2}}function F2(){if(Cn===2){Cn=0;var s=Ao,c=dc,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{v2(s,c.alternate,c)}finally{yt=S,R.p=v,L.T=h}}Cn=3}}function U2(){if(Cn===4||Cn===3){Cn=0,lt();var s=Ao,c=dc,h=Bi,v=A2;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?Cn=5:(Cn=0,dc=Ao=null,H2(s,s.pendingLanes));var S=s.pendingLanes;if(S===0&&(Eo=null),cx(h),c=c.stateNode,yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(ps,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,P=0;P<v.length;P++){var q=v[P];_(q.value,{componentStack:q.stack})}}finally{L.T=c,R.p=S}}(Bi&3)!==0&&Jm(),Qa(s),S=s.pendingLanes,(h&261930)!==0&&(S&42)!==0?s===Ub?kd++:(kd=0,Ub=s):kd=0,Md(0)}}function H2(s,c){(s.pooledCacheLanes&=c)===0&&(c=s.pooledCache,c!=null&&(s.pooledCache=null,fd(c)))}function Jm(){return q2(),F2(),U2(),W2()}function W2(){if(Cn!==5)return!1;var s=Ao,c=qb;qb=0;var h=cx(Bi),v=L.T,S=R.p;try{R.p=32>h?32:h,L.T=null,h=Fb,Fb=null;var _=Ao,P=Bi;if(Cn=0,dc=Ao=null,Bi=0,(yt&6)!==0)throw Error(r(331));var q=yt;if(yt|=4,O2(_.current),S2(_,_.current,P,h),yt=q,Md(0,!1),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(ps,_)}catch{}return!0}finally{R.p=S,L.T=v,H2(s,c)}}function V2(s,c,h){c=ua(h,c),c=wb(s.stateNode,c,2),s=jo(s,c,2),s!==null&&(Qu(s,2),Qa(s))}function Nt(s,c,h){if(s.tag===3)V2(s,s,h);else for(;c!==null;){if(c.tag===3){V2(c,s,h);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Eo===null||!Eo.has(v))){s=ua(h,s),h=GT(2),v=jo(c,h,2),v!==null&&(YT(h,v,c,s),Qu(v,2),Qa(v));break}}c=c.return}}function Vb(s,c,h){var v=s.pingCache;if(v===null){v=s.pingCache=new H7;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)||(Lb=!0,S.add(h),s=K7.bind(null,s,c,h),c.then(s,s))}function K7(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&&(an===4||an===3&&(ct&62914560)===ct&&300>rt()-Gm?(yt&2)===0&&fc(s,0):Bb|=h,uc===ct&&(uc=0)),Qa(s)}function G2(s,c){c===0&&(c=Rl()),s=js(s,c),s!==null&&(Qu(s,c),Qa(s))}function X7(s){var c=s.memoizedState,h=0;c!==null&&(h=c.retryLane),G2(s,h)}function Z7(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),G2(s,h)}function Q7(s,c){return vr(s,c)}var ep=null,mc=null,Gb=!1,tp=!1,Yb=!1,ko=0;function Qa(s){s!==mc&&s.next===null&&(mc===null?ep=mc=s:mc=mc.next=s),tp=!0,Gb||(Gb=!0,eV())}function Md(s,c){if(!Yb&&tp){Yb=!0;do for(var h=!1,v=ep;v!==null;){if(s!==0){var S=v.pendingLanes;if(S===0)var _=0;else{var P=v.suspendedLanes,q=v.pingedLanes;_=(1<<31-ar(42|s)+1)-1,_&=S&~(P&~q),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(h=!0,Z2(v,_))}else _=ct,_=Pl(v,v===$t?_:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(_&3)===0||vs(v,_)||(h=!0,Z2(v,_));v=v.next}while(h);Yb=!1}}function J7(){Y2()}function Y2(){tp=Gb=!1;var s=0;ko!==0&&uV()&&(s=ko);for(var c=rt(),h=null,v=ep;v!==null;){var S=v.next,_=K2(v,c);_===0?(v.next=null,h===null?ep=S:h.next=S,S===null&&(mc=h)):(h=v,(s!==0||(_&3)!==0)&&(tp=!0)),v=S}Cn!==0&&Cn!==5||Md(s),ko!==0&&(ko=0)}function K2(s,c){for(var h=s.suspendedLanes,v=s.pingedLanes,S=s.expirationTimes,_=s.pendingLanes&-62914561;0<_;){var P=31-ar(_),q=1<<P,X=S[P];X===-1?((q&h)===0||(q&v)!==0)&&(S[P]=sx(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&&rr(v),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||vs(s,h)){if(c=h&-h,c===s.callbackPriority)return c;switch(v!==null&&rr(v),cx(h)){case 2:case 8:h=am;break;case 32:h=Ml;break;case 268435456:h=im;break;default:h=Ml}return v=X2.bind(null,s),h=vr(h,v),s.callbackPriority=c,s.callbackNode=h,c}return v!==null&&v!==null&&rr(v),s.callbackPriority=2,s.callbackNode=null,2}function X2(s,c){if(Cn!==0&&Cn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var h=s.callbackNode;if(Jm()&&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:(k2(s,v,c),K2(s,rt()),s.callbackNode!=null&&s.callbackNode===h?X2.bind(null,s):null)}function Z2(s,c){if(Jm())return null;k2(s,c,!0)}function eV(){fV(function(){(yt&6)!==0?vr(ms,J7):Y2()})}function Kb(){if(ko===0){var s=Jl;s===0&&(s=He,He<<=1,(He&261888)===0&&(He=256)),ko=s}return ko}function Q2(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:cm(""+s)}function J2(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 tV(s,c,h,v,S){if(c==="submit"&&h&&h.stateNode===S){var _=Q2((S[_r]||null).action),P=v.submitter;P&&(c=(c=P[_r]||null)?Q2(c.formAction):P.getAttribute("formAction"),c!==null&&(_=c,P=null));var q=new hm("action","action",null,v,S);s.push({event:q,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(ko!==0){var X=P?J2(S,P):new FormData(S);pb(h,{pending:!0,data:X,method:S.method,action:_},null,X)}}else typeof _=="function"&&(q.preventDefault(),X=P?J2(S,P):new FormData(S),pb(h,{pending:!0,data:X,method:S.method,action:_},_,X))},currentTarget:S}]})}}for(var Xb=0;Xb<Mx.length;Xb++){var Zb=Mx[Xb],nV=Zb.toLowerCase(),rV=Zb[0].toUpperCase()+Zb.slice(1);Ta(nV,"on"+rV)}Ta(TA,"onAnimationEnd"),Ta(kA,"onAnimationIteration"),Ta(MA,"onAnimationStart"),Ta("dblclick","onDoubleClick"),Ta("focusin","onFocus"),Ta("focusout","onBlur"),Ta(x7,"onTransitionRun"),Ta(b7,"onTransitionStart"),Ta(w7,"onTransitionCancel"),Ta(PA,"onTransitionEnd"),Bl("onMouseEnter",["mouseout","mouseover"]),Bl("onMouseLeave",["mouseout","mouseover"]),Bl("onPointerEnter",["pointerout","pointerover"]),Bl("onPointerLeave",["pointerout","pointerover"]),ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ys("onBeforeInput",["compositionend","keypress","textInput","paste"]),ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ys("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(" "),aV=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pd));function ek(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 P=v.length-1;0<=P;P--){var q=v[P],X=q.instance,se=q.currentTarget;if(q=q.listener,X!==_&&S.isPropagationStopped())break e;_=q,S.currentTarget=se;try{_(S)}catch(ge){vm(ge)}S.currentTarget=null,_=X}else for(P=0;P<v.length;P++){if(q=v[P],X=q.instance,se=q.currentTarget,q=q.listener,X!==_&&S.isPropagationStopped())break e;_=q,S.currentTarget=se;try{_(S)}catch(ge){vm(ge)}S.currentTarget=null,_=X}}}}function ot(s,c){var h=c[ux];h===void 0&&(h=c[ux]=new Set);var v=s+"__bubble";h.has(v)||(tk(c,s,2,!1),h.add(v))}function Qb(s,c,h){var v=0;c&&(v|=4),tk(h,s,v,c)}var np="_reactListening"+Math.random().toString(36).slice(2);function Jb(s){if(!s[np]){s[np]=!0,YE.forEach(function(h){h!=="selectionchange"&&(aV.has(h)||Qb(h,!1,s),Qb(h,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[np]||(c[np]=!0,Qb("selectionchange",!1,c))}}function tk(s,c,h,v){switch(Tk(c)){case 2:var S=MV;break;case 8:S=PV;break;default:S=m0}h=S.bind(null,c,h,s),S=void 0,!xx||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 e0(s,c,h,v,S){var _=v;if((c&1)===0&&(c&2)===0&&v!==null)e:for(;;){if(v===null)return;var P=v.tag;if(P===3||P===4){var q=v.stateNode.containerInfo;if(q===S)break;if(P===4)for(P=v.return;P!==null;){var X=P.tag;if((X===3||X===4)&&P.stateNode.containerInfo===S)return;P=P.return}for(;q!==null;){if(P=$l(q),P===null)return;if(X=P.tag,X===5||X===6||X===26||X===27){v=_=P;continue e}q=q.parentNode}}v=v.return}oA(function(){var se=_,ge=gx(h),we=[];e:{var ce=RA.get(s);if(ce!==void 0){var he=hm,Ae=s;switch(s){case"keypress":if(dm(h)===0)break e;case"keydown":case"keyup":he=ZW;break;case"focusin":Ae="focus",he=Sx;break;case"focusout":Ae="blur",he=Sx;break;case"beforeblur":case"afterblur":he=Sx;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=cA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=BW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=e7;break;case TA:case kA:case MA:he=FW;break;case PA:he=n7;break;case"scroll":case"scrollend":he=IW;break;case"wheel":he=a7;break;case"copy":case"cut":case"paste":he=HW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=dA;break;case"toggle":case"beforetoggle":he=o7}var ze=(c&4)!==0,Mt=!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=td(Q,re),be!=null&&ze.push(Rd(Q,be,ie))),Mt)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!==vx&&(Ae=h.relatedTarget||h.fromElement)&&($l(Ae)||Ae[Dl]))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?$l(Ae):null,Ae!==null&&(Mt=o(Ae),ze=Ae.tag,Ae!==Mt||ze!==5&&ze!==27&&ze!==6)&&(Ae=null)):(he=null,Ae=se),he!==Ae)){if(ze=cA,be="onMouseLeave",re="onMouseEnter",Q="mouse",(s==="pointerout"||s==="pointerover")&&(ze=dA,be="onPointerLeave",re="onPointerEnter",Q="pointer"),Mt=he==null?ce:ed(he),ie=Ae==null?ce:ed(Ae),ce=new ze(be,Q+"leave",he,h,ge),ce.target=Mt,ce.relatedTarget=ie,be=null,$l(ge)===se&&(ze=new ze(re,Q+"enter",Ae,h,ge),ze.target=ie,ze.relatedTarget=Mt,be=ze),Mt=be,he&&Ae)t:{for(ze=iV,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&&nk(we,ce,he,ze,!1),Ae!==null&&Mt!==null&&nk(we,Mt,Ae,ze,!0)}}e:{if(ce=se?ed(se):window,he=ce.nodeName&&ce.nodeName.toLowerCase(),he==="select"||he==="input"&&ce.type==="file")var ht=xA;else if(gA(ce))if(bA)ht=v7;else{ht=m7;var De=h7}else he=ce.nodeName,!he||he.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?se&&px(se.elementType)&&(ht=xA):ht=p7;if(ht&&(ht=ht(s,se))){yA(we,ht,h,ge);break e}De&&De(s,ce,se),s==="focusout"&&se&&ce.type==="number"&&se.memoizedProps.value!=null&&mx(ce,"number",ce.value)}switch(De=se?ed(se):window,s){case"focusin":(gA(De)||De.contentEditable==="true")&&(Wl=De,Ax=se,cd=null);break;case"focusout":cd=Ax=Wl=null;break;case"mousedown":Tx=!0;break;case"contextmenu":case"mouseup":case"dragend":Tx=!1,EA(we,h,ge);break;case"selectionchange":if(y7)break;case"keydown":case"keyup":EA(we,h,ge)}var Qe;if(Nx)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 Hl?pA(s,h)&&(ut="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(ut="onCompositionStart");ut&&(fA&&h.locale!=="ko"&&(Hl||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&Hl&&(Qe=sA()):(po=ge,bx="value"in po?po.value:po.textContent,Hl=!0)),De=rp(se,ut),0<De.length&&(ut=new uA(ut,s,null,h,ge),we.push({event:ut,listeners:De}),Qe?ut.data=Qe:(Qe=vA(h),Qe!==null&&(ut.data=Qe)))),(Qe=l7?c7(s,h):u7(s,h))&&(ut=rp(se,"onBeforeInput"),0<ut.length&&(De=new uA("onBeforeInput","beforeinput",null,h,ge),we.push({event:De,listeners:ut}),De.data=Qe)),tV(we,s,se,h,ge)}ek(we,c)})}function Rd(s,c,h){return{instance:s,listener:c,currentTarget:h}}function rp(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=td(s,h),S!=null&&v.unshift(Rd(s,S,_)),S=td(s,c),S!=null&&v.push(Rd(s,S,_))),s.tag===3)return v;s=s.return}return[]}function iV(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function nk(s,c,h,v,S){for(var _=c._reactName,P=[];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=td(h,_),se!=null&&P.unshift(Rd(h,se,X))):S||(se=td(h,_),se!=null&&P.push(Rd(h,se,X)))),h=h.return}P.length!==0&&s.push({event:c,listeners:P})}var oV=/\r\n?/g,sV=/\u0000|\uFFFD/g;function rk(s){return(typeof s=="string"?s:""+s).replace(oV,`
|
||
`).replace(sV,"")}function ak(s,c){return c=rk(c),rk(s)===c}function kt(s,c,h,v,S,_){switch(h){case"children":typeof v=="string"?c==="body"||c==="textarea"&&v===""||ql(s,v):(typeof v=="number"||typeof v=="bigint")&&c!=="body"&&ql(s,""+v);break;case"className":sm(s,"class",v);break;case"tabIndex":sm(s,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":sm(s,h,v);break;case"style":aA(s,v,_);break;case"data":if(c!=="object"){sm(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=cm(""+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=cm(""+v),s.setAttribute(h,v);break;case"onClick":v!=null&&(s.onclick=_i);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=cm(""+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),om(s,"popover",v);break;case"xlinkActuate":Si(s,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":Si(s,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":Si(s,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":Si(s,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":Si(s,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":Si(s,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":Si(s,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":Si(s,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":Si(s,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":om(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=DW.get(h)||h,om(s,h,v))}}function t0(s,c,h,v,S,_){switch(h){case"style":aA(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"?ql(s,v):(typeof v=="number"||typeof v=="bigint")&&ql(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=_i);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!KE.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[_r]||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,""):om(s,h,v)}}}function Qn(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 P=h[_];if(P!=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,_,P,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=_=P=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":P=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)}}eA(s,_,q,X,se,P,S,!1);return;case"select":ot("invalid",s),v=P=_=null;for(S in h)if(h.hasOwnProperty(S)&&(q=h[S],q!=null))switch(S){case"value":_=q;break;case"defaultValue":P=q;break;case"multiple":v=q;default:kt(s,c,S,q,h,null)}c=_,h=P,s.multiple=!!v,c!=null?zl(s,!!v,c,!1):h!=null&&zl(s,!!v,h,!0);return;case"textarea":ot("invalid",s),_=S=v=null;for(P in h)if(h.hasOwnProperty(P)&&(q=h[P],q!=null))switch(P){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,P,q,h,null)}nA(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(px(c)){for(ge in h)h.hasOwnProperty(ge)&&(v=h[ge],v!==void 0&&t0(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 lV(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,P=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":P=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)}}hx(s,P,q,X,se,ge,_,S);return;case"select":he=P=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":P=_;default:_!==X&&kt(s,c,S,_,v,X)}c=q,h=P,v=he,ce!=null?zl(s,!!h,ce,!1):!!v!=!!h&&(c!=null?zl(s,!!h,c,!0):zl(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(P in v)if(S=v[P],_=h[P],v.hasOwnProperty(P)&&(S!=null||_!=null))switch(P){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,P,S,v,_)}tA(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(px(c)){for(var Mt in h)ce=h[Mt],h.hasOwnProperty(Mt)&&ce!==void 0&&!v.hasOwnProperty(Mt)&&t0(s,c,Mt,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||t0(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 ik(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cV(){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,P=S.initiatorType,q=S.duration;if(_&&q&&ik(P)){for(P=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&&ik(we)&&(X=X.responseEnd,P+=ge*(X<q?1:(q-se)/(X-se)))}if(--v,c+=8*(_+P)/(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 n0=null,r0=null;function ap(s){return s.nodeType===9?s:s.ownerDocument}function ok(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 sk(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 a0(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 i0=null;function uV(){var s=window.event;return s&&s.type==="popstate"?s===i0?!1:(i0=s,!0):(i0=null,!1)}var lk=typeof setTimeout=="function"?setTimeout:void 0,dV=typeof clearTimeout=="function"?clearTimeout:void 0,ck=typeof Promise=="function"?Promise:void 0,fV=typeof queueMicrotask=="function"?queueMicrotask:typeof ck<"u"?function(s){return ck.resolve(null).then(s).catch(hV)}:lk;function hV(s){setTimeout(function(){throw s})}function Mo(s){return s==="head"}function uk(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),yc(c);return}v--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")v++;else if(h==="html")Dd(s.ownerDocument.documentElement);else if(h==="head"){h=s.ownerDocument.head,Dd(h);for(var _=h.firstChild;_;){var P=_.nextSibling,q=_.nodeName;_[Ju]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&_.rel.toLowerCase()==="stylesheet"||h.removeChild(_),_=P}}else h==="body"&&Dd(s.ownerDocument.body);h=S}while(h);yc(c)}function dk(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 o0(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":o0(h),dx(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}s.removeChild(h)}}function mV(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[Ju])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=pa(s.nextSibling),s===null)break}return null}function pV(s,c,h){if(c==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!h||(s=pa(s.nextSibling),s===null))return null;return s}function fk(s,c){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!c||(s=pa(s.nextSibling),s===null))return null;return s}function s0(s){return s.data==="$?"||s.data==="$~"}function l0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function vV(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 pa(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 c0=null;function hk(s){s=s.nextSibling;for(var c=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"||h==="/&"){if(c===0)return pa(s.nextSibling);c--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||c++}s=s.nextSibling}return null}function mk(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 pk(s,c,h){switch(c=ap(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 Dd(s){for(var c=s.attributes;c.length;)s.removeAttributeNode(c[0]);dx(s)}var va=new Map,vk=new Set;function ip(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var zi=R.d;R.d={f:gV,r:yV,D:xV,C:bV,L:wV,m:jV,X:_V,S:SV,M:NV};function gV(){var s=zi.f(),c=Xm();return s||c}function yV(s){var c=Il(s);c!==null&&c.tag===5&&c.type==="form"?PT(c):zi.r(s)}var pc=typeof document>"u"?null:document;function gk(s,c,h){var v=pc;if(v&&typeof c=="string"&&c){var S=la(c);S='link[rel="'+s+'"][href="'+S+'"]',typeof h=="string"&&(S+='[crossorigin="'+h+'"]'),vk.has(S)||(vk.add(S),s={rel:s,crossOrigin:h,href:c},v.querySelector(S)===null&&(c=v.createElement("link"),Qn(c,"link",s),Ln(c),v.head.appendChild(c)))}}function xV(s){zi.D(s),gk("dns-prefetch",s,null)}function bV(s,c){zi.C(s,c),gk("preconnect",s,c)}function wV(s,c,h){zi.L(s,c,h);var v=pc;if(v&&s&&c){var S='link[rel="preload"][as="'+la(c)+'"]';c==="image"&&h&&h.imageSrcSet?(S+='[imagesrcset="'+la(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(S+='[imagesizes="'+la(h.imageSizes)+'"]')):S+='[href="'+la(s)+'"]';var _=S;switch(c){case"style":_=vc(s);break;case"script":_=gc(s)}va.has(_)||(s=p({rel:"preload",href:c==="image"&&h&&h.imageSrcSet?void 0:s,as:c},h),va.set(_,s),v.querySelector(S)!==null||c==="style"&&v.querySelector($d(_))||c==="script"&&v.querySelector(Id(_))||(c=v.createElement("link"),Qn(c,"link",s),Ln(c),v.head.appendChild(c)))}}function jV(s,c){zi.m(s,c);var h=pc;if(h&&s){var v=c&&typeof c.as=="string"?c.as:"script",S='link[rel="modulepreload"][as="'+la(v)+'"][href="'+la(s)+'"]',_=S;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=gc(s)}if(!va.has(_)&&(s=p({rel:"modulepreload",href:s},c),va.set(_,s),h.querySelector(S)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Id(_)))return}v=h.createElement("link"),Qn(v,"link",s),Ln(v),h.head.appendChild(v)}}}function SV(s,c,h){zi.S(s,c,h);var v=pc;if(v&&s){var S=Ll(v).hoistableStyles,_=vc(s);c=c||"default";var P=S.get(_);if(!P){var q={loading:0,preload:null};if(P=v.querySelector($d(_)))q.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":c},h),(h=va.get(_))&&u0(s,h);var X=P=v.createElement("link");Ln(X),Qn(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,op(P,c,v)}P={type:"stylesheet",instance:P,count:1,state:q},S.set(_,P)}}}function _V(s,c){zi.X(s,c);var h=pc;if(h&&s){var v=Ll(h).hoistableScripts,S=gc(s),_=v.get(S);_||(_=h.querySelector(Id(S)),_||(s=p({src:s,async:!0},c),(c=va.get(S))&&d0(s,c),_=h.createElement("script"),Ln(_),Qn(_,"link",s),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},v.set(S,_))}}function NV(s,c){zi.M(s,c);var h=pc;if(h&&s){var v=Ll(h).hoistableScripts,S=gc(s),_=v.get(S);_||(_=h.querySelector(Id(S)),_||(s=p({src:s,async:!0,type:"module"},c),(c=va.get(S))&&d0(s,c),_=h.createElement("script"),Ln(_),Qn(_,"link",s),h.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},v.set(S,_))}}function yk(s,c,h,v){var S=(S=xe.current)?ip(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=vc(h.href),h=Ll(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=vc(h.href);var _=Ll(S).hoistableStyles,P=_.get(s);if(P||(S=S.ownerDocument||S,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(s,P),(_=S.querySelector($d(s)))&&!_._p&&(P.instance=_,P.state.loading=5),va.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},va.set(s,h),_||OV(S,s,h,P.state))),c&&v===null)throw Error(r(528,""));return P}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=gc(h),h=Ll(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 vc(s){return'href="'+la(s)+'"'}function $d(s){return'link[rel="stylesheet"]['+s+"]"}function xk(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function OV(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}),Qn(c,"link",h),Ln(c),s.head.appendChild(c))}function gc(s){return'[src="'+la(s)+'"]'}function Id(s){return"script[async]"+s}function bk(s,c,h){if(c.count++,c.instance===null)switch(c.type){case"style":var v=s.querySelector('style[data-href~="'+la(h.href)+'"]');if(v)return c.instance=v,Ln(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"),Ln(v),Qn(v,"style",S),op(v,h.precedence,s),c.instance=v;case"stylesheet":S=vc(h.href);var _=s.querySelector($d(S));if(_)return c.state.loading|=4,c.instance=_,Ln(_),_;v=xk(h),(S=va.get(S))&&u0(v,S),_=(s.ownerDocument||s).createElement("link"),Ln(_);var P=_;return P._p=new Promise(function(q,X){P.onload=q,P.onerror=X}),Qn(_,"link",v),c.state.loading|=4,op(_,h.precedence,s),c.instance=_;case"script":return _=gc(h.src),(S=s.querySelector(Id(_)))?(c.instance=S,Ln(S),S):(v=h,(S=va.get(_))&&(v=p({},h),d0(v,S)),s=s.ownerDocument||s,S=s.createElement("script"),Ln(S),Qn(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,op(v,h.precedence,s));return c.instance}function op(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,P=0;P<v.length;P++){var q=v[P];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 u0(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.title==null&&(s.title=c.title)}function d0(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.integrity==null&&(s.integrity=c.integrity)}var sp=null;function wk(s,c,h){if(sp===null){var v=new Map,S=sp=new Map;S.set(h,v)}else S=sp,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(!(_[Ju]||_[Yn]||s==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var P=_.getAttribute(c)||"";P=s+P;var q=v.get(P);q?q.push(_):v.set(P,[_])}}return v}function jk(s,c,h){s=s.ownerDocument||s,s.head.insertBefore(h,c==="title"?s.querySelector("head > title"):null)}function CV(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 Sk(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function EV(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=vc(v.href),_=c.querySelector($d(S));if(_){c=_._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=lp.bind(s),c.then(s,s)),h.state.loading|=4,h.instance=_,Ln(_);return}_=c.ownerDocument||c,v=xk(v),(S=va.get(S))&&u0(v,S),_=_.createElement("link"),Ln(_);var P=_;P._p=new Promise(function(q,X){P.onload=q,P.onerror=X}),Qn(_,"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=lp.bind(s),c.addEventListener("load",h),c.addEventListener("error",h))}}var f0=0;function AV(s,c){return s.stylesheets&&s.count===0&&up(s,s.stylesheets),0<s.count||0<s.imgCount?function(h){var v=setTimeout(function(){if(s.stylesheets&&up(s,s.stylesheets),s.unsuspend){var _=s.unsuspend;s.unsuspend=null,_()}},6e4+c);0<s.imgBytes&&f0===0&&(f0=62500*cV());var S=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&up(s,s.stylesheets),s.unsuspend)){var _=s.unsuspend;s.unsuspend=null,_()}},(s.imgBytes>f0?50:800)+c);return s.unsuspend=h,function(){s.unsuspend=null,clearTimeout(v),clearTimeout(S)}}:null}function lp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)up(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var cp=null;function up(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,cp=new Map,c.forEach(TV,s),cp=null,lp.call(s))}function TV(s,c){if(!(c.state.loading&4)){var h=cp.get(s);if(h)var v=h.get(null);else{h=new Map,cp.set(s,h);for(var S=s.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<S.length;_++){var P=S[_];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(h.set(P.dataset.precedence,P),v=P)}v&&h.set(null,v)}S=c.instance,P=S.getAttribute("data-precedence"),_=h.get(P)||v,_===v&&h.set(null,S),h.set(P,S),this.count++,v=lp.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 Ld={$$typeof:C,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function kV(s,c,h,v,S,_,P,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=gs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gs(0),this.hiddenUpdates=gs(null),this.identifierPrefix=v,this.onUncaughtError=S,this.onCaughtError=_,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function _k(s,c,h,v,S,_,P,q,X,se,ge,we){return s=new kV(s,c,h,P,X,se,ge,we,q),c=1,_===!0&&(c|=24),_=qr(3,null,null,c),s.current=_,_.stateNode=s,c=Wx(),c.refCount++,s.pooledCache=c,c.refCount++,_.memoizedState={element:v,isDehydrated:h,cache:c},Kx(_),s}function Nk(s){return s?(s=Yl,s):Yl}function Ok(s,c,h,v,S,_){S=Nk(S),v.context===null?v.context=S:v.pendingContext=S,v=wo(c),v.payload={element:h},_=_===void 0?null:_,_!==null&&(v.callback=_),h=jo(s,v,c),h!==null&&(Tr(h,s,c),vd(h,s,c))}function Ck(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<c?h:c}}function h0(s,c){Ck(s,c),(s=s.alternate)&&Ck(s,c)}function Ek(s){if(s.tag===13||s.tag===31){var c=js(s,67108864);c!==null&&Tr(c,s,67108864),h0(s,67108864)}}function Ak(s){if(s.tag===13||s.tag===31){var c=Vr();c=lx(c);var h=js(s,c);h!==null&&Tr(h,s,c),h0(s,c)}}var dp=!0;function MV(s,c,h,v){var S=L.T;L.T=null;var _=R.p;try{R.p=2,m0(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,m0(s,c,h,v)}finally{R.p=_,L.T=S}}function m0(s,c,h,v){if(dp){var S=p0(v);if(S===null)e0(s,c,v,fp,h),kk(s,v);else if(DV(S,s,c,h,v))v.stopPropagation();else if(kk(s,v),c&4&&-1<RV.indexOf(s)){for(;S!==null;){var _=Il(S);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var P=tt(_.pendingLanes);if(P!==0){var q=_;for(q.pendingLanes|=2,q.entangledLanes|=2;P;){var X=1<<31-ar(P);q.entanglements[1]|=X,P&=~X}Qa(_),(yt&6)===0&&(Ym=rt()+500,Md(0))}}break;case 31:case 13:q=js(_,2),q!==null&&Tr(q,_,2),Xm(),h0(_,2)}if(_=p0(v),_===null&&e0(s,c,v,fp,h),_===S)break;S=_}S!==null&&v.stopPropagation()}else e0(s,c,v,null,h)}}function p0(s){return s=gx(s),v0(s)}var fp=null;function v0(s){if(fp=null,s=$l(s),s!==null){var c=o(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 fp=s,null}function Tk(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($n()){case ms:return 2;case am:return 8;case Ml:case rx:return 32;case im:return 268435456;default:return 32}default:return 32}}var g0=!1,Po=null,Ro=null,Do=null,Bd=new Map,zd=new Map,$o=[],RV="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 kk(s,c){switch(s){case"focusin":case"focusout":Po=null;break;case"dragenter":case"dragleave":Ro=null;break;case"mouseover":case"mouseout":Do=null;break;case"pointerover":case"pointerout":Bd.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":zd.delete(c.pointerId)}}function qd(s,c,h,v,S,_){return s===null||s.nativeEvent!==_?(s={blockedOn:c,domEventName:h,eventSystemFlags:v,nativeEvent:_,targetContainers:[S]},c!==null&&(c=Il(c),c!==null&&Ek(c)),s):(s.eventSystemFlags|=v,c=s.targetContainers,S!==null&&c.indexOf(S)===-1&&c.push(S),s)}function DV(s,c,h,v,S){switch(c){case"focusin":return Po=qd(Po,s,c,h,v,S),!0;case"dragenter":return Ro=qd(Ro,s,c,h,v,S),!0;case"mouseover":return Do=qd(Do,s,c,h,v,S),!0;case"pointerover":var _=S.pointerId;return Bd.set(_,qd(Bd.get(_)||null,s,c,h,v,S)),!0;case"gotpointercapture":return _=S.pointerId,zd.set(_,qd(zd.get(_)||null,s,c,h,v,S)),!0}return!1}function Mk(s){var c=$l(s.target);if(c!==null){var h=o(c);if(h!==null){if(c=h.tag,c===13){if(c=l(h),c!==null){s.blockedOn=c,VE(s.priority,function(){Ak(h)});return}}else if(c===31){if(c=u(h),c!==null){s.blockedOn=c,VE(s.priority,function(){Ak(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 hp(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var h=p0(s.nativeEvent);if(h===null){h=s.nativeEvent;var v=new h.constructor(h.type,h);vx=v,h.target.dispatchEvent(v),vx=null}else return c=Il(h),c!==null&&Ek(c),s.blockedOn=h,!1;c.shift()}return!0}function Pk(s,c,h){hp(s)&&h.delete(c)}function $V(){g0=!1,Po!==null&&hp(Po)&&(Po=null),Ro!==null&&hp(Ro)&&(Ro=null),Do!==null&&hp(Do)&&(Do=null),Bd.forEach(Pk),zd.forEach(Pk)}function mp(s,c){s.blockedOn===c&&(s.blockedOn=null,g0||(g0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$V)))}var pp=null;function Rk(s){pp!==s&&(pp=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){pp===s&&(pp=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(v0(v||h)===null)continue;break}var _=Il(h);_!==null&&(s.splice(c,3),c-=3,pb(_,{pending:!0,data:S,method:h.method,action:v},v,S))}}))}function yc(s){function c(X){return mp(X,s)}Po!==null&&mp(Po,s),Ro!==null&&mp(Ro,s),Do!==null&&mp(Do,s),Bd.forEach(c),zd.forEach(c);for(var h=0;h<$o.length;h++){var v=$o[h];v.blockedOn===s&&(v.blockedOn=null)}for(;0<$o.length&&(h=$o[0],h.blockedOn===null);)Mk(h),h.blockedOn===null&&$o.shift();if(h=(s.ownerDocument||s).$$reactFormReplay,h!=null)for(v=0;v<h.length;v+=3){var S=h[v],_=h[v+1],P=S[_r]||null;if(typeof _=="function")P||Rk(h);else if(P){var q=null;if(_&&_.hasAttribute("formAction")){if(S=_,P=_[_r]||null)q=P.formAction;else if(v0(S)!==null)continue}else q=P.action;typeof q=="function"?h[v+1]=q:(h.splice(v,3),v-=3),Rk(h)}}}function Dk(){function s(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(P){return S=P})},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 y0(s){this._internalRoot=s}vp.prototype.render=y0.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));var h=c.current,v=Vr();Ok(h,v,s,c,null,null)},vp.prototype.unmount=y0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;Ok(s.current,2,null,s,null,null),Xm(),c[Dl]=null}};function vp(s){this._internalRoot=s}vp.prototype.unstable_scheduleHydration=function(s){if(s){var c=WE();s={blockedOn:null,target:s,priority:c};for(var h=0;h<$o.length&&c!==0&&c<$o[h].priority;h++);$o.splice(h,0,s),h===0&&Mk(s)}};var $k=t.version;if($k!=="19.2.0")throw Error(r(527,$k,"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 IV={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gp.isDisabled&&gp.supportsFiber)try{ps=gp.inject(IV),yr=gp}catch{}}return Ud.createRoot=function(s,c){if(!a(s))throw Error(r(299));var h=!1,v="",S=UT,_=HT,P=WT;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&&(P=c.onRecoverableError)),c=_k(s,1,!1,null,null,h,v,null,S,_,P,Dk),s[Dl]=c.current,Jb(s),new y0(c)},Ud.hydrateRoot=function(s,c,h){if(!a(s))throw Error(r(299));var v=!1,S="",_=UT,P=HT,q=WT,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&&(P=h.onCaughtError),h.onRecoverableError!==void 0&&(q=h.onRecoverableError),h.formState!==void 0&&(X=h.formState)),c=_k(s,1,!0,c,h??null,v,S,X,_,P,q,Dk),c.context=Nk(null),h=c.current,v=Vr(),v=lx(v),S=wo(v),S.callback=null,jo(h,S,v),h=v,c.current.lanes=h,Qu(c,h),Qa(c),s[Dl]=c.current,Jb(s),new vp(c)},Ud.version="19.2.0",Ud}var Vk;function GV(){if(Vk)return w0.exports;Vk=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(),w0.exports=VV(),w0.exports}var YV=GV();const l_=new WeakMap,KV=new WeakMap,uv={current:[]};let N0=!1,vf=0;const sf=new Set,xp=new Map;function BL(e){for(const t of e){if(uv.current.includes(t))continue;uv.current.push(t),t.recompute();const n=KV.get(t);if(n)for(const r of n){const a=l_.get(r);a?.length&&BL(a)}}}function XV(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function ZV(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function zL(e){if(vf>0&&!xp.has(e)&&xp.set(e,e.prevState),sf.add(e),!(vf>0)&&!N0)try{for(N0=!0;sf.size>0;){const t=Array.from(sf);sf.clear();for(const n of t){const r=xp.get(n)??n.prevState;n.prevState=r,XV(n)}for(const n of t){const r=l_.get(n);r&&(uv.current.push(n),BL(r))}for(const n of t){const r=l_.get(n);if(r)for(const a of r)ZV(a)}}}finally{N0=!1,uv.current=[],xp.clear()}}function gf(e){vf++;try{e()}finally{if(vf--,vf===0){const t=sf.values().next().value;t&&zL(t)}}}function QV(e){return typeof e=="function"}class JV{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,o;this.listeners.add(r);const l=(o=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:o.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):QV(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),zL(this)}}const Vo="__TSR_index",Gk="popstate",Yk="beforeunload";function eG(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()},o=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=dv(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[Vo];u=Kk(f+1,u),o({task:()=>{e.pushState(l,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:u})},replace:(l,u,d)=>{const f=t.state[Vo];u=Kk(f,u),o({task:()=>{e.replaceState(l,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:u})},go:(l,u)=>{o({task:()=>{e.go(l),a({type:"GO",index:l})},navigateOpts:u,type:"GO"})},back:l=>{o({task:()=>{e.back(l?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{o({task:()=>{e.forward(l?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Vo]!==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 Kk(e,t){t||(t={});const n=xO();return{...t,key:n,__TSR_key:n,[Vo]:e}}function tG(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const o=()=>a,l=M=>a=M,u=(M=>M),d=(()=>dv(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const M=xO();t.history.replaceState({[Vo]:0,key:M,__TSR_key:M},"")}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=(M,$,z)=>{const D=u($);N||(m=f),f=dv($,z),w={href:D,state:z,isPush:w?.isPush||M==="push"},N||(N=Promise.resolve().then(()=>O()))},A=M=>{f=d(),T.notify({type:M})},E=async()=>{if(g){g=!1;return}const M=d(),$=M.state[Vo]-f.state[Vo],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=o();if(typeof document<"u"&&G.length){for(const L of G)if(await L.blockerFn({currentLocation:f,nextLocation:M,action:V})){g=!0,t.history.go(1),T.notify(H);return}}}f=d(),T.notify(H)},k=M=>{if(j){j=!1;return}let $=!1;const z=o();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 M.preventDefault(),M.returnValue=""},T=eG({getLocation:b,getLength:()=>t.history.length,pushState:(M,$)=>C("push",M,$),replaceState:(M,$)=>C("replace",M,$),back:M=>(M&&(x=!0),j=!0,t.history.back()),forward:M=>{M&&(x=!0),j=!0,t.history.forward()},go:M=>{p=!0,t.history.go(M)},createHref:M=>u(M),flush:O,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Yk,k,{capture:!0}),t.removeEventListener(Gk,E)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(Yk,k,{capture:!0}),t.addEventListener(Gk,E),t.history.pushState=function(...M){const $=n.apply(t.history,M);return T._ignoreSubscribers||A("PUSH"),$},t.history.replaceState=function(...M){const $=r.apply(t.history,M);return T._ignoreSubscribers||A("REPLACE"),$},T}function dv(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=xO();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||{[Vo]:0,key:a,__TSR_key:a}}}function xO(){return(Math.random()+1).toString(36).substring(7)}function c_(e){return e[e.length-1]}function nG(e){return typeof e=="function"}function Ks(e,t){return nG(e)?e(t):e}const rG=Object.prototype.hasOwnProperty;function wa(e,t){if(e===t)return e;const n=t,r=Qk(e)&&Qk(n);if(!r&&!(fv(e)&&fv(n)))return n;const a=r?e:Xk(e);if(!a)return n;const o=r?n:Xk(n);if(!o)return n;const l=a.length,u=o.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:o[m],g=e[p],x=n[p];if(g===x){d[p]=g,(r?m<l:rG.call(e,p))&&f++;continue}if(g===null||x===null||typeof g!="object"||typeof x!="object"){d[p]=x;continue}const j=wa(g,x);d[p]=j,j===g&&f++}return l===u&&f===l?e:d}function Xk(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 fv(e){if(!Zk(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Zk(n)||!n.hasOwnProperty("isPrototypeOf"))}function Zk(e){return Object.prototype.toString.call(e)==="[object Object]"}function Qk(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xs(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(!Xs(e[r],t[r],n))return!1;return!0}if(fv(e)&&fv(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Xs(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 o=0;for(const l in t)if((!r||t[l]!==void 0)&&(o++,o>a||!Xs(e[l],t[l],n)))return!1;return a===o}return!1}function Xc(e){let t,n;const r=new Promise((a,o)=>{t=a,n=o});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 Go(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}const aG=Array.from(new Map([["%","%25"],["\\","%5C"]]).values());function Jk(e,t=aG){function n(a,o,l=0){for(let u=l;u<o.length;u++){const d=o[u].toUpperCase();if(a.includes(d)){const f=a.split(d),m=[];for(const p of f)m.push(n(p,o,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 iG="Invariant failed";function ur(e,t){if(!e)throw new Error(iG)}const ui=0,il=1,Zc=2,Qc=3;function Zi(e){return bO(e.filter(t=>t!==void 0).join("/"))}function bO(e){return e.replace(/\/{2,}/g,"/")}function wO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Yo(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Zp(e){return Yo(wO(e))}function hv(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function oG(e,t,n){return hv(e,n)===hv(t,n)}function sG(e){const{type:t,value:n}=e;if(t===ui)return n;const{prefixSegment:r,suffixSegment:a}=e;if(t===il){const o=n.substring(1);if(r&&a)return`${r}{$${o}}${a}`;if(r)return`${r}{$${o}}`;if(a)return`{$${o}}${a}`}if(t===Qc){const o=n.substring(1);return r&&a?`${r}{-$${o}}${a}`:r?`${r}{-$${o}}`:a?`{-$${o}}${a}`:`{-$${o}}`}if(t===Zc){if(r&&a)return`${r}{$}${a}`;if(r)return`${r}{$}`;if(a)return`{$}${a}`}return n}function lG({base:e,to:t,trailingSlash:n="never",parseCache:r}){let a=Jc(e,r).slice();const o=Jc(t,r);a.length>1&&c_(a)?.value==="/"&&a.pop();for(let d=0,f=o.length;d<f;d++){const m=o[d],p=m.value;p==="/"?d?d===f-1&&a.push(m):a=[m]:p===".."?a.pop():p==="."||a.push(m)}a.length>1&&(c_(a).value==="/"?n==="never"&&a.pop():n==="always"&&a.push({type:ui,value:"/"}));const l=a.map(sG);return Zi(l)}const Jc=(e,t)=>{if(!e)return[];const n=t?.get(e);if(n)return n;const r=mG(e);return t?.set(e,r),r},cG=/^\$.{1,}$/,uG=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,dG=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,fG=/^\$$/,hG=/^(.*?)\{\$\}(.*)$/;function mG(e){e=bO(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:ui,value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(r=>{const a=r.match(hG);if(a){const u=a[1],d=a[2];return{type:Zc,value:"$",prefixSegment:u||void 0,suffixSegment:d||void 0}}const o=r.match(dG);if(o){const u=o[1],d=o[2],f=o[3];return{type:Qc,value:d,prefixSegment:u||void 0,suffixSegment:f||void 0}}const l=r.match(uG);if(l){const u=l[1],d=l[2],f=l[3];return{type:il,value:""+d,prefixSegment:u||void 0,suffixSegment:f||void 0}}if(cG.test(r)){const u=r.substring(1);return{type:il,value:"$"+u,prefixSegment:void 0,suffixSegment:void 0}}return fG.test(r)?{type:Zc,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:ui,value:r}})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:ui,value:"/"})),t}function O0({path:e,params:t,decodeCharMap:n,parseCache:r}){const a=Jc(e,r);function o(f){const m=t[f],p=typeof m=="string";return f==="*"||f==="_splat"?p?encodeURI(m):m:p?pG(m,n):m}let l=!1;const u={},d=Zi(a.map(f=>{if(f.type===ui)return f.value;if(f.type===Zc){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=o("_splat");return`${m}${g}${p}`}if(f.type===il){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}${o(m)??"undefined"}${g}`}if(f.type===Qc){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}${o(m)??""}${g}`)}return f.value}));return{usedParams:u,interpolatedPath:d,isMissingParams:l}}function pG(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function u_(e,t,n){const r=vG(e,t,n);if(!(t.to&&!r))return r??{}}function vG(e,{to:t,fuzzy:n,caseSensitive:r},a){const o=t,l=Jc(e.startsWith("/")?e:`/${e}`,a),u=Jc(o.startsWith("/")?o:`/${o}`,a),d={};return gG(l,u,d,n,r)?d:void 0}function gG(e,t,n,r,a){let o=0,l=0;for(;o<e.length||l<t.length;){const u=e[o],d=t[l];if(d){if(d.type===Zc){const f=e.slice(o);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(Zi(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(Zi(f.map(p=>p.value)));return n["*"]=m,n._splat=m,!0}if(d.type===ui){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;o++,l++;continue}else return!1}if(d.type===il){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,o++),l++;continue}if(d.type===Qc){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===ui&&x.value===u.value){p=!1;break}if(x?.type===il||x?.type===Zc){e.length<t.length&&(p=!1);break}}p&&(f=decodeURIComponent(u.value),m=!0)}m&&(n[d.value.substring(1)]=f,o++),l++;continue}}if(o<e.length&&l>=t.length)return n["**"]=Zi(e.slice(o).map(f=>f.value)),!!r&&t[t.length-1]?.value!=="/";if(l<t.length&&o>=e.length){for(let f=l;f<t.length;f++)if(t[f]?.type!==Qc)return!1;break}break}return!0}const yG=.75,xG=1,bG=.5,wG=.4,jG=.25,SG=.2,_G=.05,NG=.02,OG=.01,eM=2e-4,tM=1e-4;function nM(e,t){return e.prefixSegment&&e.suffixSegment?t+_G+eM*e.prefixSegment.length+tM*e.suffixSegment.length:e.prefixSegment?t+NG+eM*e.prefixSegment.length:e.suffixSegment?t+OG+tM*e.suffixSegment.length:t}function CG(e){const t=[];return e.forEach((r,a)=>{if(r.isRoot||!r.path)return;const o=wO(r.fullPath);let l=Jc(o),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 yG;if(p.type===ui)return xG;let x;p.type===il?x=bG:p.type===Qc?(x=wG,d++):x=jG;for(let j=g+1;j<l.length;j++){const b=l[j];if(b.type===ui&&b.value!=="/")return f=!0,nM(p,x+SG)}return nM(p,x)});t.push({child:r,trimmed:o,parsed:l,index:a,scores:m,optionalParamCount:d,hasStaticAfter:f})}),t.sort((r,a)=>{const o=Math.min(r.scores.length,a.scores.length);for(let l=0;l<o;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<o;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 EG({routeTree:e,initRoute:t}){const n={},r={},a=l=>{l.forEach((u,d)=>{t?.(u,d);const f=n[u.id];if(ur(!f,`Duplicate routes found with id: ${String(u.id)}`),n[u.id]=u,!u.isRoot&&u.path){const p=Yo(u.fullPath);(!r[p]||u.fullPath.endsWith("/"))&&(r[p]=u)}const m=u.children;m?.length&&a(m)})};a([e]);const o=CG(Object.values(n));return{routesById:n,routesByPath:r,flatRoutes:o}}function Fa(e){return!!e?.isNotFound}function AG(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const mv="tsr-scroll-restoration-v1_3",TG=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function kG(){const e=AG();if(!e)return null;const t=e.getItem(mv);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ks(r,n)||n,e.setItem(mv,JSON.stringify(n)))}}const bp=kG(),d_=e=>e.state.__TSR_key||e.href;function MG(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 pv=!1;function qL({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:o}){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];pv=!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=(o??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)}}pv=!1}function PG(e,t){if(!bp&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!bp))return;e.isScrollRestorationSetup=!0,pv=!1;const r=e.options.getScrollRestorationKey||d_;window.history.scrollRestoration="manual";const a=o=>{if(pv||!e.isScrollRestoring)return;let l="";if(o.target===document||o.target===window)l="window";else{const d=o.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=MG(o.target)}const u=r(e.state.location);bp.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",TG(a,100),!0),e.subscribe("onRendered",o=>{const l=r(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(qL({storageKey:mv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&bp.set(u=>(u[l]||={},u)))})}function RG(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 DG(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 C0(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function $G(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const o=n[r];o==null?n[r]=C0(a):Array.isArray(o)?o.push(C0(a)):n[r]=[o,C0(a)]}return n}const IG=BG(JSON.parse),LG=zG(JSON.stringify,JSON.parse);function BG(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=$G(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function zG(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 o=DG(a,r);return o?`?${o}`:""}}const Zr="__root__";function FL(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 ii(e){return e instanceof Response&&!!e.options}function qG(e){const t=new Map;let n,r;const a=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const l=t.get(o);if(l)return a(l),l.value},set(o,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(o);if(u)u.value=l,a(u);else{const d={key:o,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(o,d)}}}}const Qp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Rg=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),UL=(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),ur(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);ur(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,UL(e,t))},Uo=(e,t,n)=>{if(!(!ii(n)&&!Fa(n))){if(ii(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=ii(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),Fa(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ii(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(UL(e,n),n)}},HL=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Hd=(e,t,n,r)=>{const{id:a,routeId:o}=e.matches[t],l=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Uo(e,e.router.getMatch(a),n);try{l.options.onError?.(n)}catch(u){n=u,Uo(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}))},FG=(e,t,n,r)=>{const a=e.router.getMatch(t),o=e.matches[n-1]?.id,l=o?e.router.getMatch(o):void 0;if(e.router.isShell()){a.ssr=r.id===Zr;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:wp(f,a.searchError),params:wp(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:wp(x.search,x.searchError),params:wp(x.params,x.paramsError),ssr:x.ssr}))},g=r.options.ssr(p);if(Go(g))return g.then(x=>{a.ssr=u(x??d)});a.ssr=u(g??d)},WL=(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&&!Rg(e,t)&&(n.options.loader||n.options.beforeLoad||YL(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Qp(e)},a);r._nonReactive.pendingTimeout=l}},UG=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;WL(e,t,n,r);const a=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Uo(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},HG=(e,t,n,r)=>{const a=e.router.getMatch(t),o=a._nonReactive.loadPromise;a._nonReactive.loadPromise=Xc(()=>{o?.resolve()});const{paramsError:l,searchError:u}=a;l&&Hd(e,n,l,"PARSE_PARAMS"),u&&Hd(e,n,u,"VALIDATE_SEARCH"),WL(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){gf(()=>{j(),b()});return}a._nonReactive.beforeLoadPromise=Xc();const{search:w,params:N,cause:O}=a,C=Rg(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){gf(()=>{j(),b()});return}(ii(T)||Fa(T))&&(j(),Hd(e,n,T,"BEFORE_LOAD")),gf(()=>{j(),e.updateMatch(t,M=>({...M,__beforeLoadContext:T,context:{...M.context,...T}})),b()})};let k;try{if(k=r.options.beforeLoad(A),Go(k))return j(),k.catch(T=>{Hd(e,n,T,"BEFORE_LOAD")}).then(E)}catch(T){j(),Hd(e,n,T,"BEFORE_LOAD")}E(k)},WG=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],o=()=>{if(e.router.isServer){const d=FG(e,n,t,a);if(Go(d))return d.then(u)}return u()},l=()=>HG(e,n,t,a),u=()=>{if(HL(e,n))return;const d=UG(e,n,a);return Go(d)?d.then(l):l()};return o()},yf=(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(([o,l,u])=>{const d=o?.meta,f=o?.links,m=o?.scripts,p=o?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:l,styles:p}})},VL=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:o,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=Rg(e,t);return{params:o,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}},rM=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&GL(r);const o=r.options.loader?.(VL(e,t,n,r)),l=r.options.loader&&Go(o);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 o:o;Uo(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=yf(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(o){let l=o;const u=a._nonReactive.minPendingPromise;u&&await u,Fa(o)&&await r.options.notFoundComponent?.preload?.(),Uo(e,e.router.getMatch(t),o);try{r.options.onError?.(o)}catch(m){l=m,Uo(e,e.router.getMatch(t),m)}const d=yf(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:l,status:"error",isFetching:!1,...f}))}}catch(a){const o=e.router.getMatch(t);if(o){const l=yf(e,t,r);if(l){const u=await l;e.updateMatch(t,d=>({...d,...u}))}o._nonReactive.loaderPromise=void 0}Uo(e,o,a)}},VG=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,o=!1;const l=e.router.looseRoutesById[r];if(HL(e,n)){if(e.router.isServer){const f=yf(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&&Uo(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Rg(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(VL(e,n,t,l)):x,b=!!p&&!e.router.state.matches.some(C=>C.id===n),w=e.router.getMatch(n);w._nonReactive.loaderPromise=Xc(),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)o=!0,(async()=>{try{await rM(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){ii(C)&&await e.router.navigate(C.options)}})();else if(N!=="success"||a&&e.sync)await rM(e,n,t,l);else{const C=yf(e,n,l);if(C){const A=await C;e.updateMatch(n,E=>({...E,...A}))}}}}const u=e.router.getMatch(n);o||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,o||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=o?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 aM(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Qp(t);try{for(let a=0;a<t.matches.length;a++){const o=WG(t,a);Go(o)&&await o}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(VG(t,a));await Promise.all(t.matchPromises);const r=Qp(t);Go(r)&&await r}catch(n){if(Fa(n)&&!t.preload){const r=Qp(t);throw Go(r)&&await r,n}if(ii(n))throw n}return t.matches}async function GL(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 KL){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 wp(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function YL(e){for(const t of KL)if(e.options[t]?.preload)return!0;return!1}const KL=["component","errorComponent","pendingComponent","notFoundComponent"];function GG(e){return{input:({url:t})=>{for(const n of e)t=XL(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=ZL(e[n],t);return t}}}function YG(e){const t=Zp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),o=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(o)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Zi(["/",t,l.pathname]),l)}}function XL(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 ZL(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 Zs(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,o=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:o}}class KG{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??"/",o=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=tG())),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 JV(ZG(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(o||a!==d||l!==f){this.basepath=d;const g=[];Zp(d)!==""&&g.push(YG({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:GG(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}=EG({routeTree:this.routeTree,initRoute:(l,u)=>{l.init({originalIndex:u})}});this.routesById=n,this.routesByPath=r,this.flatRoutes=a;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},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=XL(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:Jk(b),searchStr:x,search:wa(r?.search,g),hash:w.split("#").reverse()[0]??"",state:wa(r?.state,f)}},o=a(n),{__tempLocation:l,__tempKey:u}=o.state;if(l&&(!u||u===this.tempLocationKey)){const d=a(l);return d.state.key=o.state.key,d.state.__TSR_key=o.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>lG({base:n,to:bO(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=qG(1e3),this.getMatchedRoutes=(n,r)=>QG({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(o=>o.status==="pending"),r=this.state.matches.filter(o=>o.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=n=>{const r=(o={})=>{const l=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(l,{_buildLocation:!0}),d=c_(u);o.from;const f=o.unsafeRelative==="path"?l.pathname:o.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},x=o.to?this.resolvePathWithBase(m,`${o.to}`):this.resolvePathWithBase(m,"."),j=o.params===!1||o.params===null?{}:(o.params??!0)===!0?g:Object.assign(g,Ks(o.params,g)),b=O0({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:Jk(O0({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,f_(D.options.validateSearch,{...z,...O}))}catch{}}),O=z}O=JG({search:O,dest:o,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),O=wa(p,O);const C=this.options.stringifySearch(O),A=o.hash===!0?l.hash:o.hash?Ks(o.hash,l.hash):void 0,E=A?`#${A}`:"";let k=o.state===!0?l.state:o.state?Ks(o.state,l.state):{};k=wa(l.state,k);const T=`${N}${C}${E}`,M=new URL(T,this.origin),$=ZL(this.rewrite,M);return{publicHref:$.pathname+$.search+$.hash,href:T,url:$.href,pathname:N,search:O,searchStr:C,state:k,hash:A??"",unmaskOnReload:o.unmaskOnReload}},a=(o={},l)=>{const u=r(o);let d=l?r(l):void 0;if(!d){let f={};const m=this.options.routeMasks?.find(p=>{const g=u_(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 o=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Xs(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},l=Yo(this.latestLocation.href)===Yo(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=Xc(()=>{u?.resolve()}),l&&o())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:o,ignoreBlocker:l,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=dv(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:o,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,...o})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}return r?(a||(a=this.buildLocation({to:n,...o}).url),o.replace?window.location.replace(a):window.location.href=a,Promise.resolve()):this.buildAndCommitLocation({...o,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=o=>{try{return encodeURI(decodeURI(o))}catch{return o}};if(Zp(a(this.latestLocation.href))!==Zp(a(r.href))){let o=r.url;throw this.origin&&o.startsWith(this.origin)&&(o=o.replace(this.origin,"")||"/"),FL({href:o})}}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(o=>o.id===a.id))}))},this.load=async n=>{let r,a,o;for(o=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Zs({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Zs({resolvedLocation:f,location:d})}),await aM({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=[];gf(()=>{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){ii(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Fa(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===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==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 o=this.latestLocation,l=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Zs({resolvedLocation:l,location:o})):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(o=>o.id===n)?"pendingMatches":this.state.matches.some(o=>o.id===n)?"matches":this.state.cachedMatches.some(o=>o.id===n)?"cachedMatches":"";a&&this.__store.setState(o=>({...o,[a]:o[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(o=>!r(o))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const o=(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>=o};this.clearCache({filter:n})},this.loadRouteChunk=GL,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),l=new Set([...o,...this.state.cachedMatches.map(u=>u.id)]);gf(()=>{a.forEach(u=>{l.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await aM({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{o.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(ii(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});Fa(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},o=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=u_(u.pathname,{...r,to:o.pathname},this.parsePathnameCache);return!d||n.params&&!Xs(d,n.params,{partial:!0})?!1:d&&(r?.includeSearch??!0)?Xs(u.search,o.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??LG,parseSearch:t.parseSearch??IG}),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:o}=this.getMatchedRoutes(t.pathname,n?.dest?.to);let l=!1;(r?r.path!=="/"&&o["**"]:Yo(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 Zr}})(),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=f_(m.options.validateSearch,{...U})??void 0;return[{...U,...H},{...V,...H},void 0]}catch(H){let G=H;if(H instanceof vv||(G=new vv(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}=O0({path:m.fullPath,params:o,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 M;if(!E){const U=m.options.params?.parse??m.options.parseParams;if(U)try{Object.assign(T,U(T))}catch(V){if(M=new XG(V.message,{cause:V}),n?.throwOnError)throw M}}Object.assign(o,T);const $=k?"stay":"enter";let z;if(E)z={...E,cause:$,params:k?wa(k.params,o):o,_strictParams:T,search:wa(k?k.search:E.search,x),_strictSearch:j};else{const U=m.options.loader||m.options.beforeLoad||m.lazyFn||YL(m)?"pending":"success";z={id:A,index:p,routeId:m.id,params:k?wa(k.params,o):o,_strictParams:T,pathname:O,updatedAt:Date.now(),search:k?wa(k.search,x):x,_strictSearch:j,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:M,__routeContext:void 0,_nonReactive:{loadPromise:Xc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:k?wa(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 vv extends Error{}class XG extends Error{}function ZG(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function f_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new vv("Async validation not supported");if(n.issues)throw new vv(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 QG({pathname:e,routePathname:t,caseSensitive:n,routesByPath:r,routesById:a,flatRoutes:o,parseCache:l}){let u={};const d=Yo(e),f=x=>u_(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 o){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[Zr];const g=[p];for(;p.parentRoute;)p=p.parentRoute,g.push(p);return g.reverse(),{matchedRoutes:g,routeParams:u,foundRoute:m}}function JG({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,...f_(d.options.validateSearch,x)??void 0}}catch{return x}};f.push(m)}return u.concat(f)},[])??[],o=({search:u})=>t.search?t.search===!0?u:Ks(t.search,u):{};a.push(o);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 eY="Error preloading route! ☝️";class QL{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=Zr:this.parentRoute||ur(!1);let o=a?Zr:r?.path;o&&o!=="/"&&(o=wO(o));const l=r?.id||o;let u=a?Zr:Zi([this.parentRoute.id===Zr?"":this.parentRoute.id,l]);o===Zr&&(o="/"),u!==Zr&&(u=Zi(["/",u]));const d=u===Zr?"/":Zi([this.parentRoute.fullPath,o]);this._path=o,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 tY extends QL{constructor(t){super(t)}}function jO(e){const t=e.errorComponent??Dg;return i.jsx(nY,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?y.createElement(t,{error:n,reset:r}):e.children})}class nY 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 Dg({error:e}){const[t,n]=y.useState(!1);return i.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[i.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),i.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"})]}),i.jsx("div",{style:{height:".25rem"}}),t?i.jsx("div",{children:i.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?i.jsx("code",{children:e.message}):null})}):null]})}function rY({children:e,fallback:t=null}){return aY()?i.jsx(W.Fragment,{children:e}):i.jsx(W.Fragment,{children:t})}function aY(){return W.useSyncExternalStore(iY,()=>!0,()=>!1)}function iY(){return()=>{}}var E0={exports:{}},A0={},T0={exports:{}},k0={};var iM;function oY(){if(iM)return k0;iM=1;var e=bh();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,o=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 o(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 k0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,k0}var oM;function sY(){return oM||(oM=1,T0.exports=oY()),T0.exports}var sM;function lY(){if(sM)return A0;sM=1;var e=bh(),t=sY();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,o=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return A0.useSyncExternalStoreWithSelector=function(f,m,p,g,x){var j=o(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 M=g(k);return x!==void 0&&x(T,M)?(C=k,T):(C=k,A=M)}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},A0}var lM;function cY(){return lM||(lM=1,E0.exports=lY()),E0.exports}var uY=cY();function dY(e,t=r=>r,n={}){const r=n.equal??fY;return uY.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function fY(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=cM(e);if(n.length!==cM(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 cM(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const M0=y.createContext(null);function JL(){return typeof document>"u"?M0:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=M0,M0)}function Ir(e){const t=y.useContext(JL());return e?.warn,t}function Sr(e){const t=Ir({warn:e?.router===void 0}),n=e?.router||t,r=y.useRef(void 0);return dY(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=wa(r.current,e.select(a));return r.current=o,o}return e.select(a)}return a})}const $g=y.createContext(void 0),hY=y.createContext(void 0);function mi(e){const t=y.useContext(e.from?hY:$g);return Sr({select:r=>{const a=r.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(ur(!((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 SO(e){return mi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function _O(e){const{select:t,...n}=e;return mi({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function NO(e){return mi({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 OO(e){return mi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function oa(e){const t=Ir();return y.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var yl=LL();const mY=St(yl),jp=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 pY(e,t,n={},r={}){y.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([o])=>{t(o)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function vY(e){const t=y.useRef(null);return y.useImperativeHandle(e,()=>t.current,[]),t}function gY(e,t){const n=Ir(),[r,a]=y.useState(!1),o=y.useRef(!1),l=vY(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:M,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=Sr({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=Sr({select:lt=>{if(ae)return!1;if(f?.exact){if(!oG(lt.location.pathname,xe.pathname,n.basepath))return!1}else{const rt=hv(lt.location.pathname,n.basepath),$n=hv(xe.pathname,n.basepath);if(!(rt.startsWith($n)&&(rt.length===$n.length||rt[$n.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Xs(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(eY)})},[n,oe]),Re=y.useCallback(lt=>{lt?.isIntersecting&&le()},[le]);pY(l,Re,jY,{disabled:!!A||Z!=="viewport"}),y.useEffect(()=>{o.current||!A&&Z==="render"&&(le(),o.current=!0)},[A,le,Z]);const _e=lt=>{const rt=lt.currentTarget.getAttribute("target"),$n=C!==void 0?C:rt;if(!A&&!SY(lt)&&!lt.defaultPrevented&&(!$n||$n==="_self")&<.button===0){lt.preventDefault(),yl.flushSync(()=>{a(!0)});const ms=n.subscribe("onResolved",()=>{ms(),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},...M&&{onFocus:M},...$&&{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(Wd.has(rt))return;const $n=setTimeout(()=>{Wd.delete(rt),le()},pe);Wd.set(rt,$n)}},Dt=lt=>{if(A||!Z||!pe)return;const rt=lt.target,$n=Wd.get(rt);$n&&(clearTimeout($n),Wd.delete(rt))},On=je?Ks(u,{})??yY:R0,vr=je?R0:Ks(d,{})??R0,rr=[k,On.className,vr.className].filter(Boolean).join(" "),gr=(E||On.style||vr.style)&&{...E,...On.style,...vr.style};return{...B,...On,...vr,href:ee?.href,ref:l,onClick:Vd([T,_e]),onFocus:Vd([M,me]),onMouseEnter:Vd([$,Le]),onMouseLeave:Vd([z,Dt]),onTouchStart:Vd([D,ve]),disabled:!!A,target:C,...gr&&{style:gr},...rr&&{className:rr},...A&&xY,...je&&bY,...r&&wY}}const R0={},yY={className:"active"},xY={role:"link","aria-disabled":!0},bY={"data-status":"active","aria-current":"page"},wY={"data-transitioning":"transitioning"},Wd=new WeakMap,jY={rootMargin:"100px"},Vd=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},CO=y.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:o,...l}=gY(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:o},u)});function SY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class _Y extends QL{constructor(t){super(t),this.useMatch=n=>mi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>mi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>OO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>NO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_O({...n,from:this.id}),this.useLoaderData=n=>SO({...n,from:this.id}),this.useNavigate=()=>oa({from:this.fullPath}),this.Link=W.forwardRef((n,r)=>i.jsx(CO,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function fr(e){return new _Y(e)}class NY extends tY{constructor(t){super(t),this.useMatch=n=>mi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>mi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>OO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>NO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_O({...n,from:this.id}),this.useLoaderData=n=>SO({...n,from:this.id}),this.useNavigate=()=>oa({from:this.fullPath}),this.Link=W.forwardRef((n,r)=>i.jsx(CO,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function OY(e){return new NY(e)}function uM(e){return typeof e=="object"?new dM(e,{silent:!0}).createRoute(e):new dM(e,{silent:!0}).createRoute}class dM{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=fr(r);return a.isRoot=!1,a},this.silent=n?.silent}}class fM{constructor(t){this.useMatch=n=>mi({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>mi({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>OO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>NO({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>_O({...n,from:this.options.id}),this.useLoaderData=n=>SO({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ir();return oa({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function hM(e){return typeof e=="object"?new fM(e):t=>new fM({id:e,...t})}function CY(){const e=Ir(),t=y.useRef({router:e,mounted:!1}),[n,r]=y.useState(!1),{hasPendingMatches:a,isLoading:o}=Sr({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),l=P0(o),u=o||n||a,d=P0(u),f=o||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 Yo(e.latestLocation.href)!==Yo(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),jp(()=>{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]),jp(()=>{l&&!o&&e.emit({type:"onLoad",...Zs(e.state)})},[l,e,o]),jp(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Zs(e.state)})},[f,m,e]),jp(()=>{d&&!u&&(e.emit({type:"onResolved",...Zs(e.state)}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),RG(e))},[u,d,e]),null}function EY(e){const t=Sr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return i.jsx(jO,{getResetKey:()=>t,onCatch:(n,r)=>{if(Fa(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Fa(n))return e.fallback?.(n);throw n},children:e.children})}function AY(){return i.jsx("p",{children:"Not Found"})}function Ac(e){return i.jsx(i.Fragment,{children:e.children})}function e5(e,t,n){return t.options.notFoundComponent?i.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?i.jsx(e.options.defaultNotFoundComponent,{data:n}):i.jsx(AY,{})}function TY({children:e}){const t=Ir();return t.isServer?i.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[e].filter(Boolean).join(`
|
||
`)+";$_TSR.c()"}}):null}function kY(){const e=Ir();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||d_)(e.latestLocation),r=n!==d_(e.latestLocation)?n:void 0,a={storageKey:mv,shouldScrollRestoration:!0};return r&&(a.key=r),i.jsx(TY,{children:`(${qL.toString()})(${JSON.stringify(a)})`})}const t5=y.memo(function({matchId:t}){const n=Ir(),r=Sr({select:N=>{const O=N.matches.find(C=>C.id===t);return ur(O),{routeId:O.routeId,ssr:O.ssr,_displayPending:O._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],o=a.options.pendingComponent??n.options.defaultPendingComponent,l=o?i.jsx(o,{}):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??o??(a.options.errorComponent?.preload||m))?y.Suspense:Ac,g=u?jO:Ac,x=f?EY:Ac,j=Sr({select:N=>N.loadedAt}),b=Sr({select:N=>{const O=N.matches.findIndex(C=>C.id===t);return N.matches[O-1]?.routeId}}),w=a.isRoot?a.options.shellComponent??Ac:Ac;return i.jsxs(w,{children:[i.jsx($g.Provider,{value:t,children:i.jsx(p,{fallback:l,children:i.jsx(g,{getResetKey:()=>j,errorComponent:u||Dg,onCatch:(N,O)=>{if(Fa(N))throw N;d?.(N,O)},children:i.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?i.jsx(rY,{fallback:l,children:i.jsx(mM,{matchId:t})}):i.jsx(mM,{matchId:t})})})})}),b===Zr&&n.options.scrollRestoration?i.jsxs(i.Fragment,{children:[i.jsx(MY,{}),i.jsx(kY,{})]}):null]})});function MY(){const e=Ir(),t=y.useRef(void 0);return i.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Zs(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const mM=y.memo(function({matchId:t}){const n=Ir(),{match:r,key:a,routeId:o}=Sr({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[o],u=y.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?i.jsx(d,{},a):i.jsx(EO,{})},[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=Xc();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 ur(Fa(r.error)),e5(n,l,r.error);if(r.status==="redirected")throw ur(ii(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(l.options.errorComponent??n.options.defaultErrorComponent)||Dg;return i.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),EO=y.memo(function(){const t=Ir(),n=y.useContext($g),r=Sr({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],o=Sr({select:f=>{const p=f.matches.find(g=>g.id===n);return ur(p),p.globalNotFound}}),l=Sr({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?i.jsx(t.options.defaultPendingComponent,{}):null;if(o)return e5(t,a,void 0);if(!l)return null;const d=i.jsx(t5,{matchId:l});return r===Zr?i.jsx(y.Suspense,{fallback:u,children:d}):d});function PY(){const e=Ir(),n=e.routesById[Zr].options.pendingComponent??e.options.defaultPendingComponent,r=n?i.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?Ac:y.Suspense,o=i.jsxs(a,{fallback:r,children:[!e.isServer&&i.jsx(CY,{}),i.jsx(RY,{})]});return e.options.InnerWrap?i.jsx(e.options.InnerWrap,{children:o}):o}function RY(){const e=Ir(),t=Sr({select:a=>a.matches[0]?.id}),n=Sr({select:a=>a.loadedAt}),r=t?i.jsx(t5,{matchId:t}):null;return i.jsx($g.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:i.jsx(jO,{getResetKey:()=>n,errorComponent:Dg,onCatch:a=>{a.message||a.toString()},children:r})})}function DY(){const e=Ir();return Sr({select:t=>[t.location.href,t.resolvedLocation?.href,t.status],structuralSharing:!0}),y.useCallback(t=>{const{pending:n,caseSensitive:r,fuzzy:a,includeSearch:o,...l}=t;return e.matchRoute(l,{pending:n,caseSensitive:r,fuzzy:a,includeSearch:o})},[e])}const $Y=e=>new IY(e);class IY extends KG{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=uM,globalThis.createLazyFileRoute=hM):typeof window<"u"&&(window.createFileRoute=uM,window.createLazyFileRoute=hM);function LY({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=JL(),a=i.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?i.jsx(e.options.Wrap,{children:a}):a}function BY({router:e,...t}){return i.jsx(LY,{router:e,...t,children:i.jsx(PY,{})})}function n5(e,t){return function(){return e.apply(t,arguments)}}const{toString:zY}=Object.prototype,{getPrototypeOf:AO}=Object,{iterator:Ig,toStringTag:r5}=Symbol,Lg=(e=>t=>{const n=zY.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wa=e=>(e=e.toLowerCase(),t=>Lg(t)===e),Bg=e=>t=>typeof t===e,{isArray:Pu}=Array,eu=Bg("undefined");function wh(e){return e!==null&&!eu(e)&&e.constructor!==null&&!eu(e.constructor)&&Mr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const a5=Wa("ArrayBuffer");function qY(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&a5(e.buffer),t}const FY=Bg("string"),Mr=Bg("function"),i5=Bg("number"),jh=e=>e!==null&&typeof e=="object",UY=e=>e===!0||e===!1,Jp=e=>{if(Lg(e)!=="object")return!1;const t=AO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(r5 in e)&&!(Ig in e)},HY=e=>{if(!jh(e)||wh(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},WY=Wa("Date"),VY=Wa("File"),GY=Wa("Blob"),YY=Wa("FileList"),KY=e=>jh(e)&&Mr(e.pipe),XY=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Mr(e.append)&&((t=Lg(e))==="formdata"||t==="object"&&Mr(e.toString)&&e.toString()==="[object FormData]"))},ZY=Wa("URLSearchParams"),[QY,JY,eK,tK]=["ReadableStream","Request","Response","Headers"].map(Wa),nK=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sh(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(wh(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),l=o.length;let u;for(r=0;r<l;r++)u=o[r],t.call(null,e[u],u,e)}}function o5(e,t){if(wh(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 Us=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,s5=e=>!eu(e)&&e!==Us;function h_(){const{caseless:e,skipUndefined:t}=s5(this)&&this||{},n={},r=(a,o)=>{const l=e&&o5(n,o)||o;Jp(n[l])&&Jp(a)?n[l]=h_(n[l],a):Jp(a)?n[l]=h_({},a):Pu(a)?n[l]=a.slice():(!t||!eu(a))&&(n[l]=a)};for(let a=0,o=arguments.length;a<o;a++)arguments[a]&&Sh(arguments[a],r);return n}const rK=(e,t,n,{allOwnKeys:r}={})=>(Sh(t,(a,o)=>{n&&Mr(a)?e[o]=n5(a,n):e[o]=a},{allOwnKeys:r}),e),aK=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),iK=(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)},oK=(e,t,n,r)=>{let a,o,l;const u={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)l=a[o],(!r||r(l,e,t))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&AO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},sK=(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},lK=e=>{if(!e)return null;if(Pu(e))return e;let t=e.length;if(!i5(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},cK=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&AO(Uint8Array)),uK=(e,t)=>{const r=(e&&e[Ig]).call(e);let a;for(;(a=r.next())&&!a.done;){const o=a.value;t.call(e,o[0],o[1])}},dK=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},fK=Wa("HTMLFormElement"),hK=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),pM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mK=Wa("RegExp"),l5=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Sh(n,(a,o)=>{let l;(l=t(a,o,e))!==!1&&(r[o]=l||a)}),Object.defineProperties(e,r)},pK=e=>{l5(e,(t,n)=>{if(Mr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Mr(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+"'")})}})},vK=(e,t)=>{const n={},r=a=>{a.forEach(o=>{n[o]=!0})};return Pu(e)?r(e):r(String(e).split(t)),n},gK=()=>{},yK=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function xK(e){return!!(e&&Mr(e.append)&&e[r5]==="FormData"&&e[Ig])}const bK=e=>{const t=new Array(10),n=(r,a)=>{if(jh(r)){if(t.indexOf(r)>=0)return;if(wh(r))return r;if(!("toJSON"in r)){t[a]=r;const o=Pu(r)?[]:{};return Sh(r,(l,u)=>{const d=n(l,a+1);!eu(d)&&(o[u]=d)}),t[a]=void 0,o}}return r};return n(e,0)},wK=Wa("AsyncFunction"),jK=e=>e&&(jh(e)||Mr(e))&&Mr(e.then)&&Mr(e.catch),c5=((e,t)=>e?setImmediate:t?((n,r)=>(Us.addEventListener("message",({source:a,data:o})=>{a===Us&&o===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Us.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Mr(Us.postMessage)),SK=typeof queueMicrotask<"u"?queueMicrotask.bind(Us):typeof process<"u"&&process.nextTick||c5,_K=e=>e!=null&&Mr(e[Ig]),de={isArray:Pu,isArrayBuffer:a5,isBuffer:wh,isFormData:XY,isArrayBufferView:qY,isString:FY,isNumber:i5,isBoolean:UY,isObject:jh,isPlainObject:Jp,isEmptyObject:HY,isReadableStream:QY,isRequest:JY,isResponse:eK,isHeaders:tK,isUndefined:eu,isDate:WY,isFile:VY,isBlob:GY,isRegExp:mK,isFunction:Mr,isStream:KY,isURLSearchParams:ZY,isTypedArray:cK,isFileList:YY,forEach:Sh,merge:h_,extend:rK,trim:nK,stripBOM:aK,inherits:iK,toFlatObject:oK,kindOf:Lg,kindOfTest:Wa,endsWith:sK,toArray:lK,forEachEntry:uK,matchAll:dK,isHTMLForm:fK,hasOwnProperty:pM,hasOwnProp:pM,reduceDescriptors:l5,freezeMethods:pK,toObjectSet:vK,toCamelCase:hK,noop:gK,toFiniteNumber:yK,findKey:o5,global:Us,isContextDefined:s5,isSpecCompliantForm:xK,toJSONObject:bK,isAsyncFn:wK,isThenable:jK,setImmediate:c5,asap:SK,isIterable:_K};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 u5=Xe.prototype,d5={};["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=>{d5[e]={value:e}});Object.defineProperties(Xe,d5);Object.defineProperty(u5,"isAxiosError",{value:!0});Xe.from=(e,t,n,r,a,o)=>{const l=Object.create(u5);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",o&&Object.assign(l,o),l};const NK=null;function m_(e){return de.isPlainObject(e)||de.isArray(e)}function f5(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function vM(e,t,n){return e?e.concat(t).map(function(a,o){return a=f5(a),!n&&o?"["+a+"]":a}).join(n?".":""):t}function OK(e){return de.isArray(e)&&!e.some(m_)}const CK=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function zg(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,o=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)&&OK(j)||(de.isFileList(j)||de.endsWith(b,"[]"))&&(N=de.toArray(j)))return b=f5(b),N.forEach(function(C,A){!(de.isUndefined(C)||C===null)&&t.append(l===!0?vM([b],A,o):l===null?b:b+"[]",f(C))}),!1}return m_(j)?!0:(t.append(vM(w,b,o),f(j)),!1)}const p=[],g=Object.assign(CK,{defaultVisitor:m,convertValue:f,isVisitable:m_});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 gM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function TO(e,t){this._pairs=[],e&&zg(e,this,t)}const h5=TO.prototype;h5.append=function(t,n){this._pairs.push([t,n])};h5.toString=function(t){const n=t?function(r){return t.call(this,r,gM)}:gM;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function EK(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function m5(e,t,n){if(!t)return e;const r=n&&n.encode||EK;de.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let o;if(a?o=a(t,n):o=de.isURLSearchParams(t)?t.toString():new TO(t,n).toString(r),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class yM{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 p5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AK=typeof URLSearchParams<"u"?URLSearchParams:TO,TK=typeof FormData<"u"?FormData:null,kK=typeof Blob<"u"?Blob:null,MK={isBrowser:!0,classes:{URLSearchParams:AK,FormData:TK,Blob:kK},protocols:["http","https","file","blob","url","data"]},kO=typeof window<"u"&&typeof document<"u",p_=typeof navigator=="object"&&navigator||void 0,PK=kO&&(!p_||["ReactNative","NativeScript","NS"].indexOf(p_.product)<0),RK=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",DK=kO&&window.location.href||"http://localhost",$K=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:kO,hasStandardBrowserEnv:PK,hasStandardBrowserWebWorkerEnv:RK,navigator:p_,origin:DK},Symbol.toStringTag,{value:"Module"})),cr={...$K,...MK};function IK(e,t){return zg(e,new cr.classes.URLSearchParams,{visitor:function(n,r,a,o){return cr.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function LK(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function BK(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}function v5(e){function t(n,r,a,o){let l=n[o++];if(l==="__proto__")return!0;const u=Number.isFinite(+l),d=o>=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],o)&&de.isArray(a[l])&&(a[l]=BK(a[l])),!u)}if(de.isFormData(e)&&de.isFunction(e.entries)){const n={};return de.forEachEntry(e,(r,a)=>{t(LK(r),a,n,0)}),n}return null}function zK(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 _h={transitional:p5,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,o=de.isObject(t);if(o&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return a?JSON.stringify(v5(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(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return IK(t,this.formSerializer).toString();if((u=de.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return zg(u?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||a?(n.setContentType("application/json",!1),zK(t)):t}],transformResponse:[function(t){const n=this.transitional||_h.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:cr.classes.FormData,Blob:cr.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=>{_h.headers[e]={}});const qK=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"]),FK=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]&&qK[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},xM=Symbol("internals");function Gd(e){return e&&String(e).trim().toLowerCase()}function ev(e){return e===!1||e==null?e:de.isArray(e)?e.map(ev):String(e)}function UK(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 HK=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function D0(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 WK(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function VK(e,t){const n=de.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,o,l){return this[r].call(this,t,a,o,l)},configurable:!0})})}let Pr=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function o(u,d,f){const m=Gd(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]=ev(u))}const l=(u,d)=>de.forEach(u,(f,m)=>o(f,m,d));if(de.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(de.isString(t)&&(t=t.trim())&&!HK(t))l(FK(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&&o(n,t,r);return this}get(t,n){if(t=Gd(t),t){const r=de.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return UK(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=Gd(t),t){const r=de.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||D0(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function o(l){if(l=Gd(l),l){const u=de.findKey(r,l);u&&(!n||D0(r,r[u],u,n))&&(delete r[u],a=!0)}}return de.isArray(t)?t.forEach(o):o(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const o=n[r];(!t||D0(this,this[o],o,t,!0))&&(delete this[o],a=!0)}return a}normalize(t){const n=this,r={};return de.forEach(this,(a,o)=>{const l=de.findKey(r,o);if(l){n[l]=ev(a),delete n[o];return}const u=t?WK(o):String(o).trim();u!==o&&delete n[o],n[u]=ev(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[xM]=this[xM]={accessors:{}}).accessors,a=this.prototype;function o(l){const u=Gd(l);r[u]||(VK(a,l),r[u]=!0)}return de.isArray(t)?t.forEach(o):o(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 $0(e,t){const n=this||_h,r=t||n,a=Pr.from(r.headers);let o=r.data;return de.forEach(e,function(u){o=u.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function g5(e){return!!(e&&e.__CANCEL__)}function Ru(e,t,n){Xe.call(this,e??"canceled",Xe.ERR_CANCELED,t,n),this.name="CanceledError"}de.inherits(Ru,Xe,{__CANCEL__:!0});function y5(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 GK(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function YK(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,l;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),m=r[o];l||(l=f),n[a]=d,r[a]=f;let p=o,g=0;for(;p!==a;)g+=n[p++],p=p%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),f-l<t)return;const x=m&&f-m;return x?Math.round(g*1e3/x):void 0}}function KK(e,t){let n=0,r=1e3/t,a,o;const l=(f,m=Date.now())=>{n=m,a=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const m=Date.now(),p=m-n;p>=r?l(f,m):(a=f,o||(o=setTimeout(()=>{o=null,l(a)},r-p)))},()=>a&&l(a)]}const gv=(e,t,n=3)=>{let r=0;const a=YK(50,250);return KK(o=>{const l=o.loaded,u=o.lengthComputable?o.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:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(p)},n)},bM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},wM=e=>(...t)=>de.asap(()=>e(...t)),XK=cr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,cr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(cr.origin),cr.navigator&&/(msie|trident)/i.test(cr.navigator.userAgent)):()=>!0,ZK=cr.hasStandardBrowserEnv?{write(e,t,n,r,a,o,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}`),o===!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 QK(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function JK(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function x5(e,t,n){let r=!QK(t);return e&&(r||n==!1)?JK(e,t):t}const jM=e=>e instanceof Pr?{...e}:e;function ol(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 o(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:o,method:o,data:o,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(jM(f),jM(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 b5=e=>{const t=ol({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:l,auth:u}=t;if(t.headers=l=Pr.from(l),t.url=m5(x5(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(cr.hasStandardBrowserEnv||cr.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(cr.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(t)),r||r!==!1&&XK(t.url))){const d=a&&o&&ZK.read(o);d&&l.set(a,d)}return t},eX=typeof XMLHttpRequest<"u",tX=eX&&function(e){return new Promise(function(n,r){const a=b5(e);let o=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};y5(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||p5;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),r(new Xe(A,E.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,e,w)),w=null},o===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]=gv(f,!0),w.addEventListener("progress",g)),d&&w.upload&&([p,x]=gv(d),w.upload.addEventListener("progress",p),w.upload.addEventListener("loadend",x)),(a.cancelToken||a.signal)&&(m=C=>{w&&(r(!C||C.type?new Ru(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=GK(a.url);if(O&&cr.protocols.indexOf(O)===-1){r(new Xe("Unsupported protocol "+O+":",Xe.ERR_BAD_REQUEST,e));return}w.send(o||null)})},nX=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const o=function(f){if(!a){a=!0,u();const m=f instanceof Error?f:this.reason;r.abort(m instanceof Xe?m:new Ru(m instanceof Error?m.message:m))}};let l=t&&setTimeout(()=>{l=null,o(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(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>de.asap(u),d}},rX=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},aX=async function*(e,t){for await(const n of iX(e))yield*rX(n,t)},iX=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()}},SM=(e,t,n,r)=>{const a=aX(e,t);let o=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=o+=p;n(g)}d.enqueue(new Uint8Array(m))}catch(f){throw u(f),f}},cancel(d){return u(d),a.return()}},{highWaterMark:2})},_M=64*1024,{isFunction:Sp}=de,oX=(({Request:e,Response:t})=>({Request:e,Response:t}))(de.global),{ReadableStream:NM,TextEncoder:OM}=de.global,CM=(e,...t)=>{try{return!!e(...t)}catch{return!1}},sX=e=>{e=de.merge.call({skipUndefined:!0},oX,e);const{fetch:t,Request:n,Response:r}=e,a=t?Sp(t):typeof fetch=="function",o=Sp(n),l=Sp(r);if(!a)return!1;const u=a&&Sp(NM),d=a&&(typeof OM=="function"?(j=>b=>j.encode(b))(new OM):async j=>new Uint8Array(await new n(j).arrayBuffer())),f=o&&u&&CM(()=>{let j=!1;const b=new n(cr.origin,{body:new NM,method:"POST",get duplex(){return j=!0,"half"}}).headers.has("Content-Type");return j&&!b}),m=l&&u&&CM(()=>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(cr.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:M,withCredentials:$="same-origin",fetchOptions:z}=b5(j),D=t||fetch;T=T?(T+"").toLowerCase():"text";let U=nX([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(M,N))!==0){let I=new n(b,{method:"POST",body:N,duplex:"half"}),B;if(de.isFormData(N)&&(B=I.headers.get("content-type"))&&M.setContentType(B),I.body){const[Y,ne]=bM(G,gv(wM(k)));N=SM(I.body,_M,Y,ne)}}de.isString($)||($=$?"include":"omit");const L=o&&"credentials"in n.prototype,R={...z,signal:U,method:w.toUpperCase(),headers:M.normalize().toJSON(),body:N,duplex:"half",credentials:L?$:void 0};V=o&&new n(b,R);let F=await(o?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&&bM(B,gv(wM(E),!0))||[];F=new r(SM(F.body,_M,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)=>{y5(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)}}},lX=new Map,w5=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,o=[r,a,n];let l=o.length,u=l,d,f,m=lX;for(;u--;)d=o[u],f=m.get(d),f===void 0&&m.set(d,f=u?new Map:sX(t)),m=f;return f};w5();const MO={http:NK,xhr:tX,fetch:{get:w5}};de.forEach(MO,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const EM=e=>`- ${e}`,cX=e=>de.isFunction(e)||e===null||e===!1;function uX(e,t){e=de.isArray(e)?e:[e];const{length:n}=e;let r,a;const o={};for(let l=0;l<n;l++){r=e[l];let u;if(a=r,!cX(r)&&(a=MO[(u=String(r)).toLowerCase()],a===void 0))throw new Xe(`Unknown adapter '${u}'`);if(a&&(de.isFunction(a)||(a=a.get(t))))break;o[u||"#"+l]=a}if(!a){const l=Object.entries(o).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(EM).join(`
|
||
`):" "+EM(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 j5={getAdapter:uX,adapters:MO};function I0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ru(null,e)}function AM(e){return I0(e),e.headers=Pr.from(e.headers),e.data=$0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),j5.getAdapter(e.adapter||_h.adapter,e)(e).then(function(r){return I0(e),r.data=$0.call(e,e.transformResponse,r),r.headers=Pr.from(r.headers),r},function(r){return g5(r)||(I0(e),r&&r.response&&(r.response.data=$0.call(e,e.transformResponse,r.response),r.response.headers=Pr.from(r.response.headers))),Promise.reject(r)})}const S5="1.13.2",qg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qg[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const TM={};qg.transitional=function(t,n,r){function a(o,l){return"[Axios v"+S5+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,u)=>{if(t===!1)throw new Xe(a(l," has been removed"+(n?" in "+n:"")),Xe.ERR_DEPRECATED);return n&&!TM[l]&&(TM[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,u):!0}};qg.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function dX(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 o=r[a],l=t[o];if(l){const u=e[o],d=u===void 0||l(u,o,e);if(d!==!0)throw new Xe("option "+o+" must be "+d,Xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Xe("Unknown option "+o,Xe.ERR_BAD_OPTION)}}const tv={assertOptions:dX,validators:qg},Ja=tv.validators;let Qs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new yM,response:new yM}}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 o=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ol(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&tv.assertOptions(r,{silentJSONParsing:Ja.transitional(Ja.boolean),forcedJSONParsing:Ja.transitional(Ja.boolean),clarifyTimeoutError:Ja.transitional(Ja.boolean)},!1),a!=null&&(de.isFunction(a)?n.paramsSerializer={serialize:a}:tv.assertOptions(a,{encode:Ja.function,serialize:Ja.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),tv.assertOptions(n,{baseUrl:Ja.spelling("baseURL"),withXsrfToken:Ja.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&de.merge(o.common,o[n.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],j=>{delete o[j]}),n.headers=Pr.concat(l,o);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=[AM.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=AM.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=ol(this.defaults,t);const n=x5(t.baseURL,t.url,t.allowAbsoluteUrls);return m5(n,t.params,t.paramsSerializer)}};de.forEach(["delete","get","head","options"],function(t){Qs.prototype[t]=function(n,r){return this.request(ol(r||{},{method:t,url:n,data:(r||{}).data}))}});de.forEach(["post","put","patch"],function(t){function n(r){return function(o,l,u){return this.request(ol(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}Qs.prototype[t]=n(),Qs.prototype[t+"Form"]=n(!0)});let fX=class _5{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const l=new Promise(u=>{r.subscribe(u),o=u}).then(a);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,u){r.reason||(r.reason=new Ru(o,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 _5(function(a){t=a}),cancel:t}}};function hX(e){return function(n){return e.apply(null,n)}}function mX(e){return de.isObject(e)&&e.isAxiosError===!0}const v_={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(v_).forEach(([e,t])=>{v_[t]=e});function N5(e){const t=new Qs(e),n=n5(Qs.prototype.request,t);return de.extend(n,Qs.prototype,t,{allOwnKeys:!0}),de.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return N5(ol(e,a))},n}const un=N5(_h);un.Axios=Qs;un.CanceledError=Ru;un.CancelToken=fX;un.isCancel=g5;un.VERSION=S5;un.toFormData=zg;un.AxiosError=Xe;un.Cancel=un.CanceledError;un.all=function(t){return Promise.all(t)};un.spread=hX;un.isAxiosError=mX;un.mergeConfig=ol;un.AxiosHeaders=Pr;un.formToJSON=e=>v5(de.isHTMLForm(e)?new FormData(e):e);un.getAdapter=j5.getAdapter;un.HttpStatusCode=v_;un.default=un;const{Axios:dAe,AxiosError:fAe,CanceledError:hAe,isCancel:mAe,CancelToken:pAe,VERSION:vAe,all:gAe,Cancel:yAe,isAxiosError:xAe,spread:bAe,toFormData:wAe,AxiosHeaders:jAe,HttpStatusCode:SAe,formToJSON:_Ae,getAdapter:NAe,mergeConfig:OAe}=un;function O5(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=O5(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=O5(e))&&(r&&(r+=" "),r+=t);return r}const pX=(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},vX=(e,t)=>({classGroupId:e,validator:t}),C5=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),yv="-",kM=[],gX="arbitrary..",yX=e=>{const t=bX(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return xX(l);const u=l.split(yv),d=u[0]===""&&u.length>1?1:0;return E5(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?pX(f,d):d:f||kM}return n[l]||kM}}},E5=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],o=n.nextPart.get(a);if(o){const f=E5(e,t+1,o);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(yv):e.slice(t).join(yv),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},xX=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?gX+r:void 0})(),bX=e=>{const{theme:t,classGroups:n}=e;return wX(n,t)},wX=(e,t)=>{const n=C5();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 o=0;o<a;o++){const l=e[o];jX(l,t,n,r)}},jX=(e,t,n,r)=>{if(typeof e=="string"){SX(e,t,n);return}if(typeof e=="function"){_X(e,t,n,r);return}NX(e,t,n,r)},SX=(e,t,n)=>{const r=e===""?t:A5(t,e);r.classGroupId=n},_X=(e,t,n,r)=>{if(OX(e)){PO(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(vX(n,e))},NX=(e,t,n,r)=>{const a=Object.entries(e),o=a.length;for(let l=0;l<o;l++){const[u,d]=a[l];PO(d,A5(t,u),n,r)}},A5=(e,t)=>{let n=e;const r=t.split(yv),a=r.length;for(let o=0;o<a;o++){const l=r[o];let u=n.nextPart.get(l);u||(u=C5(),n.nextPart.set(l,u)),n=u}return n},OX=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,CX=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return a(o,l),l},set(o,l){o in n?n[o]=l:a(o,l)}}},g_="!",MM=":",EX=[],PM=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),AX=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const o=[];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===MM){o.push(a.slice(d,b)),d=b+1;continue}if(w==="/"){f=b;continue}}w==="["?l++:w==="]"?l--:w==="("?u++:w===")"&&u--}const p=o.length===0?a:a.slice(d);let g=p,x=!1;p.endsWith(g_)?(g=p.slice(0,-1),x=!0):p.startsWith(g_)&&(g=p.slice(1),x=!0);const j=f&&f>d?f-d:void 0;return PM(o,x,g,j)};if(t){const a=t+MM,o=r;r=l=>l.startsWith(a)?o(l.slice(a.length)):PM(EX,!1,l,void 0,!0)}if(n){const a=r;r=o=>n({className:o,parseClassName:a})}return r},TX=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let o=0;o<n.length;o++){const l=n[o],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}},kX=e=>({cache:CX(e.cacheSize),parseClassName:AX(e),sortModifiers:TX(e),...yX(e)}),MX=/\s+/,PX=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o}=t,l=[],u=e.trim().split(MX);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]:o(g).join(":"),C=x?O+g_: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},RX=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=T5(n))&&(a&&(a+=" "),a+=r);return a},T5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=T5(e[r]))&&(n&&(n+=" "),n+=t);return n},DX=(e,...t)=>{let n,r,a,o;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=kX(f),r=n.cache.get,a=n.cache.set,o=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=PX(d,n);return a(d,m),m};return o=l,(...d)=>o(RX(...d))},$X=[],En=e=>{const t=n=>n[e]||$X;return t.isThemeGetter=!0,t},k5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IX=/^\d+\/\d+$/,LX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BX=/\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$/,zX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xc=e=>IX.test(e),nt=e=>!!e&&!Number.isNaN(Number(e)),Lo=e=>!!e&&Number.isInteger(Number(e)),L0=e=>e.endsWith("%")&&nt(e.slice(0,-1)),qi=e=>LX.test(e),UX=()=>!0,HX=e=>BX.test(e)&&!zX.test(e),P5=()=>!1,WX=e=>qX.test(e),VX=e=>FX.test(e),GX=e=>!Te(e)&&!ke(e),YX=e=>Du(e,$5,P5),Te=e=>k5.test(e),Ds=e=>Du(e,I5,HX),B0=e=>Du(e,JX,nt),RM=e=>Du(e,R5,P5),KX=e=>Du(e,D5,VX),_p=e=>Du(e,L5,WX),ke=e=>M5.test(e),Yd=e=>$u(e,I5),XX=e=>$u(e,eZ),DM=e=>$u(e,R5),ZX=e=>$u(e,$5),QX=e=>$u(e,D5),Np=e=>$u(e,L5,!0),Du=(e,t,n)=>{const r=k5.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$u=(e,t,n=!1)=>{const r=M5.exec(e);return r?r[1]?t(r[1]):n:!1},R5=e=>e==="position"||e==="percentage",D5=e=>e==="image"||e==="url",$5=e=>e==="length"||e==="size"||e==="bg-size",I5=e=>e==="length",JX=e=>e==="number",eZ=e=>e==="family-name",L5=e=>e==="shadow",tZ=()=>{const e=En("color"),t=En("font"),n=En("text"),r=En("font-weight"),a=En("tracking"),o=En("leading"),l=En("breakpoint"),u=En("container"),d=En("spacing"),f=En("radius"),m=En("shadow"),p=En("inset-shadow"),g=En("text-shadow"),x=En("drop-shadow"),j=En("blur"),b=En("perspective"),w=En("aspect"),N=En("ease"),O=En("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"],M=()=>[ke,Te,d],$=()=>[xc,"full","auto",...M()],z=()=>[Lo,"none","subgrid",ke,Te],D=()=>["auto",{span:["full",Lo,ke,Te]},Lo,ke,Te],U=()=>[Lo,"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",...M()],R=()=>[xc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],F=()=>[e,ke,Te],K=()=>[...A(),DM,RM,{position:[ke,Te]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",ZX,YX,{size:[ke,Te]}],B=()=>[L0,Yd,Ds],Y=()=>["","none","full",f,ke,Te],ne=()=>["",nt,Yd,Ds],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,L0,DM,RM],ae=()=>["","none",j,ke,Te],Z=()=>["none",nt,ke,Te],pe=()=>["none",nt,ke,Te],je=()=>[nt,ke,Te],le=()=>[xc,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qi],breakpoint:[qi],color:[UX],container:[qi],"drop-shadow":[qi],ease:["in","out","in-out"],font:[GX],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qi],shadow:[qi],spacing:["px",nt],text:[qi],"text-shadow":[qi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xc,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:[Lo,"auto",ke,Te]}],basis:[{basis:[xc,"full","auto",u,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nt,xc,"auto","initial","none",Te]}],grow:[{grow:["",nt,ke,Te]}],shrink:[{shrink:["",nt,ke,Te]}],order:[{order:[Lo,"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:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"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:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],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":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"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,Yd,Ds]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ke,B0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",L0,Te]}],"font-family":[{font:[XX,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,B0]}],leading:[{leading:[o,...M()]}],"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,Ds]}],"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:M()}],"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"]},Lo,ke,Te],radial:["",ke,Te],conic:[Lo,ke,Te]},QX,KX]}],"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,Yd,Ds]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",m,Np,_p]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,Np,_p]}],"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,Ds]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",g,Np,_p]}],"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,Np,_p]}],"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":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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,Yd,Ds,B0]}],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"]}},nZ=DX(tZ);function ue(...e){return nZ(Ye(e))}const dt=y.forwardRef(({className:e,...t},n)=>i.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)=>i.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)=>i.jsx("div",{ref:n,className:ue("font-semibold leading-none tracking-tight",e),...t}));Gt.displayName="CardTitle";const er=y.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));er.displayName="CardDescription";const cn=y.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ue("p-6 pt-0",e),...t}));cn.displayName="CardContent";const B5=y.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,className:ue("flex items-center p-6 pt-0",e),...t}));B5.displayName="CardFooter";function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function rZ(e,t){const n=y.createContext(t),r=o=>{const{children:l,...u}=o,d=y.useMemo(()=>u,Object.values(u));return i.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(o){const l=y.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function hr(e,t=[]){let n=[];function r(o,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 i.jsx(b.Provider,{value:w,children:x})};f.displayName=o+"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 \`${o}\``)}return[f,m]}const a=()=>{const o=n.map(l=>y.createContext(l));return function(u){const d=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,aZ(a,...t)]}function aZ(...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(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(o)[`__scope${f}`];return{...u,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function $M(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rr(...e){return t=>{let n=!1;const r=e.map(a=>{const o=$M(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():$M(e[a],null)}}}}function qe(...e){return y.useCallback(Rr(...e),e)}function IM(e){const t=iZ(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,u=y.Children.toArray(o),d=u.find(sZ);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 i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function iZ(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=cZ(a),u=lZ(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(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 oZ=Symbol("radix.slottable");function sZ(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oZ}function lZ(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function cZ(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 Nh(e){const t=e+"CollectionProvider",[n,r]=hr(t),[a,o]=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 i.jsx(a,{scope:w,itemMap:C,collectionRef:O,children:N})};l.displayName=t;const u=e+"CollectionSlot",d=IM(u),f=W.forwardRef((b,w)=>{const{scope:N,children:O}=b,C=o(u,N),A=qe(w,C.collectionRef);return i.jsx(d,{ref:A,children:O})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=IM(m),x=W.forwardRef((b,w)=>{const{scope:N,children:O,...C}=b,A=W.useRef(null),E=qe(w,A),k=o(m,N);return W.useEffect(()=>(k.itemMap.set(A,{ref:A,...C}),()=>void k.itemMap.delete(A))),i.jsx(g,{[p]:"",ref:E,children:O})});x.displayName=m;function j(b){const w=o(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 Un=globalThis?.document?y.useLayoutEffect:()=>{},uZ=yO[" useId ".trim().toString()]||(()=>{}),dZ=0;function Fn(e){const[t,n]=y.useState(uZ());return Un(()=>{n(r=>r??String(dZ++))},[e]),t?`radix-${t}`:""}function fZ(e){const t=hZ(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,u=y.Children.toArray(o),d=u.find(pZ);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 i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function hZ(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=gZ(a),u=vZ(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(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 mZ=Symbol("radix.slottable");function pZ(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mZ}function vZ(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function gZ(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 yZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=yZ.reduce((e,t)=>{const n=fZ(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function RO(e,t){e&&yl.flushSync(()=>e.dispatchEvent(t))}function nn(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}var xZ=yO[" useInsertionEffect ".trim().toString()]||Un;function Na({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=bZ({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=wZ(m)?m(e):m;p!==e&&l.current?.(p)}else o(m)},[u,e,o,l]);return[d,f]}function bZ({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),a=y.useRef(n),o=y.useRef(t);return xZ(()=>{o.current=t},[t]),y.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}function wZ(e){return typeof e=="function"}var jZ=y.createContext(void 0);function Iu(e){const t=y.useContext(jZ);return e||t||"ltr"}var z0="rovingFocusGroup.onEntryFocus",SZ={bubbles:!1,cancelable:!0},Oh="RovingFocusGroup",[y_,z5,_Z]=Nh(Oh),[NZ,Fg]=hr(Oh,[_Z]),[OZ,CZ]=NZ(Oh),q5=y.forwardRef((e,t)=>i.jsx(y_.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(y_.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(EZ,{...e,ref:t})})}));q5.displayName=Oh;var EZ=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=y.useRef(null),x=qe(t,g),j=Iu(o),[b,w]=Na({prop:l,defaultProp:u??null,onChange:d,caller:Oh}),[N,O]=y.useState(!1),C=nn(f),A=z5(n),E=y.useRef(!1),[k,T]=y.useState(0);return y.useEffect(()=>{const M=g.current;if(M)return M.addEventListener(z0,C),()=>M.removeEventListener(z0,C)},[C]),i.jsx(OZ,{scope:n,orientation:r,dir:j,loop:a,currentTabStopId:b,onItemFocus:y.useCallback(M=>w(M),[w]),onItemShiftTab:y.useCallback(()=>O(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>T(M=>M-1),[]),children:i.jsx(Pe.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,M=>{const $=!E.current;if(M.target===M.currentTarget&&$&&!N){const z=new CustomEvent(z0,SZ);if(M.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);H5(G,m)}}E.current=!1}),onBlur:Se(e.onBlur,()=>O(!1))})})}),F5="RovingFocusGroupItem",U5=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:l,...u}=e,d=Fn(),f=o||d,m=CZ(F5,n),p=m.currentTabStopId===f,g=z5(n),{onFocusableItemAdd:x,onFocusableItemRemove:j,currentTabStopId:b}=m;return y.useEffect(()=>{if(r)return x(),()=>j()},[r,x,j]),i.jsx(y_.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:i.jsx(Pe.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=kZ(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?MZ(C,A+1):C.slice(A+1)}setTimeout(()=>H5(C))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:b!=null}):l})})});U5.displayName=F5;var AZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function TZ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kZ(e,t,n){const r=TZ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return AZ[r]}function H5(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function MZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var W5=q5,V5=U5;function PZ(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Rn=e=>{const{present:t,children:n}=e,r=RZ(t),a=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=qe(r.ref,DZ(a));return typeof n=="function"||r.isPresent?y.cloneElement(a,{ref:o}):null};Rn.displayName="Presence";function RZ(e){const[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),o=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=Op(r.current);o.current=u==="mounted"?f:"none"},[u]),Un(()=>{const f=r.current,m=a.current;if(m!==e){const g=o.current,x=Op(f);e?d("MOUNT"):x==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==x?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),Un(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=x=>{const b=Op(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&&(o.current=Op(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 Op(e){return e?.animationName||"none"}function DZ(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 Ug="Tabs",[$Z]=hr(Ug,[Fg]),G5=Fg(),[IZ,DO]=$Z(Ug),Y5=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:d="automatic",...f}=e,m=Iu(u),[p,g]=Na({prop:r,onChange:a,defaultProp:o??"",caller:Ug});return i.jsx(IZ,{scope:n,baseId:Fn(),value:p,onValueChange:g,orientation:l,dir:m,activationMode:d,children:i.jsx(Pe.div,{dir:m,"data-orientation":l,...f,ref:t})})});Y5.displayName=Ug;var K5="TabsList",X5=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=DO(K5,n),l=G5(n);return i.jsx(W5,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:i.jsx(Pe.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});X5.displayName=K5;var Z5="TabsTrigger",Q5=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,l=DO(Z5,n),u=G5(n),d=tB(l.baseId,r),f=nB(l.baseId,r),m=r===l.value;return i.jsx(V5,{asChild:!0,...u,focusable:!a,active:m,children:i.jsx(Pe.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,...o,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)})})})});Q5.displayName=Z5;var J5="TabsContent",eB=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...l}=e,u=DO(J5,n),d=tB(u.baseId,r),f=nB(u.baseId,r),m=r===u.value,p=y.useRef(m);return y.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),i.jsx(Rn,{present:a||m,children:({present:g})=>i.jsx(Pe.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&&o})})});eB.displayName=J5;function tB(e,t){return`${e}-trigger-${t}`}function nB(e,t){return`${e}-content-${t}`}var LZ=Y5,rB=X5,aB=Q5,iB=eB;const sl=LZ,Zo=y.forwardRef(({className:e,...t},n)=>i.jsx(rB,{ref:n,className:ue("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Zo.displayName=rB.displayName;const Ct=y.forwardRef(({className:e,...t},n)=>i.jsx(aB,{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=aB.displayName;const Jt=y.forwardRef(({className:e,...t},n)=>i.jsx(iB,{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}));Jt.displayName=iB.displayName;function Cf(e,[t,n]){return Math.min(n,Math.max(t,e))}function BZ(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var $O="ScrollArea",[oB]=hr($O),[zZ,Ca]=oB($O),sB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=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,M]=y.useState(!1),$=qe(t,D=>d(D)),z=Iu(a);return i.jsx(zZ,{scope:n,type:r,dir:z,scrollHideDelay:o,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:M,onCornerWidthChange:O,onCornerHeightChange:A,children:i.jsx(Pe.div,{dir:z,...l,ref:$,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});sB.displayName=$O;var lB="ScrollAreaViewport",cB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,l=Ca(lB,n),u=y.useRef(null),d=qe(t,u,l.onViewportChange);return i.jsxs(i.Fragment,{children:[i.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}),i.jsx(Pe.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});cB.displayName=lB;var yi="ScrollAreaScrollbar",IO=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ca(yi,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=a,u=e.orientation==="horizontal";return y.useEffect(()=>(u?o(!0):l(!0),()=>{u?o(!1):l(!1)}),[u,o,l]),a.type==="hover"?i.jsx(qZ,{...r,ref:t,forceMount:n}):a.type==="scroll"?i.jsx(FZ,{...r,ref:t,forceMount:n}):a.type==="auto"?i.jsx(uB,{...r,ref:t,forceMount:n}):a.type==="always"?i.jsx(LO,{...r,ref:t}):null});IO.displayName=yi;var qZ=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ca(yi,e.__scopeScrollArea),[o,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]),i.jsx(Rn,{present:n||o,children:i.jsx(uB,{"data-state":o?"visible":"hidden",...r,ref:t})})}),FZ=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ca(yi,e.__scopeScrollArea),o=e.orientation==="horizontal",l=Wg(()=>d("SCROLL_END"),100),[u,d]=BZ("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=o?"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,o,d,l]),i.jsx(Rn,{present:n||u!=="hidden",children:i.jsx(LO,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Se(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Se(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),uB=y.forwardRef((e,t)=>{const n=Ca(yi,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,l]=y.useState(!1),u=e.orientation==="horizontal",d=Wg(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?f:m)}},10);return tu(n.viewport,d),tu(n.content,d),i.jsx(Rn,{present:r||o,children:i.jsx(LO,{"data-state":o?"visible":"hidden",...a,ref:t})})}),LO=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=Ca(yi,e.__scopeScrollArea),o=y.useRef(null),l=y.useRef(0),[u,d]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=pB(u.viewport,u.content),m={...r,sizes:u,onSizesChange:d,hasThumb:f>0&&f<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:g=>l.current=g};function p(g,x){return YZ(g,l.current,u,x)}return n==="horizontal"?i.jsx(UZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollLeft,x=LM(g,u,a.dir);o.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"?i.jsx(HZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollTop,x=LM(g,u);o.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}),UZ=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Ca(yi,e.__scopeScrollArea),[l,u]=y.useState(),d=y.useRef(null),f=qe(t,d,o.onScrollbarXChange);return y.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),i.jsx(fB,{"data-orientation":"horizontal",...a,ref:f,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Hg(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,p)=>{if(o.viewport){const g=o.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),gB(g,p)&&m.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:bv(l.paddingLeft),paddingEnd:bv(l.paddingRight)}})}})}),HZ=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Ca(yi,e.__scopeScrollArea),[l,u]=y.useState(),d=y.useRef(null),f=qe(t,d,o.onScrollbarYChange);return y.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),i.jsx(fB,{"data-orientation":"vertical",...a,ref:f,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Hg(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,p)=>{if(o.viewport){const g=o.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),gB(g,p)&&m.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:bv(l.paddingTop),paddingEnd:bv(l.paddingBottom)}})}})}),[WZ,dB]=oB(yi),fB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:f,onWheelScroll:m,onResize:p,...g}=e,x=Ca(yi,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=nn(m),k=nn(d),T=Wg(p,10);function M($){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]),tu(j,T),tu(x.content,T),i.jsx(WZ,{scope:n,scrollbar:j,hasThumb:a,onThumbChange:nn(o),onThumbPointerUp:nn(l),onThumbPositionChange:k,onThumbPointerDown:nn(u),children:i.jsx(Pe.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"),M($))}),onPointerMove:Se(e.onPointerMove,M),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})})})}),xv="ScrollAreaThumb",hB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=dB(xv,e.__scopeScrollArea);return i.jsx(Rn,{present:n||a.hasThumb,children:i.jsx(VZ,{ref:t,...r})})}),VZ=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=Ca(xv,n),l=dB(xv,n),{onThumbPositionChange:u}=l,d=qe(t,p=>l.onThumbChange(p)),f=y.useRef(void 0),m=Wg(()=>{f.current&&(f.current(),f.current=void 0)},100);return y.useEffect(()=>{const p=o.viewport;if(p){const g=()=>{if(m(),!f.current){const x=KZ(p,u);f.current=x,u()}};return u(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[o.viewport,m,u]),i.jsx(Pe.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)})});hB.displayName=xv;var BO="ScrollAreaCorner",mB=y.forwardRef((e,t)=>{const n=Ca(BO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?i.jsx(GZ,{...e,ref:t}):null});mB.displayName=BO;var GZ=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Ca(BO,n),[o,l]=y.useState(0),[u,d]=y.useState(0),f=!!(o&&u);return tu(a.scrollbarX,()=>{const m=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(m),d(m)}),tu(a.scrollbarY,()=>{const m=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(m),l(m)}),f?i.jsx(Pe.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function bv(e){return e?parseInt(e,10):0}function pB(e,t){const n=e/t;return isNaN(n)?0:n}function Hg(e){const t=pB(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function YZ(e,t,n,r="ltr"){const a=Hg(n),o=a/2,l=t||o,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 vB([d,f],p)(e)}function LM(e,t,n="ltr"){const r=Hg(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,l=t.content-t.viewport,u=o-r,d=n==="ltr"?[0,l]:[l*-1,0],f=Cf(e,d);return vB([0,l],[0,u])(f)}function vB(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 gB(e,t){return e>0&&e<t}var KZ=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,u=n.top!==o.top;(l||u)&&t(),n=o,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function Wg(e,t){const n=nn(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 tu(e,t){const n=nn(t);Un(()=>{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 yB=sB,XZ=cB,ZZ=mB;const Kt=y.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(yB,{ref:r,className:ue("relative overflow-hidden",e),...n,children:[i.jsx(XZ,{className:"h-full w-full rounded-[inherit]",children:t}),i.jsx(xB,{}),i.jsx(ZZ,{})]}));Kt.displayName=yB.displayName;const xB=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>i.jsx(IO,{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:i.jsx(hB,{className:"relative flex-1 rounded-full bg-border"})}));xB.displayName=IO.displayName;var q0,BM;function Lr(){if(BM)return q0;BM=1;var e=Array.isArray;return q0=e,q0}var F0,zM;function bB(){if(zM)return F0;zM=1;var e=typeof yp=="object"&&yp&&yp.Object===Object&&yp;return F0=e,F0}var U0,qM;function xi(){if(qM)return U0;qM=1;var e=bB(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return U0=n,U0}var H0,FM;function Ch(){if(FM)return H0;FM=1;var e=xi(),t=e.Symbol;return H0=t,H0}var W0,UM;function QZ(){if(UM)return W0;UM=1;var e=Ch(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function o(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 W0=o,W0}var V0,HM;function JZ(){if(HM)return V0;HM=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return V0=n,V0}var G0,WM;function lo(){if(WM)return G0;WM=1;var e=Ch(),t=QZ(),n=JZ(),r="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?a:r:o&&o in Object(u)?t(u):n(u)}return G0=l,G0}var Y0,VM;function co(){if(VM)return Y0;VM=1;function e(t){return t!=null&&typeof t=="object"}return Y0=e,Y0}var K0,GM;function Lu(){if(GM)return K0;GM=1;var e=lo(),t=co(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return K0=r,K0}var X0,YM;function zO(){if(YM)return X0;YM=1;var e=Lr(),t=Lu(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(o,l){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return X0=a,X0}var Z0,KM;function as(){if(KM)return Z0;KM=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Z0=e,Z0}var Q0,XM;function qO(){if(XM)return Q0;XM=1;var e=lo(),t=as(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",o="[object Proxy]";function l(u){if(!t(u))return!1;var d=e(u);return d==r||d==a||d==n||d==o}return Q0=l,Q0}var J0,ZM;function eQ(){if(ZM)return J0;ZM=1;var e=xi(),t=e["__core-js_shared__"];return J0=t,J0}var ew,QM;function tQ(){if(QM)return ew;QM=1;var e=eQ(),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 ew=n,ew}var tw,JM;function wB(){if(JM)return tw;JM=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 tw=n,tw}var nw,eP;function nQ(){if(eP)return nw;eP=1;var e=qO(),t=tQ(),n=as(),r=wB(),a=/[\\^$.*+?()[\]{}|]/g,o=/^\[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:o;return x.test(r(g))}return nw=p,nw}var rw,tP;function rQ(){if(tP)return rw;tP=1;function e(t,n){return t?.[n]}return rw=e,rw}var aw,nP;function xl(){if(nP)return aw;nP=1;var e=nQ(),t=rQ();function n(r,a){var o=t(r,a);return e(o)?o:void 0}return aw=n,aw}var iw,rP;function Vg(){if(rP)return iw;rP=1;var e=xl(),t=e(Object,"create");return iw=t,iw}var ow,aP;function aQ(){if(aP)return ow;aP=1;var e=Vg();function t(){this.__data__=e?e(null):{},this.size=0}return ow=t,ow}var sw,iP;function iQ(){if(iP)return sw;iP=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return sw=e,sw}var lw,oP;function oQ(){if(oP)return lw;oP=1;var e=Vg(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(o){var l=this.__data__;if(e){var u=l[o];return u===t?void 0:u}return r.call(l,o)?l[o]:void 0}return lw=a,lw}var cw,sP;function sQ(){if(sP)return cw;sP=1;var e=Vg(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var o=this.__data__;return e?o[a]!==void 0:n.call(o,a)}return cw=r,cw}var uw,lP;function lQ(){if(lP)return uw;lP=1;var e=Vg(),t="__lodash_hash_undefined__";function n(r,a){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&a===void 0?t:a,this}return uw=n,uw}var dw,cP;function cQ(){if(cP)return dw;cP=1;var e=aQ(),t=iQ(),n=oQ(),r=sQ(),a=lQ();function o(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 o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,dw=o,dw}var fw,uP;function uQ(){if(uP)return fw;uP=1;function e(){this.__data__=[],this.size=0}return fw=e,fw}var hw,dP;function FO(){if(dP)return hw;dP=1;function e(t,n){return t===n||t!==t&&n!==n}return hw=e,hw}var mw,fP;function Gg(){if(fP)return mw;fP=1;var e=FO();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return mw=t,mw}var pw,hP;function dQ(){if(hP)return pw;hP=1;var e=Gg(),t=Array.prototype,n=t.splice;function r(a){var o=this.__data__,l=e(o,a);if(l<0)return!1;var u=o.length-1;return l==u?o.pop():n.call(o,l,1),--this.size,!0}return pw=r,pw}var vw,mP;function fQ(){if(mP)return vw;mP=1;var e=Gg();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return vw=t,vw}var gw,pP;function hQ(){if(pP)return gw;pP=1;var e=Gg();function t(n){return e(this.__data__,n)>-1}return gw=t,gw}var yw,vP;function mQ(){if(vP)return yw;vP=1;var e=Gg();function t(n,r){var a=this.__data__,o=e(a,n);return o<0?(++this.size,a.push([n,r])):a[o][1]=r,this}return yw=t,yw}var xw,gP;function Yg(){if(gP)return xw;gP=1;var e=uQ(),t=dQ(),n=fQ(),r=hQ(),a=mQ();function o(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 o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,xw=o,xw}var bw,yP;function UO(){if(yP)return bw;yP=1;var e=xl(),t=xi(),n=e(t,"Map");return bw=n,bw}var ww,xP;function pQ(){if(xP)return ww;xP=1;var e=cQ(),t=Yg(),n=UO();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return ww=r,ww}var jw,bP;function vQ(){if(bP)return jw;bP=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return jw=e,jw}var Sw,wP;function Kg(){if(wP)return Sw;wP=1;var e=vQ();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return Sw=t,Sw}var _w,jP;function gQ(){if(jP)return _w;jP=1;var e=Kg();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return _w=t,_w}var Nw,SP;function yQ(){if(SP)return Nw;SP=1;var e=Kg();function t(n){return e(this,n).get(n)}return Nw=t,Nw}var Ow,_P;function xQ(){if(_P)return Ow;_P=1;var e=Kg();function t(n){return e(this,n).has(n)}return Ow=t,Ow}var Cw,NP;function bQ(){if(NP)return Cw;NP=1;var e=Kg();function t(n,r){var a=e(this,n),o=a.size;return a.set(n,r),this.size+=a.size==o?0:1,this}return Cw=t,Cw}var Ew,OP;function HO(){if(OP)return Ew;OP=1;var e=pQ(),t=gQ(),n=yQ(),r=xQ(),a=bQ();function o(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 o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,Ew=o,Ew}var Aw,CP;function jB(){if(CP)return Aw;CP=1;var e=HO(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var o=function(){var l=arguments,u=a?a.apply(this,l):l[0],d=o.cache;if(d.has(u))return d.get(u);var f=r.apply(this,l);return o.cache=d.set(u,f)||d,f};return o.cache=new(n.Cache||e),o}return n.Cache=e,Aw=n,Aw}var Tw,EP;function wQ(){if(EP)return Tw;EP=1;var e=jB(),t=500;function n(r){var a=e(r,function(l){return o.size===t&&o.clear(),l}),o=a.cache;return a}return Tw=n,Tw}var kw,AP;function jQ(){if(AP)return kw;AP=1;var e=wQ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var o=[];return a.charCodeAt(0)===46&&o.push(""),a.replace(t,function(l,u,d,f){o.push(d?f.replace(n,"$1"):u||l)}),o});return kw=r,kw}var Mw,TP;function WO(){if(TP)return Mw;TP=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=Array(a);++r<a;)o[r]=n(t[r],r,t);return o}return Mw=e,Mw}var Pw,kP;function SQ(){if(kP)return Pw;kP=1;var e=Ch(),t=WO(),n=Lr(),r=Lu(),a=e?e.prototype:void 0,o=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 o?o.call(u):"";var d=u+"";return d=="0"&&1/u==-1/0?"-0":d}return Pw=l,Pw}var Rw,MP;function SB(){if(MP)return Rw;MP=1;var e=SQ();function t(n){return n==null?"":e(n)}return Rw=t,Rw}var Dw,PP;function _B(){if(PP)return Dw;PP=1;var e=Lr(),t=zO(),n=jQ(),r=SB();function a(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return Dw=a,Dw}var $w,RP;function Xg(){if(RP)return $w;RP=1;var e=Lu();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return $w=t,$w}var Iw,DP;function VO(){if(DP)return Iw;DP=1;var e=_B(),t=Xg();function n(r,a){a=e(a,r);for(var o=0,l=a.length;r!=null&&o<l;)r=r[t(a[o++])];return o&&o==l?r:void 0}return Iw=n,Iw}var Lw,$P;function NB(){if($P)return Lw;$P=1;var e=VO();function t(n,r,a){var o=n==null?void 0:e(n,r);return o===void 0?a:o}return Lw=t,Lw}var _Q=NB();const ta=St(_Q);var Bw,IP;function NQ(){if(IP)return Bw;IP=1;function e(t){return t==null}return Bw=e,Bw}var OQ=NQ();const Ge=St(OQ);var zw,LP;function CQ(){if(LP)return zw;LP=1;var e=lo(),t=Lr(),n=co(),r="[object String]";function a(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return zw=a,zw}var EQ=CQ();const ll=St(EQ);var AQ=qO();const We=St(AQ);var TQ=as();const Bu=St(TQ);var qw={exports:{}},xt={};var BP;function kQ(){if(BP)return xt;BP=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"),o=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 o:return w;default:return N}}case t:return N}}}return xt.ContextConsumer=l,xt.ContextProvider=o,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)===o},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===o||w.$$typeof===l||w.$$typeof===d||w.$$typeof===j||w.getModuleId!==void 0)},xt.typeOf=b,xt}var zP;function MQ(){return zP||(zP=1,qw.exports=kQ()),qw.exports}var PQ=MQ(),Fw,qP;function OB(){if(qP)return Fw;qP=1;var e=lo(),t=co(),n="[object Number]";function r(a){return typeof a=="number"||t(a)&&e(a)==n}return Fw=r,Fw}var Uw,FP;function RQ(){if(FP)return Uw;FP=1;var e=OB();function t(n){return e(n)&&n!=+n}return Uw=t,Uw}var DQ=RQ();const Eh=St(DQ);var $Q=OB();const IQ=St($Q);var br=function(t){return t===0?0:t>0?1:-1},Hs=function(t){return ll(t)&&t.indexOf("%")===t.length-1},Oe=function(t){return IQ(t)&&!Eh(t)},LQ=function(t){return Ge(t)},Mn=function(t){return Oe(t)||ll(t)},BQ=0,zu=function(t){var n=++BQ;return"".concat(t||"").concat(n)},wr=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)&&!ll(t))return r;var o;if(Hs(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Eh(o)&&(o=r),a&&o>n&&(o=n),o},Fo=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},zQ=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},Qr=function(t,n){return Oe(t)&&Oe(n)?function(r){return t+r*(n-t)}:function(){return n}};function wv(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ta(r,t))===n})}var qQ=function(t,n){return Oe(t)&&Oe(n)?t-n:ll(t)&&ll(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function qc(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 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 FQ=["viewBox","children"],UQ=["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"],UP=["points","pathLength"],Hw={svg:FQ,polygon:UP,polyline:UP},GO=["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"],jv=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(y.isValidElement(t)&&(r=t.props),!Bu(r))return null;var a={};return Object.keys(r).forEach(function(o){GO.includes(o)&&(a[o]=n||function(l){return r[o](r,l)})}),a},HQ=function(t,n,r){return function(a){return t(n,r,a),null}},cl=function(t,n,r){if(!Bu(t)||x_(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(o){var l=t[o];GO.includes(o)&&typeof l=="function"&&(a||(a={}),a[o]=HQ(l,n,r))}),a},WQ=["children"],VQ=["children"];function HP(e,t){if(e==null)return{};var n=GQ(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GQ(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 b_(e){"@babel/helpers - typeof";return b_=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},b_(e)}var WP={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"},Qi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},VP=null,Ww=null,YO=function e(t){if(t===VP&&Array.isArray(Ww))return Ww;var n=[];return y.Children.forEach(t,function(r){Ge(r)||(PQ.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Ww=n,VP=t,n};function na(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Qi(a)}):r=[Qi(t)],YO(e).forEach(function(a){var o=ta(a,"type.displayName")||ta(a,"type.name");r.indexOf(o)!==-1&&n.push(a)}),n}function Kr(e,t){var n=na(e,t);return n&&n[0]}var GP=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)},YQ=["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"],KQ=function(t){return t&&t.type&&ll(t.type)&&YQ.indexOf(t.type)>=0},XQ=function(t){return t&&b_(t)==="object"&&"clipDot"in t},ZQ=function(t,n,r,a){var o,l=(o=Hw?.[a])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!We(t)&&(a&&l.includes(n)||UQ.includes(n))||r&&GO.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),!Bu(a))return null;var o={};return Object.keys(a).forEach(function(l){var u;ZQ((u=a)===null||u===void 0?void 0:u[l],l,n,r)&&(o[l]=a[l])}),o},w_=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 YP(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var o=t[a],l=n[a];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!YP(o,l))return!1}return!0},YP=function(t,n){if(Ge(t)&&Ge(n))return!0;if(!Ge(t)&&!Ge(n)){var r=t.props||{},a=r.children,o=HP(r,WQ),l=n.props||{},u=l.children,d=HP(l,VQ);return a&&u?qc(o,d)&&w_(a,u):!a&&!u?qc(o,d):!1}return!1},KP=function(t,n){var r=[],a={};return YO(t).forEach(function(o,l){if(KQ(o))r.push(o);else if(o){var u=Qi(o.type),d=n[u]||{},f=d.handler,m=d.once;if(f&&(!m||!a[u])){var p=f(o,u,l);r.push(p),a[u]=!0}}}),r},QQ=function(t){var n=t&&t.type;return n&&WP[n]?WP[n]:null},JQ=function(t,n){return YO(n).indexOf(t)},eJ=["children","width","height","viewBox","className","style","title","desc"];function j_(){return j_=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},j_.apply(this,arguments)}function tJ(e,t){if(e==null)return{};var n=nJ(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nJ(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 S_(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,o=e.className,l=e.style,u=e.title,d=e.desc,f=tJ(e,eJ),m=a||{width:n,height:r,x:0,y:0},p=Ye("recharts-surface",o);return W.createElement("svg",j_({},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 rJ=["children","className"];function __(){return __=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},__.apply(this,arguments)}function aJ(e,t){if(e==null)return{};var n=iJ(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iJ(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=aJ(e,rJ),o=Ye("recharts-layer",r);return W.createElement("g",__({className:o},Be(a,!0),{ref:t}),n)}),qa=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o]},Vw,XP;function oJ(){if(XP)return Vw;XP=1;function e(t,n,r){var a=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++a<o;)l[a]=t[a+n];return l}return Vw=e,Vw}var Gw,ZP;function sJ(){if(ZP)return Gw;ZP=1;var e=oJ();function t(n,r,a){var o=n.length;return a=a===void 0?o:a,!r&&a>=o?n:e(n,r,a)}return Gw=t,Gw}var Yw,QP;function CB(){if(QP)return Yw;QP=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+e+a+o+"]");function d(f){return u.test(f)}return Yw=d,Yw}var Kw,JP;function lJ(){if(JP)return Kw;JP=1;function e(t){return t.split("")}return Kw=e,Kw}var Xw,eR;function cJ(){if(eR)return Xw;eR=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\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="["+o+"]?",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 Xw=A,Xw}var Zw,tR;function uJ(){if(tR)return Zw;tR=1;var e=lJ(),t=CB(),n=cJ();function r(a){return t(a)?n(a):e(a)}return Zw=r,Zw}var Qw,nR;function dJ(){if(nR)return Qw;nR=1;var e=sJ(),t=CB(),n=uJ(),r=SB();function a(o){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[o]()+f}}return Qw=a,Qw}var Jw,rR;function fJ(){if(rR)return Jw;rR=1;var e=dJ(),t=e("toUpperCase");return Jw=t,Jw}var hJ=fJ();const Zg=St(hJ);function zt(e){return function(){return e}}const EB=Math.cos,Sv=Math.sin,Va=Math.sqrt,_v=Math.PI,Qg=2*_v,N_=Math.PI,O_=2*N_,Bs=1e-6,mJ=O_-Bs;function AB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function pJ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return AB;const n=10**t;return function(r){this._+=r[0];for(let a=1,o=r.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class vJ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?AB:pJ(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,o,l){this._append`C${+t},${+n},${+r},${+a},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,a,o){if(t=+t,n=+n,r=+r,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);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>Bs)if(!(Math.abs(p*d-f*m)>Bs)||!o)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=o*Math.tan((N_-Math.acos((b+g-w)/(2*N*O)))/2),A=C/O,E=C/N;Math.abs(A-1)>Bs&&this._append`L${t+A*m},${n+A*p}`,this._append`A${o},${o},0,0,${+(p*x>m*j)},${this._x1=t+E*d},${this._y1=n+E*f}`}}arc(t,n,r,a,o,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-o:o-a;this._x1===null?this._append`M${f},${m}`:(Math.abs(this._x1-f)>Bs||Math.abs(this._y1-m)>Bs)&&this._append`L${f},${m}`,r&&(g<0&&(g=g%O_+O_),g>mJ?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>Bs&&this._append`A${r},${r},0,${+(g>=N_)},${p},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}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 KO(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 vJ(t)}function XO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TB(e){this._context=e}TB.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 Jg(e){return new TB(e)}function kB(e){return e[0]}function MB(e){return e[1]}function PB(e,t){var n=zt(!0),r=null,a=Jg,o=null,l=KO(u);e=typeof e=="function"?e:e===void 0?kB:zt(e),t=typeof t=="function"?t:t===void 0?MB:zt(t);function u(d){var f,m=(d=XO(d)).length,p,g=!1,x;for(r==null&&(o=a(x=l())),f=0;f<=m;++f)!(f<m&&n(p=d[f],f,d))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(p,f,d),+t(p,f,d));if(x)return o=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&&(o=a(r)),u):a},u.context=function(d){return arguments.length?(d==null?r=o=null:o=a(r=d),u):r},u}function Cp(e,t,n){var r=null,a=zt(!0),o=null,l=Jg,u=null,d=KO(f);e=typeof e=="function"?e:e===void 0?kB:zt(+e),t=typeof t=="function"?t:zt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?MB:zt(+n);function f(p){var g,x,j,b=(p=XO(p)).length,w,N=!1,O,C=new Array(b),A=new Array(b);for(o==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(o)}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,o!=null&&(u=l(o)),f):l},f.context=function(p){return arguments.length?(p==null?o=u=null:u=l(o=p),f):o},f}class RB{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 gJ(e){return new RB(e,!0)}function yJ(e){return new RB(e,!1)}const ZO={draw(e,t){const n=Va(t/_v);e.moveTo(n,0),e.arc(0,0,n,0,Qg)}},xJ={draw(e,t){const n=Va(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()}},DB=Va(1/3),bJ=DB*2,wJ={draw(e,t){const n=Va(t/bJ),r=n*DB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},jJ={draw(e,t){const n=Va(t),r=-n/2;e.rect(r,r,n,n)}},SJ=.8908130915292852,$B=Sv(_v/10)/Sv(7*_v/10),_J=Sv(Qg/10)*$B,NJ=-EB(Qg/10)*$B,OJ={draw(e,t){const n=Va(t*SJ),r=_J*n,a=NJ*n;e.moveTo(0,-n),e.lineTo(r,a);for(let o=1;o<5;++o){const l=Qg*o/5,u=EB(l),d=Sv(l);e.lineTo(d*n,-u*n),e.lineTo(u*r-d*a,d*r+u*a)}e.closePath()}},ej=Va(3),CJ={draw(e,t){const n=-Va(t/(ej*3));e.moveTo(0,n*2),e.lineTo(-ej*n,-n),e.lineTo(ej*n,-n),e.closePath()}},ga=-.5,ya=Va(3)/2,C_=1/Va(12),EJ=(C_/2+1)*3,AJ={draw(e,t){const n=Va(t/EJ),r=n/2,a=n*C_,o=r,l=n*C_+n,u=-o,d=l;e.moveTo(r,a),e.lineTo(o,l),e.lineTo(u,d),e.lineTo(ga*r-ya*a,ya*r+ga*a),e.lineTo(ga*o-ya*l,ya*o+ga*l),e.lineTo(ga*u-ya*d,ya*u+ga*d),e.lineTo(ga*r+ya*a,ga*a-ya*r),e.lineTo(ga*o+ya*l,ga*l-ya*o),e.lineTo(ga*u+ya*d,ga*d-ya*u),e.closePath()}};function TJ(e,t){let n=null,r=KO(a);e=typeof e=="function"?e:zt(e||ZO),t=typeof t=="function"?t:zt(t===void 0?64:+t);function a(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:zt(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:zt(+o),a):t},a.context=function(o){return arguments.length?(n=o??null,a):n},a}function Nv(){}function Ov(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 IB(e){this._context=e}IB.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:Ov(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:Ov(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:Nv,areaEnd:Nv,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:Ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MJ(e){return new LB(e)}function BB(e){this._context=e}BB.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:Ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PJ(e){return new BB(e)}function zB(e){this._context=e}zB.prototype={areaStart:Nv,areaEnd:Nv,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 RJ(e){return new zB(e)}function aR(e){return e<0?-1:1}function iR(e,t,n){var r=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),u=(o*a+l*r)/(r+a);return(aR(o)+aR(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function oR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function tj(e,t,n){var r=e._x0,a=e._y0,o=e._x1,l=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,a+u*t,o-u,l-u*n,o,l)}function Cv(e){this._context=e}Cv.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:tj(this,this._t0,oR(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,tj(this,oR(this,n=iR(this,e,t)),n);break;default:tj(this,this._t0,n=iR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qB(e){this._context=new FB(e)}(qB.prototype=Object.create(Cv.prototype)).point=function(e,t){Cv.prototype.point.call(this,t,e)};function FB(e){this._context=e}FB.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,o){this._context.bezierCurveTo(t,e,r,n,o,a)}};function DJ(e){return new Cv(e)}function $J(e){return new qB(e)}function UB(e){this._context=e}UB.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=sR(e),a=sR(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],a[0][o],r[1][o],a[1][o],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 sR(e){var t,n=e.length-1,r,a=new Array(n),o=new Array(n),l=new Array(n);for(a[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(a[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)a[t]=(l[t]-a[t+1])/o[t];for(o[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function IJ(e){return new UB(e)}function ey(e,t){this._context=e,this._t=t}ey.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 LJ(e){return new ey(e,.5)}function BJ(e){return new ey(e,0)}function zJ(e){return new ey(e,1)}function nu(e,t){if((l=e.length)>1)for(var n=1,r,a,o=e[t[0]],l,u=o.length;n<l;++n)for(a=o,o=e[t[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function E_(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function qJ(e,t){return e[t]}function FJ(e){const t=[];return t.key=e,t}function UJ(){var e=zt([]),t=E_,n=nu,r=qJ;function a(o){var l=Array.from(e.apply(this,arguments),FJ),u,d=l.length,f=-1,m;for(const p of o)for(u=0,++f;u<d;++u)(l[u][f]=[0,+r(p,l[u].key,f,o)]).data=p;for(u=0,m=XO(t(l));u<d;++u)l[m[u]].index=u;return n(l,m),l}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:zt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(r=typeof o=="function"?o:zt(+o),a):r},a.order=function(o){return arguments.length?(t=o==null?E_:typeof o=="function"?o:zt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(n=o??nu,a):n},a}function HJ(e,t){if((r=e.length)>0){for(var n,r,a=0,o=e[0].length,l;a<o;++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}nu(e,t)}}function WJ(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,o=r.length;n<o;++n){for(var l=0,u=0;l<a;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}nu(e,t)}}function VJ(e,t){if(!(!((l=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,o,l;r<o;++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,nu(e,t)}}function Ef(e){"@babel/helpers - typeof";return Ef=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},Ef(e)}var GJ=["type","size","sizeType"];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 lR(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 cR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lR(Object(n),!0).forEach(function(r){YJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YJ(e,t,n){return t=KJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KJ(e){var t=XJ(e,"string");return Ef(t)=="symbol"?t:t+""}function XJ(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZJ(e,t){if(e==null)return{};var n=QJ(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QJ(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 HB={symbolCircle:ZO,symbolCross:xJ,symbolDiamond:wJ,symbolSquare:jJ,symbolStar:OJ,symbolTriangle:CJ,symbolWye:AJ},JJ=Math.PI/180,eee=function(t){var n="symbol".concat(Zg(t));return HB[n]||ZO},tee=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*JJ;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}},nee=function(t,n){HB["symbol".concat(Zg(t))]=n},QO=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,o=a===void 0?64:a,l=t.sizeType,u=l===void 0?"area":l,d=ZJ(t,GJ),f=cR(cR({},d),{},{type:r,size:o,sizeType:u}),m=function(){var w=eee(r),N=TJ().type(w).size(tee(o,u,r));return N()},p=f.className,g=f.cx,x=f.cy,j=Be(f,!0);return g===+g&&x===+x&&o===+o?W.createElement("path",A_({},j,{className:Ye("recharts-symbols",p),transform:"translate(".concat(g,", ").concat(x,")"),d:m()})):null};QO.registerSymbol=nee;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)}function T_(){return T_=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},T_.apply(this,arguments)}function uR(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 ree(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uR(Object(n),!0).forEach(function(r){Af(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iee(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,VB(r.key),r)}}function oee(e,t,n){return t&&iee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function see(e,t,n){return t=Ev(t),lee(e,WB()?Reflect.construct(t,n||[],Ev(e).constructor):t.apply(e,n))}function lee(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 cee(e)}function cee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WB=function(){return!!e})()}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function uee(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 Af(e,t,n){return t=VB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VB(e){var t=dee(e,"string");return ru(t)=="symbol"?t:t+""}function dee(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)}var xa=32,JO=(function(e){function t(){return aee(this,t),see(this,t,arguments)}return uee(t,e),oee(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,o=xa/2,l=xa/6,u=xa/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:o,x2:xa,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return W.createElement("path",{strokeWidth:4,fill:"none",stroke:d,d:"M0,".concat(o,"h").concat(u,`
|
||
A`).concat(l,",").concat(l,",0,1,1,").concat(2*u,",").concat(o,`
|
||
H`).concat(xa,"M").concat(2*u,",").concat(o,`
|
||
A`).concat(l,",").concat(l,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return W.createElement("path",{stroke:"none",fill:d,d:"M0,".concat(xa/8,"h").concat(xa,"v").concat(xa*3/4,"h").concat(-xa,"z"),className:"recharts-legend-icon"});if(W.isValidElement(r.legendIcon)){var f=ree({},r);return delete f.legendIcon,W.cloneElement(r.legendIcon,f)}return W.createElement(QO,{fill:d,cx:o,cy:o,size:xa,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,o=a.payload,l=a.iconSize,u=a.layout,d=a.formatter,f=a.inactiveColor,m={x:0,y:0,width:xa,height:xa},p={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(x,j){var b=x.formatter||d,w=Ye(Af(Af({"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;qa(!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",T_({className:w,style:p,key:"legend-item-".concat(j)},cl(r.props,x,j)),W.createElement(S_,{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,o=r.layout,l=r.align;if(!a||!a.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return W.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(y.PureComponent);Af(JO,"displayName","Legend");Af(JO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var nj,dR;function fee(){if(dR)return nj;dR=1;var e=Yg();function t(){this.__data__=new e,this.size=0}return nj=t,nj}var rj,fR;function hee(){if(fR)return rj;fR=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return rj=e,rj}var aj,hR;function mee(){if(hR)return aj;hR=1;function e(t){return this.__data__.get(t)}return aj=e,aj}var ij,mR;function pee(){if(mR)return ij;mR=1;function e(t){return this.__data__.has(t)}return ij=e,ij}var oj,pR;function vee(){if(pR)return oj;pR=1;var e=Yg(),t=UO(),n=HO(),r=200;function a(o,l){var u=this.__data__;if(u instanceof e){var d=u.__data__;if(!t||d.length<r-1)return d.push([o,l]),this.size=++u.size,this;u=this.__data__=new n(d)}return u.set(o,l),this.size=u.size,this}return oj=a,oj}var sj,vR;function GB(){if(vR)return sj;vR=1;var e=Yg(),t=fee(),n=hee(),r=mee(),a=pee(),o=vee();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=o,sj=l,sj}var lj,gR;function gee(){if(gR)return lj;gR=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return lj=t,lj}var cj,yR;function yee(){if(yR)return cj;yR=1;function e(t){return this.__data__.has(t)}return cj=e,cj}var uj,xR;function YB(){if(xR)return uj;xR=1;var e=HO(),t=gee(),n=yee();function r(a){var o=-1,l=a==null?0:a.length;for(this.__data__=new e;++o<l;)this.add(a[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,uj=r,uj}var dj,bR;function KB(){if(bR)return dj;bR=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 dj=e,dj}var fj,wR;function XB(){if(wR)return fj;wR=1;function e(t,n){return t.has(n)}return fj=e,fj}var hj,jR;function ZB(){if(jR)return hj;jR=1;var e=YB(),t=KB(),n=XB(),r=1,a=2;function o(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,M){if(!n(C,M)&&(A===T||m(A,T,d,f,p)))return C.push(M)})){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 hj=o,hj}var mj,SR;function xee(){if(SR)return mj;SR=1;var e=xi(),t=e.Uint8Array;return mj=t,mj}var pj,_R;function bee(){if(_R)return pj;_R=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,o){r[++n]=[o,a]}),r}return pj=e,pj}var vj,NR;function eC(){if(NR)return vj;NR=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return vj=e,vj}var gj,OR;function wee(){if(OR)return gj;OR=1;var e=Ch(),t=xee(),n=FO(),r=ZB(),a=bee(),o=eC(),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,M,$,z,D,U){switch(M){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=o),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 gj=E,gj}var yj,CR;function QB(){if(CR)return yj;CR=1;function e(t,n){for(var r=-1,a=n.length,o=t.length;++r<a;)t[o+r]=n[r];return t}return yj=e,yj}var xj,ER;function jee(){if(ER)return xj;ER=1;var e=QB(),t=Lr();function n(r,a,o){var l=a(r);return t(r)?l:e(l,o(r))}return xj=n,xj}var bj,AR;function See(){if(AR)return bj;AR=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=0,l=[];++r<a;){var u=t[r];n(u,r,t)&&(l[o++]=u)}return l}return bj=e,bj}var wj,TR;function _ee(){if(TR)return wj;TR=1;function e(){return[]}return wj=e,wj}var jj,kR;function Nee(){if(kR)return jj;kR=1;var e=See(),t=_ee(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(l){return l==null?[]:(l=Object(l),e(a(l),function(u){return r.call(l,u)}))}:t;return jj=o,jj}var Sj,MR;function Oee(){if(MR)return Sj;MR=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return Sj=e,Sj}var _j,PR;function Cee(){if(PR)return _j;PR=1;var e=lo(),t=co(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return _j=r,_j}var Nj,RR;function tC(){if(RR)return Nj;RR=1;var e=Cee(),t=co(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!a.call(l,"callee")};return Nj=o,Nj}var lf={exports:{}},Oj,DR;function Eee(){if(DR)return Oj;DR=1;function e(){return!1}return Oj=e,Oj}lf.exports;var $R;function JB(){return $R||($R=1,(function(e,t){var n=xi(),r=Eee(),a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===a,u=l?n.Buffer:void 0,d=u?u.isBuffer:void 0,f=d||r;e.exports=f})(lf,lf.exports)),lf.exports}var Cj,IR;function nC(){if(IR)return Cj;IR=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var o=typeof r;return a=a??e,!!a&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return Cj=n,Cj}var Ej,LR;function rC(){if(LR)return Ej;LR=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Ej=t,Ej}var Aj,BR;function Aee(){if(BR)return Aj;BR=1;var e=lo(),t=rC(),n=co(),r="[object Arguments]",a="[object Array]",o="[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]",M="[object Uint8ClampedArray]",$="[object Uint16Array]",z="[object Uint32Array]",D={};D[O]=D[C]=D[A]=D[E]=D[k]=D[T]=D[M]=D[$]=D[z]=!0,D[r]=D[a]=D[w]=D[o]=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 Aj=U,Aj}var Tj,zR;function ez(){if(zR)return Tj;zR=1;function e(t){return function(n){return t(n)}}return Tj=e,Tj}var cf={exports:{}};cf.exports;var qR;function Tee(){return qR||(qR=1,(function(e,t){var n=bB(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,l=o&&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})(cf,cf.exports)),cf.exports}var kj,FR;function tz(){if(FR)return kj;FR=1;var e=Aee(),t=ez(),n=Tee(),r=n&&n.isTypedArray,a=r?t(r):e;return kj=a,kj}var Mj,UR;function kee(){if(UR)return Mj;UR=1;var e=Oee(),t=tC(),n=Lr(),r=JB(),a=nC(),o=tz(),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&&o(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 Mj=d,Mj}var Pj,HR;function Mee(){if(HR)return Pj;HR=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 Rj,WR;function nz(){if(WR)return Rj;WR=1;function e(t,n){return function(r){return t(n(r))}}return Rj=e,Rj}var Dj,VR;function Pee(){if(VR)return Dj;VR=1;var e=nz(),t=e(Object.keys,Object);return Dj=t,Dj}var $j,GR;function Ree(){if(GR)return $j;GR=1;var e=Mee(),t=Pee(),n=Object.prototype,r=n.hasOwnProperty;function a(o){if(!e(o))return t(o);var l=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&l.push(u);return l}return $j=a,$j}var Ij,YR;function Ah(){if(YR)return Ij;YR=1;var e=qO(),t=rC();function n(r){return r!=null&&t(r.length)&&!e(r)}return Ij=n,Ij}var Lj,KR;function ty(){if(KR)return Lj;KR=1;var e=kee(),t=Ree(),n=Ah();function r(a){return n(a)?e(a):t(a)}return Lj=r,Lj}var Bj,XR;function Dee(){if(XR)return Bj;XR=1;var e=jee(),t=Nee(),n=ty();function r(a){return e(a,n,t)}return Bj=r,Bj}var zj,ZR;function $ee(){if(ZR)return zj;ZR=1;var e=Dee(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(o,l,u,d,f,m){var p=u&t,g=e(o),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(o),C=m.get(l);if(O&&C)return O==l&&C==o;var A=!0;m.set(o,l),m.set(l,o);for(var E=p;++w<x;){N=g[w];var k=o[N],T=l[N];if(d)var M=p?d(T,k,N,l,o,m):d(k,T,N,o,l,m);if(!(M===void 0?k===T||f(k,T,u,d,m):M)){A=!1;break}E||(E=N=="constructor")}if(A&&!E){var $=o.constructor,z=l.constructor;$!=z&&"constructor"in o&&"constructor"in l&&!(typeof $=="function"&&$ instanceof $&&typeof z=="function"&&z instanceof z)&&(A=!1)}return m.delete(o),m.delete(l),A}return zj=a,zj}var qj,QR;function Iee(){if(QR)return qj;QR=1;var e=xl(),t=xi(),n=e(t,"DataView");return qj=n,qj}var Fj,JR;function Lee(){if(JR)return Fj;JR=1;var e=xl(),t=xi(),n=e(t,"Promise");return Fj=n,Fj}var Uj,eD;function rz(){if(eD)return Uj;eD=1;var e=xl(),t=xi(),n=e(t,"Set");return Uj=n,Uj}var Hj,tD;function Bee(){if(tD)return Hj;tD=1;var e=xl(),t=xi(),n=e(t,"WeakMap");return Hj=n,Hj}var Wj,nD;function zee(){if(nD)return Wj;nD=1;var e=Iee(),t=UO(),n=Lee(),r=rz(),a=Bee(),o=lo(),l=wB(),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=o;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=o(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}),Wj=O,Wj}var Vj,rD;function qee(){if(rD)return Vj;rD=1;var e=GB(),t=ZB(),n=wee(),r=$ee(),a=zee(),o=Lr(),l=JB(),u=tz(),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=o(b),k=o(w),T=E?m:a(b),M=k?m:a(w);T=T==f?p:T,M=M==f?p:M;var $=T==p,z=M==p,D=T==M;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 Vj=j,Vj}var Gj,aD;function aC(){if(aD)return Gj;aD=1;var e=qee(),t=co();function n(r,a,o,l,u){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,o,l,n,u)}return Gj=n,Gj}var Yj,iD;function Fee(){if(iD)return Yj;iD=1;var e=GB(),t=aC(),n=1,r=2;function a(o,l,u,d){var f=u.length,m=f,p=!d;if(o==null)return!m;for(o=Object(o);f--;){var g=u[f];if(p&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++f<m;){g=u[f];var x=g[0],j=o[x],b=g[1];if(p&&g[2]){if(j===void 0&&!(x in o))return!1}else{var w=new e;if(d)var N=d(j,b,x,o,l,w);if(!(N===void 0?t(b,j,n|r,d,w):N))return!1}}return!0}return Yj=a,Yj}var Kj,oD;function az(){if(oD)return Kj;oD=1;var e=as();function t(n){return n===n&&!e(n)}return Kj=t,Kj}var Xj,sD;function Uee(){if(sD)return Xj;sD=1;var e=az(),t=ty();function n(r){for(var a=t(r),o=a.length;o--;){var l=a[o],u=r[l];a[o]=[l,u,e(u)]}return a}return Xj=n,Xj}var Zj,lD;function iz(){if(lD)return Zj;lD=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Zj=e,Zj}var Qj,cD;function Hee(){if(cD)return Qj;cD=1;var e=Fee(),t=Uee(),n=iz();function r(a){var o=t(a);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===a||e(l,a,o)}}return Qj=r,Qj}var Jj,uD;function Wee(){if(uD)return Jj;uD=1;function e(t,n){return t!=null&&n in Object(t)}return Jj=e,Jj}var e1,dD;function Vee(){if(dD)return e1;dD=1;var e=_B(),t=tC(),n=Lr(),r=nC(),a=rC(),o=Xg();function l(u,d,f){d=e(d,u);for(var m=-1,p=d.length,g=!1;++m<p;){var x=o(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 e1=l,e1}var t1,fD;function Gee(){if(fD)return t1;fD=1;var e=Wee(),t=Vee();function n(r,a){return r!=null&&t(r,a,e)}return t1=n,t1}var n1,hD;function Yee(){if(hD)return n1;hD=1;var e=aC(),t=NB(),n=Gee(),r=zO(),a=az(),o=iz(),l=Xg(),u=1,d=2;function f(m,p){return r(m)&&a(p)?o(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 n1=f,n1}var r1,mD;function qu(){if(mD)return r1;mD=1;function e(t){return t}return r1=e,r1}var a1,pD;function Kee(){if(pD)return a1;pD=1;function e(t){return function(n){return n?.[t]}}return a1=e,a1}var i1,vD;function Xee(){if(vD)return i1;vD=1;var e=VO();function t(n){return function(r){return e(r,n)}}return i1=t,i1}var o1,gD;function Zee(){if(gD)return o1;gD=1;var e=Kee(),t=Xee(),n=zO(),r=Xg();function a(o){return n(o)?e(r(o)):t(o)}return o1=a,o1}var s1,yD;function bi(){if(yD)return s1;yD=1;var e=Hee(),t=Yee(),n=qu(),r=Lr(),a=Zee();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):a(l)}return s1=o,s1}var l1,xD;function oz(){if(xD)return l1;xD=1;function e(t,n,r,a){for(var o=t.length,l=r+(a?1:-1);a?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return l1=e,l1}var c1,bD;function Qee(){if(bD)return c1;bD=1;function e(t){return t!==t}return c1=e,c1}var u1,wD;function Jee(){if(wD)return u1;wD=1;function e(t,n,r){for(var a=r-1,o=t.length;++a<o;)if(t[a]===n)return a;return-1}return u1=e,u1}var d1,jD;function ete(){if(jD)return d1;jD=1;var e=oz(),t=Qee(),n=Jee();function r(a,o,l){return o===o?n(a,o,l):e(a,t,l)}return d1=r,d1}var f1,SD;function tte(){if(SD)return f1;SD=1;var e=ete();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return f1=t,f1}var h1,_D;function nte(){if(_D)return h1;_D=1;function e(t,n,r){for(var a=-1,o=t==null?0:t.length;++a<o;)if(r(n,t[a]))return!0;return!1}return h1=e,h1}var m1,ND;function rte(){if(ND)return m1;ND=1;function e(){}return m1=e,m1}var p1,OD;function ate(){if(OD)return p1;OD=1;var e=rz(),t=rte(),n=eC(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return p1=a,p1}var v1,CD;function ite(){if(CD)return v1;CD=1;var e=YB(),t=tte(),n=nte(),r=XB(),a=ate(),o=eC(),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 o(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 v1=u,v1}var g1,ED;function ote(){if(ED)return g1;ED=1;var e=bi(),t=ite();function n(r,a){return r&&r.length?t(r,e(a,2)):[]}return g1=n,g1}var ste=ote();const AD=St(ste);function sz(e,t,n){return t===!0?AD(e,n):We(t)?AD(e,t):e}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)}var lte=["ref"];function TD(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 Fi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TD(Object(n),!0).forEach(function(r){ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kD(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,cz(r.key),r)}}function ute(e,t,n){return t&&kD(e.prototype,t),n&&kD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dte(e,t,n){return t=Av(t),fte(e,lz()?Reflect.construct(t,n||[],Av(e).constructor):t.apply(e,n))}function fte(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 hte(e)}function hte(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lz=function(){return!!e})()}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function mte(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 ny(e,t,n){return t=cz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cz(e){var t=pte(e,"string");return au(t)=="symbol"?t:t+""}function pte(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)}function vte(e,t){if(e==null)return{};var n=gte(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gte(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 yte(e){return e.value}function xte(e,t){if(W.isValidElement(e))return W.cloneElement(e,t);if(typeof e=="function")return W.createElement(e,t);t.ref;var n=vte(t,lte);return W.createElement(JO,n)}var MD=1,Js=(function(e){function t(){var n;cte(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=dte(this,t,[].concat(a)),ny(n,"lastBoundingBox",{width:-1,height:-1}),n}return mte(t,e),ute(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)>MD||Math.abs(a.height-this.lastBoundingBox.height)>MD)&&(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?Fi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,o=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"&&o==="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 Fi(Fi({},p),g)}},{key:"render",value:function(){var r=this,a=this.props,o=a.content,l=a.width,u=a.height,d=a.wrapperStyle,f=a.payloadUniqBy,m=a.payload,p=Fi(Fi({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}},xte(o,Fi(Fi({},this.props),{},{payload:sz(m,f,yte)})))}}],[{key:"getWithHeight",value:function(r,a){var o=Fi(Fi({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&Oe(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])})(y.PureComponent);ny(Js,"displayName","Legend");ny(Js,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var y1,PD;function bte(){if(PD)return y1;PD=1;var e=Ch(),t=tC(),n=Lr(),r=e?e.isConcatSpreadable:void 0;function a(o){return n(o)||t(o)||!!(r&&o&&o[r])}return y1=a,y1}var x1,RD;function uz(){if(RD)return x1;RD=1;var e=QB(),t=bte();function n(r,a,o,l,u){var d=-1,f=r.length;for(o||(o=t),u||(u=[]);++d<f;){var m=r[d];a>0&&o(m)?a>1?n(m,a-1,o,l,u):e(u,m):l||(u[u.length]=m)}return u}return x1=n,x1}var b1,DD;function wte(){if(DD)return b1;DD=1;function e(t){return function(n,r,a){for(var o=-1,l=Object(n),u=a(n),d=u.length;d--;){var f=u[t?d:++o];if(r(l[f],f,l)===!1)break}return n}}return b1=e,b1}var w1,$D;function jte(){if($D)return w1;$D=1;var e=wte(),t=e();return w1=t,w1}var j1,ID;function dz(){if(ID)return j1;ID=1;var e=jte(),t=ty();function n(r,a){return r&&e(r,a,t)}return j1=n,j1}var S1,LD;function Ste(){if(LD)return S1;LD=1;var e=Ah();function t(n,r){return function(a,o){if(a==null)return a;if(!e(a))return n(a,o);for(var l=a.length,u=r?l:-1,d=Object(a);(r?u--:++u<l)&&o(d[u],u,d)!==!1;);return a}}return S1=t,S1}var _1,BD;function iC(){if(BD)return _1;BD=1;var e=dz(),t=Ste(),n=t(e);return _1=n,_1}var N1,zD;function fz(){if(zD)return N1;zD=1;var e=iC(),t=Ah();function n(r,a){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(u,d,f){l[++o]=a(u,d,f)}),l}return N1=n,N1}var O1,qD;function _te(){if(qD)return O1;qD=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return O1=e,O1}var C1,FD;function Nte(){if(FD)return C1;FD=1;var e=Lu();function t(n,r){if(n!==r){var a=n!==void 0,o=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||o&&d&&m||!a&&m||!l)return 1;if(!o&&!u&&!p&&n<r||p&&a&&l&&!o&&!u||f&&a&&l||!d&&l||!m)return-1}return 0}return C1=t,C1}var E1,UD;function Ote(){if(UD)return E1;UD=1;var e=Nte();function t(n,r,a){for(var o=-1,l=n.criteria,u=r.criteria,d=l.length,f=a.length;++o<d;){var m=e(l[o],u[o]);if(m){if(o>=f)return m;var p=a[o];return m*(p=="desc"?-1:1)}}return n.index-r.index}return E1=t,E1}var A1,HD;function Cte(){if(HD)return A1;HD=1;var e=WO(),t=VO(),n=bi(),r=fz(),a=_te(),o=ez(),l=Ote(),u=qu(),d=Lr();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,o(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 A1=f,A1}var T1,WD;function Ete(){if(WD)return T1;WD=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 T1=e,T1}var k1,VD;function Ate(){if(VD)return k1;VD=1;var e=Ete(),t=Math.max;function n(r,a,o){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]=o(f),e(r,this,m)}}return k1=n,k1}var M1,GD;function Tte(){if(GD)return M1;GD=1;function e(t){return function(){return t}}return M1=e,M1}var P1,YD;function hz(){if(YD)return P1;YD=1;var e=xl(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return P1=t,P1}var R1,KD;function kte(){if(KD)return R1;KD=1;var e=Tte(),t=hz(),n=qu(),r=t?function(a,o){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return R1=r,R1}var D1,XD;function Mte(){if(XD)return D1;XD=1;var e=800,t=16,n=Date.now;function r(a){var o=0,l=0;return function(){var u=n(),d=t-(u-l);if(l=u,d>0){if(++o>=e)return arguments[0]}else o=0;return a.apply(void 0,arguments)}}return D1=r,D1}var $1,ZD;function Pte(){if(ZD)return $1;ZD=1;var e=kte(),t=Mte(),n=t(e);return $1=n,$1}var I1,QD;function Rte(){if(QD)return I1;QD=1;var e=qu(),t=Ate(),n=Pte();function r(a,o){return n(t(a,o,e),a+"")}return I1=r,I1}var L1,JD;function ry(){if(JD)return L1;JD=1;var e=FO(),t=Ah(),n=nC(),r=as();function a(o,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],o):!1}return L1=a,L1}var B1,e4;function Dte(){if(e4)return B1;e4=1;var e=uz(),t=Cte(),n=Rte(),r=ry(),a=n(function(o,l){if(o==null)return[];var u=l.length;return u>1&&r(o,l[0],l[1])?l=[]:u>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return B1=a,B1}var $te=Dte();const oC=St($te);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 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 Ite(e,t){return qte(e)||zte(e,t)||Bte(e,t)||Lte()}function Lte(){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 Bte(e,t){if(e){if(typeof e=="string")return t4(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 t4(e,t)}}function t4(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 zte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 qte(e){if(Array.isArray(e))return e}function n4(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 z1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n4(Object(n),!0).forEach(function(r){Fte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fte(e,t,n){return t=Ute(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ute(e){var t=Hte(e,"string");return Tf(t)=="symbol"?t:t+""}function Hte(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)}function Wte(e){return Array.isArray(e)&&Mn(e[0])&&Mn(e[1])?e.join(" ~ "):e}var Vte=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,o=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?oC(m,g):m).map(function(H,G){if(H.type==="none")return null;var L=z1({display:"block",paddingTop:4,paddingBottom:4,color:H.color||"#000"},u),R=H.formatter||p||Wte,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=Ite(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},Mn(I)?W.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Mn(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=z1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),E=z1({margin:0},f),k=!Ge(b),T=k?b:"",M=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:M,style:A},z),W.createElement("p",{className:$,style:E},W.isValidElement(T)?T:"".concat(T)),C())};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 Ep(e,t,n){return t=Gte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gte(e){var t=Yte(e,"string");return kf(t)=="symbol"?t:t+""}function Yte(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)}var Kd="recharts-tooltip-wrapper",Kte={visibility:"hidden"};function Xte(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ye(Kd,Ep(Ep(Ep(Ep({},"".concat(Kd,"-right"),Oe(n)&&t&&Oe(t.x)&&n>=t.x),"".concat(Kd,"-left"),Oe(n)&&t&&Oe(t.x)&&n<t.x),"".concat(Kd,"-bottom"),Oe(r)&&t&&Oe(t.y)&&r>=t.y),"".concat(Kd,"-top"),Oe(r)&&t&&Oe(t.y)&&r<t.y))}function r4(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,o=e.position,l=e.reverseDirection,u=e.tooltipDimension,d=e.viewBox,f=e.viewBoxDimension;if(o&&Oe(o[r]))return o[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 Zte(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 Qte(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipBox,u=e.useTranslate3d,d=e.viewBox,f,m,p;return l.height>0&&l.width>0&&n?(m=r4({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),p=r4({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),f=Zte({translateX:m,translateY:p,useTranslate3d:u})):f=Kte,{cssProperties:f,cssClasses:Xte({translateX:m,translateY:p,coordinate:n})}}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 a4(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 i4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a4(Object(n),!0).forEach(function(r){D_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ene(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,pz(r.key),r)}}function tne(e,t,n){return t&&ene(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nne(e,t,n){return t=Tv(t),rne(e,mz()?Reflect.construct(t,n||[],Tv(e).constructor):t.apply(e,n))}function rne(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 ane(e)}function ane(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mz=function(){return!!e})()}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function ine(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&&R_(e,t)}function R_(e,t){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},R_(e,t)}function D_(e,t,n){return t=pz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pz(e){var t=one(e,"string");return iu(t)=="symbol"?t:t+""}function one(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)}var o4=1,sne=(function(e){function t(){var n;Jte(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=nne(this,t,[].concat(a)),D_(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),D_(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 ine(t,e),tne(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>o4||Math.abs(r.height-this.state.lastBoundingBox.height)>o4)&&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,o=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=Qte({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=i4(i4({transition:g&&o?"transform ".concat(u,"ms ").concat(d):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&p?"visible":"hidden",position:"absolute",top:0,left:0},O);return W.createElement("div",{tabIndex:-1,className:A,style:k,ref:function(M){r.wrapperNode=M}},f)}}])})(y.PureComponent),lne=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},bl={isSsr:lne()};function ou(e){"@babel/helpers - typeof";return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ou(e)}function s4(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 l4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s4(Object(n),!0).forEach(function(r){sC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function une(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,gz(r.key),r)}}function dne(e,t,n){return t&&une(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fne(e,t,n){return t=kv(t),hne(e,vz()?Reflect.construct(t,n||[],kv(e).constructor):t.apply(e,n))}function hne(e,t){if(t&&(ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mne(e)}function mne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vz=function(){return!!e})()}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function pne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$_(e,t)}function $_(e,t){return $_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},$_(e,t)}function sC(e,t,n){return t=gz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gz(e){var t=vne(e,"string");return ou(t)=="symbol"?t:t+""}function vne(e,t){if(ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function gne(e){return e.dataKey}function yne(e,t){return W.isValidElement(e)?W.cloneElement(e,t):typeof e=="function"?W.createElement(e,t):W.createElement(Vte,t)}var ti=(function(e){function t(){return cne(this,t),fne(this,t,arguments)}return pne(t,e),dne(t,[{key:"render",value:function(){var r=this,a=this.props,o=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=sz(j.filter(function(T){return T.value!=null&&(T.hide!==!0||r.props.includeHidden)}),b,gne));var k=E.length>0;return W.createElement(sne,{allowEscapeViewBox:l,animationDuration:u,animationEasing:d,isAnimationActive:g,active:o,coordinate:m,hasPayload:k,offset:x,position:w,reverseDirection:N,useTranslate3d:O,viewBox:C,wrapperStyle:A},yne(f,l4(l4({},this.props),{},{payload:E})))}}])})(y.PureComponent);sC(ti,"displayName","Tooltip");sC(ti,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!bl.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 q1,c4;function xne(){if(c4)return q1;c4=1;var e=xi(),t=function(){return e.Date.now()};return q1=t,q1}var F1,u4;function bne(){if(u4)return F1;u4=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return F1=t,F1}var U1,d4;function wne(){if(d4)return U1;d4=1;var e=bne(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return U1=n,U1}var H1,f4;function yz(){if(f4)return H1;f4=1;var e=wne(),t=as(),n=Lu(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,o=/^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=o.test(f);return p||l.test(f)?u(f.slice(2),p?2:8):a.test(f)?r:+f}return H1=d,H1}var W1,h4;function jne(){if(h4)return W1;h4=1;var e=as(),t=xne(),n=yz(),r="Expected a function",a=Math.max,o=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(M,d),N?A(V):x}function k(V){var H=V-b,G=V-w,L=d-H;return O?o(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 M(){var V=t();if(T(V))return $(V);j=setTimeout(M,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(M,d),A(b)}return j===void 0&&(j=setTimeout(M,d)),x}return U.cancel=z,U.flush=D,U}return W1=l,W1}var V1,m4;function Sne(){if(m4)return V1;m4=1;var e=jne(),t=as(),n="Expected a function";function r(a,o,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,o,{leading:u,maxWait:o,trailing:d})}return V1=r,V1}var _ne=Sne();const xz=St(_ne);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 p4(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 Ap(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p4(Object(n),!0).forEach(function(r){Nne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nne(e,t,n){return t=One(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function One(e){var t=Cne(e,"string");return Mf(t)=="symbol"?t:t+""}function Cne(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(t==="string"?String:Number)(e)}function Ene(e,t){return Mne(e)||kne(e,t)||Tne(e,t)||Ane()}function Ane(){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 Tne(e,t){if(e){if(typeof e=="string")return v4(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 v4(e,t)}}function v4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 Mne(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,o=e.width,l=o===void 0?"100%":o,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}),M=Ene(T,2),$=M[0],z=M[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=xz(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;qa(Hs(l)||Hs(d),`The width(%s) and height(%s) are both fixed numbers,
|
||
maybe you don't need to use a ResponsiveContainer.`,l,d),qa(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=Hs(l)?V:l,L=Hs(d)?H:d;n&&n>0&&(G?L=G/n:L&&(G=L*n),g&&L>g&&(L=g)),qa(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)&&Qi(x.type).endsWith("Chart");return W.Children.map(x,function(F){return W.isValidElement(F)?y.cloneElement(F,Ap({width:G,height:L},R?{style:Ap({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:Ap(Ap({},A),{},{width:l,height:d,minWidth:m,minHeight:p,maxHeight:g}),ref:E},U)}),ay=function(t){return null};ay.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 g4(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 I_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g4(Object(n),!0).forEach(function(r){Rne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rne(e,t,n){return t=Dne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dne(e){var t=$ne(e,"string");return Pf(t)=="symbol"?t:t+""}function $ne(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 bc={widthCache:{},cacheCount:0},Ine=2e3,Lne={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},y4="recharts_measurement_span";function Bne(e){var t=I_({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var xf=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||bl.isSsr)return{width:0,height:0};var r=Bne(n),a=JSON.stringify({text:t,copyStyle:r});if(bc.widthCache[a])return bc.widthCache[a];try{var o=document.getElementById(y4);o||(o=document.createElement("span"),o.setAttribute("id",y4),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=I_(I_({},Lne),r);Object.assign(o.style,l),o.textContent="".concat(t);var u=o.getBoundingClientRect(),d={width:u.width,height:u.height};return bc.widthCache[a]=d,++bc.cacheCount>Ine&&(bc.cacheCount=0,bc.widthCache={}),d}catch{return{width:0,height:0}}},zne=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Rf(e){"@babel/helpers - typeof";return Rf=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},Rf(e)}function Mv(e,t){return Hne(e)||Une(e,t)||Fne(e,t)||qne()}function qne(){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 Fne(e,t){if(e){if(typeof e=="string")return x4(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 x4(e,t)}}function x4(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 Une(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=o.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 Hne(e){if(Array.isArray(e))return e}function Wne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b4(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,Gne(r.key),r)}}function Vne(e,t,n){return t&&b4(e.prototype,t),n&&b4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gne(e){var t=Yne(e,"string");return Rf(t)=="symbol"?t:t+""}function Yne(e,t){if(Rf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var w4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,j4=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Kne=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Xne=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Zne=Object.keys(bz),$c="NaN";function Qne(e,t){return e*bz[t]}var Tp=(function(){function e(t,n){Wne(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Kne.test(n)&&(this.num=NaN,this.unit=""),Zne.includes(n)&&(this.num=Qne(t,n),this.unit="px")}return Vne(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=Xne.exec(n))!==null&&r!==void 0?r:[],o=Mv(a,3),l=o[1],u=o[2];return new e(parseFloat(l),u??"")}}])})();function wz(e){if(e.includes($c))return $c;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=w4.exec(t))!==null&&n!==void 0?n:[],a=Mv(r,4),o=a[1],l=a[2],u=a[3],d=Tp.parse(o??""),f=Tp.parse(u??""),m=l==="*"?d.multiply(f):d.divide(f);if(m.isNaN())return $c;t=t.replace(w4,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,g=(p=j4.exec(t))!==null&&p!==void 0?p:[],x=Mv(g,4),j=x[1],b=x[2],w=x[3],N=Tp.parse(j??""),O=Tp.parse(w??""),C=b==="+"?N.add(O):N.subtract(O);if(C.isNaN())return $c;t=t.replace(j4,C.toString())}return t}var S4=/\(([^()]*)\)/;function Jne(e){for(var t=e;t.includes("(");){var n=S4.exec(t),r=Mv(n,2),a=r[1];t=t.replace(S4,wz(a))}return t}function ere(e){var t=e.replace(/\s+/g,"");return t=Jne(t),t=wz(t),t}function tre(e){try{return ere(e)}catch{return $c}}function G1(e){var t=tre(e.slice(5,-1));return t===$c?"":t}var nre=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],rre=["dx","dy","angle","className","breakAll"];function L_(){return L_=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},L_.apply(this,arguments)}function _4(e,t){if(e==null)return{};var n=are(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function are(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 N4(e,t){return lre(e)||sre(e,t)||ore(e,t)||ire()}function ire(){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 ore(e,t){if(e){if(typeof e=="string")return O4(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 O4(e,t)}}function O4(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 sre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=o.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 lre(e){if(Array.isArray(e))return e}var jz=/[ \f\n\r\t\v\u2028\u2029]+/,Sz=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var o=[];Ge(n)||(r?o=n.toString().split(""):o=n.toString().split(jz));var l=o.map(function(d){return{word:d,width:xf(d,a).width}}),u=r?0:xf(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:u}}catch{return null}},cre=function(t,n,r,a,o){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||o||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=Sz({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),M=N4(T,2),$=M[0],z=M[1],D=w(E),U=N4(D,1),V=U[0];if(!$&&!V&&(N=E+1),$&&V&&(O=E-1),!$&&V){A=z;break}C++}return A||x},C4=function(t){var n=Ge(t)?[]:t.toString().split(jz);return[{words:n}]},ure=function(t){var n=t.width,r=t.scaleToFit,a=t.children,o=t.style,l=t.breakAll,u=t.maxLines;if((n||r)&&!bl.isSsr){var d,f,m=Sz({breakAll:l,children:a,style:o});if(m){var p=m.wordsWithComputedWidth,g=m.spaceWidth;d=p,f=g}else return C4(a);return cre({breakAll:l,children:a,maxLines:u,style:o},d,f,n,r)}return C4(a)},E4="#808080",ul=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=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?E4:w,O=_4(t,nre),C=y.useMemo(function(){return ure({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,M=O.breakAll,$=_4(O,rre);if(!Mn(r)||!Mn(o))return null;var z=r+(Oe(A)?A:0),D=o+(Oe(E)?E:0),U;switch(b){case"start":U=G1("calc(".concat(f,")"));break;case"middle":U=G1("calc(".concat((C.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:U=G1("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",L_({},Be($,!0),{x:z,y:D,className:Ye("recharts-text",T),textAnchor:x,fill:N.includes("url")?E4:N}),C.map(function(L,R){var F=L.words.join(M?"":" ");return W.createElement("tspan",{x:z,dy:R===0?U:u,key:"".concat(F,"-").concat(R)},F)}))};function Ko(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function dre(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lC(e){let t,n,r;e.length!==2?(t=Ko,n=(u,d)=>Ko(e(u),d),r=(u,d)=>e(u)-d):(t=e===Ko||e===dre?e:fre,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 o(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:o}}function fre(){return 0}function _z(e){return e===null?NaN:+e}function*hre(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const mre=lC(Ko),Th=mre.right;lC(_z).center;class A4 extends Map{constructor(t,n=gre){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(T4(this,t))}has(t){return super.has(T4(this,t))}set(t,n){return super.set(pre(this,t),n)}delete(t){return super.delete(vre(this,t))}}function T4({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function pre({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function vre({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function gre(e){return e!==null&&typeof e=="object"?e.valueOf():e}function yre(e=Ko){if(e===Ko)return Nz;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 Nz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const xre=Math.sqrt(50),bre=Math.sqrt(10),wre=Math.sqrt(2);function Pv(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),l=o>=xre?10:o>=bre?5:o>=wre?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 B_(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,o,l]=r?Pv(t,e,n):Pv(e,t,n);if(!(o>=a))return[];const u=o-a+1,d=new Array(u);if(r)if(l<0)for(let f=0;f<u;++f)d[f]=(o-f)/-l;else for(let f=0;f<u;++f)d[f]=(o-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 z_(e,t,n){return t=+t,e=+e,n=+n,Pv(e,t,n)[2]}function q_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?z_(t,e,n):z_(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}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 M4(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Oz(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?Nz:yre(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));Oz(e,t,x,j,a)}const o=e[t];let l=n,u=r;for(Xd(e,n,t),a(e[r],o)>0&&Xd(e,n,r);l<u;){for(Xd(e,l,u),++l,--u;a(e[l],o)<0;)++l;for(;a(e[u],o)>0;)--u}a(e[n],o)===0?Xd(e,n,u):(++u,Xd(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Xd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function jre(e,t,n){if(e=Float64Array.from(hre(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return M4(e);if(t>=1)return k4(e);var r,a=(r-1)*t,o=Math.floor(a),l=k4(Oz(e,o).subarray(0,o+1)),u=M4(e.subarray(o+1));return l+(u-l)*(a-o)}}function Sre(e,t,n=_z){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,o=Math.floor(a),l=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return l+(u-l)*(a-o)}}function _re(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,o=new Array(a);++r<a;)o[r]=e+r*n;return o}function Ea(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function uo(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 F_=Symbol("implicit");function cC(){var e=new A4,t=[],n=[],r=F_;function a(o){let l=e.get(o);if(l===void 0){if(r!==F_)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new A4;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return a},a.range=function(o){return arguments.length?(n=Array.from(o),a):n.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return cC(t,n).unknown(r)},Ea.apply(a,arguments),a}function Df(){var e=cC().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,o,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;o=(b-j)/Math.max(1,g-d+f*2),u&&(o=Math.floor(o)),j+=(b-j-o*(g-d))*m,l=o*(1-d),u&&(j=Math.round(j),l=Math.round(l));var w=_re(g).map(function(N){return j+o*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 o},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 Df(t(),[r,a]).round(u).paddingInner(d).paddingOuter(f).align(m)},Ea.apply(p(),arguments)}function Cz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Cz(t())},e}function bf(){return Cz(Df.apply(null,arguments).paddingInner(1))}function uC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ez(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function kh(){}var $f=.7,Rv=1/$f,Fc="\\s*([+-]?\\d+)\\s*",If="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",di="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nre=/^#([0-9a-f]{3,8})$/,Ore=new RegExp(`^rgb\\(${Fc},${Fc},${Fc}\\)$`),Cre=new RegExp(`^rgb\\(${di},${di},${di}\\)$`),Ere=new RegExp(`^rgba\\(${Fc},${Fc},${Fc},${If}\\)$`),Are=new RegExp(`^rgba\\(${di},${di},${di},${If}\\)$`),Tre=new RegExp(`^hsl\\(${If},${di},${di}\\)$`),kre=new RegExp(`^hsla\\(${If},${di},${di},${If}\\)$`),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};uC(kh,Lf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:R4,formatHex:R4,formatHex8:Mre,formatHsl:Pre,formatRgb:D4,toString:D4});function R4(){return this.rgb().formatHex()}function Mre(){return this.rgb().formatHex8()}function Pre(){return Az(this).formatHsl()}function D4(){return this.rgb().formatRgb()}function Lf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Nre.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$4(t):n===3?new kr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?kp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?kp(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=Ore.exec(e))?new kr(t[1],t[2],t[3],1):(t=Cre.exec(e))?new kr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ere.exec(e))?kp(t[1],t[2],t[3],t[4]):(t=Are.exec(e))?kp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Tre.exec(e))?B4(t[1],t[2]/100,t[3]/100,1):(t=kre.exec(e))?B4(t[1],t[2]/100,t[3]/100,t[4]):P4.hasOwnProperty(e)?$4(P4[e]):e==="transparent"?new kr(NaN,NaN,NaN,0):null}function $4(e){return new kr(e>>16&255,e>>8&255,e&255,1)}function kp(e,t,n,r){return r<=0&&(e=t=n=NaN),new kr(e,t,n,r)}function Rre(e){return e instanceof kh||(e=Lf(e)),e?(e=e.rgb(),new kr(e.r,e.g,e.b,e.opacity)):new kr}function U_(e,t,n,r){return arguments.length===1?Rre(e):new kr(e,t,n,r??1)}function kr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}uC(kr,U_,Ez(kh,{brighter(e){return e=e==null?Rv:Math.pow(Rv,e),new kr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$f:Math.pow($f,e),new kr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new kr(el(this.r),el(this.g),el(this.b),Dv(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:I4,formatHex:I4,formatHex8:Dre,formatRgb:L4,toString:L4}));function I4(){return`#${Ws(this.r)}${Ws(this.g)}${Ws(this.b)}`}function Dre(){return`#${Ws(this.r)}${Ws(this.g)}${Ws(this.b)}${Ws((isNaN(this.opacity)?1:this.opacity)*255)}`}function L4(){const e=Dv(this.opacity);return`${e===1?"rgb(":"rgba("}${el(this.r)}, ${el(this.g)}, ${el(this.b)}${e===1?")":`, ${e})`}`}function Dv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function el(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ws(e){return e=el(e),(e<16?"0":"")+e.toString(16)}function B4(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,n,r)}function Az(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof kh||(e=Lf(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-a,d=(o+a)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=d<.5?o+a:2-o-a,l*=60):u=d>0&&d<1?0:l,new Ba(l,u,d,e.opacity)}function $re(e,t,n,r){return arguments.length===1?Az(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}uC(Ba,$re,Ez(kh,{brighter(e){return e=e==null?Rv:Math.pow(Rv,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$f:Math.pow($f,e),new Ba(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 kr(Y1(e>=240?e-240:e+120,a,r),Y1(e,a,r),Y1(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ba(z4(this.h),Mp(this.s),Mp(this.l),Dv(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=Dv(this.opacity);return`${e===1?"hsl(":"hsla("}${z4(this.h)}, ${Mp(this.s)*100}%, ${Mp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function z4(e){return e=(e||0)%360,e<0?e+360:e}function Mp(e){return Math.max(0,Math.min(1,e||0))}function Y1(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 dC=e=>()=>e;function Ire(e,t){return function(n){return e+n*t}}function Lre(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 Bre(e){return(e=+e)==1?Tz:function(t,n){return n-t?Lre(t,n,e):dC(isNaN(t)?n:t)}}function Tz(e,t){var n=t-e;return n?Ire(e,n):dC(isNaN(e)?t:e)}const q4=(function e(t){var n=Bre(t);function r(a,o){var l=n((a=U_(a)).r,(o=U_(o)).r),u=n(a.g,o.g),d=n(a.b,o.b),f=Tz(a.opacity,o.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 zre(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(o){for(a=0;a<n;++a)r[a]=e[a]*(1-o)+t[a]*o;return r}}function qre(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Fre(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)a[l]=Fu(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=a[l](u);return o}}function Ure(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function $v(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Hre(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]=Fu(e[a],t[a]):r[a]=t[a];return function(o){for(a in n)r[a]=n[a](o);return r}}var H_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K1=new RegExp(H_.source,"g");function Wre(e){return function(){return e}}function Vre(e){return function(t){return e(t)+""}}function Gre(e,t){var n=H_.lastIndex=K1.lastIndex=0,r,a,o,l=-1,u=[],d=[];for(e=e+"",t=t+"";(r=H_.exec(e))&&(a=K1.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,d.push({i:l,x:$v(r,a)})),n=K1.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?d[0]?Vre(d[0].x):Wre(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 Fu(e,t){var n=typeof t,r;return t==null||n==="boolean"?dC(t):(n==="number"?$v:n==="string"?(r=Lf(t))?(t=r,q4):Gre:t instanceof Lf?q4:t instanceof Date?Ure:qre(t)?zre:Array.isArray(t)?Fre:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Hre:$v)(e,t)}function fC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Yre(e,t){t===void 0&&(t=e,e=Fu);for(var n=0,r=t.length-1,a=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(a,a=t[++n]);return function(l){var u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[u](l-u)}}function Kre(e){return function(){return e}}function Iv(e){return+e}var F4=[0,1];function jr(e){return e}function W_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Kre(isNaN(t)?NaN:.5)}function Xre(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Zre(e,t,n){var r=e[0],a=e[1],o=t[0],l=t[1];return a<r?(r=W_(a,r),o=n(l,o)):(r=W_(r,a),o=n(o,l)),function(u){return o(r(u))}}function Qre(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)a[l]=W_(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var d=Th(e,u,1,r)-1;return o[d](a[d](u))}}function Mh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function iy(){var e=F4,t=F4,n=Fu,r,a,o,l=jr,u,d,f;function m(){var g=Math.min(e.length,t.length);return l!==jr&&(l=Xre(e[0],e[g-1])),u=g>2?Qre:Zre,d=f=null,p}function p(g){return g==null||isNaN(g=+g)?o:(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),$v)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,Iv),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=fC,m()},p.clamp=function(g){return arguments.length?(l=g?!0:jr,m()):l!==jr},p.interpolate=function(g){return arguments.length?(n=g,m()):n},p.unknown=function(g){return arguments.length?(o=g,p):o},function(g,x){return r=g,a=x,m()}}function hC(){return iy()(jr,jr)}function Jre(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Lv(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 su(e){return e=Lv(Math.abs(e)),e?e[1]:NaN}function eae(e,t){return function(n,r){for(var a=n.length,o=[],l=0,u=e[0],d=0;a>0&&u>0&&(d+u+1>r&&(u=Math.max(1,r-d)),o.push(n.substring(a-=u,a+u)),!((d+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function tae(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var nae=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bf(e){if(!(t=nae.exec(e)))throw new Error("invalid format: "+e);var t;return new mC({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]})}Bf.prototype=mC.prototype;function mC(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+""}mC.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 rae(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 kz;function aae(e,t){var n=Lv(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(kz=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Lv(e,Math.max(0,t+o-1))[0]}function U4(e,t){var n=Lv(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 H4={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Jre,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)=>U4(e*100,t),r:U4,s:aae,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function W4(e){return e}var V4=Array.prototype.map,G4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iae(e){var t=e.grouping===void 0||e.thousands===void 0?W4:eae(V4.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+"",o=e.numerals===void 0?W4:tae(V4.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=Bf(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"):H4[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:"",M=H4[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=M(D)+V,D="";else{D=+D;var R=D<0||1/D<0;if(D=isNaN(D)?d:M(Math.abs(D),C),A&&(D=rae(D)),R&&+D==0&&j!=="+"&&(R=!1),U=(R?j==="("?j:u:j==="-"||j==="("?"":j)+U,V=(E==="s"?G4[8+kz/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 o(D)}return z.toString=function(){return p+""},z}function m(p,g){var x=f((p=Bf(p),p.type="f",p)),j=Math.max(-8,Math.min(8,Math.floor(su(g)/3)))*3,b=Math.pow(10,-j),w=G4[8+j/3];return function(N){return x(b*N)+w}}return{format:f,formatPrefix:m}}var Pp,pC,Mz;oae({thousands:",",grouping:[3],currency:["$",""]});function oae(e){return Pp=iae(e),pC=Pp.format,Mz=Pp.formatPrefix,Pp}function sae(e){return Math.max(0,-su(Math.abs(e)))}function lae(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(su(t)/3)))*3-su(Math.abs(e)))}function cae(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,su(t)-su(e))+1}function Pz(e,t,n,r){var a=q_(e,t,n),o;switch(r=Bf(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=lae(a,l))&&(r.precision=o),Mz(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=cae(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=sae(a))&&(r.precision=o-(r.type==="%")*2);break}}return pC(r)}function is(e){var t=e.domain;return e.ticks=function(n){var r=t();return B_(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,o=r.length-1,l=r[a],u=r[o],d,f,m=10;for(u<l&&(f=l,l=u,u=f,f=a,a=o,o=f);m-- >0;){if(f=z_(l,u,n),f===d)return r[a]=l,r[o]=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 Bv(){var e=hC();return e.copy=function(){return Mh(e,Bv())},Ea.apply(e,arguments),is(e)}function Rz(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,Iv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Rz(e).unknown(t)},e=arguments.length?Array.from(e,Iv):[0,1],is(n)}function Dz(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],o=e[r],l;return o<a&&(l=n,n=r,r=l,l=a,a=o,o=l),e[n]=t.floor(a),e[r]=t.ceil(o),e}function Y4(e){return Math.log(e)}function K4(e){return Math.exp(e)}function uae(e){return-Math.log(-e)}function dae(e){return-Math.exp(-e)}function fae(e){return isFinite(e)?+("1e"+e):e<0?0:e}function hae(e){return e===10?fae:e===Math.E?Math.exp:t=>Math.pow(e,t)}function mae(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 X4(e){return(t,n)=>-e(-t,n)}function vC(e){const t=e(Y4,K4),n=t.domain;let r=10,a,o;function l(){return a=mae(r),o=hae(r),n()[0]<0?(a=X4(a),o=X4(o),e(uae,dae)):e(Y4,K4),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/o(-g):j*o(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/o(-g):j*o(g),!(b<f)){if(b>m)break;N.push(b)}N.length*2<w&&(N=B_(f,m,w))}else N=B_(g,x,Math.min(x-g,w)).map(o);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=Bf(d)).precision==null&&(d.trim=!0),d=pC(d)),u===1/0)return d;const f=Math.max(1,r*u/t.ticks().length);return m=>{let p=m/o(Math.round(a(m)));return p*r<r-.5&&(p*=r),p<=f?d(m):""}},t.nice=()=>n(Dz(n(),{floor:u=>o(Math.floor(a(u))),ceil:u=>o(Math.ceil(a(u)))})),t}function $z(){const e=vC(iy()).domain([1,10]);return e.copy=()=>Mh(e,$z()).base(e.base()),Ea.apply(e,arguments),e}function Z4(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Q4(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function gC(e){var t=1,n=e(Z4(t),Q4(t));return n.constant=function(r){return arguments.length?e(Z4(t=+r),Q4(t)):t},is(n)}function Iz(){var e=gC(iy());return e.copy=function(){return Mh(e,Iz()).constant(e.constant())},Ea.apply(e,arguments)}function J4(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function pae(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function vae(e){return e<0?-e*e:e*e}function yC(e){var t=e(jr,jr),n=1;function r(){return n===1?e(jr,jr):n===.5?e(pae,vae):e(J4(n),J4(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},is(t)}function xC(){var e=yC(iy());return e.copy=function(){return Mh(e,xC()).exponent(e.exponent())},Ea.apply(e,arguments),e}function gae(){return xC.apply(null,arguments).exponent(.5)}function e$(e){return Math.sign(e)*e*e}function yae(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Lz(){var e=hC(),t=[0,1],n=!1,r;function a(o){var l=yae(e(o));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(o){return e.invert(e$(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,Iv)).map(e$)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(n=!!o,a):n},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return Lz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ea.apply(a,arguments),is(a)}function Bz(){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]=Sre(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Th(n,l)]}return o.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]]},o.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(Ko),a()},o.range=function(l){return arguments.length?(t=Array.from(l),a()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Bz().domain(e).range(t).unknown(r)},Ea.apply(o,arguments)}function zz(){var e=0,t=1,n=1,r=[.5],a=[0,1],o;function l(d){return d!=null&&d<=d?a[Th(r,d,0,n)]:o}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&&(o=d),l},l.thresholds=function(){return r.slice()},l.copy=function(){return zz().domain([e,t]).range(a).unknown(o)},Ea.apply(is(l),arguments)}function qz(){var e=[.5],t=[0,1],n,r=1;function a(o){return o!=null&&o<=o?t[Th(e,o,0,r)]:n}return a.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return qz().domain(e).range(t).unknown(n)},Ea.apply(a,arguments)}const X1=new Date,Z1=new Date;function Dn(e,t,n,r){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const l=a(o),u=a.ceil(o);return o-l<u-o?l:u},a.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),a.range=(o,l,u)=>{const d=[];if(o=a.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return d;let f;do d.push(f=new Date(+o)),t(o,u),e(o);while(f<o&&o<l);return d},a.filter=o=>Dn(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););}),n&&(a.count=(o,l)=>(X1.setTime(+o),Z1.setTime(+l),e(X1),e(Z1),Math.floor(n(X1,Z1))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(r?l=>r(l)%o===0:l=>a.count(0,l)%o===0):a)),a}const zv=Dn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);zv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Dn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):zv);zv.range;const Vi=1e3,Sa=Vi*60,Gi=Sa*60,to=Gi*24,bC=to*7,t$=to*30,Q1=to*365,Vs=Dn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Vi)},(e,t)=>(t-e)/Vi,e=>e.getUTCSeconds());Vs.range;const wC=Dn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vi)},(e,t)=>{e.setTime(+e+t*Sa)},(e,t)=>(t-e)/Sa,e=>e.getMinutes());wC.range;const jC=Dn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Sa)},(e,t)=>(t-e)/Sa,e=>e.getUTCMinutes());jC.range;const SC=Dn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vi-e.getMinutes()*Sa)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getHours());SC.range;const _C=Dn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getUTCHours());_C.range;const Ph=Dn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Sa)/to,e=>e.getDate()-1);Ph.range;const oy=Dn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/to,e=>e.getUTCDate()-1);oy.range;const Fz=Dn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/to,e=>Math.floor(e/to));Fz.range;function wl(e){return Dn(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())*Sa)/bC)}const sy=wl(0),qv=wl(1),xae=wl(2),bae=wl(3),lu=wl(4),wae=wl(5),jae=wl(6);sy.range;qv.range;xae.range;bae.range;lu.range;wae.range;jae.range;function jl(e){return Dn(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)/bC)}const ly=jl(0),Fv=jl(1),Sae=jl(2),_ae=jl(3),cu=jl(4),Nae=jl(5),Oae=jl(6);ly.range;Fv.range;Sae.range;_ae.range;cu.range;Nae.range;Oae.range;const NC=Dn(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());NC.range;const OC=Dn(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());OC.range;const no=Dn(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());no.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dn(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)});no.range;const ro=Dn(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());ro.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dn(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)});ro.range;function Uz(e,t,n,r,a,o){const l=[[Vs,1,Vi],[Vs,5,5*Vi],[Vs,15,15*Vi],[Vs,30,30*Vi],[o,1,Sa],[o,5,5*Sa],[o,15,15*Sa],[o,30,30*Sa],[a,1,Gi],[a,3,3*Gi],[a,6,6*Gi],[a,12,12*Gi],[r,1,to],[r,2,2*to],[n,1,bC],[t,1,t$],[t,3,3*t$],[e,1,Q1]];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=lC(([,,w])=>w).right(l,g);if(x===l.length)return e.every(q_(f/Q1,m/Q1,p));if(x===0)return zv.every(Math.max(q_(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[Cae,Eae]=Uz(ro,OC,ly,Fz,_C,jC),[Aae,Tae]=Uz(no,NC,sy,Ph,SC,wC);function J1(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 eS(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 Zd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kae(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,o=e.days,l=e.shortDays,u=e.months,d=e.shortMonths,f=Qd(a),m=Jd(a),p=Qd(o),g=Jd(o),x=Qd(l),j=Jd(l),b=Qd(u),w=Jd(u),N=Qd(d),O=Jd(d),C={a:R,A:F,b:K,B:te,c:null,d:s$,e:s$,f:eie,g:uie,G:fie,H:Zae,I:Qae,j:Jae,L:Hz,m:tie,M:nie,p:I,q:B,Q:u$,s:d$,S:rie,u:aie,U:iie,V:oie,w:sie,W:lie,x:null,X:null,y:cie,Y:die,Z:hie,"%":c$},A={a:Y,A:ne,b:oe,B:xe,c:null,d:l$,e:l$,f:gie,g:Cie,G:Aie,H:mie,I:pie,j:vie,L:Vz,m:yie,M:xie,p:ee,q:ae,Q:u$,s:d$,S:bie,u:wie,U:jie,V:Sie,w:_ie,W:Nie,x:null,X:null,y:Oie,Y:Eie,Z:Tie,"%":c$},E={a:z,A:D,b:U,B:V,c:H,d:i$,e:i$,f:Gae,g:a$,G:r$,H:o$,I:o$,j:Uae,L:Vae,m:Fae,M:Hae,p:$,q:qae,Q:Kae,s:Xae,S:Wae,u:$ae,U:Iae,V:Lae,w:Dae,W:Bae,x:G,X:L,y:a$,Y:r$,Z:zae,"%":Yae};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=n$[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=Zd(1900,void 0,1),Re=M(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=eS(Zd(le.y,0,1)),me=_e.getUTCDay(),_e=me>4||me===0?Fv.ceil(_e):Fv(_e),_e=oy.offset(_e,(le.V-1)*7),le.y=_e.getUTCFullYear(),le.m=_e.getUTCMonth(),le.d=_e.getUTCDate()+(le.w+6)%7):(_e=J1(Zd(le.y,0,1)),me=_e.getDay(),_e=me>4||me===0?qv.ceil(_e):qv(_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?eS(Zd(le.y,0,1)).getUTCDay():J1(Zd(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,eS(le)):J1(le)}}function M(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 n$?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 M(Z,t,pe,je)}function G(Z,pe,je){return M(Z,n,pe,je)}function L(Z,pe,je){return M(Z,r,pe,je)}function R(Z){return l[Z.getDay()]}function F(Z){return o[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 o[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 n$={"-":"",_:" ",0:"0"},Gn=/^\s*\d+/,Mae=/^%/,Pae=/[\\^$*+?|[\]().{}]/g;function vt(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",o=a.length;return r+(o<n?new Array(n-o+1).join(t)+a:a)}function Rae(e){return e.replace(Pae,"\\$&")}function Qd(e){return new RegExp("^(?:"+e.map(Rae).join("|")+")","i")}function Jd(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Dae(e,t,n){var r=Gn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function $ae(e,t,n){var r=Gn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Iae(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Lae(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Bae(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function r$(e,t,n){var r=Gn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function a$(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zae(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 qae(e,t,n){var r=Gn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Fae(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function i$(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Uae(e,t,n){var r=Gn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function o$(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Hae(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wae(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Vae(e,t,n){var r=Gn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Gae(e,t,n){var r=Gn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yae(e,t,n){var r=Mae.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Kae(e,t,n){var r=Gn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Xae(e,t,n){var r=Gn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function s$(e,t){return vt(e.getDate(),t,2)}function Zae(e,t){return vt(e.getHours(),t,2)}function Qae(e,t){return vt(e.getHours()%12||12,t,2)}function Jae(e,t){return vt(1+Ph.count(no(e),e),t,3)}function Hz(e,t){return vt(e.getMilliseconds(),t,3)}function eie(e,t){return Hz(e,t)+"000"}function tie(e,t){return vt(e.getMonth()+1,t,2)}function nie(e,t){return vt(e.getMinutes(),t,2)}function rie(e,t){return vt(e.getSeconds(),t,2)}function aie(e){var t=e.getDay();return t===0?7:t}function iie(e,t){return vt(sy.count(no(e)-1,e),t,2)}function Wz(e){var t=e.getDay();return t>=4||t===0?lu(e):lu.ceil(e)}function oie(e,t){return e=Wz(e),vt(lu.count(no(e),e)+(no(e).getDay()===4),t,2)}function sie(e){return e.getDay()}function lie(e,t){return vt(qv.count(no(e)-1,e),t,2)}function cie(e,t){return vt(e.getFullYear()%100,t,2)}function uie(e,t){return e=Wz(e),vt(e.getFullYear()%100,t,2)}function die(e,t){return vt(e.getFullYear()%1e4,t,4)}function fie(e,t){var n=e.getDay();return e=n>=4||n===0?lu(e):lu.ceil(e),vt(e.getFullYear()%1e4,t,4)}function hie(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vt(t/60|0,"0",2)+vt(t%60,"0",2)}function l$(e,t){return vt(e.getUTCDate(),t,2)}function mie(e,t){return vt(e.getUTCHours(),t,2)}function pie(e,t){return vt(e.getUTCHours()%12||12,t,2)}function vie(e,t){return vt(1+oy.count(ro(e),e),t,3)}function Vz(e,t){return vt(e.getUTCMilliseconds(),t,3)}function gie(e,t){return Vz(e,t)+"000"}function yie(e,t){return vt(e.getUTCMonth()+1,t,2)}function xie(e,t){return vt(e.getUTCMinutes(),t,2)}function bie(e,t){return vt(e.getUTCSeconds(),t,2)}function wie(e){var t=e.getUTCDay();return t===0?7:t}function jie(e,t){return vt(ly.count(ro(e)-1,e),t,2)}function Gz(e){var t=e.getUTCDay();return t>=4||t===0?cu(e):cu.ceil(e)}function Sie(e,t){return e=Gz(e),vt(cu.count(ro(e),e)+(ro(e).getUTCDay()===4),t,2)}function _ie(e){return e.getUTCDay()}function Nie(e,t){return vt(Fv.count(ro(e)-1,e),t,2)}function Oie(e,t){return vt(e.getUTCFullYear()%100,t,2)}function Cie(e,t){return e=Gz(e),vt(e.getUTCFullYear()%100,t,2)}function Eie(e,t){return vt(e.getUTCFullYear()%1e4,t,4)}function Aie(e,t){var n=e.getUTCDay();return e=n>=4||n===0?cu(e):cu.ceil(e),vt(e.getUTCFullYear()%1e4,t,4)}function Tie(){return"+0000"}function c$(){return"%"}function u$(e){return+e}function d$(e){return Math.floor(+e/1e3)}var wc,Yz,Kz;kie({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 kie(e){return wc=kae(e),Yz=wc.format,wc.parse,Kz=wc.utcFormat,wc.utcParse,wc}function Mie(e){return new Date(e)}function Pie(e){return e instanceof Date?+e:+new Date(+e)}function CC(e,t,n,r,a,o,l,u,d,f){var m=hC(),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:o(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(Mie)},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(Dz(T,k)):m},m.copy=function(){return Mh(m,CC(e,t,n,r,a,o,l,u,d,f))},m}function Rie(){return Ea.apply(CC(Aae,Tae,no,NC,sy,Ph,SC,wC,Vs,Yz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Die(){return Ea.apply(CC(Cae,Eae,ro,OC,ly,oy,_C,jC,Vs,Kz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cy(){var e=0,t=1,n,r,a,o,l=jr,u=!1,d;function f(p){return p==null||isNaN(p=+p)?d:l(a===0?.5:(p=(o(p)-n)*a,u?Math.max(0,Math.min(1,p)):p))}f.domain=function(p){return arguments.length?([e,t]=p,n=o(e=+e),r=o(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(Fu),f.rangeRound=m(fC),f.unknown=function(p){return arguments.length?(d=p,f):d},function(p){return o=p,n=p(e),r=p(t),a=n===r?0:1/(r-n),f}}function os(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Xz(){var e=is(cy()(jr));return e.copy=function(){return os(e,Xz())},uo.apply(e,arguments)}function Zz(){var e=vC(cy()).domain([1,10]);return e.copy=function(){return os(e,Zz()).base(e.base())},uo.apply(e,arguments)}function Qz(){var e=gC(cy());return e.copy=function(){return os(e,Qz()).constant(e.constant())},uo.apply(e,arguments)}function EC(){var e=yC(cy());return e.copy=function(){return os(e,EC()).exponent(e.exponent())},uo.apply(e,arguments)}function $ie(){return EC.apply(null,arguments).exponent(.5)}function Jz(){var e=[],t=jr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Th(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(Ko),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,o)=>jre(e,o/r))},n.copy=function(){return Jz(t).domain(e)},uo.apply(n,arguments)}function uy(){var e=0,t=.5,n=1,r=1,a,o,l,u,d,f=jr,m,p=!1,g;function x(b){return isNaN(b=+b)?g:(b=.5+((b=+m(b))-o)*(r*b<r*o?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),o=m(t=+t),l=m(n=+n),u=a===o?0:.5/(o-a),d=o===l?0:.5/(l-o),r=o<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=Yre(b,[N,O,C]),x):[f(0),f(.5),f(1)]}}return x.range=j(Fu),x.rangeRound=j(fC),x.unknown=function(b){return arguments.length?(g=b,x):g},function(b){return m=b,a=b(e),o=b(t),l=b(n),u=a===o?0:.5/(o-a),d=o===l?0:.5/(l-o),r=o<a?-1:1,x}}function e6(){var e=is(uy()(jr));return e.copy=function(){return os(e,e6())},uo.apply(e,arguments)}function t6(){var e=vC(uy()).domain([.1,1,10]);return e.copy=function(){return os(e,t6()).base(e.base())},uo.apply(e,arguments)}function n6(){var e=gC(uy());return e.copy=function(){return os(e,n6()).constant(e.constant())},uo.apply(e,arguments)}function AC(){var e=yC(uy());return e.copy=function(){return os(e,AC()).exponent(e.exponent())},uo.apply(e,arguments)}function Iie(){return AC.apply(null,arguments).exponent(.5)}const f$=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Df,scaleDiverging:e6,scaleDivergingLog:t6,scaleDivergingPow:AC,scaleDivergingSqrt:Iie,scaleDivergingSymlog:n6,scaleIdentity:Rz,scaleImplicit:F_,scaleLinear:Bv,scaleLog:$z,scaleOrdinal:cC,scalePoint:bf,scalePow:xC,scaleQuantile:Bz,scaleQuantize:zz,scaleRadial:Lz,scaleSequential:Xz,scaleSequentialLog:Zz,scaleSequentialPow:EC,scaleSequentialQuantile:Jz,scaleSequentialSqrt:$ie,scaleSequentialSymlog:Qz,scaleSqrt:gae,scaleSymlog:Iz,scaleThreshold:qz,scaleTime:Rie,scaleUtc:Die,tickFormat:Pz},Symbol.toStringTag,{value:"Module"}));var tS,h$;function dy(){if(h$)return tS;h$=1;var e=Lu();function t(n,r,a){for(var o=-1,l=n.length;++o<l;){var u=n[o],d=r(u);if(d!=null&&(f===void 0?d===d&&!e(d):a(d,f)))var f=d,m=u}return m}return tS=t,tS}var nS,m$;function r6(){if(m$)return nS;m$=1;function e(t,n){return t>n}return nS=e,nS}var rS,p$;function Lie(){if(p$)return rS;p$=1;var e=dy(),t=r6(),n=qu();function r(a){return a&&a.length?e(a,n,t):void 0}return rS=r,rS}var Bie=Lie();const fy=St(Bie);var aS,v$;function a6(){if(v$)return aS;v$=1;function e(t,n){return t<n}return aS=e,aS}var iS,g$;function zie(){if(g$)return iS;g$=1;var e=dy(),t=a6(),n=qu();function r(a){return a&&a.length?e(a,n,t):void 0}return iS=r,iS}var qie=zie();const hy=St(qie);var oS,y$;function Fie(){if(y$)return oS;y$=1;var e=WO(),t=bi(),n=fz(),r=Lr();function a(o,l){var u=r(o)?e:n;return u(o,t(l,3))}return oS=a,oS}var sS,x$;function Uie(){if(x$)return sS;x$=1;var e=uz(),t=Fie();function n(r,a){return e(t(r,a),1)}return sS=n,sS}var Hie=Uie();const Wie=St(Hie);var lS,b$;function Vie(){if(b$)return lS;b$=1;var e=aC();function t(n,r){return e(n,r)}return lS=t,lS}var Gie=Vie();const Rh=St(Gie);var Uu=1e9,Yie={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},kC,Zt=!0,Oa="[DecimalError] ",tl=Oa+"Invalid argument: ",TC=Oa+"Exponent out of range: ",Hu=Math.floor,zs=Math.pow,Kie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ea,zn=1e7,Yt=7,i6=9007199254740991,Uv=Hu(i6/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,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===a?0:r>a^o.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 Ji(this,new this.constructor(e))};Ee.dividedToIntegerBy=Ee.idiv=function(e){var t=this,n=t.constructor;return It(Ji(t,new n(e),0,1),n.precision)};Ee.equals=Ee.eq=function(e){return!this.cmp(e)};Ee.exponent=function(){return gn(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,o=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(ea))throw Error(Oa+"NaN");if(n.s<1)throw Error(Oa+(n.s?"NaN":"-Infinity"));return n.eq(ea)?new r(0):(Zt=!1,t=Ji(zf(n,o),zf(e,o),o),Zt=!0,It(t,a))};Ee.minus=Ee.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?l6(t,e):o6(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(Oa+"NaN");return n.s?(Zt=!1,t=Ji(n,e,0,1).times(e),Zt=!0,n.minus(t)):It(new r(n),a)};Ee.naturalExponential=Ee.exp=function(){return s6(this)};Ee.naturalLogarithm=Ee.ln=function(){return zf(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?o6(t,e):l6(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(tl+e);if(t=gn(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,o,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(Oa+"NaN")}for(e=gn(u),Zt=!1,a=Math.sqrt(+u),a==0||a==1/0?(t=oi(u.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Hu((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(o=r,r=o.plus(Ji(u,o,l+2)).times(.5),oi(o.d).slice(0,l)===(t=oi(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(It(o,n+1,0),o.times(o).eq(u)){r=o;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,o,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&&(o=g,g=x,x=o,l=d,d=f,f=l),o=[],l=d+f,r=l;r--;)o.push(0);for(r=f;--r>=0;){for(t=0,a=d+r;a>r;)u=o[a]+x[r]*g[a-r-1]+t,o[a--]=u%zn|0,t=u/zn|0;o[a]=(o[a]+t)%zn|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,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:(pi(e,0,Uu),t===void 0?t=r.rounding:pi(t,0,8),It(n,e+gn(n)+1,t))};Ee.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=dl(r,!0):(pi(e,0,Uu),t===void 0?t=a.rounding:pi(t,0,8),r=It(new a(r),e+1,t),n=dl(r,!0,e+1)),n};Ee.toFixed=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?dl(a):(pi(e,0,Uu),t===void 0?t=o.rounding:pi(t,0,8),r=It(new o(a),e+gn(a)+1,t),n=dl(r.abs(),!1,e+gn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Ee.toInteger=Ee.toint=function(){var e=this,t=e.constructor;return It(new t(e),gn(e)+1,t.rounding)};Ee.toNumber=function(){return+this};Ee.toPower=Ee.pow=function(e){var t,n,r,a,o,l,u=this,d=u.constructor,f=12,m=+(e=new d(e));if(!e.s)return new d(ea);if(u=new d(u),!u.s){if(e.s<1)throw Error(Oa+"Infinity");return u}if(u.eq(ea))return u;if(r=d.precision,e.eq(ea))return It(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=u.s,l){if((n=m<0?-m:m)<=i6){for(a=new d(ea),t=Math.ceil(r/Yt+4),Zt=!1;n%2&&(a=a.times(u),j$(a.d,t)),n=Hu(n/2),n!==0;)u=u.times(u),j$(u.d,t);return Zt=!0,e.s<0?new d(ea).div(a):It(a,r)}}else if(o<0)throw Error(Oa+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Zt=!1,a=e.times(zf(u,r+f)),Zt=!0,a=s6(a),a.s=o,a};Ee.toPrecision=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?(n=gn(a),r=dl(a,n<=o.toExpNeg||n>=o.toExpPos)):(pi(e,1,Uu),t===void 0?t=o.rounding:pi(t,0,8),a=It(new o(a),e,t),n=gn(a),r=dl(a,e<=n||n<=o.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):(pi(e,1,Uu),t===void 0?t=r.rounding:pi(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=gn(e),n=e.constructor;return dl(e,t<=n.toExpNeg||t>=n.toExpPos)};function o6(e,t){var n,r,a,o,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(),o=l-a,o){for(o<0?(r=d,o=-o,u=f.length):(r=f,a=l,u=d.length),l=Math.ceil(p/Yt),u=l>u?l+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=d.length,o=f.length,u-o<0&&(o=u,r=f,f=d,d=r),n=0;o;)n=(d[--o]=d[o]+f[o]+n)/zn|0,d[o]%=zn;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 pi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(tl+e)}function oi(e){var t,n,r,a=e.length-1,o="",l=e[0];if(a>0){for(o+=l,t=1;t<a;t++)r=e[t]+"",n=Yt-r.length,n&&(o+=qo(n)),o+=r;l=e[t],r=l+"",n=Yt-r.length,n&&(o+=qo(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ji=(function(){function e(r,a){var o,l=0,u=r.length;for(r=r.slice();u--;)o=r[u]*a+l,r[u]=o%zn|0,l=o/zn|0;return l&&r.unshift(l),r}function t(r,a,o,l){var u,d;if(o!=l)d=o>l?1:-1;else for(u=d=0;u<o;u++)if(r[u]!=a[u]){d=r[u]>a[u]?1:-1;break}return d}function n(r,a,o){for(var l=0;o--;)r[o]-=l,l=r[o]<a[o]?1:0,r[o]=l*zn+r[o]-a[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,o,l){var u,d,f,m,p,g,x,j,b,w,N,O,C,A,E,k,T,M,$=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(Oa+"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,o==null?O=o=$.precision:l?O=o+(gn(r)-gn(a))+1:O=o,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*zn+(D[f]||0),j[f]=C/U|0,m=C%U|0;else{for(m=zn/(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;M=U.slice(),M.unshift(0),k=U[0],U[1]>=zn/2&&++k;do m=0,u=t(U,b,T,w),u<0?(N=b[0],T!=w&&(N=N*zn+(b[1]||0)),m=N/k|0,m>1?(m>=zn&&(m=zn-1),p=e(U,m),g=p.length,w=b.length,u=t(p,b,g,w),u==1&&(m--,n(p,T<g?M: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?M: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?o+gn(x)+1:o)}})();function s6(e,t){var n,r,a,o,l,u,d=0,f=0,m=e.constructor,p=m.precision;if(gn(e)>16)throw Error(TC+gn(e));if(!e.s)return new m(ea);for(Zt=!1,u=p,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),f+=5;for(r=Math.log(zs(2,f))/Math.LN10*2+5|0,u+=r,n=a=o=new m(ea),m.precision=u;;){if(a=It(a.times(e),u),n=n.times(++d),l=o.plus(Ji(a,n,u)),oi(l.d).slice(0,u)===oi(o.d).slice(0,u)){for(;f--;)o=It(o.times(o),u);return m.precision=p,t==null?(Zt=!0,It(o,p)):o}o=l}}function gn(e){for(var t=e.e*Yt,n=e.d[0];n>=10;n/=10)t++;return t}function cS(e,t,n){if(t>e.LN10.sd())throw Zt=!0,n&&(e.precision=n),Error(Oa+"LN10 precision limit exceeded");return It(new e(e.LN10),t)}function qo(e){for(var t="";e--;)t+="0";return t}function zf(e,t){var n,r,a,o,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(Oa+(x.s?"NaN":"-Infinity"));if(x.eq(ea))return new b(0);if(t==null?(Zt=!1,f=w):f=t,x.eq(10))return t==null&&(Zt=!0),cS(b,f);if(f+=g,b.precision=f,n=oi(j),r=n.charAt(0),o=gn(x),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=oi(x.d),r=n.charAt(0),p++;o=gn(x),r>1?(x=new b("0."+n),o++):x=new b(r+"."+n.slice(1))}else return d=cS(b,f+2,w).times(o+""),x=zf(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=Ji(x.minus(ea),x.plus(ea),f),m=It(x.times(x),f),a=3;;){if(l=It(l.times(m),f),d=u.plus(Ji(l,new b(a),f)),oi(d.d).slice(0,f)===oi(u.d).slice(0,f))return u=u.times(2),o!==0&&(u=u.plus(cS(b,f+2,w).times(o+""))),u=Ji(u,new b(p),f),b.precision=w,t==null?(Zt=!0,It(u,w)):u;u=d,a+=2}}function w$(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=Hu(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>Uv||e.e<-Uv))throw Error(TC+n)}else e.s=0,e.e=0,e.d=[0];return e}function It(e,t,n){var r,a,o,l,u,d,f,m,p=e.d;for(l=1,o=p[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=Yt,a=t,f=p[m=0];else{if(m=Math.ceil((r+1)/Yt),o=p.length,m>=o)return e;for(f=o=p[m],l=1;o>=10;o/=10)l++;r%=Yt,a=r-Yt+l}if(n!==void 0&&(o=zs(10,l-a-1),u=f/o%10|0,d=t<0||p[m+1]!==void 0||f%o,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/zs(10,l-a):0:p[m-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return d?(o=gn(e),p.length=1,t=t-o-1,p[0]=zs(10,(Yt-t%Yt)%Yt),e.e=Hu(-t/Yt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=m,o=1,m--):(p.length=m+1,o=zs(10,Yt-r),p[m]=a>0?(f/zs(10,l-a)%zs(10,a)|0)*o:0),d)for(;;)if(m==0){(p[0]+=o)==zn&&(p[0]=1,++e.e);break}else{if(p[m]+=o,p[m]!=zn)break;p[m--]=0,o=1}for(r=p.length;p[--r]===0;)p.pop();if(Zt&&(e.e>Uv||e.e<-Uv))throw Error(TC+gn(e));return e}function l6(e,t){var n,r,a,o,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(o=a;o&&d[--o]===0;)d[o]=zn-1;--d[o],d[a]+=zn}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 dl(e,t,n){var r,a=gn(e),o=oi(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+qo(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+qo(-a-1)+o,n&&(r=n-l)>0&&(o+=qo(r))):a>=l?(o+=qo(a+1-l),n&&(r=n-a-1)>0&&(o=o+"."+qo(r))):((r=a+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(o+="."),o+=qo(r))),e.s<0?"-"+o:o}function j$(e,t){if(e.length>t)return e.length=t,!0}function c6(e){var t,n,r;function a(o){var l=this;if(!(l instanceof a))return new a(o);if(l.constructor=a,o instanceof a){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(tl+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return w$(l,o.toString())}else if(typeof o!="string")throw Error(tl+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,Kie.test(o))w$(l,o);else throw Error(tl+o)}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=c6,a.config=a.set=Xie,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 Xie(e){if(!e||typeof e!="object")throw Error(Oa+"Object expected");var t,n,r,a=["precision",1,Uu,"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(Hu(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(tl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(tl+n+": "+r);return this}var kC=c6(Yie);ea=new kC(1);const Pt=kC;function Zie(e){return toe(e)||eoe(e)||Jie(e)||Qie()}function Qie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jie(e,t){if(e){if(typeof e=="string")return V_(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 V_(e,t)}}function eoe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function toe(e){if(Array.isArray(e))return V_(e)}function V_(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 noe=function(t){return t},u6={},d6=function(t){return t===u6},S$=function(t){return function n(){return arguments.length===0||arguments.length===1&&d6(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},roe=function e(t,n){return t===1?n:S$(function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];var l=a.filter(function(u){return u!==u6}).length;return l>=t?n.apply(void 0,a):e(t-l,S$(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 d6(p)?d.shift():p});return n.apply(void 0,Zie(m).concat(d))}))})},my=function(t){return roe(t.length,t)},G_=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},aoe=my(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),ioe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return noe;var a=n.reverse(),o=a[0],l=a.slice(1);return function(){return l.reduce(function(u,d){return d(u)},o.apply(void 0,arguments))}},Y_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},f6=function(t){var n=null,r=null;return function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return n&&o.every(function(u,d){return u===n[d]})||(n=o,r=t.apply(void 0,o)),r}};function ooe(e){var t;return e===0?t=1:t=Math.floor(new Pt(e).abs().log(10).toNumber())+1,t}function soe(e,t,n){for(var r=new Pt(e),a=0,o=[];r.lt(t)&&a<1e5;)o.push(r.toNumber()),r=r.add(n),a++;return o}var loe=my(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),coe=my(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),uoe=my(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const py={rangeStep:soe,getDigitCount:ooe,interpolateNumber:loe,uninterpolateNumber:coe,uninterpolateTruncation:uoe};function K_(e){return hoe(e)||foe(e)||h6(e)||doe()}function doe(){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 foe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function hoe(e){if(Array.isArray(e))return X_(e)}function qf(e,t){return voe(e)||poe(e,t)||h6(e,t)||moe()}function moe(){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 h6(e,t){if(e){if(typeof e=="string")return X_(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 X_(e,t)}}function X_(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 poe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=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,o=d}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function voe(e){if(Array.isArray(e))return e}function m6(e){var t=qf(e,2),n=t[0],r=t[1],a=n,o=r;return n>r&&(a=r,o=n),[a,o]}function p6(e,t,n){if(e.lte(0))return new Pt(0);var r=py.getDigitCount(e.toNumber()),a=new Pt(10).pow(r),o=e.div(a),l=r!==1?.05:.1,u=new Pt(Math.ceil(o.div(l).toNumber())).add(n).mul(l),d=u.mul(a);return t?d:new Pt(Math.ceil(d))}function goe(e,t,n){var r=1,a=new Pt(e);if(!a.isint()&&n){var o=Math.abs(e);o<1?(r=new Pt(10).pow(py.getDigitCount(e)-1),a=new Pt(Math.floor(a.div(r).toNumber())).mul(r)):o>1&&(a=new Pt(Math.floor(e)))}else e===0?a=new Pt(Math.floor((t-1)/2)):n||(a=new Pt(Math.floor(e)));var l=Math.floor((t-1)/2),u=ioe(aoe(function(d){return a.add(new Pt(d-l).mul(r)).toNumber()}),G_);return u(0,t)}function v6(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 Pt(0),tickMin:new Pt(0),tickMax:new Pt(0)};var o=p6(new Pt(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Pt(0):(l=new Pt(e).add(t).div(2),l=l.sub(new Pt(l).mod(o)));var u=Math.ceil(l.sub(e).div(o).toNumber()),d=Math.ceil(new Pt(t).sub(l).div(o).toNumber()),f=u+d+1;return f>n?v6(e,t,n,r,a+1):(f<n&&(d=t>0?d+(n-f):d,u=t>0?u:u+(n-f)),{step:o,tickMin:l.sub(new Pt(u).mul(o)),tickMax:l.add(new Pt(d).mul(o))})}function yoe(e){var t=qf(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),u=m6([n,r]),d=qf(u,2),f=d[0],m=d[1];if(f===-1/0||m===1/0){var p=m===1/0?[f].concat(K_(G_(0,a-1).map(function(){return 1/0}))):[].concat(K_(G_(0,a-1).map(function(){return-1/0})),[m]);return n>r?Y_(p):p}if(f===m)return goe(f,a,o);var g=v6(f,m,l,o),x=g.step,j=g.tickMin,b=g.tickMax,w=py.rangeStep(j,b.add(new Pt(.1).mul(x)),x);return n>r?Y_(w):w}function xoe(e,t){var n=qf(e,2),r=n[0],a=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=m6([r,a]),u=qf(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=p6(new Pt(f).sub(d).div(m-1),o,0),g=[].concat(K_(py.rangeStep(new Pt(d),new Pt(f).sub(new Pt(.99).mul(p)),p)),[f]);return r>a?Y_(g):g}var boe=f6(yoe),woe=f6(xoe),joe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function uu(e){"@babel/helpers - typeof";return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uu(e)}function Hv(){return Hv=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},Hv.apply(this,arguments)}function Soe(e,t){return Coe(e)||Ooe(e,t)||Noe(e,t)||_oe()}function _oe(){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 Noe(e,t){if(e){if(typeof e=="string")return _$(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 _$(e,t)}}function _$(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 Ooe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 Coe(e){if(Array.isArray(e))return e}function Eoe(e,t){if(e==null)return{};var n=Aoe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Aoe(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 Toe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function koe(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,x6(r.key),r)}}function Moe(e,t,n){return t&&koe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Poe(e,t,n){return t=Wv(t),Roe(e,g6()?Reflect.construct(t,n||[],Wv(e).constructor):t.apply(e,n))}function Roe(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 Doe(e)}function Doe(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 Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function $oe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z_(e,t)}function Z_(e,t){return Z_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Z_(e,t)}function y6(e,t,n){return t=x6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x6(e){var t=Ioe(e,"string");return uu(t)=="symbol"?t:t+""}function Ioe(e,t){if(uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Dh=(function(e){function t(){return Toe(this,t),Poe(this,t,arguments)}return $oe(t,e),Moe(t,[{key:"render",value:function(){var r=this.props,a=r.offset,o=r.layout,l=r.width,u=r.dataKey,d=r.data,f=r.dataPointFormatter,m=r.xAxis,p=r.yAxis,g=Eoe(r,joe),x=Be(g,!1);this.props.direction==="x"&&m.type!=="number"&&ur(!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 M=Soe(A,2);k=M[0],T=M[1]}else k=T=A;if(o==="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(o==="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,Hv({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",Hv({},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);y6(Dh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});y6(Dh,"displayName","ErrorBar");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,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?N$(Object(n),!0).forEach(function(r){Loe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Loe(e,t,n){return t=Boe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Boe(e){var t=zoe(e,"string");return Ff(t)=="symbol"?t:t+""}function zoe(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)}var b6=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,o=t.legendContent,l=Kr(n,Js);if(!l)return null;var u=Js.defaultProps,d=u!==void 0?$s($s({},u),l.props):{},f;return l.props&&l.props.payload?f=l.props&&l.props.payload:o==="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?$s($s({},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:MC(p),value:b||j,payload:x}}),$s($s($s({},d),Js.getWithHeight(l,a)),{},{payload:f,item:l})};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 O$(e){return Hoe(e)||Uoe(e)||Foe(e)||qoe()}function qoe(){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 Foe(e,t){if(e){if(typeof e=="string")return Q_(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 Q_(e,t)}}function Uoe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hoe(e){if(Array.isArray(e))return Q_(e)}function Q_(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 C$(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 on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C$(Object(n),!0).forEach(function(r){Uc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uc(e,t,n){return t=Woe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Woe(e){var t=Voe(e,"string");return Uf(t)=="symbol"?t:t+""}function Voe(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 kn(e,t,n){return Ge(e)||Ge(t)?n:Mn(t)?ta(e,t,n):We(t)?t(e):n}function wf(e,t,n,r){var a=Wie(e,function(u){return kn(u,t)});if(n==="number"){var o=a.filter(function(u){return Oe(u)||parseFloat(u)});return o.length?[hy(o),fy(o)]:[1/0,-1/0]}var l=r?a.filter(function(u){return!Ge(u)}):a;return l.map(function(u){return Mn(u)||u instanceof Date?u:""})}var Goe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=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(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var d=o.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(br(p-m)!==br(g-p)){var j=[];if(br(g-p)===br(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},MC=function(t){var n,r=t,a=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?on(on({},t.type.defaultProps),t.props):t.props,l=o.stroke,u=o.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},Yoe=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var l={},u=Object.keys(o),d=0,f=u.length;d<f;d++)for(var m=o[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 Qi(T.type).indexOf("Bar")>=0});if(N&&N.length){var O=N[0].type.defaultProps,C=O!==void 0?on(on({},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:wr(k,r,0)})}}return l},Koe=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,u=t.maxBarSize,d=l.length;if(d<1)return null;var f=wr(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(O$(A),[k]);return w=T[T.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){T.push({item:M,position:w})}),T},p)}else{var N=wr(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(O$(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(M){T.push({item:M,position:T[T.length-1].position})}),T},p)}return m},Xoe=function(t,n,r,a){var o=r.children,l=r.width,u=r.margin,d=l-(u.left||0)-(u.right||0),f=b6({children:o,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 on(on({},t),{},Uc({},x,t[x]+(p||0)));if((b==="horizontal"||b==="vertical"&&x==="center")&&j!=="middle"&&Oe(t[j]))return on(on({},t),{},Uc({},j,t[j]+(g||0)))}return t},Zoe=function(t,n,r){return Ge(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},w6=function(t,n,r,a,o){var l=n.props.children,u=na(l,Dh).filter(function(f){return Zoe(a,o,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=kn(m,r);if(Ge(p))return f;var g=Array.isArray(p)?[hy(p),fy(p)]:[p,p],x=d.reduce(function(j,b){var w=kn(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},Qoe=function(t,n,r,a,o){var l=n.map(function(u){return w6(t,u,r,o,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},j6=function(t,n,r,a,o){var l=n.map(function(d){var f=d.props.dataKey;return r==="number"&&f&&w6(t,d,f,a)||wf(t,f,r,o)});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},[])},S6=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},_6=function(t,n,r,a){if(a)return t.map(function(d){return d.coordinate});var o,l,u=t.map(function(d){return d.coordinate===n&&(o=!0),d.coordinate===r&&(l=!0),d.coordinate});return o||u.push(n),l||u.push(r),u},Yi=function(t,n,r){if(!t)return null;var a=t.scale,o=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?br(u[0]-u[1])*2*f:f,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(p){var g=o?o.indexOf(p):p;return{coordinate:a(g)+f,value:p,offset:f}});return m.filter(function(p){return!Eh(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:o?o[p]:p,index:g,offset:f}})},uS=new WeakMap,Rp=function(t,n){if(typeof n!="function")return t;uS.has(t)||uS.set(t,new WeakMap);var r=uS.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},N6=function(t,n,r){var a=t.scale,o=t.type,l=t.layout,u=t.axisType;if(a==="auto")return l==="radial"&&u==="radiusAxis"?{scale:Df(),realScaleType:"band"}:l==="radial"&&u==="angleAxis"?{scale:Bv(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:bf(),realScaleType:"point"}:o==="category"?{scale:Df(),realScaleType:"band"}:{scale:Bv(),realScaleType:"linear"};if(ll(a)){var d="scale".concat(Zg(a));return{scale:(f$[d]||bf)(),realScaleType:f$[d]?d:"point"}}return We(a)?{scale:a}:{scale:bf(),realScaleType:"point"}},E$=1e-4,O6=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),o=Math.min(a[0],a[1])-E$,l=Math.max(a[0],a[1])+E$,u=t(n[0]),d=t(n[r-1]);(u<o||u>l||d<o||d>l)&&t.domain([n[0],n[r-1]])}},Joe=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},ese=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]),o=[t[0],t[1]];return(!Oe(t[0])||t[0]<r)&&(o[0]=r),(!Oe(t[1])||t[1]>a)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]<r&&(o[1]=r),o},tse=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0,u=0;u<n;++u){var d=Eh(t[u][r][1])?t[u][r][0]:t[u][r][1];d>=0?(t[u][r][0]=o,t[u][r][1]=o+d,o=t[u][r][1]):(t[u][r][0]=l,t[u][r][1]=l+d,l=t[u][r][1])}},nse=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0;l<n;++l){var u=Eh(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},rse={sign:tse,expand:HJ,none:nu,silhouette:WJ,wiggle:VJ,positive:nse},ase=function(t,n,r){var a=n.map(function(u){return u.props.dataKey}),o=rse[r],l=UJ().keys(a).value(function(u,d){return+kn(u,d,0)}).order(E_).offset(o);return l(t)},ise=function(t,n,r,a,o,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?on(on({},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(Mn(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[zu("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[g]};return on(on({},p),{},Uc({},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 on(on({},b),{},Uc({},w,{numericAxisId:r,cateAxisId:a,items:N.items,stackedData:ase(t,N.items,o)}))},j)}return on(on({},p),{},Uc({},g,x))},m)},C6=function(t,n){var r=n.realScaleType,a=n.type,o=n.tickCount,l=n.originalDomain,u=n.allowDecimals,d=r||n.scale;if(d!=="auto"&&d!=="linear")return null;if(o&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var f=t.domain();if(!f.length)return null;var m=boe(f,o,u);return t.domain([hy(m),fy(m)]),{niceTicks:m}}if(o&&a==="number"){var p=t.domain(),g=woe(p,o,u);return{niceTicks:g}}return null};function A$(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,o=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ge(a[t.dataKey])){var u=wv(n,"value",a[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var d=kn(a,Ge(l)?t.dataKey:l);return Ge(d)?null:t.scale(d)}var T$=function(t){var n=t.axis,r=t.ticks,a=t.offset,o=t.bandSize,l=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+a:null;var d=kn(l,n.dataKey,n.domain[u]);return Ge(d)?null:n.scale(d)-o/2+a},ose=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return a<=0&&o>=0?0:o<0?o:a}return r[0]},sse=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?on(on({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(Mn(o)){var l=n[o];if(l){var u=l.items.indexOf(t);return u>=0?l.stackedData[u]:null}}return null},lse=function(t){return t.reduce(function(n,r){return[hy(r.concat([n[0]]).filter(Oe)),fy(r.concat([n[1]]).filter(Oe))]},[1/0,-1/0])},E6=function(t,n,r){return Object.keys(t).reduce(function(a,o){var l=t[o],u=l.stackedData,d=u.reduce(function(f,m){var p=lse(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})},k$=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,M$=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,J_=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(k$.test(t[0])){var o=+k$.exec(t[0])[1];a[0]=n[0]-o}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(M$.test(t[1])){var l=+M$.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},Vv=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 o=oC(n,function(p){return p.coordinate}),l=1/0,u=1,d=o.length;u<d;u++){var f=o[u],m=o[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||Rh(t,ta(r,"type.defaultProps.domain"))?n:t},A6=function(t,n){var r=t.type.defaultProps?on(on({},t.type.defaultProps),t.props):t.props,a=r.dataKey,o=r.name,l=r.unit,u=r.formatter,d=r.tooltipType,f=r.chartType,m=r.hide;return on(on({},Be(t,!1)),{},{dataKey:a,unit:l,formatter:u,name:o||a,color:MC(t),value:kn(n,a),type:d,payload:n,chartType:f,hide:m})};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)}function R$(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?R$(Object(n),!0).forEach(function(r){T6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function T6(e,t,n){return t=cse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cse(e){var t=use(e,"string");return Hf(t)=="symbol"?t:t+""}function use(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 dse(e,t){return pse(e)||mse(e,t)||hse(e,t)||fse()}function fse(){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 hse(e,t){if(e){if(typeof e=="string")return D$(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 D$(e,t)}}function D$(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 mse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 pse(e){if(Array.isArray(e))return e}var Gv=Math.PI/180,vse=function(t){return t*180/Math.PI},Ft=function(t,n,r,a){return{x:t+Math.cos(-Gv*a)*r,y:n+Math.sin(-Gv*a)*r}},k6=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},gse=function(t,n,r,a,o){var l=t.width,u=t.height,d=t.startAngle,f=t.endAngle,m=wr(t.cx,l,l/2),p=wr(t.cy,u,u/2),g=k6(l,u,r),x=wr(t.innerRadius,g,0),j=wr(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=dse(k,2);d=T[0],f=T[1]}var M=N6(O,o),$=M.realScaleType,z=M.scale;z.domain(C).range(E),O6(z);var D=C6(z,Hi(Hi({},O),{},{realScaleType:$})),U=Hi(Hi(Hi({},O),D),{},{range:E,radius:j,realScaleType:$,scale:z,cx:m,cy:p,innerRadius:x,outerRadius:j,startAngle:d,endAngle:f});return Hi(Hi({},w),{},T6({},N,U))},{})},yse=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(a-l,2))},xse=function(t,n){var r=t.x,a=t.y,o=n.cx,l=n.cy,u=yse({x:r,y:a},{x:o,y:l});if(u<=0)return{radius:u};var d=(r-o)/u,f=Math.acos(d);return a>l&&(f=2*Math.PI-f),{radius:u,angle:vse(f),angleInRadian:f}},bse=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(a,o);return{startAngle:n-l*360,endAngle:r-l*360}},wse=function(t,n){var r=n.startAngle,a=n.endAngle,o=Math.floor(r/360),l=Math.floor(a/360),u=Math.min(o,l);return t+u*360},$$=function(t,n){var r=t.x,a=t.y,o=xse({x:r,y:a},n),l=o.radius,u=o.angle,d=n.innerRadius,f=n.outerRadius;if(l<d||l>f)return!1;if(l===0)return!0;var m=bse(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?Hi(Hi({},n),{},{radius:l,angle:wse(x,n)}):null},M6=function(t){return!y.isValidElement(t)&&!We(t)&&typeof t!="boolean"?t.className:""};function Wf(e){"@babel/helpers - typeof";return Wf=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},Wf(e)}var jse=["offset"];function Sse(e){return Cse(e)||Ose(e)||Nse(e)||_se()}function _se(){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 Nse(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 Ose(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cse(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 Ese(e,t){if(e==null)return{};var n=Ase(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ase(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 I$(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 Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I$(Object(n),!0).forEach(function(r){Tse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tse(e,t,n){return t=kse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kse(e){var t=Mse(e,"string");return Wf(t)=="symbol"?t:t+""}function Mse(e,t){if(Wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vf(){return Vf=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},Vf.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},Rse=function(t,n){var r=br(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Dse=function(t,n,r){var a=t.position,o=t.viewBox,l=t.offset,u=t.className,d=o,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=Rse(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),M=Ge(t.id)?zu("recharts-radial-line-"):t.id;return W.createElement("text",Vf({},r,{dominantBaseline:"central",className:Ye("recharts-radial-bar-label",u)}),W.createElement("defs",null,W.createElement("path",{id:M,d:T})),W.createElement("textPath",{xlinkHref:"#".concat(M)},n))},$se=function(t){var n=t.viewBox,r=t.offset,a=t.position,o=n,l=o.cx,u=o.cy,d=o.innerRadius,f=o.outerRadius,m=o.startAngle,p=o.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"}},Ise=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,o=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(o==="top"){var C={x:u+f/2,y:d-p*a,textAnchor:"middle",verticalAnchor:x};return Tn(Tn({},C),r?{height:Math.max(d-r.y,0),width:f}:{})}if(o==="bottom"){var A={x:u+f/2,y:d+m+g,textAnchor:"middle",verticalAnchor:j};return Tn(Tn({},A),r?{height:Math.max(r.y+r.height-(d+m),0),width:f}:{})}if(o==="left"){var E={x:u-w,y:d+m/2,textAnchor:N,verticalAnchor:"middle"};return Tn(Tn({},E),r?{width:Math.max(E.x-r.x,0),height:m}:{})}if(o==="right"){var k={x:u+f+w,y:d+m/2,textAnchor:O,verticalAnchor:"middle"};return Tn(Tn({},k),r?{width:Math.max(r.x+r.width-k.x,0),height:m}:{})}var T=r?{width:f,height:m}:{};return o==="insideLeft"?Tn({x:u+w,y:d+m/2,textAnchor:O,verticalAnchor:"middle"},T):o==="insideRight"?Tn({x:u+f-w,y:d+m/2,textAnchor:N,verticalAnchor:"middle"},T):o==="insideTop"?Tn({x:u+f/2,y:d+g,textAnchor:"middle",verticalAnchor:j},T):o==="insideBottom"?Tn({x:u+f/2,y:d+m-g,textAnchor:"middle",verticalAnchor:x},T):o==="insideTopLeft"?Tn({x:u+w,y:d+g,textAnchor:O,verticalAnchor:j},T):o==="insideTopRight"?Tn({x:u+f-w,y:d+g,textAnchor:N,verticalAnchor:j},T):o==="insideBottomLeft"?Tn({x:u+w,y:d+m-g,textAnchor:O,verticalAnchor:x},T):o==="insideBottomRight"?Tn({x:u+f-w,y:d+m-g,textAnchor:N,verticalAnchor:x},T):Bu(o)&&(Oe(o.x)||Hs(o.x))&&(Oe(o.y)||Hs(o.y))?Tn({x:u+wr(o.x,f),y:d+wr(o.y,m),textAnchor:"end",verticalAnchor:"end"},T):Tn({x:u+f/2,y:d+m/2,textAnchor:"middle",verticalAnchor:"middle"},T)},Lse=function(t){return"cx"in t&&Oe(t.cx)};function qn(e){var t=e.offset,n=t===void 0?5:t,r=Ese(e,jse),a=Tn({offset:n},r),o=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(!o||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=Lse(o),b=Be(a,!0);if(j&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Dse(a,x,b);var w=j?$se(a):Ise(a);return W.createElement(ul,Vf({className:Ye("recharts-label",p)},b,w,{breakAll:g}),x)}qn.displayName="Label";var P6=function(t){var n=t.cx,r=t.cy,a=t.angle,o=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:o||a||0,endAngle:l||a||0,innerRadius:f||0,outerRadius:m||d||u||0,clockWise:N}:t.viewBox?t.viewBox:{}},Bse=function(t,n){return t?t===!0?W.createElement(qn,{key:"label-implicit",viewBox:n}):Mn(t)?W.createElement(qn,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===qn?y.cloneElement(t,{key:"label-implicit",viewBox:n}):W.createElement(qn,{key:"label-implicit",content:t,viewBox:n}):We(t)?W.createElement(qn,{key:"label-implicit",content:t,viewBox:n}):Bu(t)?W.createElement(qn,Vf({viewBox:n},t,{key:"label-implicit"})):null:null},zse=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,o=P6(t),l=na(a,qn).map(function(d,f){return y.cloneElement(d,{viewBox:n||o,key:"label-".concat(f)})});if(!r)return l;var u=Bse(t.label,n||o);return[u].concat(Sse(l))};qn.parseViewBox=P6;qn.renderCallByParent=zse;var dS,L$;function qse(){if(L$)return dS;L$=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return dS=e,dS}var Fse=qse();const Use=St(Fse);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)}var Hse=["valueAccessor"],Wse=["data","dataKey","clockWise","id","textBreakAll"];function Vse(e){return Xse(e)||Kse(e)||Yse(e)||Gse()}function Gse(){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 Yse(e,t){if(e){if(typeof e=="string")return tN(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 tN(e,t)}}function Kse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xse(e){if(Array.isArray(e))return tN(e)}function tN(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 Yv(){return Yv=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},Yv.apply(this,arguments)}function B$(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 z$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B$(Object(n),!0).forEach(function(r){Zse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zse(e,t,n){return t=Qse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qse(e){var t=Jse(e,"string");return Gf(t)=="symbol"?t:t+""}function Jse(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)}function q$(e,t){if(e==null)return{};var n=ele(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ele(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 tle=function(t){return Array.isArray(t.value)?Use(t.value):t.value};function eo(e){var t=e.valueAccessor,n=t===void 0?tle:t,r=q$(e,Hse),a=r.data,o=r.dataKey,l=r.clockWise,u=r.id,d=r.textBreakAll,f=q$(r,Wse);return!a||!a.length?null:W.createElement(pt,{className:"recharts-label-list"},a.map(function(m,p){var g=Ge(o)?n(m,p):kn(m&&m.payload,o),x=Ge(u)?{}:{id:"".concat(u,"-").concat(p)};return W.createElement(qn,Yv({},Be(m,!0),f,x,{parentViewBox:m.parentViewBox,value:g,textBreakAll:d,viewBox:qn.parseViewBox(Ge(l)?m:z$(z$({},m),{},{clockWise:l})),key:"label-".concat(p),index:p}))}))}eo.displayName="LabelList";function nle(e,t){return e?e===!0?W.createElement(eo,{key:"labelList-implicit",data:t}):W.isValidElement(e)||We(e)?W.createElement(eo,{key:"labelList-implicit",data:t,content:e}):Bu(e)?W.createElement(eo,Yv({data:t},e,{key:"labelList-implicit"})):null:null}function rle(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=na(r,eo).map(function(l,u){return y.cloneElement(l,{data:t,key:"labelList-".concat(u)})});if(!n)return a;var o=nle(e.label,t);return[o].concat(Vse(a))}eo.renderCallByParent=rle;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 F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function U$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F$(Object(n),!0).forEach(function(r){ale(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ale(e,t,n){return t=ile(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ile(e){var t=ole(e,"string");return Yf(t)=="symbol"?t:t+""}function ole(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 sle=function(t,n){var r=br(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},Dp=function(t){var n=t.cx,r=t.cy,a=t.radius,o=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)/Gv,g=f?o:o+l*p,x=Ft(n,r,m,g),j=Ft(n,r,a,g),b=f?o-l*p:o,w=Ft(n,r,m*Math.cos(p*Gv),b);return{center:x,circleTangency:j,lineTangency:w,theta:p}},R6=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.startAngle,u=t.endAngle,d=sle(l,u),f=l+d,m=Ft(n,r,o,l),p=Ft(n,r,o,f),g="M ".concat(m.x,",").concat(m.y,`
|
||
A `).concat(o,",").concat(o,`,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},lle=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,d=t.cornerIsExternal,f=t.startAngle,m=t.endAngle,p=br(m-f),g=Dp({cx:n,cy:r,radius:o,angle:f,sign:p,cornerRadius:l,cornerIsExternal:d}),x=g.circleTangency,j=g.lineTangency,b=g.theta,w=Dp({cx:n,cy:r,radius:o,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
|
||
`):R6({cx:n,cy:r,innerRadius:a,outerRadius:o,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(o,",").concat(o,",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=Dp({cx:n,cy:r,radius:a,angle:f,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:d}),T=k.circleTangency,M=k.lineTangency,$=k.theta,z=Dp({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(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},cle={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},D6=function(t){var n=U$(U$({},cle),t),r=n.cx,a=n.cy,o=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<o||m===p)return null;var x=Ye("recharts-sector",g),j=l-o,b=wr(u,j,0,!0),w;return b>0&&Math.abs(m-p)<360?w=lle({cx:r,cy:a,innerRadius:o,outerRadius:l,cornerRadius:Math.min(b,j/2),forceCornerRadius:d,cornerIsExternal:f,startAngle:m,endAngle:p}):w=R6({cx:r,cy:a,innerRadius:o,outerRadius:l,startAngle:m,endAngle:p}),W.createElement("path",nN({},Be(n,!0),{className:x,d:w,role:"img"}))};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 rN(){return rN=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},rN.apply(this,arguments)}function H$(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 W$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H$(Object(n),!0).forEach(function(r){ule(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ule(e,t,n){return t=dle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dle(e){var t=fle(e,"string");return Kf(t)=="symbol"?t:t+""}function fle(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)}var V$={curveBasisClosed:MJ,curveBasisOpen:PJ,curveBasis:kJ,curveBumpX:gJ,curveBumpY:yJ,curveLinearClosed:RJ,curveLinear:Jg,curveMonotoneX:DJ,curveMonotoneY:$J,curveNatural:IJ,curveStep:LJ,curveStepAfter:zJ,curveStepBefore:BJ},$p=function(t){return t.x===+t.x&&t.y===+t.y},ef=function(t){return t.x},tf=function(t){return t.y},hle=function(t,n){if(We(t))return t;var r="curve".concat(Zg(t));return(r==="curveMonotone"||r==="curveBump")&&n?V$["".concat(r).concat(n==="vertical"?"Y":"X")]:V$[r]||Jg},mle=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,o=a===void 0?[]:a,l=t.baseLine,u=t.layout,d=t.connectNulls,f=d===void 0?!1:d,m=hle(r,u),p=f?o.filter(function(b){return $p(b)}):o,g;if(Array.isArray(l)){var x=f?l.filter(function(b){return $p(b)}):l,j=p.map(function(b,w){return W$(W$({},b),{},{base:x[w]})});return u==="vertical"?g=Cp().y(tf).x1(ef).x0(function(b){return b.base.x}):g=Cp().x(ef).y1(tf).y0(function(b){return b.base.y}),g.defined($p).curve(m),g(j)}return u==="vertical"&&Oe(l)?g=Cp().y(tf).x1(ef).x0(l):Oe(l)?g=Cp().x(ef).y1(tf).y0(l):g=PB().x(ef).y(tf),g.defined($p).curve(m),g(p)},Kv=function(t){var n=t.className,r=t.points,a=t.path,o=t.pathRef;if((!r||!r.length)&&!a)return null;var l=r&&r.length?mle(t):a;return y.createElement("path",rN({},Be(t,!1),jv(t),{className:Ye("recharts-curve",n),d:l,ref:o}))},fS={exports:{}},hS,G$;function ple(){if(G$)return hS;G$=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hS=e,hS}var mS,Y$;function vle(){if(Y$)return mS;Y$=1;var e=ple();function t(){}function n(){}return n.resetWarningCache=t,mS=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 o={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 o.PropTypes=o,o},mS}var K$;function gle(){return K$||(K$=1,fS.exports=vle()()),fS.exports}var yle=gle();const bt=St(yle);var xle=Object.getOwnPropertyNames,ble=Object.getOwnPropertySymbols,wle=Object.prototype.hasOwnProperty;function X$(e,t){return function(r,a,o){return e(r,a,o)&&t(r,a,o)}}function Ip(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);var o=a.cache,l=o.get(n),u=o.get(r);if(l&&u)return l===r&&u===n;o.set(n,r),o.set(r,n);var d=e(n,r,a);return o.delete(n),o.delete(r),d}}function jle(e){return e?.[Symbol.toStringTag]}function Z$(e){return xle(e).concat(ble(e))}var Sle=Object.hasOwn||(function(e,t){return wle.call(e,t)});function Sl(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var _le="__v",Nle="__o",Ole="_owner",Q$=Object.getOwnPropertyDescriptor,J$=Object.keys;function Cle(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 Ele(e,t){return Sl(e.getTime(),t.getTime())}function Ale(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Tle(e,t){return e===t}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),o=e.entries(),l,u,d=0;(l=o.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 kle=Sl;function Mle(e,t,n){var r=J$(e),a=r.length;if(J$(t).length!==a)return!1;for(;a-- >0;)if(!$6(e,t,n,r[a]))return!1;return!0}function nf(e,t,n){var r=Z$(e),a=r.length;if(Z$(t).length!==a)return!1;for(var o,l,u;a-- >0;)if(o=r[a],!$6(e,t,n,o)||(l=Q$(e,o),u=Q$(t,o),(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 Sl(e.valueOf(),t.valueOf())}function Rle(e,t){return e.source===t.source&&e.flags===t.flags}function tI(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var a=new Array(r),o=e.values(),l,u;(l=o.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 Dle(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 $le(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 $6(e,t,n,r){return(r===Ole||r===Nle||r===_le)&&(e.$$typeof||t.$$typeof)?!0:Sle(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Ile="[object Arguments]",Lle="[object Boolean]",Ble="[object Date]",zle="[object Error]",qle="[object Map]",Fle="[object Number]",Ule="[object Object]",Hle="[object RegExp]",Wle="[object Set]",Vle="[object String]",Gle="[object URL]",Yle=Array.isArray,nI=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,rI=Object.assign,Kle=Object.prototype.toString.call.bind(Object.prototype.toString);function Xle(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,a=e.areFunctionsEqual,o=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(Yle(b))return t(b,w,N);if(nI!=null&&nI(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 o(b,w,N);if(C===Set)return m(b,w,N);var A=Kle(b);if(A===Ble)return n(b,w,N);if(A===Hle)return f(b,w,N);if(A===qle)return o(b,w,N);if(A===Wle)return m(b,w,N);if(A===Ule)return typeof b.then!="function"&&typeof w.then!="function"&&u(b,w,N);if(A===Gle)return g(b,w,N);if(A===zle)return r(b,w,N);if(A===Ile)return u(b,w,N);if(A===Lle||A===Fle||A===Vle)return d(b,w,N);if(x){var E=x[A];if(!E){var k=jle(b);k&&(E=x[k])}if(E)return E(b,w,N)}return!1}}function Zle(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,a={areArraysEqual:r?nf:Cle,areDatesEqual:Ele,areErrorsEqual:Ale,areFunctionsEqual:Tle,areMapsEqual:r?X$(eI,nf):eI,areNumbersEqual:kle,areObjectsEqual:r?nf:Mle,arePrimitiveWrappersEqual:Ple,areRegExpsEqual:Rle,areSetsEqual:r?X$(tI,nf):tI,areTypedArraysEqual:r?nf:Dle,areUrlsEqual:$le,unknownTagComparators:void 0};if(n&&(a=rI({},a,n(a))),t){var o=Ip(a.areArraysEqual),l=Ip(a.areMapsEqual),u=Ip(a.areObjectsEqual),d=Ip(a.areSetsEqual);a=rI({},a,{areArraysEqual:o,areMapsEqual:l,areObjectsEqual:u,areSetsEqual:d})}return a}function Qle(e){return function(t,n,r,a,o,l,u){return e(t,n,u)}}function Jle(e){var t=e.circular,n=e.comparator,r=e.createState,a=e.equals,o=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:o})};if(t)return function(d,f){return n(d,f,{cache:new WeakMap,equals:a,meta:void 0,strict:o})};var l={cache:void 0,equals:a,meta:void 0,strict:o};return function(d,f){return n(d,f,l)}}var ece=ss();ss({strict:!0});ss({circular:!0});ss({circular:!0,strict:!0});ss({createInternalComparator:function(){return Sl}});ss({strict:!0,createInternalComparator:function(){return Sl}});ss({circular:!0,createInternalComparator:function(){return Sl}});ss({circular:!0,createInternalComparator:function(){return Sl},strict:!0});function ss(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,a=e.createState,o=e.strict,l=o===void 0?!1:o,u=Zle(e),d=Xle(u),f=r?r(d):Qle(d);return Jle({circular:n,comparator:d,createState:a,equals:f,strict:l})}function tce(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function aI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(o){n<0&&(n=o),o-n>t?(e(o),n=-1):tce(a)};requestAnimationFrame(r)}function aN(e){"@babel/helpers - typeof";return aN=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},aN(e)}function nce(e){return oce(e)||ice(e)||ace(e)||rce()}function rce(){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 ace(e,t){if(e){if(typeof e=="string")return iI(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 iI(e,t)}}function iI(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 ice(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oce(e){if(Array.isArray(e))return e}function sce(){var e={},t=function(){return null},n=!1,r=function a(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,u=nce(l),d=u[0],f=u.slice(1);if(typeof d=="number"){aI(a.bind(null,f),d);return}a(d),aI(a.bind(null,f));return}aN(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return 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 oI(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 sI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oI(Object(n),!0).forEach(function(r){I6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I6(e,t,n){return t=lce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lce(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)}var uce=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(o){return a.includes(o)})})},dce=function(t){return t},fce=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},jf=function(t,n){return Object.keys(n).reduce(function(r,a){return sI(sI({},r),{},I6({},a,t(a,n[a])))},{})},lI=function(t,n,r){return t.map(function(a){return"".concat(fce(a)," ").concat(n,"ms ").concat(r)}).join(",")};function hce(e,t){return vce(e)||pce(e,t)||L6(e,t)||mce()}function mce(){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 pce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 vce(e){if(Array.isArray(e))return e}function gce(e){return bce(e)||xce(e)||L6(e)||yce()}function yce(){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 L6(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 xce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bce(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}var Xv=1e-4,B6=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},z6=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},cI=function(t,n){return function(r){var a=B6(t,n);return z6(a,r)}},wce=function(t,n){return function(r){var a=B6(t,n),o=[].concat(gce(a.map(function(l,u){return l*u}).slice(1)),[0]);return z6(o,r)}},uI=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],o=n[1],l=n[2],u=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,o=0,l=1,u=1;break;case"ease":a=.25,o=.1,l=.25,u=1;break;case"ease-in":a=.42,o=0,l=1,u=1;break;case"ease-out":a=.42,o=0,l=.58,u=1;break;case"ease-in-out":a=0,o=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=hce(f,4);a=m[0],o=m[1],l=m[2],u=m[3]}}}var p=cI(a,l),g=cI(o,u),x=wce(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)<Xv||k<Xv)return g(C);C=j(C-E/k)}return g(C)};return b.isStepper=!1,b},jce=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,o=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*o,b=g+(x-j)*u/1e3,w=g*u/1e3+m;return Math.abs(w-p)<Xv&&Math.abs(b)<Xv?[p,0]:[w,b]};return d.isStepper=!0,d.dt=u,d},Sce=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 uI(a);case"spring":return jce();default:if(a.split("(")[0]==="cubic-bezier")return uI(a)}return typeof a=="function"?a:null};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 dI(e){return Oce(e)||Nce(e)||q6(e)||_ce()}function _ce(){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 Nce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Oce(e){if(Array.isArray(e))return sN(e)}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 Jn(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){oN(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 oN(e,t,n){return t=Cce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cce(e){var t=Ece(e,"string");return Zf(t)==="symbol"?t:String(t)}function Ece(e,t){if(Zf(e)!=="object"||e===null)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)}function Ace(e,t){return Mce(e)||kce(e,t)||q6(e,t)||Tce()}function Tce(){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 q6(e,t){if(e){if(typeof e=="string")return sN(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 sN(e,t)}}function sN(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 kce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 Mce(e){if(Array.isArray(e))return e}var Zv=function(t,n,r){return t+(n-t)*r},lN=function(t){var n=t.from,r=t.to;return n!==r},Pce=function e(t,n,r){var a=jf(function(o,l){if(lN(l)){var u=t(l.from,l.to,l.velocity),d=Ace(u,2),f=d[0],m=d[1];return Jn(Jn({},l),{},{from:f,velocity:m})}return l},n);return r<1?jf(function(o,l){return lN(l)?Jn(Jn({},l),{},{velocity:Zv(l.velocity,a[o].velocity,r),from:Zv(l.from,a[o].from,r)}):l},n):e(t,a,r-1)};const Rce=(function(e,t,n,r,a){var o=uce(e,t),l=o.reduce(function(w,N){return Jn(Jn({},w),{},oN({},N,[e[N],t[N]]))},{}),u=o.reduce(function(w,N){return Jn(Jn({},w),{},oN({},N,{from:e[N],velocity:0,to:t[N]}))},{}),d=-1,f,m,p=function(){return null},g=function(){return jf(function(N,O){return O.from},u)},x=function(){return!Object.values(u).filter(lN).length},j=function(N){f||(f=N);var O=N-f,C=O/n.dt;u=Pce(n,u,C),a(Jn(Jn(Jn({},e),t),g())),f=N,x()||(d=requestAnimationFrame(p))},b=function(N){m||(m=N);var O=(N-m)/r,C=jf(function(E,k){return Zv.apply(void 0,dI(k).concat([n(O)]))},l);if(a(Jn(Jn(Jn({},e),t),C)),O<1)d=requestAnimationFrame(p);else{var A=jf(function(E,k){return Zv.apply(void 0,dI(k).concat([n(1)]))},l);a(Jn(Jn(Jn({},e),t),A))}};return p=n.isStepper?j:b,function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(d)}}});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)}var Dce=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function $ce(e,t){if(e==null)return{};var n=Ice(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ice(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function pS(e){return qce(e)||zce(e)||Bce(e)||Lce()}function Lce(){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 Bce(e,t){if(e){if(typeof e=="string")return cN(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 cN(e,t)}}function zce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qce(e){if(Array.isArray(e))return cN(e)}function cN(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 hI(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?hI(Object(n),!0).forEach(function(r){uf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uf(e,t,n){return t=F6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uce(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,F6(r.key),r)}}function Hce(e,t,n){return t&&Uce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function F6(e){var t=Wce(e,"string");return du(t)==="symbol"?t:String(t)}function Wce(e,t){if(du(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(du(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vce(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&&uN(e,t)}function uN(e,t){return uN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},uN(e,t)}function Gce(e){var t=Yce();return function(){var r=Qv(e),a;if(t){var o=Qv(this).constructor;a=Reflect.construct(r,arguments,o)}else a=r.apply(this,arguments);return dN(this,a)}}function dN(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 fN(e)}function fN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yce(){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 Qv(e){return Qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qv(e)}var vi=(function(e){Vce(n,e);var t=Gce(n);function n(r,a){var o;Fce(this,n),o=t.call(this,r,a);var l=o.props,u=l.isActive,d=l.attributeName,f=l.from,m=l.to,p=l.steps,g=l.children,x=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(fN(o)),o.changeStyle=o.changeStyle.bind(fN(o)),!u||x<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:m}),dN(o);if(p&&p.length)o.state={style:p[0].style};else if(f){if(typeof g=="function")return o.state={style:f},dN(o);o.state={style:d?uf({},d,f):f}}else o.state={style:{}};return o}return Hce(n,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,l=a.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,l=o.isActive,u=o.canBegin,d=o.attributeName,f=o.shouldReAnimate,m=o.to,p=o.from,g=this.state.style;if(u){if(!l){var x={style:d?uf({},d,m):m};this.state&&g&&(d&&g[d]!==m||!d&&g!==m)&&this.setState(x);return}if(!(ece(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?uf({},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 o=this,l=a.from,u=a.to,d=a.duration,f=a.easing,m=a.begin,p=a.onAnimationEnd,g=a.onAnimationStart,x=Rce(l,u,Sce(f),d,this.changeStyle),j=function(){o.stopJSAnimation=x()};this.manager.start([g,m,j,d,p])}},{key:"runStepAnimation",value:function(a){var o=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,M=N>0?l[N-1]:w,$=k||Object.keys(E);if(typeof A=="function"||A==="spring")return[].concat(pS(b),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:O,easing:A}),O]);var z=lI($,O,A),D=Pa(Pa(Pa({},M.style),E),{},{transition:z});return[].concat(pS(b),[D,O,T]).filter(dce)};return this.manager.start([d].concat(pS(l.reduce(x,[m,Math.max(g,u)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=sce());var o=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?uf({},u,d):d,w=lI(Object.keys(b),l,f);j.start([m,o,Pa(Pa({},b),{},{transition:w}),l,p])}},{key:"render",value:function(){var a=this.props,o=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=$ce(a,Dce),f=y.Children.count(o),m=this.state.style;if(typeof o=="function")return o(m);if(!u||f===0||l<=0)return o;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(o)):W.createElement("div",null,y.Children.map(o,function(g){return p(g)}))}}]),n})(y.PureComponent);vi.displayName="Animate";vi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};vi.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 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 Jv(){return Jv=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},Jv.apply(this,arguments)}function Kce(e,t){return Jce(e)||Qce(e,t)||Zce(e,t)||Xce()}function Xce(){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 Zce(e,t){if(e){if(typeof e=="string")return mI(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 mI(e,t)}}function mI(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 Qce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 Jce(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 vI(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){eue(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 eue(e,t,n){return t=tue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tue(e){var t=nue(e,"string");return Qf(t)=="symbol"?t:t+""}function nue(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 gI=function(t,n,r,a,o){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&&o instanceof Array){for(var p=[0,0,0,0],g=0,x=4;g<x;g++)p[g]=o[g]>l?l:o[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&&o===+o&&o>0){var j=Math.min(l,o);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},rue=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,o=n.x,l=n.y,u=n.width,d=n.height;if(Math.abs(u)>0&&Math.abs(d)>0){var f=Math.min(o,o+u),m=Math.max(o,o+u),p=Math.min(l,l+d),g=Math.max(l,l+d);return r>=f&&r<=m&&a>=p&&a<=g}return!1},aue={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=vI(vI({},aue),t),r=y.useRef(),a=y.useState(-1),o=Kce(a,2),l=o[0],u=o[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(vi,{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,M=A.y;return W.createElement(vi,{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",Jv({},Be(n,!0),{className:C,d:gI(T,M,E,k,g),ref:r})))}):W.createElement("path",Jv({},Be(n,!0),{className:C,d:gI(d,f,m,p,g)}))},iue=["points","className","baseLinePoints","connectNulls"];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 oue(e,t){if(e==null)return{};var n=sue(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sue(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 yI(e){return due(e)||uue(e)||cue(e)||lue()}function lue(){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 cue(e,t){if(e){if(typeof e=="string")return hN(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 hN(e,t)}}function uue(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function due(e){if(Array.isArray(e))return hN(e)}function hN(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 xI=function(t){return t&&t.x===+t.x&&t.y===+t.y},fue=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){xI(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),xI(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Sf=function(t,n){var r=fue(t);n&&(r=[r.reduce(function(o,l){return[].concat(yI(o),yI(l))},[])]);var a=r.map(function(o){return o.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},hue=function(t,n,r){var a=Sf(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(Sf(n.reverse(),r).slice(1))},mue=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,o=t.connectNulls,l=oue(t,iue);if(!n||!n.length)return null;var u=Ye("recharts-polygon",r);if(a&&a.length){var d=l.stroke&&l.stroke!=="none",f=hue(n,a,o);return W.createElement("g",{className:u},W.createElement("path",Ic({},Be(l,!0),{fill:f.slice(-1)==="Z"?l.fill:"none",stroke:"none",d:f})),d?W.createElement("path",Ic({},Be(l,!0),{fill:"none",d:Sf(n,o)})):null,d?W.createElement("path",Ic({},Be(l,!0),{fill:"none",d:Sf(a,o)})):null)}var m=Sf(n,o);return W.createElement("path",Ic({},Be(l,!0),{fill:m.slice(-1)==="Z"?l.fill:"none",className:u,d:m}))};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 vy=function(t){var n=t.cx,r=t.cy,a=t.r,o=t.className,l=Ye("recharts-dot",o);return n===+n&&r===+r&&a===+a?y.createElement("circle",mN({},Be(t,!1),jv(t),{className:l,cx:n,cy:r,r:a})):null};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)}var pue=["x","y","top","left","width","height","className"];function pN(){return pN=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},pN.apply(this,arguments)}function bI(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 vue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bI(Object(n),!0).forEach(function(r){gue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gue(e,t,n){return t=yue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yue(e){var t=xue(e,"string");return Jf(t)=="symbol"?t:t+""}function xue(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)}function bue(e,t){if(e==null)return{};var n=wue(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wue(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 jue=function(t,n,r,a,o,l){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},Sue=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=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=bue(t,pue),w=vue({x:r,y:o,top:u,left:f,width:p,height:x},b);return!Oe(r)||!Oe(o)||!Oe(p)||!Oe(x)||!Oe(u)||!Oe(f)?null:W.createElement("path",pN({},Be(w,!0),{className:Ye("recharts-cross",j),d:jue(r,o,p,x,u,f)}))},vS,wI;function _ue(){if(wI)return vS;wI=1;var e=dy(),t=r6(),n=bi();function r(a,o){return a&&a.length?e(a,n(o,2),t):void 0}return vS=r,vS}var Nue=_ue();const Oue=St(Nue);var gS,jI;function Cue(){if(jI)return gS;jI=1;var e=dy(),t=bi(),n=a6();function r(a,o){return a&&a.length?e(a,t(o,2),n):void 0}return gS=r,gS}var Eue=Cue();const Aue=St(Eue);var Tue=["cx","cy","angle","ticks","axisLine"],kue=["ticks","tick","angle","tickFormatter","stroke"];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 _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 SI(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?SI(Object(n),!0).forEach(function(r){gy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _I(e,t){if(e==null)return{};var n=Mue(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mue(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 NI(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,H6(r.key),r)}}function Rue(e,t,n){return t&&NI(e.prototype,t),n&&NI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Due(e,t,n){return t=eg(t),$ue(e,U6()?Reflect.construct(t,n||[],eg(e).constructor):t.apply(e,n))}function $ue(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 Iue(e)}function Iue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U6=function(){return!!e})()}function eg(e){return eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},eg(e)}function Lue(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 gy(e,t,n){return t=H6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H6(e){var t=Bue(e,"string");return fu(t)=="symbol"?t:t+""}function Bue(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 yy=(function(e){function t(){return Pue(this,t),Due(this,t,arguments)}return Lue(t,e),Rue(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,o=this.props,l=o.angle,u=o.cx,d=o.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,o=r.cy,l=r.angle,u=r.ticks,d=Oue(u,function(m){return m.coordinate||0}),f=Aue(u,function(m){return m.coordinate||0});return{cx:a,cy:o,startAngle:l,endAngle:l,innerRadius:f.coordinate||0,outerRadius:d.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,o=r.cy,l=r.angle,u=r.ticks,d=r.axisLine,f=_I(r,Tue),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,o,m[0],l),g=Ft(a,o,m[1],l),x=Is(Is(Is({},Be(f,!1)),{},{fill:"none"},Be(d,!1)),{},{x1:p.x,y1:p.y,x2:g.x,y2:g.y});return W.createElement("line",_f({className:"recharts-polar-radius-axis-line"},x))}},{key:"renderTicks",value:function(){var r=this,a=this.props,o=a.ticks,l=a.tick,u=a.angle,d=a.tickFormatter,f=a.stroke,m=_I(a,kue),p=this.getTickTextAnchor(),g=Be(m,!1),x=Be(l,!1),j=o.map(function(b,w){var N=r.getTickValueCoord(b),O=Is(Is(Is(Is({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,_f({className:Ye("recharts-polar-radius-axis-tick",M6(l)),key:"tick-".concat(b.coordinate)},cl(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,o=r.axisLine,l=r.tick;return!a||!a.length?null:W.createElement(pt,{className:Ye("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),l&&this.renderTicks(),qn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,o){var l;return W.isValidElement(r)?l=W.cloneElement(r,a):We(r)?l=r(a):l=W.createElement(ul,_f({},a,{className:"recharts-polar-radius-axis-tick-value"}),o),l}}])})(y.PureComponent);gy(yy,"displayName","PolarRadiusAxis");gy(yy,"axisType","radiusAxis");gy(yy,"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 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 Fs(){return Fs=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},Fs.apply(this,arguments)}function OI(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 Ls(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OI(Object(n),!0).forEach(function(r){xy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CI(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,V6(r.key),r)}}function que(e,t,n){return t&&CI(e.prototype,t),n&&CI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fue(e,t,n){return t=tg(t),Uue(e,W6()?Reflect.construct(t,n||[],tg(e).constructor):t.apply(e,n))}function Uue(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 Hue(e)}function Hue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W6=function(){return!!e})()}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tg(e)}function Wue(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 xy(e,t,n){return t=V6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V6(e){var t=Vue(e,"string");return hu(t)=="symbol"?t:t+""}function Vue(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 Gue=Math.PI/180,EI=1e-5,by=(function(e){function t(){return zue(this,t),Fue(this,t,arguments)}return Wue(t,e),que(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,o=a.cx,l=a.cy,u=a.radius,d=a.orientation,f=a.tickSize,m=f||8,p=Ft(o,l,u,r.coordinate),g=Ft(o,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,o=Math.cos(-r.coordinate*Gue),l;return o>EI?l=a==="outer"?"start":"end":o<-EI?l=a==="outer"?"end":"start":l="middle",l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,o=r.cy,l=r.radius,u=r.axisLine,d=r.axisLineType,f=Ls(Ls({},Be(this.props,!1)),{},{fill:"none"},Be(u,!1));if(d==="circle")return W.createElement(vy,Fs({className:"recharts-polar-angle-axis-line"},f,{cx:a,cy:o,r:l}));var m=this.props.ticks,p=m.map(function(g){return Ft(a,o,l,g.coordinate)});return W.createElement(mue,Fs({className:"recharts-polar-angle-axis-line"},f,{points:p}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,o=a.ticks,l=a.tick,u=a.tickLine,d=a.tickFormatter,f=a.stroke,m=Be(this.props,!1),p=Be(l,!1),g=Ls(Ls({},m),{},{fill:"none"},Be(u,!1)),x=o.map(function(j,b){var w=r.getTickLineCoord(j),N=r.getTickTextAnchor(j),O=Ls(Ls(Ls({textAnchor:N},m),{},{stroke:"none",fill:f},p),{},{index:b,payload:j,x:w.x2,y:w.y2});return W.createElement(pt,Fs({className:Ye("recharts-polar-angle-axis-tick",M6(l)),key:"tick-".concat(j.coordinate)},cl(r.props,j,b)),u&&W.createElement("line",Fs({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,o=r.radius,l=r.axisLine;return o<=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,o){var l;return W.isValidElement(r)?l=W.cloneElement(r,a):We(r)?l=r(a):l=W.createElement(ul,Fs({},a,{className:"recharts-polar-angle-axis-tick-value"}),o),l}}])})(y.PureComponent);xy(by,"displayName","PolarAngleAxis");xy(by,"axisType","angleAxis");xy(by,"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 yS,AI;function Yue(){if(AI)return yS;AI=1;var e=nz(),t=e(Object.getPrototypeOf,Object);return yS=t,yS}var xS,TI;function Kue(){if(TI)return xS;TI=1;var e=lo(),t=Yue(),n=co(),r="[object Object]",a=Function.prototype,o=Object.prototype,l=a.toString,u=o.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 xS=f,xS}var Xue=Kue();const Zue=St(Xue);var bS,kI;function Que(){if(kI)return bS;kI=1;var e=lo(),t=co(),n="[object Boolean]";function r(a){return a===!0||a===!1||t(a)&&e(a)==n}return bS=r,bS}var Jue=Que();const ede=St(Jue);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 ng(){return ng=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},ng.apply(this,arguments)}function tde(e,t){return ide(e)||ade(e,t)||rde(e,t)||nde()}function nde(){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 rde(e,t){if(e){if(typeof e=="string")return MI(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 MI(e,t)}}function MI(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 ade(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 ide(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 RI(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){ode(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 ode(e,t,n){return t=sde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sde(e){var t=lde(e,"string");return eh(t)=="symbol"?t:t+""}function lde(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)}var DI=function(t,n,r,a,o){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+o),u+="L ".concat(t+r-l/2-a,",").concat(n+o),u+="L ".concat(t,",").concat(n," Z"),u},cde={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ude=function(t){var n=RI(RI({},cde),t),r=y.useRef(),a=y.useState(-1),o=tde(a,2),l=o[0],u=o[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(vi,{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,M=C.y;return W.createElement(vi,{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",ng({},Be(n,!0),{className:O,d:DI(T,M,A,E,k),ref:r})))}):W.createElement("g",null,W.createElement("path",ng({},Be(n,!0),{className:O,d:DI(d,f,m,p,g)})))},dde=["option","shapeType","propTransformer","activeClassName","isActive"];function th(e){"@babel/helpers - typeof";return th=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},th(e)}function fde(e,t){if(e==null)return{};var n=hde(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hde(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 $I(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 rg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$I(Object(n),!0).forEach(function(r){mde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$I(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mde(e,t,n){return t=pde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pde(e){var t=vde(e,"string");return th(t)=="symbol"?t:t+""}function vde(e,t){if(th(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(th(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gde(e,t){return rg(rg({},t),e)}function yde(e,t){return e==="symbols"}function II(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return W.createElement(PC,n);case"trapezoid":return W.createElement(ude,n);case"sector":return W.createElement(D6,n);case"symbols":if(yde(t))return W.createElement(QO,n);break;default:return null}}function xde(e){return y.isValidElement(e)?e.props:e}function G6(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?gde:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,u=e.isActive,d=fde(e,dde),f;if(y.isValidElement(t))f=y.cloneElement(t,rg(rg({},d),xde(t)));else if(We(t))f=t(d);else if(Zue(t)&&!ede(t)){var m=a(t,d);f=W.createElement(II,{shapeType:n,elementProps:m})}else{var p=d;f=W.createElement(II,{shapeType:n,elementProps:p})}return u?W.createElement(pt,{className:l},f):f}function wy(e,t){return t!=null&&"trapezoids"in e.props}function jy(e,t){return t!=null&&"sectors"in e.props}function nh(e,t){return t!=null&&"points"in e.props}function bde(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,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&o}function wde(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function jde(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function Sde(e,t){var n;return wy(e,t)?n=bde:jy(e,t)?n=wde:nh(e,t)&&(n=jde),n}function _de(e,t){var n;return wy(e,t)?n="trapezoids":jy(e,t)?n="sectors":nh(e,t)&&(n="points"),n}function Nde(e,t){if(wy(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(jy(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 nh(e,t)?t.payload:{}}function Ode(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=_de(n,t),o=Nde(n,t),l=r.filter(function(d,f){var m=Rh(o,d),p=n.props[a].filter(function(j){var b=Sde(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 nv;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 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 LI(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?LI(Object(n),!0).forEach(function(r){ja(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BI(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,K6(r.key),r)}}function Ede(e,t,n){return t&&BI(e.prototype,t),n&&BI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ade(e,t,n){return t=ag(t),Tde(e,Y6()?Reflect.construct(t,n||[],ag(e).constructor):t.apply(e,n))}function Tde(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 kde(e)}function kde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Y6=function(){return!!e})()}function ag(e){return ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ag(e)}function Mde(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 ja(e,t,n){return t=K6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K6(e){var t=Pde(e,"string");return mu(t)=="symbol"?t:t+""}function Pde(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 fo=(function(e){function t(n){var r;return Cde(this,t),r=Ade(this,t,[n]),ja(r,"pieRef",null),ja(r,"sectorRefs",[]),ja(r,"id",zu("recharts-pie-")),ja(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),We(a)&&a()}),ja(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 Mde(t,e),Ede(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 o=this.props,l=o.label,u=o.labelLine,d=o.dataKey,f=o.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,kn(b,E)))});return W.createElement(pt,{className:"recharts-pie-labels"},j)}},{key:"renderSectorsStatically",value:function(r){var a=this,o=this.props,l=o.activeShape,u=o.blendStroke,d=o.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,Lc({ref:function(w){w&&!a.sectorRefs.includes(w)&&a.sectorRefs.push(w)},tabIndex:-1,className:"recharts-pie-sector"},cl(a.props,f,m),{key:"sector-".concat(f?.startAngle,"-").concat(f?.endAngle,"-").concat(f.midAngle,"-").concat(m)}),W.createElement(G6,Lc({option:x,isActive:p,shapeType:"sector"},j)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,o=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(vi,{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=o&&o[0],O=N.startAngle;return o.forEach(function(C,A){var E=g&&g[A],k=A>0?ta(C,"paddingAngle",0):0;if(E){var T=Qr(E.endAngle-E.startAngle,C.endAngle-C.startAngle),M=Bt(Bt({},C),{},{startAngle:O+k,endAngle:O+T(b)+k});w.push(M),O=M.endAngle}else{var $=C.endAngle,z=C.startAngle,D=Qr(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(o){if(!o.altKey)switch(o.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,o=r.isAnimationActive,l=this.state.prevSectors;return o&&a&&a.length&&(!l||!Rh(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,o=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(o||!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),qn.renderCallByParent(this.props,null,!1),(!x||j)&&eo.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,o){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(Kv,Lc({},a,{key:o,type:"linear",className:l}))}},{key:"renderLabelItem",value:function(r,a,o){if(W.isValidElement(r))return W.cloneElement(r,a);var l=o;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(ul,Lc({},a,{alignmentBaseline:"middle",className:u}),l)}}])})(y.PureComponent);nv=fo;ja(fo,"displayName","Pie");ja(fo,"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:!bl.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});ja(fo,"parseDeltaAngle",function(e,t){var n=br(t-e),r=Math.min(Math.abs(t-e),360);return n*r});ja(fo,"getRealPieData",function(e){var t=e.data,n=e.children,r=Be(e,!1),a=na(n,ay);return t&&t.length?t.map(function(o,l){return Bt(Bt(Bt({payload:o},r),o),a&&a[l]&&a[l].props)}):a&&a.length?a.map(function(o){return Bt(Bt({},r),o.props)}):[]});ja(fo,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,o=t.height,l=k6(a,o),u=r+wr(e.cx,a,a/2),d=n+wr(e.cy,o,o/2),f=wr(e.innerRadius,l,0),m=wr(e.outerRadius,l,l*.8),p=e.maxRadius||Math.sqrt(a*a+o*o)/2;return{cx:u,cy:d,innerRadius:f,outerRadius:m,maxRadius:p}});ja(fo,"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=nv.getRealPieData(r);if(!a||!a.length)return null;var o=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=nv.parseCoordinateOfPie(r,n),b=nv.parseDeltaAngle(l,u),w=Math.abs(b),N=f;Ge(f)&&Ge(p)?(qa(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),N="value"):Ge(f)&&(qa(!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(M){return kn(M,N,0)!==0}).length,C=(w>=360?O:O-1)*d,A=w-O*x-C,E=a.reduce(function(M,$){var z=kn($,N,0);return M+(Oe(z)?z:0)},0),k;if(E>0){var T;k=a.map(function(M,$){var z=kn(M,N,0),D=kn(M,m,$),U=(Oe(z)?z:0)/E,V;$?V=T.endAngle+br(b)*d*(z!==0?1:0):V=l;var H=V+br(b)*((z!==0?x:0)+U*A),G=(V+H)/2,L=(j.innerRadius+j.outerRadius)/2,R=[{name:D,value:z,payload:M,dataKey:N,type:g}],F=Ft(j.cx,j.cy,L,G);return T=Bt(Bt(Bt({percent:U,cornerRadius:o,name:D,tooltipPayload:R,midAngle:G,middleRadius:L,tooltipPosition:F},M),j),{},{value:kn(M,N),startAngle:V,endAngle:H,payload:M,paddingAngle:br(b)*d}),T})}return Bt(Bt({},j),{},{sectors:k,data:a})});var wS,zI;function Rde(){if(zI)return wS;zI=1;var e=Math.ceil,t=Math.max;function n(r,a,o,l){for(var u=-1,d=t(e((a-r)/(o||1)),0),f=Array(d);d--;)f[l?d:++u]=r,r+=o;return f}return wS=n,wS}var jS,qI;function X6(){if(qI)return jS;qI=1;var e=yz(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var o=a<0?-1:1;return o*n}return a===a?a:0}return jS=r,jS}var SS,FI;function Dde(){if(FI)return SS;FI=1;var e=Rde(),t=ry(),n=X6();function r(a){return function(o,l,u){return u&&typeof u!="number"&&t(o,l,u)&&(l=u=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),u=u===void 0?o<l?1:-1:n(u),e(o,l,u,a)}}return SS=r,SS}var _S,UI;function $de(){if(UI)return _S;UI=1;var e=Dde(),t=e();return _S=t,_S}var Ide=$de();const ig=St(Ide);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 HI(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 WI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HI(Object(n),!0).forEach(function(r){Z6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z6(e,t,n){return t=Lde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lde(e){var t=Bde(e,"string");return rh(t)=="symbol"?t:t+""}function Bde(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)}var zde=["Webkit","Moz","O","ms"],qde=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),a=zde.reduce(function(o,l){return WI(WI({},o),{},Z6({},l+r,n))},{});return a[t]=n,a};function pu(e){"@babel/helpers - typeof";return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}function og(){return og=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},og.apply(this,arguments)}function VI(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 NS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VI(Object(n),!0).forEach(function(r){Yr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GI(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,J6(r.key),r)}}function Ude(e,t,n){return t&&GI(e.prototype,t),n&&GI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hde(e,t,n){return t=sg(t),Wde(e,Q6()?Reflect.construct(t,n||[],sg(e).constructor):t.apply(e,n))}function Wde(e,t){if(t&&(pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vde(e)}function Vde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q6=function(){return!!e})()}function sg(e){return sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sg(e)}function Gde(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&&xN(e,t)}function xN(e,t){return xN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},xN(e,t)}function Yr(e,t,n){return t=J6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J6(e){var t=Yde(e,"string");return pu(t)=="symbol"?t:t+""}function Yde(e,t){if(pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Kde=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,o=t.x,l=t.width,u=t.travellerWidth;if(!n||!n.length)return{};var d=n.length,f=bf().domain(ig(0,d)).range([o,o+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}},YI=function(t){return t.changedTouches&&!!t.changedTouches.length},vu=(function(e){function t(n){var r;return Fde(this,t),r=Hde(this,t,[n]),Yr(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),Yr(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),Yr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,o=a.endIndex,l=a.onDragEnd,u=a.startIndex;l?.({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),Yr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Yr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Yr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Yr(r,"handleSlideDragStart",function(a){var o=YI(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Gde(t,e),Ude(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,o=r.endX,l=this.state.scaleValues,u=this.props,d=u.gap,f=u.data,m=f.length-1,p=Math.min(a,o),g=Math.max(a,o),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,o=a.data,l=a.tickFormatter,u=a.dataKey,d=kn(o[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,o=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-o;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 o=YI(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,o=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-o;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 M=w.length-1;return l==="startX"&&(u>d?A%b===0:E%b===0)||u<d&&E===M||l==="endX"&&(u>d?E%b===0:A%b===0)||u>d&&E===M};this.setState(Yr(Yr({},l,f+O),"brushMoveStartX",r.pageX),function(){j&&k()&&j(C)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var o=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(Yr({},a,x),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,o=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:o,width:l,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,o=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:o,width:l,height:u,margin:m,compact:!0,data:d}):null}},{key:"renderTravellerLayer",value:function(r,a){var o,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=NS(NS({},Be(this.props,!1)),{},{x:N,y:f,width:m,height:p}),C=x||"Min value: ".concat((o=j[b])===null||o===void 0?void 0:o.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 o=this.props,l=o.y,u=o.height,d=o.stroke,f=o.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,o=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(ul,og({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,g)-x,y:l+u/2},j),this.getTextOfTick(a)),W.createElement(ul,og({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,g)+d+x,y:l+u/2},j),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,a=r.data,o=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",o),A=W.Children.count(l)===1,E=qde("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,o=r.y,l=r.width,u=r.height,d=r.stroke,f=Math.floor(o+u/2)-1;return W.createElement(W.Fragment,null,W.createElement("rect",{x:a,y:o,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 o;return W.isValidElement(r)?o=W.cloneElement(r,a):We(r)?o=r(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(r,a){var o=r.data,l=r.width,u=r.x,d=r.travellerWidth,f=r.updateId,m=r.startIndex,p=r.endIndex;if(o!==a.prevData||f!==a.prevUpdateId)return NS({prevData:o,prevTravellerWidth:d,prevUpdateId:f,prevX:u,prevWidth:l},o&&o.length?Kde({data:o,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:o,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 o=r.length,l=0,u=o-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);Yr(vu,"displayName","Brush");Yr(vu,"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 OS,KI;function Xde(){if(KI)return OS;KI=1;var e=iC();function t(n,r){var a;return e(n,function(o,l,u){return a=r(o,l,u),!a}),!!a}return OS=t,OS}var CS,XI;function Zde(){if(XI)return CS;XI=1;var e=KB(),t=bi(),n=Xde(),r=Lr(),a=ry();function o(l,u,d){var f=r(l)?e:n;return d&&a(l,u,d)&&(u=void 0),f(l,t(u,3))}return CS=o,CS}var Qde=Zde();const Jde=St(Qde);var fi=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},ES,ZI;function efe(){if(ZI)return ES;ZI=1;var e=hz();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return ES=t,ES}var AS,QI;function tfe(){if(QI)return AS;QI=1;var e=efe(),t=dz(),n=bi();function r(a,o){var l={};return o=n(o,3),t(a,function(u,d,f){e(l,d,o(u,d,f))}),l}return AS=r,AS}var nfe=tfe();const rfe=St(nfe);var TS,JI;function afe(){if(JI)return TS;JI=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 TS=e,TS}var kS,e3;function ife(){if(e3)return kS;e3=1;var e=iC();function t(n,r){var a=!0;return e(n,function(o,l,u){return a=!!r(o,l,u),a}),a}return kS=t,kS}var MS,t3;function ofe(){if(t3)return MS;t3=1;var e=afe(),t=ife(),n=bi(),r=Lr(),a=ry();function o(l,u,d){var f=r(l)?e:t;return d&&a(l,u,d)&&(u=void 0),f(l,n(u,3))}return MS=o,MS}var sfe=ofe();const eq=St(sfe);var lfe=["x","y"];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 bN(){return bN=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},bN.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 rf(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){cfe(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 cfe(e,t,n){return t=ufe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ufe(e){var t=dfe(e,"string");return ah(t)=="symbol"?t:t+""}function dfe(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)}function ffe(e,t){if(e==null)return{};var n=hfe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hfe(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 mfe(e,t){var n=e.x,r=e.y,a=ffe(e,lfe),o="".concat(n),l=parseInt(o,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 rf(rf(rf(rf(rf({},t),a),l?{x:l}:{}),d?{y:d}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function r3(e){return W.createElement(G6,bN({shapeType:"rectangle",propTransformer:mfe,activeClassName:"recharts-active-bar"},e))}var pfe=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 o=Oe(r)||LQ(r);return o?t(r,a):(o||ur(!1),n)}},vfe=["value","background"],tq;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 gfe(e,t){if(e==null)return{};var n=yfe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yfe(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 lg(){return lg=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},lg.apply(this,arguments)}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 pn(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){Ho(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 xfe(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 bfe(e,t,n){return t&&i3(e.prototype,t),n&&i3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wfe(e,t,n){return t=cg(t),jfe(e,nq()?Reflect.construct(t,n||[],cg(e).constructor):t.apply(e,n))}function jfe(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 Sfe(e)}function Sfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nq=function(){return!!e})()}function cg(e){return cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cg(e)}function _fe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&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 Ho(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=Nfe(e,"string");return gu(t)=="symbol"?t:t+""}function Nfe(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)}var si=(function(e){function t(){var n;xfe(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=wfe(this,t,[].concat(a)),Ho(n,"state",{isAnimationFinished:!1}),Ho(n,"id",zu("recharts-bar-")),Ho(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Ho(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return _fe(t,e),bfe(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,o=this.props,l=o.shape,u=o.dataKey,d=o.activeIndex,f=o.activeBar,m=Be(this.props,!1);return r&&r.map(function(p,g){var x=g===d,j=x?f:l,b=pn(pn(pn({},m),p),{},{isActive:x,option:j,index:g,dataKey:u,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return W.createElement(pt,lg({className:"recharts-bar-rectangle"},cl(a.props,p,g),{key:"rectangle-".concat(p?.x,"-").concat(p?.y,"-").concat(p?.value,"-").concat(g)}),W.createElement(r3,b))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,o=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(vi,{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=o.map(function(w,N){var O=g&&g[N];if(O){var C=Qr(O.x,w.x),A=Qr(O.y,w.y),E=Qr(O.width,w.width),k=Qr(O.height,w.height);return pn(pn({},w),{},{x:C(j),y:A(j),width:E(j),height:k(j)})}if(l==="horizontal"){var T=Qr(0,w.height),M=T(j);return pn(pn({},w),{},{y:w.y+w.height-M,height:M})}var $=Qr(0,w.width),z=$(j);return pn(pn({},w),{},{width:z})});return W.createElement(pt,null,r.renderRectanglesStatically(b))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&a&&a.length&&(!l||!Rh(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,o=a.data,l=a.dataKey,u=a.activeIndex,d=Be(this.props.background,!1);return o.map(function(f,m){f.value;var p=f.background,g=gfe(f,vfe);if(!p)return null;var x=pn(pn(pn(pn(pn({},g),{},{fill:"#eee"},p),d),cl(r.props,f,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return W.createElement(r3,lg({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 o=this.props,l=o.data,u=o.xAxis,d=o.yAxis,f=o.layout,m=o.children,p=na(m,Dh);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:kn(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,o=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||!o||!o.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)&&eo.renderCallByParent(this.props,o))}}],[{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);tq=si;Ho(si,"displayName","Bar");Ho(si,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!bl.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ho(si,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,o=e.xAxis,l=e.yAxis,u=e.xAxisTicks,d=e.yAxisTicks,f=e.stackedData,m=e.dataStartIndex,p=e.displayedData,g=e.offset,x=Joe(r,n);if(!x)return null;var j=t.layout,b=n.type.defaultProps,w=b!==void 0?pn(pn({},b),n.props):n.props,N=w.dataKey,O=w.children,C=w.minPointSize,A=j==="horizontal"?l:o,E=f?A.scale.domain():null,k=ose({numericAxis:A}),T=na(O,ay),M=p.map(function($,z){var D,U,V,H,G,L;f?D=ese(f[m+z],E):(D=kn($,N),Array.isArray(D)||(D=[k,D]));var R=pfe(C,tq.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=T$({axis:o,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=br(G||R)*(Math.abs(R)-Math.abs(G));V-=Y,G+=Y}}else{var ne=[o.scale(D[0]),o.scale(D[1])],oe=ne[0],xe=ne[1];if(U=oe,V=T$({axis:l,ticks:d,bandSize:a,offset:x.offset,entry:$,index:z}),H=xe-oe,G=x.size,L={x:o.x,y:V,width:o.width,height:G},Math.abs(R)>0&&Math.abs(H)<Math.abs(R)){var ee=br(H||R)*(Math.abs(R)-Math.abs(H));H+=ee}}return pn(pn(pn({},$),{},{x:U,y:V,width:H,height:G,value:f?D:D[1],payload:$,background:L},T&&T[z]&&T[z].props),{},{tooltipPayload:[A6(n,$)],tooltipPosition:{x:U+H/2,y:V+G/2}})});return pn({data:M,layout:j},g)});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 Ofe(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,aq(r.key),r)}}function Cfe(e,t,n){return t&&o3(e.prototype,t),n&&o3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s3(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 Ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s3(Object(n),!0).forEach(function(r){Sy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sy(e,t,n){return t=aq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aq(e){var t=Efe(e,"string");return ih(t)=="symbol"?t:t+""}function Efe(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)}var iq=function(t,n,r,a,o){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=!!Kr(f,si);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,M,$,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(qQ);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=wr(t.barCategoryGap,G*L),F=G*L/2;T=F-R-(F-R)/L*R}}}a==="xAxis"?M=[r.left+(C.left||0)+(T||0),r.left+r.width-(C.right||0)-(T||0)]:a==="yAxis"?M=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)]:M=b.range,E&&(M=[M[1],M[0]]);var K=N6(b,o,g),te=K.scale,I=K.realScaleType;te.domain(N).range(M),O6(te);var B=C6(te,Ia(Ia({},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=Ia(Ia(Ia({},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=Vv(Y,B),!b.hide&&a==="xAxis"?p[k]+=(D?-1:1)*Y.height:b.hide||(p[k]+=(D?-1:1)*Y.width),Ia(Ia({},x),{},Sy({},j,Y))},{})},oq=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(a,l),width:Math.abs(o-r),height:Math.abs(l-a)}},Afe=function(t){var n=t.x1,r=t.y1,a=t.x2,o=t.y2;return oq({x:n,y:r},{x:a,y:o})},sq=(function(){function e(t){Ofe(this,e),this.scale=t}return Cfe(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,o=r.position;if(n!==void 0){if(o)switch(o){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],o=r[r.length-1];return a<=o?n>=a&&n<=o:n>=o&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])})();Sy(sq,"EPS",1e-4);var RC=function(t){var n=Object.keys(t).reduce(function(r,a){return Ia(Ia({},r),{},Sy({},a,sq.create(t[a])))},{});return Ia(Ia({},n),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,u=o.position;return rfe(a,function(d,f){return n[f].apply(d,{bandAware:l,position:u})})},isInRange:function(a){return eq(a,function(o,l){return n[l].isInRange(o)})}})};function Tfe(e){return(e%180+180)%180}var kfe=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Tfe(a),l=o*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,l3;function Mfe(){if(l3)return PS;l3=1;var e=bi(),t=Ah(),n=ty();function r(a){return function(o,l,u){var d=Object(o);if(!t(o)){var f=e(l,3);o=n(o),l=function(p){return f(d[p],p,d)}}var m=a(o,l,u);return m>-1?d[f?o[m]:m]:void 0}}return PS=r,PS}var RS,c3;function Pfe(){if(c3)return RS;c3=1;var e=X6();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return RS=t,RS}var DS,u3;function Rfe(){if(u3)return DS;u3=1;var e=oz(),t=bi(),n=Pfe(),r=Math.max;function a(o,l,u){var d=o==null?0:o.length;if(!d)return-1;var f=u==null?0:n(u);return f<0&&(f=r(d+f,0)),e(o,t(l,3),f)}return DS=a,DS}var $S,d3;function Dfe(){if(d3)return $S;d3=1;var e=Mfe(),t=Rfe(),n=e(t);return $S=n,$S}var $fe=Dfe();const Ife=St($fe);var Lfe=jB();const Bfe=St(Lfe);var zfe=Bfe(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("")}),DC=y.createContext(void 0),$C=y.createContext(void 0),lq=y.createContext(void 0),cq=y.createContext({}),uq=y.createContext(void 0),dq=y.createContext(0),fq=y.createContext(0),f3=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,o=n.offset,l=t.clipPathId,u=t.children,d=t.width,f=t.height,m=zfe(o);return W.createElement(DC.Provider,{value:r},W.createElement($C.Provider,{value:a},W.createElement(cq.Provider,{value:o},W.createElement(lq.Provider,{value:m},W.createElement(uq.Provider,{value:l},W.createElement(dq.Provider,{value:f},W.createElement(fq.Provider,{value:d},u)))))))},qfe=function(){return y.useContext(uq)},hq=function(t){var n=y.useContext(DC);n==null&&ur(!1);var r=n[t];return r==null&&ur(!1),r},Ffe=function(){var t=y.useContext(DC);return Fo(t)},Ufe=function(){var t=y.useContext($C),n=Ife(t,function(r){return eq(r.domain,Number.isFinite)});return n||Fo(t)},mq=function(t){var n=y.useContext($C);n==null&&ur(!1);var r=n[t];return r==null&&ur(!1),r},Hfe=function(){var t=y.useContext(lq);return t},Wfe=function(){return y.useContext(cq)},IC=function(){return y.useContext(fq)},LC=function(){return y.useContext(dq)};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 Vfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gfe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vq(r.key),r)}}function Yfe(e,t,n){return t&&Gfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kfe(e,t,n){return t=ug(t),Xfe(e,pq()?Reflect.construct(t,n||[],ug(e).constructor):t.apply(e,n))}function Xfe(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 Zfe(e)}function Zfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pq=function(){return!!e})()}function ug(e){return ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ug(e)}function Qfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jN(e,t)}function jN(e,t){return jN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},jN(e,t)}function h3(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 m3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h3(Object(n),!0).forEach(function(r){BC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BC(e,t,n){return t=vq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vq(e){var t=Jfe(e,"string");return yu(t)=="symbol"?t:t+""}function Jfe(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)}function ehe(e,t){return ahe(e)||rhe(e,t)||nhe(e,t)||the()}function the(){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 nhe(e,t){if(e){if(typeof e=="string")return p3(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 p3(e,t)}}function p3(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 rhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 ahe(e){if(Array.isArray(e))return e}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)}var ihe=function(t,n){var r;return W.isValidElement(t)?r=W.cloneElement(t,n):We(t)?r=t(n):r=W.createElement("line",SN({},n,{className:"recharts-reference-line-line"})),r},ohe=function(t,n,r,a,o,l,u,d,f){var m=o.x,p=o.y,g=o.width,x=o.height;if(r){var j=f.y,b=t.y.apply(j,{position:l});if(fi(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(fi(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 fi(f,"discard")&&Jde(E,function(k){return!t.isInRange(k)})?null:E}return null};function she(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,o=e.yAxisId,l=e.shape,u=e.className,d=e.alwaysShow,f=qfe(),m=hq(a),p=mq(o),g=Hfe();if(!f||!g)return null;qa(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=RC({x:m.scale,y:p.scale}),j=Mn(t),b=Mn(n),w=r&&r.length===2,N=ohe(x,j,b,w,g,e.position,m.orientation,p.orientation,e);if(!N)return null;var O=ehe(N,2),C=O[0],A=C.x,E=C.y,k=O[1],T=k.x,M=k.y,$=fi(e,"hidden")?"url(#".concat(f,")"):void 0,z=m3(m3({clipPath:$},Be(e,!0)),{},{x1:A,y1:E,x2:T,y2:M});return W.createElement(pt,{className:Ye("recharts-reference-line",u)},ihe(l,z),qn.renderCallByParent(e,Afe({x1:A,y1:E,x2:T,y2:M})))}var zC=(function(e){function t(){return Vfe(this,t),Kfe(this,t,arguments)}return Qfe(t,e),Yfe(t,[{key:"render",value:function(){return W.createElement(she,this.props)}}])})(W.Component);BC(zC,"displayName","ReferenceLine");BC(zC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function _N(){return _N=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},_N.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 v3(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 g3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v3(Object(n),!0).forEach(function(r){_y(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function che(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,yq(r.key),r)}}function uhe(e,t,n){return t&&che(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dhe(e,t,n){return t=dg(t),fhe(e,gq()?Reflect.construct(t,n||[],dg(e).constructor):t.apply(e,n))}function fhe(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 hhe(e)}function hhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gq=function(){return!!e})()}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dg(e)}function mhe(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&&NN(e,t)}function NN(e,t){return NN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},NN(e,t)}function _y(e,t,n){return t=yq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yq(e){var t=phe(e,"string");return xu(t)=="symbol"?t:t+""}function phe(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 vhe=function(t){var n=t.x,r=t.y,a=t.xAxis,o=t.yAxis,l=RC({x:a.scale,y:o.scale}),u=l.apply({x:n,y:r},{bandAware:!0});return fi(t,"discard")&&!l.isInRange(u)?null:u},Ny=(function(e){function t(){return lhe(this,t),dhe(this,t,arguments)}return mhe(t,e),uhe(t,[{key:"render",value:function(){var r=this.props,a=r.x,o=r.y,l=r.r,u=r.alwaysShow,d=r.clipPathId,f=Mn(a),m=Mn(o);if(qa(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!m)return null;var p=vhe(this.props);if(!p)return null;var g=p.x,x=p.y,j=this.props,b=j.shape,w=j.className,N=fi(this.props,"hidden")?"url(#".concat(d,")"):void 0,O=g3(g3({clipPath:N},Be(this.props,!0)),{},{cx:g,cy:x});return W.createElement(pt,{className:Ye("recharts-reference-dot",w)},t.renderDot(b,O),qn.renderCallByParent(this.props,{x:g-l,y:x-l,width:2*l,height:2*l}))}}])})(W.Component);_y(Ny,"displayName","ReferenceDot");_y(Ny,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});_y(Ny,"renderDot",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):We(e)?n=e(t):n=W.createElement(vy,_N({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function ON(){return ON=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},ON.apply(this,arguments)}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 y3(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 x3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y3(Object(n),!0).forEach(function(r){Oy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ghe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yhe(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,bq(r.key),r)}}function xhe(e,t,n){return t&&yhe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bhe(e,t,n){return t=fg(t),whe(e,xq()?Reflect.construct(t,n||[],fg(e).constructor):t.apply(e,n))}function whe(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 jhe(e)}function jhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xq=function(){return!!e})()}function fg(e){return fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fg(e)}function She(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 Oy(e,t,n){return t=bq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bq(e){var t=_he(e,"string");return bu(t)=="symbol"?t:t+""}function _he(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 Nhe=function(t,n,r,a,o){var l=o.x1,u=o.x2,d=o.y1,f=o.y2,m=o.xAxis,p=o.yAxis;if(!m||!p)return null;var g=RC({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 fi(o,"discard")&&(!g.isInRange(x)||!g.isInRange(j))?null:oq(x,j)},Cy=(function(e){function t(){return ghe(this,t),bhe(this,t,arguments)}return She(t,e),xhe(t,[{key:"render",value:function(){var r=this.props,a=r.x1,o=r.x2,l=r.y1,u=r.y2,d=r.className,f=r.alwaysShow,m=r.clipPathId;qa(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Mn(a),g=Mn(o),x=Mn(l),j=Mn(u),b=this.props.shape;if(!p&&!g&&!x&&!j&&!b)return null;var w=Nhe(p,g,x,j,this.props);if(!w&&!b)return null;var N=fi(this.props,"hidden")?"url(#".concat(m,")"):void 0;return W.createElement(pt,{className:Ye("recharts-reference-area",d)},t.renderRect(b,x3(x3({clipPath:N},Be(this.props,!0)),w)),qn.renderCallByParent(this.props,w))}}])})(W.Component);Oy(Cy,"displayName","ReferenceArea");Oy(Cy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Oy(Cy,"renderRect",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):We(e)?n=e(t):n=W.createElement(PC,ON({},t,{className:"recharts-reference-area-rect"})),n});function wq(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 Ohe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return kfe(r,n)}function Che(e,t,n){var r=n==="width",a=e.x,o=e.y,l=e.width,u=e.height;return t===1?{start:r?a:o,end:r?a+l:o+u}:{start:r?a+l:o+u,end:r?a:o}}function hg(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-a)<=0}function Ehe(e,t){return wq(e,t+1)}function Ahe(e,t,n,r,a){for(var o=(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:wq(r,f)};var b=d,w,N=function(){return w===void 0&&(w=n(j,b)),w},O=j.coordinate,C=d===0||hg(e,O,N,m,u);C||(d=0,m=l,f+=1),C&&(m=O+e*(N()/2+a),d+=f)},g;f<=o.length;)if(g=p(),g)return g.v;return[]}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 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 or(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){The(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 The(e,t,n){return t=khe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function khe(e){var t=Mhe(e,"string");return oh(t)=="symbol"?t:t+""}function Mhe(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(t==="string"?String:Number)(e)}function Phe(e,t,n,r,a){for(var o=(r||[]).slice(),l=o.length,u=t.start,d=t.end,f=function(g){var x=o[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);o[g]=x=or(or({},x),{},{tickCoord:w>0?x.coordinate-w*e:x.coordinate})}else o[g]=x=or(or({},x),{},{tickCoord:x.coordinate});var N=hg(e,x.tickCoord,b,u,d);N&&(d=x.tickCoord-e*(b()/2+a),o[g]=or(or({},x),{},{isShow:!0}))},m=l-1;m>=0;m--)f(m);return o}function Rhe(e,t,n,r,a,o){var l=(r||[]).slice(),u=l.length,d=t.start,f=t.end;if(o){var m=r[u-1],p=n(m,u-1),g=e*(m.coordinate+e*p/2-f);l[u-1]=m=or(or({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var x=hg(e,m.tickCoord,function(){return p},d,f);x&&(f=m.tickCoord-e*(p/2+a),l[u-1]=or(or({},m),{},{isShow:!0}))}for(var j=o?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=or(or({},C),{},{tickCoord:k<0?C.coordinate-k*e:C.coordinate})}else l[O]=C=or(or({},C),{},{tickCoord:C.coordinate});var T=hg(e,C.tickCoord,E,d,f);T&&(d=C.tickCoord+e*(E()/2+a),l[O]=or(or({},C),{},{isShow:!0}))},w=0;w<j;w++)b(w);return l}function qC(e,t,n){var r=e.tick,a=e.ticks,o=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)||bl.isSsr)return Ehe(a,typeof d=="number"&&Oe(d)?d:0);var g=[],x=u==="top"||u==="bottom"?"width":"height",j=m&&x==="width"?xf(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"?Ohe(xf(E,{fontSize:t,letterSpacing:n}),j,p):xf(E,{fontSize:t,letterSpacing:n})[x]},w=a.length>=2?br(a[1].coordinate-a[0].coordinate):1,N=Che(o,w,x);return d==="equidistantPreserveStart"?Ahe(w,N,b,a,l):(d==="preserveStart"||d==="preserveStartEnd"?g=Rhe(w,N,b,a,l,d==="preserveStartEnd"):g=Phe(w,N,b,a,l),g.filter(function(O){return O.isShow}))}var Dhe=["viewBox"],$he=["viewBox"],Ihe=["ticks"];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 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 w3(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?w3(Object(n),!0).forEach(function(r){FC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IS(e,t){if(e==null)return{};var n=Lhe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lhe(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 Bhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j3(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,Sq(r.key),r)}}function zhe(e,t,n){return t&&j3(e.prototype,t),n&&j3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qhe(e,t,n){return t=mg(t),Fhe(e,jq()?Reflect.construct(t,n||[],mg(e).constructor):t.apply(e,n))}function Fhe(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 Uhe(e)}function Uhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jq=function(){return!!e})()}function mg(e){return mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mg(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&&EN(e,t)}function EN(e,t){return EN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},EN(e,t)}function FC(e,t,n){return t=Sq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sq(e){var t=Whe(e,"string");return wu(t)=="symbol"?t:t+""}function Whe(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 Wu=(function(e){function t(n){var r;return Bhe(this,t),r=qhe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Hhe(t,e),zhe(t,[{key:"shouldComponentUpdate",value:function(r,a){var o=r.viewBox,l=IS(r,Dhe),u=this.props,d=u.viewBox,f=IS(u,$he);return!qc(o,d)||!qc(l,f)||!qc(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,o=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=o+ +!p*u,x=j-C*A,N=x-C*g,O=E;break;case"right":b=w=r.coordinate,j=o+ +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,o=r.mirror,l;switch(a){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,o=r.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,u=r.height,d=r.orientation,f=r.mirror,m=r.axisLine,p=An(An(An({},Be(this.props,!1)),Be(m,!1)),{},{fill:"none"});if(d==="top"||d==="bottom"){var g=+(d==="top"&&!f||d==="bottom"&&f);p=An(An({},p),{},{x1:a,y1:o+g*u,x2:a+l,y2:o+g*u})}else{var x=+(d==="left"&&!f||d==="right"&&f);p=An(An({},p),{},{x1:a+x*l,y1:o,x2:a+x*l,y2:o+u})}return W.createElement("line",Bc({},p,{className:Ye("recharts-cartesian-axis-line",ta(m,"className"))}))}},{key:"renderTicks",value:function(r,a,o){var l=this,u=this.props,d=u.tickLine,f=u.stroke,m=u.tick,p=u.tickFormatter,g=u.unit,x=qC(An(An({},this.props),{},{ticks:r}),a,o),j=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),w=Be(this.props,!1),N=Be(m,!1),O=An(An({},w),{},{fill:"none"},Be(d,!1)),C=x.map(function(A,E){var k=l.getTickLineCoord(A),T=k.line,M=k.tick,$=An(An(An(An({textAnchor:j,verticalAnchor:b},w),{},{stroke:"none",fill:f},N),M),{},{index:E,payload:A,visibleTicksCount:x.length,tickFormatter:p});return W.createElement(pt,Bc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},cl(l.props,A,E)),d&&W.createElement("line",Bc({},O,T,{className:Ye("recharts-cartesian-axis-tick-line",ta(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,o=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=IS(p,Ihe),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}},o&&this.renderAxisLine(),this.renderTicks(j,this.state.fontSize,this.state.letterSpacing),qn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,o){var l,u=Ye(a.className,"recharts-cartesian-axis-tick-value");return W.isValidElement(r)?l=W.cloneElement(r,An(An({},a),{},{className:u})):We(r)?l=r(An(An({},a),{},{className:u})):l=W.createElement(ul,Bc({},a,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(y.Component);FC(Wu,"displayName","CartesianAxis");FC(Wu,"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 Vhe=["x1","y1","x2","y2","key"],Ghe=["offset"];function fl(e){"@babel/helpers - typeof";return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fl(e)}function S3(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?S3(Object(n),!0).forEach(function(r){Yhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yhe(e,t,n){return t=Khe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Khe(e){var t=Xhe(e,"string");return fl(t)=="symbol"?t:t+""}function Xhe(e,t){if(fl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gs(){return Gs=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},Gs.apply(this,arguments)}function _3(e,t){if(e==null)return{};var n=Zhe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zhe(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 Qhe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,o=t.y,l=t.width,u=t.height,d=t.ry;return W.createElement("rect",{x:a,y:o,ry:d,width:l,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function _q(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,o=t.x2,l=t.y2,u=t.key,d=_3(t,Vhe),f=Be(d,!1);f.offset;var m=_3(f,Ghe);n=W.createElement("line",Gs({},m,{x1:r,y1:a,x2:o,y2:l,fill:"none",key:u}))}return n}function Jhe(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,o=e.horizontalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(u,d){var f=lr(lr({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(d),index:d});return _q(a,f)});return W.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function eme(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,o=e.verticalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(u,d){var f=lr(lr({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(d),index:d});return _q(a,f)});return W.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function tme(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,o=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:o,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function nme(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,o=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+o-o)}).sort(function(g,x){return g-x});o!==m[0]&&m.unshift(0);var p=m.map(function(g,x){var j=!m[x+1],b=j?o+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 rme=function(t,n){var r=t.xAxis,a=t.width,o=t.height,l=t.offset;return _6(qC(lr(lr(lr({},Wu.defaultProps),r),{},{ticks:Yi(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.left,l.left+l.width,n)},ame=function(t,n){var r=t.yAxis,a=t.width,o=t.height,l=t.offset;return _6(qC(lr(lr(lr({},Wu.defaultProps),r),{},{ticks:Yi(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.top,l.top+l.height,n)},jc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function df(e){var t,n,r,a,o,l,u=IC(),d=LC(),f=Wfe(),m=lr(lr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:jc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:jc.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:jc.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:jc.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:jc.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:jc.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=Ffe(),C=Ufe();if(!Oe(x)||x<=0||!Oe(j)||j<=0||!Oe(p)||p!==+p||!Oe(g)||g!==+g)return null;var A=m.verticalCoordinatesGenerator||rme,E=m.horizontalCoordinatesGenerator||ame,k=m.horizontalPoints,T=m.verticalPoints;if((!k||!k.length)&&We(E)){var M=w&&w.length,$=E({yAxis:C?lr(lr({},C),{},{ticks:M?w:C.ticks}):void 0,width:u,height:d,offset:f},M?!0:b);qa(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(fl($),"]")),Array.isArray($)&&(k=$)}if((!T||!T.length)&&We(A)){var z=N&&N.length,D=A({xAxis:O?lr(lr({},O),{},{ticks:z?N:O.ticks}):void 0,width:u,height:d,offset:f},z?!0:b);qa(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(fl(D),"]")),Array.isArray(D)&&(T=D)}return W.createElement("g",{className:"recharts-cartesian-grid"},W.createElement(Qhe,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),W.createElement(Jhe,Gs({},m,{offset:f,horizontalPoints:k,xAxis:O,yAxis:C})),W.createElement(eme,Gs({},m,{offset:f,verticalPoints:T,xAxis:O,yAxis:C})),W.createElement(tme,Gs({},m,{horizontalPoints:k})),W.createElement(nme,Gs({},m,{verticalPoints:T})))}df.displayName="CartesianGrid";var ime=["type","layout","connectNulls","ref"],ome=["key"];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 N3(e,t){if(e==null)return{};var n=sme(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nf(){return Nf=Object.assign?Object.assign.bind():function(e){for(var t=1;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},Nf.apply(this,arguments)}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 Gr(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){La(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 Sc(e){return dme(e)||ume(e)||cme(e)||lme()}function lme(){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 cme(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 ume(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dme(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}function fme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C3(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,Oq(r.key),r)}}function hme(e,t,n){return t&&C3(e.prototype,t),n&&C3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mme(e,t,n){return t=pg(t),pme(e,Nq()?Reflect.construct(t,n||[],pg(e).constructor):t.apply(e,n))}function pme(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 vme(e)}function vme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nq=function(){return!!e})()}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pg(e)}function gme(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 La(e,t,n){return t=Oq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oq(e){var t=yme(e,"string");return ju(t)=="symbol"?t:t+""}function yme(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)}var $h=(function(e){function t(){var n;fme(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=mme(this,t,[].concat(a)),La(n,"state",{isAnimationFinished:!0,totalLength:0}),La(n,"generateSimpleStrokeDasharray",function(l,u){return"".concat(u,"px ").concat(l-u,"px")}),La(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(Sc(d.slice(0,j)),[p-b]);break}var w=x.length%2===0?[0,g]:[g];return[].concat(Sc(t.repeat(d,m)),Sc(x),w).map(function(N){return"".concat(N,"px")}).join(", ")}),La(n,"id",zu("recharts-line-")),La(n,"pathRef",function(l){n.mainCurve=l}),La(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),La(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return gme(t,e),hme(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 o=this.props,l=o.points,u=o.xAxis,d=o.yAxis,f=o.layout,m=o.children,p=na(m,Dh);if(!p)return null;var g=function(b,w){return{x:b.x,y:b.y,value:b.value,errorVal:kn(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,o){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=Gr(Gr(Gr({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(o,")"):null};return W.createElement(pt,Nf({className:"recharts-line-dots",key:"dots"},j),x)}},{key:"renderCurveStatically",value:function(r,a,o,l){var u=this.props,d=u.type,f=u.layout,m=u.connectNulls;u.ref;var p=N3(u,ime),g=Gr(Gr(Gr({},Be(p,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(o,")"):null,points:r},l),{},{type:d,layout:f,connectNulls:m});return W.createElement(Kv,Nf({},g,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var o=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(vi,{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=Qr(G.x,U.x),R=Qr(G.y,U.y);return Gr(Gr({},U),{},{x:L(E),y:R(E)})}if(j){var F=Qr(b*2,U.x),K=Qr(w/2,U.y);return Gr(Gr({},U),{},{x:F(E),y:K(E)})}return Gr(Gr({},U),{},{x:U.x,y:U.y})});return o.renderCurveStatically(T,r,a)}var M=Qr(0,C),$=M(E),z;if(d){var D="".concat(d).split(/[,\s]+/gim).map(function(U){return parseFloat(U)});z=o.getStrokeDasharray($,C,D)}else z=o.generateSimpleStrokeDasharray(C,$);return o.renderCurveStatically(u,r,a,{strokeDasharray:z})})}},{key:"renderCurve",value:function(r,a){var o=this.props,l=o.points,u=o.isAnimationActive,d=this.state,f=d.prevPoints,m=d.totalLength;return u&&l&&l.length&&(!f&&m>0||!Rh(f,l))?this.renderCurveWithAnimation(r,a):this.renderCurveStatically(l,r,a)}},{key:"render",value:function(){var r,a=this.props,o=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(o||!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,M=(r=Be(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},$=M.r,z=$===void 0?3:$,D=M.strokeWidth,U=D===void 0?2:D,V=XQ(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)&&eo.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 o=r.length%2!==0?[].concat(Sc(r),[0]):r,l=[],u=0;u<a;++u)l=[].concat(Sc(l),Sc(o));return l}},{key:"renderDotItem",value:function(r,a){var o;if(W.isValidElement(r))o=W.cloneElement(r,a);else if(We(r))o=r(a);else{var l=a.key,u=N3(a,ome),d=Ye("recharts-line-dot",typeof r!="boolean"?r.className:"");o=W.createElement(vy,Nf({key:l},u,{className:d}))}return o}}])})(y.PureComponent);La($h,"displayName","Line");La($h,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!bl.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});La($h,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=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=kn(g,l);return m==="horizontal"?{x:A$({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:A$({axis:r,ticks:o,bandSize:u,entry:g,index:x}),value:j,payload:g}});return Gr({points:p,layout:m},f)});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 xme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bme(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,Aq(r.key),r)}}function wme(e,t,n){return t&&bme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jme(e,t,n){return t=vg(t),Sme(e,Cq()?Reflect.construct(t,n||[],vg(e).constructor):t.apply(e,n))}function Sme(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 _me(e)}function _me(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cq=function(){return!!e})()}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vg(e)}function Nme(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&&kN(e,t)}function kN(e,t){return kN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},kN(e,t)}function Eq(e,t,n){return t=Aq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aq(e){var t=Ome(e,"string");return Su(t)=="symbol"?t:t+""}function Ome(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)}function Cme(e){var t=e.xAxisId,n=IC(),r=LC(),a=hq(t);return a==null?null:y.createElement(Wu,MN({},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 Yi(l,!0)}}))}var Wo=(function(e){function t(){return xme(this,t),jme(this,t,arguments)}return Nme(t,e),wme(t,[{key:"render",value:function(){return y.createElement(Cme,this.props)}}])})(y.Component);Eq(Wo,"displayName","XAxis");Eq(Wo,"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 _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 Eme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ame(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,Mq(r.key),r)}}function Tme(e,t,n){return t&&Ame(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kme(e,t,n){return t=gg(t),Mme(e,Tq()?Reflect.construct(t,n||[],gg(e).constructor):t.apply(e,n))}function Mme(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 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 Tq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Tq=function(){return!!e})()}function gg(e){return gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gg(e)}function Rme(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 kq(e,t,n){return t=Mq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mq(e){var t=Dme(e,"string");return _u(t)=="symbol"?t:t+""}function Dme(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 String(e)}function RN(){return RN=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},RN.apply(this,arguments)}var $me=function(t){var n=t.yAxisId,r=IC(),a=LC(),o=mq(n);return o==null?null:y.createElement(Wu,RN({},o,{className:Ye("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(u){return Yi(u,!0)}}))},Wi=(function(e){function t(){return Eme(this,t),kme(this,t,arguments)}return Rme(t,e),Tme(t,[{key:"render",value:function(){return y.createElement($me,this.props)}}])})(y.Component);kq(Wi,"displayName","YAxis");kq(Wi,"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 E3(e){return zme(e)||Bme(e)||Lme(e)||Ime()}function Ime(){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 DN(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 DN(e,t)}}function Bme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zme(e){if(Array.isArray(e))return DN(e)}function DN(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 $N=function(t,n,r,a,o){var l=na(t,zC),u=na(t,Ny),d=[].concat(E3(l),E3(u)),f=na(t,Cy),m="".concat(a,"Id"),p=a[0],g=n;if(d.length&&(g=d.reduce(function(b,w){if(w.props[m]===r&&fi(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&&fi(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 o&&o.length&&(g=o.reduce(function(b,w){return Oe(w)?[Math.min(b[0],w),Math.max(b[1],w)]:b},g)),g},LS={exports:{}},A3;function qme(){return A3||(A3=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 o(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 o(this,f,m,p,!1)},u.prototype.once=function(f,m,p){return o(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})(LS)),LS.exports}var Fme=qme();const Ume=St(Fme);var BS=new Ume,zS="recharts.syncMouseEvents";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 Hme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wme(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 Vme(e,t,n){return t&&Wme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qS(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=Gme(e,"string");return sh(t)=="symbol"?t:t+""}function Gme(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 String(e)}var Yme=(function(){function e(){Hme(this,e),qS(this,"activeIndex",0),qS(this,"coordinateList",[]),qS(this,"layout","horizontal")}return Vme(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,o=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=o??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(),o=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=o+d+f,g=l+this.offset.top+u/2+m;this.mouseHandlerCallback({pageX:p,pageY:g})}}}])})();function Kme(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 Xme(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 Rq(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,o=e.endAngle,l=Ft(t,n,r,a),u=Ft(t,n,r,o);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:a,endAngle:o}}function Zme(e,t,n){var r,a,o,l;if(e==="horizontal")r=t.x,o=r,a=n.top,l=n.top+n.height;else if(e==="vertical")a=t.y,l=a,r=n.left,o=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,o=x.x,l=x.y}else return Rq(t);return[{x:r,y:a},{x:o,y:l}]}function lh(e){"@babel/helpers - typeof";return lh=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},lh(e)}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 Lp(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){Qme(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 Qme(e,t,n){return t=Jme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jme(e){var t=epe(e,"string");return lh(t)=="symbol"?t:t+""}function epe(e,t){if(lh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tpe(e){var t,n,r=e.element,a=e.tooltipEventType,o=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||!o||!l||g!=="ScatterChart"&&a!=="axis")return null;var j,b=Kv;if(g==="ScatterChart")j=l,b=Sue;else if(g==="BarChart")j=Xme(p,l,d,m),b=PC;else if(p==="radial"){var w=Rq(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=D6}else j={points:Zme(p,l,d)},b=Kv;var k=Lp(Lp(Lp(Lp({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 npe=["item"],rpe=["children","className","width","height","style","compact","title","desc"];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 zc(){return zc=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},zc.apply(this,arguments)}function k3(e,t){return ope(e)||ipe(e,t)||$q(e,t)||ape()}function ape(){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 ipe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],d=!0,f=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(d=(r=o.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 ope(e){if(Array.isArray(e))return e}function M3(e,t){if(e==null)return{};var n=spe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function spe(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 lpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cpe(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,Iq(r.key),r)}}function upe(e,t,n){return t&&cpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dpe(e,t,n){return t=yg(t),fpe(e,Dq()?Reflect.construct(t,n||[],yg(e).constructor):t.apply(e,n))}function fpe(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 hpe(e)}function hpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dq=function(){return!!e})()}function yg(e){return yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yg(e)}function mpe(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&&IN(e,t)}function IN(e,t){return IN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},IN(e,t)}function Ou(e){return gpe(e)||vpe(e)||$q(e)||ppe()}function ppe(){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 $q(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 vpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gpe(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 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=Iq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iq(e){var t=ype(e,"string");return Nu(t)=="symbol"?t:t+""}function ype(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xpe={xAxis:["bottom","top"],yAxis:["left","right"]},bpe={width:"100%",height:"100%"},Lq={x:0,y:0};function Bp(e){return e}var wpe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},jpe=function(t,n,r,a){var o=n.find(function(m){return m&&m.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,u=a.radius;return ye(ye(ye({},a),Ft(a.cx,a.cy,u,l)),{},{angle:l,radius:u})}var d=o.coordinate,f=a.angle;return ye(ye(ye({},a),Ft(a.cx,a.cy,d,f)),{},{angle:f,radius:d})}return Lq},Ey=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(u,d){var f=d.props.data;return f&&f.length?[].concat(Ou(u),Ou(f)):u},[]);return l.length>0?l:t&&t.length&&Oe(a)&&Oe(o)?t.slice(a,o+1):[]};function Bq(e){return e==="number"?[0,"auto"]:void 0}var BN=function(t,n,r,a){var o=t.graphicalItems,l=t.tooltipAxis,u=Ey(n,t);return r<0||!o||!o.length||r>=u.length?null:o.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=wv(x,l.dataKey,a)}else g=p&&p[r]||u[r];return g?[].concat(Ou(d),[A6(f,g)]):d},[])},R3=function(t,n,r,a){var o=a||{x:t.chartX,y:t.chartY},l=wpe(o,r),u=t.orderedTooltipTicks,d=t.tooltipAxis,f=t.tooltipTicks,m=Goe(l,u,f,d);if(m>=0&&f){var p=f[m]&&f[m].value,g=BN(t,n,m,p),x=jpe(r,u,m,o);return{activeTooltipIndex:m,activeLabel:p,activePayload:g,activeCoordinate:x}}return null},Spe=function(t,n){var r=n.axes,a=n.graphicalItems,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,f=n.dataEndIndex,m=t.layout,p=t.children,g=t.stackOffset,x=S6(m,o);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,M=N.includeHidden,$=N[l];if(j[$])return j;var z=Ey(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;Kme(N.domain,A,O)&&(U=J_(N.domain,null,A),x&&(O==="number"||k!=="auto")&&(H=wf(z,C,"category")));var G=Bq(O);if(!U||U.length===0){var L,R=(L=N.domain)!==null&&L!==void 0?L:G;if(C){if(U=wf(z,C,O),O==="category"&&x){var F=zQ(U);E&&F?(V=U,U=ig(0,D)):E||(U=P$(R,U,b).reduce(function(B,Y){return B.indexOf(Y)>=0?B:[].concat(Ou(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(Ou(B),[Y])},[]);else if(O==="number"){var K=Qoe(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===$&&(M||!xe)}),C,o,m);K&&(U=K)}x&&(O==="number"||k!=="auto")&&(H=wf(z,C,"category"))}else x?U=ig(0,D):u&&u[$]&&u[$].hasStack&&O==="number"?U=g==="expand"?[0,1]:E6(u[$].stackGroups,d,f):U=j6(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===$&&(M||!ne)}),O,m,!0);if(O==="number")U=$N(p,U,$,o,T),R&&(U=J_(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:o,domain:U,categoricalDomain:H,duplicateDomain:V,originalDomain:(w=N.domain)!==null&&w!==void 0?w:G,isCategorical:x,layout:m})))},{})},_pe=function(t,n){var r=n.graphicalItems,a=n.Axis,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,d=n.dataStartIndex,f=n.dataEndIndex,m=t.layout,p=t.children,g=Ey(t.data,{graphicalItems:r,dataStartIndex:d,dataEndIndex:f}),x=g.length,j=S6(m,o),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=Bq("number");if(!w[C]){b++;var E;return j?E=ig(0,x):u&&u[C]&&u[C].hasStack?(E=E6(u[C].stackGroups,d,f),E=$N(p,E,C,o)):(E=J_(A,j6(g,r.filter(function(k){var T,M,$=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:(M=k.type.defaultProps)===null||M===void 0?void 0:M.hide;return $===C&&!z}),"number",m),a.defaultProps.allowDataOverflow),E=$N(p,E,C,o)),ye(ye({},w),{},Fe({},C,ye(ye({axisType:o},a.defaultProps),{},{hide:!0,orientation:ta(xpe,"".concat(o,".").concat(b%2),null),domain:E,originalDomain:A,isCategorical:j,layout:m})))}return w},{})},Npe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,u=n.stackGroups,d=n.dataStartIndex,f=n.dataEndIndex,m=t.children,p="".concat(a,"Id"),g=na(m,o),x={};return g&&g.length?x=Spe(t,{axes:g,graphicalItems:l,axisType:a,axisIdKey:p,stackGroups:u,dataStartIndex:d,dataEndIndex:f}):l&&l.length&&(x=_pe(t,{Axis:o,graphicalItems:l,axisType:a,axisIdKey:p,stackGroups:u,dataStartIndex:d,dataEndIndex:f})),x},Ope=function(t){var n=Fo(t),r=Yi(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:oC(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Vv(n,r)}},D3=function(t){var n=t.children,r=t.defaultShowTooltip,a=Kr(n,vu),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Cpe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Qi(n&&n.type);return r&&r.indexOf("Bar")>=0})},$3=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"}},Epe=function(t,n){var r=t.props,a=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,u=t.yAxisMap,d=u===void 0?{}:u,f=r.width,m=r.height,p=r.children,g=r.margin||{},x=Kr(p,vu),j=Kr(p,Js),b=Object.keys(d).reduce(function(E,k){var T=d[k],M=T.orientation;return!T.mirror&&!T.hide?ye(ye({},E),{},Fe({},M,E[M]+T.width)):E},{left:g.left||0,right:g.right||0}),w=Object.keys(l).reduce(function(E,k){var T=l[k],M=T.orientation;return!T.mirror&&!T.hide?ye(ye({},E),{},Fe({},M,ta(E,"".concat(M))+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||vu.defaultProps.height),j&&n&&(N=Xoe(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)})},Ape=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},UC=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,o=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,M=O.dataEndIndex,$=N.barSize,z=N.layout,D=N.barGap,U=N.barCategoryGap,V=N.maxBarSize,H=$3(z),G=H.numericAxisName,L=H.cateAxisName,R=Cpe(C),F=[];return C.forEach(function(K,te){var I=Ey(N.data,{graphicalItems:[K],dataStartIndex:T,dataEndIndex:M}),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(rr,gr){var lt=O["".concat(gr.axisType,"Map")],rt=B["".concat(gr.axisType,"Id")];lt&<[rt]||gr.axisType==="zAxis"||ur(!1);var $n=lt[rt];return ye(ye({},rr),{},Fe(Fe({},gr.axisType,$n),"".concat(gr.axisType,"Ticks"),Yi($n)))},ee),Z=ae[L],pe=ae["".concat(L,"Ticks")],je=A&&A[oe]&&A[oe].hasStack&&sse(K,A[oe].stackGroups),le=Qi(K.type).indexOf("Bar")>=0,Re=Vv(Z,pe),_e=[],me=R&&Yoe({barSize:$,stackGroups:A,totalSize:Ape(ae,L)});if(le){var ve,Le,Dt=Ge(ne)?V:ne,On=(ve=(Le=Vv(Z,pe,!0))!==null&&Le!==void 0?Le:Dt)!==null&&ve!==void 0?ve:0;_e=Koe({barGap:D,barCategoryGap:U,bandSize:On!==Re?On:Re,sizeList:me[xe],maxBarSize:Dt}),On!==Re&&(_e=_e.map(function(rr){return ye(ye({},rr),{},{position:ye(ye({},rr.position),{},{offset:rr.position.offset-On/2})})}))}var vr=K&&K.type&&K.type.getComposedData;vr&&F.push({props:ye(ye({},vr(ye(ye({},ae),{},{displayedData:I,props:N,dataKey:Y,item:K,bandSize:Re,barPosition:_e,offset:E,stackedData:je,layout:z,dataStartIndex:T,dataEndIndex:M}))),{},Fe(Fe(Fe({key:K.key||"item-".concat(te)},G,ae[G]),L,ae[L]),"animationId",k)),childIndex:JQ(K,N.children),item:K})}),F},x=function(N,O){var C=N.props,A=N.dataStartIndex,E=N.dataEndIndex,k=N.updateId;if(!GP({props:C}))return null;var T=C.children,M=C.layout,$=C.stackOffset,z=C.data,D=C.reverseStackOrder,U=$3(M),V=U.numericAxisName,H=U.cateAxisName,G=na(T,r),L=ise(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,Npe(C,ye(ye({},Y),{},{graphicalItems:G,stackGroups:Y.axisType===V&&L,dataStartIndex:A,dataEndIndex:E}))))},{}),F=Epe(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=Ope(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 lpe(this,N),E=dpe(this,N,[O]),Fe(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Fe(E,"accessibilityManager",new Yme),Fe(E,"handleLegendBBoxUpdate",function(k){if(k){var T=E.state,M=T.dataStartIndex,$=T.dataEndIndex,z=T.updateId;E.setState(ye({legendBBox:k},x({props:E.props,dataStartIndex:M,dataEndIndex:$,updateId:z},ye(ye({},E.state),{},{legendBBox:k}))))}}),Fe(E,"handleReceiveSyncEvent",function(k,T,M){if(E.props.syncId===k){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(T)}}),Fe(E,"handleBrushChange",function(k){var T=k.startIndex,M=k.endIndex;if(T!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var $=E.state.updateId;E.setState(function(){return ye({dataStartIndex:T,dataEndIndex:M},x({props:E.props,dataStartIndex:T,dataEndIndex:M,updateId:$},E.state))}),E.triggerSyncEvent({dataStartIndex:T,dataEndIndex:M})}}),Fe(E,"handleMouseEnter",function(k){var T=E.getMouseInfo(k);if(T){var M=ye(ye({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var $=E.props.onMouseEnter;We($)&&$(M,k)}}),Fe(E,"triggeredAfterMouseMove",function(k){var T=E.getMouseInfo(k),M=T?ye(ye({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var $=E.props.onMouseMove;We($)&&$(M,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 M=E.props.onMouseLeave;We(M)&&M(T,k)}),Fe(E,"handleOuterEvent",function(k){var T=QQ(k),M=ta(E.props,"".concat(T));if(T&&We(M)){var $,z;/.*touch.*/i.test(T)?z=E.getMouseInfo(k.changedTouches[0]):z=E.getMouseInfo(k),M(($=z)!==null&&$!==void 0?$:{},k)}}),Fe(E,"handleClick",function(k){var T=E.getMouseInfo(k);if(T){var M=ye(ye({},T),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var $=E.props.onClick;We($)&&$(M,k)}}),Fe(E,"handleMouseDown",function(k){var T=E.props.onMouseDown;if(We(T)){var M=E.getMouseInfo(k);T(M,k)}}),Fe(E,"handleMouseUp",function(k){var T=E.props.onMouseUp;if(We(T)){var M=E.getMouseInfo(k);T(M,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 M=E.getMouseInfo(k);T(M,k)}}),Fe(E,"handleContextMenu",function(k){var T=E.props.onContextMenu;if(We(T)){var M=E.getMouseInfo(k);T(M,k)}}),Fe(E,"triggerSyncEvent",function(k){E.props.syncId!==void 0&&BS.emit(zS,E.props.syncId,k,E.eventEmitterSymbol)}),Fe(E,"applySyncEvent",function(k){var T=E.props,M=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=BN(E.state,E.props.data,G),oe=F[G]?{x:M==="horizontal"?F[G].coordinate:I,y:M==="horizontal"?B:F[G].coordinate}:Lq;E.setState(ye(ye({},k),{},{activeLabel:Y,activeCoordinate:oe,activePayload:ne,activeTooltipIndex:G}))}else E.setState(k)}),Fe(E,"renderCursor",function(k){var T,M=E.state,$=M.isTooltipActive,z=M.activeCoordinate,D=M.activePayload,U=M.offset,V=M.activeTooltipIndex,H=M.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(tpe,{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,M){var $=ta(k,"type.axisType"),z=ta(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(M),ticks:Yi(V,!0)}))}),Fe(E,"renderPolarGrid",function(k){var T=k.props,M=T.radialLines,$=T.polarAngles,z=T.polarRadius,D=E.state,U=D.radiusAxisMap,V=D.angleAxisMap,H=Fo(U),G=Fo(V),L=G.cx,R=G.cy,F=G.innerRadius,K=G.outerRadius;return y.cloneElement(k,{polarAngles:Array.isArray($)?$:Yi(G,!0).map(function(te){return te.coordinate}),polarRadius:Array.isArray(z)?z:Yi(H,!0).map(function(te){return te.coordinate}),cx:L,cy:R,innerRadius:F,outerRadius:K,key:k.key||"polar-grid",radialLines:M})}),Fe(E,"renderLegend",function(){var k=E.state.formattedGraphicalItems,T=E.props,M=T.children,$=T.width,z=T.height,D=E.props.margin||{},U=$-(D.left||0)-(D.right||0),V=b6({children:M,formattedGraphicalItems:k,legendWidth:U,legendContent:f});if(!V)return null;var H=V.item,G=M3(V,npe);return y.cloneElement(H,ye(ye({},G),{},{chartWidth:$,chartHeight:z,margin:D,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),Fe(E,"renderTooltip",function(){var k,T=E.props,M=T.children,$=T.accessibilityLayer,z=Kr(M,ti);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,M=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:Rp(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-(M.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,M){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(M),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,M=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:M.x,cy:M.y,r:4,fill:MC(T.item),strokeWidth:2,stroke:"#fff",payload:M.payload,value:M.value},Be(G,!1)),jv(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,M){var $=E.filterFormatItem(k,T,M);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=Kr(L,ti),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:Rp(E.handleItemMouseEnter,k.props.onClick)}:z!=="axis"&&(ae={onMouseLeave:Rp(E.handleItemMouseLeave,k.props.onMouseLeave),onMouseEnter:Rp(E.handleItemMouseEnter,k.props.onMouseEnter)});var Z=y.cloneElement(k,ye(ye({},$.props),ae));function pe(gr){return typeof V.dataKey=="function"?V.dataKey(gr.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=wv(K,Re,G),le=te&&I&&wv(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(Ou(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,On=Dt===void 0?k:Dt,vr=Le.childIndex,rr=ye(ye(ye({},$.props),ae),{},{activeIndex:vr});return[y.cloneElement(On,rr),null,null]}return te?[Z,null,null]:[Z,null]}),Fe(E,"renderCustomized",function(k,T,M){return y.cloneElement(k,ye(ye({key:"recharts-customized-".concat(M)},E.props),E.state))}),Fe(E,"renderMap",{CartesianGrid:{handler:Bp,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Bp},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Bp},YAxis:{handler:Bp},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:zu("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=xz(E.triggeredAfterMouseMove,(A=O.throttleDelay)!==null&&A!==void 0?A:1e3/60),E.state={},E}return mpe(N,w),upe(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,M=Kr(A,ti);if(M){var $=M.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,D=BN(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(M),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){w_([Kr(C.children,ti)],[Kr(this.props.children,ti)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=Kr(this.props.children,ti);if(C&&typeof C.props.shared=="boolean"){var A=C.props.shared?"axis":"item";return u.indexOf(A)>=0?A:o}return o}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var A=this.container,E=A.getBoundingClientRect(),k=zne(E),T={chartX:Math.round(C.pageX-k.left),chartY:Math.round(C.pageY-k.top)},M=E.width/A.offsetWidth||1,$=this.inRange(T.chartX,T.chartY,M);if(!$)return null;var z=this.state,D=z.xAxisMap,U=z.yAxisMap,V=this.getTooltipEventType(),H=R3(this.state,this.props.data,this.props.layout,$);if(V!=="axis"&&D&&U){var G=Fo(D).scale,L=Fo(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,M=A/E;if(k==="horizontal"||k==="vertical"){var $=this.state.offset,z=T>=$.left&&T<=$.left+$.width&&M>=$.top&&M<=$.top+$.height;return z?{x:T,y:M}:null}var D=this.state,U=D.angleAxisMap,V=D.radiusAxisMap;if(U&&V){var H=Fo(U);return $$({x:T,y:M},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,A=this.getTooltipEventType(),E=Kr(C,ti),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=jv(this.props,this.handleOuterEvent);return ye(ye({},T),k)}},{key:"addListener",value:function(){BS.on(zS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){BS.removeListener(zS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,A,E){for(var k=this.state.formattedGraphicalItems,T=0,M=k.length;T<M;T++){var $=k[T];if($.item===C||$.props.key===C.key||A===Qi($.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,M=A.width;return W.createElement("defs",null,W.createElement("clipPath",{id:C},W.createElement("rect",{x:E,y:k,height:T,width:M})))}},{key:"getXScales",value:function(){var C=this.state.xAxisMap;return C?Object.entries(C).reduce(function(A,E){var k=k3(E,2),T=k[0],M=k[1];return ye(ye({},A),{},Fe({},T,M.scale))},{}):null}},{key:"getYScales",value:function(){var C=this.state.yAxisMap;return C?Object.entries(C).reduce(function(A,E){var k=k3(E,2),T=k[0],M=k[1];return ye(ye({},A),{},Fe({},T,M.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,M=E.length;T<M;T++){var $=E[T],z=$.props,D=$.item,U=D.type.defaultProps!==void 0?ye(ye({},D.type.defaultProps),D.props):D.props,V=Qi(D.type);if(V==="Bar"){var H=(z.data||[]).find(function(F){return rue(C,F)});if(H)return{graphicalItem:$,payload:H}}else if(V==="RadialBar"){var G=(z.data||[]).find(function(F){return $$(C,F)});if(G)return{graphicalItem:$,payload:G}}else if(wy($,k)||jy($,k)||nh($,k)){var L=Ode({graphicalItem:$,activeTooltipItem:k,itemData:U.data}),R=U.activeIndex===void 0?L:U.activeIndex;return{graphicalItem:ye(ye({},$),{},{childIndex:R}),payload:nh($,k)?U.data[L]:$.props.data[L]}}}return null}},{key:"render",value:function(){var C=this;if(!GP(this))return null;var A=this.props,E=A.children,k=A.className,T=A.width,M=A.height,$=A.style,z=A.compact,D=A.title,U=A.desc,V=M3(A,rpe),H=Be(V,!1);if(z)return W.createElement(f3,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement(S_,zc({},H,{width:T,height:M,title:D,desc:U}),this.renderClipPath(),KP(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(f3,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement("div",zc({className:Ye("recharts-wrapper",k),style:ye({position:"relative",cursor:"default",width:T,height:M},$)},R,{ref:function(K){C.container=K}}),W.createElement(S_,zc({},H,{width:T,height:M,title:D,desc:U,style:bpe}),this.renderClipPath(),KP(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,M=w.stackOffset,$=w.margin,z=N.dataStartIndex,D=N.dataEndIndex;if(N.updateId===void 0){var U=D3(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:M,prevMargin:$,prevChildren:A})}if(O!==N.prevDataKey||C!==N.prevData||E!==N.prevWidth||k!==N.prevHeight||T!==N.prevLayout||M!==N.prevStackOffset||!qc($,N.prevMargin)){var V=D3(w),H={chartX:N.chartX,chartY:N.chartY,isTooltipActive:N.isTooltipActive},G=ye(ye({},R3(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:M,prevMargin:$,prevChildren:A})}if(!w_(A,N.prevChildren)){var R,F,K,te,I=Kr(A,vu),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(vy,N),W.createElement(pt,{className:"recharts-active-dot",key:O},C)});var b=y.forwardRef(function(N,O){return W.createElement(j,zc({},N,{ref:O}))});return b.displayName=j.displayName,b},Tpe=UC({chartName:"LineChart",GraphicalChild:$h,axisComponents:[{axisType:"xAxis",AxisComp:Wo},{axisType:"yAxis",AxisComp:Wi}],formatAxisMap:iq}),FS=UC({chartName:"BarChart",GraphicalChild:si,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Wo},{axisType:"yAxis",AxisComp:Wi}],formatAxisMap:iq}),kpe=UC({chartName:"PieChart",GraphicalChild:fo,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:by},{axisType:"radiusAxis",AxisComp:yy}],formatAxisMap:gse,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const Mpe={light:"",dark:".dark"},zq=y.createContext(null);function qq(){const e=y.useContext(zq);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Tc=y.forwardRef(({id:e,className:t,children:n,config:r,...a},o)=>{const l=y.useId(),u=`chart-${e||l.replace(/:/g,"")}`;return i.jsx(zq.Provider,{value:{config:r},children:i.jsxs("div",{"data-chart":u,ref:o,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:[i.jsx(Ppe,{id:u,config:r}),i.jsx(Pne,{children:n})]})})});Tc.displayName="Chart";const Ppe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?i.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Mpe).map(([r,a])=>`
|
||
${a} [data-chart=${e}] {
|
||
${n.map(([o,l])=>{const u=l.theme?.[r]||l.color;return u?` --color-${o}: ${u};`:null}).join(`
|
||
`)}
|
||
}
|
||
`).join(`
|
||
`)}}):null},af=ti,kc=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:u,labelClassName:d,formatter:f,color:m,nameKey:p,labelKey:g},x)=>{const{config:j}=qq(),b=y.useMemo(()=>{if(a||!t?.length)return null;const[N]=t,O=`${g||N?.dataKey||N?.name||"value"}`,C=zN(j,N,O),A=!g&&typeof l=="string"?j[l]?.label||l:C?.label;return u?i.jsx("div",{className:ue("font-medium",d),children:u(A,t)}):A?i.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 i.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,i.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=zN(j,N,C),E=m||N.payload.fill||N.color;return i.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):i.jsxs(i.Fragment,{children:[A?.icon?i.jsx(A.icon,{}):!o&&i.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}}),i.jsxs("div",{className:ue("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[i.jsxs("div",{className:"grid gap-1.5",children:[w?b:null,i.jsx("span",{className:"text-muted-foreground",children:A?.label||N.name})]}),N.value&&i.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:N.value.toLocaleString()})]})]})},N.dataKey)})})]})});kc.displayName="ChartTooltip";const Rpe=Js,Fq=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:l}=qq();return n?.length?i.jsx("div",{ref:o,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=zN(l,u,d);return i.jsxs("div",{className:ue("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[f?.icon&&!t?i.jsx(f.icon,{}):i.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:u.color}}),f?.label]},u.value)})}):null});Fq.displayName="ChartLegend";function zN(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 Dpe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$pe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),I3=e=>{const t=$pe(e);return t.charAt(0).toUpperCase()+t.slice(1)},Uq=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ipe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Lpe={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 Bpe=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},d)=>y.createElement("svg",{ref:d,...Lpe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Uq("lucide",a),...!o&&!Ipe(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,m])=>y.createElement(f,m)),...Array.isArray(o)?o:[o]]));const Ce=(e,t)=>{const n=y.forwardRef(({className:r,...a},o)=>y.createElement(Bpe,{ref:o,iconNode:t,className:Uq(`lucide-${Dpe(I3(e))}`,`lucide-${e}`,r),...a}));return n.displayName=I3(e),n};const zpe=[["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"}]],qpe=Ce("activity",zpe);const Fpe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Hq=Ce("arrow-left",Fpe);const Upe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Hpe=Ce("arrow-right",Upe);const Wpe=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Vpe=Ce("ban",Wpe);const Gpe=[["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"}]],Ype=Ce("book-open",Gpe);const Kpe=[["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"}]],Xpe=Ce("bot",Kpe);const Zpe=[["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"}]],Wq=Ce("boxes",Zpe);const Qpe=[["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"}]],L3=Ce("calendar",Qpe);const Jpe=[["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"}]],eve=Ce("chart-column",Jpe);const tve=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nl=Ce("check",tve);const nve=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ch=Ce("chevron-down",nve);const rve=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],HC=Ce("chevron-left",rve);const ave=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],WC=Ce("chevron-right",ave);const ive=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],qN=Ce("chevron-up",ive);const ove=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],sve=Ce("chevrons-up-down",ove);const lve=[["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"}]],xg=Ce("circle-alert",lve);const cve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Cu=Ce("circle-check",cve);const uve=[["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"}]],dve=Ce("circle-question-mark",uve);const fve=[["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"}]],Vq=Ce("circle-user",fve);const hve=[["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"}]],Gq=Ce("circle-x",hve);const mve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pve=Ce("circle",mve);const vve=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rl=Ce("clock",vve);const gve=[["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"}]],FN=Ce("copy",gve);const yve=[["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"}]],xve=Ce("database",yve);const bve=[["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"}]],wve=Ce("dollar-sign",bve);const jve=[["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"}]],UN=Ce("download",jve);const Sve=[["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"}]],rv=Ce("external-link",Sve);const _ve=[["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"}]],HN=Ce("eye-off",_ve);const Nve=[["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"}]],ao=Ce("eye",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"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],bg=Ce("file-search",Ove);const Cve=[["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"}]],VC=Ce("file-text",Cve);const Eve=[["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"}]],WN=Ce("funnel",Eve);const Ave=[["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"}]],wg=Ce("hash",Ave);const Tve=[["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"}]],jg=Ce("house",Tve);const kve=[["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"}]],Mve=Ce("image",kve);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"}]],Yq=Ce("info",Pve);const Rve=[["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"}]],Dve=Ce("key",Rve);const $ve=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],VN=Ce("loader-circle",$ve);const Ive=[["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"}]],B3=Ce("lock",Ive);const Lve=[["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"}]],z3=Ce("log-out",Lve);const Bve=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],zve=Ce("menu",Bve);const qve=[["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"}]],Ih=Ce("message-square",qve);const Fve=[["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"}]],GN=Ce("moon",Fve);const Uve=[["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"}]],Kq=Ce("package",Uve);const Hve=[["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"}]],Xq=Ce("palette",Hve);const Wve=[["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"}]],Vve=Ce("pause",Wve);const Gve=[["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"}]],Eu=Ce("pencil",Gve);const Yve=[["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"}]],Kve=Ce("play",Yve);const Xve=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],tr=Ce("plus",Xve);const Zve=[["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"}]],al=Ce("refresh-cw",Zve);const Qve=[["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"}]],Jve=Ce("rotate-ccw",Qve);const ege=[["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"}]],tge=Ce("rotate-cw",ege);const nge=[["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"}]],GC=Ce("save",nge);const rge=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dr=Ce("search",rge);const age=[["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"}]],Zq=Ce("server",age);const ige=[["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"}]],oge=Ce("settings-2",ige);const sge=[["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"}]],Hc=Ce("settings",sge);const lge=[["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"}]],cge=Ce("shield",lge);const uge=[["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"}]],dge=Ce("skip-forward",uge);const fge=[["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"}]],YC=Ce("smile",fge);const hge=[["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"}]],mge=Ce("sparkles",hge);const pge=[["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"}]],KC=Ce("square-pen",pge);const vge=[["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"}]],q3=Ce("star",vge);const gge=[["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"}]],YN=Ce("sun",gge);const yge=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],xge=Ce("terminal",yge);const bge=[["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",bge);const wge=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],jge=Ce("trending-up",wge);const Sge=[["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"}]],Wc=Ce("triangle-alert",Sge);const _ge=[["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"}]],Qq=Ce("user",_ge);const Nge=[["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"}]],Oge=Ce("users",Nge);const Cge=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lh=Ce("x",Cge);const Ege=[["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"}]],uh=Ce("zap",Ege);var Age=Symbol.for("react.lazy"),Sg=yO[" use ".trim().toString()];function Tge(e){return typeof e=="object"&&e!==null&&"then"in e}function Jq(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Age&&"_payload"in e&&Tge(e._payload)}function Bh(e){const t=Mge(e),n=y.forwardRef((r,a)=>{let{children:o,...l}=r;Jq(o)&&typeof Sg=="function"&&(o=Sg(o._payload));const u=y.Children.toArray(o),d=u.find(Rge);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 i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var kge=Bh("Slot");function Mge(e){const t=y.forwardRef((n,r)=>{let{children:a,...o}=n;if(Jq(a)&&typeof Sg=="function"&&(a=Sg(a._payload)),y.isValidElement(a)){const l=$ge(a),u=Dge(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(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 Rge(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pge}function Dge(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function $ge(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 F3=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,U3=Ye,zh=(e,t)=>n=>{var r;if(t?.variants==null)return U3(e,n?.class,n?.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(f=>{const m=n?.[f],p=o?.[f];if(m===null)return null;const g=F3(m)||F3(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({...o,...u}[b]):{...o,...u}[b]===w})?[...f,p,g]:f},[]);return U3(e,l,d,n?.class,n?.className)},dh=zh("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},o)=>{const l=r?kge:"button";return i.jsx(l,{className:ue(dh({variant:t,size:n,className:e})),ref:o,...a})});fe.displayName="Button";function Ige(){const[e,t]=y.useState(null),[n,r]=y.useState(!0),[a,o]=y.useState(24),[l,u]=y.useState(!0),d=y.useCallback(async()=>{try{const O=localStorage.getItem("token"),C=await un.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 i.jsx("div",{className:"flex items-center justify-center h-[calc(100vh-200px)]",children:i.jsxs("div",{className:"text-center space-y-4",children:[i.jsx(al,{className:"h-12 w-12 animate-spin mx-auto text-muted-foreground"}),i.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 i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"实时监控面板"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"麦麦运行状态和统计数据一览"})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx(sl,{value:a.toString(),onValueChange:O=>o(Number(O)),children:i.jsxs(Zo,{className:"grid grid-cols-3 w-full sm:w-auto",children:[i.jsx(Ct,{value:"24",children:"24小时"}),i.jsx(Ct,{value:"168",children:"7天"}),i.jsx(Ct,{value:"720",children:"30天"})]})}),i.jsxs(fe,{variant:l?"default":"outline",size:"sm",onClick:()=>u(!l),className:"gap-2",children:[i.jsx(al,{className:`h-4 w-4 ${l?"animate-spin":""}`}),i.jsx("span",{className:"hidden sm:inline",children:"自动刷新"})]}),i.jsx(fe,{variant:"outline",size:"sm",onClick:d,children:i.jsx(al,{className:"h-4 w-4"})})]})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 xs:grid-cols-2 lg:grid-cols-4",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"总请求数"}),i.jsx(qpe,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-2xl font-bold",children:f.total_requests.toLocaleString()}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["最近",a<48?a+"小时":Math.floor(a/24)+"天"]})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"总花费"}),i.jsx(wve,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:["¥",f.total_cost.toFixed(2)]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.cost_per_hour>0?`¥${f.cost_per_hour.toFixed(2)}/小时`:"暂无数据"})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"Token消耗"}),i.jsx(xve,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:[(f.total_tokens/1e3).toFixed(1),"K"]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:f.tokens_per_hour>0?`${(f.tokens_per_hour/1e3).toFixed(1)}K/小时`:"暂无数据"})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"平均响应"}),i.jsx(uh,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsxs("div",{className:"text-2xl font-bold",children:[f.avg_response_time.toFixed(2),"s"]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"API平均耗时"})]})]})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-3",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"在线时长"}),i.jsx(rl,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsx(cn,{children:i.jsx("div",{className:"text-xl font-bold",children:j(f.online_time)})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"消息处理"}),i.jsx(Ih,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-xl font-bold",children:f.total_messages.toLocaleString()}),i.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["回复 ",f.total_replies.toLocaleString()," 条"]})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(Gt,{className:"text-sm font-medium",children:"成本效率"}),i.jsx(jge,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"text-xl font-bold",children:f.total_messages>0?`¥${(f.total_cost/f.total_messages*100).toFixed(2)}`:"¥0.00"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"每100条消息"})]})]})]}),i.jsxs(sl,{defaultValue:"trends",className:"space-y-4",children:[i.jsxs(Zo,{className:"grid w-full grid-cols-2 sm:grid-cols-4",children:[i.jsx(Ct,{value:"trends",children:"趋势"}),i.jsx(Ct,{value:"models",children:"模型"}),i.jsx(Ct,{value:"activity",children:"活动"}),i.jsx(Ct,{value:"daily",children:"日统计"})]}),i.jsxs(Jt,{value:"trends",className:"space-y-4",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"请求趋势"}),i.jsxs(er,{children:["最近",a,"小时的请求量变化"]})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[300px] sm:h-[400px] w-full aspect-auto",children:i.jsxs(Tpe,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx($h,{type:"monotone",dataKey:"requests",stroke:"var(--color-requests)",strokeWidth:2})]})})})]}),i.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"花费趋势"}),i.jsx(er,{children:"API调用成本变化"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:i.jsxs(FS,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx(si,{dataKey:"cost",fill:"var(--color-cost)"})]})})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"Token消耗"}),i.jsx(er,{children:"Token使用量变化"})]}),i.jsx(cn,{children:i.jsx(Tc,{config:N,className:"h-[250px] sm:h-[300px] w-full aspect-auto",children:i.jsxs(FS,{data:p,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{dataKey:"timestamp",tickFormatter:O=>b(O),angle:-45,textAnchor:"end",height:60,stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>b(O)})}),i.jsx(si,{dataKey:"tokens",fill:"var(--color-tokens)"})]})})})]})]})]}),i.jsx(Jt,{value:"models",className:"space-y-4",children:i.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"模型请求分布"}),i.jsx(er,{children:"各模型使用占比"})]}),i.jsx(cn,{children:i.jsx(Tc,{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:i.jsxs(kpe,{children:[i.jsx(af,{content:i.jsx(kc,{})}),i.jsx(fo,{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)=>i.jsx(ay,{fill:O.fill},`cell-${C}`))})]})})})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"模型详细统计"}),i.jsx(er,{children:"请求数、花费和性能"})]}),i.jsx(cn,{children:i.jsx(Kt,{className:"h-[300px] sm:h-[400px]",children:i.jsx("div",{className:"space-y-3",children:m.map((O,C)=>i.jsxs("div",{className:"p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx("h4",{className:"font-semibold text-sm truncate flex-1 min-w-0",children:O.model_name}),i.jsx("div",{className:"w-3 h-3 rounded-full ml-2 flex-shrink-0",style:{backgroundColor:`hsl(var(--chart-${C%5+1}))`}})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"请求数:"}),i.jsx("span",{className:"ml-1 font-medium",children:O.request_count.toLocaleString()})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"花费:"}),i.jsxs("span",{className:"ml-1 font-medium",children:["¥",O.total_cost.toFixed(2)]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),i.jsxs("span",{className:"ml-1 font-medium",children:[(O.total_tokens/1e3).toFixed(1),"K"]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"平均耗时:"}),i.jsxs("span",{className:"ml-1 font-medium",children:[O.avg_response_time.toFixed(2),"s"]})]})]})]},C))})})})]})]})}),i.jsx(Jt,{value:"activity",children:i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"最近活动"}),i.jsx(er,{children:"最新的API调用记录"})]}),i.jsx(cn,{children:i.jsx(Kt,{className:"h-[400px] sm:h-[500px]",children:i.jsx("div",{className:"space-y-2",children:x.map((O,C)=>i.jsxs("div",{className:"p-3 sm:p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-2",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"font-medium text-sm truncate",children:O.model}),i.jsx("div",{className:"text-xs text-muted-foreground",children:O.request_type})]}),i.jsx("div",{className:"text-xs text-muted-foreground flex-shrink-0",children:b(O.timestamp)})]}),i.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),i.jsx("span",{className:"ml-1",children:O.tokens})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"花费:"}),i.jsxs("span",{className:"ml-1",children:["¥",O.cost.toFixed(4)]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"耗时:"}),i.jsxs("span",{className:"ml-1",children:[O.time_cost.toFixed(2),"s"]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"状态:"}),i.jsx("span",{className:`ml-1 ${O.status==="success"?"text-green-600":"text-red-600"}`,children:O.status})]})]})]},C))})})})]})}),i.jsx(Jt,{value:"daily",children:i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"每日统计"}),i.jsx(er,{children:"最近7天的数据汇总"})]}),i.jsx(cn,{children:i.jsx(Tc,{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:i.jsxs(FS,{data:g,children:[i.jsx(df,{strokeDasharray:"3 3",stroke:"hsl(var(--muted-foreground) / 0.2)"}),i.jsx(Wo,{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))"}}),i.jsx(Wi,{yAxisId:"left",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(Wi,{yAxisId:"right",orientation:"right",stroke:"hsl(var(--muted-foreground))",tick:{fill:"hsl(var(--muted-foreground))"}}),i.jsx(af,{content:i.jsx(kc,{labelFormatter:O=>new Date(O).toLocaleDateString("zh-CN")})}),i.jsx(Rpe,{content:i.jsx(Fq,{})}),i.jsx(si,{yAxisId:"left",dataKey:"requests",fill:"var(--color-requests)"}),i.jsx(si,{yAxisId:"right",dataKey:"cost",fill:"var(--color-cost)"})]})})})]})})]})]})})}const Lge={theme:"system",setTheme:()=>null},eF=y.createContext(Lge),XC=()=>{const e=y.useContext(eF);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Bge=(e,t,n)=>{const r=document.documentElement.classList.contains("no-animations");if(!document.startViewTransition||r){t(e);return}const a=n.clientX,o=n.clientY,l=Math.hypot(Math.max(a,innerWidth-a),Math.max(o,innerHeight-o));document.startViewTransition(()=>{t(e)}).ready.then(()=>{document.documentElement.animate({clipPath:[`circle(0px at ${a}px ${o}px)`,`circle(${l}px at ${a}px ${o}px)`]},{duration:500,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})},tF=y.createContext(void 0),nF=()=>{const e=y.useContext(tF);if(e===void 0)throw new Error("useAnimation must be used within an AnimationProvider");return e};function Ay(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 Ty(e){const[t,n]=y.useState(void 0);return Un(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const d=o.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 ky="Switch",[zge]=hr(ky),[qge,Fge]=zge(ky),rF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,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]=Na({prop:a,defaultProp:o??!1,onChange:f,caller:ky});return i.jsxs(qge,{scope:n,checked:N,disabled:u,children:[i.jsx(Pe.button,{type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":sF(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&&i.jsx(oF,{control:g,bubbles:!b.current,name:r,value:d,checked:N,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});rF.displayName=ky;var aF="SwitchThumb",iF=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=Fge(aF,n);return i.jsx(Pe.span,{"data-state":sF(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});iF.displayName=aF;var Uge="SwitchBubbleInput",oF=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const l=y.useRef(null),u=qe(l,o),d=Ay(n),f=Ty(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]),i.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}})});oF.displayName=Uge;function sF(e){return e?"checked":"unchecked"}var lF=rF,Hge=iF;const at=y.forwardRef(({className:e,...t},n)=>i.jsx(lF,{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:i.jsx(Hge,{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=lF.displayName;var Wge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vge=Wge.reduce((e,t)=>{const n=Bh(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Gge="Label",cF=y.forwardRef((e,t)=>i.jsx(Vge.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));cF.displayName=Gge;var uF=cF;const Yge=zh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=y.forwardRef(({className:e,...t},n)=>i.jsx(uF,{ref:n,className:ue(Yge(),e),...t}));J.displayName=uF.displayName;const Ne=y.forwardRef(({className:e,type:t,...n},r)=>i.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 Kge=1,Xge=1e6;let US=0;function Zge(){return US=(US+1)%Number.MAX_SAFE_INTEGER,US.toString()}const HS=new Map,H3=e=>{if(HS.has(e))return;const t=setTimeout(()=>{HS.delete(e),Of({type:"REMOVE_TOAST",toastId:e})},Xge);HS.set(e,t)},Qge=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Kge)};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?H3(n):e.toasts.forEach(r=>{H3(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)}}},av=[];let iv={toasts:[]};function Of(e){iv=Qge(iv,e),av.forEach(t=>{t(iv)})}function Jge({...e}){const t=Zge(),n=a=>Of({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Of({type:"DISMISS_TOAST",toastId:t});return Of({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function mr(){const[e,t]=y.useState(iv);return y.useEffect(()=>(av.push(t),()=>{const n=av.indexOf(t);n>-1&&av.splice(n,1)}),[e]),{...e,toast:Jge,dismiss:n=>Of({type:"DISMISS_TOAST",toastId:n})}}const eye=[{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 tye(e){const t=eye.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 ZC="0.11.4",QC="MaiBot Dashboard",nye=`${QC} v${ZC}`,rye=(e="v")=>`${e}${ZC}`;function aye(e,t=globalThis?.document){const n=nn(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 iye="DismissableLayer",KN="dismissableLayer.update",oye="dismissableLayer.pointerDownOutside",sye="dismissableLayer.focusOutside",W3,dF=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_l=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=y.useContext(dF),[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=cye(T=>{const M=T.target,$=[...f.branches].some(z=>z.contains(M));!A||$||(a?.(T),l?.(T),T.defaultPrevented||u?.())},g),k=uye(T=>{const M=T.target;[...f.branches].some(z=>z.contains(M))||(o?.(T),l?.(T),T.defaultPrevented||u?.())},g);return aye(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&&(W3=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),V3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=W3)}},[m,g,n,f]),y.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),V3())},[m,f]),y.useEffect(()=>{const T=()=>x({});return document.addEventListener(KN,T),()=>document.removeEventListener(KN,T)},[]),i.jsx(Pe.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)})});_l.displayName=iye;var lye="DismissableLayerBranch",fF=y.forwardRef((e,t)=>{const n=y.useContext(dF),r=y.useRef(null),a=qe(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),i.jsx(Pe.div,{...e,ref:a})});fF.displayName=lye;function cye(e,t=globalThis?.document){const n=nn(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){hF(oye,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",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uye(e,t=globalThis?.document){const n=nn(e),r=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!r.current&&hF(sye,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function V3(){const e=new CustomEvent(KN);document.dispatchEvent(e)}function hF(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?RO(a,o):a.dispatchEvent(o)}var dye=_l,fye=fF,WS="focusScope.autoFocusOnMount",VS="focusScope.autoFocusOnUnmount",G3={bubbles:!1,cancelable:!0},hye="FocusScope",qh=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,d]=y.useState(null),f=nn(a),m=nn(o),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:zo(p.current,{select:!0})},w=function(C){if(x.paused||!u)return;const A=C.relatedTarget;A!==null&&(u.contains(A)||zo(p.current,{select:!0}))},N=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&zo(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){K3.add(x);const b=document.activeElement;if(!u.contains(b)){const N=new CustomEvent(WS,G3);u.addEventListener(WS,f),u.dispatchEvent(N),N.defaultPrevented||(mye(xye(mF(u)),{select:!0}),document.activeElement===b&&zo(u))}return()=>{u.removeEventListener(WS,f),setTimeout(()=>{const N=new CustomEvent(VS,G3);u.addEventListener(VS,m),u.dispatchEvent(N),N.defaultPrevented||zo(b??document.body,{select:!0}),u.removeEventListener(VS,m),K3.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]=pye(O);C&&A?!b.shiftKey&&N===A?(b.preventDefault(),n&&zo(C,{select:!0})):b.shiftKey&&N===C&&(b.preventDefault(),n&&zo(A,{select:!0})):N===O&&b.preventDefault()}},[n,r,x.paused]);return i.jsx(Pe.div,{tabIndex:-1,...l,ref:g,onKeyDown:j})});qh.displayName=hye;function mye(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zo(r,{select:t}),document.activeElement!==n)return}function pye(e){const t=mF(e),n=Y3(t,e),r=Y3(t.reverse(),e);return[n,r]}function mF(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 Y3(e,t){for(const n of e)if(!vye(n,{upTo:t}))return n}function vye(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 gye(e){return e instanceof HTMLInputElement&&"select"in e}function zo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gye(e)&&t&&e.select()}}var K3=yye();function yye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=X3(e,t),e.unshift(t)},remove(t){e=X3(e,t),e[0]?.resume()}}}function X3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xye(e){return e.filter(t=>t.tagName!=="A")}var bye="Portal",Nl=y.forwardRef((e,t)=>{const{container:n,...r}=e,[a,o]=y.useState(!1);Un(()=>o(!0),[]);const l=n||a&&globalThis?.document?.body;return l?mY.createPortal(i.jsx(Pe.div,{...r,ref:t}),l):null});Nl.displayName=bye;var GS=0;function My(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Z3()),document.body.insertAdjacentElement("beforeend",e[1]??Z3()),GS++,()=>{GS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),GS--}},[])}function Z3(){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 ni=function(){return ni=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ni.apply(this,arguments)};function pF(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 wye(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var ov="right-scroll-bar-position",sv="width-before-scroll-bar",jye="with-scroll-bars-hidden",Sye="--removed-body-scroll-bar-size";function YS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _ye(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 Nye=typeof window<"u"?y.useLayoutEffect:y.useEffect,Q3=new WeakMap;function Oye(e,t){var n=_ye(null,function(r){return e.forEach(function(a){return YS(a,r)})});return Nye(function(){var r=Q3.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(u){o.has(u)||YS(u,null)}),o.forEach(function(u){a.has(u)||YS(u,l)})}Q3.set(n,e)},[e]),n}function Cye(e){return e}function Eye(e,t){t===void 0&&(t=Cye);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(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var m=l;l=[],m.forEach(o)},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 Aye(e){e===void 0&&(e={});var t=Eye(null);return t.options=ni({async:!0,ssr:!1},e),t}var vF=function(e){var t=e.sideCar,n=pF(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,ni({},n))};vF.isSideCarExport=!0;function Tye(e,t){return e.useMedium(t),vF}var gF=Aye(),KS=function(){},Py=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:KS,onWheelCapture:KS,onTouchMoveCapture:KS}),a=r[0],o=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=pF(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,k=Oye([n,t]),T=ni(ni({},A),a);return y.createElement(y.Fragment,null,m&&y.createElement(E,{sideCar:gF,removeScrollBar:f,shards:p,noRelative:x,noIsolation:j,inert:b,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:C}),l?y.cloneElement(y.Children.only(u),ni(ni({},T),{ref:k})):y.createElement(O,ni({},T,{className:d,ref:k}),u))});Py.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Py.classNames={fullWidth:sv,zeroRight:ov};var kye=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mye(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kye();return t&&e.setAttribute("nonce",t),e}function Pye(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Rye(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dye=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mye())&&(Pye(t,n),Rye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$ye=function(){var e=Dye();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yF=function(){var e=$ye(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},Iye={left:0,top:0,right:0,gap:0},XS=function(e){return parseInt(e||"",10)||0},Lye=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[XS(n),XS(r),XS(a)]},Bye=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Iye;var t=Lye(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])}},zye=yF(),Vc="data-scroll-locked",qye=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
||
.`.concat(jye,` {
|
||
overflow: hidden `).concat(r,`;
|
||
padding-right: `).concat(u,"px ").concat(r,`;
|
||
}
|
||
body[`).concat(Vc,`] {
|
||
overflow: hidden `).concat(r,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
||
padding-left: `.concat(a,`px;
|
||
padding-top: `).concat(o,`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(ov,` {
|
||
right: `).concat(u,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(sv,` {
|
||
margin-right: `).concat(u,"px ").concat(r,`;
|
||
}
|
||
|
||
.`).concat(ov," .").concat(ov,` {
|
||
right: 0 `).concat(r,`;
|
||
}
|
||
|
||
.`).concat(sv," .").concat(sv,` {
|
||
margin-right: 0 `).concat(r,`;
|
||
}
|
||
|
||
body[`).concat(Vc,`] {
|
||
`).concat(Sye,": ").concat(u,`px;
|
||
}
|
||
`)},J3=function(){var e=parseInt(document.body.getAttribute(Vc)||"0",10);return isFinite(e)?e:0},Fye=function(){y.useEffect(function(){return document.body.setAttribute(Vc,(J3()+1).toString()),function(){var e=J3()-1;e<=0?document.body.removeAttribute(Vc):document.body.setAttribute(Vc,e.toString())}},[])},Uye=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;Fye();var o=y.useMemo(function(){return Bye(a)},[a]);return y.createElement(zye,{styles:qye(o,!t,a,n?"":"!important")})},XN=!1;if(typeof window<"u")try{var zp=Object.defineProperty({},"passive",{get:function(){return XN=!0,!0}});window.addEventListener("test",zp,zp),window.removeEventListener("test",zp,zp)}catch{XN=!1}var _c=XN?{passive:!1}:!1,Hye=function(e){return e.tagName==="TEXTAREA"},xF=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hye(e)&&n[t]==="visible")},Wye=function(e){return xF(e,"overflowY")},Vye=function(e){return xF(e,"overflowX")},eL=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=bF(e,r);if(a){var o=wF(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gye=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Yye=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},bF=function(e,t){return e==="v"?Wye(t):Vye(t)},wF=function(e,t){return e==="v"?Gye(t):Yye(t)},Kye=function(e,t){return e==="h"&&t==="rtl"?-1:1},Xye=function(e,t,n,r,a){var o=Kye(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),f=!1,m=l>0,p=0,g=0;do{if(!u)break;var x=wF(e,u),j=x[0],b=x[1],w=x[2],N=b-w-o*j;(j||N)&&bF(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},qp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tL=function(e){return[e.deltaX,e.deltaY]},nL=function(e){return e&&"current"in e?e.current:e},Zye=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qye=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},Jye=0,Nc=[];function exe(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(Jye++)[0],o=y.useState(yF)[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=wye([e.lockRef.current],(e.shards||[]).map(nL),!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=qp(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 M=eL(T,k);if(!M)return!0;if(M?E=T:(E=T==="v"?"h":"v",M=eL(T,k)),!M)return!1;if(!r.current&&"changedTouches"in b&&(C||A)&&(r.current=E),!E)return!0;var $=r.current||E;return Xye($,w,b,$==="h"?C:A)},[]),d=y.useCallback(function(b){var w=b;if(!(!Nc.length||Nc[Nc.length-1]!==o)){var N="deltaY"in w?tL(w):qp(w),O=t.current.filter(function(E){return E.name===w.type&&(E.target===w.target||w.target===E.shadowParent)&&Zye(E.delta,N)})[0];if(O&&O.should){w.cancelable&&w.preventDefault();return}if(!O){var C=(l.current.shards||[]).map(nL).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:txe(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=qp(b),r.current=void 0},[]),p=y.useCallback(function(b){f(b.type,tL(b),b.target,u(b,e.lockRef.current))},[]),g=y.useCallback(function(b){f(b.type,qp(b),b.target,u(b,e.lockRef.current))},[]);y.useEffect(function(){return Nc.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,_c),document.addEventListener("touchmove",d,_c),document.addEventListener("touchstart",m,_c),function(){Nc=Nc.filter(function(b){return b!==o}),document.removeEventListener("wheel",d,_c),document.removeEventListener("touchmove",d,_c),document.removeEventListener("touchstart",m,_c)}},[]);var x=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(o,{styles:Qye(a)}):null,x?y.createElement(Uye,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function txe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nxe=Tye(gF,exe);var Fh=y.forwardRef(function(e,t){return y.createElement(Py,ni({},e,{ref:t,sideCar:nxe}))});Fh.classNames=Py.classNames;var rxe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oc=new WeakMap,Fp=new WeakMap,Up={},ZS=0,jF=function(e){return e&&(e.host||jF(e.parentNode))},axe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=jF(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})},ixe=function(e,t,n,r){var a=axe(t,Array.isArray(e)?e:[e]);Up[n]||(Up[n]=new WeakMap);var o=Up[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=(Oc.get(g)||0)+1,w=(o.get(g)||0)+1;Oc.set(g,b),o.set(g,w),l.push(g),b===1&&j&&Fp.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(),ZS++,function(){l.forEach(function(p){var g=Oc.get(p)-1,x=o.get(p)-1;Oc.set(p,g),o.set(p,x),g||(Fp.has(p)||p.removeAttribute(r),Fp.delete(p)),x||p.removeAttribute(n)}),ZS--,ZS||(Oc=new WeakMap,Oc=new WeakMap,Fp=new WeakMap,Up={})}},Ry=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=rxe(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),ixe(r,a,n,"aria-hidden")):function(){return null}};function oxe(e){const t=sxe(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,u=y.Children.toArray(o),d=u.find(cxe);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 i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function sxe(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=dxe(a),u=uxe(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(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 lxe=Symbol("radix.slottable");function cxe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lxe}function uxe(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function dxe(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 Dy="Dialog",[SF,_F]=hr(Dy),[fxe,Ga]=SF(Dy),NF=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,u=y.useRef(null),d=y.useRef(null),[f,m]=Na({prop:r,defaultProp:a??!1,onChange:o,caller:Dy});return i.jsx(fxe,{scope:t,triggerRef:u,contentRef:d,contentId:Fn(),titleId:Fn(),descriptionId:Fn(),open:f,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};NF.displayName=Dy;var OF="DialogTrigger",CF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ga(OF,n),o=qe(t,a.triggerRef);return i.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":tE(a.open),...r,ref:o,onClick:Se(e.onClick,a.onOpenToggle)})});CF.displayName=OF;var JC="DialogPortal",[hxe,EF]=SF(JC,{forceMount:void 0}),AF=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Ga(JC,t);return i.jsx(hxe,{scope:t,forceMount:n,children:y.Children.map(r,l=>i.jsx(Rn,{present:n||o.open,children:i.jsx(Nl,{asChild:!0,container:a,children:l})}))})};AF.displayName=JC;var _g="DialogOverlay",TF=y.forwardRef((e,t)=>{const n=EF(_g,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ga(_g,e.__scopeDialog);return o.modal?i.jsx(Rn,{present:r||o.open,children:i.jsx(pxe,{...a,ref:t})}):null});TF.displayName=_g;var mxe=oxe("DialogOverlay.RemoveScroll"),pxe=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ga(_g,n);return i.jsx(Fh,{as:mxe,allowPinchZoom:!0,shards:[a.contentRef],children:i.jsx(Pe.div,{"data-state":tE(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),hl="DialogContent",kF=y.forwardRef((e,t)=>{const n=EF(hl,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ga(hl,e.__scopeDialog);return i.jsx(Rn,{present:r||o.open,children:o.modal?i.jsx(vxe,{...a,ref:t}):i.jsx(gxe,{...a,ref:t})})});kF.displayName=hl;var vxe=y.forwardRef((e,t)=>{const n=Ga(hl,e.__scopeDialog),r=y.useRef(null),a=qe(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Ry(o)},[]),i.jsx(MF,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,o=>o.preventDefault())})}),gxe=y.forwardRef((e,t)=>{const n=Ga(hl,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return i.jsx(MF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),MF=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,u=Ga(hl,n),d=y.useRef(null),f=qe(t,d);return My(),i.jsxs(i.Fragment,{children:[i.jsx(qh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:i.jsx(_l,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":tE(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(xxe,{titleId:u.titleId}),i.jsx(wxe,{contentRef:d,descriptionId:u.descriptionId})]})]})}),eE="DialogTitle",PF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ga(eE,n);return i.jsx(Pe.h2,{id:a.titleId,...r,ref:t})});PF.displayName=eE;var RF="DialogDescription",DF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ga(RF,n);return i.jsx(Pe.p,{id:a.descriptionId,...r,ref:t})});DF.displayName=RF;var $F="DialogClose",IF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ga($F,n);return i.jsx(Pe.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,()=>a.onOpenChange(!1))})});IF.displayName=$F;function tE(e){return e?"open":"closed"}var LF="DialogTitleWarning",[yxe,BF]=rZ(LF,{contentName:hl,titleName:eE,docsSlug:"dialog"}),xxe=({titleId:e})=>{const t=BF(LF),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},bxe="DialogDescriptionWarning",wxe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${BF(bxe).contentName}}.`;return y.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},nE=NF,zF=CF,rE=AF,$y=TF,Iy=kF,aE=PF,iE=DF,oE=IF;const nr=nE,qF=zF,jxe=rE,FF=y.forwardRef(({className:e,...t},n)=>i.jsx($y,{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}));FF.displayName=$y.displayName;const Hn=y.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(jxe,{children:[i.jsx(FF,{}),i.jsxs(Iy,{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,i.jsxs(oE,{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:[i.jsx(Lh,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hn.displayName=Iy.displayName;const Wn=({className:e,...t})=>i.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Wn.displayName="DialogHeader";const $r=({className:e,...t})=>i.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$r.displayName="DialogFooter";const Vn=y.forwardRef(({className:e,...t},n)=>i.jsx(aE,{ref:n,className:ue("text-lg font-semibold leading-none tracking-tight",e),...t}));Vn.displayName=aE.displayName;const dr=y.forwardRef(({className:e,...t},n)=>i.jsx(iE,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));dr.displayName=iE.displayName;var Sxe=Symbol("radix.slottable");function _xe(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Sxe,t}var UF="AlertDialog",[Nxe]=hr(UF,[_F]),ho=_F(),HF=e=>{const{__scopeAlertDialog:t,...n}=e,r=ho(t);return i.jsx(nE,{...r,...n,modal:!0})};HF.displayName=UF;var Oxe="AlertDialogTrigger",WF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return i.jsx(zF,{...a,...r,ref:t})});WF.displayName=Oxe;var Cxe="AlertDialogPortal",VF=e=>{const{__scopeAlertDialog:t,...n}=e,r=ho(t);return i.jsx(rE,{...r,...n})};VF.displayName=Cxe;var Exe="AlertDialogOverlay",GF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return i.jsx($y,{...a,...r,ref:t})});GF.displayName=Exe;var Gc="AlertDialogContent",[Axe,Txe]=Nxe(Gc),kxe=_xe("AlertDialogContent"),YF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,o=ho(n),l=y.useRef(null),u=qe(t,l),d=y.useRef(null);return i.jsx(yxe,{contentName:Gc,titleName:KF,docsSlug:"alert-dialog",children:i.jsx(Axe,{scope:n,cancelRef:d,children:i.jsxs(Iy,{role:"alertdialog",...o,...a,ref:u,onOpenAutoFocus:Se(a.onOpenAutoFocus,f=>{f.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[i.jsx(kxe,{children:r}),i.jsx(Pxe,{contentRef:l})]})})})});YF.displayName=Gc;var KF="AlertDialogTitle",XF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return i.jsx(aE,{...a,...r,ref:t})});XF.displayName=KF;var ZF="AlertDialogDescription",QF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return i.jsx(iE,{...a,...r,ref:t})});QF.displayName=ZF;var Mxe="AlertDialogAction",JF=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=ho(n);return i.jsx(oE,{...a,...r,ref:t})});JF.displayName=Mxe;var e8="AlertDialogCancel",t8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=Txe(e8,n),o=ho(n),l=qe(t,a);return i.jsx(oE,{...o,...r,ref:l})});t8.displayName=e8;var Pxe=({contentRef:e})=>{const t=`\`${Gc}\` requires a description for the component to be accessible for screen reader users.
|
||
|
||
You can add a description to the \`${Gc}\` by passing a \`${ZF}\` 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 \`${Gc}\`. 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},Rxe=HF,Dxe=WF,$xe=VF,n8=GF,r8=YF,a8=JF,i8=t8,o8=XF,s8=QF;const Pn=Rxe,ra=Dxe,Ixe=$xe,l8=y.forwardRef(({className:e,...t},n)=>i.jsx(n8,{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}));l8.displayName=n8.displayName;const yn=y.forwardRef(({className:e,...t},n)=>i.jsxs(Ixe,{children:[i.jsx(l8,{}),i.jsx(r8,{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})]}));yn.displayName=r8.displayName;const xn=({className:e,...t})=>i.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...t});xn.displayName="AlertDialogHeader";const bn=({className:e,...t})=>i.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});bn.displayName="AlertDialogFooter";const wn=y.forwardRef(({className:e,...t},n)=>i.jsx(o8,{ref:n,className:ue("text-lg font-semibold",e),...t}));wn.displayName=o8.displayName;const jn=y.forwardRef(({className:e,...t},n)=>i.jsx(s8,{ref:n,className:ue("text-sm text-muted-foreground",e),...t}));jn.displayName=s8.displayName;const Sn=y.forwardRef(({className:e,...t},n)=>i.jsx(a8,{ref:n,className:ue(dh(),e),...t}));Sn.displayName=a8.displayName;const _n=y.forwardRef(({className:e,...t},n)=>i.jsx(i8,{ref:n,className:ue(dh({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));_n.displayName=i8.displayName;function Lxe(){return i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"系统设置"}),i.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理您的应用偏好设置"})]})}),i.jsxs(sl,{defaultValue:"appearance",className:"w-full",children:[i.jsxs(Zo,{className:"grid w-full grid-cols-2 sm:grid-cols-4 gap-0.5 sm:gap-1 h-auto p-1",children:[i.jsxs(Ct,{value:"appearance",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[i.jsx(Xq,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),i.jsx("span",{children:"外观"})]}),i.jsxs(Ct,{value:"security",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[i.jsx(cge,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),i.jsx("span",{children:"安全"})]}),i.jsxs(Ct,{value:"other",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[i.jsx(Hc,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),i.jsx("span",{children:"其他"})]}),i.jsxs(Ct,{value:"about",className:"gap-1 sm:gap-2 text-xs sm:text-sm px-2 sm:px-3 py-2",children:[i.jsx(Yq,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4",strokeWidth:2,fill:"none"}),i.jsx("span",{children:"关于"})]})]}),i.jsxs(Kt,{className:"h-[calc(100vh-240px)] sm:h-[calc(100vh-280px)] mt-4 sm:mt-6",children:[i.jsx(Jt,{value:"appearance",className:"mt-0",children:i.jsx(Bxe,{})}),i.jsx(Jt,{value:"security",className:"mt-0",children:i.jsx(zxe,{})}),i.jsx(Jt,{value:"other",className:"mt-0",children:i.jsx(qxe,{})}),i.jsx(Jt,{value:"about",className:"mt-0",children:i.jsx(Fxe,{})})]})]})]})}function rL(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=o=>{o=o.replace("#","");const l=parseInt(o.substring(0,2),16)/255,u=parseInt(o.substring(2,4),16)/255,d=parseInt(o.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 Bxe(){const{theme:e,setTheme:t}=XC(),{enableAnimations:n,setEnableAnimations:r,enableWavesBackground:a,setEnableWavesBackground:o}=nF(),[l,u]=y.useState(()=>localStorage.getItem("accent-color")||"blue");y.useEffect(()=>{const f=localStorage.getItem("accent-color")||"blue";rL(f)},[]);const d=f=>{u(f),localStorage.setItem("accent-color",f),rL(f)};return i.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题模式"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 sm:gap-4",children:[i.jsx(QS,{value:"light",current:e,onChange:t,label:"浅色",description:"始终使用浅色主题"}),i.jsx(QS,{value:"dark",current:e,onChange:t,label:"深色",description:"始终使用深色主题"}),i.jsx(QS,{value:"system",current:e,onChange:t,label:"跟随系统",description:"根据系统设置自动切换"})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"主题色"}),i.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"单色"}),i.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[i.jsx(ba,{value:"blue",current:l,onChange:d,label:"蓝色",colorClass:"bg-blue-500"}),i.jsx(ba,{value:"purple",current:l,onChange:d,label:"紫色",colorClass:"bg-purple-500"}),i.jsx(ba,{value:"green",current:l,onChange:d,label:"绿色",colorClass:"bg-green-500"}),i.jsx(ba,{value:"orange",current:l,onChange:d,label:"橙色",colorClass:"bg-orange-500"}),i.jsx(ba,{value:"pink",current:l,onChange:d,label:"粉色",colorClass:"bg-pink-500"}),i.jsx(ba,{value:"red",current:l,onChange:d,label:"红色",colorClass:"bg-red-500"})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"渐变色"}),i.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-2 sm:gap-3",children:[i.jsx(ba,{value:"gradient-sunset",current:l,onChange:d,label:"日落",colorClass:"bg-gradient-to-r from-orange-500 to-pink-500"}),i.jsx(ba,{value:"gradient-ocean",current:l,onChange:d,label:"海洋",colorClass:"bg-gradient-to-r from-blue-500 to-cyan-500"}),i.jsx(ba,{value:"gradient-forest",current:l,onChange:d,label:"森林",colorClass:"bg-gradient-to-r from-green-500 to-emerald-500"}),i.jsx(ba,{value:"gradient-aurora",current:l,onChange:d,label:"极光",colorClass:"bg-gradient-to-r from-purple-500 to-pink-500"}),i.jsx(ba,{value:"gradient-fire",current:l,onChange:d,label:"烈焰",colorClass:"bg-gradient-to-r from-red-500 to-orange-500"}),i.jsx(ba,{value:"gradient-twilight",current:l,onChange:d,label:"暮光",colorClass:"bg-gradient-to-r from-indigo-500 to-purple-500"})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"text-xs sm:text-sm font-medium mb-2 sm:mb-3",children:"自定义颜色"}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4",children:[i.jsx("div",{className:"flex-1",children:i.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:"选择自定义颜色"})}),i.jsx("div",{className:"flex-1",children:i.jsx(Ne,{type:"text",value:l,onChange:f=>d(f.target.value),placeholder:"#3b82f6",className:"font-mono text-sm"})})]}),i.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground mt-2",children:"点击色块选择颜色,或手动输入 HEX 颜色代码"})]})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"动画效果"}),i.jsxs("div",{className:"space-y-2 sm:space-y-3",children:[i.jsx("div",{className:"rounded-lg border bg-card p-3 sm:p-4",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5 flex-1",children:[i.jsx(J,{htmlFor:"animations",className:"text-base font-medium cursor-pointer",children:"启用动画效果"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后将禁用所有过渡动画和特效,提升性能"})]}),i.jsx(at,{id:"animations",checked:n,onCheckedChange:r})]})}),i.jsx("div",{className:"rounded-lg border bg-card p-4",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5 flex-1",children:[i.jsx(J,{htmlFor:"waves-background",className:"text-base font-medium cursor-pointer",children:"登录页波浪背景"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭后登录页将使用纯色背景,适合低性能设备"})]}),i.jsx(at,{id:"waves-background",checked:a,onCheckedChange:o})]})})]})]})]})}function zxe(){const e=oa(),[t,n]=y.useState(""),[r,a]=y.useState(""),[o,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}=mr(),k=y.useMemo(()=>tye(r),[r]),T=()=>localStorage.getItem("access-token")||"",M=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 i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsx(nr,{open:b,onOpenChange:V,children:i.jsxs(Hn,{className:"sm:max-w-md",children:[i.jsxs(Wn,{children:[i.jsxs(Vn,{className:"flex items-center gap-2",children:[i.jsx(Wc,{className:"h-5 w-5 text-yellow-500"}),"新的 Access Token"]}),i.jsx(dr,{children:"这是您的新 Token,请立即保存。关闭此窗口后将跳转到登录页面。"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"rounded-lg border-2 border-primary/20 bg-primary/5 p-4",children:[i.jsx(J,{className:"text-xs text-muted-foreground mb-2 block",children:"您的新 Token (64位安全令牌)"}),i.jsx("div",{className:"font-mono text-sm break-all select-all bg-background p-3 rounded border",children:N})]}),i.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Wc,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5"}),i.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[i.jsx("p",{className:"font-semibold",children:"重要提示"}),i.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[i.jsx("li",{children:"此 Token 仅显示一次,关闭后无法再查看"}),i.jsx("li",{children:"请立即复制并保存到安全的位置"}),i.jsx("li",{children:"关闭窗口后将自动跳转到登录页面"}),i.jsx("li",{children:"请使用新 Token 重新登录系统"})]})]})]})})]}),i.jsxs($r,{className:"gap-2 sm:gap-0",children:[i.jsx(fe,{variant:"outline",onClick:D,className:"gap-2",children:C?i.jsxs(i.Fragment,{children:[i.jsx(nl,{className:"h-4 w-4 text-green-500"}),"已复制"]}):i.jsxs(i.Fragment,{children:[i.jsx(FN,{className:"h-4 w-4"}),"复制 Token"]})}),i.jsx(fe,{onClick:U,children:"我已保存,关闭"})]})]})}),i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"当前 Access Token"}),i.jsx("div",{className:"space-y-3 sm:space-y-4",children:i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"current-token",className:"text-sm",children:"您的访问令牌"}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(Ne,{id:"current-token",type:o?"text":"password",value:t||T(),readOnly:!0,className:"pr-10 font-mono text-sm",placeholder:"点击查看按钮显示 Token"}),i.jsx("button",{onClick:()=>{t||n(T()),l(!o)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1.5 hover:bg-accent rounded",title:o?"隐藏":"显示",children:o?i.jsx(HN,{className:"h-4 w-4 text-muted-foreground"}):i.jsx(ao,{className:"h-4 w-4 text-muted-foreground"})})]}),i.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[i.jsx(fe,{variant:"outline",size:"icon",onClick:()=>M(T()),title:"复制到剪贴板",className:"flex-shrink-0",children:x?i.jsx(nl,{className:"h-4 w-4 text-green-500"}):i.jsx(FN,{className:"h-4 w-4"})}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsxs(fe,{variant:"outline",disabled:p,className:"gap-2 flex-1 sm:flex-none",children:[i.jsx(al,{className:ue("h-4 w-4",p&&"animate-spin")}),i.jsx("span",{className:"hidden sm:inline",children:"重新生成"}),i.jsx("span",{className:"sm:hidden",children:"生成"})]})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认重新生成 Token"}),i.jsx(jn,{children:"这将生成一个新的 64 位安全令牌,并使当前 Token 立即失效。 您需要使用新 Token 重新登录系统。此操作不可撤销,确定要继续吗?"})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:z,children:"确认生成"})]})]})]})]})]}),i.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground",children:"请妥善保管您的 Access Token,不要泄露给他人"})]})})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"自定义 Access Token"}),i.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"new-token",className:"text-sm",children:"新的访问令牌"}),i.jsxs("div",{className:"relative",children:[i.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"}),i.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?i.jsx(HN,{className:"h-4 w-4 text-muted-foreground"}):i.jsx(ao,{className:"h-4 w-4 text-muted-foreground"})})]}),r&&i.jsxs("div",{className:"mt-3 space-y-2 p-3 rounded-lg bg-muted/50",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"Token 安全要求:"}),i.jsx("div",{className:"space-y-1.5",children:k.rules.map(H=>i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[H.passed?i.jsx(Cu,{className:"h-4 w-4 text-green-500 flex-shrink-0"}):i.jsx(Gq,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),i.jsx("span",{className:ue(H.passed?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:H.label})]},H.id))}),k.isValid&&i.jsx("div",{className:"mt-2 pt-2 border-t border-border",children:i.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[i.jsx(nl,{className:"h-4 w-4"}),i.jsx("span",{className:"font-medium",children:"Token 格式正确,可以使用"})]})})]})]}),i.jsx(fe,{onClick:$,disabled:f||!k.isValid||!r,className:"w-full sm:w-auto",children:f?"更新中...":"更新自定义 Token"})]})]}),i.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:[i.jsx("h4",{className:"text-sm sm:text-base font-semibold text-yellow-900 dark:text-yellow-200 mb-2",children:"安全提示"}),i.jsxs("ul",{className:"text-xs sm:text-sm text-yellow-800 dark:text-yellow-300 space-y-1 list-disc list-inside",children:[i.jsx("li",{children:"重新生成 Token 会创建系统随机生成的 64 位安全令牌"}),i.jsx("li",{children:"自定义 Token 必须满足所有安全要求才能使用"}),i.jsx("li",{children:"更新 Token 后,旧的 Token 将立即失效"}),i.jsx("li",{children:"请在安全的环境下查看和复制 Token"}),i.jsx("li",{children:"如果怀疑 Token 泄露,请立即重新生成或更新"}),i.jsx("li",{children:"建议使用系统生成的 Token 以获得最高安全性"})]})]})]})}function qxe(){const e=oa(),{toast:t}=mr(),[n,r]=y.useState(!1),a=async()=>{r(!0);try{const o=localStorage.getItem("access-token"),l=await fetch("/api/webui/setup/reset",{method:"POST",headers:{Authorization:`Bearer ${o}`}}),u=await l.json();l.ok&&u.success?(t({title:"重置成功",description:"即将进入初次配置向导"}),setTimeout(()=>{e({to:"/setup"})},1e3)):t({title:"重置失败",description:u.message||"无法重置配置状态",variant:"destructive"})}catch(o){console.error("重置配置状态错误:",o),t({title:"重置失败",description:"连接服务器失败",variant:"destructive"})}finally{r(!1)}};return i.jsx("div",{className:"space-y-4 sm:space-y-6",children:i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"配置向导"}),i.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[i.jsx("div",{className:"space-y-2",children:i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"重新进行初次配置向导,可以帮助您重新设置系统的基础配置。"})}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsxs(fe,{variant:"outline",disabled:n,className:"gap-2",children:[i.jsx(Jve,{className:ue("h-4 w-4",n&&"animate-spin")}),"重新进行初次配置"]})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认重新配置"}),i.jsx(jn,{children:"这将带您重新进入初次配置向导。您可以重新设置系统的基础配置项。确定要继续吗?"})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:a,children:"确认重置"})]})]})]})]})]})})}function Fxe(){return i.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsxs("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:["关于 ",QC]}),i.jsxs("div",{className:"space-y-2 text-xs sm:text-sm text-muted-foreground",children:[i.jsxs("p",{children:["版本: ",ZC]}),i.jsx("p",{children:"麦麦(MaiBot)的现代化 Web 管理界面"})]})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"作者"}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:"MaiBot 核心"}),i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"Mai-with-u"})]}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:"WebUI"}),i.jsxs("p",{className:"text-xs sm:text-sm text-muted-foreground",children:["Mai-with-u ",i.jsx("a",{href:"https://github.com/DrSmoothl",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"@MotricSeven"})]})]})]})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"技术栈"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs sm:text-sm text-muted-foreground",children:[i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"font-medium text-foreground",children:"前端框架"}),i.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[i.jsx("li",{children:"React 19.2.0"}),i.jsx("li",{children:"TypeScript 5.7.2"}),i.jsx("li",{children:"Vite 6.0.7"}),i.jsx("li",{children:"TanStack Router 1.94.2"})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"font-medium text-foreground",children:"UI 组件"}),i.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[i.jsx("li",{children:"shadcn/ui"}),i.jsx("li",{children:"Radix UI"}),i.jsx("li",{children:"Tailwind CSS 3.4.17"}),i.jsx("li",{children:"Lucide Icons"})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"font-medium text-foreground",children:"后端"}),i.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[i.jsx("li",{children:"Python 3.12+"}),i.jsx("li",{children:"FastAPI"}),i.jsx("li",{children:"Uvicorn"}),i.jsx("li",{children:"WebSocket"})]})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"font-medium text-foreground",children:"构建工具"}),i.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[i.jsx("li",{children:"Bun / npm"}),i.jsx("li",{children:"ESLint 9.17.0"}),i.jsx("li",{children:"PostCSS"})]})]})]})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"开源库感谢"}),i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mb-3",children:"本项目使用了以下优秀的开源库,感谢他们的贡献:"}),i.jsx(Kt,{className:"h-[300px] sm:h-[400px]",children:i.jsxs("div",{className:"space-y-4 pr-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"UI 框架与组件"}),i.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[i.jsx(Qt,{name:"React",description:"用户界面构建库",license:"MIT"}),i.jsx(Qt,{name:"shadcn/ui",description:"优雅的 React 组件库",license:"MIT"}),i.jsx(Qt,{name:"Radix UI",description:"无样式的可访问组件库",license:"MIT"}),i.jsx(Qt,{name:"Tailwind CSS",description:"实用优先的 CSS 框架",license:"MIT"}),i.jsx(Qt,{name:"Lucide React",description:"精美的图标库",license:"ISC"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"路由与状态管理"}),i.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[i.jsx(Qt,{name:"TanStack Router",description:"类型安全的路由库",license:"MIT"}),i.jsx(Qt,{name:"Zustand",description:"轻量级状态管理",license:"MIT"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"表单处理"}),i.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[i.jsx(Qt,{name:"React Hook Form",description:"高性能表单库",license:"MIT"}),i.jsx(Qt,{name:"Zod",description:"TypeScript 优先的 schema 验证",license:"MIT"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"工具库"}),i.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[i.jsx(Qt,{name:"clsx",description:"条件 className 构建工具",license:"MIT"}),i.jsx(Qt,{name:"tailwind-merge",description:"Tailwind 类名合并工具",license:"MIT"}),i.jsx(Qt,{name:"class-variance-authority",description:"组件变体管理",license:"Apache-2.0"}),i.jsx(Qt,{name:"date-fns",description:"现代化日期处理库",license:"MIT"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"动画效果"}),i.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[i.jsx(Qt,{name:"Framer Motion",description:"React 动画库",license:"MIT"}),i.jsx(Qt,{name:"vaul",description:"抽屉组件动画",license:"MIT"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"后端框架"}),i.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[i.jsx(Qt,{name:"FastAPI",description:"现代化 Python Web 框架",license:"MIT"}),i.jsx(Qt,{name:"Uvicorn",description:"ASGI 服务器",license:"BSD-3-Clause"}),i.jsx(Qt,{name:"Pydantic",description:"数据验证库",license:"MIT"}),i.jsx(Qt,{name:"python-multipart",description:"文件上传支持",license:"Apache-2.0"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-medium text-foreground",children:"开发工具"}),i.jsxs("div",{className:"grid gap-2 text-xs sm:text-sm",children:[i.jsx(Qt,{name:"TypeScript",description:"JavaScript 的超集",license:"Apache-2.0"}),i.jsx(Qt,{name:"Vite",description:"下一代前端构建工具",license:"MIT"}),i.jsx(Qt,{name:"ESLint",description:"JavaScript 代码检查工具",license:"MIT"}),i.jsx(Qt,{name:"PostCSS",description:"CSS 转换工具",license:"MIT"})]})]})]})})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6",children:[i.jsx("h3",{className:"text-base sm:text-lg font-semibold mb-3 sm:mb-4",children:"开源许可"}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"rounded-lg bg-primary/5 border border-primary/20 p-3 sm:p-4",children:i.jsxs("div",{className:"flex items-start gap-2 sm:gap-3",children:[i.jsx("div",{className:"flex-shrink-0 mt-0.5",children:i.jsx("div",{className:"rounded-md bg-primary/10 px-2 py-1",children:i.jsx("span",{className:"text-xs sm:text-sm font-bold text-primary",children:"GPLv3"})})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm sm:text-base font-semibold text-foreground mb-1",children:"MaiBot WebUI"}),i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"本项目采用 GNU General Public License v3.0 开源许可证。 您可以自由地使用、修改和分发本软件,但必须保持相同的开源许可。"})]})]})}),i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"本项目依赖的所有开源库均遵循各自的开源许可证(MIT、Apache-2.0、BSD 等)。 感谢所有开源贡献者的无私奉献。"})]})]})]})}function Qt({name:e,description:t,license:n}){return i.jsxs("div",{className:"flex items-start justify-between gap-2 rounded-lg border bg-muted/30 p-2.5 sm:p-3",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-medium text-foreground truncate",children:e}),i.jsx("p",{className:"text-muted-foreground text-xs mt-0.5",children:t})]}),i.jsx("span",{className:"inline-flex items-center rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary flex-shrink-0",children:n})]})}function QS({value:e,current:t,onChange:n,label:r,description:a}){const o=t===e;return i.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",o?"border-primary bg-accent":"border-border"),children:[o&&i.jsx("div",{className:"absolute top-2 right-2 sm:top-3 sm:right-3 h-2 w-2 rounded-full bg-primary"}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("div",{className:"text-sm sm:text-base font-medium",children:r}),i.jsx("div",{className:"text-[10px] sm:text-xs text-muted-foreground",children:a})]}),i.jsxs("div",{className:"mt-2 sm:mt-3 flex gap-1",children:[e==="light"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-200"}),i.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-300"}),i.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-400"})]}),e==="dark"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-700"}),i.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-800"}),i.jsx("div",{className:"h-2 w-2 rounded-full bg-slate-900"})]}),e==="system"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-200 to-slate-700"}),i.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-300 to-slate-800"}),i.jsx("div",{className:"h-2 w-2 rounded-full bg-gradient-to-r from-slate-400 to-slate-900"})]})]})]})}function ba({value:e,current:t,onChange:n,label:r,colorClass:a}){const o=t===e;return i.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",o?"border-primary bg-accent":"border-border"),children:[o&&i.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"}),i.jsxs("div",{className:"flex flex-col items-center gap-1.5 sm:gap-2",children:[i.jsx("div",{className:ue("h-8 w-8 sm:h-10 sm:w-10 rounded-full",a)}),i.jsx("div",{className:"text-[10px] sm:text-xs font-medium text-center",children:r})]})]})}class Uxe{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 o=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),o),this.mix(this.dot(this.grad3[f%12],t,n-1),this.dot(this.grad3[g%12],t-1,n-1),o),l)}}function Hxe(){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 Uxe(Math.random()),bounding:null});return y.useEffect(()=>{const a=t.current,o=e.current;if(!a||!o)return;const l=r.current,u=()=>{const b=a.getBoundingClientRect();l.bounding=b,o.style.width=`${b.width}px`,o.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,M=(w-O*k)/2;for(let $=0;$<=E;$++){const z=[];for(let U=0;U<=k;U++){const V={x:T+N*$,y:M+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");o.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,M=Math.hypot(k,T),$=Math.max(175,N.vs);if(M<$){const z=1-M/$,D=Math.cos(M*.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)}},[]),i.jsxs("div",{ref:t,className:"waves-background",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",pointerEvents:"none"},children:[i.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"}}),i.jsx("svg",{ref:e,style:{display:"block",width:"100%",height:"100%"},children:i.jsx("style",{children:`
|
||
path {
|
||
fill: none;
|
||
stroke: hsl(var(--primary) / 0.20);
|
||
stroke-width: 1px;
|
||
}
|
||
`})})]})}function Wxe(){const e=oa();y.useEffect(()=>{localStorage.getItem("access-token")||e({to:"/auth"})},[e])}function c8(){return!!localStorage.getItem("access-token")}function Vxe(){const[e,t]=y.useState(""),[n,r]=y.useState(!1),[a,o]=y.useState(""),l=oa(),{enableWavesBackground:u,setEnableWavesBackground:d}=nF(),{theme:f,setTheme:m}=XC();y.useEffect(()=>{c8()&&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(),o(""),!e.trim()){o("请输入 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 o(N.message||"Token 验证失败,请检查后重试")}catch(w){console.error("Token 验证错误:",w),o("连接服务器失败,请检查网络连接")}finally{r(!1)}};return i.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-background p-4",children:[u&&i.jsx(Hxe,{}),i.jsxs(dt,{className:"relative z-10 w-full max-w-md shadow-2xl backdrop-blur-xl bg-card/80 border-border/50",children:[i.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"?i.jsx(YN,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"}):i.jsx(GN,{className:"h-5 w-5",strokeWidth:2.5,fill:"none"})}),i.jsxs(Vt,{className:"space-y-4 text-center",children:[i.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-primary/10",children:i.jsx(B3,{className:"h-8 w-8 text-primary",strokeWidth:2,fill:"none"})}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Gt,{className:"text-2xl font-bold",children:"欢迎使用 MaiBot"}),i.jsx(er,{className:"text-base",children:"请输入您的 Access Token 以继续访问系统"})]})]}),i.jsx(cn,{children:i.jsxs("form",{onSubmit:j,className:"space-y-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"token",className:"text-sm font-medium",children:"Access Token"}),i.jsxs("div",{className:"relative",children:[i.jsx(Dve,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",strokeWidth:2,fill:"none"}),i.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&&i.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:[i.jsx(xg,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2,fill:"none"}),i.jsx("span",{children:a})]}),i.jsx(fe,{type:"submit",className:"w-full",disabled:n,children:n?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),"验证中..."]}):"验证并进入"}),i.jsxs(nr,{children:[i.jsx(qF,{asChild:!0,children:i.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:[i.jsx(dve,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我没有 Token,我该去哪里获得 Token?"]})}),i.jsxs(Hn,{className:"sm:max-w-md",children:[i.jsxs(Wn,{children:[i.jsxs(Vn,{className:"flex items-center gap-2",children:[i.jsx(B3,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"如何获取 Access Token"]}),i.jsx(dr,{children:"Access Token 是访问 MaiBot WebUI 的唯一凭证,请按以下方式获取"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(xge,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),i.jsxs("div",{className:"flex-1 space-y-2",children:[i.jsx("h4",{className:"font-semibold text-sm",children:"方式一:查看启动日志"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"在 MaiBot 启动时,控制台会显示 WebUI Access Token。"}),i.jsxs("div",{className:"rounded bg-background p-2 font-mono text-xs",children:[i.jsx("p",{className:"text-muted-foreground",children:"🔑 WebUI Access Token: abc123..."}),i.jsx("p",{className:"text-muted-foreground",children:"💡 请使用此 Token 登录 WebUI"})]})]})]})}),i.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(VC,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),i.jsxs("div",{className:"flex-1 space-y-2",children:[i.jsx("h4",{className:"font-semibold text-sm",children:"方式二:查看配置文件"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"Token 保存在项目根目录的配置文件中:"}),i.jsx("div",{className:"rounded bg-background p-2 font-mono text-xs break-all",children:i.jsx("code",{className:"text-primary",children:"data/webui.json"})}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:["打开此文件,复制 ",i.jsx("code",{className:"px-1 py-0.5 bg-background rounded",children:"access_token"})," 字段的值"]})]})]})}),i.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-900 bg-yellow-50 dark:bg-yellow-950/30 p-3",children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx(xg,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-500 flex-shrink-0 mt-0.5",strokeWidth:2,fill:"none"}),i.jsxs("div",{className:"text-sm text-yellow-800 dark:text-yellow-300 space-y-1",children:[i.jsx("p",{className:"font-semibold",children:"安全提示"}),i.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[i.jsx("li",{children:"请妥善保管您的 Token,不要泄露给他人"}),i.jsx("li",{children:"如需重置 Token,请在登录后前往系统设置"})]})]})]})})]})]})]}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.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:[i.jsx(uh,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"我觉得这个界面很卡怎么办?"]})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsxs(wn,{className:"flex items-center gap-2",children:[i.jsx(uh,{className:"h-5 w-5 text-primary",strokeWidth:2,fill:"none"}),"关闭背景动画"]}),i.jsx(jn,{children:"背景动画可能会在低性能设备上造成卡顿。关闭动画可以显著提升界面流畅度。"})]}),i.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 space-y-2",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:"关闭动画后,背景将变为纯色,但不影响任何功能的使用。您可以随时在系统设置中重新开启动画。"})}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>d(!1),children:"关闭动画"})]})]})]})]})})]}),i.jsx("div",{className:"absolute bottom-4 left-0 right-0 text-center text-xs text-muted-foreground",children:i.jsx("p",{children:nye})})]})}function Gxe(e,t=[]){let n=[];function r(o,l){const u=y.createContext(l);u.displayName=o+"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 i.jsx(b.Provider,{value:w,children:x})};f.displayName=o+"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 \`${o}\``)}return[f,m]}const a=()=>{const o=n.map(l=>y.createContext(l));return function(u){const d=u?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,Yxe(a,...t)]}function Yxe(...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(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(o)[`__scope${f}`];return{...u,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Kxe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],u8=Kxe.reduce((e,t)=>{const n=Bh(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),sE="Progress",lE=100,[Xxe]=Gxe(sE),[Zxe,Qxe]=Xxe(sE),d8=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:o=Jxe,...l}=e;(a||a===0)&&!aL(a)&&console.error(ebe(`${a}`,"Progress"));const u=aL(a)?a:lE;r!==null&&!iL(r,u)&&console.error(tbe(`${r}`,"Progress"));const d=iL(r,u)?r:null,f=Ng(d)?o(d,u):void 0;return i.jsx(Zxe,{scope:n,value:d,max:u,children:i.jsx(u8.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Ng(d)?d:void 0,"aria-valuetext":f,role:"progressbar","data-state":m8(d,u),"data-value":d??void 0,"data-max":u,...l,ref:t})})});d8.displayName=sE;var f8="ProgressIndicator",h8=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=Qxe(f8,n);return i.jsx(u8.div,{"data-state":m8(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});h8.displayName=f8;function Jxe(e,t){return`${Math.round(e/t*100)}%`}function m8(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ng(e){return typeof e=="number"}function aL(e){return Ng(e)&&!isNaN(e)&&e>0}function iL(e,t){return Ng(e)&&!isNaN(e)&&e<=t&&e>=0}function ebe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${lE}\`.`}function tbe(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 ${lE} if no \`max\` prop is set)
|
||
- \`null\` or \`undefined\` if the progress is indeterminate.
|
||
|
||
Defaulting to \`null\`.`}var p8=d8,nbe=h8;const cE=y.forwardRef(({className:e,value:t,...n},r)=>i.jsx(p8,{ref:r,className:ue("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:i.jsx(nbe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));cE.displayName=p8.displayName;const qt=y.forwardRef(({className:e,...t},n)=>i.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 rbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],abe=rbe.reduce((e,t)=>{const n=Bh(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ibe="Separator",oL="horizontal",obe=["horizontal","vertical"],v8=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=oL,...a}=e,o=sbe(r)?r:oL,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return i.jsx(abe.div,{"data-orientation":o,...u,...a,ref:t})});v8.displayName=ibe;function sbe(e){return obe.includes(e)}var g8=v8;const fh=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>i.jsx(g8,{ref:a,decorative:n,orientation:t,className:ue("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));fh.displayName=g8.displayName;const lbe=zh("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 tn({className:e,variant:t,...n}){return i.jsx("div",{className:ue(lbe({variant:t}),e),...n})}function cbe({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((o,l)=>l!==a)})};return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"qq_account",children:"QQ账号 *"}),i.jsx(Ne,{id:"qq_account",type:"number",placeholder:"请输入机器人的QQ账号",value:e.qq_account||"",onChange:a=>t({...e,qq_account:Number(a.target.value)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人登录使用的QQ账号"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"nickname",children:"昵称 *"}),i.jsx(Ne,{id:"nickname",placeholder:"请输入机器人的昵称",value:e.nickname,onChange:a=>t({...e,nickname:a.target.value})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的主要称呼名称"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{children:"别名"}),i.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:e.alias_names.map((a,o)=>i.jsxs(tn,{variant:"secondary",className:"gap-1",children:[a,i.jsx("button",{type:"button",onClick:()=>r(o),className:"ml-1 hover:text-destructive",children:i.jsx(Lh,{className:"h-3 w-3"})})]},o))}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ne,{id:"alias_input",placeholder:"输入别名后按回车添加",onKeyPress:a=>{a.key==="Enter"&&(n(a.target.value),a.target.value="")}}),i.jsx(fe,{type:"button",variant:"outline",onClick:()=>{const a=document.getElementById("alias_input");a&&(n(a.value),a.value="")},children:"添加"})]}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人的其他称呼,可以添加多个"})]})]})}function ube({config:e,onChange:t}){return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"personality",children:"人格特征 *"}),i.jsx(qt,{id:"personality",placeholder:"描述机器人的人格特质和身份特征(建议120字以内)",value:e.personality,onChange:n=>t({...e,personality:n.target.value}),rows:3}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:是一个女大学生,现在在读大二,会刷贴吧"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"reply_style",children:"表达风格 *"}),i.jsx(qt,{id:"reply_style",placeholder:"描述机器人说话的表达风格、表达习惯",value:e.reply_style,onChange:n=>t({...e,reply_style:n.target.value}),rows:3}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"例如:回复平淡一些,简短一些,说中文,参考贴吧、知乎和微博的回复风格"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"interest",children:"兴趣 *"}),i.jsx(qt,{id:"interest",placeholder:"描述机器人感兴趣的话题",value:e.interest,onChange:n=>t({...e,interest:n.target.value}),rows:2}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"会影响机器人对什么话题进行回复"})]}),i.jsx(fh,{}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"plan_style",children:"群聊说话规则 *"}),i.jsx(qt,{id:"plan_style",placeholder:"机器人在群聊中的行为风格和规则",value:e.plan_style,onChange:n=>t({...e,plan_style:n.target.value}),rows:4}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在群聊中如何行动,例如回复频率、条件等"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"private_plan_style",children:"私聊说话规则 *"}),i.jsx(qt,{id:"private_plan_style",placeholder:"机器人在私聊中的行为风格和规则",value:e.private_plan_style,onChange:n=>t({...e,private_plan_style:n.target.value}),rows:3}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"定义机器人在私聊中的行为方式"})]})]})}function dbe({config:e,onChange:t}){return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(J,{htmlFor:"emoji_chance",children:"表情包激活概率"}),i.jsxs("span",{className:"text-sm text-muted-foreground",children:[(e.emoji_chance*100).toFixed(0),"%"]})]}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人发送表情包的概率"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"max_reg_num",children:"最大表情包数量"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"机器人最多保存的表情包数量"})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx(J,{htmlFor:"do_replace",children:"达到最大数量时替换"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"开启后会删除旧表情包,关闭则不再收集新表情包"})]}),i.jsx(at,{id:"do_replace",checked:e.do_replace,onCheckedChange:n=>t({...e,do_replace:n})})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包注册、破损、删除的时间间隔"})]}),i.jsx(fh,{}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx(J,{htmlFor:"steal_emoji",children:"偷取表情包"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人将一些表情包据为己有"})]}),i.jsx(at,{id:"steal_emoji",checked:e.steal_emoji,onCheckedChange:n=>t({...e,steal_emoji:n})})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx(J,{htmlFor:"content_filtration",children:"启用表情包过滤"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"只保存符合要求的表情包"})]}),i.jsx(at,{id:"content_filtration",checked:e.content_filtration,onCheckedChange:n=>t({...e,content_filtration:n})})]}),e.content_filtration&&i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"filtration_prompt",children:"过滤要求"}),i.jsx(Ne,{id:"filtration_prompt",placeholder:"例如:符合公序良俗",value:e.filtration_prompt,onChange:n=>t({...e,filtration_prompt:n.target.value})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"描述表情包应该符合的要求"})]})]})}function fbe({config:e,onChange:t}){return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx(J,{htmlFor:"enable_tool",children:"启用工具系统"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人使用各种工具增强功能"})]}),i.jsx(at,{id:"enable_tool",checked:e.enable_tool,onCheckedChange:n=>t({...e,enable_tool:n})})]}),i.jsx(fh,{}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx(J,{htmlFor:"enable_mood",children:"启用情绪系统"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"让机器人具有情绪变化能力"})]}),i.jsx(at,{id:"enable_mood",checked:e.enable_mood,onCheckedChange:n=>t({...e,enable_mood:n})})]}),e.enable_mood&&i.jsxs("div",{className:"ml-6 space-y-6 border-l-2 border-primary/20 pl-6",children:[i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"mood_update_threshold",children:"情绪更新阈值"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"值越高,情绪更新越慢"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(J,{htmlFor:"emotion_style",children:"情感特征"}),i.jsx(qt,{id:"emotion_style",placeholder:"描述情绪的变化情况,例如:情绪较为稳定,但遭遇特定事件时起伏较大",value:e.emotion_style||"",onChange:n=>t({...e,emotion_style:n.target.value}),rows:2}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"影响机器人的情绪变化方式"})]})]}),i.jsx(fh,{}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx(J,{htmlFor:"all_global",children:"启用全局黑话模式"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"允许机器人学习和使用群组黑话"})]}),i.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 hbe(){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 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.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 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.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 vbe(){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||{},o=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:o.all_global??!0}}async function gbe(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 ybe(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 xbe(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 bbe(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 o=await a.json();throw new Error(o.detail||"保存其他配置失败")}return{success:!0}}async function sL(){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 wbe(){const e=oa(),{toast:t}=mr(),[n,r]=y.useState(0),[a,o]=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:Xpe},{id:"personality",title:"人格配置",description:"定义机器人的性格和说话风格",icon:Qq},{id:"emoji",title:"表情包",description:"配置表情包相关设置",icon:YC},{id:"other",title:"其他设置",description:"工具、情绪系统等配置",icon:Hc},{id:"complete",title:"完成设置",description:"后续配置提示",icon:uh}],C=(n+1)/O.length*100;y.useEffect(()=>{(async()=>{try{f(!0);const[D,U,V,H]=await Promise.all([hbe(),mbe(),pbe(),vbe()]);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 gbe(m);break;case 1:await ybe(g);break;case 2:await xbe(j);break;case 3:await bbe(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()=>{o(!0);try{if(!await A()){o(!1);return}await sL(),t({title:"配置完成",description:"所有配置已保存,正在跳转..."}),setTimeout(()=>{e({to:"/"})},500)}catch(z){t({title:"完成失败",description:z instanceof Error?z.message:"未知错误",variant:"destructive"})}finally{o(!1)}},M=async()=>{try{await sL(),e({to:"/"})}catch(z){t({title:"跳过失败",description:z instanceof Error?z.message:"未知错误",variant:"destructive"})}},$=()=>{switch(n){case 0:return i.jsx(cbe,{config:m,onChange:p});case 1:return i.jsx(ube,{config:g,onChange:x});case 2:return i.jsx(dbe,{config:j,onChange:b});case 3:return i.jsx(fbe,{config:w,onChange:N});case 4:return i.jsxs("div",{className:"space-y-6 text-center py-8",children:[i.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center",children:i.jsx(uh,{className:"h-8 w-8 text-primary",strokeWidth:2})}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("h3",{className:"text-xl font-semibold",children:"模型配置"}),i.jsx("p",{className:"text-muted-foreground max-w-md mx-auto",children:"为了让机器人正常工作,您需要配置 AI 模型提供商和模型。"})]}),i.jsxs("div",{className:"rounded-lg border bg-muted/50 p-6 max-w-md mx-auto text-left space-y-4",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"mt-0.5",children:i.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"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"配置 API 提供商"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'在"系统设置 → 模型配置 → API 提供商"中添加您的 API 提供商信息'})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"mt-0.5",children:i.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"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"添加模型"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'在"系统设置 → 模型配置 → 模型列表"中添加需要使用的模型'})]})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"mt-0.5",children:i.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"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"配置模型任务"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:'在"系统设置 → 模型配置 → 模型任务配置"中为不同任务分配模型'})]})]})]}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"💡 提示:完成向导后,您可以在系统设置中进行详细的模型配置"})]});default:return null}};return i.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:[i.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[i.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"}),i.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?i.jsxs("div",{className:"relative z-10 text-center",children:[i.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center",children:i.jsx("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-primary border-t-transparent"})}),i.jsx("p",{className:"text-lg font-medium",children:"加载配置中..."}),i.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"正在读取现有配置"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative z-10 w-full max-w-4xl",children:[i.jsxs("div",{className:"mb-6 md:mb-8 text-center",children:[i.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:i.jsx(mge,{className:"h-6 w-6 md:h-8 md:w-8 text-primary",strokeWidth:2,fill:"none"})}),i.jsx("h1",{className:"mb-2 text-2xl md:text-3xl font-bold",children:"首次配置向导"}),i.jsxs("p",{className:"text-sm md:text-base text-muted-foreground",children:["让我们一起完成 ",QC," 的初始配置"]})]}),i.jsxs("div",{className:"mb-6 md:mb-8",children:[i.jsxs("div",{className:"mb-2 flex items-center justify-between text-xs md:text-sm",children:[i.jsxs("span",{className:"text-muted-foreground",children:["步骤 ",n+1," / ",O.length]}),i.jsxs("span",{className:"font-medium text-primary",children:[Math.round(C),"%"]})]}),i.jsx(cE,{value:C,className:"h-2"})]}),i.jsx("div",{className:"mb-6 md:mb-8 flex justify-between",children:O.map((z,D)=>{const U=z.icon;return i.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&&i.jsx("div",{className:ue("absolute left-1/2 top-3 md:top-4 h-0.5 w-full",D<n?"bg-primary":"bg-border")}),i.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?i.jsx(Cu,{className:"h-3 w-3 md:h-4 md:w-4",strokeWidth:2.5,fill:"none"}):i.jsx(U,{className:"h-3 w-3 md:h-4 md:w-4"})}),i.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)})}),i.jsx(dt,{className:"mb-6 md:mb-8 shadow-lg",children:i.jsx(cn,{className:"p-4 md:p-8",children:i.jsxs("div",{className:"min-h-[300px] md:min-h-[400px]",children:[i.jsxs("div",{className:"mb-4 md:mb-6",children:[i.jsx("h2",{className:"mb-2 text-xl md:text-2xl font-semibold",children:O[n].title}),i.jsx("p",{className:"text-sm md:text-base text-muted-foreground",children:O[n].description})]}),i.jsx(Kt,{className:"h-[400px] md:h-[500px]",children:i.jsx("div",{className:"pr-2",children:$()})})]})})}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3 sm:gap-0",children:[i.jsx(fe,{variant:"outline",onClick:k,disabled:n===0||l,className:"w-full sm:w-auto order-2 sm:order-1",children:"上一步"}),i.jsxs("div",{className:"flex gap-2 w-full sm:w-auto order-1 sm:order-2",children:[i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsxs(fe,{variant:"ghost",className:"flex-1 sm:flex-none gap-2",disabled:l||a,children:[i.jsx(dge,{className:"h-4 w-4",strokeWidth:2,fill:"none"}),"跳过向导"]})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认跳过配置向导"}),i.jsx(jn,{children:"您可以随时在系统设置中重新进入配置向导。确定要跳过吗?"})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:M,children:"确认跳过"})]})]})]}),n===O.length-1?i.jsx(fe,{onClick:T,disabled:a||l,className:"flex-1 sm:flex-none",children:a||l?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),l?"保存中...":"完成中..."]}):i.jsxs(i.Fragment,{children:["完成配置",i.jsx(Cu,{className:"ml-2 h-4 w-4",strokeWidth:2,fill:"none"})]})}):i.jsx(fe,{onClick:E,disabled:l,className:"flex-1 sm:flex-none",children:l?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),"保存中..."]}):i.jsxs(i.Fragment,{children:["下一步",i.jsx(Hpe,{className:"ml-2 h-4 w-4",strokeWidth:2,fill:"none"})]})})]})]})]}),i.jsx("div",{className:"relative z-10 mt-6 md:mt-8 text-center text-xs text-muted-foreground",children:i.jsx("p",{children:"您可以随时在设置中修改这些配置"})})]})]})}function y8(){const e=oa();return i.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:i.jsxs("div",{className:"w-full max-w-2xl text-center",children:[i.jsxs("div",{className:"relative mb-8",children:[i.jsx("h1",{className:"text-[150px] font-black leading-none text-primary/10 select-none sm:text-[200px]",children:"404"}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx(Dr,{className:"h-20 w-20 text-primary/30 sm:h-24 sm:w-24"})})]}),i.jsxs("div",{className:"space-y-4 mb-8",children:[i.jsx("h2",{className:"text-2xl font-bold text-foreground sm:text-3xl",children:"页面未找到"}),i.jsx("p",{className:"text-base text-muted-foreground sm:text-lg max-w-md mx-auto",children:"抱歉,您访问的页面不存在或已被移除。请检查 URL 是否正确,或返回首页继续浏览。"})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[i.jsxs(fe,{size:"lg",onClick:()=>e({to:"/"}),className:"gap-2 w-full sm:w-auto",children:[i.jsx(jg,{className:"h-4 w-4"}),"返回首页"]}),i.jsxs(fe,{size:"lg",variant:"outline",onClick:()=>window.history.back(),className:"gap-2 w-full sm:w-auto",children:[i.jsx(Hq,{className:"h-4 w-4"}),"返回上一页"]})]}),i.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:"如果您认为这是一个错误,请联系系统管理员"})})]})})}var x8=["PageUp","PageDown"],b8=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],w8={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Vu="Slider",[ZN,jbe,Sbe]=Nh(Vu),[j8]=hr(Vu,[Sbe]),[_be,Ly]=j8(Vu),S8=y.forwardRef((e,t)=>{const{name:n,min:r=0,max:a=100,step:o=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"?Nbe:Obe,[A=[],E]=Na({prop:m,defaultProp:f,onChange:D=>{[...w.current][N.current]?.focus(),p(D)}}),k=y.useRef(A);function T(D){const U=kbe(A,D);z(D,U)}function M(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=Dbe(o),G=$be(Math.round((D-r)/o)*o+r,H),L=Cf(G,[r,a]);E((R=[])=>{const F=Abe(R,L,U);if(Rbe(F,d*o)){N.current=F.indexOf(L);const K=String(F)!==String(R);return K&&V&&g(F),K?F:R}else return R})}return i.jsx(_be,{scope:e.__scopeSlider,name:n,disabled:u,min:r,max:a,valueIndexToChangeRef:N,thumbs:w.current,values:A,orientation:l,form:j,children:i.jsx(ZN.Provider,{scope:e.__scopeSlider,children:i.jsx(ZN.Slot,{scope:e.__scopeSlider,children:i.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:M,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=x8.includes(D.key)||D.shiftKey&&b8.includes(D.key)?10:1,L=N.current,R=A[L],F=o*G*U;z(R+F,L,{commit:!0})}}})})})})});S8.displayName=Vu;var[_8,N8]=j8(Vu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nbe=y.forwardRef((e,t)=>{const{min:n,max:r,dir:a,inverted:o,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=Iu(a),w=b==="ltr",N=w&&!o||!w&&o;function O(C){const A=j.current||p.getBoundingClientRect(),E=[0,A.width],T=uE(E,N?[n,r]:[r,n]);return j.current=A,T(C-A.left)}return i.jsx(_8,{scope:e.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:i.jsx(O8,{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=w8[N?"from-left":"from-right"].includes(C.key);f?.({event:C,direction:E?-1:1})}})})}),Obe=y.forwardRef((e,t)=>{const{min:n,max:r,inverted:a,onSlideStart:o,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=uE(N,x?[r,n]:[n,r]);return g.current=w,C(b-w.top)}return i.jsx(_8,{scope:e.__scopeSlider,startEdge:x?"bottom":"top",endEdge:x?"top":"bottom",size:"height",direction:x?1:-1,children:i.jsx(O8,{"data-orientation":"vertical",...f,ref:p,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const w=j(b.clientY);o?.(w)},onSlideMove:b=>{const w=j(b.clientY);l?.(w)},onSlideEnd:()=>{g.current=void 0,u?.()},onStepKeyDown:b=>{const N=w8[x?"from-bottom":"from-top"].includes(b.key);d?.({event:b,direction:N?-1:1})}})})}),O8=y.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:u,onStepKeyDown:d,...f}=e,m=Ly(Vu,n);return i.jsx(Pe.span,{...f,ref:t,onKeyDown:Se(e.onKeyDown,p=>{p.key==="Home"?(l(p),p.preventDefault()):p.key==="End"?(u(p),p.preventDefault()):x8.concat(b8).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),o(p))})})}),C8="SliderTrack",E8=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=Ly(C8,n);return i.jsx(Pe.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:t})});E8.displayName=C8;var QN="SliderRange",A8=y.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=Ly(QN,n),o=N8(QN,n),l=y.useRef(null),u=qe(t,l),d=a.values.length,f=a.values.map(g=>M8(g,a.min,a.max)),m=d>1?Math.min(...f):0,p=100-Math.max(...f);return i.jsx(Pe.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:u,style:{...e.style,[o.startEdge]:m+"%",[o.endEdge]:p+"%"}})});A8.displayName=QN;var JN="SliderThumb",T8=y.forwardRef((e,t)=>{const n=jbe(e.__scopeSlider),[r,a]=y.useState(null),o=qe(t,u=>a(u)),l=y.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return i.jsx(Cbe,{...e,ref:o,index:l})}),Cbe=y.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:a,...o}=e,l=Ly(JN,n),u=N8(JN,n),[d,f]=y.useState(null),m=qe(t,O=>f(O)),p=d?l.form||!!d.closest("form"):!0,g=Ty(d),x=l.values[r],j=x===void 0?0:M8(x,l.min,l.max),b=Tbe(r,l.values.length),w=g?.[u.size],N=w?Mbe(w,j,u.direction):0;return y.useEffect(()=>{if(d)return l.thumbs.add(d),()=>{l.thumbs.delete(d)}},[d,l.thumbs]),i.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${j}% + ${N}px)`},children:[i.jsx(ZN.ItemSlot,{scope:e.__scopeSlider,children:i.jsx(Pe.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,...o,ref:m,style:x===void 0?{display:"none"}:e.style,onFocus:Se(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),p&&i.jsx(k8,{name:a??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:x},r)]})});T8.displayName=JN;var Ebe="RadioBubbleInput",k8=y.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const a=y.useRef(null),o=qe(a,r),l=Ay(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]),i.jsx(Pe.input,{style:{display:"none"},...n,ref:o,defaultValue:t})});k8.displayName=Ebe;function Abe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((a,o)=>a-o)}function M8(e,t,n){const o=100/(n-t)*(e-t);return Cf(o,[0,100])}function Tbe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function kbe(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 Mbe(e,t,n){const r=e/2,o=uE([0,50],[0,r]);return(r-o(t)*n)*n}function Pbe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Rbe(e,t){if(t>0){const n=Pbe(e);return Math.min(...n)>=t}return!0}function uE(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 Dbe(e){return(String(e).split(".")[1]||"").length}function $be(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var P8=S8,Ibe=E8,Lbe=A8,Bbe=T8;const dE=y.forwardRef(({className:e,...t},n)=>i.jsxs(P8,{ref:n,className:ue("relative flex w-full touch-none select-none items-center",e),...t,children:[i.jsx(Ibe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:i.jsx(Lbe,{className:"absolute h-full bg-primary"})}),i.jsx(Bbe,{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"})]}));dE.displayName=P8.displayName;const zbe=["top","right","bottom","left"],Qo=Math.min,Jr=Math.max,Og=Math.round,Hp=Math.floor,hi=e=>({x:e,y:e}),qbe={left:"right",right:"left",bottom:"top",top:"bottom"},Fbe={start:"end",end:"start"};function eO(e,t,n){return Jr(e,Qo(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function oo(e){return e.split("-")[0]}function Gu(e){return e.split("-")[1]}function fE(e){return e==="x"?"y":"x"}function hE(e){return e==="y"?"height":"width"}const Ube=new Set(["top","bottom"]);function li(e){return Ube.has(oo(e))?"y":"x"}function mE(e){return fE(li(e))}function Hbe(e,t,n){n===void 0&&(n=!1);const r=Gu(e),a=mE(e),o=hE(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Cg(l)),[l,Cg(l)]}function Wbe(e){const t=Cg(e);return[tO(e),t,tO(t)]}function tO(e){return e.replace(/start|end/g,t=>Fbe[t])}const lL=["left","right"],cL=["right","left"],Vbe=["top","bottom"],Gbe=["bottom","top"];function Ybe(e,t,n){switch(e){case"top":case"bottom":return n?t?cL:lL:t?lL:cL;case"left":case"right":return t?Vbe:Gbe;default:return[]}}function Kbe(e,t,n,r){const a=Gu(e);let o=Ybe(oo(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(tO)))),o}function Cg(e){return e.replace(/left|right|bottom|top/g,t=>qbe[t])}function Xbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function R8(e){return typeof e!="number"?Xbe(e):{top:e,right:e,bottom:e,left:e}}function Eg(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 uL(e,t,n){let{reference:r,floating:a}=e;const o=li(t),l=mE(t),u=hE(l),d=oo(t),f=o==="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(Gu(t)){case"start":x[l]-=g*(n&&f?-1:1);break;case"end":x[l]+=g*(n&&f?-1:1);break}return x}const Zbe=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,u=o.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}=uL(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}=uL(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:x}};async function hh(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:x=0}=io(t,e),j=R8(x),w=u[g?p==="floating"?"reference":"floating":p],N=Eg(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.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(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),A=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},E=Eg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.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 Qbe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=io(e,t)||{};if(f==null)return{};const p=R8(m),g={x:n,y:r},x=mE(a),j=hE(x),b=await l.getDimensions(f),w=x==="y",N=w?"top":"left",O=w?"bottom":"right",C=w?"clientHeight":"clientWidth",A=o.reference[j]+o.reference[x]-g[x]-o.floating[j],E=g[x]-o.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]||o.floating[j]);const M=A/2-E/2,$=T/2-b[j]/2-1,z=Qo(p[N],$),D=Qo(p[O],$),U=z,V=T-b[j]-D,H=T/2-b[j]/2+M,G=eO(U,H,V),L=!d.arrow&&Gu(a)!=null&&H!==G&&o.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}}}),Jbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,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}=io(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const N=oo(a),O=li(u),C=oo(u)===u,A=await(d.isRTL==null?void 0:d.isRTL(f.floating)),E=g||(C||!b?[Cg(u)]:Wbe(u)),k=j!=="none";!g&&k&&E.push(...Kbe(u,b,j,A));const T=[u,...E],M=await hh(t,w),$=[];let z=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&$.push(M[N]),p){const H=Hbe(a,l,A);$.push(M[H[0]],M[H[1]])}if(z=[...z,{placement:a,overflows:$}],!$.every(H=>H<=0)){var D,U;const H=(((D=o.flip)==null?void 0:D.index)||0)+1,G=T[H];if(G&&(!(p==="alignment"?O!==li(G):!1)||z.every(F=>li(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=li(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 dL(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fL(e){return zbe.some(t=>e[t]>=0)}const e0e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=io(e,t);switch(r){case"referenceHidden":{const o=await hh(t,{...a,elementContext:"reference"}),l=dL(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:fL(l)}}}case"escaped":{const o=await hh(t,{...a,altBoundary:!0}),l=dL(o,n.floating);return{data:{escapedOffsets:l,escaped:fL(l)}}}default:return{}}}}},D8=new Set(["left","top"]);async function t0e(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=oo(n),u=Gu(n),d=li(n)==="y",f=D8.has(l)?-1:1,m=o&&d?-1:1,p=io(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 n0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:u}=t,d=await t0e(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:l}}}}},r0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:w=>{let{x:N,y:O}=w;return{x:N,y:O}}},...d}=io(e,t),f={x:n,y:r},m=await hh(t,d),p=li(oo(a)),g=fE(p);let x=f[g],j=f[p];if(o){const w=g==="y"?"top":"left",N=g==="y"?"bottom":"right",O=x+m[w],C=x-m[N];x=eO(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=eO(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]:o,[p]:l}}}}}},a0e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=io(e,t),m={x:n,y:r},p=li(a),g=fE(p);let x=m[g],j=m[p];const b=io(u,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const C=g==="y"?"height":"width",A=o.reference[g]-o.floating[C]+w.mainAxis,E=o.reference[g]+o.reference[C]-w.mainAxis;x<A?x=A:x>E&&(x=E)}if(f){var N,O;const C=g==="y"?"width":"height",A=D8.has(oo(a)),E=o.reference[p]-o.floating[C]+(A&&((N=l.offset)==null?void 0:N[p])||0)+(A?0:w.crossAxis),k=o.reference[p]+o.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}}}},i0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...f}=io(e,t),m=await hh(t,f),p=oo(a),g=Gu(a),x=li(a)==="y",{width:j,height:b}=o.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=Qo(b-m[w],O),E=Qo(j-m[N],C),k=!t.middlewareData.shift;let T=A,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=O),k&&!g){const z=Jr(m.left,0),D=Jr(m.right,0),U=Jr(m.top,0),V=Jr(m.bottom,0);x?M=j-2*(z!==0||D!==0?z+D:Jr(m.left,m.right)):T=b-2*(U!==0||V!==0?U+V:Jr(m.top,m.bottom))}await d({...t,availableWidth:M,availableHeight:T});const $=await l.getDimensions(u.floating);return j!==$.width||b!==$.height?{reset:{rects:!0}}:{}}}};function By(){return typeof window<"u"}function Yu(e){return $8(e)?(e.nodeName||"").toLowerCase():"#document"}function aa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wi(e){var t;return(t=($8(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $8(e){return By()?e instanceof Node||e instanceof aa(e).Node:!1}function Ua(e){return By()?e instanceof Element||e instanceof aa(e).Element:!1}function gi(e){return By()?e instanceof HTMLElement||e instanceof aa(e).HTMLElement:!1}function hL(e){return!By()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof aa(e).ShadowRoot}const o0e=new Set(["inline","contents"]);function Uh(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Ha(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!o0e.has(a)}const s0e=new Set(["table","td","th"]);function l0e(e){return s0e.has(Yu(e))}const c0e=[":popover-open",":modal"];function zy(e){return c0e.some(t=>{try{return e.matches(t)}catch{return!1}})}const u0e=["transform","translate","scale","rotate","perspective"],d0e=["transform","translate","scale","rotate","perspective","filter"],f0e=["paint","layout","strict","content"];function pE(e){const t=vE(),n=Ua(e)?Ha(e):e;return u0e.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)||d0e.some(r=>(n.willChange||"").includes(r))||f0e.some(r=>(n.contain||"").includes(r))}function h0e(e){let t=Jo(e);for(;gi(t)&&!Au(t);){if(pE(t))return t;if(zy(t))return null;t=Jo(t)}return null}function vE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const m0e=new Set(["html","body","#document"]);function Au(e){return m0e.has(Yu(e))}function Ha(e){return aa(e).getComputedStyle(e)}function qy(e){return Ua(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jo(e){if(Yu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hL(e)&&e.host||wi(e);return hL(t)?t.host:t}function I8(e){const t=Jo(e);return Au(t)?e.ownerDocument?e.ownerDocument.body:e.body:gi(t)&&Uh(t)?t:I8(t)}function mh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=I8(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=aa(a);if(o){const u=nO(l);return t.concat(l,l.visualViewport||[],Uh(a)?a:[],u&&n?mh(u):[])}return t.concat(a,mh(a,[],n))}function nO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function L8(e){const t=Ha(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=gi(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Og(n)!==o||Og(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function gE(e){return Ua(e)?e:e.contextElement}function Yc(e){const t=gE(e);if(!gi(t))return hi(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=L8(t);let l=(o?Og(n.width):n.width)/r,u=(o?Og(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const p0e=hi(0);function B8(e){const t=aa(e);return!vE()||!t.visualViewport?p0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function v0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==aa(e)?!1:t}function ml(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=gE(e);let l=hi(1);t&&(r?Ua(r)&&(l=Yc(r)):l=Yc(e));const u=v0e(o,n,r)?B8(o):hi(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(o){const g=aa(o),x=r&&Ua(r)?aa(r):r;let j=g,b=nO(j);for(;b&&r&&x!==j;){const w=Yc(b),N=b.getBoundingClientRect(),O=Ha(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=aa(b),b=nO(j)}}return Eg({width:m,height:p,x:d,y:f})}function Fy(e,t){const n=qy(e).scrollLeft;return t?t.left+n:ml(wi(e)).left+n}function z8(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fy(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function g0e(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=wi(r),u=t?zy(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},f=hi(1);const m=hi(0),p=gi(r);if((p||!p&&!o)&&((Yu(r)!=="body"||Uh(l))&&(d=qy(r)),gi(r))){const x=ml(r);f=Yc(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const g=l&&!p&&!o?z8(l,d):hi(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 y0e(e){return Array.from(e.getClientRects())}function x0e(e){const t=wi(e),n=qy(e),r=e.ownerDocument.body,a=Jr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Jr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Fy(e);const u=-n.scrollTop;return Ha(r).direction==="rtl"&&(l+=Jr(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:u}}const mL=25;function b0e(e,t){const n=aa(e),r=wi(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){o=a.width,l=a.height;const m=vE();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Fy(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<=mL&&(o-=j)}else f<=mL&&(o+=f);return{width:o,height:l,x:u,y:d}}const w0e=new Set(["absolute","fixed"]);function j0e(e,t){const n=ml(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=gi(e)?Yc(e):hi(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=a*o.x,f=r*o.y;return{width:l,height:u,x:d,y:f}}function pL(e,t,n){let r;if(t==="viewport")r=b0e(e,n);else if(t==="document")r=x0e(wi(e));else if(Ua(t))r=j0e(t,n);else{const a=B8(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Eg(r)}function q8(e,t){const n=Jo(e);return n===t||!Ua(n)||Au(n)?!1:Ha(n).position==="fixed"||q8(n,t)}function S0e(e,t){const n=t.get(e);if(n)return n;let r=mh(e,[],!1).filter(u=>Ua(u)&&Yu(u)!=="body"),a=null;const o=Ha(e).position==="fixed";let l=o?Jo(e):e;for(;Ua(l)&&!Au(l);){const u=Ha(l),d=pE(l);!d&&u.position==="fixed"&&(a=null),(o?!d&&!a:!d&&u.position==="static"&&!!a&&w0e.has(a.position)||Uh(l)&&!d&&q8(e,l))?r=r.filter(m=>m!==l):a=u,l=Jo(l)}return t.set(e,r),r}function _0e(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?zy(t)?[]:S0e(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const p=pL(t,m,a);return f.top=Jr(p.top,f.top),f.right=Qo(p.right,f.right),f.bottom=Qo(p.bottom,f.bottom),f.left=Jr(p.left,f.left),f},pL(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function N0e(e){const{width:t,height:n}=L8(e);return{width:t,height:n}}function O0e(e,t,n){const r=gi(t),a=wi(t),o=n==="fixed",l=ml(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=hi(0);function f(){d.x=Fy(a)}if(r||!r&&!o)if((Yu(t)!=="body"||Uh(a))&&(u=qy(t)),r){const x=ml(t,!0,o,t);d.x=x.x+t.clientLeft,d.y=x.y+t.clientTop}else a&&f();o&&!r&&a&&f();const m=a&&!r&&!o?z8(a,u):hi(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 JS(e){return Ha(e).position==="static"}function vL(e,t){if(!gi(e)||Ha(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wi(e)===n&&(n=n.ownerDocument.body),n}function F8(e,t){const n=aa(e);if(zy(e))return n;if(!gi(e)){let a=Jo(e);for(;a&&!Au(a);){if(Ua(a)&&!JS(a))return a;a=Jo(a)}return n}let r=vL(e,t);for(;r&&l0e(r)&&JS(r);)r=vL(r,t);return r&&Au(r)&&JS(r)&&!pE(r)?n:r||h0e(e)||n}const C0e=async function(e){const t=this.getOffsetParent||F8,n=this.getDimensions,r=await n(e.floating);return{reference:O0e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function E0e(e){return Ha(e).direction==="rtl"}const A0e={convertOffsetParentRelativeRectToViewportRelativeRect:g0e,getDocumentElement:wi,getClippingRect:_0e,getOffsetParent:F8,getElementRects:C0e,getClientRects:y0e,getDimensions:N0e,getScale:Yc,isElement:Ua,isRTL:E0e};function U8(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function T0e(e,t){let n=null,r;const a=wi(e);function o(){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),o();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:x}=f;if(u||t(),!g||!x)return;const j=Hp(p),b=Hp(a.clientWidth-(m+g)),w=Hp(a.clientHeight-(p+x)),N=Hp(m),C={rootMargin:-j+"px "+-b+"px "+-w+"px "+-N+"px",threshold:Jr(0,Qo(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&&!U8(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),o}function k0e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=gE(e),m=a||o?[...f?mh(f):[],...mh(t)]:[];m.forEach(N=>{a&&N.addEventListener("scroll",n,{passive:!0}),o&&N.addEventListener("resize",n)});const p=f&&u?T0e(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?ml(e):null;d&&w();function w(){const N=ml(e);b&&!U8(b,N)&&n(),b=N,j=requestAnimationFrame(w)}return n(),()=>{var N;m.forEach(O=>{a&&O.removeEventListener("scroll",n),o&&O.removeEventListener("resize",n)}),p?.(),(N=x)==null||N.disconnect(),x=null,d&&cancelAnimationFrame(j)}}const M0e=n0e,P0e=r0e,R0e=Jbe,D0e=i0e,$0e=e0e,gL=Qbe,I0e=a0e,L0e=(e,t,n)=>{const r=new Map,a={platform:A0e,...n},o={...a.platform,_c:r};return Zbe(e,t,{...a,platform:o})};var B0e=typeof document<"u",z0e=function(){},lv=B0e?y.useLayoutEffect:z0e;function Ag(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(!Ag(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 o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Ag(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function H8(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yL(e,t){const n=H8(e);return Math.round(t*n)/n}function e_(e){const t=y.useRef(e);return lv(()=>{t.current=e}),t}function q0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,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);Ag(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=o||j,E=l||w,k=y.useRef(null),T=y.useRef(null),M=y.useRef(m),$=d!=null,z=e_(d),D=e_(a),U=e_(f),V=y.useCallback(()=>{if(!k.current||!T.current)return;const F={placement:t,strategy:n,middleware:g};D.current&&(F.platform=D.current),L0e(k.current,T.current,F).then(K=>{const te={...K,isPositioned:U.current!==!1};H.current&&!Ag(M.current,te)&&(M.current=te,yl.flushSync(()=>{p(te)}))})},[g,t,n,D,U]);lv(()=>{f===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(F=>({...F,isPositioned:!1})))},[f]);const H=y.useRef(!1);lv(()=>(H.current=!0,()=>{H.current=!1}),[]),lv(()=>{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=yL(L.floating,m.x),te=yL(L.floating,m.y);return u?{...F,transform:"translate("+K+"px, "+te+"px)",...H8(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 F0e=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?gL({element:r.current,padding:a}).fn(n):{}:r?gL({element:r,padding:a}).fn(n):{}}}},U0e=(e,t)=>({...M0e(e),options:[e,t]}),H0e=(e,t)=>({...P0e(e),options:[e,t]}),W0e=(e,t)=>({...I0e(e),options:[e,t]}),V0e=(e,t)=>({...R0e(e),options:[e,t]}),G0e=(e,t)=>({...D0e(e),options:[e,t]}),Y0e=(e,t)=>({...$0e(e),options:[e,t]}),K0e=(e,t)=>({...F0e(e),options:[e,t]});var X0e="Arrow",W8=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return i.jsx(Pe.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});W8.displayName=X0e;var Z0e=W8,yE="Popper",[V8,ls]=hr(yE),[Q0e,G8]=V8(yE),Y8=e=>{const{__scopePopper:t,children:n}=e,[r,a]=y.useState(null);return i.jsx(Q0e,{scope:t,anchor:r,onAnchorChange:a,children:n})};Y8.displayName=yE;var K8="PopperAnchor",X8=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=G8(K8,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&&o.onAnchorChange(d.current)}),r?null:i.jsx(Pe.div,{...a,ref:u})});X8.displayName=K8;var xE="PopperContent",[J0e,ewe]=V8(xE),Z8=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="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=G8(xE,n),[N,O]=y.useState(null),C=qe(t,ee=>O(ee)),[A,E]=y.useState(null),k=Ty(A),T=k?.width??0,M=k?.height??0,$=r+(o!=="center"?"-"+o:""),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(nwe),altBoundary:U},{refs:H,floatingStyles:G,placement:L,isPositioned:R,middlewareData:F}=q0e({strategy:"fixed",placement:$,whileElementsMounted:(...ee)=>k0e(...ee,{animationFrame:x==="always"}),elements:{reference:w.anchor},middleware:[U0e({mainAxis:a+M,alignmentAxis:l}),d&&H0e({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?W0e():void 0,...V}),d&&V0e({...V}),G0e({...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&&K0e({element:A,padding:u}),rwe({arrowWidth:T,arrowHeight:M}),g&&Y0e({strategy:"referenceHidden",...V})]}),[K,te]=eU(L),I=nn(j);Un(()=>{R&&I?.()},[R,I]);const B=F.arrow?.x,Y=F.arrow?.y,ne=F.arrow?.centerOffset!==0,[oe,xe]=y.useState();return Un(()=>{N&&xe(window.getComputedStyle(N).zIndex)},[N]),i.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:i.jsx(J0e,{scope:n,placedSide:K,onArrowChange:E,arrowX:B,arrowY:Y,shouldHideArrow:ne,children:i.jsx(Pe.div,{"data-side":K,"data-align":te,...b,ref:C,style:{...b.style,animation:R?void 0:"none"}})})})});Z8.displayName=xE;var Q8="PopperArrow",twe={top:"bottom",right:"left",bottom:"top",left:"right"},J8=y.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=ewe(Q8,r),l=twe[o.placedSide];return i.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:i.jsx(Z0e,{...a,ref:n,style:{...a.style,display:"block"}})})});J8.displayName=Q8;function nwe(e){return e!==null}var rwe=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]=eU(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 eU(e){const[t,n="center"]=e.split("-");return[t,n]}var Hh=Y8,Wh=X8,Uy=Z8,Hy=J8;function awe(e){const t=iwe(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,u=y.Children.toArray(o),d=u.find(swe);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 i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function iwe(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=cwe(a),u=lwe(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(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 owe=Symbol("radix.slottable");function swe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===owe}function lwe(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function cwe(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 tU=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"}),uwe="VisuallyHidden",Wy=y.forwardRef((e,t)=>i.jsx(Pe.span,{...e,ref:t,style:{...tU,...e.style}}));Wy.displayName=uwe;var dwe=Wy,fwe=[" ","Enter","ArrowUp","ArrowDown"],hwe=[" ","Enter"],pl="Select",[Vy,Gy,mwe]=Nh(pl),[Ku]=hr(pl,[mwe,ls]),Yy=ls(),[pwe,cs]=Ku(pl),[vwe,gwe]=Ku(pl),nU=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:p,disabled:g,required:x,form:j}=e,b=Yy(t),[w,N]=y.useState(null),[O,C]=y.useState(null),[A,E]=y.useState(!1),k=Iu(f),[T,M]=Na({prop:r,defaultProp:a??!1,onChange:o,caller:pl}),[$,z]=Na({prop:l,defaultProp:u,onChange:d,caller:pl}),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 i.jsx(Hh,{...b,children:i.jsxs(pwe,{required:x,scope:t,trigger:w,onTriggerChange:N,valueNode:O,onValueNodeChange:C,valueNodeHasChildren:A,onValueNodeHasChildrenChange:E,contentId:Fn(),value:$,onValueChange:z,open:T,onOpenChange:M,dir:k,triggerPointerDownPosRef:D,disabled:g,children:[i.jsx(Vy.Provider,{scope:t,children:i.jsx(vwe,{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?i.jsxs(OU,{"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?i.jsx("option",{value:""}):null,Array.from(V)]},G):null]})})};nU.displayName=pl;var rU="SelectTrigger",aU=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Yy(n),l=cs(rU,n),u=l.disabled||r,d=qe(t,l.onTriggerChange),f=Gy(n),m=y.useRef("touch"),[p,g,x]=EU(b=>{const w=f().filter(C=>!C.disabled),N=w.find(C=>C.value===l.value),O=AU(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 i.jsx(Wh,{asChild:!0,...o,children:i.jsx(Pe.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":CU(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===" ")&&fwe.includes(b.key)&&(j(),b.preventDefault())})})})});aU.displayName=rU;var iU="SelectValue",oU=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...u}=e,d=cs(iU,n),{onValueNodeHasChildrenChange:f}=d,m=o!==void 0,p=qe(t,d.onValueNodeChange);return Un(()=>{f(m)},[f,m]),i.jsx(Pe.span,{...u,ref:p,style:{pointerEvents:"none"},children:CU(d.value)?i.jsx(i.Fragment,{children:l}):o})});oU.displayName=iU;var ywe="SelectIcon",sU=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return i.jsx(Pe.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});sU.displayName=ywe;var xwe="SelectPortal",lU=e=>i.jsx(Nl,{asChild:!0,...e});lU.displayName=xwe;var vl="SelectContent",cU=y.forwardRef((e,t)=>{const n=cs(vl,e.__scopeSelect),[r,a]=y.useState();if(Un(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?yl.createPortal(i.jsx(uU,{scope:e.__scopeSelect,children:i.jsx(Vy.Slot,{scope:e.__scopeSelect,children:i.jsx("div",{children:e.children})})}),o):null}return i.jsx(dU,{...e,ref:t})});cU.displayName=vl;var $a=10,[uU,us]=Ku(vl),bwe="SelectContentImpl",wwe=awe("SelectContent.RemoveScroll"),dU=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,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=cs(vl,n),[C,A]=y.useState(null),[E,k]=y.useState(null),T=qe(t,ee=>A(ee)),[M,$]=y.useState(null),[z,D]=y.useState(null),U=Gy(n),[V,H]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(C)return Ry(C)},[C]),My();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([M,C]),[L,M,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]=EU(ee=>{const ae=U().filter(je=>!je.disabled),Z=ae.find(je=>je.ref.current===document.activeElement),pe=AU(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"?rO:fU,xe=oe===rO?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:x,sticky:j,hideWhenDetached:b,avoidCollisions:w}:{};return i.jsx(uU,{scope:n,content:C,viewport:E,onViewportChange:k,itemRefCallback:B,selectedItem:M,onItemLeave:Y,itemTextRefCallback:ne,focusSelectedItem:R,selectedItemText:z,position:r,isPositioned:V,searchRef:te,children:i.jsx(Fh,{as:wwe,allowPinchZoom:!0,children:i.jsx(qh,{asChild:!0,trapped:O.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:Se(a,ee=>{O.trigger?.focus({preventScroll:!0}),ee.preventDefault()}),children:i.jsx(_l,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:i.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()}})})})})})})});dU.displayName=bwe;var jwe="SelectItemAlignedPosition",fU=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=cs(vl,n),l=us(vl,n),[u,d]=y.useState(null),[f,m]=y.useState(null),p=qe(t,T=>m(T)),g=Gy(n),x=y.useRef(!1),j=y.useRef(!0),{viewport:b,selectedItem:w,selectedItemText:N,focusSelectedItem:O}=l,C=y.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&f&&b&&w&&N){const T=o.trigger.getBoundingClientRect(),M=f.getBoundingClientRect(),$=o.valueNode.getBoundingClientRect(),z=N.getBoundingClientRect();if(o.dir!=="rtl"){const je=z.left-M.left,le=$.left-je,Re=T.left-le,_e=T.width+Re,me=Math.max(_e,M.width),ve=window.innerWidth-$a,Le=Cf(le,[$a,Math.max($a,ve-me)]);u.style.minWidth=_e+"px",u.style.left=Le+"px"}else{const je=M.right-z.right,le=window.innerWidth-$.right-je,Re=window.innerWidth-T.right-le,_e=T.width+Re,me=Math.max(_e,M.width),ve=window.innerWidth-$a,Le=Cf(le,[$a,Math.max($a,ve-me)]);u.style.minWidth=_e+"px",u.style.right=Le+"px"}const D=g(),U=window.innerHeight-$a*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-$a,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=`${$a}px 0`,u.style.minHeight=te+"px",u.style.maxHeight=U+"px",r?.(),requestAnimationFrame(()=>x.current=!0)}},[g,o.trigger,o.valueNode,u,f,b,w,N,o.dir,r]);Un(()=>C(),[C]);const[A,E]=y.useState();Un(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);const k=y.useCallback(T=>{T&&j.current===!0&&(C(),O?.(),j.current=!1)},[C,O]);return i.jsx(_we,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:k,children:i.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:i.jsx(Pe.div,{...a,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});fU.displayName=jwe;var Swe="SelectPopperPosition",rO=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=$a,...o}=e,l=Yy(n);return i.jsx(Uy,{...l,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.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)"}})});rO.displayName=Swe;var[_we,bE]=Ku(vl,{}),aO="SelectViewport",hU=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=us(aO,n),l=bE(aO,n),u=qe(t,o.onViewportChange),d=y.useRef(0);return i.jsxs(i.Fragment,{children:[i.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}),i.jsx(Vy.Slot,{scope:n,children:i.jsx(Pe.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-$a*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})})})]})});hU.displayName=aO;var mU="SelectGroup",[Nwe,Owe]=Ku(mU),Cwe=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Fn();return i.jsx(Nwe,{scope:n,id:a,children:i.jsx(Pe.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Cwe.displayName=mU;var pU="SelectLabel",vU=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Owe(pU,n);return i.jsx(Pe.div,{id:a.id,...r,ref:t})});vU.displayName=pU;var Tg="SelectItem",[Ewe,gU]=Ku(Tg),yU=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,u=cs(Tg,n),d=us(Tg,n),f=u.value===r,[m,p]=y.useState(o??""),[g,x]=y.useState(!1),j=qe(t,O=>d.itemRefCallback?.(O,r,a)),b=Fn(),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 i.jsx(Ewe,{scope:n,value:r,disabled:a,textId:b,isSelected:f,onItemTextChange:y.useCallback(O=>{p(C=>C||(O?.textContent??"").trim())},[]),children:i.jsx(Vy.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:i.jsx(Pe.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===" "||(hwe.includes(O.key)&&N(),O.key===" "&&O.preventDefault())})})})})});yU.displayName=Tg;var ff="SelectItemText",xU=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=cs(ff,n),u=us(ff,n),d=gU(ff,n),f=gwe(ff,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(()=>i.jsx("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:b,onNativeOptionRemove:w}=f;return Un(()=>(b(j),()=>w(j)),[b,w,j]),i.jsxs(i.Fragment,{children:[i.jsx(Pe.span,{id:d.textId,...o,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?yl.createPortal(o.children,l.valueNode):null]})});xU.displayName=ff;var bU="SelectItemIndicator",wU=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gU(bU,n).isSelected?i.jsx(Pe.span,{"aria-hidden":!0,...r,ref:t}):null});wU.displayName=bU;var iO="SelectScrollUpButton",jU=y.forwardRef((e,t)=>{const n=us(iO,e.__scopeSelect),r=bE(iO,e.__scopeSelect),[a,o]=y.useState(!1),l=qe(t,r.onScrollButtonChange);return Un(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?i.jsx(_U,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});jU.displayName=iO;var oO="SelectScrollDownButton",SU=y.forwardRef((e,t)=>{const n=us(oO,e.__scopeSelect),r=bE(oO,e.__scopeSelect),[a,o]=y.useState(!1),l=qe(t,r.onScrollButtonChange);return Un(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;o(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?i.jsx(_U,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});SU.displayName=oO;var _U=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=us("SelectScrollButton",n),l=y.useRef(null),u=Gy(n),d=y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return y.useEffect(()=>()=>d(),[d]),Un(()=>{u().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),i.jsx(Pe.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,()=>{o.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Se(a.onPointerLeave,()=>{d()})})}),Awe="SelectSeparator",NU=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i.jsx(Pe.div,{"aria-hidden":!0,...r,ref:t})});NU.displayName=Awe;var sO="SelectArrow",Twe=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Yy(n),o=cs(sO,n),l=us(sO,n);return o.open&&l.position==="popper"?i.jsx(Hy,{...a,...r,ref:t}):null});Twe.displayName=sO;var kwe="SelectBubbleInput",OU=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=y.useRef(null),o=qe(r,a),l=Ay(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]),i.jsx(Pe.select,{...n,style:{...tU,...n.style},ref:o,defaultValue:t})});OU.displayName=kwe;function CU(e){return e===""||e===void 0}function EU(e){const t=nn(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]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function AU(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=Mwe(e,Math.max(o,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 Mwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Pwe=nU,TU=aU,Rwe=oU,Dwe=sU,$we=lU,kU=cU,Iwe=hU,MU=vU,PU=yU,Lwe=xU,Bwe=wU,RU=jU,DU=SU,$U=NU;const Et=Pwe,At=Rwe,wt=y.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(TU,{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,i.jsx(Dwe,{asChild:!0,children:i.jsx(ch,{className:"h-4 w-4 opacity-50"})})]}));wt.displayName=TU.displayName;const IU=y.forwardRef(({className:e,...t},n)=>i.jsx(RU,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(qN,{className:"h-4 w-4"})}));IU.displayName=RU.displayName;const LU=y.forwardRef(({className:e,...t},n)=>i.jsx(DU,{ref:n,className:ue("flex cursor-default items-center justify-center py-1",e),...t,children:i.jsx(ch,{className:"h-4 w-4"})}));LU.displayName=DU.displayName;const jt=y.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>i.jsx($we,{children:i.jsxs(kU,{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:[i.jsx(IU,{}),i.jsx(Iwe,{className:ue("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),i.jsx(LU,{})]})}));jt.displayName=kU.displayName;const zwe=y.forwardRef(({className:e,...t},n)=>i.jsx(MU,{ref:n,className:ue("px-2 py-1.5 text-sm font-semibold",e),...t}));zwe.displayName=MU.displayName;const Me=y.forwardRef(({className:e,children:t,...n},r)=>i.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:[i.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(Bwe,{children:i.jsx(nl,{className:"h-4 w-4"})})}),i.jsx(Lwe,{children:t})]}));Me.displayName=PU.displayName;const qwe=y.forwardRef(({className:e,...t},n)=>i.jsx($U,{ref:n,className:ue("-mx-1 my-1 h-px bg-muted",e),...t}));qwe.displayName=$U.displayName;function Fwe(e){const t=Uwe(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,u=y.Children.toArray(o),d=u.find(Wwe);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 i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function Uwe(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=Gwe(a),u=Vwe(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(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 Hwe=Symbol("radix.slottable");function Wwe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Hwe}function Vwe(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function Gwe(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 Ky="Popover",[BU]=hr(Ky,[ls]),Vh=ls(),[Ywe,ds]=BU(Ky),zU=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!1}=e,u=Vh(t),d=y.useRef(null),[f,m]=y.useState(!1),[p,g]=Na({prop:r,defaultProp:a??!1,onChange:o,caller:Ky});return i.jsx(Hh,{...u,children:i.jsx(Ywe,{scope:t,contentId:Fn(),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})})};zU.displayName=Ky;var qU="PopoverAnchor",Kwe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=ds(qU,n),o=Vh(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=a;return y.useEffect(()=>(l(),()=>u()),[l,u]),i.jsx(Wh,{...o,...r,ref:t})});Kwe.displayName=qU;var FU="PopoverTrigger",UU=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=ds(FU,n),o=Vh(n),l=qe(t,a.triggerRef),u=i.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":YU(a.open),...r,ref:l,onClick:Se(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?u:i.jsx(Wh,{asChild:!0,...o,children:u})});UU.displayName=FU;var wE="PopoverPortal",[Xwe,Zwe]=BU(wE,{forceMount:void 0}),HU=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,o=ds(wE,t);return i.jsx(Xwe,{scope:t,forceMount:n,children:i.jsx(Rn,{present:n||o.open,children:i.jsx(Nl,{asChild:!0,container:a,children:r})})})};HU.displayName=wE;var Tu="PopoverContent",WU=y.forwardRef((e,t)=>{const n=Zwe(Tu,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=ds(Tu,e.__scopePopover);return i.jsx(Rn,{present:r||o.open,children:o.modal?i.jsx(Jwe,{...a,ref:t}):i.jsx(eje,{...a,ref:t})})});WU.displayName=Tu;var Qwe=Fwe("PopoverContent.RemoveScroll"),Jwe=y.forwardRef((e,t)=>{const n=ds(Tu,e.__scopePopover),r=y.useRef(null),a=qe(t,r),o=y.useRef(!1);return y.useEffect(()=>{const l=r.current;if(l)return Ry(l)},[]),i.jsx(Fh,{as:Qwe,allowPinchZoom:!0,children:i.jsx(VU,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,l=>{l.preventDefault(),o.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;o.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Se(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),eje=y.forwardRef((e,t)=>{const n=ds(Tu,e.__scopePopover),r=y.useRef(!1),a=y.useRef(!1);return i.jsx(VU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),VU=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,...p}=e,g=ds(Tu,n),x=Vh(n);return My(),i.jsx(qh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:i.jsx(_l,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:m,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onDismiss:()=>g.onOpenChange(!1),children:i.jsx(Uy,{"data-state":YU(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)"}})})})}),GU="PopoverClose",tje=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=ds(GU,n);return i.jsx(Pe.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,()=>a.onOpenChange(!1))})});tje.displayName=GU;var nje="PopoverArrow",rje=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Vh(n);return i.jsx(Hy,{...a,...r,ref:t})});rje.displayName=nje;function YU(e){return e?"open":"closed"}var aje=zU,ije=UU,oje=HU,KU=WU;const es=aje,ts=ije,so=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>i.jsx(oje,{children:i.jsx(KU,{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})}));so.displayName=KU.displayName;const Xu="/api/webui/config";async function sje(){const t=await(await Ze(`${Xu}/bot`)).json();if(!t.success)throw new Error("获取配置数据失败");return t.config}async function kg(){const t=await(await Ze(`${Xu}/model`)).json();if(!t.success)throw new Error("获取模型配置数据失败");return t.config}async function lje(e){const n=await(await Ze(`${Xu}/bot`,{method:"POST",headers:st(),body:JSON.stringify(e)})).json();if(!n.success)throw new Error(n.message||"保存配置失败")}async function XU(e){const n=await(await Ze(`${Xu}/model`,{method:"POST",headers:st(),body:JSON.stringify(e)})).json();if(!n.success)throw new Error(n.message||"保存配置失败")}async function cje(e,t){const r=await(await Ze(`${Xu}/bot/section/${e}`,{method:"POST",headers:st(),body:JSON.stringify(t)})).json();if(!r.success)throw new Error(r.message||`保存配置节 ${e} 失败`)}async function lO(e,t){const r=await(await Ze(`${Xu}/model/section/${e}`,{method:"POST",headers:st(),body:JSON.stringify(t)})).json();if(!r.success)throw new Error(r.message||`保存配置节 ${e} 失败`)}function uje(){const[e,t]=y.useState(!0),[n,r]=y.useState(!1),[a,o]=y.useState(!1),[l,u]=y.useState(!1),{toast:d}=mr(),[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,M]=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 sje();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),M(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{o(!0),await cje(ve,Le),u(!1)}catch(Dt){console.error(`自动保存 ${ve} 失败:`,Dt),u(!0)}finally{o(!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 lje(ve),u(!1),d({title:"保存成功",description:"麦麦主程序配置已保存"})}catch(ve){console.error("保存配置失败:",ve),d({title:"保存失败",description:ve.message,variant:"destructive"})}finally{r(!1)}};return e?i.jsx(Kt,{className:"h-full",children:i.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"麦麦主程序配置"}),i.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦的核心功能和行为设置"})]}),i.jsxs(fe,{onClick:me,disabled:n||a||!l,size:"sm",className:"w-full sm:w-auto",children:[i.jsx(GC,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),n?"保存中...":a?"自动保存中...":l?"保存配置":"已保存"]})]}),i.jsxs(sl,{defaultValue:"bot",className:"w-full",children:[i.jsx("div",{className:"overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0",children:i.jsxs(Zo,{className:"inline-flex w-auto min-w-full sm:grid sm:w-full sm:grid-cols-5 lg:grid-cols-10",children:[i.jsx(Ct,{value:"bot",className:"flex-shrink-0",children:"基本信息"}),i.jsx(Ct,{value:"personality",className:"flex-shrink-0",children:"人格"}),i.jsx(Ct,{value:"chat",className:"flex-shrink-0",children:"聊天"}),i.jsx(Ct,{value:"expression",className:"flex-shrink-0",children:"表达"}),i.jsx(Ct,{value:"features",className:"flex-shrink-0",children:"功能"}),i.jsx(Ct,{value:"processing",className:"flex-shrink-0",children:"处理"}),i.jsx(Ct,{value:"mood",className:"flex-shrink-0",children:"情绪"}),i.jsx(Ct,{value:"voice",className:"flex-shrink-0",children:"语音"}),i.jsx(Ct,{value:"lpmm",className:"flex-shrink-0",children:"知识库"}),i.jsx(Ct,{value:"other",className:"flex-shrink-0",children:"其他"})]})}),i.jsx(Jt,{value:"bot",className:"space-y-4",children:f&&i.jsx(dje,{config:f,onChange:m})}),i.jsx(Jt,{value:"personality",className:"space-y-4",children:p&&i.jsx(fje,{config:p,onChange:g})}),i.jsx(Jt,{value:"chat",className:"space-y-4",children:x&&i.jsx(hje,{config:x,onChange:j})}),i.jsx(Jt,{value:"expression",className:"space-y-4",children:b&&i.jsx(mje,{config:b,onChange:w})}),i.jsx(Jt,{value:"features",className:"space-y-4",children:N&&C&&E&&i.jsx(pje,{emojiConfig:N,memoryConfig:C,toolConfig:E,onEmojiChange:O,onMemoryChange:A,onToolChange:k})}),i.jsx(Jt,{value:"processing",className:"space-y-4",children:V&&G&&R&&K&&i.jsx(vje,{keywordReactionConfig:V,responsePostProcessConfig:G,chineseTypoConfig:R,responseSplitterConfig:K,onKeywordReactionChange:H,onResponsePostProcessChange:L,onChineseTypoChange:F,onResponseSplitterChange:te})}),i.jsx(Jt,{value:"mood",className:"space-y-4",children:T&&i.jsx(gje,{config:T,onChange:M})}),i.jsx(Jt,{value:"voice",className:"space-y-4",children:$&&i.jsx(yje,{config:$,onChange:z})}),i.jsx(Jt,{value:"lpmm",className:"space-y-4",children:D&&i.jsx(xje,{config:D,onChange:U})}),i.jsxs(Jt,{value:"other",className:"space-y-4",children:[I&&i.jsx(bje,{config:I,onChange:B}),Y&&i.jsx(wje,{config:Y,onChange:ne}),oe&&i.jsx(jje,{config:oe,onChange:xe}),ee&&i.jsx(Sje,{config:ee,onChange:ae})]})]})]})})}function dje({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})},o=()=>{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 i.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"基本信息"}),i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"platform",children:"平台"}),i.jsx(Ne,{id:"platform",value:e.platform,onChange:d=>t({...e,platform:d.target.value}),placeholder:"qq"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"qq_account",children:"QQ账号"}),i.jsx(Ne,{id:"qq_account",value:e.qq_account,onChange:d=>t({...e,qq_account:d.target.value}),placeholder:"123456789"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"nickname",children:"昵称"}),i.jsx(Ne,{id:"nickname",value:e.nickname,onChange:d=>t({...e,nickname:d.target.value}),placeholder:"麦麦"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(J,{children:"其他平台账号"}),i.jsxs(fe,{onClick:n,size:"sm",variant:"outline",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加"]})]}),i.jsxs("div",{className:"space-y-2",children:[e.platforms.map((d,f)=>i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ne,{value:d,onChange:m=>a(f,m.target.value),placeholder:"wx:114514"}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"icon",variant:"outline",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:['确定要删除平台账号 "',d||"(空)",'" 吗?此操作无法撤销。']})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>r(f),children:"删除"})]})]})]})]},f)),e.platforms.length===0&&i.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无其他平台账号"})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(J,{children:"别名"}),i.jsxs(fe,{onClick:o,size:"sm",variant:"outline",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加"]})]}),i.jsxs("div",{className:"space-y-2",children:[e.alias_names.map((d,f)=>i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ne,{value:d,onChange:m=>u(f,m.target.value),placeholder:"小麦"}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"icon",variant:"outline",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:['确定要删除别名 "',d||"(空)",'" 吗?此操作无法撤销。']})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>l(f),children:"删除"})]})]})]})]},f)),e.alias_names.length===0&&i.jsx("p",{className:"text-sm text-muted-foreground",children:"暂无别名"})]})]})]})]})})}function fje({config:e,onChange:t}){const n=()=>{t({...e,states:[...e.states,""]})},r=o=>{t({...e,states:e.states.filter((l,u)=>u!==o)})},a=(o,l)=>{const u=[...e.states];u[o]=l,t({...e,states:u})};return i.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"人格设置"}),i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"personality",children:"人格特质"}),i.jsx(qt,{id:"personality",value:e.personality,onChange:o=>t({...e,personality:o.target.value}),placeholder:"描述人格特质和身份特征(建议120字以内)",rows:3}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"建议120字以内,描述人格特质和身份特征"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"reply_style",children:"表达风格"}),i.jsx(qt,{id:"reply_style",value:e.reply_style,onChange:o=>t({...e,reply_style:o.target.value}),placeholder:"描述说话的表达风格和习惯",rows:3})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"interest",children:"兴趣"}),i.jsx(qt,{id:"interest",value:e.interest,onChange:o=>t({...e,interest:o.target.value}),placeholder:"会影响麦麦对什么话题进行回复",rows:2})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"plan_style",children:"说话规则与行为风格"}),i.jsx(qt,{id:"plan_style",value:e.plan_style,onChange:o=>t({...e,plan_style:o.target.value}),placeholder:"麦麦的说话规则和行为风格",rows:5})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"visual_style",children:"识图规则"}),i.jsx(qt,{id:"visual_style",value:e.visual_style,onChange:o=>t({...e,visual_style:o.target.value}),placeholder:"识图时的处理规则",rows:3})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"private_plan_style",children:"私聊规则"}),i.jsx(qt,{id:"private_plan_style",value:e.private_plan_style,onChange:o=>t({...e,private_plan_style:o.target.value}),placeholder:"私聊的说话规则和行为风格",rows:4})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(J,{children:"状态列表(人格多样性)"}),i.jsxs(fe,{onClick:n,size:"sm",variant:"outline",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加状态"]})]}),i.jsx("div",{className:"space-y-2",children:e.states.map((o,l)=>i.jsxs("div",{className:"flex gap-2",children:[i.jsx(qt,{value:o,onChange:u=>a(l,u.target.value),placeholder:"描述一个人格状态",rows:2}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"icon",variant:"outline",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsx(jn,{children:"确定要删除这个人格状态吗?此操作无法撤销。"})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>r(l),children:"删除"})]})]})]})]},l))})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"state_probability",children:"状态替换概率"}),i.jsx(Ne,{id:"state_probability",type:"number",step:"0.1",min:"0",max:"1",value:e.state_probability,onChange:o=>t({...e,state_probability:parseFloat(o.target.value)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"每次构建人格时替换 personality 的概率(0.0-1.0)"})]})]})]})})}function hje({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})},o=({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,M]=A.split(":");E&&m(E.padStart(2,"0")),k&&g(k.padStart(2,"0")),T&&j(T.padStart(2,"0")),M&&w(M.padStart(2,"0"))}},[u]);const N=(O,C,A,E)=>{const k=`${O}:${C}-${A}:${E}`;d(k)};return i.jsxs(es,{children:[i.jsx(ts,{asChild:!0,children:i.jsxs(fe,{variant:"outline",className:"w-full justify-start font-mono text-sm",children:[i.jsx(rl,{className:"h-4 w-4 mr-2"}),u||"选择时间段"]})}),i.jsx(so,{className:"w-80",children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"font-medium text-sm mb-3",children:"开始时间"}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[i.jsxs("div",{children:[i.jsx(J,{className:"text-xs",children:"小时"}),i.jsxs(Et,{value:f,onValueChange:O=>{m(O),N(O,p,x,b)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:Array.from({length:24},(O,C)=>C).map(O=>i.jsx(Me,{value:O.toString().padStart(2,"0"),children:O.toString().padStart(2,"0")},O))})]})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-xs",children:"分钟"}),i.jsxs(Et,{value:p,onValueChange:O=>{g(O),N(f,O,x,b)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:Array.from({length:60},(O,C)=>C).map(O=>i.jsx(Me,{value:O.toString().padStart(2,"0"),children:O.toString().padStart(2,"0")},O))})]})]})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-medium text-sm mb-3",children:"结束时间"}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:gap-3",children:[i.jsxs("div",{children:[i.jsx(J,{className:"text-xs",children:"小时"}),i.jsxs(Et,{value:x,onValueChange:O=>{j(O),N(f,p,O,b)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:Array.from({length:24},(O,C)=>C).map(O=>i.jsx(Me,{value:O.toString().padStart(2,"0"),children:O.toString().padStart(2,"0")},O))})]})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-xs",children:"分钟"}),i.jsxs(Et,{value:b,onValueChange:O=>{w(O),N(f,p,x,O)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:Array.from({length:60},(O,C)=>C).map(O=>i.jsx(Me,{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 i.jsxs(es,{children:[i.jsx(ts,{asChild:!0,children:i.jsxs(fe,{variant:"outline",size:"sm",children:[i.jsx(ao,{className:"h-4 w-4 mr-1"}),"预览"]})}),i.jsx(so,{className:"w-96",children:i.jsxs("div",{className:"space-y-2",children:[i.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),i.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:d}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})};return i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"聊天设置"}),i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"talk_value",children:"聊天频率(基础值)"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"越小越沉默,范围 0-1"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"mentioned_bot_reply",children:"提及回复增幅"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"提及时回复概率增幅,1 为 100% 回复"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"max_context_size",children:"上下文长度"}),i.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)})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"planner_smooth",children:"规划器平滑"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"增大数值会减小 planner 负荷,推荐 1-5,0 为关闭"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"enable_talk_value_rules",checked:e.enable_talk_value_rules,onCheckedChange:u=>t({...e,enable_talk_value_rules:u})}),i.jsx(J,{htmlFor:"enable_talk_value_rules",className:"cursor-pointer",children:"启用动态发言频率规则"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"include_planner_reasoning",checked:e.include_planner_reasoning,onCheckedChange:u=>t({...e,include_planner_reasoning:u})}),i.jsx(J,{htmlFor:"include_planner_reasoning",className:"cursor-pointer",children:"将 planner 推理加入 replyer"})]})]})]}),e.enable_talk_value_rules&&i.jsxs("div",{className:"border-t pt-6",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"text-base font-semibold",children:"动态发言频率规则"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"按时段或聊天流ID调整发言频率,优先匹配具体聊天,再匹配全局规则"})]}),i.jsxs(fe,{onClick:n,size:"sm",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),e.talk_value_rules&&e.talk_value_rules.length>0?i.jsx("div",{className:"space-y-4",children:e.talk_value_rules.map((u,d)=>i.jsxs("div",{className:"rounded-lg border p-4 bg-muted/50 space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["规则 #",d+1]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(l,{rule:u}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{variant:"ghost",size:"sm",children:i.jsx(Ut,{className:"h-4 w-4 text-destructive"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:["确定要删除规则 #",d+1," 吗?此操作无法撤销。"]})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>r(d),children:"删除"})]})]})]})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"配置类型"}),i.jsxs(Et,{value:u.target===""?"global":"specific",onValueChange:f=>{f==="global"?a(d,"target",""):a(d,"target","qq::group")},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"global",children:"全局配置"}),i.jsx(Me,{value:"specific",children:"详细配置"})]})]})]}),u.target!==""&&(()=>{const f=u.target.split(":"),m=f[0]||"qq",p=f[1]||"",g=f[2]||"group";return i.jsxs("div",{className:"grid gap-4 p-4 rounded-lg bg-muted/50",children:[i.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"平台"}),i.jsxs(Et,{value:m,onValueChange:x=>{a(d,"target",`${x}:${p}:${g}`)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"qq",children:"QQ"}),i.jsx(Me,{value:"wx",children:"微信"})]})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"群 ID"}),i.jsx(Ne,{value:p,onChange:x=>{a(d,"target",`${m}:${x.target.value}:${g}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"类型"}),i.jsxs(Et,{value:g,onValueChange:x=>{a(d,"target",`${m}:${p}:${x}`)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"group",children:"群组(group)"}),i.jsx(Me,{value:"private",children:"私聊(private)"})]})]})]})]}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",u.target||"(未设置)"]})]})})(),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"时间段 (Time)"}),i.jsx(o,{value:u.time,onChange:f=>a(d,"time",f)}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"支持跨夜区间,例如 23:00-02:00"})]}),i.jsxs("div",{className:"grid gap-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(J,{htmlFor:`rule-value-${d}`,className:"text-xs font-medium",children:"发言频率值 (Value)"}),i.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"})]}),i.jsx(dE,{value:[u.value],onValueChange:f=>a(d,"value",f[0]),min:0,max:1,step:.01,className:"w-full"}),i.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[i.jsx("span",{children:"0 (完全沉默)"}),i.jsx("span",{children:"0.5"}),i.jsx("span",{children:"1.0 (正常)"})]})]})]})]},d))}):i.jsx("div",{className:"text-center py-8 text-muted-foreground",children:i.jsx("p",{className:"text-sm",children:'暂无规则,点击"添加规则"按钮创建'})}),i.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:[i.jsx("h5",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"📝 规则说明"}),i.jsxs("ul",{className:"text-xs text-blue-800 dark:text-blue-200 space-y-1",children:[i.jsxs("li",{children:["• ",i.jsx("strong",{children:"Target 为空"}),":全局规则,对所有聊天生效"]}),i.jsxs("li",{children:["• ",i.jsx("strong",{children:"Target 指定"}),":仅对特定聊天流生效(格式:platform:id:type)"]}),i.jsxs("li",{children:["• ",i.jsx("strong",{children:"优先级"}),":先匹配具体聊天流规则,再匹配全局规则"]}),i.jsxs("li",{children:["• ",i.jsx("strong",{children:"时间支持跨夜"}),":例如 23:00-02:00 表示晚上11点到次日凌晨2点"]}),i.jsxs("li",{children:["• ",i.jsx("strong",{children:"数值范围"}),":建议 0-1,0 表示完全沉默,1 表示正常发言"]})]})]})]})]})}function mje({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})},o=({rule:g})=>{const x=`["${g[0]}", "${g[1]}", "${g[2]}", "${g[3]}"]`;return i.jsxs(es,{children:[i.jsx(ts,{asChild:!0,children:i.jsxs(fe,{variant:"outline",size:"sm",children:[i.jsx(ao,{className:"h-4 w-4 mr-1"}),"预览"]})}),i.jsx(so,{className:"w-96",children:i.jsxs("div",{className:"space-y-2",children:[i.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),i.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:x}),i.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 i.jsxs("div",{className:"flex gap-2",children:[i.jsx("div",{className:"flex-1 flex gap-2",children:N?i.jsxs(i.Fragment,{children:[i.jsx(Ne,{value:g,onChange:C=>p(x,j,C.target.value),placeholder:'输入 "*" 或 "qq:123456:group"',className:"flex-1"}),b.length>0&&i.jsx(fe,{size:"sm",variant:"outline",onClick:()=>O(!1),title:"切换到下拉选择",children:"下拉"})]}):i.jsxs(i.Fragment,{children:[i.jsxs(Et,{value:g,onValueChange:C=>p(x,j,C),children:[i.jsx(wt,{className:"flex-1",children:i.jsx(At,{placeholder:"选择聊天流"})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"*",children:"* (全局共享)"}),b.map((C,A)=>i.jsx(Me,{value:C,children:C},A))]})]}),i.jsx(fe,{size:"sm",variant:"outline",onClick:()=>O(!0),title:"切换到手动输入",children:"输入"})]})}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"icon",variant:"outline",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:['确定要删除组成员 "',g||"(空)",'" 吗?此操作无法撤销。']})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{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 i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold",children:"表达学习配置"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置麦麦如何学习和使用表达方式"})]}),i.jsxs(fe,{onClick:n,size:"sm",variant:"outline",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加规则"]})]}),i.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 i.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm font-medium",children:["规则 ",x+1," ",b&&"(全局配置)"]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(o,{rule:g}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"sm",variant:"ghost",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:["确定要删除学习规则 ",x+1," 吗?此操作无法撤销。"]})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>r(x),children:"删除"})]})]})]})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"配置类型"}),i.jsxs(Et,{value:b?"global":"specific",onValueChange:A=>{A==="global"?a(x,0,""):a(x,0,"qq::group")},disabled:j&&!b,children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"global",children:"全局配置"}),i.jsx(Me,{value:"specific",disabled:j&&!b,children:"详细配置"})]})]}),j&&!b&&i.jsx("p",{className:"text-xs text-amber-600",children:"已存在全局配置,无法创建新的全局配置"})]}),!b&&i.jsxs("div",{className:"grid gap-4 p-4 rounded-lg bg-muted/50",children:[i.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"平台"}),i.jsxs(Et,{value:N,onValueChange:A=>{a(x,0,`${A}:${O}:${C}`)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"qq",children:"QQ"}),i.jsx(Me,{value:"wx",children:"微信"})]})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"群 ID"}),i.jsx(Ne,{value:O,onChange:A=>{a(x,0,`${N}:${A.target.value}:${C}`)},placeholder:"输入群 ID",className:"font-mono text-sm"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"类型"}),i.jsxs(Et,{value:C,onValueChange:A=>{a(x,0,`${N}:${O}:${A}`)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"group",children:"群组(group)"}),i.jsx(Me,{value:"private",children:"私聊(private)"})]})]})]})]}),i.jsxs("p",{className:"text-xs text-muted-foreground",children:["当前聊天流 ID:",g[0]||"(未设置)"]})]}),i.jsx("div",{className:"grid gap-2",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx(J,{className:"text-xs font-medium",children:"使用学到的表达"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦使用从聊天中学到的表达方式"})]}),i.jsx(at,{checked:g[1]==="enable",onCheckedChange:A=>a(x,1,A?"enable":"disable")})]})}),i.jsx("div",{className:"grid gap-2",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx(J,{className:"text-xs font-medium",children:"学习表达"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"允许麦麦从聊天中学习新的表达方式"})]}),i.jsx(at,{checked:g[2]==="enable",onCheckedChange:A=>a(x,2,A?"enable":"disable")})]})}),i.jsxs("div",{className:"grid gap-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(J,{className:"text-xs font-medium",children:"学习强度"}),i.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"})]}),i.jsx(dE,{value:[parseFloat(g[3])||1],onValueChange:A=>a(x,3,A[0].toFixed(1)),min:0,max:5,step:.1,className:"w-full"}),i.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[i.jsx("span",{children:"0 (不学习)"}),i.jsx("span",{children:"2.5"}),i.jsx("span",{children:"5.0 (快速学习)"})]}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"影响学习频率,最短学习间隔 = 300/学习强度(秒)"})]})]})]},x)}),e.learning_list.length===0&&i.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无学习规则,点击"添加规则"开始配置'})]})]})}),i.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold",children:"表达共享组配置"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"配置不同聊天流之间如何共享学到的表达方式"})]}),i.jsxs(fe,{onClick:u,size:"sm",variant:"outline",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加共享组"]})]}),i.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 i.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm font-medium",children:["共享组 ",x+1,g.length===1&&g[0]==="*"&&"(全局共享)"]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(fe,{onClick:()=>f(x),size:"sm",variant:"outline",children:i.jsx(tr,{className:"h-4 w-4"})}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"sm",variant:"ghost",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:["确定要删除共享组 ",x+1," 吗?此操作无法撤销。"]})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>d(x),children:"删除"})]})]})]})]})]}),i.jsx("div",{className:"space-y-2",children:g.map((b,w)=>i.jsx(l,{member:b,groupIndex:x,memberIndex:w,availableChatIds:j},w))}),i.jsx("p",{className:"text-xs text-muted-foreground",children:'提示:可以从下拉框选择已配置的聊天流,或手动输入。输入 "*" 启用全局共享'})]},x)}),e.expression_groups.length===0&&i.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无共享组,点击"添加共享组"开始配置'})]})]})})]})}function pje({emojiConfig:e,memoryConfig:t,toolConfig:n,onEmojiChange:r,onMemoryChange:a,onToolChange:o}){return i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"工具设置"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"enable_tool",checked:n.enable_tool,onCheckedChange:l=>o({...n,enable_tool:l})}),i.jsx(J,{htmlFor:"enable_tool",className:"cursor-pointer",children:"启用工具系统"})]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"允许麦麦使用各种工具来增强功能"})]})}),i.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"记忆设置"}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"max_agent_iterations",children:"记忆思考深度"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"最低为 1(不深入思考)"})]})]})}),i.jsx("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"表情包设置"}),i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"emoji_chance",children:"表情包激活概率"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"范围 0-1,越大越容易发送表情包"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"max_reg_num",children:"最大注册数量"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"麦麦最多可以注册的表情包数量"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"check_interval",children:"检查间隔(分钟)"}),i.jsx(Ne,{id:"check_interval",type:"number",min:"1",value:e.check_interval,onChange:l=>r({...e,check_interval:parseInt(l.target.value)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"检查表情包(注册、破损、删除)的时间间隔"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"do_replace",checked:e.do_replace,onCheckedChange:l=>r({...e,do_replace:l})}),i.jsx(J,{htmlFor:"do_replace",className:"cursor-pointer",children:"达到最大数量时替换表情包"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"steal_emoji",checked:e.steal_emoji,onCheckedChange:l=>r({...e,steal_emoji:l})}),i.jsx(J,{htmlFor:"steal_emoji",className:"cursor-pointer",children:"偷取表情包"})]}),i.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"允许麦麦将看到的表情包据为己有"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"content_filtration",checked:e.content_filtration,onCheckedChange:l=>r({...e,content_filtration:l})}),i.jsx(J,{htmlFor:"content_filtration",className:"cursor-pointer",children:"启用表情包过滤"})]}),e.content_filtration&&i.jsxs("div",{className:"grid gap-2 pl-6 border-l-2 border-primary/20",children:[i.jsx(J,{htmlFor:"filtration_prompt",children:"过滤要求"}),i.jsx(Ne,{id:"filtration_prompt",value:e.filtration_prompt,onChange:l=>r({...e,filtration_prompt:l.target.value}),placeholder:"符合公序良俗"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"只有符合此要求的表情包才会被保存"})]})]})]})})]})}function vje({keywordReactionConfig:e,responsePostProcessConfig:t,chineseTypoConfig:n,responseSplitterConfig:r,onKeywordReactionChange:a,onResponsePostProcessChange:o,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[M,$]=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 i.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(i.jsx("span",{children:z.substring(Z,je.index)},`text-${Z}`)),pe.push(i.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(i.jsx("span",{children:z.substring(Z)},`text-${Z}`)),i.jsx(i.Fragment,{children:pe})}catch{return i.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 i.jsxs(nr,{open:M,onOpenChange:$,children:[i.jsx(qF,{asChild:!0,children:i.jsxs(fe,{variant:"outline",size:"sm",children:[i.jsx(bg,{className:"h-4 w-4 mr-1"}),"正则编辑器"]})}),i.jsxs(Hn,{className:"max-w-[95vw] sm:max-w-[900px] max-h-[90vh]",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"正则表达式编辑器"}),i.jsx(dr,{className:"text-sm",children:"使用可视化工具构建正则表达式,并实时测试效果"})]}),i.jsx(Kt,{className:"max-h-[calc(90vh-120px)]",children:i.jsxs(sl,{value:I,onValueChange:ee=>B(ee),className:"w-full",children:[i.jsxs(Zo,{className:"grid w-full grid-cols-2",children:[i.jsx(Ct,{value:"build",children:"🔧 构建器"}),i.jsx(Ct,{value:"test",children:"🧪 测试器"})]}),i.jsxs(Jt,{value:"build",className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{className:"text-sm font-medium",children:"正则表达式"}),i.jsx(Ne,{ref:te,value:A,onChange:ee=>k(ee.target.value),className:"font-mono text-sm",placeholder:"点击下方按钮构建正则表达式..."})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{className:"text-sm font-medium",children:"Reaction 内容"}),i.jsx(qt,{value:E,onChange:ee=>T(ee.target.value),placeholder:"使用 [捕获组名] 引用捕获的内容...",rows:3,className:"text-sm"})]}),i.jsxs("div",{className:"space-y-4 border-t pt-4",children:[xe.map(ee=>i.jsxs("div",{className:"space-y-2",children:[i.jsx("h5",{className:"text-xs font-semibold text-primary",children:ee.category}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:ee.items.map(ae=>i.jsx(fe,{variant:"outline",size:"sm",className:"justify-start h-auto py-2 px-3",onClick:()=>ne(ae.pattern,ae.moveCursor||0),children:i.jsxs("div",{className:"flex flex-col items-start w-full",children:[i.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i.jsx("span",{className:"text-xs font-medium",children:ae.label}),i.jsx("code",{className:"ml-auto text-xs bg-muted px-1.5 py-0.5 rounded font-mono",children:ae.pattern})]}),i.jsx("span",{className:"text-xs text-muted-foreground mt-0.5",children:ae.desc})]})},ae.label))})]},ee.category)),i.jsxs("div",{className:"space-y-2 border-t pt-4",children:[i.jsx("h5",{className:"text-xs font-semibold text-primary",children:"完整示例模板"}),i.jsxs("div",{className:"space-y-2",children:[i.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:i.jsxs("div",{className:"flex flex-col items-start w-full",children:[i.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}",")是这样的$"]}),i.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「某事物是这样的」并捕获事物名称"})]})}),i.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:i.jsxs("div",{className:"flex flex-col items-start w-full",children:[i.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>.+?)[.。,,]?$"}),i.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"匹配「我没要求你做某事」并捕获具体行为"})]})}),i.jsx(fe,{variant:"outline",size:"sm",className:"w-full justify-start h-auto py-2 px-3",onClick:()=>k("(?P<subject>.+?)(?:是|为什么|怎么)"),children:i.jsxs("div",{className:"flex flex-col items-start w-full",children:[i.jsx("code",{className:"text-xs font-mono bg-muted px-2 py-1 rounded w-full overflow-x-auto",children:"(?P<subject>.+?)(?:是|为什么|怎么)"}),i.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"捕获问题主题词"})]})})]})]})]}),i.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:[i.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 使用提示"}),i.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[i.jsx("li",{children:"点击输入框设置光标位置,然后点击按钮插入模式"}),i.jsxs("li",{children:["命名捕获组格式:",i.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"(?P<名称>模式)"})]}),i.jsxs("li",{children:["在 reaction 中使用 ",i.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 rounded",children:"[名称]"})," 引用捕获的内容"]}),i.jsx("li",{children:"切换到测试器标签页验证正则表达式效果"})]})]})]}),i.jsxs(Jt,{value:"test",className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{className:"text-sm font-medium",children:"当前正则表达式"}),i.jsx("div",{className:"rounded-md bg-muted p-3 font-mono text-xs break-all",children:A||"(未设置)"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"test-text",className:"text-sm font-medium",children:"测试文本"}),i.jsx(qt,{id:"test-text",value:z,onChange:ee=>D(ee.target.value),placeholder:`在此输入要测试的文本...
|
||
例如:打游戏是这样的`,className:"min-h-[100px] text-sm"})]}),H&&i.jsxs("div",{className:"rounded-md bg-destructive/10 border border-destructive/20 p-3",children:[i.jsx("p",{className:"text-sm text-destructive font-medium",children:"正则表达式错误"}),i.jsx("p",{className:"text-xs text-destructive/80 mt-1",children:H})]}),!H&&z&&i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"flex items-center gap-2",children:U&&U.length>0?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),i.jsxs("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:["匹配成功 (",U.length," 处)"]})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"h-2 w-2 rounded-full bg-gray-400"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"无匹配"})]})}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{className:"text-sm font-medium",children:"匹配高亮"}),i.jsx(Kt,{className:"h-40 rounded-md bg-muted p-3",children:i.jsx("div",{className:"text-sm break-words",children:oe()})})]}),Object.keys(L).length>0&&i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{className:"text-sm font-medium",children:"命名捕获组"}),i.jsx(Kt,{className:"h-32 rounded-md border p-3",children:i.jsx("div",{className:"space-y-2",children:Object.entries(L).map(([ee,ae])=>i.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[i.jsxs("span",{className:"font-mono font-semibold text-primary min-w-[80px]",children:["[",ee,"]"]}),i.jsx("span",{className:"text-muted-foreground",children:"="}),i.jsx("span",{className:"font-mono bg-muted px-2 py-0.5 rounded",children:ae})]},ee))})})]}),Object.keys(L).length>0&&E&&i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{className:"text-sm font-medium",children:"Reaction 替换预览"}),i.jsx(Kt,{className:"h-48 rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3",children:i.jsx("div",{className:"text-sm break-words",children:F})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"reaction 中的 [name] 已被替换为对应的捕获组值"})]})]}),i.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:[i.jsx("p",{className:"text-xs font-medium text-blue-900 dark:text-blue-100",children:"💡 测试说明"}),i.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-300 space-y-1 list-disc list-inside",children:[i.jsx("li",{children:"匹配的文本会以黄色背景高亮显示"}),i.jsx("li",{children:"命名捕获组的值会显示在下方列表中"}),i.jsx("li",{children:"Reaction 替换预览显示最终生成的反应内容"}),i.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,M)=>M!==E)},a({...e,keyword_rules:k})},N=(A,E,k)=>{const T=[...e.keyword_rules],M=[...T[A].keywords||[]];M[E]=k,T[A]={...T[A],keywords:M},a({...e,keyword_rules:T})},O=({rule:A})=>{const E=`{ regex = [${(A.regex||[]).map(k=>`"${k}"`).join(", ")}], reaction = "${A.reaction}" }`;return i.jsxs(es,{children:[i.jsx(ts,{asChild:!0,children:i.jsxs(fe,{variant:"outline",size:"sm",children:[i.jsx(ao,{className:"h-4 w-4 mr-1"}),"预览"]})}),i.jsx(so,{className:"w-[95vw] sm:w-[500px]",children:i.jsxs("div",{className:"space-y-2",children:[i.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),i.jsx(Kt,{className:"h-60 rounded-md bg-muted p-3",children:i.jsx("pre",{className:"font-mono text-xs break-all",children:E})}),i.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 i.jsxs(es,{children:[i.jsx(ts,{asChild:!0,children:i.jsxs(fe,{variant:"outline",size:"sm",children:[i.jsx(ao,{className:"h-4 w-4 mr-1"}),"预览"]})}),i.jsx(so,{className:"w-[95vw] sm:w-[500px]",children:i.jsxs("div",{className:"space-y-2",children:[i.jsx("h4",{className:"font-medium text-sm",children:"配置预览"}),i.jsx(Kt,{className:"h-60 rounded-md bg-muted p-3",children:i.jsx("pre",{className:"font-mono text-xs whitespace-pre-wrap break-all",children:E})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"这是保存到 bot_config.toml 文件中的格式"})]})})]})};return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"关键词反应配置"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"配置触发特定反应的关键词和正则表达式规则"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"text-base font-semibold",children:"正则表达式规则"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用正则表达式匹配消息内容"})]}),i.jsxs(fe,{onClick:d,size:"sm",variant:"outline",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加正则规则"]})]}),i.jsxs("div",{className:"space-y-3",children:[e.regex_rules.map((A,E)=>i.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm font-medium",children:["正则规则 ",E+1]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(p,{regex:A.regex&&A.regex[0]||"",reaction:A.reaction,onRegexChange:k=>m(E,"regex",k),onReactionChange:k=>m(E,"reaction",k)}),i.jsx(O,{rule:A}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"sm",variant:"ghost",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:["确定要删除正则规则 ",E+1," 吗?此操作无法撤销。"]})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>f(E),children:"删除"})]})]})]})]})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"正则表达式(Python 语法)"}),i.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"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:'支持命名捕获组 (?P<name>pattern),可在 reaction 中使用 [name] 引用。点击"正则编辑器"可视化构建和测试!'})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"反应内容"}),i.jsx(qt,{value:A.reaction,onChange:k=>m(E,"reaction",k.target.value),placeholder:`触发后麦麦的反应...
|
||
可以使用 [捕获组名] 来引用正则表达式中的内容`,rows:3,className:"text-sm"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"使用 [捕获组名] 引用正则表达式中的命名捕获组,例如 [n] 会被替换为捕获的内容"})]})]})]},E)),e.regex_rules.length===0&&i.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无正则规则,点击"添加正则规则"开始配置'})]})]}),i.jsxs("div",{className:"space-y-4 border-t pt-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"text-base font-semibold",children:"关键词规则"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"使用关键词列表匹配消息内容"})]}),i.jsxs(fe,{onClick:g,size:"sm",variant:"outline",children:[i.jsx(tr,{className:"h-4 w-4 mr-1"}),"添加关键词规则"]})]}),i.jsxs("div",{className:"space-y-3",children:[e.keyword_rules.map((A,E)=>i.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-sm font-medium",children:["关键词规则 ",E+1]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(C,{rule:A}),i.jsxs(Pn,{children:[i.jsx(ra,{asChild:!0,children:i.jsx(fe,{size:"sm",variant:"ghost",children:i.jsx(Ut,{className:"h-4 w-4"})})}),i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:["确定要删除关键词规则 ",E+1," 吗?此操作无法撤销。"]})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>x(E),children:"删除"})]})]})]})]})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(J,{className:"text-xs font-medium",children:"关键词列表"}),i.jsxs(fe,{onClick:()=>b(E),size:"sm",variant:"ghost",children:[i.jsx(tr,{className:"h-3 w-3 mr-1"}),"添加关键词"]})]}),i.jsxs("div",{className:"space-y-2",children:[(A.keywords||[]).map((k,T)=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ne,{value:k,onChange:M=>N(E,T,M.target.value),placeholder:"关键词",className:"flex-1"}),i.jsx(fe,{onClick:()=>w(E,T),size:"sm",variant:"ghost",children:i.jsx(Ut,{className:"h-4 w-4"})})]},T)),(!A.keywords||A.keywords.length===0)&&i.jsx("p",{className:"text-xs text-muted-foreground text-center py-2",children:'暂无关键词,点击"添加关键词"开始配置'})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{className:"text-xs font-medium",children:"反应内容"}),i.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&&i.jsx("div",{className:"text-center py-8 text-muted-foreground",children:'暂无关键词规则,点击"添加关键词规则"开始配置'})]})]})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"回复后处理配置"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"enable_response_post_process",checked:t.enable_response_post_process,onCheckedChange:A=>o({...t,enable_response_post_process:A})}),i.jsx(J,{htmlFor:"enable_response_post_process",className:"cursor-pointer",children:"启用回复后处理"})]}),i.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"包括错别字生成器和回复分割器"})]}),t.enable_response_post_process&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"border-t pt-6 space-y-4",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[i.jsx(at,{id:"enable_chinese_typo",checked:n.enable,onCheckedChange:A=>l({...n,enable:A})}),i.jsx(J,{htmlFor:"enable_chinese_typo",className:"cursor-pointer font-semibold",children:"中文错别字生成器"})]}),i.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"为回复添加随机错别字,让麦麦的回复更自然"}),n.enable&&i.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"error_rate",className:"text-xs font-medium",children:"单字替换概率"}),i.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)})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"min_freq",className:"text-xs font-medium",children:"最小字频阈值"}),i.jsx(Ne,{id:"min_freq",type:"number",min:"0",value:n.min_freq,onChange:A=>l({...n,min_freq:parseInt(A.target.value)})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"tone_error_rate",className:"text-xs font-medium",children:"声调错误概率"}),i.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)})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"word_replace_rate",className:"text-xs font-medium",children:"整词替换概率"}),i.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)})})]})]})]})}),i.jsx("div",{className:"border-t pt-6 space-y-4",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[i.jsx(at,{id:"enable_response_splitter",checked:r.enable,onCheckedChange:A=>u({...r,enable:A})}),i.jsx(J,{htmlFor:"enable_response_splitter",className:"cursor-pointer font-semibold",children:"回复分割器"})]}),i.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"控制回复的长度和句子数量"}),r.enable&&i.jsxs("div",{className:"grid gap-4 pl-6 border-l-2 border-primary/20",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"max_length",className:"text-xs font-medium",children:"最大长度"}),i.jsx(Ne,{id:"max_length",type:"number",min:"1",value:r.max_length,onChange:A=>u({...r,max_length:parseInt(A.target.value)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大字符数"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"max_sentence_num",className:"text-xs font-medium",children:"最大句子数"}),i.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)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"回复允许的最大句子数量"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"enable_kaomoji_protection",checked:r.enable_kaomoji_protection,onCheckedChange:A=>u({...r,enable_kaomoji_protection:A})}),i.jsx(J,{htmlFor:"enable_kaomoji_protection",className:"cursor-pointer",children:"启用颜文字保护"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"enable_overflow_return_all",checked:r.enable_overflow_return_all,onCheckedChange:A=>u({...r,enable_overflow_return_all:A})}),i.jsx(J,{htmlFor:"enable_overflow_return_all",className:"cursor-pointer",children:"超出时一次性返回全部"})]}),i.jsx("p",{className:"text-xs text-muted-foreground -mt-2",children:"当句子数量超出限制时,合并后一次性返回所有内容"})]})]})})]})]})]})}function gje({config:e,onChange:t}){return i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"情绪设置"}),i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{checked:e.enable_mood,onCheckedChange:n=>t({...e,enable_mood:n})}),i.jsx(J,{className:"cursor-pointer",children:"启用情绪系统"})]}),e.enable_mood&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"情绪更新阈值"}),i.jsx(Ne,{type:"number",min:"1",value:e.mood_update_threshold,onChange:n=>t({...e,mood_update_threshold:parseInt(n.target.value)})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"越高,更新越慢"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"情感特征"}),i.jsx(qt,{value:e.emotion_style,onChange:n=>t({...e,emotion_style:n.target.value}),placeholder:"影响情绪的变化情况",rows:2})]})]})]})]})}function yje({config:e,onChange:t}){return i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"语音设置"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{checked:e.enable_asr,onCheckedChange:n=>t({...e,enable_asr:n})}),i.jsx(J,{className:"cursor-pointer",children:"启用语音识别"})]}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"启用后麦麦可以识别语音消息,需要配置语音识别模型"})]})}function xje({config:e,onChange:t}){return i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库设置"}),i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{checked:e.enable,onCheckedChange:n=>t({...e,enable:n})}),i.jsx(J,{className:"cursor-pointer",children:"启用 LPMM 知识库"})]}),e.enable&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"LPMM 模式"}),i.jsxs(Et,{value:e.lpmm_mode,onValueChange:n=>t({...e,lpmm_mode:n}),children:[i.jsx(wt,{children:i.jsx(At,{placeholder:"选择 LPMM 模式"})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"classic",children:"经典模式"}),i.jsx(Me,{value:"agent",children:"Agent 模式"})]})]})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"同义词搜索 TopK"}),i.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)})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"同义词阈值"}),i.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)})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"实体提取线程数"}),i.jsx(Ne,{type:"number",min:"1",value:e.info_extraction_workers,onChange:n=>t({...e,info_extraction_workers:parseInt(n.target.value)})})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"嵌入向量维度"}),i.jsx(Ne,{type:"number",min:"1",value:e.embedding_dimension,onChange:n=>t({...e,embedding_dimension:parseInt(n.target.value)})})]})]})]})]})]})}function bje({config:e,onChange:t}){const[n,r]=y.useState(""),[a,o]=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(""),o("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 i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"日志配置"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"日期格式"}),i.jsx(Ne,{value:e.date_style,onChange:x=>t({...e,date_style:x.target.value}),placeholder:"例如: m-d H:i:s"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"m=月, d=日, H=时, i=分, s=秒"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"日志级别样式"}),i.jsxs(Et,{value:e.log_level_style,onValueChange:x=>t({...e,log_level_style:x}),children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:p.map(x=>i.jsx(Me,{value:x,children:x},x))})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"日志文本颜色"}),i.jsxs(Et,{value:e.color_text,onValueChange:x=>t({...e,color_text:x}),children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:g.map(x=>i.jsx(Me,{value:x,children:x},x))})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"全局日志级别"}),i.jsxs(Et,{value:e.log_level,onValueChange:x=>t({...e,log_level:x}),children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:m.map(x=>i.jsx(Me,{value:x,children:x},x))})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"控制台日志级别"}),i.jsxs(Et,{value:e.console_log_level,onValueChange:x=>t({...e,console_log_level:x}),children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:m.map(x=>i.jsx(Me,{value:x,children:x},x))})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"文件日志级别"}),i.jsxs(Et,{value:e.file_log_level,onValueChange:x=>t({...e,file_log_level:x}),children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsx(jt,{children:m.map(x=>i.jsx(Me,{value:x,children:x},x))})]})]})]})]}),i.jsxs("div",{children:[i.jsx(J,{className:"mb-2 block",children:"完全屏蔽的库"}),i.jsxs("div",{className:"flex gap-2 mb-2",children:[i.jsx(Ne,{value:n,onChange:x=>r(x.target.value),placeholder:"输入库名",className:"flex-1",onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),l())}}),i.jsx(fe,{onClick:l,size:"sm",className:"flex-shrink-0",children:i.jsx(tr,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),i.jsx("div",{className:"flex flex-wrap gap-2",children:e.suppress_libraries.map(x=>i.jsxs("div",{className:"flex items-center gap-1 bg-secondary px-3 py-1 rounded-md",children:[i.jsx("span",{className:"text-sm",children:x}),i.jsx(fe,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>u(x),children:i.jsx(Ut,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},x))})]}),i.jsxs("div",{children:[i.jsx(J,{className:"mb-2 block",children:"特定库的日志级别"}),i.jsxs("div",{className:"flex gap-2 mb-2",children:[i.jsx(Ne,{value:n,onChange:x=>r(x.target.value),placeholder:"输入库名",className:"flex-1"}),i.jsxs(Et,{value:a,onValueChange:o,children:[i.jsx(wt,{className:"w-32",children:i.jsx(At,{})}),i.jsx(jt,{children:m.map(x=>i.jsx(Me,{value:x,children:x},x))})]}),i.jsx(fe,{onClick:d,size:"sm",children:i.jsx(tr,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),i.jsx("div",{className:"space-y-2",children:Object.entries(e.library_log_levels).map(([x,j])=>i.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[i.jsx("span",{className:"text-sm font-medium",children:x}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-muted-foreground",children:j}),i.jsx(fe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>f(x),children:i.jsx(Ut,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]})]},x))})]})]})}function wje({config:e,onChange:t}){return i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"调试配置"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(J,{children:"显示 Prompt"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"是否在日志中显示提示词"})]}),i.jsx(at,{checked:e.show_prompt,onCheckedChange:n=>t({...e,show_prompt:n})})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(J,{children:"显示回复器 Prompt"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的提示词"})]}),i.jsx(at,{checked:e.show_replyer_prompt,onCheckedChange:n=>t({...e,show_replyer_prompt:n})})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(J,{children:"显示回复器推理"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示回复器的推理过程"})]}),i.jsx(at,{checked:e.show_replyer_reasoning,onCheckedChange:n=>t({...e,show_replyer_reasoning:n})})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(J,{children:"显示 Jargon Prompt"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"是否显示术语相关的提示词"})]}),i.jsx(at,{checked:e.show_jargon_prompt,onCheckedChange:n=>t({...e,show_jargon_prompt:n})})]})]})]})}function jje({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(""))},o=l=>{t({...e,auth_token:e.auth_token.filter((u,d)=>d!==l)})};return i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"MaimMessage 服务配置"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(J,{children:"启用自定义服务器"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"是否使用自定义的 MaimMessage 服务器"})]}),i.jsx(at,{checked:e.use_custom,onCheckedChange:l=>t({...e,use_custom:l})})]}),e.use_custom&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"主机地址"}),i.jsx(Ne,{value:e.host,onChange:l=>t({...e,host:l.target.value}),placeholder:"127.0.0.1"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"端口号"}),i.jsx(Ne,{type:"number",value:e.port,onChange:l=>t({...e,port:parseInt(l.target.value)}),placeholder:"8090"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"连接模式"}),i.jsxs(Et,{value:e.mode,onValueChange:l=>t({...e,mode:l}),children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"ws",children:"WebSocket (ws)"}),i.jsx(Me,{value:"tcp",children:"TCP"})]})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{checked:e.use_wss,onCheckedChange:l=>t({...e,use_wss:l}),disabled:e.mode!=="ws"}),i.jsx(J,{children:"使用 WSS 安全连接"})]})]}),e.use_wss&&e.mode==="ws"&&i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"SSL 证书文件路径"}),i.jsx(Ne,{value:e.cert_file,onChange:l=>t({...e,cert_file:l.target.value}),placeholder:"cert.pem"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"SSL 密钥文件路径"}),i.jsx(Ne,{value:e.key_file,onChange:l=>t({...e,key_file:l.target.value}),placeholder:"key.pem"})]})]})]})]})]}),i.jsxs("div",{children:[i.jsx(J,{className:"mb-2 block",children:"认证令牌"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"用于 API 验证,为空则不启用验证"}),i.jsxs("div",{className:"flex gap-2 mb-2",children:[i.jsx(Ne,{value:n,onChange:l=>r(l.target.value),placeholder:"输入认证令牌",onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),a())}}),i.jsx(fe,{onClick:a,size:"sm",children:i.jsx(tr,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]}),i.jsx("div",{className:"space-y-2",children:e.auth_token.map((l,u)=>i.jsxs("div",{className:"flex items-center justify-between bg-secondary px-3 py-2 rounded-md",children:[i.jsx("span",{className:"text-sm font-mono",children:l}),i.jsx(fe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o(u),children:i.jsx(Ut,{className:"h-3 w-3",strokeWidth:2,fill:"none"})})]},u))})]})]})}function Sje({config:e,onChange:t}){return i.jsxs("div",{className:"rounded-lg border bg-card p-6 space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"统计信息"}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx(J,{children:"启用统计信息发送"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"发送匿名统计信息,帮助我们了解全球有多少只麦麦在运行"})]}),i.jsx(at,{checked:e.enable,onCheckedChange:n=>t({...e,enable:n})})]})]})}const Ol=y.forwardRef(({className:e,...t},n)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx("table",{ref:n,className:ue("w-full caption-bottom text-sm",e),...t})}));Ol.displayName="Table";const Cl=y.forwardRef(({className:e,...t},n)=>i.jsx("thead",{ref:n,className:ue("[&_tr]:border-b",e),...t}));Cl.displayName="TableHeader";const El=y.forwardRef(({className:e,...t},n)=>i.jsx("tbody",{ref:n,className:ue("[&_tr:last-child]:border-0",e),...t}));El.displayName="TableBody";const _je=y.forwardRef(({className:e,...t},n)=>i.jsx("tfoot",{ref:n,className:ue("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));_je.displayName="TableFooter";const vn=y.forwardRef(({className:e,...t},n)=>i.jsx("tr",{ref:n,className:ue("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));vn.displayName="TableRow";const Je=y.forwardRef(({className:e,...t},n)=>i.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)=>i.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 Nje=y.forwardRef(({className:e,...t},n)=>i.jsx("caption",{ref:n,className:ue("mt-4 text-sm text-muted-foreground",e),...t}));Nje.displayName="TableCaption";var Xy="Checkbox",[Oje]=hr(Xy),[Cje,jE]=Oje(Xy);function Eje(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:o,form:l,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,x]=Na({prop:n,defaultProp:a??!1,onChange:d,caller:Xy}),[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:o,setChecked:x,control:j,setControl:b,name:u,form:l,value:m,hasConsumerStoppedPropagationRef:O,required:f,defaultChecked:Xo(a)?!1:a,isFormControl:C,bubbleInput:w,setBubbleInput:N};return i.jsx(Cje,{scope:t,...A,children:Aje(p)?p(A):r})}var ZU="CheckboxTrigger",QU=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:o,value:l,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:x,bubbleInput:j}=jE(ZU,e),b=qe(a,m),w=y.useRef(d);return y.useEffect(()=>{const N=o?.form;if(N){const O=()=>p(w.current);return N.addEventListener("reset",O),()=>N.removeEventListener("reset",O)}},[o,p]),i.jsx(Pe.button,{type:"button",role:"checkbox","aria-checked":Xo(d)?"mixed":d,"aria-required":f,"data-state":rH(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=>Xo(O)?!0:!O),j&&x&&(g.current=N.isPropagationStopped(),g.current||N.stopPropagation())})})});QU.displayName=ZU;var SE=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:l,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return i.jsx(Eje,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:u,required:l,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>i.jsxs(i.Fragment,{children:[i.jsx(QU,{...p,ref:t,__scopeCheckbox:n}),g&&i.jsx(nH,{__scopeCheckbox:n})]})})});SE.displayName=Xy;var JU="CheckboxIndicator",eH=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=jE(JU,n);return i.jsx(Rn,{present:r||Xo(o.checked)||o.checked===!0,children:i.jsx(Pe.span,{"data-state":rH(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});eH.displayName=JU;var tH="CheckboxBubbleInput",nH=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:l,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:x}=jE(tH,e),j=qe(n,x),b=Ay(o),w=Ty(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!==o&&E){const T=new Event("click",{bubbles:k});O.indeterminate=Xo(o),E.call(O,Xo(o)?!1:o),O.dispatchEvent(T)}},[g,b,o,a]);const N=y.useRef(Xo(o)?!1:o);return i.jsx(Pe.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%)"}})});nH.displayName=tH;function Aje(e){return typeof e=="function"}function Xo(e){return e==="indeterminate"}function rH(e){return Xo(e)?"indeterminate":e?"checked":"unchecked"}const ku=y.forwardRef(({className:e,...t},n)=>i.jsx(SE,{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:i.jsx(eH,{className:ue("grid place-content-center text-current"),children:i.jsx(nl,{className:"h-4 w-4"})})}));ku.displayName=SE.displayName;function Tje(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[a,o]=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(""),[M,$]=y.useState(new Set),[z,D]=y.useState(!1),{toast:U}=mr(),V=y.useRef(null),H=y.useRef(!0);y.useEffect(()=>{G()},[]);const G=async()=>{try{r(!0);const ae=await kg();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 lO("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{o(!0),V.current&&clearTimeout(V.current);const ae=await kg();ae.api_providers=e,await XU(ae),f(!1),U({title:"保存成功",description:"模型提供商配置已保存"})}catch(ae){console.error("保存配置失败:",ae),U({title:"保存失败",description:ae.message,variant:"destructive"})}finally{o(!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(M);Z.has(ae)?Z.delete(ae):Z.add(ae),$(Z)},ne=()=>{if(M.size===ee.length)$(new Set);else{const ae=ee.map((Z,pe)=>e.findIndex(je=>je===ee[pe]));$(new Set(ae))}},oe=()=>{if(M.size===0){U({title:"提示",description:"请先选择要删除的提供商",variant:"default"});return}D(!0)},xe=()=>{const ae=e.filter((Z,pe)=>!M.has(pe));t(ae),$(new Set),D(!1),U({title:"批量删除成功",description:`已删除 ${M.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?i.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})}):i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"模型提供商配置"}),i.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理 API 提供商配置"})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[M.size>0&&i.jsxs(fe,{onClick:oe,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[i.jsx(Ut,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",M.size,")"]}),i.jsxs(fe,{onClick:()=>F(null,null),size:"sm",className:"w-full sm:w-auto",children:[i.jsx(tr,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加提供商"]}),i.jsxs(fe,{onClick:R,disabled:a||l||!d,size:"sm",variant:"default",className:"w-full sm:w-auto",children:[i.jsx(GC,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),a?"保存中...":l?"自动保存中...":d?"保存配置":"已保存"]})]})]}),i.jsxs(Kt,{className:"h-[calc(100vh-260px)]",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 mb-4",children:[i.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[i.jsx(Dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Ne,{placeholder:"搜索提供商名称、URL 或类型...",value:k,onChange:ae=>T(ae.target.value),className:"pl-9"})]}),k&&i.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",ee.length," 个结果"]})]}),i.jsx("div",{className:"md:hidden space-y-3",children:ee.length===0?i.jsx("div",{className:"text-center text-muted-foreground py-8 rounded-lg border bg-card",children:k?"未找到匹配的提供商":'暂无提供商配置,点击"添加提供商"开始配置'}):ee.map((ae,Z)=>i.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h3",{className:"font-semibold text-base truncate",children:ae.name}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1 break-all",children:ae.base_url})]}),i.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>F(ae,Z),children:i.jsx(Eu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>I(Z),children:i.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"客户端类型"}),i.jsx("p",{className:"font-medium",children:ae.client_type})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"最大重试"}),i.jsx("p",{className:"font-medium",children:ae.max_retry})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"超时(秒)"}),i.jsx("p",{className:"font-medium",children:ae.timeout})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"重试间隔(秒)"}),i.jsx("p",{className:"font-medium",children:ae.retry_interval})]})]})]},Z))}),i.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:i.jsxs(Ol,{children:[i.jsx(Cl,{children:i.jsxs(vn,{children:[i.jsx(Je,{className:"w-12",children:i.jsx(ku,{checked:M.size===ee.length&&ee.length>0,onCheckedChange:ne})}),i.jsx(Je,{children:"名称"}),i.jsx(Je,{children:"基础URL"}),i.jsx(Je,{children:"客户端类型"}),i.jsx(Je,{className:"text-right",children:"最大重试"}),i.jsx(Je,{className:"text-right",children:"超时(秒)"}),i.jsx(Je,{className:"text-right",children:"重试间隔(秒)"}),i.jsx(Je,{className:"text-right",children:"操作"})]})}),i.jsx(El,{children:ee.length===0?i.jsx(vn,{children:i.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 i.jsxs(vn,{children:[i.jsx(Ue,{children:i.jsx(ku,{checked:M.has(pe),onCheckedChange:()=>Y(pe)})}),i.jsx(Ue,{className:"font-medium",children:ae.name}),i.jsx(Ue,{className:"max-w-xs truncate",title:ae.base_url,children:ae.base_url}),i.jsx(Ue,{children:ae.client_type}),i.jsx(Ue,{className:"text-right",children:ae.max_retry}),i.jsx(Ue,{className:"text-right",children:ae.timeout}),i.jsx(Ue,{className:"text-right",children:ae.retry_interval}),i.jsx(Ue,{className:"text-right",children:i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>F(ae,pe),children:i.jsx(Eu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>I(pe),children:i.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})})]},Z)})})]})})]}),i.jsx(nr,{open:m,onOpenChange:p,children:i.jsxs(Hn,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:j!==null?"编辑提供商":"添加提供商"}),i.jsx(dr,{children:"配置 API 提供商的连接信息和参数"})]}),i.jsxs("div",{className:"grid gap-4 py-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"name",children:"名称 *"}),i.jsx(Ne,{id:"name",value:g?.name||"",onChange:ae=>x(Z=>Z?{...Z,name:ae.target.value}:null),placeholder:"例如: DeepSeek, SiliconFlow"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"base_url",children:"基础 URL *"}),i.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"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"api_key",children:"API Key *"}),i.jsxs("div",{className:"flex gap-2",children:[i.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"}),i.jsx(fe,{type:"button",variant:"outline",size:"icon",onClick:()=>E(!A),title:A?"隐藏密钥":"显示密钥",children:A?i.jsx(HN,{className:"h-4 w-4"}):i.jsx(ao,{className:"h-4 w-4"})}),i.jsx(fe,{type:"button",variant:"outline",size:"icon",onClick:K,title:"复制密钥",children:i.jsx(FN,{className:"h-4 w-4"})})]})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"client_type",children:"客户端类型"}),i.jsxs(Et,{value:g?.client_type||"openai",onValueChange:ae=>x(Z=>Z?{...Z,client_type:ae}:null),children:[i.jsx(wt,{id:"client_type",children:i.jsx(At,{placeholder:"选择客户端类型"})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"openai",children:"OpenAI"}),i.jsx(Me,{value:"gemini",children:"Gemini"})]})]})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"max_retry",children:"最大重试"}),i.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)})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"timeout",children:"超时(秒)"}),i.jsx(Ne,{id:"timeout",type:"number",min:"1",value:g?.timeout||30,onChange:ae=>x(Z=>Z?{...Z,timeout:parseInt(ae.target.value)}:null)})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"retry_interval",children:"重试间隔(秒)"}),i.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)})]})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>p(!1),children:"取消"}),i.jsx(fe,{onClick:te,children:"保存"})]})]})}),i.jsx(Pn,{open:w,onOpenChange:N,children:i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:['确定要删除提供商 "',O!==null?e[O]?.name:"",'" 吗? 此操作无法撤销。']})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:B,children:"删除"})]})]})}),i.jsx(Pn,{open:z,onOpenChange:D,children:i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认批量删除"}),i.jsxs(jn,{children:["确定要删除选中的 ",M.size," 个提供商吗? 此操作无法撤销。"]})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:xe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})})]})}var xL=1,kje=.9,Mje=.8,Pje=.17,t_=.1,n_=.999,Rje=.9999,Dje=.99,$je=/[\\\/_+.#"@\[\(\{&]/,Ije=/[\\\/_+.#"@\[\(\{&]/g,Lje=/[\s-]/,aH=/[\s-]/g;function cO(e,t,n,r,a,o,l){if(o===t.length)return a===e.length?xL:Dje;var u=`${a},${o}`;if(l[u]!==void 0)return l[u];for(var d=r.charAt(o),f=n.indexOf(d,a),m=0,p,g,x,j;f>=0;)p=cO(e,t,n,r,f+1,o+1,l),p>m&&(f===a?p*=xL:$je.test(e.charAt(f-1))?(p*=Mje,x=e.slice(a,f-1).match(Ije),x&&a>0&&(p*=Math.pow(n_,x.length))):Lje.test(e.charAt(f-1))?(p*=kje,j=e.slice(a,f-1).match(aH),j&&a>0&&(p*=Math.pow(n_,j.length))):(p*=Pje,a>0&&(p*=Math.pow(n_,f-a))),e.charAt(f)!==t.charAt(o)&&(p*=Rje)),(p<t_&&n.charAt(f-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(f-1)!==r.charAt(o))&&(g=cO(e,t,n,r,f+1,o+2,l),g*t_>p&&(p=g*t_)),p>m&&(m=p),f=n.indexOf(d,f+1);return l[u]=m,m}function bL(e){return e.toLowerCase().replace(aH," ")}function Bje(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,cO(e,t,bL(e),bL(t),0,0,{})}var zje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fs=zje.reduce((e,t)=>{const n=Bh(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),of='[cmdk-group=""]',r_='[cmdk-group-items=""]',qje='[cmdk-group-heading=""]',iH='[cmdk-item=""]',wL=`${iH}:not([aria-disabled="true"])`,uO="cmdk-item-select",Mc="data-value",Fje=(e,t,n)=>Bje(e,t,n),oH=y.createContext(void 0),Gh=()=>y.useContext(oH),sH=y.createContext(void 0),_E=()=>y.useContext(sH),lH=y.createContext(void 0),cH=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),o=Pc(()=>new Map),l=Pc(()=>new Set),u=uH(e),{label:d,children:f,value:m,onValueChange:p,filter:g,shouldFilter:x,loop:j,disablePointerSelection:b=!1,vimBindings:w=!0,...N}=e,O=Fn(),C=Fn(),A=Fn(),E=y.useRef(null),k=Jje();gl(()=>{if(m!==void 0){let B=m.trim();n.current.value=B,T.emit()}},[m]),gl(()=>{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())}}),[]),M=y.useMemo(()=>({value:(B,Y,ne)=>{var oe;Y!==((oe=o.current.get(B))==null?void 0:oe.value)&&(o.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()}),()=>{o.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),()=>{o.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:Fje;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(r_);xe?xe.appendChild(oe.parentElement===xe?oe:oe.closest(`${r_} > *`)):ne.appendChild(oe.parentElement===ne?oe:oe.closest(`${r_} > *`))}),Y.sort((oe,xe)=>xe[1]-oe[1]).forEach(oe=>{var xe;let ee=(xe=E.current)==null?void 0:xe.querySelector(`${of}[${Mc}="${encodeURIComponent(oe[0])}"]`);ee?.parentElement.appendChild(ee)})}function D(){let B=G().find(ne=>ne.getAttribute("aria-disabled")!=="true"),Y=B?.getAttribute(Mc);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=o.current.get(ee))==null?void 0:B.value)!=null?Y:"",Z=(oe=(ne=o.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(of))==null?void 0:Y.querySelector(qje))==null||ne.scrollIntoView({block:"nearest"})),oe.scrollIntoView({block:"nearest"}))}function H(){var B;return(B=E.current)==null?void 0:B.querySelector(`${iH}[aria-selected="true"]`)}function G(){var B;return Array.from(((B=E.current)==null?void 0:B.querySelectorAll(wL))||[])}function L(B){let Y=G()[B];Y&&T.setState("value",Y.getAttribute(Mc))}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(Mc))}function F(B){let Y=H(),ne=Y?.closest(of),oe;for(;ne&&!oe;)ne=B>0?Zje(ne,of):Qje(ne,of),oe=ne?.querySelector(wL);oe?T.setState("value",oe.getAttribute(Mc)):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(fs.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(uO);oe.dispatchEvent(xe)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:t1e},d),Zy(e,B=>y.createElement(sH.Provider,{value:T},y.createElement(oH.Provider,{value:M},B))))}),Uje=y.forwardRef((e,t)=>{var n,r;let a=Fn(),o=y.useRef(null),l=y.useContext(lH),u=Gh(),d=uH(e),f=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l?.forceMount;gl(()=>{if(!f)return u.item(a,l?.id)},[f]);let m=dH(a,o,[e.value,e.children,o],e.keywords),p=_E(),g=ns(k=>k.value&&k.value===m.current),x=ns(k=>f||u.filter()===!1?!0:k.search?k.filtered.items.get(a)>0:!0);y.useEffect(()=>{let k=o.current;if(!(!k||e.disabled))return k.addEventListener(uO,j),()=>k.removeEventListener(uO,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(fs.div,{ref:Rr(o,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)}),Hje=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,l=Fn(),u=y.useRef(null),d=y.useRef(null),f=Fn(),m=Gh(),p=ns(x=>a||m.filter()===!1?!0:x.search?x.filtered.groups.has(l):!0);gl(()=>m.group(l),[]),dH(l,u,[e.value,e.heading,d]);let g=y.useMemo(()=>({id:l,forceMount:a}),[a]);return y.createElement(fs.div,{ref:Rr(u,t),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&y.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Zy(e,x=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},y.createElement(lH.Provider,{value:g},x))))}),Wje=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=y.useRef(null),o=ns(l=>!l.search);return!n&&!o?null:y.createElement(fs.div,{ref:Rr(a,t),...r,"cmdk-separator":"",role:"separator"})}),Vje=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=_E(),l=ns(f=>f.search),u=ns(f=>f.selectedItemId),d=Gh();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(fs.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||o.setState("search",f.target.value),n?.(f.target.value)}})}),Gje=y.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=y.useRef(null),l=y.useRef(null),u=ns(f=>f.selectedItemId),d=Gh();return y.useEffect(()=>{if(l.current&&o.current){let f=l.current,m=o.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(fs.div,{ref:Rr(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:d.listId},Zy(e,f=>y.createElement("div",{ref:Rr(l,d.listInnerRef),"cmdk-list-sizer":""},f)))}),Yje=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:l,...u}=e;return y.createElement(nE,{open:n,onOpenChange:r},y.createElement(rE,{container:l},y.createElement($y,{"cmdk-overlay":"",className:a}),y.createElement(Iy,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(cH,{ref:t,...u}))))}),Kje=y.forwardRef((e,t)=>ns(n=>n.filtered.count===0)?y.createElement(fs.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Xje=y.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return y.createElement(fs.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},Zy(e,l=>y.createElement("div",{"aria-hidden":!0},l)))}),Br=Object.assign(cH,{List:Gje,Item:Uje,Input:Vje,Group:Hje,Separator:Wje,Dialog:Yje,Empty:Kje,Loading:Xje});function Zje(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Qje(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function uH(e){let t=y.useRef(e);return gl(()=>{t.current=e}),t}var gl=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Pc(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ns(e){let t=_E(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function dH(e,t,n,r=[]){let a=y.useRef(),o=Gh();return gl(()=>{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());o.value(e,u,d),(l=t.current)==null||l.setAttribute(Mc,u),a.current=u}),a}var Jje=()=>{let[e,t]=y.useState(),n=Pc(()=>new Map);return gl(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function e1e(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Zy({asChild:e,children:t},n){return e&&y.isValidElement(t)?y.cloneElement(e1e(t),{ref:t.ref},n(t.props.children)):n(t)}var t1e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const fH=y.forwardRef(({className:e,...t},n)=>i.jsx(Br,{ref:n,className:ue("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));fH.displayName=Br.displayName;const hH=y.forwardRef(({className:e,...t},n)=>i.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[i.jsx(Dr,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),i.jsx(Br.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})]}));hH.displayName=Br.Input.displayName;const mH=y.forwardRef(({className:e,...t},n)=>i.jsx(Br.List,{ref:n,className:ue("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));mH.displayName=Br.List.displayName;const pH=y.forwardRef((e,t)=>i.jsx(Br.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));pH.displayName=Br.Empty.displayName;const vH=y.forwardRef(({className:e,...t},n)=>i.jsx(Br.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}));vH.displayName=Br.Group.displayName;const n1e=y.forwardRef(({className:e,...t},n)=>i.jsx(Br.Separator,{ref:n,className:ue("-mx-1 h-px bg-border",e),...t}));n1e.displayName=Br.Separator.displayName;const gH=y.forwardRef(({className:e,...t},n)=>i.jsx(Br.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}));gH.displayName=Br.Item.displayName;function r1e({options:e,selected:t,onChange:n,placeholder:r="选择选项...",emptyText:a="未找到选项",className:o}){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 i.jsxs(es,{open:l,onOpenChange:u,children:[i.jsx(ts,{asChild:!0,children:i.jsxs(fe,{variant:"outline",role:"combobox","aria-expanded":l,className:ue("w-full justify-between min-h-10 h-auto",o),children:[i.jsx("div",{className:"flex gap-1 flex-wrap flex-1",children:t.length===0?i.jsx("span",{className:"text-muted-foreground",children:r}):t.map(m=>{const p=e.find(g=>g.value===m);return i.jsxs(tn,{variant:"secondary",className:"cursor-pointer hover:bg-secondary/80",onClick:g=>{g.stopPropagation(),f(m)},children:[p?.label||m,i.jsx(Lh,{className:"ml-1 h-3 w-3",strokeWidth:2,fill:"none"})]},m)})}),i.jsx(sve,{className:"ml-2 h-4 w-4 shrink-0 opacity-50",strokeWidth:2,fill:"none"})]})}),i.jsx(so,{className:"w-full p-0",align:"start",children:i.jsxs(fH,{children:[i.jsx(hH,{placeholder:"搜索...",className:"h-9"}),i.jsxs(mH,{children:[i.jsx(pH,{children:a}),i.jsx(vH,{children:e.map(m=>{const p=t.includes(m.value);return i.jsxs(gH,{value:m.value,onSelect:()=>d(m.value),children:[i.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:i.jsx(nl,{className:"h-3 w-3",strokeWidth:2,fill:"none"})}),i.jsx("span",{children:m.label})]},m.value)})})]})]})})]})}function a1e(){const[e,t]=y.useState([]),[n,r]=y.useState([]),[a,o]=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),[M,$]=y.useState(null),[z,D]=y.useState(""),[U,V]=y.useState(new Set),[H,G]=y.useState(!1),{toast:L}=mr(),R=y.useRef(null),F=y.useRef(null),K=y.useRef(!0);y.useEffect(()=>{te()},[]);const te=async()=>{try{f(!0);const me=await kg(),ve=me.models||[];t(ve),o(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 lO("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 lO("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 kg();me.models=e,me.model_task_config=l,await XU(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(M!==null){const me=e.filter((ve,Le)=>Le!==M);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?i.jsx(Kt,{className:"h-full",children:i.jsx("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx("p",{className:"text-muted-foreground",children:"加载中..."})})})}):i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"模型配置"}),i.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理模型和任务配置"})]}),i.jsxs(fe,{onClick:Y,disabled:m||g||!j,size:"sm",className:"w-full sm:w-auto",children:[i.jsx(GC,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),m?"保存中...":g?"自动保存中...":j?"保存配置":"已保存"]})]}),i.jsxs(sl,{defaultValue:"models",className:"w-full",children:[i.jsxs(Zo,{className:"grid w-full max-w-full sm:max-w-md grid-cols-2",children:[i.jsx(Ct,{value:"models",children:"模型配置"}),i.jsx(Ct,{value:"tasks",children:"模型任务配置"})]}),i.jsxs(Jt,{value:"models",className:"space-y-4 mt-0",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-2",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"配置可用的模型列表"}),i.jsxs("div",{className:"flex gap-2 w-full sm:w-auto",children:[U.size>0&&i.jsxs(fe,{onClick:pe,size:"sm",variant:"destructive",className:"w-full sm:w-auto",children:[i.jsx(Ut,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"批量删除 (",U.size,")"]}),i.jsxs(fe,{onClick:()=>ne(null,null),size:"sm",variant:"outline",className:"w-full sm:w-auto",children:[i.jsx(tr,{className:"mr-2 h-4 w-4",strokeWidth:2,fill:"none"}),"添加模型"]})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2",children:[i.jsxs("div",{className:"relative w-full sm:flex-1 sm:max-w-sm",children:[i.jsx(Dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Ne,{placeholder:"搜索模型名称、标识符或提供商...",value:z,onChange:me=>D(me.target.value),className:"pl-9"})]}),z&&i.jsxs("p",{className:"text-sm text-muted-foreground whitespace-nowrap",children:["找到 ",Re.length," 个结果"]})]}),i.jsx("div",{className:"md:hidden space-y-3",children:Re.length===0?i.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 i.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("h3",{className:"font-semibold text-base",children:me.name}),i.jsx(tn,{variant:Le?"default":"secondary",className:Le?"bg-green-600 hover:bg-green-700":"",children:Le?"已使用":"未使用"})]}),i.jsx("p",{className:"text-xs text-muted-foreground break-all",title:me.model_identifier,children:me.model_identifier})]}),i.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>ne(me,ve),children:i.jsx(Eu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>xe(ve),children:i.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"提供商"}),i.jsx("p",{className:"font-medium",children:me.api_provider})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"强制流式"}),i.jsx("p",{className:"font-medium",children:me.force_stream_mode?"是":"否"})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"输入价格"}),i.jsxs("p",{className:"font-medium",children:["¥",me.price_in,"/M"]})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground text-xs",children:"输出价格"}),i.jsxs("p",{className:"font-medium",children:["¥",me.price_out,"/M"]})]})]})]},ve)})}),i.jsx("div",{className:"hidden md:block rounded-lg border bg-card overflow-hidden",children:i.jsxs(Ol,{children:[i.jsx(Cl,{children:i.jsxs(vn,{children:[i.jsx(Je,{className:"w-12",children:i.jsx(ku,{checked:U.size===Re.length&&Re.length>0,onCheckedChange:Z})}),i.jsx(Je,{className:"w-24",children:"使用状态"}),i.jsx(Je,{children:"模型名称"}),i.jsx(Je,{children:"模型标识符"}),i.jsx(Je,{children:"提供商"}),i.jsx(Je,{className:"text-right",children:"输入价格"}),i.jsx(Je,{className:"text-right",children:"输出价格"}),i.jsx(Je,{className:"text-center",children:"强制流式"}),i.jsx(Je,{className:"text-right",children:"操作"})]})}),i.jsx(El,{children:Re.length===0?i.jsx(vn,{children:i.jsx(Ue,{colSpan:9,className:"text-center text-muted-foreground py-8",children:z?"未找到匹配的模型":"暂无模型配置"})}):Re.map((me,ve)=>{const Le=e.findIndex(On=>On===me),Dt=_e(me.name);return i.jsxs(vn,{children:[i.jsx(Ue,{children:i.jsx(ku,{checked:U.has(Le),onCheckedChange:()=>ae(Le)})}),i.jsx(Ue,{children:i.jsx(tn,{variant:Dt?"default":"secondary",className:Dt?"bg-green-600 hover:bg-green-700":"",children:Dt?"已使用":"未使用"})}),i.jsx(Ue,{className:"font-medium",children:me.name}),i.jsx(Ue,{className:"max-w-xs truncate",title:me.model_identifier,children:me.model_identifier}),i.jsx(Ue,{children:me.api_provider}),i.jsxs(Ue,{className:"text-right",children:["¥",me.price_in,"/M"]}),i.jsxs(Ue,{className:"text-right",children:["¥",me.price_out,"/M"]}),i.jsx(Ue,{className:"text-center",children:me.force_stream_mode?"是":"否"}),i.jsx(Ue,{className:"text-right",children:i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>ne(me,Le),children:i.jsx(Eu,{className:"h-4 w-4",strokeWidth:2,fill:"none"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>xe(Le),children:i.jsx(Ut,{className:"h-4 w-4",strokeWidth:2,fill:"none"})})]})})]},ve)})})]})})]}),i.jsxs(Jt,{value:"tasks",className:"space-y-6 mt-0",children:[i.jsx("p",{className:"text-sm text-muted-foreground",children:"为不同的任务配置使用的模型和参数"}),l&&i.jsxs("div",{className:"grid gap-4 sm:gap-6",children:[i.jsx(Ra,{title:"组件模型 (utils)",description:"用于表情包、取名、关系、情绪变化等组件",taskConfig:l.utils,modelNames:a,onChange:(me,ve)=>le("utils",me,ve)}),i.jsx(Ra,{title:"组件小模型 (utils_small)",description:"消耗量较大的组件,建议使用速度较快的小模型",taskConfig:l.utils_small,modelNames:a,onChange:(me,ve)=>le("utils_small",me,ve)}),i.jsx(Ra,{title:"工具调用模型 (tool_use)",description:"需要使用支持工具调用的模型",taskConfig:l.tool_use,modelNames:a,onChange:(me,ve)=>le("tool_use",me,ve)}),i.jsx(Ra,{title:"首要回复模型 (replyer)",description:"用于表达器和表达方式学习",taskConfig:l.replyer,modelNames:a,onChange:(me,ve)=>le("replyer",me,ve)}),i.jsx(Ra,{title:"决策模型 (planner)",description:"负责决定麦麦该什么时候回复",taskConfig:l.planner,modelNames:a,onChange:(me,ve)=>le("planner",me,ve)}),i.jsx(Ra,{title:"图像识别模型 (vlm)",description:"视觉语言模型",taskConfig:l.vlm,modelNames:a,onChange:(me,ve)=>le("vlm",me,ve),hideTemperature:!0}),i.jsx(Ra,{title:"语音识别模型 (voice)",description:"语音转文字",taskConfig:l.voice,modelNames:a,onChange:(me,ve)=>le("voice",me,ve),hideTemperature:!0,hideMaxTokens:!0}),i.jsx(Ra,{title:"嵌入模型 (embedding)",description:"用于向量化",taskConfig:l.embedding,modelNames:a,onChange:(me,ve)=>le("embedding",me,ve),hideTemperature:!0,hideMaxTokens:!0}),i.jsxs("div",{className:"space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold",children:"LPMM 知识库模型"}),i.jsx(Ra,{title:"实体提取模型 (lpmm_entity_extract)",description:"从文本中提取实体",taskConfig:l.lpmm_entity_extract,modelNames:a,onChange:(me,ve)=>le("lpmm_entity_extract",me,ve)}),i.jsx(Ra,{title:"RDF 构建模型 (lpmm_rdf_build)",description:"构建知识图谱",taskConfig:l.lpmm_rdf_build,modelNames:a,onChange:(me,ve)=>le("lpmm_rdf_build",me,ve)}),i.jsx(Ra,{title:"问答模型 (lpmm_qa)",description:"知识库问答",taskConfig:l.lpmm_qa,modelNames:a,onChange:(me,ve)=>le("lpmm_qa",me,ve)})]})]})]})]}),i.jsx(nr,{open:w,onOpenChange:N,children:i.jsxs(Hn,{className:"max-w-[95vw] sm:max-w-2xl max-h-[90vh] overflow-y-auto",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:A!==null?"编辑模型":"添加模型"}),i.jsx(dr,{children:"配置模型的基本信息和参数"})]}),i.jsxs("div",{className:"grid gap-4 py-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"model_name",children:"模型名称 *"}),i.jsx(Ne,{id:"model_name",value:O?.name||"",onChange:me=>C(ve=>ve?{...ve,name:me.target.value}:null),placeholder:"例如: qwen3-30b"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"用于在任务配置中引用此模型"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"model_identifier",children:"模型标识符 *"}),i.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"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"API 提供商提供的模型 ID"})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"api_provider",children:"API 提供商 *"}),i.jsxs(Et,{value:O?.api_provider||"",onValueChange:me=>C(ve=>ve?{...ve,api_provider:me}:null),children:[i.jsx(wt,{id:"api_provider",children:i.jsx(At,{placeholder:"选择提供商"})}),i.jsx(jt,{children:n.map(me=>i.jsx(Me,{value:me,children:me},me))})]})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"price_in",children:"输入价格 (¥/M token)"}),i.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)})]}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{htmlFor:"price_out",children:"输出价格 (¥/M token)"}),i.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)})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"force_stream_mode",checked:O?.force_stream_mode||!1,onCheckedChange:me=>C(ve=>ve?{...ve,force_stream_mode:me}:null)}),i.jsx(J,{htmlFor:"force_stream_mode",className:"cursor-pointer",children:"强制流式输出模式"})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>N(!1),children:"取消"}),i.jsx(fe,{onClick:oe,children:"保存"})]})]})}),i.jsx(Pn,{open:k,onOpenChange:T,children:i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:['确定要删除模型 "',M!==null?e[M]?.name:"",'" 吗? 此操作无法撤销。']})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:ee,children:"删除"})]})]})}),i.jsx(Pn,{open:H,onOpenChange:G,children:i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认批量删除"}),i.jsxs(jn,{children:["确定要删除选中的 ",U.size," 个模型吗? 此操作无法撤销。"]})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:je,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"批量删除"})]})]})})]})})}function Ra({title:e,description:t,taskConfig:n,modelNames:r,onChange:a,hideTemperature:o=!1,hideMaxTokens:l=!1}){const u=d=>{a("model_list",d)};return i.jsxs("div",{className:"rounded-lg border bg-card p-4 sm:p-6 space-y-4",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"font-semibold text-base sm:text-lg",children:e}),i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mt-1",children:t})]}),i.jsxs("div",{className:"grid gap-4",children:[i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"模型列表"}),i.jsx(r1e,{options:r.map(d=>({label:d,value:d})),selected:n.model_list||[],onChange:u,placeholder:"选择模型...",emptyText:"暂无可用模型"})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[!o&&i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"温度"}),i.jsx(Ne,{type:"number",step:"0.1",min:"0",max:"2",value:n.temperature||.3,onChange:d=>a("temperature",parseFloat(d.target.value))})]}),!l&&i.jsxs("div",{className:"grid gap-2",children:[i.jsx(J,{children:"最大 Token"}),i.jsx(Ne,{type:"number",step:"1",min:"1",value:n.max_tokens||1024,onChange:d=>a("max_tokens",parseInt(d.target.value))})]})]})]})]})}const Al="/api/webui/emoji";async function i1e(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(`${Al}/list?${t}`,{headers:st()});if(!n.ok)throw new Error(`获取表情包列表失败: ${n.statusText}`);return n.json()}async function o1e(e){const t=await Ze(`${Al}/${e}`,{headers:st()});if(!t.ok)throw new Error(`获取表情包详情失败: ${t.statusText}`);return t.json()}async function s1e(e,t){const n=await Ze(`${Al}/${e}`,{method:"PATCH",headers:st(),body:JSON.stringify(t)});if(!n.ok)throw new Error(`更新表情包失败: ${n.statusText}`);return n.json()}async function l1e(e){const t=await Ze(`${Al}/${e}`,{method:"DELETE",headers:st()});if(!t.ok)throw new Error(`删除表情包失败: ${t.statusText}`);return t.json()}async function c1e(){const e=await Ze(`${Al}/stats/summary`,{headers:st()});if(!e.ok)throw new Error(`获取统计数据失败: ${e.statusText}`);return e.json()}async function u1e(e){const t=await Ze(`${Al}/${e}/register`,{method:"POST",headers:st()});if(!t.ok)throw new Error(`注册表情包失败: ${t.statusText}`);return t.json()}async function d1e(e){const t=await Ze(`${Al}/${e}/ban`,{method:"POST",headers:st()});if(!t.ok)throw new Error(`封禁表情包失败: ${t.statusText}`);return t.json()}function f1e(){const[e,t]=y.useState([]),[n,r]=y.useState(null),[a,o]=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,M]=y.useState(!1),[$,z]=y.useState(!1),{toast:D}=mr(),U=y.useCallback(async()=>{try{o(!0);const I=await i1e({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{o(!1)}},[l,m,p,x,b,N,D]),V=async()=>{try{const I=await c1e();r(I.data)}catch(I){console.error("加载统计数据失败:",I)}};y.useEffect(()=>{U()},[U]),y.useEffect(()=>{V()},[]);const H=async I=>{try{const B=await o1e(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),M(!0)},L=I=>{A(I),z(!0)},R=async()=>{if(C)try{await l1e(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 u1e(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 d1e(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 i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"表情包管理"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理麦麦的表情包资源"})]}),n&&i.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[i.jsx(dt,{children:i.jsxs(Vt,{className:"pb-2",children:[i.jsx(er,{children:"总数"}),i.jsx(Gt,{className:"text-2xl",children:n.total})]})}),i.jsx(dt,{children:i.jsxs(Vt,{className:"pb-2",children:[i.jsx(er,{children:"已注册"}),i.jsx(Gt,{className:"text-2xl text-green-600",children:n.registered})]})}),i.jsx(dt,{children:i.jsxs(Vt,{className:"pb-2",children:[i.jsx(er,{children:"已封禁"}),i.jsx(Gt,{className:"text-2xl text-red-600",children:n.banned})]})}),i.jsx(dt,{children:i.jsxs(Vt,{className:"pb-2",children:[i.jsx(er,{children:"未注册"}),i.jsx(Gt,{className:"text-2xl text-gray-600",children:n.unregistered})]})})]}),i.jsxs(dt,{children:[i.jsx(Vt,{children:i.jsxs(Gt,{className:"flex items-center gap-2",children:[i.jsx(WN,{className:"h-5 w-5"}),"搜索和筛选"]})}),i.jsxs(cn,{className:"space-y-4",children:[i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{children:"搜索"}),i.jsxs("div",{className:"relative",children:[i.jsx(Dr,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),i.jsx(Ne,{placeholder:"描述或哈希值...",value:p,onChange:I=>{g(I.target.value),u(1)},className:"pl-8"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{children:"注册状态"}),i.jsxs(Et,{value:x,onValueChange:I=>{j(I),u(1)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部"}),i.jsx(Me,{value:"registered",children:"已注册"}),i.jsx(Me,{value:"unregistered",children:"未注册"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{children:"封禁状态"}),i.jsxs(Et,{value:b,onValueChange:I=>{w(I),u(1)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部"}),i.jsx(Me,{value:"banned",children:"已封禁"}),i.jsx(Me,{value:"unbanned",children:"未封禁"})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{children:"格式"}),i.jsxs(Et,{value:N,onValueChange:I=>{O(I),u(1)},children:[i.jsx(wt,{children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部"}),te.map(I=>i.jsxs(Me,{value:I,children:[I.toUpperCase()," (",n?.formats[I],")"]},I))]})]})]})]}),i.jsx("div",{className:"flex justify-end",children:i.jsxs(fe,{variant:"outline",size:"sm",onClick:U,disabled:a,children:[i.jsx(al,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"刷新"]})})]})]}),i.jsxs(dt,{children:[i.jsxs(Vt,{children:[i.jsx(Gt,{children:"表情包列表"}),i.jsxs(er,{children:["共 ",d," 个表情包,当前第 ",l," 页"]})]}),i.jsxs(cn,{children:[i.jsx("div",{className:"rounded-md border",children:i.jsxs(Ol,{children:[i.jsx(Cl,{children:i.jsxs(vn,{children:[i.jsx(Je,{className:"w-16",children:"预览"}),i.jsx(Je,{children:"描述"}),i.jsx(Je,{children:"格式"}),i.jsx(Je,{className:"text-center",children:"状态"}),i.jsx(Je,{className:"text-right",children:"使用次数"}),i.jsx(Je,{className:"text-right",children:"操作"})]})}),i.jsx(El,{children:e.length===0?i.jsx(vn,{children:i.jsx(Ue,{colSpan:6,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):e.map(I=>i.jsxs(vn,{children:[i.jsx(Ue,{children:i.jsx("div",{className:"w-12 h-12 bg-muted rounded flex items-center justify-center",children:i.jsx(Mve,{className:"h-6 w-6 text-muted-foreground"})})}),i.jsx(Ue,{children:i.jsxs("div",{className:"space-y-1",children:[i.jsx("div",{className:"font-medium",children:I.description||"无描述"}),i.jsxs("div",{className:"text-xs text-muted-foreground font-mono",children:[I.emoji_hash.slice(0,16),"..."]})]})}),i.jsx(Ue,{children:i.jsx(tn,{variant:"outline",children:I.format.toUpperCase()})}),i.jsx(Ue,{children:i.jsxs("div",{className:"flex gap-2 justify-center",children:[I.is_registered&&i.jsxs(tn,{variant:"default",className:"bg-green-600",children:[i.jsx(Cu,{className:"h-3 w-3 mr-1"}),"已注册"]}),I.is_banned&&i.jsxs(tn,{variant:"destructive",children:[i.jsx(Gq,{className:"h-3 w-3 mr-1"}),"已封禁"]})]})}),i.jsx(Ue,{className:"text-right font-mono",children:I.usage_count}),i.jsx(Ue,{children:i.jsxs("div",{className:"flex items-center justify-end gap-2",children:[i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>H(I),children:i.jsx(Yq,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>G(I),children:i.jsx(KC,{className:"h-4 w-4"})}),!I.is_registered&&i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>F(I),className:"text-green-600 hover:text-green-700",children:i.jsx(Cu,{className:"h-4 w-4"})}),!I.is_banned&&i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>K(I),className:"text-orange-600 hover:text-orange-700",children:i.jsx(Vpe,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>L(I),className:"text-red-600 hover:text-red-700",children:i.jsx(Ut,{className:"h-4 w-4"})})]})})]},I.id))})]})}),d>m&&i.jsxs("div",{className:"flex items-center justify-between mt-4",children:[i.jsxs("div",{className:"text-sm text-muted-foreground",children:["显示 ",(l-1)*m+1," 到"," ",Math.min(l*m,d)," 条,共 ",d," 条"]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(fe,{variant:"outline",size:"sm",onClick:()=>u(I=>Math.max(1,I-1)),disabled:l===1,children:[i.jsx(HC,{className:"h-4 w-4"}),"上一页"]}),i.jsxs("div",{className:"text-sm",children:["第 ",l," / ",Math.ceil(d/m)," 页"]}),i.jsxs(fe,{variant:"outline",size:"sm",onClick:()=>u(I=>I+1),disabled:l>=Math.ceil(d/m),children:["下一页",i.jsx(WC,{className:"h-4 w-4"})]})]})]})]})]}),i.jsx(h1e,{emoji:C,open:E,onOpenChange:k}),i.jsx(m1e,{emoji:C,open:T,onOpenChange:M,onSuccess:()=>{U(),V()}}),i.jsx(nr,{open:$,onOpenChange:z,children:i.jsxs(Hn,{children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"确认删除"}),i.jsx(dr,{children:"确定要删除这个表情包吗?此操作无法撤销。"})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>z(!1),children:"取消"}),i.jsx(fe,{variant:"destructive",onClick:R,children:"删除"})]})]})})]})}function h1e({emoji:e,open:t,onOpenChange:n}){if(!e)return null;const r=a=>a?new Date(a*1e3).toLocaleString("zh-CN"):"-";return i.jsx(nr,{open:t,onOpenChange:n,children:i.jsxs(Hn,{className:"max-w-2xl",children:[i.jsx(Wn,{children:i.jsx(Vn,{children:"表情包详情"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"ID"}),i.jsx("div",{className:"mt-1 font-mono",children:e.id})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"格式"}),i.jsx("div",{className:"mt-1",children:i.jsx(tn,{variant:"outline",children:e.format.toUpperCase()})})]})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"文件路径"}),i.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:e.full_path})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"哈希值"}),i.jsx("div",{className:"mt-1 font-mono text-sm break-all bg-muted p-2 rounded",children:e.emoji_hash})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"描述"}),i.jsx("div",{className:"mt-1",children:e.description||"-"})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"情绪标签"}),i.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.emotion&&e.emotion.length>0?e.emotion.map((a,o)=>i.jsx(tn,{variant:"secondary",children:a},o)):i.jsx("span",{className:"text-sm text-muted-foreground",children:"无"})})]}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"状态"}),i.jsxs("div",{className:"mt-2 flex gap-2",children:[e.is_registered&&i.jsx(tn,{variant:"default",className:"bg-green-600",children:"已注册"}),e.is_banned&&i.jsx(tn,{variant:"destructive",children:"已封禁"}),!e.is_registered&&!e.is_banned&&i.jsx(tn,{variant:"outline",children:"未注册"})]})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"使用次数"}),i.jsx("div",{className:"mt-1 font-mono text-lg",children:e.usage_count})]})]}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"记录时间"}),i.jsx("div",{className:"mt-1 text-sm",children:r(e.record_time)})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"注册时间"}),i.jsx("div",{className:"mt-1 text-sm",children:r(e.register_time)})]})]}),i.jsxs("div",{children:[i.jsx(J,{className:"text-muted-foreground",children:"最后使用"}),i.jsx("div",{className:"mt-1 text-sm",children:r(e.last_used_time)})]})]})]})})}function m1e({emoji:e,open:t,onOpenChange:n,onSuccess:r}){const[a,o]=y.useState(""),[l,u]=y.useState(""),[d,f]=y.useState(!1),[m,p]=y.useState(!1),[g,x]=y.useState(!1),{toast:j}=mr();y.useEffect(()=>{e&&(o(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 s1e(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?i.jsx(nr,{open:t,onOpenChange:n,children:i.jsxs(Hn,{className:"max-w-2xl",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"编辑表情包"}),i.jsx(dr,{children:"修改表情包的描述和标签信息"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx(J,{children:"描述"}),i.jsx(qt,{value:a,onChange:w=>o(w.target.value),placeholder:"输入表情包描述...",rows:3,className:"mt-1"})]}),i.jsxs("div",{children:[i.jsx(J,{children:"情绪标签"}),i.jsx(Ne,{value:l,onChange:w=>u(w.target.value),placeholder:"使用逗号分隔多个标签,如:开心, 微笑, 快乐",className:"mt-1"}),i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"输入多个标签时使用逗号分隔"})]}),i.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{type:"checkbox",id:"is_registered",checked:d,onChange:w=>f(w.target.checked),className:"rounded border-gray-300"}),i.jsx(J,{htmlFor:"is_registered",className:"cursor-pointer",children:"已注册"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{type:"checkbox",id:"is_banned",checked:m,onChange:w=>p(w.target.checked),className:"rounded border-gray-300"}),i.jsx(J,{htmlFor:"is_banned",className:"cursor-pointer",children:"已封禁"})]})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>n(!1),children:"取消"}),i.jsx(fe,{onClick:b,disabled:g,children:g?"保存中...":"保存"})]})]})}):null}const Zu="/api/webui/expression";async function p1e(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(`${Zu}/list?${t}`,{headers:st()});if(!n.ok){const r=await n.json();throw new Error(r.detail||"获取表达方式列表失败")}return n.json()}async function v1e(e){const t=await Ze(`${Zu}/${e}`,{headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"获取表达方式详情失败")}return t.json()}async function g1e(e){const t=await Ze(`${Zu}/`,{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 y1e(e,t){const n=await Ze(`${Zu}/${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 x1e(e){const t=await Ze(`${Zu}/${e}`,{method:"DELETE",headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"删除表达方式失败")}return t.json()}async function b1e(){const e=await Ze(`${Zu}/stats/summary`,{headers:st()});if(!e.ok){const t=await e.json();throw new Error(t.detail||"获取统计数据失败")}return e.json()}function w1e(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[a,o]=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}=mr(),M=async()=>{try{r(!0);const H=await p1e({page:l,page_size:d,search:f||void 0});t(H.data),o(H.total)}catch(H){T({title:"加载失败",description:H instanceof Error?H.message:"无法加载表达方式",variant:"destructive"})}finally{r(!1)}},$=async()=>{try{const H=await b1e();k(H.data)}catch(H){console.error("加载统计数据失败:",H)}};y.useEffect(()=>{M(),$()},[l,d,f]);const z=async H=>{try{const G=await v1e(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 x1e(H.id),T({title:"删除成功",description:`已删除表达方式: ${H.situation}`}),A(null),M(),$()}catch(G){T({title:"删除失败",description:G instanceof Error?G.message:"无法删除表达方式",variant:"destructive"})}},V=H=>H?new Date(H*1e3).toLocaleString("zh-CN"):"-";return i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[i.jsxs("div",{children:[i.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[i.jsx(Ih,{className:"h-8 w-8",strokeWidth:2}),"表达方式管理"]}),i.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦的表达方式和话术模板"})]}),i.jsxs(fe,{onClick:()=>O(!0),className:"gap-2",children:[i.jsx(tr,{className:"h-4 w-4"}),"新增表达方式"]})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[i.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[i.jsx("div",{className:"text-sm text-muted-foreground",children:"总数量"}),i.jsx("div",{className:"text-2xl font-bold mt-1",children:E.total})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[i.jsx("div",{className:"text-sm text-muted-foreground",children:"近7天新增"}),i.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:E.recent_7days})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[i.jsx("div",{className:"text-sm text-muted-foreground",children:"关联聊天数"}),i.jsx("div",{className:"text-2xl font-bold mt-1 text-blue-600",children:E.chat_count})]})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[i.jsx(J,{htmlFor:"search",children:"搜索"}),i.jsxs("div",{className:"relative mt-1.5",children:[i.jsx(Dr,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),i.jsx(Ne,{id:"search",placeholder:"搜索情境、风格或上下文...",value:f,onChange:H=>m(H.target.value),className:"pl-9"})]})]}),i.jsxs("div",{className:"rounded-lg border bg-card",children:[i.jsx(Kt,{className:"h-[calc(100vh-500px)]",children:i.jsxs(Ol,{children:[i.jsx(Cl,{children:i.jsxs(vn,{children:[i.jsx(Je,{children:"情境"}),i.jsx(Je,{children:"风格"}),i.jsx(Je,{children:"聊天ID"}),i.jsx(Je,{children:"最后活跃"}),i.jsx(Je,{className:"text-right",children:"操作"})]})}),i.jsx(El,{children:n?i.jsx(vn,{children:i.jsx(Ue,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):e.length===0?i.jsx(vn,{children:i.jsx(Ue,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):e.map(H=>i.jsxs(vn,{children:[i.jsx(Ue,{className:"font-medium max-w-xs truncate",children:H.situation}),i.jsx(Ue,{className:"max-w-xs truncate",children:H.style}),i.jsx(Ue,{className:"font-mono text-sm",children:H.chat_id}),i.jsx(Ue,{className:"text-sm text-muted-foreground",children:V(H.last_active_time)}),i.jsx(Ue,{className:"text-right",children:i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>z(H),children:i.jsx(ao,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>D(H),children:i.jsx(KC,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>A(H),children:i.jsx(Ut,{className:"h-4 w-4 text-destructive"})})]})})]},H.id))})]})}),a>d&&i.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t",children:[i.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",a," 条记录,第 ",l," / ",Math.ceil(a/d)," 页"]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l-1),disabled:l===1,children:"上一页"}),i.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l+1),disabled:l>=Math.ceil(a/d),children:"下一页"})]})]})]}),i.jsx(j1e,{expression:p,open:x,onOpenChange:j}),i.jsx(S1e,{open:N,onOpenChange:O,onSuccess:()=>{M(),$(),O(!1)}}),i.jsx(_1e,{expression:p,open:b,onOpenChange:w,onSuccess:()=>{M(),$(),w(!1)}}),i.jsx(Pn,{open:!!C,onOpenChange:()=>A(null),children:i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:['确定要删除表达方式 "',C?.situation,'" 吗? 此操作不可撤销。']})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>C&&U(C),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})})]})}function j1e({expression:e,open:t,onOpenChange:n}){if(!e)return null;const r=a=>a?new Date(a*1e3).toLocaleString("zh-CN"):"-";return i.jsx(nr,{open:t,onOpenChange:n,children:i.jsxs(Hn,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"表达方式详情"}),i.jsx(dr,{children:"查看表达方式的完整信息"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsx(Cc,{label:"情境",value:e.situation}),i.jsx(Cc,{label:"风格",value:e.style}),i.jsx(Cc,{icon:wg,label:"聊天ID",value:e.chat_id,mono:!0}),i.jsx(Cc,{icon:wg,label:"记录ID",value:e.id.toString(),mono:!0})]}),e.context&&i.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[i.jsx(J,{className:"text-xs text-muted-foreground",children:"上下文"}),i.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:e.context})]}),e.up_content&&i.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[i.jsx(J,{className:"text-xs text-muted-foreground",children:"上文内容"}),i.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:e.up_content})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsx(Cc,{icon:rl,label:"最后活跃",value:r(e.last_active_time)}),i.jsx(Cc,{icon:rl,label:"创建时间",value:r(e.create_date)})]})]}),i.jsx($r,{children:i.jsx(fe,{onClick:()=>n(!1),children:"关闭"})})]})})}function Cc({icon:e,label:t,value:n,mono:r=!1}){return i.jsxs("div",{className:"space-y-1",children:[i.jsxs(J,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e&&i.jsx(e,{className:"h-3 w-3"}),t]}),i.jsx("div",{className:ue("text-sm",r&&"font-mono",!n&&"text-muted-foreground"),children:n||"-"})]})}function S1e({open:e,onOpenChange:t,onSuccess:n}){const[r,a]=y.useState({situation:"",style:"",context:"",up_content:"",chat_id:""}),[o,l]=y.useState(!1),{toast:u}=mr(),d=async()=>{if(!r.situation||!r.style||!r.chat_id){u({title:"验证失败",description:"请填写必填字段:情境、风格和聊天ID",variant:"destructive"});return}try{l(!0),await g1e(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 i.jsx(nr,{open:e,onOpenChange:t,children:i.jsxs(Hn,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"新增表达方式"}),i.jsx(dr,{children:"创建新的表达方式记录"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs(J,{htmlFor:"situation",children:["情境 ",i.jsx("span",{className:"text-destructive",children:"*"})]}),i.jsx(Ne,{id:"situation",value:r.situation,onChange:f=>a({...r,situation:f.target.value}),placeholder:"描述使用场景"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs(J,{htmlFor:"style",children:["风格 ",i.jsx("span",{className:"text-destructive",children:"*"})]}),i.jsx(Ne,{id:"style",value:r.style,onChange:f=>a({...r,style:f.target.value}),placeholder:"描述表达风格"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs(J,{htmlFor:"chat_id",children:["聊天ID ",i.jsx("span",{className:"text-destructive",children:"*"})]}),i.jsx(Ne,{id:"chat_id",value:r.chat_id,onChange:f=>a({...r,chat_id:f.target.value}),placeholder:"关联的聊天ID"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"context",children:"上下文"}),i.jsx(qt,{id:"context",value:r.context,onChange:f=>a({...r,context:f.target.value}),placeholder:"上下文信息(可选)",rows:3})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"up_content",children:"上文内容"}),i.jsx(qt,{id:"up_content",value:r.up_content,onChange:f=>a({...r,up_content:f.target.value}),placeholder:"上文内容(可选)",rows:3})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>t(!1),children:"取消"}),i.jsx(fe,{onClick:d,disabled:o,children:o?"创建中...":"创建"})]})]})})}function _1e({expression:e,open:t,onOpenChange:n,onSuccess:r}){const[a,o]=y.useState({}),[l,u]=y.useState(!1),{toast:d}=mr();y.useEffect(()=>{e&&o({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 y1e(e.id,a),d({title:"保存成功",description:"表达方式已更新"}),r()}catch(m){d({title:"保存失败",description:m instanceof Error?m.message:"无法更新表达方式",variant:"destructive"})}finally{u(!1)}};return e?i.jsx(nr,{open:t,onOpenChange:n,children:i.jsxs(Hn,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"编辑表达方式"}),i.jsx(dr,{children:"修改表达方式的信息"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit_situation",children:"情境"}),i.jsx(Ne,{id:"edit_situation",value:a.situation||"",onChange:m=>o({...a,situation:m.target.value}),placeholder:"描述使用场景"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit_style",children:"风格"}),i.jsx(Ne,{id:"edit_style",value:a.style||"",onChange:m=>o({...a,style:m.target.value}),placeholder:"描述表达风格"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit_chat_id",children:"聊天ID"}),i.jsx(Ne,{id:"edit_chat_id",value:a.chat_id||"",onChange:m=>o({...a,chat_id:m.target.value}),placeholder:"关联的聊天ID"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit_context",children:"上下文"}),i.jsx(qt,{id:"edit_context",value:a.context||"",onChange:m=>o({...a,context:m.target.value}),placeholder:"上下文信息",rows:3})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit_up_content",children:"上文内容"}),i.jsx(qt,{id:"edit_up_content",value:a.up_content||"",onChange:m=>o({...a,up_content:m.target.value}),placeholder:"上文内容",rows:3})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>n(!1),children:"取消"}),i.jsx(fe,{onClick:f,disabled:l,children:l?"保存中...":"保存"})]})]})}):null}const Yh="/api/webui/person";async function N1e(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(`${Yh}/list?${t}`,{headers:st()});if(!n.ok){const r=await n.json();throw new Error(r.detail||"获取人物列表失败")}return n.json()}async function O1e(e){const t=await Ze(`${Yh}/${e}`,{headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"获取人物详情失败")}return t.json()}async function C1e(e,t){const n=await Ze(`${Yh}/${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 E1e(e){const t=await Ze(`${Yh}/${e}`,{method:"DELETE",headers:st()});if(!t.ok){const n=await t.json();throw new Error(n.detail||"删除人物信息失败")}return t.json()}async function A1e(){const e=await Ze(`${Yh}/stats/summary`,{headers:st()});if(!e.ok){const t=await e.json();throw new Error(t.detail||"获取统计数据失败")}return e.json()}function T1e(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[a,o]=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,M]=y.useState({total:0,known:0,unknown:0,platforms:{}}),{toast:$}=mr(),z=async()=>{try{r(!0);const R=await N1e({page:l,page_size:d,search:f||void 0,is_known:p,platform:x});t(R.data),o(R.total)}catch(R){$({title:"加载失败",description:R instanceof Error?R.message:"无法加载人物信息",variant:"destructive"})}finally{r(!1)}},D=async()=>{try{const R=await A1e();M(R.data)}catch(R){console.error("加载统计数据失败:",R)}};y.useEffect(()=>{z(),D()},[l,d,f,p,x]);const U=async R=>{try{const F=await O1e(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 E1e(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 i.jsxs("div",{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[i.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:i.jsxs("div",{children:[i.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[i.jsx(Oge,{className:"h-8 w-8",strokeWidth:2}),"人物信息管理"]}),i.jsx("p",{className:"text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base",children:"管理麦麦认识的所有人物信息"})]})}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[i.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[i.jsx("div",{className:"text-sm text-muted-foreground",children:"总人数"}),i.jsx("div",{className:"text-2xl font-bold mt-1",children:T.total})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[i.jsx("div",{className:"text-sm text-muted-foreground",children:"已认识"}),i.jsx("div",{className:"text-2xl font-bold mt-1 text-green-600",children:T.known})]}),i.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[i.jsx("div",{className:"text-sm text-muted-foreground",children:"未认识"}),i.jsx("div",{className:"text-2xl font-bold mt-1 text-muted-foreground",children:T.unknown})]})]}),i.jsx("div",{className:"rounded-lg border bg-card p-4",children:i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-4",children:[i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx(J,{htmlFor:"search",children:"搜索"}),i.jsxs("div",{className:"relative mt-1.5",children:[i.jsx(Dr,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),i.jsx(Ne,{id:"search",placeholder:"搜索名称、昵称或用户ID...",value:f,onChange:R=>m(R.target.value),className:"pl-9"})]})]}),i.jsxs("div",{children:[i.jsx(J,{htmlFor:"filter-known",children:"认识状态"}),i.jsxs(Et,{value:p===void 0?"all":p.toString(),onValueChange:R=>{g(R==="all"?void 0:R==="true"),u(1)},children:[i.jsx(wt,{id:"filter-known",className:"mt-1.5",children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部"}),i.jsx(Me,{value:"true",children:"已认识"}),i.jsx(Me,{value:"false",children:"未认识"})]})]})]}),i.jsxs("div",{children:[i.jsx(J,{htmlFor:"filter-platform",children:"平台"}),i.jsxs(Et,{value:x||"all",onValueChange:R=>{j(R==="all"?void 0:R),u(1)},children:[i.jsx(wt,{id:"filter-platform",className:"mt-1.5",children:i.jsx(At,{})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部平台"}),G.map(R=>i.jsxs(Me,{value:R,children:[R," (",T.platforms[R],")"]},R))]})]})]})]})}),i.jsxs("div",{className:"rounded-lg border bg-card",children:[i.jsx(Kt,{className:"h-[calc(100vh-500px)]",children:i.jsxs(Ol,{children:[i.jsx(Cl,{children:i.jsxs(vn,{children:[i.jsx(Je,{children:"状态"}),i.jsx(Je,{children:"名称"}),i.jsx(Je,{children:"昵称"}),i.jsx(Je,{children:"平台"}),i.jsx(Je,{children:"用户ID"}),i.jsx(Je,{children:"最后更新"}),i.jsx(Je,{className:"text-right",children:"操作"})]})}),i.jsx(El,{children:n?i.jsx(vn,{children:i.jsx(Ue,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"加载中..."})}):e.length===0?i.jsx(vn,{children:i.jsx(Ue,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"暂无数据"})}):e.map(R=>i.jsxs(vn,{children:[i.jsx(Ue,{children:i.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?"已认识":"未认识"})}),i.jsx(Ue,{className:"font-medium",children:R.person_name||i.jsx("span",{className:"text-muted-foreground",children:"-"})}),i.jsx(Ue,{children:R.nickname||"-"}),i.jsx(Ue,{children:R.platform}),i.jsx(Ue,{className:"font-mono text-sm",children:R.user_id}),i.jsx(Ue,{className:"text-sm text-muted-foreground",children:L(R.last_know)}),i.jsx(Ue,{className:"text-right",children:i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>U(R),children:i.jsx(ao,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>V(R),children:i.jsx(KC,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"ghost",size:"sm",onClick:()=>k(R),children:i.jsx(Ut,{className:"h-4 w-4 text-destructive"})})]})})]},R.id))})]})}),a>d&&i.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t",children:[i.jsxs("div",{className:"text-sm text-muted-foreground",children:["共 ",a," 条记录,第 ",l," / ",Math.ceil(a/d)," 页"]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l-1),disabled:l===1,children:"上一页"}),i.jsx(fe,{variant:"outline",size:"sm",onClick:()=>u(l+1),disabled:l>=Math.ceil(a/d),children:"下一页"})]})]})]}),i.jsx(k1e,{person:b,open:N,onOpenChange:O}),i.jsx(M1e,{person:b,open:C,onOpenChange:A,onSuccess:()=>{z(),D(),A(!1)}}),i.jsx(Pn,{open:!!E,onOpenChange:()=>k(null),children:i.jsxs(yn,{children:[i.jsxs(xn,{children:[i.jsx(wn,{children:"确认删除"}),i.jsxs(jn,{children:['确定要删除人物信息 "',E?.person_name||E?.nickname||E?.user_id,'" 吗? 此操作不可撤销。']})]}),i.jsxs(bn,{children:[i.jsx(_n,{children:"取消"}),i.jsx(Sn,{onClick:()=>E&&H(E),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"删除"})]})]})})]})}function k1e({person:e,open:t,onOpenChange:n}){if(!e)return null;const r=a=>a?new Date(a*1e3).toLocaleString("zh-CN"):"-";return i.jsx(nr,{open:t,onOpenChange:n,children:i.jsxs(Hn,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"人物详情"}),i.jsxs(dr,{children:["查看 ",e.person_name||e.nickname||e.user_id," 的完整信息"]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsx(Ui,{icon:Qq,label:"人物名称",value:e.person_name}),i.jsx(Ui,{icon:Ih,label:"昵称",value:e.nickname}),i.jsx(Ui,{icon:wg,label:"用户ID",value:e.user_id,mono:!0}),i.jsx(Ui,{icon:wg,label:"人物ID",value:e.person_id,mono:!0}),i.jsx(Ui,{label:"平台",value:e.platform}),i.jsx(Ui,{label:"状态",value:e.is_known?"已认识":"未认识"})]}),e.name_reason&&i.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[i.jsx(J,{className:"text-xs text-muted-foreground",children:"名称设定原因"}),i.jsx("p",{className:"mt-1 text-sm",children:e.name_reason})]}),e.memory_points&&i.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[i.jsx(J,{className:"text-xs text-muted-foreground",children:"个人印象"}),i.jsx("p",{className:"mt-1 text-sm whitespace-pre-wrap",children:e.memory_points})]}),e.group_nick_name&&e.group_nick_name.length>0&&i.jsxs("div",{className:"rounded-lg border bg-muted/50 p-3",children:[i.jsx(J,{className:"text-xs text-muted-foreground",children:"群昵称"}),i.jsx("div",{className:"mt-2 space-y-1",children:e.group_nick_name.map((a,o)=>i.jsxs("div",{className:"text-sm flex items-center gap-2",children:[i.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:a.group_id}),i.jsx("span",{children:"→"}),i.jsx("span",{children:a.group_nick_name})]},o))})]}),i.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[i.jsx(Ui,{icon:rl,label:"认识时间",value:r(e.know_times)}),i.jsx(Ui,{icon:rl,label:"首次记录",value:r(e.know_since)}),i.jsx(Ui,{icon:rl,label:"最后更新",value:r(e.last_know)})]})]}),i.jsx($r,{children:i.jsx(fe,{onClick:()=>n(!1),children:"关闭"})})]})})}function Ui({icon:e,label:t,value:n,mono:r=!1}){return i.jsxs("div",{className:"space-y-1",children:[i.jsxs(J,{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e&&i.jsx(e,{className:"h-3 w-3"}),t]}),i.jsx("div",{className:ue("text-sm",r&&"font-mono",!n&&"text-muted-foreground"),children:n||"-"})]})}function M1e({person:e,open:t,onOpenChange:n,onSuccess:r}){const[a,o]=y.useState({}),[l,u]=y.useState(!1),{toast:d}=mr();y.useEffect(()=>{e&&o({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 C1e(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?i.jsx(nr,{open:t,onOpenChange:n,children:i.jsxs(Hn,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"编辑人物信息"}),i.jsxs(dr,{children:["修改 ",e.person_name||e.nickname||e.user_id," 的信息"]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"person_name",children:"人物名称"}),i.jsx(Ne,{id:"person_name",value:a.person_name||"",onChange:m=>o({...a,person_name:m.target.value}),placeholder:"为这个人设置一个名称"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"nickname",children:"昵称"}),i.jsx(Ne,{id:"nickname",value:a.nickname||"",onChange:m=>o({...a,nickname:m.target.value}),placeholder:"昵称"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"name_reason",children:"名称设定原因"}),i.jsx(qt,{id:"name_reason",value:a.name_reason||"",onChange:m=>o({...a,name_reason:m.target.value}),placeholder:"为什么这样称呼这个人?",rows:2})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"memory_points",children:"个人印象"}),i.jsx(qt,{id:"memory_points",value:a.memory_points||"",onChange:m=>o({...a,memory_points:m.target.value}),placeholder:"对这个人的印象和记忆点...",rows:4})]}),i.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[i.jsxs("div",{children:[i.jsx(J,{htmlFor:"is_known",className:"text-base font-medium",children:"已认识"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:"标记是否已经认识这个人"})]}),i.jsx(at,{id:"is_known",checked:a.is_known,onCheckedChange:m=>o({...a,is_known:m})})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>n(!1),children:"取消"}),i.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 R1e={},hf={};function Ys(e,t){try{const r=(R1e[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return r in hf?hf[r]:jL(r,r.split(":"))}catch{if(e in hf)return hf[e];const n=e?.match(D1e);return n?jL(e,n.slice(1)):NaN}}const D1e=/([+-]\d\d):?(\d\d)?/;function jL(e,t){const n=+(t[0]||0),r=+(t[1]||0),a=+(t[2]||0)/60;return hf[e]=n*60+r>0?n*60+r+a:n*60-r-a}class ci extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ys(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)),yH(this),dO(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new ci(...n,t):new ci(Date.now(),t)}withTimeZone(t){return new ci(+this,t)}getTimezoneOffset(){const t=-Ys(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),dO(this),+this}[Symbol.for("constructDateFrom")](t){return new ci(+new Date(t),this.timeZone)}}const SL=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!SL.test(e))return;const t=e.replace(SL,"$1UTC");ci.prototype[t]&&(e.startsWith("get")?ci.prototype[e]=function(){return this.internal[t]()}:(ci.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),$1e(this),+this},ci.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),dO(this),+this}))});function dO(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ys(e.timeZone,e)*60))}function $1e(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()),yH(e)}function yH(e){const t=Ys(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(),o=-new Date(+r).getTimezoneOffset(),l=a-o,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(-(Ys(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=Ys(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=Ys(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 sr extends ci{static tz(t,...n){return n.length?new sr(...n,t):new sr(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 sr(+this,t)}[Symbol.for("constructDateFrom")](t){return new sr(+new Date(t),this.timeZone)}}const xH=6048e5,I1e=864e5,_L=Symbol.for("constructDateFrom");function Nn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&_L in e?e[_L](t):e instanceof Date?new e.constructor(t):new Date(t)}function Rt(e,t){return Nn(t||e,e)}function bH(e,t,n){const r=Rt(e,n?.in);return isNaN(t)?Nn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function wH(e,t,n){const r=Rt(e,n?.in);if(isNaN(t))return Nn(e,NaN);if(!t)return r;const a=r.getDate(),o=Nn(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const l=o.getDate();return a>=l?o:(r.setFullYear(o.getFullYear(),o.getMonth(),a),r)}let L1e={};function Kh(){return L1e}function rs(e,t){const n=Kh(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Rt(e,t?.in),o=a.getDay(),l=(o<r?7:0)+o-r;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function ph(e,t){return rs(e,{...t,weekStartsOn:1})}function jH(e,t){const n=Rt(e,t?.in),r=n.getFullYear(),a=Nn(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=ph(a),l=Nn(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const u=ph(l);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function NL(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 Tl(e,...t){const n=Nn.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function vh(e,t){const n=Rt(e,t?.in);return n.setHours(0,0,0,0),n}function SH(e,t,n){const[r,a]=Tl(n?.in,e,t),o=vh(r),l=vh(a),u=+o-NL(o),d=+l-NL(l);return Math.round((u-d)/I1e)}function B1e(e,t){const n=jH(e,t),r=Nn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ph(r)}function z1e(e,t,n){return bH(e,t*7,n)}function q1e(e,t,n){return wH(e,t*12,n)}function F1e(e,t){let n,r=t?.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=Nn.bind(null,a));const o=Rt(a,r);(!n||n<o||isNaN(+o))&&(n=o)}),Nn(r,n||NaN)}function U1e(e,t){let n,r=t?.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=Nn.bind(null,a));const o=Rt(a,r);(!n||n>o||isNaN(+o))&&(n=o)}),Nn(r,n||NaN)}function H1e(e,t,n){const[r,a]=Tl(n?.in,e,t);return+vh(r)==+vh(a)}function _H(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function W1e(e){return!(!_H(e)&&typeof e!="number"||isNaN(+Rt(e)))}function V1e(e,t,n){const[r,a]=Tl(n?.in,e,t),o=r.getFullYear()-a.getFullYear(),l=r.getMonth()-a.getMonth();return o*12+l}function G1e(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 NH(e,t){const[n,r]=Tl(e,t.start,t.end);return{start:n,end:r}}function Y1e(e,t){const{start:n,end:r}=NH(t?.in,e);let a=+n>+r;const o=a?+n:+r,l=a?r:n;l.setHours(0,0,0,0),l.setDate(1);let u=1;const d=[];for(;+l<=o;)d.push(Nn(n,l)),l.setMonth(l.getMonth()+u);return a?d.reverse():d}function K1e(e,t){const n=Rt(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function X1e(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 OH(e,t){const n=Rt(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Z1e(e,t){const{start:n,end:r}=NH(t?.in,e);let a=+n>+r;const o=a?+n:+r,l=a?r:n;l.setHours(0,0,0,0),l.setMonth(0,1);let u=1;const d=[];for(;+l<=o;)d.push(Nn(n,l)),l.setFullYear(l.getFullYear()+u);return a?d.reverse():d}function CH(e,t){const n=Kh(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Rt(e,t?.in),o=a.getDay(),l=(o<r?-7:0)+6-(o-r);return a.setDate(a.getDate()+l),a.setHours(23,59,59,999),a}function Q1e(e,t){return CH(e,{...t,weekStartsOn:1})}const J1e={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"}},eSe=(e,t,n)=>{let r;const a=J1e[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 Kc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tSe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nSe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rSe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},aSe={date:Kc({formats:tSe,defaultWidth:"full"}),time:Kc({formats:nSe,defaultWidth:"full"}),dateTime:Kc({formats:rSe,defaultWidth:"full"})},iSe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},oSe=(e,t,n,r)=>iSe[e];function ri(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 o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const sSe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lSe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cSe={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"]},uSe={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"]},dSe={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"}},fSe={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"}},hSe=(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"},mSe={ordinalNumber:hSe,era:ri({values:sSe,defaultWidth:"wide"}),quarter:ri({values:lSe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ri({values:cSe,defaultWidth:"wide"}),day:ri({values:uSe,defaultWidth:"wide"}),dayPeriod:ri({values:dSe,defaultWidth:"wide",formattingValues:fSe,defaultFormattingWidth:"wide"})};function ai(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?vSe(u,p=>p.test(l)):pSe(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 pSe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function vSe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function EH(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(a.length);return{value:l,rest:u}}}const gSe=/^(\d+)(th|st|nd|rd)?/i,ySe=/\d+/i,xSe={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},bSe={any:[/^b/i,/^(a|c)/i]},wSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jSe={any:[/1/i,/2/i,/3/i,/4/i]},SSe={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},_Se={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]},NSe={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},OSe={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]},CSe={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},ESe={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}},ASe={ordinalNumber:EH({matchPattern:gSe,parsePattern:ySe,valueCallback:e=>parseInt(e,10)}),era:ai({matchPatterns:xSe,defaultMatchWidth:"wide",parsePatterns:bSe,defaultParseWidth:"any"}),quarter:ai({matchPatterns:wSe,defaultMatchWidth:"wide",parsePatterns:jSe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ai({matchPatterns:SSe,defaultMatchWidth:"wide",parsePatterns:_Se,defaultParseWidth:"any"}),day:ai({matchPatterns:NSe,defaultMatchWidth:"wide",parsePatterns:OSe,defaultParseWidth:"any"}),dayPeriod:ai({matchPatterns:CSe,defaultMatchWidth:"any",parsePatterns:ESe,defaultParseWidth:"any"})},NE={code:"en-US",formatDistance:eSe,formatLong:aSe,formatRelative:oSe,localize:mSe,match:ASe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function TSe(e,t){const n=Rt(e,t?.in);return SH(n,OH(n))+1}function AH(e,t){const n=Rt(e,t?.in),r=+ph(n)-+B1e(n);return Math.round(r/xH)+1}function TH(e,t){const n=Rt(e,t?.in),r=n.getFullYear(),a=Kh(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=Nn(t?.in||e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const u=rs(l,t),d=Nn(t?.in||e,0);d.setFullYear(r,0,o),d.setHours(0,0,0,0);const f=rs(d,t);return+n>=+u?r+1:+n>=+f?r:r-1}function kSe(e,t){const n=Kh(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=TH(e,t),o=Nn(t?.in||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),rs(o,t)}function kH(e,t){const n=Rt(e,t?.in),r=+rs(n,t)-+kSe(n,t);return Math.round(r/xH)+1}function Ot(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Bo={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)}},Ec={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},OL={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 Bo.y(e,t)},Y:function(e,t,n,r){const a=TH(e,r),o=a>0?a:1-a;if(t==="YY"){const l=o%100;return Ot(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Ot(o,t.length)},R:function(e,t){const n=jH(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 Bo.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=kH(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):Ot(a,t.length)},I:function(e,t,n){const r=AH(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"}):Bo.d(e,t)},D:function(e,t,n){const r=TSe(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(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ot(o,2);case"eo":return n.ordinalNumber(o,{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(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ot(o,t.length);case"co":return n.ordinalNumber(o,{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=Ec.noon:r===0?a=Ec.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=Ec.evening:r>=12?a=Ec.afternoon:r>=4?a=Ec.morning:a=Ec.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 Bo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Bo.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"}):Bo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Bo.s(e,t)},S:function(e,t){return Bo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return EL(r);case"XXXX":case"XX":return qs(r);case"XXXXX":case"XXX":default:return qs(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return EL(r);case"xxxx":case"xx":return qs(r);case"xxxxx":case"xxx":default:return qs(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+CL(r,":");case"OOOO":default:return"GMT"+qs(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+CL(r,":");case"zzzz":default:return"GMT"+qs(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 CL(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+Ot(o,2)}function EL(e,t){return e%60===0?(e>0?"-":"+")+Ot(Math.abs(e)/60,2):qs(e,t)}function qs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Ot(Math.trunc(r/60),2),o=Ot(r%60,2);return n+a+t+o}const AL=(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"})}},MH=(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"})}},MSe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return AL(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",AL(r,t)).replace("{{time}}",MH(a,t))},PSe={p:MH,P:MSe},RSe=/^D+$/,DSe=/^Y+$/,$Se=["D","DD","YY","YYYY"];function ISe(e){return RSe.test(e)}function LSe(e){return DSe.test(e)}function BSe(e,t,n){const r=zSe(e,t,n);if(console.warn(r),$Se.includes(e))throw new RangeError(r)}function zSe(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 qSe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,FSe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,USe=/^'([^]*?)'?$/,HSe=/''/g,WSe=/[a-zA-Z]/;function cv(e,t,n){const r=Kh(),a=n?.locale??r.locale??NE,o=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(!W1e(u))throw new RangeError("Invalid time value");let d=t.match(FSe).map(m=>{const p=m[0];if(p==="p"||p==="P"){const g=PSe[p];return g(m,a.formatLong)}return m}).join("").match(qSe).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const p=m[0];if(p==="'")return{isToken:!1,value:VSe(m)};if(OL[p])return{isToken:!0,value:m};if(p.match(WSe))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:o,weekStartsOn:l,locale:a};return d.map(m=>{if(!m.isToken)return m.value;const p=m.value;(!n?.useAdditionalWeekYearTokens&&LSe(p)||!n?.useAdditionalDayOfYearTokens&&ISe(p))&&BSe(p,t,String(e));const g=OL[p[0]];return g(u,p,a.localize,f)}).join("")}function VSe(e){const t=e.match(USe);return t?t[1].replace(HSe,"'"):e}function GSe(e,t){const n=Rt(e,t?.in),r=n.getFullYear(),a=n.getMonth(),o=Nn(n,0);return o.setFullYear(r,a+1,0),o.setHours(0,0,0,0),o.getDate()}function YSe(e,t){return Rt(e,t?.in).getMonth()}function KSe(e,t){return Rt(e,t?.in).getFullYear()}function XSe(e,t){return+Rt(e)>+Rt(t)}function ZSe(e,t){return+Rt(e)<+Rt(t)}function QSe(e,t,n){const[r,a]=Tl(n?.in,e,t);return+rs(r,n)==+rs(a,n)}function JSe(e,t,n){const[r,a]=Tl(n?.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function e_e(e,t,n){const[r,a]=Tl(n?.in,e,t);return r.getFullYear()===a.getFullYear()}function t_e(e,t,n){const r=Rt(e,n?.in),a=r.getFullYear(),o=r.getDate(),l=Nn(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const u=GSe(l);return r.setMonth(t,Math.min(o,u)),r}function n_e(e,t,n){const r=Rt(e,n?.in);return isNaN(+r)?Nn(e,NaN):(r.setFullYear(t),r)}const TL=5,r_e=4;function a_e(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,a=t.addDays(e,-r+1),o=t.addDays(a,TL*7-1);return t.getMonth(e)===t.getMonth(o)?TL:r_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 i_e(e,t){const n=PH(e,t),r=a_e(e,t);return t.addDays(n,r*7-1)}class ia{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?sr.tz(this.options.timeZone):new this.Date,this.newDate=(r,a,o)=>this.overrides?.newDate?this.overrides.newDate(r,a,o):this.options.timeZone?new sr(r,a,o,this.options.timeZone):new Date(r,a,o),this.addDays=(r,a)=>this.overrides?.addDays?this.overrides.addDays(r,a):bH(r,a),this.addMonths=(r,a)=>this.overrides?.addMonths?this.overrides.addMonths(r,a):wH(r,a),this.addWeeks=(r,a)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,a):z1e(r,a),this.addYears=(r,a)=>this.overrides?.addYears?this.overrides.addYears(r,a):q1e(r,a),this.differenceInCalendarDays=(r,a)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,a):SH(r,a),this.differenceInCalendarMonths=(r,a)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,a):V1e(r,a),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Y1e(r),this.eachYearOfInterval=r=>{const a=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):Z1e(r),o=new Set(a.map(u=>this.getYear(u)));if(o.size===a.length)return a;const l=[];return o.forEach(u=>{l.push(new Date(u,0,1))}),l},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):i_e(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):Q1e(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):G1e(r),this.endOfWeek=(r,a)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,a):CH(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):X1e(r),this.format=(r,a,o)=>{const l=this.overrides?.format?this.overrides.format(r,a,this.options):cv(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):AH(r),this.getMonth=(r,a)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):YSe(r,this.options),this.getYear=(r,a)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):KSe(r,this.options),this.getWeek=(r,a)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):kH(r,this.options),this.isAfter=(r,a)=>this.overrides?.isAfter?this.overrides.isAfter(r,a):XSe(r,a),this.isBefore=(r,a)=>this.overrides?.isBefore?this.overrides.isBefore(r,a):ZSe(r,a),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):_H(r),this.isSameDay=(r,a)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,a):H1e(r,a),this.isSameMonth=(r,a)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,a):JSe(r,a),this.isSameYear=(r,a)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,a):e_e(r,a),this.max=r=>this.overrides?.max?this.overrides.max(r):F1e(r),this.min=r=>this.overrides?.min?this.overrides.min(r):U1e(r),this.setMonth=(r,a)=>this.overrides?.setMonth?this.overrides.setMonth(r,a):t_e(r,a),this.setYear=(r,a)=>this.overrides?.setYear?this.overrides.setYear(r,a):n_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):vh(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):ph(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):K1e(r),this.startOfWeek=(r,a)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):rs(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):OH(r),this.options={locale:NE,...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&&ia.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:a}=this.options,o=n?.code;if(o&&ia.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{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)}}ia.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 ji=new ia;class RH{constructor(t,n,r=ji){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 o_e{constructor(t,n){this.date=t,this.weeks=n}}class s_e{constructor(t,n){this.days=n,this.weekNumber=t}}function l_e(e){return W.createElement("button",{...e})}function c_e(e){return W.createElement("span",{...e})}function u_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 d_e(e){const{day:t,modifiers:n,...r}=e;return W.createElement("td",{...r})}function f_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 en;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(en||(en={}));var za;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(za||(za={}));var Xr;(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"})(Xr||(Xr={}));function h_e(e){const{options:t,className:n,components:r,classNames:a,...o}=e,l=[a[$e.Dropdown],n].join(" "),u=t?.find(({value:d})=>d===o.value);return W.createElement("span",{"data-disabled":o.disabled,className:a[$e.DropdownRoot]},W.createElement(r.Select,{className:l,...o},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 m_e(e){return W.createElement("div",{...e})}function p_e(e){return W.createElement("div",{...e})}function v_e(e){const{calendarMonth:t,displayIndex:n,...r}=e;return W.createElement("div",{...r},e.children)}function g_e(e){const{calendarMonth:t,displayIndex:n,...r}=e;return W.createElement("div",{...r})}function y_e(e){return W.createElement("table",{...e})}function x_e(e){return W.createElement("div",{...e})}const DH=y.createContext(void 0);function Xh(){const e=y.useContext(DH);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function b_e(e){const{components:t}=Xh();return W.createElement(t.Dropdown,{...e})}function w_e(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:a,...o}=e,{components:l,classNames:u,labels:{labelPrevious:d,labelNext:f}}=Xh(),m=y.useCallback(g=>{a&&n?.(g)},[a,n]),p=y.useCallback(g=>{r&&t?.(g)},[r,t]);return W.createElement("nav",{...o},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 j_e(e){const{components:t}=Xh();return W.createElement(t.Button,{...e})}function S_e(e){return W.createElement("option",{...e})}function __e(e){const{components:t}=Xh();return W.createElement(t.Button,{...e})}function N_e(e){const{rootRef:t,...n}=e;return W.createElement("div",{...n,ref:t})}function O_e(e){return W.createElement("select",{...e})}function C_e(e){const{week:t,...n}=e;return W.createElement("tr",{...n})}function E_e(e){return W.createElement("th",{...e})}function A_e(e){return W.createElement("thead",{"aria-hidden":!0},W.createElement("tr",{...e}))}function T_e(e){const{week:t,...n}=e;return W.createElement("th",{...n})}function k_e(e){return W.createElement("th",{...e})}function M_e(e){return W.createElement("tbody",{...e})}function P_e(e){const{components:t}=Xh();return W.createElement(t.Dropdown,{...e})}const R_e=Object.freeze(Object.defineProperty({__proto__:null,Button:l_e,CaptionLabel:c_e,Chevron:u_e,Day:d_e,DayButton:f_e,Dropdown:h_e,DropdownNav:m_e,Footer:p_e,Month:v_e,MonthCaption:g_e,MonthGrid:y_e,Months:x_e,MonthsDropdown:b_e,Nav:w_e,NextMonthButton:j_e,Option:S_e,PreviousMonthButton:__e,Root:N_e,Select:O_e,Week:C_e,WeekNumber:T_e,WeekNumberHeader:k_e,Weekday:E_e,Weekdays:A_e,Weeks:M_e,YearsDropdown:P_e},Symbol.toStringTag,{value:"Module"}));function Ki(e,t,n=!1,r=ji){let{from:a,to:o}=e;const{differenceInCalendarDays:l,isSameDay:u}=r;return a&&o?(l(o,a)<0&&([a,o]=[o,a]),l(t,a)>=(n?1:0)&&l(o,t)>=(n?1:0)):!n&&o?u(o,t):!n&&a?u(a,t):!1}function $H(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function OE(e){return!!(e&&typeof e=="object"&&"from"in e)}function IH(e){return!!(e&&typeof e=="object"&&"after"in e)}function LH(e){return!!(e&&typeof e=="object"&&"before"in e)}function BH(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function zH(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Xi(e,t,n=ji){const r=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:l}=n;return r.some(u=>{if(typeof u=="boolean")return u;if(n.isDate(u))return a(e,u);if(zH(u,n))return u.includes(e);if(OE(u))return Ki(u,e,!1,n);if(BH(u))return Array.isArray(u.dayOfWeek)?u.dayOfWeek.includes(e.getDay()):u.dayOfWeek===e.getDay();if($H(u)){const d=o(u.before,e),f=o(u.after,e),m=d>0,p=f<0;return l(u.before,u.after)?p&&m:m||p}return IH(u)?o(e,u.after)>0:LH(u)?o(u.before,e)>0:typeof u=="function"?u(e):!1})}function D_e(e,t,n,r,a){const{disabled:o,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={[en.focused]:[],[en.outside]:[],[en.disabled]:[],[en.hidden]:[],[en.today]:[]},A={};for(const E of e){const{date:k,displayMonth:T}=E,M=!!(T&&!g(k,T)),$=!!(N&&j(k,N)),z=!!(O&&w(k,O)),D=!!(o&&Xi(k,o,a)),U=!!(l&&Xi(k,l,a))||$||z||!f&&!d&&M||f&&d===!1&&M,V=p(k,m??a.today());M&&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&&Xi(k,G,a)&&(A[H]?A[H].push(E):A[H]=[E])})}return E=>{const k={[en.focused]:!1,[en.disabled]:!1,[en.hidden]:!1,[en.outside]:!1,[en.today]:!1},T={};for(const M in C){const $=C[M];k[M]=$.some(z=>z===E)}for(const M in A)T[M]=A[M].some($=>$===E);return{...k,...T}}}function $_e(e,t,n={}){return Object.entries(e).filter(([,a])=>a===!0).reduce((a,[o])=>(n[o]?a.push(n[o]):t[en[o]]?a.push(t[en[o]]):t[za[o]]&&a.push(t[za[o]]),a),[t[$e.Day]])}function I_e(e){return{...R_e,...e}}function L_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 CE(){const e={};for(const t in $e)e[$e[t]]=`rdp-${$e[t]}`;for(const t in en)e[en[t]]=`rdp-${en[t]}`;for(const t in za)e[za[t]]=`rdp-${za[t]}`;for(const t in Xr)e[Xr[t]]=`rdp-${Xr[t]}`;return e}function qH(e,t,n){return(n??new ia(t)).formatMonthYear(e)}const B_e=qH;function z_e(e,t,n){return(n??new ia(t)).format(e,"d")}function q_e(e,t=ji){return t.format(e,"LLLL")}function F_e(e,t,n){return(n??new ia(t)).format(e,"cccccc")}function U_e(e,t=ji){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function H_e(){return""}function FH(e,t=ji){return t.format(e,"yyyy")}const W_e=FH,V_e=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:qH,formatDay:z_e,formatMonthCaption:B_e,formatMonthDropdown:q_e,formatWeekNumber:U_e,formatWeekNumberHeader:H_e,formatWeekdayName:F_e,formatYearCaption:W_e,formatYearDropdown:FH},Symbol.toStringTag,{value:"Module"}));function G_e(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...V_e,...e}}function Y_e(e,t,n,r,a){const{startOfMonth:o,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<o(t)||n&&g>o(n)||!1;return{value:j,label:x,disabled:b}})}function K_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 X_e(e,t,n){const r=e.today(),a=t?e.startOfISOWeek(r):e.startOfWeek(r),o=[];for(let l=0;l<7;l++){const u=e.addDays(a,l);o.push(u)}return o}function Z_e(e,t,n,r,a=!1){if(!e||!t)return;const{startOfYear:o,endOfYear:l,eachYearOfInterval:u,getYear:d}=r,f=o(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 UH(e,t,n,r){let a=(r??new ia(n)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const Q_e=UH;function HH(e,t,n){return(n??new ia(t)).formatMonthYear(e)}const J_e=HH;function eNe(e,t,n,r){let a=(r??new ia(n)).format(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a}function tNe(e){return"Choose the Month"}function nNe(){return""}function rNe(e){return"Go to the Next Month"}function aNe(e){return"Go to the Previous Month"}function iNe(e,t,n){return(n??new ia(t)).format(e,"cccc")}function oNe(e,t){return`Week ${e}`}function sNe(e){return"Week Number"}function lNe(e){return"Choose the Year"}const cNe=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:J_e,labelDay:Q_e,labelDayButton:UH,labelGrid:HH,labelGridcell:eNe,labelMonthDropdown:tNe,labelNav:nNe,labelNext:rNe,labelPrevious:aNe,labelWeekNumber:oNe,labelWeekNumberHeader:sNe,labelWeekday:iNe,labelYearDropdown:lNe},Symbol.toStringTag,{value:"Module"})),Zh=e=>e instanceof HTMLElement?e:null,a_=e=>[...e.querySelectorAll("[data-animated-month]")??[]],uNe=e=>Zh(e.querySelector("[data-animated-month]")),i_=e=>Zh(e.querySelector("[data-animated-caption]")),o_=e=>Zh(e.querySelector("[data-animated-weeks]")),dNe=e=>Zh(e.querySelector("[data-animated-nav]")),fNe=e=>Zh(e.querySelector("[data-animated-weekdays]"));function hNe(e,t,{classNames:n,months:r,focused:a,dateLib:o}){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=o.isSameMonth(r[0].date,f[0].date),p=o.isAfter(r[0].date,f[0].date),g=p?n[Xr.caption_after_enter]:n[Xr.caption_before_enter],x=p?n[Xr.weeks_after_enter]:n[Xr.weeks_before_enter],j=l.current,b=e.current.cloneNode(!0);if(b instanceof HTMLElement?(a_(b).forEach(C=>{if(!(C instanceof HTMLElement))return;const A=uNe(C);A&&C.contains(A)&&C.removeChild(A);const E=i_(C);E&&E.classList.remove(g);const k=o_(C);k&&k.classList.remove(x)}),l.current=b):l.current=null,d.current||m||a)return;const w=j instanceof HTMLElement?a_(j):[],N=a_(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=dNe(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=i_(C);k&&k.classList.add(g);const T=o_(C);T&&T.classList.add(x);const M=()=>{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 $=fNe(E);$&&($.style.opacity="0");const z=i_(E);z&&(z.classList.add(p?n[Xr.caption_before_exit]:n[Xr.caption_after_exit]),z.addEventListener("animationend",M));const D=o_(E);D&&D.classList.add(p?n[Xr.weeks_before_exit]:n[Xr.weeks_after_exit]),C.insertBefore(E,C.firstChild)})}})}function mNe(e,t,n,r){const a=e[0],o=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(o):l?x(j(o)):b(j(o)),k=m(E,A),T=p(o,a)+1,M=[];for(let D=0;D<=k;D++){const U=f(A,D);if(t&&w(U,t))break;M.push(U)}const z=(d?35:42)*T;if(u&&M.length<z){const D=z-M.length;for(let U=0;U<D;U++){const V=f(M[M.length-1],1);M.push(V)}}return M}function pNe(e){const t=[];return e.reduce((n,r)=>{const a=r.weeks.reduce((o,l)=>o.concat(l.days.slice()),t.slice());return n.concat(a.slice())},t.slice())}function vNe(e,t,n,r){const{numberOfMonths:a=1}=n,o=[];for(let l=0;l<a;l++){const u=r.addMonths(e,l);if(t&&u>t)break;o.push(u)}return o}function kL(e,t,n,r){const{month:a,defaultMonth:o,today:l=r.today(),numberOfMonths:u=1}=e;let d=a||o||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 gNe(e,t,n,r){const{addDays:a,endOfBroadcastWeek:o,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?o(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(M=>{const $=A-C.length;return M>O&&M<=a(O,$)});C.push(...T)}const E=C.reduce((T,M)=>{const $=n.ISOWeek?f(M):m(M),z=T.find(U=>U.weekNumber===$),D=new RH(M,w,r);return z?z.days.push(D):T.push(new s_e($,[D])),T},[]),k=new o_e(w,E);return b.push(k),b},[]);return n.reverseMonths?j.reverse():j}function yNe(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:a,startOfDay:o,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&&o(n),r&&o(r)]}function xNe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=n,{startOfMonth:l,addMonths:u,differenceInCalendarMonths:d}=r,f=a?o:1,m=l(e);if(!t)return u(m,f);if(!(d(t,e)<o))return u(m,f)}function bNe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=n,{startOfMonth:l,addMonths:u,differenceInCalendarMonths:d}=r,f=a?o??1:1,m=l(e);if(!t)return u(m,-f);if(!(d(m,t)<=0))return u(m,-f)}function wNe(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Qy(e,t){const[n,r]=y.useState(e);return[t===void 0?n:t,r]}function jNe(e,t){const[n,r]=yNe(e,t),{startOfMonth:a,endOfMonth:o}=t,l=kL(e,n,r,t),[u,d]=Qy(l,e.month?l:void 0);y.useEffect(()=>{const k=kL(e,n,r,t);d(k)},[e.timeZone]);const f=vNe(u,r,e,t),m=mNe(f,e.endMonth?o(e.endMonth):void 0,e,t),p=gNe(f,m,e,t),g=wNe(p),x=pNe(p),j=bNe(u,n,e,t),b=xNe(u,r,e,t),{disableNavigation:w,onMonthChange:N}=e,O=k=>g.some(T=>T.days.some(M=>M.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 ei;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(ei||(ei={}));function ML(e){return!e[en.disabled]&&!e[en.hidden]&&!e[en.outside]}function SNe(e,t,n,r){let a,o=-1;for(const l of e){const u=t(l);ML(u)&&(u[en.focused]&&o<ei.FocusedModifier?(a=l,o=ei.FocusedModifier):r?.isEqualTo(l)&&o<ei.LastFocused?(a=l,o=ei.LastFocused):n(l.date)&&o<ei.Selected?(a=l,o=ei.Selected):u[en.today]&&o<ei.Today&&(a=l,o=ei.Today))}return a||(a=e.find(l=>ML(t(l)))),a}function _Ne(e,t,n,r,a,o,l){const{ISOWeek:u,broadcastCalendar:d}=o,{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 WH(e,t,n,r,a,o,l,u=0){if(u>365)return;const d=_Ne(e,t,n.date,r,a,o,l),f=!!(o.disabled&&Xi(d,o.disabled,l)),m=!!(o.hidden&&Xi(d,o.hidden,l)),p=d,g=new RH(d,p,l);return!f&&!m?g:WH(e,t,g,r,a,o,l,u+1)}function NNe(e,t,n,r,a){const{autoFocus:o}=e,[l,u]=y.useState(),d=SNe(t.days,n,r||(()=>!1),l),[f,m]=y.useState(o?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=WH(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 ONe(e,t){const{selected:n,required:r,onSelect:a}=e,[o,l]=Qy(n,a?n:void 0),u=a?n:o,{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 CNe(e,t,n=0,r=0,a=!1,o=ji){const{from:l,to:u}=t||{},{isSameDay:d,isAfter:f,isBefore:m}=o;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=o.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 ENe(e,t,n=ji){const r=Array.isArray(t)?t:[t];let a=e.from;const o=n.differenceInCalendarDays(e.to,e.from),l=Math.min(o,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=ji){return Ki(e,t.from,!1,n)||Ki(e,t.to,!1,n)||Ki(t,e.from,!1,n)||Ki(t,e.to,!1,n)}function ANe(e,t,n=ji){const r=Array.isArray(t)?t:[t];if(r.filter(u=>typeof u!="function").some(u=>typeof u=="boolean"?u:n.isDate(u)?Ki(e,u,!1,n):zH(u,n)?u.some(d=>Ki(e,d,!1,n)):OE(u)?u.from&&u.to?PL(e,{from:u.from,to:u.to},n):!1:BH(u)?ENe(e,u.dayOfWeek,n):$H(u)?n.isAfter(u.before,u.after)?PL(e,{from:n.addDays(u.after,1),to:n.addDays(u.before,-1)},n):Xi(e.from,u,n)||Xi(e.to,u,n):IH(u)||LH(u)?Xi(e.from,u,n)||Xi(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 TNe(e,t){const{disabled:n,excludeDisabled:r,selected:a,required:o,onSelect:l}=e,[u,d]=Qy(a,l?a:void 0),f=l?a:u;return{selected:f,select:(g,x,j)=>{const{min:b,max:w}=e,N=g?CNe(g,f,b,w,o,t):void 0;return r&&n&&N?.from&&N.to&&ANe({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&&Ki(f,g,!1,t)}}function kNe(e,t){const{selected:n,required:r,onSelect:a}=e,[o,l]=Qy(n,a?n:void 0),u=a?n:o,{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 MNe(e,t){const n=kNe(e,t),r=ONe(e,t),a=TNe(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 sr(t.today,t.timeZone)),t.month&&(t.month=new sr(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new sr(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new sr(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new sr(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new sr(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(et=>new sr(et,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new sr(t.selected.from,t.timeZone):void 0,to:t.selected.to?new sr(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:a,dateLib:o,locale:l,classNames:u}=y.useMemo(()=>{const et={...NE,...t.locale};return{dateLib:new ia({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:I_e(t.components),formatters:G_e(t.formatters),labels:{...cNe,...t.labels},locale:et,classNames:{...CE(),...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:M,formatWeekNumber:$,formatWeekNumberHeader:z,formatWeekdayName:D,formatYearDropdown:U}=r,V=jNe(t,o),{days:H,months:G,navStart:L,navEnd:R,previousMonth:F,nextMonth:K,goToMonth:te}=V,I=D_e(H,t,L,R,o),{isSelected:B,select:Y,selected:ne}=MNe(t,o)??{},{blur:oe,focused:xe,isFocusTarget:ee,moveFocus:ae,setFocused:Z}=NNe(t,V,I,B??(()=>!1),o),{labelDayButton:pe,labelGridcell:je,labelGrid:le,labelMonthDropdown:Re,labelNav:_e,labelPrevious:me,labelNext:ve,labelWeekday:Le,labelWeekNumber:Dt,labelWeekNumberHeader:On,labelYearDropdown:vr}=a,rr=y.useMemo(()=>X_e(o,t.ISOWeek),[o,t.ISOWeek]),gr=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]),$n=y.useCallback((et,Lt)=>He=>{He.preventDefault(),He.stopPropagation(),Z(et),Y?.(et.date,Lt,He),x?.(et.date,Lt,He)},[Y,x,Z]),ms=y.useCallback((et,Lt)=>He=>{Z(et),j?.(et.date,Lt,He)},[j,Z]),am=y.useCallback((et,Lt)=>He=>{oe(),g?.(et.date,Lt,He)},[oe,g]),Ml=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[In,tt]=gt[He.key];ae(In,tt)}b?.(et.date,Lt,He)},[ae,b,t.dir]),rx=y.useCallback((et,Lt)=>He=>{w?.(et.date,Lt,He)},[w]),im=y.useCallback((et,Lt)=>He=>{N?.(et.date,Lt,He)},[N]),ax=y.useCallback(et=>Lt=>{const He=Number(Lt.target.value),gt=o.setMonth(o.startOfMonth(et),He);te(gt)},[o,te]),ix=y.useCallback(et=>Lt=>{const He=Number(Lt.target.value),gt=o.setYear(o.startOfMonth(et),He);te(gt)},[o,te]),{className:ps,style:yr}=y.useMemo(()=>({className:[u[$e.Root],t.className].filter(Boolean).join(" "),style:{...E?.[$e.Root],...t.style}}),[u,t.className,t.style,E]),Ya=L_e(t),ar=y.useRef(null);hNe(ar,!!t.animate,{classNames:u,months:G,focused:xe,dateLib:o});const ox={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(DH.Provider,{value:ox},W.createElement(n.Root,{rootRef:t.animate?ar:void 0,className:ps,style:yr,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"],...Ya},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:ax(et.date),options:Y_e(et.date,L,R,r,o),style:E?.[$e.Dropdown],value:o.getMonth(et.date)}):W.createElement("span",{key:"month"},M(et.date,o)),gt=d==="dropdown"||d==="dropdown-years"?W.createElement(n.YearsDropdown,{key:"year",className:u[$e.YearsDropdown],"aria-label":vr(o.options),classNames:u,components:n,disabled:!!t.disableNavigation,onChange:ix(et.date),options:Z_e(L,R,r,o,!!t.reverseYears),style:E?.[$e.Dropdown],value:o.getYear(et.date)}):W.createElement("span",{key:"year"},U(et.date,o));return o.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,o.options,o))):W.createElement(n.CaptionLabel,{className:u[$e.CaptionLabel],role:"status","aria-live":"polite"},k(et.date,o.options,o))),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,o.options,o)||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":On(o.options),className:u[$e.WeekNumberHeader],style:E?.[$e.WeekNumberHeader],scope:"col"},z()),rr.map(He=>W.createElement(n.Weekday,{"aria-label":Le(He,o.options,o),className:u[$e.Weekday],key:String(He),style:E?.[$e.Weekday],scope:"col"},D(He,o.options,o)))),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,o)),He.days.map(gt=>{const{date:In}=gt,tt=I(gt);if(tt[en.focused]=!tt.hidden&&!!xe?.isEqualTo(gt),tt[za.selected]=B?.(In)||tt.selected,OE(ne)){const{from:Rl,to:gs}=ne;tt[za.range_start]=!!(Rl&&gs&&o.isSameDay(In,Rl)),tt[za.range_end]=!!(Rl&&gs&&o.isSameDay(In,gs)),tt[za.range_middle]=Ki(ne,In,!0,o)}const Pl=K_e(tt,E,t.modifiersStyles),vs=$_e(tt,u,t.modifiersClassNames),sx=!gr&&!tt.hidden?je(In,tt,o.options,o):void 0;return W.createElement(n.Day,{key:`${o.format(In,"yyyy-MM-dd")}_${o.format(gt.displayMonth,"yyyy-MM")}`,day:gt,modifiers:tt,className:vs.join(" "),style:Pl,role:"gridcell","aria-selected":tt.selected||void 0,"aria-label":sx,"data-day":o.format(In,"yyyy-MM-dd"),"data-month":gt.outside?o.format(In,"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&&gr?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(In,tt,o.options,o),onClick:$n(gt,tt),onBlur:am(gt,tt),onFocus:ms(gt,tt),onKeyDown:Ml(gt,tt),onMouseEnter:rx(gt,tt),onMouseLeave:im(gt,tt)},T(In,o.options,o)):!tt.hidden&&T(gt.date,o.options,o))})))))))),t.footer&&W.createElement(n.Footer,{className:u[$e.Footer],style:E?.[$e.Footer],role:"status","aria-live":"polite"},t.footer)))}function RL({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:a="ghost",formatters:o,components:l,...u}){const d=CE();return i.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"}),...o},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(dh({variant:a}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",d.button_previous),button_next:ue(dh({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})=>i.jsx("div",{"data-slot":"calendar",ref:m,className:ue(f),...p}),Chevron:({className:f,orientation:m,...p})=>m==="left"?i.jsx(HC,{className:ue("size-4",f),...p}):m==="right"?i.jsx(WC,{className:ue("size-4",f),...p}):i.jsx(ch,{className:ue("size-4",f),...p}),DayButton:RNe,WeekNumber:({children:f,...m})=>i.jsx("td",{...m,children:i.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:f})}),...l},...u})}function RNe({className:e,day:t,modifiers:n,...r}){const a=CE(),o=y.useRef(null);return y.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),i.jsx(fe,{ref:o,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 DNe{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 Rc=new DNe;typeof window<"u"&&Rc.connect();const $Ne={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}} 年"}},INe=(e,t,n)=>{let r;const a=$Ne[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},LNe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},BNe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},zNe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},qNe={date:Kc({formats:LNe,defaultWidth:"full"}),time:Kc({formats:BNe,defaultWidth:"full"}),dateTime:Kc({formats:zNe,defaultWidth:"full"})};function DL(e,t,n){const r="eeee p";return QSe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const FNe={lastWeek:DL,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:DL,other:"PP p"},UNe=(e,t,n,r)=>{const a=FNe[e];return typeof a=="function"?a(t,n,r):a},HNe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},WNe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},VNe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},GNe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},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={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:"夜间"}},XNe=(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()}},ZNe={ordinalNumber:XNe,era:ri({values:HNe,defaultWidth:"wide"}),quarter:ri({values:WNe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ri({values:VNe,defaultWidth:"wide"}),day:ri({values:GNe,defaultWidth:"wide"}),dayPeriod:ri({values:YNe,defaultWidth:"wide",formattingValues:KNe,defaultFormattingWidth:"wide"})},QNe=/^(第\s*)?\d+(日|时|分|秒)?/i,JNe=/\d+/i,eOe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},tOe={any:[/^(前)/i,/^(公元)/i]},nOe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},rOe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},aOe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},iOe={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]},oOe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},sOe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},lOe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},cOe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},uOe={ordinalNumber:EH({matchPattern:QNe,parsePattern:JNe,valueCallback:e=>parseInt(e,10)}),era:ai({matchPatterns:eOe,defaultMatchWidth:"wide",parsePatterns:tOe,defaultParseWidth:"any"}),quarter:ai({matchPatterns:nOe,defaultMatchWidth:"wide",parsePatterns:rOe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ai({matchPatterns:aOe,defaultMatchWidth:"wide",parsePatterns:iOe,defaultParseWidth:"any"}),day:ai({matchPatterns:oOe,defaultMatchWidth:"wide",parsePatterns:sOe,defaultParseWidth:"any"}),dayPeriod:ai({matchPatterns:lOe,defaultMatchWidth:"any",parsePatterns:cOe,defaultParseWidth:"any"})},Wp={code:"zh-CN",formatDistance:INe,formatLong:qNe,formatRelative:UNe,localize:ZNe,match:uOe,options:{weekStartsOn:1,firstWeekContainsDate:4}};function dOe(){const[e,t]=y.useState([]),[n,r]=y.useState(""),[a,o]=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=Rc.getAllLogs();t(D);const U=Rc.onLog(()=>{t(Rc.getAllLogs())}),V=Rc.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=()=>{Rc.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-${cv(new Date,"yyyy-MM-dd-HHmmss")}.txt`,H.click(),URL.revokeObjectURL(V)},M=()=>{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 i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-4 p-3 sm:p-4 lg:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl sm:text-2xl lg:text-3xl font-bold",children:"日志查看器"}),i.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground mt-1",children:"实时查看和分析麦麦运行日志"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.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")}),i.jsx("span",{className:"text-xs sm:text-sm text-muted-foreground",children:j?"已连接":"未连接"})]})]}),i.jsx(dt,{className:"p-3 sm:p-4",children:i.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[i.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:gap-4",children:[i.jsxs("div",{className:"flex-1 relative",children:[i.jsx(Dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Ne,{placeholder:"搜索日志...",value:n,onChange:D=>r(D.target.value),className:"pl-9 h-9 text-sm"})]}),i.jsxs(Et,{value:a,onValueChange:o,children:[i.jsxs(wt,{className:"w-full sm:w-[140px] lg:w-[180px] h-9 text-sm",children:[i.jsx(WN,{className:"h-4 w-4 mr-2"}),i.jsx(At,{placeholder:"级别"})]}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部级别"}),i.jsx(Me,{value:"DEBUG",children:"DEBUG"}),i.jsx(Me,{value:"INFO",children:"INFO"}),i.jsx(Me,{value:"WARNING",children:"WARNING"}),i.jsx(Me,{value:"ERROR",children:"ERROR"}),i.jsx(Me,{value:"CRITICAL",children:"CRITICAL"})]})]}),i.jsxs(Et,{value:l,onValueChange:u,children:[i.jsxs(wt,{className:"w-full sm:w-[160px] lg:w-[200px] h-9 text-sm",children:[i.jsx(WN,{className:"h-4 w-4 mr-2"}),i.jsx(At,{placeholder:"模块"})]}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部模块"}),O.map(D=>i.jsx(Me,{value:D,children:D},D))]})]})]}),i.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:gap-4",children:[i.jsxs(es,{children:[i.jsx(ts,{asChild:!0,children:i.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:[i.jsx(L3,{className:"mr-2 h-4 w-4"}),i.jsx("span",{className:"text-xs sm:text-sm",children:d?cv(d,"PPP",{locale:Wp}):"开始日期"})]})}),i.jsx(so,{className:"w-auto p-0",align:"start",children:i.jsx(RL,{mode:"single",selected:d,onSelect:f,initialFocus:!0,locale:Wp})})]}),i.jsxs(es,{children:[i.jsx(ts,{asChild:!0,children:i.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:[i.jsx(L3,{className:"mr-2 h-4 w-4"}),i.jsx("span",{className:"text-xs sm:text-sm",children:m?cv(m,"PPP",{locale:Wp}):"结束日期"})]})}),i.jsx(so,{className:"w-auto p-0",align:"start",children:i.jsx(RL,{mode:"single",selected:m,onSelect:p,initialFocus:!0,locale:Wp})})]}),(d||m)&&i.jsxs(fe,{variant:"outline",size:"sm",onClick:$,className:"w-full sm:w-auto h-9",children:[i.jsx(Lh,{className:"h-4 w-4 sm:mr-2"}),i.jsx("span",{className:"hidden sm:inline text-sm",children:"清除时间筛选"}),i.jsx("span",{className:"sm:hidden text-sm",children:"清除"})]})]}),i.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center",children:[i.jsxs("div",{className:"flex gap-2 flex-wrap",children:[i.jsxs(fe,{variant:g?"default":"outline",size:"sm",onClick:M,className:"flex-1 sm:flex-none h-9",children:[g?i.jsx(Vve,{className:"h-4 w-4"}):i.jsx(Kve,{className:"h-4 w-4"}),i.jsx("span",{className:"ml-2 text-sm",children:g?"自动滚动":"已暂停"})]}),i.jsxs(fe,{variant:"outline",size:"sm",onClick:E,className:"flex-1 sm:flex-none h-9",children:[i.jsx(al,{className:"h-4 w-4"}),i.jsx("span",{className:"ml-2 text-sm",children:"刷新"})]}),i.jsxs(fe,{variant:"outline",size:"sm",onClick:k,className:"flex-1 sm:flex-none h-9",children:[i.jsx(Ut,{className:"h-4 w-4"}),i.jsx("span",{className:"ml-2 text-sm",children:"清空"})]}),i.jsxs(fe,{variant:"outline",size:"sm",onClick:T,className:"flex-1 sm:flex-none h-9",children:[i.jsx(UN,{className:"h-4 w-4"}),i.jsx("span",{className:"ml-2 text-sm",children:"导出"})]})]}),i.jsx("div",{className:"flex-1 hidden sm:block"}),i.jsxs("div",{className:"text-xs sm:text-sm text-muted-foreground flex items-center justify-center sm:justify-end",children:[i.jsxs("span",{className:"font-mono",children:[z.length," / ",e.length]}),i.jsx("span",{className:"ml-1",children:"条日志"})]})]})]})}),i.jsx(dt,{className:"bg-black dark:bg-gray-950 border-gray-800 dark:border-gray-900",children:i.jsx(Kt,{className:"h-[calc(100vh-280px)] sm:h-[calc(100vh-320px)] lg:h-[calc(100vh-400px)]",children:i.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?i.jsx("div",{className:"text-gray-500 dark:text-gray-600 text-center py-8 text-sm",children:"暂无日志数据"}):z.map(D=>i.jsxs("div",{className:ue("py-2 px-2 sm:px-3 rounded hover:bg-white/5 transition-colors group",A(D.level)),children:[i.jsxs("div",{className:"flex flex-col gap-1 sm:hidden",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-gray-500 dark:text-gray-600 text-xs",children:D.timestamp}),i.jsxs("span",{className:ue("text-xs font-semibold",C(D.level)),children:["[",D.level,"]"]})]}),i.jsx("div",{className:"text-cyan-400 dark:text-cyan-500 text-xs truncate",children:D.module}),i.jsx("div",{className:"text-gray-300 dark:text-gray-400 text-xs break-all",children:D.message})]}),i.jsxs("div",{className:"hidden sm:flex gap-3 items-start",children:[i.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}),i.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,"]"]}),i.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}),i.jsx("span",{className:"text-gray-300 dark:text-gray-400 flex-1 break-all text-xs lg:text-sm",children:D.message})]})]},D.id)),i.jsx("div",{ref:N,className:"h-4"})]})})})]})})}const fOe="Mai-with-u",hOe="plugin-repo",mOe="main",pOe="plugin_details.json";async function vOe(){try{const e=await Ze("/api/webui/plugins/fetch-raw",{method:"POST",headers:st(),body:JSON.stringify({owner:fOe,repo:hOe,branch:mOe,file_path:pOe})});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 gOe(){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 yOe(){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 xOe(e,t,n){const r=e.split(".").map(u=>parseInt(u)||0),a=r[0]||0,o=r[1]||0,l=r[2]||0;if(n.version_major<a||n.version_major===a&&n.version_minor<o||n.version_major===a&&n.version_minor===o&&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 bOe(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 o=setInterval(()=>{a.readyState===WebSocket.OPEN?a.send("ping"):clearInterval(o)},3e4)},a.onmessage=o=>{try{if(o.data==="pong")return;const l=JSON.parse(o.data);e(l)}catch(l){console.error("Failed to parse progress data:",l)}},a.onerror=o=>{console.error("Plugin progress WebSocket error:",o),t?.(o)},a.onclose=()=>{console.log("Plugin progress WebSocket disconnected")},a}async function Vp(){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 Gp(e,t){return t.some(n=>n.id===e)}function Yp(e,t){const n=t.find(r=>r.id===e);if(n)return n.manifest?.version||n.version}async function wOe(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 jOe(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 SOe(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 _Oe(){const e=oa(),[t,n]=y.useState(null),[r,a]=y.useState(""),[o,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:M}=mr();y.useEffect(()=>{let R=null,F=!1;return(async()=>{if(R=bOe(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||M({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 gOe();O(te),te.installed||M({title:"Git 未安装",description:te.error||"请先安装 Git 才能使用插件安装功能",variant:"destructive"})}if(!F){const te=await yOe();k(te)}if(!F)try{j(!0),w(null);const te=await vOe();if(!F){const I=await Vp();T(I);const B=te.map(Y=>{const ne=Gp(Y.id,I),oe=Yp(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),M({title:"加载失败",description:I,variant:"destructive"})}}finally{F||j(!1)}})(),()=>{F=!0,R&&R.close()}},[M]);const $=R=>{if(!R.installed&&E&&!z(R))return i.jsxs(tn,{variant:"destructive",className:"gap-1",children:[i.jsx(xg,{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 i.jsxs(tn,{variant:"outline",className:"gap-1 text-orange-600 border-orange-600",children:[i.jsx(xg,{className:"h-3 w-3"}),"可更新"]});if((I[B]||0)<(te[B]||0))break}}return i.jsxs(tn,{variant:"default",className:"gap-1",children:[i.jsx(Cu,{className:"h-3 w-3"}),"已安装"]})}return null},z=R=>!E||!R.manifest?.host_application?!0:xOe(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=o==="all"||R.manifest.categories&&R.manifest.categories.includes(o);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){M({title:"无法安装",description:"Git 未安装",variant:"destructive"});return}if(E&&!z(R)){M({title:"无法安装",description:"插件与当前麦麦版本不兼容",variant:"destructive"});return}try{await wOe(R.id,R.manifest.repository_url||"","main"),M({title:"安装成功",description:`${R.manifest.name} 已成功安装`});const F=await Vp();T(F),g(K=>K.map(te=>{if(te.id===R.id){const I=Gp(te.id,F),B=Yp(te.id,F);return{...te,installed:I,installed_version:B}}return te}))}catch(F){M({title:"安装失败",description:F instanceof Error?F.message:"未知错误",variant:"destructive"})}},G=async R=>{try{await jOe(R.id),M({title:"卸载成功",description:`${R.manifest.name} 已成功卸载`});const F=await Vp();T(F),g(K=>K.map(te=>{if(te.id===R.id){const I=Gp(te.id,F),B=Yp(te.id,F);return{...te,installed:I,installed_version:B}}return te}))}catch(F){M({title:"卸载失败",description:F instanceof Error?F.message:"未知错误",variant:"destructive"})}},L=async R=>{if(!N?.installed){M({title:"无法更新",description:"Git 未安装",variant:"destructive"});return}try{const F=await SOe(R.id,R.manifest.repository_url||"","main");M({title:"更新成功",description:`${R.manifest.name} 已从 ${F.old_version} 更新到 ${F.new_version}`});const K=await Vp();T(K),g(te=>te.map(I=>{if(I.id===R.id){const B=Gp(I.id,K),Y=Yp(I.id,K);return{...I,installed:B,installed_version:Y}}return I}))}catch(F){M({title:"更新失败",description:F instanceof Error?F.message:"未知错误",variant:"destructive"})}};return i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"插件市场"}),i.jsx("p",{className:"text-muted-foreground mt-2",children:"浏览和管理麦麦的插件"})]}),i.jsxs(fe,{onClick:()=>e({to:"/plugin-mirrors"}),children:[i.jsx(oge,{className:"h-4 w-4 mr-2"}),"配置镜像源"]})]}),N&&!N.installed&&i.jsxs(dt,{className:"border-orange-600 bg-orange-50 dark:bg-orange-950/20",children:[i.jsx(Vt,{children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Wc,{className:"h-5 w-5 text-orange-600"}),i.jsxs("div",{children:[i.jsx(Gt,{className:"text-lg text-orange-900 dark:text-orange-100",children:"Git 未安装"}),i.jsx(er,{className:"text-orange-800 dark:text-orange-200",children:N.error||"请先安装 Git 才能使用插件安装功能"})]})]})}),i.jsx(cn,{children:i.jsxs("p",{className:"text-sm text-orange-800 dark:text-orange-200",children:["您可以从 ",i.jsx("a",{href:"https://git-scm.com/downloads",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"git-scm.com"})," 下载并安装 Git。 安装完成后,请重启麦麦应用。"]})})]}),i.jsx(dt,{className:"p-4",children:i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[i.jsxs("div",{className:"flex-1 relative",children:[i.jsx(Dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),i.jsx(Ne,{placeholder:"搜索插件...",value:r,onChange:R=>a(R.target.value),className:"pl-9"})]}),i.jsxs(Et,{value:o,onValueChange:l,children:[i.jsx(wt,{className:"w-full sm:w-[200px]",children:i.jsx(At,{placeholder:"选择分类"})}),i.jsxs(jt,{children:[i.jsx(Me,{value:"all",children:"全部分类"}),i.jsx(Me,{value:"Developer Tools",children:"开发工具"}),i.jsx(Me,{value:"AI Enhancement",children:"AI 增强"}),i.jsx(Me,{value:"Utility",children:"工具类"}),i.jsx(Me,{value:"Entertainment",children:"娱乐"}),i.jsx(Me,{value:"Integration",children:"集成"}),i.jsx(Me,{value:"Data Analysis",children:"数据分析"}),i.jsx(Me,{value:"Automation",children:"自动化"}),i.jsx(Me,{value:"Other",children:"其他"})]})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(ku,{id:"compatible-only",checked:f,onCheckedChange:R=>m(R===!0)}),i.jsx("label",{htmlFor:"compatible-only",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"只显示兼容当前版本的插件"})]})]})}),i.jsx(sl,{value:u,onValueChange:d,className:"w-full",children:i.jsxs(Zo,{className:"grid w-full grid-cols-3",children:[i.jsxs(Ct,{value:"all",children:["全部插件 (",p.length,")"]}),i.jsxs(Ct,{value:"installed",children:["已安装 (",p.filter(R=>R.installed).length,")"]}),i.jsxs(Ct,{value:"updates",children:["可更新 (",p.filter(R=>R.installed&&D(R)).length,")"]})]})}),C&&C.stage==="loading"&&i.jsx(dt,{className:"p-4",children:i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(VN,{className:"h-4 w-4 animate-spin"}),i.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}`:""}`]})]}),i.jsxs("span",{className:"text-sm font-medium",children:[C.progress,"%"]})]}),i.jsx(cE,{value:C.progress,className:"h-2"}),i.jsx("div",{className:"text-xs text-muted-foreground",children:C.message}),C.operation==="fetch"&&C.total_plugins>0&&i.jsxs("div",{className:"text-xs text-muted-foreground text-center",children:["已加载 ",C.loaded_plugins," / ",C.total_plugins," 个插件"]})]})}),C&&C.stage==="error"&&C.error&&i.jsx(dt,{className:"border-destructive bg-destructive/10",children:i.jsx(Vt,{children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Wc,{className:"h-5 w-5 text-destructive"}),i.jsxs("div",{children:[i.jsx(Gt,{className:"text-lg text-destructive",children:"加载失败"}),i.jsx(er,{className:"text-destructive/80",children:C.error})]})]})})}),x?i.jsxs("div",{className:"flex items-center justify-center py-12",children:[i.jsx(VN,{className:"h-8 w-8 animate-spin text-muted-foreground"}),i.jsx("span",{className:"ml-3 text-muted-foreground",children:"加载插件列表中..."})]}):b?i.jsx(dt,{className:"p-6",children:i.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[i.jsx(Wc,{className:"h-12 w-12 text-destructive mb-4"}),i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:b}),i.jsx(fe,{onClick:()=>window.location.reload(),children:"重新加载"})]})}):U.length===0?i.jsx(dt,{className:"p-6",children:i.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[i.jsx(Dr,{className:"h-12 w-12 text-muted-foreground mb-4"}),i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"未找到插件"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:r||o!=="all"?"尝试调整搜索条件或筛选器":"暂无可用插件"})]})}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:U.map(R=>i.jsxs(dt,{className:"flex flex-col hover:shadow-lg transition-shadow h-full",children:[i.jsxs(Vt,{children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsx(Gt,{className:"text-xl",children:R.manifest?.name||R.id}),i.jsxs("div",{className:"flex flex-col gap-1",children:[R.manifest?.categories&&R.manifest.categories[0]&&i.jsx(tn,{variant:"secondary",className:"text-xs whitespace-nowrap",children:R.manifest.categories[0]}),$(R)]})]}),i.jsx(er,{className:"line-clamp-2",children:R.manifest?.description||"无描述"})]}),i.jsx(cn,{className:"flex-1",children:i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(UN,{className:"h-4 w-4"}),i.jsx("span",{children:R.downloads.toLocaleString()})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(q3,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),i.jsx("span",{children:R.rating.toFixed(1)})]})]}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[R.manifest?.keywords&&R.manifest.keywords.slice(0,3).map(F=>i.jsx(tn,{variant:"outline",className:"text-xs",children:F},F)),R.manifest?.keywords&&R.manifest.keywords.length>3&&i.jsxs(tn,{variant:"outline",className:"text-xs",children:["+",R.manifest.keywords.length-3]})]}),i.jsxs("div",{className:"text-xs text-muted-foreground pt-2 border-t space-y-1",children:[i.jsxs("div",{children:["v",R.manifest?.version||"unknown"," · ",R.manifest?.author?.name||"Unknown"]}),R.manifest?.host_application&&i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("span",{children:"支持:"}),i.jsxs("span",{className:"font-medium",children:[R.manifest.host_application.min_version,R.manifest.host_application.max_version?` - ${R.manifest.host_application.max_version}`:" - 最新版本"]})]})]})]})}),i.jsx(B5,{className:"pt-4",children:i.jsxs("div",{className:"flex items-center justify-end gap-2 w-full",children:[i.jsx(fe,{variant:"outline",size:"sm",onClick:()=>n(R),children:"查看详情"}),R.installed?D(R)?i.jsxs(fe,{size:"sm",disabled:!N?.installed,title:N?.installed?void 0:"Git 未安装",onClick:()=>L(R),children:[i.jsx(al,{className:"h-4 w-4 mr-1"}),"更新"]}):i.jsxs(fe,{variant:"destructive",size:"sm",disabled:!N?.installed,title:N?.installed?void 0:"Git 未安装",onClick:()=>G(R),children:[i.jsx(Ut,{className:"h-4 w-4 mr-1"}),"卸载"]}):i.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:[i.jsx(UN,{className:"h-4 w-4 mr-1"}),C?.operation==="install"&&C?.plugin_id===R.id?"安装中...":"安装"]})]})})]},R.id))}),i.jsx(nr,{open:t!==null,onOpenChange:V,children:t&&t.manifest&&i.jsxs(Hn,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[i.jsx(Wn,{children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"space-y-2 flex-1",children:[i.jsx(Vn,{className:"text-2xl",children:t.manifest.name}),i.jsxs(dr,{children:["作者: ",t.manifest.author?.name||"Unknown",t.manifest.author?.url&&i.jsx("a",{href:t.manifest.author.url,target:"_blank",rel:"noopener noreferrer",className:"ml-2 text-primary hover:underline",children:i.jsx(rv,{className:"h-3 w-3 inline"})})]})]}),i.jsxs("div",{className:"flex flex-col gap-2",children:[t.manifest.categories&&t.manifest.categories[0]&&i.jsx(tn,{variant:"secondary",children:t.manifest.categories[0]}),$(t)]})]})}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"版本"}),i.jsxs("p",{className:"text-sm text-muted-foreground",children:["v",t.manifest?.version||"unknown"]}),t.installed&&t.installed_version&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:["已安装: v",t.installed_version]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"下载量"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:t.downloads.toLocaleString()})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"评分"}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(q3,{className:"h-4 w-4 fill-yellow-400 text-yellow-400"}),i.jsxs("span",{className:"text-sm text-muted-foreground",children:[t.rating.toFixed(1)," (",t.review_count,")"]})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium",children:"许可证"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:t.manifest.license||"Unknown"})]}),i.jsxs("div",{className:"col-span-2",children:[i.jsx("p",{className:"text-sm font-medium",children:"支持版本"}),i.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}`:" - 最新版本"]})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium mb-2",children:"关键词"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:t.manifest.keywords&&t.manifest.keywords.map(R=>i.jsx(tn,{variant:"outline",children:R},R))})]}),t.detailed_description&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium mb-2",children:"详细说明"}),i.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:t.detailed_description})]}),!t.detailed_description&&i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium mb-2",children:"说明"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:t.manifest.description||"无描述"})]}),i.jsxs("div",{className:"space-y-2",children:[t.manifest.homepage_url&&i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium",children:"主页: "}),i.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&&i.jsxs("div",{className:"text-sm",children:[i.jsx("span",{className:"font-medium",children:"仓库: "}),i.jsx("a",{href:t.manifest.repository_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:t.manifest.repository_url})]})]})]}),i.jsxs($r,{children:[t.manifest.homepage_url&&i.jsxs(fe,{onClick:()=>window.open(t.manifest.homepage_url,"_blank"),children:[i.jsx(rv,{className:"h-4 w-4 mr-2"}),"访问主页"]}),t.manifest.repository_url&&i.jsxs(fe,{variant:"outline",onClick:()=>window.open(t.manifest.repository_url,"_blank"),children:[i.jsx(rv,{className:"h-4 w-4 mr-2"}),"查看仓库"]})]})]})})]})})}function NOe(){const e=oa(),{toast:t}=mr(),[n,r]=y.useState([]),[a,o]=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{o(!0),u(null);const T=localStorage.getItem("access-token"),M=await fetch("/api/webui/plugins/mirrors",{headers:{Authorization:`Bearer ${T}`}});if(!M.ok)throw new Error("获取镜像源列表失败");const $=await M.json();r($.mirrors||[])}catch(T){const M=T instanceof Error?T.message:"加载镜像源失败";u(M),t({title:"加载失败",description:M,variant:"destructive"})}finally{o(!1)}},[t]);y.useEffect(()=>{w()},[w]);const N=async()=>{try{const T=localStorage.getItem("access-token"),M=await fetch("/api/webui/plugins/mirrors",{method:"POST",headers:{Authorization:`Bearer ${T}`,"Content-Type":"application/json"},body:JSON.stringify(j)});if(!M.ok){const $=await M.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 M=localStorage.getItem("access-token");if(!(await fetch(`/api/webui/plugins/mirrors/${T}`,{method:"DELETE",headers:{Authorization:`Bearer ${M}`}})).ok)throw new Error("删除镜像源失败");t({title:"删除成功",description:"镜像源已删除"}),w()}catch(M){t({title:"删除失败",description:M instanceof Error?M.message:"未知错误",variant:"destructive"})}},A=async T=>{try{const M=localStorage.getItem("access-token");if(!(await fetch(`/api/webui/plugins/mirrors/${T.id}`,{method:"PUT",headers:{Authorization:`Bearer ${M}`,"Content-Type":"application/json"},body:JSON.stringify({enabled:!T.enabled})})).ok)throw new Error("更新状态失败");w()}catch(M){t({title:"更新失败",description:M instanceof Error?M.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,M)=>{const $=M==="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 i.jsx(Kt,{className:"h-full",children:i.jsxs("div",{className:"space-y-6 p-4 sm:p-6",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>e({to:"/plugins"}),children:i.jsx(Hq,{className:"h-5 w-5"})}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"镜像源配置"}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"管理 Git 克隆和文件下载的镜像源"})]})]}),i.jsxs(fe,{onClick:()=>p(!0),children:[i.jsx(tr,{className:"h-4 w-4 mr-2"}),"添加镜像源"]})]}),a?i.jsx(dt,{className:"p-6",children:i.jsx("div",{className:"flex items-center justify-center py-8",children:i.jsx(VN,{className:"h-8 w-8 animate-spin text-primary"})})}):l?i.jsx(dt,{className:"p-6",children:i.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[i.jsx(Wc,{className:"h-12 w-12 text-destructive mb-4"}),i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"加载失败"}),i.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:l}),i.jsx(fe,{onClick:w,children:"重新加载"})]})}):i.jsxs(dt,{children:[i.jsx("div",{className:"hidden md:block",children:i.jsxs(Ol,{children:[i.jsx(Cl,{children:i.jsxs(vn,{children:[i.jsx(Je,{children:"状态"}),i.jsx(Je,{children:"名称"}),i.jsx(Je,{children:"ID"}),i.jsx(Je,{children:"优先级"}),i.jsx(Je,{className:"text-right",children:"操作"})]})}),i.jsx(El,{children:n.map(T=>i.jsxs(vn,{children:[i.jsx(Ue,{children:i.jsx(at,{checked:T.enabled,onCheckedChange:()=>A(T)})}),i.jsx(Ue,{children:i.jsxs("div",{children:[i.jsx("div",{className:"font-medium",children:T.name}),i.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Raw: ",T.raw_prefix]})]})}),i.jsx(Ue,{children:i.jsx(tn,{variant:"outline",children:T.id})}),i.jsx(Ue,{children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-mono",children:T.priority}),i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx(fe,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>k(T,"up"),disabled:T.priority===1,children:i.jsx(qN,{className:"h-3 w-3"})}),i.jsx(fe,{variant:"ghost",size:"icon",className:"h-5 w-5",onClick:()=>k(T,"down"),children:i.jsx(ch,{className:"h-3 w-3"})})]})]})}),i.jsx(Ue,{className:"text-right",children:i.jsxs("div",{className:"flex items-center justify-end gap-2",children:[i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>E(T),children:i.jsx(Eu,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"ghost",size:"icon",onClick:()=>C(T.id),children:i.jsx(Ut,{className:"h-4 w-4 text-destructive"})})]})})]},T.id))})]})}),i.jsx("div",{className:"md:hidden p-4 space-y-4",children:n.map(T=>i.jsx(dt,{className:"p-4",children:i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("h3",{className:"font-semibold",children:T.name}),T.enabled&&i.jsx(tn,{variant:"default",className:"text-xs",children:"启用"})]}),i.jsx(tn,{variant:"outline",className:"mt-1 text-xs",children:T.id})]}),i.jsx(at,{checked:T.enabled,onCheckedChange:()=>A(T)})]}),i.jsxs("div",{className:"text-sm space-y-1",children:[i.jsxs("div",{className:"text-muted-foreground",children:[i.jsx("span",{className:"font-medium",children:"Raw: "}),i.jsx("span",{className:"break-all",children:T.raw_prefix})]}),i.jsxs("div",{className:"text-muted-foreground",children:[i.jsx("span",{className:"font-medium",children:"优先级: "}),i.jsx("span",{className:"font-mono",children:T.priority})]})]}),i.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t",children:[i.jsxs(fe,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>E(T),children:[i.jsx(Eu,{className:"h-4 w-4 mr-1"}),"编辑"]}),i.jsx(fe,{variant:"outline",size:"sm",onClick:()=>k(T,"up"),disabled:T.priority===1,children:i.jsx(qN,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"outline",size:"sm",onClick:()=>k(T,"down"),children:i.jsx(ch,{className:"h-4 w-4"})}),i.jsx(fe,{variant:"destructive",size:"sm",onClick:()=>C(T.id),children:i.jsx(Ut,{className:"h-4 w-4"})})]})]})},T.id))})]}),i.jsx(nr,{open:m,onOpenChange:p,children:i.jsxs(Hn,{className:"max-w-lg",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"添加镜像源"}),i.jsx(dr,{children:"添加新的 Git 镜像源配置"})]}),i.jsxs("div",{className:"space-y-4 py-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"add-id",children:"镜像源 ID *"}),i.jsx(Ne,{id:"add-id",placeholder:"例如: my-mirror",value:j.id,onChange:T=>b({...j,id:T.target.value})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"add-name",children:"名称 *"}),i.jsx(Ne,{id:"add-name",placeholder:"例如: 我的镜像源",value:j.name,onChange:T=>b({...j,name:T.target.value})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"add-raw",children:"Raw 文件前缀 *"}),i.jsx(Ne,{id:"add-raw",placeholder:"https://example.com/raw",value:j.raw_prefix,onChange:T=>b({...j,raw_prefix:T.target.value})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"add-clone",children:"克隆前缀 *"}),i.jsx(Ne,{id:"add-clone",placeholder:"https://example.com/clone",value:j.clone_prefix,onChange:T=>b({...j,clone_prefix:T.target.value})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"add-priority",children:"优先级"}),i.jsx(Ne,{id:"add-priority",type:"number",min:"1",value:j.priority,onChange:T=>b({...j,priority:parseInt(T.target.value)||1})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"add-enabled",checked:j.enabled,onCheckedChange:T=>b({...j,enabled:T})}),i.jsx(J,{htmlFor:"add-enabled",children:"启用此镜像源"})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>p(!1),children:"取消"}),i.jsx(fe,{onClick:N,children:"添加"})]})]})}),i.jsx(nr,{open:g,onOpenChange:x,children:i.jsxs(Hn,{className:"max-w-lg",children:[i.jsxs(Wn,{children:[i.jsx(Vn,{children:"编辑镜像源"}),i.jsx(dr,{children:"修改镜像源配置"})]}),i.jsxs("div",{className:"space-y-4 py-4",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{children:"镜像源 ID"}),i.jsx(Ne,{value:j.id,disabled:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit-name",children:"名称 *"}),i.jsx(Ne,{id:"edit-name",value:j.name,onChange:T=>b({...j,name:T.target.value})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit-raw",children:"Raw 文件前缀 *"}),i.jsx(Ne,{id:"edit-raw",value:j.raw_prefix,onChange:T=>b({...j,raw_prefix:T.target.value})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit-clone",children:"克隆前缀 *"}),i.jsx(Ne,{id:"edit-clone",value:j.clone_prefix,onChange:T=>b({...j,clone_prefix:T.target.value})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(J,{htmlFor:"edit-priority",children:"优先级"}),i.jsx(Ne,{id:"edit-priority",type:"number",min:"1",value:j.priority,onChange:T=>b({...j,priority:parseInt(T.target.value)||1})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"数字越小优先级越高"})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(at,{id:"edit-enabled",checked:j.enabled,onCheckedChange:T=>b({...j,enabled:T})}),i.jsx(J,{htmlFor:"edit-enabled",children:"启用此镜像源"})]})]}),i.jsxs($r,{children:[i.jsx(fe,{variant:"outline",onClick:()=>x(!1),children:"取消"}),i.jsx(fe,{onClick:O,children:"保存"})]})]})})]})})}const OOe=zh("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"}}),VH=y.forwardRef(({className:e,size:t,abbrTitle:n,children:r,...a},o)=>i.jsx("kbd",{className:ue(OOe({size:t,className:e})),ref:o,...a,children:n?i.jsx("abbr",{title:n,children:r}):r}));VH.displayName="Kbd";const COe=[{icon:jg,title:"首页",description:"查看仪表板概览",path:"/",category:"概览"},{icon:VC,title:"麦麦主程序配置",description:"配置麦麦的核心设置",path:"/config/bot",category:"配置"},{icon:Zq,title:"麦麦模型提供商配置",description:"配置模型提供商",path:"/config/modelProvider",category:"配置"},{icon:Wq,title:"麦麦模型配置",description:"配置模型参数",path:"/config/model",category:"配置"},{icon:YC,title:"表情包管理",description:"管理麦麦的表情包",path:"/resource/emoji",category:"资源"},{icon:Ih,title:"表达方式管理",description:"管理麦麦的表达方式",path:"/resource/expression",category:"资源"},{icon:Vq,title:"人物信息管理",description:"管理人物信息",path:"/resource/person",category:"资源"},{icon:eve,title:"统计信息",description:"查看使用统计",path:"/statistics",category:"监控"},{icon:Kq,title:"插件市场",description:"浏览和安装插件",path:"/plugins",category:"扩展"},{icon:bg,title:"日志查看器",description:"查看系统日志",path:"/logs",category:"监控"},{icon:Hc,title:"系统设置",description:"配置系统参数",path:"/settings",category:"系统"}];function EOe({open:e,onOpenChange:t}){const[n,r]=y.useState(""),[a,o]=y.useState(0),l=oa(),u=COe.filter(m=>m.title.toLowerCase().includes(n.toLowerCase())||m.description.toLowerCase().includes(n.toLowerCase())||m.category.toLowerCase().includes(n.toLowerCase()));y.useEffect(()=>{e&&(r(""),o(0))},[e]);const d=y.useCallback(m=>{l({to:m}),t(!1)},[l,t]),f=y.useCallback(m=>{m.key==="ArrowDown"?(m.preventDefault(),o(p=>(p+1)%u.length)):m.key==="ArrowUp"?(m.preventDefault(),o(p=>(p-1+u.length)%u.length)):m.key==="Enter"&&u[a]&&(m.preventDefault(),d(u[a].path))},[u,a,d]);return i.jsx(nr,{open:e,onOpenChange:t,children:i.jsxs(Hn,{className:"max-w-2xl p-0 gap-0",children:[i.jsxs(Wn,{className:"px-4 pt-4 pb-0",children:[i.jsx(Vn,{className:"sr-only",children:"搜索"}),i.jsxs("div",{className:"relative",children:[i.jsx(Dr,{className:"absolute left-3 top-1/2 h-5 w-5 -translate-y-1/2 text-muted-foreground"}),i.jsx(Ne,{value:n,onChange:m=>{r(m.target.value),o(0)},onKeyDown:f,placeholder:"搜索页面...",className:"h-12 pl-11 text-base border-0 focus-visible:ring-0 shadow-none",autoFocus:!0})]})]}),i.jsx("div",{className:"border-t",children:i.jsx(Kt,{className:"h-[400px]",children:u.length>0?i.jsx("div",{className:"p-2",children:u.map((m,p)=>{const g=m.icon;return i.jsxs("button",{onClick:()=>d(m.path),onMouseEnter:()=>o(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:[i.jsx(g,{className:"h-5 w-5 flex-shrink-0"}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"font-medium text-sm",children:m.title}),i.jsx("div",{className:"text-xs text-muted-foreground truncate",children:m.description})]}),i.jsx("div",{className:"text-xs text-muted-foreground px-2 py-1 bg-muted rounded",children:m.category})]},m.path)})}):i.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[i.jsx(Dr,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),i.jsx("p",{className:"text-sm text-muted-foreground",children:n?"未找到匹配的页面":"输入关键词开始搜索"})]})})}),i.jsx("div",{className:"border-t px-4 py-3 flex items-center justify-between text-xs text-muted-foreground",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↑"}),i.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"↓"}),"导航"]}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Enter"}),"选择"]}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded border",children:"Esc"}),"关闭"]})]})})]})})}function AOe(e){const t=TOe(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,u=y.Children.toArray(o),d=u.find(MOe);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 i.jsx(t,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return i.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function TOe(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=ROe(a),u=POe(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Rr(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 kOe=Symbol("radix.slottable");function MOe(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kOe}function POe(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const d=o(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function ROe(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 fO=["Enter"," "],DOe=["ArrowDown","PageUp","Home"],GH=["ArrowUp","PageDown","End"],$Oe=[...DOe,...GH],IOe={ltr:[...fO,"ArrowRight"],rtl:[...fO,"ArrowLeft"]},LOe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Qh="Menu",[gh,BOe,zOe]=Nh(Qh),[kl,YH]=hr(Qh,[zOe,ls,Fg]),Jh=ls(),KH=Fg(),[XH,hs]=kl(Qh),[qOe,em]=kl(Qh),ZH=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:l=!0}=e,u=Jh(t),[d,f]=y.useState(null),m=y.useRef(!1),p=nn(o),g=Iu(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})}},[]),i.jsx(Hh,{...u,children:i.jsx(XH,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:i.jsx(qOe,{scope:t,onClose:y.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};ZH.displayName=Qh;var FOe="MenuAnchor",EE=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Jh(n);return i.jsx(Wh,{...a,...r,ref:t})});EE.displayName=FOe;var AE="MenuPortal",[UOe,QH]=kl(AE,{forceMount:void 0}),JH=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=hs(AE,t);return i.jsx(UOe,{scope:t,forceMount:n,children:i.jsx(Rn,{present:n||o.open,children:i.jsx(Nl,{asChild:!0,container:a,children:r})})})};JH.displayName=AE;var _a="MenuContent",[HOe,TE]=kl(_a),e9=y.forwardRef((e,t)=>{const n=QH(_a,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=hs(_a,e.__scopeMenu),l=em(_a,e.__scopeMenu);return i.jsx(gh.Provider,{scope:e.__scopeMenu,children:i.jsx(Rn,{present:r||o.open,children:i.jsx(gh.Slot,{scope:e.__scopeMenu,children:l.modal?i.jsx(WOe,{...a,ref:t}):i.jsx(VOe,{...a,ref:t})})})})}),WOe=y.forwardRef((e,t)=>{const n=hs(_a,e.__scopeMenu),r=y.useRef(null),a=qe(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Ry(o)},[]),i.jsx(kE,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Se(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),VOe=y.forwardRef((e,t)=>{const n=hs(_a,e.__scopeMenu);return i.jsx(kE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),GOe=AOe("MenuContent.ScrollLock"),kE=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:x,disableOutsideScroll:j,...b}=e,w=hs(_a,n),N=em(_a,n),O=Jh(n),C=KH(n),A=BOe(n),[E,k]=y.useState(null),T=y.useRef(null),M=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?Fh:y.Fragment,L=j?{as:GOe,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=iCe(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),[]),My();const F=y.useCallback(K=>V.current===U.current?.side&&sCe(K,U.current?.area),[]);return i.jsx(HOe,{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:i.jsx(G,{...L,children:i.jsx(qh,{asChild:!0,trapped:a,onMountAutoFocus:Se(o,K=>{K.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:i.jsx(_l,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:x,children:i.jsx(W5,{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:i.jsx(Uy,{role:"menu","aria-orientation":"vertical","data-state":g9(w.open),"data-radix-menu-content":"",dir:N.dir,...O,...b,ref:M,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||!$Oe.includes(K.key))return;K.preventDefault();const xe=A().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);GH.includes(K.key)&&xe.reverse(),rCe(xe)}),onBlur:Se(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout($.current),z.current="")}),onPointerMove:Se(e.onPointerMove,yh(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}}))})})})})})})});e9.displayName=_a;var YOe="MenuGroup",ME=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(Pe.div,{role:"group",...r,ref:t})});ME.displayName=YOe;var KOe="MenuLabel",t9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(Pe.div,{...r,ref:t})});t9.displayName=KOe;var Mg="MenuItem",$L="menu.itemSelect",Jy=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=y.useRef(null),l=em(Mg,e.__scopeMenu),u=TE(Mg,e.__scopeMenu),d=qe(t,o),f=y.useRef(!1),m=()=>{const p=o.current;if(!n&&p){const g=new CustomEvent($L,{bubbles:!0,cancelable:!0});p.addEventListener($L,x=>r?.(x),{once:!0}),RO(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return i.jsx(n9,{...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===" "||fO.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Jy.displayName=Mg;var n9=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,l=TE(Mg,n),u=KH(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())},[o.children]),i.jsx(gh.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:i.jsx(V5,{asChild:!0,...u,focusable:!r,children:i.jsx(Pe.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:Se(e.onPointerMove,yh(j=>{r?l.onItemLeave(j):(l.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Se(e.onPointerLeave,yh(j=>l.onItemLeave(j))),onFocus:Se(e.onFocus,()=>p(!0)),onBlur:Se(e.onBlur,()=>p(!1))})})})}),XOe="MenuCheckboxItem",r9=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return i.jsx(l9,{scope:e.__scopeMenu,checked:n,children:i.jsx(Jy,{role:"menuitemcheckbox","aria-checked":Pg(n)?"mixed":n,...a,ref:t,"data-state":DE(n),onSelect:Se(a.onSelect,()=>r?.(Pg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});r9.displayName=XOe;var a9="MenuRadioGroup",[ZOe,QOe]=kl(a9,{value:void 0,onValueChange:()=>{}}),i9=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=nn(r);return i.jsx(ZOe,{scope:e.__scopeMenu,value:n,onValueChange:o,children:i.jsx(ME,{...a,ref:t})})});i9.displayName=a9;var o9="MenuRadioItem",s9=y.forwardRef((e,t)=>{const{value:n,...r}=e,a=QOe(o9,e.__scopeMenu),o=n===a.value;return i.jsx(l9,{scope:e.__scopeMenu,checked:o,children:i.jsx(Jy,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":DE(o),onSelect:Se(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});s9.displayName=o9;var PE="MenuItemIndicator",[l9,JOe]=kl(PE,{checked:!1}),c9=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=JOe(PE,n);return i.jsx(Rn,{present:r||Pg(o.checked)||o.checked===!0,children:i.jsx(Pe.span,{...a,ref:t,"data-state":DE(o.checked)})})});c9.displayName=PE;var eCe="MenuSeparator",u9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(Pe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});u9.displayName=eCe;var tCe="MenuArrow",d9=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Jh(n);return i.jsx(Hy,{...a,...r,ref:t})});d9.displayName=tCe;var RE="MenuSub",[nCe,f9]=kl(RE),h9=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,o=hs(RE,t),l=Jh(t),[u,d]=y.useState(null),[f,m]=y.useState(null),p=nn(a);return y.useEffect(()=>(o.open===!1&&p(!1),()=>p(!1)),[o.open,p]),i.jsx(Hh,{...l,children:i.jsx(XH,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:i.jsx(nCe,{scope:t,contentId:Fn(),triggerId:Fn(),trigger:u,onTriggerChange:d,children:n})})})};h9.displayName=RE;var mf="MenuSubTrigger",m9=y.forwardRef((e,t)=>{const n=hs(mf,e.__scopeMenu),r=em(mf,e.__scopeMenu),a=f9(mf,e.__scopeMenu),o=TE(mf,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=o,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]),i.jsx(EE,{asChild:!0,...f,children:i.jsx(n9,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":g9(n.open),...e,ref:Rr(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Se(e.onPointerMove,yh(p=>{o.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Se(e.onPointerLeave,yh(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"];o.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(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p),p.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Se(e.onKeyDown,p=>{const g=o.searchRef.current!=="";e.disabled||g&&p.key===" "||IOe[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});m9.displayName=mf;var p9="MenuSubContent",v9=y.forwardRef((e,t)=>{const n=QH(_a,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=hs(_a,e.__scopeMenu),l=em(_a,e.__scopeMenu),u=f9(p9,e.__scopeMenu),d=y.useRef(null),f=qe(t,d);return i.jsx(gh.Provider,{scope:e.__scopeMenu,children:i.jsx(Rn,{present:r||o.open,children:i.jsx(gh.Slot,{scope:e.__scopeMenu,children:i.jsx(kE,{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&&o.onOpenChange(!1)}),onEscapeKeyDown:Se(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:Se(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=LOe[l.dir].includes(m.key);p&&g&&(o.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});v9.displayName=p9;function g9(e){return e?"open":"closed"}function Pg(e){return e==="indeterminate"}function DE(e){return Pg(e)?"indeterminate":e?"checked":"unchecked"}function rCe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function aCe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function iCe(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=aCe(e,Math.max(o,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 oCe(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],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 sCe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return oCe(n,t)}function yh(e){return t=>t.pointerType==="mouse"?e(t):void 0}var lCe=ZH,cCe=EE,uCe=JH,dCe=e9,fCe=ME,hCe=t9,mCe=Jy,pCe=r9,vCe=i9,gCe=s9,yCe=c9,xCe=u9,bCe=d9,wCe=h9,jCe=m9,SCe=v9,$E="ContextMenu",[_Ce]=hr($E,[YH]),pr=YH(),[NCe,y9]=_Ce($E),x9=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:a,modal:o=!0}=e,[l,u]=y.useState(!1),d=pr(t),f=nn(r),m=y.useCallback(p=>{u(p),f(p)},[f]);return i.jsx(NCe,{scope:t,open:l,onOpenChange:m,modal:o,children:i.jsx(lCe,{...d,dir:a,open:l,onOpenChange:m,modal:o,children:n})})};x9.displayName=$E;var b9="ContextMenuTrigger",w9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...a}=e,o=y9(b9,n),l=pr(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},o.onOpenChange(!0)};return y.useEffect(()=>m,[m]),y.useEffect(()=>void(r&&m()),[r,m]),i.jsxs(i.Fragment,{children:[i.jsx(cCe,{...l,virtualRef:d}),i.jsx(Pe.span,{"data-state":o.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,Kp(g=>{m(),f.current=window.setTimeout(()=>p(g),700)})),onPointerMove:r?e.onPointerMove:Se(e.onPointerMove,Kp(m)),onPointerCancel:r?e.onPointerCancel:Se(e.onPointerCancel,Kp(m)),onPointerUp:r?e.onPointerUp:Se(e.onPointerUp,Kp(m))})]})});w9.displayName=b9;var OCe="ContextMenuPortal",j9=e=>{const{__scopeContextMenu:t,...n}=e,r=pr(t);return i.jsx(uCe,{...r,...n})};j9.displayName=OCe;var S9="ContextMenuContent",_9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=y9(S9,n),o=pr(n),l=y.useRef(!1);return i.jsx(dCe,{...o,...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)"}})});_9.displayName=S9;var CCe="ContextMenuGroup",ECe=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(fCe,{...a,...r,ref:t})});ECe.displayName=CCe;var ACe="ContextMenuLabel",N9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(hCe,{...a,...r,ref:t})});N9.displayName=ACe;var TCe="ContextMenuItem",O9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(mCe,{...a,...r,ref:t})});O9.displayName=TCe;var kCe="ContextMenuCheckboxItem",C9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(pCe,{...a,...r,ref:t})});C9.displayName=kCe;var MCe="ContextMenuRadioGroup",PCe=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(vCe,{...a,...r,ref:t})});PCe.displayName=MCe;var RCe="ContextMenuRadioItem",E9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(gCe,{...a,...r,ref:t})});E9.displayName=RCe;var DCe="ContextMenuItemIndicator",A9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(yCe,{...a,...r,ref:t})});A9.displayName=DCe;var $Ce="ContextMenuSeparator",T9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(xCe,{...a,...r,ref:t})});T9.displayName=$Ce;var ICe="ContextMenuArrow",LCe=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(bCe,{...a,...r,ref:t})});LCe.displayName=ICe;var k9="ContextMenuSub",M9=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:a,defaultOpen:o}=e,l=pr(t),[u,d]=Na({prop:a,defaultProp:o??!1,onChange:r,caller:k9});return i.jsx(wCe,{...l,open:u,onOpenChange:d,children:n})};M9.displayName=k9;var BCe="ContextMenuSubTrigger",P9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(jCe,{...a,...r,ref:t})});P9.displayName=BCe;var zCe="ContextMenuSubContent",R9=y.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,a=pr(n);return i.jsx(SCe,{...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)"}})});R9.displayName=zCe;function Kp(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var qCe=x9,FCe=w9,UCe=j9,D9=_9,$9=N9,I9=O9,L9=C9,B9=E9,z9=A9,q9=T9,HCe=M9,F9=P9,U9=R9;const WCe=qCe,VCe=FCe,GCe=HCe,H9=y.forwardRef(({className:e,inset:t,children:n,...r},a)=>i.jsxs(F9,{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,i.jsx(WC,{className:"ml-auto h-4 w-4"})]}));H9.displayName=F9.displayName;const W9=y.forwardRef(({className:e,...t},n)=>i.jsx(U9,{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}));W9.displayName=U9.displayName;const V9=y.forwardRef(({className:e,...t},n)=>i.jsx(UCe,{children:i.jsx(D9,{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})}));V9.displayName=D9.displayName;const Da=y.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(I9,{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}));Da.displayName=I9.displayName;const YCe=y.forwardRef(({className:e,children:t,checked:n,...r},a)=>i.jsxs(L9,{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:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(z9,{children:i.jsx(nl,{className:"h-4 w-4"})})}),t]}));YCe.displayName=L9.displayName;const KCe=y.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(B9,{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:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(z9,{children:i.jsx(pve,{className:"h-2 w-2 fill-current"})})}),t]}));KCe.displayName=B9.displayName;const XCe=y.forwardRef(({className:e,inset:t,...n},r)=>i.jsx($9,{ref:r,className:ue("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));XCe.displayName=$9.displayName;const pf=y.forwardRef(({className:e,...t},n)=>i.jsx(q9,{ref:n,className:ue("-mx-1 my-1 h-px bg-border",e),...t}));pf.displayName=q9.displayName;const Dc=({className:e,...t})=>i.jsx("span",{className:ue("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Dc.displayName="ContextMenuShortcut";var ZCe=Symbol("radix.slottable");function QCe(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ZCe,t}var[ex]=hr("Tooltip",[ls]),tx=ls(),G9="TooltipProvider",JCe=700,hO="tooltip.open",[eEe,IE]=ex(G9),Y9=e=>{const{__scopeTooltip:t,delayDuration:n=JCe,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,l=y.useRef(!0),u=y.useRef(!1),d=y.useRef(0);return y.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),i.jsx(eEe,{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:o})};Y9.displayName=G9;var xh="Tooltip",[tEe,tm]=ex(xh),K9=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,d=IE(xh,e.__scopeTooltip),f=tx(t),[m,p]=y.useState(null),g=Fn(),x=y.useRef(0),j=l??d.disableHoverableContent,b=u??d.delayDuration,w=y.useRef(!1),[N,O]=Na({prop:r,defaultProp:a??!1,onChange:T=>{T?(d.onOpen(),document.dispatchEvent(new CustomEvent(hO))):d.onClose(),o?.(T)},caller:xh}),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)},[]),i.jsx(Hh,{...f,children:i.jsx(tEe,{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})})};K9.displayName=xh;var mO="TooltipTrigger",X9=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=tm(mO,n),o=IE(mO,n),l=tx(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]),i.jsx(Wh,{asChild:!0,...l,children:i.jsx(Pe.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&&!o.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)})})});X9.displayName=mO;var LE="TooltipPortal",[nEe,rEe]=ex(LE,{forceMount:void 0}),Z9=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,o=tm(LE,t);return i.jsx(nEe,{scope:t,forceMount:n,children:i.jsx(Rn,{present:n||o.open,children:i.jsx(Nl,{asChild:!0,container:a,children:r})})})};Z9.displayName=LE;var Mu="TooltipContent",Q9=y.forwardRef((e,t)=>{const n=rEe(Mu,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,l=tm(Mu,e.__scopeTooltip);return i.jsx(Rn,{present:r||l.open,children:l.disableHoverableContent?i.jsx(J9,{side:a,...o,ref:t}):i.jsx(aEe,{side:a,...o,ref:t})})}),aEe=y.forwardRef((e,t)=>{const n=tm(Mu,e.__scopeTooltip),r=IE(Mu,e.__scopeTooltip),a=y.useRef(null),o=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=cEe(N,w.getBoundingClientRect()),C=uEe(N,O),A=dEe(b.getBoundingClientRect()),E=hEe([...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=!fEe(N,l);O?g():C&&(g(),f())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[d,m,l,f,g]),i.jsx(J9,{...e,ref:o})}),[iEe,oEe]=ex(xh,{isInside:!1}),sEe=QCe("TooltipContent"),J9=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,d=tm(Mu,n),f=tx(n),{onClose:m}=d;return y.useEffect(()=>(document.addEventListener(hO,m),()=>document.removeEventListener(hO,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]),i.jsx(_l,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:m,children:i.jsxs(Uy,{"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:[i.jsx(sEe,{children:r}),i.jsx(iEe,{scope:n,isInside:!0,children:i.jsx(dwe,{id:d.contentId,role:"tooltip",children:a||r})})]})})});Q9.displayName=Mu;var eW="TooltipArrow",lEe=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=tx(n);return oEe(eW,n).isInside?null:i.jsx(Hy,{...a,...r,ref:t})});lEe.displayName=eW;function cEe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function uEe(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 dEe(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 fEe(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],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 hEe(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),mEe(t)}function mEe(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 o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.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 o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.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 pEe=Y9,vEe=K9,gEe=X9,yEe=Z9,tW=Q9;const xEe=pEe,bEe=vEe,wEe=gEe,nW=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(yEe,{children:i.jsx(tW,{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})}));nW.displayName=tW.displayName;function jEe({children:e}){Wxe();const[t,n]=y.useState(!0),[r,a]=y.useState(!1),[o,l]=y.useState(!1),{theme:u,setTheme:d}=XC(),f=DY(),m=oa();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:jg,label:"首页",path:"/"}]},{title:"麦麦配置编辑",items:[{icon:VC,label:"麦麦主程序配置",path:"/config/bot"},{icon:Zq,label:"麦麦模型提供商配置",path:"/config/modelProvider"},{icon:Wq,label:"麦麦模型配置",path:"/config/model"}]},{title:"麦麦资源管理",items:[{icon:YC,label:"表情包管理",path:"/resource/emoji"},{icon:Ih,label:"表达方式管理",path:"/resource/expression"},{icon:Vq,label:"人物信息管理",path:"/resource/person"}]},{title:"扩展与监控",items:[{icon:Kq,label:"插件市场",path:"/plugins"},{icon:bg,label:"日志查看器",path:"/logs"}]},{title:"系统",items:[{icon:Hc,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 i.jsx(xEe,{delayDuration:300,children:i.jsxs("div",{className:"flex h-screen overflow-hidden",children:[i.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:[i.jsx("div",{className:"flex h-16 items-center border-b px-4",children:i.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:[i.jsxs("div",{className:ue("flex items-baseline gap-2",!t&&"lg:hidden"),children:[i.jsx("span",{className:"font-bold text-xl text-primary-gradient whitespace-nowrap",children:"MaiBot WebUI"}),i.jsx("span",{className:"text-xs text-primary/60 whitespace-nowrap",children:rye()})]}),!t&&i.jsx("span",{className:"hidden lg:block font-bold text-primary-gradient text-2xl",children:"M"})]})}),i.jsx("nav",{className:"flex-1 overflow-y-auto p-4",children:i.jsx("ul",{className:ue("space-y-6",!t&&"lg:space-y-3"),children:p.map((b,w)=>i.jsxs("li",{children:[i.jsx("div",{className:ue("px-3 h-[1.25rem]","mb-2",!t&&"lg:mb-1 lg:invisible"),children:i.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground/60 whitespace-nowrap",children:b.title})}),!t&&w>0&&i.jsx("div",{className:"hidden lg:block mb-2 border-t border-border"}),i.jsx("ul",{className:"space-y-1",children:b.items.map(N=>{const O=f({to:N.path}),C=N.icon,A=i.jsxs(i.Fragment,{children:[O&&i.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"}),i.jsxs("div",{className:ue("flex items-center transition-all duration-300",t?"gap-3":"lg:gap-0"),children:[i.jsx(C,{className:ue("h-5 w-5 flex-shrink-0",O&&"text-primary"),strokeWidth:2,fill:"none"}),i.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 i.jsx("li",{className:"relative",children:i.jsxs(bEe,{children:[i.jsx(wEe,{asChild:!0,children:i.jsx(CO,{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&&i.jsx(nW,{side:"right",className:"hidden lg:block",children:i.jsx("p",{children:N.label})})]})},N.path)})})]},b.title))})})]}),r&&i.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 lg:hidden",onClick:()=>a(!1)}),i.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[i.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:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("button",{onClick:()=>a(!r),className:"rounded-lg p-2 hover:bg-accent lg:hidden",children:i.jsx(zve,{className:"h-5 w-5"})}),i.jsx("button",{onClick:()=>n(!t),className:"hidden rounded-lg p-2 hover:bg-accent lg:block",title:t?"收起侧边栏":"展开侧边栏",children:i.jsx(HC,{className:ue("h-5 w-5 transition-transform",!t&&"rotate-180")})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.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:[i.jsx(Dr,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),i.jsx("span",{className:"text-sm text-muted-foreground",children:"搜索..."}),i.jsxs(VH,{size:"sm",className:"absolute right-2 top-1/2 -translate-y-1/2",children:[i.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),i.jsx(EOe,{open:o,onOpenChange:l}),i.jsxs(fe,{variant:"ghost",size:"sm",onClick:()=>window.open("https://docs.mai-mai.org","_blank"),className:"gap-2",title:"查看麦麦文档",children:[i.jsx(Ype,{className:"h-4 w-4"}),i.jsx("span",{className:"hidden sm:inline",children:"麦麦文档"})]}),i.jsx("button",{onClick:b=>{Bge(x==="dark"?"light":"dark",d,b)},className:"rounded-lg p-2 hover:bg-accent",title:x==="dark"?"切换到浅色模式":"切换到深色模式",children:x==="dark"?i.jsx(YN,{className:"h-5 w-5"}):i.jsx(GN,{className:"h-5 w-5"})}),i.jsx("div",{className:"h-6 w-px bg-border"}),i.jsxs(fe,{variant:"ghost",size:"sm",onClick:j,className:"gap-2",title:"登出系统",children:[i.jsx(z3,{className:"h-4 w-4"}),i.jsx("span",{className:"hidden sm:inline",children:"登出"})]})]})]}),i.jsxs(WCe,{children:[i.jsx(VCe,{asChild:!0,children:i.jsx("main",{className:"flex-1 overflow-hidden bg-background",children:e})}),i.jsxs(V9,{className:"w-64",children:[i.jsxs(Da,{onClick:()=>m({to:"/"}),children:[i.jsx(jg,{className:"mr-2 h-4 w-4"}),"首页"]}),i.jsxs(Da,{onClick:()=>m({to:"/settings"}),children:[i.jsx(Hc,{className:"mr-2 h-4 w-4"}),"系统设置"]}),i.jsxs(Da,{onClick:()=>m({to:"/logs"}),children:[i.jsx(bg,{className:"mr-2 h-4 w-4"}),"日志查看器"]}),i.jsx(pf,{}),i.jsxs(GCe,{children:[i.jsxs(H9,{children:[i.jsx(Xq,{className:"mr-2 h-4 w-4"}),"切换主题"]}),i.jsxs(W9,{className:"w-48",children:[i.jsxs(Da,{onClick:()=>d("light"),disabled:u==="light",children:[i.jsx(YN,{className:"mr-2 h-4 w-4"}),"浅色",u==="light"&&i.jsx(Dc,{children:"✓"})]}),i.jsxs(Da,{onClick:()=>d("dark"),disabled:u==="dark",children:[i.jsx(GN,{className:"mr-2 h-4 w-4"}),"深色",u==="dark"&&i.jsx(Dc,{children:"✓"})]}),i.jsxs(Da,{onClick:()=>d("system"),disabled:u==="system",children:[i.jsx(Hc,{className:"mr-2 h-4 w-4"}),"跟随系统",u==="system"&&i.jsx(Dc,{children:"✓"})]})]})]}),i.jsx(pf,{}),i.jsxs(Da,{onClick:()=>window.location.reload(),children:[i.jsx(tge,{className:"mr-2 h-4 w-4"}),"刷新页面",i.jsx(Dc,{children:"⌘R"})]}),i.jsxs(Da,{onClick:()=>l(!0),children:[i.jsx(Dr,{className:"mr-2 h-4 w-4"}),"搜索",i.jsx(Dc,{children:"⌘K"})]}),i.jsx(pf,{}),i.jsxs(Da,{onClick:()=>window.open("https://docs.mai-mai.org","_blank"),children:[i.jsx(rv,{className:"mr-2 h-4 w-4"}),"麦麦文档"]}),i.jsx(pf,{}),i.jsxs(Da,{onClick:j,className:"text-destructive focus:text-destructive",children:[i.jsx(z3,{className:"mr-2 h-4 w-4"}),"登出系统"]})]})]})]})]})})}const nm=OY({component:()=>i.jsxs(i.Fragment,{children:[i.jsx(EO,{}),!1]}),beforeLoad:()=>{if(window.location.pathname==="/"&&!c8())throw FL({to:"/auth"})}}),SEe=fr({getParentRoute:()=>nm,path:"/auth",component:Vxe}),_Ee=fr({getParentRoute:()=>nm,path:"/setup",component:wbe}),Aa=fr({getParentRoute:()=>nm,id:"protected",component:()=>i.jsx(jEe,{children:i.jsx(EO,{})})}),NEe=fr({getParentRoute:()=>Aa,path:"/",component:Ige}),OEe=fr({getParentRoute:()=>Aa,path:"/config/bot",component:uje}),CEe=fr({getParentRoute:()=>Aa,path:"/config/modelProvider",component:Tje}),EEe=fr({getParentRoute:()=>Aa,path:"/config/model",component:a1e}),AEe=fr({getParentRoute:()=>Aa,path:"/resource/emoji",component:f1e}),TEe=fr({getParentRoute:()=>Aa,path:"/resource/expression",component:w1e}),kEe=fr({getParentRoute:()=>Aa,path:"/resource/person",component:T1e}),MEe=fr({getParentRoute:()=>Aa,path:"/logs",component:dOe}),PEe=fr({getParentRoute:()=>Aa,path:"/plugins",component:_Oe}),REe=fr({getParentRoute:()=>Aa,path:"/plugin-mirrors",component:NOe}),DEe=fr({getParentRoute:()=>Aa,path:"/settings",component:Lxe}),$Ee=fr({getParentRoute:()=>nm,path:"*",component:y8}),IEe=nm.addChildren([SEe,_Ee,Aa.addChildren([NEe,OEe,CEe,EEe,AEe,TEe,kEe,PEe,REe,MEe,DEe]),$Ee]),LEe=$Y({routeTree:IEe,defaultNotFoundComponent:y8});function BEe({children:e,defaultTheme:t="system",storageKey:n="ui-theme",...r}){const[a,o]=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),o(u)}};return i.jsx(eF.Provider,{...r,value:l,children:e})}function zEe({children:e,defaultEnabled:t=!0,defaultWavesEnabled:n=!0,storageKey:r="enable-animations",wavesStorageKey:a="enable-waves-background"}){const[o,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;o?m.classList.remove("no-animations"):m.classList.add("no-animations"),localStorage.setItem(r,String(o))},[o,r]),y.useEffect(()=>{localStorage.setItem(a,String(u))},[u,a]);const f={enableAnimations:o,setEnableAnimations:l,enableWavesBackground:u,setEnableWavesBackground:d};return i.jsx(tF.Provider,{value:f,children:e})}var BE="ToastProvider",[zE,qEe,FEe]=Nh("Toast"),[rW]=hr("Toast",[FEe]),[UEe,nx]=rW(BE),aW=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=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 \`${BE}\`. Expected non-empty \`string\`.`),i.jsx(zE.Provider,{scope:t,children:i.jsx(UEe,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,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})})};aW.displayName=BE;var iW="ToastViewport",HEe=["F8"],pO="toast.viewportPause",vO="toast.viewportResume",oW=y.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=HEe,label:a="Notifications ({hotkey})",...o}=e,l=nx(iW,n),u=qEe(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(pO);N.dispatchEvent(k),l.isClosePausedRef.current=!0}},C=()=>{if(l.isClosePausedRef.current){const k=new CustomEvent(vO);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,...rAe(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);s_($.slice(z+1))?O.preventDefault():k?f.current?.focus():m.current?.focus()}};return w.addEventListener("keydown",N),()=>w.removeEventListener("keydown",N)}},[u,b]),i.jsxs(fye,{ref:d,role:"region","aria-label":a.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&i.jsx(gO,{ref:f,onFocusFromOutsideViewport:()=>{const w=b({tabbingDirection:"forwards"});s_(w)}}),i.jsx(zE.Slot,{scope:n,children:i.jsx(Pe.ol,{tabIndex:-1,...o,ref:g})}),j&&i.jsx(gO,{ref:m,onFocusFromOutsideViewport:()=>{const w=b({tabbingDirection:"backwards"});s_(w)}})]})});oW.displayName=iW;var sW="ToastFocusProxy",gO=y.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=nx(sW,n);return i.jsx(Wy,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:l=>{const u=l.relatedTarget;!o.viewport?.contains(u)&&r()}})});gO.displayName=sW;var rm="Toast",WEe="toast.swipeStart",VEe="toast.swipeMove",GEe="toast.swipeCancel",YEe="toast.swipeEnd",lW=y.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...l}=e,[u,d]=Na({prop:r,defaultProp:a??!0,onChange:o,caller:rm});return i.jsx(Rn,{present:n||u,children:i.jsx(ZEe,{open:u,...l,ref:t,onClose:()=>d(!1),onPause:nn(e.onPause),onResume:nn(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)})})})});lW.displayName=rm;var[KEe,XEe]=rW(rm,{onClose(){}}),ZEe=y.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:l,onEscapeKeyDown:u,onPause:d,onResume:f,onSwipeStart:m,onSwipeMove:p,onSwipeCancel:g,onSwipeEnd:x,...j}=e,b=nx(rm,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),M=y.useRef(0),{onToastAdd:$,onToastRemove:z}=b,D=nn(()=>{w?.contains(document.activeElement)&&b.viewport?.focus(),l()}),U=y.useCallback(H=>{!H||H===1/0||(window.clearTimeout(M.current),k.current=new Date().getTime(),M.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(M.current),d?.()};return H.addEventListener(pO,L),H.addEventListener(vO,G),()=>{H.removeEventListener(pO,L),H.removeEventListener(vO,G)}}},[b.viewport,E,d,f,U]),y.useEffect(()=>{o&&!b.isClosePausedRef.current&&U(E)},[o,E,b.isClosePausedRef,U]),y.useEffect(()=>($(),()=>z()),[$,z]);const V=y.useMemo(()=>w?pW(w):null,[w]);return b.viewport?i.jsxs(i.Fragment,{children:[V&&i.jsx(QEe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:V}),i.jsx(KEe,{scope:n,onClose:D,children:yl.createPortal(i.jsx(zE.ItemSlot,{scope:n,children:i.jsx(dye,{asChild:!0,onEscapeKeyDown:Se(u,()=>{b.isFocusedToastEscapeKeyDownRef.current||D(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(Pe.li,{tabIndex:0,"data-state":o?"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,Xp(VEe,p,ne,{discrete:!1})):IL(Y,b.swipeDirection,B)?(A.current=Y,Xp(WEe,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};IL(G,b.swipeDirection,b.swipeThreshold)?Xp(YEe,x,F,{discrete:!0}):Xp(GEe,g,F,{discrete:!0}),R.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),QEe=e=>{const{__scopeToast:t,children:n,...r}=e,a=nx(rm,t),[o,l]=y.useState(!1),[u,d]=y.useState(!1);return tAe(()=>l(!0)),y.useEffect(()=>{const f=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(f)},[]),u?null:i.jsx(Nl,{asChild:!0,children:i.jsx(Wy,{...r,children:o&&i.jsxs(i.Fragment,{children:[a.label," ",n]})})})},JEe="ToastTitle",cW=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(Pe.div,{...r,ref:t})});cW.displayName=JEe;var eAe="ToastDescription",uW=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(Pe.div,{...r,ref:t})});uW.displayName=eAe;var dW="ToastAction",fW=y.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?i.jsx(mW,{altText:n,asChild:!0,children:i.jsx(qE,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${dW}\`. Expected non-empty \`string\`.`),null)});fW.displayName=dW;var hW="ToastClose",qE=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=XEe(hW,n);return i.jsx(mW,{asChild:!0,children:i.jsx(Pe.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,a.onClose)})})});qE.displayName=hW;var mW=y.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return i.jsx(Pe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function pW(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),nAe(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...pW(r))}}),t}function Xp(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?RO(a,o):a.dispatchEvent(o)}var IL=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function tAe(e=()=>{}){const t=nn(e);Un(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function nAe(e){return e.nodeType===e.ELEMENT_NODE}function rAe(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 s_(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var aAe=aW,vW=oW,gW=lW,yW=cW,xW=uW,bW=fW,wW=qE;const iAe=aAe,jW=y.forwardRef(({className:e,...t},n)=>i.jsx(vW,{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}));jW.displayName=vW.displayName;const oAe=zh("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"}}),SW=y.forwardRef(({className:e,variant:t,...n},r)=>i.jsx(gW,{ref:r,className:ue(oAe({variant:t}),e),...n}));SW.displayName=gW.displayName;const sAe=y.forwardRef(({className:e,...t},n)=>i.jsx(bW,{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}));sAe.displayName=bW.displayName;const _W=y.forwardRef(({className:e,...t},n)=>i.jsx(wW,{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:i.jsx(Lh,{className:"h-4 w-4"})}));_W.displayName=wW.displayName;const NW=y.forwardRef(({className:e,...t},n)=>i.jsx(yW,{ref:n,className:ue("text-sm font-semibold [&+div]:text-xs",e),...t}));NW.displayName=yW.displayName;const OW=y.forwardRef(({className:e,...t},n)=>i.jsx(xW,{ref:n,className:ue("text-sm opacity-90",e),...t}));OW.displayName=xW.displayName;function lAe(){const{toasts:e}=mr();return i.jsxs(iAe,{children:[e.map(function({id:t,title:n,description:r,action:a,...o}){return i.jsxs(SW,{...o,children:[i.jsxs("div",{className:"grid gap-1",children:[n&&i.jsx(NW,{children:n}),r&&i.jsx(OW,{children:r})]}),a,i.jsx(_W,{})]},t)}),i.jsx(jW,{})]})}YV.createRoot(document.getElementById("root")).render(i.jsx(y.StrictMode,{children:i.jsx(BEe,{defaultTheme:"system",children:i.jsxs(zEe,{children:[i.jsx(BY,{router:LEe}),i.jsx(lAe,{})]})})}));
|