Files
mission-control-v2/frontend/dist/assets/index-DGxLseeM.js
T
Hitonabi 694aff9801 Feat: Agent-Hirn bleibt warm (Re-Warm-Waechter) + Updates-Karte konsolidiert
Punkt 1 - Hirn warm: brains-Gruppe wird bei on-demand-Last ausserhalb der Gruppe
verdraengt; persist verhindert nur Idle-Unload, nicht Gruppen-Swap -> Hirn blieb bis zum
naechsten llama-swap-Neustart kalt. Neu: services/warmer.py als Hintergrund-Task (FastAPI
lifespan) prueft periodisch llama-swap /running; ist die Box idle, pingt es das Hirn
(Rolle hermes) vor. Waehrend aktiver Last (irgendwas geladen) haelt es sich raus.
Justierbar via MC_REWARM_* (ENABLED/INTERVAL/MODEL). Kein sudo, im Repo, deployt normal.

Punkt 2 - Updates-Doppelung: Aktionen gab es auf der Karte UND im Pflege-Drawer.
UpdatesCard zeigt jetzt nur noch die Status-Ampel + 'Updates verwalten & Pflege'-Button
(oeffnet den Drawer). Alle Aktionen (OS/Engine/Reboot/Modell-Upgrade) leben im Drawer mit
Job-Fortschritt -> keine Dublette, kuerzere Karte, Sudo-Modal raus.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 17:12:49 +02:00

469 lines
818 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var G5=Object.defineProperty;var k1=e=>{throw TypeError(e)};var V5=(e,t,r)=>t in e?G5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gd=(e,t,r)=>V5(e,typeof t!="symbol"?t+"":t,r),Mm=(e,t,r)=>t.has(e)||k1("Cannot "+r);var L=(e,t,r)=>(Mm(e,t,"read from private field"),r?r.call(e):t.get(e)),Te=(e,t,r)=>t.has(e)?k1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(Mm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Fe=(e,t,r)=>(Mm(e,t,"access private method"),r);var yd=(e,t,r,n)=>({set _(a){ye(e,t,a,r)},get _(){return L(e,t,n)}});function q5(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[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"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(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 n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function Yg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Im={exports:{}},Wl={},Tm={exports:{}},Le={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var j1;function Q5(){if(j1)return Le;j1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.iterator;function x($){return $===null||typeof $!="object"?null:($=v&&$[v]||$["@@iterator"],typeof $=="function"?$:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,j={};function S($,T,ee){this.props=$,this.context=T,this.refs=j,this.updater=ee||b}S.prototype.isReactComponent={},S.prototype.setState=function($,T){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,T,"setState")},S.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function N(){}N.prototype=S.prototype;function P($,T,ee){this.props=$,this.context=T,this.refs=j,this.updater=ee||b}var O=P.prototype=new N;O.constructor=P,k(O,S.prototype),O.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,C={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function U($,T,ee){var ne,te={},ue=null,pe=null;if(T!=null)for(ne in T.ref!==void 0&&(pe=T.ref),T.key!==void 0&&(ue=""+T.key),T)_.call(T,ne)&&!I.hasOwnProperty(ne)&&(te[ne]=T[ne]);var Ce=arguments.length-2;if(Ce===1)te.children=ee;else if(1<Ce){for(var J=Array(Ce),je=0;je<Ce;je++)J[je]=arguments[je+2];te.children=J}if($&&$.defaultProps)for(ne in Ce=$.defaultProps,Ce)te[ne]===void 0&&(te[ne]=Ce[ne]);return{$$typeof:e,type:$,key:ue,ref:pe,props:te,_owner:C.current}}function B($,T){return{$$typeof:e,type:$.type,key:T,ref:$.ref,props:$.props,_owner:$._owner}}function G($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function q($){var T={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(ee){return T[ee]})}var R=/\/+/g;function de($,T){return typeof $=="object"&&$!==null&&$.key!=null?q(""+$.key):T.toString(36)}function Z($,T,ee,ne,te){var ue=typeof $;(ue==="undefined"||ue==="boolean")&&($=null);var pe=!1;if($===null)pe=!0;else switch(ue){case"string":case"number":pe=!0;break;case"object":switch($.$$typeof){case e:case t:pe=!0}}if(pe)return pe=$,te=te(pe),$=ne===""?"."+de(pe,0):ne,A(te)?(ee="",$!=null&&(ee=$.replace(R,"$&/")+"/"),Z(te,T,ee,"",function(je){return je})):te!=null&&(G(te)&&(te=B(te,ee+(!te.key||pe&&pe.key===te.key?"":(""+te.key).replace(R,"$&/")+"/")+$)),T.push(te)),1;if(pe=0,ne=ne===""?".":ne+":",A($))for(var Ce=0;Ce<$.length;Ce++){ue=$[Ce];var J=ne+de(ue,Ce);pe+=Z(ue,T,ee,J,te)}else if(J=x($),typeof J=="function")for($=J.call($),Ce=0;!(ue=$.next()).done;)ue=ue.value,J=ne+de(ue,Ce++),pe+=Z(ue,T,ee,J,te);else if(ue==="object")throw T=String($),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return pe}function ge($,T,ee){if($==null)return $;var ne=[],te=0;return Z($,ne,"","",function(ue){return T.call(ee,ue,te++)}),ne}function ke($){if($._status===-1){var T=$._result;T=T(),T.then(function(ee){($._status===0||$._status===-1)&&($._status=1,$._result=ee)},function(ee){($._status===0||$._status===-1)&&($._status=2,$._result=ee)}),$._status===-1&&($._status=0,$._result=T)}if($._status===1)return $._result.default;throw $._result}var me={current:null},Q={transition:null},oe={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:Q,ReactCurrentOwner:C};function X(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:ge,forEach:function($,T,ee){ge($,function(){T.apply(this,arguments)},ee)},count:function($){var T=0;return ge($,function(){T++}),T},toArray:function($){return ge($,function(T){return T})||[]},only:function($){if(!G($))throw Error("React.Children.only expected to receive a single React element child.");return $}},Le.Component=S,Le.Fragment=r,Le.Profiler=a,Le.PureComponent=P,Le.StrictMode=n,Le.Suspense=f,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Le.act=X,Le.cloneElement=function($,T,ee){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var ne=k({},$.props),te=$.key,ue=$.ref,pe=$._owner;if(T!=null){if(T.ref!==void 0&&(ue=T.ref,pe=C.current),T.key!==void 0&&(te=""+T.key),$.type&&$.type.defaultProps)var Ce=$.type.defaultProps;for(J in T)_.call(T,J)&&!I.hasOwnProperty(J)&&(ne[J]=T[J]===void 0&&Ce!==void 0?Ce[J]:T[J])}var J=arguments.length-2;if(J===1)ne.children=ee;else if(1<J){Ce=Array(J);for(var je=0;je<J;je++)Ce[je]=arguments[je+2];ne.children=Ce}return{$$typeof:e,type:$.type,key:te,ref:ue,props:ne,_owner:pe}},Le.createContext=function($){return $={$$typeof:u,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:o,_context:$},$.Consumer=$},Le.createElement=U,Le.createFactory=function($){var T=U.bind(null,$);return T.type=$,T},Le.createRef=function(){return{current:null}},Le.forwardRef=function($){return{$$typeof:l,render:$}},Le.isValidElement=G,Le.lazy=function($){return{$$typeof:p,_payload:{_status:-1,_result:$},_init:ke}},Le.memo=function($,T){return{$$typeof:h,type:$,compare:T===void 0?null:T}},Le.startTransition=function($){var T=Q.transition;Q.transition={};try{$()}finally{Q.transition=T}},Le.unstable_act=X,Le.useCallback=function($,T){return me.current.useCallback($,T)},Le.useContext=function($){return me.current.useContext($)},Le.useDebugValue=function(){},Le.useDeferredValue=function($){return me.current.useDeferredValue($)},Le.useEffect=function($,T){return me.current.useEffect($,T)},Le.useId=function(){return me.current.useId()},Le.useImperativeHandle=function($,T,ee){return me.current.useImperativeHandle($,T,ee)},Le.useInsertionEffect=function($,T){return me.current.useInsertionEffect($,T)},Le.useLayoutEffect=function($,T){return me.current.useLayoutEffect($,T)},Le.useMemo=function($,T){return me.current.useMemo($,T)},Le.useReducer=function($,T,ee){return me.current.useReducer($,T,ee)},Le.useRef=function($){return me.current.useRef($)},Le.useState=function($){return me.current.useState($)},Le.useSyncExternalStore=function($,T,ee){return me.current.useSyncExternalStore($,T,ee)},Le.useTransition=function(){return me.current.useTransition()},Le.version="18.3.1",Le}var S1;function Ls(){return S1||(S1=1,Tm.exports=Q5()),Tm.exports}/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var N1;function Y5(){if(N1)return Wl;N1=1;var e=Ls(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(l,f,h){var p,v={},x=null,b=null;h!==void 0&&(x=""+h),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(b=f.ref);for(p in f)n.call(f,p)&&!o.hasOwnProperty(p)&&(v[p]=f[p]);if(l&&l.defaultProps)for(p in f=l.defaultProps,f)v[p]===void 0&&(v[p]=f[p]);return{$$typeof:t,type:l,key:x,ref:b,props:v,_owner:a.current}}return Wl.Fragment=r,Wl.jsx=u,Wl.jsxs=u,Wl}var E1;function X5(){return E1||(E1=1,Im.exports=Y5()),Im.exports}var c=X5(),y=Ls();const AN=Yg(y),eh=q5({__proto__:null,default:AN},[y]);var xd={},Dm={exports:{}},mr={},Rm={exports:{}},$m={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var P1;function Z5(){return P1||(P1=1,(function(e){function t(Q,oe){var X=Q.length;Q.push(oe);e:for(;0<X;){var $=X-1>>>1,T=Q[$];if(0<a(T,oe))Q[$]=oe,Q[X]=T,X=$;else break e}}function r(Q){return Q.length===0?null:Q[0]}function n(Q){if(Q.length===0)return null;var oe=Q[0],X=Q.pop();if(X!==oe){Q[0]=X;e:for(var $=0,T=Q.length,ee=T>>>1;$<ee;){var ne=2*($+1)-1,te=Q[ne],ue=ne+1,pe=Q[ue];if(0>a(te,X))ue<T&&0>a(pe,te)?(Q[$]=pe,Q[ue]=X,$=ue):(Q[$]=te,Q[ne]=X,$=ne);else if(ue<T&&0>a(pe,X))Q[$]=pe,Q[ue]=X,$=ue;else break e}}return oe}function a(Q,oe){var X=Q.sortIndex-oe.sortIndex;return X!==0?X:Q.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var f=[],h=[],p=1,v=null,x=3,b=!1,k=!1,j=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(Q){for(var oe=r(h);oe!==null;){if(oe.callback===null)n(h);else if(oe.startTime<=Q)n(h),oe.sortIndex=oe.expirationTime,t(f,oe);else break;oe=r(h)}}function A(Q){if(j=!1,O(Q),!k)if(r(f)!==null)k=!0,ke(_);else{var oe=r(h);oe!==null&&me(A,oe.startTime-Q)}}function _(Q,oe){k=!1,j&&(j=!1,N(U),U=-1),b=!0;var X=x;try{for(O(oe),v=r(f);v!==null&&(!(v.expirationTime>oe)||Q&&!q());){var $=v.callback;if(typeof $=="function"){v.callback=null,x=v.priorityLevel;var T=$(v.expirationTime<=oe);oe=e.unstable_now(),typeof T=="function"?v.callback=T:v===r(f)&&n(f),O(oe)}else n(f);v=r(f)}if(v!==null)var ee=!0;else{var ne=r(h);ne!==null&&me(A,ne.startTime-oe),ee=!1}return ee}finally{v=null,x=X,b=!1}}var C=!1,I=null,U=-1,B=5,G=-1;function q(){return!(e.unstable_now()-G<B)}function R(){if(I!==null){var Q=e.unstable_now();G=Q;var oe=!0;try{oe=I(!0,Q)}finally{oe?de():(C=!1,I=null)}}else C=!1}var de;if(typeof P=="function")de=function(){P(R)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ge=Z.port2;Z.port1.onmessage=R,de=function(){ge.postMessage(null)}}else de=function(){S(R,0)};function ke(Q){I=Q,C||(C=!0,de())}function me(Q,oe){U=S(function(){Q(e.unstable_now())},oe)}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(Q){Q.callback=null},e.unstable_continueExecution=function(){k||b||(k=!0,ke(_))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(Q){switch(x){case 1:case 2:case 3:var oe=3;break;default:oe=x}var X=x;x=oe;try{return Q()}finally{x=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,oe){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var X=x;x=Q;try{return oe()}finally{x=X}},e.unstable_scheduleCallback=function(Q,oe,X){var $=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?$+X:$):X=$,Q){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=X+T,Q={id:p++,callback:oe,priorityLevel:Q,startTime:X,expirationTime:T,sortIndex:-1},X>$?(Q.sortIndex=X,t(h,Q),r(f)===null&&Q===r(h)&&(j?(N(U),U=-1):j=!0,me(A,X-$))):(Q.sortIndex=T,t(f,Q),k||b||(k=!0,ke(_))),Q},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Q){var oe=x;return function(){var X=x;x=oe;try{return Q.apply(this,arguments)}finally{x=X}}}})($m)),$m}var A1;function J5(){return A1||(A1=1,Rm.exports=Z5()),Rm.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var C1;function eM(){if(C1)return mr;C1=1;var e=Ls(),t=J5();function r(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function o(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(a[i]=s,i=0;i<s.length;i++)n.add(s[i])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},v={};function x(i){return f.call(v,i)?!0:f.call(p,i)?!1:h.test(i)?v[i]=!0:(p[i]=!0,!1)}function b(i,s,d,m){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function k(i,s,d,m){if(s===null||typeof s>"u"||b(i,s,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function j(i,s,d,m,g,w,E){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=g,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=E}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new j(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];S[s]=new j(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new j(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new j(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){S[i]=new j(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new j(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new j(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new j(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new j(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function P(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(N,P);S[s]=new j(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(N,P);S[s]=new j(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(N,P);S[s]=new j(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new j(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new j(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(i,s,d,m){var g=S.hasOwnProperty(s)?S[s]:null;(g!==null?g.type!==0:m||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(k(s,d,g,m)&&(d=null),m||g===null?x(s)&&(d===null?i.removeAttribute(s):i.setAttribute(s,""+d)):g.mustUseProperty?i[g.propertyName]=d===null?g.type===3?!1:"":d:(s=g.attributeName,m=g.attributeNamespace,d===null?i.removeAttribute(s):(g=g.type,d=g===3||g===4&&d===!0?"":""+d,m?i.setAttributeNS(m,s,d):i.setAttribute(s,d))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),C=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),G=Symbol.for("react.provider"),q=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),Q=Symbol.iterator;function oe(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var X=Object.assign,$;function T(i){if($===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);$=s&&s[1]||""}return`
`+$+i}var ee=!1;function ne(i,s){if(!i||ee)return"";ee=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(V){var m=V}Reflect.construct(i,[],s)}else{try{s.call()}catch(V){m=V}i.call(s.prototype)}else{try{throw Error()}catch(V){m=V}i()}}catch(V){if(V&&m&&typeof V.stack=="string"){for(var g=V.stack.split(`
`),w=m.stack.split(`
`),E=g.length-1,M=w.length-1;1<=E&&0<=M&&g[E]!==w[M];)M--;for(;1<=E&&0<=M;E--,M--)if(g[E]!==w[M]){if(E!==1||M!==1)do if(E--,M--,0>M||g[E]!==w[M]){var D=`
`+g[E].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=E&&0<=M);break}}}finally{ee=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?T(i):""}function te(i){switch(i.tag){case 5:return T(i.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return i=ne(i.type,!1),i;case 11:return i=ne(i.type.render,!1),i;case 1:return i=ne(i.type,!0),i;default:return""}}function ue(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case I:return"Fragment";case C:return"Portal";case B:return"Profiler";case U:return"StrictMode";case de:return"Suspense";case Z:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case q:return(i.displayName||"Context")+".Consumer";case G:return(i._context.displayName||"Context")+".Provider";case R:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ge:return s=i.displayName||null,s!==null?s:ue(i.type)||"Memo";case ke:s=i._payload,i=i._init;try{return ue(i(s))}catch{}}return null}function pe(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(s);case 8:return s===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ce(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function J(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function je(i){var s=J(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(E){m=""+E,w.call(this,E)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(E){m=""+E},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Oe(i){i._valueTracker||(i._valueTracker=je(i))}function ae(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),m="";return i&&(m=J(i)?i.checked?"true":"false":i.value),i=m,i!==d?(s.setValue(i),!0):!1}function Xe(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Y(i,s){var d=s.checked;return X({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function ce(i,s){var d=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;d=Ce(s.value!=null?s.value:d),i._wrapperState={initialChecked:m,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function tt(i,s){s=s.checked,s!=null&&O(i,"checked",s,!1)}function kr(i,s){tt(i,s);var d=Ce(s.value),m=s.type;if(d!=null)m==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?ma(i,s.type,d):s.hasOwnProperty("defaultValue")&&ma(i,s.type,Ce(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function pa(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,d||s===i.value||(i.value=s),i.defaultValue=s}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function ma(i,s,d){(s!=="number"||Xe(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var Bn=Array.isArray;function Un(i,s,d,m){if(i=i.options,s){s={};for(var g=0;g<d.length;g++)s["$"+d[g]]=!0;for(d=0;d<i.length;d++)g=s.hasOwnProperty("$"+i[d].value),i[d].selected!==g&&(i[d].selected=g),g&&m&&(i[d].defaultSelected=!0)}else{for(d=""+Ce(d),s=null,g=0;g<i.length;g++){if(i[g].value===d){i[g].selected=!0,m&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function wo(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return X({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Js(i,s){var d=s.value;if(d==null){if(d=s.children,s=s.defaultValue,d!=null){if(s!=null)throw Error(r(92));if(Bn(d)){if(1<d.length)throw Error(r(93));d=d[0]}s=d}s==null&&(s=""),d=s}i._wrapperState={initialValue:Ce(d)}}function el(i,s){var d=Ce(s.value),m=Ce(s.defaultValue);d!=null&&(d=""+d,d!==i.value&&(i.value=d),s.defaultValue==null&&i.defaultValue!==d&&(i.defaultValue=d)),m!=null&&(i.defaultValue=""+m)}function tl(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function bi(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ko(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?bi(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var va,rl=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,d,m,g){MSApp.execUnsafeLocalFunction(function(){return i(s,d,m,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(va=va||document.createElement("div"),va.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=va.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function wi(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var ki={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lc=["Webkit","ms","Moz","O"];Object.keys(ki).forEach(function(i){lc.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ki[s]=ki[i]})});function nl(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||ki.hasOwnProperty(i)&&ki[i]?(""+s).trim():s+"px"}function il(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var m=d.indexOf("--")===0,g=nl(d,s[d],m);d==="float"&&(d="cssFloat"),m?i.setProperty(d,g):i[d]=g}}var F=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fe(i,s){if(s){if(F[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Pe(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 ze=null;function Ve(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qt=null,Ze=null,vt=null;function ga(i){if(i=Al(i)){if(typeof qt!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Mc(s),qt(i.stateNode,i.type,s))}}function al(i){Ze?vt?vt.push(i):vt=[i]:Ze=i}function uc(){if(Ze){var i=Ze,s=vt;if(vt=Ze=null,ga(i),s)for(i=0;i<s.length;i++)ga(s[i])}}function ol(i,s){return i(s)}function W0(){}var Qh=!1;function H0(i,s,d){if(Qh)return i(s,d);Qh=!0;try{return ol(i,s,d)}finally{Qh=!1,(Ze!==null||vt!==null)&&(W0(),uc())}}function sl(i,s){var d=i.stateNode;if(d===null)return null;var m=Mc(d);if(m===null)return null;d=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var Yh=!1;if(l)try{var ll={};Object.defineProperty(ll,"passive",{get:function(){Yh=!0}}),window.addEventListener("test",ll,ll),window.removeEventListener("test",ll,ll)}catch{Yh=!1}function ZO(i,s,d,m,g,w,E,M,D){var V=Array.prototype.slice.call(arguments,3);try{s.apply(d,V)}catch(ie){this.onError(ie)}}var ul=!1,cc=null,dc=!1,Xh=null,JO={onError:function(i){ul=!0,cc=i}};function e_(i,s,d,m,g,w,E,M,D){ul=!1,cc=null,ZO.apply(JO,arguments)}function t_(i,s,d,m,g,w,E,M,D){if(e_.apply(this,arguments),ul){if(ul){var V=cc;ul=!1,cc=null}else throw Error(r(198));dc||(dc=!0,Xh=V)}}function ya(i){var s=i,d=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(d=s.return),i=s.return;while(i)}return s.tag===3?d:null}function K0(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function G0(i){if(ya(i)!==i)throw Error(r(188))}function r_(i){var s=i.alternate;if(!s){if(s=ya(i),s===null)throw Error(r(188));return s!==i?null:i}for(var d=i,m=s;;){var g=d.return;if(g===null)break;var w=g.alternate;if(w===null){if(m=g.return,m!==null){d=m;continue}break}if(g.child===w.child){for(w=g.child;w;){if(w===d)return G0(g),i;if(w===m)return G0(g),s;w=w.sibling}throw Error(r(188))}if(d.return!==m.return)d=g,m=w;else{for(var E=!1,M=g.child;M;){if(M===d){E=!0,d=g,m=w;break}if(M===m){E=!0,m=g,d=w;break}M=M.sibling}if(!E){for(M=w.child;M;){if(M===d){E=!0,d=w,m=g;break}if(M===m){E=!0,m=w,d=g;break}M=M.sibling}if(!E)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:s}function V0(i){return i=r_(i),i!==null?q0(i):null}function q0(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=q0(i);if(s!==null)return s;i=i.sibling}return null}var Q0=t.unstable_scheduleCallback,Y0=t.unstable_cancelCallback,n_=t.unstable_shouldYield,i_=t.unstable_requestPaint,gt=t.unstable_now,a_=t.unstable_getCurrentPriorityLevel,Zh=t.unstable_ImmediatePriority,X0=t.unstable_UserBlockingPriority,fc=t.unstable_NormalPriority,o_=t.unstable_LowPriority,Z0=t.unstable_IdlePriority,hc=null,mn=null;function s_(i){if(mn&&typeof mn.onCommitFiberRoot=="function")try{mn.onCommitFiberRoot(hc,i,void 0,(i.current.flags&128)===128)}catch{}}var Zr=Math.clz32?Math.clz32:c_,l_=Math.log,u_=Math.LN2;function c_(i){return i>>>=0,i===0?32:31-(l_(i)/u_|0)|0}var pc=64,mc=4194304;function cl(i){switch(i&-i){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: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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function vc(i,s){var d=i.pendingLanes;if(d===0)return 0;var m=0,g=i.suspendedLanes,w=i.pingedLanes,E=d&268435455;if(E!==0){var M=E&~g;M!==0?m=cl(M):(w&=E,w!==0&&(m=cl(w)))}else E=d&~g,E!==0?m=cl(E):w!==0&&(m=cl(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&g)===0&&(g=m&-m,w=s&-s,g>=w||g===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0<s;)d=31-Zr(s),g=1<<d,m|=i[d],s&=~g;return m}function d_(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function f_(i,s){for(var d=i.suspendedLanes,m=i.pingedLanes,g=i.expirationTimes,w=i.pendingLanes;0<w;){var E=31-Zr(w),M=1<<E,D=g[E];D===-1?((M&d)===0||(M&m)!==0)&&(g[E]=d_(M,s)):D<=s&&(i.expiredLanes|=M),w&=~M}}function Jh(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function J0(){var i=pc;return pc<<=1,(pc&4194240)===0&&(pc=64),i}function ep(i){for(var s=[],d=0;31>d;d++)s.push(i);return s}function dl(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Zr(s),i[s]=d}function h_(i,s){var d=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0<d;){var g=31-Zr(d),w=1<<g;s[g]=0,m[g]=-1,i[g]=-1,d&=~w}}function tp(i,s){var d=i.entangledLanes|=s;for(i=i.entanglements;d;){var m=31-Zr(d),g=1<<m;g&s|i[m]&s&&(i[m]|=s),d&=~g}}var Qe=0;function ex(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var tx,rp,rx,nx,ix,np=!1,gc=[],ji=null,Si=null,Ni=null,fl=new Map,hl=new Map,Ei=[],p_="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 submit".split(" ");function ax(i,s){switch(i){case"focusin":case"focusout":ji=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":fl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hl.delete(s.pointerId)}}function pl(i,s,d,m,g,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:d,eventSystemFlags:m,nativeEvent:w,targetContainers:[g]},s!==null&&(s=Al(s),s!==null&&rp(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function m_(i,s,d,m,g){switch(s){case"focusin":return ji=pl(ji,i,s,d,m,g),!0;case"dragenter":return Si=pl(Si,i,s,d,m,g),!0;case"mouseover":return Ni=pl(Ni,i,s,d,m,g),!0;case"pointerover":var w=g.pointerId;return fl.set(w,pl(fl.get(w)||null,i,s,d,m,g)),!0;case"gotpointercapture":return w=g.pointerId,hl.set(w,pl(hl.get(w)||null,i,s,d,m,g)),!0}return!1}function ox(i){var s=xa(i.target);if(s!==null){var d=ya(s);if(d!==null){if(s=d.tag,s===13){if(s=K0(d),s!==null){i.blockedOn=s,ix(i.priority,function(){rx(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function yc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var d=ap(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(d===null){d=i.nativeEvent;var m=new d.constructor(d.type,d);ze=m,d.target.dispatchEvent(m),ze=null}else return s=Al(d),s!==null&&rp(s),i.blockedOn=d,!1;s.shift()}return!0}function sx(i,s,d){yc(i)&&d.delete(s)}function v_(){np=!1,ji!==null&&yc(ji)&&(ji=null),Si!==null&&yc(Si)&&(Si=null),Ni!==null&&yc(Ni)&&(Ni=null),fl.forEach(sx),hl.forEach(sx)}function ml(i,s){i.blockedOn===s&&(i.blockedOn=null,np||(np=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,v_)))}function vl(i){function s(g){return ml(g,i)}if(0<gc.length){ml(gc[0],i);for(var d=1;d<gc.length;d++){var m=gc[d];m.blockedOn===i&&(m.blockedOn=null)}}for(ji!==null&&ml(ji,i),Si!==null&&ml(Si,i),Ni!==null&&ml(Ni,i),fl.forEach(s),hl.forEach(s),d=0;d<Ei.length;d++)m=Ei[d],m.blockedOn===i&&(m.blockedOn=null);for(;0<Ei.length&&(d=Ei[0],d.blockedOn===null);)ox(d),d.blockedOn===null&&Ei.shift()}var jo=A.ReactCurrentBatchConfig,xc=!0;function g_(i,s,d,m){var g=Qe,w=jo.transition;jo.transition=null;try{Qe=1,ip(i,s,d,m)}finally{Qe=g,jo.transition=w}}function y_(i,s,d,m){var g=Qe,w=jo.transition;jo.transition=null;try{Qe=4,ip(i,s,d,m)}finally{Qe=g,jo.transition=w}}function ip(i,s,d,m){if(xc){var g=ap(i,s,d,m);if(g===null)kp(i,s,m,bc,d),ax(i,m);else if(m_(g,i,s,d,m))m.stopPropagation();else if(ax(i,m),s&4&&-1<p_.indexOf(i)){for(;g!==null;){var w=Al(g);if(w!==null&&tx(w),w=ap(i,s,d,m),w===null&&kp(i,s,m,bc,d),w===g)break;g=w}g!==null&&m.stopPropagation()}else kp(i,s,m,null,d)}}var bc=null;function ap(i,s,d,m){if(bc=null,i=Ve(m),i=xa(i),i!==null)if(s=ya(i),s===null)i=null;else if(d=s.tag,d===13){if(i=K0(s),i!==null)return i;i=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return bc=i,null}function lx(i){switch(i){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(a_()){case Zh:return 1;case X0:return 4;case fc:case o_:return 16;case Z0:return 536870912;default:return 16}default:return 16}}var Pi=null,op=null,wc=null;function ux(){if(wc)return wc;var i,s=op,d=s.length,m,g="value"in Pi?Pi.value:Pi.textContent,w=g.length;for(i=0;i<d&&s[i]===g[i];i++);var E=d-i;for(m=1;m<=E&&s[d-m]===g[w-m];m++);return wc=g.slice(i,1<m?1-m:void 0)}function kc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function jc(){return!0}function cx(){return!1}function jr(i){function s(d,m,g,w,E){this._reactName=d,this._targetInst=g,this.type=m,this.nativeEvent=w,this.target=E,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(d=i[M],this[M]=d?d(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?jc:cx,this.isPropagationStopped=cx,this}return X(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=jc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=jc)},persist:function(){},isPersistent:jc}),s}var So={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sp=jr(So),gl=X({},So,{view:0,detail:0}),x_=jr(gl),lp,up,yl,Sc=X({},gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==yl&&(yl&&i.type==="mousemove"?(lp=i.screenX-yl.screenX,up=i.screenY-yl.screenY):up=lp=0,yl=i),lp)},movementY:function(i){return"movementY"in i?i.movementY:up}}),dx=jr(Sc),b_=X({},Sc,{dataTransfer:0}),w_=jr(b_),k_=X({},gl,{relatedTarget:0}),cp=jr(k_),j_=X({},So,{animationName:0,elapsedTime:0,pseudoElement:0}),S_=jr(j_),N_=X({},So,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),E_=jr(N_),P_=X({},So,{data:0}),fx=jr(P_),A_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C_={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"},O_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function __(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=O_[i])?!!s[i]:!1}function dp(){return __}var M_=X({},gl,{key:function(i){if(i.key){var s=A_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=kc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?C_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dp,charCode:function(i){return i.type==="keypress"?kc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?kc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),I_=jr(M_),T_=X({},Sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hx=jr(T_),D_=X({},gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dp}),R_=jr(D_),$_=X({},So,{propertyName:0,elapsedTime:0,pseudoElement:0}),L_=jr($_),z_=X({},Sc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),F_=jr(z_),B_=[9,13,27,32],fp=l&&"CompositionEvent"in window,xl=null;l&&"documentMode"in document&&(xl=document.documentMode);var U_=l&&"TextEvent"in window&&!xl,px=l&&(!fp||xl&&8<xl&&11>=xl),mx=" ",vx=!1;function gx(i,s){switch(i){case"keyup":return B_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var No=!1;function W_(i,s){switch(i){case"compositionend":return yx(s);case"keypress":return s.which!==32?null:(vx=!0,mx);case"textInput":return i=s.data,i===mx&&vx?null:i;default:return null}}function H_(i,s){if(No)return i==="compositionend"||!fp&&gx(i,s)?(i=ux(),wc=op=Pi=null,No=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return px&&s.locale!=="ko"?null:s.data;default:return null}}var K_={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 xx(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!K_[i.type]:s==="textarea"}function bx(i,s,d,m){al(m),s=Cc(s,"onChange"),0<s.length&&(d=new sp("onChange","change",null,d,m),i.push({event:d,listeners:s}))}var bl=null,wl=null;function G_(i){Lx(i,0)}function Nc(i){var s=Oo(i);if(ae(s))return i}function V_(i,s){if(i==="change")return s}var wx=!1;if(l){var hp;if(l){var pp="oninput"in document;if(!pp){var kx=document.createElement("div");kx.setAttribute("oninput","return;"),pp=typeof kx.oninput=="function"}hp=pp}else hp=!1;wx=hp&&(!document.documentMode||9<document.documentMode)}function jx(){bl&&(bl.detachEvent("onpropertychange",Sx),wl=bl=null)}function Sx(i){if(i.propertyName==="value"&&Nc(wl)){var s=[];bx(s,wl,i,Ve(i)),H0(G_,s)}}function q_(i,s,d){i==="focusin"?(jx(),bl=s,wl=d,bl.attachEvent("onpropertychange",Sx)):i==="focusout"&&jx()}function Q_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Nc(wl)}function Y_(i,s){if(i==="click")return Nc(s)}function X_(i,s){if(i==="input"||i==="change")return Nc(s)}function Z_(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Jr=typeof Object.is=="function"?Object.is:Z_;function kl(i,s){if(Jr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var d=Object.keys(i),m=Object.keys(s);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var g=d[m];if(!f.call(s,g)||!Jr(i[g],s[g]))return!1}return!0}function Nx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Ex(i,s){var d=Nx(i);i=0;for(var m;d;){if(d.nodeType===3){if(m=i+d.textContent.length,i<=s&&m>=s)return{node:d,offset:s-i};i=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Nx(d)}}function Px(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Px(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Ax(){for(var i=window,s=Xe();s instanceof i.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)i=s.contentWindow;else break;s=Xe(i.document)}return s}function mp(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function J_(i){var s=Ax(),d=i.focusedElem,m=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&Px(d.ownerDocument.documentElement,d)){if(m!==null&&mp(d)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(i,d.value.length);else if(i=(s=d.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=d.textContent.length,w=Math.min(m.start,g);m=m.end===void 0?w:Math.min(m.end,g),!i.extend&&w>m&&(g=m,m=w,w=g),g=Ex(d,w);var E=Ex(d,m);g&&E&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==E.node||i.focusOffset!==E.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(E.node,E.offset)):(s.setEnd(E.node,E.offset),i.addRange(s)))}}for(s=[],i=d;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<s.length;d++)i=s[d],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var e5=l&&"documentMode"in document&&11>=document.documentMode,Eo=null,vp=null,jl=null,gp=!1;function Cx(i,s,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;gp||Eo==null||Eo!==Xe(m)||(m=Eo,"selectionStart"in m&&mp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),jl&&kl(jl,m)||(jl=m,m=Cc(vp,"onSelect"),0<m.length&&(s=new sp("onSelect","select",null,s,d),i.push({event:s,listeners:m}),s.target=Eo)))}function Ec(i,s){var d={};return d[i.toLowerCase()]=s.toLowerCase(),d["Webkit"+i]="webkit"+s,d["Moz"+i]="moz"+s,d}var Po={animationend:Ec("Animation","AnimationEnd"),animationiteration:Ec("Animation","AnimationIteration"),animationstart:Ec("Animation","AnimationStart"),transitionend:Ec("Transition","TransitionEnd")},yp={},Ox={};l&&(Ox=document.createElement("div").style,"AnimationEvent"in window||(delete Po.animationend.animation,delete Po.animationiteration.animation,delete Po.animationstart.animation),"TransitionEvent"in window||delete Po.transitionend.transition);function Pc(i){if(yp[i])return yp[i];if(!Po[i])return i;var s=Po[i],d;for(d in s)if(s.hasOwnProperty(d)&&d in Ox)return yp[i]=s[d];return i}var _x=Pc("animationend"),Mx=Pc("animationiteration"),Ix=Pc("animationstart"),Tx=Pc("transitionend"),Dx=new Map,Rx="abort auxClick 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(" ");function Ai(i,s){Dx.set(i,s),o(s,[i])}for(var xp=0;xp<Rx.length;xp++){var bp=Rx[xp],t5=bp.toLowerCase(),r5=bp[0].toUpperCase()+bp.slice(1);Ai(t5,"on"+r5)}Ai(_x,"onAnimationEnd"),Ai(Mx,"onAnimationIteration"),Ai(Ix,"onAnimationStart"),Ai("dblclick","onDoubleClick"),Ai("focusin","onFocus"),Ai("focusout","onBlur"),Ai(Tx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="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(" "),n5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sl));function $x(i,s,d){var m=i.type||"unknown-event";i.currentTarget=d,t_(m,s,void 0,i),i.currentTarget=null}function Lx(i,s){s=(s&4)!==0;for(var d=0;d<i.length;d++){var m=i[d],g=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var E=m.length-1;0<=E;E--){var M=m[E],D=M.instance,V=M.currentTarget;if(M=M.listener,D!==w&&g.isPropagationStopped())break e;$x(g,M,V),w=D}else for(E=0;E<m.length;E++){if(M=m[E],D=M.instance,V=M.currentTarget,M=M.listener,D!==w&&g.isPropagationStopped())break e;$x(g,M,V),w=D}}}if(dc)throw i=Xh,dc=!1,Xh=null,i}function rt(i,s){var d=s[Ap];d===void 0&&(d=s[Ap]=new Set);var m=i+"__bubble";d.has(m)||(zx(s,i,2,!1),d.add(m))}function wp(i,s,d){var m=0;s&&(m|=4),zx(d,i,m,s)}var Ac="_reactListening"+Math.random().toString(36).slice(2);function Nl(i){if(!i[Ac]){i[Ac]=!0,n.forEach(function(d){d!=="selectionchange"&&(n5.has(d)||wp(d,!1,i),wp(d,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Ac]||(s[Ac]=!0,wp("selectionchange",!1,s))}}function zx(i,s,d,m){switch(lx(s)){case 1:var g=g_;break;case 4:g=y_;break;default:g=ip}d=g.bind(null,s,d,i),g=void 0,!Yh||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),m?g!==void 0?i.addEventListener(s,d,{capture:!0,passive:g}):i.addEventListener(s,d,!0):g!==void 0?i.addEventListener(s,d,{passive:g}):i.addEventListener(s,d,!1)}function kp(i,s,d,m,g){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var E=m.tag;if(E===3||E===4){var M=m.stateNode.containerInfo;if(M===g||M.nodeType===8&&M.parentNode===g)break;if(E===4)for(E=m.return;E!==null;){var D=E.tag;if((D===3||D===4)&&(D=E.stateNode.containerInfo,D===g||D.nodeType===8&&D.parentNode===g))return;E=E.return}for(;M!==null;){if(E=xa(M),E===null)return;if(D=E.tag,D===5||D===6){m=w=E;continue e}M=M.parentNode}}m=m.return}H0(function(){var V=w,ie=Ve(d),se=[];e:{var re=Dx.get(i);if(re!==void 0){var ve=sp,we=i;switch(i){case"keypress":if(kc(d)===0)break e;case"keydown":case"keyup":ve=I_;break;case"focusin":we="focus",ve=cp;break;case"focusout":we="blur",ve=cp;break;case"beforeblur":case"afterblur":ve=cp;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=dx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=w_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=R_;break;case _x:case Mx:case Ix:ve=S_;break;case Tx:ve=L_;break;case"scroll":ve=x_;break;case"wheel":ve=F_;break;case"copy":case"cut":case"paste":ve=E_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=hx}var Se=(s&4)!==0,yt=!Se&&i==="scroll",W=Se?re!==null?re+"Capture":null:re;Se=[];for(var z=V,H;z!==null;){H=z;var le=H.stateNode;if(H.tag===5&&le!==null&&(H=le,W!==null&&(le=sl(z,W),le!=null&&Se.push(El(z,le,H)))),yt)break;z=z.return}0<Se.length&&(re=new ve(re,we,null,d,ie),se.push({event:re,listeners:Se}))}}if((s&7)===0){e:{if(re=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",re&&d!==ze&&(we=d.relatedTarget||d.fromElement)&&(xa(we)||we[Wn]))break e;if((ve||re)&&(re=ie.window===ie?ie:(re=ie.ownerDocument)?re.defaultView||re.parentWindow:window,ve?(we=d.relatedTarget||d.toElement,ve=V,we=we?xa(we):null,we!==null&&(yt=ya(we),we!==yt||we.tag!==5&&we.tag!==6)&&(we=null)):(ve=null,we=V),ve!==we)){if(Se=dx,le="onMouseLeave",W="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Se=hx,le="onPointerLeave",W="onPointerEnter",z="pointer"),yt=ve==null?re:Oo(ve),H=we==null?re:Oo(we),re=new Se(le,z+"leave",ve,d,ie),re.target=yt,re.relatedTarget=H,le=null,xa(ie)===V&&(Se=new Se(W,z+"enter",we,d,ie),Se.target=H,Se.relatedTarget=yt,le=Se),yt=le,ve&&we)t:{for(Se=ve,W=we,z=0,H=Se;H;H=Ao(H))z++;for(H=0,le=W;le;le=Ao(le))H++;for(;0<z-H;)Se=Ao(Se),z--;for(;0<H-z;)W=Ao(W),H--;for(;z--;){if(Se===W||W!==null&&Se===W.alternate)break t;Se=Ao(Se),W=Ao(W)}Se=null}else Se=null;ve!==null&&Fx(se,re,ve,Se,!1),we!==null&&yt!==null&&Fx(se,yt,we,Se,!0)}}e:{if(re=V?Oo(V):window,ve=re.nodeName&&re.nodeName.toLowerCase(),ve==="select"||ve==="input"&&re.type==="file")var Ee=V_;else if(xx(re))if(wx)Ee=X_;else{Ee=Q_;var Me=q_}else(ve=re.nodeName)&&ve.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ee=Y_);if(Ee&&(Ee=Ee(i,V))){bx(se,Ee,d,ie);break e}Me&&Me(i,re,V),i==="focusout"&&(Me=re._wrapperState)&&Me.controlled&&re.type==="number"&&ma(re,"number",re.value)}switch(Me=V?Oo(V):window,i){case"focusin":(xx(Me)||Me.contentEditable==="true")&&(Eo=Me,vp=V,jl=null);break;case"focusout":jl=vp=Eo=null;break;case"mousedown":gp=!0;break;case"contextmenu":case"mouseup":case"dragend":gp=!1,Cx(se,d,ie);break;case"selectionchange":if(e5)break;case"keydown":case"keyup":Cx(se,d,ie)}var Ie;if(fp)e:{switch(i){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else No?gx(i,d)&&(Re="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(Re="onCompositionStart");Re&&(px&&d.locale!=="ko"&&(No||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&No&&(Ie=ux()):(Pi=ie,op="value"in Pi?Pi.value:Pi.textContent,No=!0)),Me=Cc(V,Re),0<Me.length&&(Re=new fx(Re,i,null,d,ie),se.push({event:Re,listeners:Me}),Ie?Re.data=Ie:(Ie=yx(d),Ie!==null&&(Re.data=Ie)))),(Ie=U_?W_(i,d):H_(i,d))&&(V=Cc(V,"onBeforeInput"),0<V.length&&(ie=new fx("onBeforeInput","beforeinput",null,d,ie),se.push({event:ie,listeners:V}),ie.data=Ie))}Lx(se,s)})}function El(i,s,d){return{instance:i,listener:s,currentTarget:d}}function Cc(i,s){for(var d=s+"Capture",m=[];i!==null;){var g=i,w=g.stateNode;g.tag===5&&w!==null&&(g=w,w=sl(i,d),w!=null&&m.unshift(El(i,w,g)),w=sl(i,s),w!=null&&m.push(El(i,w,g))),i=i.return}return m}function Ao(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Fx(i,s,d,m,g){for(var w=s._reactName,E=[];d!==null&&d!==m;){var M=d,D=M.alternate,V=M.stateNode;if(D!==null&&D===m)break;M.tag===5&&V!==null&&(M=V,g?(D=sl(d,w),D!=null&&E.unshift(El(d,D,M))):g||(D=sl(d,w),D!=null&&E.push(El(d,D,M)))),d=d.return}E.length!==0&&i.push({event:s,listeners:E})}var i5=/\r\n?/g,a5=/\u0000|\uFFFD/g;function Bx(i){return(typeof i=="string"?i:""+i).replace(i5,`
`).replace(a5,"")}function Oc(i,s,d){if(s=Bx(s),Bx(i)!==s&&d)throw Error(r(425))}function _c(){}var jp=null,Sp=null;function Np(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Ep=typeof setTimeout=="function"?setTimeout:void 0,o5=typeof clearTimeout=="function"?clearTimeout:void 0,Ux=typeof Promise=="function"?Promise:void 0,s5=typeof queueMicrotask=="function"?queueMicrotask:typeof Ux<"u"?function(i){return Ux.resolve(null).then(i).catch(l5)}:Ep;function l5(i){setTimeout(function(){throw i})}function Pp(i,s){var d=s,m=0;do{var g=d.nextSibling;if(i.removeChild(d),g&&g.nodeType===8)if(d=g.data,d==="/$"){if(m===0){i.removeChild(g),vl(s);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=g}while(d);vl(s)}function Ci(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function Wx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"){if(s===0)return i;s--}else d==="/$"&&s++}i=i.previousSibling}return null}var Co=Math.random().toString(36).slice(2),vn="__reactFiber$"+Co,Pl="__reactProps$"+Co,Wn="__reactContainer$"+Co,Ap="__reactEvents$"+Co,u5="__reactListeners$"+Co,c5="__reactHandles$"+Co;function xa(i){var s=i[vn];if(s)return s;for(var d=i.parentNode;d;){if(s=d[Wn]||d[vn]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(i=Wx(i);i!==null;){if(d=i[vn])return d;i=Wx(i)}return s}i=d,d=i.parentNode}return null}function Al(i){return i=i[vn]||i[Wn],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Oo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(r(33))}function Mc(i){return i[Pl]||null}var Cp=[],_o=-1;function Oi(i){return{current:i}}function nt(i){0>_o||(i.current=Cp[_o],Cp[_o]=null,_o--)}function Je(i,s){_o++,Cp[_o]=i.current,i.current=s}var _i={},Qt=Oi(_i),cr=Oi(!1),ba=_i;function Mo(i,s){var d=i.type.contextTypes;if(!d)return _i;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var g={},w;for(w in d)g[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function dr(i){return i=i.childContextTypes,i!=null}function Ic(){nt(cr),nt(Qt)}function Hx(i,s,d){if(Qt.current!==_i)throw Error(r(168));Je(Qt,s),Je(cr,d)}function Kx(i,s,d){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var g in m)if(!(g in s))throw Error(r(108,pe(i)||"Unknown",g));return X({},d,m)}function Tc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||_i,ba=Qt.current,Je(Qt,i),Je(cr,cr.current),!0}function Gx(i,s,d){var m=i.stateNode;if(!m)throw Error(r(169));d?(i=Kx(i,s,ba),m.__reactInternalMemoizedMergedChildContext=i,nt(cr),nt(Qt),Je(Qt,i)):nt(cr),Je(cr,d)}var Hn=null,Dc=!1,Op=!1;function Vx(i){Hn===null?Hn=[i]:Hn.push(i)}function d5(i){Dc=!0,Vx(i)}function Mi(){if(!Op&&Hn!==null){Op=!0;var i=0,s=Qe;try{var d=Hn;for(Qe=1;i<d.length;i++){var m=d[i];do m=m(!0);while(m!==null)}Hn=null,Dc=!1}catch(g){throw Hn!==null&&(Hn=Hn.slice(i+1)),Q0(Zh,Mi),g}finally{Qe=s,Op=!1}}return null}var Io=[],To=0,Rc=null,$c=0,Tr=[],Dr=0,wa=null,Kn=1,Gn="";function ka(i,s){Io[To++]=$c,Io[To++]=Rc,Rc=i,$c=s}function qx(i,s,d){Tr[Dr++]=Kn,Tr[Dr++]=Gn,Tr[Dr++]=wa,wa=i;var m=Kn;i=Gn;var g=32-Zr(m)-1;m&=~(1<<g),d+=1;var w=32-Zr(s)+g;if(30<w){var E=g-g%5;w=(m&(1<<E)-1).toString(32),m>>=E,g-=E,Kn=1<<32-Zr(s)+g|d<<g|m,Gn=w+i}else Kn=1<<w|d<<g|m,Gn=i}function _p(i){i.return!==null&&(ka(i,1),qx(i,1,0))}function Mp(i){for(;i===Rc;)Rc=Io[--To],Io[To]=null,$c=Io[--To],Io[To]=null;for(;i===wa;)wa=Tr[--Dr],Tr[Dr]=null,Gn=Tr[--Dr],Tr[Dr]=null,Kn=Tr[--Dr],Tr[Dr]=null}var Sr=null,Nr=null,st=!1,en=null;function Qx(i,s){var d=zr(5,null,null,0);d.elementType="DELETED",d.stateNode=s,d.return=i,s=i.deletions,s===null?(i.deletions=[d],i.flags|=16):s.push(d)}function Yx(i,s){switch(i.tag){case 5:var d=i.type;return s=s.nodeType!==1||d.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Sr=i,Nr=Ci(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Sr=i,Nr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(d=wa!==null?{id:Kn,overflow:Gn}:null,i.memoizedState={dehydrated:s,treeContext:d,retryLane:1073741824},d=zr(18,null,null,0),d.stateNode=s,d.return=i,i.child=d,Sr=i,Nr=null,!0):!1;default:return!1}}function Ip(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Tp(i){if(st){var s=Nr;if(s){var d=s;if(!Yx(i,s)){if(Ip(i))throw Error(r(418));s=Ci(d.nextSibling);var m=Sr;s&&Yx(i,s)?Qx(m,d):(i.flags=i.flags&-4097|2,st=!1,Sr=i)}}else{if(Ip(i))throw Error(r(418));i.flags=i.flags&-4097|2,st=!1,Sr=i}}}function Xx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Sr=i}function Lc(i){if(i!==Sr)return!1;if(!st)return Xx(i),st=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Np(i.type,i.memoizedProps)),s&&(s=Nr)){if(Ip(i))throw Zx(),Error(r(418));for(;s;)Qx(i,s),s=Ci(s.nextSibling)}if(Xx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"){if(s===0){Nr=Ci(i.nextSibling);break e}s--}else d!=="$"&&d!=="$!"&&d!=="$?"||s++}i=i.nextSibling}Nr=null}}else Nr=Sr?Ci(i.stateNode.nextSibling):null;return!0}function Zx(){for(var i=Nr;i;)i=Ci(i.nextSibling)}function Do(){Nr=Sr=null,st=!1}function Dp(i){en===null?en=[i]:en.push(i)}var f5=A.ReactCurrentBatchConfig;function Cl(i,s,d){if(i=d.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var m=d.stateNode}if(!m)throw Error(r(147,i));var g=m,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(E){var M=g.refs;E===null?delete M[w]:M[w]=E},s._stringRef=w,s)}if(typeof i!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,i))}return i}function zc(i,s){throw i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Jx(i){var s=i._init;return s(i._payload)}function eb(i){function s(W,z){if(i){var H=W.deletions;H===null?(W.deletions=[z],W.flags|=16):H.push(z)}}function d(W,z){if(!i)return null;for(;z!==null;)s(W,z),z=z.sibling;return null}function m(W,z){for(W=new Map;z!==null;)z.key!==null?W.set(z.key,z):W.set(z.index,z),z=z.sibling;return W}function g(W,z){return W=Fi(W,z),W.index=0,W.sibling=null,W}function w(W,z,H){return W.index=H,i?(H=W.alternate,H!==null?(H=H.index,H<z?(W.flags|=2,z):H):(W.flags|=2,z)):(W.flags|=1048576,z)}function E(W){return i&&W.alternate===null&&(W.flags|=2),W}function M(W,z,H,le){return z===null||z.tag!==6?(z=Em(H,W.mode,le),z.return=W,z):(z=g(z,H),z.return=W,z)}function D(W,z,H,le){var Ee=H.type;return Ee===I?ie(W,z,H.props.children,le,H.key):z!==null&&(z.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===ke&&Jx(Ee)===z.type)?(le=g(z,H.props),le.ref=Cl(W,z,H),le.return=W,le):(le=ud(H.type,H.key,H.props,null,W.mode,le),le.ref=Cl(W,z,H),le.return=W,le)}function V(W,z,H,le){return z===null||z.tag!==4||z.stateNode.containerInfo!==H.containerInfo||z.stateNode.implementation!==H.implementation?(z=Pm(H,W.mode,le),z.return=W,z):(z=g(z,H.children||[]),z.return=W,z)}function ie(W,z,H,le,Ee){return z===null||z.tag!==7?(z=Oa(H,W.mode,le,Ee),z.return=W,z):(z=g(z,H),z.return=W,z)}function se(W,z,H){if(typeof z=="string"&&z!==""||typeof z=="number")return z=Em(""+z,W.mode,H),z.return=W,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return H=ud(z.type,z.key,z.props,null,W.mode,H),H.ref=Cl(W,null,z),H.return=W,H;case C:return z=Pm(z,W.mode,H),z.return=W,z;case ke:var le=z._init;return se(W,le(z._payload),H)}if(Bn(z)||oe(z))return z=Oa(z,W.mode,H,null),z.return=W,z;zc(W,z)}return null}function re(W,z,H,le){var Ee=z!==null?z.key:null;if(typeof H=="string"&&H!==""||typeof H=="number")return Ee!==null?null:M(W,z,""+H,le);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return H.key===Ee?D(W,z,H,le):null;case C:return H.key===Ee?V(W,z,H,le):null;case ke:return Ee=H._init,re(W,z,Ee(H._payload),le)}if(Bn(H)||oe(H))return Ee!==null?null:ie(W,z,H,le,null);zc(W,H)}return null}function ve(W,z,H,le,Ee){if(typeof le=="string"&&le!==""||typeof le=="number")return W=W.get(H)||null,M(z,W,""+le,Ee);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case _:return W=W.get(le.key===null?H:le.key)||null,D(z,W,le,Ee);case C:return W=W.get(le.key===null?H:le.key)||null,V(z,W,le,Ee);case ke:var Me=le._init;return ve(W,z,H,Me(le._payload),Ee)}if(Bn(le)||oe(le))return W=W.get(H)||null,ie(z,W,le,Ee,null);zc(z,le)}return null}function we(W,z,H,le){for(var Ee=null,Me=null,Ie=z,Re=z=0,_t=null;Ie!==null&&Re<H.length;Re++){Ie.index>Re?(_t=Ie,Ie=null):_t=Ie.sibling;var Ke=re(W,Ie,H[Re],le);if(Ke===null){Ie===null&&(Ie=_t);break}i&&Ie&&Ke.alternate===null&&s(W,Ie),z=w(Ke,z,Re),Me===null?Ee=Ke:Me.sibling=Ke,Me=Ke,Ie=_t}if(Re===H.length)return d(W,Ie),st&&ka(W,Re),Ee;if(Ie===null){for(;Re<H.length;Re++)Ie=se(W,H[Re],le),Ie!==null&&(z=w(Ie,z,Re),Me===null?Ee=Ie:Me.sibling=Ie,Me=Ie);return st&&ka(W,Re),Ee}for(Ie=m(W,Ie);Re<H.length;Re++)_t=ve(Ie,W,Re,H[Re],le),_t!==null&&(i&&_t.alternate!==null&&Ie.delete(_t.key===null?Re:_t.key),z=w(_t,z,Re),Me===null?Ee=_t:Me.sibling=_t,Me=_t);return i&&Ie.forEach(function(Bi){return s(W,Bi)}),st&&ka(W,Re),Ee}function Se(W,z,H,le){var Ee=oe(H);if(typeof Ee!="function")throw Error(r(150));if(H=Ee.call(H),H==null)throw Error(r(151));for(var Me=Ee=null,Ie=z,Re=z=0,_t=null,Ke=H.next();Ie!==null&&!Ke.done;Re++,Ke=H.next()){Ie.index>Re?(_t=Ie,Ie=null):_t=Ie.sibling;var Bi=re(W,Ie,Ke.value,le);if(Bi===null){Ie===null&&(Ie=_t);break}i&&Ie&&Bi.alternate===null&&s(W,Ie),z=w(Bi,z,Re),Me===null?Ee=Bi:Me.sibling=Bi,Me=Bi,Ie=_t}if(Ke.done)return d(W,Ie),st&&ka(W,Re),Ee;if(Ie===null){for(;!Ke.done;Re++,Ke=H.next())Ke=se(W,Ke.value,le),Ke!==null&&(z=w(Ke,z,Re),Me===null?Ee=Ke:Me.sibling=Ke,Me=Ke);return st&&ka(W,Re),Ee}for(Ie=m(W,Ie);!Ke.done;Re++,Ke=H.next())Ke=ve(Ie,W,Re,Ke.value,le),Ke!==null&&(i&&Ke.alternate!==null&&Ie.delete(Ke.key===null?Re:Ke.key),z=w(Ke,z,Re),Me===null?Ee=Ke:Me.sibling=Ke,Me=Ke);return i&&Ie.forEach(function(K5){return s(W,K5)}),st&&ka(W,Re),Ee}function yt(W,z,H,le){if(typeof H=="object"&&H!==null&&H.type===I&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case _:e:{for(var Ee=H.key,Me=z;Me!==null;){if(Me.key===Ee){if(Ee=H.type,Ee===I){if(Me.tag===7){d(W,Me.sibling),z=g(Me,H.props.children),z.return=W,W=z;break e}}else if(Me.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===ke&&Jx(Ee)===Me.type){d(W,Me.sibling),z=g(Me,H.props),z.ref=Cl(W,Me,H),z.return=W,W=z;break e}d(W,Me);break}else s(W,Me);Me=Me.sibling}H.type===I?(z=Oa(H.props.children,W.mode,le,H.key),z.return=W,W=z):(le=ud(H.type,H.key,H.props,null,W.mode,le),le.ref=Cl(W,z,H),le.return=W,W=le)}return E(W);case C:e:{for(Me=H.key;z!==null;){if(z.key===Me)if(z.tag===4&&z.stateNode.containerInfo===H.containerInfo&&z.stateNode.implementation===H.implementation){d(W,z.sibling),z=g(z,H.children||[]),z.return=W,W=z;break e}else{d(W,z);break}else s(W,z);z=z.sibling}z=Pm(H,W.mode,le),z.return=W,W=z}return E(W);case ke:return Me=H._init,yt(W,z,Me(H._payload),le)}if(Bn(H))return we(W,z,H,le);if(oe(H))return Se(W,z,H,le);zc(W,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,z!==null&&z.tag===6?(d(W,z.sibling),z=g(z,H),z.return=W,W=z):(d(W,z),z=Em(H,W.mode,le),z.return=W,W=z),E(W)):d(W,z)}return yt}var Ro=eb(!0),tb=eb(!1),Fc=Oi(null),Bc=null,$o=null,Rp=null;function $p(){Rp=$o=Bc=null}function Lp(i){var s=Fc.current;nt(Fc),i._currentValue=s}function zp(i,s,d){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===d)break;i=i.return}}function Lo(i,s){Bc=i,Rp=$o=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(fr=!0),i.firstContext=null)}function Rr(i){var s=i._currentValue;if(Rp!==i)if(i={context:i,memoizedValue:s,next:null},$o===null){if(Bc===null)throw Error(r(308));$o=i,Bc.dependencies={lanes:0,firstContext:i}}else $o=$o.next=i;return s}var ja=null;function Fp(i){ja===null?ja=[i]:ja.push(i)}function rb(i,s,d,m){var g=s.interleaved;return g===null?(d.next=d,Fp(s)):(d.next=g.next,g.next=d),s.interleaved=d,Vn(i,m)}function Vn(i,s){i.lanes|=s;var d=i.alternate;for(d!==null&&(d.lanes|=s),d=i,i=i.return;i!==null;)i.childLanes|=s,d=i.alternate,d!==null&&(d.childLanes|=s),d=i,i=i.return;return d.tag===3?d.stateNode:null}var Ii=!1;function Bp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nb(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function qn(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ti(i,s,d){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(He&2)!==0){var g=m.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),m.pending=s,Vn(i,d)}return g=m.interleaved,g===null?(s.next=s,Fp(m)):(s.next=g.next,g.next=s),m.interleaved=s,Vn(i,d)}function Uc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,tp(i,d)}}function ib(i,s){var d=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var g=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var E={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?g=w=E:w=w.next=E,d=d.next}while(d!==null);w===null?g=w=s:w=w.next=s}else g=w=s;d={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function Wc(i,s,d,m){var g=i.updateQueue;Ii=!1;var w=g.firstBaseUpdate,E=g.lastBaseUpdate,M=g.shared.pending;if(M!==null){g.shared.pending=null;var D=M,V=D.next;D.next=null,E===null?w=V:E.next=V,E=D;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,M=ie.lastBaseUpdate,M!==E&&(M===null?ie.firstBaseUpdate=V:M.next=V,ie.lastBaseUpdate=D))}if(w!==null){var se=g.baseState;E=0,ie=V=D=null,M=w;do{var re=M.lane,ve=M.eventTime;if((m&re)===re){ie!==null&&(ie=ie.next={eventTime:ve,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var we=i,Se=M;switch(re=s,ve=d,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){se=we.call(ve,se,re);break e}se=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,re=typeof we=="function"?we.call(ve,se,re):we,re==null)break e;se=X({},se,re);break e;case 2:Ii=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,re=g.effects,re===null?g.effects=[M]:re.push(M))}else ve={eventTime:ve,lane:re,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ie===null?(V=ie=ve,D=se):ie=ie.next=ve,E|=re;if(M=M.next,M===null){if(M=g.shared.pending,M===null)break;re=M,M=re.next,re.next=null,g.lastBaseUpdate=re,g.shared.pending=null}}while(!0);if(ie===null&&(D=se),g.baseState=D,g.firstBaseUpdate=V,g.lastBaseUpdate=ie,s=g.shared.interleaved,s!==null){g=s;do E|=g.lane,g=g.next;while(g!==s)}else w===null&&(g.shared.lanes=0);Ea|=E,i.lanes=E,i.memoizedState=se}}function ab(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],g=m.callback;if(g!==null){if(m.callback=null,m=d,typeof g!="function")throw Error(r(191,g));g.call(m)}}}var Ol={},gn=Oi(Ol),_l=Oi(Ol),Ml=Oi(Ol);function Sa(i){if(i===Ol)throw Error(r(174));return i}function Up(i,s){switch(Je(Ml,s),Je(_l,i),Je(gn,Ol),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ko(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ko(s,i)}nt(gn),Je(gn,s)}function zo(){nt(gn),nt(_l),nt(Ml)}function ob(i){Sa(Ml.current);var s=Sa(gn.current),d=ko(s,i.type);s!==d&&(Je(_l,i),Je(gn,d))}function Wp(i){_l.current===i&&(nt(gn),nt(_l))}var ct=Oi(0);function Hc(i){for(var s=i;s!==null;){if(s.tag===13){var d=s.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Hp=[];function Kp(){for(var i=0;i<Hp.length;i++)Hp[i]._workInProgressVersionPrimary=null;Hp.length=0}var Kc=A.ReactCurrentDispatcher,Gp=A.ReactCurrentBatchConfig,Na=0,dt=null,kt=null,Ct=null,Gc=!1,Il=!1,Tl=0,h5=0;function Yt(){throw Error(r(321))}function Vp(i,s){if(s===null)return!1;for(var d=0;d<s.length&&d<i.length;d++)if(!Jr(i[d],s[d]))return!1;return!0}function qp(i,s,d,m,g,w){if(Na=w,dt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Kc.current=i===null||i.memoizedState===null?g5:y5,i=d(m,g),Il){w=0;do{if(Il=!1,Tl=0,25<=w)throw Error(r(301));w+=1,Ct=kt=null,s.updateQueue=null,Kc.current=x5,i=d(m,g)}while(Il)}if(Kc.current=Qc,s=kt!==null&&kt.next!==null,Na=0,Ct=kt=dt=null,Gc=!1,s)throw Error(r(300));return i}function Qp(){var i=Tl!==0;return Tl=0,i}function yn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?dt.memoizedState=Ct=i:Ct=Ct.next=i,Ct}function $r(){if(kt===null){var i=dt.alternate;i=i!==null?i.memoizedState:null}else i=kt.next;var s=Ct===null?dt.memoizedState:Ct.next;if(s!==null)Ct=s,kt=i;else{if(i===null)throw Error(r(310));kt=i,i={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},Ct===null?dt.memoizedState=Ct=i:Ct=Ct.next=i}return Ct}function Dl(i,s){return typeof s=="function"?s(i):s}function Yp(i){var s=$r(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var m=kt,g=m.baseQueue,w=d.pending;if(w!==null){if(g!==null){var E=g.next;g.next=w.next,w.next=E}m.baseQueue=g=w,d.pending=null}if(g!==null){w=g.next,m=m.baseState;var M=E=null,D=null,V=w;do{var ie=V.lane;if((Na&ie)===ie)D!==null&&(D=D.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),m=V.hasEagerState?V.eagerState:i(m,V.action);else{var se={lane:ie,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};D===null?(M=D=se,E=m):D=D.next=se,dt.lanes|=ie,Ea|=ie}V=V.next}while(V!==null&&V!==w);D===null?E=m:D.next=M,Jr(m,s.memoizedState)||(fr=!0),s.memoizedState=m,s.baseState=E,s.baseQueue=D,d.lastRenderedState=m}if(i=d.interleaved,i!==null){g=i;do w=g.lane,dt.lanes|=w,Ea|=w,g=g.next;while(g!==i)}else g===null&&(d.lanes=0);return[s.memoizedState,d.dispatch]}function Xp(i){var s=$r(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var m=d.dispatch,g=d.pending,w=s.memoizedState;if(g!==null){d.pending=null;var E=g=g.next;do w=i(w,E.action),E=E.next;while(E!==g);Jr(w,s.memoizedState)||(fr=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),d.lastRenderedState=w}return[w,m]}function sb(){}function lb(i,s){var d=dt,m=$r(),g=s(),w=!Jr(m.memoizedState,g);if(w&&(m.memoizedState=g,fr=!0),m=m.queue,Zp(db.bind(null,d,m,i),[i]),m.getSnapshot!==s||w||Ct!==null&&Ct.memoizedState.tag&1){if(d.flags|=2048,Rl(9,cb.bind(null,d,m,g,s),void 0,null),Ot===null)throw Error(r(349));(Na&30)!==0||ub(d,s,g)}return g}function ub(i,s,d){i.flags|=16384,i={getSnapshot:s,value:d},s=dt.updateQueue,s===null?(s={lastEffect:null,stores:null},dt.updateQueue=s,s.stores=[i]):(d=s.stores,d===null?s.stores=[i]:d.push(i))}function cb(i,s,d,m){s.value=d,s.getSnapshot=m,fb(s)&&hb(i)}function db(i,s,d){return d(function(){fb(s)&&hb(i)})}function fb(i){var s=i.getSnapshot;i=i.value;try{var d=s();return!Jr(i,d)}catch{return!0}}function hb(i){var s=Vn(i,1);s!==null&&an(s,i,1,-1)}function pb(i){var s=yn();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dl,lastRenderedState:i},s.queue=i,i=i.dispatch=v5.bind(null,dt,i),[s.memoizedState,i]}function Rl(i,s,d,m){return i={tag:i,create:s,destroy:d,deps:m,next:null},s=dt.updateQueue,s===null?(s={lastEffect:null,stores:null},dt.updateQueue=s,s.lastEffect=i.next=i):(d=s.lastEffect,d===null?s.lastEffect=i.next=i:(m=d.next,d.next=i,i.next=m,s.lastEffect=i)),i}function mb(){return $r().memoizedState}function Vc(i,s,d,m){var g=yn();dt.flags|=i,g.memoizedState=Rl(1|s,d,void 0,m===void 0?null:m)}function qc(i,s,d,m){var g=$r();m=m===void 0?null:m;var w=void 0;if(kt!==null){var E=kt.memoizedState;if(w=E.destroy,m!==null&&Vp(m,E.deps)){g.memoizedState=Rl(s,d,w,m);return}}dt.flags|=i,g.memoizedState=Rl(1|s,d,w,m)}function vb(i,s){return Vc(8390656,8,i,s)}function Zp(i,s){return qc(2048,8,i,s)}function gb(i,s){return qc(4,2,i,s)}function yb(i,s){return qc(4,4,i,s)}function xb(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function bb(i,s,d){return d=d!=null?d.concat([i]):null,qc(4,4,xb.bind(null,s,i),d)}function Jp(){}function wb(i,s){var d=$r();s=s===void 0?null:s;var m=d.memoizedState;return m!==null&&s!==null&&Vp(s,m[1])?m[0]:(d.memoizedState=[i,s],i)}function kb(i,s){var d=$r();s=s===void 0?null:s;var m=d.memoizedState;return m!==null&&s!==null&&Vp(s,m[1])?m[0]:(i=i(),d.memoizedState=[i,s],i)}function jb(i,s,d){return(Na&21)===0?(i.baseState&&(i.baseState=!1,fr=!0),i.memoizedState=d):(Jr(d,s)||(d=J0(),dt.lanes|=d,Ea|=d,i.baseState=!0),s)}function p5(i,s){var d=Qe;Qe=d!==0&&4>d?d:4,i(!0);var m=Gp.transition;Gp.transition={};try{i(!1),s()}finally{Qe=d,Gp.transition=m}}function Sb(){return $r().memoizedState}function m5(i,s,d){var m=Li(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},Nb(i))Eb(s,d);else if(d=rb(i,s,d,m),d!==null){var g=ir();an(d,i,m,g),Pb(d,s,m)}}function v5(i,s,d){var m=Li(i),g={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(Nb(i))Eb(s,g);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var E=s.lastRenderedState,M=w(E,d);if(g.hasEagerState=!0,g.eagerState=M,Jr(M,E)){var D=s.interleaved;D===null?(g.next=g,Fp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch{}finally{}d=rb(i,s,g,m),d!==null&&(g=ir(),an(d,i,m,g),Pb(d,s,m))}}function Nb(i){var s=i.alternate;return i===dt||s!==null&&s===dt}function Eb(i,s){Il=Gc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function Pb(i,s,d){if((d&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,tp(i,d)}}var Qc={readContext:Rr,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},g5={readContext:Rr,useCallback:function(i,s){return yn().memoizedState=[i,s===void 0?null:s],i},useContext:Rr,useEffect:vb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Vc(4194308,4,xb.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Vc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Vc(4,2,i,s)},useMemo:function(i,s){var d=yn();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var m=yn();return s=d!==void 0?d(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=m5.bind(null,dt,i),[m.memoizedState,i]},useRef:function(i){var s=yn();return i={current:i},s.memoizedState=i},useState:pb,useDebugValue:Jp,useDeferredValue:function(i){return yn().memoizedState=i},useTransition:function(){var i=pb(!1),s=i[0];return i=p5.bind(null,i[1]),yn().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var m=dt,g=yn();if(st){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),Ot===null)throw Error(r(349));(Na&30)!==0||ub(m,s,d)}g.memoizedState=d;var w={value:d,getSnapshot:s};return g.queue=w,vb(db.bind(null,m,w,i),[i]),m.flags|=2048,Rl(9,cb.bind(null,m,w,d,s),void 0,null),d},useId:function(){var i=yn(),s=Ot.identifierPrefix;if(st){var d=Gn,m=Kn;d=(m&~(1<<32-Zr(m)-1)).toString(32)+d,s=":"+s+"R"+d,d=Tl++,0<d&&(s+="H"+d.toString(32)),s+=":"}else d=h5++,s=":"+s+"r"+d.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},y5={readContext:Rr,useCallback:wb,useContext:Rr,useEffect:Zp,useImperativeHandle:bb,useInsertionEffect:gb,useLayoutEffect:yb,useMemo:kb,useReducer:Yp,useRef:mb,useState:function(){return Yp(Dl)},useDebugValue:Jp,useDeferredValue:function(i){var s=$r();return jb(s,kt.memoizedState,i)},useTransition:function(){var i=Yp(Dl)[0],s=$r().memoizedState;return[i,s]},useMutableSource:sb,useSyncExternalStore:lb,useId:Sb,unstable_isNewReconciler:!1},x5={readContext:Rr,useCallback:wb,useContext:Rr,useEffect:Zp,useImperativeHandle:bb,useInsertionEffect:gb,useLayoutEffect:yb,useMemo:kb,useReducer:Xp,useRef:mb,useState:function(){return Xp(Dl)},useDebugValue:Jp,useDeferredValue:function(i){var s=$r();return kt===null?s.memoizedState=i:jb(s,kt.memoizedState,i)},useTransition:function(){var i=Xp(Dl)[0],s=$r().memoizedState;return[i,s]},useMutableSource:sb,useSyncExternalStore:lb,useId:Sb,unstable_isNewReconciler:!1};function tn(i,s){if(i&&i.defaultProps){s=X({},s),i=i.defaultProps;for(var d in i)s[d]===void 0&&(s[d]=i[d]);return s}return s}function em(i,s,d,m){s=i.memoizedState,d=d(m,s),d=d==null?s:X({},s,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var Yc={isMounted:function(i){return(i=i._reactInternals)?ya(i)===i:!1},enqueueSetState:function(i,s,d){i=i._reactInternals;var m=ir(),g=Li(i),w=qn(m,g);w.payload=s,d!=null&&(w.callback=d),s=Ti(i,w,g),s!==null&&(an(s,i,g,m),Uc(s,i,g))},enqueueReplaceState:function(i,s,d){i=i._reactInternals;var m=ir(),g=Li(i),w=qn(m,g);w.tag=1,w.payload=s,d!=null&&(w.callback=d),s=Ti(i,w,g),s!==null&&(an(s,i,g,m),Uc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var d=ir(),m=Li(i),g=qn(d,m);g.tag=2,s!=null&&(g.callback=s),s=Ti(i,g,m),s!==null&&(an(s,i,m,d),Uc(s,i,m))}};function Ab(i,s,d,m,g,w,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,E):s.prototype&&s.prototype.isPureReactComponent?!kl(d,m)||!kl(g,w):!0}function Cb(i,s,d){var m=!1,g=_i,w=s.contextType;return typeof w=="object"&&w!==null?w=Rr(w):(g=dr(s)?ba:Qt.current,m=s.contextTypes,w=(m=m!=null)?Mo(i,g):_i),s=new s(d,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Yc,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=w),s}function Ob(i,s,d,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,m),s.state!==i&&Yc.enqueueReplaceState(s,s.state,null)}function tm(i,s,d,m){var g=i.stateNode;g.props=d,g.state=i.memoizedState,g.refs={},Bp(i);var w=s.contextType;typeof w=="object"&&w!==null?g.context=Rr(w):(w=dr(s)?ba:Qt.current,g.context=Mo(i,w)),g.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(em(i,s,w,d),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Yc.enqueueReplaceState(g,g.state,null),Wc(i,d,g,m),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Fo(i,s){try{var d="",m=s;do d+=te(m),m=m.return;while(m);var g=d}catch(w){g=`
Error generating stack: `+w.message+`
`+w.stack}return{value:i,source:s,stack:g,digest:null}}function rm(i,s,d){return{value:i,source:null,stack:d??null,digest:s??null}}function nm(i,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var b5=typeof WeakMap=="function"?WeakMap:Map;function _b(i,s,d){d=qn(-1,d),d.tag=3,d.payload={element:null};var m=s.value;return d.callback=function(){nd||(nd=!0,ym=m),nm(i,s)},d}function Mb(i,s,d){d=qn(-1,d),d.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var g=s.value;d.payload=function(){return m(g)},d.callback=function(){nm(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){nm(i,s),typeof m!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})}),d}function Ib(i,s,d){var m=i.pingCache;if(m===null){m=i.pingCache=new b5;var g=new Set;m.set(s,g)}else g=m.get(s),g===void 0&&(g=new Set,m.set(s,g));g.has(d)||(g.add(d),i=T5.bind(null,i,s,d),s.then(i,i))}function Tb(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Db(i,s,d,m,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(s=qn(-1,1),s.tag=2,Ti(d,s,1))),d.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var w5=A.ReactCurrentOwner,fr=!1;function nr(i,s,d,m){s.child=i===null?tb(s,null,d,m):Ro(s,i.child,d,m)}function Rb(i,s,d,m,g){d=d.render;var w=s.ref;return Lo(s,g),m=qp(i,s,d,m,w,g),d=Qp(),i!==null&&!fr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Qn(i,s,g)):(st&&d&&_p(s),s.flags|=1,nr(i,s,m,g),s.child)}function $b(i,s,d,m,g){if(i===null){var w=d.type;return typeof w=="function"&&!Nm(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,Lb(i,s,w,m,g)):(i=ud(d.type,null,m,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&g)===0){var E=w.memoizedProps;if(d=d.compare,d=d!==null?d:kl,d(E,m)&&i.ref===s.ref)return Qn(i,s,g)}return s.flags|=1,i=Fi(w,m),i.ref=s.ref,i.return=s,s.child=i}function Lb(i,s,d,m,g){if(i!==null){var w=i.memoizedProps;if(kl(w,m)&&i.ref===s.ref)if(fr=!1,s.pendingProps=m=w,(i.lanes&g)!==0)(i.flags&131072)!==0&&(fr=!0);else return s.lanes=i.lanes,Qn(i,s,g)}return im(i,s,d,m,g)}function zb(i,s,d){var m=s.pendingProps,g=m.children,w=i!==null?i.memoizedState:null;if(m.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(Uo,Er),Er|=d;else{if((d&1073741824)===0)return i=w!==null?w.baseLanes|d:d,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Je(Uo,Er),Er|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:d,Je(Uo,Er),Er|=m}else w!==null?(m=w.baseLanes|d,s.memoizedState=null):m=d,Je(Uo,Er),Er|=m;return nr(i,s,g,d),s.child}function Fb(i,s){var d=s.ref;(i===null&&d!==null||i!==null&&i.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function im(i,s,d,m,g){var w=dr(d)?ba:Qt.current;return w=Mo(s,w),Lo(s,g),d=qp(i,s,d,m,w,g),m=Qp(),i!==null&&!fr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Qn(i,s,g)):(st&&m&&_p(s),s.flags|=1,nr(i,s,d,g),s.child)}function Bb(i,s,d,m,g){if(dr(d)){var w=!0;Tc(s)}else w=!1;if(Lo(s,g),s.stateNode===null)Zc(i,s),Cb(s,d,m),tm(s,d,m,g),m=!0;else if(i===null){var E=s.stateNode,M=s.memoizedProps;E.props=M;var D=E.context,V=d.contextType;typeof V=="object"&&V!==null?V=Rr(V):(V=dr(d)?ba:Qt.current,V=Mo(s,V));var ie=d.getDerivedStateFromProps,se=typeof ie=="function"||typeof E.getSnapshotBeforeUpdate=="function";se||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(M!==m||D!==V)&&Ob(s,E,m,V),Ii=!1;var re=s.memoizedState;E.state=re,Wc(s,m,E,g),D=s.memoizedState,M!==m||re!==D||cr.current||Ii?(typeof ie=="function"&&(em(s,d,ie,m),D=s.memoizedState),(M=Ii||Ab(s,d,M,m,re,D,V))?(se||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=D),E.props=m,E.state=D,E.context=V,m=M):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{E=s.stateNode,nb(i,s),M=s.memoizedProps,V=s.type===s.elementType?M:tn(s.type,M),E.props=V,se=s.pendingProps,re=E.context,D=d.contextType,typeof D=="object"&&D!==null?D=Rr(D):(D=dr(d)?ba:Qt.current,D=Mo(s,D));var ve=d.getDerivedStateFromProps;(ie=typeof ve=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(M!==se||re!==D)&&Ob(s,E,m,D),Ii=!1,re=s.memoizedState,E.state=re,Wc(s,m,E,g);var we=s.memoizedState;M!==se||re!==we||cr.current||Ii?(typeof ve=="function"&&(em(s,d,ve,m),we=s.memoizedState),(V=Ii||Ab(s,d,V,m,re,we,D)||!1)?(ie||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(m,we,D),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(m,we,D)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||M===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=we),E.props=m,E.state=we,E.context=D,m=V):(typeof E.componentDidUpdate!="function"||M===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),m=!1)}return am(i,s,d,m,w,g)}function am(i,s,d,m,g,w){Fb(i,s);var E=(s.flags&128)!==0;if(!m&&!E)return g&&Gx(s,d,!1),Qn(i,s,w);m=s.stateNode,w5.current=s;var M=E&&typeof d.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&E?(s.child=Ro(s,i.child,null,w),s.child=Ro(s,null,M,w)):nr(i,s,M,w),s.memoizedState=m.state,g&&Gx(s,d,!0),s.child}function Ub(i){var s=i.stateNode;s.pendingContext?Hx(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Hx(i,s.context,!1),Up(i,s.containerInfo)}function Wb(i,s,d,m,g){return Do(),Dp(g),s.flags|=256,nr(i,s,d,m),s.child}var om={dehydrated:null,treeContext:null,retryLane:0};function sm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Hb(i,s,d){var m=s.pendingProps,g=ct.current,w=!1,E=(s.flags&128)!==0,M;if((M=E)||(M=i!==null&&i.memoizedState===null?!1:(g&2)!==0),M?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),Je(ct,g&1),i===null)return Tp(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(E=m.children,i=m.fallback,w?(m=s.mode,w=s.child,E={mode:"hidden",children:E},(m&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=E):w=cd(E,m,0,null),i=Oa(i,m,d,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=sm(d),s.memoizedState=om,i):lm(s,E));if(g=i.memoizedState,g!==null&&(M=g.dehydrated,M!==null))return k5(i,s,E,m,M,g,d);if(w){w=m.fallback,E=s.mode,g=i.child,M=g.sibling;var D={mode:"hidden",children:m.children};return(E&1)===0&&s.child!==g?(m=s.child,m.childLanes=0,m.pendingProps=D,s.deletions=null):(m=Fi(g,D),m.subtreeFlags=g.subtreeFlags&14680064),M!==null?w=Fi(M,w):(w=Oa(w,E,d,null),w.flags|=2),w.return=s,m.return=s,m.sibling=w,s.child=m,m=w,w=s.child,E=i.child.memoizedState,E=E===null?sm(d):{baseLanes:E.baseLanes|d,cachePool:null,transitions:E.transitions},w.memoizedState=E,w.childLanes=i.childLanes&~d,s.memoizedState=om,m}return w=i.child,i=w.sibling,m=Fi(w,{mode:"visible",children:m.children}),(s.mode&1)===0&&(m.lanes=d),m.return=s,m.sibling=null,i!==null&&(d=s.deletions,d===null?(s.deletions=[i],s.flags|=16):d.push(i)),s.child=m,s.memoizedState=null,m}function lm(i,s){return s=cd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Xc(i,s,d,m){return m!==null&&Dp(m),Ro(s,i.child,null,d),i=lm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function k5(i,s,d,m,g,w,E){if(d)return s.flags&256?(s.flags&=-257,m=rm(Error(r(422))),Xc(i,s,E,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,g=s.mode,m=cd({mode:"visible",children:m.children},g,0,null),w=Oa(w,g,E,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,(s.mode&1)!==0&&Ro(s,i.child,null,E),s.child.memoizedState=sm(E),s.memoizedState=om,w);if((s.mode&1)===0)return Xc(i,s,E,null);if(g.data==="$!"){if(m=g.nextSibling&&g.nextSibling.dataset,m)var M=m.dgst;return m=M,w=Error(r(419)),m=rm(w,m,void 0),Xc(i,s,E,m)}if(M=(E&i.childLanes)!==0,fr||M){if(m=Ot,m!==null){switch(E&-E){case 4:g=2;break;case 16:g=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(m.suspendedLanes|E))!==0?0:g,g!==0&&g!==w.retryLane&&(w.retryLane=g,Vn(i,g),an(m,i,g,-1))}return Sm(),m=rm(Error(r(421))),Xc(i,s,E,m)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=D5.bind(null,i),g._reactRetry=s,null):(i=w.treeContext,Nr=Ci(g.nextSibling),Sr=s,st=!0,en=null,i!==null&&(Tr[Dr++]=Kn,Tr[Dr++]=Gn,Tr[Dr++]=wa,Kn=i.id,Gn=i.overflow,wa=s),s=lm(s,m.children),s.flags|=4096,s)}function Kb(i,s,d){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),zp(i.return,s,d)}function um(i,s,d,m,g){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:g}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=d,w.tailMode=g)}function Gb(i,s,d){var m=s.pendingProps,g=m.revealOrder,w=m.tail;if(nr(i,s,m.children,d),m=ct.current,(m&2)!==0)m=m&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Kb(i,d,s);else if(i.tag===19)Kb(i,d,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(Je(ct,m),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(d=s.child,g=null;d!==null;)i=d.alternate,i!==null&&Hc(i)===null&&(g=d),d=d.sibling;d=g,d===null?(g=s.child,s.child=null):(g=d.sibling,d.sibling=null),um(s,!1,g,d,w);break;case"backwards":for(d=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Hc(i)===null){s.child=g;break}i=g.sibling,g.sibling=d,d=g,g=i}um(s,!0,d,null,w);break;case"together":um(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Zc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Qn(i,s,d){if(i!==null&&(s.dependencies=i.dependencies),Ea|=s.lanes,(d&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,d=Fi(i,i.pendingProps),s.child=d,d.return=s;i.sibling!==null;)i=i.sibling,d=d.sibling=Fi(i,i.pendingProps),d.return=s;d.sibling=null}return s.child}function j5(i,s,d){switch(s.tag){case 3:Ub(s),Do();break;case 5:ob(s);break;case 1:dr(s.type)&&Tc(s);break;case 4:Up(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,g=s.memoizedProps.value;Je(Fc,m._currentValue),m._currentValue=g;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(Je(ct,ct.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?Hb(i,s,d):(Je(ct,ct.current&1),i=Qn(i,s,d),i!==null?i.sibling:null);Je(ct,ct.current&1);break;case 19:if(m=(d&s.childLanes)!==0,(i.flags&128)!==0){if(m)return Gb(i,s,d);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Je(ct,ct.current),m)break;return null;case 22:case 23:return s.lanes=0,zb(i,s,d)}return Qn(i,s,d)}var Vb,cm,qb,Qb;Vb=function(i,s){for(var d=s.child;d!==null;){if(d.tag===5||d.tag===6)i.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===s)break;for(;d.sibling===null;){if(d.return===null||d.return===s)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},cm=function(){},qb=function(i,s,d,m){var g=i.memoizedProps;if(g!==m){i=s.stateNode,Sa(gn.current);var w=null;switch(d){case"input":g=Y(i,g),m=Y(i,m),w=[];break;case"select":g=X({},g,{value:void 0}),m=X({},m,{value:void 0}),w=[];break;case"textarea":g=wo(i,g),m=wo(i,m),w=[];break;default:typeof g.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=_c)}fe(d,m);var E;d=null;for(V in g)if(!m.hasOwnProperty(V)&&g.hasOwnProperty(V)&&g[V]!=null)if(V==="style"){var M=g[V];for(E in M)M.hasOwnProperty(E)&&(d||(d={}),d[E]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(a.hasOwnProperty(V)?w||(w=[]):(w=w||[]).push(V,null));for(V in m){var D=m[V];if(M=g!=null?g[V]:void 0,m.hasOwnProperty(V)&&D!==M&&(D!=null||M!=null))if(V==="style")if(M){for(E in M)!M.hasOwnProperty(E)||D&&D.hasOwnProperty(E)||(d||(d={}),d[E]="");for(E in D)D.hasOwnProperty(E)&&M[E]!==D[E]&&(d||(d={}),d[E]=D[E])}else d||(w||(w=[]),w.push(V,d)),d=D;else V==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,M=M?M.__html:void 0,D!=null&&M!==D&&(w=w||[]).push(V,D)):V==="children"?typeof D!="string"&&typeof D!="number"||(w=w||[]).push(V,""+D):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(a.hasOwnProperty(V)?(D!=null&&V==="onScroll"&&rt("scroll",i),w||M===D||(w=[])):(w=w||[]).push(V,D))}d&&(w=w||[]).push("style",d);var V=w;(s.updateQueue=V)&&(s.flags|=4)}},Qb=function(i,s,d,m){d!==m&&(s.flags|=4)};function $l(i,s){if(!st)switch(i.tailMode){case"hidden":s=i.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function Xt(i){var s=i.alternate!==null&&i.alternate.child===i.child,d=0,m=0;if(s)for(var g=i.child;g!==null;)d|=g.lanes|g.childLanes,m|=g.subtreeFlags&14680064,m|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)d|=g.lanes|g.childLanes,m|=g.subtreeFlags,m|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=m,i.childLanes=d,s}function S5(i,s,d){var m=s.pendingProps;switch(Mp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(s),null;case 1:return dr(s.type)&&Ic(),Xt(s),null;case 3:return m=s.stateNode,zo(),nt(cr),nt(Qt),Kp(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(Lc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,en!==null&&(wm(en),en=null))),cm(i,s),Xt(s),null;case 5:Wp(s);var g=Sa(Ml.current);if(d=s.type,i!==null&&s.stateNode!=null)qb(i,s,d,m,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(r(166));return Xt(s),null}if(i=Sa(gn.current),Lc(s)){m=s.stateNode,d=s.type;var w=s.memoizedProps;switch(m[vn]=s,m[Pl]=w,i=(s.mode&1)!==0,d){case"dialog":rt("cancel",m),rt("close",m);break;case"iframe":case"object":case"embed":rt("load",m);break;case"video":case"audio":for(g=0;g<Sl.length;g++)rt(Sl[g],m);break;case"source":rt("error",m);break;case"img":case"image":case"link":rt("error",m),rt("load",m);break;case"details":rt("toggle",m);break;case"input":ce(m,w),rt("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},rt("invalid",m);break;case"textarea":Js(m,w),rt("invalid",m)}fe(d,w),g=null;for(var E in w)if(w.hasOwnProperty(E)){var M=w[E];E==="children"?typeof M=="string"?m.textContent!==M&&(w.suppressHydrationWarning!==!0&&Oc(m.textContent,M,i),g=["children",M]):typeof M=="number"&&m.textContent!==""+M&&(w.suppressHydrationWarning!==!0&&Oc(m.textContent,M,i),g=["children",""+M]):a.hasOwnProperty(E)&&M!=null&&E==="onScroll"&&rt("scroll",m)}switch(d){case"input":Oe(m),pa(m,w,!0);break;case"textarea":Oe(m),tl(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=_c)}m=g,s.updateQueue=m,m!==null&&(s.flags|=4)}else{E=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=bi(d)),i==="http://www.w3.org/1999/xhtml"?d==="script"?(i=E.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=E.createElement(d,{is:m.is}):(i=E.createElement(d),d==="select"&&(E=i,m.multiple?E.multiple=!0:m.size&&(E.size=m.size))):i=E.createElementNS(i,d),i[vn]=s,i[Pl]=m,Vb(i,s,!1,!1),s.stateNode=i;e:{switch(E=Pe(d,m),d){case"dialog":rt("cancel",i),rt("close",i),g=m;break;case"iframe":case"object":case"embed":rt("load",i),g=m;break;case"video":case"audio":for(g=0;g<Sl.length;g++)rt(Sl[g],i);g=m;break;case"source":rt("error",i),g=m;break;case"img":case"image":case"link":rt("error",i),rt("load",i),g=m;break;case"details":rt("toggle",i),g=m;break;case"input":ce(i,m),g=Y(i,m),rt("invalid",i);break;case"option":g=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},g=X({},m,{value:void 0}),rt("invalid",i);break;case"textarea":Js(i,m),g=wo(i,m),rt("invalid",i);break;default:g=m}fe(d,g),M=g;for(w in M)if(M.hasOwnProperty(w)){var D=M[w];w==="style"?il(i,D):w==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&rl(i,D)):w==="children"?typeof D=="string"?(d!=="textarea"||D!=="")&&wi(i,D):typeof D=="number"&&wi(i,""+D):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(a.hasOwnProperty(w)?D!=null&&w==="onScroll"&&rt("scroll",i):D!=null&&O(i,w,D,E))}switch(d){case"input":Oe(i),pa(i,m,!1);break;case"textarea":Oe(i),tl(i);break;case"option":m.value!=null&&i.setAttribute("value",""+Ce(m.value));break;case"select":i.multiple=!!m.multiple,w=m.value,w!=null?Un(i,!!m.multiple,w,!1):m.defaultValue!=null&&Un(i,!!m.multiple,m.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=_c)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Xt(s),null;case 6:if(i&&s.stateNode!=null)Qb(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(r(166));if(d=Sa(Ml.current),Sa(gn.current),Lc(s)){if(m=s.stateNode,d=s.memoizedProps,m[vn]=s,(w=m.nodeValue!==d)&&(i=Sr,i!==null))switch(i.tag){case 3:Oc(m.nodeValue,d,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Oc(m.nodeValue,d,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[vn]=s,s.stateNode=m}return Xt(s),null;case 13:if(nt(ct),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(st&&Nr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Zx(),Do(),s.flags|=98560,w=!1;else if(w=Lc(s),m!==null&&m.dehydrated!==null){if(i===null){if(!w)throw Error(r(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[vn]=s}else Do(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Xt(s),w=!1}else en!==null&&(wm(en),en=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=d,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(ct.current&1)!==0?jt===0&&(jt=3):Sm())),s.updateQueue!==null&&(s.flags|=4),Xt(s),null);case 4:return zo(),cm(i,s),i===null&&Nl(s.stateNode.containerInfo),Xt(s),null;case 10:return Lp(s.type._context),Xt(s),null;case 17:return dr(s.type)&&Ic(),Xt(s),null;case 19:if(nt(ct),w=s.memoizedState,w===null)return Xt(s),null;if(m=(s.flags&128)!==0,E=w.rendering,E===null)if(m)$l(w,!1);else{if(jt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=Hc(i),E!==null){for(s.flags|=128,$l(w,!1),m=E.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=d,d=s.child;d!==null;)w=d,i=m,w.flags&=14680066,E=w.alternate,E===null?(w.childLanes=0,w.lanes=i,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=E.childLanes,w.lanes=E.lanes,w.child=E.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=E.memoizedProps,w.memoizedState=E.memoizedState,w.updateQueue=E.updateQueue,w.type=E.type,i=E.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),d=d.sibling;return Je(ct,ct.current&1|2),s.child}i=i.sibling}w.tail!==null&&gt()>Wo&&(s.flags|=128,m=!0,$l(w,!1),s.lanes=4194304)}else{if(!m)if(i=Hc(E),i!==null){if(s.flags|=128,m=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),$l(w,!0),w.tail===null&&w.tailMode==="hidden"&&!E.alternate&&!st)return Xt(s),null}else 2*gt()-w.renderingStartTime>Wo&&d!==1073741824&&(s.flags|=128,m=!0,$l(w,!1),s.lanes=4194304);w.isBackwards?(E.sibling=s.child,s.child=E):(d=w.last,d!==null?d.sibling=E:s.child=E,w.last=E)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=gt(),s.sibling=null,d=ct.current,Je(ct,m?d&1|2:d&1),s):(Xt(s),null);case 22:case 23:return jm(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(Er&1073741824)!==0&&(Xt(s),s.subtreeFlags&6&&(s.flags|=8192)):Xt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function N5(i,s){switch(Mp(s),s.tag){case 1:return dr(s.type)&&Ic(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return zo(),nt(cr),nt(Qt),Kp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Wp(s),null;case 13:if(nt(ct),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Do()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return nt(ct),null;case 4:return zo(),null;case 10:return Lp(s.type._context),null;case 22:case 23:return jm(),null;case 24:return null;default:return null}}var Jc=!1,Zt=!1,E5=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Bo(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){ft(i,s,m)}else d.current=null}function dm(i,s,d){try{d()}catch(m){ft(i,s,m)}}var Yb=!1;function P5(i,s){if(jp=xc,i=Ax(),mp(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var g=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var E=0,M=-1,D=-1,V=0,ie=0,se=i,re=null;t:for(;;){for(var ve;se!==d||g!==0&&se.nodeType!==3||(M=E+g),se!==w||m!==0&&se.nodeType!==3||(D=E+m),se.nodeType===3&&(E+=se.nodeValue.length),(ve=se.firstChild)!==null;)re=se,se=ve;for(;;){if(se===i)break t;if(re===d&&++V===g&&(M=E),re===w&&++ie===m&&(D=E),(ve=se.nextSibling)!==null)break;se=re,re=se.parentNode}se=ve}d=M===-1||D===-1?null:{start:M,end:D}}else d=null}d=d||{start:0,end:0}}else d=null;for(Sp={focusedElem:i,selectionRange:d},xc=!1,xe=s;xe!==null;)if(s=xe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,xe=i;else for(;xe!==null;){s=xe;try{var we=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Se=we.memoizedProps,yt=we.memoizedState,W=s.stateNode,z=W.getSnapshotBeforeUpdate(s.elementType===s.type?Se:tn(s.type,Se),yt);W.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var H=s.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(le){ft(s,s.return,le)}if(i=s.sibling,i!==null){i.return=s.return,xe=i;break}xe=s.return}return we=Yb,Yb=!1,we}function Ll(i,s,d){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var g=m=m.next;do{if((g.tag&i)===i){var w=g.destroy;g.destroy=void 0,w!==void 0&&dm(s,d,w)}g=g.next}while(g!==m)}}function ed(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==s)}}function fm(i){var s=i.ref;if(s!==null){var d=i.stateNode;switch(i.tag){case 5:i=d;break;default:i=d}typeof s=="function"?s(i):s.current=i}}function Xb(i){var s=i.alternate;s!==null&&(i.alternate=null,Xb(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[vn],delete s[Pl],delete s[Ap],delete s[u5],delete s[c5])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Zb(i){return i.tag===5||i.tag===3||i.tag===4}function Jb(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Zb(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function hm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(i,s):d.insertBefore(i,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(i,d)):(s=d,s.appendChild(i)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=_c));else if(m!==4&&(i=i.child,i!==null))for(hm(i,s,d),i=i.sibling;i!==null;)hm(i,s,d),i=i.sibling}function pm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(pm(i,s,d),i=i.sibling;i!==null;)pm(i,s,d),i=i.sibling}var Lt=null,rn=!1;function Di(i,s,d){for(d=d.child;d!==null;)e1(i,s,d),d=d.sibling}function e1(i,s,d){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount(hc,d)}catch{}switch(d.tag){case 5:Zt||Bo(d,s);case 6:var m=Lt,g=rn;Lt=null,Di(i,s,d),Lt=m,rn=g,Lt!==null&&(rn?(i=Lt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Lt.removeChild(d.stateNode));break;case 18:Lt!==null&&(rn?(i=Lt,d=d.stateNode,i.nodeType===8?Pp(i.parentNode,d):i.nodeType===1&&Pp(i,d),vl(i)):Pp(Lt,d.stateNode));break;case 4:m=Lt,g=rn,Lt=d.stateNode.containerInfo,rn=!0,Di(i,s,d),Lt=m,rn=g;break;case 0:case 11:case 14:case 15:if(!Zt&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){g=m=m.next;do{var w=g,E=w.destroy;w=w.tag,E!==void 0&&((w&2)!==0||(w&4)!==0)&&dm(d,s,E),g=g.next}while(g!==m)}Di(i,s,d);break;case 1:if(!Zt&&(Bo(d,s),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(M){ft(d,s,M)}Di(i,s,d);break;case 21:Di(i,s,d);break;case 22:d.mode&1?(Zt=(m=Zt)||d.memoizedState!==null,Di(i,s,d),Zt=m):Di(i,s,d);break;default:Di(i,s,d)}}function t1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new E5),s.forEach(function(m){var g=R5.bind(null,i,m);d.has(m)||(d.add(m),m.then(g,g))})}}function nn(i,s){var d=s.deletions;if(d!==null)for(var m=0;m<d.length;m++){var g=d[m];try{var w=i,E=s,M=E;e:for(;M!==null;){switch(M.tag){case 5:Lt=M.stateNode,rn=!1;break e;case 3:Lt=M.stateNode.containerInfo,rn=!0;break e;case 4:Lt=M.stateNode.containerInfo,rn=!0;break e}M=M.return}if(Lt===null)throw Error(r(160));e1(w,E,g),Lt=null,rn=!1;var D=g.alternate;D!==null&&(D.return=null),g.return=null}catch(V){ft(g,s,V)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)r1(s,i),s=s.sibling}function r1(i,s){var d=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(nn(s,i),xn(i),m&4){try{Ll(3,i,i.return),ed(3,i)}catch(Se){ft(i,i.return,Se)}try{Ll(5,i,i.return)}catch(Se){ft(i,i.return,Se)}}break;case 1:nn(s,i),xn(i),m&512&&d!==null&&Bo(d,d.return);break;case 5:if(nn(s,i),xn(i),m&512&&d!==null&&Bo(d,d.return),i.flags&32){var g=i.stateNode;try{wi(g,"")}catch(Se){ft(i,i.return,Se)}}if(m&4&&(g=i.stateNode,g!=null)){var w=i.memoizedProps,E=d!==null?d.memoizedProps:w,M=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{M==="input"&&w.type==="radio"&&w.name!=null&&tt(g,w),Pe(M,E);var V=Pe(M,w);for(E=0;E<D.length;E+=2){var ie=D[E],se=D[E+1];ie==="style"?il(g,se):ie==="dangerouslySetInnerHTML"?rl(g,se):ie==="children"?wi(g,se):O(g,ie,se,V)}switch(M){case"input":kr(g,w);break;case"textarea":el(g,w);break;case"select":var re=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!w.multiple;var ve=w.value;ve!=null?Un(g,!!w.multiple,ve,!1):re!==!!w.multiple&&(w.defaultValue!=null?Un(g,!!w.multiple,w.defaultValue,!0):Un(g,!!w.multiple,w.multiple?[]:"",!1))}g[Pl]=w}catch(Se){ft(i,i.return,Se)}}break;case 6:if(nn(s,i),xn(i),m&4){if(i.stateNode===null)throw Error(r(162));g=i.stateNode,w=i.memoizedProps;try{g.nodeValue=w}catch(Se){ft(i,i.return,Se)}}break;case 3:if(nn(s,i),xn(i),m&4&&d!==null&&d.memoizedState.isDehydrated)try{vl(s.containerInfo)}catch(Se){ft(i,i.return,Se)}break;case 4:nn(s,i),xn(i);break;case 13:nn(s,i),xn(i),g=i.child,g.flags&8192&&(w=g.memoizedState!==null,g.stateNode.isHidden=w,!w||g.alternate!==null&&g.alternate.memoizedState!==null||(gm=gt())),m&4&&t1(i);break;case 22:if(ie=d!==null&&d.memoizedState!==null,i.mode&1?(Zt=(V=Zt)||ie,nn(s,i),Zt=V):nn(s,i),xn(i),m&8192){if(V=i.memoizedState!==null,(i.stateNode.isHidden=V)&&!ie&&(i.mode&1)!==0)for(xe=i,ie=i.child;ie!==null;){for(se=xe=ie;xe!==null;){switch(re=xe,ve=re.child,re.tag){case 0:case 11:case 14:case 15:Ll(4,re,re.return);break;case 1:Bo(re,re.return);var we=re.stateNode;if(typeof we.componentWillUnmount=="function"){m=re,d=re.return;try{s=m,we.props=s.memoizedProps,we.state=s.memoizedState,we.componentWillUnmount()}catch(Se){ft(m,d,Se)}}break;case 5:Bo(re,re.return);break;case 22:if(re.memoizedState!==null){a1(se);continue}}ve!==null?(ve.return=re,xe=ve):a1(se)}ie=ie.sibling}e:for(ie=null,se=i;;){if(se.tag===5){if(ie===null){ie=se;try{g=se.stateNode,V?(w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(M=se.stateNode,D=se.memoizedProps.style,E=D!=null&&D.hasOwnProperty("display")?D.display:null,M.style.display=nl("display",E))}catch(Se){ft(i,i.return,Se)}}}else if(se.tag===6){if(ie===null)try{se.stateNode.nodeValue=V?"":se.memoizedProps}catch(Se){ft(i,i.return,Se)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===i)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===i)break e;for(;se.sibling===null;){if(se.return===null||se.return===i)break e;ie===se&&(ie=null),se=se.return}ie===se&&(ie=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:nn(s,i),xn(i),m&4&&t1(i);break;case 21:break;default:nn(s,i),xn(i)}}function xn(i){var s=i.flags;if(s&2){try{e:{for(var d=i.return;d!==null;){if(Zb(d)){var m=d;break e}d=d.return}throw Error(r(160))}switch(m.tag){case 5:var g=m.stateNode;m.flags&32&&(wi(g,""),m.flags&=-33);var w=Jb(i);pm(i,w,g);break;case 3:case 4:var E=m.stateNode.containerInfo,M=Jb(i);hm(i,M,E);break;default:throw Error(r(161))}}catch(D){ft(i,i.return,D)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function A5(i,s,d){xe=i,n1(i)}function n1(i,s,d){for(var m=(i.mode&1)!==0;xe!==null;){var g=xe,w=g.child;if(g.tag===22&&m){var E=g.memoizedState!==null||Jc;if(!E){var M=g.alternate,D=M!==null&&M.memoizedState!==null||Zt;M=Jc;var V=Zt;if(Jc=E,(Zt=D)&&!V)for(xe=g;xe!==null;)E=xe,D=E.child,E.tag===22&&E.memoizedState!==null?o1(g):D!==null?(D.return=E,xe=D):o1(g);for(;w!==null;)xe=w,n1(w),w=w.sibling;xe=g,Jc=M,Zt=V}i1(i)}else(g.subtreeFlags&8772)!==0&&w!==null?(w.return=g,xe=w):i1(i)}}function i1(i){for(;xe!==null;){var s=xe;if((s.flags&8772)!==0){var d=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Zt||ed(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!Zt)if(d===null)m.componentDidMount();else{var g=s.elementType===s.type?d.memoizedProps:tn(s.type,d.memoizedProps);m.componentDidUpdate(g,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&ab(s,w,m);break;case 3:var E=s.updateQueue;if(E!==null){if(d=null,s.child!==null)switch(s.child.tag){case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}ab(s,E,d)}break;case 5:var M=s.stateNode;if(d===null&&s.flags&4){d=M;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&d.focus();break;case"img":D.src&&(d.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var V=s.alternate;if(V!==null){var ie=V.memoizedState;if(ie!==null){var se=ie.dehydrated;se!==null&&vl(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Zt||s.flags&512&&fm(s)}catch(re){ft(s,s.return,re)}}if(s===i){xe=null;break}if(d=s.sibling,d!==null){d.return=s.return,xe=d;break}xe=s.return}}function a1(i){for(;xe!==null;){var s=xe;if(s===i){xe=null;break}var d=s.sibling;if(d!==null){d.return=s.return,xe=d;break}xe=s.return}}function o1(i){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var d=s.return;try{ed(4,s)}catch(D){ft(s,d,D)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var g=s.return;try{m.componentDidMount()}catch(D){ft(s,g,D)}}var w=s.return;try{fm(s)}catch(D){ft(s,w,D)}break;case 5:var E=s.return;try{fm(s)}catch(D){ft(s,E,D)}}}catch(D){ft(s,s.return,D)}if(s===i){xe=null;break}var M=s.sibling;if(M!==null){M.return=s.return,xe=M;break}xe=s.return}}var C5=Math.ceil,td=A.ReactCurrentDispatcher,mm=A.ReactCurrentOwner,Lr=A.ReactCurrentBatchConfig,He=0,Ot=null,xt=null,zt=0,Er=0,Uo=Oi(0),jt=0,zl=null,Ea=0,rd=0,vm=0,Fl=null,hr=null,gm=0,Wo=1/0,Yn=null,nd=!1,ym=null,Ri=null,id=!1,$i=null,ad=0,Bl=0,xm=null,od=-1,sd=0;function ir(){return(He&6)!==0?gt():od!==-1?od:od=gt()}function Li(i){return(i.mode&1)===0?1:(He&2)!==0&&zt!==0?zt&-zt:f5.transition!==null?(sd===0&&(sd=J0()),sd):(i=Qe,i!==0||(i=window.event,i=i===void 0?16:lx(i.type)),i)}function an(i,s,d,m){if(50<Bl)throw Bl=0,xm=null,Error(r(185));dl(i,d,m),((He&2)===0||i!==Ot)&&(i===Ot&&((He&2)===0&&(rd|=d),jt===4&&zi(i,zt)),pr(i,m),d===1&&He===0&&(s.mode&1)===0&&(Wo=gt()+500,Dc&&Mi()))}function pr(i,s){var d=i.callbackNode;f_(i,s);var m=vc(i,i===Ot?zt:0);if(m===0)d!==null&&Y0(d),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(d!=null&&Y0(d),s===1)i.tag===0?d5(l1.bind(null,i)):Vx(l1.bind(null,i)),s5(function(){(He&6)===0&&Mi()}),d=null;else{switch(ex(m)){case 1:d=Zh;break;case 4:d=X0;break;case 16:d=fc;break;case 536870912:d=Z0;break;default:d=fc}d=v1(d,s1.bind(null,i))}i.callbackPriority=s,i.callbackNode=d}}function s1(i,s){if(od=-1,sd=0,(He&6)!==0)throw Error(r(327));var d=i.callbackNode;if(Ho()&&i.callbackNode!==d)return null;var m=vc(i,i===Ot?zt:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=ld(i,m);else{s=m;var g=He;He|=2;var w=c1();(Ot!==i||zt!==s)&&(Yn=null,Wo=gt()+500,Aa(i,s));do try{M5();break}catch(M){u1(i,M)}while(!0);$p(),td.current=w,He=g,xt!==null?s=0:(Ot=null,zt=0,s=jt)}if(s!==0){if(s===2&&(g=Jh(i),g!==0&&(m=g,s=bm(i,g))),s===1)throw d=zl,Aa(i,0),zi(i,m),pr(i,gt()),d;if(s===6)zi(i,m);else{if(g=i.current.alternate,(m&30)===0&&!O5(g)&&(s=ld(i,m),s===2&&(w=Jh(i),w!==0&&(m=w,s=bm(i,w))),s===1))throw d=zl,Aa(i,0),zi(i,m),pr(i,gt()),d;switch(i.finishedWork=g,i.finishedLanes=m,s){case 0:case 1:throw Error(r(345));case 2:Ca(i,hr,Yn);break;case 3:if(zi(i,m),(m&130023424)===m&&(s=gm+500-gt(),10<s)){if(vc(i,0)!==0)break;if(g=i.suspendedLanes,(g&m)!==m){ir(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Ep(Ca.bind(null,i,hr,Yn),s);break}Ca(i,hr,Yn);break;case 4:if(zi(i,m),(m&4194240)===m)break;for(s=i.eventTimes,g=-1;0<m;){var E=31-Zr(m);w=1<<E,E=s[E],E>g&&(g=E),m&=~w}if(m=g,m=gt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*C5(m/1960))-m,10<m){i.timeoutHandle=Ep(Ca.bind(null,i,hr,Yn),m);break}Ca(i,hr,Yn);break;case 5:Ca(i,hr,Yn);break;default:throw Error(r(329))}}}return pr(i,gt()),i.callbackNode===d?s1.bind(null,i):null}function bm(i,s){var d=Fl;return i.current.memoizedState.isDehydrated&&(Aa(i,s).flags|=256),i=ld(i,s),i!==2&&(s=hr,hr=d,s!==null&&wm(s)),i}function wm(i){hr===null?hr=i:hr.push.apply(hr,i)}function O5(i){for(var s=i;;){if(s.flags&16384){var d=s.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var g=d[m],w=g.getSnapshot;g=g.value;try{if(!Jr(w(),g))return!1}catch{return!1}}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function zi(i,s){for(s&=~vm,s&=~rd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var d=31-Zr(s),m=1<<d;i[d]=-1,s&=~m}}function l1(i){if((He&6)!==0)throw Error(r(327));Ho();var s=vc(i,0);if((s&1)===0)return pr(i,gt()),null;var d=ld(i,s);if(i.tag!==0&&d===2){var m=Jh(i);m!==0&&(s=m,d=bm(i,m))}if(d===1)throw d=zl,Aa(i,0),zi(i,s),pr(i,gt()),d;if(d===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Ca(i,hr,Yn),pr(i,gt()),null}function km(i,s){var d=He;He|=1;try{return i(s)}finally{He=d,He===0&&(Wo=gt()+500,Dc&&Mi())}}function Pa(i){$i!==null&&$i.tag===0&&(He&6)===0&&Ho();var s=He;He|=1;var d=Lr.transition,m=Qe;try{if(Lr.transition=null,Qe=1,i)return i()}finally{Qe=m,Lr.transition=d,He=s,(He&6)===0&&Mi()}}function jm(){Er=Uo.current,nt(Uo)}function Aa(i,s){i.finishedWork=null,i.finishedLanes=0;var d=i.timeoutHandle;if(d!==-1&&(i.timeoutHandle=-1,o5(d)),xt!==null)for(d=xt.return;d!==null;){var m=d;switch(Mp(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Ic();break;case 3:zo(),nt(cr),nt(Qt),Kp();break;case 5:Wp(m);break;case 4:zo();break;case 13:nt(ct);break;case 19:nt(ct);break;case 10:Lp(m.type._context);break;case 22:case 23:jm()}d=d.return}if(Ot=i,xt=i=Fi(i.current,null),zt=Er=s,jt=0,zl=null,vm=rd=Ea=0,hr=Fl=null,ja!==null){for(s=0;s<ja.length;s++)if(d=ja[s],m=d.interleaved,m!==null){d.interleaved=null;var g=m.next,w=d.pending;if(w!==null){var E=w.next;w.next=g,m.next=E}d.pending=m}ja=null}return i}function u1(i,s){do{var d=xt;try{if($p(),Kc.current=Qc,Gc){for(var m=dt.memoizedState;m!==null;){var g=m.queue;g!==null&&(g.pending=null),m=m.next}Gc=!1}if(Na=0,Ct=kt=dt=null,Il=!1,Tl=0,mm.current=null,d===null||d.return===null){jt=1,zl=s,xt=null;break}e:{var w=i,E=d.return,M=d,D=s;if(s=zt,M.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var V=D,ie=M,se=ie.tag;if((ie.mode&1)===0&&(se===0||se===11||se===15)){var re=ie.alternate;re?(ie.updateQueue=re.updateQueue,ie.memoizedState=re.memoizedState,ie.lanes=re.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var ve=Tb(E);if(ve!==null){ve.flags&=-257,Db(ve,E,M,w,s),ve.mode&1&&Ib(w,V,s),s=ve,D=V;var we=s.updateQueue;if(we===null){var Se=new Set;Se.add(D),s.updateQueue=Se}else we.add(D);break e}else{if((s&1)===0){Ib(w,V,s),Sm();break e}D=Error(r(426))}}else if(st&&M.mode&1){var yt=Tb(E);if(yt!==null){(yt.flags&65536)===0&&(yt.flags|=256),Db(yt,E,M,w,s),Dp(Fo(D,M));break e}}w=D=Fo(D,M),jt!==4&&(jt=2),Fl===null?Fl=[w]:Fl.push(w),w=E;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var W=_b(w,D,s);ib(w,W);break e;case 1:M=D;var z=w.type,H=w.stateNode;if((w.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(Ri===null||!Ri.has(H)))){w.flags|=65536,s&=-s,w.lanes|=s;var le=Mb(w,M,s);ib(w,le);break e}}w=w.return}while(w!==null)}f1(d)}catch(Ee){s=Ee,xt===d&&d!==null&&(xt=d=d.return);continue}break}while(!0)}function c1(){var i=td.current;return td.current=Qc,i===null?Qc:i}function Sm(){(jt===0||jt===3||jt===2)&&(jt=4),Ot===null||(Ea&268435455)===0&&(rd&268435455)===0||zi(Ot,zt)}function ld(i,s){var d=He;He|=2;var m=c1();(Ot!==i||zt!==s)&&(Yn=null,Aa(i,s));do try{_5();break}catch(g){u1(i,g)}while(!0);if($p(),He=d,td.current=m,xt!==null)throw Error(r(261));return Ot=null,zt=0,jt}function _5(){for(;xt!==null;)d1(xt)}function M5(){for(;xt!==null&&!n_();)d1(xt)}function d1(i){var s=m1(i.alternate,i,Er);i.memoizedProps=i.pendingProps,s===null?f1(i):xt=s,mm.current=null}function f1(i){var s=i;do{var d=s.alternate;if(i=s.return,(s.flags&32768)===0){if(d=S5(d,s,Er),d!==null){xt=d;return}}else{if(d=N5(d,s),d!==null){d.flags&=32767,xt=d;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{jt=6,xt=null;return}}if(s=s.sibling,s!==null){xt=s;return}xt=s=i}while(s!==null);jt===0&&(jt=5)}function Ca(i,s,d){var m=Qe,g=Lr.transition;try{Lr.transition=null,Qe=1,I5(i,s,d,m)}finally{Lr.transition=g,Qe=m}return null}function I5(i,s,d,m){do Ho();while($i!==null);if((He&6)!==0)throw Error(r(327));d=i.finishedWork;var g=i.finishedLanes;if(d===null)return null;if(i.finishedWork=null,i.finishedLanes=0,d===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0;var w=d.lanes|d.childLanes;if(h_(i,w),i===Ot&&(xt=Ot=null,zt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||id||(id=!0,v1(fc,function(){return Ho(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Lr.transition,Lr.transition=null;var E=Qe;Qe=1;var M=He;He|=4,mm.current=null,P5(i,d),r1(d,i),J_(Sp),xc=!!jp,Sp=jp=null,i.current=d,A5(d),i_(),He=M,Qe=E,Lr.transition=w}else i.current=d;if(id&&(id=!1,$i=i,ad=g),w=i.pendingLanes,w===0&&(Ri=null),s_(d.stateNode),pr(i,gt()),s!==null)for(m=i.onRecoverableError,d=0;d<s.length;d++)g=s[d],m(g.value,{componentStack:g.stack,digest:g.digest});if(nd)throw nd=!1,i=ym,ym=null,i;return(ad&1)!==0&&i.tag!==0&&Ho(),w=i.pendingLanes,(w&1)!==0?i===xm?Bl++:(Bl=0,xm=i):Bl=0,Mi(),null}function Ho(){if($i!==null){var i=ex(ad),s=Lr.transition,d=Qe;try{if(Lr.transition=null,Qe=16>i?16:i,$i===null)var m=!1;else{if(i=$i,$i=null,ad=0,(He&6)!==0)throw Error(r(331));var g=He;for(He|=4,xe=i.current;xe!==null;){var w=xe,E=w.child;if((xe.flags&16)!==0){var M=w.deletions;if(M!==null){for(var D=0;D<M.length;D++){var V=M[D];for(xe=V;xe!==null;){var ie=xe;switch(ie.tag){case 0:case 11:case 15:Ll(8,ie,w)}var se=ie.child;if(se!==null)se.return=ie,xe=se;else for(;xe!==null;){ie=xe;var re=ie.sibling,ve=ie.return;if(Xb(ie),ie===V){xe=null;break}if(re!==null){re.return=ve,xe=re;break}xe=ve}}}var we=w.alternate;if(we!==null){var Se=we.child;if(Se!==null){we.child=null;do{var yt=Se.sibling;Se.sibling=null,Se=yt}while(Se!==null)}}xe=w}}if((w.subtreeFlags&2064)!==0&&E!==null)E.return=w,xe=E;else e:for(;xe!==null;){if(w=xe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Ll(9,w,w.return)}var W=w.sibling;if(W!==null){W.return=w.return,xe=W;break e}xe=w.return}}var z=i.current;for(xe=z;xe!==null;){E=xe;var H=E.child;if((E.subtreeFlags&2064)!==0&&H!==null)H.return=E,xe=H;else e:for(E=z;xe!==null;){if(M=xe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:ed(9,M)}}catch(Ee){ft(M,M.return,Ee)}if(M===E){xe=null;break e}var le=M.sibling;if(le!==null){le.return=M.return,xe=le;break e}xe=M.return}}if(He=g,Mi(),mn&&typeof mn.onPostCommitFiberRoot=="function")try{mn.onPostCommitFiberRoot(hc,i)}catch{}m=!0}return m}finally{Qe=d,Lr.transition=s}}return!1}function h1(i,s,d){s=Fo(d,s),s=_b(i,s,1),i=Ti(i,s,1),s=ir(),i!==null&&(dl(i,1,s),pr(i,s))}function ft(i,s,d){if(i.tag===3)h1(i,i,d);else for(;s!==null;){if(s.tag===3){h1(s,i,d);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Ri===null||!Ri.has(m))){i=Fo(d,i),i=Mb(s,i,1),s=Ti(s,i,1),i=ir(),s!==null&&(dl(s,1,i),pr(s,i));break}}s=s.return}}function T5(i,s,d){var m=i.pingCache;m!==null&&m.delete(s),s=ir(),i.pingedLanes|=i.suspendedLanes&d,Ot===i&&(zt&d)===d&&(jt===4||jt===3&&(zt&130023424)===zt&&500>gt()-gm?Aa(i,0):vm|=d),pr(i,s)}function p1(i,s){s===0&&((i.mode&1)===0?s=1:(s=mc,mc<<=1,(mc&130023424)===0&&(mc=4194304)));var d=ir();i=Vn(i,s),i!==null&&(dl(i,s,d),pr(i,d))}function D5(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),p1(i,d)}function R5(i,s){var d=0;switch(i.tag){case 13:var m=i.stateNode,g=i.memoizedState;g!==null&&(d=g.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(s),p1(i,d)}var m1;m1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||cr.current)fr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return fr=!1,j5(i,s,d);fr=(i.flags&131072)!==0}else fr=!1,st&&(s.flags&1048576)!==0&&qx(s,$c,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;Zc(i,s),i=s.pendingProps;var g=Mo(s,Qt.current);Lo(s,d),g=qp(null,s,m,i,g,d);var w=Qp();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,dr(m)?(w=!0,Tc(s)):w=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Bp(s),g.updater=Yc,s.stateNode=g,g._reactInternals=s,tm(s,m,i,d),s=am(null,s,m,!0,w,d)):(s.tag=0,st&&w&&_p(s),nr(null,s,g,d),s=s.child),s;case 16:m=s.elementType;e:{switch(Zc(i,s),i=s.pendingProps,g=m._init,m=g(m._payload),s.type=m,g=s.tag=L5(m),i=tn(m,i),g){case 0:s=im(null,s,m,i,d);break e;case 1:s=Bb(null,s,m,i,d);break e;case 11:s=Rb(null,s,m,i,d);break e;case 14:s=$b(null,s,m,tn(m.type,i),d);break e}throw Error(r(306,m,""))}return s;case 0:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),im(i,s,m,g,d);case 1:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),Bb(i,s,m,g,d);case 3:e:{if(Ub(s),i===null)throw Error(r(387));m=s.pendingProps,w=s.memoizedState,g=w.element,nb(i,s),Wc(s,m,null,d);var E=s.memoizedState;if(m=E.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){g=Fo(Error(r(423)),s),s=Wb(i,s,m,d,g);break e}else if(m!==g){g=Fo(Error(r(424)),s),s=Wb(i,s,m,d,g);break e}else for(Nr=Ci(s.stateNode.containerInfo.firstChild),Sr=s,st=!0,en=null,d=tb(s,null,m,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Do(),m===g){s=Qn(i,s,d);break e}nr(i,s,m,d)}s=s.child}return s;case 5:return ob(s),i===null&&Tp(s),m=s.type,g=s.pendingProps,w=i!==null?i.memoizedProps:null,E=g.children,Np(m,g)?E=null:w!==null&&Np(m,w)&&(s.flags|=32),Fb(i,s),nr(i,s,E,d),s.child;case 6:return i===null&&Tp(s),null;case 13:return Hb(i,s,d);case 4:return Up(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=Ro(s,null,m,d):nr(i,s,m,d),s.child;case 11:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),Rb(i,s,m,g,d);case 7:return nr(i,s,s.pendingProps,d),s.child;case 8:return nr(i,s,s.pendingProps.children,d),s.child;case 12:return nr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(m=s.type._context,g=s.pendingProps,w=s.memoizedProps,E=g.value,Je(Fc,m._currentValue),m._currentValue=E,w!==null)if(Jr(w.value,E)){if(w.children===g.children&&!cr.current){s=Qn(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){E=w.child;for(var D=M.firstContext;D!==null;){if(D.context===m){if(w.tag===1){D=qn(-1,d&-d),D.tag=2;var V=w.updateQueue;if(V!==null){V=V.shared;var ie=V.pending;ie===null?D.next=D:(D.next=ie.next,ie.next=D),V.pending=D}}w.lanes|=d,D=w.alternate,D!==null&&(D.lanes|=d),zp(w.return,d,s),M.lanes|=d;break}D=D.next}}else if(w.tag===10)E=w.type===s.type?null:w.child;else if(w.tag===18){if(E=w.return,E===null)throw Error(r(341));E.lanes|=d,M=E.alternate,M!==null&&(M.lanes|=d),zp(E,d,s),E=w.sibling}else E=w.child;if(E!==null)E.return=w;else for(E=w;E!==null;){if(E===s){E=null;break}if(w=E.sibling,w!==null){w.return=E.return,E=w;break}E=E.return}w=E}nr(i,s,g.children,d),s=s.child}return s;case 9:return g=s.type,m=s.pendingProps.children,Lo(s,d),g=Rr(g),m=m(g),s.flags|=1,nr(i,s,m,d),s.child;case 14:return m=s.type,g=tn(m,s.pendingProps),g=tn(m.type,g),$b(i,s,m,g,d);case 15:return Lb(i,s,s.type,s.pendingProps,d);case 17:return m=s.type,g=s.pendingProps,g=s.elementType===m?g:tn(m,g),Zc(i,s),s.tag=1,dr(m)?(i=!0,Tc(s)):i=!1,Lo(s,d),Cb(s,m,g),tm(s,m,g,d),am(null,s,m,!0,i,d);case 19:return Gb(i,s,d);case 22:return zb(i,s,d)}throw Error(r(156,s.tag))};function v1(i,s){return Q0(i,s)}function $5(i,s,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(i,s,d,m){return new $5(i,s,d,m)}function Nm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function L5(i){if(typeof i=="function")return Nm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===R)return 11;if(i===ge)return 14}return 2}function Fi(i,s){var d=i.alternate;return d===null?(d=zr(i.tag,s,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=s,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,s=i.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function ud(i,s,d,m,g,w){var E=2;if(m=i,typeof i=="function")Nm(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case I:return Oa(d.children,g,w,s);case U:E=8,g|=8;break;case B:return i=zr(12,d,s,g|2),i.elementType=B,i.lanes=w,i;case de:return i=zr(13,d,s,g),i.elementType=de,i.lanes=w,i;case Z:return i=zr(19,d,s,g),i.elementType=Z,i.lanes=w,i;case me:return cd(d,g,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case G:E=10;break e;case q:E=9;break e;case R:E=11;break e;case ge:E=14;break e;case ke:E=16,m=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=zr(E,d,s,g),s.elementType=i,s.type=m,s.lanes=w,s}function Oa(i,s,d,m){return i=zr(7,i,m,s),i.lanes=d,i}function cd(i,s,d,m){return i=zr(22,i,m,s),i.elementType=me,i.lanes=d,i.stateNode={isHidden:!1},i}function Em(i,s,d){return i=zr(6,i,null,s),i.lanes=d,i}function Pm(i,s,d){return s=zr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function z5(i,s,d,m,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ep(0),this.expirationTimes=ep(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.identifierPrefix=m,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Am(i,s,d,m,g,w,E,M,D){return i=new z5(i,s,d,M,D),s===1?(s=1,w===!0&&(s|=8)):s=0,w=zr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bp(w),i}function F5(i,s,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:m==null?null:""+m,children:i,containerInfo:s,implementation:d}}function g1(i){if(!i)return _i;i=i._reactInternals;e:{if(ya(i)!==i||i.tag!==1)throw Error(r(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(dr(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(i.tag===1){var d=i.type;if(dr(d))return Kx(i,d,s)}return s}function y1(i,s,d,m,g,w,E,M,D){return i=Am(d,m,!0,i,g,w,E,M,D),i.context=g1(null),d=i.current,m=ir(),g=Li(d),w=qn(m,g),w.callback=s??null,Ti(d,w,g),i.current.lanes=g,dl(i,g,m),pr(i,m),i}function dd(i,s,d,m){var g=s.current,w=ir(),E=Li(g);return d=g1(d),s.context===null?s.context=d:s.pendingContext=d,s=qn(w,E),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Ti(g,s,E),i!==null&&(an(i,g,E,w),Uc(i,g,E)),E}function fd(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function x1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<s?d:s}}function Cm(i,s){x1(i,s),(i=i.alternate)&&x1(i,s)}function B5(){return null}var b1=typeof reportError=="function"?reportError:function(i){console.error(i)};function Om(i){this._internalRoot=i}hd.prototype.render=Om.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));dd(i,s,null,null)},hd.prototype.unmount=Om.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Pa(function(){dd(null,i,null,null)}),s[Wn]=null}};function hd(i){this._internalRoot=i}hd.prototype.unstable_scheduleHydration=function(i){if(i){var s=nx();i={blockedOn:null,target:i,priority:s};for(var d=0;d<Ei.length&&s!==0&&s<Ei[d].priority;d++);Ei.splice(d,0,i),d===0&&ox(i)}};function _m(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function pd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function w1(){}function U5(i,s,d,m,g){if(g){if(typeof m=="function"){var w=m;m=function(){var V=fd(E);w.call(V)}}var E=y1(s,m,i,0,null,!1,!1,"",w1);return i._reactRootContainer=E,i[Wn]=E.current,Nl(i.nodeType===8?i.parentNode:i),Pa(),E}for(;g=i.lastChild;)i.removeChild(g);if(typeof m=="function"){var M=m;m=function(){var V=fd(D);M.call(V)}}var D=Am(i,0,!1,null,null,!1,!1,"",w1);return i._reactRootContainer=D,i[Wn]=D.current,Nl(i.nodeType===8?i.parentNode:i),Pa(function(){dd(s,D,d,m)}),D}function md(i,s,d,m,g){var w=d._reactRootContainer;if(w){var E=w;if(typeof g=="function"){var M=g;g=function(){var D=fd(E);M.call(D)}}dd(s,E,i,g)}else E=U5(d,s,i,g,m);return fd(E)}tx=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var d=cl(s.pendingLanes);d!==0&&(tp(s,d|1),pr(s,gt()),(He&6)===0&&(Wo=gt()+500,Mi()))}break;case 13:Pa(function(){var m=Vn(i,1);if(m!==null){var g=ir();an(m,i,1,g)}}),Cm(i,1)}},rp=function(i){if(i.tag===13){var s=Vn(i,134217728);if(s!==null){var d=ir();an(s,i,134217728,d)}Cm(i,134217728)}},rx=function(i){if(i.tag===13){var s=Li(i),d=Vn(i,s);if(d!==null){var m=ir();an(d,i,s,m)}Cm(i,s)}},nx=function(){return Qe},ix=function(i,s){var d=Qe;try{return Qe=i,s()}finally{Qe=d}},qt=function(i,s,d){switch(s){case"input":if(kr(i,d),s=d.name,d.type==="radio"&&s!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<d.length;s++){var m=d[s];if(m!==i&&m.form===i.form){var g=Mc(m);if(!g)throw Error(r(90));ae(m),kr(m,g)}}}break;case"textarea":el(i,d);break;case"select":s=d.value,s!=null&&Un(i,!!d.multiple,s,!1)}},ol=km,W0=Pa;var W5={usingClientEntryPoint:!1,Events:[Al,Oo,Mc,al,uc,km]},Ul={findFiberByHostInstance:xa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H5={bundleType:Ul.bundleType,version:Ul.version,rendererPackageName:Ul.rendererPackageName,rendererConfig:Ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=V0(i),i===null?null:i.stateNode},findFiberByHostInstance:Ul.findFiberByHostInstance||B5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vd.isDisabled&&vd.supportsFiber)try{hc=vd.inject(H5),mn=vd}catch{}}return mr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W5,mr.createPortal=function(i,s){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_m(s))throw Error(r(200));return F5(i,s,null,d)},mr.createRoot=function(i,s){if(!_m(i))throw Error(r(299));var d=!1,m="",g=b1;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Am(i,1,!1,null,null,d,!1,m,g),i[Wn]=s.current,Nl(i.nodeType===8?i.parentNode:i),new Om(s)},mr.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=V0(s),i=i===null?null:i.stateNode,i},mr.flushSync=function(i){return Pa(i)},mr.hydrate=function(i,s,d){if(!pd(s))throw Error(r(200));return md(null,i,s,!0,d)},mr.hydrateRoot=function(i,s,d){if(!_m(i))throw Error(r(405));var m=d!=null&&d.hydratedSources||null,g=!1,w="",E=b1;if(d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(E=d.onRecoverableError)),s=y1(s,null,i,1,d??null,g,!1,w,E),i[Wn]=s.current,Nl(i),m)for(i=0;i<m.length;i++)d=m[i],g=d._getVersion,g=g(d._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[d,g]:s.mutableSourceEagerHydrationData.push(d,g);return new hd(s)},mr.render=function(i,s,d){if(!pd(s))throw Error(r(200));return md(null,i,s,!1,d)},mr.unmountComponentAtNode=function(i){if(!pd(i))throw Error(r(40));return i._reactRootContainer?(Pa(function(){md(null,null,i,!1,function(){i._reactRootContainer=null,i[Wn]=null})}),!0):!1},mr.unstable_batchedUpdates=km,mr.unstable_renderSubtreeIntoContainer=function(i,s,d,m){if(!pd(d))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return md(i,s,d,!1,m)},mr.version="18.3.1-next-f1338f8080-20240426",mr}var O1;function CN(){if(O1)return Dm.exports;O1=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(),Dm.exports=eM(),Dm.exports}var _1;function tM(){if(_1)return xd;_1=1;var e=CN();return xd.createRoot=e.createRoot,xd.hydrateRoot=e.hydrateRoot,xd}var rM=tM();const nM=Yg(rM);var Hu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ka,Yi,ps,yN,iM=(yN=class extends Hu{constructor(){super();Te(this,Ka);Te(this,Yi);Te(this,ps);ye(this,ps,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,Yi)||this.setEventListener(L(this,ps))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Yi))==null||t.call(this),ye(this,Yi,void 0))}setEventListener(t){var r;ye(this,ps,t),(r=L(this,Yi))==null||r.call(this),ye(this,Yi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Ka)!==t&&(ye(this,Ka,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Ka)=="boolean"?L(this,Ka):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ka=new WeakMap,Yi=new WeakMap,ps=new WeakMap,yN),Xg=new iM,aM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xi,Qg,xN,oM=(xN=class{constructor(){Te(this,Xi,aM);Te(this,Qg,!1)}setTimeoutProvider(e){ye(this,Xi,e)}setTimeout(e,t){return L(this,Xi).setTimeout(e,t)}clearTimeout(e){L(this,Xi).clearTimeout(e)}setInterval(e,t){return L(this,Xi).setInterval(e,t)}clearInterval(e){L(this,Xi).clearInterval(e)}},Xi=new WeakMap,Qg=new WeakMap,xN),za=new oM;function sM(e){setTimeout(e,0)}var lM=typeof window>"u"||"Deno"in globalThis;function gr(){}function uM(e,t){return typeof e=="function"?e(t):e}function Ov(e){return typeof e=="number"&&e>=0&&e!==1/0}function ON(e,t){return Math.max(e+(t||0)-Date.now(),0)}function aa(e,t){return typeof e=="function"?e(t):e}function Ar(e,t){return typeof e=="function"?e(t):e}function M1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:u,stale:l}=e;if(u){if(n){if(t.queryHash!==Zg(u,t.options))return!1}else if(!fu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||o&&!o(t))}function I1(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(du(t.options.mutationKey)!==du(o))return!1}else if(!fu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function Zg(e,t){return((t==null?void 0:t.queryKeyHashFn)||du)(e)}function du(e){return JSON.stringify(e,(t,r)=>Mv(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function fu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>fu(e[r],t[r])):!1}var cM=Object.prototype.hasOwnProperty;function _N(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=T1(e)&&T1(t);if(!n&&!(Mv(e)&&Mv(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),l=u.length,f=n?new Array(l):{};let h=0;for(let p=0;p<l;p++){const v=n?p:u[p],x=e[v],b=t[v];if(x===b){f[v]=x,(n?p<o:cM.call(e,v))&&h++;continue}if(x===null||b===null||typeof x!="object"||typeof b!="object"){f[v]=b;continue}const k=_N(x,b,r+1);f[v]=k,k===x&&h++}return o===l&&h===o?e:f}function _v(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function T1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mv(e){if(!D1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!D1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function D1(e){return Object.prototype.toString.call(e)==="[object Object]"}function dM(e){return new Promise(t=>{za.setTimeout(t,e)})}function Iv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?_N(e,t):t}function fM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function hM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Jg=Symbol();function MN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Jg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function IN(e,t){return typeof e=="function"?e(...t):!!e}function pM(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var hu=(()=>{let e=()=>lM;return{isServer(){return e()},setIsServer(t){e=t}}})();function Tv(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var mM=sM;function vM(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=mM;const o=l=>{t?e.push(l):a(()=>{r(l)})},u=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(f=>{r(f)})})})};return{batch:l=>{let f;t++;try{f=l()}finally{t--,t||u()}return f},batchCalls:l=>(...f)=>{o(()=>{l(...f)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Wt=vM(),ms,Zi,vs,bN,gM=(bN=class extends Hu{constructor(){super();Te(this,ms,!0);Te(this,Zi);Te(this,vs);ye(this,vs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,Zi)||this.setEventListener(L(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Zi))==null||t.call(this),ye(this,Zi,void 0))}setEventListener(t){var r;ye(this,vs,t),(r=L(this,Zi))==null||r.call(this),ye(this,Zi,t(this.setOnline.bind(this)))}setOnline(t){L(this,ms)!==t&&(ye(this,ms,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,ms)}},ms=new WeakMap,Zi=new WeakMap,vs=new WeakMap,bN),tf=new gM;function yM(e){return Math.min(1e3*2**e,3e4)}function TN(e){return(e??"online")==="online"?tf.isOnline():!0}var Dv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function DN(e){let t=!1,r=0,n;const a=Tv(),o=()=>a.status!=="pending",u=j=>{var S;if(!o()){const N=new Dv(j);x(N),(S=e.onCancel)==null||S.call(e,N)}},l=()=>{t=!0},f=()=>{t=!1},h=()=>Xg.isFocused()&&(e.networkMode==="always"||tf.isOnline())&&e.canRun(),p=()=>TN(e.networkMode)&&e.canRun(),v=j=>{o()||(n==null||n(),a.resolve(j))},x=j=>{o()||(n==null||n(),a.reject(j))},b=()=>new Promise(j=>{var S;n=N=>{(o()||h())&&j(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var j;n=void 0,o()||(j=e.onContinue)==null||j.call(e)}),k=()=>{if(o())return;let j;const S=r===0?e.initialPromise:void 0;try{j=S??e.fn()}catch(N){j=Promise.reject(N)}Promise.resolve(j).then(v).catch(N=>{var C;if(o())return;const P=e.retry??(hu.isServer()?0:3),O=e.retryDelay??yM,A=typeof O=="function"?O(r,N):O,_=P===!0||typeof P=="number"&&r<P||typeof P=="function"&&P(r,N);if(t||!_){x(N);return}r++,(C=e.onFail)==null||C.call(e,r,N),dM(A).then(()=>h()?void 0:b()).then(()=>{t?x(N):k()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(n==null||n(),a),cancelRetry:l,continueRetry:f,canStart:p,start:()=>(p()?k():b().then(k),a)}}var Ga,wN,RN=(wN=class{constructor(){Te(this,Ga)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ov(this.gcTime)&&ye(this,Ga,za.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,Ga)!==void 0&&(za.clearTimeout(L(this,Ga)),ye(this,Ga,void 0))}},Ga=new WeakMap,wN);function xM(e){return{onFetch:(t,r)=>{var p,v,x,b,k;const n=t.options,a=(x=(v=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((k=t.state.data)==null?void 0:k.pageParams)||[];let l={pages:[],pageParams:[]},f=0;const h=async()=>{let j=!1;const S=O=>{pM(O,()=>t.signal,()=>j=!0)},N=MN(t.options,t.fetchOptions),P=async(O,A,_)=>{if(j)return Promise.reject(t.signal.reason);if(A==null&&O.pages.length)return Promise.resolve(O);const I=(()=>{const q={client:t.client,queryKey:t.queryKey,pageParam:A,direction:_?"backward":"forward",meta:t.options.meta};return S(q),q})(),U=await N(I),{maxPages:B}=t.options,G=_?hM:fM;return{pages:G(O.pages,U,B),pageParams:G(O.pageParams,A,B)}};if(a&&o.length){const O=a==="backward",A=O?bM:R1,_={pages:o,pageParams:u},C=A(n,_);l=await P(_,C,O)}else{const O=e??o.length;do{const A=f===0?u[0]??n.initialPageParam:R1(n,l);if(f>0&&A==null)break;l=await P(l,A),f++}while(f<O)}return l};t.options.persister?t.fetchFn=()=>{var j,S;return(S=(j=t.options).persister)==null?void 0:S.call(j,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function R1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function bM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var gs,Va,ys,Ur,qa,Mt,zu,Qa,Pr,$N,Zn,kN,wM=(kN=class extends RN{constructor(t){super();Te(this,Pr);Te(this,gs);Te(this,Va);Te(this,ys);Te(this,Ur);Te(this,qa);Te(this,Mt);Te(this,zu);Te(this,Qa);ye(this,Qa,!1),ye(this,zu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,qa,t.client),ye(this,Ur,L(this,qa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Va,L1(this.options)),this.state=t.state??L(this,Va),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,gs)}get promise(){var t;return(t=L(this,Mt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,zu),...t},t!=null&&t._type&&ye(this,gs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=L1(this.options);r.data!==void 0&&(this.setState($1(r.data,r.dataUpdatedAt)),ye(this,Va,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Ur).remove(this)}setData(t,r){const n=Iv(this.state.data,t,this.options);return Fe(this,Pr,Zn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Fe(this,Pr,Zn).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,Mt))==null?void 0:n.promise;return(a=L(this,Mt))==null||a.cancel(t),r?r.then(gr).catch(gr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Va)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ar(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>aa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ON(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Mt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Mt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Ur).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,Mt)&&(L(this,Qa)||Fe(this,Pr,$N).call(this)?L(this,Mt).cancel({revert:!0}):L(this,Mt).cancelRetry()),this.scheduleGc()),L(this,Ur).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Fe(this,Pr,Zn).call(this,{type:"invalidate"})}async fetch(t,r){var h,p,v,x,b,k,j,S,N,P,O;if(this.state.fetchStatus!=="idle"&&((h=L(this,Mt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,Mt))return L(this,Mt).continueRetry(),L(this,Mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(_=>_.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ye(this,Qa,!0),n.signal)})},o=()=>{const A=MN(this.options,r),C=(()=>{const I={client:L(this,qa),queryKey:this.queryKey,meta:this.meta};return a(I),I})();return ye(this,Qa,!1),this.options.persister?this.options.persister(A,C,this):A(C)},l=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,qa),state:this.state,fetchFn:o};return a(A),A})(),f=L(this,gs)==="infinite"?xM(this.options.pages):this.options.behavior;f==null||f.onFetch(l,this),ye(this,ys,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=l.fetchOptions)==null?void 0:p.meta))&&Fe(this,Pr,Zn).call(this,{type:"fetch",meta:(v=l.fetchOptions)==null?void 0:v.meta}),ye(this,Mt,DN({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof Dv&&A.revert&&this.setState({...L(this,ys),fetchStatus:"idle"}),n.abort()},onFail:(A,_)=>{Fe(this,Pr,Zn).call(this,{type:"failed",failureCount:A,error:_})},onPause:()=>{Fe(this,Pr,Zn).call(this,{type:"pause"})},onContinue:()=>{Fe(this,Pr,Zn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await L(this,Mt).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(b=(x=L(this,Ur).config).onSuccess)==null||b.call(x,A,this),(j=(k=L(this,Ur).config).onSettled)==null||j.call(k,A,this.state.error,this),A}catch(A){if(A instanceof Dv){if(A.silent)return L(this,Mt).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Fe(this,Pr,Zn).call(this,{type:"error",error:A}),(N=(S=L(this,Ur).config).onError)==null||N.call(S,A,this),(O=(P=L(this,Ur).config).onSettled)==null||O.call(P,this.state.data,A,this),A}finally{this.scheduleGc()}}},gs=new WeakMap,Va=new WeakMap,ys=new WeakMap,Ur=new WeakMap,qa=new WeakMap,Mt=new WeakMap,zu=new WeakMap,Qa=new WeakMap,Pr=new WeakSet,$N=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Zn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...LN(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...$1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,ys,t.manual?a:void 0),a;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Wt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Ur).notify({query:this,type:"updated",action:t})})},kN);function LN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:TN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function L1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var vr,Ue,Fu,ar,Ya,xs,ei,Ji,Bu,bs,ws,Xa,Za,ea,ks,qe,nu,Rv,$v,Lv,zv,Fv,Bv,Uv,zN,jN,kM=(jN=class extends Hu{constructor(t,r){super();Te(this,qe);Te(this,vr);Te(this,Ue);Te(this,Fu);Te(this,ar);Te(this,Ya);Te(this,xs);Te(this,ei);Te(this,Ji);Te(this,Bu);Te(this,bs);Te(this,ws);Te(this,Xa);Te(this,Za);Te(this,ea);Te(this,ks,new Set);this.options=r,ye(this,vr,t),ye(this,Ji,null),ye(this,ei,Tv()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ue).addObserver(this),z1(L(this,Ue),this.options)?Fe(this,qe,nu).call(this):this.updateResult(),Fe(this,qe,zv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wv(L(this,Ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wv(L(this,Ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Fe(this,qe,Fv).call(this),Fe(this,qe,Bv).call(this),L(this,Ue).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,Ue);if(this.options=L(this,vr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ar(this.options.enabled,L(this,Ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Fe(this,qe,Uv).call(this),L(this,Ue).setOptions(this.options),r._defaulted&&!_v(this.options,r)&&L(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ue),observer:this});const a=this.hasListeners();a&&F1(L(this,Ue),n,this.options,r)&&Fe(this,qe,nu).call(this),this.updateResult(),a&&(L(this,Ue)!==n||Ar(this.options.enabled,L(this,Ue))!==Ar(r.enabled,L(this,Ue))||aa(this.options.staleTime,L(this,Ue))!==aa(r.staleTime,L(this,Ue)))&&Fe(this,qe,Rv).call(this);const o=Fe(this,qe,$v).call(this);a&&(L(this,Ue)!==n||Ar(this.options.enabled,L(this,Ue))!==Ar(r.enabled,L(this,Ue))||o!==L(this,ea))&&Fe(this,qe,Lv).call(this,o)}getOptimisticResult(t){const r=L(this,vr).getQueryCache().build(L(this,vr),t),n=this.createResult(r,t);return SM(this,n)&&(ye(this,ar,n),ye(this,xs,this.options),ye(this,Ya,L(this,Ue).state)),n}getCurrentResult(){return L(this,ar)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ei).status==="pending"&&L(this,ei).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,ks).add(t)}getCurrentQuery(){return L(this,Ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,vr).defaultQueryOptions(t),n=L(this,vr).getQueryCache().build(L(this,vr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Fe(this,qe,nu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,ar)))}createResult(t,r){var B;const n=L(this,Ue),a=this.options,o=L(this,ar),u=L(this,Ya),l=L(this,xs),h=t!==n?t.state:L(this,Fu),{state:p}=t;let v={...p},x=!1,b;if(r._optimisticResults){const G=this.hasListeners(),q=!G&&z1(t,r),R=G&&F1(t,n,r,a);(q||R)&&(v={...v,...LN(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:k,errorUpdatedAt:j,status:S}=v;b=v.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let G;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(G=o.data,N=!0):G=typeof r.placeholderData=="function"?r.placeholderData((B=L(this,ws))==null?void 0:B.state.data,L(this,ws)):r.placeholderData,G!==void 0&&(S="success",b=Iv(o==null?void 0:o.data,G,r),x=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,Bu))b=L(this,bs);else try{ye(this,Bu,r.select),b=r.select(b),b=Iv(o==null?void 0:o.data,b,r),ye(this,bs,b),ye(this,Ji,null)}catch(G){ye(this,Ji,G)}L(this,Ji)&&(k=L(this,Ji),b=L(this,bs),j=Date.now(),S="error");const P=v.fetchStatus==="fetching",O=S==="pending",A=S==="error",_=O&&P,C=b!==void 0,U={status:S,fetchStatus:v.fetchStatus,isPending:O,isSuccess:S==="success",isError:A,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:v.dataUpdatedAt,error:k,errorUpdatedAt:j,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:v.dataUpdateCount>h.dataUpdateCount||v.errorUpdateCount>h.errorUpdateCount,isFetching:P,isRefetching:P&&!O,isLoadingError:A&&!C,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:A&&C,isStale:ey(t,r),refetch:this.refetch,promise:L(this,ei),isEnabled:Ar(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=U.data!==void 0,q=U.status==="error"&&!G,R=ge=>{q?ge.reject(U.error):G&&ge.resolve(U.data)},de=()=>{const ge=ye(this,ei,U.promise=Tv());R(ge)},Z=L(this,ei);switch(Z.status){case"pending":t.queryHash===n.queryHash&&R(Z);break;case"fulfilled":(q||U.data!==Z.value)&&de();break;case"rejected":(!q||U.error!==Z.reason)&&de();break}}return U}updateResult(){const t=L(this,ar),r=this.createResult(L(this,Ue),this.options);if(ye(this,Ya,L(this,Ue).state),ye(this,xs,this.options),L(this,Ya).data!==void 0&&ye(this,ws,L(this,Ue)),_v(r,t))return;ye(this,ar,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!L(this,ks).size)return!0;const u=new Set(o??L(this,ks));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,ar)).some(l=>{const f=l;return L(this,ar)[f]!==t[f]&&u.has(f)})};Fe(this,qe,zN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Fe(this,qe,zv).call(this)}},vr=new WeakMap,Ue=new WeakMap,Fu=new WeakMap,ar=new WeakMap,Ya=new WeakMap,xs=new WeakMap,ei=new WeakMap,Ji=new WeakMap,Bu=new WeakMap,bs=new WeakMap,ws=new WeakMap,Xa=new WeakMap,Za=new WeakMap,ea=new WeakMap,ks=new WeakMap,qe=new WeakSet,nu=function(t){Fe(this,qe,Uv).call(this);let r=L(this,Ue).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(gr)),r},Rv=function(){Fe(this,qe,Fv).call(this);const t=aa(this.options.staleTime,L(this,Ue));if(hu.isServer()||L(this,ar).isStale||!Ov(t))return;const n=ON(L(this,ar).dataUpdatedAt,t)+1;ye(this,Xa,za.setTimeout(()=>{L(this,ar).isStale||this.updateResult()},n))},$v=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ue)):this.options.refetchInterval)??!1},Lv=function(t){Fe(this,qe,Bv).call(this),ye(this,ea,t),!(hu.isServer()||Ar(this.options.enabled,L(this,Ue))===!1||!Ov(L(this,ea))||L(this,ea)===0)&&ye(this,Za,za.setInterval(()=>{(this.options.refetchIntervalInBackground||Xg.isFocused())&&Fe(this,qe,nu).call(this)},L(this,ea)))},zv=function(){Fe(this,qe,Rv).call(this),Fe(this,qe,Lv).call(this,Fe(this,qe,$v).call(this))},Fv=function(){L(this,Xa)!==void 0&&(za.clearTimeout(L(this,Xa)),ye(this,Xa,void 0))},Bv=function(){L(this,Za)!==void 0&&(za.clearInterval(L(this,Za)),ye(this,Za,void 0))},Uv=function(){const t=L(this,vr).getQueryCache().build(L(this,vr),this.options);if(t===L(this,Ue))return;const r=L(this,Ue);ye(this,Ue,t),ye(this,Fu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},zN=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,ar))}),L(this,vr).getQueryCache().notify({query:L(this,Ue),type:"observerResultsUpdated"})})},jN);function jM(e,t){return Ar(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ar(t.retryOnMount,e)===!1)}function z1(e,t){return jM(e,t)||e.state.data!==void 0&&Wv(e,t,t.refetchOnMount)}function Wv(e,t,r){if(Ar(t.enabled,e)!==!1&&aa(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&ey(e,t)}return!1}function F1(e,t,r,n){return(e!==t||Ar(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ey(e,r)}function ey(e,t){return Ar(t.enabled,e)!==!1&&e.isStaleByTime(aa(t.staleTime,e))}function SM(e,t){return!_v(e.getCurrentResult(),t)}var Uu,Sn,Jt,Ja,Nn,Ki,SN,NM=(SN=class extends RN{constructor(t){super();Te(this,Nn);Te(this,Uu);Te(this,Sn);Te(this,Jt);Te(this,Ja);ye(this,Uu,t.client),this.mutationId=t.mutationId,ye(this,Jt,t.mutationCache),ye(this,Sn,[]),this.state=t.state||EM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Sn).includes(t)||(L(this,Sn).push(t),this.clearGcTimeout(),L(this,Jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,Sn,L(this,Sn).filter(r=>r!==t)),this.scheduleGc(),L(this,Jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Sn).length||(this.state.status==="pending"?this.scheduleGc():L(this,Jt).remove(this))}continue(){var t;return((t=L(this,Ja))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,l,f,h,p,v,x,b,k,j,S,N,P,O,A,_,C,I;const r=()=>{Fe(this,Nn,Ki).call(this,{type:"continue"})},n={client:L(this,Uu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,Ja,DN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(U,B)=>{Fe(this,Nn,Ki).call(this,{type:"failed",failureCount:U,error:B})},onPause:()=>{Fe(this,Nn,Ki).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Jt).canRun(this)}));const a=this.state.status==="pending",o=!L(this,Ja).canStart();try{if(a)r();else{Fe(this,Nn,Ki).call(this,{type:"pending",variables:t,isPaused:o}),L(this,Jt).config.onMutate&&await L(this,Jt).config.onMutate(t,this,n);const B=await((l=(u=this.options).onMutate)==null?void 0:l.call(u,t,n));B!==this.state.context&&Fe(this,Nn,Ki).call(this,{type:"pending",context:B,variables:t,isPaused:o})}const U=await L(this,Ja).start();return await((h=(f=L(this,Jt).config).onSuccess)==null?void 0:h.call(f,U,t,this.state.context,this,n)),await((v=(p=this.options).onSuccess)==null?void 0:v.call(p,U,t,this.state.context,n)),await((b=(x=L(this,Jt).config).onSettled)==null?void 0:b.call(x,U,null,this.state.variables,this.state.context,this,n)),await((j=(k=this.options).onSettled)==null?void 0:j.call(k,U,null,t,this.state.context,n)),Fe(this,Nn,Ki).call(this,{type:"success",data:U}),U}catch(U){try{await((N=(S=L(this,Jt).config).onError)==null?void 0:N.call(S,U,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((O=(P=this.options).onError)==null?void 0:O.call(P,U,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((_=(A=L(this,Jt).config).onSettled)==null?void 0:_.call(A,void 0,U,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((I=(C=this.options).onSettled)==null?void 0:I.call(C,void 0,U,t,this.state.context,n))}catch(B){Promise.reject(B)}throw Fe(this,Nn,Ki).call(this,{type:"error",error:U}),U}finally{L(this,Jt).runNext(this)}}},Uu=new WeakMap,Sn=new WeakMap,Jt=new WeakMap,Ja=new WeakMap,Nn=new WeakSet,Ki=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Wt.batch(()=>{L(this,Sn).forEach(n=>{n.onMutationUpdate(t)}),L(this,Jt).notify({mutation:this,type:"updated",action:t})})},SN);function EM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ti,sn,Wu,NN,PM=(NN=class extends Hu{constructor(t={}){super();Te(this,ti);Te(this,sn);Te(this,Wu);this.config=t,ye(this,ti,new Set),ye(this,sn,new Map),ye(this,Wu,0)}build(t,r,n){const a=new NM({client:t,mutationCache:this,mutationId:++yd(this,Wu)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,ti).add(t);const r=bd(t);if(typeof r=="string"){const n=L(this,sn).get(r);n?n.push(t):L(this,sn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,ti).delete(t)){const r=bd(t);if(typeof r=="string"){const n=L(this,sn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&L(this,sn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=bd(t);if(typeof r=="string"){const n=L(this,sn).get(r),a=n==null?void 0:n.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=bd(t);if(typeof r=="string"){const a=(n=L(this,sn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{L(this,ti).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,ti).clear(),L(this,sn).clear()})}getAll(){return Array.from(L(this,ti))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>I1(r,n))}findAll(t={}){return this.getAll().filter(r=>I1(t,r))}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Wt.batch(()=>Promise.all(t.map(r=>r.continue().catch(gr))))}},ti=new WeakMap,sn=new WeakMap,Wu=new WeakMap,NN);function bd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var En,EN,AM=(EN=class extends Hu{constructor(t={}){super();Te(this,En);this.config=t,ye(this,En,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??Zg(a,r);let u=this.get(o);return u||(u=new wM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){L(this,En).has(t.queryHash)||(L(this,En).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,En).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,En).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,En).get(t)}getAll(){return[...L(this,En).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>M1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>M1(t,n)):r}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},En=new WeakMap,EN),ht,ta,ra,js,Ss,na,Ns,Es,PN,CM=(PN=class{constructor(e={}){Te(this,ht);Te(this,ta);Te(this,ra);Te(this,js);Te(this,Ss);Te(this,na);Te(this,Ns);Te(this,Es);ye(this,ht,e.queryCache||new AM),ye(this,ta,e.mutationCache||new PM),ye(this,ra,e.defaultOptions||{}),ye(this,js,new Map),ye(this,Ss,new Map),ye(this,na,0)}mount(){yd(this,na)._++,L(this,na)===1&&(ye(this,Ns,Xg.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ht).onFocus())})),ye(this,Es,tf.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ht).onOnline())})))}unmount(){var e,t;yd(this,na)._--,L(this,na)===0&&((e=L(this,Ns))==null||e.call(this),ye(this,Ns,void 0),(t=L(this,Es))==null||t.call(this),ye(this,Es,void 0))}isFetching(e){return L(this,ht).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,ta).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,ht).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,ht).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(aa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,ht).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=L(this,ht).get(n.queryHash),o=a==null?void 0:a.state.data,u=uM(t,o);if(u!==void 0)return L(this,ht).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Wt.batch(()=>L(this,ht).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,ht).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,ht);Wt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,ht);return Wt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Wt.batch(()=>L(this,ht).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(gr).catch(gr)}invalidateQueries(e,t={}){return Wt.batch(()=>(L(this,ht).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Wt.batch(()=>L(this,ht).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(gr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(gr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,ht).build(this,t);return r.isStaleByTime(aa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gr).catch(gr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gr).catch(gr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return tf.isOnline()?L(this,ta).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ht)}getMutationCache(){return L(this,ta)}getDefaultOptions(){return L(this,ra)}setDefaultOptions(e){ye(this,ra,e)}setQueryDefaults(e,t){L(this,js).set(du(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,js).values()],r={};return t.forEach(n=>{fu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Ss).set(du(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Ss).values()],r={};return t.forEach(n=>{fu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,ra).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Jg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,ra).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,ht).clear(),L(this,ta).clear()}},ht=new WeakMap,ta=new WeakMap,ra=new WeakMap,js=new WeakMap,Ss=new WeakMap,na=new WeakMap,Ns=new WeakMap,Es=new WeakMap,PN),FN=y.createContext(void 0),po=e=>{const t=y.useContext(FN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},OM=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(FN.Provider,{value:e,children:t})),BN=y.createContext(!1),_M=()=>y.useContext(BN);BN.Provider;function MM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var IM=y.createContext(MM()),TM=()=>y.useContext(IM),DM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?IN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},RM=e=>{y.useEffect(()=>{e.clearReset()},[e])},$M=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||IN(r,[e.error,n])),LM=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zM=(e,t)=>e.isLoading&&e.isFetching&&!t,FM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,B1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function BM(e,t,r){var b,k,j,S;const n=_M(),a=TM(),o=po(),u=o.defaultQueryOptions(e);(k=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||k.call(b,u);const l=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,LM(u),DM(u,a,l),RM(a);const h=!o.getQueryCache().get(u.queryHash),[p]=y.useState(()=>new t(o,u)),v=p.getOptimisticResult(u),x=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const P=x?p.subscribe(Wt.batchCalls(N)):gr;return p.updateResult(),P},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),y.useEffect(()=>{p.setOptions(u)},[u,p]),FM(u,v))throw B1(u,p,a);if($M({result:v,errorResetBoundary:a,throwOnError:u.throwOnError,query:l,suspense:u.suspense}))throw v.error;if((S=(j=o.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||S.call(j,u,v),u.experimental_prefetchInRender&&!hu.isServer()&&zM(v,n)){const N=h?B1(u,p,a):l==null?void 0:l.promise;N==null||N.catch(gr).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?v:p.trackResult(v)}function br(e,t){return BM(e,kM)}/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const UM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),UN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var WM={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HM=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:u,...l},f)=>y.createElement("svg",{ref:f,...WM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:UN("lucide",a),...l},[...u.map(([h,p])=>y.createElement(h,p)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _e=(e,t)=>{const r=y.forwardRef(({className:n,...a},o)=>y.createElement(HM,{ref:o,iconNode:t,className:UN(`lucide-${UM(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pu=_e("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U1=_e("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WN=_e("BookOpen",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ps=_e("Bot",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KM=_e("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mu=_e("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const An=_e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GM=_e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VM=_e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const HN=_e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qM=_e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QM=_e("CircleHelp",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const YM=_e("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hv=_e("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XM=_e("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kv=_e("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ZM=_e("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KN=_e("Copy",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _n=_e("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const no=_e("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rf=_e("ExternalLink",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W1=_e("EyeOff",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gv=_e("Eye",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const JM=_e("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eI=_e("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lm=_e("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tI=_e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rI=_e("Key",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vu=_e("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nI=_e("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iI=_e("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aI=_e("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oI=_e("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sI=_e("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const GN=_e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lI=_e("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const su=_e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uI=_e("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cI=_e("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ty=_e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VN=_e("Server",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dI=_e("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gu=_e("Shield",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fI=_e("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qN=_e("Star",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hI=_e("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nf=_e("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vv=_e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yu=_e("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pI=_e("User",[["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"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xu=_e("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oa=_e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ls=_e("Zap",[["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"}]]),qv=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:nI},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:KM},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:mu},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:sI},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:Ps},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:QM}];var H1=1,mI=.9,vI=.8,gI=.17,zm=.1,Fm=.999,yI=.9999,xI=.99,bI=/[\\\/_+.#"@\[\(\{&]/,wI=/[\\\/_+.#"@\[\(\{&]/g,kI=/[\s-]/,QN=/[\s-]/g;function Qv(e,t,r,n,a,o,u){if(o===t.length)return a===e.length?H1:xI;var l=`${a},${o}`;if(u[l]!==void 0)return u[l];for(var f=n.charAt(o),h=r.indexOf(f,a),p=0,v,x,b,k;h>=0;)v=Qv(e,t,r,n,h+1,o+1,u),v>p&&(h===a?v*=H1:bI.test(e.charAt(h-1))?(v*=vI,b=e.slice(a,h-1).match(wI),b&&a>0&&(v*=Math.pow(Fm,b.length))):kI.test(e.charAt(h-1))?(v*=mI,k=e.slice(a,h-1).match(QN),k&&a>0&&(v*=Math.pow(Fm,k.length))):(v*=gI,a>0&&(v*=Math.pow(Fm,h-a))),e.charAt(h)!==t.charAt(o)&&(v*=yI)),(v<zm&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(x=Qv(e,t,r,n,h+1,o+2,u),x*zm>v&&(v=x*zm)),v>p&&(p=v),h=r.indexOf(f,h+1);return u[l]=p,p}function K1(e){return e.toLowerCase().replace(QN," ")}function jI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Qv(e,t,K1(e),K1(t),0,0,{})}function sa(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function G1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function As(...e){return t=>{let r=!1;const n=e.map(a=>{const o=G1(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<n.length;a++){const o=n[a];typeof o=="function"?o():G1(e[a],null)}}}}function mo(...e){return y.useCallback(As(...e),e)}function SI(e,t=[]){let r=[];function n(o,u){const l=y.createContext(u);l.displayName=o+"Context";const f=r.length;r=[...r,u];const h=v=>{var N;const{scope:x,children:b,...k}=v,j=((N=x==null?void 0:x[e])==null?void 0:N[f])||l,S=y.useMemo(()=>k,Object.values(k));return c.jsx(j.Provider,{value:S,children:b})};h.displayName=o+"Provider";function p(v,x){var j;const b=((j=x==null?void 0:x[e])==null?void 0:j[f])||l,k=y.useContext(b);if(k)return k;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${o}\``)}return[h,p]}const a=()=>{const o=r.map(u=>y.createContext(u));return function(l){const f=(l==null?void 0:l[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return a.scopeName=e,[n,NI(a,...t)]}function NI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const u=n.reduce((l,{useScope:f,scopeName:h})=>{const v=f(o)[`__scope${h}`];return{...l,...v}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var bu=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},EI=eh[" useId ".trim().toString()]||(()=>{}),PI=0;function oi(e){const[t,r]=y.useState(EI());return bu(()=>{r(n=>n??String(PI++))},[e]),t?`radix-${t}`:""}var AI=eh[" useInsertionEffect ".trim().toString()]||bu;function CI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,u]=OI({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:a;{const p=y.useRef(e!==void 0);y.useEffect(()=>{const v=p.current;v!==l&&console.warn(`${n} is changing from ${v?"controlled":"uncontrolled"} to ${l?"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.`),p.current=l},[l,n])}const h=y.useCallback(p=>{var v;if(l){const x=_I(p)?p(e):p;x!==e&&((v=u.current)==null||v.call(u,x))}else o(p)},[l,e,o,u]);return[f,h]}function OI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),a=y.useRef(r),o=y.useRef(t);return AI(()=>{o.current=t},[t]),y.useEffect(()=>{var u;a.current!==r&&((u=o.current)==null||u.call(o,r),a.current=r)},[r,a]),[r,n,o]}function _I(e){return typeof e=="function"}var th=CN();function YN(e){const t=y.forwardRef((r,n)=>{let{children:a,...o}=r,u=null,l=!1;const f=[];V1(a)&&typeof wd=="function"&&(a=wd(a._payload)),y.Children.forEach(a,x=>{var b;if(RI(x)){l=!0;const k=x;let j="child"in k.props?k.props.child:k.props.children;V1(j)&&typeof wd=="function"&&(j=wd(j._payload)),u=II(k,j),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(x)}),u?u=y.cloneElement(u,void 0,f):!l&&y.Children.count(a)===1&&y.isValidElement(a)&&(u=a);const h=u?DI(u):void 0,p=mo(n,h);if(!u){if(a||a===0)throw new Error(l?FI(e):zI(e));return a}const v=TI(o,u.props??{});return u.type!==y.Fragment&&(v.ref=n?p:h),y.cloneElement(u,v)});return t.displayName=`${e}.Slot`,t}var MI=Symbol.for("radix.slottable"),II=(e,t)=>{if("child"in e.props){const r=e.props.child;return y.isValidElement(r)?y.cloneElement(r,void 0,e.props.children(r.props.children)):null}return y.isValidElement(t)?t:null};function TI(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...l)=>{const f=o(...l);return a(...l),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function DI(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function RI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MI}var $I=Symbol.for("react.lazy");function V1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$I&&"_payload"in e&&LI(e._payload)}function LI(e){return typeof e=="object"&&e!==null&&"then"in e}var zI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,FI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,wd=eh[" use ".trim().toString()],BI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gt=BI.reduce((e,t)=>{const r=YN(`Primitive.${t}`),n=y.forwardRef((a,o)=>{const{asChild:u,...l}=a,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(f,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function UI(e,t){e&&th.flushSync(()=>e.dispatchEvent(t))}function wu(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function WI(e,t=globalThis==null?void 0:globalThis.document){const r=wu(e);y.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var HI="DismissableLayer",Yv="dismissableLayer.update",KI="dismissableLayer.pointerDownOutside",GI="dismissableLayer.focusOutside",q1,ry=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),XN=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:l,onDismiss:f,...h}=e,p=y.useContext(ry),[v,x]=y.useState(null),b=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=y.useState({}),j=mo(t,B=>x(B)),S=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),P=S.indexOf(N),O=v?S.indexOf(v):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,_=O>=P,C=y.useRef(!1),I=YI(B=>{const G=B.target;if(!(G instanceof Node))return;const q=[...p.branches].some(R=>R.contains(G));!_||q||(o==null||o(B),l==null||l(B),B.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:p.dismissableSurfaces}),U=XI(B=>{if(n&&C.current)return;const G=B.target;[...p.branches].some(R=>R.contains(G))||(u==null||u(B),l==null||l(B),B.defaultPrevented||f==null||f())},b);return WI(B=>{O===p.layers.size-1&&(a==null||a(B),!B.defaultPrevented&&f&&(B.preventDefault(),f()))},b),y.useEffect(()=>{if(v)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(q1=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),Q1(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(v),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=q1))}},[v,b,r,p]),y.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),Q1())},[v,p]),y.useEffect(()=>{const B=()=>k({});return document.addEventListener(Yv,B),()=>document.removeEventListener(Yv,B)},[]),c.jsx(Gt.div,{...h,ref:j,style:{pointerEvents:A?_?"auto":"none":void 0,...e.style},onFocusCapture:sa(e.onFocusCapture,U.onFocusCapture),onBlurCapture:sa(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:sa(e.onPointerDownCapture,I.onPointerDownCapture)})});XN.displayName=HI;var VI="DismissableLayerBranch",qI=y.forwardRef((e,t)=>{const r=y.useContext(ry),n=y.useRef(null),a=mo(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),c.jsx(Gt.div,{...e,ref:a})});qI.displayName=VI;function QI(){const e=y.useContext(ry),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function YI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,u=wu(e),l=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),p=y.useRef(()=>{});return y.useEffect(()=>{function v(){f.current=!1,a.current=!1,h.current.clear()}function x(){return Array.from(h.current.values()).some(Boolean)}function b(P){if(!f.current)return;const O=P.target;O instanceof Node&&[...o].some(_=>_.contains(O))||h.current.set(P.type,!0),P.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function k(P){f.current&&h.current.set(P.type,!1)}const j=P=>{if(P.target&&!l.current){let O=function(){r.removeEventListener("click",p.current);const _=x();v(),_||ZN(KI,u,A,{discrete:!0})};const A={originalEvent:P};f.current=!0,a.current=n&&P.button===0,h.current.clear(),!n||P.button!==0?O():(r.removeEventListener("click",p.current),p.current=O,r.addEventListener("click",p.current,{once:!0}))}else r.removeEventListener("click",p.current),v();l.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const P of S)r.addEventListener(P,b,!0),r.addEventListener(P,k);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",j)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",j),r.removeEventListener("click",p.current);for(const P of S)r.removeEventListener(P,b,!0),r.removeEventListener(P,k)}},[r,u,n,a,o]),{onPointerDownCapture:()=>l.current=!0}}function XI(e,t=globalThis==null?void 0:globalThis.document){const r=wu(e),n=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!n.current&&ZN(GI,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Q1(){const e=new CustomEvent(Yv);document.dispatchEvent(e)}function ZN(e,t,r,{discrete:n}){const a=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?UI(a,o):a.dispatchEvent(o)}var Bm="focusScope.autoFocusOnMount",Um="focusScope.autoFocusOnUnmount",Y1={bubbles:!1,cancelable:!0},ZI="FocusScope",JN=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...u}=e,[l,f]=y.useState(null),h=wu(a),p=wu(o),v=y.useRef(null),x=mo(t,j=>f(j)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let j=function(O){if(b.paused||!l)return;const A=O.target;l.contains(A)?v.current=A:Gi(v.current,{select:!0})},S=function(O){if(b.paused||!l)return;const A=O.relatedTarget;A!==null&&(l.contains(A)||Gi(v.current,{select:!0}))},N=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&Gi(l)};document.addEventListener("focusin",j),document.addEventListener("focusout",S);const P=new MutationObserver(N);return l&&P.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",S),P.disconnect()}}},[n,l,b.paused]),y.useEffect(()=>{if(l){Z1.add(b);const j=document.activeElement;if(!l.contains(j)){const N=new CustomEvent(Bm,Y1);l.addEventListener(Bm,h),l.dispatchEvent(N),N.defaultPrevented||(JI(iT(e2(l)),{select:!0}),document.activeElement===j&&Gi(l))}return()=>{l.removeEventListener(Bm,h),setTimeout(()=>{const N=new CustomEvent(Um,Y1);l.addEventListener(Um,p),l.dispatchEvent(N),N.defaultPrevented||Gi(j??document.body,{select:!0}),l.removeEventListener(Um,p),Z1.remove(b)},0)}}},[l,h,p,b]);const k=y.useCallback(j=>{if(!r&&!n||b.paused)return;const S=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,N=document.activeElement;if(S&&N){const P=j.currentTarget,[O,A]=eT(P);O&&A?!j.shiftKey&&N===A?(j.preventDefault(),r&&Gi(O,{select:!0})):j.shiftKey&&N===O&&(j.preventDefault(),r&&Gi(A,{select:!0})):N===P&&j.preventDefault()}},[r,n,b.paused]);return c.jsx(Gt.div,{tabIndex:-1,...u,ref:x,onKeyDown:k})});JN.displayName=ZI;function JI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Gi(n,{select:t}),document.activeElement!==r)return}function eT(e){const t=e2(e),r=X1(t,e),n=X1(t.reverse(),e);return[r,n]}function e2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function X1(e,t){for(const r of e)if(!tT(r,{upTo:t}))return r}function tT(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 rT(e){return e instanceof HTMLInputElement&&"select"in e}function Gi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&rT(e)&&t&&e.select()}}var Z1=nT();function nT(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=J1(e,t),e.unshift(t)},remove(t){var r;e=J1(e,t),(r=e[0])==null||r.resume()}}}function J1(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function iT(e){return e.filter(t=>t.tagName!=="A")}var aT="Portal",t2=y.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,o]=y.useState(!1);bu(()=>o(!0),[]);const u=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return u?th.createPortal(c.jsx(Gt.div,{...n,ref:t}),u):null});t2.displayName=aT;function oT(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var rh=e=>{const{present:t,children:r}=e,n=sT(t),a=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=lT(n.ref,uT(a));return typeof r=="function"||n.isPresent?y.cloneElement(a,{ref:o}):null};rh.displayName="Presence";function sT(e){const[t,r]=y.useState(),n=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),u=e?"mounted":"unmounted",[l,f]=oT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=kd(n.current);o.current=l==="mounted"?h:"none"},[l]),bu(()=>{const h=n.current,p=a.current;if(p!==e){const x=o.current,b=kd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&x!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),bu(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,v=b=>{const j=kd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&j&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=b=>{b.target===t&&(o.current=kd(n.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function ew(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lT(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(u=>{const l=ew(u,r);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let u=0;u<o.length;u++){const l=o[u];typeof l=="function"?l():ew(n[u],null)}}},[])}function kd(e){return(e==null?void 0:e.animationName)||"none"}function uT(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var jd=0,bn=null;function cT(){y.useEffect(()=>{bn||(bn={start:tw(),end:tw()});const{start:e,end:t}=bn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),jd++,()=>{jd===1&&(bn==null||bn.start.remove(),bn==null||bn.end.remove(),bn=null),jd=Math.max(0,jd-1)}},[])}function tw(){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 Pn=function(){return Pn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Pn.apply(this,arguments)};function r2(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function dT(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Gd="right-scroll-bar-position",Vd="width-before-scroll-bar",fT="with-scroll-bars-hidden",hT="--removed-body-scroll-bar-size";function Wm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pT(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var mT=typeof window<"u"?y.useLayoutEffect:y.useEffect,rw=new WeakMap;function vT(e,t){var r=pT(null,function(n){return e.forEach(function(a){return Wm(a,n)})});return mT(function(){var n=rw.get(r);if(n){var a=new Set(n),o=new Set(e),u=r.current;a.forEach(function(l){o.has(l)||Wm(l,null)}),o.forEach(function(l){a.has(l)||Wm(l,u)})}rw.set(r,e)},[e]),r}function gT(e){return e}function yT(e,t){t===void 0&&(t=gT);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var u=t(o,n);return r.push(u),function(){r=r.filter(function(l){return l!==u})}},assignSyncMedium:function(o){for(n=!0;r.length;){var u=r;r=[],u.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var u=[];if(r.length){var l=r;r=[],l.forEach(o),u=r}var f=function(){var p=u;u=[],p.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(p){u.push(p),h()},filter:function(p){return u=u.filter(p),r}}}};return a}function xT(e){e===void 0&&(e={});var t=yT(null);return t.options=Pn({async:!0,ssr:!1},e),t}var n2=function(e){var t=e.sideCar,r=r2(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,Pn({},r))};n2.isSideCarExport=!0;function bT(e,t){return e.useMedium(t),n2}var i2=xT(),Hm=function(){},nh=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:Hm,onWheelCapture:Hm,onTouchMoveCapture:Hm}),a=n[0],o=n[1],u=e.forwardProps,l=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,v=e.shards,x=e.sideCar,b=e.noRelative,k=e.noIsolation,j=e.inert,S=e.allowPinchZoom,N=e.as,P=N===void 0?"div":N,O=e.gapMode,A=r2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=x,C=vT([r,t]),I=Pn(Pn({},A),a);return y.createElement(y.Fragment,null,p&&y.createElement(_,{sideCar:i2,removeScrollBar:h,shards:v,noRelative:b,noIsolation:k,inert:j,setCallbacks:o,allowPinchZoom:!!S,lockRef:r,gapMode:O}),u?y.cloneElement(y.Children.only(l),Pn(Pn({},I),{ref:C})):y.createElement(P,Pn({},I,{className:f,ref:C}),l))});nh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nh.classNames={fullWidth:Vd,zeroRight:Gd};var wT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wT();return t&&e.setAttribute("nonce",t),e}function jT(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ST(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var NT=function(){var e=0,t=null;return{add:function(r){e==0&&(t=kT())&&(jT(t,r),ST(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ET=function(){var e=NT();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},a2=function(){var e=ET(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},PT={left:0,top:0,right:0,gap:0},Km=function(e){return parseInt(e||"",10)||0},AT=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Km(r),Km(n),Km(a)]},CT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return PT;var t=AT(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},OT=a2(),us="data-scroll-locked",_T=function(e,t,r,n){var a=e.left,o=e.top,u=e.right,l=e.gap;return r===void 0&&(r="margin"),`
.`.concat(fT,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(l,"px ").concat(n,`;
}
body[`).concat(us,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(a,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(u,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Gd,` {
right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Vd,` {
margin-right: `).concat(l,"px ").concat(n,`;
}
.`).concat(Gd," .").concat(Gd,` {
right: 0 `).concat(n,`;
}
.`).concat(Vd," .").concat(Vd,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(us,`] {
`).concat(hT,": ").concat(l,`px;
}
`)},nw=function(){var e=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(e)?e:0},MT=function(){y.useEffect(function(){return document.body.setAttribute(us,(nw()+1).toString()),function(){var e=nw()-1;e<=0?document.body.removeAttribute(us):document.body.setAttribute(us,e.toString())}},[])},IT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;MT();var o=y.useMemo(function(){return CT(a)},[a]);return y.createElement(OT,{styles:_T(o,!t,a,r?"":"!important")})},Xv=!1;if(typeof window<"u")try{var Sd=Object.defineProperty({},"passive",{get:function(){return Xv=!0,!0}});window.addEventListener("test",Sd,Sd),window.removeEventListener("test",Sd,Sd)}catch{Xv=!1}var Ko=Xv?{passive:!1}:!1,TT=function(e){return e.tagName==="TEXTAREA"},o2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!TT(e)&&r[t]==="visible")},DT=function(e){return o2(e,"overflowY")},RT=function(e){return o2(e,"overflowX")},iw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=s2(e,n);if(a){var o=l2(e,n),u=o[1],l=o[2];if(u>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},$T=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},LT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},s2=function(e,t){return e==="v"?DT(t):RT(t)},l2=function(e,t){return e==="v"?$T(t):LT(t)},zT=function(e,t){return e==="h"&&t==="rtl"?-1:1},FT=function(e,t,r,n,a){var o=zT(e,window.getComputedStyle(t).direction),u=o*n,l=r.target,f=t.contains(l),h=!1,p=u>0,v=0,x=0;do{if(!l)break;var b=l2(e,l),k=b[0],j=b[1],S=b[2],N=j-S-o*k;(k||N)&&s2(e,l)&&(v+=N,x+=k);var P=l.parentNode;l=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(p&&Math.abs(v)<1||!p&&Math.abs(x)<1)&&(h=!0),h},Nd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aw=function(e){return[e.deltaX,e.deltaY]},ow=function(e){return e&&"current"in e?e.current:e},BT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},UT=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},WT=0,Go=[];function HT(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),a=y.useState(WT++)[0],o=y.useState(a2)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var j=dT([e.lockRef.current],(e.shards||[]).map(ow),!0).filter(Boolean);return j.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),j.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(j,S){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!u.current.allowPinchZoom;var N=Nd(j),P=r.current,O="deltaX"in j?j.deltaX:P[0]-N[0],A="deltaY"in j?j.deltaY:P[1]-N[1],_,C=j.target,I=Math.abs(O)>Math.abs(A)?"h":"v";if("touches"in j&&I==="h"&&C.type==="range")return!1;var U=window.getSelection(),B=U&&U.anchorNode,G=B?B===C||B.contains(C):!1;if(G)return!1;var q=iw(I,C);if(!q)return!0;if(q?_=I:(_=I==="v"?"h":"v",q=iw(I,C)),!q)return!1;if(!n.current&&"changedTouches"in j&&(O||A)&&(n.current=_),!_)return!0;var R=n.current||_;return FT(R,S,j,R==="h"?O:A)},[]),f=y.useCallback(function(j){var S=j;if(!(!Go.length||Go[Go.length-1]!==o)){var N="deltaY"in S?aw(S):Nd(S),P=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&BT(_.delta,N)})[0];if(P&&P.should){S.cancelable&&S.preventDefault();return}if(!P){var O=(u.current.shards||[]).map(ow).filter(Boolean).filter(function(_){return _.contains(S.target)}),A=O.length>0?l(S,O[0]):!u.current.noIsolation;A&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(j,S,N,P){var O={name:j,delta:S,target:N,should:P,shadowParent:KT(N)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(A){return A!==O})},1)},[]),p=y.useCallback(function(j){r.current=Nd(j),n.current=void 0},[]),v=y.useCallback(function(j){h(j.type,aw(j),j.target,l(j,e.lockRef.current))},[]),x=y.useCallback(function(j){h(j.type,Nd(j),j.target,l(j,e.lockRef.current))},[]);y.useEffect(function(){return Go.push(o),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",f,Ko),document.addEventListener("touchmove",f,Ko),document.addEventListener("touchstart",p,Ko),function(){Go=Go.filter(function(j){return j!==o}),document.removeEventListener("wheel",f,Ko),document.removeEventListener("touchmove",f,Ko),document.removeEventListener("touchstart",p,Ko)}},[]);var b=e.removeScrollBar,k=e.inert;return y.createElement(y.Fragment,null,k?y.createElement(o,{styles:UT(a)}):null,b?y.createElement(IT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function KT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const GT=bT(i2,HT);var u2=y.forwardRef(function(e,t){return y.createElement(nh,Pn({},e,{ref:t,sideCar:GT}))});u2.classNames=nh.classNames;var VT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vo=new WeakMap,Ed=new WeakMap,Pd={},Gm=0,c2=function(e){return e&&(e.host||c2(e.parentNode))},qT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=c2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},QT=function(e,t,r,n){var a=qT(t,Array.isArray(e)?e:[e]);Pd[r]||(Pd[r]=new WeakMap);var o=Pd[r],u=[],l=new Set,f=new Set(a),h=function(v){!v||l.has(v)||(l.add(v),h(v.parentNode))};a.forEach(h);var p=function(v){!v||f.has(v)||Array.prototype.forEach.call(v.children,function(x){if(l.has(x))p(x);else try{var b=x.getAttribute(n),k=b!==null&&b!=="false",j=(Vo.get(x)||0)+1,S=(o.get(x)||0)+1;Vo.set(x,j),o.set(x,S),u.push(x),j===1&&k&&Ed.set(x,!0),S===1&&x.setAttribute(r,"true"),k||x.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return p(t),l.clear(),Gm++,function(){u.forEach(function(v){var x=Vo.get(v)-1,b=o.get(v)-1;Vo.set(v,x),o.set(v,b),x||(Ed.has(v)||v.removeAttribute(n),Ed.delete(v)),b||v.removeAttribute(r)}),Gm--,Gm||(Vo=new WeakMap,Vo=new WeakMap,Ed=new WeakMap,Pd={})}},YT=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=VT(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),QT(n,a,r,"aria-hidden")):function(){return null}},ih="Dialog",[d2]=SI(ih),[XT,hn]=d2(ih),f2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:u=!0}=e,l=y.useRef(null),f=y.useRef(null),[h,p]=CI({prop:n,defaultProp:a??!1,onChange:o,caller:ih});return c.jsx(XT,{scope:t,triggerRef:l,contentRef:f,contentId:oi(),titleId:oi(),descriptionId:oi(),open:h,onOpenChange:p,onOpenToggle:y.useCallback(()=>p(v=>!v),[p]),modal:u,children:r})};f2.displayName=ih;var h2="DialogTrigger",ZT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(h2,r),o=mo(t,a.triggerRef);return c.jsx(Gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":iy(a.open),...n,ref:o,onClick:sa(e.onClick,a.onOpenToggle)})});ZT.displayName=h2;var ny="DialogPortal",[JT,p2]=d2(ny,{forceMount:void 0}),m2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=hn(ny,t);return c.jsx(JT,{scope:t,forceMount:r,children:y.Children.map(n,u=>c.jsx(rh,{present:r||o.open,children:c.jsx(t2,{asChild:!0,container:a,children:u})}))})};m2.displayName=ny;var af="DialogOverlay",v2=y.forwardRef((e,t)=>{const r=p2(af,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=hn(af,e.__scopeDialog);return o.modal?c.jsx(rh,{present:n||o.open,children:c.jsx(t3,{...a,ref:t})}):null});v2.displayName=af;var e3=YN("DialogOverlay.RemoveScroll"),t3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(af,r),o=QI(),u=mo(t,o);return c.jsx(u2,{as:e3,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(Gt.div,{"data-state":iy(a.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Cs="DialogContent",g2=y.forwardRef((e,t)=>{const r=p2(Cs,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=hn(Cs,e.__scopeDialog);return c.jsx(rh,{present:n||o.open,children:o.modal?c.jsx(r3,{...a,ref:t}):c.jsx(n3,{...a,ref:t})})});g2.displayName=Cs;var r3=y.forwardRef((e,t)=>{const r=hn(Cs,e.__scopeDialog),n=y.useRef(null),a=mo(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return YT(o)},[]),c.jsx(y2,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:sa(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:sa(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&o.preventDefault()}),onFocusOutside:sa(e.onFocusOutside,o=>o.preventDefault())})}),n3=y.forwardRef((e,t)=>{const r=hn(Cs,e.__scopeDialog),n=y.useRef(!1),a=y.useRef(!1);return c.jsx(y2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,l;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),y2=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,l=hn(Cs,r);return cT(),c.jsx(c.Fragment,{children:c.jsx(JN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:c.jsx(XN,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":iy(l.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})}),x2="DialogTitle",i3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(x2,r);return c.jsx(Gt.h2,{id:a.titleId,...n,ref:t})});i3.displayName=x2;var b2="DialogDescription",a3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(b2,r);return c.jsx(Gt.p,{id:a.descriptionId,...n,ref:t})});a3.displayName=b2;var w2="DialogClose",o3=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=hn(w2,r);return c.jsx(Gt.button,{type:"button",...n,ref:t,onClick:sa(e.onClick,()=>a.onOpenChange(!1))})});o3.displayName=w2;function iy(e){return e?"open":"closed"}var Hl='[cmdk-group=""]',Vm='[cmdk-group-items=""]',s3='[cmdk-group-heading=""]',k2='[cmdk-item=""]',sw=`${k2}:not([aria-disabled="true"])`,Zv="cmdk-item-select",ns="data-value",l3=(e,t,r)=>jI(e,t,r),j2=y.createContext(void 0),Ku=()=>y.useContext(j2),S2=y.createContext(void 0),ay=()=>y.useContext(S2),N2=y.createContext(void 0),E2=y.forwardRef((e,t)=>{let r=is(()=>{var T,ee;return{search:"",value:(ee=(T=e.value)!=null?T:e.defaultValue)!=null?ee:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=is(()=>new Set),a=is(()=>new Map),o=is(()=>new Map),u=is(()=>new Set),l=P2(e),{label:f,children:h,value:p,onValueChange:v,filter:x,shouldFilter:b,loop:k,disablePointerSelection:j=!1,vimBindings:S=!0,...N}=e,P=oi(),O=oi(),A=oi(),_=y.useRef(null),C=x3();io(()=>{if(p!==void 0){let T=p.trim();r.current.value=T,I.emit()}},[p]),io(()=>{C(6,de)},[]);let I=y.useMemo(()=>({subscribe:T=>(u.current.add(T),()=>u.current.delete(T)),snapshot:()=>r.current,setState:(T,ee,ne)=>{var te,ue,pe,Ce;if(!Object.is(r.current[T],ee)){if(r.current[T]=ee,T==="search")R(),G(),C(1,q);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(A);J?J.focus():(te=document.getElementById(P))==null||te.focus()}if(C(7,()=>{var J;r.current.selectedItemId=(J=Z())==null?void 0:J.id,I.emit()}),ne||C(5,de),((ue=l.current)==null?void 0:ue.value)!==void 0){let J=ee??"";(Ce=(pe=l.current).onValueChange)==null||Ce.call(pe,J);return}}I.emit()}},emit:()=>{u.current.forEach(T=>T())}}),[]),U=y.useMemo(()=>({value:(T,ee,ne)=>{var te;ee!==((te=o.current.get(T))==null?void 0:te.value)&&(o.current.set(T,{value:ee,keywords:ne}),r.current.filtered.items.set(T,B(ee,ne)),C(2,()=>{G(),I.emit()}))},item:(T,ee)=>(n.current.add(T),ee&&(a.current.has(ee)?a.current.get(ee).add(T):a.current.set(ee,new Set([T]))),C(3,()=>{R(),G(),r.current.value||q(),I.emit()}),()=>{o.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let ne=Z();C(4,()=>{R(),(ne==null?void 0:ne.getAttribute("id"))===T&&q(),I.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{o.current.delete(T),a.current.delete(T)}),filter:()=>l.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:P,inputId:A,labelId:O,listInnerRef:_}),[]);function B(T,ee){var ne,te;let ue=(te=(ne=l.current)==null?void 0:ne.filter)!=null?te:l3;return T?ue(T,r.current.search,ee):0}function G(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,ee=[];r.current.filtered.groups.forEach(te=>{let ue=a.current.get(te),pe=0;ue.forEach(Ce=>{let J=T.get(Ce);pe=Math.max(J,pe)}),ee.push([te,pe])});let ne=_.current;ge().sort((te,ue)=>{var pe,Ce;let J=te.getAttribute("id"),je=ue.getAttribute("id");return((pe=T.get(je))!=null?pe:0)-((Ce=T.get(J))!=null?Ce:0)}).forEach(te=>{let ue=te.closest(Vm);ue?ue.appendChild(te.parentElement===ue?te:te.closest(`${Vm} > *`)):ne.appendChild(te.parentElement===ne?te:te.closest(`${Vm} > *`))}),ee.sort((te,ue)=>ue[1]-te[1]).forEach(te=>{var ue;let pe=(ue=_.current)==null?void 0:ue.querySelector(`${Hl}[${ns}="${encodeURIComponent(te[0])}"]`);pe==null||pe.parentElement.appendChild(pe)})}function q(){let T=ge().find(ne=>ne.getAttribute("aria-disabled")!=="true"),ee=T==null?void 0:T.getAttribute(ns);I.setState("value",ee||void 0)}function R(){var T,ee,ne,te;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ue=0;for(let pe of n.current){let Ce=(ee=(T=o.current.get(pe))==null?void 0:T.value)!=null?ee:"",J=(te=(ne=o.current.get(pe))==null?void 0:ne.keywords)!=null?te:[],je=B(Ce,J);r.current.filtered.items.set(pe,je),je>0&&ue++}for(let[pe,Ce]of a.current)for(let J of Ce)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(pe);break}r.current.filtered.count=ue}function de(){var T,ee,ne;let te=Z();te&&(((T=te.parentElement)==null?void 0:T.firstChild)===te&&((ne=(ee=te.closest(Hl))==null?void 0:ee.querySelector(s3))==null||ne.scrollIntoView({block:"nearest"})),te.scrollIntoView({block:"nearest"}))}function Z(){var T;return(T=_.current)==null?void 0:T.querySelector(`${k2}[aria-selected="true"]`)}function ge(){var T;return Array.from(((T=_.current)==null?void 0:T.querySelectorAll(sw))||[])}function ke(T){let ee=ge()[T];ee&&I.setState("value",ee.getAttribute(ns))}function me(T){var ee;let ne=Z(),te=ge(),ue=te.findIndex(Ce=>Ce===ne),pe=te[ue+T];(ee=l.current)!=null&&ee.loop&&(pe=ue+T<0?te[te.length-1]:ue+T===te.length?te[0]:te[ue+T]),pe&&I.setState("value",pe.getAttribute(ns))}function Q(T){let ee=Z(),ne=ee==null?void 0:ee.closest(Hl),te;for(;ne&&!te;)ne=T>0?g3(ne,Hl):y3(ne,Hl),te=ne==null?void 0:ne.querySelector(sw);te?I.setState("value",te.getAttribute(ns)):me(T)}let oe=()=>ke(ge().length-1),X=T=>{T.preventDefault(),T.metaKey?oe():T.altKey?Q(1):me(1)},$=T=>{T.preventDefault(),T.metaKey?ke(0):T.altKey?Q(-1):me(-1)};return y.createElement(Gt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:T=>{var ee;(ee=N.onKeyDown)==null||ee.call(N,T);let ne=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||ne))switch(T.key){case"n":case"j":{S&&T.ctrlKey&&X(T);break}case"ArrowDown":{X(T);break}case"p":case"k":{S&&T.ctrlKey&&$(T);break}case"ArrowUp":{$(T);break}case"Home":{T.preventDefault(),ke(0);break}case"End":{T.preventDefault(),oe();break}case"Enter":{T.preventDefault();let te=Z();if(te){let ue=new Event(Zv);te.dispatchEvent(ue)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:w3},f),ah(e,T=>y.createElement(S2.Provider,{value:I},y.createElement(j2.Provider,{value:U},T))))}),u3=y.forwardRef((e,t)=>{var r,n;let a=oi(),o=y.useRef(null),u=y.useContext(N2),l=Ku(),f=P2(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;io(()=>{if(!h)return l.item(a,u==null?void 0:u.id)},[h]);let p=A2(a,o,[e.value,e.children,o],e.keywords),v=ay(),x=ca(C=>C.value&&C.value===p.current),b=ca(C=>h||l.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);y.useEffect(()=>{let C=o.current;if(!(!C||e.disabled))return C.addEventListener(Zv,k),()=>C.removeEventListener(Zv,k)},[b,e.onSelect,e.disabled]);function k(){var C,I;j(),(I=(C=f.current).onSelect)==null||I.call(C,p.current)}function j(){v.setState("value",p.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:P,forceMount:O,keywords:A,..._}=e;return y.createElement(Gt.div,{ref:As(o,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!x,"data-disabled":!!S,"data-selected":!!x,onPointerMove:S||l.getDisablePointerSelection()?void 0:j,onClick:S?void 0:k},e.children)}),c3=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,u=oi(),l=y.useRef(null),f=y.useRef(null),h=oi(),p=Ku(),v=ca(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);io(()=>p.group(u),[]),A2(u,l,[e.value,e.heading,f]);let x=y.useMemo(()=>({id:u,forceMount:a}),[a]);return y.createElement(Gt.div,{ref:As(l,t),...o,"cmdk-group":"",role:"presentation",hidden:v?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),ah(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(N2.Provider,{value:x},b))))}),d3=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=y.useRef(null),o=ca(u=>!u.search);return!r&&!o?null:y.createElement(Gt.div,{ref:As(a,t),...n,"cmdk-separator":"",role:"separator"})}),f3=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=ay(),u=ca(h=>h.search),l=ca(h=>h.selectedItemId),f=Ku();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(Gt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":l,id:f.inputId,type:"text",value:a?e.value:u,onChange:h=>{a||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),h3=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=y.useRef(null),u=y.useRef(null),l=ca(h=>h.selectedItemId),f=Ku();return y.useEffect(()=>{if(u.current&&o.current){let h=u.current,p=o.current,v,x=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let b=h.offsetHeight;p.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(h),()=>{cancelAnimationFrame(v),x.unobserve(h)}}},[]),y.createElement(Gt.div,{ref:As(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:f.listId},ah(e,h=>y.createElement("div",{ref:As(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),p3=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:u,...l}=e;return y.createElement(f2,{open:r,onOpenChange:n},y.createElement(m2,{container:u},y.createElement(v2,{"cmdk-overlay":"",className:a}),y.createElement(g2,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(E2,{ref:t,...l}))))}),m3=y.forwardRef((e,t)=>ca(r=>r.filtered.count===0)?y.createElement(Gt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),v3=y.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return y.createElement(Gt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ah(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),qo=Object.assign(E2,{List:h3,Item:u3,Input:f3,Group:c3,Separator:d3,Dialog:p3,Empty:m3,Loading:v3});function g3(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function y3(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function P2(e){let t=y.useRef(e);return io(()=>{t.current=e}),t}var io=typeof window>"u"?y.useEffect:y.useLayoutEffect;function is(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ca(e){let t=ay(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function A2(e,t,r,n=[]){let a=y.useRef(),o=Ku();return io(()=>{var u;let l=(()=>{var h;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(h=p.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,l,f),(u=t.current)==null||u.setAttribute(ns,l),a.current=l}),a}var x3=()=>{let[e,t]=y.useState(),r=is(()=>new Map);return io(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function b3(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ah({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(b3(t),{ref:t.ref},r(t.props.children)):r(t)}var w3={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function k3({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),c.jsx(qo.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>r(!1),children:c.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[c.jsx(qo.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),c.jsxs(qo.List,{className:"max-h-80 overflow-y-auto p-2",children:[c.jsx(qo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),c.jsx(qo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:qv.map(n=>c.jsxs(qo.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[c.jsx(n.icon,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:n.label}),c.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}async function De(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let p=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,p=!0),a&&!("hf_token"in h)&&(h.hf_token=a,p=!0),p&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const l=await fetch(e,{...t,headers:r,body:o});if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return l.json()}const Et={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],memory:(e,t)=>["memory",e??"",t??""]},j3=()=>br({queryKey:Et.health,queryFn:()=>De("/api/health"),refetchInterval:1e4}),oy=(e=5e3)=>br({queryKey:Et.systemStatus,queryFn:()=>De("/api/system/status"),refetchInterval:e}),S3=(e=3e3)=>br({queryKey:Et.services,queryFn:()=>De("/api/system/services"),refetchInterval:e}),vo=(e=4e3)=>br({queryKey:Et.models,queryFn:()=>De("/api/models"),refetchInterval:e}),N3=(e=4e3)=>br({queryKey:Et.routing,queryFn:()=>De("/api/routing"),refetchInterval:e}),E3=(e=2e3)=>br({queryKey:Et.jobs,queryFn:()=>De("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),C2=(e=3e3)=>br({queryKey:Et.tokenStats,queryFn:()=>De("/api/system/token-stats"),refetchInterval:e}),O2=(e=5e3)=>br({queryKey:Et.agentStatus,queryFn:()=>De("/api/agent/status"),refetchInterval:e}),P3=(e=6e4)=>br({queryKey:Et.hermesBrain,queryFn:()=>De("/api/agent/brain"),refetchInterval:e}),sy=e=>br({queryKey:Et.updates,queryFn:()=>De("/api/maintenance/updates"),refetchInterval:e}),A3=()=>br({queryKey:Et.discover,queryFn:()=>De("/api/discover")}),C3=e=>br({queryKey:Et.drafts(e),queryFn:()=>De(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),_2=e=>br({queryKey:Et.connect(e),queryFn:()=>De(e?`/api/connect?${e}`:"/api/connect")}),M2=e=>br({queryKey:Et.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),De(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function Qo(e){return(e/1024**3).toFixed(1)}function Jv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function Br(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function O3(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function lw(e){return e?`${Math.round(e/1024)}k`:"—"}function I2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=I2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function et(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=I2(e))&&(n&&(n+=" "),n+=t);return n}const ly="-",_3=e=>{const t=I3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const l=u.split(ly);return l[0]===""&&l.length!==1&&l.shift(),T2(l,t)||M3(u)},getConflictingClassGroupIds:(u,l)=>{const f=r[u]||[];return l&&n[u]?[...f,...n[u]]:f}}},T2=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?T2(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(ly);return(u=t.validators.find(({validator:l})=>l(o)))==null?void 0:u.classGroupId},uw=/^\[(.+)\]$/,M3=e=>{if(uw.test(e)){const t=uw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},I3=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return D3(Object.entries(e.classGroups),r).forEach(([o,u])=>{eg(u,n,o,t)}),n},eg=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:cw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(T3(a)){eg(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,u])=>{eg(u,cw(t,o),r,n)})})},cw=(e,t)=>{let r=e;return t.split(ly).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},T3=e=>e.isThemeGetter,D3=(e,t)=>t?e.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,l])=>[t+u,l])):o);return[r,a]}):e,R3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return a(o,u),u},set(o,u){r.has(o)?r.set(o,u):a(o,u)}}},D2="!",$3=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,u=l=>{const f=[];let h=0,p=0,v;for(let S=0;S<l.length;S++){let N=l[S];if(h===0){if(N===a&&(n||l.slice(S,S+o)===t)){f.push(l.slice(p,S)),p=S+o;continue}if(N==="/"){v=S;continue}}N==="["?h++:N==="]"&&h--}const x=f.length===0?l:l.substring(p),b=x.startsWith(D2),k=b?x.substring(1):x,j=v&&v>p?v-p:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:j}};return r?l=>r({className:l,parseClassName:u}):u},L3=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},z3=e=>({cache:R3(e.cacheSize),parseClassName:$3(e),..._3(e)}),F3=/\s+/,B3=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],u=e.trim().split(F3);let l="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:p,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:b}=r(h);let k=!!b,j=n(k?x.substring(0,b):x);if(!j){if(!k){l=h+(l.length>0?" "+l:l);continue}if(j=n(x),!j){l=h+(l.length>0?" "+l:l);continue}k=!1}const S=L3(p).join(":"),N=v?S+D2:S,P=N+j;if(o.includes(P))continue;o.push(P);const O=a(j,k);for(let A=0;A<O.length;++A){const _=O[A];o.push(N+_)}l=h+(l.length>0?" "+l:l)}return l};function U3(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=R2(t))&&(n&&(n+=" "),n+=r);return n}const R2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=R2(e[n]))&&(r&&(r+=" "),r+=t);return r};function W3(e,...t){let r,n,a,o=u;function u(f){const h=t.reduce((p,v)=>v(p),e());return r=z3(h),n=r.cache.get,a=r.cache.set,o=l,l(f)}function l(f){const h=n(f);if(h)return h;const p=B3(f,r);return a(f,p),p}return function(){return o(U3.apply(null,arguments))}}const it=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},$2=/^\[(?:([a-z-]+):)?(.+)\]$/i,H3=/^\d+\/\d+$/,K3=new Set(["px","full","screen"]),G3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V3=/\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$/,q3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Q3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xn=e=>cs(e)||K3.has(e)||H3.test(e),Ui=e=>zs(e,"length",iD),cs=e=>!!e&&!Number.isNaN(Number(e)),qm=e=>zs(e,"number",cs),Kl=e=>!!e&&Number.isInteger(Number(e)),X3=e=>e.endsWith("%")&&cs(e.slice(0,-1)),$e=e=>$2.test(e),Wi=e=>G3.test(e),Z3=new Set(["length","size","percentage"]),J3=e=>zs(e,Z3,L2),eD=e=>zs(e,"position",L2),tD=new Set(["image","url"]),rD=e=>zs(e,tD,oD),nD=e=>zs(e,"",aD),Gl=()=>!0,zs=(e,t,r)=>{const n=$2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},iD=e=>V3.test(e)&&!q3.test(e),L2=()=>!1,aD=e=>Q3.test(e),oD=e=>Y3.test(e),sD=()=>{const e=it("colors"),t=it("spacing"),r=it("blur"),n=it("brightness"),a=it("borderColor"),o=it("borderRadius"),u=it("borderSpacing"),l=it("borderWidth"),f=it("contrast"),h=it("grayscale"),p=it("hueRotate"),v=it("invert"),x=it("gap"),b=it("gradientColorStops"),k=it("gradientColorStopPositions"),j=it("inset"),S=it("margin"),N=it("opacity"),P=it("padding"),O=it("saturate"),A=it("scale"),_=it("sepia"),C=it("skew"),I=it("space"),U=it("translate"),B=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",$e,t],R=()=>[$e,t],de=()=>["",Xn,Ui],Z=()=>["auto",cs,$e],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["solid","dashed","dotted","double","none"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],oe=()=>["","0",$e],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[cs,$e];return{cacheSize:500,separator:":",theme:{colors:[Gl],spacing:[Xn,Ui],blur:["none","",Wi,$e],brightness:$(),borderColor:[e],borderRadius:["none","","full",Wi,$e],borderSpacing:R(),borderWidth:de(),contrast:$(),grayscale:oe(),hueRotate:$(),invert:oe(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[X3,Ui],inset:q(),margin:q(),opacity:$(),padding:R(),saturate:$(),scale:$(),sepia:oe(),skew:$(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Wi]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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"],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:[...ge(),$e]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[j]}],"inset-x":[{"inset-x":[j]}],"inset-y":[{"inset-y":[j]}],start:[{start:[j]}],end:[{end:[j]}],top:[{top:[j]}],right:[{right:[j]}],bottom:[{bottom:[j]}],left:[{left:[j]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kl,$e]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:oe()}],shrink:[{shrink:oe()}],order:[{order:["first","last","none",Kl,$e]}],"grid-cols":[{"grid-cols":[Gl]}],"col-start-end":[{col:["auto",{span:["full",Kl,$e]},$e]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Gl]}],"row-start-end":[{row:["auto",{span:[Kl,$e]},$e]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Wi]},Wi]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wi,Ui]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qm]}],"font-family":[{font:[Gl]}],"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:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",cs,qm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xn,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xn,Ui]}],"underline-offset":[{"underline-offset":["auto",Xn,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),eD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",J3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...ke(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:ke()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...ke()]}],"outline-offset":[{"outline-offset":[Xn,$e]}],"outline-w":[{outline:[Xn,Ui]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Xn,Ui]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wi,nD]}],"shadow-color":[{shadow:[Gl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":me()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Wi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[v]}],saturate:[{saturate:[O]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Kl,$e]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xn,Ui,qm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},lD=W3(sD);function he(...e){return lD(et(e))}function ku(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const z2=["fast","heavy","coder","vision","scout"],uD={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},uy=e=>e&&uD[e]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function cD({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return c.jsxs("span",{className:he("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function dw(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function dD(){const{data:e}=vo(2e3),{data:t}=C2(2e3),r=(e==null?void 0:e.models)??[],n=(e==null?void 0:e.running)??[],a=r.filter(f=>n.includes(f.name)),o=y.useRef(null),[u,l]=y.useState(!1);return y.useEffect(()=>{if(!t)return;const f=t.total_tokens;if(o.current!==null&&f>o.current){l(!0);const h=setTimeout(()=>l(!1),4e3);return o.current=f,()=>clearTimeout(h)}o.current=f},[t==null?void 0:t.total_tokens]),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(pu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),c.jsxs("span",{className:he("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",u?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[u?c.jsx(ls,{className:"h-3 w-3 animate-pulse"}):c.jsx(aI,{className:"h-3 w-3"}),u?"Inferenz aktiv":"Idle"]})]}),a.length===0?c.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):c.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:a.map(f=>{var h;return c.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[f.role&&c.jsx("span",{className:he("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",uy(f.role)),children:f.role}),c.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(h=f.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")})]}),c.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[Br(f.size_bytes)," im Unified-RAM"]})]}),c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[c.jsx("span",{className:he("h-1.5 w-1.5 rounded-full bg-emerald-500",u&&"animate-pulse")})," warm"]})]},f.name)})})]})}function fD(){const{data:e,dataUpdatedAt:t,error:r}=oy(3e3),[n,a]=y.useState([]);return y.useEffect(()=>{e&&a(o=>{var u,l,f,h;return[...o,{t:Date.now(),cpu:((u=e.cpu)==null?void 0:u.percent)??0,ram:((l=e.ram)==null?void 0:l.percent)??0,gpu:((f=e.gpu)==null?void 0:f.busy_percent)??null,disk:((h=e.disk)==null?void 0:h.percent)??null}].slice(-40)})},[t]),{sys:e,hist:n,error:r}}var hD=["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"];function cy(e){if(typeof e!="string")return!1;var t=hD;return t.includes(e)}var pD=["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"],mD=new Set(pD);function F2(e){return typeof e!="string"?!1:mD.has(e)}function B2(e){return typeof e=="string"&&e.startsWith("data-")}function dn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(F2(r)||B2(r))&&(t[r]=e[r]);return t}function oh(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return dn(t)}return typeof e=="object"&&!Array.isArray(e)?dn(e):null}function Gr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(F2(r)||B2(r)||cy(r))&&(t[r]=e[r]);return t}function vD(e){return e==null?null:y.isValidElement(e)?Gr(e.props):typeof e=="object"&&!Array.isArray(e)?Gr(e):null}var gD=["children","width","height","viewBox","className","style","title","desc"];function tg(){return tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tg.apply(null,arguments)}function yD(e,t){if(e==null)return{};var r,n,a=xD(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function xD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var U2=y.forwardRef((e,t)=>{var r=e.children,n=e.width,a=e.height,o=e.viewBox,u=e.className,l=e.style,f=e.title,h=e.desc,p=yD(e,gD),v=o||{width:n,height:a,x:0,y:0},x=et("recharts-surface",u);return y.createElement("svg",tg({},Gr(p),{className:x,width:n,height:a,style:l,viewBox:"".concat(v.x," ").concat(v.y," ").concat(v.width," ").concat(v.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),bD=["children","className"];function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rg.apply(null,arguments)}function wD(e,t){if(e==null)return{};var r,n,a=kD(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function kD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Vr=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=wD(e,bD),o=et("recharts-layer",n);return y.createElement("g",rg({className:o},Gr(a),{ref:t}),r)}),jD=y.createContext(null);function pt(e){return function(){return e}}const ng=Math.PI,ig=2*ng,Ra=1e-6,SD=ig-Ra;function W2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function ND(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return W2;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class ED{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?W2:ND(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,u){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+u}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let u=this._x1,l=this._y1,f=n-t,h=a-r,p=u-t,v=l-r,x=p*p+v*v;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(x>Ra)if(!(Math.abs(v*f-h*p)>Ra)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,k=a-l,j=f*f+h*h,S=b*b+k*k,N=Math.sqrt(j),P=Math.sqrt(x),O=o*Math.tan((ng-Math.acos((j+x-S)/(2*N*P)))/2),A=O/P,_=O/N;Math.abs(A-1)>Ra&&this._append`L${t+A*p},${r+A*v}`,this._append`A${o},${o},0,0,${+(v*b>p*k)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,a,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),f=n*Math.sin(a),h=t+l,p=r+f,v=1^u,x=u?a-o:o-a;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Ra||Math.abs(this._y1-p)>Ra)&&this._append`L${h},${p}`,n&&(x<0&&(x=x%ig+ig),x>SD?this._append`A${n},${n},0,1,${v},${t-l},${r-f}A${n},${n},0,1,${v},${this._x1=h},${this._y1=p}`:x>Ra&&this._append`A${n},${n},0,${+(x>=ng)},${v},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function H2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ED(t)}function dy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function K2(e){this._context=e}K2.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 sh(e){return new K2(e)}function G2(e){return e[0]}function V2(e){return e[1]}function q2(e,t){var r=pt(!0),n=null,a=sh,o=null,u=H2(l);e=typeof e=="function"?e:e===void 0?G2:pt(e),t=typeof t=="function"?t:t===void 0?V2:pt(t);function l(f){var h,p=(f=dy(f)).length,v,x=!1,b;for(n==null&&(o=a(b=u())),h=0;h<=p;++h)!(h<p&&r(v=f[h],h,f))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+e(v,h,f),+t(v,h,f));if(b)return o=null,b+""||null}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:pt(+f),l):e},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:pt(+f),l):t},l.defined=function(f){return arguments.length?(r=typeof f=="function"?f:pt(!!f),l):r},l.curve=function(f){return arguments.length?(a=f,n!=null&&(o=a(n)),l):a},l.context=function(f){return arguments.length?(f==null?n=o=null:o=a(n=f),l):n},l}function Ad(e,t,r){var n=null,a=pt(!0),o=null,u=sh,l=null,f=H2(h);e=typeof e=="function"?e:e===void 0?G2:pt(+e),t=typeof t=="function"?t:pt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?V2:pt(+r);function h(v){var x,b,k,j=(v=dy(v)).length,S,N=!1,P,O=new Array(j),A=new Array(j);for(o==null&&(l=u(P=f())),x=0;x<=j;++x){if(!(x<j&&a(S=v[x],x,v))===N)if(N=!N)b=x,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),k=x-1;k>=b;--k)l.point(O[k],A[k]);l.lineEnd(),l.areaEnd()}N&&(O[x]=+e(S,x,v),A[x]=+t(S,x,v),l.point(n?+n(S,x,v):O[x],r?+r(S,x,v):A[x]))}if(P)return l=null,P+""||null}function p(){return q2().defined(a).curve(u).context(o)}return h.x=function(v){return arguments.length?(e=typeof v=="function"?v:pt(+v),n=null,h):e},h.x0=function(v){return arguments.length?(e=typeof v=="function"?v:pt(+v),h):e},h.x1=function(v){return arguments.length?(n=v==null?null:typeof v=="function"?v:pt(+v),h):n},h.y=function(v){return arguments.length?(t=typeof v=="function"?v:pt(+v),r=null,h):t},h.y0=function(v){return arguments.length?(t=typeof v=="function"?v:pt(+v),h):t},h.y1=function(v){return arguments.length?(r=v==null?null:typeof v=="function"?v:pt(+v),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(v){return arguments.length?(a=typeof v=="function"?v:pt(!!v),h):a},h.curve=function(v){return arguments.length?(u=v,o!=null&&(l=u(o)),h):u},h.context=function(v){return arguments.length?(v==null?o=l=null:l=u(o=v),h):o},h}class Q2{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function PD(e){return new Q2(e,!0)}function AD(e){return new Q2(e,!1)}function of(){}function sf(e,t,r){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+r)/6)}function Y2(e){this._context=e}Y2.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:sf(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:sf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CD(e){return new Y2(e)}function X2(e){this._context=e}X2.prototype={areaStart:of,areaEnd:of,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:sf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OD(e){return new X2(e)}function Z2(e){this._context=e}Z2.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:sf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _D(e){return new Z2(e)}function J2(e){this._context=e}J2.prototype={areaStart:of,areaEnd:of,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 MD(e){return new J2(e)}function fw(e){return e<0?-1:1}function hw(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),u=(r-e._y1)/(a||n<0&&-0),l=(o*a+u*n)/(n+a);return(fw(o)+fw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(l))||0}function pw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Qm(e,t,r){var n=e._x0,a=e._y0,o=e._x1,u=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,a+l*t,o-l,u-l*r,o,u)}function lf(e){this._context=e}lf.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:Qm(this,this._t0,pw(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 r=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,Qm(this,pw(this,r=hw(this,e,t)),r);break;default:Qm(this,this._t0,r=hw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function eE(e){this._context=new tE(e)}(eE.prototype=Object.create(lf.prototype)).point=function(e,t){lf.prototype.point.call(this,t,e)};function tE(e){this._context=e}tE.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,r,n,a,o){this._context.bezierCurveTo(t,e,n,r,o,a)}};function ID(e){return new lf(e)}function TD(e){return new eE(e)}function rE(e){this._context=e}rE.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=mw(e),a=mw(t),o=0,u=1;u<r;++o,++u)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],e[u],t[u]);(this._line||this._line!==0&&r===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 mw(e){var t,r=e.length-1,n,a=new Array(r),o=new Array(r),u=new Array(r);for(a[0]=0,o[0]=2,u[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,u[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,u[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/o[t-1],o[t]-=n,u[t]-=n*u[t-1];for(a[r-1]=u[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(u[t]-a[t+1])/o[t];for(o[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function DD(e){return new rE(e)}function lh(e,t){this._context=e,this._t=t}lh.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function RD(e){return new lh(e,.5)}function $D(e){return new lh(e,0)}function LD(e){return new lh(e,1)}function ao(e,t){if((u=e.length)>1)for(var r=1,n,a,o=e[t[0]],u,l=o.length;r<u;++r)for(a=o,o=e[t[r]],n=0;n<l;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function ag(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function zD(e,t){return e[t]}function FD(e){const t=[];return t.key=e,t}function BD(){var e=pt([]),t=ag,r=ao,n=zD;function a(o){var u=Array.from(e.apply(this,arguments),FD),l,f=u.length,h=-1,p;for(const v of o)for(l=0,++h;l<f;++l)(u[l][h]=[0,+n(v,u[l].key,h,o)]).data=v;for(l=0,p=dy(t(u));l<f;++l)u[p[l]].index=l;return r(u,p),u}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:pt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:pt(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?ag:typeof o=="function"?o:pt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??ao,a):r},a}function UD(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,u;a<o;++a){for(u=r=0;r<n;++r)u+=e[r][a][1]||0;if(u)for(r=0;r<n;++r)e[r][a][1]/=u}ao(e,t)}}function WD(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var u=0,l=0;u<a;++u)l+=e[u][r][1]||0;n[r][1]+=n[r][0]=-l/2}ao(e,t)}}function HD(e,t){if(!(!((u=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,u;n<o;++n){for(var l=0,f=0,h=0;l<u;++l){for(var p=e[t[l]],v=p[n][1]||0,x=p[n-1][1]||0,b=(v-x)/2,k=0;k<l;++k){var j=e[t[k]],S=j[n][1]||0,N=j[n-1][1]||0;b+=S-N}f+=v,h+=b*v}a[n-1][1]+=a[n-1][0]=r,f&&(r-=h/f)}a[n-1][1]+=a[n-1][0]=r,ao(e,t)}}function og(e){return e==="__proto__"}function nE(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function fy(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function iE(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(iE).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function hy(e){if(Array.isArray(e))return e.map(fy);if(typeof e=="symbol")return[e];e=iE(e);const t=[],r=e.length;if(r===0)return t;let n=0,a="",o="",u=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const l=e[n];if(o)l==="\\"&&n+1<r?(n++,a+=e[n]):l===o?o="":a+=l;else if(u)l==='"'||l==="'"?o=l:l==="]"?(u=!1,t.push(a),a=""):a+=l;else if(l==="[")u=!0,a&&(t.push(a),a="");else if(l==="."){a&&(t.push(a),a="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else a+=l;n++}return a&&t.push(a),t}function go(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(og(t))return r;const n=e[t];return n===void 0?nE(t)&&!Object.hasOwn(e,t)?go(e,hy(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=fy(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return KD(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),og(t))return r;const n=e[t];return n===void 0?r:n}}}function KD(e,t,r){if(t.length===0)return r;let n=e;for(let a=0;a<t.length;a++){if(n==null||og(t[a]))return r;n=n[t[a]]}return n===void 0?r:n}var GD=4;function ia(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:GD,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((a,o,u)=>{var l=r[u-1];return typeof l=="string"?a+l+o:l!==void 0?a+ia(l)+o:a+o},"")}var Wr=e=>e===0?0:e>0?1:-1,Tn=e=>typeof e=="number"&&e!=+e,oo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!Tn(e),Dn=e=>Ne(e)||typeof e=="string",VD=0,ju=e=>{var t=++VD;return"".concat(e||"").concat(t)},da=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return n;var o;if(oo(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Tn(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},aE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function ni(e,t,r){return Ne(e)&&Ne(t)?ia(e+r*(t-e)):t}function oE(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):go(n,t))===r)}var Kt=e=>e===null||typeof e>"u",py=e=>Kt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function yr(e){return e!=null}function Fs(){}var sE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,my=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{cy(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},qD=(e,t,r)=>n=>(e(t,r,n),null),QD=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var o=e[a];cy(a)&&typeof o=="function"&&(n||(n={}),n[a]=qD(o,t,r))}),n};function vw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function YD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vw(Object(r),!0).forEach(function(n){XD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XD(e,t,r){return(t=ZD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZD(e){var t=JD(e,"string");return typeof t=="symbol"?t:t+""}function JD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qr(e,t){var r=YD({},e),n=t,a=Object.keys(t),o=a.reduce((u,l)=>(u[l]===void 0&&n[l]!==void 0&&(u[l]=n[l]),u),r);return o}function e4(e,t){const r=new Map;for(let n=0;n<e.length;n++){const a=e[n],o=t(a,n,e);r.has(o)||r.set(o,a)}return Array.from(r.values())}function t4(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function lE(e){return e}function r4(e){return function(t){return go(t,e)}}function sg(e){return e==null||typeof e!="object"&&typeof e!="function"}function n4(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function i4(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function vy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const a4="[object RegExp]",uE="[object String]",cE="[object Number]",dE="[object Boolean]",fE="[object Arguments]",o4="[object Symbol]",s4="[object Date]",l4="[object Map]",u4="[object Set]",c4="[object Array]",d4="[object ArrayBuffer]",f4="[object Object]",h4="[object DataView]",p4="[object Uint8Array]",m4="[object Uint8ClampedArray]",v4="[object Uint16Array]",g4="[object Uint32Array]",y4="[object Int8Array]",x4="[object Int16Array]",b4="[object Int32Array]",w4="[object Float32Array]",k4="[object Float64Array]",gw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function j4(e){return typeof gw.Buffer<"u"&&gw.Buffer.isBuffer(e)}function S4(e,t){return Fa(e,void 0,e,new Map,t)}function Fa(e,t,r,n=new Map,a=void 0){const o=a==null?void 0:a(e,t,r,n);if(o!==void 0)return o;if(sg(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let l=0;l<e.length;l++)u[l]=Fa(e[l],l,r,n,a);return Object.hasOwn(e,"index")&&(u.index=e.index),Object.hasOwn(e,"input")&&(u.input=e.input),u}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const u=new RegExp(e.source,e.flags);return u.lastIndex=e.lastIndex,u}if(e instanceof Map){const u=new Map;n.set(e,u);for(const[l,f]of e)u.set(l,Fa(f,l,r,n,a));return u}if(e instanceof Set){const u=new Set;n.set(e,u);for(const l of e)u.add(Fa(l,void 0,r,n,a));return u}if(j4(e))return e.subarray();if(n4(e)){const u=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,u);for(let l=0;l<e.length;l++)u[l]=Fa(e[l],l,r,n,a);return u}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const u=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,u),on(u,e,r,n,a),u}if(typeof File<"u"&&e instanceof File){const u=new File([e],e.name,{type:e.type});return n.set(e,u),on(u,e,r,n,a),u}if(typeof Blob<"u"&&e instanceof Blob){const u=new Blob([e],{type:e.type});return n.set(e,u),on(u,e,r,n,a),u}if(e instanceof Error){const u=structuredClone(e);return n.set(e,u),u.message=e.message,u.name=e.name,u.stack=e.stack,u.cause=e.cause,u.constructor=e.constructor,on(u,e,r,n,a),u}if(e instanceof Boolean){const u=new Boolean(e.valueOf());return n.set(e,u),on(u,e,r,n,a),u}if(e instanceof Number){const u=new Number(e.valueOf());return n.set(e,u),on(u,e,r,n,a),u}if(e instanceof String){const u=new String(e.valueOf());return n.set(e,u),on(u,e,r,n,a),u}if(typeof e=="object"&&N4(e)){const u=Object.create(Object.getPrototypeOf(e));return n.set(e,u),on(u,e,r,n,a),u}return e}function on(e,t,r=e,n,a){const o=[...Object.keys(t),...i4(t)];for(let u=0;u<o.length;u++){const l=o[u],f=Object.getOwnPropertyDescriptor(e,l);(f==null||f.writable)&&(e[l]=Fa(t[l],l,r,n,a))}}function N4(e){switch(vy(e)){case fE:case c4:case d4:case h4:case dE:case s4:case w4:case k4:case y4:case x4:case b4:case l4:case cE:case f4:case a4:case u4:case uE:case o4:case p4:case m4:case v4:case g4:return!0;default:return!1}}function E4(e){return Fa(e,void 0,e,new Map,void 0)}function qd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function hE(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function pE(e,t,r){return typeof r!="function"?pE(e,t,()=>{}):lg(e,t,function n(a,o,u,l,f,h){const p=r(a,o,u,l,f,h);return p!==void 0?!!p:lg(a,o,n,h,!1)},new Map,!0)}function lg(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return P4(e,t,r,n);case"function":return Object.keys(t).length>0?lg(e,{...t},r,n,a):qd(e,t);default:return hE(e)&&a?typeof t=="string"?t==="":!0:qd(e,t)}}function P4(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return mE(e,t,r,n);if(t instanceof Map)return A4(e,t,r,n);if(t instanceof Set)return C4(e,t,r,n);const a=Object.keys(t);if(e==null||sg(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o<a.length;o++){const u=a[o];if(!sg(e)&&!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!r(e[u],t[u],u,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function A4(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[a,o]of t.entries())if(r(e.get(a),o,a,e,t,n)===!1)return!1;return!0}function mE(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const a=new Set;for(let o=0;o<t.length;o++){const u=t[o];let l=!1;for(let f=0;f<e.length;f++){if(a.has(f))continue;const h=e[f];let p=!1;if(r(h,u,o,e,t,n)&&(p=!0),p){a.add(f),l=!0;break}}if(!l)return!1}return!0}function C4(e,t,r,n){return t.size===0?!0:e instanceof Set?mE([...e],[...t],r,n):!1}function vE(e,t){return pE(e,t,()=>{})}function O4(e){return e=E4(e),t=>vE(t,e)}function _4(e,t){return S4(e,(r,n,a,o)=>{if(typeof e=="object"){if(vy(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),on(u,e,a,o),u}switch(Object.prototype.toString.call(e)){case cE:case uE:case dE:{const u=new e.constructor(e==null?void 0:e.valueOf());return on(u,e),u}case fE:{const u={};return on(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function M4(e){return _4(e)}const I4=/^(?:0|[1-9]\d*)$/;function gE(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return I4.test(e)}}function T4(e){return e!==null&&typeof e=="object"&&vy(e)==="[object Arguments]"}function D4(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&nE(t)&&(e==null?void 0:e[t])==null?r=hy(t):r=[t],r.length===0)return!1;let n=e;for(let a=0;a<r.length;a++){const o=r[a];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||T4(n))&&gE(o)&&o<n.length))return!1;n=n[o]}return!0}function R4(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=fy(e);break}return t=M4(t),function(r){const n=go(r,e);return n===void 0?D4(r,e):t===void 0?n===void 0:vE(n,t)}}function $4(e){if(e==null)return lE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?R4(e[0],e[1]):O4(e);case"string":case"symbol":case"number":return r4(e)}}function L4(e){return Number.isSafeInteger(e)&&e>=0}function yE(e){return e!=null&&typeof e!="function"&&L4(e.length)}function z4(e){return typeof e=="object"&&e!==null}function F4(e){return z4(e)&&yE(e)}function yw(e,t=lE){return F4(e)?e4(Array.from(e),t4($4(t),1)):[]}function B4(e,t,r){return t===!0?yw(e,r):typeof t=="function"?yw(e,t):e}var Ym={exports:{}},Xm={},Zm={exports:{}},Jm={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xw;function U4(){if(xw)return Jm;xw=1;var e=Ls();function t(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function l(v,x){var b=x(),k=n({inst:{value:b,getSnapshot:x}}),j=k[0].inst,S=k[1];return o(function(){j.value=b,j.getSnapshot=x,f(j)&&S({inst:j})},[v,b,x]),a(function(){return f(j)&&S({inst:j}),v(function(){f(j)&&S({inst:j})})},[v]),u(b),b}function f(v){var x=v.getSnapshot;v=v.value;try{var b=x();return!r(v,b)}catch{return!0}}function h(v,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return Jm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Jm}var bw;function W4(){return bw||(bw=1,Zm.exports=U4()),Zm.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ww;function H4(){if(ww)return Xm;ww=1;var e=Ls(),t=W4();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,l=e.useMemo,f=e.useDebugValue;return Xm.useSyncExternalStoreWithSelector=function(h,p,v,x,b){var k=o(null);if(k.current===null){var j={hasValue:!1,value:null};k.current=j}else j=k.current;k=l(function(){function N(C){if(!P){if(P=!0,O=C,C=x(C),b!==void 0&&j.hasValue){var I=j.value;if(b(I,C))return A=I}return A=C}if(I=A,n(O,C))return I;var U=x(C);return b!==void 0&&b(I,U)?(O=C,I):(O=C,A=U)}var P=!1,O,A,_=v===void 0?null:v;return[function(){return N(p())},_===null?void 0:function(){return N(_())}]},[p,v,x,b]);var S=a(h,k[0],k[1]);return u(function(){j.hasValue=!0,j.value=S},[S]),f(S),S},Xm}var kw;function K4(){return kw||(kw=1,Ym.exports=H4()),Ym.exports}var G4=K4(),gy=y.createContext(null),V4=e=>e,wt=()=>{var e=y.useContext(gy);return e?e.store.dispatch:V4},Qd=()=>{},q4=()=>Qd,Q4=(e,t)=>e===t;function Ae(e){var t=y.useContext(gy),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Qd,[t,e]);return G4.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:q4,t?t.store.getState:Qd,t?t.store.getState:Qd,r,Q4)}function Y4(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function X4(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var jw=e=>Array.isArray(e)?e:[e];function Z4(e){const t=Array.isArray(e[0])?e[0]:e;return X4(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function J4(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var eR=class{constructor(e){this.value=e}deref(){return this.value}},tR=()=>typeof WeakRef>"u"?eR:WeakRef,xE=tR(),rR=0,Sw=1;function Cd(){return{s:rR,v:void 0,o:null,p:null}}function nR(e){return e instanceof xE?e.deref():e}function bE(e,t={}){let r=Cd();const{resultEqualityCheck:n}=t;let a,o=0;function u(){let l=r;const{length:f}=arguments;for(let v=0,x=f;v<x;v++){const b=arguments[v];if(typeof b=="function"||typeof b=="object"&&b!==null){let k=l.o;k===null&&(l.o=k=new WeakMap);const j=k.get(b);j===void 0?(l=Cd(),k.set(b,l)):l=j}else{let k=l.p;k===null&&(l.p=k=new Map);const j=k.get(b);j===void 0?(l=Cd(),k.set(b,l)):l=j}}const h=l;let p;if(l.s===Sw)p=l.v;else if(p=e.apply(null,arguments),o++,n){const v=nR(a);v!=null&&n(v,p)&&(p=v,o!==0&&o--),a=typeof p=="object"&&p!==null||typeof p=="function"?new xE(p):p}return h.s=Sw,h.v=p,p}return u.clearCache=()=>{r=Cd(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function iR(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,u=0,l,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),Y4(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:v,memoizeOptions:x=[],argsMemoize:b=bE,argsMemoizeOptions:k=[]}=p,j=jw(x),S=jw(k),N=Z4(a),P=v(function(){return o++,h.apply(null,arguments)},...j),O=b(function(){u++;const _=J4(N,arguments);return l=P.apply(null,_),l},...S);return Object.assign(O,{resultFunc:h,memoizedResultFunc:P,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:v,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var K=iR(bE);function aR(e,t=1){const r=[],n=Math.floor(t),a=(o,u)=>{for(let l=0;l<o.length;l++){const f=o[l];Array.isArray(f)&&u<n?a(f,u+1):r.push(f)}};return a(e,0),r}function ug(e,t,r){return hE(r)&&(typeof t=="number"&&yE(r)&&gE(t)&&t<r.length||typeof t=="string"&&t in r)?qd(r[t],e):!1}function Nw(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const oR=(e,t,r)=>{if(e!==t){const n=Nw(e),a=Nw(t);if(n===a&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function wE(e){return typeof e=="symbol"||e instanceof Symbol}const sR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lR=/^\w*$/;function uR(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||wE(e)?!0:typeof e=="string"&&(lR.test(e)||!sR.test(e))||t!=null}function cR(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(l=>String(l));const a=(l,f)=>{let h=l;for(let p=0;p<f.length&&h!=null;++p)h=h[f[p]];return h},o=(l,f)=>f==null||l==null?f:typeof l=="object"&&"key"in l?Object.hasOwn(f,l.key)?f[l.key]:a(f,l.path):typeof l=="function"?l(f):Array.isArray(l)?a(f,l):typeof f=="object"?f[l]:f,u=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||uR(l)?l:{key:l,path:hy(l)}));return e.map(l=>({original:l,criteria:u.map(f=>o(f,l))})).slice().sort((l,f)=>{for(let h=0;h<u.length;h++){const p=oR(l.criteria[h],f.criteria[h],r[h]);if(p!==0)return p}return 0}).map(l=>l.original)}function uh(e,...t){const r=t.length;return r>1&&ug(e,t[0],t[1])?t=[]:r>2&&ug(t[0],t[1],t[2])&&(t=[t[0]]),cR(e,aR(t),["asc"])}var kE=e=>e.legend.settings,dR=e=>e.legend.size,fR=e=>e.legend.payload;K([fR,kE],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?uh(n,r):n});function hR(e,t){return gR(e)||vR(e,t)||mR(e,t)||pR()}function pR(){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 mR(e,t){if(e){if(typeof e=="string")return Ew(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ew(e,t):void 0}}function Ew(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function gR(e){if(Array.isArray(e))return e}var Od=1;function Pw(e,t){return Math.abs(e.height-t.height)>Od||Math.abs(e.left-t.left)>Od||Math.abs(e.top-t.top)>Od||Math.abs(e.width-t.width)>Od}function Aw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function yR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=hR(t,2),n=r[0],a=r[1],o=y.useRef(null),u=y.useRef(n);u.current=n;var l=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Aw(f);if(Pw(h,u.current)&&a(h),typeof ResizeObserver<"u"){var p=new ResizeObserver(()=>{var v=Aw(f);Pw(v,u.current)&&a(v)});p.observe(f),o.current=p}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,l]}function Ft(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var xR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Cw=xR,ev=()=>Math.random().toString(36).substring(7).split("").join("."),bR={INIT:`@@redux/INIT${ev()}`,REPLACE:`@@redux/REPLACE${ev()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ev()}`},uf=bR;function yy(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function jE(e,t,r){if(typeof e!="function")throw new Error(Ft(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ft(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ft(1));return r(jE)(e,t)}let n=e,a=t,o=new Map,u=o,l=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function p(){if(f)throw new Error(Ft(3));return a}function v(S){if(typeof S!="function")throw new Error(Ft(4));if(f)throw new Error(Ft(5));let N=!0;h();const P=l++;return u.set(P,S),function(){if(N){if(f)throw new Error(Ft(6));N=!1,h(),u.delete(P),o=null}}}function x(S){if(!yy(S))throw new Error(Ft(7));if(typeof S.type>"u")throw new Error(Ft(8));if(typeof S.type!="string")throw new Error(Ft(17));if(f)throw new Error(Ft(9));try{f=!0,a=n(a,S)}finally{f=!1}return(o=u).forEach(P=>{P()}),S}function b(S){if(typeof S!="function")throw new Error(Ft(10));n=S,x({type:uf.REPLACE})}function k(){const S=v;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ft(11));function P(){const A=N;A.next&&A.next(p())}return P(),{unsubscribe:S(P)}},[Cw](){return this}}}return x({type:uf.INIT}),{dispatch:x,subscribe:v,getState:p,replaceReducer:b,[Cw]:k}}function wR(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:uf.INIT})>"u")throw new Error(Ft(12));if(typeof r(void 0,{type:uf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function SE(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const u=t[o];typeof e[u]=="function"&&(r[u]=e[u])}const n=Object.keys(r);let a;try{wR(r)}catch(o){a=o}return function(u={},l){if(a)throw a;let f=!1;const h={};for(let p=0;p<n.length;p++){const v=n[p],x=r[v],b=u[v],k=x(b,l);if(typeof k>"u")throw l&&l.type,new Error(Ft(14));h[v]=k,f=f||k!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function cf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function kR(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(Ft(15))};const u={getState:a.getState,dispatch:(f,...h)=>o(f,...h)},l=e.map(f=>f(u));return o=cf(...l)(a.dispatch),{...a,dispatch:o}}}function NE(e){return yy(e)&&"type"in e&&typeof e.type=="string"}var EE=Symbol.for("immer-nothing"),Ow=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state");function ln(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Or=Object,Os=Or.getPrototypeOf,df="constructor",ch="prototype",cg="configurable",ff="enumerable",Yd="writable",Su="value",ui=e=>!!e&&!!e[lr];function fn(e){var t;return e?PE(e)||fh(e)||!!e[Ow]||!!((t=e[df])!=null&&t[Ow])||hh(e)||ph(e):!1}var jR=Or[ch][df].toString(),_w=new WeakMap;function PE(e){if(!e||!xy(e))return!1;const t=Os(e);if(t===null||t===Or[ch])return!0;const r=Or.hasOwnProperty.call(t,df)&&t[df];if(r===Object)return!0;if(!as(r))return!1;let n=_w.get(r);return n===void 0&&(n=Function.toString.call(r),_w.set(r,n)),n===jR}function dh(e,t,r=!0){Gu(e)===0?(r?Reflect.ownKeys(e):Or.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Gu(e){const t=e[lr];return t?t.type_:fh(e)?1:hh(e)?2:ph(e)?3:0}var Mw=(e,t,r=Gu(e))=>r===2?e.has(t):Or[ch].hasOwnProperty.call(e,t),dg=(e,t,r=Gu(e))=>r===2?e.get(t):e[t],hf=(e,t,r,n=Gu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function SR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var fh=Array.isArray,hh=e=>e instanceof Map,ph=e=>e instanceof Set,xy=e=>typeof e=="object",as=e=>typeof e=="function",tv=e=>typeof e=="boolean";function NR(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Jn=e=>e.copy_||e.base_,by=e=>e.modified_?e.copy_:e.base_;function fg(e,t){if(hh(e))return new Map(e);if(ph(e))return new Set(e);if(fh(e))return Array[ch].slice.call(e);const r=PE(e);if(t===!0||t==="class_only"&&!r){const n=Or.getOwnPropertyDescriptors(e);delete n[lr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const u=a[o],l=n[u];l[Yd]===!1&&(l[Yd]=!0,l[cg]=!0),(l.get||l.set)&&(n[u]={[cg]:!0,[Yd]:!0,[ff]:l[ff],[Su]:e[u]})}return Or.create(Os(e),n)}else{const n=Os(e);if(n!==null&&r)return{...e};const a=Or.create(n);return Or.assign(a,e)}}function wy(e,t=!1){return mh(e)||ui(e)||!fn(e)||(Gu(e)>1&&Or.defineProperties(e,{set:_d,add:_d,clear:_d,delete:_d}),Or.freeze(e),t&&dh(e,(r,n)=>{wy(n,!0)},!1)),e}function ER(){ln(2)}var _d={[Su]:ER};function mh(e){return e===null||!xy(e)?!0:Or.isFrozen(e)}var pf="MapSet",hg="Patches",Iw="ArrayMethods",AE={};function so(e){const t=AE[e];return t||ln(0,e),t}var Tw=e=>!!AE[e],Nu,CE=()=>Nu,PR=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Tw(pf)?so(pf):void 0,arrayMethodsPlugin_:Tw(Iw)?so(Iw):void 0});function Dw(e,t){t&&(e.patchPlugin_=so(hg),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pg(e){mg(e),e.drafts_.forEach(AR),e.drafts_=null}function mg(e){e===Nu&&(Nu=e.parent_)}var Rw=e=>Nu=PR(Nu,e);function AR(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function $w(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[lr].modified_&&(pg(t),ln(4)),fn(e)&&(e=Lw(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[lr].base_,e,t)}else e=Lw(t,r);return CR(t,e,!0),pg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==EE?e:void 0}function Lw(e,t){if(mh(t))return t;const r=t[lr];if(!r)return mf(t,e.handledSet_,e);if(!vh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);ME(r,e)}return r.copy_}function CR(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&wy(t,r)}function OE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var vh=(e,t)=>e.scope_===t,OR=[];function _E(e,t,r,n){const a=Jn(e),o=e.type_;if(n!==void 0&&dg(a,n,o)===t){hf(a,n,r,o);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;dh(a,(f,h)=>{if(ui(h)){const p=l.get(h)||[];p.push(f),l.set(h,p)}})}const u=e.draftLocations_.get(t)??OR;for(const l of u)hf(a,l,r,o)}function _R(e,t,r){e.callbacks_.push(function(a){var l;const o=t;if(!o||!vh(o,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(o);const u=by(o);_E(e,o.draft_??o,u,r),ME(o,a)})}function ME(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}OE(e)}}function MR(e,t,r){const{scope_:n}=e;if(ui(r)){const a=r[lr];vh(a,n)&&a.callbacks_.push(function(){Xd(e);const u=by(a);_E(e,r,u,t)})}else fn(r)&&e.callbacks_.push(function(){const o=Jn(e);e.type_===3?o.has(r)&&mf(r,n.handledSet_,n):dg(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mf(dg(e.copy_,t,e.type_),n.handledSet_,n)})}function mf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ui(e)||t.has(e)||!fn(e)||mh(e)||(t.add(e),dh(e,(n,a)=>{if(ui(a)){const o=a[lr];if(vh(o,r)){const u=by(o);hf(e,n,u,e.type_),OE(o)}}else fn(a)&&mf(a,t,r)})),e}function IR(e,t){const r=fh(e),n={type_:r?1:0,scope_:t?t.scope_:CE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,o=vf;r&&(a=[n],o=Eu);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,[l,n]}var vf={get(e,t){if(t===lr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=Jn(e);if(!Mw(a,t,e.type_))return TR(e,a,t);const o=a[t];if(e.finalized_||!fn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&NR(t))return o;if(o===rv(e.base_,t)){Xd(e);const u=e.type_===1?+t:t,l=gg(e.scope_,o,e,u);return e.copy_[u]=l}return o},has(e,t){return t in Jn(e)},ownKeys(e){return Reflect.ownKeys(Jn(e))},set(e,t,r){const n=IE(Jn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=rv(Jn(e),t),o=a==null?void 0:a[lr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(SR(r,a)&&(r!==void 0||Mw(e.base_,t,e.type_)))return!0;Xd(e),vg(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),MR(e,t,r)),!0},deleteProperty(e,t){return Xd(e),rv(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vg(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Jn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Yd]:!0,[cg]:e.type_!==1||t!=="length",[ff]:n[ff],[Su]:r[t]}},defineProperty(){ln(11)},getPrototypeOf(e){return Os(e.base_)},setPrototypeOf(){ln(12)}},Eu={};for(let e in vf){let t=vf[e];Eu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)};Eu.set=function(e,t,r){return vf.set.call(this,e[0],t,r,e[0])};function rv(e,t){const r=e[lr];return(r?Jn(r):e)[t]}function TR(e,t,r){var a;const n=IE(t,r);return n?Su in n?n[Su]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function IE(e,t){if(!(t in e))return;let r=Os(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Os(r)}}function vg(e){e.modified_||(e.modified_=!0,e.parent_&&vg(e.parent_))}function Xd(e){e.copy_||(e.assigned_=new Map,e.copy_=fg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var DR=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(as(r)&&!as(n)){const u=n;n=r;const l=this;return function(h=u,...p){return l.produce(h,v=>n.call(this,v,...p))}}as(n)||ln(6),a!==void 0&&!as(a)&&ln(7);let o;if(fn(r)){const u=Rw(this),l=gg(u,r,void 0);let f=!0;try{o=n(l),f=!1}finally{f?pg(u):mg(u)}return Dw(u,a),$w(o,u)}else if(!r||!xy(r)){if(o=n(r),o===void 0&&(o=r),o===EE&&(o=void 0),this.autoFreeze_&&wy(o,!0),a){const u=[],l=[];so(hg).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:l}),a(u,l)}return o}else ln(1,r)},this.produceWithPatches=(r,n)=>{if(as(r))return(l,...f)=>this.produceWithPatches(l,h=>r(h,...f));let a,o;return[this.produce(r,n,(l,f)=>{a=l,o=f}),a,o]},tv(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),tv(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),tv(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){fn(t)||ln(8),ui(t)&&(t=Hr(t));const r=Rw(this),n=gg(r,t,void 0);return n[lr].isManual_=!0,mg(r),n}finishDraft(t,r){const n=t&&t[lr];(!n||!n.isManual_)&&ln(9);const{scope_:a}=n;return Dw(a,r),$w(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const a=so(hg).applyPatches_;return ui(t)?a(t,r):this.produce(t,o=>a(o,r))}};function gg(e,t,r,n){const[a,o]=hh(t)?so(pf).proxyMap_(t,r):ph(t)?so(pf).proxySet_(t,r):IR(t,r);return((r==null?void 0:r.scope_)??CE()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?_R(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function Hr(e){return ui(e)||ln(10,e),TE(e)}function TE(e){if(!fn(e)||mh(e))return e;const t=e[lr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=fg(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=fg(e,!0);return dh(r,(a,o)=>{hf(r,a,TE(o))},n),t&&(t.finalized_=!1),r}var RR=new DR,DE=RR.produce;function RE(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var $R=RE(),LR=RE,zR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?cf:cf.apply(null,arguments)};function Mr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(_r(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>NE(n)&&n.type===e,r}var $E=class iu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,iu.prototype)}static get[Symbol.species](){return iu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new iu(...t[0].concat(this)):new iu(...t.concat(this))}};function zw(e){return fn(e)?DE(e,()=>{}):e}function Md(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function FR(e){return typeof e=="boolean"}var BR=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let u=new $E;return r&&(FR(r)?u.push($R):u.push(LR(r.extraArgument))),u},LE="RTK_autoBatch",at=()=>e=>({payload:e,meta:{[LE]:!0}}),Fw=e=>t=>{setTimeout(t,e)},UR=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(a),u=setTimeout(a,t)},zE=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,u=!1;const l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?UR(window.requestAnimationFrame,100):Fw(10):e.type==="callback"?e.queueNotification:Fw(e.timeout),h=()=>{u=!1,o&&(o=!1,l.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const v=()=>a&&p(),x=n.subscribe(v);return l.add(p),()=>{x(),l.delete(p)}},dispatch(p){var v;try{return a=!((v=p==null?void 0:p.meta)!=null&&v[LE]),o=!a,o&&(u||(u=!0,f(h))),n.dispatch(p)}finally{a=!0}}})},WR=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new $E(e);return n&&a.push(zE(typeof n=="object"?n:void 0)),a};function HR(e){const t=BR(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(yy(r))l=SE(r);else throw new Error(_r(1));let f;typeof n=="function"?f=n(t):f=t();let h=cf;a&&(h=zR({trace:!1,...typeof a=="object"&&a}));const p=kR(...f),v=WR(p);let x=typeof u=="function"?u(v):v();const b=h(...x);return jE(l,o,b)}function FE(e){const t={},r=[];let n;const a={addCase(o,u){const l=typeof o=="string"?o:o.type;if(!l)throw new Error(_r(28));if(l in t)throw new Error(_r(29));return t[l]=u,a},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),a},addMatcher(o,u){return r.push({matcher:o,reducer:u}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function KR(e){return typeof e=="function"}function GR(e,t){let[r,n,a]=FE(t),o;if(KR(e))o=()=>zw(e());else{const l=zw(e);o=()=>l}function u(l=o(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[a]),h.reduce((p,v)=>{if(v)if(ui(p)){const b=v(p,f);return b===void 0?p:b}else{if(fn(p))return DE(p,x=>v(x,f));{const x=v(p,f);if(x===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return p},l)}return u.getInitialState=o,u}var VR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qR=(e=21)=>{let t="",r=e;for(;r--;)t+=VR[Math.random()*64|0];return t},QR=Symbol.for("rtk-slice-createasyncthunk");function YR(e,t){return`${e}/${t}`}function XR({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[QR];return function(a){const{name:o,reducerPath:u=o}=a;if(!o)throw new Error(_r(11));const l=(typeof a.reducers=="function"?a.reducers(JR()):a.reducers)||{},f=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,_){const C=typeof A=="string"?A:A.type;if(!C)throw new Error(_r(12));if(C in h.sliceCaseReducersByType)throw new Error(_r(13));return h.sliceCaseReducersByType[C]=_,p},addMatcher(A,_){return h.sliceMatchers.push({matcher:A,reducer:_}),p},exposeAction(A,_){return h.actionCreators[A]=_,p},exposeCaseReducer(A,_){return h.sliceCaseReducersByName[A]=_,p}};f.forEach(A=>{const _=l[A],C={reducerName:A,type:YR(o,A),createNotation:typeof a.reducers=="function"};t$(_)?n$(C,_,p,t):e$(C,_,p)});function v(){const[A={},_=[],C=void 0]=typeof a.extraReducers=="function"?FE(a.extraReducers):[a.extraReducers],I={...A,...h.sliceCaseReducersByType};return GR(a.initialState,U=>{for(let B in I)U.addCase(B,I[B]);for(let B of h.sliceMatchers)U.addMatcher(B.matcher,B.reducer);for(let B of _)U.addMatcher(B.matcher,B.reducer);C&&U.addDefaultCase(C)})}const x=A=>A,b=new Map,k=new WeakMap;let j;function S(A,_){return j||(j=v()),j(A,_)}function N(){return j||(j=v()),j.getInitialState()}function P(A,_=!1){function C(U){let B=U[A];return typeof B>"u"&&_&&(B=Md(k,C,N)),B}function I(U=x){const B=Md(b,_,()=>new WeakMap);return Md(B,U,()=>{const G={};for(const[q,R]of Object.entries(a.selectors??{}))G[q]=ZR(R,U,()=>Md(k,U,N),_);return G})}return{reducerPath:A,getSelectors:I,get selectors(){return I(C)},selectSlice:C}}const O={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...P(u),injectInto(A,{reducerPath:_,...C}={}){const I=_??u;return A.inject({reducerPath:I,reducer:S},C),{...O,...P(I,!0)}}};return O}}function ZR(e,t,r,n){function a(o,...u){let l=t(o);return typeof l>"u"&&n&&(l=r()),e(l,...u)}return a.unwrapped=e,a}var rr=XR();function JR(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function e$({type:e,reducerName:t,createNotation:r},n,a){let o,u;if("reducer"in n){if(r&&!r$(n))throw new Error(_r(17));o=n.reducer,u=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Mr(e,u):Mr(e))}function t$(e){return e._reducerDefinitionType==="asyncThunk"}function r$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function n$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(_r(18));const{payloadCreator:o,fulfilled:u,pending:l,rejected:f,settled:h,options:p}=r,v=a(e,o,p);n.exposeAction(t,v),u&&n.addCase(v.fulfilled,u),l&&n.addCase(v.pending,l),f&&n.addCase(v.rejected,f),h&&n.addMatcher(v.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Id,pending:l||Id,rejected:f||Id,settled:h||Id})}function Id(){}var i$="task",BE="listener",UE="completed",ky="cancelled",a$=`task-${ky}`,o$=`task-${UE}`,yg=`${BE}-${ky}`,s$=`${BE}-${UE}`,gh=class{constructor(e){gd(this,"code");gd(this,"name","TaskAbortError");gd(this,"message");this.code=e,this.message=`${i$} ${ky} (reason: ${e})`}},jy=(e,t)=>{if(typeof e!="function")throw new TypeError(_r(32))},gf=()=>{},WE=(e,t=gf)=>(e.catch(t),e),HE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),eo=e=>{if(e.aborted)throw new gh(e.reason)};function KE(e,t){let r=gf;return new Promise((n,a)=>{const o=()=>a(new gh(e.reason));if(e.aborted){o();return}r=HE(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=gf})}var l$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof gh?"cancelled":"rejected",error:r}}finally{t==null||t()}},yf=e=>t=>WE(KE(e,t).then(r=>(eo(e),r))),GE=e=>{const t=yf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ds}=Object,Bw={},yh="listenerMiddleware",u$=(e,t)=>{const r=n=>HE(e,()=>n.abort(e.reason));return(n,a)=>{jy(n);const o=new AbortController;r(o);const u=l$(async()=>{eo(e),eo(o.signal);const l=await n({pause:yf(o.signal),delay:GE(o.signal),signal:o.signal});return eo(o.signal),l},()=>o.abort(o$));return a!=null&&a.autoJoin&&t.push(u.catch(gf)),{result:yf(e)(u),cancel(){o.abort(a$)}}}},c$=(e,t)=>{const r=async(n,a)=>{eo(t);let o=()=>{};const l=[new Promise((f,h)=>{let p=e({predicate:n,effect:(v,x)=>{x.unsubscribe(),f([v,x.getState(),x.getOriginalState()])}});o=()=>{p(),h()}})];a!=null&&l.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await KE(t,Promise.race(l));return eo(t),f}finally{o()}};return((n,a)=>WE(r(n,a)))},VE=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Mr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(_r(21));return jy(o),{predicate:a,type:t,effect:o}},qE=ds(e=>{const{type:t,predicate:r,effect:n}=VE(e);return{id:qR(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(_r(22))}}},{withTypes:()=>qE}),Uw=(e,t)=>{const{type:r,effect:n,predicate:a}=VE(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},xg=e=>{e.pending.forEach(t=>{t.abort(yg)})},d$=(e,t)=>()=>{for(const r of t.keys())xg(r);e.clear()},Ww=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},QE=ds(Mr(`${yh}/add`),{withTypes:()=>QE}),f$=Mr(`${yh}/removeAll`),YE=ds(Mr(`${yh}/remove`),{withTypes:()=>YE}),h$=(...e)=>{console.error(`${yh}/error`,...e)},Vu=(e={})=>{const t=new Map,r=new Map,n=b=>{const k=r.get(b)??0;r.set(b,k+1)},a=b=>{const k=r.get(b)??1;k===1?r.delete(b):r.set(b,k-1)},{extra:o,onError:u=h$}=e;jy(u);const l=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),k=>{b.unsubscribe(),k!=null&&k.cancelActive&&xg(b)}),f=(b=>{const k=Uw(t,b)??qE(b);return l(k)});ds(f,{withTypes:()=>f});const h=b=>{const k=Uw(t,b);return k&&(k.unsubscribe(),b.cancelActive&&xg(k)),!!k};ds(h,{withTypes:()=>h});const p=async(b,k,j,S)=>{const N=new AbortController,P=c$(f,N.signal),O=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(k,ds({},j,{getOriginalState:S,condition:(A,_)=>P(A,_).then(Boolean),take:P,delay:GE(N.signal),pause:yf(N.signal),extra:o,signal:N.signal,fork:u$(N.signal,O),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((A,_,C)=>{A!==N&&(A.abort(yg),C.delete(A))})},cancel:()=>{N.abort(yg),b.pending.delete(N)},throwIfCancelled:()=>{eo(N.signal)}})))}catch(A){A instanceof gh||Ww(u,A,{raisedBy:"effect"})}finally{await Promise.all(O),N.abort(s$),a(b),b.pending.delete(N)}},v=d$(t,r);return{middleware:b=>k=>j=>{if(!NE(j))return k(j);if(QE.match(j))return f(j.payload);if(f$.match(j)){v();return}if(YE.match(j))return h(j.payload);let S=b.getState();const N=()=>{if(S===Bw)throw new Error(_r(23));return S};let P;try{if(P=k(j),t.size>0){const O=b.getState(),A=Array.from(t.values());for(const _ of A){let C=!1;try{C=_.predicate(j,O,S)}catch(I){C=!1,Ww(u,I,{raisedBy:"predicate"})}C&&p(_,j,b,N)}}}finally{S=Bw}return P},startListening:f,stopListening:h,clearListeners:v}};function _r(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var p$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},XE=rr({name:"chartLayout",initialState:p$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),xh=XE.actions,m$=xh.setMargin,v$=xh.setLayout,g$=xh.setChartSize,y$=xh.setScale,x$=XE.reducer;function ZE(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Be(e){return Number.isFinite(e)}function Rn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Hw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function os(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(r),!0).forEach(function(n){b$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b$(e,t,r){return(t=w$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w$(e){var t=k$(e,"string");return typeof t=="symbol"?t:t+""}function k$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tt(e,t,r){return Kt(e)||Kt(t)?r:Dn(t)?go(e,t,r):typeof t=="function"?t(e):r}var j$=(e,t,r)=>{if(t&&r){var n=r.width,a=r.height,o=t.align,u=t.verticalAlign,l=t.layout;if((l==="vertical"||l==="horizontal"&&u==="middle")&&o!=="center"&&Ne(e[o]))return os(os({},e),{},{[o]:e[o]+(n||0)});if((l==="horizontal"||l==="vertical"&&o==="center")&&u!=="middle"&&Ne(e[u]))return os(os({},e),{},{[u]:e[u]+(a||0)})}return e},zn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",JE=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var a,o,u=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate));return a||u.push(t),o||u.push(r),u},eP=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,u=e.scale,l=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,p=e.tickCount,v=e.ticks,x=e.niceTicks,b=e.axisType;if(!u)return null;var k=l==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,j=a==="category"&&u.bandwidth?u.bandwidth()/k:0;if(j=b==="angleAxis"&&o&&o.length>=2?Wr(o[0]-o[1])*2*j:j,v||x){var S=(v||x||[]).map((N,P)=>{var O=n?n.indexOf(N):N,A=u.map(O);return Be(A)?{coordinate:A+j,value:N,offset:j,index:P}:null}).filter(yr);return S}return f&&h?h.map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+j,value:N,index:P,offset:j}:null}).filter(yr):u.ticks&&p!=null?u.ticks(p).map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+j,value:N,index:P,offset:j}:null}).filter(yr):u.domain().map((N,P)=>{var O=u.map(N);return Be(O)?{coordinate:O+j,value:n?n[N]:N,index:P,offset:j}:null}).filter(yr)},S$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a<n;++a)for(var o=0,u=0,l=0;l<r;++l){var f=e[l],h=f==null?void 0:f[a];if(h!=null){var p=h[1],v=h[0],x=Tn(p)?v:p;x>=0?(h[0]=o,o+=x,h[1]=o):(h[0]=u,u+=x,h[1]=u)}}}},N$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a<n;++a)for(var o=0,u=0;u<r;++u){var l=e[u],f=l==null?void 0:l[a];if(f!=null){var h=Tn(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},E$={sign:S$,expand:UD,none:ao,silhouette:WD,wiggle:HD,positive:N$},P$=(e,t,r)=>{var n,a=(n=E$[r])!==null&&n!==void 0?n:ao,o=BD().keys(t).value((l,f)=>Number(Tt(l,f,0))).order(ag).offset(a),u=o(e);return u.forEach((l,f)=>{l.forEach((h,p)=>{var v=Tt(e[p],t[f],0);Array.isArray(v)&&v.length===2&&Ne(v[0])&&Ne(v[1])&&(h[0]=v[0],h[1]=v[1])})}),u};function A$(e){return e==null?void 0:String(e)}function Kw(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Kt(a[t.dataKey])){var l=oE(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Tt(a,Kt(u)?t.dataKey:u),h=t.scale.map(f);return Ne(h)?h:null}var C$=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},O$=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],_$=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return O$(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var u=o.stackedData,l=u.reduce((f,h)=>{var p=ZE(h,t,r),v=C$(p);return!Be(v[0])||!Be(v[1])?f:[Math.min(f[0],v[0]),Math.max(f[1],v[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},Gw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,xf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=uh(t,p=>p.coordinate),o=1/0,u=1,l=a.length;u<l;u++){var f=a[u],h=a[u-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function qw(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,a=e.value,o=e.name;return os(os({},t),{},{dataKey:r,payload:n,value:a,name:o})}function tP(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var M$=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},I$=(e,t)=>t==="centric"?e.angle:e.radius,hi=e=>e.layout.width,pi=e=>e.layout.height,T$=e=>e.layout.scale,rP=e=>e.layout.margin,bh=K(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),wh=K(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),D$="data-recharts-item-index",R$="data-recharts-item-id",qu=60;function Qw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Td(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qw(Object(r),!0).forEach(function(n){$$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $$(e,t,r){return(t=L$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L$(e){var t=z$(e,"string");return typeof t=="symbol"?t:t+""}function z$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F$=e=>e.brush.height;function B$(e){var t=wh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:qu;return r+a}return r},0)}function U$(e){var t=wh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:qu;return r+a}return r},0)}function W$(e){var t=bh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function H$(e){var t=bh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=K([hi,pi,rP,F$,B$,U$,W$,H$,kE,dR],(e,t,r,n,a,o,u,l,f,h)=>{var p={left:(r.left||0)+a,right:(r.right||0)+o},v={top:(r.top||0)+u,bottom:(r.bottom||0)+l},x=Td(Td({},v),p),b=x.bottom;x.bottom+=n,x=j$(x,f,h);var k=e-x.left-x.right,j=t-x.top-x.bottom;return Td(Td({brushBottom:b},x),{},{width:Math.max(k,0),height:Math.max(j,0)})}),K$=K(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),nP=K(hi,pi,(e,t)=>({x:0,y:0,width:e,height:t})),G$=y.createContext(null),wr=()=>y.useContext(G$)!=null,kh=e=>e.brush,jh=K([kh,Vt,rP],(e,t,r)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ne(e.width)?e.width:t.width}));function V$(e,t,{signal:r,edges:n}={}){let a,o=null;const u=n!=null&&n.includes("leading"),l=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{l&&f(),b()};let p=null;const v=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},t)},x=()=>{p!==null&&(clearTimeout(p),p=null)},b=()=>{x(),a=void 0,o=null},k=()=>{f()},j=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=p==null;v(),u&&N&&f()};return j.schedule=v,j.cancel=b,j.flush=k,r==null||r.addEventListener("abort",b,{once:!0}),j}function q$(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),a&&(u[1]="trailing");let l,f=null;const h=V$(function(...x){l=e.apply(this,x),f=null},t,{edges:u}),p=function(...x){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(l=e.apply(this,x),f=Date.now(),h.cancel(),h.schedule(),l):(h.apply(this,x),l)},v=()=>(h.flush(),l);return p.cancel=h.cancel,p.flush=v,p}function Q$(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return q$(e,t,{leading:n,maxWait:t,trailing:a})}var bf=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;console.warn(r.replace(/%s/g,()=>a[u++]))}},Cn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},iP=(e,t,r)=>{var n=r.width,a=n===void 0?Cn.width:n,o=r.height,u=o===void 0?Cn.height:o,l=r.aspect,f=r.maxHeight,h=oo(a)?e:Number(a),p=oo(u)?t:Number(u);return l&&l>0&&(h?p=h/l:p&&(h=p*l),f&&p!=null&&p>f&&(p=f)),{calculatedWidth:h,calculatedHeight:p}},Y$={width:0,height:0,overflow:"visible"},X$={width:0,overflowX:"visible"},Z$={height:0,overflowY:"visible"},J$={},eL=e=>{var t=e.width,r=e.height,n=oo(t),a=oo(r);return n&&a?Y$:n?X$:a?Z$:J$};function tL(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=Cn.width,o=Cn.height):a===void 0?a=n&&n>0?void 0:Cn.width:o===void 0&&(o=n&&n>0?void 0:Cn.height),{width:a,height:o}}var rL=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wf.apply(null,arguments)}function Yw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yw(Object(r),!0).forEach(function(n){nL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nL(e,t,r){return(t=iL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iL(e){var t=aL(e,"string");return typeof t=="symbol"?t:t+""}function aL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oL(e,t){return cL(e)||uL(e,t)||lL(e,t)||sL()}function sL(){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 lL(e,t){if(e){if(typeof e=="string")return Zw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zw(e,t):void 0}}function Zw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function uL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function cL(e){if(Array.isArray(e))return e}function dL(e,t){if(e==null)return{};var r,n,a=fL(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function fL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var aP=y.createContext(Cn.initialDimension);function hL(e){return Rn(e.width)&&Rn(e.height)}function oP(e){var t=e.children,r=e.width,n=e.height,a=y.useMemo(()=>({width:r,height:n}),[r,n]);return hL(a)?y.createElement(aP.Provider,{value:a},t):null}var Sy=()=>y.useContext(aP),pL=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?Cn.initialDimension:n,o=e.width,u=e.height,l=e.minWidth,f=l===void 0?Cn.minWidth:l,h=e.minHeight,p=e.maxHeight,v=e.children,x=e.debounce,b=x===void 0?Cn.debounce:x,k=e.id,j=e.className,S=e.onResize,N=e.style,P=N===void 0?{}:N,O=dL(e,rL),A=y.useRef(null),_=y.useRef();_.current=S,y.useImperativeHandle(t,()=>A.current);var C=y.useState({containerWidth:a.width,containerHeight:a.height}),I=oL(C,2),U=I[0],B=I[1],G=y.useCallback((ke,me)=>{B(Q=>{var oe=Math.round(ke),X=Math.round(me);return Q.containerWidth===oe&&Q.containerHeight===X?Q:{containerWidth:oe,containerHeight:X}})},[]);y.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return Fs;var ke=$=>{var T,ee=$[0];if(ee!=null){var ne=ee.contentRect,te=ne.width,ue=ne.height;G(te,ue),(T=_.current)===null||T===void 0||T.call(_,te,ue)}};b>0&&(ke=Q$(ke,b,{trailing:!0,leading:!1}));var me=new ResizeObserver(ke),Q=A.current.getBoundingClientRect(),oe=Q.width,X=Q.height;return G(oe,X),me.observe(A.current),()=>{me.disconnect()}},[G,b]);var q=U.containerWidth,R=U.containerHeight;bf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var de=iP(q,R,{width:o,height:u,aspect:r,maxHeight:p}),Z=de.calculatedWidth,ge=de.calculatedHeight;return bf(q<0||R<0||Z!=null&&Z>0||ge!=null&&ge>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.`,Z,ge,o,u,f,h,r),y.createElement("div",wf({id:k?"".concat(k):void 0,className:et("recharts-responsive-container",j),style:Xw(Xw({},P),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:p}),ref:A},O),y.createElement("div",{style:eL({width:o,height:u})},y.createElement(oP,{width:Z,height:ge},v)))}),mL=y.forwardRef((e,t)=>{var r=Sy();if(Rn(r.width)&&Rn(r.height))return e.children;var n=tL({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,u=iP(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),l=u.calculatedWidth,f=u.calculatedHeight;return Ne(l)&&Ne(f)?y.createElement(oP,{width:l,height:f},e.children):y.createElement(pL,wf({},e,{width:a,height:o,ref:t}))});function Ny(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Sh=()=>{var e,t=wr(),r=Ae(K$),n=Ae(jh),a=(e=Ae(kh))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},vL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},sP=()=>{var e;return(e=Ae(Vt))!==null&&e!==void 0?e:vL},lP=()=>Ae(hi),uP=()=>Ae(pi),ut=e=>e.layout.layoutType,Bs=()=>Ae(ut),Ey=()=>{var e=Bs();if(e==="horizontal"||e==="vertical")return e},cP=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},gL=()=>{var e=Bs();return e!==void 0},Qu=e=>{var t=wt(),r=wr(),n=e.width,a=e.height,o=Sy(),u=n,l=a;return o&&(u=o.width>0?o.width:n,l=o.height>0?o.height:a),y.useEffect(()=>{!r&&Rn(u)&&Rn(l)&&t(g$({width:u,height:l}))},[t,r,u,l]),null},dP=Symbol.for("immer-nothing"),Jw=Symbol.for("immer-draftable"),Ir=Symbol.for("immer-state");function un(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pu=Object.getPrototypeOf;function _s(e){return!!e&&!!e[Ir]}function lo(e){var t;return e?fP(e)||Array.isArray(e)||!!e[Jw]||!!((t=e.constructor)!=null&&t[Jw])||Yu(e)||Eh(e):!1}var yL=Object.prototype.constructor.toString(),ek=new WeakMap;function fP(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=ek.get(r);return n===void 0&&(n=Function.toString.call(r),ek.set(r,n)),n===yL}function kf(e,t,r=!0){Nh(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Nh(e){const t=e[Ir];return t?t.type_:Array.isArray(e)?1:Yu(e)?2:Eh(e)?3:0}function bg(e,t){return Nh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hP(e,t,r){const n=Nh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function xL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yu(e){return e instanceof Map}function Eh(e){return e instanceof Set}function $a(e){return e.copy_||e.base_}function wg(e,t){if(Yu(e))return new Map(e);if(Eh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=fP(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Ir];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const u=a[o],l=n[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Pu(e),n)}else{const n=Pu(e);if(n!==null&&r)return{...e};const a=Object.create(n);return Object.assign(a,e)}}function Py(e,t=!1){return Ph(e)||_s(e)||!lo(e)||(Nh(e)>1&&Object.defineProperties(e,{set:Dd,add:Dd,clear:Dd,delete:Dd}),Object.freeze(e),t&&Object.values(e).forEach(r=>Py(r,!0))),e}function bL(){un(2)}var Dd={value:bL};function Ph(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var wL={};function uo(e){const t=wL[e];return t||un(0,e),t}var Au;function pP(){return Au}function kL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tk(e,t){t&&(uo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kg(e){jg(e),e.drafts_.forEach(jL),e.drafts_=null}function jg(e){e===Au&&(Au=e.parent_)}function rk(e){return Au=kL(Au,e)}function jL(e){const t=e[Ir];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function nk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ir].modified_&&(kg(t),un(4)),lo(e)&&(e=jf(t,e),t.parent_||Sf(t,e)),t.patches_&&uo("Patches").generateReplacementPatches_(r[Ir].base_,e,t.patches_,t.inversePatches_)):e=jf(t,r,[]),kg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==dP?e:void 0}function jf(e,t,r){if(Ph(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[Ir];if(!a)return kf(t,(o,u)=>ik(e,a,t,o,u,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Sf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let u=o,l=!1;a.type_===3&&(u=new Set(o),o.clear(),l=!0),kf(u,(f,h)=>ik(e,a,o,f,h,r,l),n),Sf(e,o,!1),r&&e.patches_&&uo("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function ik(e,t,r,n,a,o,u){if(a==null||typeof a!="object"&&!u)return;const l=Ph(a);if(!(l&&!u)){if(_s(a)){const f=o&&t&&t.type_!==3&&!bg(t.assigned_,n)?o.concat(n):void 0,h=jf(e,a,f);if(hP(r,n,h),_s(h))e.canAutoFreeze_=!1;else return}else u&&r.add(a);if(lo(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&l)return;jf(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Yu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Sf(e,a)}}}function Sf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Py(t,r)}function SL(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:pP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=Ay;r&&(a=[n],o=Cu);const{revoke:u,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=u,l}var Ay={get(e,t){if(t===Ir)return e;const r=$a(e);if(!bg(r,t))return NL(e,r,t);const n=r[t];return e.finalized_||!lo(n)?n:n===nv(e.base_,t)?(iv(e),e.copy_[t]=Ng(n,e)):n},has(e,t){return t in $a(e)},ownKeys(e){return Reflect.ownKeys($a(e))},set(e,t,r){const n=mP($a(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=nv($a(e),t),o=a==null?void 0:a[Ir];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(xL(r,a)&&(r!==void 0||bg(e.base_,t)))return!0;iv(e),Sg(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return nv(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,iv(e),Sg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=$a(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){un(11)},getPrototypeOf(e){return Pu(e.base_)},setPrototypeOf(){un(12)}},Cu={};kf(Ay,(e,t)=>{Cu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Cu.deleteProperty=function(e,t){return Cu.set.call(this,e,t,void 0)};Cu.set=function(e,t,r){return Ay.set.call(this,e[0],t,r,e[0])};function nv(e,t){const r=e[Ir];return(r?$a(r):e)[t]}function NL(e,t,r){var a;const n=mP(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function mP(e,t){if(!(t in e))return;let r=Pu(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Pu(r)}}function Sg(e){e.modified_||(e.modified_=!0,e.parent_&&Sg(e.parent_))}function iv(e){e.copy_||(e.copy_=wg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var EL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&un(6),n!==void 0&&typeof n!="function"&&un(7);let a;if(lo(t)){const o=rk(this),u=Ng(t,void 0);let l=!0;try{a=r(u),l=!1}finally{l?kg(o):jg(o)}return tk(o,n),nk(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===dP&&(a=void 0),this.autoFreeze_&&Py(a,!0),n){const o=[],u=[];uo("Patches").generateReplacementPatches_(t,a,o,u),n(o,u)}return a}else un(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,f=>t(f,...l));let n,a;return[this.produce(t,r,(u,l)=>{n=u,a=l}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){lo(e)||un(8),_s(e)&&(e=PL(e));const t=rk(this),r=Ng(e,void 0);return r[Ir].isManual_=!0,jg(t),r}finishDraft(e,t){const r=e&&e[Ir];(!r||!r.isManual_)&&un(9);const{scope_:n}=r;return tk(n,t),nk(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=uo("Patches").applyPatches_;return _s(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Ng(e,t){const r=Yu(e)?uo("MapSet").proxyMap_(e,t):Eh(e)?uo("MapSet").proxySet_(e,t):SL(e,t);return(t?t.scope_:pP()).drafts_.push(r),r}function PL(e){return _s(e)||un(10,e),vP(e)}function vP(e){if(!lo(e)||Ph(e))return e;const t=e[Ir];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wg(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=wg(e,!0);return kf(r,(a,o)=>{hP(r,a,vP(o))},n),t&&(t.finalized_=!1),r}var AL=new EL;AL.produce;var CL={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},gP=rr({name:"legend",initialState:CL,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:at()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:at()},removeLegendPayload:{reducer(e,t){var r=Hr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:at()}}}),Xu=gP.actions;Xu.setLegendSize;Xu.setLegendSettings;var OL=Xu.addLegendPayload,_L=Xu.replaceLegendPayload,ML=Xu.removeLegendPayload,IL=gP.reducer,av={exports:{}},ov={};/**
* @license React
* use-sync-external-store-with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ak;function TL(){if(ak)return ov;ak=1;var e=Ls();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,o=e.useEffect,u=e.useMemo,l=e.useDebugValue;return ov.useSyncExternalStoreWithSelector=function(f,h,p,v,x){var b=a(null);if(b.current===null){var k={hasValue:!1,value:null};b.current=k}else k=b.current;b=u(function(){function S(_){if(!N){if(N=!0,P=_,_=v(_),x!==void 0&&k.hasValue){var C=k.value;if(x(C,_))return O=C}return O=_}if(C=O,r(P,_))return C;var I=v(_);return x!==void 0&&x(C,I)?(P=_,C):(P=_,O=I)}var N=!1,P,O,A=p===void 0?null:p;return[function(){return S(h())},A===null?void 0:function(){return S(A())}]},[h,p,v,x]);var j=n(f,b[0],b[1]);return o(function(){k.hasValue=!0,k.value=j},[j]),l(j),j},ov}var ok;function DL(){return ok||(ok=1,av.exports=TL()),av.exports}DL();function RL(e){e()}function $L(){let e=null,t=null;return{clear(){e=null,t=null},notify(){RL(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var sk={notify(){},get:()=>[]};function LL(e,t){let r,n=sk,a=0,o=!1;function u(j){p();const S=n.subscribe(j);let N=!1;return()=>{N||(N=!0,S(),v())}}function l(){n.notify()}function f(){k.onStateChange&&k.onStateChange()}function h(){return o}function p(){a++,r||(r=e.subscribe(f),n=$L())}function v(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=sk)}function x(){o||(o=!0,p())}function b(){o&&(o=!1,v())}const k={addNestedSub:u,notifyNestedSubs:l,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:b,getListeners:()=>n};return k}var zL=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",FL=zL(),BL=()=>typeof navigator<"u"&&navigator.product==="ReactNative",UL=BL(),WL=()=>FL||UL?y.useLayoutEffect:y.useEffect,HL=WL();function lk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function KL(e,t){if(lk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(t,r[a])||!lk(e[r[a]],t[r[a]]))return!1;return!0}var sv=Symbol.for("react-redux-context"),lv=typeof globalThis<"u"?globalThis:{};function GL(){if(!y.createContext)return{};const e=lv[sv]??(lv[sv]=new Map);let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var VL=GL();function qL(e){const{children:t,context:r,serverState:n,store:a}=e,o=y.useMemo(()=>{const f=LL(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),u=y.useMemo(()=>a.getState(),[a]);HL(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const l=r||VL;return y.createElement(l.Provider,{value:o},t)}var QL=qL,YL=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function XL(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ah(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(YL.has(n)){if(e[n]==null&&t[n]==null)continue;if(!KL(e[n],t[n]))return!1}else if(!XL(e[n],t[n]))return!1;return!0}function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eg.apply(null,arguments)}function uk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uk(Object(r),!0).forEach(function(n){ZL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZL(e,t,r){return(t=JL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JL(e){var t=ez(e,"string");return typeof t=="symbol"?t:t+""}function ez(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tz(e,t){return az(e)||iz(e,t)||nz(e,t)||rz()}function rz(){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 nz(e,t){if(e){if(typeof e=="string")return ck(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ck(e,t):void 0}}function ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function iz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function az(e){if(Array.isArray(e))return e}function oz(e){return Array.isArray(e)&&Dn(e[0])&&Dn(e[1])?e.join(" ~ "):e}var Yo={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function sz(e,t){return t==null?e:uh(e,t)}var lz=e=>{var t=e.separator,r=t===void 0?Yo.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,u=o===void 0?Yo.labelStyle:o,l=e.payload,f=e.formatter,h=e.itemSorter,p=e.wrapperClassName,v=e.labelClassName,x=e.label,b=e.labelFormatter,k=e.accessibilityLayer,j=k===void 0?Yo.accessibilityLayer:k,S=()=>{if(l&&l.length){var U={padding:0,margin:0},B=sz(l,h),G=B.map((q,R)=>{if(!q||q.type==="none")return null;var de=q.formatter||f||oz,Z=q.value,ge=q.name,ke=Z,me=ge;if(de){var Q=de(Z,ge,q,R,l);if(Array.isArray(Q)){var oe=tz(Q,2);ke=oe[0],me=oe[1]}else if(Q!=null)ke=Q;else return null}var X=Vl(Vl({},Yo.itemStyle),{},{color:q.color||Yo.itemStyle.color},a);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:X},Dn(me)?y.createElement("span",{className:"recharts-tooltip-item-name"},me):null,Dn(me)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},ke),y.createElement("span",{className:"recharts-tooltip-item-unit"},q.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:U},G)}return null},N=Vl(Vl({},Yo.contentStyle),n),P=Vl({margin:0},u),O=!Kt(x),A=O?x:"",_=et("recharts-default-tooltip",p),C=et("recharts-tooltip-label",v);O&&b&&l!==void 0&&l!==null&&(A=b(x,l));var I=j?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",Eg({className:_,style:N},I),y.createElement("p",{className:C,style:P},y.isValidElement(A)?A:"".concat(A)),S())},ql="recharts-tooltip-wrapper",uz={visibility:"hidden"};function cz(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return et(ql,{["".concat(ql,"-right")]:Ne(r)&&t&&Ne(t.x)&&r>=t.x,["".concat(ql,"-left")]:Ne(r)&&t&&Ne(t.x)&&r<t.x,["".concat(ql,"-bottom")]:Ne(n)&&t&&Ne(t.y)&&n>=t.y,["".concat(ql,"-top")]:Ne(n)&&t&&Ne(t.y)&&n<t.y})}function dk(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offset,o=e.position,u=e.reverseDirection,l=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Ne(o[n]))return o[n];var p=r[n]-l-(a>0?a:0),v=r[n]+a;if(t[n])return u[n]?p:v;var x=f[n];if(x==null)return 0;if(u[n]){var b=p,k=x;return b<k?Math.max(v,x):Math.max(p,x)}if(h==null)return 0;var j=v+l,S=x+h;return j>S?Math.max(p,x):Math.max(v,x)}function dz(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function fz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,u=e.reverseDirection,l=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,p,v,x;return l.height>0&&l.width>0&&r?(v=dk({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:u,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),x=dk({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),p=dz({translateX:v,translateY:x,useTranslate3d:f})):p=uz,{cssProperties:p,cssClasses:cz({translateX:v,translateY:x,coordinate:r})}}var hz=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Zu={isSsr:hz()};function pz(e,t){return yz(e)||gz(e,t)||vz(e,t)||mz()}function mz(){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 vz(e,t){if(e){if(typeof e=="string")return fk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fk(e,t):void 0}}function fk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function gz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function yz(e){if(Array.isArray(e))return e}function yP(){var e=y.useState(()=>Zu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=pz(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(a.matches)};return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}},[]),r}function hk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hk(Object(r),!0).forEach(function(n){xz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xz(e,t,r){return(t=bz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bz(e){var t=wz(e,"string");return typeof t=="symbol"?t:t+""}function wz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kz(e,t){return Ez(e)||Nz(e,t)||Sz(e,t)||jz()}function jz(){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 Sz(e,t){if(e){if(typeof e=="string")return pk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pk(e,t):void 0}}function pk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Nz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function Ez(e){if(Array.isArray(e))return e}function Pz(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing=="string"?e.animationEasing:"ease";return"transform ".concat(e.animationDuration,"ms ").concat(t)}}function Az(e){var t,r,n,a,o,u,l=yP(),f=y.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=kz(f,2),p=h[0],v=h[1];y.useEffect(()=>{var N=P=>{if(P.key==="Escape"){var O,A,_,C;v({dismissed:!0,dismissedAtCoordinate:{x:(O=(A=e.coordinate)===null||A===void 0?void 0:A.x)!==null&&O!==void 0?O:0,y:(_=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),p.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==p.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==p.dismissedAtCoordinate.y)&&v(Xo(Xo({},p),{},{dismissed:!1}));var x=fz({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=x.cssClasses,k=x.cssProperties,j=e.hasPortalFromProps?{}:Xo(Xo({transition:Pz({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},k),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=Xo(Xo({},j),{},{visibility:!p.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var Cz=y.memo(Az),xP=()=>{var e;return(e=Ae(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pg.apply(null,arguments)}function mk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mk(Object(r),!0).forEach(function(n){Oz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oz(e,t,r){return(t=_z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _z(e){var t=Mz(e,"string");return typeof t=="symbol"?t:t+""}function Mz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gk={curveBasisClosed:OD,curveBasisOpen:_D,curveBasis:CD,curveBumpX:PD,curveBumpY:AD,curveLinearClosed:MD,curveLinear:sh,curveMonotoneX:ID,curveMonotoneY:TD,curveNatural:DD,curveStep:RD,curveStepAfter:LD,curveStepBefore:$D},Nf=e=>Be(e.x)&&Be(e.y),yk=e=>e.base!=null&&Nf(e.base)&&Nf(e),Ql=e=>e.x,Yl=e=>e.y,Iz=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(py(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=gk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return gk[r]||sh},xk={connectNulls:!1,type:"linear"},Tz=e=>{var t=e.type,r=t===void 0?xk.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,u=e.layout,l=e.connectNulls,f=l===void 0?xk.connectNulls:l,h=Iz(r,u),p=f?a.filter(Nf):a;if(Array.isArray(o)){var v,x=a.map((N,P)=>vk(vk({},N),{},{base:o[P]}));u==="vertical"?v=Ad().y(Yl).x1(Ql).x0(N=>N.base.x):v=Ad().x(Ql).y1(Yl).y0(N=>N.base.y);var b=v.defined(yk).curve(h),k=f?x.filter(yk):x;return b(k)}var j;u==="vertical"&&Ne(o)?j=Ad().y(Yl).x1(Ql).x0(o):Ne(o)?j=Ad().x(Ql).y1(Yl).y0(o):j=q2().x(Ql).y(Yl);var S=j.defined(Nf).curve(h);return S(p)},Zd=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=Bs();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},l=r&&r.length?Tz(u):n;return y.createElement("path",Pg({},dn(e),my(e),{className:et("recharts-curve",t),d:l===null?void 0:l,ref:a}))},Dz=["x","y","top","left","width","height","className"];function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ag.apply(null,arguments)}function bk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bk(Object(r),!0).forEach(function(n){$z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $z(e,t,r){return(t=Lz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lz(e){var t=zz(e,"string");return typeof t=="symbol"?t:t+""}function zz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fz(e,t){if(e==null)return{};var r,n,a=Bz(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Bz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Uz=(e,t,r,n,a,o)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),Wz=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,u=o===void 0?0:o,l=e.left,f=l===void 0?0:l,h=e.width,p=h===void 0?0:h,v=e.height,x=v===void 0?0:v,b=e.className,k=Fz(e,Dz),j=Rz({x:r,y:a,top:u,left:f,width:p,height:x},k);return!Ne(r)||!Ne(a)||!Ne(p)||!Ne(x)||!Ne(u)||!Ne(f)?null:y.createElement("path",Ag({},Gr(j),{className:et("recharts-cross",b),d:Uz(r,a,p,x,u,f)}))};function Hz(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Ef=1e-4,bP=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],wP=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),wk=(e,t)=>r=>{var n=bP(e,t);return wP(n,r)},Kz=(e,t)=>r=>{var n=bP(e,t),a=[...n.map((o,u)=>o*u).slice(1),0];return wP(a,r)},Gz=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(o=>parseFloat(o));return[a[0],a[1],a[2],a[3]]},Vz=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a=Gz(r[0]);if(a)return a}}return r.length===4?r:[0,0,1,1]},qz=(e,t,r,n)=>{var a=wk(e,r),o=wk(t,n),u=Kz(e,r),l=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,v=p,x=0;x<8;++x){var b=a(v)-p,k=u(v);if(Math.abs(b-p)<Ef||k<Ef)return o(v);v=l(v-b/k)}return o(v)};return f.isStepper=!1,f},kk=function(){return qz(...Vz(...arguments))},Qz=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,o=a===void 0?8:a,u=t.dt,l=u===void 0?16.67:u,f=1,h=[0],p=0,v=0,x=1e4,b=0;b<x;){var k=-(p-f)*n,j=v*o;if(v+=(k-j)*l/1e3,p+=v*l/1e3,h.push(p),Math.abs(p-f)<Ef&&Math.abs(v)<Ef)break;b++}h[h.length-1]=f;var S=h.length-1;return N=>{var P,O,A;if(N<=0)return 0;if(N>=1)return f;var _=N*S,C=Math.floor(_),I=_-C;return((P=h[C])!==null&&P!==void 0?P:0)+(((O=h[C+1])!==null&&O!==void 0?O:0)-((A=h[C])!==null&&A!==void 0?A:0))*I}},Yz=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return kk(e);case"spring":return Qz();default:if(e.split("(")[0]==="cubic-bezier")return kk(e)}return typeof e=="function"?e:null},Xz=(e,t,r)=>{var n,a=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,u);return}n=e.setTimeout(a,u)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},kP=y.createContext(Xz);kP.Provider;function Zz(e){var t=y.useContext(kP);return y.useMemo(()=>e??t,[e,t])}function Jz(e,t,r){return(t=e6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e6(e){var t=t6(e,"string");return typeof t=="symbol"?t:t+""}function t6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jk="init",Sk="pending",Nk="active",r6="completed";function uv(e){return Math.max(0,e)}class n6{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;Jz(this,"state",jk),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=uv(t.animationDuration),this.animationBegin=uv(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===jk)return this.state=Sk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Sk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Nk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):uv(this.animationBegin-r)}if(this.getState()===Nk){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=r6}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class i6 extends n6{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(ni(this.getFrom(),this.getTo(),this.getProgress()))}}class a6{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=u=>{u-n>=r?t(u):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function o6(e,t){return c6(e)||u6(e,t)||l6(e,t)||s6()}function s6(){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 l6(e,t){if(e){if(typeof e=="string")return Ek(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ek(e,t):void 0}}function Ek(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function c6(e){if(Array.isArray(e))return e}var d6={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Pk=0,cv=1;function jP(e){var t=Qr(e,d6),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,u=t.easing,l=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,p=t.children,v=yP(),x=n==="auto"?!Zu.isSsr&&!v:n,b=Zz(t.animationController),k=y.useState(x?Pk:cv),j=o6(k,2),S=j[0],N=j[1];return y.useEffect(()=>{x||N(cv)},[x]),y.useEffect(()=>{var P=Yz(u);if(!x||!a||P==null)return Fs;var O=new a6,A=new i6({animationId:r,easing:P,animationDuration:o,animationBegin:l,onAnimationStart:h,onAnimationEnd:f,from:Pk,to:cv});return b(O,A,N)},[b,r,x,a,o,u,l,h,f]),p(Number(S))}function SP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(ju(t)),n=y.useRef(e);return n.current!==e&&(r.current=ju(t),n.current=e),r.current}var f6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),h6=(e,t,r)=>e.map(n=>"".concat(f6(n)," ").concat(t,"ms ").concat(r)).join(","),p6=["radius"],m6=["radius"],Ak,Ck,Ok,_k,Mk,Ik,Tk,Dk,Rk,$k;function Lk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(r),!0).forEach(function(n){v6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v6(e,t,r){return(t=g6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g6(e){var t=y6(e,"string");return typeof t=="symbol"?t:t+""}function y6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pf(){return Pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pf.apply(null,arguments)}function Fk(e,t){if(e==null)return{};var r,n,a=x6(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function x6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function b6(e,t){return S6(e)||j6(e,t)||k6(e,t)||w6()}function w6(){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 k6(e,t){if(e){if(typeof e=="string")return Bk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bk(e,t):void 0}}function Bk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function j6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function S6(e){if(Array.isArray(e))return e}function wn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Uk=(e,t,r,n,a)=>{var o=ia(r),u=ia(n),l=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,p=u>=0&&o>=0||u<0&&o<0?1:0,v;if(l>0&&Array.isArray(a)){for(var x=[0,0,0,0],b=0,k=4;b<k;b++){var j,S=(j=a[b])!==null&&j!==void 0?j:0;x[b]=S>l?l:S}v=Bt(Ak||(Ak=wn(["M",",",""])),e,t+f*x[0]),x[0]>0&&(v+=Bt(Ck||(Ck=wn(["A ",",",",0,0,",",",",",""])),x[0],x[0],p,e+h*x[0],t)),v+=Bt(Ok||(Ok=wn(["L ",",",""])),e+r-h*x[1],t),x[1]>0&&(v+=Bt(_k||(_k=wn(["A ",",",",0,0,",`,
`,",",""])),x[1],x[1],p,e+r,t+f*x[1])),v+=Bt(Mk||(Mk=wn(["L ",",",""])),e+r,t+n-f*x[2]),x[2]>0&&(v+=Bt(Ik||(Ik=wn(["A ",",",",0,0,",`,
`,",",""])),x[2],x[2],p,e+r-h*x[2],t+n)),v+=Bt(Tk||(Tk=wn(["L ",",",""])),e+h*x[3],t+n),x[3]>0&&(v+=Bt(Dk||(Dk=wn(["A ",",",",0,0,",`,
`,",",""])),x[3],x[3],p,e,t+n-f*x[3])),v+="Z"}else if(l>0&&a===+a&&a>0){var N=Math.min(l,a);v=Bt(Rk||(Rk=wn(["M ",",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,p,e+h*N,t,e+r-h*N,t,N,N,p,e+r,t+f*N,e+r,t+n-f*N,N,N,p,e+r-h*N,t+n,e+h*N,t+n,N,N,p,e,t+n-f*N)}else v=Bt($k||($k=wn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return v},Wk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},N6=e=>{var t=Qr(e,Wk),r=y.useRef(null),n=y.useState(-1),a=b6(n,2),o=a[0],u=a[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Q=r.current.getTotalLength();Q&&u(Q)}catch{}},[]);var l=t.x,f=t.y,h=t.width,p=t.height,v=t.radius,x=t.className,b=t.animationEasing,k=t.animationDuration,j=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,P=y.useRef(h),O=y.useRef(p),A=y.useRef(l),_=y.useRef(f),C=y.useMemo(()=>({x:l,y:f,width:h,height:p,radius:v}),[l,f,h,p,v]),I=SP(C,"rectangle-");if(l!==+l||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var U=et("recharts-rectangle",x);if(!N){var B=Gr(t);B.radius;var G=Fk(B,p6);return y.createElement("path",Pf({},G,{x:ia(l),y:ia(f),width:ia(h),height:ia(p),radius:typeof v=="number"?v:void 0,className:U,d:Uk(l,f,h,p,v)}))}var q=P.current,R=O.current,de=A.current,Z=_.current,ge="0px ".concat(o===-1?1:o,"px"),ke="".concat(o,"px ").concat(o,"px"),me=h6(["strokeDasharray"],k,typeof b=="string"?b:Wk.animationEasing);return y.createElement(jP,{animationId:I,key:I,canBegin:o>0,duration:k,easing:b,isActive:N,begin:j},Q=>{var oe=ni(q,h,Q),X=ni(R,p,Q),$=ni(de,l,Q),T=ni(Z,f,Q);r.current&&(P.current=oe,O.current=X,A.current=$,_.current=T);var ee;S?Q>0?ee={transition:me,strokeDasharray:ke}:ee={strokeDasharray:ge}:ee={strokeDasharray:ke};var ne=Gr(t);ne.radius;var te=Fk(ne,m6);return y.createElement("path",Pf({},te,{radius:typeof v=="number"?v:void 0,className:U,d:Uk($,T,oe,X,v),ref:r,style:zk(zk({},ee),t.style)}))})};function Hk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hk(Object(r),!0).forEach(function(n){E6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E6(e,t,r){return(t=P6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P6(e){var t=A6(e,"string");return typeof t=="symbol"?t:t+""}function A6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Af=Math.PI/180,C6=e=>e*180/Math.PI,Ht=(e,t,r,n)=>({x:e+Math.cos(-Af*n)*r,y:t+Math.sin(-Af*n)*r}),O6=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},_6=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},M6=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,u=_6({x:r,y:n},{x:a,y:o});if(u<=0)return{radius:u,angle:0};var l=(r-a)/u,f=Math.acos(l);return n>o&&(f=2*Math.PI-f),{radius:u,angle:C6(f),angleInRadian:f}},I6=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),o=Math.min(n,a);return{startAngle:t-o*360,endAngle:r-o*360}},T6=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(a,o);return e+u*360},D6=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=M6({x:r,y:n},t),o=a.radius,u=a.angle,l=t.innerRadius,f=t.outerRadius;if(o<l||o>f||o===0)return null;var h=I6(t),p=h.startAngle,v=h.endAngle,x=u,b;if(p<=v){for(;x>v;)x-=360;for(;x<p;)x+=360;b=x>=p&&x<=v}else{for(;x>p;)x-=360;for(;x<v;)x+=360;b=x>=v&&x<=p}return b?Kk(Kk({},t),{},{radius:o,angle:T6(x,t)}):null};function NP(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,u=Ht(t,r,n,a),l=Ht(t,r,n,o);return{points:[u,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var Gk,Vk,qk,Qk,Yk,Xk,Zk;function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cg.apply(null,arguments)}function Ba(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var R6=(e,t)=>{var r=Wr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Rd=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,u=e.isExternal,l=e.cornerRadius,f=e.cornerIsExternal,h=l*(u?1:-1)+n,p=Math.asin(l/h)/Af,v=f?a:a+o*p,x=Ht(t,r,h,v),b=Ht(t,r,n,v),k=f?a-o*p:a,j=Ht(t,r,h*Math.cos(p*Af),k);return{center:x,circleTangency:b,lineTangency:j,theta:p}},EP=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,u=e.endAngle,l=R6(o,u),f=o+l,h=Ht(t,r,a,o),p=Ht(t,r,a,f),v=Bt(Gk||(Gk=Ba(["M ",",",`
A `,",",`,0,
`,",",`,
`,",",`
`])),h.x,h.y,a,a,+(Math.abs(l)>180),+(o>f),p.x,p.y);if(n>0){var x=Ht(t,r,n,o),b=Ht(t,r,n,f);v+=Bt(Vk||(Vk=Ba(["L ",",",`
A `,",",`,0,
`,",",`,
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(l)>180),+(o<=f),x.x,x.y)}else v+=Bt(qk||(qk=Ba(["L ",","," Z"])),t,r);return v},$6=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,l=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,p=Wr(h-f),v=Rd({cx:t,cy:r,radius:a,angle:f,sign:p,cornerRadius:o,cornerIsExternal:l}),x=v.circleTangency,b=v.lineTangency,k=v.theta,j=Rd({cx:t,cy:r,radius:a,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:l}),S=j.circleTangency,N=j.lineTangency,P=j.theta,O=l?Math.abs(f-h):Math.abs(f-h)-k-P;if(O<0)return u?Bt(Qk||(Qk=Ba(["M ",",",`
a`,",",",0,0,1,",`,0
a`,",",",0,0,1,",`,0
`])),b.x,b.y,o,o,o*2,o,o,-o*2):EP({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var A=Bt(Yk||(Yk=Ba(["M ",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",",`
`])),b.x,b.y,o,o,+(p<0),x.x,x.y,a,a,+(O>180),+(p<0),S.x,S.y,o,o,+(p<0),N.x,N.y);if(n>0){var _=Rd({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),C=_.circleTangency,I=_.lineTangency,U=_.theta,B=Rd({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),G=B.circleTangency,q=B.lineTangency,R=B.theta,de=l?Math.abs(f-h):Math.abs(f-h)-U-R;if(de<0&&o===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+=Bt(Xk||(Xk=Ba(["L",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",","Z"])),q.x,q.y,o,o,+(p<0),G.x,G.y,n,n,+(de>180),+(p>0),C.x,C.y,o,o,+(p<0),I.x,I.y)}else A+=Bt(Zk||(Zk=Ba(["L",",","Z"])),t,r);return A},L6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},z6=e=>{var t=Qr(e,L6),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,l=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,v=t.className;if(o<a||h===p)return null;var x=et("recharts-sector",v),b=o-a,k=da(u,b,0,!0),j;return k>0&&Math.abs(h-p)<360?j=$6({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(k,b/2),forceCornerRadius:l,cornerIsExternal:f,startAngle:h,endAngle:p}):j=EP({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:p}),y.createElement("path",Cg({},Gr(t),{className:x,d:j}))};function F6(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(sE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,u=t.outerRadius,l=t.angle,f=Ht(n,a,o,l),h=Ht(n,a,u,l);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return NP(t)}}function B6(e){return wE(e)?NaN:Number(e)}function dv(e){return e?(e=B6(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function PP(e,t,r){r&&typeof r!="number"&&ug(e,t,r)&&(t=r=void 0),e=dv(e),t===void 0?(t=e,e=0):t=dv(t),r=r===void 0?e<t?1:-1:dv(r);const n=Math.max(Math.ceil((t-e)/(r||1)),0),a=new Array(n);for(let o=0;o<n;o++)a[o]=e,e+=r;return a}var pn=e=>e.chartData,Cy=K([pn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ch=(e,t,r,n)=>n?Cy(e):pn(e),U6=(e,t,r)=>r?Cy(e):pn(e),W6=K([Ch],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});K([Cy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var H6=K([pn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Oy(e,t){return q6(e)||V6(e,t)||G6(e,t)||K6()}function K6(){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 G6(e,t){if(e){if(typeof e=="string")return Jk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jk(e,t):void 0}}function Jk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function V6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function q6(e){if(Array.isArray(e))return e}function Mn(e){if(Array.isArray(e)&&e.length===2){var t=Oy(e,2),r=t[0],n=t[1];if(Be(r)&&Be(n))return!0}return!1}function ej(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function AP(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=Oy(e,2),n=r[0],a=r[1],o,u;if(Be(n))o=n;else if(typeof n=="function")return;if(Be(a))u=a;else if(typeof a=="function")return;var l=[o,u];if(Mn(l))return l}}function Q6(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Mn(n))return ej(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var a=Oy(e,2),o=a[0],u=a[1],l,f;if(o==="auto")t!=null&&(l=Math.min(...t));else if(Ne(o))l=o;else if(typeof o=="function")try{t!=null&&(l=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&Gw.test(o)){var h=Gw.exec(o);if(h==null||h[1]==null||t==null)l=void 0;else{var p=+h[1];l=t[0]-p}}else l=t==null?void 0:t[0];if(u==="auto")t!=null&&(f=Math.max(...t));else if(Ne(u))f=u;else if(typeof u=="function")try{t!=null&&(f=u(t==null?void 0:t[1]))}catch{}else if(typeof u=="string"&&Vw.test(u)){var v=Vw.exec(u);if(v==null||v[1]==null||t==null)f=void 0;else{var x=+v[1];f=t[1]+x}}else f=t==null?void 0:t[1];var b=[l,f];if(Mn(b))return t==null?b:ej(b,t,r)}}}var Us=1e9,Y6={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},My,lt=!0,qr="[DecimalError] ",to=qr+"Invalid argument: ",_y=qr+"Exponent out of range: ",Ws=Math.floor,La=Math.pow,X6=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Cr,It=1e7,ot=7,CP=9007199254740991,Cf=Ws(CP/ot),be={};be.absoluteValue=be.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};be.comparedTo=be.cmp=function(e){var t,r,n,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(n=o.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===a?0:n>a^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ot;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return si(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return Ye(si(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return bt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,a=n.precision,o=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Cr))throw Error(qr+"NaN");if(r.s<1)throw Error(qr+(r.s?"NaN":"-Infinity"));return r.eq(Cr)?new n(0):(lt=!1,t=si(Ou(r,o),Ou(e,o),o),lt=!0,Ye(t,a))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?MP(t,e):OP(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(qr+"NaN");return r.s?(lt=!1,t=si(r,e,0,1).times(e),lt=!0,r.minus(t)):Ye(new n(r),a)};be.naturalExponential=be.exp=function(){return _P(this)};be.naturalLogarithm=be.ln=function(){return Ou(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?OP(t,e):MP(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(to+e);if(t=bt(a)+1,n=a.d.length-1,r=n*ot+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,a,o,u,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(qr+"NaN")}for(e=bt(l),lt=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=On(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ws((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),n=new f(t)):n=new f(a.toString()),r=f.precision,a=u=r+3;;)if(o=n,n=o.plus(si(l,o,u+2)).times(.5),On(o.d).slice(0,u)===(t=On(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),a==u&&t=="4999"){if(Ye(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;u+=4}return lt=!0,Ye(n,r)};be.times=be.mul=function(e){var t,r,n,a,o,u,l,f,h,p=this,v=p.constructor,x=p.d,b=(e=new v(e)).d;if(!p.s||!e.s)return new v(0);for(e.s*=p.s,r=p.e+e.e,f=x.length,h=b.length,f<h&&(o=x,x=b,b=o,u=f,f=h,h=u),o=[],u=f+h,n=u;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,a=f+n;a>n;)l=o[a]+b[n]*x[a-n-1]+t,o[a--]=l%It|0,t=l/It|0;o[a]=(o[a]+t)%It|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,lt?Ye(e,v.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:($n(e,0,Us),t===void 0?t=n.rounding:$n(t,0,8),Ye(r,e+bt(r)+1,t))};be.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=co(n,!0):($n(e,0,Us),t===void 0?t=a.rounding:$n(t,0,8),n=Ye(new a(n),e+1,t),r=co(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?co(a):($n(e,0,Us),t===void 0?t=o.rounding:$n(t,0,8),n=Ye(new o(a),e+bt(a)+1,t),r=co(n.abs(),!1,e+bt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return Ye(new t(e),bt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,a,o,u,l=this,f=l.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Cr);if(l=new f(l),!l.s){if(e.s<1)throw Error(qr+"Infinity");return l}if(l.eq(Cr))return l;if(n=f.precision,e.eq(Cr))return Ye(l,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=l.s,u){if((r=p<0?-p:p)<=CP){for(a=new f(Cr),t=Math.ceil(n/ot+4),lt=!1;r%2&&(a=a.times(l),rj(a.d,t)),r=Ws(r/2),r!==0;)l=l.times(l),rj(l.d,t);return lt=!0,e.s<0?new f(Cr).div(a):Ye(a,n)}}else if(o<0)throw Error(qr+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,lt=!1,a=e.times(Ou(l,n+h)),lt=!0,a=_P(a),a.s=o,a};be.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=bt(a),n=co(a,r<=o.toExpNeg||r>=o.toExpPos)):($n(e,1,Us),t===void 0?t=o.rounding:$n(t,0,8),a=Ye(new o(a),e,t),r=bt(a),n=co(a,e<=r||r<=o.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):($n(e,1,Us),t===void 0?t=n.rounding:$n(t,0,8)),Ye(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),r=e.constructor;return co(e,t<=r.toExpNeg||t>=r.toExpPos)};function OP(e,t){var r,n,a,o,u,l,f,h,p=e.constructor,v=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),lt?Ye(t,v):t;if(f=e.d,h=t.d,u=e.e,a=t.e,f=f.slice(),o=u-a,o){for(o<0?(n=f,o=-o,l=h.length):(n=h,a=u,l=f.length),u=Math.ceil(v/ot),l=u>l?u+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=f.length,o=h.length,l-o<0&&(o=l,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/It|0,f[o]%=It;for(r&&(f.unshift(r),++a),l=f.length;f[--l]==0;)f.pop();return t.d=f,t.e=a,lt?Ye(t,v):t}function $n(e,t,r){if(e!==~~e||e<t||e>r)throw Error(to+e)}function On(e){var t,r,n,a=e.length-1,o="",u=e[0];if(a>0){for(o+=u,t=1;t<a;t++)n=e[t]+"",r=ot-n.length,r&&(o+=Vi(r)),o+=n;u=e[t],n=u+"",r=ot-n.length,r&&(o+=Vi(r))}else if(u===0)return"0";for(;u%10===0;)u/=10;return o+u}var si=(function(){function e(n,a){var o,u=0,l=n.length;for(n=n.slice();l--;)o=n[l]*a+u,n[l]=o%It|0,u=o/It|0;return u&&n.unshift(u),n}function t(n,a,o,u){var l,f;if(o!=u)f=o>u?1:-1;else for(l=f=0;l<o;l++)if(n[l]!=a[l]){f=n[l]>a[l]?1:-1;break}return f}function r(n,a,o){for(var u=0;o--;)n[o]-=u,u=n[o]<a[o]?1:0,n[o]=u*It+n[o]-a[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,o,u){var l,f,h,p,v,x,b,k,j,S,N,P,O,A,_,C,I,U,B=n.constructor,G=n.s==a.s?1:-1,q=n.d,R=a.d;if(!n.s)return new B(n);if(!a.s)throw Error(qr+"Division by zero");for(f=n.e-a.e,I=R.length,_=q.length,b=new B(G),k=b.d=[],h=0;R[h]==(q[h]||0);)++h;if(R[h]>(q[h]||0)&&--f,o==null?P=o=B.precision:u?P=o+(bt(n)-bt(a))+1:P=o,P<0)return new B(0);if(P=P/ot+2|0,h=0,I==1)for(p=0,R=R[0],P++;(h<_||p)&&P--;h++)O=p*It+(q[h]||0),k[h]=O/R|0,p=O%R|0;else{for(p=It/(R[0]+1)|0,p>1&&(R=e(R,p),q=e(q,p),I=R.length,_=q.length),A=I,j=q.slice(0,I),S=j.length;S<I;)j[S++]=0;U=R.slice(),U.unshift(0),C=R[0],R[1]>=It/2&&++C;do p=0,l=t(R,j,I,S),l<0?(N=j[0],I!=S&&(N=N*It+(j[1]||0)),p=N/C|0,p>1?(p>=It&&(p=It-1),v=e(R,p),x=v.length,S=j.length,l=t(v,j,x,S),l==1&&(p--,r(v,I<x?U:R,x))):(p==0&&(l=p=1),v=R.slice()),x=v.length,x<S&&v.unshift(0),r(j,v,S),l==-1&&(S=j.length,l=t(R,j,I,S),l<1&&(p++,r(j,I<S?U:R,S))),S=j.length):l===0&&(p++,j=[0]),k[h++]=p,l&&j[0]?j[S++]=q[A]||0:(j=[q[A]],S=1);while((A++<_||j[0]!==void 0)&&P--)}return k[0]||k.shift(),b.e=f,Ye(b,u?o+bt(b)+1:o)}})();function _P(e,t){var r,n,a,o,u,l,f=0,h=0,p=e.constructor,v=p.precision;if(bt(e)>16)throw Error(_y+bt(e));if(!e.s)return new p(Cr);for(lt=!1,l=v,u=new p(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(La(2,h))/Math.LN10*2+5|0,l+=n,r=a=o=new p(Cr),p.precision=l;;){if(a=Ye(a.times(e),l),r=r.times(++f),u=o.plus(si(a,r,l)),On(u.d).slice(0,l)===On(o.d).slice(0,l)){for(;h--;)o=Ye(o.times(o),l);return p.precision=v,t==null?(lt=!0,Ye(o,v)):o}o=u}}function bt(e){for(var t=e.e*ot,r=e.d[0];r>=10;r/=10)t++;return t}function fv(e,t,r){if(t>e.LN10.sd())throw lt=!0,r&&(e.precision=r),Error(qr+"LN10 precision limit exceeded");return Ye(new e(e.LN10),t)}function Vi(e){for(var t="";e--;)t+="0";return t}function Ou(e,t){var r,n,a,o,u,l,f,h,p,v=1,x=10,b=e,k=b.d,j=b.constructor,S=j.precision;if(b.s<1)throw Error(qr+(b.s?"NaN":"-Infinity"));if(b.eq(Cr))return new j(0);if(t==null?(lt=!1,h=S):h=t,b.eq(10))return t==null&&(lt=!0),fv(j,h);if(h+=x,j.precision=h,r=On(k),n=r.charAt(0),o=bt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=On(b.d),n=r.charAt(0),v++;o=bt(b),n>1?(b=new j("0."+r),o++):b=new j(n+"."+r.slice(1))}else return f=fv(j,h+2,S).times(o+""),b=Ou(new j(n+"."+r.slice(1)),h-x).plus(f),j.precision=S,t==null?(lt=!0,Ye(b,S)):b;for(l=u=b=si(b.minus(Cr),b.plus(Cr),h),p=Ye(b.times(b),h),a=3;;){if(u=Ye(u.times(p),h),f=l.plus(si(u,new j(a),h)),On(f.d).slice(0,h)===On(l.d).slice(0,h))return l=l.times(2),o!==0&&(l=l.plus(fv(j,h+2,S).times(o+""))),l=si(l,new j(v),h),j.precision=S,t==null?(lt=!0,Ye(l,S)):l;l=f,a+=2}}function tj(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Ws(r/ot),e.d=[],n=(r+1)%ot,r<0&&(n+=ot),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=ot;n<a;)e.d.push(+t.slice(n,n+=ot));t=t.slice(n),n=ot-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),lt&&(e.e>Cf||e.e<-Cf))throw Error(_y+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ye(e,t,r){var n,a,o,u,l,f,h,p,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=ot,a=t,h=v[p=0];else{if(p=Math.ceil((n+1)/ot),o=v.length,p>=o)return e;for(h=o=v[p],u=1;o>=10;o/=10)u++;n%=ot,a=n-ot+u}if(r!==void 0&&(o=La(10,u-a-1),l=h/o%10|0,f=t<0||v[p+1]!==void 0||h%o,f=r<4?(l||f)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||f||r==6&&(n>0?a>0?h/La(10,u-a):0:v[p-1])%10&1||r==(e.s<0?8:7))),t<1||!v[0])return f?(o=bt(e),v.length=1,t=t-o-1,v[0]=La(10,(ot-t%ot)%ot),e.e=Ws(-t/ot)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(n==0?(v.length=p,o=1,p--):(v.length=p+1,o=La(10,ot-n),v[p]=a>0?(h/La(10,u-a)%La(10,a)|0)*o:0),f)for(;;)if(p==0){(v[0]+=o)==It&&(v[0]=1,++e.e);break}else{if(v[p]+=o,v[p]!=It)break;v[p--]=0,o=1}for(n=v.length;v[--n]===0;)v.pop();if(lt&&(e.e>Cf||e.e<-Cf))throw Error(_y+bt(e));return e}function MP(e,t){var r,n,a,o,u,l,f,h,p,v,x=e.constructor,b=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),lt?Ye(t,b):t;if(f=e.d,v=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(p=u<0,p?(r=f,u=-u,l=v.length):(r=v,n=h,l=f.length),a=Math.max(Math.ceil(b/ot),l)+2,u>a&&(u=a,r.length=1),r.reverse(),a=u;a--;)r.push(0);r.reverse()}else{for(a=f.length,l=v.length,p=a<l,p&&(l=a),a=0;a<l;a++)if(f[a]!=v[a]){p=f[a]<v[a];break}u=0}for(p&&(r=f,f=v,v=r,t.s=-t.s),l=f.length,a=v.length-l;a>0;--a)f[l++]=0;for(a=v.length;a>u;){if(f[--a]<v[a]){for(o=a;o&&f[--o]===0;)f[o]=It-1;--f[o],f[a]+=It}f[a]-=v[a]}for(;f[--l]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,lt?Ye(t,b):t):new x(0)}function co(e,t,r){var n,a=bt(e),o=On(e.d),u=o.length;return t?(r&&(n=r-u)>0?o=o.charAt(0)+"."+o.slice(1)+Vi(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+Vi(-a-1)+o,r&&(n=r-u)>0&&(o+=Vi(n))):a>=u?(o+=Vi(a+1-u),r&&(n=r-a-1)>0&&(o=o+"."+Vi(n))):((n=a+1)<u&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-u)>0&&(a+1===u&&(o+="."),o+=Vi(n))),e.s<0?"-"+o:o}function rj(e,t){if(e.length>t)return e.length=t,!0}function IP(e){var t,r,n;function a(o){var u=this;if(!(u instanceof a))return new a(o);if(u.constructor=a,o instanceof a){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(to+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return tj(u,o.toString())}else if(typeof o!="string")throw Error(to+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,X6.test(o))tj(u,o);else throw Error(to+o)}if(a.prototype=be,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=IP,a.config=a.set=Z6,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function Z6(e){if(!e||typeof e!="object")throw Error(qr+"Object expected");var t,r,n,a=["precision",1,Us,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Ws(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(to+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(to+r+": "+n);return this}var My=IP(Y6);Cr=new My(1);const We=My;function TP(e){var t;return e===0?t=1:t=Math.floor(new We(e).abs().log(10).toNumber())+1,t}function DP(e,t,r){for(var n=new We(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function _u(e,t){return rF(e)||tF(e,t)||eF(e,t)||J6()}function J6(){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 eF(e,t){if(e){if(typeof e=="string")return nj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nj(e,t):void 0}}function nj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function rF(e){if(Array.isArray(e))return e}var RP=e=>{var t=_u(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},Iy=(e,t,r)=>{if(e.lte(0))return new We(0);var n=TP(e.toNumber()),a=new We(10).pow(n),o=e.div(a),u=n!==1?.05:.1,l=new We(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=l.mul(a);return t?new We(f.toNumber()):new We(Math.ceil(f.toNumber()))},$P=(e,t,r)=>{var n;if(e.lte(0))return new We(0);var a=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new We(o).abs().log(10).toNumber()),l=new We(10).pow(u),f=e.div(l).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(l=l.mul(10),h=0),h+=r,h>=a.length){var p=Math.floor(h/a.length);h%=a.length,l=l.mul(new We(10).pow(p))}var v=(n=a[h])!==null&&n!==void 0?n:1,x=new We(v).mul(l);return t?x:new We(Math.ceil(x.toNumber()))},nF=(e,t,r)=>{var n=new We(1),a=new We(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new We(10).pow(TP(e)-1),a=new We(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new We(Math.floor(e)))}else e===0?a=new We(Math.floor((t-1)/2)):r||(a=new We(Math.floor(e)));for(var u=Math.floor((t-1)/2),l=[],f=0;f<t;f++)l.push(a.add(new We(f-u).mul(n)).toNumber());return l},LP=function(t,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Iy;if(!Number.isFinite((r-t)/(n-1)))return{step:new We(0),tickMin:new We(0),tickMax:new We(0)};var l=u(new We(r).sub(t).div(n-1),a,o),f;t<=0&&r>=0?f=new We(0):(f=new We(t).add(r).div(2),f=f.sub(new We(f).mod(l)));var h=Math.ceil(f.sub(t).div(l).toNumber()),p=Math.ceil(new We(r).sub(f).div(l).toNumber()),v=h+p+1;return v>n?LP(t,r,n,a,o+1,u):(v<n&&(p=r>0?p+(n-v):p,h=r>0?h:h+(n-v)),{step:l,tickMin:f.sub(new We(h).mul(l)),tickMax:f.add(new We(p).mul(l))})},ij=function(t){var r=_u(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=RP([n,a]),p=_u(h,2),v=p[0],x=p[1];if(v===-1/0||x===1/0){var b=x===1/0?[v,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),x];return n>a?b.reverse():b}if(v===x)return nF(v,o,u);var k=l==="snap125"?$P:Iy,j=LP(v,x,f,u,0,k),S=j.step,N=j.tickMin,P=j.tickMax,O=DP(N,P.add(new We(.1).mul(S)),S);return n>a?O.reverse():O},aj=function(t,r){var n=_u(t,2),a=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=RP([a,o]),h=_u(f,2),p=h[0],v=h[1];if(p===-1/0||v===1/0)return[a,o];if(p===v)return[p];var x=l==="snap125"?$P:Iy,b=Math.max(r,2),k=x(new We(v).sub(p).div(b-1),u,0),j=[...DP(new We(p),new We(v),k),v];return u===!1&&(j=j.map(S=>Math.round(S))),a>o?j.reverse():j},iF=e=>e.rootProps.barCategoryGap,Oh=e=>e.rootProps.stackOffset,zP=e=>e.rootProps.reverseStackOrder,Ty=e=>e.options.chartName,Dy=e=>e.rootProps.syncId,FP=e=>e.rootProps.syncMethod,Ry=e=>e.options.eventEmitter,aF=e=>e.rootProps.baseValue,or={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},_a={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},kn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},_h=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Mh(e,t,r){if(r!=="auto")return r;if(e!=null)return zn(e,t)?"category":"number"}function oj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Of(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oj(Object(r),!0).forEach(function(n){oF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oF(e,t,r){return(t=sF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sF(e){var t=lF(e,"string");return typeof t=="symbol"?t:t+""}function lF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sj={allowDataOverflow:_a.allowDataOverflow,allowDecimals:_a.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:_a.angleAxisId,includeHidden:!1,name:void 0,reversed:_a.reversed,scale:_a.scale,tick:_a.tick,tickCount:void 0,ticks:void 0,type:_a.type,unit:void 0,niceTicks:"auto"},lj={allowDataOverflow:kn.allowDataOverflow,allowDecimals:kn.allowDecimals,allowDuplicatedCategory:kn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:kn.radiusAxisId,includeHidden:kn.includeHidden,name:void 0,reversed:kn.reversed,scale:kn.scale,tick:kn.tick,tickCount:kn.tickCount,ticks:void 0,type:kn.type,unit:void 0,niceTicks:"auto"},uF=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},$y=K([uF,cP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Mh(t,"angleAxis",sj.type))!==null&&r!==void 0?r:"category";return Of(Of({},sj),{},{type:n})}),cF=(e,t)=>e.polarAxis.radiusAxis[t],Ly=K([cF,cP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Mh(t,"radiusAxis",lj.type))!==null&&r!==void 0?r:"category";return Of(Of({},lj),{},{type:n})}),Ih=e=>e.polarOptions,zy=K([hi,pi,Vt],O6),BP=K([Ih,zy],(e,t)=>{if(e!=null)return da(e.innerRadius,t,0)}),UP=K([Ih,zy],(e,t)=>{if(e!=null)return da(e.outerRadius,t,t*.8)}),dF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},WP=K([Ih],dF);K([$y,WP],_h);var HP=K([zy,BP,UP],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});K([Ly,HP],_h);var KP=K([ut,Ih,BP,UP,hi,pi],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,l=t.cy,f=t.startAngle,h=t.endAngle;return{cx:da(u,a,a/2),cy:da(l,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Dt=(e,t)=>t,Th=(e,t,r)=>r;function Fy(e){return e==null?void 0:e.id}function GP(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,l=new Map;return e.forEach(f=>{var h,p=(h=f.data)!==null&&h!==void 0?h:a;if(!(p==null||p.length===0)){var v=Fy(f);p.forEach((x,b)=>{var k=u==null||o?b:String(Tt(x,u,null)),j=Tt(x,f.dataKey,0),S;l.has(k)?S=l.get(k):S={},Object.assign(S,{[v]:j}),l.set(k,S)})}}),Array.from(l.values())}function By(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Dh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Rh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function fF(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Rt=e=>{var t=ut(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Hs=e=>e.tooltip.settings.axisId;function Uy(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var u=a[0],l=a[1];return u<=l?o>=u&&o<=l:o>=l&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var l=e(o);if(l!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":l+=f/2;break;case"end":l+=f;break}}return l}}}}}var hF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Mn(t)){for(var r,n,a=0;a<t.length;a++){var o=t[a];Be(o)&&((r===void 0||o<r)&&(r=o),(n===void 0||o>n)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function la(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Wy(e){let t,r,n;e.length!==2?(t=la,r=(l,f)=>la(e(l),f),n=(l,f)=>e(l)-f):(t=e===la||e===pF?e:mF,r=e,n=e);function a(l,f,h=0,p=l.length){if(h<p){if(t(f,f)!==0)return p;do{const v=h+p>>>1;r(l[v],f)<0?h=v+1:p=v}while(h<p)}return h}function o(l,f,h=0,p=l.length){if(h<p){if(t(f,f)!==0)return p;do{const v=h+p>>>1;r(l[v],f)<=0?h=v+1:p=v}while(h<p)}return h}function u(l,f,h=0,p=l.length){const v=a(l,f,h,p-1);return v>h&&n(l[v-1],f)>-n(l[v],f)?v-1:v}return{left:a,center:u,right:o}}function mF(){return 0}function VP(e){return e===null?NaN:+e}function*vF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const gF=Wy(la),Ju=gF.right;Wy(VP).center;class uj extends Map{constructor(t,r=bF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(cj(this,t))}has(t){return super.has(cj(this,t))}set(t,r){return super.set(yF(this,t),r)}delete(t){return super.delete(xF(this,t))}}function cj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function yF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function xF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function bF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function wF(e=la){if(e===la)return qP;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function qP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const kF=Math.sqrt(50),jF=Math.sqrt(10),SF=Math.sqrt(2);function _f(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),u=o>=kF?10:o>=jF?5:o>=SF?2:1;let l,f,h;return a<0?(h=Math.pow(10,-a)/u,l=Math.round(e*h),f=Math.round(t*h),l/h<e&&++l,f/h>t&&--f,h=-h):(h=Math.pow(10,a)*u,l=Math.round(e/h),f=Math.round(t/h),l*h<e&&++l,f*h>t&&--f),f<l&&.5<=r&&r<2?_f(e,t,r*2):[l,f,h]}function Og(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,u]=n?_f(t,e,r):_f(e,t,r);if(!(o>=a))return[];const l=o-a+1,f=new Array(l);if(n)if(u<0)for(let h=0;h<l;++h)f[h]=(o-h)/-u;else for(let h=0;h<l;++h)f[h]=(o-h)*u;else if(u<0)for(let h=0;h<l;++h)f[h]=(a+h)/-u;else for(let h=0;h<l;++h)f[h]=(a+h)*u;return f}function _g(e,t,r){return t=+t,e=+e,r=+r,_f(e,t,r)[2]}function Mg(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?_g(t,e,r):_g(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function dj(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function fj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function QP(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?qP:wF(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),v=.5*Math.exp(2*p/3),x=.5*Math.sqrt(p*v*(f-v)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*v/f+x)),k=Math.min(n,Math.floor(t+(f-h)*v/f+x));QP(e,t,b,k,a)}const o=e[t];let u=r,l=n;for(Xl(e,r,t),a(e[n],o)>0&&Xl(e,r,n);u<l;){for(Xl(e,u,l),++u,--l;a(e[u],o)<0;)++u;for(;a(e[l],o)>0;)--l}a(e[r],o)===0?Xl(e,r,l):(++l,Xl(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function Xl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function NF(e,t,r){if(e=Float64Array.from(vF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return fj(e);if(t>=1)return dj(e);var n,a=(n-1)*t,o=Math.floor(a),u=dj(QP(e,o).subarray(0,o+1)),l=fj(e.subarray(o+1));return u+(l-u)*(a-o)}}function EF(e,t,r=VP){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),u=+r(e[o],o,e),l=+r(e[o+1],o+1,e);return u+(l-u)*(a-o)}}function PF(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function Yr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function mi(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 Ig=Symbol("implicit");function Hy(){var e=new uj,t=[],r=[],n=Ig;function a(o){let u=e.get(o);if(u===void 0){if(n!==Ig)return n;e.set(o,u=t.push(o)-1)}return r[u%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new uj;for(const u of o)e.has(u)||e.set(u,t.push(u)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return Hy(t,r).unknown(n)},Yr.apply(a,arguments),a}function Ky(){var e=Hy().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,u,l=!1,f=0,h=0,p=.5;delete e.unknown;function v(){var x=t().length,b=a<n,k=b?a:n,j=b?n:a;o=(j-k)/Math.max(1,x-f+h*2),l&&(o=Math.floor(o)),k+=(j-k-o*(x-f))*p,u=o*(1-f),l&&(k=Math.round(k),u=Math.round(u));var S=PF(x).map(function(N){return k+o*N});return r(b?S.reverse():S)}return e.domain=function(x){return arguments.length?(t(x),v()):t()},e.range=function(x){return arguments.length?([n,a]=x,n=+n,a=+a,v()):[n,a]},e.rangeRound=function(x){return[n,a]=x,n=+n,a=+a,l=!0,v()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(x){return arguments.length?(l=!!x,v()):l},e.padding=function(x){return arguments.length?(f=Math.min(1,h=+x),v()):f},e.paddingInner=function(x){return arguments.length?(f=Math.min(1,x),v()):f},e.paddingOuter=function(x){return arguments.length?(h=+x,v()):h},e.align=function(x){return arguments.length?(p=Math.max(0,Math.min(1,x)),v()):p},e.copy=function(){return Ky(t(),[n,a]).round(l).paddingInner(f).paddingOuter(h).align(p)},Yr.apply(v(),arguments)}function YP(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return YP(t())},e}function AF(){return YP(Ky.apply(null,arguments).paddingInner(1))}function Gy(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function XP(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ec(){}var Mu=.7,Mf=1/Mu,fs="\\s*([+-]?\\d+)\\s*",Iu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",In="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CF=/^#([0-9a-f]{3,8})$/,OF=new RegExp(`^rgb\\(${fs},${fs},${fs}\\)$`),_F=new RegExp(`^rgb\\(${In},${In},${In}\\)$`),MF=new RegExp(`^rgba\\(${fs},${fs},${fs},${Iu}\\)$`),IF=new RegExp(`^rgba\\(${In},${In},${In},${Iu}\\)$`),TF=new RegExp(`^hsl\\(${Iu},${In},${In}\\)$`),DF=new RegExp(`^hsla\\(${Iu},${In},${In},${Iu}\\)$`),hj={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};Gy(ec,Tu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pj,formatHex:pj,formatHex8:RF,formatHsl:$F,formatRgb:mj,toString:mj});function pj(){return this.rgb().formatHex()}function RF(){return this.rgb().formatHex8()}function $F(){return ZP(this).formatHsl()}function mj(){return this.rgb().formatRgb()}function Tu(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=CF.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?vj(t):r===3?new xr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?$d(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?$d(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=OF.exec(e))?new xr(t[1],t[2],t[3],1):(t=_F.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=MF.exec(e))?$d(t[1],t[2],t[3],t[4]):(t=IF.exec(e))?$d(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=TF.exec(e))?xj(t[1],t[2]/100,t[3]/100,1):(t=DF.exec(e))?xj(t[1],t[2]/100,t[3]/100,t[4]):hj.hasOwnProperty(e)?vj(hj[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function vj(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function $d(e,t,r,n){return n<=0&&(e=t=r=NaN),new xr(e,t,r,n)}function LF(e){return e instanceof ec||(e=Tu(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function Tg(e,t,r,n){return arguments.length===1?LF(e):new xr(e,t,r,n??1)}function xr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Gy(xr,Tg,XP(ec,{brighter(e){return e=e==null?Mf:Math.pow(Mf,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mu:Math.pow(Mu,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(ro(this.r),ro(this.g),ro(this.b),If(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:gj,formatHex:gj,formatHex8:zF,formatRgb:yj,toString:yj}));function gj(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}`}function zF(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}${Ua((isNaN(this.opacity)?1:this.opacity)*255)}`}function yj(){const e=If(this.opacity);return`${e===1?"rgb(":"rgba("}${ro(this.r)}, ${ro(this.g)}, ${ro(this.b)}${e===1?")":`, ${e})`}`}function If(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ro(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ua(e){return e=ro(e),(e<16?"0":"")+e.toString(16)}function xj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new cn(e,t,r,n)}function ZP(e){if(e instanceof cn)return new cn(e.h,e.s,e.l,e.opacity);if(e instanceof ec||(e=Tu(e)),!e)return new cn;if(e instanceof cn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,l=o-a,f=(o+a)/2;return l?(t===o?u=(r-n)/l+(r<n)*6:r===o?u=(n-t)/l+2:u=(t-r)/l+4,l/=f<.5?o+a:2-o-a,u*=60):l=f>0&&f<1?0:u,new cn(u,l,f,e.opacity)}function FF(e,t,r,n){return arguments.length===1?ZP(e):new cn(e,t,r,n??1)}function cn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Gy(cn,FF,XP(ec,{brighter(e){return e=e==null?Mf:Math.pow(Mf,e),new cn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mu:Math.pow(Mu,e),new cn(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,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new xr(hv(e>=240?e-240:e+120,a,n),hv(e,a,n),hv(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new cn(bj(this.h),Ld(this.s),Ld(this.l),If(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=If(this.opacity);return`${e===1?"hsl(":"hsla("}${bj(this.h)}, ${Ld(this.s)*100}%, ${Ld(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bj(e){return e=(e||0)%360,e<0?e+360:e}function Ld(e){return Math.max(0,Math.min(1,e||0))}function hv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Vy=e=>()=>e;function BF(e,t){return function(r){return e+r*t}}function UF(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function WF(e){return(e=+e)==1?JP:function(t,r){return r-t?UF(t,r,e):Vy(isNaN(t)?r:t)}}function JP(e,t){var r=t-e;return r?BF(e,r):Vy(isNaN(e)?t:e)}const wj=(function e(t){var r=WF(t);function n(a,o){var u=r((a=Tg(a)).r,(o=Tg(o)).r),l=r(a.g,o.g),f=r(a.b,o.b),h=JP(a.opacity,o.opacity);return function(p){return a.r=u(p),a.g=l(p),a.b=f(p),a.opacity=h(p),a+""}}return n.gamma=e,n})(1);function HF(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function KF(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function GF(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),u;for(u=0;u<n;++u)a[u]=Ks(e[u],t[u]);for(;u<r;++u)o[u]=t[u];return function(l){for(u=0;u<n;++u)o[u]=a[u](l);return o}}function VF(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Tf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function qF(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Ks(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Dg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pv=new RegExp(Dg.source,"g");function QF(e){return function(){return e}}function YF(e){return function(t){return e(t)+""}}function XF(e,t){var r=Dg.lastIndex=pv.lastIndex=0,n,a,o,u=-1,l=[],f=[];for(e=e+"",t=t+"";(n=Dg.exec(e))&&(a=pv.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),l[u]?l[u]+=o:l[++u]=o),(n=n[0])===(a=a[0])?l[u]?l[u]+=a:l[++u]=a:(l[++u]=null,f.push({i:u,x:Tf(n,a)})),r=pv.lastIndex;return r<t.length&&(o=t.slice(r),l[u]?l[u]+=o:l[++u]=o),l.length<2?f[0]?YF(f[0].x):QF(t):(t=f.length,function(h){for(var p=0,v;p<t;++p)l[(v=f[p]).i]=v.x(h);return l.join("")})}function Ks(e,t){var r=typeof t,n;return t==null||r==="boolean"?Vy(t):(r==="number"?Tf:r==="string"?(n=Tu(t))?(t=n,wj):XF:t instanceof Tu?wj:t instanceof Date?VF:KF(t)?HF:Array.isArray(t)?GF:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qF:Tf)(e,t)}function qy(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function ZF(e,t){t===void 0&&(t=e,e=Ks);for(var r=0,n=t.length-1,a=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(a,a=t[++r]);return function(u){var l=Math.max(0,Math.min(n-1,Math.floor(u*=n)));return o[l](u-l)}}function JF(e){return function(){return e}}function Df(e){return+e}var kj=[0,1];function sr(e){return e}function Rg(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:JF(isNaN(t)?NaN:.5)}function e8(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function t8(e,t,r){var n=e[0],a=e[1],o=t[0],u=t[1];return a<n?(n=Rg(a,n),o=r(u,o)):(n=Rg(n,a),o=r(o,u)),function(l){return o(n(l))}}function r8(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),u=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++u<n;)a[u]=Rg(e[u],e[u+1]),o[u]=r(t[u],t[u+1]);return function(l){var f=Ju(e,l,1,n)-1;return o[f](a[f](l))}}function tc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function $h(){var e=kj,t=kj,r=Ks,n,a,o,u=sr,l,f,h;function p(){var x=Math.min(e.length,t.length);return u!==sr&&(u=e8(e[0],e[x-1])),l=x>2?r8:t8,f=h=null,v}function v(x){return x==null||isNaN(x=+x)?o:(f||(f=l(e.map(n),t,r)))(n(u(x)))}return v.invert=function(x){return u(a((h||(h=l(t,e.map(n),Tf)))(x)))},v.domain=function(x){return arguments.length?(e=Array.from(x,Df),p()):e.slice()},v.range=function(x){return arguments.length?(t=Array.from(x),p()):t.slice()},v.rangeRound=function(x){return t=Array.from(x),r=qy,p()},v.clamp=function(x){return arguments.length?(u=x?!0:sr,p()):u!==sr},v.interpolate=function(x){return arguments.length?(r=x,p()):r},v.unknown=function(x){return arguments.length?(o=x,v):o},function(x,b){return n=x,a=b,p()}}function Qy(){return $h()(sr,sr)}function n8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ms(e){return e=Rf(Math.abs(e)),e?e[1]:NaN}function i8(e,t){return function(r,n){for(var a=r.length,o=[],u=0,l=e[0],f=0;a>0&&l>0&&(f+l+1>n&&(l=Math.max(1,n-f)),o.push(r.substring(a-=l,a+l)),!((f+=l+1)>n));)l=e[u=(u+1)%e.length];return o.reverse().join(t)}}function a8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var o8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Du(e){if(!(t=o8.exec(e)))throw new Error("invalid format: "+e);var t;return new Yy({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]})}Du.prototype=Yy.prototype;function Yy(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+""}Yy.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 s8(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var $f;function l8(e,t){var r=Rf(e,t);if(!r)return $f=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-($f=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Rf(e,Math.max(0,t+o-1))[0]}function jj(e,t){var r=Rf(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Sj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:n8,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)=>jj(e*100,t),r:jj,s:l8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Nj(e){return e}var Ej=Array.prototype.map,Pj=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u8(e){var t=e.grouping===void 0||e.thousands===void 0?Nj:i8(Ej.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Nj:a8(Ej.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(v,x){v=Du(v);var b=v.fill,k=v.align,j=v.sign,S=v.symbol,N=v.zero,P=v.width,O=v.comma,A=v.precision,_=v.trim,C=v.type;C==="n"?(O=!0,C="g"):Sj[C]||(A===void 0&&(A=12),_=!0,C="g"),(N||b==="0"&&k==="=")&&(N=!0,b="0",k="=");var I=(x&&x.prefix!==void 0?x.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),U=(S==="$"?n:/[%p]/.test(C)?u:"")+(x&&x.suffix!==void 0?x.suffix:""),B=Sj[C],G=/[defgprs%]/.test(C);A=A===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function q(R){var de=I,Z=U,ge,ke,me;if(C==="c")Z=B(R)+Z,R="";else{R=+R;var Q=R<0||1/R<0;if(R=isNaN(R)?f:B(Math.abs(R),A),_&&(R=s8(R)),Q&&+R==0&&j!=="+"&&(Q=!1),de=(Q?j==="("?j:l:j==="-"||j==="("?"":j)+de,Z=(C==="s"&&!isNaN(R)&&$f!==void 0?Pj[8+$f/3]:"")+Z+(Q&&j==="("?")":""),G){for(ge=-1,ke=R.length;++ge<ke;)if(me=R.charCodeAt(ge),48>me||me>57){Z=(me===46?a+R.slice(ge+1):R.slice(ge))+Z,R=R.slice(0,ge);break}}}O&&!N&&(R=t(R,1/0));var oe=de.length+R.length+Z.length,X=oe<P?new Array(P-oe+1).join(b):"";switch(O&&N&&(R=t(X+R,X.length?P-Z.length:1/0),X=""),k){case"<":R=de+R+Z+X;break;case"=":R=de+X+R+Z;break;case"^":R=X.slice(0,oe=X.length>>1)+de+R+Z+X.slice(oe);break;default:R=X+de+R+Z;break}return o(R)}return q.toString=function(){return v+""},q}function p(v,x){var b=Math.max(-8,Math.min(8,Math.floor(Ms(x)/3)))*3,k=Math.pow(10,-b),j=h((v=Du(v),v.type="f",v),{suffix:Pj[8+b/3]});return function(S){return j(k*S)}}return{format:h,formatPrefix:p}}var zd,Xy,eA;c8({thousands:",",grouping:[3],currency:["$",""]});function c8(e){return zd=u8(e),Xy=zd.format,eA=zd.formatPrefix,zd}function d8(e){return Math.max(0,-Ms(Math.abs(e)))}function f8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ms(t)/3)))*3-Ms(Math.abs(e)))}function h8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ms(t)-Ms(e))+1}function tA(e,t,r,n){var a=Mg(e,t,r),o;switch(n=Du(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=f8(a,u))&&(n.precision=o),eA(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=h8(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=d8(a))&&(n.precision=o-(n.type==="%")*2);break}}return Xy(n)}function fa(e){var t=e.domain;return e.ticks=function(r){var n=t();return Og(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return tA(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,u=n[a],l=n[o],f,h,p=10;for(l<u&&(h=u,u=l,l=h,h=a,a=o,o=h);p-- >0;){if(h=_g(u,l,r),h===f)return n[a]=u,n[o]=l,t(n);if(h>0)u=Math.floor(u/h)*h,l=Math.ceil(l/h)*h;else if(h<0)u=Math.ceil(u*h)/h,l=Math.floor(l*h)/h;else break;f=h}return e},e}function rA(){var e=Qy();return e.copy=function(){return tc(e,rA())},Yr.apply(e,arguments),fa(e)}function nA(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Df),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return nA(e).unknown(t)},e=arguments.length?Array.from(e,Df):[0,1],fa(r)}function iA(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],u;return o<a&&(u=r,r=n,n=u,u=a,a=o,o=u),e[r]=t.floor(a),e[n]=t.ceil(o),e}function Aj(e){return Math.log(e)}function Cj(e){return Math.exp(e)}function p8(e){return-Math.log(-e)}function m8(e){return-Math.exp(-e)}function v8(e){return isFinite(e)?+("1e"+e):e<0?0:e}function g8(e){return e===10?v8:e===Math.E?Math.exp:t=>Math.pow(e,t)}function y8(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 Oj(e){return(t,r)=>-e(-t,r)}function Zy(e){const t=e(Aj,Cj),r=t.domain;let n=10,a,o;function u(){return a=y8(n),o=g8(n),r()[0]<0?(a=Oj(a),o=Oj(o),e(p8,m8)):e(Aj,Cj),t}return t.base=function(l){return arguments.length?(n=+l,u()):n},t.domain=function(l){return arguments.length?(r(l),u()):r()},t.ticks=l=>{const f=r();let h=f[0],p=f[f.length-1];const v=p<h;v&&([h,p]=[p,h]);let x=a(h),b=a(p),k,j;const S=l==null?10:+l;let N=[];if(!(n%1)&&b-x<S){if(x=Math.floor(x),b=Math.ceil(b),h>0){for(;x<=b;++x)for(k=1;k<n;++k)if(j=x<0?k/o(-x):k*o(x),!(j<h)){if(j>p)break;N.push(j)}}else for(;x<=b;++x)for(k=n-1;k>=1;--k)if(j=x>0?k/o(-x):k*o(x),!(j<h)){if(j>p)break;N.push(j)}N.length*2<S&&(N=Og(h,p,S))}else N=Og(x,b,Math.min(b-x,S)).map(o);return v?N.reverse():N},t.tickFormat=(l,f)=>{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Du(f)).precision==null&&(f.trim=!0),f=Xy(f)),l===1/0)return f;const h=Math.max(1,n*l/t.ticks().length);return p=>{let v=p/o(Math.round(a(p)));return v*n<n-.5&&(v*=n),v<=h?f(p):""}},t.nice=()=>r(iA(r(),{floor:l=>o(Math.floor(a(l))),ceil:l=>o(Math.ceil(a(l)))})),t}function aA(){const e=Zy($h()).domain([1,10]);return e.copy=()=>tc(e,aA()).base(e.base()),Yr.apply(e,arguments),e}function _j(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Mj(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Jy(e){var t=1,r=e(_j(t),Mj(t));return r.constant=function(n){return arguments.length?e(_j(t=+n),Mj(t)):t},fa(r)}function oA(){var e=Jy($h());return e.copy=function(){return tc(e,oA()).constant(e.constant())},Yr.apply(e,arguments)}function Ij(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function x8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function b8(e){return e<0?-e*e:e*e}function e0(e){var t=e(sr,sr),r=1;function n(){return r===1?e(sr,sr):r===.5?e(x8,b8):e(Ij(r),Ij(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},fa(t)}function t0(){var e=e0($h());return e.copy=function(){return tc(e,t0()).exponent(e.exponent())},Yr.apply(e,arguments),e}function w8(){return t0.apply(null,arguments).exponent(.5)}function Tj(e){return Math.sign(e)*e*e}function k8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function sA(){var e=Qy(),t=[0,1],r=!1,n;function a(o){var u=k8(e(o));return isNaN(u)?n:r?Math.round(u):u}return a.invert=function(o){return e.invert(Tj(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,Df)).map(Tj)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(r=!!o,a):r},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return sA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Yr.apply(a,arguments),fa(a)}function lA(){var e=[],t=[],r=[],n;function a(){var u=0,l=Math.max(1,t.length);for(r=new Array(l-1);++u<l;)r[u-1]=EF(e,u/l);return o}function o(u){return u==null||isNaN(u=+u)?n:t[Ju(r,u)]}return o.invertExtent=function(u){var l=t.indexOf(u);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},o.domain=function(u){if(!arguments.length)return e.slice();e=[];for(let l of u)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(la),a()},o.range=function(u){return arguments.length?(t=Array.from(u),a()):t.slice()},o.unknown=function(u){return arguments.length?(n=u,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return lA().domain(e).range(t).unknown(n)},Yr.apply(o,arguments)}function uA(){var e=0,t=1,r=1,n=[.5],a=[0,1],o;function u(f){return f!=null&&f<=f?a[Ju(n,f,0,r)]:o}function l(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return u}return u.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,l()):[e,t]},u.range=function(f){return arguments.length?(r=(a=Array.from(f)).length-1,l()):a.slice()},u.invertExtent=function(f){var h=a.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return uA().domain([e,t]).range(a).unknown(o)},Yr.apply(fa(u),arguments)}function cA(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Ju(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return cA().domain(e).range(t).unknown(r)},Yr.apply(a,arguments)}const mv=new Date,vv=new Date;function Pt(e,t,r,n){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 u=a(o),l=a.ceil(o);return o-u<l-o?u:l},a.offset=(o,u)=>(t(o=new Date(+o),u==null?1:Math.floor(u)),o),a.range=(o,u,l)=>{const f=[];if(o=a.ceil(o),l=l==null?1:Math.floor(l),!(o<u)||!(l>0))return f;let h;do f.push(h=new Date(+o)),t(o,l),e(o);while(h<o&&o<u);return f},a.filter=o=>Pt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,l)=>{if(u>=u)if(l<0)for(;++l<=0;)for(;t(u,-1),!o(u););else for(;--l>=0;)for(;t(u,1),!o(u););}),r&&(a.count=(o,u)=>(mv.setTime(+o),vv.setTime(+u),e(mv),e(vv),Math.floor(r(mv,vv))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?u=>n(u)%o===0:u=>a.count(0,u)%o===0):a)),a}const Lf=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Lf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Lf);Lf.range;const ii=1e3,Kr=ii*60,ai=Kr*60,ci=ai*24,r0=ci*7,Dj=ci*30,gv=ci*365,Wa=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ii)},(e,t)=>(t-e)/ii,e=>e.getUTCSeconds());Wa.range;const n0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ii)},(e,t)=>{e.setTime(+e+t*Kr)},(e,t)=>(t-e)/Kr,e=>e.getMinutes());n0.range;const i0=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Kr)},(e,t)=>(t-e)/Kr,e=>e.getUTCMinutes());i0.range;const a0=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ii-e.getMinutes()*Kr)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getHours());a0.range;const o0=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getUTCHours());o0.range;const rc=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kr)/ci,e=>e.getDate()-1);rc.range;const Lh=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ci,e=>e.getUTCDate()-1);Lh.range;const dA=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ci,e=>Math.floor(e/ci));dA.range;function yo(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Kr)/r0)}const zh=yo(0),zf=yo(1),j8=yo(2),S8=yo(3),Is=yo(4),N8=yo(5),E8=yo(6);zh.range;zf.range;j8.range;S8.range;Is.range;N8.range;E8.range;function xo(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/r0)}const Fh=xo(0),Ff=xo(1),P8=xo(2),A8=xo(3),Ts=xo(4),C8=xo(5),O8=xo(6);Fh.range;Ff.range;P8.range;A8.range;Ts.range;C8.range;O8.range;const s0=Pt(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());s0.range;const l0=Pt(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());l0.range;const di=Pt(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());di.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});di.range;const fi=Pt(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());fi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});fi.range;function fA(e,t,r,n,a,o){const u=[[Wa,1,ii],[Wa,5,5*ii],[Wa,15,15*ii],[Wa,30,30*ii],[o,1,Kr],[o,5,5*Kr],[o,15,15*Kr],[o,30,30*Kr],[a,1,ai],[a,3,3*ai],[a,6,6*ai],[a,12,12*ai],[n,1,ci],[n,2,2*ci],[r,1,r0],[t,1,Dj],[t,3,3*Dj],[e,1,gv]];function l(h,p,v){const x=p<h;x&&([h,p]=[p,h]);const b=v&&typeof v.range=="function"?v:f(h,p,v),k=b?b.range(h,+p+1):[];return x?k.reverse():k}function f(h,p,v){const x=Math.abs(p-h)/v,b=Wy(([,,S])=>S).right(u,x);if(b===u.length)return e.every(Mg(h/gv,p/gv,v));if(b===0)return Lf.every(Math.max(Mg(h,p,v),1));const[k,j]=u[x/u[b-1][2]<u[b][2]/x?b-1:b];return k.every(j)}return[l,f]}const[_8,M8]=fA(fi,l0,Fh,dA,o0,i0),[I8,T8]=fA(di,s0,zh,rc,a0,n0);function yv(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 xv(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 Zl(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function D8(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,u=e.shortDays,l=e.months,f=e.shortMonths,h=Jl(a),p=eu(a),v=Jl(o),x=eu(o),b=Jl(u),k=eu(u),j=Jl(l),S=eu(l),N=Jl(f),P=eu(f),O={a:me,A:Q,b:oe,B:X,c:null,d:Bj,e:Bj,f:iB,g:pB,G:vB,H:tB,I:rB,j:nB,L:hA,m:aB,M:oB,p:$,q:T,Q:Hj,s:Kj,S:sB,u:lB,U:uB,V:cB,w:dB,W:fB,x:null,X:null,y:hB,Y:mB,Z:gB,"%":Wj},A={a:ee,A:ne,b:te,B:ue,c:null,d:Uj,e:Uj,f:wB,g:_B,G:IB,H:yB,I:xB,j:bB,L:mA,m:kB,M:jB,p:pe,q:Ce,Q:Hj,s:Kj,S:SB,u:NB,U:EB,V:PB,w:AB,W:CB,x:null,X:null,y:OB,Y:MB,Z:TB,"%":Wj},_={a:G,A:q,b:R,B:de,c:Z,d:zj,e:zj,f:X8,g:Lj,G:$j,H:Fj,I:Fj,j:V8,L:Y8,m:G8,M:q8,p:B,q:K8,Q:J8,s:eB,S:Q8,u:F8,U:B8,V:U8,w:z8,W:W8,x:ge,X:ke,y:Lj,Y:$j,Z:H8,"%":Z8};O.x=C(r,O),O.X=C(n,O),O.c=C(t,O),A.x=C(r,A),A.X=C(n,A),A.c=C(t,A);function C(J,je){return function(Oe){var ae=[],Xe=-1,Y=0,ce=J.length,tt,kr,pa;for(Oe instanceof Date||(Oe=new Date(+Oe));++Xe<ce;)J.charCodeAt(Xe)===37&&(ae.push(J.slice(Y,Xe)),(kr=Rj[tt=J.charAt(++Xe)])!=null?tt=J.charAt(++Xe):kr=tt==="e"?" ":"0",(pa=je[tt])&&(tt=pa(Oe,kr)),ae.push(tt),Y=Xe+1);return ae.push(J.slice(Y,Xe)),ae.join("")}}function I(J,je){return function(Oe){var ae=Zl(1900,void 0,1),Xe=U(ae,J,Oe+="",0),Y,ce;if(Xe!=Oe.length)return null;if("Q"in ae)return new Date(ae.Q);if("s"in ae)return new Date(ae.s*1e3+("L"in ae?ae.L:0));if(je&&!("Z"in ae)&&(ae.Z=0),"p"in ae&&(ae.H=ae.H%12+ae.p*12),ae.m===void 0&&(ae.m="q"in ae?ae.q:0),"V"in ae){if(ae.V<1||ae.V>53)return null;"w"in ae||(ae.w=1),"Z"in ae?(Y=xv(Zl(ae.y,0,1)),ce=Y.getUTCDay(),Y=ce>4||ce===0?Ff.ceil(Y):Ff(Y),Y=Lh.offset(Y,(ae.V-1)*7),ae.y=Y.getUTCFullYear(),ae.m=Y.getUTCMonth(),ae.d=Y.getUTCDate()+(ae.w+6)%7):(Y=yv(Zl(ae.y,0,1)),ce=Y.getDay(),Y=ce>4||ce===0?zf.ceil(Y):zf(Y),Y=rc.offset(Y,(ae.V-1)*7),ae.y=Y.getFullYear(),ae.m=Y.getMonth(),ae.d=Y.getDate()+(ae.w+6)%7)}else("W"in ae||"U"in ae)&&("w"in ae||(ae.w="u"in ae?ae.u%7:"W"in ae?1:0),ce="Z"in ae?xv(Zl(ae.y,0,1)).getUTCDay():yv(Zl(ae.y,0,1)).getDay(),ae.m=0,ae.d="W"in ae?(ae.w+6)%7+ae.W*7-(ce+5)%7:ae.w+ae.U*7-(ce+6)%7);return"Z"in ae?(ae.H+=ae.Z/100|0,ae.M+=ae.Z%100,xv(ae)):yv(ae)}}function U(J,je,Oe,ae){for(var Xe=0,Y=je.length,ce=Oe.length,tt,kr;Xe<Y;){if(ae>=ce)return-1;if(tt=je.charCodeAt(Xe++),tt===37){if(tt=je.charAt(Xe++),kr=_[tt in Rj?je.charAt(Xe++):tt],!kr||(ae=kr(J,Oe,ae))<0)return-1}else if(tt!=Oe.charCodeAt(ae++))return-1}return ae}function B(J,je,Oe){var ae=h.exec(je.slice(Oe));return ae?(J.p=p.get(ae[0].toLowerCase()),Oe+ae[0].length):-1}function G(J,je,Oe){var ae=b.exec(je.slice(Oe));return ae?(J.w=k.get(ae[0].toLowerCase()),Oe+ae[0].length):-1}function q(J,je,Oe){var ae=v.exec(je.slice(Oe));return ae?(J.w=x.get(ae[0].toLowerCase()),Oe+ae[0].length):-1}function R(J,je,Oe){var ae=N.exec(je.slice(Oe));return ae?(J.m=P.get(ae[0].toLowerCase()),Oe+ae[0].length):-1}function de(J,je,Oe){var ae=j.exec(je.slice(Oe));return ae?(J.m=S.get(ae[0].toLowerCase()),Oe+ae[0].length):-1}function Z(J,je,Oe){return U(J,t,je,Oe)}function ge(J,je,Oe){return U(J,r,je,Oe)}function ke(J,je,Oe){return U(J,n,je,Oe)}function me(J){return u[J.getDay()]}function Q(J){return o[J.getDay()]}function oe(J){return f[J.getMonth()]}function X(J){return l[J.getMonth()]}function $(J){return a[+(J.getHours()>=12)]}function T(J){return 1+~~(J.getMonth()/3)}function ee(J){return u[J.getUTCDay()]}function ne(J){return o[J.getUTCDay()]}function te(J){return f[J.getUTCMonth()]}function ue(J){return l[J.getUTCMonth()]}function pe(J){return a[+(J.getUTCHours()>=12)]}function Ce(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var je=C(J+="",O);return je.toString=function(){return J},je},parse:function(J){var je=I(J+="",!1);return je.toString=function(){return J},je},utcFormat:function(J){var je=C(J+="",A);return je.toString=function(){return J},je},utcParse:function(J){var je=I(J+="",!0);return je.toString=function(){return J},je}}}var Rj={"-":"",_:" ",0:"0"},$t=/^\s*\d+/,R8=/^%/,$8=/[\\^$*+?|[\]().{}]/g;function Ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function L8(e){return e.replace($8,"\\$&")}function Jl(e){return new RegExp("^(?:"+e.map(L8).join("|")+")","i")}function eu(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function z8(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function F8(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function B8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function U8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function W8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function $j(e,t,r){var n=$t.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Lj(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function H8(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function K8(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function G8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function zj(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function V8(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Fj(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function q8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Q8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Y8(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function X8(e,t,r){var n=$t.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Z8(e,t,r){var n=R8.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function J8(e,t,r){var n=$t.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function eB(e,t,r){var n=$t.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Bj(e,t){return Ge(e.getDate(),t,2)}function tB(e,t){return Ge(e.getHours(),t,2)}function rB(e,t){return Ge(e.getHours()%12||12,t,2)}function nB(e,t){return Ge(1+rc.count(di(e),e),t,3)}function hA(e,t){return Ge(e.getMilliseconds(),t,3)}function iB(e,t){return hA(e,t)+"000"}function aB(e,t){return Ge(e.getMonth()+1,t,2)}function oB(e,t){return Ge(e.getMinutes(),t,2)}function sB(e,t){return Ge(e.getSeconds(),t,2)}function lB(e){var t=e.getDay();return t===0?7:t}function uB(e,t){return Ge(zh.count(di(e)-1,e),t,2)}function pA(e){var t=e.getDay();return t>=4||t===0?Is(e):Is.ceil(e)}function cB(e,t){return e=pA(e),Ge(Is.count(di(e),e)+(di(e).getDay()===4),t,2)}function dB(e){return e.getDay()}function fB(e,t){return Ge(zf.count(di(e)-1,e),t,2)}function hB(e,t){return Ge(e.getFullYear()%100,t,2)}function pB(e,t){return e=pA(e),Ge(e.getFullYear()%100,t,2)}function mB(e,t){return Ge(e.getFullYear()%1e4,t,4)}function vB(e,t){var r=e.getDay();return e=r>=4||r===0?Is(e):Is.ceil(e),Ge(e.getFullYear()%1e4,t,4)}function gB(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ge(t/60|0,"0",2)+Ge(t%60,"0",2)}function Uj(e,t){return Ge(e.getUTCDate(),t,2)}function yB(e,t){return Ge(e.getUTCHours(),t,2)}function xB(e,t){return Ge(e.getUTCHours()%12||12,t,2)}function bB(e,t){return Ge(1+Lh.count(fi(e),e),t,3)}function mA(e,t){return Ge(e.getUTCMilliseconds(),t,3)}function wB(e,t){return mA(e,t)+"000"}function kB(e,t){return Ge(e.getUTCMonth()+1,t,2)}function jB(e,t){return Ge(e.getUTCMinutes(),t,2)}function SB(e,t){return Ge(e.getUTCSeconds(),t,2)}function NB(e){var t=e.getUTCDay();return t===0?7:t}function EB(e,t){return Ge(Fh.count(fi(e)-1,e),t,2)}function vA(e){var t=e.getUTCDay();return t>=4||t===0?Ts(e):Ts.ceil(e)}function PB(e,t){return e=vA(e),Ge(Ts.count(fi(e),e)+(fi(e).getUTCDay()===4),t,2)}function AB(e){return e.getUTCDay()}function CB(e,t){return Ge(Ff.count(fi(e)-1,e),t,2)}function OB(e,t){return Ge(e.getUTCFullYear()%100,t,2)}function _B(e,t){return e=vA(e),Ge(e.getUTCFullYear()%100,t,2)}function MB(e,t){return Ge(e.getUTCFullYear()%1e4,t,4)}function IB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ts(e):Ts.ceil(e),Ge(e.getUTCFullYear()%1e4,t,4)}function TB(){return"+0000"}function Wj(){return"%"}function Hj(e){return+e}function Kj(e){return Math.floor(+e/1e3)}var Zo,gA,yA;DB({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 DB(e){return Zo=D8(e),gA=Zo.format,Zo.parse,yA=Zo.utcFormat,Zo.utcParse,Zo}function RB(e){return new Date(e)}function $B(e){return e instanceof Date?+e:+new Date(+e)}function u0(e,t,r,n,a,o,u,l,f,h){var p=Qy(),v=p.invert,x=p.domain,b=h(".%L"),k=h(":%S"),j=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),P=h("%b %d"),O=h("%B"),A=h("%Y");function _(C){return(f(C)<C?b:l(C)<C?k:u(C)<C?j:o(C)<C?S:n(C)<C?a(C)<C?N:P:r(C)<C?O:A)(C)}return p.invert=function(C){return new Date(v(C))},p.domain=function(C){return arguments.length?x(Array.from(C,$B)):x().map(RB)},p.ticks=function(C){var I=x();return e(I[0],I[I.length-1],C??10)},p.tickFormat=function(C,I){return I==null?_:h(I)},p.nice=function(C){var I=x();return(!C||typeof C.range!="function")&&(C=t(I[0],I[I.length-1],C??10)),C?x(iA(I,C)):p},p.copy=function(){return tc(p,u0(e,t,r,n,a,o,u,l,f,h))},p}function LB(){return Yr.apply(u0(I8,T8,di,s0,zh,rc,a0,n0,Wa,gA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zB(){return Yr.apply(u0(_8,M8,fi,l0,Fh,Lh,o0,i0,Wa,yA).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Bh(){var e=0,t=1,r,n,a,o,u=sr,l=!1,f;function h(v){return v==null||isNaN(v=+v)?f:u(a===0?.5:(v=(o(v)-r)*a,l?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t]=v,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(v){return arguments.length?(l=!!v,h):l},h.interpolator=function(v){return arguments.length?(u=v,h):u};function p(v){return function(x){var b,k;return arguments.length?([b,k]=x,u=v(b,k),h):[u(0),u(1)]}}return h.range=p(Ks),h.rangeRound=p(qy),h.unknown=function(v){return arguments.length?(f=v,h):f},function(v){return o=v,r=v(e),n=v(t),a=r===n?0:1/(n-r),h}}function ha(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function xA(){var e=fa(Bh()(sr));return e.copy=function(){return ha(e,xA())},mi.apply(e,arguments)}function bA(){var e=Zy(Bh()).domain([1,10]);return e.copy=function(){return ha(e,bA()).base(e.base())},mi.apply(e,arguments)}function wA(){var e=Jy(Bh());return e.copy=function(){return ha(e,wA()).constant(e.constant())},mi.apply(e,arguments)}function c0(){var e=e0(Bh());return e.copy=function(){return ha(e,c0()).exponent(e.exponent())},mi.apply(e,arguments)}function FB(){return c0.apply(null,arguments).exponent(.5)}function kA(){var e=[],t=sr;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ju(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(la),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,o)=>NF(e,o/n))},r.copy=function(){return kA(t).domain(e)},mi.apply(r,arguments)}function Uh(){var e=0,t=.5,r=1,n=1,a,o,u,l,f,h=sr,p,v=!1,x;function b(j){return isNaN(j=+j)?x:(j=.5+((j=+p(j))-o)*(n*j<n*o?l:f),h(v?Math.max(0,Math.min(1,j)):j))}b.domain=function(j){return arguments.length?([e,t,r]=j,a=p(e=+e),o=p(t=+t),u=p(r=+r),l=a===o?0:.5/(o-a),f=o===u?0:.5/(u-o),n=o<a?-1:1,b):[e,t,r]},b.clamp=function(j){return arguments.length?(v=!!j,b):v},b.interpolator=function(j){return arguments.length?(h=j,b):h};function k(j){return function(S){var N,P,O;return arguments.length?([N,P,O]=S,h=ZF(j,[N,P,O]),b):[h(0),h(.5),h(1)]}}return b.range=k(Ks),b.rangeRound=k(qy),b.unknown=function(j){return arguments.length?(x=j,b):x},function(j){return p=j,a=j(e),o=j(t),u=j(r),l=a===o?0:.5/(o-a),f=o===u?0:.5/(u-o),n=o<a?-1:1,b}}function jA(){var e=fa(Uh()(sr));return e.copy=function(){return ha(e,jA())},mi.apply(e,arguments)}function SA(){var e=Zy(Uh()).domain([.1,1,10]);return e.copy=function(){return ha(e,SA()).base(e.base())},mi.apply(e,arguments)}function NA(){var e=Jy(Uh());return e.copy=function(){return ha(e,NA()).constant(e.constant())},mi.apply(e,arguments)}function d0(){var e=e0(Uh());return e.copy=function(){return ha(e,d0()).exponent(e.exponent())},mi.apply(e,arguments)}function BB(){return d0.apply(null,arguments).exponent(.5)}const EA=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ky,scaleDiverging:jA,scaleDivergingLog:SA,scaleDivergingPow:d0,scaleDivergingSqrt:BB,scaleDivergingSymlog:NA,scaleIdentity:nA,scaleImplicit:Ig,scaleLinear:rA,scaleLog:aA,scaleOrdinal:Hy,scalePoint:AF,scalePow:t0,scaleQuantile:lA,scaleQuantize:uA,scaleRadial:sA,scaleSequential:xA,scaleSequentialLog:bA,scaleSequentialPow:c0,scaleSequentialQuantile:kA,scaleSequentialSqrt:FB,scaleSequentialSymlog:wA,scaleSqrt:w8,scaleSymlog:oA,scaleThreshold:cA,scaleTime:LB,scaleUtc:zB,tickFormat:tA},Symbol.toStringTag,{value:"Module"}));function UB(e){var t=EA;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(py(e));if(r in t&&typeof t[r]=="function")return t[r]()}function Gj(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=UB(e);if(n!=null)return n.domain(t).range(r),n}}function f0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?Gj(e.scale,r,n):Gj(t,r,n)}function WB(e){return"scale".concat(py(e))}function HB(e){return WB(e)in EA}var PA=(e,t,r)=>{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return HB(n)?n:"point"}};function KB(e,t){for(var r=0,n=e.length,a=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(a?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function AA(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var u,l,f=KB(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,p=(l=n[f])!==null&&l!==void 0?l:0;return Math.abs(o-h)<=Math.abs(o-p)?r[f-1]:r[f]}}}function GB(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):AA(e,void 0)}function Vj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vj(Object(r),!0).forEach(function(n){VB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VB(e,t,r){return(t=qB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qB(e){var t=QB(e,"string");return typeof t=="symbol"?t:t+""}function QB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CA(e,t){return JB(e)||ZB(e,t)||XB(e,t)||YB()}function YB(){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 XB(e,t){if(e){if(typeof e=="string")return qj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qj(e,t):void 0}}function qj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ZB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function JB(e){if(Array.isArray(e))return e}var $g=[0,"auto"],St={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},OA=(e,t)=>e.cartesianAxis.xAxis[t],vi=(e,t)=>{var r=OA(e,t);return r??St},Nt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:$g,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:qu},_A=(e,t)=>e.cartesianAxis.yAxis[t],gi=(e,t)=>{var r=_A(e,t);return r??Nt},e9={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},h0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??e9},ur=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return gi(e,r);case"zAxis":return h0(e,r);case"angleAxis":return $y(e,r);case"radiusAxis":return Ly(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},t9=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return gi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},nc=(e,t,r)=>{switch(t){case"xAxis":return vi(e,r);case"yAxis":return gi(e,r);case"angleAxis":return $y(e,r);case"radiusAxis":return Ly(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},MA=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function IA(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var TA=e=>e.graphicalItems.cartesianItems,r9=K([Dt,Th],IA),DA=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Gs=K([TA,ur,r9],DA,{memoizeOptions:{resultEqualityCheck:Rh}}),RA=K([Gs],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(By)),$A=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),n9=K([Gs],$A),LA=e=>e.map(t=>t.data).filter(Boolean).flat(1),i9=K([Gs],e=>e.some(t=>!t.data)),zA=K([Gs],LA,{memoizeOptions:{resultEqualityCheck:Rh}}),FA=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(a,o+1)},p0=K([zA,Ch],FA),a9=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Tt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Tt(a,n)}))):e.map(n=>({value:n})),BA=(e,t,r,n,a,o)=>{var u=n.chartData,l=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,p=a9(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var v=l.slice(f,h+1),x=v.map(b=>({value:Tt(b,t.dataKey)})).filter(b=>b.value!=null);return[...x,...p]}return p},ic=K([p0,ur,Gs,Ch,i9,zA],BA);function hs(e){if(Dn(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function Qj(e){if(Array.isArray(e)){var t=[hs(e[0]),hs(e[1])];return Mn(t)?t:void 0}var r=hs(e);if(r!=null)return[r,r]}function Ln(e){return e.map(hs).filter(yr)}function o9(e,t){var r=hs(e),n=hs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var s9=K([ic],e=>e==null?void 0:e.map(t=>t.value).sort(o9));function UA(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function l9(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Tn(t))n=t;else if(Array.isArray(t)){var a=Ln(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Ln(r.flatMap(o=>{var u=Tt(e,o.dataKey),l,f;if(Array.isArray(u)){var h=CA(u,2);l=h[0],f=h[1]}else l=f=u;if(!(!Be(l)||!Be(f)))return[n-l,n+f]}))}var At=e=>{var t=Rt(e),r=Hs(e);return nc(e,t,r)},Ds=K([At],e=>e==null?void 0:e.dataKey),u9=K([RA,Ch,At],GP),WA=(e,t,r,n)=>{var a={},o=t.reduce((u,l)=>{if(l.stackId==null)return u;var f=u[l.stackId];return f==null&&(f=[]),f.push(l),u[l.stackId]=f,u},a);return Object.fromEntries(Object.entries(o).map(u=>{var l=CA(u,2),f=l[0],h=l[1],p=n?[...h].reverse():h,v=p.map(Fy);return[f,{stackedData:P$(e,v,r),graphicalItems:p}]}))},HA=K([u9,RA,Oh,zP],WA),KA=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return _$(e,a,o)},c9=K([ur],e=>e.allowDataOverflow),m0=e=>{var t;if(e==null||!("domain"in e))return $g;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Ln(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:$g},GA=K([ur],m0),VA=K([GA,c9],AP),d9=K([HA,pn,Dt,VA],KA,{memoizeOptions:{resultEqualityCheck:Dh}}),v0=e=>e.errorBars,f9=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>UA(r,n)),Uf=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r.filter(Boolean);if(a.length!==0){var o=a.flat(),u=Math.min(...o),l=Math.max(...o);return[u,l]}},qA=function(t,r,n,a,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l,f;if(n.length>0&&n.forEach(h=>{var p,v=h.data!=null?[...h.data]:u,x=(p=a[h.id])===null||p===void 0?void 0:p.filter(b=>UA(o,b));v.forEach(b=>{var k,j=Tt(b,(k=r.dataKey)!==null&&k!==void 0?k:h.dataKey),S=l9(b,j,x);if(S.length>=2){var N=Math.min(...S),P=Math.max(...S);(l==null||N<l)&&(l=N),(f==null||P>f)&&(f=P)}var O=Qj(j);O!=null&&(l=l==null?O[0]:Math.min(l,O[0]),f=f==null?O[1]:Math.max(f,O[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=Qj(Tt(h,r.dataKey));p!=null&&(l=l==null?p[0]:Math.min(l,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Be(l)&&Be(f))return[l,f]},h9=K([p0,ur,n9,v0,Dt,W6],qA,{memoizeOptions:{resultEqualityCheck:Dh}});function p9(e){var t=e.value;if(Dn(t)||t instanceof Date)return t}var m9=(e,t,r)=>{var n=e.map(p9).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&aE(n))?PP(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},QA=e=>e.referenceElements.dots,Vs=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),v9=K([QA,Dt,Th],Vs),YA=e=>e.referenceElements.areas,g9=K([YA,Dt,Th],Vs),XA=e=>e.referenceElements.lines,y9=K([XA,Dt,Th],Vs),ZA=(e,t)=>{if(e!=null){var r=Ln(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},x9=K(v9,Dt,ZA),JA=(e,t)=>{if(e!=null){var r=Ln(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},b9=K([g9,Dt],JA);function w9(e){var t;if(e.x!=null)return Ln([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Ln(r)}function k9(e){var t;if(e.y!=null)return Ln([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Ln(r)}var eC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?w9(n):k9(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},j9=K([y9,Dt],eC),S9=K(x9,j9,b9,(e,t,r)=>Uf(e,r,t)),tC=(e,t,r,n,a,o,u,l)=>{if(r!=null)return r;var f=u==="vertical"&&l==="xAxis"||u==="horizontal"&&l==="yAxis",h=f?Uf(n,o,a):Uf(o,a);return Q6(t,h,e.allowDataOverflow)},N9=K([ur,GA,VA,d9,h9,S9,ut,Dt],tC,{memoizeOptions:{resultEqualityCheck:Dh}}),E9=[0,1],rC=(e,t,r,n,a,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var l=e.dataKey,f=e.type,h=zn(t,o);if(h&&l==null){var p;return PP(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?m9(n,e,h):a==="expand"&&!h?E9:u}},g0=K([ur,ut,p0,ic,Oh,Dt,N9],rC),qs=K([ur,MA,Ty],PA),nC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=m0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Mn(e)){if(o)return ij(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return aj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Mn(e))return ij(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Mn(e))return aj(e,t.tickCount,t.allowDecimals,"adaptive")}}},y0=K([g0,nc,qs],nC),iC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Mn(t)&&Array.isArray(r)&&r.length>0){var a,o,u=t[0],l=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,l),Math.max(f,h)]}return t},P9=K([ur,g0,y0,Dt],iC),A9=K(ic,ur,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Ln(e.map(v=>v.value))).sort((v,x)=>v-x),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var u=o-a;if(u===0)return 1/0;for(var l=0;l<n.length-1;l++){var f=n[l],h=n[l+1];if(!(f==null||h==null)){var p=h-f;r=Math.min(r,p)}}return r/u}}),aC=K(A9,ut,iF,Vt,(e,t,r,n,a)=>a,(e,t,r,n,a)=>{if(!Be(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var u=da(r,e*o),l=e*o/2;return l-u-(l-u)/o*u}return 0}),C9=(e,t,r)=>{var n=vi(e,t);return n==null||typeof n.padding!="string"?0:aC(e,"xAxis",t,r,n.padding)},O9=(e,t,r)=>{var n=gi(e,t);return n==null||typeof n.padding!="string"?0:aC(e,"yAxis",t,r,n.padding)},_9=K(vi,C9,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),M9=K(gi,O9,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),oC=K([Vt,_9,jh,kh,(e,t,r)=>r],(e,t,r,n,a)=>{var o=n.padding;return a?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),sC=K([Vt,ut,M9,jh,kh,(e,t,r)=>r],(e,t,r,n,a,o)=>{var u=a.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),ac=(e,t,r,n)=>{var a;switch(t){case"xAxis":return oC(e,r,n);case"yAxis":return sC(e,r,n);case"zAxis":return(a=h0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return WP(e);case"radiusAxis":return HP(e,r);default:return}},lC=K([ur,ac],_h),I9=K([qs,P9],hF),x0=K([ur,qs,I9,lC],f0),uC=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,u=zn(e,n);if(u&&(a==="number"||o!=="auto"))return t.map(l=>l.value)}},b0=K([ut,ic,nc,Dt],uC),Wh=K([x0],Uy);K([x0],GB);K([x0,s9],AA);K([Gs,v0,Dt],f9);function cC(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Hh=(e,t)=>t,Kh=(e,t,r)=>r,T9=K(bh,Hh,Kh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(cC)),D9=K(wh,Hh,Kh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(cC)),dC=(e,t)=>({width:e.width,height:t.height}),R9=(e,t)=>{var r=typeof t.width=="number"?t.width:qu;return{width:r,height:e.height}},$9=K(Vt,vi,dC),L9=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},z9=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},F9=K(pi,Vt,T9,Hh,Kh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=dC(t,l);u==null&&(u=L9(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[l.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),B9=K(hi,Vt,D9,Hh,Kh,(e,t,r,n,a)=>{var o={},u;return r.forEach(l=>{var f=R9(t,l);u==null&&(u=z9(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[l.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),U9=(e,t)=>{var r=vi(e,t);if(r!=null)return F9(e,r.orientation,r.mirror)},W9=K([Vt,vi,U9,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),H9=(e,t)=>{var r=gi(e,t);if(r!=null)return B9(e,r.orientation,r.mirror)},K9=K([Vt,gi,H9,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),G9=K(Vt,gi,(e,t)=>{var r=typeof t.width=="number"?t.width:qu;return{width:r,height:e.height}}),fC=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,l=zn(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(u&&l&&o==="category"&&a&&aE(h))return f}},w0=K([ut,ic,ur,Dt],fC),Yj=K([ut,t9,qs,Wh,w0,b0,ac,y0,Dt],(e,t,r,n,a,o,u,l,f)=>{if(t!=null){var h=zn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:a,isCategorical:h,niceTicks:l,range:u,realScaleType:r,scale:n}}}),V9=(e,t,r,n,a,o,u,l,f)=>{if(!(t==null||n==null)){var h=zn(e,f),p=t.type,v=t.ticks,x=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,k=p==="category"&&n.bandwidth?n.bandwidth()/b:0;k=f==="angleAxis"&&o!=null&&o.length>=2?Wr(o[0]-o[1])*2*k:k;var j=v||a;return j?j.map((S,N)=>{var P=u?u.indexOf(S):S,O=n.map(P);return Be(O)?{index:N,coordinate:O+k,value:S,offset:k}:null}).filter(yr):h&&l?l.map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+k,value:S,index:N,offset:k}:null}).filter(yr):n.ticks?n.ticks(x).map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+k,value:S,index:N,offset:k}:null}).filter(yr):n.domain().map((S,N)=>{var P=n.map(S);return Be(P)?{coordinate:P+k,value:u?u[S]:S,index:N,offset:k}:null}).filter(yr)}},hC=K([ut,nc,qs,Wh,y0,ac,w0,b0,Dt],V9),q9=(e,t,r,n,a,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=zn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Wr(n[0]-n[1])*2*h:h,l&&o?o.map((p,v)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:p,index:v,offset:h}:null}).filter(yr):r.ticks?r.ticks(f).map((p,v)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:p,index:v,offset:h}:null}).filter(yr):r.domain().map((p,v)=>{var x=r.map(p);return Be(x)?{coordinate:x+h,value:a?a[p]:p,index:v,offset:h}:null}).filter(yr)}},pC=K([ut,nc,Wh,ac,w0,b0,Dt],q9),mC=K(ur,Wh,(e,t)=>{if(!(e==null||t==null))return Bf(Bf({},e),{},{scale:t})}),Q9=K([ur,qs,g0,lC],f0),Y9=K([Q9],Uy);K((e,t,r)=>h0(e,r),Y9,(e,t)=>{if(!(e==null||t==null))return Bf(Bf({},e),{},{scale:t})});var X9=K([ut,bh,wh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Z9=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};K([Z9],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);u<n&&(n=u,a=o)}return(r=a)===null||r===void 0?void 0:r.value}});var vC=e=>e.options.defaultTooltipEventType,gC=e=>e.options.validateTooltipEventTypes;function yC(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function oc(e,t){var r=vC(e),n=gC(e);return yC(t,r,n)}function J9(e){return Ae(t=>oc(t,e))}var xC=(e,t)=>{var r,n=Number(t);if(!(Tn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},eU=e=>e.tooltip.settings,Qi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},tU={itemInteraction:{click:Qi,hover:Qi},axisInteraction:{click:Qi,hover:Qi},keyboardInteraction:Qi,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},bC=rr({name:"tooltip",initialState:tU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:at()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:at()},removeTooltipEntrySettings:{reducer(e,t){var r=Hr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:at()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),Xr=bC.actions,rU=Xr.addTooltipEntrySettings,nU=Xr.replaceTooltipEntrySettings,iU=Xr.removeTooltipEntrySettings,aU=Xr.setTooltipSettingsState,oU=Xr.setActiveMouseOverItemIndex;Xr.mouseLeaveItem;var wC=Xr.mouseLeaveChart;Xr.setActiveClickItemIndex;var kC=Xr.setMouseOverAxisIndex,sU=Xr.setMouseClickAxisIndex,au=Xr.setSyncInteraction,Wf=Xr.setKeyboardInteraction,lU=bC.reducer;function Xj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xj(Object(r),!0).forEach(function(n){uU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uU(e,t,r){return(t=cU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cU(e){var t=dU(e,"string");return typeof t=="symbol"?t:t+""}function dU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fU(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function hU(e){return e.index!=null}var jC=(e,t,r,n)=>{if(t==null)return Qi;var a=fU(e,t,r);if(a==null)return Qi;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(hU(a)){if(o)return Fd(Fd({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Fd(Fd({},Qi),{},{coordinate:a.coordinate})};function pU(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function mU(e,t){var r=pU(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),u=Math.max(n,a);return r>=o&&r<=u}function vU(e,t,r){if(r==null||t==null)return!0;var n=Tt(e,t);return n==null||!Mn(r)?!0:mU(n,r)}var lu=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!Be(o))return a;var u=0,l=1/0;t.length>0&&(l=t.length-1);var f=Math.max(u,Math.min(o,l)),h=t[f];return h==null||vU(h,r,n)?String(f):null},SC=(e,t,r,n,a,o,u)=>{if(o!=null){var l=u[0],f=l==null?void 0:l.getPosition(o);if(f!=null)return f;var h=a==null?void 0:a[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},NC=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var l;return((l=u.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},EC=e=>e.options.tooltipPayloadSearcher,Qs=e=>e.tooltip;function Zj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zj(Object(r),!0).forEach(function(n){gU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gU(e,t,r){return(t=yU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yU(e){var t=xU(e,"string");return typeof t=="symbol"?t:t+""}function xU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bU(e){if(typeof e=="string"||typeof e=="number")return e}function wU(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function kU(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function eS(e){if(typeof e=="string")return e}function jU(e){if(!(e==null||typeof e!="object")){var t="name"in e?bU(e.name):void 0,r="unit"in e?wU(e.unit):void 0,n="dataKey"in e?kU(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?eS(e.color):void 0,u="fill"in e?eS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:u}}}function SU(e,t){return e??t}var PC=(e,t,r,n,a,o,u)=>{if(!(t==null||o==null)){var l=r.chartData,f=r.computedData,h=r.dataStartIndex,p=r.dataEndIndex,v=[];return e.reduce((x,b)=>{var k,j=b.dataDefinedOnItem,S=b.settings,N=SU(j,l),P=Array.isArray(N)?ZE(N,h,p):N,O=(k=S==null?void 0:S.dataKey)!==null&&k!==void 0?k:n,A=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(P)&&!Array.isArray(P[0])&&u==="axis"?_=oE(P,n,a):_=o(P,t,f,A),Array.isArray(_))_.forEach(I=>{var U,B,G=jU(I),q=G==null?void 0:G.name,R=G==null?void 0:G.dataKey,de=G==null?void 0:G.payload,Z=Jj(Jj({},S),{},{name:q,unit:G==null?void 0:G.unit,color:(U=G==null?void 0:G.color)!==null&&U!==void 0?U:S==null?void 0:S.color,fill:(B=G==null?void 0:G.fill)!==null&&B!==void 0?B:S==null?void 0:S.fill});x.push(qw({tooltipEntrySettings:Z,dataKey:R,payload:de,value:Tt(de,R),name:q==null?void 0:String(q)}))});else{var C;x.push(qw({tooltipEntrySettings:S,dataKey:O,payload:_,value:Tt(_,O),name:(C=Tt(_,A))!==null&&C!==void 0?C:S==null?void 0:S.name}))}return x},v)}},k0=K([At,MA,Ty],PA),NU=K([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),EU=K([Rt,Hs],IA),bo=K([NU,At,EU],DA,{memoizeOptions:{resultEqualityCheck:Rh}}),PU=K([bo],e=>e.filter(By)),AC=K([bo],LA,{memoizeOptions:{resultEqualityCheck:Rh}}),AU=K([bo],e=>e.some(t=>!t.data)),fo=K([AC,pn],FA),CU=K([PU,pn,At],GP),j0=K([fo,At,bo,pn,AU,AC],BA),CC=K([At],m0),OU=K([At],e=>e.allowDataOverflow),OC=K([CC,OU],AP),_U=K([bo],e=>e.filter(By)),MU=K([CU,_U,Oh,zP],WA),IU=K([MU,pn,Rt,OC],KA),TU=K([bo],$A),DU=K([fo,At,TU,v0,Rt,H6],qA,{memoizeOptions:{resultEqualityCheck:Dh}}),RU=K([QA,Rt,Hs],Vs),$U=K([RU,Rt],ZA),LU=K([YA,Rt,Hs],Vs),zU=K([LU,Rt],JA),FU=K([XA,Rt,Hs],Vs),BU=K([FU,Rt],eC),UU=K([$U,BU,zU],Uf),WU=K([At,CC,OC,IU,DU,UU,ut,Rt],tC),Rs=K([At,ut,fo,j0,Oh,Rt,WU],rC),HU=K([Rs,At,k0],nC),KU=K([At,Rs,HU,Rt],iC),_C=e=>{var t=Rt(e),r=Hs(e),n=!1;return ac(e,t,r,n)},MC=K([At,_C],_h),GU=K([At,k0,KU,MC],f0),IC=K([GU],Uy),VU=K([ut,j0,At,Rt],fC),qU=K([ut,j0,At,Rt],uC),QU=(e,t,r,n,a,o,u,l)=>{if(t){var f=t.type,h=zn(e,l);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,v=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return v=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Wr(a[0]-a[1])*2*v:v,h&&u?u.map((x,b)=>{var k=n.map(x);return Be(k)?{coordinate:k+v,value:x,index:b,offset:v}:null}).filter(yr):n.domain().map((x,b)=>{var k=n.map(x);return Be(k)?{coordinate:k+v,value:o?o[x]:x,index:b,offset:v}:null}).filter(yr)}}},yi=K([ut,At,k0,IC,_C,VU,qU,Rt],QU),S0=K([vC,gC,eU],(e,t,r)=>yC(r.shared,e,t)),TC=e=>e.tooltip.settings.trigger,N0=e=>e.tooltip.settings.defaultIndex,sc=K([Qs,S0,TC,N0],jC),Ru=K([sc,fo,Ds,Rs],lu),DC=K([yi,Ru],xC),YU=K([sc],e=>{if(e)return e.dataKey}),XU=K([sc],e=>{if(e)return e.graphicalItemId}),RC=K([Qs,S0,TC,N0],NC),ZU=K([hi,pi,ut,Vt,yi,N0,RC],SC),JU=K([sc,ZU],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),e7=K([sc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),t7=K([RC,Ru,pn,Ds,DC,EC,S0],PC),r7=K([t7],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function tS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tS(Object(r),!0).forEach(function(n){n7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n7(e,t,r){return(t=i7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i7(e){var t=a7(e,"string");return typeof t=="symbol"?t:t+""}function a7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var o7=()=>Ae(At),s7=()=>{var e=o7(),t=Ae(yi),r=Ae(IC);return xf(!e||!r?void 0:rS(rS({},e),{},{scale:r}),t)};function nS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nS(Object(r),!0).forEach(function(n){l7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l7(e,t,r){return(t=u7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u7(e){var t=c7(e,"string");return typeof t=="symbol"?t:t+""}function c7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d7=(e,t,r,n)=>{var a=t.find(o=>o&&o.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},f7=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var o=a.coordinate,u=n.radius;return Jo(Jo(Jo({},n),Ht(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var l=a.coordinate,f=n.angle;return Jo(Jo(Jo({},n),Ht(n.cx,n.cy,l,f)),{},{angle:f,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function h7(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var $C=(e,t,r,n,a)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l<u;l++){var f,h,p,v,x,b=l>0?(f=r[l-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,k=(p=r[l])===null||p===void 0?void 0:p.coordinate,j=l>=u-1?(v=r[0])===null||v===void 0?void 0:v.coordinate:(x=r[l+1])===null||x===void 0?void 0:x.coordinate,S=void 0;if(!(b==null||k==null||j==null))if(Wr(k-b)!==Wr(j-k)){var N=[];if(Wr(j-k)===Wr(a[1]-a[0])){S=j;var P=k+a[1]-a[0];N[0]=Math.min(P,(P+b)/2),N[1]=Math.max(P,(P+b)/2)}else{S=b;var O=j+a[1]-a[0];N[0]=Math.min(k,(O+k)/2),N[1]=Math.max(k,(O+k)/2)}var A=[Math.min(k,(S+k)/2),Math.max(k,(S+k)/2)];if(e>A[0]&&e<=A[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[l])===null||_===void 0?void 0:_.index}}else{var C=Math.min(b,j),I=Math.max(b,j);if(e>(C+k)/2&&e<=(I+k)/2){var U;return(U=r[l])===null||U===void 0?void 0:U.index}}}else if(t)for(var B=0;B<u;B++){var G=t[B];if(G!=null){var q=t[B+1],R=t[B-1];if(B===0&&q!=null&&e<=(G.coordinate+q.coordinate)/2||B===u-1&&R!=null&&e>(G.coordinate+R.coordinate)/2||B>0&&B<u-1&&R!=null&&q!=null&&e>(G.coordinate+R.coordinate)/2&&e<=(G.coordinate+q.coordinate)/2)return G.index}}return-1},LC=()=>Ae(Ty),E0=(e,t)=>t,zC=(e,t,r)=>r,P0=(e,t,r,n)=>n,p7=K(yi,e=>uh(e,t=>t.coordinate)),A0=K([Qs,E0,zC,P0],jC),C0=K([A0,fo,Ds,Rs],lu),m7=(e,t,r)=>{if(t!=null){var n=Qs(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},FC=K([Qs,E0,zC,P0],NC),Hf=K([hi,pi,ut,Vt,yi,P0,FC],SC),v7=K([A0,Hf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),BC=K([yi,C0],xC),g7=K([FC,C0,pn,Ds,BC,EC,E0],PC),y7=K([A0,C0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),x7=(e,t,r,n,a,o,u)=>{if(!(!e||!r||!n||!a)&&h7(e,u)){var l=M$(e,t),f=$C(l,o,a,r,n),h=d7(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},b7=(e,t,r,n,a,o,u)=>{if(!(!e||!n||!a||!o||!r)){var l=D6(e,r);if(l){var f=I$(l,t),h=$C(f,u,o,n,a),p=f7(t,o,h,l);return{activeIndex:String(h),activeCoordinate:p}}}},w7=(e,t,r,n,a,o,u,l)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?x7(e,t,n,a,o,u,l):b7(e,t,r,n,a,o,u)},k7=K(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),j7=K(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(or)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:fF}});function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function aS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iS(Object(r),!0).forEach(function(n){S7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S7(e,t,r){return(t=N7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N7(e){var t=E7(e,"string");return typeof t=="symbol"?t:t+""}function E7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P7={},A7={zIndexMap:Object.values(or).reduce((e,t)=>aS(aS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),P7)},C7=new Set(Object.values(or));function O7(e){return C7.has(e)}var UC=rr({name:"zIndex",initialState:A7,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:at()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!O7(r)&&delete e.zIndexMap[r])},prepare:at()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:o?void 0:a,panoramaElement:o?a:void 0}},prepare:at()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:at()}}}),Gh=UC.actions,_7=Gh.registerZIndexPortal,bv=Gh.unregisterZIndexPortal,M7=Gh.registerZIndexPortalElement,I7=Gh.unregisterZIndexPortalElement,T7=UC.reducer;function xi(e){var t=e.zIndex,r=e.children,n=gL(),a=n&&t!==void 0&&t!==0,o=wr(),u=y.useRef(void 0),l=y.useRef(new Set),f=wt(),h=Ae(v=>k7(v,t,o));if(y.useLayoutEffect(()=>{if(!a){var v=l.current;v.forEach(b=>{f(bv({zIndex:b}))}),v.clear(),u.current=void 0;return}if(l.current.has(t)||(f(_7({zIndex:t})),l.current.add(t)),h){u.current=h;var x=l.current;x.forEach(b=>{b!==t&&(f(bv({zIndex:b})),x.delete(b))})}},[f,t,a,h]),y.useLayoutEffect(()=>{var v=l.current;return()=>{v.forEach(x=>{f(bv({zIndex:x}))}),v.clear()}},[f]),!a)return r;var p=h??u.current;return p?th.createPortal(r,p):null}function Lg(){return Lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lg.apply(null,arguments)}function oS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oS(Object(r),!0).forEach(function(n){D7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D7(e,t,r){return(t=R7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R7(e){var t=$7(e,"string");return typeof t=="symbol"?t:t+""}function $7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L7(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return y.isValidElement(t)?y.cloneElement(t,n):y.createElement(r,n)}function z7(e){var t,r=e.coordinate,n=e.payload,a=e.index,o=e.offset,u=e.tooltipAxisBandSize,l=e.layout,f=e.cursor,h=e.tooltipEventType,p=e.chartName,v=r,x=n,b=a;if(!f||!v||p!=="ScatterChart"&&h!=="axis")return null;var k,j,S;if(p==="ScatterChart")k=v,j=Wz,S=or.cursorLine;else if(p==="BarChart")k=Hz(l,v,o,u),j=N6,S=or.cursorRectangle;else if(l==="radial"&&sE(v)){var N=NP(v),P=N.cx,O=N.cy,A=N.radius,_=N.startAngle,C=N.endAngle;k={cx:P,cy:O,startAngle:_,endAngle:C,innerRadius:A,outerRadius:A},j=z6,S=or.cursorLine}else k={points:F6(l,v,o)},j=Zd,S=or.cursorLine;var I=typeof f=="object"&&"className"in f?f.className:void 0,U=Bd(Bd(Bd(Bd({stroke:"#ccc",pointerEvents:"none"},o),k),oh(f)),{},{payload:x,payloadIndex:b,className:et("recharts-tooltip-cursor",I)});return y.createElement(xi,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},y.createElement(L7,{cursor:f,cursorComp:j,cursorProps:U}))}function F7(e){var t=s7(),r=sP(),n=Bs(),a=LC();return t==null||r==null||n==null||a==null?null:y.createElement(z7,Lg({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}var WC=y.createContext(null),B7=()=>y.useContext(WC),wv={exports:{}},sS;function U7(){return sS||(sS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,v,x){if(typeof p!="function")throw new TypeError("The listener must be a function");var b=new a(p,v||f,x),k=r?r+h:h;return f._events[k]?f._events[k].fn?f._events[k]=[f._events[k],b]:f._events[k].push(b):(f._events[k]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],p,v;if(this._eventsCount===0)return h;for(v in p=this._events)t.call(p,v)&&h.push(r?v.slice(1):v);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},l.prototype.listeners=function(h){var p=r?r+h:h,v=this._events[p];if(!v)return[];if(v.fn)return[v.fn];for(var x=0,b=v.length,k=new Array(b);x<b;x++)k[x]=v[x].fn;return k},l.prototype.listenerCount=function(h){var p=r?r+h:h,v=this._events[p];return v?v.fn?1:v.length:0},l.prototype.emit=function(h,p,v,x,b,k){var j=r?r+h:h;if(!this._events[j])return!1;var S=this._events[j],N=arguments.length,P,O;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),N){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,p),!0;case 3:return S.fn.call(S.context,p,v),!0;case 4:return S.fn.call(S.context,p,v,x),!0;case 5:return S.fn.call(S.context,p,v,x,b),!0;case 6:return S.fn.call(S.context,p,v,x,b,k),!0}for(O=1,P=new Array(N-1);O<N;O++)P[O-1]=arguments[O];S.fn.apply(S.context,P)}else{var A=S.length,_;for(O=0;O<A;O++)switch(S[O].once&&this.removeListener(h,S[O].fn,void 0,!0),N){case 1:S[O].fn.call(S[O].context);break;case 2:S[O].fn.call(S[O].context,p);break;case 3:S[O].fn.call(S[O].context,p,v);break;case 4:S[O].fn.call(S[O].context,p,v,x);break;default:if(!P)for(_=1,P=new Array(N-1);_<N;_++)P[_-1]=arguments[_];S[O].fn.apply(S[O].context,P)}}return!0},l.prototype.on=function(h,p,v){return o(this,h,p,v,!1)},l.prototype.once=function(h,p,v){return o(this,h,p,v,!0)},l.prototype.removeListener=function(h,p,v,x){var b=r?r+h:h;if(!this._events[b])return this;if(!p)return u(this,b),this;var k=this._events[b];if(k.fn)k.fn===p&&(!x||k.once)&&(!v||k.context===v)&&u(this,b);else{for(var j=0,S=[],N=k.length;j<N;j++)(k[j].fn!==p||x&&!k[j].once||v&&k[j].context!==v)&&S.push(k[j]);S.length?this._events[b]=S.length===1?S[0]:S:u(this,b)}return this},l.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&u(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(wv)),wv.exports}var W7=U7();const H7=Yg(W7);var $u=new H7,zg="recharts.syncEvent.tooltip",lS="recharts.syncEvent.brush",K7=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Tn(r))return e[r]}},G7={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},HC=rr({name:"options",initialState:G7,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),V7=HC.reducer,q7=HC.actions.createEventEmitter;function Q7(e){return e.tooltip.syncInteraction}var Y7={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},KC=rr({name:"chartData",initialState:Y7,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),O0=KC.actions,uS=O0.setChartData,X7=O0.setDataStartEndIndexes;O0.setComputedData;var Z7=KC.reducer,J7=["x","y"];function cS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cS(Object(r),!0).forEach(function(n){eW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eW(e,t,r){return(t=tW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tW(e){var t=rW(e,"string");return typeof t=="symbol"?t:t+""}function rW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nW(e,t){if(e==null)return{};var r,n,a=iW(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function iW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function aW(){var e=Ae(Dy),t=Ae(Ry),r=wt(),n=Ae(FP),a=Ae(yi),o=Bs(),u=Sh(),l=Ae(f=>f.rootProps.className);y.useEffect(()=>{if(e==null)return Fs;var f=(h,p,v)=>{if(t!==v&&e===h){if(p.payload.active===!1){r(au({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var x;if(u&&p!==null&&p!==void 0&&(x=p.payload)!==null&&x!==void 0&&x.coordinate&&p.payload.sourceViewBox){var b=p.payload.coordinate,k=b.x,j=b.y,S=nW(b,J7),N=p.payload.sourceViewBox,P=N.x,O=N.y,A=N.width,_=N.height,C=es(es({},S),{},{x:u.x+(A?(k-P)/A:0)*u.width,y:u.y+(_?(j-O)/_:0)*u.height});r(es(es({},p),{},{payload:es(es({},p.payload),{},{coordinate:C})}))}else r(p);return}if(a!=null){var I;if(typeof n=="function"){var U={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},B=n(a,U);I=a[B]}else n==="value"&&(I=a.find(me=>String(me.value)===p.payload.label));var G=p.payload.coordinate;if(G==null||u==null){r(au({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(I==null){r(au({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var q=G.x,R=G.y,de=Math.min(q,u.x+u.width),Z=Math.min(R,u.y+u.height),ge={x:o==="horizontal"?I.coordinate:de,y:o==="horizontal"?Z:I.coordinate},ke=au({active:p.payload.active,coordinate:ge,dataKey:p.payload.dataKey,index:String(I.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(ke)}}};return $u.on(zg,f),()=>{$u.off(zg,f)}},[l,r,t,e,n,a,o,u])}function oW(){var e=Ae(Dy),t=Ae(Ry),r=wt();y.useEffect(()=>{if(e==null)return Fs;var n=(a,o,u)=>{t!==u&&e===a&&r(X7(o))};return $u.on(lS,n),()=>{$u.off(lS,n)}},[r,t,e])}function sW(){var e=wt();y.useEffect(()=>{e(q7())},[e]),aW(),oW()}function lW(e,t,r,n,a,o){var u=Ae(k=>m7(k,e,t)),l=Ae(XU),f=Ae(Ry),h=Ae(Dy),p=Ae(FP),v=Ae(Q7),x=(v==null?void 0:v.sourceViewBox)!=null,b=Sh();y.useEffect(()=>{if(!x&&h!=null&&f!=null){var k=au({active:o,coordinate:r,dataKey:u,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:l});$u.emit(zg,h,k,f)}},[x,r,u,l,a,n,f,h,p,o,b])}function dS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dS(Object(r),!0).forEach(function(n){uW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uW(e,t,r){return(t=cW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cW(e){var t=dW(e,"string");return typeof t=="symbol"?t:t+""}function dW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fW(e,t){return vW(e)||mW(e,t)||pW(e,t)||hW()}function hW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pW(e,t){if(e){if(typeof e=="string")return hS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hS(e,t):void 0}}function hS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function vW(e){if(Array.isArray(e))return e}function gW(e){return e.dataKey}function yW(e,t){return y.isValidElement(e)?y.cloneElement(e,t):typeof e=="function"?y.createElement(e,t):y.createElement(lz,t)}var pS=[],xW={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function bW(e){var t,r,n=Qr(e,xW),a=n.active,o=n.allowEscapeViewBox,u=n.animationDuration,l=n.animationEasing,f=n.content,h=n.filterNull,p=n.isAnimationActive,v=n.offset,x=n.payloadUniqBy,b=n.position,k=n.reverseDirection,j=n.useTranslate3d,S=n.wrapperStyle,N=n.cursor,P=n.shared,O=n.trigger,A=n.defaultIndex,_=n.portal,C=n.axisId,I=wt(),U=typeof A=="number"?String(A):A;y.useEffect(()=>{I(aU({shared:P,trigger:O,axisId:C,active:a,defaultIndex:U}))},[I,P,O,C,a,U]);var B=Sh(),G=xP(),q=J9(P),R=(t=Ae(Oe=>y7(Oe,q,O,U)))!==null&&t!==void 0?t:{},de=R.activeIndex,Z=R.isActive,ge=Ae(Oe=>g7(Oe,q,O,U)),ke=Ae(Oe=>BC(Oe,q,O,U)),me=Ae(Oe=>v7(Oe,q,O,U)),Q=ge,oe=B7(),X=(r=a??Z)!==null&&r!==void 0?r:!1,$=yR([Q,X]),T=fW($,2),ee=T[0],ne=T[1],te=q==="axis"?ke:void 0;lW(q,O,me,te,de,X);var ue=_??oe;if(ue==null||B==null||q==null)return null;var pe=Q??pS;X||(pe=pS),h&&pe.length&&(pe=B4(pe.filter(Oe=>Oe.value!=null&&(Oe.hide!==!0||n.includeHidden)),x,gW));var Ce=pe.length>0,J=fS(fS({},n),{},{payload:pe,label:te,active:X,activeIndex:de,coordinate:me,accessibilityLayer:G}),je=y.createElement(Cz,{allowEscapeViewBox:o,animationDuration:u,animationEasing:l,isAnimationActive:p,active:X,coordinate:me,hasPayload:Ce,offset:v,position:b,reverseDirection:k,useTranslate3d:j,viewBox:B,wrapperStyle:S,lastBoundingBox:ee,innerRef:ne,hasPortalFromProps:!!_},yW(f,J));return y.createElement(y.Fragment,null,th.createPortal(je,ue),X&&y.createElement(F7,{cursor:N,tooltipEventType:q,coordinate:me,payload:pe,index:de}))}function wW(e,t,r){return(t=kW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kW(e){var t=jW(e,"string");return typeof t=="symbol"?t:t+""}function jW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class SW{constructor(t){wW(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function mS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function NW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mS(Object(r),!0).forEach(function(n){EW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EW(e,t,r){return(t=PW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PW(e){var t=AW(e,"string");return typeof t=="symbol"?t:t+""}function AW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CW={cacheSize:2e3,enableCache:!0},GC=NW({},CW),vS=new SW(GC.cacheSize),OW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},gS="recharts_measurement_span";function _W(e,t){var r=t.fontSize||"",n=t.fontFamily||"",a=t.fontWeight||"",o=t.fontStyle||"",u=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(o,"|").concat(u,"|").concat(l)}var yS=(e,t)=>{try{var r=document.getElementById(gS);r||(r=document.createElement("span"),r.setAttribute("id",gS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,OW,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},uu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Zu.isSsr)return{width:0,height:0};if(!GC.enableCache)return yS(t,r);var n=_W(t,r),a=vS.get(n);if(a)return a;var o=yS(t,r);return vS.set(n,o),o},VC;function Kf(e,t){return DW(e)||TW(e,t)||IW(e,t)||MW()}function MW(){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 IW(e,t){if(e){if(typeof e=="string")return xS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xS(e,t):void 0}}function xS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function TW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function DW(e){if(Array.isArray(e))return e}function RW(e,t,r){return(t=$W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $W(e){var t=LW(e,"string");return typeof t=="symbol"?t:t+""}function LW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,wS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,zW=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,FW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,BW={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},UW=["cm","mm","pt","pc","in","Q","px"];function WW(e){return UW.includes(e)}var ss="NaN";function HW(e,t){return e*BW[t]}class Ut{static parse(t){var r,n=(r=FW.exec(t))!==null&&r!==void 0?r:[],a=Kf(n,3),o=a[1],u=a[2];return o==null?Ut.NaN:new Ut(parseFloat(o),u??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Tn(t)&&(this.unit=""),r!==""&&!zW.test(r)&&(this.num=NaN,this.unit=""),WW(r)&&(this.num=HW(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Ut(NaN,""):new Ut(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Ut(NaN,""):new Ut(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ut(NaN,""):new Ut(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ut(NaN,""):new Ut(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Tn(this.num)}}VC=Ut;RW(Ut,"NaN",new VC(NaN,""));function qC(e){if(e==null||e.includes(ss))return ss;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=bS.exec(t))!==null&&r!==void 0?r:[],a=Kf(n,4),o=a[1],u=a[2],l=a[3],f=Ut.parse(o??""),h=Ut.parse(l??""),p=u==="*"?f.multiply(h):f.divide(h);if(p.isNaN())return ss;t=t.replace(bS,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var v,x=(v=wS.exec(t))!==null&&v!==void 0?v:[],b=Kf(x,4),k=b[1],j=b[2],S=b[3],N=Ut.parse(k??""),P=Ut.parse(S??""),O=j==="+"?N.add(P):N.subtract(P);if(O.isNaN())return ss;t=t.replace(wS,O.toString())}return t}var kS=/\(([^()]*)\)/;function KW(e){for(var t=e,r;(r=kS.exec(t))!=null;){var n=r,a=Kf(n,2),o=a[1];t=t.replace(kS,qC(o))}return t}function GW(e){var t=e.replace(/\s+/g,"");return t=KW(t),t=qC(t),t}function VW(e){try{return GW(e)}catch{return ss}}function kv(e){var t=VW(e.slice(5,-1));return t===ss?"":t}var qW=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],QW=["dx","dy","angle","className","breakAll"];function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fg.apply(null,arguments)}function jS(e,t){if(e==null)return{};var r,n,a=YW(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function YW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function SS(e,t){return eH(e)||JW(e,t)||ZW(e,t)||XW()}function XW(){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 ZW(e,t){if(e){if(typeof e=="string")return NS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?NS(e,t):void 0}}function NS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function JW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function eH(e){if(Array.isArray(e))return e}var QC=/[ \f\n\r\t\v\u2028\u2029]+/,YC=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];Kt(t)||(r?a=t.toString().split(""):a=t.toString().split(QC));var o=a.map(l=>({word:l,width:uu(l,n).width})),u=r?0:uu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function XC(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function tH(e){return Kt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var ZC=(e,t,r,n)=>e.reduce((a,o)=>{var u=o.word,l=o.width,f=a[a.length-1];if(f&&l!=null&&(t==null||n||f.width+l+r<Number(t)))f.words.push(u),f.width+=l+r;else{var h={words:[u],width:l};a.push(h)}return a},[]),JC=e=>e.reduce((t,r)=>t.width>r.width?t:r),rH="…",ES=(e,t,r,n,a,o,u,l)=>{var f=e.slice(0,t),h=YC({breakAll:r,style:n,children:f+rH});if(!h)return[!1,[]];var p=ZC(h.wordsWithComputedWidth,o,u,l),v=p.length>a||JC(p).width>Number(o);return[v,p]},nH=(e,t,r,n,a)=>{var o=e.maxLines,u=e.children,l=e.style,f=e.breakAll,h=Ne(o),p=String(u),v=ZC(t,n,r,a);if(!h||a)return v;var x=v.length>o||JC(v).width>Number(n);if(!x)return v;for(var b=0,k=p.length-1,j=0,S;b<=k&&j<=p.length-1;){var N=Math.floor((b+k)/2),P=N-1,O=ES(p,P,f,l,o,n,r,a),A=SS(O,2),_=A[0],C=A[1],I=ES(p,N,f,l,o,n,r,a),U=SS(I,1),B=U[0];if(!_&&!B&&(b=N+1),_&&B&&(k=N-1),!_&&B){S=C;break}j++}return S||v},PS=e=>{var t=Kt(e)?[]:e.toString().split(QC);return[{words:t,width:void 0}]},iH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!Zu.isSsr){var l,f,h=YC({breakAll:o,children:n,style:a});if(h){var p=h.wordsWithComputedWidth,v=h.spaceWidth;l=p,f=v}else return PS(n);return nH({breakAll:o,children:n,maxLines:u,style:a},l,f,t,!!r)}return PS(n)},eO="#808080",aH={angle:0,breakAll:!1,capHeight:"0.71em",fill:eO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},_0=y.forwardRef((e,t)=>{var r=Qr(e,aH),n=r.x,a=r.y,o=r.lineHeight,u=r.capHeight,l=r.fill,f=r.scaleToFit,h=r.textAnchor,p=r.verticalAnchor,v=jS(r,qW),x=y.useMemo(()=>iH({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:f,style:v.style,width:v.width}),[v.breakAll,v.children,v.maxLines,f,v.style,v.width]),b=v.dx,k=v.dy,j=v.angle,S=v.className,N=v.breakAll,P=jS(v,QW);if(!Dn(n)||!Dn(a)||x.length===0)return null;var O=Number(n)+(Ne(b)?b:0),A=Number(a)+(Ne(k)?k:0);if(!Be(O)||!Be(A))return null;var _;switch(p){case"start":_=kv("calc(".concat(u,")"));break;case"middle":_=kv("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=kv("calc(".concat(x.length-1," * -").concat(o,")"));break}var C=[],I=x[0];if(f&&I!=null){var U=I.width,B=v.width;C.push("scale(".concat(Ne(B)&&Ne(U)?B/U:1,")"))}return j&&C.push("rotate(".concat(j,", ").concat(O,", ").concat(A,")")),C.length&&(P.transform=C.join(" ")),y.createElement("text",Fg({},Gr(P),{ref:t,x:O,y:A,className:et("recharts-text",S),textAnchor:h,fill:l.includes("url")?eO:l}),x.map((G,q)=>{var R=G.words.join(N?"":" ");return y.createElement("tspan",{x:O,dy:q===0?_:o,key:"".concat(R,"-").concat(q)},R)}))});_0.displayName="Text";function AS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AS(Object(r),!0).forEach(function(n){oH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oH(e,t,r){return(t=sH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sH(e){var t=lH(e,"string");return typeof t=="symbol"?t:t+""}function lH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uH=e=>{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,u=Ny(t),l=u.x,f=u.y,h=u.height,p=u.upperWidth,v=u.lowerWidth,x=l,b=l+(p-v)/2,k=(x+b)/2,j=(p+v)/2,S=x+p/2,N=h>=0?1:-1,P=N*a,O=N>0?"end":"start",A=N>0?"start":"end",_=p>=0?1:-1,C=_*a,I=_>0?"end":"start",U=_>0?"start":"end",B=o;if(r==="top"){var G={x:x+p/2,y:f-P,horizontalAnchor:"middle",verticalAnchor:O};return B&&(G.height=Math.max(f-B.y,0),G.width=p),G}if(r==="bottom"){var q={x:b+v/2,y:f+h+P,horizontalAnchor:"middle",verticalAnchor:A};return B&&(q.height=Math.max(B.y+B.height-(f+h),0),q.width=v),q}if(r==="left"){var R={x:k-C,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"};return B&&(R.width=Math.max(R.x-B.x,0),R.height=h),R}if(r==="right"){var de={x:k+j+C,y:f+h/2,horizontalAnchor:U,verticalAnchor:"middle"};return B&&(de.width=Math.max(B.x+B.width-de.x,0),de.height=h),de}var Z=B?{width:j,height:h}:{};return r==="insideLeft"?jn({x:k+C,y:f+h/2,horizontalAnchor:U,verticalAnchor:"middle"},Z):r==="insideRight"?jn({x:k+j-C,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"},Z):r==="insideTop"?jn({x:x+p/2,y:f+P,horizontalAnchor:"middle",verticalAnchor:A},Z):r==="insideBottom"?jn({x:b+v/2,y:f+h-P,horizontalAnchor:"middle",verticalAnchor:O},Z):r==="insideTopLeft"?jn({x:x+C,y:f+P,horizontalAnchor:U,verticalAnchor:A},Z):r==="insideTopRight"?jn({x:x+p-C,y:f+P,horizontalAnchor:I,verticalAnchor:A},Z):r==="insideBottomLeft"?jn({x:b+C,y:f+h-P,horizontalAnchor:U,verticalAnchor:O},Z):r==="insideBottomRight"?jn({x:b+v-C,y:f+h-P,horizontalAnchor:I,verticalAnchor:O},Z):r&&typeof r=="object"&&(Ne(r.x)||oo(r.x))&&(Ne(r.y)||oo(r.y))?jn({x:l+da(r.x,j),y:f+da(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},Z):jn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},Z)},cH=["labelRef"],dH=["content"];function CS(e,t){if(e==null)return{};var r,n,a=fH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function fH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function OS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ou(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OS(Object(r),!0).forEach(function(n){hH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hH(e,t,r){return(t=pH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pH(e){var t=mH(e,"string");return typeof t=="symbol"?t:t+""}function mH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ri.apply(null,arguments)}var tO=y.createContext(null),vH=e=>{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,u=e.height,l=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:u}),[t,r,n,a,o,u]);return y.createElement(tO.Provider,{value:f},l)},rO=()=>{var e=y.useContext(tO),t=Sh();return e||(t?Ny(t):void 0)},gH=y.createContext(null),yH=()=>{var e=y.useContext(gH),t=Ae(KP);return e||t},xH=e=>{var t=e.value,r=e.formatter,n=Kt(e.children)?t:e.children;return typeof r=="function"?r(n):n},M0=e=>e!=null&&typeof e=="function",bH=(e,t)=>{var r=Wr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},wH=(e,t,r,n,a)=>{var o=e.offset,u=e.className,l=a.cx,f=a.cy,h=a.innerRadius,p=a.outerRadius,v=a.startAngle,x=a.endAngle,b=a.clockWise,k=(h+p)/2,j=bH(v,x),S=j>=0?1:-1,N,P;switch(t){case"insideStart":N=v+S*o,P=b;break;case"insideEnd":N=x-S*o,P=!b;break;case"end":N=x+S*o,P=b;break;default:throw new Error("Unsupported position ".concat(t))}P=j<=0?P:!P;var O=Ht(l,f,k,N),A=Ht(l,f,k,N+(P?1:-1)*359),_="M".concat(O.x,",").concat(O.y,`
A`).concat(k,",").concat(k,",0,1,").concat(P?0:1,`,
`).concat(A.x,",").concat(A.y),C=Kt(e.id)?ju("recharts-radial-line-"):e.id;return y.createElement("text",ri({},n,{dominantBaseline:"central",className:et("recharts-radial-bar-label",u)}),y.createElement("defs",null,y.createElement("path",{id:C,d:_})),y.createElement("textPath",{xlinkHref:"#".concat(C)},r))},kH=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,u=e.outerRadius,l=e.startAngle,f=e.endAngle,h=(l+f)/2;if(r==="outside"){var p=Ht(n,a,u+t,h),v=p.x,x=p.y;return{x:v,y:x,textAnchor:v>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,k=Ht(n,a,b,h),j=k.x,S=k.y;return{x:j,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Jd=e=>e!=null&&"cx"in e&&Ne(e.cx),jH={angle:0,offset:5,zIndex:or.label,position:"middle",textBreakAll:!1};function SH(e){if(!Jd(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function qi(e){var t=Qr(e,jH),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,u=t.children,l=t.content,f=t.className,h=f===void 0?"":f,p=t.textBreakAll,v=t.labelRef,x=yH(),b=rO(),k=a==="center"?b:x??b,j,S,N;r==null?j=k:Jd(r)?j=r:j=Ny(r);var P=SH(j);if(!j||Kt(o)&&Kt(u)&&!y.isValidElement(l)&&typeof l!="function")return null;var O=ou(ou({},t),{},{viewBox:j});if(y.isValidElement(l)){O.labelRef;var A=CS(O,cH);return y.cloneElement(l,A)}if(typeof l=="function"){O.content;var _=CS(O,dH);if(S=y.createElement(l,_),y.isValidElement(S))return S}else S=xH(t);var C=Gr(t);if(Jd(j)){if(a==="insideStart"||a==="insideEnd"||a==="end")return wH(t,a,S,C,j);N=kH(j,t.offset,t.position)}else{if(!P)return null;var I=uH({viewBox:P,position:a,offset:t.offset,parentViewBox:Jd(n)?void 0:n});N=ou(ou({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return y.createElement(xi,{zIndex:t.zIndex},y.createElement(_0,ri({ref:v,className:et("recharts-label",h)},C,N,{textAnchor:XC(C.textAnchor)?C.textAnchor:N.textAnchor,breakAll:p}),S))}qi.displayName="Label";var NH=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(qi,ri({key:"label-implicit"},n)):Dn(e)?y.createElement(qi,ri({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===qi?y.cloneElement(e,ou({key:"label-implicit"},n)):y.createElement(qi,ri({key:"label-implicit",content:e},n)):M0(e)?y.createElement(qi,ri({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(qi,ri({},e,{key:"label-implicit"},n)):null};function EH(e){var t=e.label,r=e.labelRef,n=rO();return NH(t,n,r)||null}var PH=["valueAccessor"],AH=["dataKey","clockWise","id","textBreakAll","zIndex"];function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gf.apply(null,arguments)}function _S(e,t){if(e==null)return{};var r,n,a=CH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function CH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var OH=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(tH(t))return t},nO=y.createContext(void 0),_H=nO.Provider,iO=y.createContext(void 0);iO.Provider;function MH(){return y.useContext(nO)}function IH(){return y.useContext(iO)}function ef(e){var t=e.valueAccessor,r=t===void 0?OH:t,n=_S(e,PH),a=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,l=n.zIndex,f=_S(n,AH),h=MH(),p=IH(),v=h||p;return!v||!v.length?null:y.createElement(xi,{zIndex:l??or.label},y.createElement(Vr,{className:"recharts-label-list"},v.map((x,b)=>{var k,j=Kt(a)?r(x,b):Tt(x.payload,a),S=Kt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(qi,Gf({key:"label-".concat(b)},Gr(x),f,S,{fill:(k=n.fill)!==null&&k!==void 0?k:x.fill,parentViewBox:x.parentViewBox,value:j,textBreakAll:u,viewBox:x.viewBox,index:b,zIndex:0}))})))}ef.displayName="LabelList";function TH(e){var t=e.label;return t?t===!0?y.createElement(ef,{key:"labelList-implicit"}):y.isValidElement(t)||M0(t)?y.createElement(ef,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(ef,Gf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bg.apply(null,arguments)}var aO=e=>{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=et("recharts-dot",a);return Ne(t)&&Ne(r)&&Ne(n)?y.createElement("circle",Bg({},dn(e),my(e),{className:o,cx:t,cy:r,r:n})):null},DH={radiusAxis:{},angleAxis:{}},oO=rr({name:"polarAxis",initialState:DH,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),Vh=oO.actions;Vh.addRadiusAxis;Vh.removeRadiusAxis;Vh.addAngleAxis;Vh.removeAngleAxis;var RH=oO.reducer;function $H(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var sO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function MS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function IS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MS(Object(r),!0).forEach(function(n){LH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LH(e,t,r){return(t=zH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zH(e){var t=FH(e,"string");return typeof t=="symbol"?t:t+""}function FH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lO(e,t){return IS(IS({},t),e)}function BH(e){return y.isValidElement(e)?e.props:e}function UH(e,t){return y.cloneElement(e,lO(BH(e),t))}function WH(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function HH(e){return"isActive"in e&&e.isActive===!0}function KH(e){var t=e.option,r=e.DefaultShape,n=e.shapeProps,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,u=e.inActiveClassName,l=u===void 0?"recharts-shape":u,f=WH(n),h;return y.isValidElement(t)?h=UH(t,n):t===r?h=y.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=y.createElement(r,lO(t,n)):h=y.createElement(r,n),HH(n)?y.createElement(Vr,{className:o},h):y.createElement(Vr,{className:l},h)}function GH(e){var t=e.tooltipEntrySettings,r=wt(),n=wr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(rU(t)):a.current!==t&&r(nU({prev:a.current,next:t})),a.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{a.current&&(r(iU(a.current)),a.current=null)},[r]),null}function VH(e){var t=e.legendPayload,r=wt(),n=wr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(OL(t)):a.current!==t&&r(_L({prev:a.current,next:t})),a.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{a.current&&(r(ML(a.current)),a.current=null)},[r]),null}function qH(e,t){return ZH(e)||XH(e,t)||YH(e,t)||QH()}function QH(){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 YH(e,t){if(e){if(typeof e=="string")return TS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?TS(e,t):void 0}}function TS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function XH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function ZH(e){if(Array.isArray(e))return e}var I0="index",JH="append";function T0(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var o=0;o<t.length;o++){var u=e[o],l=t[o];u!=null?n.push({status:"matched",prev:u,next:l}):n.push({status:"added",next:l})}return n}function eK(e,t){var r=e.length/t.length,n=t.map((a,o)=>e[Math.floor(o*r)]);return T0(n,t)}function tK(e,t){var r=t.map((n,a)=>e[a]);return T0(r,t)}function rK(e,t){for(var r=new Map,n=0;n<e.length;n++){var a=e[n];if(a!=null){var o=t(a,n);o!=null&&!r.has(o)&&r.set(o,a)}}return r}function nK(e,t,r){var n=rK(e,r),a=new Set,o=t.map((v,x)=>{var b=r(v,x);if(b!=null){var k=n.get(b);if(k!==void 0)return a.add(b),k}}),u=[];for(var l of n){var f=qH(l,2),h=f[0],p=f[1];a.has(h)||u.push(p)}return T0(o,t,u)}function Ug(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===I0?eK(e,t):r===JH?tK(e,t):nK(e,t,r)}function uO(e,t){var r=y.useRef(e),n=y.useRef(t.current),a=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=y.useCallback(function(u,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(l===0){a.current=!0;return}l===1&&(n.current=u),l>0&&a.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function iK(e,t){return lK(e)||sK(e,t)||oK(e,t)||aK()}function aK(){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 oK(e,t){if(e){if(typeof e=="string")return DS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?DS(e,t):void 0}}function DS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function sK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function lK(e){if(Array.isArray(e))return e}function uK(e,t){var r=y.useState(!1),n=iK(r,2),a=n[0],o=n[1],u=y.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),l=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:u,handleAnimationEnd:l}}function cK(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,u=e.isAnimationActive,l=e.animationBegin,f=e.animationDuration,h=e.animationEasing,p=e.onAnimationStart,v=e.onAnimationEnd,x=e.animationInterpolateFn,b=e.animationMatchBy,k=e.shouldUpdatePreviousRef,j=e.children,S=e.layout,N=SP(r,n),P=uO(N,o),O=(t=P.startValue)!==null&&t!==void 0?t:null,A=Ug(O,a,b??I0);return y.createElement(jP,{animationId:N,begin:l,duration:f,isActive:u,easing:h,onAnimationEnd:v,onAnimationStart:p,key:N},_=>{var C=O==null,I=a==null?a:x(A,_,S),U=k?k(_):_>0;return P.syncStepValue(I,_,U),I==null?null:j(I,_,C)})}var jv;function dK(e,t){return mK(e)||pK(e,t)||hK(e,t)||fK()}function fK(){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 hK(e,t){if(e){if(typeof e=="string")return RS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?RS(e,t):void 0}}function RS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function pK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function mK(e){if(Array.isArray(e))return e}var vK=()=>{var e=y.useState(()=>ju("uid-")),t=dK(e,1),r=t[0];return r},cO=(jv=eh.useId)!==null&&jv!==void 0?jv:vK;function gK(e,t){var r=cO();return t||(e?"".concat(e,"-").concat(r):r)}var yK=y.createContext(void 0),xK=e=>{var t=e.id,r=e.type,n=e.children,a=gK("recharts-".concat(r),t);return y.createElement(yK.Provider,{value:a},n(a))},bK={cartesianItems:[],polarItems:[]},dO=rr({name:"graphicalItems",initialState:bK,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:at()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:at()},removeCartesianGraphicalItem:{reducer(e,t){var r=Hr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:at()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:at()},removePolarGraphicalItem:{reducer(e,t){var r=Hr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:at()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=Hr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:at()}}}),Ys=dO.actions,wK=Ys.addCartesianGraphicalItem,kK=Ys.replaceCartesianGraphicalItem,jK=Ys.removeCartesianGraphicalItem;Ys.addPolarGraphicalItem;Ys.removePolarGraphicalItem;Ys.replacePolarGraphicalItem;var SK=dO.reducer,NK=e=>{var t=wt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(wK(e)):r.current!==e&&t(kK({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(jK(r.current)),r.current=null)},[t]),null},EK=y.memo(NK),PK=["points"];function $S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Sv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$S(Object(r),!0).forEach(function(n){AK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$S(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AK(e,t,r){return(t=CK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CK(e){var t=OK(e,"string");return typeof t=="symbol"?t:t+""}function OK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;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 r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vf.apply(null,arguments)}function _K(e,t){if(e==null)return{};var r,n,a=MK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function MK(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function IK(e){var t=e.option,r=e.dotProps,n=e.className;if(y.isValidElement(t))return y.cloneElement(t,r);if(typeof t=="function")return t(r);var a=et(n,typeof t!="boolean"?t.className:""),o=r??{};o.points;var u=_K(o,PK);return y.createElement(aO,Vf({},u,{className:a}))}function TK(e,t){return e==null?!1:t?!0:e.length===1}function DK(e){var t=e.points,r=e.dot,n=e.className,a=e.dotClassName,o=e.dataKey,u=e.baseProps,l=e.needClip,f=e.clipPathId,h=e.zIndex,p=h===void 0?or.scatter:h;if(!TK(t,r))return null;var v=sO(r),x=vD(r),b=t.map((j,S)=>{var N,P,O=Sv(Sv(Sv({r:3},u),x),{},{index:S,cx:(N=j.x)!==null&&N!==void 0?N:void 0,cy:(P=j.y)!==null&&P!==void 0?P:void 0,dataKey:o,value:j.value,payload:j.payload,points:t});return y.createElement(IK,{key:"dot-".concat(S),option:r,dotProps:O,className:a})}),k={};return l&&f!=null&&(k.clipPath="url(#clipPath-".concat(v?"":"dots-").concat(f,")")),y.createElement(xi,{zIndex:p},y.createElement(Vr,Vf({className:n},k),b))}function LS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LS(Object(r),!0).forEach(function(n){RK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RK(e,t,r){return(t=$K(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $K(e){var t=LK(e,"string");return typeof t=="symbol"?t:t+""}function LK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fO=0,zK={xAxis:{},yAxis:{},zAxis:{}},hO=rr({name:"cartesianAxis",initialState:zK,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:at()},replaceXAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.xAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.xAxis[n.id],e.xAxis[a.id]=a)},prepare:at()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:at()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:at()},replaceYAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.yAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.yAxis[n.id],e.yAxis[a.id]=a)},prepare:at()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:at()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:at()},replaceZAxis:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next;e.zAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.zAxis[n.id],e.zAxis[a.id]=a)},prepare:at()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:at()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,a=r.width,o=e.yAxis[n];if(o){var u,l=o.widthHistory||[];if(l.length===3&&l[0]===l[2]&&a===l[1]&&a!==o.width&&Math.abs(a-((u=l[0])!==null&&u!==void 0?u:0))<=1)return;var f=[...l,a].slice(-3);e.yAxis[n]=zS(zS({},o),{},{width:a,widthHistory:f})}}}}),Fn=hO.actions,FK=Fn.addXAxis,BK=Fn.replaceXAxis,UK=Fn.removeXAxis,WK=Fn.addYAxis,HK=Fn.replaceYAxis,KK=Fn.removeYAxis;Fn.addZAxis;Fn.replaceZAxis;Fn.removeZAxis;var GK=Fn.updateYAxisWidth,VK=hO.reducer,qK=K([Vt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),QK=K([qK,hi,pi],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),D0=()=>Ae(QK),YK=()=>Ae(r7);function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FS(Object(r),!0).forEach(function(n){XK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XK(e,t,r){return(t=ZK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZK(e){var t=JK(e,"string");return typeof t=="symbol"?t:t+""}function JK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eG=e=>{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,u=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var l={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Nv(Nv(Nv({},l),oh(a)),my(a)),h;return y.isValidElement(a)?h=y.cloneElement(a,f):typeof a=="function"?h=a(f):h=y.createElement(aO,f),y.createElement(Vr,{className:"recharts-active-dot",clipPath:u},h)};function BS(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,u=e.zIndex,l=u===void 0?or.activeDot:u,f=Ae(Ru),h=YK();if(t==null||h==null)return null;var p=t.find(v=>h.includes(v.payload));return Kt(p)?null:y.createElement(xi,{zIndex:l},y.createElement(eG,{point:p,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var tG=e=>{var t=e.chartData,r=wt(),n=wr();return y.useEffect(()=>n?()=>{}:(r(uS(t)),()=>{r(uS(void 0))}),[t,r,n]),null},US={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},pO=rr({name:"brush",initialState:US,reducers:{setBrushSettings(e,t){return t.payload==null?US:t.payload}}});pO.actions.setBrushSettings;var rG=pO.reducer;function nG(e){return(e%180+180)%180}var iG=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=nG(a),u=o*Math.PI/180,l=Math.atan(n/r),f=u>l&&u<Math.PI-l?n/Math.sin(u):r/Math.cos(u);return Math.abs(f)},aG={dots:[],areas:[],lines:[]},mO=rr({name:"referenceElements",initialState:aG,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Hr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Hr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Hr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),Xs=mO.actions;Xs.addDot;Xs.removeDot;Xs.addArea;Xs.removeArea;Xs.addLine;Xs.removeLine;var oG=mO.reducer;function sG(e,t){return dG(e)||cG(e,t)||uG(e,t)||lG()}function lG(){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 uG(e,t){if(e){if(typeof e=="string")return WS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?WS(e,t):void 0}}function WS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function dG(e){if(Array.isArray(e))return e}var fG=y.createContext(void 0),hG=e=>{var t=e.children,r=y.useState("".concat(ju("recharts"),"-clip")),n=sG(r,1),a=n[0],o=D0();if(o==null)return null;var u=o.x,l=o.y,f=o.width,h=o.height;return y.createElement(fG.Provider,{value:a},y.createElement("defs",null,y.createElement("clipPath",{id:a},y.createElement("rect",{x:u,y:l,height:h,width:f}))),t)};function vO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var a=e[n];a!==void 0&&r.push(a)}return r}function pG(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return iG(n,r)}function mG(e,t,r){var n=r==="width",a=e.x,o=e.y,u=e.width,l=e.height;return t===1?{start:n?a:o,end:n?a+u:o+l}:{start:n?a+u:o+l,end:n?a:o}}function Lu(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-a)<=0}function vG(e,t){return vO(e,t+1)}function gG(e,t,r,n,a){for(var o=(n||[]).slice(),u=t.start,l=t.end,f=0,h=1,p=u,v=function(){var k=n==null?void 0:n[f];if(k===void 0)return{v:vO(n,h)};var j=f,S,N=()=>(S===void 0&&(S=r(k,j)),S),P=k.coordinate,O=f===0||Lu(e,P,N,p,l);O||(f=0,p=u,h+=1),O&&(p=P+e*(N()/2+a),f+=h)},x;h<=o.length;)if(x=v(),x)return x.v;return[]}function yG(e,t,r,n,a){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var l=t.start,f=t.end,h=1;h<=u;h++){for(var p=(u-1)%h,v=l,x=!0,b=function(){var A=n[j];if(A==null)return 0;var _=j,C,I=()=>(C===void 0&&(C=r(A,_)),C),U=A.coordinate,B=j===p||Lu(e,U,I,v,f);if(!B)return x=!1,1;B&&(v=U+e*(I()/2+a))},k,j=p;j<u&&(k=b(),!(k!==0&&k===1));j+=h);if(x){for(var S=[],N=p;N<u;N+=h){var P=n[N];P!=null&&S.push(P)}return S}}return[]}function HS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HS(Object(r),!0).forEach(function(n){xG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xG(e,t,r){return(t=bG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bG(e){var t=wG(e,"string");return typeof t=="symbol"?t:t+""}function wG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kG(e,t,r,n,a){for(var o=(n||[]).slice(),u=o.length,l=t.start,f=t.end,h=function(x){var b=o[x];if(b==null)return 1;var k=b,j,S=()=>(j===void 0&&(j=r(b,x)),j);if(x===u-1){var N=e*(k.coordinate+e*S()/2-f);o[x]=k=er(er({},k),{},{tickCoord:N>0?k.coordinate-N*e:k.coordinate})}else o[x]=k=er(er({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var P=Lu(e,k.tickCoord,S,l,f);P&&(f=k.tickCoord-e*(S()/2+a),o[x]=er(er({},k),{},{isShow:!0}))}},p=u-1;p>=0;p--)h(p);return o}function jG(e,t,r,n,a,o){var u=(n||[]).slice(),l=u.length,f=t.start,h=t.end;if(o){var p=n[l-1];if(p!=null){var v=r(p,l-1),x=e*(p.coordinate+e*v/2-h);if(u[l-1]=p=er(er({},p),{},{tickCoord:x>0?p.coordinate-x*e:p.coordinate}),p.tickCoord!=null){var b=Lu(e,p.tickCoord,()=>v,f,h);b&&(h=p.tickCoord-e*(v/2+a),u[l-1]=er(er({},p),{},{isShow:!0}))}}}for(var k=o?l-1:l,j=function(P){var O=u[P];if(O==null)return 1;var A=O,_,C=()=>(_===void 0&&(_=r(O,P)),_);if(P===0){var I=e*(A.coordinate-e*C()/2-f);u[P]=A=er(er({},A),{},{tickCoord:I<0?A.coordinate-I*e:A.coordinate})}else u[P]=A=er(er({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var U=Lu(e,A.tickCoord,C,f,h);U&&(f=A.tickCoord+e*(C()/2+a),u[P]=er(er({},A),{},{isShow:!0}))}},S=0;S<k;S++)j(S);return u}function R0(e,t,r){var n=e.tick,a=e.ticks,o=e.viewBox,u=e.minTickGap,l=e.orientation,f=e.interval,h=e.tickFormatter,p=e.unit,v=e.angle;if(!a||!a.length||!n)return[];if(Ne(f)||Zu.isSsr){var x;return(x=vG(a,Ne(f)?f:0))!==null&&x!==void 0?x:[]}var b=[],k=l==="top"||l==="bottom"?"width":"height",j=p&&k==="width"?uu(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},S=(_,C)=>{var I=typeof h=="function"?h(_.value,C):_.value;return k==="width"?pG(uu(I,{fontSize:t,letterSpacing:r}),j,v):uu(I,{fontSize:t,letterSpacing:r})[k]},N=a[0],P=a[1],O=a.length>=2&&N!=null&&P!=null?Wr(P.coordinate-N.coordinate):1,A=mG(o,O,k);return f==="equidistantPreserveStart"?gG(O,A,S,a,u):f==="equidistantPreserveEnd"?yG(O,A,S,a,u):(f==="preserveStart"||f==="preserveStartEnd"?b=jG(O,A,S,a,u,f==="preserveStartEnd"):b=kG(O,A,S,a,u),b.filter(_=>_.isShow))}var SG=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,u=o===void 0?0:o,l=e.tickMargin,f=l===void 0?0:l,h=0;if(t){Array.from(t).forEach(b=>{if(b){var k=b.getBoundingClientRect();k.width>h&&(h=k.width)}});var p=r?r.getBoundingClientRect().width:0,v=u+f,x=h+v+p+(r?a:0);return Math.round(x)}return 0},NG={xAxis:{},yAxis:{}},gO=rr({name:"renderedTicks",initialState:NG,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,o=r.ticks;e[n][a]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),yO=gO.actions,EG=yO.setRenderedTicks,PG=yO.removeRenderedTicks,AG=gO.reducer,CG=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function KS(e,t){return IG(e)||MG(e,t)||_G(e,t)||OG()}function OG(){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 _G(e,t){if(e){if(typeof e=="string")return GS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}function GS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function MG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function IG(e){if(Array.isArray(e))return e}function TG(e,t){if(e==null)return{};var r,n,a=DG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function DG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ho(){return ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ho.apply(null,arguments)}function VS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VS(Object(r),!0).forEach(function(n){RG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RG(e,t,r){return(t=$G(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $G(e){var t=LG(e,"string");return typeof t=="symbol"?t:t+""}function LG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var li={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",zIndex:or.axis};function zG(e){var t=e.x,r=e.y,n=e.width,a=e.height,o=e.orientation,u=e.mirror,l=e.axisLine,f=e.otherSvgProps;if(!l)return null;var h=mt(mt(mt({},f),dn(l)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!u||o==="bottom"&&u);h=mt(mt({},h),{},{x1:t,y1:r+p*a,x2:t+n,y2:r+p*a})}else{var v=+(o==="left"&&!u||o==="right"&&u);h=mt(mt({},h),{},{x1:t+v*n,y1:r,x2:t+v*n,y2:r+a})}return y.createElement("line",ho({},h,{className:et("recharts-cartesian-axis-line",go(l,"className"))}))}function FG(e,t,r,n,a,o,u,l,f){var h,p,v,x,b,k,j=l?-1:1,S=e.tickSize||u,N=Ne(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,x=r+ +!l*a,v=x-j*S,k=v-j*f,b=N;break;case"left":v=x=e.coordinate,p=t+ +!l*n,h=p-j*S,b=h-j*f,k=N;break;case"right":v=x=e.coordinate,p=t+ +l*n,h=p+j*S,b=h+j*f,k=N;break;default:h=p=e.coordinate,x=r+ +l*a,v=x+j*S,k=v+j*f,b=N;break}return{line:{x1:h,y1:v,x2:p,y2:x},tick:{x:b,y:k}}}function BG(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function UG(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function WG(e){var t=e.option,r=e.tickProps,n=e.value,a,o=et(r.className,"recharts-cartesian-axis-tick-value");if(y.isValidElement(t))a=y.cloneElement(t,mt(mt({},r),{},{className:o}));else if(typeof t=="function")a=t(mt(mt({},r),{},{className:o}));else{var u="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(u=et(u,$H(t))),a=y.createElement(_0,ho({},r,{className:u}),n)}return a}function HG(e){var t=e.ticks,r=e.axisType,n=e.axisId,a=wt();return y.useEffect(()=>{if(n==null||r==null)return Fs;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return a(EG({ticks:o,axisId:n,axisType:r})),()=>{a(PG({axisId:n,axisType:r}))}},[a,t,n,r]),null}var KG=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,u=e.stroke,l=e.tickFormatter,f=e.unit,h=e.padding,p=e.tickTextProps,v=e.orientation,x=e.mirror,b=e.x,k=e.y,j=e.width,S=e.height,N=e.tickSize,P=e.tickMargin,O=e.fontSize,A=e.letterSpacing,_=e.getTicksConfig,C=e.events,I=e.axisType,U=e.axisId,B=R0(mt(mt({},_),{},{ticks:n}),O,A),G=dn(_),q=oh(a),R=XC(G.textAnchor)?G.textAnchor:BG(v,x),de=UG(v,x),Z={};typeof o=="object"&&(Z=o);var ge=mt(mt({},G),{},{fill:"none"},Z),ke=B.map(oe=>mt({entry:oe},FG(oe,b,k,j,S,v,N,x,P))),me=ke.map(oe=>{var X=oe.entry,$=oe.line;return y.createElement(Vr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},o&&y.createElement("line",ho({},ge,$,{className:et("recharts-cartesian-axis-tick-line",go(o,"className"))})))}),Q=ke.map((oe,X)=>{var $,T,ee=oe.entry,ne=oe.tick,te=mt(mt(mt(mt({verticalAnchor:de},G),{},{textAnchor:R,stroke:"none",fill:u},ne),{},{index:X,payload:ee,visibleTicksCount:B.length,tickFormatter:l,padding:h},p),{},{angle:($=(T=p==null?void 0:p.angle)!==null&&T!==void 0?T:G.angle)!==null&&$!==void 0?$:0}),ue=mt(mt({},te),q);return y.createElement(Vr,ho({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(ee.value,"-").concat(ee.coordinate,"-").concat(ee.tickCoord)},QD(C,ee,X)),a&&y.createElement(WG,{option:a,tickProps:ue,value:"".concat(typeof l=="function"?l(ee.value,X):ee.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(I,"-ticks")},y.createElement(HG,{ticks:B,axisId:U,axisType:I}),Q.length>0&&y.createElement(xi,{zIndex:or.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(I,"-tick-labels"),ref:t},Q)),me.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(I,"-tick-lines")},me))}),GG=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,u=e.hide,l=e.ticks,f=e.axisType,h=e.axisId,p=TG(e,CG),v=y.useState(""),x=KS(v,2),b=x[0],k=x[1],j=y.useState(""),S=KS(j,2),N=S[0],P=S[1],O=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return SG({ticks:O.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var A=y.useCallback(_=>{if(_){var C=_.getElementsByClassName("recharts-cartesian-axis-tick-value");O.current=C;var I=C[0];if(I){var U=window.getComputedStyle(I),B=U.fontSize,G=U.letterSpacing;(B!==b||G!==N)&&(k(B),P(G))}}},[b,N]);return u||n!=null&&n<=0||a!=null&&a<=0?null:y.createElement(xi,{zIndex:e.zIndex},y.createElement(Vr,{className:et("recharts-cartesian-axis",o)},y.createElement(zG,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:dn(e)}),y.createElement(KG,{ref:A,axisType:f,events:p,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(vH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(EH,{label:e.label,labelRef:e.labelRef}),e.children)))}),$0=y.forwardRef((e,t)=>{var r=Qr(e,li);return y.createElement(GG,ho({},r,{ref:t}))});$0.displayName="CartesianAxis";var VG=["x1","y1","x2","y2","key"],qG=["offset"],QG=["xAxisId","yAxisId"],YG=["xAxisId","yAxisId"];function qS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qS(Object(r),!0).forEach(function(n){XG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XG(e,t,r){return(t=ZG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZG(e){var t=JG(e,"string");return typeof t=="symbol"?t:t+""}function JG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ha.apply(null,arguments)}function qf(e,t){if(e==null)return{};var r,n,a=eV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function eV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var tV=e=>{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.ry;return y.createElement("rect",{x:n,y:a,ry:l,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function xO(e){var t=e.option,r=e.lineItemProps,n;if(y.isValidElement(t))n=y.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,u=r.y1,l=r.x2,f=r.y2,h=r.key,p=qf(r,VG),v=(a=dn(p))!==null&&a!==void 0?a:{};v.offset;var x=qf(v,qG);n=y.createElement("line",Ha({},x,{x1:o,y1:u,x2:l,y2:f,fill:"none",key:h}))}return n}function rV(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,o=e.horizontalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=qf(e,QG),l=o.map((f,h)=>{var p=tr(tr({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(xO,{key:"line-".concat(h),option:a,lineItemProps:p})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function nV(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,o=e.verticalPoints;if(!a||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=qf(e,YG),l=o.map((f,h)=>{var p=tr(tr({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(xO,{option:a,lineItemProps:p,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function iV(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,u=e.height,l=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||l==null)return null;var p=l.map(x=>Math.round(x+a-a)).sort((x,b)=>x-b);a!==p[0]&&p.unshift(0);var v=p.map((x,b)=>{var k=p[b+1],j=k==null,S=j?a+u-x:k-x;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:x,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},v)}function aV(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,u=e.y,l=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var p=h.map(x=>Math.round(x+o-o)).sort((x,b)=>x-b);o!==p[0]&&p.unshift(0);var v=p.map((x,b)=>{var k=p[b+1],j=k==null,S=j?o+l-x:k-x;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},v)}var oV=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return JE(R0(tr(tr(tr({},li),r),{},{ticks:eP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},sV=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return JE(R0(tr(tr(tr({},li),r),{},{ticks:eP(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},lV={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:or.grid};function bO(e){var t=lP(),r=uP(),n=sP(),a=tr(tr({},Qr(e,lV)),{},{x:Ne(e.x)?e.x:n.left,y:Ne(e.y)?e.y:n.top,width:Ne(e.width)?e.width:n.width,height:Ne(e.height)?e.height:n.height}),o=a.xAxisId,u=a.yAxisId,l=a.x,f=a.y,h=a.width,p=a.height,v=a.syncWithTicks,x=a.horizontalValues,b=a.verticalValues,k=wr(),j=Ae(B=>Yj(B,"xAxis",o,k)),S=Ae(B=>Yj(B,"yAxis",u,k));if(!Rn(h)||!Rn(p)||!Ne(l)||!Ne(f))return null;var N=a.verticalCoordinatesGenerator||oV,P=a.horizontalCoordinatesGenerator||sV,O=a.horizontalPoints,A=a.verticalPoints;if((!O||!O.length)&&typeof P=="function"){var _=x&&x.length,C=P({yAxis:S?tr(tr({},S),{},{ticks:_?x:S.ticks}):void 0,width:t??h,height:r??p,offset:n},_?!0:v);bf(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(O=C)}if((!A||!A.length)&&typeof N=="function"){var I=b&&b.length,U=N({xAxis:j?tr(tr({},j),{},{ticks:I?b:j.ticks}):void 0,width:t??h,height:r??p,offset:n},I?!0:v);bf(Array.isArray(U),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof U,"]")),Array.isArray(U)&&(A=U)}return y.createElement(xi,{zIndex:a.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(tV,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),y.createElement(iV,Ha({},a,{horizontalPoints:O})),y.createElement(aV,Ha({},a,{verticalPoints:A})),y.createElement(rV,Ha({},a,{offset:n,horizontalPoints:O,xAxis:j,yAxis:S})),y.createElement(nV,Ha({},a,{offset:n,verticalPoints:A,xAxis:j,yAxis:S}))))}bO.displayName="CartesianGrid";var uV={},wO=rr({name:"errorBars",initialState:uV,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===a.dataKey&&u.direction===a.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==a.dataKey||o.direction!==a.direction))}}}),L0=wO.actions;L0.addErrorBar;L0.replaceErrorBar;L0.removeErrorBar;var cV=wO.reducer;function kO(e,t){var r,n,a=Ae(h=>vi(h,e)),o=Ae(h=>gi(h,t)),u=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:St.allowDataOverflow,l=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Nt.allowDataOverflow,f=u||l;return{needClip:f,needClipX:u,needClipY:l}}function dV(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=D0(),o=kO(t,r),u=o.needClipX,l=o.needClipY,f=o.needClip,h=Ae(O=>oC(O,t,!1)),p=Ae(O=>sC(O,r,!1));if(!f||!a)return null;var v=a.x,x=a.y,b=a.width,k=a.height,j=u&&h?Math.min(h[0],h[1]):v-b/2,S=l&&p?Math.min(p[0],p[1]):x-k/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,P=l&&p?Math.abs(p[1]-p[0]):k*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:j,y:S,width:N,height:P}))}function fV(e){var t=oh(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,u=Number(a),l=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(l)||l<0)&&(l=n),{r:u,strokeWidth:l}}return{r,strokeWidth:n}}function z0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:fO}function F0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:fO}var jO=(e,t,r)=>mC(e,"xAxis",z0(e,t),r),SO=(e,t,r)=>pC(e,"xAxis",z0(e,t),r),NO=(e,t,r)=>mC(e,"yAxis",F0(e,t),r),EO=(e,t,r)=>pC(e,"yAxis",F0(e,t),r),hV=K([ut,jO,NO,SO,EO],(e,t,r,n,a)=>zn(e,"xAxis")?xf(t,n,!1):xf(r,a,!1)),pV=(e,t)=>t,PO=K([TA,pV],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),AO=e=>{var t=ut(e),r=zn(t,"xAxis");return r?"yAxis":"xAxis"},mV=(e,t)=>{var r=AO(e);return r==="yAxis"?F0(e,t):z0(e,t)},vV=(e,t,r)=>HA(e,AO(e),mV(e,t),r),gV=K([PO,vV],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=Fy(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(l=>l.key===a);if(u!=null)return u.map(l=>[l[0],l[1]])}}}),yV=K([ut,jO,NO,SO,EO,gV,U6,hV,PO,aF],(e,t,r,n,a,o,u,l,f,h)=>{var p=u.chartData,v=u.dataStartIndex,x=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||l==null)){var b=f.data,k;if(b&&b.length>0?k=b:k=p==null?void 0:p.slice(v,x+1),k!=null)return HV({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:v,areaSettings:f,stackedData:o,displayedData:k,chartBaseValue:h,bandSize:l})}}),xV=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],bV=["id","baseLine"];function cu(){return cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cu.apply(null,arguments)}function QS(e,t){if(e==null)return{};var r,n,a=wV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function wV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function kV(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,u=e.strokeWidth,l=(t=o[0])===null||t===void 0?void 0:t.x,f=(r=o[o.length-1])===null||r===void 0?void 0:r.x;if(!Be(l)||!Be(f))return null;var h=n*Math.abs(l-f),p=Math.max(...o.map(v=>v.y||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(v=>v.y||0),p)),Ne(p)?y.createElement("rect",{x:l<f?l:l-h,y:0,width:h,height:Math.floor(p+(u?parseInt("".concat(u),10):1))}):null}function jV(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,u=e.strokeWidth,l=(t=o[0])===null||t===void 0?void 0:t.y,f=(r=o[o.length-1])===null||r===void 0?void 0:r.y;if(!Be(l)||!Be(f))return null;var h=n*Math.abs(l-f),p=Math.max(...o.map(v=>v.x||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(v=>v.x||0),p)),Ne(p)?y.createElement("rect",{x:0,y:l<f?l:l-h,width:p+(u?parseInt("".concat(u),10):1),height:Math.floor(h)}):null}function SV(e){var t=e.alpha,r=e.layout,n=e.points,a=e.baseLine,o=e.strokeWidth;return r==="vertical"?y.createElement(jV,{alpha:t,points:n,baseLine:a,strokeWidth:o}):y.createElement(kV,{alpha:t,points:n,baseLine:a,strokeWidth:o})}function NV(e){var t=e.animationElapsedTime,r=t===void 0?1:t,n=e.isAnimating,a=n===void 0?!1:n,o=e.isEntrance,u=o===void 0?!1:o,l=e.layout,f=e.isRange,h=e.stroke,p=e.connectNulls,v=QS(e,xV),x=l==="vertical"?"vertical":"horizontal",b=p??!1,k=cO(),j=v.id,S=v.baseLine,N=QS(v,bV),P=dn(N),O=y.createElement(Zd,cu({},v,{id:j,baseLine:S,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:x})),A=h!=="none"&&y.createElement(Zd,cu({},P,{className:"recharts-area-curve",layout:x,type:v.type,connectNulls:b,fill:"none",stroke:h,points:v.points})),_=h!=="none"&&f&&Array.isArray(S)&&y.createElement(Zd,cu({},P,{className:"recharts-area-curve",layout:x,type:v.type,connectNulls:b,fill:"none",stroke:h,points:S}));if(u&&(a||r<1)){var C;return y.createElement(Vr,null,y.createElement("defs",null,y.createElement("clipPath",{id:k},y.createElement(SV,{alpha:r,points:(C=v.points)!==null&&C!==void 0?C:[],baseLine:S,layout:x,strokeWidth:v.strokeWidth}))),y.createElement(Vr,{clipPath:"url(#".concat(k,")")},O,A,_))}return y.createElement(y.Fragment,null,O,A,_)}var EV=["id"],PV=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Qf(){return Qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qf.apply(null,arguments)}function CO(e,t){if(e==null)return{};var r,n,a=AV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function AV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function YS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YS(Object(r),!0).forEach(function(n){CV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CV(e,t,r){return(t=OV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OV(e){var t=_V(e,"string");return typeof t=="symbol"?t:t+""}function _V(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MV=(e,t)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[$s($s({},r.next),{},{x:ni(r.prev.x,r.next.x,t),y:ni(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),OO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:I0,animationInterpolateFn:MV,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:NV,xAxisId:0,yAxisId:0,zIndex:or.area};function Yf(e,t){return e&&e!=="none"?e:t}var IV=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:Yf(n,a),value:tP(r,t),payload:e}]},TV=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,u=e.name,l=e.hide,f=e.unit,h=e.tooltipType,p=e.id,v={dataDefinedOnItem:r,getPosition:Fs,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:tP(u,t),hide:l,type:h,color:Yf(n,o),unit:f,graphicalItemId:p}};return y.createElement(GH,{tooltipEntrySettings:v})});function DV(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,u=n.dataKey,l=dn(n);return y.createElement(DK,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:l,needClip:a,clipPathId:t})}function RV(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var u,l,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(l=o.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return $s($s({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return y.createElement(_H,{value:t?a:void 0},r)}function $V(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,u=e.animationElapsedTime,l=e.isAnimating,f=e.isEntrance,h=o.layout,p=o.type,v=o.stroke,x=o.connectNulls,b=o.isRange,k=o.shape,j=o.id,S=CO(o,EV),N=Gr(S),P=$s($s({},N),{},{id:j,points:t,connectNulls:x,type:p,baseLine:r,layout:h,stroke:v,isRange:b,animationElapsedTime:u,isAnimating:l,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(Vr,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},y.createElement(KH,{option:k,DefaultShape:OO.shape,shapeProps:P})),y.createElement(DV,{points:t,props:S,clipPathId:a}))}function LV(e,t,r){if(Ne(e)){var n=Ne(t)?t:void 0;return ni(n,e,r)}if(Kt(e)||Tn(e)){var a=Ne(t)?t:void 0;return ni(a,0,r)}return e}function zV(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,l=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,p=n.animationDuration,v=n.animationEasing,x=n.animationMatchBy,b=n.animationInterpolateFn,k=y.useMemo(()=>({points:u,baseLine:l}),[u,l]),j=uO(k,o),S=Ey(),N=uK(n.onAnimationStart,n.onAnimationEnd),P=N.isAnimating,O=N.handleAnimationStart,A=N.handleAnimationEnd,_=j.startValue;if(S==null)return null;var C;return Array.isArray(l)&&Array.isArray(_)?C=Ug(_,l,x):Array.isArray(l)?C=Ug(null,l,x):C=null,y.createElement(cK,{animationInput:k,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:v,onAnimationStart:O,onAnimationEnd:A,animationInterpolateFn:b,animationMatchBy:x,layout:S},(I,U,B)=>{var G;return U===1?G=l:Array.isArray(l)?G=b(C,U,S):G=B?l:LV(l,_,U),j.syncStepValue(G,U),y.createElement(RV,{showLabels:!P,points:u},n.children,y.createElement($V,{points:I,baseLine:G,needClip:t,clipPathId:r,props:n,animationElapsedTime:U,isAnimating:P||U<1,isEntrance:B}),y.createElement(TH,{label:n.label}))})}function FV(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=y.useRef(null),o=y.useRef();return y.createElement(zV,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class BV extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,u=t.top,l=t.left,f=t.needClip,h=t.xAxisId,p=t.yAxisId,v=t.width,x=t.height,b=t.id,k=t.baseLine,j=t.zIndex;if(r)return null;var S=et("recharts-area",o),N=b,P=fV(n),O=P.r,A=P.strokeWidth,_=sO(n),C=O*2+A,I=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return y.createElement(xi,{zIndex:j},y.createElement(Vr,{className:S},f&&y.createElement("defs",null,y.createElement(dV,{clipPathId:N,xAxisId:h,yAxisId:p}),!_&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:l-C/2,y:u-C/2,width:v+C,height:x+C}))),y.createElement(FV,{needClip:f,clipPathId:N,props:this.props})),y.createElement(BS,{points:a,mainColor:Yf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(k)&&y.createElement(BS,{points:k,mainColor:Yf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}function UV(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,u=e.connectNulls,l=e.dot,f=e.fill,h=e.fillOpacity,p=e.hide,v=e.isAnimationActive,x=e.legendType,b=e.stroke,k=e.xAxisId,j=e.yAxisId,S=CO(e,PV),N=Bs(),P=LC(),O=kO(k,j),A=O.needClip,_=wr(),C=(t=Ae(ge=>yV(ge,e.id,_)))!==null&&t!==void 0?t:{},I=C.points,U=C.isRange,B=C.baseLine,G=D0();if(N!=="horizontal"&&N!=="vertical"||G==null||P!=="AreaChart"&&P!=="ComposedChart")return null;var q=G.height,R=G.width,de=G.x,Z=G.y;return!I||!I.length?null:y.createElement(BV,Qf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:B,connectNulls:u,dot:l,fill:f,fillOpacity:h,height:q,hide:p,layout:N,isAnimationActive:v,isRange:U,legendType:x,needClip:A,points:I,stroke:b,width:R,left:de,top:Z,xAxisId:k,yAxisId:j}))}var WV=(e,t,r,n,a)=>{var o=r??t;if(Ne(o))return o;var u=e==="horizontal"?a:n,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),h=Math.min(l[0],l[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return o==="dataMin"?l[0]:o==="dataMax"?l[1]:l[0]};function HV(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,u=e.layout,l=e.chartBaseValue,f=e.xAxis,h=e.yAxis,p=e.displayedData,v=e.dataStartIndex,x=e.xAxisTicks,b=e.yAxisTicks,k=e.bandSize,j=o&&o.length,S=WV(u,l,n,f,h),N=u==="horizontal",P=!1,O=p.map((_,C)=>{var I,U,B,G;if(j)G=o[v+C];else{var q=Tt(_,a);Array.isArray(q)?(G=q,P=!0):G=[S,q]}var R=(I=(U=G)===null||U===void 0?void 0:U[1])!==null&&I!==void 0?I:null,de=R==null||j&&!r&&Tt(_,a)==null;if(N){var Z;return{x:Kw({axis:f,ticks:x,bandSize:k,entry:_,index:C}),y:de?null:(Z=h.scale.map(R))!==null&&Z!==void 0?Z:null,value:G,payload:_}}return{x:de?null:(B=f.scale.map(R))!==null&&B!==void 0?B:null,y:Kw({axis:h,ticks:b,bandSize:k,entry:_,index:C}),value:G,payload:_}}),A;return j||P?A=O.map(_=>{var C,I=Array.isArray(_.value)?_.value[0]:null;if(N){var U;return{x:_.x,y:I!=null&&_.y!=null&&(U=h.scale.map(I))!==null&&U!==void 0?U:null,payload:_.payload}}return{x:I!=null&&(C=f.scale.map(I))!==null&&C!==void 0?C:null,y:_.y,payload:_.payload}}):A=N?h.scale.map(S):f.scale.map(S),{points:O,baseLine:A??0,isRange:P}}function KV(e){var t=Qr(e,OO),r=wr();return y.createElement(xK,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(VH,{legendPayload:IV(t)}),y.createElement(TV,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),y.createElement(EK,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:A$(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(UV,Qf({},t,{id:n}))))}var _O=y.memo(KV,Ah);_O.displayName="Area";var GV=["domain","range"],VV=["domain","range"];function XS(e,t){if(e==null)return{};var r,n,a=qV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function qV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ZS(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function MO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,a=XS(e,GV),o=t.domain,u=t.range,l=XS(t,VV);return!ZS(r,o)||!ZS(n,u)?!1:Ah(a,l)}var QV=["type"],YV=["dangerouslySetInnerHTML","ticks","scale"],XV=["id","scale"];function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wg.apply(null,arguments)}function JS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JS(Object(r),!0).forEach(function(n){ZV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZV(e,t,r){return(t=JV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JV(e){var t=eq(e,"string");return typeof t=="symbol"?t:t+""}function eq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hg(e,t){if(e==null)return{};var r,n,a=tq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function tq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function rq(e){var t=wt(),r=y.useRef(null),n=Ey(),a=e.type,o=Hg(e,QV),u=Mh(n,"xAxis",a),l=y.useMemo(()=>{if(u!=null)return eN(eN({},o),{},{type:u})},[o,u]);return y.useLayoutEffect(()=>{l!=null&&(r.current===null?t(FK(l)):r.current!==l&&t(BK({prev:r.current,next:l})),r.current=l)},[l,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(UK(r.current)),r.current=null)},[t]),null}var nq=e=>{var t=e.xAxisId,r=e.className,n=Ae(nP),a=wr(),o="xAxis",u=Ae(x=>hC(x,o,t,a)),l=Ae(x=>$9(x,t)),f=Ae(x=>W9(x,t)),h=Ae(x=>OA(x,t));if(l==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var p=Hg(e,YV);h.id,h.scale;var v=Hg(h,XV);return y.createElement($0,Wg({},p,v,{x:f.x,y:f.y,width:l.width,height:l.height,className:et("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},iq={allowDataOverflow:St.allowDataOverflow,allowDecimals:St.allowDecimals,allowDuplicatedCategory:St.allowDuplicatedCategory,angle:St.angle,axisLine:li.axisLine,height:St.height,hide:!1,includeHidden:St.includeHidden,interval:St.interval,label:!1,minTickGap:St.minTickGap,mirror:St.mirror,orientation:St.orientation,padding:St.padding,reversed:St.reversed,scale:St.scale,tick:St.tick,tickCount:St.tickCount,tickLine:li.tickLine,tickSize:li.tickSize,type:St.type,niceTicks:St.niceTicks,xAxisId:0},aq=e=>{var t=Qr(e,iq);return y.createElement(y.Fragment,null,y.createElement(rq,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(nq,t))},IO=y.memo(aq,MO);IO.displayName="XAxis";var oq=["type"],sq=["dangerouslySetInnerHTML","ticks","scale"],lq=["id","scale"];function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kg.apply(null,arguments)}function tN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tN(Object(r),!0).forEach(function(n){uq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uq(e,t,r){return(t=cq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cq(e){var t=dq(e,"string");return typeof t=="symbol"?t:t+""}function dq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gg(e,t){if(e==null)return{};var r,n,a=fq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function fq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function hq(e){var t=wt(),r=y.useRef(null),n=Ey(),a=e.type,o=Gg(e,oq),u=Mh(n,"yAxis",a),l=y.useMemo(()=>{if(u!=null)return rN(rN({},o),{},{type:u})},[u,o]);return y.useLayoutEffect(()=>{l!=null&&(r.current===null?t(WK(l)):r.current!==l&&t(HK({prev:r.current,next:l})),r.current=l)},[l,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(KK(r.current)),r.current=null)},[t]),null}function pq(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=y.useRef(null),u=y.useRef(null),l=Ae(nP),f=wr(),h=wt(),p="yAxis",v=Ae(N=>G9(N,t)),x=Ae(N=>K9(N,t)),b=Ae(N=>hC(N,p,t,f)),k=Ae(N=>_A(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!v||M0(a)||y.isValidElement(a)||k==null)){var N=o.current;if(N){var P=N.getCalculatedWidth();Math.round(v.width)!==Math.round(P)&&h(GK({id:t,width:P}))}}},[b,v,h,a,t,n,k]),v==null||x==null||k==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var j=Gg(e,sq);k.id,k.scale;var S=Gg(k,lq);return y.createElement($0,Kg({},j,S,{ref:o,labelRef:u,x:x.x,y:x.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:v.width,height:v.height,className:et("recharts-".concat(p," ").concat(p),r),viewBox:l,ticks:b,axisType:p,axisId:t}))}var mq={allowDataOverflow:Nt.allowDataOverflow,allowDecimals:Nt.allowDecimals,allowDuplicatedCategory:Nt.allowDuplicatedCategory,angle:Nt.angle,axisLine:li.axisLine,hide:!1,includeHidden:Nt.includeHidden,interval:Nt.interval,label:!1,minTickGap:Nt.minTickGap,mirror:Nt.mirror,orientation:Nt.orientation,padding:Nt.padding,reversed:Nt.reversed,scale:Nt.scale,tick:Nt.tick,tickCount:Nt.tickCount,tickLine:li.tickLine,tickSize:li.tickSize,type:Nt.type,niceTicks:Nt.niceTicks,width:Nt.width,yAxisId:0},vq=e=>{var t=Qr(e,mq);return y.createElement(y.Fragment,null,y.createElement(hq,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(pq,t))},TO=y.memo(vq,MO);TO.displayName="YAxis";var gq=(e,t)=>t,B0=K([gq,ut,KP,Rt,MC,yi,p7,Vt],w7);function yq(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function U0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(yq(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(l,f)=>({relativeX:Math.round((l-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(l=>u(l.clientX,l.clientY)):u(e.clientX,e.clientY)}var DO=Mr("mouseClick"),RO=Vu();RO.startListening({actionCreator:DO,effect:(e,t)=>{var r=e.payload,n=B0(t.getState(),U0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(sU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Vg=Mr("mouseMove"),$O=Vu(),ts=null,Ma=null,Ev=null;$O.startListening({actionCreator:Vg,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||(u==null?void 0:u.includes("mousemove"));ts!==null&&(cancelAnimationFrame(ts),ts=null),Ma!==null&&(typeof o!="number"||!l)&&(clearTimeout(Ma),Ma=null),Ev=U0(r);var f=()=>{var h=t.getState(),p=oc(h,h.tooltip.settings.shared);if(!Ev){ts=null,Ma=null;return}if(p==="axis"){var v=B0(h,Ev);(v==null?void 0:v.activeIndex)!=null?t.dispatch(kC({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate})):t.dispatch(wC())}ts=null,Ma=null};if(!l){f();return}o==="raf"?ts=requestAnimationFrame(f):typeof o=="number"&&Ma===null&&(Ma=setTimeout(f,o))}});function xq(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var nN={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},LO=rr({name:"rootProps",initialState:nN,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:nN.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),bq=LO.reducer,wq=LO.actions.updateOptions,kq=null,jq={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},zO=rr({name:"polarOptions",initialState:kq,reducers:jq});zO.actions.updatePolarOptions;var Sq=zO.reducer,FO=Mr("keyDown"),BO=Mr("focus"),UO=Mr("blur"),qh=Vu(),rs=null,Ia=null,Ud=null;qh.startListening({actionCreator:FO,effect:(e,t)=>{Ud=e.payload,rs!==null&&(cancelAnimationFrame(rs),rs=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Ia!==null&&(typeof a!="number"||!u)&&(clearTimeout(Ia),Ia=null);var l=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var p=f.tooltip.keyboardInteraction,v=Ud;if(v!=="ArrowRight"&&v!=="ArrowLeft"&&v!=="Enter")return;var x=lu(p,fo(f),Ds(f),Rs(f)),b=x==null?-1:Number(x),k=!Number.isFinite(b)||b<0,j=yi(f),S=fo(f),N=oc(f,f.tooltip.settings.shared);if(v==="Enter"){if(k)return;var P=Hf(f,N,"hover",String(p.index));t.dispatch(Wf({active:!p.active,activeIndex:p.index,activeCoordinate:P}));return}var O=X9(f),A=O==="left-to-right"?1:-1,_=v==="ArrowRight"?1:-1,C;if(k){var I=Ds(f),U=Rs(f),B=_*A,G=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,B>0){for(var q=0;q<S.length;q++)if(lu(G(q),S,I,U)!=null){C=q;break}}else for(var R=S.length-1;R>=0;R--)if(lu(G(R),S,I,U)!=null){C=R;break}if(C<0)return}else{C=b+_*A;var de=(j==null?void 0:j.length)||S.length;if(de===0||C>=de||C<0)return}var Z=Hf(f,N,"hover",String(C));t.dispatch(Wf({active:!0,activeIndex:C.toString(),activeCoordinate:Z}))}finally{rs=null,Ia=null}};if(!u){l();return}a==="raf"?rs=requestAnimationFrame(l):typeof a=="number"&&Ia===null&&(l(),Ud=null,Ia=setTimeout(()=>{Ud?l():(Ia=null,rs=null)},a))}});qh.startListening({actionCreator:BO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var o="0",u=oc(r,r.tooltip.settings.shared),l=Hf(r,u,"hover",String(o));t.dispatch(Wf({active:!0,activeIndex:o,activeCoordinate:l}))}}}});qh.startListening({actionCreator:UO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Wf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function WO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Fr=Mr("externalEvent"),HO=Vu(),Wd=new Map,tu=new Map,Pv=new Map;HO.startListening({actionCreator:Fr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,u=WO(a);Pv.set(o,{handler:n,reactEvent:u});var l=Wd.get(o);l!==void 0&&(cancelAnimationFrame(l),Wd.delete(o));var f=t.getState(),h=f.eventSettings,p=h.throttleDelay,v=h.throttledEvents,x=v,b=x==="all"||(x==null?void 0:x.includes(o)),k=tu.get(o);k!==void 0&&(typeof p!="number"||!b)&&(clearTimeout(k),tu.delete(o));var j=()=>{var P=Pv.get(o);try{if(!P)return;var O=P.handler,A=P.reactEvent,_=t.getState(),C={activeCoordinate:JU(_),activeDataKey:YU(_),activeIndex:Ru(_),activeLabel:DC(_),activeTooltipIndex:Ru(_),isTooltipActive:e7(_)};O&&O(C,A)}finally{Wd.delete(o),tu.delete(o),Pv.delete(o)}};if(!b){j();return}if(p==="raf"){var S=requestAnimationFrame(j);Wd.set(o,S)}else if(typeof p=="number"){if(!tu.has(o)){j();var N=setTimeout(j,p);tu.set(o,N)}}else j()}}});var Nq=K([Qs],e=>e.tooltipItemPayloads),Eq=K([Nq,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),KO=Mr("touchMove"),GO=Vu(),Ta=null,Hi=null,iN=null,ru=null;GO.startListening({actionCreator:KO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){ru=WO(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,u=a.throttledEvents,l=u==="all"||u.includes("touchmove");Ta!==null&&(cancelAnimationFrame(Ta),Ta=null),Hi!==null&&(typeof o!="number"||!l)&&(clearTimeout(Hi),Hi=null),iN=Array.from(r.touches).map(h=>U0({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(ru!=null){var h=t.getState(),p=oc(h,h.tooltip.settings.shared);if(p==="axis"){var v,x=(v=iN)===null||v===void 0?void 0:v[0];if(x==null){Ta=null,Hi=null;return}var b=B0(h,x);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(kC({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(p==="item"){var k,j=ru.touches[0];if(document.elementFromPoint==null||j==null)return;var S=document.elementFromPoint(j.clientX,j.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(D$),P=(k=S.getAttribute(R$))!==null&&k!==void 0?k:void 0,O=bo(h).find(C=>C.id===P);if(N==null||O==null||P==null)return;var A=O.dataKey,_=Eq(h,N,P);t.dispatch(oU({activeDataKey:A,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:P}))}Ta=null,Hi=null}};if(!l){f();return}o==="raf"?Ta=requestAnimationFrame(f):typeof o=="number"&&Hi===null&&(f(),ru=null,Hi=setTimeout(()=>{ru?f():(Hi=null,Ta=null)},o))}}});var VO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},qO=rr({name:"eventSettings",initialState:VO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),Pq=qO.actions.setEventSettings,Aq=qO.reducer,Cq=SE({brush:rG,cartesianAxis:VK,chartData:Z7,errorBars:cV,eventSettings:Aq,graphicalItems:SK,layout:x$,legend:IL,options:V7,polarAxis:RH,polarOptions:Sq,referenceElements:oG,renderedTicks:AG,rootProps:bq,tooltip:lU,zIndex:T7}),Oq=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return HR({reducer:Cq,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([RO.middleware,$O.middleware,qh.middleware,HO.middleware,GO.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(zE({type:"raf"}))},devTools:{serialize:{replacer:xq},name:"recharts-".concat(r)}})};function _q(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=wr(),o=y.useRef(null);if(a)return r;o.current==null&&(o.current=Oq(t,n));var u=gy;return y.createElement(QL,{context:u,store:o.current},r)}function Mq(e){var t=e.layout,r=e.margin,n=wt(),a=wr();return y.useEffect(()=>{a||(n(v$(t)),n(m$(r)))},[n,a,t,r]),null}var Iq=y.memo(Mq,Ah);function Tq(e){var t=wt();return y.useEffect(()=>{t(wq(e))},[t,e]),null}var Dq=e=>{var t=wt();return y.useEffect(()=>{t(Pq(e))},[t,e]),null},Rq=y.memo(Dq,Ah);function aN(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),a=wt();return y.useLayoutEffect(()=>(n.current&&a(M7({zIndex:t,element:n.current,isPanorama:r})),()=>{a(I7({zIndex:t,isPanorama:r}))}),[a,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function oN(e){var t=e.children,r=e.isPanorama,n=Ae(j7);if(!n||n.length===0)return t;var a=n.filter(u=>u<0),o=n.filter(u=>u>0);return y.createElement(y.Fragment,null,a.map(u=>y.createElement(aN,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>y.createElement(aN,{key:u,zIndex:u,isPanorama:r})))}var $q=["children"];function Lq(e,t){if(e==null)return{};var r,n,a=zq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function zq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Xf(){return Xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xf.apply(null,arguments)}var Fq={width:"100%",height:"100%",display:"block"},Bq=y.forwardRef((e,t)=>{var r=lP(),n=uP(),a=xP();if(!Rn(r)||!Rn(n))return null;var o=e.children,u=e.otherAttributes,l=e.title,f=e.desc,h,p;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=a?0:void 0,typeof u.role=="string"?p=u.role:p=a?"application":void 0),y.createElement(U2,Xf({},u,{title:l,desc:f,role:p,tabIndex:h,width:r,height:n,style:Fq,ref:t}),o)}),Uq=e=>{var t=e.children,r=Ae(jh);if(!r)return null;var n=r.width,a=r.height,o=r.y,u=r.x;return y.createElement(U2,{width:n,height:a,x:u,y:o},t)},sN=y.forwardRef((e,t)=>{var r=e.children,n=Lq(e,$q),a=wr();return a?y.createElement(Uq,null,y.createElement(oN,{isPanorama:!0},r)):y.createElement(Bq,Xf({ref:t},n),y.createElement(oN,{isPanorama:!1},r))});function Wq(e,t){return Vq(e)||Gq(e,t)||Kq(e,t)||Hq()}function Hq(){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 Kq(e,t){if(e){if(typeof e=="string")return lN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lN(e,t):void 0}}function lN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Gq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function Vq(e){if(Array.isArray(e))return e}function qq(){var e=wt(),t=y.useState(null),r=Wq(t,2),n=r[0],a=r[1],o=Ae(T$);return y.useEffect(()=>{if(n!=null){var u=n.getBoundingClientRect(),l=u.width/n.offsetWidth;Be(l)&&l!==o&&e(y$(l))}},[n,e,o]),a}function uN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uN(Object(r),!0).forEach(function(n){Yq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yq(e,t,r){return(t=Xq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xq(e){var t=Zq(e,"string");return typeof t=="symbol"?t:t+""}function Zq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ua.apply(null,arguments)}function Zf(e,t){return rQ(e)||tQ(e,t)||eQ(e,t)||Jq()}function Jq(){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 eQ(e,t){if(e){if(typeof e=="string")return cN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cN(e,t):void 0}}function cN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,u,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw a}}return l}}function rQ(e){if(Array.isArray(e))return e}var nQ=()=>(sW(),null);function Jf(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var iQ=y.forwardRef((e,t)=>{var r,n,a=y.useRef(null),o=y.useState({containerWidth:Jf((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Jf((n=e.style)===null||n===void 0?void 0:n.height)}),u=Zf(o,2),l=u[0],f=u[1],h=y.useCallback((v,x)=>{f(b=>{var k=Math.round(v),j=Math.round(x);return b.containerWidth===k&&b.containerHeight===j?b:{containerWidth:k,containerHeight:j}})},[]),p=y.useCallback(v=>{if(typeof t=="function"&&t(v),a.current!=null&&(a.current.disconnect(),a.current=null),v!=null&&typeof ResizeObserver<"u"){var x=v.getBoundingClientRect(),b=x.width,k=x.height;h(b,k);var j=N=>{var P=N[0];if(P!=null){var O=P.contentRect,A=O.width,_=O.height;h(A,_)}},S=new ResizeObserver(j);S.observe(v),a.current=S}},[t,h]);return y.useEffect(()=>()=>{var v=a.current;v!=null&&v.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(Qu,{width:l.containerWidth,height:l.containerHeight}),y.createElement("div",ua({ref:p},e)))}),aQ=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=y.useState({containerWidth:Jf(r),containerHeight:Jf(n)}),o=Zf(a,2),u=o[0],l=o[1],f=y.useCallback((p,v)=>{l(x=>{var b=Math.round(p),k=Math.round(v);return x.containerWidth===b&&x.containerHeight===k?x:{containerWidth:b,containerHeight:k}})},[]),h=y.useCallback(p=>{if(typeof t=="function"&&t(p),p!=null){var v=p.getBoundingClientRect(),x=v.width,b=v.height;f(x,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(Qu,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",ua({ref:h},e)))}),oQ=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Qu,{width:r,height:n}),y.createElement("div",ua({ref:t},e)))}),sQ=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(aQ,ua({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(oQ,ua({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Qu,{width:r,height:n}),y.createElement("div",ua({ref:t},e)))});function lQ(e){return e?iQ:sQ}var uQ=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,u=e.onContextMenu,l=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,p=e.onMouseLeave,v=e.onMouseMove,x=e.onMouseUp,b=e.onTouchEnd,k=e.onTouchMove,j=e.onTouchStart,S=e.style,N=e.width,P=e.responsive,O=e.dispatchTouchEvents,A=O===void 0?!0:O,_=y.useRef(null),C=wt(),I=y.useState(null),U=Zf(I,2),B=U[0],G=U[1],q=y.useState(null),R=Zf(q,2),de=R[0],Z=R[1],ge=qq(),ke=Sy(),me=(ke==null?void 0:ke.width)>0?ke.width:N,Q=(ke==null?void 0:ke.height)>0?ke.height:a,oe=y.useCallback(ce=>{ge(ce),typeof t=="function"&&t(ce),G(ce),Z(ce),ce!=null&&(_.current=ce)},[ge,t,G,Z]),X=y.useCallback(ce=>{C(DO(ce)),C(Fr({handler:o,reactEvent:ce}))},[C,o]),$=y.useCallback(ce=>{C(Vg(ce)),C(Fr({handler:h,reactEvent:ce}))},[C,h]),T=y.useCallback(ce=>{C(wC()),C(Fr({handler:p,reactEvent:ce}))},[C,p]),ee=y.useCallback(ce=>{C(Vg(ce)),C(Fr({handler:v,reactEvent:ce}))},[C,v]),ne=y.useCallback(()=>{C(BO())},[C]),te=y.useCallback(()=>{C(UO())},[C]),ue=y.useCallback(ce=>{C(FO(ce.key))},[C]),pe=y.useCallback(ce=>{C(Fr({handler:u,reactEvent:ce}))},[C,u]),Ce=y.useCallback(ce=>{C(Fr({handler:l,reactEvent:ce}))},[C,l]),J=y.useCallback(ce=>{C(Fr({handler:f,reactEvent:ce}))},[C,f]),je=y.useCallback(ce=>{C(Fr({handler:x,reactEvent:ce}))},[C,x]),Oe=y.useCallback(ce=>{C(Fr({handler:j,reactEvent:ce}))},[C,j]),ae=y.useCallback(ce=>{A&&C(KO(ce)),C(Fr({handler:k,reactEvent:ce}))},[C,A,k]),Xe=y.useCallback(ce=>{C(Fr({handler:b,reactEvent:ce}))},[C,b]),Y=lQ(P);return y.createElement(WC.Provider,{value:B},y.createElement(jD.Provider,{value:de},y.createElement(Y,{width:me??(S==null?void 0:S.width),height:Q??(S==null?void 0:S.height),className:et("recharts-wrapper",n),style:Qq({position:"relative",cursor:"default",width:me,height:Q},S),onClick:X,onContextMenu:pe,onDoubleClick:Ce,onFocus:ne,onBlur:te,onKeyDown:ue,onMouseDown:J,onMouseEnter:$,onMouseLeave:T,onMouseMove:ee,onMouseUp:je,onTouchEnd:Xe,onTouchMove:ae,onTouchStart:Oe,ref:oe},y.createElement(nQ,null),r)))}),cQ=["width","height","responsive","children","className","style","compact","title","desc"];function dQ(e,t){if(e==null)return{};var r,n,a=fQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function fQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var hQ=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=e.responsive,o=e.children,u=e.className,l=e.style,f=e.compact,h=e.title,p=e.desc,v=dQ(e,cQ),x=dn(v);return f?y.createElement(y.Fragment,null,y.createElement(Qu,{width:r,height:n}),y.createElement(sN,{otherAttributes:x,title:h,desc:p},o)):y.createElement(uQ,{className:u,style:l,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},y.createElement(sN,{otherAttributes:x,title:h,desc:p,ref:t},y.createElement(hG,null,o)))});function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qg.apply(null,arguments)}function dN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dN(Object(r),!0).forEach(function(n){mQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mQ(e,t,r){return(t=vQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vQ(e){var t=gQ(e,"string");return typeof t=="symbol"?t:t+""}function gQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yQ={top:5,right:5,bottom:5,left:5},xQ=pQ({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:yQ,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},VO),bQ=y.forwardRef(function(t,r){var n,a=Qr(t.categoricalChartProps,xQ),o=t.chartName,u=t.defaultTooltipEventType,l=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,p={chartName:o,defaultTooltipEventType:u,validateTooltipEventTypes:l,tooltipPayloadSearcher:f,eventEmitter:void 0};return y.createElement(_q,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},y.createElement(tG,{chartData:h.data}),y.createElement(Iq,{layout:a.layout,margin:a.margin}),y.createElement(Rq,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),y.createElement(Tq,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),y.createElement(hQ,qg({},a,{ref:r})))}),wQ=["axis"],kQ=y.forwardRef((e,t)=>y.createElement(bQ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:wQ,tooltipPayloadSearcher:K7,categoricalChartProps:e,ref:t}));const jQ="rgba(130,130,150,0.14)",fN="rgba(130,130,150,0.85)";function SQ(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function QO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function NQ({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:c.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:c.jsx("div",{className:"space-y-1",children:t.map(n=>c.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),c.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),c.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:QO(n.value,r)})]},n.dataKey))})})}function YO({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((l,f)=>t.reduce((h,p)=>Math.max(h,Number(f[p.key])||0),l),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(SQ(o*1.15),10);return c.jsx("div",{style:{height:a},className:"w-full",children:c.jsx(mL,{width:"100%",height:"100%",children:c.jsxs(kQ,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[c.jsx("defs",{children:t.map(l=>c.jsxs("linearGradient",{id:`grad-${l.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:l.color,stopOpacity:.22}),c.jsx("stop",{offset:"100%",stopColor:l.color,stopOpacity:0})]},l.key))}),c.jsx(bO,{vertical:!1,stroke:jQ}),c.jsx(IO,{dataKey:"t",hide:!0}),c.jsx(TO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:l=>QO(l,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:fN}}),c.jsx(bW,{content:c.jsx(NQ,{unit:r}),cursor:{stroke:fN,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(l=>c.jsx(_O,{type:"monotone",dataKey:l.key,name:l.label,stroke:l.color,strokeWidth:2,fill:`url(#grad-${l.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},l.key))]})})})}const EQ=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function PQ(){var u,l,f,h;const{sys:e,hist:t}=fD(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=EQ.filter(p=>p.key!=="gpu"||r),a={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(l=e==null?void 0:e.ram)==null?void 0:l.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Qo(e.ram.used)}/${Qo(e.ram.total)} GB`:"",gpu:r?`${Qo(e.gpu.gtt_used)}/${Qo(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Qo(e.disk.used)}/${Qo(e.disk.total)} GB`:""};return c.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[c.jsx(_n,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-1 flex flex-wrap gap-x-5 gap-y-1.5",children:n.map(p=>c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:p.color}}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),c.jsxs("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[p.key]??0),"%"]}),o[p.key]&&c.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/60",children:o[p.key]})]},p.key))}),c.jsx(YO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):c.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&c.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&c.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&c.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function Hd({label:e,value:t,tone:r}){return c.jsxs("div",{className:he("flex items-center justify-between rounded-lg border px-3 py-1.5 text-xs",r==="alert"?"border-amber-500/30 bg-amber-500/5 font-semibold text-amber-400":r==="accent"?"border-primary/30 bg-primary/5 font-semibold text-primary":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsx("span",{className:"flex items-center gap-1.5",children:e}),c.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function AQ(){var r;const{data:e}=sy(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return c.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(dI,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&c.jsxs("span",{className:"font-mono text-[9px] text-muted-foreground/80",children:["Zuletzt gesucht: ",new Date(e.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),e?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Hd,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),c.jsx(Hd,{label:"Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),c.jsx(Hd,{label:"Modell-Upgrades",tone:e.models>0?"accent":"muted",value:e.models>0?`${e.models} verfügbar`:"aktuell"}),(r=e.components)==null?void 0:r.map(n=>c.jsx(Hd,{tone:n.update===!0?"alert":"muted",label:c.jsxs(c.Fragment,{children:[n.name,n.reachable===!1&&c.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),value:n.update===!0?`Update: ${n.latest}`:n.update===!1?"aktuell":n.latest?`neueste: ${n.latest}`:"—"},n.key))]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),c.jsxs("button",{onClick:t,className:"mt-4 flex h-9 w-full items-center justify-center gap-1.5 rounded-lg bg-primary text-xs font-semibold text-primary-foreground shadow-md shadow-primary/10 transition-all hover:opacity-90 cursor-pointer",children:["Updates verwalten & Pflege ",c.jsx(HN,{className:"h-3.5 w-3.5"})]})]})}function XO({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:u,onCancel:l}){const f=y.useRef(null);return c.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),c.jsx("button",{onClick:l||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{ref:f,type:"text",defaultValue:n,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var p;h.key==="Enter"&&u((p=f.current)==null?void 0:p.value)}}),a!==void 0&&c.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),c.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&c.jsx("button",{onClick:l,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),c.jsx("button",{onClick:()=>{var p;const h=e==="prompt"?(p=f.current)==null?void 0:p.value:void 0;u(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function Zs(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((l,f,h)=>{t({type:"alert",title:l,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=y.useCallback((l,f,h,p)=>{t({type:"confirm",title:l,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),p==null||p()}})},[]),o=y.useCallback((l,f,h,p,v,x)=>{t({type:"prompt",title:l,message:f,defaultValue:h,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:b=>{t(null),p(b)},onCancel:()=>{t(null),v==null||v()}})},[]),u=e?c.jsx(XO,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:u}}function CQ(){const e=po(),{data:t}=O2(3e3),{data:r}=vo(),{showAlert:n,dialogElement:a}=Zs(),[o,u]=y.useState(!1),l=(r==null?void 0:r.models)??[];async function f(h){try{await De("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:Et.agentStatus}),u(!1)}catch(p){n("Fehler",`Fehler beim Wechseln des Gehirns: ${p.message}`)}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ps,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.webui_url)&&c.jsxs("a",{href:ku(t.webui_url),target:"_blank",rel:"noopener",className:he("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[c.jsx(rf,{className:"h-3 w-3"})," AnythingLLM öffnen"]})]}),t?c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:he("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"AnythingLLM"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:he("h-2 w-2 rounded-full",t.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.webui_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{onClick:()=>u(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),c.jsx(_n,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[c.jsx(vu,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),c.jsx(xu,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[c.jsxs("div",{children:["Config: ",t.has_config?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Skills: ",t.has_skills?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Memory: ",t.has_memories?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):c.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&c.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"Telegram"}),c.jsx("span",{className:he("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"MCP-Server"}),c.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"PC Executor"}),c.jsx("span",{className:he("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...l.map(h=>{var p;return((p=h.name.split("/").pop())==null?void 0:p.replace(".gguf",""))||h.name})].map(h=>{const p=["auto","fast","heavy"].includes(h);return c.jsxs("button",{onClick:()=>f(h),className:he("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&c.jsx(An,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function OQ(){const{data:e}=vo(3e3),t=(e==null?void 0:e.models)??[],r=(e==null?void 0:e.running)??[];return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(vu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),c.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:z2.map(n=>{var u;const a=t.find(l=>l.role===n),o=a?r.includes(a.name):!1;return c.jsxs("div",{className:he("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",o?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":a?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[c.jsx("div",{className:"min-w-0 flex-1 mr-2",children:c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("span",{className:he("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",uy(n)),children:n}),c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:a?(u=a.name.split("/").pop())==null?void 0:u.replace(/\.gguf$/i,""):"nicht zugewiesen"}),a&&c.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[a.prompt_cache&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),a.spec_active&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${a.spec_draft_model})`,children:"SPEC"}),a.parallel_slots>1&&c.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${a.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",a.parallel_slots]}),a.incomplete&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),c.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a?o?c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},n)})})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function _Q(){const e=po(),{data:t=[]}=M2({limit:3}),[r,n]=y.useState(""),[a,o]=y.useState("stable"),[u,l]=y.useState(!1);async function f(){if(!(!r.trim()||u)){l(!0);try{await De("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{l(!1)}}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(mu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("textarea",{value:r,onChange:h=>n(h.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),c.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[c.jsxs("select",{value:a,onChange:h=>o(h.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[c.jsx("option",{value:"stable",children:"🔵 Fakt"}),c.jsx("option",{value:"instruction",children:"📋 Regel"}),c.jsx("option",{value:"user",children:"👤 User"}),c.jsx("option",{value:"versioned",children:"🟡 Version"})]}),c.jsxs("button",{onClick:f,disabled:!r.trim()||u,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[c.jsx(GN,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),c.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[c.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),c.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?c.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>c.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[c.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),c.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}const hN=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function MQ(){const{data:e,dataUpdatedAt:t}=C2(3e3),[r,n]=y.useState([]),a=y.useRef(null);y.useEffect(()=>{if(!e)return;const l=Date.now(),f=e.prompt_tokens,h=e.completion_tokens;if(a.current){const p=Math.max((l-a.current.t)/1e3,.001),v=Math.max(0,(f-a.current.p)/p),x=Math.max(0,(h-a.current.c)/p);n(b=>[...b,{t:l,prompt:v,completion:x}].slice(-40))}a.current={p:f,c:h,t:l}},[t]);const o=r[r.length-1],u=o?Math.round(o.prompt+o.completion):0;return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(pu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&c.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[c.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:u.toLocaleString("de-DE")}),c.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&c.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[c.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",c.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),c.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),c.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:hN.map(l=>c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:l.color}}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l.label}),c.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((o==null?void 0:o[l.key])??0)})]},l.key))})]}),e?c.jsx(YO,{data:r,series:hN,unit:" tok/s",yMode:"auto",height:150}):c.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),c.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function IQ(){const{data:e}=S3(3e3),{showAlert:t,dialogElement:r}=Zs(),[n,a]=y.useState({});async function o(u){a(l=>({...l,[u]:!0}));try{const l=await De("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:u})});l.ok||t("Fehler",`Neustart fehlgeschlagen: ${l.err||"Unbekannt"}`)}catch(l){t("Fehler",`Fehler: ${l.message}`)}finally{a(l=>({...l,[u]:!1}))}}return c.jsxs("div",{className:"flex flex-col rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(VN,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),c.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground transition-colors hover:text-primary cursor-pointer",children:"Logs / Pflege"})]}),e?c.jsxs("div",{className:"flex flex-1 flex-col",children:[c.jsx("div",{className:"space-y-1.5",children:e.services.map(u=>c.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:he("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",u.ok?"bg-emerald-500":"bg-amber-500")}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:u.name}),c.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:u.url})]})]}),c.jsx("button",{onClick:()=>o(u.name),disabled:n[u.name],className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-primary/5 hover:text-primary group-hover:opacity-100",title:"Dienst neu starten",children:c.jsx(su,{className:he("h-3.5 w-3.5",n[u.name]&&"animate-spin")})})]},u.name))}),c.jsxs("div",{className:"mt-auto flex flex-wrap gap-3 border-t border-border/20 pt-2.5 text-[10px] font-semibold text-muted-foreground",children:[c.jsxs("a",{href:ku(e.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(rf,{className:"h-3 w-3"})," Engine"]}),c.jsxs("a",{href:ku(e.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-primary transition-colors hover:bg-primary/10",children:[c.jsx(rf,{className:"h-3 w-3"})," Gateway"]})]})]}):c.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}function pN({children:e}){return c.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function TQ(){return c.jsxs("div",{className:"space-y-7",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),c.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[c.jsx(PQ,{}),c.jsx(MQ,{}),c.jsx(dD,{})]}),c.jsxs("section",{children:[c.jsx(pN,{children:"Stack-Status"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsx(OQ,{}),c.jsx(IQ,{})]})]}),c.jsxs("section",{children:[c.jsx(pN,{children:"Betrieb & Wissen"}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[c.jsx(AQ,{}),c.jsx(CQ,{}),c.jsx(_Q,{})]})]})]})}function DQ(){const e=po(),{data:t=[]}=E3(2e3),{showAlert:r,dialogElement:n}=Zs();async function a(l){try{await De(`/api/jobs/${l}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:Et.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(l=>l.state==="running"||l.state==="queued"),u=t.filter(l=>l.state!=="running"&&l.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:c.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(l=>c.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center text-xs",children:[c.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:l.label}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-muted-foreground font-mono",children:[l.progress??0,"% • ",Jv(l.done_bytes),"/",Jv(l.total_bytes),l.eta_s?` • ETA ${O3(l.eta_s)}`:""]}),c.jsx("button",{onClick:()=>a(l.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),c.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:c.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${l.progress??0}%`}})})]},l.id)),u.map(l=>c.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[c.jsx("span",{className:"truncate",children:l.label}),c.jsx("span",{className:he("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",l.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:l.state})]},l.id)),n]})}function Da({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function mN({caps:e}){return e?c.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&c.jsx(Da,{children:"💻 Code"}),e.vision&&c.jsx(Da,{children:"👁 Bild"}),e.reasoning&&c.jsx(Da,{children:"🧠 Reason"}),e.moe&&c.jsxs(Da,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&c.jsx(Da,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&c.jsx(Da,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&c.jsx(Da,{children:"🔢 Embed"})]}):null}function RQ({model:e,onClose:t,onChanged:r}){var j,S;const{data:n,isLoading:a}=C3(e.gguf_path),[o,u]=y.useState(null),[l,f]=y.useState(""),h=n==null?void 0:n.target_vocab,p=(n==null?void 0:n.drafts)??[],v=p.filter(N=>N.compatible===!0),x=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await De(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(P){f(String((P==null?void 0:P.message)||P)),u(null)}}const k=N=>{var P;return N?`${N.pre??"?"} · ${((P=N.n_vocab)==null?void 0:P.toLocaleString())??"?"} Tokens`:"—"};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[c.jsx(ls,{className:"h-4 w-4"})," Speculative Draft"]}),c.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',c.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),c.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:(j=e.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-foreground",children:["Vocab: ",k(h)]})]}),e.spec_active&&x&&c.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[c.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[c.jsx(An,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",x]}),c.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[c.jsx(yu,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),c.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?c.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):p.length===0?c.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",c.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):p.map(N=>{var A,_;const P=N.filename===x,O=N.compatible===!0;return c.jsxs("div",{className:he("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",O?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",P&&"border-primary/40 bg-primary/10"),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:N.filename}),c.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Br(N.size_bytes)," · Vocab: ",k(N.vocab)]})]}),O?P?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[c.jsx(An,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):c.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(A=N.vocab)==null?void 0:A.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[c.jsx(yu,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&p.length>0&&v.length===0&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",c.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",c.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),l&&c.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:l})]})})}function $Q(){var ko,va,rl,wi,ki,lc,nl,il;const e=po(),{data:t,isLoading:r,error:n}=vo(4e3),{data:a}=N3(4e3),{data:o}=_2(),{data:u}=sy(4e3),{data:l}=P3(),{data:f}=oy(),{showAlert:h,showConfirm:p,showPrompt:v,dialogElement:x}=Zs(),b=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],j=n?String(n):"",S=()=>{e.invalidateQueries({queryKey:Et.models}),e.invalidateQueries({queryKey:Et.routing})},[N,P]=y.useState(null),[O,A]=y.useState(null),[_,C]=y.useState(null),[I,U]=y.useState(null),[B,G]=y.useState(!1),[q,R]=y.useState(!1),[de,Z]=y.useState(null),[ge,ke]=y.useState("grid"),[me,Q]=y.useState("all"),oe=b.filter(F=>me==="in_use"?!!F.role||k.includes(F.name):!0),[X,$]=y.useState({width:800,height:360}),T=y.useRef(null),ee=y.useCallback(F=>{if(T.current&&(T.current.disconnect(),T.current=null),F){const fe=new ResizeObserver(Pe=>{if(!Pe||Pe.length===0)return;const ze=Pe[0].contentRect;$({width:ze.width,height:ze.height})});fe.observe(F),T.current=fe}},[]),ne=X.width,te=X.height,ue=F=>{const fe=ne*.1,Pe=te*F,ze=ne*.5,Ve=te*.5,qt=ne*.3,Ze=Pe,vt=ne*.3;return`M ${fe} ${Pe} C ${qt} ${Ze}, ${vt} ${Ve}, ${ze} ${Ve}`},pe=F=>{const fe=ne*.5,Pe=te*.5,ze=ne*.9,Ve=te*F,qt=ne*.7,Ze=Pe,vt=ne*.7;return`M ${fe} ${Pe} C ${qt} ${Ze}, ${vt} ${Ve}, ${ze} ${Ve}`};async function Ce(F){try{await De(`/api/models/${encodeURIComponent(F)}/load`,{method:"POST"}),S()}catch(fe){h("Fehler",`Fehler beim Laden des Modells: ${fe.message}`)}}async function J(F){try{await De(`/api/models/${encodeURIComponent(F)}/unload`,{method:"POST"}),S()}catch(fe){h("Fehler",`Fehler beim Entladen des Modells: ${fe.message}`)}}async function je(){try{await De("/api/models/unload",{method:"POST"}),S()}catch(F){h("Fehler",`Fehler beim Entladen aller Modelle: ${F.message}`)}}async function Oe(F,fe){try{await De(`/api/models/${encodeURIComponent(fe)}/role`,{method:"POST",body:JSON.stringify({role:F||null})}),S()}catch(Pe){h("Fehler",`Fehler beim Zuweisen der Rolle: ${Pe.message||Pe}`)}}function ae(F){A(F),C(null),De(`/api/roles/${encodeURIComponent(F)}/recommend`).then(fe=>C(fe)).catch(()=>{})}async function Xe(F,fe){let Pe=null;try{Pe=await De(`/api/models/${encodeURIComponent(F)}/ctx/auto`)}catch{}const ze=Pe?`Optimal für dein Setup: ${(Pe.ctx/1024).toFixed(0)}k (${Pe.ctx}) — GTT ${Pe.gtt_gb} GB reserviert ${Pe.reserved_gb} GB (${Pe.mode}) → ${Pe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";v("Kontextlänge anpassen",ze,String(fe||32768),async Ve=>{if(Ve)try{await De(`/api/models/${encodeURIComponent(F)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Ve,10)})}),S()}catch(qt){h("Fehler",`Fehler beim Setzen des Kontexts: ${qt.message||qt}`)}},void 0,Pe?{autoValue:String(Pe.ctx),autoLabel:`Auto (${(Pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function Y(F){p("Modell löschen?",`Modell '${F}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await De(`/api/models/${encodeURIComponent(F)}`,{method:"DELETE"}),S()}catch(fe){h("Fehler",`Fehler beim Löschen: ${fe.message||fe}`)}})}async function ce(F,fe,Pe,ze){try{await De("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:fe,quant:Pe,jinja:ze})}),h("Herunterladen gestartet",`Download für '${F}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Ve){h("Fehler",`Fehler beim Starten des Upgrades: ${Ve.message||Ve}`)}}async function tt(F){const fe=l==null?void 0:l.budget,Pe=fe&&!fe.fits?`
⚠ Speicher-Warnung: Dieses Brain (~${fe.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${fe.largest_ondemand_gb} GB) sprengt das das Budget (${fe.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";p("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${F.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Pe}`,async()=>{try{await De("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:"hermes",quant:"Q4_K_M",jinja:!0})}),h("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(ze){h("Fehler",`Update fehlgeschlagen: ${ze.message||ze}`)}})}async function kr(F){p("Agent-Hirn wechseln?",`'${F.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await De("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:F})}),h("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),G(!1),S()}catch(fe){h("Fehler",`Wechsel fehlgeschlagen: ${fe.message||fe}`)}})}async function pa(F){F&&(await navigator.clipboard.writeText(F),R(!0),setTimeout(()=>R(!1),1500))}if(r)return c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(j)return c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",j,")."]});const ma=b.filter(F=>k.includes(F.name)),Bn=ma.reduce((F,fe)=>F+(fe.size_bytes||0),0),Un=((ko=f==null?void 0:f.gpu)==null?void 0:ko.gtt_total)||((va=f==null?void 0:f.gpu)==null?void 0:va.vram_total)||0,wo=((rl=f==null?void 0:f.gpu)==null?void 0:rl.gtt_used)||0,Js=16*1024**3,el=Un>2*1024**3?Un:Bn>Js?Bn*1.2:Js,tl=F=>b.find(fe=>fe.role===F),bi=F=>{const fe=tl(F);return fe?k.includes(fe.name):!1};return c.jsxs("div",{className:"space-y-8",children:[c.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Lm,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Br(Bn)," Gewichte",wo>0?` · ${Br(wo)} real belegt (inkl. KV)`:""," / ",Br(el)]}),k.length>0&&c.jsx("button",{onClick:je,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),c.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:ma.length===0?c.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):ma.map((F,fe)=>{var Ve;const Pe=(F.size_bytes||0)/el*100,ze=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][fe%4];return c.jsxs("div",{style:{width:`${Pe}%`},className:he("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",ze),title:`${F.name} (${Br(F.size_bytes)})`,children:[c.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[F.role?`[${F.role}] `:"",(Ve=F.name.split("/").pop())==null?void 0:Ve.replace(".gguf","")]}),c.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Br(F.size_bytes)})]},F.name)})})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),c.jsxs("div",{ref:ee,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:ue(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="roocode"||N==="roocode")&&c.jsx("path",{d:ue(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="cursor"||N==="cursor")&&c.jsx("path",{d:ue(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="opencode"||N==="opencode")&&c.jsx("path",{d:ue(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="zed"||N==="zed")&&c.jsx("path",{d:ue(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(de==="continue"||N==="continue")&&c.jsx("path",{d:ue(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("fast")&&c.jsx("path",{d:pe(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("heavy")&&c.jsx("path",{d:pe(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("coder")&&c.jsx("path",{d:pe(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("vision")&&c.jsx("path",{d:pe(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:pe(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),bi("scout")&&c.jsx("path",{d:pe(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>Z("roocode"),onMouseLeave:()=>Z(null),onClick:()=>P(F=>F==="roocode"?null:"roocode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Roo Code"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>Z("cursor"),onMouseLeave:()=>Z(null),onClick:()=>P(F=>F==="cursor"?null:"cursor"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Cursor IDE"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>Z("opencode"),onMouseLeave:()=>Z(null),onClick:()=>P(F=>F==="opencode"?null:"opencode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"OpenCode"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>Z("zed"),onMouseLeave:()=>Z(null),onClick:()=>P(F=>F==="zed"?null:"zed"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Zed"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>Z("continue"),onMouseLeave:()=>Z(null),onClick:()=>P(F=>F==="continue"?null:"continue"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Continue"})]}),c.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[c.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",a!=null&&a.heavy_threshold_chars?a.heavy_threshold_chars/1e3:"4","k Zeichen"]}),c.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),z2.map(F=>{var qt;const fe=["12%","31%","50%","69%","88%"],Pe=tl(F),ze=Pe?k.includes(Pe.name):!1;if(F==="agent")return null;const Ve={fast:0,heavy:1,coder:2,vision:3,scout:4}[F];return c.jsxs("div",{className:he("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",ze?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":Pe?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:fe[Ve]},onClick:()=>ae(F),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:F}),ze&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:Pe?(qt=Pe.name.split("/").pop())==null?void 0:qt.replace(".gguf",""):"Keine Zuweisung"})]},F)}),N&&o&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[N==="roocode"&&"Roo Code Setup",N==="cursor"&&"Cursor Setup",N==="opencode"&&"OpenCode Setup",N==="zed"&&"Zed Setup",N==="continue"&&"Continue Setup"]}),c.jsx("button",{onClick:()=>P(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[N==="roocode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),c.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",c.jsx("strong",{children:"OpenAI Compatible"}),"."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",c.jsx("code",{children:"settings.json"})," ein."]})]}),N==="cursor"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne Cursor Settings ➔ ",c.jsx("strong",{children:"Models"}),"."]}),c.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",c.jsx("strong",{children:"OpenAI API"})," auf."]}),c.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",c.jsx("strong",{children:"auto"}),"."]})]}),N==="opencode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die ",c.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),c.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",c.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),N==="zed"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die Zed Settings (",c.jsx("code",{children:"ctrl+,"}),")."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",c.jsx("code",{children:"language_models"})," ein."]})]}),N==="continue"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),c.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",c.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),o.tools&&c.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),c.jsxs("button",{onClick:()=>{var F,fe,Pe,ze,Ve;return pa(N==="roocode"?(F=o.tools.cline)==null?void 0:F.snippet:N==="cursor"?(fe=o.tools.cursor)==null?void 0:fe.snippet:N==="opencode"?(Pe=o.tools.opencode)==null?void 0:Pe.snippet:N==="zed"?(ze=o.tools.zed)==null?void 0:ze.snippet:(Ve=o.tools.continue)==null?void 0:Ve.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[q?c.jsx(An,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(KN,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:q?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:c.jsxs("code",{children:[N==="roocode"&&((wi=o.tools.cline)==null?void 0:wi.snippet),N==="cursor"&&((ki=o.tools.cursor)==null?void 0:ki.snippet),N==="opencode"&&((lc=o.tools.opencode)==null?void 0:lc.snippet),N==="zed"&&((nl=o.tools.zed)==null?void 0:nl.snippet),N==="continue"&&((il=o.tools.continue)==null?void 0:il.snippet)]})})]}),c.jsx("button",{onClick:()=>P(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),c.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(F=>{var ze;const fe=b.find(Ve=>Ve.role===F),Pe=fe?k.includes(fe.name):!1;return c.jsxs("div",{onClick:()=>ae(F),className:he("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",Pe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":fe?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:he("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",uy(F)),children:F}),Pe&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:fe==null?void 0:fe.name,children:fe?(ze=fe.name.split("/").pop())==null?void 0:ze.replace(/\.gguf$/i,""):"nicht zugewiesen"}),c.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},F)})})]}),(l==null?void 0:l.current)&&c.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ps,{className:"h-4.5 w-4.5 text-indigo-400"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),l.current.version!=null&&c.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",l.current.version]})]}),c.jsx("button",{onClick:()=>G(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:l.current.name,children:l.current.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsx("span",{children:l.current.params_b?`${l.current.params_b}B`:"—"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:l.current.quant||"GGUF"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:Br(l.current.size_bytes||0)})]})]}),l.update_available&&l.recommended?c.jsxs("button",{onClick:()=>tt(l.recommended.repo),className:he("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",l.budget&&!l.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[c.jsx(no,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):c.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[c.jsx(An,{className:"h-4 w-4"})," Neueste Generation"]})]}),l.update_available&&l.recommended&&c.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",c.jsx("span",{className:"font-mono font-bold",children:l.recommended.name.replace(/-GGUF$/i,"")}),"(v",l.recommended.version,", ",l.recommended.params_b,"B) — von NousResearch."]}),l.budget&&c.jsxs("div",{className:he("text-[10px] flex items-start gap-1.5 leading-relaxed",l.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[c.jsx(Lm,{className:"h-3 w-3 shrink-0 mt-0.5"}),c.jsxs("span",{children:["Always-On-Brain ~",l.budget.brain_gb," GB + größtes on-demand (~",l.budget.largest_ondemand_gb," GB) = ",(l.budget.brain_gb+l.budget.largest_ondemand_gb).toFixed(1)," / ",l.budget.gtt_gb," GB",l.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[c.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",oe.length," von ",b.length,")"]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>Q("all"),className:he("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),c.jsx("button",{onClick:()=>Q("in_use"),className:he("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",me==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>ke("grid"),className:he("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),c.jsx("button",{onClick:()=>ke("list"),className:he("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ge==="grid"?c.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:oe.length===0?c.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:me==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):oe.map(F=>{const fe=k.includes(F.name),Pe=u==null?void 0:u.model_list.find(Ve=>Ve.role===F.role),ze=dw(F.name);return c.jsxs("div",{className:he("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",fe?"border-primary/45 shadow-primary/5":F.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"flex items-start justify-between gap-3",children:c.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[c.jsx("div",{className:he("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",ze.color),title:ze.name,children:ze.initial}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:F.name,children:F.name.split("/").pop()}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:F.quant||"GGUF"}),fe&&c.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[c.jsx(pu,{className:"h-3 w-3 animate-pulse"})," Warm"]}),F.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:F.role}),F.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),F.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${F.spec_draft_model})`,children:"SPEC"}):F.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${F.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,F.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${F.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",F.parallel_slots]}),F.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),c.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:c.jsx(mN,{caps:F.capabilities})})]}),c.jsxs("div",{className:"space-y-3 pt-1",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(Lm,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),c.jsx("div",{className:"text-foreground font-semibold",children:Br(F.size_bytes)})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(oI,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),c.jsx("div",{className:"text-foreground font-semibold",children:lw(F.ctx)})]})]})]}),Pe&&c.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),c.jsxs("span",{children:["Upgrade verfügbar: ",Pe.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>ce(Pe.repo,F.role,F.quant||"Q4_K_M",F.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[c.jsx(no,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[c.jsx("button",{onClick:()=>fe?J(F.name):Ce(F.name),disabled:F.incomplete&&!fe,className:he("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",F.incomplete&&!fe?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":fe?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:fe?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Xe(F.name,F.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>U(F),className:he("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",F.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":F.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(ls,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Y(F.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:c.jsx(Vv,{className:"h-3.5 w-3.5"})})]})]})]},F.name)})}):c.jsx("div",{className:"space-y-2",children:oe.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:me==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):oe.map(F=>{const fe=k.includes(F.name),Pe=dw(F.name);return c.jsxs("div",{className:he("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",fe?"border-primary/45":F.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[c.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[c.jsx("div",{className:he("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Pe.color),title:Pe.name,children:Pe.initial}),c.jsxs("div",{className:"min-w-0 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:F.name,children:F.name.split("/").pop()}),F.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:F.role}),F.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),F.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${F.spec_draft_model})`,children:"SPEC"}):F.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${F.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,F.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${F.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",F.parallel_slots]}),F.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),fe&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsxs("span",{children:["Größe: ",Br(F.size_bytes)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Kontext: ",lw(F.ctx)]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:"font-mono text-[9px]",children:F.quant||"GGUF"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[c.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:c.jsx(mN,{caps:F.capabilities})}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("button",{onClick:()=>fe?J(F.name):Ce(F.name),disabled:F.incomplete&&!fe,className:he("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",F.incomplete&&!fe?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":fe?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:fe?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>Xe(F.name,F.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>U(F),className:he("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",F.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":F.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(ls,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Y(F.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:c.jsx(Vv,{className:"h-3.5 w-3.5"})})]})]})]},F.name)})})]}),O&&(()=>{var Ve,qt;const F=_&&_.role===O?_:null,fe={};F==null||F.models.forEach(Ze=>{fe[Ze.name]=Ze});const Pe=F?F.models.map(Ze=>b.find(vt=>vt.name===Ze.name)).filter(Boolean):b,ze=Ze=>{Oe(O,Ze),A(null)};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),c.jsx("button",{onClick:()=>A(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für die Rolle ",c.jsx("strong",{className:"text-foreground",children:O}),":"]}),(F==null?void 0:F.recommended)&&c.jsxs("button",{onClick:()=>ze(F.recommended),title:(Ve=fe[F.recommended])==null?void 0:Ve.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[c.jsx(ls,{className:"h-3 w-3"})," Auto: ",(qt=F.recommended.split("/").pop())==null?void 0:qt.replace(/\.gguf$/i,"")]})]}),c.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[c.jsx("button",{onClick:()=>ze(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:c.jsx("span",{children:"Zuweisung entfernen"})}),Pe.map(Ze=>{var ol;const vt=fe[Ze.name],ga=Ze.role===O,al=!!(vt!=null&&vt.recommended),uc=!!vt&&!vt.suitable;return c.jsxs("button",{onClick:()=>ze(Ze.name),className:he("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",al?"border-primary/50 bg-primary/10":ga?"text-primary font-bold bg-primary/5 border-primary/30":uc?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[c.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[c.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(ol=Ze.name.split("/").pop())==null?void 0:ol.replace(/\.gguf$/i,""),al&&c.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:vt?`${vt.params_b}B · ${Ze.quant} · ${vt.reason}`:`${Br(Ze.size_bytes)} · ${Ze.quant}`})]}),ga&&c.jsx(An,{className:"h-4 w-4 shrink-0 text-primary"})]},Ze.name)})]})]})})})(),I&&c.jsx(RQ,{model:I,onClose:()=>U(null),onChanged:S}),B&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(Ps,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),c.jsx("button",{onClick:()=>G(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",c.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",c.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),c.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:b.map(F=>{var Pe;const fe=F.role==="hermes";return c.jsxs("button",{onClick:()=>!fe&&kr(F.name),disabled:fe||F.incomplete,className:he("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",fe?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":F.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(Pe=F.name.split("/").pop())==null?void 0:Pe.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[F.capabilities.params_b?`${F.capabilities.params_b}B`:"?"," · ",Br(F.size_bytes),F.role&&` · Rolle: ${F.role}`,F.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),fe?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[c.jsx(An,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},F.name)})}),c.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[c.jsx("span",{children:"💡"}),c.jsxs("span",{children:["Für einen ",c.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),x]})}function LQ(){const[e,t]=y.useState(""),[r,n]=y.useState([]),[a,o]=y.useState("Q4_K_M"),[u,l]=y.useState(""),[f,h]=y.useState(""),[p,v]=y.useState(""),[x,b]=y.useState([]),[k,j]=y.useState(null),[S,N]=y.useState(!1),P=["fast","heavy","coder","vision","scout"],{data:O}=vo(),A=f?O==null?void 0:O.models.find(R=>(R.role||"").toLowerCase()===f):void 0;async function _(R,de,Z){if(N(!1),!R.trim()){j(null);return}try{const ge=await De(`/api/fit?params_b=0&quant=${encodeURIComponent(de)}&ctx=8192&name=${encodeURIComponent(R)}&role=${encodeURIComponent(Z)}`);j(ge)}catch{j(null)}}async function C(R){const de=R??e;if(de.trim()){l("Analysiere HuggingFace Repository..."),j(null);try{const Z=await De(`/api/hf/quants?repo=${encodeURIComponent(de)}`);t(Z.repo),n(Z.quants);const ge=Z.quants.length?Z.quants.includes("Q4_K_M")?"Q4_K_M":Z.quants[0]:a;Z.quants.length&&o(ge),l(Z.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),Z.quants.length&&_(Z.repo,ge,f)}catch(Z){l(`Fehler: ${Z}`)}}}function I(R){o(R),_(e,R,f)}function U(R){h(R),r.length&&_(e,a,R)}async function B(){if(p.trim()){l("Durchsuche HuggingFace...");try{const R=await De(`/api/hf/search?q=${encodeURIComponent(p)}`);b(R.results),l(R.results.length?"":"Keine Ergebnisse gefunden.")}catch(R){l(`Suche fehlgeschlagen: ${R}`)}}}async function G(){if(e.trim()){if((k==null?void 0:k.fit.level)==="too_tight"&&!S){N(!0);return}l("Download-Job wird initiiert...");try{await De("/api/models/install",{method:"POST",body:JSON.stringify({repo:e,quant:a,role:f||void 0,jinja:!0})}),N(!1),l(`Download gestartet: ${e} (${a})${f?`, Rolle: ${f}`:""}. Fortschritt oben.`+(A?`${f}" wurde von ${A.name} übernommen.`:"")+(f==="fast"||f==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(R){l(`Download-Fehler: ${R}`)}}}const q=(k==null?void 0:k.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(k==null?void 0:k.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return c.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[c.jsx("input",{value:e,onChange:R=>{t(R.target.value),j(null),N(!1)},placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>C(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),r.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("select",{value:a,onChange:R=>I(R.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:r.map(R=>c.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))}),c.jsxs("select",{value:f,onChange:R=>U(R.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[c.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),P.map(R=>c.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))]}),c.jsx("button",{onClick:G,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${S?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:S?c.jsxs(c.Fragment,{children:[c.jsx(yu,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):c.jsxs(c.Fragment,{children:[c.jsx(no,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),k&&c.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${q}`,children:[c.jsx("span",{className:"font-bold uppercase tracking-wide",children:k.fit.text}),c.jsxs("span",{className:"font-mono opacity-90",children:["~",k.params_b,"B · ~",k.fit.req_gb," GB / ",k.sys_ram_gb," GB RAM · ~",k.fit.tps," t/s"]}),k.fit.level!=="too_tight"&&c.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${k.budget.gtt_gb} GB reserviert ${k.budget.reserved_gb} GB (${k.budget.mode}) → ${k.budget.budget_gb} GB frei`,children:["ctx → ",(k.assigned_ctx/1024).toFixed(0),"k"]}),k.fit.level==="too_tight"&&c.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),A&&c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] font-medium text-amber-400",children:[c.jsx(yu,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),c.jsxs("span",{children:["Rolle ",c.jsxs("strong",{children:["„",f,'"']})," ist aktuell ",c.jsx("strong",{children:A.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",A.name," bleibt installiert, verliert sie aber."]})]}),c.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:p,onChange:R=>v(R.target.value),onKeyDown:R=>R.key==="Enter"&&B(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(ty,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsx("button",{onClick:B,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),x.length>0&&c.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:x.map(R=>c.jsxs("button",{onClick:()=>{t(R.repo),b([]),v(""),C(R.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[c.jsx("span",{className:"font-semibold truncate",children:R.repo}),c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[c.jsx(no,{className:"h-3 w-3"})," ",R.downloads.toLocaleString()]})]},R.repo))}),u&&c.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:u})]})}const zQ={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ls},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:mu},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Hv},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Gv},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Kv}};function FQ(){const{data:e,isLoading:t,error:r}=A3(),{data:n}=vo(),{data:a}=sy(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[l,f]=y.useState({}),[h,p]=y.useState({}),[v,x]=y.useState(!1);async function b(k,j,S,N){f(P=>({...P,[k]:"Starte..."}));try{await De("/api/models/install",{method:"POST",body:JSON.stringify({repo:k,role:j,quant:S,jinja:N})}),f(P=>({...P,[k]:"Download läuft"}))}catch{f(O=>({...O,[k]:"Fehler"}))}}return t?c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",u,")."]}):c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[c.jsxs("div",{children:["Modell-Registry geladen für ",c.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(qN,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),c.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(k=>{const j=zQ[k.role]||{title:k.title||k.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:vu},S=j.icon,N=o.find(I=>I.role===k.role),P=a==null?void 0:a.model_list.find(I=>I.role===k.role),O=k.models.find(I=>I.repo===k.recommended)||k.models[0];if(!O)return null;const A=l[O.repo],_=k.models.filter(I=>I.repo!==k.recommended),C=!!h[k.role];return c.jsxs("div",{className:he("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:c.jsx(S,{className:"h-5.5 w-5.5"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:j.title}),c.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",k.role]})]})]}),N?c.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):c.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.desc}),c.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[c.jsxs("span",{children:["Größe: ",Jv(N.size_bytes||0)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:O.name,children:O.name}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[c.jsxs("span",{children:["Ersteller: ",O.author]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",O.quant]})]}),c.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:c.jsx(cD,{fit:O.fit})})]})}),c.jsx("div",{className:"pt-1",children:N?P?c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),c.jsxs("span",{children:["Bessere Version in der Registry: ",P.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>b(P.repo,k.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!l[P.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[c.jsx(no,{className:"h-3.5 w-3.5"}),l[P.repo]||"Auf neue Version aktualisieren"]})]}):c.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[c.jsx(An,{className:"h-4 w-4"})," Auf neuestem Stand"]}):c.jsxs("button",{onClick:()=>b(O.repo,k.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!A,className:he("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",A?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[c.jsx(no,{className:"h-3.5 w-3.5"}),A||"Optimales Modell einsetzen"]})})]}),_.length>0&&c.jsxs("div",{className:"border-t border-border/20 pt-3",children:[c.jsxs("button",{onClick:()=>p(I=>({...I,[k.role]:!C})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[C?c.jsx(qM,{className:"h-3 w-3"}):c.jsx(GM,{className:"h-3 w-3"}),c.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),C&&c.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(I=>c.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:I.name,children:I.name}),c.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[c.jsxs("span",{children:["Quant: ",I.quant]}),c.jsx("span",{children:"•"}),c.jsx("span",{children:I.fit.text})]})]}),c.jsx("button",{onClick:()=>b(I.repo,k.role,I.quant||"Q4_K_M",I.caps.tools!=="no"),disabled:!!l[I.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:l[I.repo]||"Installieren"})]},I.repo))})]})]},k.role)})}),c.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[c.jsxs("button",{onClick:()=>x(!v),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ty,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),c.jsx("span",{className:"text-[10px] text-primary hover:underline",children:v?"Ausblenden ▲":"Anzeigen ▼"})]}),v&&c.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:c.jsx(LQ,{})})]})]})}function BQ(){const[e,t]=y.useState("cockpit");return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),c.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>c.jsx("button",{onClick:()=>t(r),className:he("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),c.jsx(DQ,{}),c.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?c.jsx($Q,{}):c.jsx(FQ,{})})]})}function UQ(){const[e,t]=y.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=y.useState(localStorage.getItem("mc_mcp_path")||""),[a,o]=y.useState("cline"),[u,l]=y.useState(!1),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:p}=_2(f.toString()),v=p?String(p):"";function x(S){t(S),S&&localStorage.setItem("mc_host",S)}function b(S){n(S),localStorage.setItem("mc_mcp_path",S)}const k=h==null?void 0:h.tools[a];async function j(){k&&(await navigator.clipboard.writeText(k.snippet),l(!0),setTimeout(()=>l(!1),1500))}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(eI,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),c.jsx("input",{value:e,onChange:S=>x(S.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(JM,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),c.jsx("input",{value:r,onChange:S=>b(S.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),v&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",v]}),h&&c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(h.tools).map(([S,N])=>c.jsx("button",{onClick:()=>o(S),className:he("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a===S?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:N.label},S))}),k&&c.jsxs("div",{className:"space-y-3",children:[k.note&&c.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[c.jsx(tI,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),c.jsx("span",{children:k.note})]}),c.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[c.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[c.jsx(nf,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{children:a==="cline"||a==="cursor"?"config.json":"settings.json"})]}),c.jsxs("button",{onClick:j,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[u?c.jsx(An,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(KN,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:u?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:c.jsx("code",{children:k.snippet})})]})]})]})]})}const vN=["user","instruction","stable","versioned","ephemeral"],Av={user:{label:"User",icon:pI,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:cI,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:gu,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:hI,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:YM,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},gN={label:"Gedächtnis",icon:WN,bg:"bg-muted/10",text:"text-muted-foreground"},WQ={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function HQ(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[a,o]=y.useState(""),[u,l]=y.useState("stable"),[f,h]=y.useState(!1),p=po(),{showAlert:v,showConfirm:x,dialogElement:b}=Zs(),{data:k=[],error:j}=M2({q:r,category:e}),S=j?String(j):"",N=()=>p.invalidateQueries({queryKey:["memory"]});async function P(){a.trim()&&(await De("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"ui"})}),o(""),N())}async function O(_){await De(`/api/memory/${_}`,{method:"DELETE"}),N()}async function A(){h(!0);try{const _=await De("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(_.duplicate_count===0){v("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}x("Deduplizierung bestätigen",`${_.duplicate_count} Dublette(n) in ${_.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await De("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),N()}catch(C){v("Fehler",`Fehler beim Löschen: ${C.message}`)}})}catch(_){v("Fehler",`Fehler bei der Deduplizierung: ${_.message}`)}finally{h(!1)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),c.jsxs("button",{onClick:A,disabled:f,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50 shrink-0 self-start",children:[c.jsx(fI,{className:"h-4 w-4 text-primary animate-pulse"}),c.jsx("span",{children:"Deduplizieren"})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),c.jsx("textarea",{value:a,onChange:_=>o(_.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),c.jsx("select",{value:u,onChange:_=>l(_.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:vN.map(_=>{var C;return c.jsx("option",{value:_,className:"bg-popover text-foreground",children:((C=Av[_])==null?void 0:C.label)||_},_)})})]}),c.jsxs("button",{onClick:P,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[c.jsx(GN,{className:"h-4 w-4"})," Speichern"]})]})]}),c.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:r,onChange:_=>n(_.target.value),placeholder:"Gedächtnis durchsuchen...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(ty,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[c.jsx("button",{onClick:()=>t(""),className:he("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),vN.map(_=>{const C=Av[_]||gN,I=C.icon;return c.jsxs("button",{onClick:()=>t(_),className:he("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",e===_?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(I,{className:"h-3 w-3"}),c.jsx("span",{children:C.label})]},_)})]})]}),S&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",S]}),c.jsx("div",{className:"space-y-3",children:k.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):k.map(_=>{const C=Av[_.category]||gN,I=C.icon;return c.jsxs("div",{className:he("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",WQ[_.category]||"border-l-muted"),children:[c.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[c.jsxs("span",{className:he("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",C.bg,C.text),children:[c.jsx(I,{className:"h-3 w-3"}),c.jsx("span",{className:"hidden sm:inline",children:C.label})]}),c.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:_.content})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-background/20 px-1.5 py-0.5 rounded uppercase tracking-wider",children:_.source}),c.jsx("button",{onClick:()=>O(_.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:c.jsx(Vv,{className:"h-3.5 w-3.5"})})]})]},_.id)})}),b]})}function Kd({label:e,ok:t,detail:r,icon:n,onClick:a}){return c.jsxs("div",{onClick:a,className:he("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",t?"border-border/60":"border-amber-500/30",a&&"cursor-pointer hover:bg-card/70"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:e}),c.jsx(n,{className:he("h-4.5 w-4.5",t?"text-primary":"text-amber-500")})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:he("h-2 w-2 rounded-full ring-2 ring-black/40",t?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:t?"Bereit / Online":"Offline / Inaktiv"})]}),r&&c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:r,children:r})]}),a&&c.jsxs("button",{onClick:o=>{o.stopPropagation(),a()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[c.jsx(_n,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Gehirn wechseln"})]})]})}function KQ(){const{data:e,error:t}=O2(5e3),{data:r}=vo(),{showAlert:n,dialogElement:a}=Zs(),o=po(),u=t?String(t):"",l=y.useMemo(()=>["auto","fast","heavy",...((r==null?void 0:r.models)??[]).map(_=>{var C;return((C=_.name.split("/").pop())==null?void 0:C.replace(".gguf",""))||_.name})],[r]),[f,h]=y.useState(null),[p,v]=y.useState(!1),[x,b]=y.useState({width:800,height:360}),k=y.useRef(null),j=y.useCallback(A=>{if(k.current&&(k.current.disconnect(),k.current=null),A){const _=new ResizeObserver(C=>{if(!C||C.length===0)return;const I=C[0].contentRect;b({width:I.width,height:I.height})});_.observe(A),k.current=_}},[]),S=x.width,N=x.height,P=(A,_,C,I)=>{const U=(A+C)/2;return`M ${A} ${_} C ${U} ${_}, ${U} ${I}, ${C} ${I}`};async function O(A){try{await De("/api/agent/brain",{method:"POST",body:JSON.stringify({model:A})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${A}' geändert. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:Et.agentStatus}),v(!1)}catch(_){n("Fehler",`Fehler beim Wechseln des Gehirns: ${_.message}`)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",c.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.webui_url)&&c.jsxs("a",{href:ku(e.webui_url),target:"_blank",rel:"noopener",className:he("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[c.jsx(rf,{className:"h-4 w-4"}),c.jsx("span",{children:"AnythingLLM öffnen"})]})]}),u&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",u,")."]}),e&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[c.jsx(Kd,{label:"Agent Gateway",ok:e.gateway_reachable,detail:"Port :8642 (REST API)",icon:Ps}),c.jsx(Kd,{label:"AnythingLLM",ok:e.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:pu}),c.jsx(Kd,{label:"Aktives Gehirn",ok:e.gateway_reachable,detail:e.brain_model?`Model: ${e.brain_model}`:"Model: auto",icon:_n,onClick:()=>v(!0)}),c.jsx(Kd,{label:"Verdrahtung",ok:e.has_config,detail:`Config: ${e.has_config?"✓":"—"} · Skills: ${e.has_skills?"✓":"—"} · Memory: ${e.has_memories?"✓":"—"}`,icon:xu})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),c.jsxs("div",{ref:j,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:P(S*.15,N*.5,S*.5,N*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="webui"||e.webui_reachable)&&c.jsx("path",{d:P(S*.15,N*.5,S*.5,N*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="brain"||e.gateway_reachable)&&c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="wiring"||e.gateway_reachable)&&c.jsx("path",{d:P(S*.5,N*.5,S*.85,N*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>h("webui"),onMouseLeave:()=>h(null),onClick:()=>e.webui_reachable&&window.open(ku(e.webui_url),"_blank"),title:e.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[c.jsx(pu,{className:he("h-3.5 w-3.5",e.webui_reachable?"text-emerald-400":"text-amber-500")}),c.jsx("span",{children:"AnythingLLM"}),c.jsx("span",{className:he("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",e.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),c.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>h("gateway"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Ps,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),c.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),c.jsx("div",{className:he("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",e.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:e.gateway_reachable?"Online":"Offline"})]}),c.jsxs("div",{className:he("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",e.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>h("brain"),onMouseLeave:()=>h(null),onClick:()=>v(!0),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(_n,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),e.gateway_reachable&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:e.brain_model,children:e.brain_model||"auto"})]}),c.jsxs("div",{className:he("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",e.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>h("wiring"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(xu,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),e.has_config&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[c.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),c.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),c.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(iI,{className:"h-5 w-5 text-primary"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:he("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("p",{children:["Der ",c.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),c.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),c.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?c.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[c.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),c.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder WebUI Befehle auf TobisNicerPC ausführen. Nutze ",c.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",c.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",c.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),c.jsxs("p",{children:["Starte ",c.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",c.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),c.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(gu,{className:"h-5 w-5 text-amber-500"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[c.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),c.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",c.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),c.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[c.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),c.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",c.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&p&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>v(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:l.map(A=>{const _=["auto","fast","heavy"].includes(A);return c.jsxs("button",{onClick:()=>O(A),className:he("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",e.brain_model===A||!e.brain_model&&A==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:A}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:_?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(e.brain_model===A||!e.brain_model&&A==="auto")&&c.jsx(An,{className:"h-4 w-4 shrink-0 text-primary"})]},A)})})]})}),a]})}function GQ(){const[e,t]=y.useState("connect"),[r,n]=y.useState("roocode"),[a,o]=y.useState(null),u="192.168.178.151",[l,f]=y.useState(!1),[h,p]=y.useState(null);function v(){f(!0),De("/api/health").then(x=>{o(x),p(x.engine_reachable?"success":"partial")}).catch(()=>{o(null),p("fail")}).finally(()=>f(!1))}return y.useEffect(()=>{v()},[]),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),c.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[c.jsx("button",{onClick:()=>t("connect"),className:he("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),c.jsx("button",{onClick:()=>t("concepts"),className:he("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),e==="connect"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:he("h-3 w-3 rounded-full ring-2 ring-black/40",h==="success"&&"bg-emerald-500 animate-pulse",h==="partial"&&"bg-amber-500",h==="fail"&&"bg-red-500",!h&&"bg-muted")}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),c.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[h==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(a==null?void 0:a.version)||""}).`,h==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",h==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!h&&"Verbindung wird geprüft..."]})]})]}),c.jsxs("button",{onClick:v,disabled:l,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[c.jsx(su,{className:he("h-3.5 w-3.5",l&&"animate-spin")}),c.jsx("span",{children:"Testen"})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(WN,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(_n,{className:"h-4 w-4 text-cyan-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(vu,{className:"h-4 w-4 text-violet-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",c.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(mu,{className:"h-4 w-4 text-indigo-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(Hv,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),c.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[c.jsxs("button",{onClick:()=>n("roocode"),className:he("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",r==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[c.jsx(qN,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),c.jsx("button",{onClick:()=>n("cursor"),className:he("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),c.jsx("button",{onClick:()=>n("opencode"),className:he("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r==="roocode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),c.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),c.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),c.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),c.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",c.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",c.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),r==="cursor"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),c.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),c.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",c.jsx("strong",{children:"Models"}),"."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),c.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",c.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),c.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",c.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),r==="opencode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),c.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),c.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),c.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),c.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(nf,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),c.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",c.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",c.jsx("strong",{children:"Restart"}),"."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in AnythingLLM einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[c.jsx(Kv,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),c.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(vu,{className:"h-5 w-5 text-cyan-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),c.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",c.jsx("em",{children:"Experts"}),"). Ein intelligenter ",c.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[c.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(Kv,{className:"h-5 w-5 text-violet-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),c.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(mu,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",c.jsx("code",{children:".agents/skills/<name>"})," in deinem Projekt an. Das Herzstück ist die Datei ",c.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),c.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`---
name: tdd-pro
description: Drive development with strict TDD practices
---
# Instructions
...`}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",c.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",c.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills find"}),c.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Globaler Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",c.jsx("i",{children:"code-simplification"}),", ",c.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Projekt-Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",c.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(_n,{className:"h-5 w-5 text-indigo-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),c.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),c.jsx("p",{children:c.jsx("strong",{children:"Best Practices für Hermes:"})}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",c.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (AnythingLLM-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(xu,{className:"h-5 w-5 text-amber-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),c.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(nf,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),c.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",c.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(Hv,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),c.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",c.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(xu,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),c.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(gu,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[c.jsxs("p",{children:["Mission Control 2 ist als ",c.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(U1,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),c.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),c.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(U1,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),c.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[c.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function VQ({title:e,hint:t}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),c.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[c.jsx(ZM,{className:"h-8 w-8 text-muted-foreground"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const qQ=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-dashboard",label:"Hermes Dashboard",type:"user"},{id:"hermes-webui",label:"Hermes WebUI",type:"user"}];function Cv(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function QQ({open:e,onClose:t,defaultTab:r="maintenance"}){const[n,a]=y.useState(null),[o,u]=y.useState([]),[l,f]=y.useState("llama-swap"),[h,p]=y.useState(""),[v,x]=y.useState(!1),[b,k]=y.useState(null),[j,S]=y.useState({}),[N,P]=y.useState("maintenance"),[O,A]=y.useState(!1),[_,C]=y.useState(""),[I,U]=y.useState(!1),[B,G]=y.useState(null);function q(Y,ce,tt){G({type:"alert",title:Y,message:ce,onConfirm:()=>{G(null),tt&&tt()}})}function R(Y,ce,tt){G({type:"confirm",title:Y,message:ce,onConfirm:()=>{G(null),tt()},onCancel:()=>G(null)})}function de(Y){return Y?new Date(Y*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[Z,ge]=y.useState(""),[ke,me]=y.useState(""),[Q,oe]=y.useState(!1),[X,$]=y.useState(!1);y.useEffect(()=>{e&&(ge(localStorage.getItem("mc_sudo_password")||""),me(localStorage.getItem("mc_hf_token")||""))},[e]),y.useEffect(()=>{e&&r&&P(r)},[e,r]);const T=y.useRef(null);function ee(){De("/api/maintenance/updates").then(a).catch(Y=>console.error("Error loading updates",Y))}function ne(){De("/api/jobs").then(Y=>u(Y.jobs||[])).catch(Y=>console.error("Error loading jobs",Y))}function te(Y){x(!0),k(null),De(`/api/maintenance/logs?service=${Y}&lines=150`).then(ce=>{ce.ok?p(ce.text):(p(`Fehler beim Laden der Logs: ${ce.err||"Unbekannter Fehler"}`),(ce.status==="incorrect_password"||ce.status==="password_required")&&k(ce.status))}).catch(ce=>p(`Fehler: ${ce.message}`)).finally(()=>{x(!1),setTimeout(()=>{T.current&&(T.current.scrollTop=T.current.scrollHeight)},50)})}y.useEffect(()=>{if(!e)return;ee(),ne();const Y=setInterval(()=>{ne(),ee()},3e3);return()=>clearInterval(Y)},[e]),y.useEffect(()=>{!e||N!=="logs"||te(l)},[e,N,l]);async function ue(){try{await De("/api/maintenance/os-update",{method:"POST"}),ne(),P("maintenance")}catch(Y){q("Fehler",`Fehler beim Starten des OS-Updates: ${Y.message}`)}}async function pe(){try{await De("/api/maintenance/engine-update",{method:"POST"}),ne(),P("maintenance")}catch(Y){q("Fehler",`Fehler beim Engine-Update: ${Y.message}`)}}async function Ce(){A(!0);try{await De("/api/maintenance/check-updates",{method:"POST"}),ne(),P("maintenance")}catch(Y){q("Fehler",`Fehler bei der Update-Suche: ${Y.message}`)}finally{A(!1)}}async function J(Y,ce){try{await De("/api/models/install",{method:"POST",body:JSON.stringify({repo:Y,role:ce})}),q("Gestartet",`Modell-Upgrade für '${ce}' (${Y}) gestartet.`),ne(),P("maintenance")}catch(tt){q("Fehler",`Fehler beim Starten des Modell-Upgrades: ${tt.message}`)}}async function je(){R("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await De("/api/maintenance/reboot",{method:"POST"}),q("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(Y){q("Fehler",`Fehler beim Reboot: ${Y.message}`)}})}async function Oe(){U(!0),C("Snapshot wird erzeugt...");try{const Y=await De("/api/system/backup",{method:"POST"});C(Y.ok?`Snapshot erzeugt: ${Y.snapshot} (${Y.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(Y){C(`Fehler: ${Y.message}`)}finally{U(!1)}}async function ae(Y){S(ce=>({...ce,[Y]:!0}));try{const ce=await De("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:Y})});ce.ok?q("Dienst neu gestartet",`Dienst ${Y} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&l===Y&&te(Y)}):q("Fehler",`Fehler beim Neustart: ${ce.err||"Unbekannter Fehler"}`)}catch(ce){q("Fehler",`Fehler beim Neustart: ${ce.message}`)}finally{S(ce=>({...ce,[Y]:!1}))}}async function Xe(Y){try{await De(`/api/jobs/${Y}/cancel`,{method:"POST"}),ne()}catch(ce){q("Fehler",`Fehler beim Abbrechen: ${ce.message}`)}}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:he("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),c.jsxs("div",{className:he("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[c.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(_n,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),c.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:c.jsx(oa,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[c.jsx("button",{onClick:()=>P("maintenance"),className:he("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),c.jsx("button",{onClick:()=>P("logs"),className:he("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),c.jsx("button",{onClick:()=>P("settings"),className:he("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),c.jsxs("div",{className:"flex items-center gap-2",children:[(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",de(n.last_check)]}),c.jsxs("button",{onClick:Ce,disabled:O,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[c.jsx(su,{className:he("h-3 w-3",O&&"animate-spin")}),"Nach Updates suchen"]})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("button",{onClick:ue,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(gu,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.os?`${n.os} Updates verfügbar`:"Auf neuestem Stand"})]}),c.jsxs("button",{onClick:pe,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(VN,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),c.jsxs("button",{onClick:je,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[c.jsx(lI,{className:"h-4.5 w-4.5"}),c.jsxs("div",{children:[c.jsx("div",{children:"Host-System neu starten (Reboot)"}),c.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"System-Backup & Snapshot"}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-background/20 space-y-3",children:[c.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Git-Snapshot der aktuellen Konfigurationen und des System-Zustands erzeugen."}),c.jsxs("button",{onClick:Oe,disabled:I,className:"w-full h-9 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shadow-md shadow-primary/10",children:[c.jsx(uI,{className:he("h-4 w-4",I&&"animate-pulse")})," Snapshot erstellen"]}),_&&c.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]})]}),(n==null?void 0:n.model_list)&&n.model_list.length>0&&c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",de(n.last_check)]})]}),c.jsx("div",{className:"space-y-2",children:n.model_list.map(Y=>c.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold",children:Y.title}),c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:Y.repo}),c.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",Y.role]})]}),c.jsxs("button",{onClick:()=>J(Y.repo,Y.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[c.jsx(no,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},Y.role))})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),c.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(Y=>Y.state==="running"||Y.state==="queued").length," Aktiv"]})]}),c.jsx("div",{className:"space-y-3",children:o.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):o.map(Y=>{const ce=Y.state==="running"||Y.state==="queued";return c.jsxs("div",{className:he("p-3 rounded-xl border transition-all duration-300",ce?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[ce&&c.jsxs("span",{className:"flex h-2 w-2 relative",children:[c.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),c.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),Y.label]}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[c.jsxs("span",{children:["ID: ",Y.id]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:he(Y.state==="done"&&"text-emerald-400",Y.state==="failed"&&"text-red-400",Y.state==="running"&&"text-primary",Y.state==="queued"&&"text-amber-400",Y.state==="canceled"&&"text-muted-foreground"),children:Y.state})]})]}),ce&&c.jsx("button",{onClick:()=>Xe(Y.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),Y.state==="running"&&c.jsxs("div",{className:"mt-3 space-y-1",children:[c.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${Y.progress??0}%`}})}),c.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[c.jsxs("span",{children:[Y.progress??0,"%"]}),Y.done_bytes!=null&&Y.total_bytes!=null&&c.jsxs("span",{children:[Cv(Y.done_bytes)," / ",Cv(Y.total_bytes),Y.rate_bps!=null&&` (${Cv(Y.rate_bps)}/s)`]}),Y.eta_s!=null&&c.jsxs("span",{children:["ETA: ",Y.eta_s,"s"]})]})]})]},Y.id)})})]})]}),N==="logs"&&c.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("select",{value:l,onChange:Y=>f(Y.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:qQ.map(Y=>c.jsxs("option",{value:Y.id,children:[Y.label," (",Y.type==="system"?"systemd-root":"user",")"]},Y.id))}),c.jsxs("button",{onClick:()=>ae(l),disabled:j[l],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[c.jsx(su,{className:he("h-3.5 w-3.5",j[l]&&"animate-spin")}),"Restart"]})]}),c.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[c.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[c.jsx(nf,{className:"h-3 w-3 text-primary"}),c.jsxs("span",{children:["stdout/stderr - ",l]})]}),c.jsx("button",{onClick:()=>te(l),disabled:v,className:"text-muted-foreground hover:text-foreground transition-colors",children:c.jsx(su,{className:he("h-3 w-3",v&&"animate-spin")})})]}),c.jsx("pre",{ref:T,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:b==="password_required"||b==="incorrect_password"?c.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[c.jsx(yu,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),c.jsx("div",{className:"text-xs font-semibold text-amber-300",children:b==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),c.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",l," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),c.jsx("button",{onClick:()=>P("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):v&&!h?c.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||c.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),c.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(gu,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:Q?"text":"password",value:Z,onChange:Y=>ge(Y.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>oe(!Q),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Q?c.jsx(W1,{className:"h-4 w-4"}):c.jsx(Gv,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(rI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:X?"text":"password",value:ke,onChange:Y=>me(Y.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>$(!X),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:X?c.jsx(W1,{className:"h-4 w-4"}):c.jsx(Gv,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),c.jsxs("div",{className:"flex gap-3 pt-2",children:[c.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",Z),localStorage.setItem("mc_hf_token",ke),q("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),c.jsx("button",{onClick:()=>{ge(""),me(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),q("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})]})]}),B&&c.jsx(XO,{type:B.type,title:B.title,message:B.message,onConfirm:B.onConfirm,onCancel:B.onCancel})]})}function YQ(){var v,x,b,k,j;const[e,t]=y.useState("dashboard"),[r,n]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[a,o]=y.useState(!1),[u,l]=y.useState("maintenance"),{data:f}=j3(),{data:h}=oy(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const S=N=>{var O;l(((O=N.detail)==null?void 0:O.tab)||"maintenance"),o(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]);const p=qv.find(S=>S.id===e);return c.jsxs("div",{className:"flex h-full relative",children:[c.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[c.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),c.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),c.jsx(k3,{onNavigate:t}),c.jsx(QQ,{open:a,onClose:()=>o(!1),defaultTab:u}),c.jsxs("aside",{className:he("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",r?"w-16":"w-60"),children:[c.jsxs("div",{className:he("flex items-center py-4 border-b border-border/40 shrink-0",r?"flex-col gap-3 px-2":"justify-between px-5"),children:[c.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[c.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!r&&c.jsxs("div",{className:"leading-tight",children:[c.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),c.jsx("button",{onClick:()=>{n(S=>{const N=!S;return localStorage.setItem("mc_sidebar_collapsed",N.toString()),N})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:r?"Maximieren":"Minimieren",children:r?c.jsx(HN,{className:"h-4 w-4"}):c.jsx(VM,{className:"h-4 w-4"})})]}),c.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:qv.map(S=>c.jsxs("button",{onClick:()=>t(S.id),className:he("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",r?"justify-center p-2.5":"gap-3 px-3 py-2",e===S.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:r?S.label:void 0,children:[c.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0"}),!r&&c.jsx("span",{className:"truncate",children:S.label})]},S.id))}),c.jsx("div",{className:he("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",r?"px-2 text-center":"px-5"),children:r?c.jsx("div",{className:"flex justify-center",children:c.jsx("span",{className:he("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",f?f.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:f?`Engine ${f.engine_reachable?"online":"offline"}`:"Backend offline"})}):c.jsxs("div",{className:"space-y-2 text-left",children:[f?c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:he("h-2 w-2 rounded-full animate-pulse",f.engine_reachable?"bg-emerald-500":"bg-amber-500")}),c.jsxs("span",{className:"truncate",children:["Engine ",f.engine_reachable?"online":"offline"]})]}):c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",c.jsx("span",{className:"truncate",children:"Backend offline"})]}),(h==null?void 0:h.versions)&&c.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[c.jsxs("div",{className:"truncate",title:h.versions.mc2?`${h.versions.mc2.branch}-${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""} (${h.versions.mc2.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"MC2:"})," ",h.versions.mc2?`${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:((v=h.versions.engine)==null?void 0:v.type)==="git"?`${h.versions.engine.branch}-${h.versions.engine.hash}${h.versions.engine.dirty?"*":""} (${h.versions.engine.date})`:((x=h.versions.engine)==null?void 0:x.version_text)||"unbekannt",children:[c.jsx("strong",{children:"Engine:"})," ",((b=h.versions.engine)==null?void 0:b.type)==="git"?`${h.versions.engine.hash}${h.versions.engine.dirty?"*":""}`:((j=(k=h.versions.engine)==null?void 0:k.version_text)==null?void 0:j.split(" ").pop())||"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_ui?`${h.versions.hermes_ui.branch}-${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""} (${h.versions.hermes_ui.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes UI:"})," ",h.versions.hermes_ui?`${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_agent?`${h.versions.hermes_agent.branch}-${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""} (${h.versions.hermes_agent.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes Agent:"})," ",h.versions.hermes_agent?`${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[c.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[c.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:p.hint}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),c.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[c.jsx(XM,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Suchen"}),c.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),c.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&c.jsx(TQ,{}),e==="models"&&c.jsx(BQ,{}),e==="connect"&&c.jsx(UQ,{}),e==="memory"&&c.jsx(HQ,{}),e==="agent"&&c.jsx(KQ,{}),e==="guide"&&c.jsx(GQ,{}),!["dashboard","models","connect","memory","agent","guide"].includes(e)&&c.jsx(VQ,{title:p.label,hint:p.hint})]})]})]})}const XQ=new CM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});nM.createRoot(document.getElementById("root")).render(c.jsx(AN.StrictMode,{children:c.jsx(OM,{client:XQ,children:c.jsx(YQ,{})})}));