Files
mission-control-v2/frontend/dist/assets/index-KW1c6Ww8.js
T
Hitonabi 98360ad31f Frontend: Voice-Umzug in Desktop-App, MC3-Prototyp, UI-Rework-Dateien auf lucy-v2, dist konsistent
- VoiceView + components/voice + lib/voice entfernt (lebt jetzt in client/lucy-desktop)
- mc3/: Basisstation-Prototyp hinter #mc3-Weiche (non-destruktiv)
- roleMeta/useLucyHealth/useExpertMode/ExpertToggle/LucyHealthCard/WarmSetManager (UI-Rework, auf main a341d25 committet, hier nachgezogen)
- dist frisch gebaut (Asset-Stand war inkonsistent: alte geloescht, neue untracked)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 10:29:59 +02:00

664 lines
881 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 VM=Object.defineProperty;var V1=e=>{throw TypeError(e)};var qM=(e,t,r)=>t in e?VM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yl=(e,t,r)=>qM(e,typeof t!="symbol"?t+"":t,r),qp=(e,t,r)=>t.has(e)||V1("Cannot "+r);var L=(e,t,r)=>(qp(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?V1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ye=(e,t,r,n)=>(qp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),He=(e,t,r)=>(qp(e,t,"access private method"),r);var kd=(e,t,r,n)=>({set _(a){ye(e,t,a,r)},get _(){return L(e,t,n)}});function QM(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 c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).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 vy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qp={exports:{}},Xl={},Yp={exports:{}},Ue={};/**
* @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 q1;function YM(){if(q1)return Ue;q1=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"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S(I,M,K){this.props=I,this.context=M,this.refs=k,this.updater=K||b}S.prototype.isReactComponent={},S.prototype.setState=function(I,M){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,M,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(I,M,K){this.props=I,this.context=M,this.refs=k,this.updater=K||b}var A=E.prototype=new N;A.constructor=E,j(A,S.prototype),A.isPureReactComponent=!0;var P=Array.isArray,_=Object.prototype.hasOwnProperty,O={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function U(I,M,K){var ne,Z={},me=null,ge=null;if(M!=null)for(ne in M.ref!==void 0&&(ge=M.ref),M.key!==void 0&&(me=""+M.key),M)_.call(M,ne)&&!D.hasOwnProperty(ne)&&(Z[ne]=M[ne]);var Pe=arguments.length-2;if(Pe===1)Z.children=K;else if(1<Pe){for(var re=Array(Pe),xe=0;xe<Pe;xe++)re[xe]=arguments[xe+2];Z.children=re}if(I&&I.defaultProps)for(ne in Pe=I.defaultProps,Pe)Z[ne]===void 0&&(Z[ne]=Pe[ne]);return{$$typeof:e,type:I,key:me,ref:ge,props:Z,_owner:O.current}}function B(I,M){return{$$typeof:e,type:I.type,key:M,ref:I.ref,props:I.props,_owner:I._owner}}function F(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function Y(I){var M={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(K){return M[K]})}var H=/\/+/g;function pe(I,M){return typeof I=="object"&&I!==null&&I.key!=null?Y(""+I.key):M.toString(36)}function ue(I,M,K,ne,Z){var me=typeof I;(me==="undefined"||me==="boolean")&&(I=null);var ge=!1;if(I===null)ge=!0;else switch(me){case"string":case"number":ge=!0;break;case"object":switch(I.$$typeof){case e:case t:ge=!0}}if(ge)return ge=I,Z=Z(ge),I=ne===""?"."+pe(ge,0):ne,P(Z)?(K="",I!=null&&(K=I.replace(H,"$&/")+"/"),ue(Z,M,K,"",function(xe){return xe})):Z!=null&&(F(Z)&&(Z=B(Z,K+(!Z.key||ge&&ge.key===Z.key?"":(""+Z.key).replace(H,"$&/")+"/")+I)),M.push(Z)),1;if(ge=0,ne=ne===""?".":ne+":",P(I))for(var Pe=0;Pe<I.length;Pe++){me=I[Pe];var re=ne+pe(me,Pe);ge+=ue(me,M,K,re,Z)}else if(re=v(I),typeof re=="function")for(I=re.call(I),Pe=0;!(me=I.next()).done;)me=me.value,re=ne+pe(me,Pe++),ge+=ue(me,M,K,re,Z);else if(me==="object")throw M=String(I),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return ge}function he(I,M,K){if(I==null)return I;var ne=[],Z=0;return ue(I,ne,"","",function(me){return M.call(K,me,Z++)}),ne}function ae(I){if(I._status===-1){var M=I._result;M=M(),M.then(function(K){(I._status===0||I._status===-1)&&(I._status=1,I._result=K)},function(K){(I._status===0||I._status===-1)&&(I._status=2,I._result=K)}),I._status===-1&&(I._status=0,I._result=M)}if(I._status===1)return I._result.default;throw I._result}var se={current:null},X={transition:null},te={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:X,ReactCurrentOwner:O};function J(){throw Error("act(...) is not supported in production builds of React.")}return Ue.Children={map:he,forEach:function(I,M,K){he(I,function(){M.apply(this,arguments)},K)},count:function(I){var M=0;return he(I,function(){M++}),M},toArray:function(I){return he(I,function(M){return M})||[]},only:function(I){if(!F(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Ue.Component=S,Ue.Fragment=r,Ue.Profiler=a,Ue.PureComponent=E,Ue.StrictMode=n,Ue.Suspense=f,Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,Ue.act=J,Ue.cloneElement=function(I,M,K){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var ne=j({},I.props),Z=I.key,me=I.ref,ge=I._owner;if(M!=null){if(M.ref!==void 0&&(me=M.ref,ge=O.current),M.key!==void 0&&(Z=""+M.key),I.type&&I.type.defaultProps)var Pe=I.type.defaultProps;for(re in M)_.call(M,re)&&!D.hasOwnProperty(re)&&(ne[re]=M[re]===void 0&&Pe!==void 0?Pe[re]:M[re])}var re=arguments.length-2;if(re===1)ne.children=K;else if(1<re){Pe=Array(re);for(var xe=0;xe<re;xe++)Pe[xe]=arguments[xe+2];ne.children=Pe}return{$$typeof:e,type:I.type,key:Z,ref:me,props:ne,_owner:ge}},Ue.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:o,_context:I},I.Consumer=I},Ue.createElement=U,Ue.createFactory=function(I){var M=U.bind(null,I);return M.type=I,M},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(I){return{$$typeof:u,render:I}},Ue.isValidElement=F,Ue.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:ae}},Ue.memo=function(I,M){return{$$typeof:h,type:I,compare:M===void 0?null:M}},Ue.startTransition=function(I){var M=X.transition;X.transition={};try{I()}finally{X.transition=M}},Ue.unstable_act=J,Ue.useCallback=function(I,M){return se.current.useCallback(I,M)},Ue.useContext=function(I){return se.current.useContext(I)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(I){return se.current.useDeferredValue(I)},Ue.useEffect=function(I,M){return se.current.useEffect(I,M)},Ue.useId=function(){return se.current.useId()},Ue.useImperativeHandle=function(I,M,K){return se.current.useImperativeHandle(I,M,K)},Ue.useInsertionEffect=function(I,M){return se.current.useInsertionEffect(I,M)},Ue.useLayoutEffect=function(I,M){return se.current.useLayoutEffect(I,M)},Ue.useMemo=function(I,M){return se.current.useMemo(I,M)},Ue.useReducer=function(I,M,K){return se.current.useReducer(I,M,K)},Ue.useRef=function(I){return se.current.useRef(I)},Ue.useState=function(I){return se.current.useState(I)},Ue.useSyncExternalStore=function(I,M,K){return se.current.useSyncExternalStore(I,M,K)},Ue.useTransition=function(){return se.current.useTransition()},Ue.version="18.3.1",Ue}var Q1;function el(){return Q1||(Q1=1,Yp.exports=YM()),Yp.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 Y1;function XM(){if(Y1)return Xl;Y1=1;var e=el(),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 c(u,f,h){var m,g={},v=null,b=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(b=f.ref);for(m in f)n.call(f,m)&&!o.hasOwnProperty(m)&&(g[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:u,key:v,ref:b,props:g,_owner:a.current}}return Xl.Fragment=r,Xl.jsx=c,Xl.jsxs=c,Xl}var X1;function ZM(){return X1||(X1=1,Qp.exports=XM()),Qp.exports}var l=ZM(),y=el();const fN=vy(y),lh=QM({__proto__:null,default:fN},[y]);var jd={},Xp={exports:{}},Sr={},Zp={exports:{}},Jp={};/**
* @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 Z1;function JM(){return Z1||(Z1=1,(function(e){function t(X,te){var J=X.length;X.push(te);e:for(;0<J;){var I=J-1>>>1,M=X[I];if(0<a(M,te))X[I]=te,X[J]=M,J=I;else break e}}function r(X){return X.length===0?null:X[0]}function n(X){if(X.length===0)return null;var te=X[0],J=X.pop();if(J!==te){X[0]=J;e:for(var I=0,M=X.length,K=M>>>1;I<K;){var ne=2*(I+1)-1,Z=X[ne],me=ne+1,ge=X[me];if(0>a(Z,J))me<M&&0>a(ge,Z)?(X[I]=ge,X[me]=J,I=me):(X[I]=Z,X[ne]=J,I=ne);else if(me<M&&0>a(ge,J))X[I]=ge,X[me]=J,I=me;else break e}}return te}function a(X,te){var J=X.sortIndex-te.sortIndex;return J!==0?J:X.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var f=[],h=[],m=1,g=null,v=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var te=r(h);te!==null;){if(te.callback===null)n(h);else if(te.startTime<=X)n(h),te.sortIndex=te.expirationTime,t(f,te);else break;te=r(h)}}function P(X){if(k=!1,A(X),!j)if(r(f)!==null)j=!0,ae(_);else{var te=r(h);te!==null&&se(P,te.startTime-X)}}function _(X,te){j=!1,k&&(k=!1,N(U),U=-1),b=!0;var J=v;try{for(A(te),g=r(f);g!==null&&(!(g.expirationTime>te)||X&&!Y());){var I=g.callback;if(typeof I=="function"){g.callback=null,v=g.priorityLevel;var M=I(g.expirationTime<=te);te=e.unstable_now(),typeof M=="function"?g.callback=M:g===r(f)&&n(f),A(te)}else n(f);g=r(f)}if(g!==null)var K=!0;else{var ne=r(h);ne!==null&&se(P,ne.startTime-te),K=!1}return K}finally{g=null,v=J,b=!1}}var O=!1,D=null,U=-1,B=5,F=-1;function Y(){return!(e.unstable_now()-F<B)}function H(){if(D!==null){var X=e.unstable_now();F=X;var te=!0;try{te=D(!0,X)}finally{te?pe():(O=!1,D=null)}}else O=!1}var pe;if(typeof E=="function")pe=function(){E(H)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,he=ue.port2;ue.port1.onmessage=H,pe=function(){he.postMessage(null)}}else pe=function(){S(H,0)};function ae(X){D=X,O||(O=!0,pe())}function se(X,te){U=S(function(){X(e.unstable_now())},te)}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(X){X.callback=null},e.unstable_continueExecution=function(){j||b||(j=!0,ae(_))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(X){switch(v){case 1:case 2:case 3:var te=3;break;default:te=v}var J=v;v=te;try{return X()}finally{v=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,te){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var J=v;v=X;try{return te()}finally{v=J}},e.unstable_scheduleCallback=function(X,te,J){var I=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?I+J:I):J=I,X){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=J+M,X={id:m++,callback:te,priorityLevel:X,startTime:J,expirationTime:M,sortIndex:-1},J>I?(X.sortIndex=J,t(h,X),r(f)===null&&X===r(h)&&(k?(N(U),U=-1):k=!0,se(P,J-I))):(X.sortIndex=M,t(f,X),j||b||(j=!0,ae(_))),X},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(X){var te=v;return function(){var J=v;v=te;try{return X.apply(this,arguments)}finally{v=J}}}})(Jp)),Jp}var J1;function e3(){return J1||(J1=1,Zp.exports=JM()),Zp.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 ew;function t3(){if(ew)return Sr;ew=1;var e=el(),t=e3();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){c(i,s),c(i+"Capture",s)}function c(i,s){for(a[i]=s,i=0;i<s.length;i++)n.add(s[i])}var u=!(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]*$/,m={},g={};function v(i){return f.call(g,i)?!0:f.call(m,i)?!1:h.test(i)?g[i]=!0:(m[i]=!0,!1)}function b(i,s,d,p){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function j(i,s,d,p){if(s===null||typeof s>"u"||b(i,s,d,p))return!0;if(p)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 k(i,s,d,p,x,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new k(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 k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new k(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 k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(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,E);S[s]=new k(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,E);S[s]=new k(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,E);S[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,d,p){var x=S.hasOwnProperty(s)?S[s]:null;(x!==null?x.type!==0:p||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(j(s,d,x,p)&&(d=null),p||x===null?v(s)&&(d===null?i.removeAttribute(s):i.setAttribute(s,""+d)):x.mustUseProperty?i[x.propertyName]=d===null?x.type===3?!1:"":d:(s=x.attributeName,p=x.attributeNamespace,d===null?i.removeAttribute(s):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,p?i.setAttributeNS(p,s,d):i.setAttribute(s,d))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),O=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),Y=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),he=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),X=Symbol.iterator;function te(i){return i===null||typeof i!="object"?null:(i=X&&i[X]||i["@@iterator"],typeof i=="function"?i:null)}var J=Object.assign,I;function M(i){if(I===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
`+I+i}var K=!1;function ne(i,s){if(!i||K)return"";K=!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(Q){var p=Q}Reflect.construct(i,[],s)}else{try{s.call()}catch(Q){p=Q}i.call(s.prototype)}else{try{throw Error()}catch(Q){p=Q}i()}}catch(Q){if(Q&&p&&typeof Q.stack=="string"){for(var x=Q.stack.split(`
`),w=p.stack.split(`
`),C=x.length-1,T=w.length-1;1<=C&&0<=T&&x[C]!==w[T];)T--;for(;1<=C&&0<=T;C--,T--)if(x[C]!==w[T]){if(C!==1||T!==1)do if(C--,T--,0>T||x[C]!==w[T]){var R=`
`+x[C].replace(" at new "," at ");return i.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",i.displayName)),R}while(1<=C&&0<=T);break}}}finally{K=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?M(i):""}function Z(i){switch(i.tag){case 5:return M(i.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("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 me(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 D:return"Fragment";case O:return"Portal";case B:return"Profiler";case U:return"StrictMode";case pe:return"Suspense";case ue:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case F:return(i._context.displayName||"Context")+".Provider";case H:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case he:return s=i.displayName||null,s!==null?s:me(i.type)||"Memo";case ae:s=i._payload,i=i._init;try{return me(i(s))}catch{}}return null}function ge(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 me(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 Pe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function re(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function xe(i){var s=re(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),p=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){p=""+C,w.call(this,C)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function _e(i){i._valueTracker||(i._valueTracker=xe(i))}function ie(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),p="";return i&&(p=re(i)?i.checked?"true":"false":i.value),i=p,i!==d?(s.setValue(i),!0):!1}function Je(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 Fe(i,s){var d=s.checked;return J({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function Oe(i,s){var d=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;d=Pe(s.value!=null?s.value:d),i._wrapperState={initialChecked:p,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function ut(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function Jt(i,s){ut(i,s);var d=Pe(s.value),p=s.type;if(d!=null)p==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(p==="submit"||p==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?ke(i,s.type,d):s.hasOwnProperty("defaultValue")&&ke(i,s.type,Pe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function W(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="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 ke(i,s,d){(s!=="number"||Je(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var Ae=Array.isArray;function Be(i,s,d,p){if(i=i.options,s){s={};for(var x=0;x<d.length;x++)s["$"+d[x]]=!0;for(d=0;d<i.length;d++)x=s.hasOwnProperty("$"+i[d].value),i[d].selected!==x&&(i[d].selected=x),x&&p&&(i[d].defaultSelected=!0)}else{for(d=""+Pe(d),s=null,x=0;x<i.length;x++){if(i[x].value===d){i[x].selected=!0,p&&(i[x].defaultSelected=!0);return}s!==null||i[x].disabled||(s=i[x])}s!==null&&(s.selected=!0)}}function et(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return J({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ut(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(Ae(d)){if(1<d.length)throw Error(r(93));d=d[0]}s=d}s==null&&(s=""),d=s}i._wrapperState={initialValue:Pe(d)}}function ht(i,s){var d=Pe(s.value),p=Pe(s.defaultValue);d!=null&&(d=""+d,d!==i.value&&(i.value=d),s.defaultValue==null&&i.defaultValue!==d&&(i.defaultValue=d)),p!=null&&(i.defaultValue=""+p)}function ur(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Ca(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 Jn(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?Ca(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ii,Or=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,d,p,x){MSApp.execUnsafeLocalFunction(function(){return i(s,d,p,x)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ii=Ii||document.createElement("div"),Ii.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ii.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Ti(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var $={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},Le=["Webkit","ms","Moz","O"];Object.keys($).forEach(function(i){Le.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),$[s]=$[i]})});function cr(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||$.hasOwnProperty(i)&&$[i]?(""+s).trim():s+"px"}function hc(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var p=d.indexOf("--")===0,x=cr(d,s[d],p);d==="float"&&(d="cssFloat"),p?i.setProperty(d,x):i[d]=x}}var mc=J({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 _r(i,s){if(s){if(mc[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 sm(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 lm=null;function um(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var cm=null,To=null,Do=null;function cx(i){if(i=Dl(i)){if(typeof cm!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Lc(s),cm(i.stateNode,i.type,s))}}function dx(i){To?Do?Do.push(i):Do=[i]:To=i}function fx(){if(To){var i=To,s=Do;if(Do=To=null,cx(i),s)for(i=0;i<s.length;i++)cx(s[i])}}function hx(i,s){return i(s)}function mx(){}var dm=!1;function px(i,s,d){if(dm)return i(s,d);dm=!0;try{return hx(i,s,d)}finally{dm=!1,(To!==null||Do!==null)&&(mx(),fx())}}function ml(i,s){var d=i.stateNode;if(d===null)return null;var p=Lc(d);if(p===null)return null;d=p[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":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var fm=!1;if(u)try{var pl={};Object.defineProperty(pl,"passive",{get:function(){fm=!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{fm=!1}function JO(i,s,d,p,x,w,C,T,R){var Q=Array.prototype.slice.call(arguments,3);try{s.apply(d,Q)}catch(le){this.onError(le)}}var gl=!1,pc=null,gc=!1,hm=null,e_={onError:function(i){gl=!0,pc=i}};function t_(i,s,d,p,x,w,C,T,R){gl=!1,pc=null,JO.apply(e_,arguments)}function r_(i,s,d,p,x,w,C,T,R){if(t_.apply(this,arguments),gl){if(gl){var Q=pc;gl=!1,pc=null}else throw Error(r(198));gc||(gc=!0,hm=Q)}}function Pa(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 gx(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 vx(i){if(Pa(i)!==i)throw Error(r(188))}function n_(i){var s=i.alternate;if(!s){if(s=Pa(i),s===null)throw Error(r(188));return s!==i?null:i}for(var d=i,p=s;;){var x=d.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){d=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===d)return vx(x),i;if(w===p)return vx(x),s;w=w.sibling}throw Error(r(188))}if(d.return!==p.return)d=x,p=w;else{for(var C=!1,T=x.child;T;){if(T===d){C=!0,d=x,p=w;break}if(T===p){C=!0,p=x,d=w;break}T=T.sibling}if(!C){for(T=w.child;T;){if(T===d){C=!0,d=w,p=x;break}if(T===p){C=!0,p=w,d=x;break}T=T.sibling}if(!C)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:s}function yx(i){return i=n_(i),i!==null?xx(i):null}function xx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=xx(i);if(s!==null)return s;i=i.sibling}return null}var bx=t.unstable_scheduleCallback,wx=t.unstable_cancelCallback,i_=t.unstable_shouldYield,a_=t.unstable_requestPaint,bt=t.unstable_now,o_=t.unstable_getCurrentPriorityLevel,mm=t.unstable_ImmediatePriority,kx=t.unstable_UserBlockingPriority,vc=t.unstable_NormalPriority,s_=t.unstable_LowPriority,jx=t.unstable_IdlePriority,yc=null,En=null;function l_(i){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(yc,i,void 0,(i.current.flags&128)===128)}catch{}}var un=Math.clz32?Math.clz32:d_,u_=Math.log,c_=Math.LN2;function d_(i){return i>>>=0,i===0?32:31-(u_(i)/c_|0)|0}var xc=64,bc=4194304;function vl(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 wc(i,s){var d=i.pendingLanes;if(d===0)return 0;var p=0,x=i.suspendedLanes,w=i.pingedLanes,C=d&268435455;if(C!==0){var T=C&~x;T!==0?p=vl(T):(w&=C,w!==0&&(p=vl(w)))}else C=d&~x,C!==0?p=vl(C):w!==0&&(p=vl(w));if(p===0)return 0;if(s!==0&&s!==p&&(s&x)===0&&(x=p&-p,w=s&-s,x>=w||x===16&&(w&4194240)!==0))return s;if((p&4)!==0&&(p|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=p;0<s;)d=31-un(s),x=1<<d,p|=i[d],s&=~x;return p}function f_(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 h_(i,s){for(var d=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes;0<w;){var C=31-un(w),T=1<<C,R=x[C];R===-1?((T&d)===0||(T&p)!==0)&&(x[C]=f_(T,s)):R<=s&&(i.expiredLanes|=T),w&=~T}}function pm(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Sx(){var i=xc;return xc<<=1,(xc&4194240)===0&&(xc=64),i}function gm(i){for(var s=[],d=0;31>d;d++)s.push(i);return s}function yl(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-un(s),i[s]=d}function m_(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 p=i.eventTimes;for(i=i.expirationTimes;0<d;){var x=31-un(d),w=1<<x;s[x]=0,p[x]=-1,i[x]=-1,d&=~w}}function vm(i,s){var d=i.entangledLanes|=s;for(i=i.entanglements;d;){var p=31-un(d),x=1<<p;x&s|i[p]&s&&(i[p]|=s),d&=~x}}var Ze=0;function Nx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Ex,ym,Ax,Cx,Px,xm=!1,kc=[],Di=null,Ri=null,Li=null,xl=new Map,bl=new Map,$i=[],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 Ox(i,s){switch(i){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":xl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":bl.delete(s.pointerId)}}function wl(i,s,d,p,x,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:d,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},s!==null&&(s=Dl(s),s!==null&&ym(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),i)}function g_(i,s,d,p,x){switch(s){case"focusin":return Di=wl(Di,i,s,d,p,x),!0;case"dragenter":return Ri=wl(Ri,i,s,d,p,x),!0;case"mouseover":return Li=wl(Li,i,s,d,p,x),!0;case"pointerover":var w=x.pointerId;return xl.set(w,wl(xl.get(w)||null,i,s,d,p,x)),!0;case"gotpointercapture":return w=x.pointerId,bl.set(w,wl(bl.get(w)||null,i,s,d,p,x)),!0}return!1}function _x(i){var s=Oa(i.target);if(s!==null){var d=Pa(s);if(d!==null){if(s=d.tag,s===13){if(s=gx(d),s!==null){i.blockedOn=s,Px(i.priority,function(){Ax(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 jc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var d=wm(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(d===null){d=i.nativeEvent;var p=new d.constructor(d.type,d);lm=p,d.target.dispatchEvent(p),lm=null}else return s=Dl(d),s!==null&&ym(s),i.blockedOn=d,!1;s.shift()}return!0}function Mx(i,s,d){jc(i)&&d.delete(s)}function v_(){xm=!1,Di!==null&&jc(Di)&&(Di=null),Ri!==null&&jc(Ri)&&(Ri=null),Li!==null&&jc(Li)&&(Li=null),xl.forEach(Mx),bl.forEach(Mx)}function kl(i,s){i.blockedOn===s&&(i.blockedOn=null,xm||(xm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,v_)))}function jl(i){function s(x){return kl(x,i)}if(0<kc.length){kl(kc[0],i);for(var d=1;d<kc.length;d++){var p=kc[d];p.blockedOn===i&&(p.blockedOn=null)}}for(Di!==null&&kl(Di,i),Ri!==null&&kl(Ri,i),Li!==null&&kl(Li,i),xl.forEach(s),bl.forEach(s),d=0;d<$i.length;d++)p=$i[d],p.blockedOn===i&&(p.blockedOn=null);for(;0<$i.length&&(d=$i[0],d.blockedOn===null);)_x(d),d.blockedOn===null&&$i.shift()}var Ro=P.ReactCurrentBatchConfig,Sc=!0;function y_(i,s,d,p){var x=Ze,w=Ro.transition;Ro.transition=null;try{Ze=1,bm(i,s,d,p)}finally{Ze=x,Ro.transition=w}}function x_(i,s,d,p){var x=Ze,w=Ro.transition;Ro.transition=null;try{Ze=4,bm(i,s,d,p)}finally{Ze=x,Ro.transition=w}}function bm(i,s,d,p){if(Sc){var x=wm(i,s,d,p);if(x===null)$m(i,s,p,Nc,d),Ox(i,p);else if(g_(x,i,s,d,p))p.stopPropagation();else if(Ox(i,p),s&4&&-1<p_.indexOf(i)){for(;x!==null;){var w=Dl(x);if(w!==null&&Ex(w),w=wm(i,s,d,p),w===null&&$m(i,s,p,Nc,d),w===x)break;x=w}x!==null&&p.stopPropagation()}else $m(i,s,p,null,d)}}var Nc=null;function wm(i,s,d,p){if(Nc=null,i=um(p),i=Oa(i),i!==null)if(s=Pa(i),s===null)i=null;else if(d=s.tag,d===13){if(i=gx(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 Nc=i,null}function Ix(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(o_()){case mm:return 1;case kx:return 4;case vc:case s_:return 16;case jx:return 536870912;default:return 16}default:return 16}}var zi=null,km=null,Ec=null;function Tx(){if(Ec)return Ec;var i,s=km,d=s.length,p,x="value"in zi?zi.value:zi.textContent,w=x.length;for(i=0;i<d&&s[i]===x[i];i++);var C=d-i;for(p=1;p<=C&&s[d-p]===x[w-p];p++);return Ec=x.slice(i,1<p?1-p:void 0)}function Ac(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 Cc(){return!0}function Dx(){return!1}function Mr(i){function s(d,p,x,w,C){this._reactName=d,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var T in i)i.hasOwnProperty(T)&&(d=i[T],this[T]=d?d(w):w[T]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Cc:Dx,this.isPropagationStopped=Dx,this}return J(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=Cc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Cc)},persist:function(){},isPersistent:Cc}),s}var Lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jm=Mr(Lo),Sl=J({},Lo,{view:0,detail:0}),b_=Mr(Sl),Sm,Nm,Nl,Pc=J({},Sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Am,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!==Nl&&(Nl&&i.type==="mousemove"?(Sm=i.screenX-Nl.screenX,Nm=i.screenY-Nl.screenY):Nm=Sm=0,Nl=i),Sm)},movementY:function(i){return"movementY"in i?i.movementY:Nm}}),Rx=Mr(Pc),w_=J({},Pc,{dataTransfer:0}),k_=Mr(w_),j_=J({},Sl,{relatedTarget:0}),Em=Mr(j_),S_=J({},Lo,{animationName:0,elapsedTime:0,pseudoElement:0}),N_=Mr(S_),E_=J({},Lo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),A_=Mr(E_),C_=J({},Lo,{data:0}),Lx=Mr(C_),P_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},O_={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"},__={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=__[i])?!!s[i]:!1}function Am(){return M_}var I_=J({},Sl,{key:function(i){if(i.key){var s=P_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ac(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?O_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Am,charCode:function(i){return i.type==="keypress"?Ac(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ac(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),T_=Mr(I_),D_=J({},Pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$x=Mr(D_),R_=J({},Sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Am}),L_=Mr(R_),$_=J({},Lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),z_=Mr($_),F_=J({},Pc,{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}),B_=Mr(F_),U_=[9,13,27,32],Cm=u&&"CompositionEvent"in window,El=null;u&&"documentMode"in document&&(El=document.documentMode);var H_=u&&"TextEvent"in window&&!El,zx=u&&(!Cm||El&&8<El&&11>=El),Fx=" ",Bx=!1;function Ux(i,s){switch(i){case"keyup":return U_.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var $o=!1;function W_(i,s){switch(i){case"compositionend":return Hx(s);case"keypress":return s.which!==32?null:(Bx=!0,Fx);case"textInput":return i=s.data,i===Fx&&Bx?null:i;default:return null}}function K_(i,s){if($o)return i==="compositionend"||!Cm&&Ux(i,s)?(i=Tx(),Ec=km=zi=null,$o=!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 zx&&s.locale!=="ko"?null:s.data;default:return null}}var G_={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 Wx(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!G_[i.type]:s==="textarea"}function Kx(i,s,d,p){dx(p),s=Tc(s,"onChange"),0<s.length&&(d=new jm("onChange","change",null,d,p),i.push({event:d,listeners:s}))}var Al=null,Cl=null;function V_(i){ub(i,0)}function Oc(i){var s=Ho(i);if(ie(s))return i}function q_(i,s){if(i==="change")return s}var Gx=!1;if(u){var Pm;if(u){var Om="oninput"in document;if(!Om){var Vx=document.createElement("div");Vx.setAttribute("oninput","return;"),Om=typeof Vx.oninput=="function"}Pm=Om}else Pm=!1;Gx=Pm&&(!document.documentMode||9<document.documentMode)}function qx(){Al&&(Al.detachEvent("onpropertychange",Qx),Cl=Al=null)}function Qx(i){if(i.propertyName==="value"&&Oc(Cl)){var s=[];Kx(s,Cl,i,um(i)),px(V_,s)}}function Q_(i,s,d){i==="focusin"?(qx(),Al=s,Cl=d,Al.attachEvent("onpropertychange",Qx)):i==="focusout"&&qx()}function Y_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Oc(Cl)}function X_(i,s){if(i==="click")return Oc(s)}function Z_(i,s){if(i==="input"||i==="change")return Oc(s)}function J_(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var cn=typeof Object.is=="function"?Object.is:J_;function Pl(i,s){if(cn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var d=Object.keys(i),p=Object.keys(s);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var x=d[p];if(!f.call(s,x)||!cn(i[x],s[x]))return!1}return!0}function Yx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Xx(i,s){var d=Yx(i);i=0;for(var p;d;){if(d.nodeType===3){if(p=i+d.textContent.length,i<=s&&p>=s)return{node:d,offset:s-i};i=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Yx(d)}}function Zx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Zx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Jx(){for(var i=window,s=Je();s instanceof i.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)i=s.contentWindow;else break;s=Je(i.document)}return s}function _m(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 eM(i){var s=Jx(),d=i.focusedElem,p=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&Zx(d.ownerDocument.documentElement,d)){if(p!==null&&_m(d)){if(s=p.start,i=p.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 x=d.textContent.length,w=Math.min(p.start,x);p=p.end===void 0?w:Math.min(p.end,x),!i.extend&&w>p&&(x=p,p=w,w=x),x=Xx(d,w);var C=Xx(d,p);x&&C&&(i.rangeCount!==1||i.anchorNode!==x.node||i.anchorOffset!==x.offset||i.focusNode!==C.node||i.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(x.node,x.offset),i.removeAllRanges(),w>p?(i.addRange(s),i.extend(C.node,C.offset)):(s.setEnd(C.node,C.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 tM=u&&"documentMode"in document&&11>=document.documentMode,zo=null,Mm=null,Ol=null,Im=!1;function eb(i,s,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Im||zo==null||zo!==Je(p)||(p=zo,"selectionStart"in p&&_m(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Ol&&Pl(Ol,p)||(Ol=p,p=Tc(Mm,"onSelect"),0<p.length&&(s=new jm("onSelect","select",null,s,d),i.push({event:s,listeners:p}),s.target=zo)))}function _c(i,s){var d={};return d[i.toLowerCase()]=s.toLowerCase(),d["Webkit"+i]="webkit"+s,d["Moz"+i]="moz"+s,d}var Fo={animationend:_c("Animation","AnimationEnd"),animationiteration:_c("Animation","AnimationIteration"),animationstart:_c("Animation","AnimationStart"),transitionend:_c("Transition","TransitionEnd")},Tm={},tb={};u&&(tb=document.createElement("div").style,"AnimationEvent"in window||(delete Fo.animationend.animation,delete Fo.animationiteration.animation,delete Fo.animationstart.animation),"TransitionEvent"in window||delete Fo.transitionend.transition);function Mc(i){if(Tm[i])return Tm[i];if(!Fo[i])return i;var s=Fo[i],d;for(d in s)if(s.hasOwnProperty(d)&&d in tb)return Tm[i]=s[d];return i}var rb=Mc("animationend"),nb=Mc("animationiteration"),ib=Mc("animationstart"),ab=Mc("transitionend"),ob=new Map,sb="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 Fi(i,s){ob.set(i,s),o(s,[i])}for(var Dm=0;Dm<sb.length;Dm++){var Rm=sb[Dm],rM=Rm.toLowerCase(),nM=Rm[0].toUpperCase()+Rm.slice(1);Fi(rM,"on"+nM)}Fi(rb,"onAnimationEnd"),Fi(nb,"onAnimationIteration"),Fi(ib,"onAnimationStart"),Fi("dblclick","onDoubleClick"),Fi("focusin","onFocus"),Fi("focusout","onBlur"),Fi(ab,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("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 _l="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(" "),iM=new Set("cancel close invalid load scroll toggle".split(" ").concat(_l));function lb(i,s,d){var p=i.type||"unknown-event";i.currentTarget=d,r_(p,s,void 0,i),i.currentTarget=null}function ub(i,s){s=(s&4)!==0;for(var d=0;d<i.length;d++){var p=i[d],x=p.event;p=p.listeners;e:{var w=void 0;if(s)for(var C=p.length-1;0<=C;C--){var T=p[C],R=T.instance,Q=T.currentTarget;if(T=T.listener,R!==w&&x.isPropagationStopped())break e;lb(x,T,Q),w=R}else for(C=0;C<p.length;C++){if(T=p[C],R=T.instance,Q=T.currentTarget,T=T.listener,R!==w&&x.isPropagationStopped())break e;lb(x,T,Q),w=R}}}if(gc)throw i=hm,gc=!1,hm=null,i}function it(i,s){var d=s[Wm];d===void 0&&(d=s[Wm]=new Set);var p=i+"__bubble";d.has(p)||(cb(s,i,2,!1),d.add(p))}function Lm(i,s,d){var p=0;s&&(p|=4),cb(d,i,p,s)}var Ic="_reactListening"+Math.random().toString(36).slice(2);function Ml(i){if(!i[Ic]){i[Ic]=!0,n.forEach(function(d){d!=="selectionchange"&&(iM.has(d)||Lm(d,!1,i),Lm(d,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Ic]||(s[Ic]=!0,Lm("selectionchange",!1,s))}}function cb(i,s,d,p){switch(Ix(s)){case 1:var x=y_;break;case 4:x=x_;break;default:x=bm}d=x.bind(null,s,d,i),x=void 0,!fm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?i.addEventListener(s,d,{capture:!0,passive:x}):i.addEventListener(s,d,!0):x!==void 0?i.addEventListener(s,d,{passive:x}):i.addEventListener(s,d,!1)}function $m(i,s,d,p,x){var w=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var C=p.tag;if(C===3||C===4){var T=p.stateNode.containerInfo;if(T===x||T.nodeType===8&&T.parentNode===x)break;if(C===4)for(C=p.return;C!==null;){var R=C.tag;if((R===3||R===4)&&(R=C.stateNode.containerInfo,R===x||R.nodeType===8&&R.parentNode===x))return;C=C.return}for(;T!==null;){if(C=Oa(T),C===null)return;if(R=C.tag,R===5||R===6){p=w=C;continue e}T=T.parentNode}}p=p.return}px(function(){var Q=w,le=um(d),ce=[];e:{var oe=ob.get(i);if(oe!==void 0){var ve=jm,je=i;switch(i){case"keypress":if(Ac(d)===0)break e;case"keydown":case"keyup":ve=T_;break;case"focusin":je="focus",ve=Em;break;case"focusout":je="blur",ve=Em;break;case"beforeblur":case"afterblur":ve=Em;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=Rx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=k_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=L_;break;case rb:case nb:case ib:ve=N_;break;case ab:ve=z_;break;case"scroll":ve=b_;break;case"wheel":ve=B_;break;case"copy":case"cut":case"paste":ve=A_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=$x}var Ne=(s&4)!==0,wt=!Ne&&i==="scroll",G=Ne?oe!==null?oe+"Capture":null:oe;Ne=[];for(var z=Q,V;z!==null;){V=z;var fe=V.stateNode;if(V.tag===5&&fe!==null&&(V=fe,G!==null&&(fe=ml(z,G),fe!=null&&Ne.push(Il(z,fe,V)))),wt)break;z=z.return}0<Ne.length&&(oe=new ve(oe,je,null,d,le),ce.push({event:oe,listeners:Ne}))}}if((s&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",oe&&d!==lm&&(je=d.relatedTarget||d.fromElement)&&(Oa(je)||je[ei]))break e;if((ve||oe)&&(oe=le.window===le?le:(oe=le.ownerDocument)?oe.defaultView||oe.parentWindow:window,ve?(je=d.relatedTarget||d.toElement,ve=Q,je=je?Oa(je):null,je!==null&&(wt=Pa(je),je!==wt||je.tag!==5&&je.tag!==6)&&(je=null)):(ve=null,je=Q),ve!==je)){if(Ne=Rx,fe="onMouseLeave",G="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Ne=$x,fe="onPointerLeave",G="onPointerEnter",z="pointer"),wt=ve==null?oe:Ho(ve),V=je==null?oe:Ho(je),oe=new Ne(fe,z+"leave",ve,d,le),oe.target=wt,oe.relatedTarget=V,fe=null,Oa(le)===Q&&(Ne=new Ne(G,z+"enter",je,d,le),Ne.target=V,Ne.relatedTarget=wt,fe=Ne),wt=fe,ve&&je)t:{for(Ne=ve,G=je,z=0,V=Ne;V;V=Bo(V))z++;for(V=0,fe=G;fe;fe=Bo(fe))V++;for(;0<z-V;)Ne=Bo(Ne),z--;for(;0<V-z;)G=Bo(G),V--;for(;z--;){if(Ne===G||G!==null&&Ne===G.alternate)break t;Ne=Bo(Ne),G=Bo(G)}Ne=null}else Ne=null;ve!==null&&db(ce,oe,ve,Ne,!1),je!==null&&wt!==null&&db(ce,wt,je,Ne,!0)}}e:{if(oe=Q?Ho(Q):window,ve=oe.nodeName&&oe.nodeName.toLowerCase(),ve==="select"||ve==="input"&&oe.type==="file")var Ce=q_;else if(Wx(oe))if(Gx)Ce=Z_;else{Ce=Y_;var Ie=Q_}else(ve=oe.nodeName)&&ve.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Ce=X_);if(Ce&&(Ce=Ce(i,Q))){Kx(ce,Ce,d,le);break e}Ie&&Ie(i,oe,Q),i==="focusout"&&(Ie=oe._wrapperState)&&Ie.controlled&&oe.type==="number"&&ke(oe,"number",oe.value)}switch(Ie=Q?Ho(Q):window,i){case"focusin":(Wx(Ie)||Ie.contentEditable==="true")&&(zo=Ie,Mm=Q,Ol=null);break;case"focusout":Ol=Mm=zo=null;break;case"mousedown":Im=!0;break;case"contextmenu":case"mouseup":case"dragend":Im=!1,eb(ce,d,le);break;case"selectionchange":if(tM)break;case"keydown":case"keyup":eb(ce,d,le)}var Te;if(Cm)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 $o?Ux(i,d)&&(Re="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(Re="onCompositionStart");Re&&(zx&&d.locale!=="ko"&&($o||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&$o&&(Te=Tx()):(zi=le,km="value"in zi?zi.value:zi.textContent,$o=!0)),Ie=Tc(Q,Re),0<Ie.length&&(Re=new Lx(Re,i,null,d,le),ce.push({event:Re,listeners:Ie}),Te?Re.data=Te:(Te=Hx(d),Te!==null&&(Re.data=Te)))),(Te=H_?W_(i,d):K_(i,d))&&(Q=Tc(Q,"onBeforeInput"),0<Q.length&&(le=new Lx("onBeforeInput","beforeinput",null,d,le),ce.push({event:le,listeners:Q}),le.data=Te))}ub(ce,s)})}function Il(i,s,d){return{instance:i,listener:s,currentTarget:d}}function Tc(i,s){for(var d=s+"Capture",p=[];i!==null;){var x=i,w=x.stateNode;x.tag===5&&w!==null&&(x=w,w=ml(i,d),w!=null&&p.unshift(Il(i,w,x)),w=ml(i,s),w!=null&&p.push(Il(i,w,x))),i=i.return}return p}function Bo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function db(i,s,d,p,x){for(var w=s._reactName,C=[];d!==null&&d!==p;){var T=d,R=T.alternate,Q=T.stateNode;if(R!==null&&R===p)break;T.tag===5&&Q!==null&&(T=Q,x?(R=ml(d,w),R!=null&&C.unshift(Il(d,R,T))):x||(R=ml(d,w),R!=null&&C.push(Il(d,R,T)))),d=d.return}C.length!==0&&i.push({event:s,listeners:C})}var aM=/\r\n?/g,oM=/\u0000|\uFFFD/g;function fb(i){return(typeof i=="string"?i:""+i).replace(aM,`
`).replace(oM,"")}function Dc(i,s,d){if(s=fb(s),fb(i)!==s&&d)throw Error(r(425))}function Rc(){}var zm=null,Fm=null;function Bm(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 Um=typeof setTimeout=="function"?setTimeout:void 0,sM=typeof clearTimeout=="function"?clearTimeout:void 0,hb=typeof Promise=="function"?Promise:void 0,lM=typeof queueMicrotask=="function"?queueMicrotask:typeof hb<"u"?function(i){return hb.resolve(null).then(i).catch(uM)}:Um;function uM(i){setTimeout(function(){throw i})}function Hm(i,s){var d=s,p=0;do{var x=d.nextSibling;if(i.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(p===0){i.removeChild(x),jl(s);return}p--}else d!=="$"&&d!=="$?"&&d!=="$!"||p++;d=x}while(d);jl(s)}function Bi(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 mb(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 Uo=Math.random().toString(36).slice(2),An="__reactFiber$"+Uo,Tl="__reactProps$"+Uo,ei="__reactContainer$"+Uo,Wm="__reactEvents$"+Uo,cM="__reactListeners$"+Uo,dM="__reactHandles$"+Uo;function Oa(i){var s=i[An];if(s)return s;for(var d=i.parentNode;d;){if(s=d[ei]||d[An]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(i=mb(i);i!==null;){if(d=i[An])return d;i=mb(i)}return s}i=d,d=i.parentNode}return null}function Dl(i){return i=i[An]||i[ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Ho(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(r(33))}function Lc(i){return i[Tl]||null}var Km=[],Wo=-1;function Ui(i){return{current:i}}function at(i){0>Wo||(i.current=Km[Wo],Km[Wo]=null,Wo--)}function rt(i,s){Wo++,Km[Wo]=i.current,i.current=s}var Hi={},er=Ui(Hi),xr=Ui(!1),_a=Hi;function Ko(i,s){var d=i.type.contextTypes;if(!d)return Hi;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in d)x[w]=s[w];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=x),x}function br(i){return i=i.childContextTypes,i!=null}function $c(){at(xr),at(er)}function pb(i,s,d){if(er.current!==Hi)throw Error(r(168));rt(er,s),rt(xr,d)}function gb(i,s,d){var p=i.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return d;p=p.getChildContext();for(var x in p)if(!(x in s))throw Error(r(108,ge(i)||"Unknown",x));return J({},d,p)}function zc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Hi,_a=er.current,rt(er,i),rt(xr,xr.current),!0}function vb(i,s,d){var p=i.stateNode;if(!p)throw Error(r(169));d?(i=gb(i,s,_a),p.__reactInternalMemoizedMergedChildContext=i,at(xr),at(er),rt(er,i)):at(xr),rt(xr,d)}var ti=null,Fc=!1,Gm=!1;function yb(i){ti===null?ti=[i]:ti.push(i)}function fM(i){Fc=!0,yb(i)}function Wi(){if(!Gm&&ti!==null){Gm=!0;var i=0,s=Ze;try{var d=ti;for(Ze=1;i<d.length;i++){var p=d[i];do p=p(!0);while(p!==null)}ti=null,Fc=!1}catch(x){throw ti!==null&&(ti=ti.slice(i+1)),bx(mm,Wi),x}finally{Ze=s,Gm=!1}}return null}var Go=[],Vo=0,Bc=null,Uc=0,Kr=[],Gr=0,Ma=null,ri=1,ni="";function Ia(i,s){Go[Vo++]=Uc,Go[Vo++]=Bc,Bc=i,Uc=s}function xb(i,s,d){Kr[Gr++]=ri,Kr[Gr++]=ni,Kr[Gr++]=Ma,Ma=i;var p=ri;i=ni;var x=32-un(p)-1;p&=~(1<<x),d+=1;var w=32-un(s)+x;if(30<w){var C=x-x%5;w=(p&(1<<C)-1).toString(32),p>>=C,x-=C,ri=1<<32-un(s)+x|d<<x|p,ni=w+i}else ri=1<<w|d<<x|p,ni=i}function Vm(i){i.return!==null&&(Ia(i,1),xb(i,1,0))}function qm(i){for(;i===Bc;)Bc=Go[--Vo],Go[Vo]=null,Uc=Go[--Vo],Go[Vo]=null;for(;i===Ma;)Ma=Kr[--Gr],Kr[Gr]=null,ni=Kr[--Gr],Kr[Gr]=null,ri=Kr[--Gr],Kr[Gr]=null}var Ir=null,Tr=null,ct=!1,dn=null;function bb(i,s){var d=Yr(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 wb(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,Ir=i,Tr=Bi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Ir=i,Tr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(d=Ma!==null?{id:ri,overflow:ni}:null,i.memoizedState={dehydrated:s,treeContext:d,retryLane:1073741824},d=Yr(18,null,null,0),d.stateNode=s,d.return=i,i.child=d,Ir=i,Tr=null,!0):!1;default:return!1}}function Qm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Ym(i){if(ct){var s=Tr;if(s){var d=s;if(!wb(i,s)){if(Qm(i))throw Error(r(418));s=Bi(d.nextSibling);var p=Ir;s&&wb(i,s)?bb(p,d):(i.flags=i.flags&-4097|2,ct=!1,Ir=i)}}else{if(Qm(i))throw Error(r(418));i.flags=i.flags&-4097|2,ct=!1,Ir=i}}}function kb(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Ir=i}function Hc(i){if(i!==Ir)return!1;if(!ct)return kb(i),ct=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Bm(i.type,i.memoizedProps)),s&&(s=Tr)){if(Qm(i))throw jb(),Error(r(418));for(;s;)bb(i,s),s=Bi(s.nextSibling)}if(kb(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){Tr=Bi(i.nextSibling);break e}s--}else d!=="$"&&d!=="$!"&&d!=="$?"||s++}i=i.nextSibling}Tr=null}}else Tr=Ir?Bi(i.stateNode.nextSibling):null;return!0}function jb(){for(var i=Tr;i;)i=Bi(i.nextSibling)}function qo(){Tr=Ir=null,ct=!1}function Xm(i){dn===null?dn=[i]:dn.push(i)}var hM=P.ReactCurrentBatchConfig;function Rl(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 p=d.stateNode}if(!p)throw Error(r(147,i));var x=p,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var T=x.refs;C===null?delete T[w]:T[w]=C},s._stringRef=w,s)}if(typeof i!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,i))}return i}function Wc(i,s){throw i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Sb(i){var s=i._init;return s(i._payload)}function Nb(i){function s(G,z){if(i){var V=G.deletions;V===null?(G.deletions=[z],G.flags|=16):V.push(z)}}function d(G,z){if(!i)return null;for(;z!==null;)s(G,z),z=z.sibling;return null}function p(G,z){for(G=new Map;z!==null;)z.key!==null?G.set(z.key,z):G.set(z.index,z),z=z.sibling;return G}function x(G,z){return G=Zi(G,z),G.index=0,G.sibling=null,G}function w(G,z,V){return G.index=V,i?(V=G.alternate,V!==null?(V=V.index,V<z?(G.flags|=2,z):V):(G.flags|=2,z)):(G.flags|=1048576,z)}function C(G){return i&&G.alternate===null&&(G.flags|=2),G}function T(G,z,V,fe){return z===null||z.tag!==6?(z=Up(V,G.mode,fe),z.return=G,z):(z=x(z,V),z.return=G,z)}function R(G,z,V,fe){var Ce=V.type;return Ce===D?le(G,z,V.props.children,fe,V.key):z!==null&&(z.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ae&&Sb(Ce)===z.type)?(fe=x(z,V.props),fe.ref=Rl(G,z,V),fe.return=G,fe):(fe=md(V.type,V.key,V.props,null,G.mode,fe),fe.ref=Rl(G,z,V),fe.return=G,fe)}function Q(G,z,V,fe){return z===null||z.tag!==4||z.stateNode.containerInfo!==V.containerInfo||z.stateNode.implementation!==V.implementation?(z=Hp(V,G.mode,fe),z.return=G,z):(z=x(z,V.children||[]),z.return=G,z)}function le(G,z,V,fe,Ce){return z===null||z.tag!==7?(z=Ba(V,G.mode,fe,Ce),z.return=G,z):(z=x(z,V),z.return=G,z)}function ce(G,z,V){if(typeof z=="string"&&z!==""||typeof z=="number")return z=Up(""+z,G.mode,V),z.return=G,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return V=md(z.type,z.key,z.props,null,G.mode,V),V.ref=Rl(G,null,z),V.return=G,V;case O:return z=Hp(z,G.mode,V),z.return=G,z;case ae:var fe=z._init;return ce(G,fe(z._payload),V)}if(Ae(z)||te(z))return z=Ba(z,G.mode,V,null),z.return=G,z;Wc(G,z)}return null}function oe(G,z,V,fe){var Ce=z!==null?z.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ce!==null?null:T(G,z,""+V,fe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return V.key===Ce?R(G,z,V,fe):null;case O:return V.key===Ce?Q(G,z,V,fe):null;case ae:return Ce=V._init,oe(G,z,Ce(V._payload),fe)}if(Ae(V)||te(V))return Ce!==null?null:le(G,z,V,fe,null);Wc(G,V)}return null}function ve(G,z,V,fe,Ce){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return G=G.get(V)||null,T(z,G,""+fe,Ce);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case _:return G=G.get(fe.key===null?V:fe.key)||null,R(z,G,fe,Ce);case O:return G=G.get(fe.key===null?V:fe.key)||null,Q(z,G,fe,Ce);case ae:var Ie=fe._init;return ve(G,z,V,Ie(fe._payload),Ce)}if(Ae(fe)||te(fe))return G=G.get(V)||null,le(z,G,fe,Ce,null);Wc(z,fe)}return null}function je(G,z,V,fe){for(var Ce=null,Ie=null,Te=z,Re=z=0,Tt=null;Te!==null&&Re<V.length;Re++){Te.index>Re?(Tt=Te,Te=null):Tt=Te.sibling;var Qe=oe(G,Te,V[Re],fe);if(Qe===null){Te===null&&(Te=Tt);break}i&&Te&&Qe.alternate===null&&s(G,Te),z=w(Qe,z,Re),Ie===null?Ce=Qe:Ie.sibling=Qe,Ie=Qe,Te=Tt}if(Re===V.length)return d(G,Te),ct&&Ia(G,Re),Ce;if(Te===null){for(;Re<V.length;Re++)Te=ce(G,V[Re],fe),Te!==null&&(z=w(Te,z,Re),Ie===null?Ce=Te:Ie.sibling=Te,Ie=Te);return ct&&Ia(G,Re),Ce}for(Te=p(G,Te);Re<V.length;Re++)Tt=ve(Te,G,Re,V[Re],fe),Tt!==null&&(i&&Tt.alternate!==null&&Te.delete(Tt.key===null?Re:Tt.key),z=w(Tt,z,Re),Ie===null?Ce=Tt:Ie.sibling=Tt,Ie=Tt);return i&&Te.forEach(function(Ji){return s(G,Ji)}),ct&&Ia(G,Re),Ce}function Ne(G,z,V,fe){var Ce=te(V);if(typeof Ce!="function")throw Error(r(150));if(V=Ce.call(V),V==null)throw Error(r(151));for(var Ie=Ce=null,Te=z,Re=z=0,Tt=null,Qe=V.next();Te!==null&&!Qe.done;Re++,Qe=V.next()){Te.index>Re?(Tt=Te,Te=null):Tt=Te.sibling;var Ji=oe(G,Te,Qe.value,fe);if(Ji===null){Te===null&&(Te=Tt);break}i&&Te&&Ji.alternate===null&&s(G,Te),z=w(Ji,z,Re),Ie===null?Ce=Ji:Ie.sibling=Ji,Ie=Ji,Te=Tt}if(Qe.done)return d(G,Te),ct&&Ia(G,Re),Ce;if(Te===null){for(;!Qe.done;Re++,Qe=V.next())Qe=ce(G,Qe.value,fe),Qe!==null&&(z=w(Qe,z,Re),Ie===null?Ce=Qe:Ie.sibling=Qe,Ie=Qe);return ct&&Ia(G,Re),Ce}for(Te=p(G,Te);!Qe.done;Re++,Qe=V.next())Qe=ve(Te,G,Re,Qe.value,fe),Qe!==null&&(i&&Qe.alternate!==null&&Te.delete(Qe.key===null?Re:Qe.key),z=w(Qe,z,Re),Ie===null?Ce=Qe:Ie.sibling=Qe,Ie=Qe);return i&&Te.forEach(function(GM){return s(G,GM)}),ct&&Ia(G,Re),Ce}function wt(G,z,V,fe){if(typeof V=="object"&&V!==null&&V.type===D&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Ce=V.key,Ie=z;Ie!==null;){if(Ie.key===Ce){if(Ce=V.type,Ce===D){if(Ie.tag===7){d(G,Ie.sibling),z=x(Ie,V.props.children),z.return=G,G=z;break e}}else if(Ie.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ae&&Sb(Ce)===Ie.type){d(G,Ie.sibling),z=x(Ie,V.props),z.ref=Rl(G,Ie,V),z.return=G,G=z;break e}d(G,Ie);break}else s(G,Ie);Ie=Ie.sibling}V.type===D?(z=Ba(V.props.children,G.mode,fe,V.key),z.return=G,G=z):(fe=md(V.type,V.key,V.props,null,G.mode,fe),fe.ref=Rl(G,z,V),fe.return=G,G=fe)}return C(G);case O:e:{for(Ie=V.key;z!==null;){if(z.key===Ie)if(z.tag===4&&z.stateNode.containerInfo===V.containerInfo&&z.stateNode.implementation===V.implementation){d(G,z.sibling),z=x(z,V.children||[]),z.return=G,G=z;break e}else{d(G,z);break}else s(G,z);z=z.sibling}z=Hp(V,G.mode,fe),z.return=G,G=z}return C(G);case ae:return Ie=V._init,wt(G,z,Ie(V._payload),fe)}if(Ae(V))return je(G,z,V,fe);if(te(V))return Ne(G,z,V,fe);Wc(G,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,z!==null&&z.tag===6?(d(G,z.sibling),z=x(z,V),z.return=G,G=z):(d(G,z),z=Up(V,G.mode,fe),z.return=G,G=z),C(G)):d(G,z)}return wt}var Qo=Nb(!0),Eb=Nb(!1),Kc=Ui(null),Gc=null,Yo=null,Zm=null;function Jm(){Zm=Yo=Gc=null}function ep(i){var s=Kc.current;at(Kc),i._currentValue=s}function tp(i,s,d){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===d)break;i=i.return}}function Xo(i,s){Gc=i,Zm=Yo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(wr=!0),i.firstContext=null)}function Vr(i){var s=i._currentValue;if(Zm!==i)if(i={context:i,memoizedValue:s,next:null},Yo===null){if(Gc===null)throw Error(r(308));Yo=i,Gc.dependencies={lanes:0,firstContext:i}}else Yo=Yo.next=i;return s}var Ta=null;function rp(i){Ta===null?Ta=[i]:Ta.push(i)}function Ab(i,s,d,p){var x=s.interleaved;return x===null?(d.next=d,rp(s)):(d.next=x.next,x.next=d),s.interleaved=d,ii(i,p)}function ii(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 Ki=!1;function np(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cb(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 ai(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Gi(i,s,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(qe&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,ii(i,d)}return x=p.interleaved,x===null?(s.next=s,rp(p)):(s.next=x.next,x.next=s),p.interleaved=s,ii(i,d)}function Vc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var p=s.lanes;p&=i.pendingLanes,d|=p,s.lanes=d,vm(i,d)}}function Pb(i,s){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var x=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?x=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?x=w=s:w=w.next=s}else x=w=s;d={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,effects:p.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function qc(i,s,d,p){var x=i.updateQueue;Ki=!1;var w=x.firstBaseUpdate,C=x.lastBaseUpdate,T=x.shared.pending;if(T!==null){x.shared.pending=null;var R=T,Q=R.next;R.next=null,C===null?w=Q:C.next=Q,C=R;var le=i.alternate;le!==null&&(le=le.updateQueue,T=le.lastBaseUpdate,T!==C&&(T===null?le.firstBaseUpdate=Q:T.next=Q,le.lastBaseUpdate=R))}if(w!==null){var ce=x.baseState;C=0,le=Q=R=null,T=w;do{var oe=T.lane,ve=T.eventTime;if((p&oe)===oe){le!==null&&(le=le.next={eventTime:ve,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var je=i,Ne=T;switch(oe=s,ve=d,Ne.tag){case 1:if(je=Ne.payload,typeof je=="function"){ce=je.call(ve,ce,oe);break e}ce=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ne.payload,oe=typeof je=="function"?je.call(ve,ce,oe):je,oe==null)break e;ce=J({},ce,oe);break e;case 2:Ki=!0}}T.callback!==null&&T.lane!==0&&(i.flags|=64,oe=x.effects,oe===null?x.effects=[T]:oe.push(T))}else ve={eventTime:ve,lane:oe,tag:T.tag,payload:T.payload,callback:T.callback,next:null},le===null?(Q=le=ve,R=ce):le=le.next=ve,C|=oe;if(T=T.next,T===null){if(T=x.shared.pending,T===null)break;oe=T,T=oe.next,oe.next=null,x.lastBaseUpdate=oe,x.shared.pending=null}}while(!0);if(le===null&&(R=ce),x.baseState=R,x.firstBaseUpdate=Q,x.lastBaseUpdate=le,s=x.shared.interleaved,s!==null){x=s;do C|=x.lane,x=x.next;while(x!==s)}else w===null&&(x.shared.lanes=0);La|=C,i.lanes=C,i.memoizedState=ce}}function Ob(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var p=i[s],x=p.callback;if(x!==null){if(p.callback=null,p=d,typeof x!="function")throw Error(r(191,x));x.call(p)}}}var Ll={},Cn=Ui(Ll),$l=Ui(Ll),zl=Ui(Ll);function Da(i){if(i===Ll)throw Error(r(174));return i}function ip(i,s){switch(rt(zl,s),rt($l,i),rt(Cn,Ll),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Jn(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Jn(s,i)}at(Cn),rt(Cn,s)}function Zo(){at(Cn),at($l),at(zl)}function _b(i){Da(zl.current);var s=Da(Cn.current),d=Jn(s,i.type);s!==d&&(rt($l,i),rt(Cn,d))}function ap(i){$l.current===i&&(at(Cn),at($l))}var mt=Ui(0);function Qc(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 op=[];function sp(){for(var i=0;i<op.length;i++)op[i]._workInProgressVersionPrimary=null;op.length=0}var Yc=P.ReactCurrentDispatcher,lp=P.ReactCurrentBatchConfig,Ra=0,pt=null,Et=null,Mt=null,Xc=!1,Fl=!1,Bl=0,mM=0;function tr(){throw Error(r(321))}function up(i,s){if(s===null)return!1;for(var d=0;d<s.length&&d<i.length;d++)if(!cn(i[d],s[d]))return!1;return!0}function cp(i,s,d,p,x,w){if(Ra=w,pt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Yc.current=i===null||i.memoizedState===null?yM:xM,i=d(p,x),Fl){w=0;do{if(Fl=!1,Bl=0,25<=w)throw Error(r(301));w+=1,Mt=Et=null,s.updateQueue=null,Yc.current=bM,i=d(p,x)}while(Fl)}if(Yc.current=ed,s=Et!==null&&Et.next!==null,Ra=0,Mt=Et=pt=null,Xc=!1,s)throw Error(r(300));return i}function dp(){var i=Bl!==0;return Bl=0,i}function Pn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?pt.memoizedState=Mt=i:Mt=Mt.next=i,Mt}function qr(){if(Et===null){var i=pt.alternate;i=i!==null?i.memoizedState:null}else i=Et.next;var s=Mt===null?pt.memoizedState:Mt.next;if(s!==null)Mt=s,Et=i;else{if(i===null)throw Error(r(310));Et=i,i={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},Mt===null?pt.memoizedState=Mt=i:Mt=Mt.next=i}return Mt}function Ul(i,s){return typeof s=="function"?s(i):s}function fp(i){var s=qr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=Et,x=p.baseQueue,w=d.pending;if(w!==null){if(x!==null){var C=x.next;x.next=w.next,w.next=C}p.baseQueue=x=w,d.pending=null}if(x!==null){w=x.next,p=p.baseState;var T=C=null,R=null,Q=w;do{var le=Q.lane;if((Ra&le)===le)R!==null&&(R=R.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),p=Q.hasEagerState?Q.eagerState:i(p,Q.action);else{var ce={lane:le,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};R===null?(T=R=ce,C=p):R=R.next=ce,pt.lanes|=le,La|=le}Q=Q.next}while(Q!==null&&Q!==w);R===null?C=p:R.next=T,cn(p,s.memoizedState)||(wr=!0),s.memoizedState=p,s.baseState=C,s.baseQueue=R,d.lastRenderedState=p}if(i=d.interleaved,i!==null){x=i;do w=x.lane,pt.lanes|=w,La|=w,x=x.next;while(x!==i)}else x===null&&(d.lanes=0);return[s.memoizedState,d.dispatch]}function hp(i){var s=qr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=d.dispatch,x=d.pending,w=s.memoizedState;if(x!==null){d.pending=null;var C=x=x.next;do w=i(w,C.action),C=C.next;while(C!==x);cn(w,s.memoizedState)||(wr=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),d.lastRenderedState=w}return[w,p]}function Mb(){}function Ib(i,s){var d=pt,p=qr(),x=s(),w=!cn(p.memoizedState,x);if(w&&(p.memoizedState=x,wr=!0),p=p.queue,mp(Rb.bind(null,d,p,i),[i]),p.getSnapshot!==s||w||Mt!==null&&Mt.memoizedState.tag&1){if(d.flags|=2048,Hl(9,Db.bind(null,d,p,x,s),void 0,null),It===null)throw Error(r(349));(Ra&30)!==0||Tb(d,s,x)}return x}function Tb(i,s,d){i.flags|=16384,i={getSnapshot:s,value:d},s=pt.updateQueue,s===null?(s={lastEffect:null,stores:null},pt.updateQueue=s,s.stores=[i]):(d=s.stores,d===null?s.stores=[i]:d.push(i))}function Db(i,s,d,p){s.value=d,s.getSnapshot=p,Lb(s)&&$b(i)}function Rb(i,s,d){return d(function(){Lb(s)&&$b(i)})}function Lb(i){var s=i.getSnapshot;i=i.value;try{var d=s();return!cn(i,d)}catch{return!0}}function $b(i){var s=ii(i,1);s!==null&&pn(s,i,1,-1)}function zb(i){var s=Pn();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ul,lastRenderedState:i},s.queue=i,i=i.dispatch=vM.bind(null,pt,i),[s.memoizedState,i]}function Hl(i,s,d,p){return i={tag:i,create:s,destroy:d,deps:p,next:null},s=pt.updateQueue,s===null?(s={lastEffect:null,stores:null},pt.updateQueue=s,s.lastEffect=i.next=i):(d=s.lastEffect,d===null?s.lastEffect=i.next=i:(p=d.next,d.next=i,i.next=p,s.lastEffect=i)),i}function Fb(){return qr().memoizedState}function Zc(i,s,d,p){var x=Pn();pt.flags|=i,x.memoizedState=Hl(1|s,d,void 0,p===void 0?null:p)}function Jc(i,s,d,p){var x=qr();p=p===void 0?null:p;var w=void 0;if(Et!==null){var C=Et.memoizedState;if(w=C.destroy,p!==null&&up(p,C.deps)){x.memoizedState=Hl(s,d,w,p);return}}pt.flags|=i,x.memoizedState=Hl(1|s,d,w,p)}function Bb(i,s){return Zc(8390656,8,i,s)}function mp(i,s){return Jc(2048,8,i,s)}function Ub(i,s){return Jc(4,2,i,s)}function Hb(i,s){return Jc(4,4,i,s)}function Wb(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 Kb(i,s,d){return d=d!=null?d.concat([i]):null,Jc(4,4,Wb.bind(null,s,i),d)}function pp(){}function Gb(i,s){var d=qr();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&up(s,p[1])?p[0]:(d.memoizedState=[i,s],i)}function Vb(i,s){var d=qr();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&up(s,p[1])?p[0]:(i=i(),d.memoizedState=[i,s],i)}function qb(i,s,d){return(Ra&21)===0?(i.baseState&&(i.baseState=!1,wr=!0),i.memoizedState=d):(cn(d,s)||(d=Sx(),pt.lanes|=d,La|=d,i.baseState=!0),s)}function pM(i,s){var d=Ze;Ze=d!==0&&4>d?d:4,i(!0);var p=lp.transition;lp.transition={};try{i(!1),s()}finally{Ze=d,lp.transition=p}}function Qb(){return qr().memoizedState}function gM(i,s,d){var p=Yi(i);if(d={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null},Yb(i))Xb(s,d);else if(d=Ab(i,s,d,p),d!==null){var x=fr();pn(d,i,p,x),Zb(d,s,p)}}function vM(i,s,d){var p=Yi(i),x={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null};if(Yb(i))Xb(s,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,T=w(C,d);if(x.hasEagerState=!0,x.eagerState=T,cn(T,C)){var R=s.interleaved;R===null?(x.next=x,rp(s)):(x.next=R.next,R.next=x),s.interleaved=x;return}}catch{}finally{}d=Ab(i,s,x,p),d!==null&&(x=fr(),pn(d,i,p,x),Zb(d,s,p))}}function Yb(i){var s=i.alternate;return i===pt||s!==null&&s===pt}function Xb(i,s){Fl=Xc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function Zb(i,s,d){if((d&4194240)!==0){var p=s.lanes;p&=i.pendingLanes,d|=p,s.lanes=d,vm(i,d)}}var ed={readContext:Vr,useCallback:tr,useContext:tr,useEffect:tr,useImperativeHandle:tr,useInsertionEffect:tr,useLayoutEffect:tr,useMemo:tr,useReducer:tr,useRef:tr,useState:tr,useDebugValue:tr,useDeferredValue:tr,useTransition:tr,useMutableSource:tr,useSyncExternalStore:tr,useId:tr,unstable_isNewReconciler:!1},yM={readContext:Vr,useCallback:function(i,s){return Pn().memoizedState=[i,s===void 0?null:s],i},useContext:Vr,useEffect:Bb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Zc(4194308,4,Wb.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Zc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Zc(4,2,i,s)},useMemo:function(i,s){var d=Pn();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var p=Pn();return s=d!==void 0?d(s):s,p.memoizedState=p.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},p.queue=i,i=i.dispatch=gM.bind(null,pt,i),[p.memoizedState,i]},useRef:function(i){var s=Pn();return i={current:i},s.memoizedState=i},useState:zb,useDebugValue:pp,useDeferredValue:function(i){return Pn().memoizedState=i},useTransition:function(){var i=zb(!1),s=i[0];return i=pM.bind(null,i[1]),Pn().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var p=pt,x=Pn();if(ct){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),It===null)throw Error(r(349));(Ra&30)!==0||Tb(p,s,d)}x.memoizedState=d;var w={value:d,getSnapshot:s};return x.queue=w,Bb(Rb.bind(null,p,w,i),[i]),p.flags|=2048,Hl(9,Db.bind(null,p,w,d,s),void 0,null),d},useId:function(){var i=Pn(),s=It.identifierPrefix;if(ct){var d=ni,p=ri;d=(p&~(1<<32-un(p)-1)).toString(32)+d,s=":"+s+"R"+d,d=Bl++,0<d&&(s+="H"+d.toString(32)),s+=":"}else d=mM++,s=":"+s+"r"+d.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},xM={readContext:Vr,useCallback:Gb,useContext:Vr,useEffect:mp,useImperativeHandle:Kb,useInsertionEffect:Ub,useLayoutEffect:Hb,useMemo:Vb,useReducer:fp,useRef:Fb,useState:function(){return fp(Ul)},useDebugValue:pp,useDeferredValue:function(i){var s=qr();return qb(s,Et.memoizedState,i)},useTransition:function(){var i=fp(Ul)[0],s=qr().memoizedState;return[i,s]},useMutableSource:Mb,useSyncExternalStore:Ib,useId:Qb,unstable_isNewReconciler:!1},bM={readContext:Vr,useCallback:Gb,useContext:Vr,useEffect:mp,useImperativeHandle:Kb,useInsertionEffect:Ub,useLayoutEffect:Hb,useMemo:Vb,useReducer:hp,useRef:Fb,useState:function(){return hp(Ul)},useDebugValue:pp,useDeferredValue:function(i){var s=qr();return Et===null?s.memoizedState=i:qb(s,Et.memoizedState,i)},useTransition:function(){var i=hp(Ul)[0],s=qr().memoizedState;return[i,s]},useMutableSource:Mb,useSyncExternalStore:Ib,useId:Qb,unstable_isNewReconciler:!1};function fn(i,s){if(i&&i.defaultProps){s=J({},s),i=i.defaultProps;for(var d in i)s[d]===void 0&&(s[d]=i[d]);return s}return s}function gp(i,s,d,p){s=i.memoizedState,d=d(p,s),d=d==null?s:J({},s,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var td={isMounted:function(i){return(i=i._reactInternals)?Pa(i)===i:!1},enqueueSetState:function(i,s,d){i=i._reactInternals;var p=fr(),x=Yi(i),w=ai(p,x);w.payload=s,d!=null&&(w.callback=d),s=Gi(i,w,x),s!==null&&(pn(s,i,x,p),Vc(s,i,x))},enqueueReplaceState:function(i,s,d){i=i._reactInternals;var p=fr(),x=Yi(i),w=ai(p,x);w.tag=1,w.payload=s,d!=null&&(w.callback=d),s=Gi(i,w,x),s!==null&&(pn(s,i,x,p),Vc(s,i,x))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var d=fr(),p=Yi(i),x=ai(d,p);x.tag=2,s!=null&&(x.callback=s),s=Gi(i,x,p),s!==null&&(pn(s,i,p,d),Vc(s,i,p))}};function Jb(i,s,d,p,x,w,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,C):s.prototype&&s.prototype.isPureReactComponent?!Pl(d,p)||!Pl(x,w):!0}function e1(i,s,d){var p=!1,x=Hi,w=s.contextType;return typeof w=="object"&&w!==null?w=Vr(w):(x=br(s)?_a:er.current,p=s.contextTypes,w=(p=p!=null)?Ko(i,x):Hi),s=new s(d,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=td,i.stateNode=s,s._reactInternals=i,p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=x,i.__reactInternalMemoizedMaskedChildContext=w),s}function t1(i,s,d,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,p),s.state!==i&&td.enqueueReplaceState(s,s.state,null)}function vp(i,s,d,p){var x=i.stateNode;x.props=d,x.state=i.memoizedState,x.refs={},np(i);var w=s.contextType;typeof w=="object"&&w!==null?x.context=Vr(w):(w=br(s)?_a:er.current,x.context=Ko(i,w)),x.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(gp(i,s,w,d),x.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(s=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),s!==x.state&&td.enqueueReplaceState(x,x.state,null),qc(i,d,x,p),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=4194308)}function Jo(i,s){try{var d="",p=s;do d+=Z(p),p=p.return;while(p);var x=d}catch(w){x=`
Error generating stack: `+w.message+`
`+w.stack}return{value:i,source:s,stack:x,digest:null}}function yp(i,s,d){return{value:i,source:null,stack:d??null,digest:s??null}}function xp(i,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var wM=typeof WeakMap=="function"?WeakMap:Map;function r1(i,s,d){d=ai(-1,d),d.tag=3,d.payload={element:null};var p=s.value;return d.callback=function(){ld||(ld=!0,Tp=p),xp(i,s)},d}function n1(i,s,d){d=ai(-1,d),d.tag=3;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var x=s.value;d.payload=function(){return p(x)},d.callback=function(){xp(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){xp(i,s),typeof p!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),d}function i1(i,s,d){var p=i.pingCache;if(p===null){p=i.pingCache=new wM;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(d)||(x.add(d),i=DM.bind(null,i,s,d),s.then(i,i))}function a1(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 o1(i,s,d,p,x){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=ai(-1,1),s.tag=2,Gi(d,s,1))),d.lanes|=1),i):(i.flags|=65536,i.lanes=x,i)}var kM=P.ReactCurrentOwner,wr=!1;function dr(i,s,d,p){s.child=i===null?Eb(s,null,d,p):Qo(s,i.child,d,p)}function s1(i,s,d,p,x){d=d.render;var w=s.ref;return Xo(s,x),p=cp(i,s,d,p,w,x),d=dp(),i!==null&&!wr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,oi(i,s,x)):(ct&&d&&Vm(s),s.flags|=1,dr(i,s,p,x),s.child)}function l1(i,s,d,p,x){if(i===null){var w=d.type;return typeof w=="function"&&!Bp(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,u1(i,s,w,p,x)):(i=md(d.type,null,p,s,s.mode,x),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&x)===0){var C=w.memoizedProps;if(d=d.compare,d=d!==null?d:Pl,d(C,p)&&i.ref===s.ref)return oi(i,s,x)}return s.flags|=1,i=Zi(w,p),i.ref=s.ref,i.return=s,s.child=i}function u1(i,s,d,p,x){if(i!==null){var w=i.memoizedProps;if(Pl(w,p)&&i.ref===s.ref)if(wr=!1,s.pendingProps=p=w,(i.lanes&x)!==0)(i.flags&131072)!==0&&(wr=!0);else return s.lanes=i.lanes,oi(i,s,x)}return bp(i,s,d,p,x)}function c1(i,s,d){var p=s.pendingProps,x=p.children,w=i!==null?i.memoizedState:null;if(p.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},rt(ts,Dr),Dr|=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,rt(ts,Dr),Dr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=w!==null?w.baseLanes:d,rt(ts,Dr),Dr|=p}else w!==null?(p=w.baseLanes|d,s.memoizedState=null):p=d,rt(ts,Dr),Dr|=p;return dr(i,s,x,d),s.child}function d1(i,s){var d=s.ref;(i===null&&d!==null||i!==null&&i.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function bp(i,s,d,p,x){var w=br(d)?_a:er.current;return w=Ko(s,w),Xo(s,x),d=cp(i,s,d,p,w,x),p=dp(),i!==null&&!wr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~x,oi(i,s,x)):(ct&&p&&Vm(s),s.flags|=1,dr(i,s,d,x),s.child)}function f1(i,s,d,p,x){if(br(d)){var w=!0;zc(s)}else w=!1;if(Xo(s,x),s.stateNode===null)nd(i,s),e1(s,d,p),vp(s,d,p,x),p=!0;else if(i===null){var C=s.stateNode,T=s.memoizedProps;C.props=T;var R=C.context,Q=d.contextType;typeof Q=="object"&&Q!==null?Q=Vr(Q):(Q=br(d)?_a:er.current,Q=Ko(s,Q));var le=d.getDerivedStateFromProps,ce=typeof le=="function"||typeof C.getSnapshotBeforeUpdate=="function";ce||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==p||R!==Q)&&t1(s,C,p,Q),Ki=!1;var oe=s.memoizedState;C.state=oe,qc(s,p,C,x),R=s.memoizedState,T!==p||oe!==R||xr.current||Ki?(typeof le=="function"&&(gp(s,d,le,p),R=s.memoizedState),(T=Ki||Jb(s,d,T,p,oe,R,Q))?(ce||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=R),C.props=p,C.state=R,C.context=Q,p=T):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{C=s.stateNode,Cb(i,s),T=s.memoizedProps,Q=s.type===s.elementType?T:fn(s.type,T),C.props=Q,ce=s.pendingProps,oe=C.context,R=d.contextType,typeof R=="object"&&R!==null?R=Vr(R):(R=br(d)?_a:er.current,R=Ko(s,R));var ve=d.getDerivedStateFromProps;(le=typeof ve=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(T!==ce||oe!==R)&&t1(s,C,p,R),Ki=!1,oe=s.memoizedState,C.state=oe,qc(s,p,C,x);var je=s.memoizedState;T!==ce||oe!==je||xr.current||Ki?(typeof ve=="function"&&(gp(s,d,ve,p),je=s.memoizedState),(Q=Ki||Jb(s,d,Q,p,oe,je,R)||!1)?(le||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(p,je,R),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(p,je,R)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=je),C.props=p,C.state=je,C.context=R,p=Q):(typeof C.componentDidUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||T===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),p=!1)}return wp(i,s,d,p,w,x)}function wp(i,s,d,p,x,w){d1(i,s);var C=(s.flags&128)!==0;if(!p&&!C)return x&&vb(s,d,!1),oi(i,s,w);p=s.stateNode,kM.current=s;var T=C&&typeof d.getDerivedStateFromError!="function"?null:p.render();return s.flags|=1,i!==null&&C?(s.child=Qo(s,i.child,null,w),s.child=Qo(s,null,T,w)):dr(i,s,T,w),s.memoizedState=p.state,x&&vb(s,d,!0),s.child}function h1(i){var s=i.stateNode;s.pendingContext?pb(i,s.pendingContext,s.pendingContext!==s.context):s.context&&pb(i,s.context,!1),ip(i,s.containerInfo)}function m1(i,s,d,p,x){return qo(),Xm(x),s.flags|=256,dr(i,s,d,p),s.child}var kp={dehydrated:null,treeContext:null,retryLane:0};function jp(i){return{baseLanes:i,cachePool:null,transitions:null}}function p1(i,s,d){var p=s.pendingProps,x=mt.current,w=!1,C=(s.flags&128)!==0,T;if((T=C)||(T=i!==null&&i.memoizedState===null?!1:(x&2)!==0),T?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(x|=1),rt(mt,x&1),i===null)return Ym(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):(C=p.children,i=p.fallback,w?(p=s.mode,w=s.child,C={mode:"hidden",children:C},(p&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=pd(C,p,0,null),i=Ba(i,p,d,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=jp(d),s.memoizedState=kp,i):Sp(s,C));if(x=i.memoizedState,x!==null&&(T=x.dehydrated,T!==null))return jM(i,s,C,p,T,x,d);if(w){w=p.fallback,C=s.mode,x=i.child,T=x.sibling;var R={mode:"hidden",children:p.children};return(C&1)===0&&s.child!==x?(p=s.child,p.childLanes=0,p.pendingProps=R,s.deletions=null):(p=Zi(x,R),p.subtreeFlags=x.subtreeFlags&14680064),T!==null?w=Zi(T,w):(w=Ba(w,C,d,null),w.flags|=2),w.return=s,p.return=s,p.sibling=w,s.child=p,p=w,w=s.child,C=i.child.memoizedState,C=C===null?jp(d):{baseLanes:C.baseLanes|d,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=i.childLanes&~d,s.memoizedState=kp,p}return w=i.child,i=w.sibling,p=Zi(w,{mode:"visible",children:p.children}),(s.mode&1)===0&&(p.lanes=d),p.return=s,p.sibling=null,i!==null&&(d=s.deletions,d===null?(s.deletions=[i],s.flags|=16):d.push(i)),s.child=p,s.memoizedState=null,p}function Sp(i,s){return s=pd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function rd(i,s,d,p){return p!==null&&Xm(p),Qo(s,i.child,null,d),i=Sp(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function jM(i,s,d,p,x,w,C){if(d)return s.flags&256?(s.flags&=-257,p=yp(Error(r(422))),rd(i,s,C,p)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=p.fallback,x=s.mode,p=pd({mode:"visible",children:p.children},x,0,null),w=Ba(w,x,C,null),w.flags|=2,p.return=s,w.return=s,p.sibling=w,s.child=p,(s.mode&1)!==0&&Qo(s,i.child,null,C),s.child.memoizedState=jp(C),s.memoizedState=kp,w);if((s.mode&1)===0)return rd(i,s,C,null);if(x.data==="$!"){if(p=x.nextSibling&&x.nextSibling.dataset,p)var T=p.dgst;return p=T,w=Error(r(419)),p=yp(w,p,void 0),rd(i,s,C,p)}if(T=(C&i.childLanes)!==0,wr||T){if(p=It,p!==null){switch(C&-C){case 4:x=2;break;case 16:x=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:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(p.suspendedLanes|C))!==0?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,ii(i,x),pn(p,i,x,-1))}return Fp(),p=yp(Error(r(421))),rd(i,s,C,p)}return x.data==="$?"?(s.flags|=128,s.child=i.child,s=RM.bind(null,i),x._reactRetry=s,null):(i=w.treeContext,Tr=Bi(x.nextSibling),Ir=s,ct=!0,dn=null,i!==null&&(Kr[Gr++]=ri,Kr[Gr++]=ni,Kr[Gr++]=Ma,ri=i.id,ni=i.overflow,Ma=s),s=Sp(s,p.children),s.flags|=4096,s)}function g1(i,s,d){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),tp(i.return,s,d)}function Np(i,s,d,p,x){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:x}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=p,w.tail=d,w.tailMode=x)}function v1(i,s,d){var p=s.pendingProps,x=p.revealOrder,w=p.tail;if(dr(i,s,p.children,d),p=mt.current,(p&2)!==0)p=p&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&&g1(i,d,s);else if(i.tag===19)g1(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}p&=1}if(rt(mt,p),(s.mode&1)===0)s.memoizedState=null;else switch(x){case"forwards":for(d=s.child,x=null;d!==null;)i=d.alternate,i!==null&&Qc(i)===null&&(x=d),d=d.sibling;d=x,d===null?(x=s.child,s.child=null):(x=d.sibling,d.sibling=null),Np(s,!1,x,d,w);break;case"backwards":for(d=null,x=s.child,s.child=null;x!==null;){if(i=x.alternate,i!==null&&Qc(i)===null){s.child=x;break}i=x.sibling,x.sibling=d,d=x,x=i}Np(s,!0,d,null,w);break;case"together":Np(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function nd(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function oi(i,s,d){if(i!==null&&(s.dependencies=i.dependencies),La|=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=Zi(i,i.pendingProps),s.child=d,d.return=s;i.sibling!==null;)i=i.sibling,d=d.sibling=Zi(i,i.pendingProps),d.return=s;d.sibling=null}return s.child}function SM(i,s,d){switch(s.tag){case 3:h1(s),qo();break;case 5:_b(s);break;case 1:br(s.type)&&zc(s);break;case 4:ip(s,s.stateNode.containerInfo);break;case 10:var p=s.type._context,x=s.memoizedProps.value;rt(Kc,p._currentValue),p._currentValue=x;break;case 13:if(p=s.memoizedState,p!==null)return p.dehydrated!==null?(rt(mt,mt.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?p1(i,s,d):(rt(mt,mt.current&1),i=oi(i,s,d),i!==null?i.sibling:null);rt(mt,mt.current&1);break;case 19:if(p=(d&s.childLanes)!==0,(i.flags&128)!==0){if(p)return v1(i,s,d);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),rt(mt,mt.current),p)break;return null;case 22:case 23:return s.lanes=0,c1(i,s,d)}return oi(i,s,d)}var y1,Ep,x1,b1;y1=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}},Ep=function(){},x1=function(i,s,d,p){var x=i.memoizedProps;if(x!==p){i=s.stateNode,Da(Cn.current);var w=null;switch(d){case"input":x=Fe(i,x),p=Fe(i,p),w=[];break;case"select":x=J({},x,{value:void 0}),p=J({},p,{value:void 0}),w=[];break;case"textarea":x=et(i,x),p=et(i,p),w=[];break;default:typeof x.onClick!="function"&&typeof p.onClick=="function"&&(i.onclick=Rc)}_r(d,p);var C;d=null;for(Q in x)if(!p.hasOwnProperty(Q)&&x.hasOwnProperty(Q)&&x[Q]!=null)if(Q==="style"){var T=x[Q];for(C in T)T.hasOwnProperty(C)&&(d||(d={}),d[C]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(a.hasOwnProperty(Q)?w||(w=[]):(w=w||[]).push(Q,null));for(Q in p){var R=p[Q];if(T=x!=null?x[Q]:void 0,p.hasOwnProperty(Q)&&R!==T&&(R!=null||T!=null))if(Q==="style")if(T){for(C in T)!T.hasOwnProperty(C)||R&&R.hasOwnProperty(C)||(d||(d={}),d[C]="");for(C in R)R.hasOwnProperty(C)&&T[C]!==R[C]&&(d||(d={}),d[C]=R[C])}else d||(w||(w=[]),w.push(Q,d)),d=R;else Q==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,T=T?T.__html:void 0,R!=null&&T!==R&&(w=w||[]).push(Q,R)):Q==="children"?typeof R!="string"&&typeof R!="number"||(w=w||[]).push(Q,""+R):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(a.hasOwnProperty(Q)?(R!=null&&Q==="onScroll"&&it("scroll",i),w||T===R||(w=[])):(w=w||[]).push(Q,R))}d&&(w=w||[]).push("style",d);var Q=w;(s.updateQueue=Q)&&(s.flags|=4)}},b1=function(i,s,d,p){d!==p&&(s.flags|=4)};function Wl(i,s){if(!ct)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 p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function rr(i){var s=i.alternate!==null&&i.alternate.child===i.child,d=0,p=0;if(s)for(var x=i.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags&14680064,p|=x.flags&14680064,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=d,s}function NM(i,s,d){var p=s.pendingProps;switch(qm(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rr(s),null;case 1:return br(s.type)&&$c(),rr(s),null;case 3:return p=s.stateNode,Zo(),at(xr),at(er),sp(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(i===null||i.child===null)&&(Hc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,dn!==null&&(Lp(dn),dn=null))),Ep(i,s),rr(s),null;case 5:ap(s);var x=Da(zl.current);if(d=s.type,i!==null&&s.stateNode!=null)x1(i,s,d,p,x),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!p){if(s.stateNode===null)throw Error(r(166));return rr(s),null}if(i=Da(Cn.current),Hc(s)){p=s.stateNode,d=s.type;var w=s.memoizedProps;switch(p[An]=s,p[Tl]=w,i=(s.mode&1)!==0,d){case"dialog":it("cancel",p),it("close",p);break;case"iframe":case"object":case"embed":it("load",p);break;case"video":case"audio":for(x=0;x<_l.length;x++)it(_l[x],p);break;case"source":it("error",p);break;case"img":case"image":case"link":it("error",p),it("load",p);break;case"details":it("toggle",p);break;case"input":Oe(p,w),it("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!w.multiple},it("invalid",p);break;case"textarea":Ut(p,w),it("invalid",p)}_r(d,w),x=null;for(var C in w)if(w.hasOwnProperty(C)){var T=w[C];C==="children"?typeof T=="string"?p.textContent!==T&&(w.suppressHydrationWarning!==!0&&Dc(p.textContent,T,i),x=["children",T]):typeof T=="number"&&p.textContent!==""+T&&(w.suppressHydrationWarning!==!0&&Dc(p.textContent,T,i),x=["children",""+T]):a.hasOwnProperty(C)&&T!=null&&C==="onScroll"&&it("scroll",p)}switch(d){case"input":_e(p),W(p,w,!0);break;case"textarea":_e(p),ur(p);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(p.onclick=Rc)}p=x,s.updateQueue=p,p!==null&&(s.flags|=4)}else{C=x.nodeType===9?x:x.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Ca(d)),i==="http://www.w3.org/1999/xhtml"?d==="script"?(i=C.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof p.is=="string"?i=C.createElement(d,{is:p.is}):(i=C.createElement(d),d==="select"&&(C=i,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):i=C.createElementNS(i,d),i[An]=s,i[Tl]=p,y1(i,s,!1,!1),s.stateNode=i;e:{switch(C=sm(d,p),d){case"dialog":it("cancel",i),it("close",i),x=p;break;case"iframe":case"object":case"embed":it("load",i),x=p;break;case"video":case"audio":for(x=0;x<_l.length;x++)it(_l[x],i);x=p;break;case"source":it("error",i),x=p;break;case"img":case"image":case"link":it("error",i),it("load",i),x=p;break;case"details":it("toggle",i),x=p;break;case"input":Oe(i,p),x=Fe(i,p),it("invalid",i);break;case"option":x=p;break;case"select":i._wrapperState={wasMultiple:!!p.multiple},x=J({},p,{value:void 0}),it("invalid",i);break;case"textarea":Ut(i,p),x=et(i,p),it("invalid",i);break;default:x=p}_r(d,x),T=x;for(w in T)if(T.hasOwnProperty(w)){var R=T[w];w==="style"?hc(i,R):w==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Or(i,R)):w==="children"?typeof R=="string"?(d!=="textarea"||R!=="")&&Ti(i,R):typeof R=="number"&&Ti(i,""+R):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(a.hasOwnProperty(w)?R!=null&&w==="onScroll"&&it("scroll",i):R!=null&&A(i,w,R,C))}switch(d){case"input":_e(i),W(i,p,!1);break;case"textarea":_e(i),ur(i);break;case"option":p.value!=null&&i.setAttribute("value",""+Pe(p.value));break;case"select":i.multiple=!!p.multiple,w=p.value,w!=null?Be(i,!!p.multiple,w,!1):p.defaultValue!=null&&Be(i,!!p.multiple,p.defaultValue,!0);break;default:typeof x.onClick=="function"&&(i.onclick=Rc)}switch(d){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return rr(s),null;case 6:if(i&&s.stateNode!=null)b1(i,s,i.memoizedProps,p);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(d=Da(zl.current),Da(Cn.current),Hc(s)){if(p=s.stateNode,d=s.memoizedProps,p[An]=s,(w=p.nodeValue!==d)&&(i=Ir,i!==null))switch(i.tag){case 3:Dc(p.nodeValue,d,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Dc(p.nodeValue,d,(i.mode&1)!==0)}w&&(s.flags|=4)}else p=(d.nodeType===9?d:d.ownerDocument).createTextNode(p),p[An]=s,s.stateNode=p}return rr(s),null;case 13:if(at(mt),p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(ct&&Tr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)jb(),qo(),s.flags|=98560,w=!1;else if(w=Hc(s),p!==null&&p.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[An]=s}else qo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;rr(s),w=!1}else dn!==null&&(Lp(dn),dn=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=d,s):(p=p!==null,p!==(i!==null&&i.memoizedState!==null)&&p&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(mt.current&1)!==0?At===0&&(At=3):Fp())),s.updateQueue!==null&&(s.flags|=4),rr(s),null);case 4:return Zo(),Ep(i,s),i===null&&Ml(s.stateNode.containerInfo),rr(s),null;case 10:return ep(s.type._context),rr(s),null;case 17:return br(s.type)&&$c(),rr(s),null;case 19:if(at(mt),w=s.memoizedState,w===null)return rr(s),null;if(p=(s.flags&128)!==0,C=w.rendering,C===null)if(p)Wl(w,!1);else{if(At!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(C=Qc(i),C!==null){for(s.flags|=128,Wl(w,!1),p=C.updateQueue,p!==null&&(s.updateQueue=p,s.flags|=4),s.subtreeFlags=0,p=d,d=s.child;d!==null;)w=d,i=p,w.flags&=14680066,C=w.alternate,C===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=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,i=C.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),d=d.sibling;return rt(mt,mt.current&1|2),s.child}i=i.sibling}w.tail!==null&&bt()>rs&&(s.flags|=128,p=!0,Wl(w,!1),s.lanes=4194304)}else{if(!p)if(i=Qc(C),i!==null){if(s.flags|=128,p=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Wl(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!ct)return rr(s),null}else 2*bt()-w.renderingStartTime>rs&&d!==1073741824&&(s.flags|=128,p=!0,Wl(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(d=w.last,d!==null?d.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=bt(),s.sibling=null,d=mt.current,rt(mt,p?d&1|2:d&1),s):(rr(s),null);case 22:case 23:return zp(),p=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(Dr&1073741824)!==0&&(rr(s),s.subtreeFlags&6&&(s.flags|=8192)):rr(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function EM(i,s){switch(qm(s),s.tag){case 1:return br(s.type)&&$c(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Zo(),at(xr),at(er),sp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return ap(s),null;case 13:if(at(mt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));qo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return at(mt),null;case 4:return Zo(),null;case 10:return ep(s.type._context),null;case 22:case 23:return zp(),null;case 24:return null;default:return null}}var id=!1,nr=!1,AM=typeof WeakSet=="function"?WeakSet:Set,be=null;function es(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(p){gt(i,s,p)}else d.current=null}function Ap(i,s,d){try{d()}catch(p){gt(i,s,p)}}var w1=!1;function CM(i,s){if(zm=Sc,i=Jx(),_m(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var C=0,T=-1,R=-1,Q=0,le=0,ce=i,oe=null;t:for(;;){for(var ve;ce!==d||x!==0&&ce.nodeType!==3||(T=C+x),ce!==w||p!==0&&ce.nodeType!==3||(R=C+p),ce.nodeType===3&&(C+=ce.nodeValue.length),(ve=ce.firstChild)!==null;)oe=ce,ce=ve;for(;;){if(ce===i)break t;if(oe===d&&++Q===x&&(T=C),oe===w&&++le===p&&(R=C),(ve=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=ve}d=T===-1||R===-1?null:{start:T,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Fm={focusedElem:i,selectionRange:d},Sc=!1,be=s;be!==null;)if(s=be,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,be=i;else for(;be!==null;){s=be;try{var je=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(je!==null){var Ne=je.memoizedProps,wt=je.memoizedState,G=s.stateNode,z=G.getSnapshotBeforeUpdate(s.elementType===s.type?Ne:fn(s.type,Ne),wt);G.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){gt(s,s.return,fe)}if(i=s.sibling,i!==null){i.return=s.return,be=i;break}be=s.return}return je=w1,w1=!1,je}function Kl(i,s,d){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&i)===i){var w=x.destroy;x.destroy=void 0,w!==void 0&&Ap(s,d,w)}x=x.next}while(x!==p)}}function ad(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 p=d.create;d.destroy=p()}d=d.next}while(d!==s)}}function Cp(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 k1(i){var s=i.alternate;s!==null&&(i.alternate=null,k1(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[An],delete s[Tl],delete s[Wm],delete s[cM],delete s[dM])),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 j1(i){return i.tag===5||i.tag===3||i.tag===4}function S1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||j1(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 Pp(i,s,d){var p=i.tag;if(p===5||p===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=Rc));else if(p!==4&&(i=i.child,i!==null))for(Pp(i,s,d),i=i.sibling;i!==null;)Pp(i,s,d),i=i.sibling}function Op(i,s,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for(Op(i,s,d),i=i.sibling;i!==null;)Op(i,s,d),i=i.sibling}var Ht=null,hn=!1;function Vi(i,s,d){for(d=d.child;d!==null;)N1(i,s,d),d=d.sibling}function N1(i,s,d){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(yc,d)}catch{}switch(d.tag){case 5:nr||es(d,s);case 6:var p=Ht,x=hn;Ht=null,Vi(i,s,d),Ht=p,hn=x,Ht!==null&&(hn?(i=Ht,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Ht.removeChild(d.stateNode));break;case 18:Ht!==null&&(hn?(i=Ht,d=d.stateNode,i.nodeType===8?Hm(i.parentNode,d):i.nodeType===1&&Hm(i,d),jl(i)):Hm(Ht,d.stateNode));break;case 4:p=Ht,x=hn,Ht=d.stateNode.containerInfo,hn=!0,Vi(i,s,d),Ht=p,hn=x;break;case 0:case 11:case 14:case 15:if(!nr&&(p=d.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){x=p=p.next;do{var w=x,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&Ap(d,s,C),x=x.next}while(x!==p)}Vi(i,s,d);break;case 1:if(!nr&&(es(d,s),p=d.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=d.memoizedProps,p.state=d.memoizedState,p.componentWillUnmount()}catch(T){gt(d,s,T)}Vi(i,s,d);break;case 21:Vi(i,s,d);break;case 22:d.mode&1?(nr=(p=nr)||d.memoizedState!==null,Vi(i,s,d),nr=p):Vi(i,s,d);break;default:Vi(i,s,d)}}function E1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new AM),s.forEach(function(p){var x=LM.bind(null,i,p);d.has(p)||(d.add(p),p.then(x,x))})}}function mn(i,s){var d=s.deletions;if(d!==null)for(var p=0;p<d.length;p++){var x=d[p];try{var w=i,C=s,T=C;e:for(;T!==null;){switch(T.tag){case 5:Ht=T.stateNode,hn=!1;break e;case 3:Ht=T.stateNode.containerInfo,hn=!0;break e;case 4:Ht=T.stateNode.containerInfo,hn=!0;break e}T=T.return}if(Ht===null)throw Error(r(160));N1(w,C,x),Ht=null,hn=!1;var R=x.alternate;R!==null&&(R.return=null),x.return=null}catch(Q){gt(x,s,Q)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)A1(s,i),s=s.sibling}function A1(i,s){var d=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(mn(s,i),On(i),p&4){try{Kl(3,i,i.return),ad(3,i)}catch(Ne){gt(i,i.return,Ne)}try{Kl(5,i,i.return)}catch(Ne){gt(i,i.return,Ne)}}break;case 1:mn(s,i),On(i),p&512&&d!==null&&es(d,d.return);break;case 5:if(mn(s,i),On(i),p&512&&d!==null&&es(d,d.return),i.flags&32){var x=i.stateNode;try{Ti(x,"")}catch(Ne){gt(i,i.return,Ne)}}if(p&4&&(x=i.stateNode,x!=null)){var w=i.memoizedProps,C=d!==null?d.memoizedProps:w,T=i.type,R=i.updateQueue;if(i.updateQueue=null,R!==null)try{T==="input"&&w.type==="radio"&&w.name!=null&&ut(x,w),sm(T,C);var Q=sm(T,w);for(C=0;C<R.length;C+=2){var le=R[C],ce=R[C+1];le==="style"?hc(x,ce):le==="dangerouslySetInnerHTML"?Or(x,ce):le==="children"?Ti(x,ce):A(x,le,ce,Q)}switch(T){case"input":Jt(x,w);break;case"textarea":ht(x,w);break;case"select":var oe=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!w.multiple;var ve=w.value;ve!=null?Be(x,!!w.multiple,ve,!1):oe!==!!w.multiple&&(w.defaultValue!=null?Be(x,!!w.multiple,w.defaultValue,!0):Be(x,!!w.multiple,w.multiple?[]:"",!1))}x[Tl]=w}catch(Ne){gt(i,i.return,Ne)}}break;case 6:if(mn(s,i),On(i),p&4){if(i.stateNode===null)throw Error(r(162));x=i.stateNode,w=i.memoizedProps;try{x.nodeValue=w}catch(Ne){gt(i,i.return,Ne)}}break;case 3:if(mn(s,i),On(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{jl(s.containerInfo)}catch(Ne){gt(i,i.return,Ne)}break;case 4:mn(s,i),On(i);break;case 13:mn(s,i),On(i),x=i.child,x.flags&8192&&(w=x.memoizedState!==null,x.stateNode.isHidden=w,!w||x.alternate!==null&&x.alternate.memoizedState!==null||(Ip=bt())),p&4&&E1(i);break;case 22:if(le=d!==null&&d.memoizedState!==null,i.mode&1?(nr=(Q=nr)||le,mn(s,i),nr=Q):mn(s,i),On(i),p&8192){if(Q=i.memoizedState!==null,(i.stateNode.isHidden=Q)&&!le&&(i.mode&1)!==0)for(be=i,le=i.child;le!==null;){for(ce=be=le;be!==null;){switch(oe=be,ve=oe.child,oe.tag){case 0:case 11:case 14:case 15:Kl(4,oe,oe.return);break;case 1:es(oe,oe.return);var je=oe.stateNode;if(typeof je.componentWillUnmount=="function"){p=oe,d=oe.return;try{s=p,je.props=s.memoizedProps,je.state=s.memoizedState,je.componentWillUnmount()}catch(Ne){gt(p,d,Ne)}}break;case 5:es(oe,oe.return);break;case 22:if(oe.memoizedState!==null){O1(ce);continue}}ve!==null?(ve.return=oe,be=ve):O1(ce)}le=le.sibling}e:for(le=null,ce=i;;){if(ce.tag===5){if(le===null){le=ce;try{x=ce.stateNode,Q?(w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(T=ce.stateNode,R=ce.memoizedProps.style,C=R!=null&&R.hasOwnProperty("display")?R.display:null,T.style.display=cr("display",C))}catch(Ne){gt(i,i.return,Ne)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=Q?"":ce.memoizedProps}catch(Ne){gt(i,i.return,Ne)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:mn(s,i),On(i),p&4&&E1(i);break;case 21:break;default:mn(s,i),On(i)}}function On(i){var s=i.flags;if(s&2){try{e:{for(var d=i.return;d!==null;){if(j1(d)){var p=d;break e}d=d.return}throw Error(r(160))}switch(p.tag){case 5:var x=p.stateNode;p.flags&32&&(Ti(x,""),p.flags&=-33);var w=S1(i);Op(i,w,x);break;case 3:case 4:var C=p.stateNode.containerInfo,T=S1(i);Pp(i,T,C);break;default:throw Error(r(161))}}catch(R){gt(i,i.return,R)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function PM(i,s,d){be=i,C1(i)}function C1(i,s,d){for(var p=(i.mode&1)!==0;be!==null;){var x=be,w=x.child;if(x.tag===22&&p){var C=x.memoizedState!==null||id;if(!C){var T=x.alternate,R=T!==null&&T.memoizedState!==null||nr;T=id;var Q=nr;if(id=C,(nr=R)&&!Q)for(be=x;be!==null;)C=be,R=C.child,C.tag===22&&C.memoizedState!==null?_1(x):R!==null?(R.return=C,be=R):_1(x);for(;w!==null;)be=w,C1(w),w=w.sibling;be=x,id=T,nr=Q}P1(i)}else(x.subtreeFlags&8772)!==0&&w!==null?(w.return=x,be=w):P1(i)}}function P1(i){for(;be!==null;){var s=be;if((s.flags&8772)!==0){var d=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:nr||ad(5,s);break;case 1:var p=s.stateNode;if(s.flags&4&&!nr)if(d===null)p.componentDidMount();else{var x=s.elementType===s.type?d.memoizedProps:fn(s.type,d.memoizedProps);p.componentDidUpdate(x,d.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Ob(s,w,p);break;case 3:var C=s.updateQueue;if(C!==null){if(d=null,s.child!==null)switch(s.child.tag){case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}Ob(s,C,d)}break;case 5:var T=s.stateNode;if(d===null&&s.flags&4){d=T;var R=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&d.focus();break;case"img":R.src&&(d.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Q=s.alternate;if(Q!==null){var le=Q.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&jl(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}nr||s.flags&512&&Cp(s)}catch(oe){gt(s,s.return,oe)}}if(s===i){be=null;break}if(d=s.sibling,d!==null){d.return=s.return,be=d;break}be=s.return}}function O1(i){for(;be!==null;){var s=be;if(s===i){be=null;break}var d=s.sibling;if(d!==null){d.return=s.return,be=d;break}be=s.return}}function _1(i){for(;be!==null;){var s=be;try{switch(s.tag){case 0:case 11:case 15:var d=s.return;try{ad(4,s)}catch(R){gt(s,d,R)}break;case 1:var p=s.stateNode;if(typeof p.componentDidMount=="function"){var x=s.return;try{p.componentDidMount()}catch(R){gt(s,x,R)}}var w=s.return;try{Cp(s)}catch(R){gt(s,w,R)}break;case 5:var C=s.return;try{Cp(s)}catch(R){gt(s,C,R)}}}catch(R){gt(s,s.return,R)}if(s===i){be=null;break}var T=s.sibling;if(T!==null){T.return=s.return,be=T;break}be=s.return}}var OM=Math.ceil,od=P.ReactCurrentDispatcher,_p=P.ReactCurrentOwner,Qr=P.ReactCurrentBatchConfig,qe=0,It=null,jt=null,Wt=0,Dr=0,ts=Ui(0),At=0,Gl=null,La=0,sd=0,Mp=0,Vl=null,kr=null,Ip=0,rs=1/0,si=null,ld=!1,Tp=null,qi=null,ud=!1,Qi=null,cd=0,ql=0,Dp=null,dd=-1,fd=0;function fr(){return(qe&6)!==0?bt():dd!==-1?dd:dd=bt()}function Yi(i){return(i.mode&1)===0?1:(qe&2)!==0&&Wt!==0?Wt&-Wt:hM.transition!==null?(fd===0&&(fd=Sx()),fd):(i=Ze,i!==0||(i=window.event,i=i===void 0?16:Ix(i.type)),i)}function pn(i,s,d,p){if(50<ql)throw ql=0,Dp=null,Error(r(185));yl(i,d,p),((qe&2)===0||i!==It)&&(i===It&&((qe&2)===0&&(sd|=d),At===4&&Xi(i,Wt)),jr(i,p),d===1&&qe===0&&(s.mode&1)===0&&(rs=bt()+500,Fc&&Wi()))}function jr(i,s){var d=i.callbackNode;h_(i,s);var p=wc(i,i===It?Wt:0);if(p===0)d!==null&&wx(d),i.callbackNode=null,i.callbackPriority=0;else if(s=p&-p,i.callbackPriority!==s){if(d!=null&&wx(d),s===1)i.tag===0?fM(I1.bind(null,i)):yb(I1.bind(null,i)),lM(function(){(qe&6)===0&&Wi()}),d=null;else{switch(Nx(p)){case 1:d=mm;break;case 4:d=kx;break;case 16:d=vc;break;case 536870912:d=jx;break;default:d=vc}d=B1(d,M1.bind(null,i))}i.callbackPriority=s,i.callbackNode=d}}function M1(i,s){if(dd=-1,fd=0,(qe&6)!==0)throw Error(r(327));var d=i.callbackNode;if(ns()&&i.callbackNode!==d)return null;var p=wc(i,i===It?Wt:0);if(p===0)return null;if((p&30)!==0||(p&i.expiredLanes)!==0||s)s=hd(i,p);else{s=p;var x=qe;qe|=2;var w=D1();(It!==i||Wt!==s)&&(si=null,rs=bt()+500,za(i,s));do try{IM();break}catch(T){T1(i,T)}while(!0);Jm(),od.current=w,qe=x,jt!==null?s=0:(It=null,Wt=0,s=At)}if(s!==0){if(s===2&&(x=pm(i),x!==0&&(p=x,s=Rp(i,x))),s===1)throw d=Gl,za(i,0),Xi(i,p),jr(i,bt()),d;if(s===6)Xi(i,p);else{if(x=i.current.alternate,(p&30)===0&&!_M(x)&&(s=hd(i,p),s===2&&(w=pm(i),w!==0&&(p=w,s=Rp(i,w))),s===1))throw d=Gl,za(i,0),Xi(i,p),jr(i,bt()),d;switch(i.finishedWork=x,i.finishedLanes=p,s){case 0:case 1:throw Error(r(345));case 2:Fa(i,kr,si);break;case 3:if(Xi(i,p),(p&130023424)===p&&(s=Ip+500-bt(),10<s)){if(wc(i,0)!==0)break;if(x=i.suspendedLanes,(x&p)!==p){fr(),i.pingedLanes|=i.suspendedLanes&x;break}i.timeoutHandle=Um(Fa.bind(null,i,kr,si),s);break}Fa(i,kr,si);break;case 4:if(Xi(i,p),(p&4194240)===p)break;for(s=i.eventTimes,x=-1;0<p;){var C=31-un(p);w=1<<C,C=s[C],C>x&&(x=C),p&=~w}if(p=x,p=bt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*OM(p/1960))-p,10<p){i.timeoutHandle=Um(Fa.bind(null,i,kr,si),p);break}Fa(i,kr,si);break;case 5:Fa(i,kr,si);break;default:throw Error(r(329))}}}return jr(i,bt()),i.callbackNode===d?M1.bind(null,i):null}function Rp(i,s){var d=Vl;return i.current.memoizedState.isDehydrated&&(za(i,s).flags|=256),i=hd(i,s),i!==2&&(s=kr,kr=d,s!==null&&Lp(s)),i}function Lp(i){kr===null?kr=i:kr.push.apply(kr,i)}function _M(i){for(var s=i;;){if(s.flags&16384){var d=s.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var p=0;p<d.length;p++){var x=d[p],w=x.getSnapshot;x=x.value;try{if(!cn(w(),x))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 Xi(i,s){for(s&=~Mp,s&=~sd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var d=31-un(s),p=1<<d;i[d]=-1,s&=~p}}function I1(i){if((qe&6)!==0)throw Error(r(327));ns();var s=wc(i,0);if((s&1)===0)return jr(i,bt()),null;var d=hd(i,s);if(i.tag!==0&&d===2){var p=pm(i);p!==0&&(s=p,d=Rp(i,p))}if(d===1)throw d=Gl,za(i,0),Xi(i,s),jr(i,bt()),d;if(d===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Fa(i,kr,si),jr(i,bt()),null}function $p(i,s){var d=qe;qe|=1;try{return i(s)}finally{qe=d,qe===0&&(rs=bt()+500,Fc&&Wi())}}function $a(i){Qi!==null&&Qi.tag===0&&(qe&6)===0&&ns();var s=qe;qe|=1;var d=Qr.transition,p=Ze;try{if(Qr.transition=null,Ze=1,i)return i()}finally{Ze=p,Qr.transition=d,qe=s,(qe&6)===0&&Wi()}}function zp(){Dr=ts.current,at(ts)}function za(i,s){i.finishedWork=null,i.finishedLanes=0;var d=i.timeoutHandle;if(d!==-1&&(i.timeoutHandle=-1,sM(d)),jt!==null)for(d=jt.return;d!==null;){var p=d;switch(qm(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&$c();break;case 3:Zo(),at(xr),at(er),sp();break;case 5:ap(p);break;case 4:Zo();break;case 13:at(mt);break;case 19:at(mt);break;case 10:ep(p.type._context);break;case 22:case 23:zp()}d=d.return}if(It=i,jt=i=Zi(i.current,null),Wt=Dr=s,At=0,Gl=null,Mp=sd=La=0,kr=Vl=null,Ta!==null){for(s=0;s<Ta.length;s++)if(d=Ta[s],p=d.interleaved,p!==null){d.interleaved=null;var x=p.next,w=d.pending;if(w!==null){var C=w.next;w.next=x,p.next=C}d.pending=p}Ta=null}return i}function T1(i,s){do{var d=jt;try{if(Jm(),Yc.current=ed,Xc){for(var p=pt.memoizedState;p!==null;){var x=p.queue;x!==null&&(x.pending=null),p=p.next}Xc=!1}if(Ra=0,Mt=Et=pt=null,Fl=!1,Bl=0,_p.current=null,d===null||d.return===null){At=1,Gl=s,jt=null;break}e:{var w=i,C=d.return,T=d,R=s;if(s=Wt,T.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var Q=R,le=T,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var oe=le.alternate;oe?(le.updateQueue=oe.updateQueue,le.memoizedState=oe.memoizedState,le.lanes=oe.lanes):(le.updateQueue=null,le.memoizedState=null)}var ve=a1(C);if(ve!==null){ve.flags&=-257,o1(ve,C,T,w,s),ve.mode&1&&i1(w,Q,s),s=ve,R=Q;var je=s.updateQueue;if(je===null){var Ne=new Set;Ne.add(R),s.updateQueue=Ne}else je.add(R);break e}else{if((s&1)===0){i1(w,Q,s),Fp();break e}R=Error(r(426))}}else if(ct&&T.mode&1){var wt=a1(C);if(wt!==null){(wt.flags&65536)===0&&(wt.flags|=256),o1(wt,C,T,w,s),Xm(Jo(R,T));break e}}w=R=Jo(R,T),At!==4&&(At=2),Vl===null?Vl=[w]:Vl.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var G=r1(w,R,s);Pb(w,G);break e;case 1:T=R;var z=w.type,V=w.stateNode;if((w.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(qi===null||!qi.has(V)))){w.flags|=65536,s&=-s,w.lanes|=s;var fe=n1(w,T,s);Pb(w,fe);break e}}w=w.return}while(w!==null)}L1(d)}catch(Ce){s=Ce,jt===d&&d!==null&&(jt=d=d.return);continue}break}while(!0)}function D1(){var i=od.current;return od.current=ed,i===null?ed:i}function Fp(){(At===0||At===3||At===2)&&(At=4),It===null||(La&268435455)===0&&(sd&268435455)===0||Xi(It,Wt)}function hd(i,s){var d=qe;qe|=2;var p=D1();(It!==i||Wt!==s)&&(si=null,za(i,s));do try{MM();break}catch(x){T1(i,x)}while(!0);if(Jm(),qe=d,od.current=p,jt!==null)throw Error(r(261));return It=null,Wt=0,At}function MM(){for(;jt!==null;)R1(jt)}function IM(){for(;jt!==null&&!i_();)R1(jt)}function R1(i){var s=F1(i.alternate,i,Dr);i.memoizedProps=i.pendingProps,s===null?L1(i):jt=s,_p.current=null}function L1(i){var s=i;do{var d=s.alternate;if(i=s.return,(s.flags&32768)===0){if(d=NM(d,s,Dr),d!==null){jt=d;return}}else{if(d=EM(d,s),d!==null){d.flags&=32767,jt=d;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{At=6,jt=null;return}}if(s=s.sibling,s!==null){jt=s;return}jt=s=i}while(s!==null);At===0&&(At=5)}function Fa(i,s,d){var p=Ze,x=Qr.transition;try{Qr.transition=null,Ze=1,TM(i,s,d,p)}finally{Qr.transition=x,Ze=p}return null}function TM(i,s,d,p){do ns();while(Qi!==null);if((qe&6)!==0)throw Error(r(327));d=i.finishedWork;var x=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(m_(i,w),i===It&&(jt=It=null,Wt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||ud||(ud=!0,B1(vc,function(){return ns(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Qr.transition,Qr.transition=null;var C=Ze;Ze=1;var T=qe;qe|=4,_p.current=null,CM(i,d),A1(d,i),eM(Fm),Sc=!!zm,Fm=zm=null,i.current=d,PM(d),a_(),qe=T,Ze=C,Qr.transition=w}else i.current=d;if(ud&&(ud=!1,Qi=i,cd=x),w=i.pendingLanes,w===0&&(qi=null),l_(d.stateNode),jr(i,bt()),s!==null)for(p=i.onRecoverableError,d=0;d<s.length;d++)x=s[d],p(x.value,{componentStack:x.stack,digest:x.digest});if(ld)throw ld=!1,i=Tp,Tp=null,i;return(cd&1)!==0&&i.tag!==0&&ns(),w=i.pendingLanes,(w&1)!==0?i===Dp?ql++:(ql=0,Dp=i):ql=0,Wi(),null}function ns(){if(Qi!==null){var i=Nx(cd),s=Qr.transition,d=Ze;try{if(Qr.transition=null,Ze=16>i?16:i,Qi===null)var p=!1;else{if(i=Qi,Qi=null,cd=0,(qe&6)!==0)throw Error(r(331));var x=qe;for(qe|=4,be=i.current;be!==null;){var w=be,C=w.child;if((be.flags&16)!==0){var T=w.deletions;if(T!==null){for(var R=0;R<T.length;R++){var Q=T[R];for(be=Q;be!==null;){var le=be;switch(le.tag){case 0:case 11:case 15:Kl(8,le,w)}var ce=le.child;if(ce!==null)ce.return=le,be=ce;else for(;be!==null;){le=be;var oe=le.sibling,ve=le.return;if(k1(le),le===Q){be=null;break}if(oe!==null){oe.return=ve,be=oe;break}be=ve}}}var je=w.alternate;if(je!==null){var Ne=je.child;if(Ne!==null){je.child=null;do{var wt=Ne.sibling;Ne.sibling=null,Ne=wt}while(Ne!==null)}}be=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,be=C;else e:for(;be!==null;){if(w=be,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Kl(9,w,w.return)}var G=w.sibling;if(G!==null){G.return=w.return,be=G;break e}be=w.return}}var z=i.current;for(be=z;be!==null;){C=be;var V=C.child;if((C.subtreeFlags&2064)!==0&&V!==null)V.return=C,be=V;else e:for(C=z;be!==null;){if(T=be,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:ad(9,T)}}catch(Ce){gt(T,T.return,Ce)}if(T===C){be=null;break e}var fe=T.sibling;if(fe!==null){fe.return=T.return,be=fe;break e}be=T.return}}if(qe=x,Wi(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(yc,i)}catch{}p=!0}return p}finally{Ze=d,Qr.transition=s}}return!1}function $1(i,s,d){s=Jo(d,s),s=r1(i,s,1),i=Gi(i,s,1),s=fr(),i!==null&&(yl(i,1,s),jr(i,s))}function gt(i,s,d){if(i.tag===3)$1(i,i,d);else for(;s!==null;){if(s.tag===3){$1(s,i,d);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(qi===null||!qi.has(p))){i=Jo(d,i),i=n1(s,i,1),s=Gi(s,i,1),i=fr(),s!==null&&(yl(s,1,i),jr(s,i));break}}s=s.return}}function DM(i,s,d){var p=i.pingCache;p!==null&&p.delete(s),s=fr(),i.pingedLanes|=i.suspendedLanes&d,It===i&&(Wt&d)===d&&(At===4||At===3&&(Wt&130023424)===Wt&&500>bt()-Ip?za(i,0):Mp|=d),jr(i,s)}function z1(i,s){s===0&&((i.mode&1)===0?s=1:(s=bc,bc<<=1,(bc&130023424)===0&&(bc=4194304)));var d=fr();i=ii(i,s),i!==null&&(yl(i,s,d),jr(i,d))}function RM(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),z1(i,d)}function LM(i,s){var d=0;switch(i.tag){case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(d=x.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(s),z1(i,d)}var F1;F1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||xr.current)wr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return wr=!1,SM(i,s,d);wr=(i.flags&131072)!==0}else wr=!1,ct&&(s.flags&1048576)!==0&&xb(s,Uc,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;nd(i,s),i=s.pendingProps;var x=Ko(s,er.current);Xo(s,d),x=cp(null,s,p,i,x,d);var w=dp();return s.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,br(p)?(w=!0,zc(s)):w=!1,s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,np(s),x.updater=td,s.stateNode=x,x._reactInternals=s,vp(s,p,i,d),s=wp(null,s,p,!0,w,d)):(s.tag=0,ct&&w&&Vm(s),dr(null,s,x,d),s=s.child),s;case 16:p=s.elementType;e:{switch(nd(i,s),i=s.pendingProps,x=p._init,p=x(p._payload),s.type=p,x=s.tag=zM(p),i=fn(p,i),x){case 0:s=bp(null,s,p,i,d);break e;case 1:s=f1(null,s,p,i,d);break e;case 11:s=s1(null,s,p,i,d);break e;case 14:s=l1(null,s,p,fn(p.type,i),d);break e}throw Error(r(306,p,""))}return s;case 0:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:fn(p,x),bp(i,s,p,x,d);case 1:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:fn(p,x),f1(i,s,p,x,d);case 3:e:{if(h1(s),i===null)throw Error(r(387));p=s.pendingProps,w=s.memoizedState,x=w.element,Cb(i,s),qc(s,p,null,d);var C=s.memoizedState;if(p=C.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){x=Jo(Error(r(423)),s),s=m1(i,s,p,d,x);break e}else if(p!==x){x=Jo(Error(r(424)),s),s=m1(i,s,p,d,x);break e}else for(Tr=Bi(s.stateNode.containerInfo.firstChild),Ir=s,ct=!0,dn=null,d=Eb(s,null,p,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(qo(),p===x){s=oi(i,s,d);break e}dr(i,s,p,d)}s=s.child}return s;case 5:return _b(s),i===null&&Ym(s),p=s.type,x=s.pendingProps,w=i!==null?i.memoizedProps:null,C=x.children,Bm(p,x)?C=null:w!==null&&Bm(p,w)&&(s.flags|=32),d1(i,s),dr(i,s,C,d),s.child;case 6:return i===null&&Ym(s),null;case 13:return p1(i,s,d);case 4:return ip(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=Qo(s,null,p,d):dr(i,s,p,d),s.child;case 11:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:fn(p,x),s1(i,s,p,x,d);case 7:return dr(i,s,s.pendingProps,d),s.child;case 8:return dr(i,s,s.pendingProps.children,d),s.child;case 12:return dr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(p=s.type._context,x=s.pendingProps,w=s.memoizedProps,C=x.value,rt(Kc,p._currentValue),p._currentValue=C,w!==null)if(cn(w.value,C)){if(w.children===x.children&&!xr.current){s=oi(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var T=w.dependencies;if(T!==null){C=w.child;for(var R=T.firstContext;R!==null;){if(R.context===p){if(w.tag===1){R=ai(-1,d&-d),R.tag=2;var Q=w.updateQueue;if(Q!==null){Q=Q.shared;var le=Q.pending;le===null?R.next=R:(R.next=le.next,le.next=R),Q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),tp(w.return,d,s),T.lanes|=d;break}R=R.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(r(341));C.lanes|=d,T=C.alternate,T!==null&&(T.lanes|=d),tp(C,d,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}dr(i,s,x.children,d),s=s.child}return s;case 9:return x=s.type,p=s.pendingProps.children,Xo(s,d),x=Vr(x),p=p(x),s.flags|=1,dr(i,s,p,d),s.child;case 14:return p=s.type,x=fn(p,s.pendingProps),x=fn(p.type,x),l1(i,s,p,x,d);case 15:return u1(i,s,s.type,s.pendingProps,d);case 17:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:fn(p,x),nd(i,s),s.tag=1,br(p)?(i=!0,zc(s)):i=!1,Xo(s,d),e1(s,p,x),vp(s,p,x,d),wp(null,s,p,!0,i,d);case 19:return v1(i,s,d);case 22:return c1(i,s,d)}throw Error(r(156,s.tag))};function B1(i,s){return bx(i,s)}function $M(i,s,d,p){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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(i,s,d,p){return new $M(i,s,d,p)}function Bp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zM(i){if(typeof i=="function")return Bp(i)?1:0;if(i!=null){if(i=i.$$typeof,i===H)return 11;if(i===he)return 14}return 2}function Zi(i,s){var d=i.alternate;return d===null?(d=Yr(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 md(i,s,d,p,x,w){var C=2;if(p=i,typeof i=="function")Bp(i)&&(C=1);else if(typeof i=="string")C=5;else e:switch(i){case D:return Ba(d.children,x,w,s);case U:C=8,x|=8;break;case B:return i=Yr(12,d,s,x|2),i.elementType=B,i.lanes=w,i;case pe:return i=Yr(13,d,s,x),i.elementType=pe,i.lanes=w,i;case ue:return i=Yr(19,d,s,x),i.elementType=ue,i.lanes=w,i;case se:return pd(d,x,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case F:C=10;break e;case Y:C=9;break e;case H:C=11;break e;case he:C=14;break e;case ae:C=16,p=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=Yr(C,d,s,x),s.elementType=i,s.type=p,s.lanes=w,s}function Ba(i,s,d,p){return i=Yr(7,i,p,s),i.lanes=d,i}function pd(i,s,d,p){return i=Yr(22,i,p,s),i.elementType=se,i.lanes=d,i.stateNode={isHidden:!1},i}function Up(i,s,d){return i=Yr(6,i,null,s),i.lanes=d,i}function Hp(i,s,d){return s=Yr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function FM(i,s,d,p,x){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=gm(0),this.expirationTimes=gm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gm(0),this.identifierPrefix=p,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Wp(i,s,d,p,x,w,C,T,R){return i=new FM(i,s,d,T,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Yr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:p,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},np(w),i}function BM(i,s,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:p==null?null:""+p,children:i,containerInfo:s,implementation:d}}function U1(i){if(!i)return Hi;i=i._reactInternals;e:{if(Pa(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(br(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(br(d))return gb(i,d,s)}return s}function H1(i,s,d,p,x,w,C,T,R){return i=Wp(d,p,!0,i,x,w,C,T,R),i.context=U1(null),d=i.current,p=fr(),x=Yi(d),w=ai(p,x),w.callback=s??null,Gi(d,w,x),i.current.lanes=x,yl(i,x,p),jr(i,p),i}function gd(i,s,d,p){var x=s.current,w=fr(),C=Yi(x);return d=U1(d),s.context===null?s.context=d:s.pendingContext=d,s=ai(w,C),s.payload={element:i},p=p===void 0?null:p,p!==null&&(s.callback=p),i=Gi(x,s,C),i!==null&&(pn(i,x,C,w),Vc(i,x,C)),C}function vd(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 W1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<s?d:s}}function Kp(i,s){W1(i,s),(i=i.alternate)&&W1(i,s)}function UM(){return null}var K1=typeof reportError=="function"?reportError:function(i){console.error(i)};function Gp(i){this._internalRoot=i}yd.prototype.render=Gp.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));gd(i,s,null,null)},yd.prototype.unmount=Gp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;$a(function(){gd(null,i,null,null)}),s[ei]=null}};function yd(i){this._internalRoot=i}yd.prototype.unstable_scheduleHydration=function(i){if(i){var s=Cx();i={blockedOn:null,target:i,priority:s};for(var d=0;d<$i.length&&s!==0&&s<$i[d].priority;d++);$i.splice(d,0,i),d===0&&_x(i)}};function Vp(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function G1(){}function HM(i,s,d,p,x){if(x){if(typeof p=="function"){var w=p;p=function(){var Q=vd(C);w.call(Q)}}var C=H1(s,p,i,0,null,!1,!1,"",G1);return i._reactRootContainer=C,i[ei]=C.current,Ml(i.nodeType===8?i.parentNode:i),$a(),C}for(;x=i.lastChild;)i.removeChild(x);if(typeof p=="function"){var T=p;p=function(){var Q=vd(R);T.call(Q)}}var R=Wp(i,0,!1,null,null,!1,!1,"",G1);return i._reactRootContainer=R,i[ei]=R.current,Ml(i.nodeType===8?i.parentNode:i),$a(function(){gd(s,R,d,p)}),R}function bd(i,s,d,p,x){var w=d._reactRootContainer;if(w){var C=w;if(typeof x=="function"){var T=x;x=function(){var R=vd(C);T.call(R)}}gd(s,C,i,x)}else C=HM(d,s,i,x,p);return vd(C)}Ex=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var d=vl(s.pendingLanes);d!==0&&(vm(s,d|1),jr(s,bt()),(qe&6)===0&&(rs=bt()+500,Wi()))}break;case 13:$a(function(){var p=ii(i,1);if(p!==null){var x=fr();pn(p,i,1,x)}}),Kp(i,1)}},ym=function(i){if(i.tag===13){var s=ii(i,134217728);if(s!==null){var d=fr();pn(s,i,134217728,d)}Kp(i,134217728)}},Ax=function(i){if(i.tag===13){var s=Yi(i),d=ii(i,s);if(d!==null){var p=fr();pn(d,i,s,p)}Kp(i,s)}},Cx=function(){return Ze},Px=function(i,s){var d=Ze;try{return Ze=i,s()}finally{Ze=d}},cm=function(i,s,d){switch(s){case"input":if(Jt(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 p=d[s];if(p!==i&&p.form===i.form){var x=Lc(p);if(!x)throw Error(r(90));ie(p),Jt(p,x)}}}break;case"textarea":ht(i,d);break;case"select":s=d.value,s!=null&&Be(i,!!d.multiple,s,!1)}},hx=$p,mx=$a;var WM={usingClientEntryPoint:!1,Events:[Dl,Ho,Lc,dx,fx,$p]},Ql={findFiberByHostInstance:Oa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},KM={bundleType:Ql.bundleType,version:Ql.version,rendererPackageName:Ql.rendererPackageName,rendererConfig:Ql.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=yx(i),i===null?null:i.stateNode},findFiberByHostInstance:Ql.findFiberByHostInstance||UM,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 wd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wd.isDisabled&&wd.supportsFiber)try{yc=wd.inject(KM),En=wd}catch{}}return Sr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WM,Sr.createPortal=function(i,s){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vp(s))throw Error(r(200));return BM(i,s,null,d)},Sr.createRoot=function(i,s){if(!Vp(i))throw Error(r(299));var d=!1,p="",x=K1;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(x=s.onRecoverableError)),s=Wp(i,1,!1,null,null,d,!1,p,x),i[ei]=s.current,Ml(i.nodeType===8?i.parentNode:i),new Gp(s)},Sr.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=yx(s),i=i===null?null:i.stateNode,i},Sr.flushSync=function(i){return $a(i)},Sr.hydrate=function(i,s,d){if(!xd(s))throw Error(r(200));return bd(null,i,s,!0,d)},Sr.hydrateRoot=function(i,s,d){if(!Vp(i))throw Error(r(405));var p=d!=null&&d.hydratedSources||null,x=!1,w="",C=K1;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(C=d.onRecoverableError)),s=H1(s,null,i,1,d??null,x,!1,w,C),i[ei]=s.current,Ml(i),p)for(i=0;i<p.length;i++)d=p[i],x=d._getVersion,x=x(d._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[d,x]:s.mutableSourceEagerHydrationData.push(d,x);return new yd(s)},Sr.render=function(i,s,d){if(!xd(s))throw Error(r(200));return bd(null,i,s,!1,d)},Sr.unmountComponentAtNode=function(i){if(!xd(i))throw Error(r(40));return i._reactRootContainer?($a(function(){bd(null,null,i,!1,function(){i._reactRootContainer=null,i[ei]=null})}),!0):!1},Sr.unstable_batchedUpdates=$p,Sr.unstable_renderSubtreeIntoContainer=function(i,s,d,p){if(!xd(d))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return bd(i,s,d,!1,p)},Sr.version="18.3.1-next-f1338f8080-20240426",Sr}var tw;function hN(){if(tw)return Xp.exports;tw=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(),Xp.exports=t3(),Xp.exports}var rw;function r3(){if(rw)return jd;rw=1;var e=hN();return jd.createRoot=e.createRoot,jd.hydrateRoot=e.hydrateRoot,jd}var n3=r3();const i3=vy(n3);var qu=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(){}},ao,ua,As,rN,a3=(rN=class extends qu{constructor(){super();De(this,ao);De(this,ua);De(this,As);ye(this,As,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,ua)||this.setEventListener(L(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ua))==null||t.call(this),ye(this,ua,void 0))}setEventListener(t){var r;ye(this,As,t),(r=L(this,ua))==null||r.call(this),ye(this,ua,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,ao)!==t&&(ye(this,ao,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,ao)=="boolean"?L(this,ao):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ao=new WeakMap,ua=new WeakMap,As=new WeakMap,rN),yy=new a3,o3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ca,gy,nN,s3=(nN=class{constructor(){De(this,ca,o3);De(this,gy,!1)}setTimeoutProvider(e){ye(this,ca,e)}setTimeout(e,t){return L(this,ca).setTimeout(e,t)}clearTimeout(e){L(this,ca).clearTimeout(e)}setInterval(e,t){return L(this,ca).setInterval(e,t)}clearInterval(e){L(this,ca).clearInterval(e)}},ca=new WeakMap,gy=new WeakMap,nN),Za=new s3;function l3(e){setTimeout(e,0)}var u3=typeof window>"u"||"Deno"in globalThis;function Er(){}function c3(e,t){return typeof e=="function"?e(t):e}function Vg(e){return typeof e=="number"&&e>=0&&e!==1/0}function mN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ya(e,t){return typeof e=="function"?e(t):e}function zr(e,t){return typeof e=="function"?e(t):e}function nw(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:u}=e;if(c){if(n){if(t.queryHash!==xy(c,t.options))return!1}else if(!ju(t.queryKey,c))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||o&&!o(t))}function iw(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ku(t.options.mutationKey)!==ku(o))return!1}else if(!ju(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function xy(e,t){return((t==null?void 0:t.queryKeyHashFn)||ku)(e)}function ku(e){return JSON.stringify(e,(t,r)=>Qg(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function ju(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ju(e[r],t[r])):!1}var d3=Object.prototype.hasOwnProperty;function pN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=aw(e)&&aw(t);if(!n&&!(Qg(e)&&Qg(t)))return t;const o=(n?e:Object.keys(e)).length,c=n?t:Object.keys(t),u=c.length,f=n?new Array(u):{};let h=0;for(let m=0;m<u;m++){const g=n?m:c[m],v=e[g],b=t[g];if(v===b){f[g]=v,(n?m<o:d3.call(e,g))&&h++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){f[g]=b;continue}const j=pN(v,b,r+1);f[g]=j,j===v&&h++}return o===u&&h===o?e:f}function qg(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 aw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qg(e){if(!ow(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!ow(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ow(e){return Object.prototype.toString.call(e)==="[object Object]"}function f3(e){return new Promise(t=>{Za.setTimeout(t,e)})}function Yg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?pN(e,t):t}function h3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function m3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var by=Symbol();function gN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===by?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vN(e,t){return typeof e=="function"?e(...t):!!e}function p3(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 Su=(()=>{let e=()=>u3;return{isServer(){return e()},setIsServer(t){e=t}}})();function Xg(){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 g3=l3;function v3(){let e=[],t=0,r=u=>{u()},n=u=>{u()},a=g3;const o=u=>{t?e.push(u):a(()=>{r(u)})},c=()=>{const u=e;e=[],u.length&&a(()=>{n(()=>{u.forEach(f=>{r(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||c()}return f},batchCalls:u=>(...f)=>{o(()=>{u(...f)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{a=u}}}var qt=v3(),Cs,da,Ps,iN,y3=(iN=class extends qu{constructor(){super();De(this,Cs,!0);De(this,da);De(this,Ps);ye(this,Ps,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,da)||this.setEventListener(L(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,da))==null||t.call(this),ye(this,da,void 0))}setEventListener(t){var r;ye(this,Ps,t),(r=L(this,da))==null||r.call(this),ye(this,da,t(this.setOnline.bind(this)))}setOnline(t){L(this,Cs)!==t&&(ye(this,Cs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,Cs)}},Cs=new WeakMap,da=new WeakMap,Ps=new WeakMap,iN),of=new y3;function x3(e){return Math.min(1e3*2**e,3e4)}function yN(e){return(e??"online")==="online"?of.isOnline():!0}var Zg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xN(e){let t=!1,r=0,n;const a=Xg(),o=()=>a.status!=="pending",c=k=>{var S;if(!o()){const N=new Zg(k);v(N),(S=e.onCancel)==null||S.call(e,N)}},u=()=>{t=!0},f=()=>{t=!1},h=()=>yy.isFocused()&&(e.networkMode==="always"||of.isOnline())&&e.canRun(),m=()=>yN(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),a.resolve(k))},v=k=>{o()||(n==null||n(),a.reject(k))},b=()=>new Promise(k=>{var S;n=N=>{(o()||h())&&k(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;n=void 0,o()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(o())return;let k;const S=r===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(N){k=Promise.reject(N)}Promise.resolve(k).then(g).catch(N=>{var O;if(o())return;const E=e.retry??(Su.isServer()?0:3),A=e.retryDelay??x3,P=typeof A=="function"?A(r,N):A,_=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,N);if(t||!_){v(N);return}r++,(O=e.onFail)==null||O.call(e,r,N),f3(P).then(()=>h()?void 0:b()).then(()=>{t?v(N):j()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:u,continueRetry:f,canStart:m,start:()=>(m()?j():b().then(j),a)}}var oo,aN,bN=(aN=class{constructor(){De(this,oo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vg(this.gcTime)&&ye(this,oo,Za.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Su.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,oo)!==void 0&&(Za.clearTimeout(L(this,oo)),ye(this,oo,void 0))}},oo=new WeakMap,aN);function b3(e){return{onFetch:(t,r)=>{var m,g,v,b,j;const n=t.options,a=(v=(g=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],c=((j=t.state.data)==null?void 0:j.pageParams)||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=A=>{p3(A,()=>t.signal,()=>k=!0)},N=gN(t.options,t.fetchOptions),E=async(A,P,_)=>{if(k)return Promise.reject(t.signal.reason);if(P==null&&A.pages.length)return Promise.resolve(A);const D=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:P,direction:_?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),U=await N(D),{maxPages:B}=t.options,F=_?m3:h3;return{pages:F(A.pages,U,B),pageParams:F(A.pageParams,P,B)}};if(a&&o.length){const A=a==="backward",P=A?w3:sw,_={pages:o,pageParams:c},O=P(n,_);u=await E(_,O,A)}else{const A=e??o.length;do{const P=f===0?c[0]??n.initialPageParam:sw(n,u);if(f>0&&P==null)break;u=await E(u,P),f++}while(f<A)}return u};t.options.persister?t.fetchFn=()=>{var k,S;return(S=(k=t.options).persister)==null?void 0:S.call(k,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function sw(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 w3(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 Os,so,_s,Zr,lo,Dt,Hu,uo,$r,wN,ui,oN,k3=(oN=class extends bN{constructor(t){super();De(this,$r);De(this,Os);De(this,so);De(this,_s);De(this,Zr);De(this,lo);De(this,Dt);De(this,Hu);De(this,uo);ye(this,uo,!1),ye(this,Hu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,lo,t.client),ye(this,Zr,L(this,lo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,so,uw(this.options)),this.state=t.state??L(this,so),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,Os)}get promise(){var t;return(t=L(this,Dt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Hu),...t},t!=null&&t._type&&ye(this,Os,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=uw(this.options);r.data!==void 0&&(this.setState(lw(r.data,r.dataUpdatedAt)),ye(this,so,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Zr).remove(this)}setData(t,r){const n=Yg(this.state.data,t,this.options);return He(this,$r,ui).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){He(this,$r,ui).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,Dt))==null?void 0:n.promise;return(a=L(this,Dt))==null||a.cancel(t),r?r.then(Er).catch(Er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,so)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>zr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===by||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ya(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:!mN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Zr).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,Dt)&&(L(this,uo)||He(this,$r,wN).call(this)?L(this,Dt).cancel({revert:!0}):L(this,Dt).cancelRetry()),this.scheduleGc()),L(this,Zr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,$r,ui).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,g,v,b,j,k,S,N,E,A;if(this.state.fetchStatus!=="idle"&&((h=L(this,Dt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,Dt))return L(this,Dt).continueRetry(),L(this,Dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(_=>_.options.queryFn);P&&this.setOptions(P.options)}const n=new AbortController,a=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(ye(this,uo,!0),n.signal)})},o=()=>{const P=gN(this.options,r),O=(()=>{const D={client:L(this,lo),queryKey:this.queryKey,meta:this.meta};return a(D),D})();return ye(this,uo,!1),this.options.persister?this.options.persister(P,O,this):P(O)},u=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,lo),state:this.state,fetchFn:o};return a(P),P})(),f=L(this,Os)==="infinite"?b3(this.options.pages):this.options.behavior;f==null||f.onFetch(u,this),ye(this,_s,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&He(this,$r,ui).call(this,{type:"fetch",meta:(g=u.fetchOptions)==null?void 0:g.meta}),ye(this,Dt,xN({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:P=>{P instanceof Zg&&P.revert&&this.setState({...L(this,_s),fetchStatus:"idle"}),n.abort()},onFail:(P,_)=>{He(this,$r,ui).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{He(this,$r,ui).call(this,{type:"pause"})},onContinue:()=>{He(this,$r,ui).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const P=await L(this,Dt).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(v=L(this,Zr).config).onSuccess)==null||b.call(v,P,this),(k=(j=L(this,Zr).config).onSettled)==null||k.call(j,P,this.state.error,this),P}catch(P){if(P instanceof Zg){if(P.silent)return L(this,Dt).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw He(this,$r,ui).call(this,{type:"error",error:P}),(N=(S=L(this,Zr).config).onError)==null||N.call(S,P,this),(A=(E=L(this,Zr).config).onSettled)==null||A.call(E,this.state.data,P,this),P}finally{this.scheduleGc()}}},Os=new WeakMap,so=new WeakMap,_s=new WeakMap,Zr=new WeakMap,lo=new WeakMap,Dt=new WeakMap,Hu=new WeakMap,uo=new WeakMap,$r=new WeakSet,wN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ui=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,...kN(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...lw(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,_s,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),qt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Zr).notify({query:this,type:"updated",action:t})})},oN);function kN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uw(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 Nr,Ke,Wu,hr,co,Ms,di,fa,Ku,Is,Ts,fo,ho,ha,Ds,Xe,hu,Jg,ev,tv,rv,nv,iv,av,jN,sN,j3=(sN=class extends qu{constructor(t,r){super();De(this,Xe);De(this,Nr);De(this,Ke);De(this,Wu);De(this,hr);De(this,co);De(this,Ms);De(this,di);De(this,fa);De(this,Ku);De(this,Is);De(this,Ts);De(this,fo);De(this,ho);De(this,ha);De(this,Ds,new Set);this.options=r,ye(this,Nr,t),ye(this,fa,null),ye(this,di,Xg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ke).addObserver(this),cw(L(this,Ke),this.options)?He(this,Xe,hu).call(this):this.updateResult(),He(this,Xe,rv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ov(L(this,Ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ov(L(this,Ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,Xe,nv).call(this),He(this,Xe,iv).call(this),L(this,Ke).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,Ke);if(this.options=L(this,Nr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zr(this.options.enabled,L(this,Ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,Xe,av).call(this),L(this,Ke).setOptions(this.options),r._defaulted&&!qg(this.options,r)&&L(this,Nr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ke),observer:this});const a=this.hasListeners();a&&dw(L(this,Ke),n,this.options,r)&&He(this,Xe,hu).call(this),this.updateResult(),a&&(L(this,Ke)!==n||zr(this.options.enabled,L(this,Ke))!==zr(r.enabled,L(this,Ke))||ya(this.options.staleTime,L(this,Ke))!==ya(r.staleTime,L(this,Ke)))&&He(this,Xe,Jg).call(this);const o=He(this,Xe,ev).call(this);a&&(L(this,Ke)!==n||zr(this.options.enabled,L(this,Ke))!==zr(r.enabled,L(this,Ke))||o!==L(this,ha))&&He(this,Xe,tv).call(this,o)}getOptimisticResult(t){const r=L(this,Nr).getQueryCache().build(L(this,Nr),t),n=this.createResult(r,t);return N3(this,n)&&(ye(this,hr,n),ye(this,Ms,this.options),ye(this,co,L(this,Ke).state)),n}getCurrentResult(){return L(this,hr)}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,di).status==="pending"&&L(this,di).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,Ds).add(t)}getCurrentQuery(){return L(this,Ke)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,Nr).defaultQueryOptions(t),n=L(this,Nr).getQueryCache().build(L(this,Nr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return He(this,Xe,hu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,hr)))}createResult(t,r){var B;const n=L(this,Ke),a=this.options,o=L(this,hr),c=L(this,co),u=L(this,Ms),h=t!==n?t.state:L(this,Wu),{state:m}=t;let g={...m},v=!1,b;if(r._optimisticResults){const F=this.hasListeners(),Y=!F&&cw(t,r),H=F&&dw(t,n,r,a);(Y||H)&&(g={...g,...kN(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let F;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?(F=o.data,N=!0):F=typeof r.placeholderData=="function"?r.placeholderData((B=L(this,Ts))==null?void 0:B.state.data,L(this,Ts)):r.placeholderData,F!==void 0&&(S="success",b=Yg(o==null?void 0:o.data,F,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(c==null?void 0:c.data)&&r.select===L(this,Ku))b=L(this,Is);else try{ye(this,Ku,r.select),b=r.select(b),b=Yg(o==null?void 0:o.data,b,r),ye(this,Is,b),ye(this,fa,null)}catch(F){ye(this,fa,F)}L(this,fa)&&(j=L(this,fa),b=L(this,Is),k=Date.now(),S="error");const E=g.fetchStatus==="fetching",A=S==="pending",P=S==="error",_=A&&E,O=b!==void 0,U={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:P,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:P&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:P&&O,isStale:wy(t,r),refetch:this.refetch,promise:L(this,di),isEnabled:zr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const F=U.data!==void 0,Y=U.status==="error"&&!F,H=he=>{Y?he.reject(U.error):F&&he.resolve(U.data)},pe=()=>{const he=ye(this,di,U.promise=Xg());H(he)},ue=L(this,di);switch(ue.status){case"pending":t.queryHash===n.queryHash&&H(ue);break;case"fulfilled":(Y||U.data!==ue.value)&&pe();break;case"rejected":(!Y||U.error!==ue.reason)&&pe();break}}return U}updateResult(){const t=L(this,hr),r=this.createResult(L(this,Ke),this.options);if(ye(this,co,L(this,Ke).state),ye(this,Ms,this.options),L(this,co).data!==void 0&&ye(this,Ts,L(this,Ke)),qg(r,t))return;ye(this,hr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!L(this,Ds).size)return!0;const c=new Set(o??L(this,Ds));return this.options.throwOnError&&c.add("error"),Object.keys(L(this,hr)).some(u=>{const f=u;return L(this,hr)[f]!==t[f]&&c.has(f)})};He(this,Xe,jN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,Xe,rv).call(this)}},Nr=new WeakMap,Ke=new WeakMap,Wu=new WeakMap,hr=new WeakMap,co=new WeakMap,Ms=new WeakMap,di=new WeakMap,fa=new WeakMap,Ku=new WeakMap,Is=new WeakMap,Ts=new WeakMap,fo=new WeakMap,ho=new WeakMap,ha=new WeakMap,Ds=new WeakMap,Xe=new WeakSet,hu=function(t){He(this,Xe,av).call(this);let r=L(this,Ke).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Er)),r},Jg=function(){He(this,Xe,nv).call(this);const t=ya(this.options.staleTime,L(this,Ke));if(Su.isServer()||L(this,hr).isStale||!Vg(t))return;const n=mN(L(this,hr).dataUpdatedAt,t)+1;ye(this,fo,Za.setTimeout(()=>{L(this,hr).isStale||this.updateResult()},n))},ev=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ke)):this.options.refetchInterval)??!1},tv=function(t){He(this,Xe,iv).call(this),ye(this,ha,t),!(Su.isServer()||zr(this.options.enabled,L(this,Ke))===!1||!Vg(L(this,ha))||L(this,ha)===0)&&ye(this,ho,Za.setInterval(()=>{(this.options.refetchIntervalInBackground||yy.isFocused())&&He(this,Xe,hu).call(this)},L(this,ha)))},rv=function(){He(this,Xe,Jg).call(this),He(this,Xe,tv).call(this,He(this,Xe,ev).call(this))},nv=function(){L(this,fo)!==void 0&&(Za.clearTimeout(L(this,fo)),ye(this,fo,void 0))},iv=function(){L(this,ho)!==void 0&&(Za.clearInterval(L(this,ho)),ye(this,ho,void 0))},av=function(){const t=L(this,Nr).getQueryCache().build(L(this,Nr),this.options);if(t===L(this,Ke))return;const r=L(this,Ke);ye(this,Ke,t),ye(this,Wu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},jN=function(t){qt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,hr))}),L(this,Nr).getQueryCache().notify({query:L(this,Ke),type:"observerResultsUpdated"})})},sN);function S3(e,t){return zr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&zr(t.retryOnMount,e)===!1)}function cw(e,t){return S3(e,t)||e.state.data!==void 0&&ov(e,t,t.refetchOnMount)}function ov(e,t,r){if(zr(t.enabled,e)!==!1&&ya(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&wy(e,t)}return!1}function dw(e,t,r,n){return(e!==t||zr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&wy(e,r)}function wy(e,t){return zr(t.enabled,e)!==!1&&e.isStaleByTime(ya(t.staleTime,e))}function N3(e,t){return!qg(e.getCurrentResult(),t)}var Gu,Dn,ir,mo,Rn,na,lN,E3=(lN=class extends bN{constructor(t){super();De(this,Rn);De(this,Gu);De(this,Dn);De(this,ir);De(this,mo);ye(this,Gu,t.client),this.mutationId=t.mutationId,ye(this,ir,t.mutationCache),ye(this,Dn,[]),this.state=t.state||A3(),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,Dn).includes(t)||(L(this,Dn).push(t),this.clearGcTimeout(),L(this,ir).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,Dn,L(this,Dn).filter(r=>r!==t)),this.scheduleGc(),L(this,ir).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Dn).length||(this.state.status==="pending"?this.scheduleGc():L(this,ir).remove(this))}continue(){var t;return((t=L(this,mo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,u,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D;const r=()=>{He(this,Rn,na).call(this,{type:"continue"})},n={client:L(this,Gu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,mo,xN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(U,B)=>{He(this,Rn,na).call(this,{type:"failed",failureCount:U,error:B})},onPause:()=>{He(this,Rn,na).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,ir).canRun(this)}));const a=this.state.status==="pending",o=!L(this,mo).canStart();try{if(a)r();else{He(this,Rn,na).call(this,{type:"pending",variables:t,isPaused:o}),L(this,ir).config.onMutate&&await L(this,ir).config.onMutate(t,this,n);const B=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,n));B!==this.state.context&&He(this,Rn,na).call(this,{type:"pending",context:B,variables:t,isPaused:o})}const U=await L(this,mo).start();return await((h=(f=L(this,ir).config).onSuccess)==null?void 0:h.call(f,U,t,this.state.context,this,n)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,U,t,this.state.context,n)),await((b=(v=L(this,ir).config).onSettled)==null?void 0:b.call(v,U,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,U,null,t,this.state.context,n)),He(this,Rn,na).call(this,{type:"success",data:U}),U}catch(U){try{await((N=(S=L(this,ir).config).onError)==null?void 0:N.call(S,U,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((A=(E=this.options).onError)==null?void 0:A.call(E,U,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((_=(P=L(this,ir).config).onSettled)==null?void 0:_.call(P,void 0,U,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,U,t,this.state.context,n))}catch(B){Promise.reject(B)}throw He(this,Rn,na).call(this,{type:"error",error:U}),U}finally{L(this,ir).runNext(this)}}},Gu=new WeakMap,Dn=new WeakMap,ir=new WeakMap,mo=new WeakMap,Rn=new WeakSet,na=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),qt.batch(()=>{L(this,Dn).forEach(n=>{n.onMutationUpdate(t)}),L(this,ir).notify({mutation:this,type:"updated",action:t})})},lN);function A3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fi,vn,Vu,uN,C3=(uN=class extends qu{constructor(t={}){super();De(this,fi);De(this,vn);De(this,Vu);this.config=t,ye(this,fi,new Set),ye(this,vn,new Map),ye(this,Vu,0)}build(t,r,n){const a=new E3({client:t,mutationCache:this,mutationId:++kd(this,Vu)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,fi).add(t);const r=Sd(t);if(typeof r=="string"){const n=L(this,vn).get(r);n?n.push(t):L(this,vn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,fi).delete(t)){const r=Sd(t);if(typeof r=="string"){const n=L(this,vn).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,vn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Sd(t);if(typeof r=="string"){const n=L(this,vn).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=Sd(t);if(typeof r=="string"){const a=(n=L(this,vn).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(){qt.batch(()=>{L(this,fi).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,fi).clear(),L(this,vn).clear()})}getAll(){return Array.from(L(this,fi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>iw(r,n))}findAll(t={}){return this.getAll().filter(r=>iw(t,r))}notify(t){qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return qt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Er))))}},fi=new WeakMap,vn=new WeakMap,Vu=new WeakMap,uN);function Sd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ln,cN,P3=(cN=class extends qu{constructor(t={}){super();De(this,Ln);this.config=t,ye(this,Ln,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??xy(a,r);let c=this.get(o);return c||(c=new k3({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(c)),c}add(t){L(this,Ln).has(t.queryHash)||(L(this,Ln).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,Ln).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,Ln).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Ln).get(t)}getAll(){return[...L(this,Ln).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>nw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>nw(t,n)):r}notify(t){qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ln=new WeakMap,cN),vt,ma,pa,Rs,Ls,ga,$s,zs,dN,O3=(dN=class{constructor(e={}){De(this,vt);De(this,ma);De(this,pa);De(this,Rs);De(this,Ls);De(this,ga);De(this,$s);De(this,zs);ye(this,vt,e.queryCache||new P3),ye(this,ma,e.mutationCache||new C3),ye(this,pa,e.defaultOptions||{}),ye(this,Rs,new Map),ye(this,Ls,new Map),ye(this,ga,0)}mount(){kd(this,ga)._++,L(this,ga)===1&&(ye(this,$s,yy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,vt).onFocus())})),ye(this,zs,of.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,vt).onOnline())})))}unmount(){var e,t;kd(this,ga)._--,L(this,ga)===0&&((e=L(this,$s))==null||e.call(this),ye(this,$s,void 0),(t=L(this,zs))==null||t.call(this),ye(this,zs,void 0))}isFetching(e){return L(this,vt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,ma).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,vt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,vt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ya(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,vt).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,vt).get(n.queryHash),o=a==null?void 0:a.state.data,c=c3(t,o);if(c!==void 0)return L(this,vt).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return qt.batch(()=>L(this,vt).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,vt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,vt);qt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,vt);return qt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=qt.batch(()=>L(this,vt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(Er).catch(Er)}invalidateQueries(e,t={}){return qt.batch(()=>(L(this,vt).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=qt.batch(()=>L(this,vt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(Er)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Er)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,vt).build(this,t);return r.isStaleByTime(ya(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Er).catch(Er)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Er).catch(Er)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return of.isOnline()?L(this,ma).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,vt)}getMutationCache(){return L(this,ma)}getDefaultOptions(){return L(this,pa)}setDefaultOptions(e){ye(this,pa,e)}setQueryDefaults(e,t){L(this,Rs).set(ku(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Rs).values()],r={};return t.forEach(n=>{ju(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Ls).set(ku(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Ls).values()],r={};return t.forEach(n=>{ju(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,pa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xy(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===by&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,pa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,vt).clear(),L(this,ma).clear()}},vt=new WeakMap,ma=new WeakMap,pa=new WeakMap,Rs=new WeakMap,Ls=new WeakMap,ga=new WeakMap,$s=new WeakMap,zs=new WeakMap,dN),SN=y.createContext(void 0),Yn=e=>{const t=y.useContext(SN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_3=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(SN.Provider,{value:e,children:t})),NN=y.createContext(!1),M3=()=>y.useContext(NN);NN.Provider;function I3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var T3=y.createContext(I3()),D3=()=>y.useContext(T3),R3=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?vN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},L3=e=>{y.useEffect(()=>{e.clearReset()},[e])},$3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||vN(r,[e.error,n])),z3=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))}},F3=(e,t)=>e.isLoading&&e.isFetching&&!t,B3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function U3(e,t,r){var b,j,k,S;const n=M3(),a=D3(),o=Yn(),c=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,c);const u=o.getQueryCache().get(c.queryHash),f=e.subscribed!==!1;c._optimisticResults=n?"isRestoring":f?"optimistic":void 0,z3(c),R3(c,a,u),L3(a);const h=!o.getQueryCache().get(c.queryHash),[m]=y.useState(()=>new t(o,c)),g=m.getOptimisticResult(c),v=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const E=v?m.subscribe(qt.batchCalls(N)):Er;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(c)},[c,m]),B3(c,g))throw fw(c,m,a);if($3({result:g,errorResetBoundary:a,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw g.error;if((S=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,c,g),c.experimental_prefetchInRender&&!Su.isServer()&&F3(g,n)){const N=h?fw(c,m,a):u==null?void 0:u.promise;N==null||N.catch(Er).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?g:m.trackResult(g)}function $t(e,t){return U3(e,j3)}/**
* @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 H3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),EN=(...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 W3={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 K3=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:c,...u},f)=>y.createElement("svg",{ref:f,...W3,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:EN("lucide",a),...u},[...c.map(([h,m])=>y.createElement(h,m)),...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 de=(e,t)=>{const r=y.forwardRef(({className:n,...a},o)=>y.createElement(K3,{ref:o,iconNode:t,className:EN(`lucide-${H3(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 uh=de("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 AN=de("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @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 sf=de("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 G3=de("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
* @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 CN=de("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
* @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 sv=de("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 V3=de("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
* @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=de("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 q3=de("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
* @license lucide-react v0.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 lf=de("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 Q3=de("BrainCircuit",[["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:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["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:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/**
* @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 Y3=de("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["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"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/**
* @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 Ao=de("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 X3=de("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
* @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 sr=de("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 PN=de("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 Z3=de("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 ch=de("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 ON=de("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 J3=de("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
* @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 e4=de("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @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 t4=de("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 r4=de("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.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 n4=de("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 i4=de("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
* @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 Fs=de("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 a4=de("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 lv=de("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 o4=de("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 uv=de("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 Hn=de("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 s4=de("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @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 Bs=de("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 Us=de("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 hw=de("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 uf=de("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 l4=de("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.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 u4=de("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
* @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 c4=de("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 _N=de("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
* @license lucide-react v0.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 d4=de("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
* @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 f4=de("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 yu=de("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 h4=de("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
* @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 m4=de("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
* @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 mw=de("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 p4=de("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 g4=de("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/**
* @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 ky=de("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 v4=de("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 y4=de("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
* @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 x4=de("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
* @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 b4=de("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
* @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 dh=de("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @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 w4=de("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-react v0.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 k4=de("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @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 j4=de("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
* @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 S4=de("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
* @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 pw=de("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 N4=de("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 E4=de("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
* @license lucide-react v0.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 A4=de("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
* @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 C4=de("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 cf=de("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 df=de("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 P4=de("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 O4=de("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/**
* @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 Xa=de("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 _4=de("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
* @license lucide-react v0.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 M4=de("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 MN=de("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 I4=de("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
* @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 ff=de("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 T4=de("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
* @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 D4=de("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 R4=de("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.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 L4=de("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["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 ws=de("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 gw=de("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/**
* @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 $4=de("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
* @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 z4=de("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
* @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 ys=de("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 IN=de("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
* @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 F4=de("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 B4=de("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/**
* @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 TN=de("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 cv=de("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 bi=de("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 U4=de("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 Qu=de("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 Wn=de("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 xa=de("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"}]]),mu=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:v4},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:lf},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Ao},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:cf},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:wn},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:IN},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:t4}];var vw=1,H4=.9,W4=.8,K4=.17,eg=.1,tg=.999,G4=.9999,V4=.99,q4=/[\\\/_+.#"@\[\(\{&]/,Q4=/[\\\/_+.#"@\[\(\{&]/g,Y4=/[\s-]/,DN=/[\s-]/g;function dv(e,t,r,n,a,o,c){if(o===t.length)return a===e.length?vw:V4;var u=`${a},${o}`;if(c[u]!==void 0)return c[u];for(var f=n.charAt(o),h=r.indexOf(f,a),m=0,g,v,b,j;h>=0;)g=dv(e,t,r,n,h+1,o+1,c),g>m&&(h===a?g*=vw:q4.test(e.charAt(h-1))?(g*=W4,b=e.slice(a,h-1).match(Q4),b&&a>0&&(g*=Math.pow(tg,b.length))):Y4.test(e.charAt(h-1))?(g*=H4,j=e.slice(a,h-1).match(DN),j&&a>0&&(g*=Math.pow(tg,j.length))):(g*=K4,a>0&&(g*=Math.pow(tg,h-a))),e.charAt(h)!==t.charAt(o)&&(g*=G4)),(g<eg&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(v=dv(e,t,r,n,h+1,o+2,c),v*eg>g&&(g=v*eg)),g>m&&(m=g),h=r.indexOf(f,h+1);return c[u]=m,m}function yw(e){return e.toLowerCase().replace(DN," ")}function X4(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,dv(e,t,yw(e),yw(t),0,0,{})}function ba(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 xw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hs(...e){return t=>{let r=!1;const n=e.map(a=>{const o=xw(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():xw(e[a],null)}}}}function Co(...e){return y.useCallback(Hs(...e),e)}function Z4(e,t=[]){let r=[];function n(o,c){const u=y.createContext(c);u.displayName=o+"Context";const f=r.length;r=[...r,c];const h=g=>{var N;const{scope:v,children:b,...j}=g,k=((N=v==null?void 0:v[e])==null?void 0:N[f])||u,S=y.useMemo(()=>j,Object.values(j));return l.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function m(g,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[f])||u,j=y.useContext(b);if(j)return j;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,m]}const a=()=>{const o=r.map(c=>y.createContext(c));return function(u){const f=(u==null?void 0:u[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return a.scopeName=e,[n,J4(a,...t)]}function J4(...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 c=n.reduce((u,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...u,...g}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var Nu=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},eI=lh[" useId ".trim().toString()]||(()=>{}),tI=0;function vi(e){const[t,r]=y.useState(eI());return Nu(()=>{r(n=>n??String(tI++))},[e]),t?`radix-${t}`:""}var rI=lh[" useInsertionEffect ".trim().toString()]||Nu;function nI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,c]=iI({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const g=m.current;g!==u&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,n])}const h=y.useCallback(m=>{var g;if(u){const v=aI(m)?m(e):m;v!==e&&((g=c.current)==null||g.call(c,v))}else o(m)},[u,e,o,c]);return[f,h]}function iI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),a=y.useRef(r),o=y.useRef(t);return rI(()=>{o.current=t},[t]),y.useEffect(()=>{var c;a.current!==r&&((c=o.current)==null||c.call(o,r),a.current=r)},[r,a]),[r,n,o]}function aI(e){return typeof e=="function"}var fh=hN();function RN(e){const t=y.forwardRef((r,n)=>{let{children:a,...o}=r,c=null,u=!1;const f=[];bw(a)&&typeof Nd=="function"&&(a=Nd(a._payload)),y.Children.forEach(a,v=>{var b;if(cI(v)){u=!0;const j=v;let k="child"in j.props?j.props.child:j.props.children;bw(k)&&typeof Nd=="function"&&(k=Nd(k._payload)),c=sI(j,k),f.push((b=c==null?void 0:c.props)==null?void 0:b.children)}else f.push(v)}),c?c=y.cloneElement(c,void 0,f):!u&&y.Children.count(a)===1&&y.isValidElement(a)&&(c=a);const h=c?uI(c):void 0,m=Co(n,h);if(!c){if(a||a===0)throw new Error(u?mI(e):hI(e));return a}const g=lI(o,c.props??{});return c.type!==y.Fragment&&(g.ref=n?m:h),y.cloneElement(c,g)});return t.displayName=`${e}.Slot`,t}var oI=Symbol.for("radix.slottable"),sI=(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 lI(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]=(...u)=>{const f=o(...u);return a(...u),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function uI(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 cI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oI}var dI=Symbol.for("react.lazy");function bw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dI&&"_payload"in e&&fI(e._payload)}function fI(e){return typeof e=="object"&&e!==null&&"then"in e}var hI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Nd=lh[" use ".trim().toString()],pI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xt=pI.reduce((e,t)=>{const r=RN(`Primitive.${t}`),n=y.forwardRef((a,o)=>{const{asChild:c,...u}=a,f=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(f,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gI(e,t){e&&fh.flushSync(()=>e.dispatchEvent(t))}function Eu(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 vI(e,t=globalThis==null?void 0:globalThis.document){const r=Eu(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 yI="DismissableLayer",fv="dismissableLayer.update",xI="dismissableLayer.pointerDownOutside",bI="dismissableLayer.focusOutside",ww,jy=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),LN=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=e,m=y.useContext(jy),[g,v]=y.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=y.useState({}),k=Co(t,B=>v(B)),S=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),A=g?S.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,_=A>=E,O=y.useRef(!1),D=SI(B=>{const F=B.target;if(!(F instanceof Node))return;const Y=[...m.branches].some(H=>H.contains(F));!_||Y||(o==null||o(B),u==null||u(B),B.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),U=NI(B=>{if(n&&O.current)return;const F=B.target;[...m.branches].some(H=>H.contains(F))||(c==null||c(B),u==null||u(B),B.defaultPrevented||f==null||f())},b);return vI(B=>{A===m.layers.size-1&&(a==null||a(B),!B.defaultPrevented&&f&&(B.preventDefault(),f()))},b),y.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ww=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),kw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=ww))}},[g,b,r,m]),y.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),kw())},[g,m]),y.useEffect(()=>{const B=()=>j({});return document.addEventListener(fv,B),()=>document.removeEventListener(fv,B)},[]),l.jsx(Xt.div,{...h,ref:k,style:{pointerEvents:P?_?"auto":"none":void 0,...e.style},onFocusCapture:ba(e.onFocusCapture,U.onFocusCapture),onBlurCapture:ba(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:ba(e.onPointerDownCapture,D.onPointerDownCapture)})});LN.displayName=yI;var wI="DismissableLayerBranch",kI=y.forwardRef((e,t)=>{const r=y.useContext(jy),n=y.useRef(null),a=Co(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),l.jsx(Xt.div,{...e,ref:a})});kI.displayName=wI;function jI(){const e=y.useContext(jy),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function SI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,c=Eu(e),u=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),m=y.useRef(()=>{});return y.useEffect(()=>{function g(){f.current=!1,a.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const A=E.target;A instanceof Node&&[...o].some(_=>_.contains(A))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function j(E){f.current&&h.current.set(E.type,!1)}const k=E=>{if(E.target&&!u.current){let A=function(){r.removeEventListener("click",m.current);const _=v();g(),_||$N(xI,c,P,{discrete:!0})};const P={originalEvent:E};f.current=!0,a.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?A():(r.removeEventListener("click",m.current),m.current=A,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),g();u.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of S)r.addEventListener(E,b,!0),r.addEventListener(E,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",m.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,j)}},[r,c,n,a,o]),{onPointerDownCapture:()=>u.current=!0}}function NI(e,t=globalThis==null?void 0:globalThis.document){const r=Eu(e),n=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!n.current&&$N(bI,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 kw(){const e=new CustomEvent(fv);document.dispatchEvent(e)}function $N(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?gI(a,o):a.dispatchEvent(o)}var rg="focusScope.autoFocusOnMount",ng="focusScope.autoFocusOnUnmount",jw={bubbles:!1,cancelable:!0},EI="FocusScope",zN=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...c}=e,[u,f]=y.useState(null),h=Eu(a),m=Eu(o),g=y.useRef(null),v=Co(t,k=>f(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let k=function(A){if(b.paused||!u)return;const P=A.target;u.contains(P)?g.current=P:ia(g.current,{select:!0})},S=function(A){if(b.paused||!u)return;const P=A.relatedTarget;P!==null&&(u.contains(P)||ia(g.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const _ of A)_.removedNodes.length>0&&ia(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const E=new MutationObserver(N);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),E.disconnect()}}},[n,u,b.paused]),y.useEffect(()=>{if(u){Nw.add(b);const k=document.activeElement;if(!u.contains(k)){const N=new CustomEvent(rg,jw);u.addEventListener(rg,h),u.dispatchEvent(N),N.defaultPrevented||(AI(MI(FN(u)),{select:!0}),document.activeElement===k&&ia(u))}return()=>{u.removeEventListener(rg,h),setTimeout(()=>{const N=new CustomEvent(ng,jw);u.addEventListener(ng,m),u.dispatchEvent(N),N.defaultPrevented||ia(k??document.body,{select:!0}),u.removeEventListener(ng,m),Nw.remove(b)},0)}}},[u,h,m,b]);const j=y.useCallback(k=>{if(!r&&!n||b.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,N=document.activeElement;if(S&&N){const E=k.currentTarget,[A,P]=CI(E);A&&P?!k.shiftKey&&N===P?(k.preventDefault(),r&&ia(A,{select:!0})):k.shiftKey&&N===A&&(k.preventDefault(),r&&ia(P,{select:!0})):N===E&&k.preventDefault()}},[r,n,b.paused]);return l.jsx(Xt.div,{tabIndex:-1,...c,ref:v,onKeyDown:j})});zN.displayName=EI;function AI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ia(n,{select:t}),document.activeElement!==r)return}function CI(e){const t=FN(e),r=Sw(t,e),n=Sw(t.reverse(),e);return[r,n]}function FN(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 Sw(e,t){for(const r of e)if(!PI(r,{upTo:t}))return r}function PI(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 OI(e){return e instanceof HTMLInputElement&&"select"in e}function ia(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&OI(e)&&t&&e.select()}}var Nw=_I();function _I(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ew(e,t),e.unshift(t)},remove(t){var r;e=Ew(e,t),(r=e[0])==null||r.resume()}}}function Ew(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function MI(e){return e.filter(t=>t.tagName!=="A")}var II="Portal",BN=y.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[a,o]=y.useState(!1);Nu(()=>o(!0),[]);const c=r||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?fh.createPortal(l.jsx(Xt.div,{...n,ref:t}),c):null});BN.displayName=II;function TI(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var hh=e=>{const{present:t,children:r}=e,n=DI(t),a=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=RI(n.ref,LI(a));return typeof r=="function"||n.isPresent?y.cloneElement(a,{ref:o}):null};hh.displayName="Presence";function DI(e){const[t,r]=y.useState(),n=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),c=e?"mounted":"unmounted",[u,f]=TI(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=Ed(n.current);o.current=u==="mounted"?h:"none"},[u]),Nu(()=>{const h=n.current,m=a.current;if(m!==e){const v=o.current,b=Ed(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Nu(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=b=>{const k=Ed(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(o.current=Ed(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Aw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function RI(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(c=>{const u=Aw(c,r);return!a&&typeof u=="function"&&(a=!0),u});if(a)return()=>{for(let c=0;c<o.length;c++){const u=o[c];typeof u=="function"?u():Aw(n[c],null)}}},[])}function Ed(e){return(e==null?void 0:e.animationName)||"none"}function LI(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 Ad=0,_n=null;function $I(){y.useEffect(()=>{_n||(_n={start:Cw(),end:Cw()});const{start:e,end:t}=_n;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Ad++,()=>{Ad===1&&(_n==null||_n.start.remove(),_n==null||_n.end.remove(),_n=null),Ad=Math.max(0,Ad-1)}},[])}function Cw(){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 $n=function(){return $n=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},$n.apply(this,arguments)};function UN(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 zI(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 Yd="right-scroll-bar-position",Xd="width-before-scroll-bar",FI="with-scroll-bars-hidden",BI="--removed-body-scroll-bar-size";function ig(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function UI(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 HI=typeof window<"u"?y.useLayoutEffect:y.useEffect,Pw=new WeakMap;function WI(e,t){var r=UI(null,function(n){return e.forEach(function(a){return ig(a,n)})});return HI(function(){var n=Pw.get(r);if(n){var a=new Set(n),o=new Set(e),c=r.current;a.forEach(function(u){o.has(u)||ig(u,null)}),o.forEach(function(u){a.has(u)||ig(u,c)})}Pw.set(r,e)},[e]),r}function KI(e){return e}function GI(e,t){t===void 0&&(t=KI);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 c=t(o,n);return r.push(c),function(){r=r.filter(function(u){return u!==c})}},assignSyncMedium:function(o){for(n=!0;r.length;){var c=r;r=[],c.forEach(o)}r={push:function(u){return o(u)},filter:function(){return r}}},assignMedium:function(o){n=!0;var c=[];if(r.length){var u=r;r=[],u.forEach(o),c=r}var f=function(){var m=c;c=[],m.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return a}function VI(e){e===void 0&&(e={});var t=GI(null);return t.options=$n({async:!0,ssr:!1},e),t}var HN=function(e){var t=e.sideCar,r=UN(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,$n({},r))};HN.isSideCarExport=!0;function qI(e,t){return e.useMedium(t),HN}var WN=VI(),ag=function(){},mh=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:ag,onWheelCapture:ag,onTouchMoveCapture:ag}),a=n[0],o=n[1],c=e.forwardProps,u=e.children,f=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,b=e.noRelative,j=e.noIsolation,k=e.inert,S=e.allowPinchZoom,N=e.as,E=N===void 0?"div":N,A=e.gapMode,P=UN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=v,O=WI([r,t]),D=$n($n({},P),a);return y.createElement(y.Fragment,null,m&&y.createElement(_,{sideCar:WN,removeScrollBar:h,shards:g,noRelative:b,noIsolation:j,inert:k,setCallbacks:o,allowPinchZoom:!!S,lockRef:r,gapMode:A}),c?y.cloneElement(y.Children.only(u),$n($n({},D),{ref:O})):y.createElement(E,$n({},D,{className:f,ref:O}),u))});mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mh.classNames={fullWidth:Xd,zeroRight:Yd};var QI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=QI();return t&&e.setAttribute("nonce",t),e}function XI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ZI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JI=function(){var e=0,t=null;return{add:function(r){e==0&&(t=YI())&&(XI(t,r),ZI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eT=function(){var e=JI();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},KN=function(){var e=eT(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},tT={left:0,top:0,right:0,gap:0},og=function(e){return parseInt(e||"",10)||0},rT=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[og(r),og(n),og(a)]},nT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tT;var t=rT(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])}},iT=KN(),ks="data-scroll-locked",aT=function(e,t,r,n){var a=e.left,o=e.top,c=e.right,u=e.gap;return r===void 0&&(r="margin"),`
.`.concat(FI,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(u,"px ").concat(n,`;
}
body[`).concat(ks,`] {
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(c,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(u,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Yd,` {
right: `).concat(u,"px ").concat(n,`;
}
.`).concat(Xd,` {
margin-right: `).concat(u,"px ").concat(n,`;
}
.`).concat(Yd," .").concat(Yd,` {
right: 0 `).concat(n,`;
}
.`).concat(Xd," .").concat(Xd,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(ks,`] {
`).concat(BI,": ").concat(u,`px;
}
`)},Ow=function(){var e=parseInt(document.body.getAttribute(ks)||"0",10);return isFinite(e)?e:0},oT=function(){y.useEffect(function(){return document.body.setAttribute(ks,(Ow()+1).toString()),function(){var e=Ow()-1;e<=0?document.body.removeAttribute(ks):document.body.setAttribute(ks,e.toString())}},[])},sT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;oT();var o=y.useMemo(function(){return nT(a)},[a]);return y.createElement(iT,{styles:aT(o,!t,a,r?"":"!important")})},hv=!1;if(typeof window<"u")try{var Cd=Object.defineProperty({},"passive",{get:function(){return hv=!0,!0}});window.addEventListener("test",Cd,Cd),window.removeEventListener("test",Cd,Cd)}catch{hv=!1}var is=hv?{passive:!1}:!1,lT=function(e){return e.tagName==="TEXTAREA"},GN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!lT(e)&&r[t]==="visible")},uT=function(e){return GN(e,"overflowY")},cT=function(e){return GN(e,"overflowX")},_w=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=VN(e,n);if(a){var o=qN(e,n),c=o[1],u=o[2];if(c>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},dT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},fT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},VN=function(e,t){return e==="v"?uT(t):cT(t)},qN=function(e,t){return e==="v"?dT(t):fT(t)},hT=function(e,t){return e==="h"&&t==="rtl"?-1:1},mT=function(e,t,r,n,a){var o=hT(e,window.getComputedStyle(t).direction),c=o*n,u=r.target,f=t.contains(u),h=!1,m=c>0,g=0,v=0;do{if(!u)break;var b=qN(e,u),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&VN(e,u)&&(g+=N,v+=j);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mw=function(e){return[e.deltaX,e.deltaY]},Iw=function(e){return e&&"current"in e?e.current:e},pT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gT=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},vT=0,as=[];function yT(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),a=y.useState(vT++)[0],o=y.useState(KN)[0],c=y.useRef(e);y.useEffect(function(){c.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=zI([e.lockRef.current],(e.shards||[]).map(Iw),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var N=Pd(k),E=r.current,A="deltaX"in k?k.deltaX:E[0]-N[0],P="deltaY"in k?k.deltaY:E[1]-N[1],_,O=k.target,D=Math.abs(A)>Math.abs(P)?"h":"v";if("touches"in k&&D==="h"&&O.type==="range")return!1;var U=window.getSelection(),B=U&&U.anchorNode,F=B?B===O||B.contains(O):!1;if(F)return!1;var Y=_w(D,O);if(!Y)return!0;if(Y?_=D:(_=D==="v"?"h":"v",Y=_w(D,O)),!Y)return!1;if(!n.current&&"changedTouches"in k&&(A||P)&&(n.current=_),!_)return!0;var H=n.current||_;return mT(H,S,k,H==="h"?A:P)},[]),f=y.useCallback(function(k){var S=k;if(!(!as.length||as[as.length-1]!==o)){var N="deltaY"in S?Mw(S):Pd(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&pT(_.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var A=(c.current.shards||[]).map(Iw).filter(Boolean).filter(function(_){return _.contains(S.target)}),P=A.length>0?u(S,A[0]):!c.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(k,S,N,E){var A={name:k,delta:S,target:N,should:E,shadowParent:xT(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(P){return P!==A})},1)},[]),m=y.useCallback(function(k){r.current=Pd(k),n.current=void 0},[]),g=y.useCallback(function(k){h(k.type,Mw(k),k.target,u(k,e.lockRef.current))},[]),v=y.useCallback(function(k){h(k.type,Pd(k),k.target,u(k,e.lockRef.current))},[]);y.useEffect(function(){return as.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,is),document.addEventListener("touchmove",f,is),document.addEventListener("touchstart",m,is),function(){as=as.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,is),document.removeEventListener("touchmove",f,is),document.removeEventListener("touchstart",m,is)}},[]);var b=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(o,{styles:gT(a)}):null,b?y.createElement(sT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bT=qI(WN,yT);var QN=y.forwardRef(function(e,t){return y.createElement(mh,$n({},e,{ref:t,sideCar:bT}))});QN.classNames=mh.classNames;var wT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},os=new WeakMap,Od=new WeakMap,_d={},sg=0,YN=function(e){return e&&(e.host||YN(e.parentNode))},kT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=YN(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})},jT=function(e,t,r,n){var a=kT(t,Array.isArray(e)?e:[e]);_d[r]||(_d[r]=new WeakMap);var o=_d[r],c=[],u=new Set,f=new Set(a),h=function(g){!g||u.has(g)||(u.add(g),h(g.parentNode))};a.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(u.has(v))m(v);else try{var b=v.getAttribute(n),j=b!==null&&b!=="false",k=(os.get(v)||0)+1,S=(o.get(v)||0)+1;os.set(v,k),o.set(v,S),c.push(v),k===1&&j&&Od.set(v,!0),S===1&&v.setAttribute(r,"true"),j||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),u.clear(),sg++,function(){c.forEach(function(g){var v=os.get(g)-1,b=o.get(g)-1;os.set(g,v),o.set(g,b),v||(Od.has(g)||g.removeAttribute(n),Od.delete(g)),b||g.removeAttribute(r)}),sg--,sg||(os=new WeakMap,os=new WeakMap,Od=new WeakMap,_d={})}},ST=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=wT(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),jT(n,a,r,"aria-hidden")):function(){return null}},ph="Dialog",[XN]=Z4(ph),[NT,Sn]=XN(ph),ZN=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:c=!0}=e,u=y.useRef(null),f=y.useRef(null),[h,m]=nI({prop:n,defaultProp:a??!1,onChange:o,caller:ph});return l.jsx(NT,{scope:t,triggerRef:u,contentRef:f,contentId:vi(),titleId:vi(),descriptionId:vi(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(g=>!g),[m]),modal:c,children:r})};ZN.displayName=ph;var JN="DialogTrigger",ET=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Sn(JN,r),o=Co(t,a.triggerRef);return l.jsx(Xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":Ny(a.open),...n,ref:o,onClick:ba(e.onClick,a.onOpenToggle)})});ET.displayName=JN;var Sy="DialogPortal",[AT,eE]=XN(Sy,{forceMount:void 0}),tE=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=Sn(Sy,t);return l.jsx(AT,{scope:t,forceMount:r,children:y.Children.map(n,c=>l.jsx(hh,{present:r||o.open,children:l.jsx(BN,{asChild:!0,container:a,children:c})}))})};tE.displayName=Sy;var hf="DialogOverlay",rE=y.forwardRef((e,t)=>{const r=eE(hf,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=Sn(hf,e.__scopeDialog);return o.modal?l.jsx(hh,{present:n||o.open,children:l.jsx(PT,{...a,ref:t})}):null});rE.displayName=hf;var CT=RN("DialogOverlay.RemoveScroll"),PT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Sn(hf,r),o=jI(),c=Co(t,o);return l.jsx(QN,{as:CT,allowPinchZoom:!0,shards:[a.contentRef],children:l.jsx(Xt.div,{"data-state":Ny(a.open),...n,ref:c,style:{pointerEvents:"auto",...n.style}})})}),Ws="DialogContent",nE=y.forwardRef((e,t)=>{const r=eE(Ws,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=Sn(Ws,e.__scopeDialog);return l.jsx(hh,{present:n||o.open,children:o.modal?l.jsx(OT,{...a,ref:t}):l.jsx(_T,{...a,ref:t})})});nE.displayName=Ws;var OT=y.forwardRef((e,t)=>{const r=Sn(Ws,e.__scopeDialog),n=y.useRef(null),a=Co(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return ST(o)},[]),l.jsx(iE,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:ba(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:ba(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&o.preventDefault()}),onFocusOutside:ba(e.onFocusOutside,o=>o.preventDefault())})}),_T=y.forwardRef((e,t)=>{const r=Sn(Ws,e.__scopeDialog),n=y.useRef(!1),a=y.useRef(!1);return l.jsx(iE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(n.current||(u=r.triggerRef.current)==null||u.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 c=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),iE=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...c}=e,u=Sn(Ws,r);return $I(),l.jsx(l.Fragment,{children:l.jsx(zN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:l.jsx(LN,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Ny(u.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),aE="DialogTitle",MT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Sn(aE,r);return l.jsx(Xt.h2,{id:a.titleId,...n,ref:t})});MT.displayName=aE;var oE="DialogDescription",IT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Sn(oE,r);return l.jsx(Xt.p,{id:a.descriptionId,...n,ref:t})});IT.displayName=oE;var sE="DialogClose",TT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Sn(sE,r);return l.jsx(Xt.button,{type:"button",...n,ref:t,onClick:ba(e.onClick,()=>a.onOpenChange(!1))})});TT.displayName=sE;function Ny(e){return e?"open":"closed"}var Zl='[cmdk-group=""]',lg='[cmdk-group-items=""]',DT='[cmdk-group-heading=""]',lE='[cmdk-item=""]',Tw=`${lE}:not([aria-disabled="true"])`,mv="cmdk-item-select",ps="data-value",RT=(e,t,r)=>X4(e,t,r),uE=y.createContext(void 0),Yu=()=>y.useContext(uE),cE=y.createContext(void 0),Ey=()=>y.useContext(cE),dE=y.createContext(void 0),fE=y.forwardRef((e,t)=>{let r=gs(()=>{var M,K;return{search:"",value:(K=(M=e.value)!=null?M:e.defaultValue)!=null?K:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=gs(()=>new Set),a=gs(()=>new Map),o=gs(()=>new Map),c=gs(()=>new Set),u=hE(e),{label:f,children:h,value:m,onValueChange:g,filter:v,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,E=vi(),A=vi(),P=vi(),_=y.useRef(null),O=VT();yo(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,D.emit()}},[m]),yo(()=>{O(6,pe)},[]);let D=y.useMemo(()=>({subscribe:M=>(c.current.add(M),()=>c.current.delete(M)),snapshot:()=>r.current,setState:(M,K,ne)=>{var Z,me,ge,Pe;if(!Object.is(r.current[M],K)){if(r.current[M]=K,M==="search")H(),F(),O(1,Y);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(P);re?re.focus():(Z=document.getElementById(E))==null||Z.focus()}if(O(7,()=>{var re;r.current.selectedItemId=(re=ue())==null?void 0:re.id,D.emit()}),ne||O(5,pe),((me=u.current)==null?void 0:me.value)!==void 0){let re=K??"";(Pe=(ge=u.current).onValueChange)==null||Pe.call(ge,re);return}}D.emit()}},emit:()=>{c.current.forEach(M=>M())}}),[]),U=y.useMemo(()=>({value:(M,K,ne)=>{var Z;K!==((Z=o.current.get(M))==null?void 0:Z.value)&&(o.current.set(M,{value:K,keywords:ne}),r.current.filtered.items.set(M,B(K,ne)),O(2,()=>{F(),D.emit()}))},item:(M,K)=>(n.current.add(M),K&&(a.current.has(K)?a.current.get(K).add(M):a.current.set(K,new Set([M]))),O(3,()=>{H(),F(),r.current.value||Y(),D.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let ne=ue();O(4,()=>{H(),(ne==null?void 0:ne.getAttribute("id"))===M&&Y(),D.emit()})}),group:M=>(a.current.has(M)||a.current.set(M,new Set),()=>{o.current.delete(M),a.current.delete(M)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:E,inputId:P,labelId:A,listInnerRef:_}),[]);function B(M,K){var ne,Z;let me=(Z=(ne=u.current)==null?void 0:ne.filter)!=null?Z:RT;return M?me(M,r.current.search,K):0}function F(){if(!r.current.search||u.current.shouldFilter===!1)return;let M=r.current.filtered.items,K=[];r.current.filtered.groups.forEach(Z=>{let me=a.current.get(Z),ge=0;me.forEach(Pe=>{let re=M.get(Pe);ge=Math.max(re,ge)}),K.push([Z,ge])});let ne=_.current;he().sort((Z,me)=>{var ge,Pe;let re=Z.getAttribute("id"),xe=me.getAttribute("id");return((ge=M.get(xe))!=null?ge:0)-((Pe=M.get(re))!=null?Pe:0)}).forEach(Z=>{let me=Z.closest(lg);me?me.appendChild(Z.parentElement===me?Z:Z.closest(`${lg} > *`)):ne.appendChild(Z.parentElement===ne?Z:Z.closest(`${lg} > *`))}),K.sort((Z,me)=>me[1]-Z[1]).forEach(Z=>{var me;let ge=(me=_.current)==null?void 0:me.querySelector(`${Zl}[${ps}="${encodeURIComponent(Z[0])}"]`);ge==null||ge.parentElement.appendChild(ge)})}function Y(){let M=he().find(ne=>ne.getAttribute("aria-disabled")!=="true"),K=M==null?void 0:M.getAttribute(ps);D.setState("value",K||void 0)}function H(){var M,K,ne,Z;if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let me=0;for(let ge of n.current){let Pe=(K=(M=o.current.get(ge))==null?void 0:M.value)!=null?K:"",re=(Z=(ne=o.current.get(ge))==null?void 0:ne.keywords)!=null?Z:[],xe=B(Pe,re);r.current.filtered.items.set(ge,xe),xe>0&&me++}for(let[ge,Pe]of a.current)for(let re of Pe)if(r.current.filtered.items.get(re)>0){r.current.filtered.groups.add(ge);break}r.current.filtered.count=me}function pe(){var M,K,ne;let Z=ue();Z&&(((M=Z.parentElement)==null?void 0:M.firstChild)===Z&&((ne=(K=Z.closest(Zl))==null?void 0:K.querySelector(DT))==null||ne.scrollIntoView({block:"nearest"})),Z.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=_.current)==null?void 0:M.querySelector(`${lE}[aria-selected="true"]`)}function he(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(Tw))||[])}function ae(M){let K=he()[M];K&&D.setState("value",K.getAttribute(ps))}function se(M){var K;let ne=ue(),Z=he(),me=Z.findIndex(Pe=>Pe===ne),ge=Z[me+M];(K=u.current)!=null&&K.loop&&(ge=me+M<0?Z[Z.length-1]:me+M===Z.length?Z[0]:Z[me+M]),ge&&D.setState("value",ge.getAttribute(ps))}function X(M){let K=ue(),ne=K==null?void 0:K.closest(Zl),Z;for(;ne&&!Z;)ne=M>0?KT(ne,Zl):GT(ne,Zl),Z=ne==null?void 0:ne.querySelector(Tw);Z?D.setState("value",Z.getAttribute(ps)):se(M)}let te=()=>ae(he().length-1),J=M=>{M.preventDefault(),M.metaKey?te():M.altKey?X(1):se(1)},I=M=>{M.preventDefault(),M.metaKey?ae(0):M.altKey?X(-1):se(-1)};return y.createElement(Xt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:M=>{var K;(K=N.onKeyDown)==null||K.call(N,M);let ne=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||ne))switch(M.key){case"n":case"j":{S&&M.ctrlKey&&J(M);break}case"ArrowDown":{J(M);break}case"p":case"k":{S&&M.ctrlKey&&I(M);break}case"ArrowUp":{I(M);break}case"Home":{M.preventDefault(),ae(0);break}case"End":{M.preventDefault(),te();break}case"Enter":{M.preventDefault();let Z=ue();if(Z){let me=new Event(mv);Z.dispatchEvent(me)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:QT},f),gh(e,M=>y.createElement(cE.Provider,{value:D},y.createElement(uE.Provider,{value:U},M))))}),LT=y.forwardRef((e,t)=>{var r,n;let a=vi(),o=y.useRef(null),c=y.useContext(dE),u=Yu(),f=hE(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:c==null?void 0:c.forceMount;yo(()=>{if(!h)return u.item(a,c==null?void 0:c.id)},[h]);let m=mE(a,o,[e.value,e.children,o],e.keywords),g=Ey(),v=ja(O=>O.value&&O.value===m.current),b=ja(O=>h||u.filter()===!1?!0:O.search?O.filtered.items.get(a)>0:!0);y.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(mv,j),()=>O.removeEventListener(mv,j)},[b,e.onSelect,e.disabled]);function j(){var O,D;k(),(D=(O=f.current).onSelect)==null||D.call(O,m.current)}function k(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:A,keywords:P,..._}=e;return y.createElement(Xt.div,{ref:Hs(o,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||u.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),$T=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,c=vi(),u=y.useRef(null),f=y.useRef(null),h=vi(),m=Yu(),g=ja(b=>a||m.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);yo(()=>m.group(c),[]),mE(c,u,[e.value,e.heading,f]);let v=y.useMemo(()=>({id:c,forceMount:a}),[a]);return y.createElement(Xt.div,{ref:Hs(u,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),gh(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(dE.Provider,{value:v},b))))}),zT=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=y.useRef(null),o=ja(c=>!c.search);return!r&&!o?null:y.createElement(Xt.div,{ref:Hs(a,t),...n,"cmdk-separator":"",role:"separator"})}),FT=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=Ey(),c=ja(h=>h.search),u=ja(h=>h.selectedItemId),f=Yu();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(Xt.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":u,id:f.inputId,type:"text",value:a?e.value:c,onChange:h=>{a||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),BT=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=y.useRef(null),c=y.useRef(null),u=ja(h=>h.selectedItemId),f=Yu();return y.useEffect(()=>{if(c.current&&o.current){let h=c.current,m=o.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),y.createElement(Xt.div,{ref:Hs(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:f.listId},gh(e,h=>y.createElement("div",{ref:Hs(c,f.listInnerRef),"cmdk-list-sizer":""},h)))}),UT=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:c,...u}=e;return y.createElement(ZN,{open:r,onOpenChange:n},y.createElement(tE,{container:c},y.createElement(rE,{"cmdk-overlay":"",className:a}),y.createElement(nE,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(fE,{ref:t,...u}))))}),HT=y.forwardRef((e,t)=>ja(r=>r.filtered.count===0)?y.createElement(Xt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),WT=y.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return y.createElement(Xt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},gh(e,c=>y.createElement("div",{"aria-hidden":!0},c)))}),ss=Object.assign(fE,{List:BT,Item:LT,Input:FT,Group:$T,Separator:zT,Dialog:UT,Empty:HT,Loading:WT});function KT(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function GT(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function hE(e){let t=y.useRef(e);return yo(()=>{t.current=e}),t}var yo=typeof window>"u"?y.useEffect:y.useLayoutEffect;function gs(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ja(e){let t=Ey(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function mE(e,t,r,n=[]){let a=y.useRef(),o=Yu();return yo(()=>{var c;let u=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,u,f),(c=t.current)==null||c.setAttribute(ps,u),a.current=u}),a}var VT=()=>{let[e,t]=y.useState(),r=gs(()=>new Map);return yo(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function qT(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function gh({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(qT(t),{ref:t.ref},r(t.props.children)):r(t)}var QT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function YT({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)},[]),l.jsx(ss.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] overscroll-contain",onClick:()=>r(!1),children:l.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:[l.jsx(ss.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"}),l.jsxs(ss.List,{className:"max-h-80 overflow-y-auto p-2",children:[l.jsx(ss.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),l.jsx(ss.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:mu.map(n=>l.jsxs(ss.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:[l.jsx(n.icon,{className:"h-4 w-4 text-primary"}),l.jsx("span",{children:n.label}),l.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const pE="mc_expert_mode",pv="mc-expert-mode-change",XT=()=>{try{return localStorage.getItem(pE)==="true"}catch{return!1}};function ZT(e){return window.addEventListener(pv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(pv,e),window.removeEventListener("storage",e)}}function Dw(e){localStorage.setItem(pE,String(e)),window.dispatchEvent(new Event(pv))}function gE(){return y.useSyncExternalStore(ZT,XT,()=>!1)}function vE(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=vE(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=vE(e))&&(n&&(n+=" "),n+=t);return n}const Ay="-",JT=e=>{const t=tD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const u=c.split(Ay);return u[0]===""&&u.length!==1&&u.shift(),yE(u,t)||eD(c)},getConflictingClassGroupIds:(c,u)=>{const f=r[c]||[];return u&&n[c]?[...f,...n[c]]:f}}},yE=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?yE(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Ay);return(c=t.validators.find(({validator:u})=>u(o)))==null?void 0:c.classGroupId},Rw=/^\[(.+)\]$/,eD=e=>{if(Rw.test(e)){const t=Rw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},tD=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return nD(Object.entries(e.classGroups),r).forEach(([o,c])=>{gv(c,n,o,t)}),n},gv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:Lw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(rD(a)){gv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,c])=>{gv(c,Lw(t,o),r,n)})})},Lw=(e,t)=>{let r=e;return t.split(Ay).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},rD=e=>e.isThemeGetter,nD=(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(([c,u])=>[t+c,u])):o);return[r,a]}):e,iD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(o,c)=>{r.set(o,c),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let c=r.get(o);if(c!==void 0)return c;if((c=n.get(o))!==void 0)return a(o,c),c},set(o,c){r.has(o)?r.set(o,c):a(o,c)}}},xE="!",aD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,c=u=>{const f=[];let h=0,m=0,g;for(let S=0;S<u.length;S++){let N=u[S];if(h===0){if(N===a&&(n||u.slice(S,S+o)===t)){f.push(u.slice(m,S)),m=S+o;continue}if(N==="/"){g=S;continue}}N==="["?h++:N==="]"&&h--}const v=f.length===0?u:u.substring(m),b=v.startsWith(xE),j=b?v.substring(1):v,k=g&&g>m?g-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?u=>r({className:u,parseClassName:c}):c},oD=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},sD=e=>({cache:iD(e.cacheSize),parseClassName:aD(e),...JT(e)}),lD=/\s+/,uD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],c=e.trim().split(lD);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:m,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?v.substring(0,b):v);if(!k){if(!j){u=h+(u.length>0?" "+u:u);continue}if(k=n(v),!k){u=h+(u.length>0?" "+u:u);continue}j=!1}const S=oD(m).join(":"),N=g?S+xE:S,E=N+k;if(o.includes(E))continue;o.push(E);const A=a(k,j);for(let P=0;P<A.length;++P){const _=A[P];o.push(N+_)}u=h+(u.length>0?" "+u:u)}return u};function cD(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=bE(t))&&(n&&(n+=" "),n+=r);return n}const bE=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=bE(e[n]))&&(r&&(r+=" "),r+=t);return r};function dD(e,...t){let r,n,a,o=c;function c(f){const h=t.reduce((m,g)=>g(m),e());return r=sD(h),n=r.cache.get,a=r.cache.set,o=u,u(f)}function u(f){const h=n(f);if(h)return h;const m=uD(f,r);return a(f,m),m}return function(){return o(cD.apply(null,arguments))}}const ot=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},wE=/^\[(?:([a-z-]+):)?(.+)\]$/i,fD=/^\d+\/\d+$/,hD=new Set(["px","full","screen"]),mD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pD=/\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$/,gD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,li=e=>js(e)||hD.has(e)||fD.test(e),ea=e=>tl(e,"length",ED),js=e=>!!e&&!Number.isNaN(Number(e)),ug=e=>tl(e,"number",js),Jl=e=>!!e&&Number.isInteger(Number(e)),xD=e=>e.endsWith("%")&&js(e.slice(0,-1)),$e=e=>wE.test(e),ta=e=>mD.test(e),bD=new Set(["length","size","percentage"]),wD=e=>tl(e,bD,kE),kD=e=>tl(e,"position",kE),jD=new Set(["image","url"]),SD=e=>tl(e,jD,CD),ND=e=>tl(e,"",AD),eu=()=>!0,tl=(e,t,r)=>{const n=wE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},ED=e=>pD.test(e)&&!gD.test(e),kE=()=>!1,AD=e=>vD.test(e),CD=e=>yD.test(e),PD=()=>{const e=ot("colors"),t=ot("spacing"),r=ot("blur"),n=ot("brightness"),a=ot("borderColor"),o=ot("borderRadius"),c=ot("borderSpacing"),u=ot("borderWidth"),f=ot("contrast"),h=ot("grayscale"),m=ot("hueRotate"),g=ot("invert"),v=ot("gap"),b=ot("gradientColorStops"),j=ot("gradientColorStopPositions"),k=ot("inset"),S=ot("margin"),N=ot("opacity"),E=ot("padding"),A=ot("saturate"),P=ot("scale"),_=ot("sepia"),O=ot("skew"),D=ot("space"),U=ot("translate"),B=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",$e,t],H=()=>[$e,t],pe=()=>["",li,ea],ue=()=>["auto",js,$e],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ae=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",$e],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[js,$e];return{cacheSize:500,separator:":",theme:{colors:[eu],spacing:[li,ea],blur:["none","",ta,$e],brightness:I(),borderColor:[e],borderRadius:["none","","full",ta,$e],borderSpacing:H(),borderWidth:pe(),contrast:I(),grayscale:te(),hueRotate:I(),invert:te(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[xD,ea],inset:Y(),margin:Y(),opacity:I(),padding:H(),saturate:I(),scale:I(),sepia:te(),skew:I(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[ta]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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:[...he(),$e]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Jl,$e]}],basis:[{basis:Y()}],"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:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",Jl,$e]}],"grid-cols":[{"grid-cols":[eu]}],"col-start-end":[{col:["auto",{span:["full",Jl,$e]},$e]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[eu]}],"row-start-end":[{row:["auto",{span:[Jl,$e]},$e]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"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:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],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":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"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:[ta]},ta]}],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",ta,ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ug]}],"font-family":[{font:[eu]}],"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",js,ug]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",li,$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:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",li,ea]}],"underline-offset":[{"underline-offset":["auto",li,$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:H()}],"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:[...he(),kD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[j]}],"gradient-via-pos":[{via:[j]}],"gradient-to-pos":[{to:[j]}],"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:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...ae(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:ae()}],"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:["",...ae()]}],"outline-offset":[{"outline-offset":[li,$e]}],"outline-w":[{outline:[li,ea]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[li,ea]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ta,ND]}],"shadow-color":[{shadow:[eu]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",ta,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],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":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Jl,$e]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"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":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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:[li,ea,ug]}],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"]}}},OD=dD(PD);function ee(...e){return OD(nt(e))}function Ks(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function jE(){const e=gE();return l.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[l.jsxs("button",{onClick:()=>Dw(!1),"aria-pressed":!e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[l.jsx(ys,{className:"h-3.5 w-3.5"})," Einfach"]}),l.jsxs("button",{onClick:()=>Dw(!0),"aria-pressed":e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx($4,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function Se(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 m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),a&&!("hf_token"in h)&&(h.hf_token=a,m=!0),m&&(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 u=await fetch(e,{...t,headers:r,body:o});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}const SE=(e,t,r=!1,n=!0)=>Se("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),_D=e=>Se("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),Ve={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],voiceMetrics:["voice-metrics"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},MD=(e=!0)=>$t({queryKey:Ve.memoryGraph,queryFn:()=>Se("/api/memory/graph"),enabled:e}),Cy=()=>$t({queryKey:Ve.health,queryFn:()=>Se("/api/health"),refetchInterval:1e4}),Po=(e=5e3)=>$t({queryKey:Ve.systemStatus,queryFn:()=>Se("/api/system/status"),refetchInterval:e}),NE=(e=3e3)=>$t({queryKey:Ve.services,queryFn:()=>Se("/api/system/services"),refetchInterval:e}),Ni=(e=4e3)=>$t({queryKey:Ve.models,queryFn:()=>Se("/api/models"),refetchInterval:e}),EE=(e=8e3)=>$t({queryKey:Ve.groups,queryFn:()=>Se("/api/groups"),refetchInterval:e}),ID=(e=5e3)=>$t({queryKey:Ve.voiceMetrics,queryFn:()=>Se("/api/voice/metrics"),refetchInterval:e}),TD=()=>$t({queryKey:Ve.routingPolicy,queryFn:()=>Se("/api/routing/policy")}),DD=(e=2e3)=>$t({queryKey:Ve.jobs,queryFn:()=>Se("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),Py=(e=3e3)=>$t({queryKey:Ve.tokenStats,queryFn:()=>Se("/api/system/token-stats"),refetchInterval:e}),Oy=(e=5e3)=>$t({queryKey:Ve.agentStatus,queryFn:()=>Se("/api/agent/status"),refetchInterval:e}),AE=(e=6e4)=>$t({queryKey:Ve.hermesBrain,queryFn:()=>Se("/api/agent/brain"),refetchInterval:e}),vh=e=>$t({queryKey:Ve.updates,queryFn:()=>Se("/api/maintenance/updates"),refetchInterval:e}),RD=()=>$t({queryKey:Ve.discover,queryFn:()=>Se("/api/discover")}),LD=e=>$t({queryKey:Ve.drafts(e),queryFn:()=>Se(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),$D=e=>$t({queryKey:Ve.connect(e),queryFn:()=>Se(e?`/api/connect?${e}`:"/api/connect")}),zD=()=>$t({queryKey:Ve.connectHealth,queryFn:()=>Se("/api/connect/health"),refetchInterval:15e3}),vv=e=>$t({queryKey:Ve.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),Se(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});let yv=[],xv=[];const bv=new Set,CE=()=>bv.forEach(e=>e());function PE(e){return bv.add(e),()=>{bv.delete(e)}}function FD(e){yv=[...yv,e].slice(-40),CE()}function BD(e){xv=[...xv,e].slice(-40),CE()}const UD=()=>y.useSyncExternalStore(PE,()=>yv),HD=()=>y.useSyncExternalStore(PE,()=>xv);function WD(){const{data:e,dataUpdatedAt:t}=Po(3e3),{data:r,dataUpdatedAt:n}=Py(3e3),a=y.useRef(null);y.useEffect(()=>{var o,c,u,f;e&&FD({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((c=e.ram)==null?void 0:c.percent)??0,gpu:((u=e.gpu)==null?void 0:u.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),y.useEffect(()=>{if(!r)return;const o=Date.now(),c=r.prompt_tokens,u=r.completion_tokens;if(a.current){const f=Math.max((o-a.current.t)/1e3,.001);BD({t:o,prompt:Math.max(0,(c-a.current.p)/f),completion:Math.max(0,(u-a.current.c)/f)})}a.current={p:c,c:u,t:o}},[n])}function KD(){const{data:e,error:t}=Po(3e3),r=UD();return{sys:e,hist:r,error:t}}function aa(e){return(e/1024**3).toFixed(1)}function wv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function Lr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function GD(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function $w(e){return e?`${Math.round(e/1024)}k`:"—"}var VD=["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 _y(e){if(typeof e!="string")return!1;var t=VD;return t.includes(e)}var qD=["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"],QD=new Set(qD);function OE(e){return typeof e!="string"?!1:QD.has(e)}function _E(e){return typeof e=="string"&&e.startsWith("data-")}function kn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(OE(r)||_E(r))&&(t[r]=e[r]);return t}function yh(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return kn(t)}return typeof e=="object"&&!Array.isArray(e)?kn(e):null}function rn(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(OE(r)||_E(r)||_y(r))&&(t[r]=e[r]);return t}function YD(e){return e==null?null:y.isValidElement(e)?rn(e.props):typeof e=="object"&&!Array.isArray(e)?rn(e):null}var XD=["children","width","height","viewBox","className","style","title","desc"];function kv(){return kv=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},kv.apply(null,arguments)}function ZD(e,t){if(e==null)return{};var r,n,a=JD(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 JD(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 ME=y.forwardRef((e,t)=>{var r=e.children,n=e.width,a=e.height,o=e.viewBox,c=e.className,u=e.style,f=e.title,h=e.desc,m=ZD(e,XD),g=o||{width:n,height:a,x:0,y:0},v=nt("recharts-surface",c);return y.createElement("svg",kv({},rn(m),{className:v,width:n,height:a,style:u,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),eR=["children","className"];function jv(){return jv=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},jv.apply(null,arguments)}function tR(e,t){if(e==null)return{};var r,n,a=rR(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 rR(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 nn=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=tR(e,eR),o=nt("recharts-layer",n);return y.createElement("g",jv({className:o},rn(a),{ref:t}),r)}),nR=y.createContext(null);function yt(e){return function(){return e}}const Sv=Math.PI,Nv=2*Sv,qa=1e-6,iR=Nv-qa;function IE(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function aR(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IE;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 oR{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?IE:aR(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,c){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+c}`}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 c=this._x1,u=this._y1,f=n-t,h=a-r,m=c-t,g=u-r,v=m*m+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>qa)if(!(Math.abs(g*f-h*m)>qa)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-c,j=a-u,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),E=Math.sqrt(v),A=o*Math.tan((Sv-Math.acos((k+v-S)/(2*N*E)))/2),P=A/E,_=A/N;Math.abs(P-1)>qa&&this._append`L${t+P*m},${r+P*g}`,this._append`A${o},${o},0,0,${+(g*b>m*j)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,a,o,c){if(t=+t,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(a),f=n*Math.sin(a),h=t+u,m=r+f,g=1^c,v=c?a-o:o-a;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>qa||Math.abs(this._y1-m)>qa)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%Nv+Nv),v>iR?this._append`A${n},${n},0,1,${g},${t-u},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=m}`:v>qa&&this._append`A${n},${n},0,${+(v>=Sv)},${g},${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 TE(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 oR(t)}function My(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function DE(e){this._context=e}DE.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 xh(e){return new DE(e)}function RE(e){return e[0]}function LE(e){return e[1]}function $E(e,t){var r=yt(!0),n=null,a=xh,o=null,c=TE(u);e=typeof e=="function"?e:e===void 0?RE:yt(e),t=typeof t=="function"?t:t===void 0?LE:yt(t);function u(f){var h,m=(f=My(f)).length,g,v=!1,b;for(n==null&&(o=a(b=c())),h=0;h<=m;++h)!(h<m&&r(g=f[h],h,f))===v&&((v=!v)?o.lineStart():o.lineEnd()),v&&o.point(+e(g,h,f),+t(g,h,f));if(b)return o=null,b+""||null}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:yt(+f),u):e},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:yt(+f),u):t},u.defined=function(f){return arguments.length?(r=typeof f=="function"?f:yt(!!f),u):r},u.curve=function(f){return arguments.length?(a=f,n!=null&&(o=a(n)),u):a},u.context=function(f){return arguments.length?(f==null?n=o=null:o=a(n=f),u):n},u}function Md(e,t,r){var n=null,a=yt(!0),o=null,c=xh,u=null,f=TE(h);e=typeof e=="function"?e:e===void 0?RE:yt(+e),t=typeof t=="function"?t:yt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?LE:yt(+r);function h(g){var v,b,j,k=(g=My(g)).length,S,N=!1,E,A=new Array(k),P=new Array(k);for(o==null&&(u=c(E=f())),v=0;v<=k;++v){if(!(v<k&&a(S=g[v],v,g))===N)if(N=!N)b=v,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),j=v-1;j>=b;--j)u.point(A[j],P[j]);u.lineEnd(),u.areaEnd()}N&&(A[v]=+e(S,v,g),P[v]=+t(S,v,g),u.point(n?+n(S,v,g):A[v],r?+r(S,v,g):P[v]))}if(E)return u=null,E+""||null}function m(){return $E().defined(a).curve(c).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:yt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:yt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:yt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:yt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:yt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:yt(+g),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(g){return arguments.length?(a=typeof g=="function"?g:yt(!!g),h):a},h.curve=function(g){return arguments.length?(c=g,o!=null&&(u=c(o)),h):c},h.context=function(g){return arguments.length?(g==null?o=u=null:u=c(o=g),h):o},h}class zE{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 sR(e){return new zE(e,!0)}function lR(e){return new zE(e,!1)}function mf(){}function pf(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 FE(e){this._context=e}FE.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:pf(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:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uR(e){return new FE(e)}function BE(e){this._context=e}BE.prototype={areaStart:mf,areaEnd:mf,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:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cR(e){return new BE(e)}function UE(e){this._context=e}UE.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:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dR(e){return new UE(e)}function HE(e){this._context=e}HE.prototype={areaStart:mf,areaEnd:mf,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 fR(e){return new HE(e)}function zw(e){return e<0?-1:1}function Fw(e,t,r){var n=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(n||a<0&&-0),c=(r-e._y1)/(a||n<0&&-0),u=(o*a+c*n)/(n+a);return(zw(o)+zw(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(u))||0}function Bw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function cg(e,t,r){var n=e._x0,a=e._y0,o=e._x1,c=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,a+u*t,o-u,c-u*r,o,c)}function gf(e){this._context=e}gf.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:cg(this,this._t0,Bw(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,cg(this,Bw(this,r=Fw(this,e,t)),r);break;default:cg(this,this._t0,r=Fw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function WE(e){this._context=new KE(e)}(WE.prototype=Object.create(gf.prototype)).point=function(e,t){gf.prototype.point.call(this,t,e)};function KE(e){this._context=e}KE.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 hR(e){return new gf(e)}function mR(e){return new WE(e)}function GE(e){this._context=e}GE.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=Uw(e),a=Uw(t),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(n[0][o],a[0][o],n[1][o],a[1][o],e[c],t[c]);(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 Uw(e){var t,r=e.length-1,n,a=new Array(r),o=new Array(r),c=new Array(r);for(a[0]=0,o[0]=2,c[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,o[t]=4,c[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,o[r-1]=7,c[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/o[t-1],o[t]-=n,c[t]-=n*c[t-1];for(a[r-1]=c[r-1]/o[r-1],t=r-2;t>=0;--t)a[t]=(c[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 pR(e){return new GE(e)}function bh(e,t){this._context=e,this._t=t}bh.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 gR(e){return new bh(e,.5)}function vR(e){return new bh(e,0)}function yR(e){return new bh(e,1)}function xo(e,t){if((c=e.length)>1)for(var r=1,n,a,o=e[t[0]],c,u=o.length;r<c;++r)for(a=o,o=e[t[r]],n=0;n<u;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Ev(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function xR(e,t){return e[t]}function bR(e){const t=[];return t.key=e,t}function wR(){var e=yt([]),t=Ev,r=xo,n=xR;function a(o){var c=Array.from(e.apply(this,arguments),bR),u,f=c.length,h=-1,m;for(const g of o)for(u=0,++h;u<f;++u)(c[u][h]=[0,+n(g,c[u].key,h,o)]).data=g;for(u=0,m=My(t(c));u<f;++u)c[m[u]].index=u;return r(c,m),c}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:yt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:yt(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?Ev:typeof o=="function"?o:yt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??xo,a):r},a}function kR(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,c;a<o;++a){for(c=r=0;r<n;++r)c+=e[r][a][1]||0;if(c)for(r=0;r<n;++r)e[r][a][1]/=c}xo(e,t)}}function jR(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var c=0,u=0;c<a;++c)u+=e[c][r][1]||0;n[r][1]+=n[r][0]=-u/2}xo(e,t)}}function SR(e,t){if(!(!((c=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,c;n<o;++n){for(var u=0,f=0,h=0;u<c;++u){for(var m=e[t[u]],g=m[n][1]||0,v=m[n-1][1]||0,b=(g-v)/2,j=0;j<u;++j){var k=e[t[j]],S=k[n][1]||0,N=k[n-1][1]||0;b+=S-N}f+=g,h+=b*g}a[n-1][1]+=a[n-1][0]=r,f&&(r-=h/f)}a[n-1][1]+=a[n-1][0]=r,xo(e,t)}}function Av(e){return e==="__proto__"}function VE(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Iy(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 qE(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(qE).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Ty(e){if(Array.isArray(e))return e.map(Iy);if(typeof e=="symbol")return[e];e=qE(e);const t=[],r=e.length;if(r===0)return t;let n=0,a="",o="",c=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const u=e[n];if(o)u==="\\"&&n+1<r?(n++,a+=e[n]):u===o?o="":a+=u;else if(c)u==='"'||u==="'"?o=u:u==="]"?(c=!1,t.push(a),a=""):a+=u;else if(u==="[")c=!0,a&&(t.push(a),a="");else if(u==="."){a&&(t.push(a),a="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else a+=u;n++}return a&&t.push(a),t}function Oo(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(Av(t))return r;const n=e[t];return n===void 0?VE(t)&&!Object.hasOwn(e,t)?Oo(e,Ty(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=Iy(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return NR(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),Av(t))return r;const n=e[t];return n===void 0?r:n}}}function NR(e,t,r){if(t.length===0)return r;let n=e;for(let a=0;a<t.length;a++){if(n==null||Av(t[a]))return r;n=n[t[a]]}return n===void 0?r:n}var ER=4;function va(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ER,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Gt(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,c)=>{var u=r[c-1];return typeof u=="string"?a+u+o:u!==void 0?a+va(u)+o:a+o},"")}var Jr=e=>e===0?0:e>0?1:-1,Kn=e=>typeof e=="number"&&e!=+e,bo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ee=e=>(typeof e=="number"||e instanceof Number)&&!Kn(e),Gn=e=>Ee(e)||typeof e=="string",AR=0,Au=e=>{var t=++AR;return"".concat(e||"").concat(t)},Sa=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(!Ee(t)&&typeof t!="string")return n;var o;if(bo(t)){if(r==null)return n;var c=t.indexOf("%");o=r*parseFloat(t.slice(0,c))/100}else o=+t;return Kn(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},QE=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 mi(e,t,r){return Ee(e)&&Ee(t)?va(e+r*(t-e)):t}function YE(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Oo(n,t))===r)}var Yt=e=>e===null||typeof e>"u",Dy=e=>Yt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ar(e){return e!=null}function rl(){}var XE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ry=(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=>{_y(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},CR=(e,t,r)=>n=>(e(t,r,n),null),PR=(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];_y(a)&&typeof o=="function"&&(n||(n={}),n[a]=CR(o,t,r))}),n};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 OR(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){_R(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 _R(e,t,r){return(t=MR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MR(e){var t=IR(e,"string");return typeof t=="symbol"?t:t+""}function IR(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 on(e,t){var r=OR({},e),n=t,a=Object.keys(t),o=a.reduce((c,u)=>(c[u]===void 0&&n[u]!==void 0&&(c[u]=n[u]),c),r);return o}function TR(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 DR(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function ZE(e){return e}function RR(e){return function(t){return Oo(t,e)}}function Cv(e){return e==null||typeof e!="object"&&typeof e!="function"}function LR(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $R(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ly(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zR="[object RegExp]",JE="[object String]",e5="[object Number]",t5="[object Boolean]",r5="[object Arguments]",FR="[object Symbol]",BR="[object Date]",UR="[object Map]",HR="[object Set]",WR="[object Array]",KR="[object ArrayBuffer]",GR="[object Object]",VR="[object DataView]",qR="[object Uint8Array]",QR="[object Uint8ClampedArray]",YR="[object Uint16Array]",XR="[object Uint32Array]",ZR="[object Int8Array]",JR="[object Int16Array]",eL="[object Int32Array]",tL="[object Float32Array]",rL="[object Float64Array]",Ww=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function nL(e){return typeof Ww.Buffer<"u"&&Ww.Buffer.isBuffer(e)}function iL(e,t){return Ja(e,void 0,e,new Map,t)}function Ja(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(Cv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const c=new Array(e.length);n.set(e,c);for(let u=0;u<e.length;u++)c[u]=Ja(e[u],u,r,n,a);return Object.hasOwn(e,"index")&&(c.index=e.index),Object.hasOwn(e,"input")&&(c.input=e.input),c}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const c=new RegExp(e.source,e.flags);return c.lastIndex=e.lastIndex,c}if(e instanceof Map){const c=new Map;n.set(e,c);for(const[u,f]of e)c.set(u,Ja(f,u,r,n,a));return c}if(e instanceof Set){const c=new Set;n.set(e,c);for(const u of e)c.add(Ja(u,void 0,r,n,a));return c}if(nL(e))return e.subarray();if(LR(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,c);for(let u=0;u<e.length;u++)c[u]=Ja(e[u],u,r,n,a);return c}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const c=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,c),gn(c,e,r,n,a),c}if(typeof File<"u"&&e instanceof File){const c=new File([e],e.name,{type:e.type});return n.set(e,c),gn(c,e,r,n,a),c}if(typeof Blob<"u"&&e instanceof Blob){const c=new Blob([e],{type:e.type});return n.set(e,c),gn(c,e,r,n,a),c}if(e instanceof Error){const c=structuredClone(e);return n.set(e,c),c.message=e.message,c.name=e.name,c.stack=e.stack,c.cause=e.cause,c.constructor=e.constructor,gn(c,e,r,n,a),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return n.set(e,c),gn(c,e,r,n,a),c}if(e instanceof Number){const c=new Number(e.valueOf());return n.set(e,c),gn(c,e,r,n,a),c}if(e instanceof String){const c=new String(e.valueOf());return n.set(e,c),gn(c,e,r,n,a),c}if(typeof e=="object"&&aL(e)){const c=Object.create(Object.getPrototypeOf(e));return n.set(e,c),gn(c,e,r,n,a),c}return e}function gn(e,t,r=e,n,a){const o=[...Object.keys(t),...$R(t)];for(let c=0;c<o.length;c++){const u=o[c],f=Object.getOwnPropertyDescriptor(e,u);(f==null||f.writable)&&(e[u]=Ja(t[u],u,r,n,a))}}function aL(e){switch(Ly(e)){case r5:case WR:case KR:case VR:case t5:case BR:case tL:case rL:case ZR:case JR:case eL:case UR:case e5:case GR:case zR:case HR:case JE:case FR:case qR:case QR:case YR:case XR:return!0;default:return!1}}function oL(e){return Ja(e,void 0,e,new Map,void 0)}function Zd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function n5(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function i5(e,t,r){return typeof r!="function"?i5(e,t,()=>{}):Pv(e,t,function n(a,o,c,u,f,h){const m=r(a,o,c,u,f,h);return m!==void 0?!!m:Pv(a,o,n,h,!1)},new Map,!0)}function Pv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return sL(e,t,r,n);case"function":return Object.keys(t).length>0?Pv(e,{...t},r,n,a):Zd(e,t);default:return n5(e)&&a?typeof t=="string"?t==="":!0:Zd(e,t)}}function sL(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return a5(e,t,r,n);if(t instanceof Map)return lL(e,t,r,n);if(t instanceof Set)return uL(e,t,r,n);const a=Object.keys(t);if(e==null||Cv(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 c=a[o];if(!Cv(e)&&!(c in e)||t[c]===void 0&&e[c]!==void 0||t[c]===null&&e[c]!==null||!r(e[c],t[c],c,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function lL(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 a5(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 c=t[o];let u=!1;for(let f=0;f<e.length;f++){if(a.has(f))continue;const h=e[f];let m=!1;if(r(h,c,o,e,t,n)&&(m=!0),m){a.add(f),u=!0;break}}if(!u)return!1}return!0}function uL(e,t,r,n){return t.size===0?!0:e instanceof Set?a5([...e],[...t],r,n):!1}function o5(e,t){return i5(e,t,()=>{})}function cL(e){return e=oL(e),t=>o5(t,e)}function dL(e,t){return iL(e,(r,n,a,o)=>{if(typeof e=="object"){if(Ly(e)==="[object Object]"&&typeof e.constructor!="function"){const c={};return o.set(e,c),gn(c,e,a,o),c}switch(Object.prototype.toString.call(e)){case e5:case JE:case t5:{const c=new e.constructor(e==null?void 0:e.valueOf());return gn(c,e),c}case r5:{const c={};return gn(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function fL(e){return dL(e)}const hL=/^(?:0|[1-9]\d*)$/;function s5(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 hL.test(e)}}function mL(e){return e!==null&&typeof e=="object"&&Ly(e)==="[object Arguments]"}function pL(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&VE(t)&&(e==null?void 0:e[t])==null?r=Ty(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)||mL(n))&&s5(o)&&o<n.length))return!1;n=n[o]}return!0}function gL(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=Iy(e);break}return t=fL(t),function(r){const n=Oo(r,e);return n===void 0?pL(r,e):t===void 0?n===void 0:o5(n,t)}}function vL(e){if(e==null)return ZE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?gL(e[0],e[1]):cL(e);case"string":case"symbol":case"number":return RR(e)}}function yL(e){return Number.isSafeInteger(e)&&e>=0}function l5(e){return e!=null&&typeof e!="function"&&yL(e.length)}function xL(e){return typeof e=="object"&&e!==null}function bL(e){return xL(e)&&l5(e)}function Kw(e,t=ZE){return bL(e)?TR(Array.from(e),DR(vL(t),1)):[]}function wL(e,t,r){return t===!0?Kw(e,r):typeof t=="function"?Kw(e,t):e}var dg={exports:{}},fg={},hg={exports:{}},mg={};/**
* @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 Gw;function kL(){if(Gw)return mg;Gw=1;var e=el();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function u(g,v){var b=v(),j=n({inst:{value:b,getSnapshot:v}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=v,f(k)&&S({inst:k})},[g,b,v]),a(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),c(b),b}function f(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!r(g,b)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return mg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,mg}var Vw;function jL(){return Vw||(Vw=1,hg.exports=kL()),hg.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 qw;function SL(){if(qw)return fg;qw=1;var e=el(),t=jL();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,c=e.useEffect,u=e.useMemo,f=e.useDebugValue;return fg.useSyncExternalStoreWithSelector=function(h,m,g,v,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=u(function(){function N(O){if(!E){if(E=!0,A=O,O=v(O),b!==void 0&&k.hasValue){var D=k.value;if(b(D,O))return P=D}return P=O}if(D=P,n(A,O))return D;var U=v(O);return b!==void 0&&b(D,U)?(A=O,D):(A=O,P=U)}var E=!1,A,P,_=g===void 0?null:g;return[function(){return N(m())},_===null?void 0:function(){return N(_())}]},[m,g,v,b]);var S=a(h,j[0],j[1]);return c(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},fg}var Qw;function NL(){return Qw||(Qw=1,dg.exports=SL()),dg.exports}var EL=NL(),$y=y.createContext(null),AL=e=>e,Nt=()=>{var e=y.useContext($y);return e?e.store.dispatch:AL},Jd=()=>{},CL=()=>Jd,PL=(e,t)=>e===t;function Me(e){var t=y.useContext($y),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Jd,[t,e]);return EL.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:CL,t?t.store.getState:Jd,t?t.store.getState:Jd,r,PL)}function OL(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _L(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 Yw=e=>Array.isArray(e)?e:[e];function ML(e){const t=Array.isArray(e[0])?e[0]:e;return _L(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function IL(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var TL=class{constructor(e){this.value=e}deref(){return this.value}},DL=()=>typeof WeakRef>"u"?TL:WeakRef,u5=DL(),RL=0,Xw=1;function Id(){return{s:RL,v:void 0,o:null,p:null}}function LL(e){return e instanceof u5?e.deref():e}function c5(e,t={}){let r=Id();const{resultEqualityCheck:n}=t;let a,o=0;function c(){let u=r;const{length:f}=arguments;for(let g=0,v=f;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let j=u.o;j===null&&(u.o=j=new WeakMap);const k=j.get(b);k===void 0?(u=Id(),j.set(b,u)):u=k}else{let j=u.p;j===null&&(u.p=j=new Map);const k=j.get(b);k===void 0?(u=Id(),j.set(b,u)):u=k}}const h=u;let m;if(u.s===Xw)m=u.v;else if(m=e.apply(null,arguments),o++,n){const g=LL(a);g!=null&&n(g,m)&&(m=g,o!==0&&o--),a=typeof m=="object"&&m!==null||typeof m=="function"?new u5(m):m}return h.s=Xw,h.v=m,m}return c.clearCache=()=>{r=Id(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function $L(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,c=0,u,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),OL(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:g,memoizeOptions:v=[],argsMemoize:b=c5,argsMemoizeOptions:j=[]}=m,k=Yw(v),S=Yw(j),N=ML(a),E=g(function(){return o++,h.apply(null,arguments)},...k),A=b(function(){c++;const _=IL(N,arguments);return u=E.apply(null,_),u},...S);return Object.assign(A,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var q=$L(c5);function zL(e,t=1){const r=[],n=Math.floor(t),a=(o,c)=>{for(let u=0;u<o.length;u++){const f=o[u];Array.isArray(f)&&c<n?a(f,c+1):r.push(f)}};return a(e,0),r}function Ov(e,t,r){return n5(r)&&(typeof t=="number"&&l5(r)&&s5(t)&&t<r.length||typeof t=="string"&&t in r)?Zd(r[t],e):!1}function Zw(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const FL=(e,t,r)=>{if(e!==t){const n=Zw(e),a=Zw(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 d5(e){return typeof e=="symbol"||e instanceof Symbol}const BL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UL=/^\w*$/;function HL(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||d5(e)?!0:typeof e=="string"&&(UL.test(e)||!BL.test(e))||t!=null}function WL(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(u=>String(u));const a=(u,f)=>{let h=u;for(let m=0;m<f.length&&h!=null;++m)h=h[f[m]];return h},o=(u,f)=>f==null||u==null?f:typeof u=="object"&&"key"in u?Object.hasOwn(f,u.key)?f[u.key]:a(f,u.path):typeof u=="function"?u(f):Array.isArray(u)?a(f,u):typeof f=="object"?f[u]:f,c=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||HL(u)?u:{key:u,path:Ty(u)}));return e.map(u=>({original:u,criteria:c.map(f=>o(f,u))})).slice().sort((u,f)=>{for(let h=0;h<c.length;h++){const m=FL(u.criteria[h],f.criteria[h],r[h]);if(m!==0)return m}return 0}).map(u=>u.original)}function wh(e,...t){const r=t.length;return r>1&&Ov(e,t[0],t[1])?t=[]:r>2&&Ov(t[0],t[1],t[2])&&(t=[t[0]]),WL(e,zL(t),["asc"])}var f5=e=>e.legend.settings,KL=e=>e.legend.size,GL=e=>e.legend.payload;q([GL,f5],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?wh(n,r):n});function VL(e,t){return XL(e)||YL(e,t)||QL(e,t)||qL()}function qL(){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 QL(e,t){if(e){if(typeof e=="string")return Jw(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)?Jw(e,t):void 0}}function Jw(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 YL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function XL(e){if(Array.isArray(e))return e}var Td=1;function ek(e,t){return Math.abs(e.height-t.height)>Td||Math.abs(e.left-t.left)>Td||Math.abs(e.top-t.top)>Td||Math.abs(e.width-t.width)>Td}function tk(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ZL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=VL(t,2),n=r[0],a=r[1],o=y.useRef(null),c=y.useRef(n);c.current=n;var u=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=tk(f);if(ek(h,c.current)&&a(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var g=tk(f);ek(g,c.current)&&a(g)});m.observe(f),o.current=m}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,u]}function Kt(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 JL=typeof Symbol=="function"&&Symbol.observable||"@@observable",rk=JL,pg=()=>Math.random().toString(36).substring(7).split("").join("."),e$={INIT:`@@redux/INIT${pg()}`,REPLACE:`@@redux/REPLACE${pg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pg()}`},vf=e$;function zy(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 h5(e,t,r){if(typeof e!="function")throw new Error(Kt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Kt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Kt(1));return r(h5)(e,t)}let n=e,a=t,o=new Map,c=o,u=0,f=!1;function h(){c===o&&(c=new Map,o.forEach((S,N)=>{c.set(N,S)}))}function m(){if(f)throw new Error(Kt(3));return a}function g(S){if(typeof S!="function")throw new Error(Kt(4));if(f)throw new Error(Kt(5));let N=!0;h();const E=u++;return c.set(E,S),function(){if(N){if(f)throw new Error(Kt(6));N=!1,h(),c.delete(E),o=null}}}function v(S){if(!zy(S))throw new Error(Kt(7));if(typeof S.type>"u")throw new Error(Kt(8));if(typeof S.type!="string")throw new Error(Kt(17));if(f)throw new Error(Kt(9));try{f=!0,a=n(a,S)}finally{f=!1}return(o=c).forEach(E=>{E()}),S}function b(S){if(typeof S!="function")throw new Error(Kt(10));n=S,v({type:vf.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Kt(11));function E(){const P=N;P.next&&P.next(m())}return E(),{unsubscribe:S(E)}},[rk](){return this}}}return v({type:vf.INIT}),{dispatch:v,subscribe:g,getState:m,replaceReducer:b,[rk]:j}}function t$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:vf.INIT})>"u")throw new Error(Kt(12));if(typeof r(void 0,{type:vf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Kt(13))})}function m5(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const c=t[o];typeof e[c]=="function"&&(r[c]=e[c])}const n=Object.keys(r);let a;try{t$(r)}catch(o){a=o}return function(c={},u){if(a)throw a;let f=!1;const h={};for(let m=0;m<n.length;m++){const g=n[m],v=r[g],b=c[g],j=v(b,u);if(typeof j>"u")throw u&&u.type,new Error(Kt(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(c).length,f?h:c}}function yf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function r$(...e){return t=>(r,n)=>{const a=t(r,n);let o=()=>{throw new Error(Kt(15))};const c={getState:a.getState,dispatch:(f,...h)=>o(f,...h)},u=e.map(f=>f(c));return o=yf(...u)(a.dispatch),{...a,dispatch:o}}}function p5(e){return zy(e)&&"type"in e&&typeof e.type=="string"}var g5=Symbol.for("immer-nothing"),nk=Symbol.for("immer-draftable"),vr=Symbol.for("immer-state");function yn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Br=Object,Gs=Br.getPrototypeOf,xf="constructor",kh="prototype",_v="configurable",bf="enumerable",ef="writable",Cu="value",wi=e=>!!e&&!!e[vr];function jn(e){var t;return e?v5(e)||Sh(e)||!!e[nk]||!!((t=e[xf])!=null&&t[nk])||Nh(e)||Eh(e):!1}var n$=Br[kh][xf].toString(),ik=new WeakMap;function v5(e){if(!e||!Fy(e))return!1;const t=Gs(e);if(t===null||t===Br[kh])return!0;const r=Br.hasOwnProperty.call(t,xf)&&t[xf];if(r===Object)return!0;if(!vs(r))return!1;let n=ik.get(r);return n===void 0&&(n=Function.toString.call(r),ik.set(r,n)),n===n$}function jh(e,t,r=!0){Xu(e)===0?(r?Reflect.ownKeys(e):Br.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Xu(e){const t=e[vr];return t?t.type_:Sh(e)?1:Nh(e)?2:Eh(e)?3:0}var ak=(e,t,r=Xu(e))=>r===2?e.has(t):Br[kh].hasOwnProperty.call(e,t),Mv=(e,t,r=Xu(e))=>r===2?e.get(t):e[t],wf=(e,t,r,n=Xu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function i$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Sh=Array.isArray,Nh=e=>e instanceof Map,Eh=e=>e instanceof Set,Fy=e=>typeof e=="object",vs=e=>typeof e=="function",gg=e=>typeof e=="boolean";function a$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ci=e=>e.copy_||e.base_,By=e=>e.modified_?e.copy_:e.base_;function Iv(e,t){if(Nh(e))return new Map(e);if(Eh(e))return new Set(e);if(Sh(e))return Array[kh].slice.call(e);const r=v5(e);if(t===!0||t==="class_only"&&!r){const n=Br.getOwnPropertyDescriptors(e);delete n[vr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const c=a[o],u=n[c];u[ef]===!1&&(u[ef]=!0,u[_v]=!0),(u.get||u.set)&&(n[c]={[_v]:!0,[ef]:!0,[bf]:u[bf],[Cu]:e[c]})}return Br.create(Gs(e),n)}else{const n=Gs(e);if(n!==null&&r)return{...e};const a=Br.create(n);return Br.assign(a,e)}}function Uy(e,t=!1){return Ah(e)||wi(e)||!jn(e)||(Xu(e)>1&&Br.defineProperties(e,{set:Dd,add:Dd,clear:Dd,delete:Dd}),Br.freeze(e),t&&jh(e,(r,n)=>{Uy(n,!0)},!1)),e}function o$(){yn(2)}var Dd={[Cu]:o$};function Ah(e){return e===null||!Fy(e)?!0:Br.isFrozen(e)}var kf="MapSet",Tv="Patches",ok="ArrayMethods",y5={};function wo(e){const t=y5[e];return t||yn(0,e),t}var sk=e=>!!y5[e],Pu,x5=()=>Pu,s$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:sk(kf)?wo(kf):void 0,arrayMethodsPlugin_:sk(ok)?wo(ok):void 0});function lk(e,t){t&&(e.patchPlugin_=wo(Tv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Dv(e){Rv(e),e.drafts_.forEach(l$),e.drafts_=null}function Rv(e){e===Pu&&(Pu=e.parent_)}var uk=e=>Pu=s$(Pu,e);function l$(e){const t=e[vr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ck(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[vr].modified_&&(Dv(t),yn(4)),jn(e)&&(e=dk(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[vr].base_,e,t)}else e=dk(t,r);return u$(t,e,!0),Dv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==g5?e:void 0}function dk(e,t){if(Ah(t))return t;const r=t[vr];if(!r)return jf(t,e.handledSet_,e);if(!Ch(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);k5(r,e)}return r.copy_}function u$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Uy(t,r)}function b5(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ch=(e,t)=>e.scope_===t,c$=[];function w5(e,t,r,n){const a=ci(e),o=e.type_;if(n!==void 0&&Mv(a,n,o)===t){wf(a,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;jh(a,(f,h)=>{if(wi(h)){const m=u.get(h)||[];m.push(f),u.set(h,m)}})}const c=e.draftLocations_.get(t)??c$;for(const u of c)wf(a,u,r,o)}function d$(e,t,r){e.callbacks_.push(function(a){var u;const o=t;if(!o||!Ch(o,a))return;(u=a.mapSetPlugin_)==null||u.fixSetContents(o);const c=By(o);w5(e,o.draft_??o,c,r),k5(o,a)})}function k5(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)}b5(e)}}function f$(e,t,r){const{scope_:n}=e;if(wi(r)){const a=r[vr];Ch(a,n)&&a.callbacks_.push(function(){tf(e);const c=By(a);w5(e,r,c,t)})}else jn(r)&&e.callbacks_.push(function(){const o=ci(e);e.type_===3?o.has(r)&&jf(r,n.handledSet_,n):Mv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&jf(Mv(e.copy_,t,e.type_),n.handledSet_,n)})}function jf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||wi(e)||t.has(e)||!jn(e)||Ah(e)||(t.add(e),jh(e,(n,a)=>{if(wi(a)){const o=a[vr];if(Ch(o,r)){const c=By(o);wf(e,n,c,e.type_),b5(o)}}else jn(a)&&jf(a,t,r)})),e}function h$(e,t){const r=Sh(e),n={type_:r?1:0,scope_:t?t.scope_:x5(),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=Sf;r&&(a=[n],o=Ou);const{revoke:c,proxy:u}=Proxy.revocable(a,o);return n.draft_=u,n.revoke_=c,[u,n]}var Sf={get(e,t){if(t===vr)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=ci(e);if(!ak(a,t,e.type_))return m$(e,a,t);const o=a[t];if(e.finalized_||!jn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&a$(t))return o;if(o===vg(e.base_,t)){tf(e);const c=e.type_===1?+t:t,u=$v(e.scope_,o,e,c);return e.copy_[c]=u}return o},has(e,t){return t in ci(e)},ownKeys(e){return Reflect.ownKeys(ci(e))},set(e,t,r){const n=j5(ci(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=vg(ci(e),t),o=a==null?void 0:a[vr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(i$(r,a)&&(r!==void 0||ak(e.base_,t,e.type_)))return!0;tf(e),Lv(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),f$(e,t,r)),!0},deleteProperty(e,t){return tf(e),vg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Lv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ci(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ef]:!0,[_v]:e.type_!==1||t!=="length",[bf]:n[bf],[Cu]:r[t]}},defineProperty(){yn(11)},getPrototypeOf(e){return Gs(e.base_)},setPrototypeOf(){yn(12)}},Ou={};for(let e in Sf){let t=Sf[e];Ou[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Ou.deleteProperty=function(e,t){return Ou.set.call(this,e,t,void 0)};Ou.set=function(e,t,r){return Sf.set.call(this,e[0],t,r,e[0])};function vg(e,t){const r=e[vr];return(r?ci(r):e)[t]}function m$(e,t,r){var a;const n=j5(t,r);return n?Cu in n?n[Cu]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function j5(e,t){if(!(t in e))return;let r=Gs(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Gs(r)}}function Lv(e){e.modified_||(e.modified_=!0,e.parent_&&Lv(e.parent_))}function tf(e){e.copy_||(e.assigned_=new Map,e.copy_=Iv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(vs(r)&&!vs(n)){const c=n;n=r;const u=this;return function(h=c,...m){return u.produce(h,g=>n.call(this,g,...m))}}vs(n)||yn(6),a!==void 0&&!vs(a)&&yn(7);let o;if(jn(r)){const c=uk(this),u=$v(c,r,void 0);let f=!0;try{o=n(u),f=!1}finally{f?Dv(c):Rv(c)}return lk(c,a),ck(o,c)}else if(!r||!Fy(r)){if(o=n(r),o===void 0&&(o=r),o===g5&&(o=void 0),this.autoFreeze_&&Uy(o,!0),a){const c=[],u=[];wo(Tv).generateReplacementPatches_(r,o,{patches_:c,inversePatches_:u}),a(c,u)}return o}else yn(1,r)},this.produceWithPatches=(r,n)=>{if(vs(r))return(u,...f)=>this.produceWithPatches(u,h=>r(h,...f));let a,o;return[this.produce(r,n,(u,f)=>{a=u,o=f}),a,o]},gg(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),gg(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),gg(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){jn(t)||yn(8),wi(t)&&(t=en(t));const r=uk(this),n=$v(r,t,void 0);return n[vr].isManual_=!0,Rv(r),n}finishDraft(t,r){const n=t&&t[vr];(!n||!n.isManual_)&&yn(9);const{scope_:a}=n;return lk(a,r),ck(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=wo(Tv).applyPatches_;return wi(t)?a(t,r):this.produce(t,o=>a(o,r))}};function $v(e,t,r,n){const[a,o]=Nh(t)?wo(kf).proxyMap_(t,r):Eh(t)?wo(kf).proxySet_(t,r):h$(t,r);return((r==null?void 0:r.scope_)??x5()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?d$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function en(e){return wi(e)||yn(10,e),S5(e)}function S5(e){if(!jn(e)||Ah(e))return e;const t=e[vr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Iv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Iv(e,!0);return jh(r,(a,o)=>{wf(r,a,S5(o))},n),t&&(t.finalized_=!1),r}var g$=new p$,N5=g$.produce;function E5(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var v$=E5(),y$=E5,x$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yf:yf.apply(null,arguments)};function Hr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(Ur(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=>p5(n)&&n.type===e,r}var A5=class pu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,pu.prototype)}static get[Symbol.species](){return pu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new pu(...t[0].concat(this)):new pu(...t.concat(this))}};function fk(e){return jn(e)?N5(e,()=>{}):e}function Rd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function b$(e){return typeof e=="boolean"}var w$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let c=new A5;return r&&(b$(r)?c.push(v$):c.push(y$(r.extraArgument))),c},C5="RTK_autoBatch",st=()=>e=>({payload:e,meta:{[C5]:!0}}),hk=e=>t=>{setTimeout(t,e)},k$=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(c),r())},o=e(a),c=setTimeout(a,t)},P5=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,c=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?k$(window.requestAnimationFrame,100):hk(10):e.type==="callback"?e.queueNotification:hk(e.timeout),h=()=>{c=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const g=()=>a&&m(),v=n.subscribe(g);return u.add(m),()=>{v(),u.delete(m)}},dispatch(m){var g;try{return a=!((g=m==null?void 0:m.meta)!=null&&g[C5]),o=!a,o&&(c||(c=!0,f(h))),n.dispatch(m)}finally{a=!0}}})},j$=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new A5(e);return n&&a.push(P5(typeof n=="object"?n:void 0)),a};function S$(e){const t=w$(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:c=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(zy(r))u=m5(r);else throw new Error(Ur(1));let f;typeof n=="function"?f=n(t):f=t();let h=yf;a&&(h=x$({trace:!1,...typeof a=="object"&&a}));const m=r$(...f),g=j$(m);let v=typeof c=="function"?c(g):g();const b=h(...v);return h5(u,o,b)}function O5(e){const t={},r=[];let n;const a={addCase(o,c){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Ur(28));if(u in t)throw new Error(Ur(29));return t[u]=c,a},addAsyncThunk(o,c){return c.pending&&(t[o.pending.type]=c.pending),c.rejected&&(t[o.rejected.type]=c.rejected),c.fulfilled&&(t[o.fulfilled.type]=c.fulfilled),c.settled&&r.push({matcher:o.settled,reducer:c.settled}),a},addMatcher(o,c){return r.push({matcher:o,reducer:c}),a},addDefaultCase(o){return n=o,a}};return e(a),[t,r,n]}function N$(e){return typeof e=="function"}function E$(e,t){let[r,n,a]=O5(t),o;if(N$(e))o=()=>fk(e());else{const u=fk(e);o=()=>u}function c(u=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[a]),h.reduce((m,g)=>{if(g)if(wi(m)){const b=g(m,f);return b===void 0?m:b}else{if(jn(m))return N5(m,v=>g(v,f));{const v=g(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},u)}return c.getInitialState=o,c}var A$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",C$=(e=21)=>{let t="",r=e;for(;r--;)t+=A$[Math.random()*64|0];return t},P$=Symbol.for("rtk-slice-createasyncthunk");function O$(e,t){return`${e}/${t}`}function _$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[P$];return function(a){const{name:o,reducerPath:c=o}=a;if(!o)throw new Error(Ur(11));const u=(typeof a.reducers=="function"?a.reducers(I$()):a.reducers)||{},f=Object.keys(u),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(P,_){const O=typeof P=="string"?P:P.type;if(!O)throw new Error(Ur(12));if(O in h.sliceCaseReducersByType)throw new Error(Ur(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(P,_){return h.sliceMatchers.push({matcher:P,reducer:_}),m},exposeAction(P,_){return h.actionCreators[P]=_,m},exposeCaseReducer(P,_){return h.sliceCaseReducersByName[P]=_,m}};f.forEach(P=>{const _=u[P],O={reducerName:P,type:O$(o,P),createNotation:typeof a.reducers=="function"};D$(_)?L$(O,_,m,t):T$(O,_,m)});function g(){const[P={},_=[],O=void 0]=typeof a.extraReducers=="function"?O5(a.extraReducers):[a.extraReducers],D={...P,...h.sliceCaseReducersByType};return E$(a.initialState,U=>{for(let B in D)U.addCase(B,D[B]);for(let B of h.sliceMatchers)U.addMatcher(B.matcher,B.reducer);for(let B of _)U.addMatcher(B.matcher,B.reducer);O&&U.addDefaultCase(O)})}const v=P=>P,b=new Map,j=new WeakMap;let k;function S(P,_){return k||(k=g()),k(P,_)}function N(){return k||(k=g()),k.getInitialState()}function E(P,_=!1){function O(U){let B=U[P];return typeof B>"u"&&_&&(B=Rd(j,O,N)),B}function D(U=v){const B=Rd(b,_,()=>new WeakMap);return Rd(B,U,()=>{const F={};for(const[Y,H]of Object.entries(a.selectors??{}))F[Y]=M$(H,U,()=>Rd(j,U,N),_);return F})}return{reducerPath:P,getSelectors:D,get selectors(){return D(O)},selectSlice:O}}const A={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(c),injectInto(P,{reducerPath:_,...O}={}){const D=_??c;return P.inject({reducerPath:D,reducer:S},O),{...A,...E(D,!0)}}};return A}}function M$(e,t,r,n){function a(o,...c){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...c)}return a.unwrapped=e,a}var lr=_$();function I$(){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 T$({type:e,reducerName:t,createNotation:r},n,a){let o,c;if("reducer"in n){if(r&&!R$(n))throw new Error(Ur(17));o=n.reducer,c=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,c?Hr(e,c):Hr(e))}function D$(e){return e._reducerDefinitionType==="asyncThunk"}function R$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function L$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(Ur(18));const{payloadCreator:o,fulfilled:c,pending:u,rejected:f,settled:h,options:m}=r,g=a(e,o,m);n.exposeAction(t,g),c&&n.addCase(g.fulfilled,c),u&&n.addCase(g.pending,u),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:c||Ld,pending:u||Ld,rejected:f||Ld,settled:h||Ld})}function Ld(){}var $$="task",_5="listener",M5="completed",Hy="cancelled",z$=`task-${Hy}`,F$=`task-${M5}`,zv=`${_5}-${Hy}`,B$=`${_5}-${M5}`,Ph=class{constructor(e){Yl(this,"code");Yl(this,"name","TaskAbortError");Yl(this,"message");this.code=e,this.message=`${$$} ${Hy} (reason: ${e})`}},Wy=(e,t)=>{if(typeof e!="function")throw new TypeError(Ur(32))},Nf=()=>{},I5=(e,t=Nf)=>(e.catch(t),e),T5=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),po=e=>{if(e.aborted)throw new Ph(e.reason)};function D5(e,t){let r=Nf;return new Promise((n,a)=>{const o=()=>a(new Ph(e.reason));if(e.aborted){o();return}r=T5(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=Nf})}var U$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ph?"cancelled":"rejected",error:r}}finally{t==null||t()}},Ef=e=>t=>I5(D5(e,t).then(r=>(po(e),r))),R5=e=>{const t=Ef(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ss}=Object,mk={},Oh="listenerMiddleware",H$=(e,t)=>{const r=n=>T5(e,()=>n.abort(e.reason));return(n,a)=>{Wy(n);const o=new AbortController;r(o);const c=U$(async()=>{po(e),po(o.signal);const u=await n({pause:Ef(o.signal),delay:R5(o.signal),signal:o.signal});return po(o.signal),u},()=>o.abort(F$));return a!=null&&a.autoJoin&&t.push(c.catch(Nf)),{result:Ef(e)(c),cancel(){o.abort(z$)}}}},W$=(e,t)=>{const r=async(n,a)=>{po(t);let o=()=>{};const u=[new Promise((f,h)=>{let m=e({predicate:n,effect:(g,v)=>{v.unsubscribe(),f([g,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];a!=null&&u.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await D5(t,Promise.race(u));return po(t),f}finally{o()}};return((n,a)=>I5(r(n,a)))},L5=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Hr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(Ur(21));return Wy(o),{predicate:a,type:t,effect:o}},$5=Ss(e=>{const{type:t,predicate:r,effect:n}=L5(e);return{id:C$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ur(22))}}},{withTypes:()=>$5}),pk=(e,t)=>{const{type:r,effect:n,predicate:a}=L5(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},Fv=e=>{e.pending.forEach(t=>{t.abort(zv)})},K$=(e,t)=>()=>{for(const r of t.keys())Fv(r);e.clear()},gk=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},z5=Ss(Hr(`${Oh}/add`),{withTypes:()=>z5}),G$=Hr(`${Oh}/removeAll`),F5=Ss(Hr(`${Oh}/remove`),{withTypes:()=>F5}),V$=(...e)=>{console.error(`${Oh}/error`,...e)},Zu=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},a=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:o,onError:c=V$}=e;Wy(c);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&Fv(b)}),f=(b=>{const j=pk(t,b)??$5(b);return u(j)});Ss(f,{withTypes:()=>f});const h=b=>{const j=pk(t,b);return j&&(j.unsubscribe(),b.cancelActive&&Fv(j)),!!j};Ss(h,{withTypes:()=>h});const m=async(b,j,k,S)=>{const N=new AbortController,E=W$(f,N.signal),A=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,Ss({},k,{getOriginalState:S,condition:(P,_)=>E(P,_).then(Boolean),take:E,delay:R5(N.signal),pause:Ef(N.signal),extra:o,signal:N.signal,fork:H$(N.signal,A),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((P,_,O)=>{P!==N&&(P.abort(zv),O.delete(P))})},cancel:()=>{N.abort(zv),b.pending.delete(N)},throwIfCancelled:()=>{po(N.signal)}})))}catch(P){P instanceof Ph||gk(c,P,{raisedBy:"effect"})}finally{await Promise.all(A),N.abort(B$),a(b),b.pending.delete(N)}},g=K$(t,r);return{middleware:b=>j=>k=>{if(!p5(k))return j(k);if(z5.match(k))return f(k.payload);if(G$.match(k)){g();return}if(F5.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===mk)throw new Error(Ur(23));return S};let E;try{if(E=j(k),t.size>0){const A=b.getState(),P=Array.from(t.values());for(const _ of P){let O=!1;try{O=_.predicate(k,A,S)}catch(D){O=!1,gk(c,D,{raisedBy:"predicate"})}O&&m(_,k,b,N)}}}finally{S=mk}return E},startListening:f,stopListening:h,clearListeners:g}};function Ur(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 q$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},B5=lr({name:"chartLayout",initialState:q$,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}}}),_h=B5.actions,Q$=_h.setMargin,Y$=_h.setLayout,X$=_h.setChartSize,Z$=_h.setScale,J$=B5.reducer;function U5(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function We(e){return Number.isFinite(e)}function Vn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function vk(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 xs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(r),!0).forEach(function(n){ez(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ez(e,t,r){return(t=tz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tz(e){var t=rz(e,"string");return typeof t=="symbol"?t:t+""}function rz(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 Lt(e,t,r){return Yt(e)||Yt(t)?r:Gn(t)?Oo(e,t,r):typeof t=="function"?t(e):r}var nz=(e,t,r)=>{if(t&&r){var n=r.width,a=r.height,o=t.align,c=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&c==="middle")&&o!=="center"&&Ee(e[o]))return xs(xs({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&c!=="middle"&&Ee(e[c]))return xs(xs({},e),{},{[c]:e[c]+(a||0)})}return e},Xn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",H5=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var a,o,c=e.map(u=>(u.coordinate===t&&(a=!0),u.coordinate===r&&(o=!0),u.coordinate));return a||c.push(t),o||c.push(r),c},W5=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,c=e.scale,u=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,g=e.ticks,v=e.niceTicks,b=e.axisType;if(!c)return null;var j=u==="scaleBand"&&c.bandwidth?c.bandwidth()/2:2,k=a==="category"&&c.bandwidth?c.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?Jr(o[0]-o[1])*2*k:k,g||v){var S=(g||v||[]).map((N,E)=>{var A=n?n.indexOf(N):N,P=c.map(A);return We(P)?{coordinate:P+k,value:N,offset:k,index:E}:null}).filter(Ar);return S}return f&&h?h.map((N,E)=>{var A=c.map(N);return We(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(Ar):c.ticks&&m!=null?c.ticks(m).map((N,E)=>{var A=c.map(N);return We(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(Ar):c.domain().map((N,E)=>{var A=c.map(N);return We(A)?{coordinate:A+k,value:n?n[N]:N,index:E,offset:k}:null}).filter(Ar)},iz=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,c=0,u=0;u<r;++u){var f=e[u],h=f==null?void 0:f[a];if(h!=null){var m=h[1],g=h[0],v=Kn(m)?g:m;v>=0?(h[0]=o,o+=v,h[1]=o):(h[0]=c,c+=v,h[1]=c)}}}},az=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,c=0;c<r;++c){var u=e[c],f=u==null?void 0:u[a];if(f!=null){var h=Kn(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},oz={sign:iz,expand:kR,none:xo,silhouette:jR,wiggle:SR,positive:az},sz=(e,t,r)=>{var n,a=(n=oz[r])!==null&&n!==void 0?n:xo,o=wR().keys(t).value((u,f)=>Number(Lt(u,f,0))).order(Ev).offset(a),c=o(e);return c.forEach((u,f)=>{u.forEach((h,m)=>{var g=Lt(e[m],t[f],0);Array.isArray(g)&&g.length===2&&Ee(g[0])&&Ee(g[1])&&(h[0]=g[0],h[1]=g[1])})}),c};function lz(e){return e==null?void 0:String(e)}function yk(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,o=e.index,c=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Yt(a[t.dataKey])){var u=YE(r,"value",a[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Lt(a,Yt(c)?t.dataKey:c),h=t.scale.map(f);return Ee(h)?h:null}var uz=e=>{var t=e.flat(2).filter(Ee);return[Math.min(...t),Math.max(...t)]},cz=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],dz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return cz(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var c=o.stackedData,u=c.reduce((f,h)=>{var m=U5(h,t,r),g=uz(m);return!We(g[0])||!We(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},xk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Af=(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=wh(t,m=>m.coordinate),o=1/0,c=1,u=a.length;c<u;c++){var f=a[c],h=a[c-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 wk(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,a=e.value,o=e.name;return xs(xs({},t),{},{dataKey:r,payload:n,value:a,name:o})}function K5(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var fz=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},hz=(e,t)=>t==="centric"?e.angle:e.radius,Ei=e=>e.layout.width,Ai=e=>e.layout.height,mz=e=>e.layout.scale,G5=e=>e.layout.margin,Mh=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Ih=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pz="data-recharts-item-index",gz="data-recharts-item-id",Ju=60;function kk(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 $d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(r),!0).forEach(function(n){vz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vz(e,t,r){return(t=yz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yz(e){var t=xz(e,"string");return typeof t=="symbol"?t:t+""}function xz(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 bz=e=>e.brush.height;function wz(e){var t=Ih(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Ju;return r+a}return r},0)}function kz(e){var t=Ih(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Ju;return r+a}return r},0)}function jz(e){var t=Mh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Sz(e){var t=Mh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Zt=q([Ei,Ai,G5,bz,wz,kz,jz,Sz,f5,KL],(e,t,r,n,a,o,c,u,f,h)=>{var m={left:(r.left||0)+a,right:(r.right||0)+o},g={top:(r.top||0)+c,bottom:(r.bottom||0)+u},v=$d($d({},g),m),b=v.bottom;v.bottom+=n,v=nz(v,f,h);var j=e-v.left-v.right,k=t-v.top-v.bottom;return $d($d({brushBottom:b},v),{},{width:Math.max(j,0),height:Math.max(k,0)})}),Nz=q(Zt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),V5=q(Ei,Ai,(e,t)=>({x:0,y:0,width:e,height:t})),Ez=y.createContext(null),Pr=()=>y.useContext(Ez)!=null,Th=e=>e.brush,Dh=q([Th,Zt,G5],(e,t,r)=>({height:e.height,x:Ee(e.x)?e.x:t.left,y:Ee(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ee(e.width)?e.width:t.width}));function Az(e,t,{signal:r,edges:n}={}){let a,o=null;const c=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{u&&f(),b()};let m=null;const g=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),a=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=m==null;g(),c&&N&&f()};return k.schedule=g,k.cancel=b,k.flush=j,r==null||r.addEventListener("abort",b,{once:!0}),k}function Cz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:o}=r,c=Array(2);n&&(c[0]="leading"),a&&(c[1]="trailing");let u,f=null;const h=Az(function(...v){u=e.apply(this,v),f=null},t,{edges:c}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(u=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),u):(h.apply(this,v),u)},g=()=>(h.flush(),u);return m.cancel=h.cancel,m.flush=g,m}function Pz(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return Cz(e,t,{leading:n,maxWait:t,trailing:a})}var Cf=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 c=0;console.warn(r.replace(/%s/g,()=>a[c++]))}},zn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},q5=(e,t,r)=>{var n=r.width,a=n===void 0?zn.width:n,o=r.height,c=o===void 0?zn.height:o,u=r.aspect,f=r.maxHeight,h=bo(a)?e:Number(a),m=bo(c)?t:Number(c);return u&&u>0&&(h?m=h/u:m&&(h=m*u),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Oz={width:0,height:0,overflow:"visible"},_z={width:0,overflowX:"visible"},Mz={height:0,overflowY:"visible"},Iz={},Tz=e=>{var t=e.width,r=e.height,n=bo(t),a=bo(r);return n&&a?Oz:n?_z:a?Mz:Iz};function Dz(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=zn.width,o=zn.height):a===void 0?a=n&&n>0?void 0:zn.width:o===void 0&&(o=n&&n>0?void 0:zn.height),{width:a,height:o}}var Rz=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];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 jk(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 Sk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jk(Object(r),!0).forEach(function(n){Lz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lz(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=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){return Wz(e)||Hz(e,t)||Uz(e,t)||Bz()}function Bz(){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 Uz(e,t){if(e){if(typeof e=="string")return Nk(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)?Nk(e,t):void 0}}function Nk(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 Hz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function Wz(e){if(Array.isArray(e))return e}function Kz(e,t){if(e==null)return{};var r,n,a=Gz(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 Gz(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 Q5=y.createContext(zn.initialDimension);function Vz(e){return Vn(e.width)&&Vn(e.height)}function Y5(e){var t=e.children,r=e.width,n=e.height,a=y.useMemo(()=>({width:r,height:n}),[r,n]);return Vz(a)?y.createElement(Q5.Provider,{value:a},t):null}var Ky=()=>y.useContext(Q5),qz=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?zn.initialDimension:n,o=e.width,c=e.height,u=e.minWidth,f=u===void 0?zn.minWidth:u,h=e.minHeight,m=e.maxHeight,g=e.children,v=e.debounce,b=v===void 0?zn.debounce:v,j=e.id,k=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,A=Kz(e,Rz),P=y.useRef(null),_=y.useRef();_.current=S,y.useImperativeHandle(t,()=>P.current);var O=y.useState({containerWidth:a.width,containerHeight:a.height}),D=Fz(O,2),U=D[0],B=D[1],F=y.useCallback((ae,se)=>{B(X=>{var te=Math.round(ae),J=Math.round(se);return X.containerWidth===te&&X.containerHeight===J?X:{containerWidth:te,containerHeight:J}})},[]);y.useEffect(()=>{if(P.current==null||typeof ResizeObserver>"u")return rl;var ae=I=>{var M,K=I[0];if(K!=null){var ne=K.contentRect,Z=ne.width,me=ne.height;F(Z,me),(M=_.current)===null||M===void 0||M.call(_,Z,me)}};b>0&&(ae=Pz(ae,b,{trailing:!0,leading:!1}));var se=new ResizeObserver(ae),X=P.current.getBoundingClientRect(),te=X.width,J=X.height;return F(te,J),se.observe(P.current),()=>{se.disconnect()}},[F,b]);var Y=U.containerWidth,H=U.containerHeight;Cf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var pe=q5(Y,H,{width:o,height:c,aspect:r,maxHeight:m}),ue=pe.calculatedWidth,he=pe.calculatedHeight;return Cf(Y<0||H<0||ue!=null&&ue>0||he!=null&&he>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.`,ue,he,o,c,f,h,r),y.createElement("div",Pf({id:j?"".concat(j):void 0,className:nt("recharts-responsive-container",k),style:Sk(Sk({},E),{},{width:o,height:c,minWidth:f,minHeight:h,maxHeight:m}),ref:P},A),y.createElement("div",{style:Tz({width:o,height:c})},y.createElement(Y5,{width:ue,height:he},g)))}),Qz=y.forwardRef((e,t)=>{var r=Ky();if(Vn(r.width)&&Vn(r.height))return e.children;var n=Dz({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,c=q5(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),u=c.calculatedWidth,f=c.calculatedHeight;return Ee(u)&&Ee(f)?y.createElement(Y5,{width:u,height:f},e.children):y.createElement(qz,Pf({},e,{width:a,height:o,ref:t}))});function Gy(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 Rh=()=>{var e,t=Pr(),r=Me(Nz),n=Me(Dh),a=(e=Me(Th))===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}},Yz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},X5=()=>{var e;return(e=Me(Zt))!==null&&e!==void 0?e:Yz},Z5=()=>Me(Ei),J5=()=>Me(Ai),ft=e=>e.layout.layoutType,nl=()=>Me(ft),Vy=()=>{var e=nl();if(e==="horizontal"||e==="vertical")return e},eA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Xz=()=>{var e=nl();return e!==void 0},ec=e=>{var t=Nt(),r=Pr(),n=e.width,a=e.height,o=Ky(),c=n,u=a;return o&&(c=o.width>0?o.width:n,u=o.height>0?o.height:a),y.useEffect(()=>{!r&&Vn(c)&&Vn(u)&&t(X$({width:c,height:u}))},[t,r,c,u]),null},tA=Symbol.for("immer-nothing"),Ek=Symbol.for("immer-draftable"),Wr=Symbol.for("immer-state");function xn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _u=Object.getPrototypeOf;function Vs(e){return!!e&&!!e[Wr]}function ko(e){var t;return e?rA(e)||Array.isArray(e)||!!e[Ek]||!!((t=e.constructor)!=null&&t[Ek])||tc(e)||$h(e):!1}var Zz=Object.prototype.constructor.toString(),Ak=new WeakMap;function rA(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=Ak.get(r);return n===void 0&&(n=Function.toString.call(r),Ak.set(r,n)),n===Zz}function Of(e,t,r=!0){Lh(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 Lh(e){const t=e[Wr];return t?t.type_:Array.isArray(e)?1:tc(e)?2:$h(e)?3:0}function Bv(e,t){return Lh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nA(e,t,r){const n=Lh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Jz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function tc(e){return e instanceof Map}function $h(e){return e instanceof Set}function Qa(e){return e.copy_||e.base_}function Uv(e,t){if(tc(e))return new Map(e);if($h(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=rA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Wr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const c=a[o],u=n[c];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[c]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[c]})}return Object.create(_u(e),n)}else{const n=_u(e);if(n!==null&&r)return{...e};const a=Object.create(n);return Object.assign(a,e)}}function qy(e,t=!1){return zh(e)||Vs(e)||!ko(e)||(Lh(e)>1&&Object.defineProperties(e,{set:zd,add:zd,clear:zd,delete:zd}),Object.freeze(e),t&&Object.values(e).forEach(r=>qy(r,!0))),e}function e6(){xn(2)}var zd={value:e6};function zh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var t6={};function jo(e){const t=t6[e];return t||xn(0,e),t}var Mu;function iA(){return Mu}function r6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ck(e,t){t&&(jo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hv(e){Wv(e),e.drafts_.forEach(n6),e.drafts_=null}function Wv(e){e===Mu&&(Mu=e.parent_)}function Pk(e){return Mu=r6(Mu,e)}function n6(e){const t=e[Wr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ok(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Wr].modified_&&(Hv(t),xn(4)),ko(e)&&(e=_f(t,e),t.parent_||Mf(t,e)),t.patches_&&jo("Patches").generateReplacementPatches_(r[Wr].base_,e,t.patches_,t.inversePatches_)):e=_f(t,r,[]),Hv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==tA?e:void 0}function _f(e,t,r){if(zh(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[Wr];if(!a)return Of(t,(o,c)=>_k(e,a,t,o,c,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Mf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let c=o,u=!1;a.type_===3&&(c=new Set(o),o.clear(),u=!0),Of(c,(f,h)=>_k(e,a,o,f,h,r,u),n),Mf(e,o,!1),r&&e.patches_&&jo("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function _k(e,t,r,n,a,o,c){if(a==null||typeof a!="object"&&!c)return;const u=zh(a);if(!(u&&!c)){if(Vs(a)){const f=o&&t&&t.type_!==3&&!Bv(t.assigned_,n)?o.concat(n):void 0,h=_f(e,a,f);if(nA(r,n,h),Vs(h))e.canAutoFreeze_=!1;else return}else c&&r.add(a);if(ko(a)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&u)return;_f(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(tc(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Mf(e,a)}}}function Mf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qy(t,r)}function i6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:iA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=Qy;r&&(a=[n],o=Iu);const{revoke:c,proxy:u}=Proxy.revocable(a,o);return n.draft_=u,n.revoke_=c,u}var Qy={get(e,t){if(t===Wr)return e;const r=Qa(e);if(!Bv(r,t))return a6(e,r,t);const n=r[t];return e.finalized_||!ko(n)?n:n===yg(e.base_,t)?(xg(e),e.copy_[t]=Gv(n,e)):n},has(e,t){return t in Qa(e)},ownKeys(e){return Reflect.ownKeys(Qa(e))},set(e,t,r){const n=aA(Qa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=yg(Qa(e),t),o=a==null?void 0:a[Wr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Jz(r,a)&&(r!==void 0||Bv(e.base_,t)))return!0;xg(e),Kv(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 yg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xg(e),Kv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Qa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){xn(11)},getPrototypeOf(e){return _u(e.base_)},setPrototypeOf(){xn(12)}},Iu={};Of(Qy,(e,t)=>{Iu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Iu.deleteProperty=function(e,t){return Iu.set.call(this,e,t,void 0)};Iu.set=function(e,t,r){return Qy.set.call(this,e[0],t,r,e[0])};function yg(e,t){const r=e[Wr];return(r?Qa(r):e)[t]}function a6(e,t,r){var a;const n=aA(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function aA(e,t){if(!(t in e))return;let r=_u(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=_u(r)}}function Kv(e){e.modified_||(e.modified_=!0,e.parent_&&Kv(e.parent_))}function xg(e){e.copy_||(e.copy_=Uv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var o6=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 c=this;return function(f=o,...h){return c.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&xn(6),n!==void 0&&typeof n!="function"&&xn(7);let a;if(ko(t)){const o=Pk(this),c=Gv(t,void 0);let u=!0;try{a=r(c),u=!1}finally{u?Hv(o):Wv(o)}return Ck(o,n),Ok(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===tA&&(a=void 0),this.autoFreeze_&&qy(a,!0),n){const o=[],c=[];jo("Patches").generateReplacementPatches_(t,a,o,c),n(o,c)}return a}else xn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(c,...u)=>this.produceWithPatches(c,f=>t(f,...u));let n,a;return[this.produce(t,r,(c,u)=>{n=c,a=u}),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){ko(e)||xn(8),Vs(e)&&(e=s6(e));const t=Pk(this),r=Gv(e,void 0);return r[Wr].isManual_=!0,Wv(t),r}finishDraft(e,t){const r=e&&e[Wr];(!r||!r.isManual_)&&xn(9);const{scope_:n}=r;return Ck(n,t),Ok(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=jo("Patches").applyPatches_;return Vs(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Gv(e,t){const r=tc(e)?jo("MapSet").proxyMap_(e,t):$h(e)?jo("MapSet").proxySet_(e,t):i6(e,t);return(t?t.scope_:iA()).drafts_.push(r),r}function s6(e){return Vs(e)||xn(10,e),oA(e)}function oA(e){if(!ko(e)||zh(e))return e;const t=e[Wr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Uv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Uv(e,!0);return Of(r,(a,o)=>{nA(r,a,oA(o))},n),t&&(t.finalized_=!1),r}var l6=new o6;l6.produce;var u6={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},sA=lr({name:"legend",initialState:u6,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:st()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=en(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:st()},removeLegendPayload:{reducer(e,t){var r=en(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:st()}}}),rc=sA.actions;rc.setLegendSize;rc.setLegendSettings;var c6=rc.addLegendPayload,d6=rc.replaceLegendPayload,f6=rc.removeLegendPayload,h6=sA.reducer,bg={exports:{}},wg={};/**
* @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 Mk;function m6(){if(Mk)return wg;Mk=1;var e=el();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,c=e.useMemo,u=e.useDebugValue;return wg.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var b=a(null);if(b.current===null){var j={hasValue:!1,value:null};b.current=j}else j=b.current;b=c(function(){function S(_){if(!N){if(N=!0,E=_,_=g(_),v!==void 0&&j.hasValue){var O=j.value;if(v(O,_))return A=O}return A=_}if(O=A,r(E,_))return O;var D=g(_);return v!==void 0&&v(O,D)?(E=_,O):(E=_,A=D)}var N=!1,E,A,P=m===void 0?null:m;return[function(){return S(h())},P===null?void 0:function(){return S(P())}]},[h,m,g,v]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),u(k),k},wg}var Ik;function p6(){return Ik||(Ik=1,bg.exports=m6()),bg.exports}p6();function g6(e){e()}function v6(){let e=null,t=null;return{clear(){e=null,t=null},notify(){g6(()=>{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 Tk={notify(){},get:()=>[]};function y6(e,t){let r,n=Tk,a=0,o=!1;function c(k){m();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function u(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function m(){a++,r||(r=e.subscribe(f),n=v6())}function g(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=Tk)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,g())}const j={addNestedSub:c,notifyNestedSubs:u,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return j}var x6=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b6=x6(),w6=()=>typeof navigator<"u"&&navigator.product==="ReactNative",k6=w6(),j6=()=>b6||k6?y.useLayoutEffect:y.useEffect,S6=j6();function Dk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function N6(e,t){if(Dk(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])||!Dk(e[r[a]],t[r[a]]))return!1;return!0}var kg=Symbol.for("react-redux-context"),jg=typeof globalThis<"u"?globalThis:{};function E6(){if(!y.createContext)return{};const e=jg[kg]??(jg[kg]=new Map);let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var A6=E6();function C6(e){const{children:t,context:r,serverState:n,store:a}=e,o=y.useMemo(()=>{const f=y6(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),c=y.useMemo(()=>a.getState(),[a]);S6(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),c!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,c]);const u=r||A6;return y.createElement(u.Provider,{value:o},t)}var P6=C6,O6=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function _6(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Fh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(O6.has(n)){if(e[n]==null&&t[n]==null)continue;if(!N6(e[n],t[n]))return!1}else if(!_6(e[n],t[n]))return!1;return!0}function Vv(){return Vv=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},Vv.apply(null,arguments)}function Rk(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 tu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rk(Object(r),!0).forEach(function(n){M6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M6(e,t,r){return(t=I6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I6(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)}function D6(e,t){return z6(e)||$6(e,t)||L6(e,t)||R6()}function R6(){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 Lk(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)?Lk(e,t):void 0}}function Lk(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 $6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function z6(e){if(Array.isArray(e))return e}function F6(e){return Array.isArray(e)&&Gn(e[0])&&Gn(e[1])?e.join(" ~ "):e}var ls={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 B6(e,t){return t==null?e:wh(e,t)}var U6=e=>{var t=e.separator,r=t===void 0?ls.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,c=o===void 0?ls.labelStyle:o,u=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,g=e.labelClassName,v=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?ls.accessibilityLayer:j,S=()=>{if(u&&u.length){var U={padding:0,margin:0},B=B6(u,h),F=B.map((Y,H)=>{if(!Y||Y.type==="none")return null;var pe=Y.formatter||f||F6,ue=Y.value,he=Y.name,ae=ue,se=he;if(pe){var X=pe(ue,he,Y,H,u);if(Array.isArray(X)){var te=D6(X,2);ae=te[0],se=te[1]}else if(X!=null)ae=X;else return null}var J=tu(tu({},ls.itemStyle),{},{color:Y.color||ls.itemStyle.color},a);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(H),style:J},Gn(se)?y.createElement("span",{className:"recharts-tooltip-item-name"},se):null,Gn(se)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},ae),y.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:U},F)}return null},N=tu(tu({},ls.contentStyle),n),E=tu({margin:0},c),A=!Yt(v),P=A?v:"",_=nt("recharts-default-tooltip",m),O=nt("recharts-tooltip-label",g);A&&b&&u!==void 0&&u!==null&&(P=b(v,u));var D=k?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",Vv({className:_,style:N},D),y.createElement("p",{className:O,style:E},y.isValidElement(P)?P:"".concat(P)),S())},ru="recharts-tooltip-wrapper",H6={visibility:"hidden"};function W6(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return nt(ru,{["".concat(ru,"-right")]:Ee(r)&&t&&Ee(t.x)&&r>=t.x,["".concat(ru,"-left")]:Ee(r)&&t&&Ee(t.x)&&r<t.x,["".concat(ru,"-bottom")]:Ee(n)&&t&&Ee(t.y)&&n>=t.y,["".concat(ru,"-top")]:Ee(n)&&t&&Ee(t.y)&&n<t.y})}function $k(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offset,o=e.position,c=e.reverseDirection,u=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Ee(o[n]))return o[n];var m=r[n]-u-(a>0?a:0),g=r[n]+a;if(t[n])return c[n]?m:g;var v=f[n];if(v==null)return 0;if(c[n]){var b=m,j=v;return b<j?Math.max(g,v):Math.max(m,v)}if(h==null)return 0;var k=g+u,S=v+h;return k>S?Math.max(m,v):Math.max(g,v)}function K6(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 G6(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,c=e.reverseDirection,u=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,g,v;return u.height>0&&u.width>0&&r?(g=$k({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:c,tooltipDimension:u.width,viewBox:h,viewBoxDimension:h.width}),v=$k({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:c,tooltipDimension:u.height,viewBox:h,viewBoxDimension:h.height}),m=K6({translateX:g,translateY:v,useTranslate3d:f})):m=H6,{cssProperties:m,cssClasses:W6({translateX:g,translateY:v,coordinate:r})}}var V6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),nc={isSsr:V6()};function q6(e,t){return Z6(e)||X6(e,t)||Y6(e,t)||Q6()}function Q6(){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 Y6(e,t){if(e){if(typeof e=="string")return zk(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)?zk(e,t):void 0}}function zk(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 X6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function Z6(e){if(Array.isArray(e))return e}function lA(){var e=y.useState(()=>nc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=q6(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 Fk(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 us(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(r),!0).forEach(function(n){J6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J6(e,t,r){return(t=e8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e8(e){var t=t8(e,"string");return typeof t=="symbol"?t:t+""}function t8(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 r8(e,t){return o8(e)||a8(e,t)||i8(e,t)||n8()}function n8(){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 i8(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 a8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function o8(e){if(Array.isArray(e))return e}function s8(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 l8(e){var t,r,n,a,o,c,u=lA(),f=y.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=r8(f,2),m=h[0],g=h[1];y.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var A,P,_,O;g({dismissed:!0,dismissedAtCoordinate:{x:(A=(P=e.coordinate)===null||P===void 0?void 0:P.x)!==null&&A!==void 0?A:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.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]),m.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(c=e.coordinate)===null||c===void 0?void 0:c.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&g(us(us({},m),{},{dismissed:!1}));var v=G6({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=v.cssClasses,j=v.cssProperties,k=e.hasPortalFromProps?{}:us(us({transition:s8({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=us(us({},k),{},{visibility:!m.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 u8=y.memo(l8),uA=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function qv(){return qv=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},qv.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 Hk(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){c8(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 c8(e,t,r){return(t=d8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d8(e){var t=f8(e,"string");return typeof t=="symbol"?t:t+""}function f8(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 Wk={curveBasisClosed:cR,curveBasisOpen:dR,curveBasis:uR,curveBumpX:sR,curveBumpY:lR,curveLinearClosed:fR,curveLinear:xh,curveMonotoneX:hR,curveMonotoneY:mR,curveNatural:pR,curveStep:gR,curveStepAfter:yR,curveStepBefore:vR},If=e=>We(e.x)&&We(e.y),Kk=e=>e.base!=null&&If(e.base)&&If(e),nu=e=>e.x,iu=e=>e.y,h8=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Dy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Wk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Wk[r]||xh},Gk={connectNulls:!1,type:"linear"},m8=e=>{var t=e.type,r=t===void 0?Gk.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,c=e.layout,u=e.connectNulls,f=u===void 0?Gk.connectNulls:u,h=h8(r,c),m=f?a.filter(If):a;if(Array.isArray(o)){var g,v=a.map((N,E)=>Hk(Hk({},N),{},{base:o[E]}));c==="vertical"?g=Md().y(iu).x1(nu).x0(N=>N.base.x):g=Md().x(nu).y1(iu).y0(N=>N.base.y);var b=g.defined(Kk).curve(h),j=f?v.filter(Kk):v;return b(j)}var k;c==="vertical"&&Ee(o)?k=Md().y(iu).x1(nu).x0(o):Ee(o)?k=Md().x(nu).y1(iu).y0(o):k=$E().x(nu).y(iu);var S=k.defined(If).curve(h);return S(m)},rf=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=nl();if((!r||!r.length)&&!n)return null;var c={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=r&&r.length?m8(c):n;return y.createElement("path",qv({},kn(e),Ry(e),{className:nt("recharts-curve",t),d:u===null?void 0:u,ref:a}))},p8=["x","y","top","left","width","height","className"];function Qv(){return Qv=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},Qv.apply(null,arguments)}function Vk(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 g8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vk(Object(r),!0).forEach(function(n){v8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v8(e,t,r){return(t=y8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y8(e){var t=x8(e,"string");return typeof t=="symbol"?t:t+""}function x8(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 b8(e,t){if(e==null)return{};var r,n,a=w8(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 w8(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 k8=(e,t,r,n,a,o)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),j8=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,o=e.top,c=o===void 0?0:o,u=e.left,f=u===void 0?0:u,h=e.width,m=h===void 0?0:h,g=e.height,v=g===void 0?0:g,b=e.className,j=b8(e,p8),k=g8({x:r,y:a,top:c,left:f,width:m,height:v},j);return!Ee(r)||!Ee(a)||!Ee(m)||!Ee(v)||!Ee(c)||!Ee(f)?null:y.createElement("path",Qv({},rn(k),{className:nt("recharts-cross",b),d:k8(r,a,m,v,c,f)}))};function S8(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 Tf=1e-4,cA=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],dA=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),qk=(e,t)=>r=>{var n=cA(e,t);return dA(n,r)},N8=(e,t)=>r=>{var n=cA(e,t),a=[...n.map((o,c)=>o*c).slice(1),0];return dA(a,r)},E8=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]]},A8=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=E8(r[0]);if(a)return a}}return r.length===4?r:[0,0,1,1]},C8=(e,t,r,n)=>{var a=qk(e,r),o=qk(t,n),c=N8(e,r),u=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,g=m,v=0;v<8;++v){var b=a(g)-m,j=c(g);if(Math.abs(b-m)<Tf||j<Tf)return o(g);g=u(g-b/j)}return o(g)};return f.isStepper=!1,f},Qk=function(){return C8(...A8(...arguments))},P8=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,c=t.dt,u=c===void 0?16.67:c,f=1,h=[0],m=0,g=0,v=1e4,b=0;b<v;){var j=-(m-f)*n,k=g*o;if(g+=(j-k)*u/1e3,m+=g*u/1e3,h.push(m),Math.abs(m-f)<Tf&&Math.abs(g)<Tf)break;b++}h[h.length-1]=f;var S=h.length-1;return N=>{var E,A,P;if(N<=0)return 0;if(N>=1)return f;var _=N*S,O=Math.floor(_),D=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((A=h[O+1])!==null&&A!==void 0?A:0)-((P=h[O])!==null&&P!==void 0?P:0))*D}},O8=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Qk(e);case"spring":return P8();default:if(e.split("(")[0]==="cubic-bezier")return Qk(e)}return typeof e=="function"?e:null},_8=(e,t,r)=>{var n,a=o=>{var c=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,c);return}n=e.setTimeout(a,c)};return n=e.setTimeout(a,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},fA=y.createContext(_8);fA.Provider;function M8(e){var t=y.useContext(fA);return y.useMemo(()=>e??t,[e,t])}function I8(e,t,r){return(t=T8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T8(e){var t=D8(e,"string");return typeof t=="symbol"?t:t+""}function D8(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 Yk="init",Xk="pending",Zk="active",R8="completed";function Sg(e){return Math.max(0,e)}class L8{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;I8(this,"state",Yk),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Sg(t.animationDuration),this.animationBegin=Sg(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()===Yk)return this.state=Xk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Xk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Zk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Sg(this.animationBegin-r)}if(this.getState()===Zk){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=R8}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class $8 extends L8{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(mi(this.getFrom(),this.getTo(),this.getProgress()))}}class z8{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,o=c=>{c-n>=r?t(c):a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!=null&&cancelAnimationFrame(a)}}}function F8(e,t){return W8(e)||H8(e,t)||U8(e,t)||B8()}function B8(){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 U8(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 H8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function W8(e){if(Array.isArray(e))return e}var K8={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},ej=0,Ng=1;function hA(e){var t=on(e,K8),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,c=t.easing,u=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,g=lA(),v=n==="auto"?!nc.isSsr&&!g:n,b=M8(t.animationController),j=y.useState(v?ej:Ng),k=F8(j,2),S=k[0],N=k[1];return y.useEffect(()=>{v||N(Ng)},[v]),y.useEffect(()=>{var E=O8(c);if(!v||!a||E==null)return rl;var A=new z8,P=new $8({animationId:r,easing:E,animationDuration:o,animationBegin:u,onAnimationStart:h,onAnimationEnd:f,from:ej,to:Ng});return b(A,P,N)},[b,r,v,a,o,c,u,h,f]),m(Number(S))}function mA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(Au(t)),n=y.useRef(e);return n.current!==e&&(r.current=Au(t),n.current=e),r.current}var G8=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),V8=(e,t,r)=>e.map(n=>"".concat(G8(n)," ").concat(t,"ms ").concat(r)).join(","),q8=["radius"],Q8=["radius"],tj,rj,nj,ij,aj,oj,sj,lj,uj,cj;function dj(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 fj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dj(Object(r),!0).forEach(function(n){Y8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y8(e,t,r){return(t=X8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X8(e){var t=Z8(e,"string");return typeof t=="symbol"?t:t+""}function Z8(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 Df(){return Df=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},Df.apply(null,arguments)}function hj(e,t){if(e==null)return{};var r,n,a=J8(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 J8(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 eF(e,t){return iF(e)||nF(e,t)||rF(e,t)||tF()}function tF(){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 rF(e,t){if(e){if(typeof e=="string")return mj(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)?mj(e,t):void 0}}function mj(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 nF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function iF(e){if(Array.isArray(e))return e}function Mn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var pj=(e,t,r,n,a)=>{var o=va(r),c=va(n),u=Math.min(Math.abs(o)/2,Math.abs(c)/2),f=c>=0?1:-1,h=o>=0?1:-1,m=c>=0&&o>=0||c<0&&o<0?1:0,g;if(u>0&&Array.isArray(a)){for(var v=[0,0,0,0],b=0,j=4;b<j;b++){var k,S=(k=a[b])!==null&&k!==void 0?k:0;v[b]=S>u?u:S}g=Gt(tj||(tj=Mn(["M",",",""])),e,t+f*v[0]),v[0]>0&&(g+=Gt(rj||(rj=Mn(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),g+=Gt(nj||(nj=Mn(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(g+=Gt(ij||(ij=Mn(["A ",",",",0,0,",`,
`,",",""])),v[1],v[1],m,e+r,t+f*v[1])),g+=Gt(aj||(aj=Mn(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(g+=Gt(oj||(oj=Mn(["A ",",",",0,0,",`,
`,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),g+=Gt(sj||(sj=Mn(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(g+=Gt(lj||(lj=Mn(["A ",",",",0,0,",`,
`,",",""])),v[3],v[3],m,e,t+n-f*v[3])),g+="Z"}else if(u>0&&a===+a&&a>0){var N=Math.min(u,a);g=Gt(uj||(uj=Mn(["M ",",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",",",`
L `,",",`
A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else g=Gt(cj||(cj=Mn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},gj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aF=e=>{var t=on(e,gj),r=y.useRef(null),n=y.useState(-1),a=eF(n,2),o=a[0],c=a[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var X=r.current.getTotalLength();X&&c(X)}catch{}},[]);var u=t.x,f=t.y,h=t.width,m=t.height,g=t.radius,v=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=y.useRef(h),A=y.useRef(m),P=y.useRef(u),_=y.useRef(f),O=y.useMemo(()=>({x:u,y:f,width:h,height:m,radius:g}),[u,f,h,m,g]),D=mA(O,"rectangle-");if(u!==+u||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var U=nt("recharts-rectangle",v);if(!N){var B=rn(t);B.radius;var F=hj(B,q8);return y.createElement("path",Df({},F,{x:va(u),y:va(f),width:va(h),height:va(m),radius:typeof g=="number"?g:void 0,className:U,d:pj(u,f,h,m,g)}))}var Y=E.current,H=A.current,pe=P.current,ue=_.current,he="0px ".concat(o===-1?1:o,"px"),ae="".concat(o,"px ").concat(o,"px"),se=V8(["strokeDasharray"],j,typeof b=="string"?b:gj.animationEasing);return y.createElement(hA,{animationId:D,key:D,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},X=>{var te=mi(Y,h,X),J=mi(H,m,X),I=mi(pe,u,X),M=mi(ue,f,X);r.current&&(E.current=te,A.current=J,P.current=I,_.current=M);var K;S?X>0?K={transition:se,strokeDasharray:ae}:K={strokeDasharray:he}:K={strokeDasharray:ae};var ne=rn(t);ne.radius;var Z=hj(ne,Q8);return y.createElement("path",Df({},Z,{radius:typeof g=="number"?g:void 0,className:U,d:pj(I,M,te,J,g),ref:r,style:fj(fj({},K),t.style)}))})};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 yj(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){oF(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 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 Rf=Math.PI/180,uF=e=>e*180/Math.PI,Qt=(e,t,r,n)=>({x:e+Math.cos(-Rf*n)*r,y:t+Math.sin(-Rf*n)*r}),cF=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},dF=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},fF=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,c=dF({x:r,y:n},{x:a,y:o});if(c<=0)return{radius:c,angle:0};var u=(r-a)/c,f=Math.acos(u);return n>o&&(f=2*Math.PI-f),{radius:c,angle:uF(f),angleInRadian:f}},hF=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}},mF=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),o=Math.floor(n/360),c=Math.min(a,o);return e+c*360},pF=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=fF({x:r,y:n},t),o=a.radius,c=a.angle,u=t.innerRadius,f=t.outerRadius;if(o<u||o>f||o===0)return null;var h=hF(t),m=h.startAngle,g=h.endAngle,v=c,b;if(m<=g){for(;v>g;)v-=360;for(;v<m;)v+=360;b=v>=m&&v<=g}else{for(;v>m;)v-=360;for(;v<g;)v+=360;b=v>=g&&v<=m}return b?yj(yj({},t),{},{radius:o,angle:mF(v,t)}):null};function pA(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,c=Qt(t,r,n,a),u=Qt(t,r,n,o);return{points:[c,u],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var xj,bj,wj,kj,jj,Sj,Nj;function Yv(){return Yv=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},Yv.apply(null,arguments)}function eo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gF=(e,t)=>{var r=Jr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Fd=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,c=e.isExternal,u=e.cornerRadius,f=e.cornerIsExternal,h=u*(c?1:-1)+n,m=Math.asin(u/h)/Rf,g=f?a:a+o*m,v=Qt(t,r,h,g),b=Qt(t,r,n,g),j=f?a-o*m:a,k=Qt(t,r,h*Math.cos(m*Rf),j);return{center:v,circleTangency:b,lineTangency:k,theta:m}},gA=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,c=e.endAngle,u=gF(o,c),f=o+u,h=Qt(t,r,a,o),m=Qt(t,r,a,f),g=Gt(xj||(xj=eo(["M ",",",`
A `,",",`,0,
`,",",`,
`,",",`
`])),h.x,h.y,a,a,+(Math.abs(u)>180),+(o>f),m.x,m.y);if(n>0){var v=Qt(t,r,n,o),b=Qt(t,r,n,f);g+=Gt(bj||(bj=eo(["L ",",",`
A `,",",`,0,
`,",",`,
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(u)>180),+(o<=f),v.x,v.y)}else g+=Gt(wj||(wj=eo(["L ",","," Z"])),t,r);return g},vF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,c=e.forceCornerRadius,u=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=Jr(h-f),g=Fd({cx:t,cy:r,radius:a,angle:f,sign:m,cornerRadius:o,cornerIsExternal:u}),v=g.circleTangency,b=g.lineTangency,j=g.theta,k=Fd({cx:t,cy:r,radius:a,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:u}),S=k.circleTangency,N=k.lineTangency,E=k.theta,A=u?Math.abs(f-h):Math.abs(f-h)-j-E;if(A<0)return c?Gt(kj||(kj=eo(["M ",",",`
a`,",",",0,0,1,",`,0
a`,",",",0,0,1,",`,0
`])),b.x,b.y,o,o,o*2,o,o,-o*2):gA({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var P=Gt(jj||(jj=eo(["M ",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",",`
`])),b.x,b.y,o,o,+(m<0),v.x,v.y,a,a,+(A>180),+(m<0),S.x,S.y,o,o,+(m<0),N.x,N.y);if(n>0){var _=Fd({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),O=_.circleTangency,D=_.lineTangency,U=_.theta,B=Fd({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),F=B.circleTangency,Y=B.lineTangency,H=B.theta,pe=u?Math.abs(f-h):Math.abs(f-h)-U-H;if(pe<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=Gt(Sj||(Sj=eo(["L",",",`
A`,",",",0,0,",",",",",`
A`,",",",0,",",",",",",",`
A`,",",",0,0,",",",",","Z"])),Y.x,Y.y,o,o,+(m<0),F.x,F.y,n,n,+(pe>180),+(m>0),O.x,O.y,o,o,+(m<0),D.x,D.y)}else P+=Gt(Nj||(Nj=eo(["L",",","Z"])),t,r);return P},yF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xF=e=>{var t=on(e,yF),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,c=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,g=t.className;if(o<a||h===m)return null;var v=nt("recharts-sector",g),b=o-a,j=Sa(c,b,0,!0),k;return j>0&&Math.abs(h-m)<360?k=vF({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:m}):k=gA({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:m}),y.createElement("path",Yv({},rn(t),{className:v,d:k}))};function bF(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(XE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,c=t.outerRadius,u=t.angle,f=Qt(n,a,o,u),h=Qt(n,a,c,u);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return pA(t)}}function wF(e){return d5(e)?NaN:Number(e)}function Eg(e){return e?(e=wF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function vA(e,t,r){r&&typeof r!="number"&&Ov(e,t,r)&&(t=r=void 0),e=Eg(e),t===void 0?(t=e,e=0):t=Eg(t),r=r===void 0?e<t?1:-1:Eg(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 Nn=e=>e.chartData,Yy=q([Nn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Bh=(e,t,r,n)=>n?Yy(e):Nn(e),kF=(e,t,r)=>r?Yy(e):Nn(e),jF=q([Bh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});q([Yy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var SF=q([Nn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Xy(e,t){return CF(e)||AF(e,t)||EF(e,t)||NF()}function NF(){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 Ej(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)?Ej(e,t):void 0}}function Ej(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 AF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function CF(e){if(Array.isArray(e))return e}function Bn(e){if(Array.isArray(e)&&e.length===2){var t=Xy(e,2),r=t[0],n=t[1];if(We(r)&&We(n))return!0}return!1}function Aj(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function yA(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=Xy(e,2),n=r[0],a=r[1],o,c;if(We(n))o=n;else if(typeof n=="function")return;if(We(a))c=a;else if(typeof a=="function")return;var u=[o,c];if(Bn(u))return u}}function PF(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Bn(n))return Aj(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var a=Xy(e,2),o=a[0],c=a[1],u,f;if(o==="auto")t!=null&&(u=Math.min(...t));else if(Ee(o))u=o;else if(typeof o=="function")try{t!=null&&(u=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&xk.test(o)){var h=xk.exec(o);if(h==null||h[1]==null||t==null)u=void 0;else{var m=+h[1];u=t[0]-m}}else u=t==null?void 0:t[0];if(c==="auto")t!=null&&(f=Math.max(...t));else if(Ee(c))f=c;else if(typeof c=="function")try{t!=null&&(f=c(t==null?void 0:t[1]))}catch{}else if(typeof c=="string"&&bk.test(c)){var g=bk.exec(c);if(g==null||g[1]==null||t==null)f=void 0;else{var v=+g[1];f=t[1]+v}}else f=t==null?void 0:t[1];var b=[u,f];if(Bn(b))return t==null?b:Aj(b,t,r)}}}var il=1e9,OF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Jy,dt=!0,an="[DecimalError] ",go=an+"Invalid argument: ",Zy=an+"Exponent out of range: ",al=Math.floor,Ya=Math.pow,_F=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Fr,Rt=1e7,lt=7,xA=9007199254740991,Lf=al(xA/lt),we={};we.absoluteValue=we.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};we.comparedTo=we.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};we.decimalPlaces=we.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*lt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};we.dividedBy=we.div=function(e){return yi(this,new this.constructor(e))};we.dividedToIntegerBy=we.idiv=function(e){var t=this,r=t.constructor;return tt(yi(t,new r(e),0,1),r.precision)};we.equals=we.eq=function(e){return!this.cmp(e)};we.exponent=function(){return St(this)};we.greaterThan=we.gt=function(e){return this.cmp(e)>0};we.greaterThanOrEqualTo=we.gte=function(e){return this.cmp(e)>=0};we.isInteger=we.isint=function(){return this.e>this.d.length-2};we.isNegative=we.isneg=function(){return this.s<0};we.isPositive=we.ispos=function(){return this.s>0};we.isZero=function(){return this.s===0};we.lessThan=we.lt=function(e){return this.cmp(e)<0};we.lessThanOrEqualTo=we.lte=function(e){return this.cmp(e)<1};we.logarithm=we.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(Fr))throw Error(an+"NaN");if(r.s<1)throw Error(an+(r.s?"NaN":"-Infinity"));return r.eq(Fr)?new n(0):(dt=!1,t=yi(Tu(r,o),Tu(e,o),o),dt=!0,tt(t,a))};we.minus=we.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?kA(t,e):bA(t,(e.s=-e.s,e))};we.modulo=we.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(an+"NaN");return r.s?(dt=!1,t=yi(r,e,0,1).times(e),dt=!0,r.minus(t)):tt(new n(r),a)};we.naturalExponential=we.exp=function(){return wA(this)};we.naturalLogarithm=we.ln=function(){return Tu(this)};we.negated=we.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};we.plus=we.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?bA(t,e):kA(t,(e.s=-e.s,e))};we.precision=we.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(go+e);if(t=St(a)+1,n=a.d.length-1,r=n*lt+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};we.squareRoot=we.sqrt=function(){var e,t,r,n,a,o,c,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(an+"NaN")}for(e=St(u),dt=!1,a=Math.sqrt(+u),a==0||a==1/0?(t=Fn(u.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=al((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=c=r+3;;)if(o=n,n=o.plus(yi(u,o,c+2)).times(.5),Fn(o.d).slice(0,c)===(t=Fn(n.d)).slice(0,c)){if(t=t.slice(c-3,c+1),a==c&&t=="4999"){if(tt(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;c+=4}return dt=!0,tt(n,r)};we.times=we.mul=function(e){var t,r,n,a,o,c,u,f,h,m=this,g=m.constructor,v=m.d,b=(e=new g(e)).d;if(!m.s||!e.s)return new g(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f<h&&(o=v,v=b,b=o,c=f,f=h,h=c),o=[],c=f+h,n=c;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,a=f+n;a>n;)u=o[a]+b[n]*v[a-n-1]+t,o[a--]=u%Rt|0,t=u/Rt|0;o[a]=(o[a]+t)%Rt|0}for(;!o[--c];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,dt?tt(e,g.precision):e};we.toDecimalPlaces=we.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(qn(e,0,il),t===void 0?t=n.rounding:qn(t,0,8),tt(r,e+St(r)+1,t))};we.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=So(n,!0):(qn(e,0,il),t===void 0?t=a.rounding:qn(t,0,8),n=tt(new a(n),e+1,t),r=So(n,!0,e+1)),r};we.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?So(a):(qn(e,0,il),t===void 0?t=o.rounding:qn(t,0,8),n=tt(new o(a),e+St(a)+1,t),r=So(n.abs(),!1,e+St(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};we.toInteger=we.toint=function(){var e=this,t=e.constructor;return tt(new t(e),St(e)+1,t.rounding)};we.toNumber=function(){return+this};we.toPower=we.pow=function(e){var t,r,n,a,o,c,u=this,f=u.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Fr);if(u=new f(u),!u.s){if(e.s<1)throw Error(an+"Infinity");return u}if(u.eq(Fr))return u;if(n=f.precision,e.eq(Fr))return tt(u,n);if(t=e.e,r=e.d.length-1,c=t>=r,o=u.s,c){if((r=m<0?-m:m)<=xA){for(a=new f(Fr),t=Math.ceil(n/lt+4),dt=!1;r%2&&(a=a.times(u),Pj(a.d,t)),r=al(r/2),r!==0;)u=u.times(u),Pj(u.d,t);return dt=!0,e.s<0?new f(Fr).div(a):tt(a,n)}}else if(o<0)throw Error(an+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,dt=!1,a=e.times(Tu(u,n+h)),dt=!0,a=wA(a),a.s=o,a};we.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=St(a),n=So(a,r<=o.toExpNeg||r>=o.toExpPos)):(qn(e,1,il),t===void 0?t=o.rounding:qn(t,0,8),a=tt(new o(a),e,t),r=St(a),n=So(a,e<=r||r<=o.toExpNeg,e)),n};we.toSignificantDigits=we.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(qn(e,1,il),t===void 0?t=n.rounding:qn(t,0,8)),tt(new n(r),e,t)};we.toString=we.valueOf=we.val=we.toJSON=we[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=St(e),r=e.constructor;return So(e,t<=r.toExpNeg||t>=r.toExpPos)};function bA(e,t){var r,n,a,o,c,u,f,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),dt?tt(t,g):t;if(f=e.d,h=t.d,c=e.e,a=t.e,f=f.slice(),o=c-a,o){for(o<0?(n=f,o=-o,u=h.length):(n=h,a=c,u=f.length),c=Math.ceil(g/lt),u=c>u?c+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=f.length,o=h.length,u-o<0&&(o=u,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Rt|0,f[o]%=Rt;for(r&&(f.unshift(r),++a),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=a,dt?tt(t,g):t}function qn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(go+e)}function Fn(e){var t,r,n,a=e.length-1,o="",c=e[0];if(a>0){for(o+=c,t=1;t<a;t++)n=e[t]+"",r=lt-n.length,r&&(o+=oa(r)),o+=n;c=e[t],n=c+"",r=lt-n.length,r&&(o+=oa(r))}else if(c===0)return"0";for(;c%10===0;)c/=10;return o+c}var yi=(function(){function e(n,a){var o,c=0,u=n.length;for(n=n.slice();u--;)o=n[u]*a+c,n[u]=o%Rt|0,c=o/Rt|0;return c&&n.unshift(c),n}function t(n,a,o,c){var u,f;if(o!=c)f=o>c?1:-1;else for(u=f=0;u<o;u++)if(n[u]!=a[u]){f=n[u]>a[u]?1:-1;break}return f}function r(n,a,o){for(var c=0;o--;)n[o]-=c,c=n[o]<a[o]?1:0,n[o]=c*Rt+n[o]-a[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,o,c){var u,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,D,U,B=n.constructor,F=n.s==a.s?1:-1,Y=n.d,H=a.d;if(!n.s)return new B(n);if(!a.s)throw Error(an+"Division by zero");for(f=n.e-a.e,D=H.length,_=Y.length,b=new B(F),j=b.d=[],h=0;H[h]==(Y[h]||0);)++h;if(H[h]>(Y[h]||0)&&--f,o==null?E=o=B.precision:c?E=o+(St(n)-St(a))+1:E=o,E<0)return new B(0);if(E=E/lt+2|0,h=0,D==1)for(m=0,H=H[0],E++;(h<_||m)&&E--;h++)A=m*Rt+(Y[h]||0),j[h]=A/H|0,m=A%H|0;else{for(m=Rt/(H[0]+1)|0,m>1&&(H=e(H,m),Y=e(Y,m),D=H.length,_=Y.length),P=D,k=Y.slice(0,D),S=k.length;S<D;)k[S++]=0;U=H.slice(),U.unshift(0),O=H[0],H[1]>=Rt/2&&++O;do m=0,u=t(H,k,D,S),u<0?(N=k[0],D!=S&&(N=N*Rt+(k[1]||0)),m=N/O|0,m>1?(m>=Rt&&(m=Rt-1),g=e(H,m),v=g.length,S=k.length,u=t(g,k,v,S),u==1&&(m--,r(g,D<v?U:H,v))):(m==0&&(u=m=1),g=H.slice()),v=g.length,v<S&&g.unshift(0),r(k,g,S),u==-1&&(S=k.length,u=t(H,k,D,S),u<1&&(m++,r(k,D<S?U:H,S))),S=k.length):u===0&&(m++,k=[0]),j[h++]=m,u&&k[0]?k[S++]=Y[P]||0:(k=[Y[P]],S=1);while((P++<_||k[0]!==void 0)&&E--)}return j[0]||j.shift(),b.e=f,tt(b,c?o+St(b)+1:o)}})();function wA(e,t){var r,n,a,o,c,u,f=0,h=0,m=e.constructor,g=m.precision;if(St(e)>16)throw Error(Zy+St(e));if(!e.s)return new m(Fr);for(dt=!1,u=g,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(n=Math.log(Ya(2,h))/Math.LN10*2+5|0,u+=n,r=a=o=new m(Fr),m.precision=u;;){if(a=tt(a.times(e),u),r=r.times(++f),c=o.plus(yi(a,r,u)),Fn(c.d).slice(0,u)===Fn(o.d).slice(0,u)){for(;h--;)o=tt(o.times(o),u);return m.precision=g,t==null?(dt=!0,tt(o,g)):o}o=c}}function St(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function Ag(e,t,r){if(t>e.LN10.sd())throw dt=!0,r&&(e.precision=r),Error(an+"LN10 precision limit exceeded");return tt(new e(e.LN10),t)}function oa(e){for(var t="";e--;)t+="0";return t}function Tu(e,t){var r,n,a,o,c,u,f,h,m,g=1,v=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(an+(b.s?"NaN":"-Infinity"));if(b.eq(Fr))return new k(0);if(t==null?(dt=!1,h=S):h=t,b.eq(10))return t==null&&(dt=!0),Ag(k,h);if(h+=v,k.precision=h,r=Fn(j),n=r.charAt(0),o=St(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Fn(b.d),n=r.charAt(0),g++;o=St(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=Ag(k,h+2,S).times(o+""),b=Tu(new k(n+"."+r.slice(1)),h-v).plus(f),k.precision=S,t==null?(dt=!0,tt(b,S)):b;for(u=c=b=yi(b.minus(Fr),b.plus(Fr),h),m=tt(b.times(b),h),a=3;;){if(c=tt(c.times(m),h),f=u.plus(yi(c,new k(a),h)),Fn(f.d).slice(0,h)===Fn(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus(Ag(k,h+2,S).times(o+""))),u=yi(u,new k(g),h),k.precision=S,t==null?(dt=!0,tt(u,S)):u;u=f,a+=2}}function Cj(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=al(r/lt),e.d=[],n=(r+1)%lt,r<0&&(n+=lt),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=lt;n<a;)e.d.push(+t.slice(n,n+=lt));t=t.slice(n),n=lt-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),dt&&(e.e>Lf||e.e<-Lf))throw Error(Zy+r)}else e.s=0,e.e=0,e.d=[0];return e}function tt(e,t,r){var n,a,o,c,u,f,h,m,g=e.d;for(c=1,o=g[0];o>=10;o/=10)c++;if(n=t-c,n<0)n+=lt,a=t,h=g[m=0];else{if(m=Math.ceil((n+1)/lt),o=g.length,m>=o)return e;for(h=o=g[m],c=1;o>=10;o/=10)c++;n%=lt,a=n-lt+c}if(r!==void 0&&(o=Ya(10,c-a-1),u=h/o%10|0,f=t<0||g[m+1]!==void 0||h%o,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?a>0?h/Ya(10,c-a):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=St(e),g.length=1,t=t-o-1,g[0]=Ya(10,(lt-t%lt)%lt),e.e=al(-t/lt)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=m,o=1,m--):(g.length=m+1,o=Ya(10,lt-n),g[m]=a>0?(h/Ya(10,c-a)%Ya(10,a)|0)*o:0),f)for(;;)if(m==0){(g[0]+=o)==Rt&&(g[0]=1,++e.e);break}else{if(g[m]+=o,g[m]!=Rt)break;g[m--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(dt&&(e.e>Lf||e.e<-Lf))throw Error(Zy+St(e));return e}function kA(e,t){var r,n,a,o,c,u,f,h,m,g,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),dt?tt(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),c=h-n,c){for(m=c<0,m?(r=f,c=-c,u=g.length):(r=g,n=h,u=f.length),a=Math.max(Math.ceil(b/lt),u)+2,c>a&&(c=a,r.length=1),r.reverse(),a=c;a--;)r.push(0);r.reverse()}else{for(a=f.length,u=g.length,m=a<u,m&&(u=a),a=0;a<u;a++)if(f[a]!=g[a]){m=f[a]<g[a];break}c=0}for(m&&(r=f,f=g,g=r,t.s=-t.s),u=f.length,a=g.length-u;a>0;--a)f[u++]=0;for(a=g.length;a>c;){if(f[--a]<g[a]){for(o=a;o&&f[--o]===0;)f[o]=Rt-1;--f[o],f[a]+=Rt}f[a]-=g[a]}for(;f[--u]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,dt?tt(t,b):t):new v(0)}function So(e,t,r){var n,a=St(e),o=Fn(e.d),c=o.length;return t?(r&&(n=r-c)>0?o=o.charAt(0)+"."+o.slice(1)+oa(n):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+oa(-a-1)+o,r&&(n=r-c)>0&&(o+=oa(n))):a>=c?(o+=oa(a+1-c),r&&(n=r-a-1)>0&&(o=o+"."+oa(n))):((n=a+1)<c&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-c)>0&&(a+1===c&&(o+="."),o+=oa(n))),e.s<0?"-"+o:o}function Pj(e,t){if(e.length>t)return e.length=t,!0}function jA(e){var t,r,n;function a(o){var c=this;if(!(c instanceof a))return new a(o);if(c.constructor=a,o instanceof a){c.s=o.s,c.e=o.e,c.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(go+o);if(o>0)c.s=1;else if(o<0)o=-o,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(o===~~o&&o<1e7){c.e=0,c.d=[o];return}return Cj(c,o.toString())}else if(typeof o!="string")throw Error(go+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,_F.test(o))Cj(c,o);else throw Error(go+o)}if(a.prototype=we,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=jA,a.config=a.set=MF,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 MF(e){if(!e||typeof e!="object")throw Error(an+"Object expected");var t,r,n,a=["precision",1,il,"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(al(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(go+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(go+r+": "+n);return this}var Jy=jA(OF);Fr=new Jy(1);const Ge=Jy;function SA(e){var t;return e===0?t=1:t=Math.floor(new Ge(e).abs().log(10).toNumber())+1,t}function NA(e,t,r){for(var n=new Ge(e),a=0,o=[];n.lt(t)&&a<1e5;)o.push(n.toNumber()),n=n.add(r),a++;return o}function Du(e,t){return RF(e)||DF(e,t)||TF(e,t)||IF()}function IF(){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 TF(e,t){if(e){if(typeof e=="string")return Oj(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)?Oj(e,t):void 0}}function Oj(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 DF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function RF(e){if(Array.isArray(e))return e}var EA=e=>{var t=Du(e,2),r=t[0],n=t[1],a=r,o=n;return r>n&&(a=n,o=r),[a,o]},e0=(e,t,r)=>{if(e.lte(0))return new Ge(0);var n=SA(e.toNumber()),a=new Ge(10).pow(n),o=e.div(a),c=n!==1?.05:.1,u=new Ge(Math.ceil(o.div(c).toNumber())).add(r).mul(c),f=u.mul(a);return t?new Ge(f.toNumber()):new Ge(Math.ceil(f.toNumber()))},AA=(e,t,r)=>{var n;if(e.lte(0))return new Ge(0);var a=[1,2,2.5,5],o=e.toNumber(),c=Math.floor(new Ge(o).abs().log(10).toNumber()),u=new Ge(10).pow(c),f=e.div(u).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(u=u.mul(10),h=0),h+=r,h>=a.length){var m=Math.floor(h/a.length);h%=a.length,u=u.mul(new Ge(10).pow(m))}var g=(n=a[h])!==null&&n!==void 0?n:1,v=new Ge(g).mul(u);return t?v:new Ge(Math.ceil(v.toNumber()))},LF=(e,t,r)=>{var n=new Ge(1),a=new Ge(e);if(!a.isint()&&r){var o=Math.abs(e);o<1?(n=new Ge(10).pow(SA(e)-1),a=new Ge(Math.floor(a.div(n).toNumber())).mul(n)):o>1&&(a=new Ge(Math.floor(e)))}else e===0?a=new Ge(Math.floor((t-1)/2)):r||(a=new Ge(Math.floor(e)));for(var c=Math.floor((t-1)/2),u=[],f=0;f<t;f++)u.push(a.add(new Ge(f-c).mul(n)).toNumber());return u},CA=function(t,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ge(0),tickMin:new Ge(0),tickMax:new Ge(0)};var u=c(new Ge(r).sub(t).div(n-1),a,o),f;t<=0&&r>=0?f=new Ge(0):(f=new Ge(t).add(r).div(2),f=f.sub(new Ge(f).mod(u)));var h=Math.ceil(f.sub(t).div(u).toNumber()),m=Math.ceil(new Ge(r).sub(f).div(u).toNumber()),g=h+m+1;return g>n?CA(t,r,n,a,o+1,c):(g<n&&(m=r>0?m+(n-g):m,h=r>0?h:h+(n-g)),{step:u,tickMin:f.sub(new Ge(h).mul(u)),tickMax:f.add(new Ge(m).mul(u))})},_j=function(t){var r=Du(t,2),n=r[0],a=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=EA([n,a]),m=Du(h,2),g=m[0],v=m[1];if(g===-1/0||v===1/0){var b=v===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>a?b.reverse():b}if(g===v)return LF(g,o,c);var j=u==="snap125"?AA:e0,k=CA(g,v,f,c,0,j),S=k.step,N=k.tickMin,E=k.tickMax,A=NA(N,E.add(new Ge(.1).mul(S)),S);return n>a?A.reverse():A},Mj=function(t,r){var n=Du(t,2),a=n[0],o=n[1],c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=EA([a,o]),h=Du(f,2),m=h[0],g=h[1];if(m===-1/0||g===1/0)return[a,o];if(m===g)return[m];var v=u==="snap125"?AA:e0,b=Math.max(r,2),j=v(new Ge(g).sub(m).div(b-1),c,0),k=[...NA(new Ge(m),new Ge(g),j),g];return c===!1&&(k=k.map(S=>Math.round(S))),a>o?k.reverse():k},$F=e=>e.rootProps.barCategoryGap,Uh=e=>e.rootProps.stackOffset,PA=e=>e.rootProps.reverseStackOrder,t0=e=>e.options.chartName,r0=e=>e.rootProps.syncId,OA=e=>e.rootProps.syncMethod,n0=e=>e.options.eventEmitter,zF=e=>e.rootProps.baseValue,pr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ua={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},In={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Hh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Wh(e,t,r){if(r!=="auto")return r;if(e!=null)return Xn(e,t)?"category":"number"}function Ij(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 $f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ij(Object(r),!0).forEach(function(n){FF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ij(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FF(e,t,r){return(t=BF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=UF(e,"string");return typeof t=="symbol"?t:t+""}function UF(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 Tj={allowDataOverflow:Ua.allowDataOverflow,allowDecimals:Ua.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Ua.angleAxisId,includeHidden:!1,name:void 0,reversed:Ua.reversed,scale:Ua.scale,tick:Ua.tick,tickCount:void 0,ticks:void 0,type:Ua.type,unit:void 0,niceTicks:"auto"},Dj={allowDataOverflow:In.allowDataOverflow,allowDecimals:In.allowDecimals,allowDuplicatedCategory:In.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:In.radiusAxisId,includeHidden:In.includeHidden,name:void 0,reversed:In.reversed,scale:In.scale,tick:In.tick,tickCount:In.tickCount,ticks:void 0,type:In.type,unit:void 0,niceTicks:"auto"},HF=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},i0=q([HF,eA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Wh(t,"angleAxis",Tj.type))!==null&&r!==void 0?r:"category";return $f($f({},Tj),{},{type:n})}),WF=(e,t)=>e.polarAxis.radiusAxis[t],a0=q([WF,eA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Wh(t,"radiusAxis",Dj.type))!==null&&r!==void 0?r:"category";return $f($f({},Dj),{},{type:n})}),Kh=e=>e.polarOptions,o0=q([Ei,Ai,Zt],cF),_A=q([Kh,o0],(e,t)=>{if(e!=null)return Sa(e.innerRadius,t,0)}),MA=q([Kh,o0],(e,t)=>{if(e!=null)return Sa(e.outerRadius,t,t*.8)}),KF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},IA=q([Kh],KF);q([i0,IA],Hh);var TA=q([o0,_A,MA],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});q([a0,TA],Hh);var DA=q([ft,Kh,_A,MA,Ei,Ai],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var c=t.cx,u=t.cy,f=t.startAngle,h=t.endAngle;return{cx:Sa(c,a,a/2),cy:Sa(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),zt=(e,t)=>t,Gh=(e,t,r)=>r;function s0(e){return e==null?void 0:e.id}function RA(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,c=r.dataKey,u=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:a;if(!(m==null||m.length===0)){var g=s0(f);m.forEach((v,b)=>{var j=c==null||o?b:String(Lt(v,c,null)),k=Lt(v,f.dataKey,0),S;u.has(j)?S=u.get(j):S={},Object.assign(S,{[g]:k}),u.set(j,S)})}}),Array.from(u.values())}function l0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Vh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function qh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function GF(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 Ft=e=>{var t=ft(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},ol=e=>e.tooltip.settings.axisId;function u0(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 c(){return o.apply(this,arguments)}return c.toString=function(){return o.toString()},c})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(o){var c=a[0],u=a[1];return c<=u?o>=c&&o<=u:o>=u&&o<=c},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,c)=>{var u=e(o);if(u!=null){if(e.bandwidth&&c!==null&&c!==void 0&&c.position){var f=e.bandwidth();switch(c.position){case"middle":u+=f/2;break;case"end":u+=f;break}}return u}}}}}var VF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Bn(t)){for(var r,n,a=0;a<t.length;a++){var o=t[a];We(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 wa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function c0(e){let t,r,n;e.length!==2?(t=wa,r=(u,f)=>wa(e(u),f),n=(u,f)=>e(u)-f):(t=e===wa||e===qF?e:QF,r=e,n=e);function a(u,f,h=0,m=u.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(u[g],f)<0?h=g+1:m=g}while(h<m)}return h}function o(u,f,h=0,m=u.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(u[g],f)<=0?h=g+1:m=g}while(h<m)}return h}function c(u,f,h=0,m=u.length){const g=a(u,f,h,m-1);return g>h&&n(u[g-1],f)>-n(u[g],f)?g-1:g}return{left:a,center:c,right:o}}function QF(){return 0}function LA(e){return e===null?NaN:+e}function*YF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const XF=c0(wa),ic=XF.right;c0(LA).center;class Rj extends Map{constructor(t,r=e9){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(Lj(this,t))}has(t){return super.has(Lj(this,t))}set(t,r){return super.set(ZF(this,t),r)}delete(t){return super.delete(JF(this,t))}}function Lj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function ZF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function JF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function e9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function t9(e=wa){if(e===wa)return $A;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 $A(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const r9=Math.sqrt(50),n9=Math.sqrt(10),i9=Math.sqrt(2);function zf(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),c=o>=r9?10:o>=n9?5:o>=i9?2:1;let u,f,h;return a<0?(h=Math.pow(10,-a)/c,u=Math.round(e*h),f=Math.round(t*h),u/h<e&&++u,f/h>t&&--f,h=-h):(h=Math.pow(10,a)*c,u=Math.round(e/h),f=Math.round(t/h),u*h<e&&++u,f*h>t&&--f),f<u&&.5<=r&&r<2?zf(e,t,r*2):[u,f,h]}function Xv(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,c]=n?zf(t,e,r):zf(e,t,r);if(!(o>=a))return[];const u=o-a+1,f=new Array(u);if(n)if(c<0)for(let h=0;h<u;++h)f[h]=(o-h)/-c;else for(let h=0;h<u;++h)f[h]=(o-h)*c;else if(c<0)for(let h=0;h<u;++h)f[h]=(a+h)/-c;else for(let h=0;h<u;++h)f[h]=(a+h)*c;return f}function Zv(e,t,r){return t=+t,e=+e,r=+r,zf(e,t,r)[2]}function Jv(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Zv(t,e,r):Zv(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function $j(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function zj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function zA(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?$A:t9(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),g=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+v)),j=Math.min(n,Math.floor(t+(f-h)*g/f+v));zA(e,t,b,j,a)}const o=e[t];let c=r,u=n;for(au(e,r,t),a(e[n],o)>0&&au(e,r,n);c<u;){for(au(e,c,u),++c,--u;a(e[c],o)<0;)++c;for(;a(e[u],o)>0;)--u}a(e[r],o)===0?au(e,r,u):(++u,au(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function au(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function a9(e,t,r){if(e=Float64Array.from(YF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return zj(e);if(t>=1)return $j(e);var n,a=(n-1)*t,o=Math.floor(a),c=$j(zA(e,o).subarray(0,o+1)),u=zj(e.subarray(o+1));return c+(u-c)*(a-o)}}function o9(e,t,r=LA){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),c=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return c+(u-c)*(a-o)}}function s9(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 sn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ci(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 ey=Symbol("implicit");function d0(){var e=new Rj,t=[],r=[],n=ey;function a(o){let c=e.get(o);if(c===void 0){if(n!==ey)return n;e.set(o,c=t.push(o)-1)}return r[c%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Rj;for(const c of o)e.has(c)||e.set(c,t.push(c)-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 d0(t,r).unknown(n)},sn.apply(a,arguments),a}function f0(){var e=d0().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,c,u=!1,f=0,h=0,m=.5;delete e.unknown;function g(){var v=t().length,b=a<n,j=b?a:n,k=b?n:a;o=(k-j)/Math.max(1,v-f+h*2),u&&(o=Math.floor(o)),j+=(k-j-o*(v-f))*m,c=o*(1-f),u&&(j=Math.round(j),c=Math.round(c));var S=s9(v).map(function(N){return j+o*N});return r(b?S.reverse():S)}return e.domain=function(v){return arguments.length?(t(v),g()):t()},e.range=function(v){return arguments.length?([n,a]=v,n=+n,a=+a,g()):[n,a]},e.rangeRound=function(v){return[n,a]=v,n=+n,a=+a,u=!0,g()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(v){return arguments.length?(u=!!v,g()):u},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),g()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),g()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,g()):h},e.align=function(v){return arguments.length?(m=Math.max(0,Math.min(1,v)),g()):m},e.copy=function(){return f0(t(),[n,a]).round(u).paddingInner(f).paddingOuter(h).align(m)},sn.apply(g(),arguments)}function FA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return FA(t())},e}function l9(){return FA(f0.apply(null,arguments).paddingInner(1))}function h0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function BA(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ac(){}var Ru=.7,Ff=1/Ru,Ns="\\s*([+-]?\\d+)\\s*",Lu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u9=/^#([0-9a-f]{3,8})$/,c9=new RegExp(`^rgb\\(${Ns},${Ns},${Ns}\\)$`),d9=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),f9=new RegExp(`^rgba\\(${Ns},${Ns},${Ns},${Lu}\\)$`),h9=new RegExp(`^rgba\\(${Un},${Un},${Un},${Lu}\\)$`),m9=new RegExp(`^hsl\\(${Lu},${Un},${Un}\\)$`),p9=new RegExp(`^hsla\\(${Lu},${Un},${Un},${Lu}\\)$`),Fj={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};h0(ac,$u,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bj,formatHex:Bj,formatHex8:g9,formatHsl:v9,formatRgb:Uj,toString:Uj});function Bj(){return this.rgb().formatHex()}function g9(){return this.rgb().formatHex8()}function v9(){return UA(this).formatHsl()}function Uj(){return this.rgb().formatRgb()}function $u(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=u9.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Hj(t):r===3?new Cr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Bd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Bd(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=c9.exec(e))?new Cr(t[1],t[2],t[3],1):(t=d9.exec(e))?new Cr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=f9.exec(e))?Bd(t[1],t[2],t[3],t[4]):(t=h9.exec(e))?Bd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=m9.exec(e))?Gj(t[1],t[2]/100,t[3]/100,1):(t=p9.exec(e))?Gj(t[1],t[2]/100,t[3]/100,t[4]):Fj.hasOwnProperty(e)?Hj(Fj[e]):e==="transparent"?new Cr(NaN,NaN,NaN,0):null}function Hj(e){return new Cr(e>>16&255,e>>8&255,e&255,1)}function Bd(e,t,r,n){return n<=0&&(e=t=r=NaN),new Cr(e,t,r,n)}function y9(e){return e instanceof ac||(e=$u(e)),e?(e=e.rgb(),new Cr(e.r,e.g,e.b,e.opacity)):new Cr}function ty(e,t,r,n){return arguments.length===1?y9(e):new Cr(e,t,r,n??1)}function Cr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}h0(Cr,ty,BA(ac,{brighter(e){return e=e==null?Ff:Math.pow(Ff,e),new Cr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ru:Math.pow(Ru,e),new Cr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cr(vo(this.r),vo(this.g),vo(this.b),Bf(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:Wj,formatHex:Wj,formatHex8:x9,formatRgb:Kj,toString:Kj}));function Wj(){return`#${to(this.r)}${to(this.g)}${to(this.b)}`}function x9(){return`#${to(this.r)}${to(this.g)}${to(this.b)}${to((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kj(){const e=Bf(this.opacity);return`${e===1?"rgb(":"rgba("}${vo(this.r)}, ${vo(this.g)}, ${vo(this.b)}${e===1?")":`, ${e})`}`}function Bf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function to(e){return e=vo(e),(e<16?"0":"")+e.toString(16)}function Gj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new bn(e,t,r,n)}function UA(e){if(e instanceof bn)return new bn(e.h,e.s,e.l,e.opacity);if(e instanceof ac||(e=$u(e)),!e)return new bn;if(e instanceof bn)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),c=NaN,u=o-a,f=(o+a)/2;return u?(t===o?c=(r-n)/u+(r<n)*6:r===o?c=(n-t)/u+2:c=(t-r)/u+4,u/=f<.5?o+a:2-o-a,c*=60):u=f>0&&f<1?0:c,new bn(c,u,f,e.opacity)}function b9(e,t,r,n){return arguments.length===1?UA(e):new bn(e,t,r,n??1)}function bn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}h0(bn,b9,BA(ac,{brighter(e){return e=e==null?Ff:Math.pow(Ff,e),new bn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ru:Math.pow(Ru,e),new bn(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 Cr(Cg(e>=240?e-240:e+120,a,n),Cg(e,a,n),Cg(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new bn(Vj(this.h),Ud(this.s),Ud(this.l),Bf(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=Bf(this.opacity);return`${e===1?"hsl(":"hsla("}${Vj(this.h)}, ${Ud(this.s)*100}%, ${Ud(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Vj(e){return e=(e||0)%360,e<0?e+360:e}function Ud(e){return Math.max(0,Math.min(1,e||0))}function Cg(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 m0=e=>()=>e;function w9(e,t){return function(r){return e+r*t}}function k9(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 j9(e){return(e=+e)==1?HA:function(t,r){return r-t?k9(t,r,e):m0(isNaN(t)?r:t)}}function HA(e,t){var r=t-e;return r?w9(e,r):m0(isNaN(e)?t:e)}const qj=(function e(t){var r=j9(t);function n(a,o){var c=r((a=ty(a)).r,(o=ty(o)).r),u=r(a.g,o.g),f=r(a.b,o.b),h=HA(a.opacity,o.opacity);return function(m){return a.r=c(m),a.g=u(m),a.b=f(m),a.opacity=h(m),a+""}}return n.gamma=e,n})(1);function S9(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 N9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function E9(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),c;for(c=0;c<n;++c)a[c]=sl(e[c],t[c]);for(;c<r;++c)o[c]=t[c];return function(u){for(c=0;c<n;++c)o[c]=a[c](u);return o}}function A9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Uf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function C9(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]=sl(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var ry=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pg=new RegExp(ry.source,"g");function P9(e){return function(){return e}}function O9(e){return function(t){return e(t)+""}}function _9(e,t){var r=ry.lastIndex=Pg.lastIndex=0,n,a,o,c=-1,u=[],f=[];for(e=e+"",t=t+"";(n=ry.exec(e))&&(a=Pg.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),u[c]?u[c]+=o:u[++c]=o),(n=n[0])===(a=a[0])?u[c]?u[c]+=a:u[++c]=a:(u[++c]=null,f.push({i:c,x:Uf(n,a)})),r=Pg.lastIndex;return r<t.length&&(o=t.slice(r),u[c]?u[c]+=o:u[++c]=o),u.length<2?f[0]?O9(f[0].x):P9(t):(t=f.length,function(h){for(var m=0,g;m<t;++m)u[(g=f[m]).i]=g.x(h);return u.join("")})}function sl(e,t){var r=typeof t,n;return t==null||r==="boolean"?m0(t):(r==="number"?Uf:r==="string"?(n=$u(t))?(t=n,qj):_9:t instanceof $u?qj:t instanceof Date?A9:N9(t)?S9:Array.isArray(t)?E9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?C9:Uf)(e,t)}function p0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function M9(e,t){t===void 0&&(t=e,e=sl);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(c){var u=Math.max(0,Math.min(n-1,Math.floor(c*=n)));return o[u](c-u)}}function I9(e){return function(){return e}}function Hf(e){return+e}var Qj=[0,1];function gr(e){return e}function ny(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:I9(isNaN(t)?NaN:.5)}function T9(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function D9(e,t,r){var n=e[0],a=e[1],o=t[0],c=t[1];return a<n?(n=ny(a,n),o=r(c,o)):(n=ny(n,a),o=r(o,c)),function(u){return o(n(u))}}function R9(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),c=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++c<n;)a[c]=ny(e[c],e[c+1]),o[c]=r(t[c],t[c+1]);return function(u){var f=ic(e,u,1,n)-1;return o[f](a[f](u))}}function oc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Qh(){var e=Qj,t=Qj,r=sl,n,a,o,c=gr,u,f,h;function m(){var v=Math.min(e.length,t.length);return c!==gr&&(c=T9(e[0],e[v-1])),u=v>2?R9:D9,f=h=null,g}function g(v){return v==null||isNaN(v=+v)?o:(f||(f=u(e.map(n),t,r)))(n(c(v)))}return g.invert=function(v){return c(a((h||(h=u(t,e.map(n),Uf)))(v)))},g.domain=function(v){return arguments.length?(e=Array.from(v,Hf),m()):e.slice()},g.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},g.rangeRound=function(v){return t=Array.from(v),r=p0,m()},g.clamp=function(v){return arguments.length?(c=v?!0:gr,m()):c!==gr},g.interpolate=function(v){return arguments.length?(r=v,m()):r},g.unknown=function(v){return arguments.length?(o=v,g):o},function(v,b){return n=v,a=b,m()}}function g0(){return Qh()(gr,gr)}function L9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wf(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 qs(e){return e=Wf(Math.abs(e)),e?e[1]:NaN}function $9(e,t){return function(r,n){for(var a=r.length,o=[],c=0,u=e[0],f=0;a>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),o.push(r.substring(a-=u,a+u)),!((f+=u+1)>n));)u=e[c=(c+1)%e.length];return o.reverse().join(t)}}function z9(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var F9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function zu(e){if(!(t=F9.exec(e)))throw new Error("invalid format: "+e);var t;return new v0({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]})}zu.prototype=v0.prototype;function v0(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+""}v0.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 B9(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 Kf;function U9(e,t){var r=Wf(e,t);if(!r)return Kf=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-(Kf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,c=n.length;return o===c?n:o>c?n+new Array(o-c+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Wf(e,Math.max(0,t+o-1))[0]}function Yj(e,t){var r=Wf(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 Xj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:L9,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)=>Yj(e*100,t),r:Yj,s:U9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Zj(e){return e}var Jj=Array.prototype.map,eS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function H9(e){var t=e.grouping===void 0||e.thousands===void 0?Zj:$9(Jj.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?Zj:z9(Jj.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,v){g=zu(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,E=g.width,A=g.comma,P=g.precision,_=g.trim,O=g.type;O==="n"?(A=!0,O="g"):Xj[O]||(P===void 0&&(P=12),_=!0,O="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var D=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),U=(S==="$"?n:/[%p]/.test(O)?c:"")+(v&&v.suffix!==void 0?v.suffix:""),B=Xj[O],F=/[defgprs%]/.test(O);P=P===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Y(H){var pe=D,ue=U,he,ae,se;if(O==="c")ue=B(H)+ue,H="";else{H=+H;var X=H<0||1/H<0;if(H=isNaN(H)?f:B(Math.abs(H),P),_&&(H=B9(H)),X&&+H==0&&k!=="+"&&(X=!1),pe=(X?k==="("?k:u:k==="-"||k==="("?"":k)+pe,ue=(O==="s"&&!isNaN(H)&&Kf!==void 0?eS[8+Kf/3]:"")+ue+(X&&k==="("?")":""),F){for(he=-1,ae=H.length;++he<ae;)if(se=H.charCodeAt(he),48>se||se>57){ue=(se===46?a+H.slice(he+1):H.slice(he))+ue,H=H.slice(0,he);break}}}A&&!N&&(H=t(H,1/0));var te=pe.length+H.length+ue.length,J=te<E?new Array(E-te+1).join(b):"";switch(A&&N&&(H=t(J+H,J.length?E-ue.length:1/0),J=""),j){case"<":H=pe+H+ue+J;break;case"=":H=pe+J+H+ue;break;case"^":H=J.slice(0,te=J.length>>1)+pe+H+ue+J.slice(te);break;default:H=J+pe+H+ue;break}return o(H)}return Y.toString=function(){return g+""},Y}function m(g,v){var b=Math.max(-8,Math.min(8,Math.floor(qs(v)/3)))*3,j=Math.pow(10,-b),k=h((g=zu(g),g.type="f",g),{suffix:eS[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:m}}var Hd,y0,WA;W9({thousands:",",grouping:[3],currency:["$",""]});function W9(e){return Hd=H9(e),y0=Hd.format,WA=Hd.formatPrefix,Hd}function K9(e){return Math.max(0,-qs(Math.abs(e)))}function G9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qs(t)/3)))*3-qs(Math.abs(e)))}function V9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qs(t)-qs(e))+1}function KA(e,t,r,n){var a=Jv(e,t,r),o;switch(n=zu(n??",f"),n.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=G9(a,c))&&(n.precision=o),WA(n,c)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=V9(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=K9(a))&&(n.precision=o-(n.type==="%")*2);break}}return y0(n)}function Na(e){var t=e.domain;return e.ticks=function(r){var n=t();return Xv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return KA(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,c=n[a],u=n[o],f,h,m=10;for(u<c&&(h=c,c=u,u=h,h=a,a=o,o=h);m-- >0;){if(h=Zv(c,u,r),h===f)return n[a]=c,n[o]=u,t(n);if(h>0)c=Math.floor(c/h)*h,u=Math.ceil(u/h)*h;else if(h<0)c=Math.ceil(c*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function GA(){var e=g0();return e.copy=function(){return oc(e,GA())},sn.apply(e,arguments),Na(e)}function VA(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,Hf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return VA(e).unknown(t)},e=arguments.length?Array.from(e,Hf):[0,1],Na(r)}function qA(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],c;return o<a&&(c=r,r=n,n=c,c=a,a=o,o=c),e[r]=t.floor(a),e[n]=t.ceil(o),e}function tS(e){return Math.log(e)}function rS(e){return Math.exp(e)}function q9(e){return-Math.log(-e)}function Q9(e){return-Math.exp(-e)}function Y9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function X9(e){return e===10?Y9:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Z9(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 nS(e){return(t,r)=>-e(-t,r)}function x0(e){const t=e(tS,rS),r=t.domain;let n=10,a,o;function c(){return a=Z9(n),o=X9(n),r()[0]<0?(a=nS(a),o=nS(o),e(q9,Q9)):e(tS,rS),t}return t.base=function(u){return arguments.length?(n=+u,c()):n},t.domain=function(u){return arguments.length?(r(u),c()):r()},t.ticks=u=>{const f=r();let h=f[0],m=f[f.length-1];const g=m<h;g&&([h,m]=[m,h]);let v=a(h),b=a(m),j,k;const S=u==null?10:+u;let N=[];if(!(n%1)&&b-v<S){if(v=Math.floor(v),b=Math.ceil(b),h>0){for(;v<=b;++v)for(j=1;j<n;++j)if(k=v<0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}}else for(;v<=b;++v)for(j=n-1;j>=1;--j)if(k=v>0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}N.length*2<S&&(N=Xv(h,m,S))}else N=Xv(v,b,Math.min(b-v,S)).map(o);return g?N.reverse():N},t.tickFormat=(u,f)=>{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=zu(f)).precision==null&&(f.trim=!0),f=y0(f)),u===1/0)return f;const h=Math.max(1,n*u/t.ticks().length);return m=>{let g=m/o(Math.round(a(m)));return g*n<n-.5&&(g*=n),g<=h?f(m):""}},t.nice=()=>r(qA(r(),{floor:u=>o(Math.floor(a(u))),ceil:u=>o(Math.ceil(a(u)))})),t}function QA(){const e=x0(Qh()).domain([1,10]);return e.copy=()=>oc(e,QA()).base(e.base()),sn.apply(e,arguments),e}function iS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function b0(e){var t=1,r=e(iS(t),aS(t));return r.constant=function(n){return arguments.length?e(iS(t=+n),aS(t)):t},Na(r)}function YA(){var e=b0(Qh());return e.copy=function(){return oc(e,YA()).constant(e.constant())},sn.apply(e,arguments)}function oS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function J9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function e7(e){return e<0?-e*e:e*e}function w0(e){var t=e(gr,gr),r=1;function n(){return r===1?e(gr,gr):r===.5?e(J9,e7):e(oS(r),oS(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Na(t)}function k0(){var e=w0(Qh());return e.copy=function(){return oc(e,k0()).exponent(e.exponent())},sn.apply(e,arguments),e}function t7(){return k0.apply(null,arguments).exponent(.5)}function sS(e){return Math.sign(e)*e*e}function r7(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function XA(){var e=g0(),t=[0,1],r=!1,n;function a(o){var c=r7(e(o));return isNaN(c)?n:r?Math.round(c):c}return a.invert=function(o){return e.invert(sS(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,Hf)).map(sS)),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 XA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sn.apply(a,arguments),Na(a)}function ZA(){var e=[],t=[],r=[],n;function a(){var c=0,u=Math.max(1,t.length);for(r=new Array(u-1);++c<u;)r[c-1]=o9(e,c/u);return o}function o(c){return c==null||isNaN(c=+c)?n:t[ic(r,c)]}return o.invertExtent=function(c){var u=t.indexOf(c);return u<0?[NaN,NaN]:[u>0?r[u-1]:e[0],u<r.length?r[u]:e[e.length-1]]},o.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let u of c)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(wa),a()},o.range=function(c){return arguments.length?(t=Array.from(c),a()):t.slice()},o.unknown=function(c){return arguments.length?(n=c,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return ZA().domain(e).range(t).unknown(n)},sn.apply(o,arguments)}function JA(){var e=0,t=1,r=1,n=[.5],a=[0,1],o;function c(f){return f!=null&&f<=f?a[ic(n,f,0,r)]:o}function u(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return c}return c.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,u()):[e,t]},c.range=function(f){return arguments.length?(r=(a=Array.from(f)).length-1,u()):a.slice()},c.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]]},c.unknown=function(f){return arguments.length&&(o=f),c},c.thresholds=function(){return n.slice()},c.copy=function(){return JA().domain([e,t]).range(a).unknown(o)},sn.apply(Na(c),arguments)}function eC(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[ic(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 c=t.indexOf(o);return[e[c-1],e[c]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return eC().domain(e).range(t).unknown(r)},sn.apply(a,arguments)}const Og=new Date,_g=new Date;function Ot(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 c=a(o),u=a.ceil(o);return o-c<u-o?c:u},a.offset=(o,c)=>(t(o=new Date(+o),c==null?1:Math.floor(c)),o),a.range=(o,c,u)=>{const f=[];if(o=a.ceil(o),u=u==null?1:Math.floor(u),!(o<c)||!(u>0))return f;let h;do f.push(h=new Date(+o)),t(o,u),e(o);while(h<o&&o<c);return f},a.filter=o=>Ot(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,u)=>{if(c>=c)if(u<0)for(;++u<=0;)for(;t(c,-1),!o(c););else for(;--u>=0;)for(;t(c,1),!o(c););}),r&&(a.count=(o,c)=>(Og.setTime(+o),_g.setTime(+c),e(Og),e(_g),Math.floor(r(Og,_g))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?c=>n(c)%o===0:c=>a.count(0,c)%o===0):a)),a}const Gf=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Gf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Gf);Gf.range;const pi=1e3,tn=pi*60,gi=tn*60,ki=gi*24,j0=ki*7,lS=ki*30,Mg=ki*365,ro=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*pi)},(e,t)=>(t-e)/pi,e=>e.getUTCSeconds());ro.range;const S0=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pi)},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getMinutes());S0.range;const N0=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getUTCMinutes());N0.range;const E0=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pi-e.getMinutes()*tn)},(e,t)=>{e.setTime(+e+t*gi)},(e,t)=>(t-e)/gi,e=>e.getHours());E0.range;const A0=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*gi)},(e,t)=>(t-e)/gi,e=>e.getUTCHours());A0.range;const sc=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*tn)/ki,e=>e.getDate()-1);sc.range;const Yh=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ki,e=>e.getUTCDate()-1);Yh.range;const tC=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ki,e=>Math.floor(e/ki));tC.range;function _o(e){return Ot(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())*tn)/j0)}const Xh=_o(0),Vf=_o(1),n7=_o(2),i7=_o(3),Qs=_o(4),a7=_o(5),o7=_o(6);Xh.range;Vf.range;n7.range;i7.range;Qs.range;a7.range;o7.range;function Mo(e){return Ot(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)/j0)}const Zh=Mo(0),qf=Mo(1),s7=Mo(2),l7=Mo(3),Ys=Mo(4),u7=Mo(5),c7=Mo(6);Zh.range;qf.range;s7.range;l7.range;Ys.range;u7.range;c7.range;const C0=Ot(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());C0.range;const P0=Ot(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());P0.range;const ji=Ot(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());ji.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(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)});ji.range;const Si=Ot(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());Si.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(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)});Si.range;function rC(e,t,r,n,a,o){const c=[[ro,1,pi],[ro,5,5*pi],[ro,15,15*pi],[ro,30,30*pi],[o,1,tn],[o,5,5*tn],[o,15,15*tn],[o,30,30*tn],[a,1,gi],[a,3,3*gi],[a,6,6*gi],[a,12,12*gi],[n,1,ki],[n,2,2*ki],[r,1,j0],[t,1,lS],[t,3,3*lS],[e,1,Mg]];function u(h,m,g){const v=m<h;v&&([h,m]=[m,h]);const b=g&&typeof g.range=="function"?g:f(h,m,g),j=b?b.range(h,+m+1):[];return v?j.reverse():j}function f(h,m,g){const v=Math.abs(m-h)/g,b=c0(([,,S])=>S).right(c,v);if(b===c.length)return e.every(Jv(h/Mg,m/Mg,g));if(b===0)return Gf.every(Math.max(Jv(h,m,g),1));const[j,k]=c[v/c[b-1][2]<c[b][2]/v?b-1:b];return j.every(k)}return[u,f]}const[d7,f7]=rC(Si,P0,Zh,tC,A0,N0),[h7,m7]=rC(ji,C0,Xh,sc,E0,S0);function Ig(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 Tg(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 ou(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function p7(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,c=e.shortDays,u=e.months,f=e.shortMonths,h=su(a),m=lu(a),g=su(o),v=lu(o),b=su(c),j=lu(c),k=su(u),S=lu(u),N=su(f),E=lu(f),A={a:se,A:X,b:te,B:J,c:null,d:mS,e:mS,f:$7,g:q7,G:Y7,H:D7,I:R7,j:L7,L:nC,m:z7,M:F7,p:I,q:M,Q:vS,s:yS,S:B7,u:U7,U:H7,V:W7,w:K7,W:G7,x:null,X:null,y:V7,Y:Q7,Z:X7,"%":gS},P={a:K,A:ne,b:Z,B:me,c:null,d:pS,e:pS,f:tB,g:dB,G:hB,H:Z7,I:J7,j:eB,L:aC,m:rB,M:nB,p:ge,q:Pe,Q:vS,s:yS,S:iB,u:aB,U:oB,V:sB,w:lB,W:uB,x:null,X:null,y:cB,Y:fB,Z:mB,"%":gS},_={a:F,A:Y,b:H,B:pe,c:ue,d:fS,e:fS,f:_7,g:dS,G:cS,H:hS,I:hS,j:A7,L:O7,m:E7,M:C7,p:B,q:N7,Q:I7,s:T7,S:P7,u:b7,U:w7,V:k7,w:x7,W:j7,x:he,X:ae,y:dS,Y:cS,Z:S7,"%":M7};A.x=O(r,A),A.X=O(n,A),A.c=O(t,A),P.x=O(r,P),P.X=O(n,P),P.c=O(t,P);function O(re,xe){return function(_e){var ie=[],Je=-1,Fe=0,Oe=re.length,ut,Jt,W;for(_e instanceof Date||(_e=new Date(+_e));++Je<Oe;)re.charCodeAt(Je)===37&&(ie.push(re.slice(Fe,Je)),(Jt=uS[ut=re.charAt(++Je)])!=null?ut=re.charAt(++Je):Jt=ut==="e"?" ":"0",(W=xe[ut])&&(ut=W(_e,Jt)),ie.push(ut),Fe=Je+1);return ie.push(re.slice(Fe,Je)),ie.join("")}}function D(re,xe){return function(_e){var ie=ou(1900,void 0,1),Je=U(ie,re,_e+="",0),Fe,Oe;if(Je!=_e.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(xe&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(Fe=Tg(ou(ie.y,0,1)),Oe=Fe.getUTCDay(),Fe=Oe>4||Oe===0?qf.ceil(Fe):qf(Fe),Fe=Yh.offset(Fe,(ie.V-1)*7),ie.y=Fe.getUTCFullYear(),ie.m=Fe.getUTCMonth(),ie.d=Fe.getUTCDate()+(ie.w+6)%7):(Fe=Ig(ou(ie.y,0,1)),Oe=Fe.getDay(),Fe=Oe>4||Oe===0?Vf.ceil(Fe):Vf(Fe),Fe=sc.offset(Fe,(ie.V-1)*7),ie.y=Fe.getFullYear(),ie.m=Fe.getMonth(),ie.d=Fe.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),Oe="Z"in ie?Tg(ou(ie.y,0,1)).getUTCDay():Ig(ou(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(Oe+5)%7:ie.w+ie.U*7-(Oe+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,Tg(ie)):Ig(ie)}}function U(re,xe,_e,ie){for(var Je=0,Fe=xe.length,Oe=_e.length,ut,Jt;Je<Fe;){if(ie>=Oe)return-1;if(ut=xe.charCodeAt(Je++),ut===37){if(ut=xe.charAt(Je++),Jt=_[ut in uS?xe.charAt(Je++):ut],!Jt||(ie=Jt(re,_e,ie))<0)return-1}else if(ut!=_e.charCodeAt(ie++))return-1}return ie}function B(re,xe,_e){var ie=h.exec(xe.slice(_e));return ie?(re.p=m.get(ie[0].toLowerCase()),_e+ie[0].length):-1}function F(re,xe,_e){var ie=b.exec(xe.slice(_e));return ie?(re.w=j.get(ie[0].toLowerCase()),_e+ie[0].length):-1}function Y(re,xe,_e){var ie=g.exec(xe.slice(_e));return ie?(re.w=v.get(ie[0].toLowerCase()),_e+ie[0].length):-1}function H(re,xe,_e){var ie=N.exec(xe.slice(_e));return ie?(re.m=E.get(ie[0].toLowerCase()),_e+ie[0].length):-1}function pe(re,xe,_e){var ie=k.exec(xe.slice(_e));return ie?(re.m=S.get(ie[0].toLowerCase()),_e+ie[0].length):-1}function ue(re,xe,_e){return U(re,t,xe,_e)}function he(re,xe,_e){return U(re,r,xe,_e)}function ae(re,xe,_e){return U(re,n,xe,_e)}function se(re){return c[re.getDay()]}function X(re){return o[re.getDay()]}function te(re){return f[re.getMonth()]}function J(re){return u[re.getMonth()]}function I(re){return a[+(re.getHours()>=12)]}function M(re){return 1+~~(re.getMonth()/3)}function K(re){return c[re.getUTCDay()]}function ne(re){return o[re.getUTCDay()]}function Z(re){return f[re.getUTCMonth()]}function me(re){return u[re.getUTCMonth()]}function ge(re){return a[+(re.getUTCHours()>=12)]}function Pe(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var xe=O(re+="",A);return xe.toString=function(){return re},xe},parse:function(re){var xe=D(re+="",!1);return xe.toString=function(){return re},xe},utcFormat:function(re){var xe=O(re+="",P);return xe.toString=function(){return re},xe},utcParse:function(re){var xe=D(re+="",!0);return xe.toString=function(){return re},xe}}}var uS={"-":"",_:" ",0:"0"},Bt=/^\s*\d+/,g7=/^%/,v7=/[\\^$*+?|[\]().{}]/g;function Ye(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 y7(e){return e.replace(v7,"\\$&")}function su(e){return new RegExp("^(?:"+e.map(y7).join("|")+")","i")}function lu(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function x7(e,t,r){var n=Bt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function b7(e,t,r){var n=Bt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function w7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function k7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function j7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function cS(e,t,r){var n=Bt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function dS(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function S7(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 N7(e,t,r){var n=Bt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function E7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function fS(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function A7(e,t,r){var n=Bt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function hS(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function C7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function P7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function O7(e,t,r){var n=Bt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function _7(e,t,r){var n=Bt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function M7(e,t,r){var n=g7.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function I7(e,t,r){var n=Bt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function T7(e,t,r){var n=Bt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function mS(e,t){return Ye(e.getDate(),t,2)}function D7(e,t){return Ye(e.getHours(),t,2)}function R7(e,t){return Ye(e.getHours()%12||12,t,2)}function L7(e,t){return Ye(1+sc.count(ji(e),e),t,3)}function nC(e,t){return Ye(e.getMilliseconds(),t,3)}function $7(e,t){return nC(e,t)+"000"}function z7(e,t){return Ye(e.getMonth()+1,t,2)}function F7(e,t){return Ye(e.getMinutes(),t,2)}function B7(e,t){return Ye(e.getSeconds(),t,2)}function U7(e){var t=e.getDay();return t===0?7:t}function H7(e,t){return Ye(Xh.count(ji(e)-1,e),t,2)}function iC(e){var t=e.getDay();return t>=4||t===0?Qs(e):Qs.ceil(e)}function W7(e,t){return e=iC(e),Ye(Qs.count(ji(e),e)+(ji(e).getDay()===4),t,2)}function K7(e){return e.getDay()}function G7(e,t){return Ye(Vf.count(ji(e)-1,e),t,2)}function V7(e,t){return Ye(e.getFullYear()%100,t,2)}function q7(e,t){return e=iC(e),Ye(e.getFullYear()%100,t,2)}function Q7(e,t){return Ye(e.getFullYear()%1e4,t,4)}function Y7(e,t){var r=e.getDay();return e=r>=4||r===0?Qs(e):Qs.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function X7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function pS(e,t){return Ye(e.getUTCDate(),t,2)}function Z7(e,t){return Ye(e.getUTCHours(),t,2)}function J7(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function eB(e,t){return Ye(1+Yh.count(Si(e),e),t,3)}function aC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function tB(e,t){return aC(e,t)+"000"}function rB(e,t){return Ye(e.getUTCMonth()+1,t,2)}function nB(e,t){return Ye(e.getUTCMinutes(),t,2)}function iB(e,t){return Ye(e.getUTCSeconds(),t,2)}function aB(e){var t=e.getUTCDay();return t===0?7:t}function oB(e,t){return Ye(Zh.count(Si(e)-1,e),t,2)}function oC(e){var t=e.getUTCDay();return t>=4||t===0?Ys(e):Ys.ceil(e)}function sB(e,t){return e=oC(e),Ye(Ys.count(Si(e),e)+(Si(e).getUTCDay()===4),t,2)}function lB(e){return e.getUTCDay()}function uB(e,t){return Ye(qf.count(Si(e)-1,e),t,2)}function cB(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function dB(e,t){return e=oC(e),Ye(e.getUTCFullYear()%100,t,2)}function fB(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function hB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ys(e):Ys.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function mB(){return"+0000"}function gS(){return"%"}function vS(e){return+e}function yS(e){return Math.floor(+e/1e3)}var cs,sC,lC;pB({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 pB(e){return cs=p7(e),sC=cs.format,cs.parse,lC=cs.utcFormat,cs.utcParse,cs}function gB(e){return new Date(e)}function vB(e){return e instanceof Date?+e:+new Date(+e)}function O0(e,t,r,n,a,o,c,u,f,h){var m=g0(),g=m.invert,v=m.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),A=h("%B"),P=h("%Y");function _(O){return(f(O)<O?b:u(O)<O?j:c(O)<O?k:o(O)<O?S:n(O)<O?a(O)<O?N:E:r(O)<O?A:P)(O)}return m.invert=function(O){return new Date(g(O))},m.domain=function(O){return arguments.length?v(Array.from(O,vB)):v().map(gB)},m.ticks=function(O){var D=v();return e(D[0],D[D.length-1],O??10)},m.tickFormat=function(O,D){return D==null?_:h(D)},m.nice=function(O){var D=v();return(!O||typeof O.range!="function")&&(O=t(D[0],D[D.length-1],O??10)),O?v(qA(D,O)):m},m.copy=function(){return oc(m,O0(e,t,r,n,a,o,c,u,f,h))},m}function yB(){return sn.apply(O0(h7,m7,ji,C0,Xh,sc,E0,S0,ro,sC).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xB(){return sn.apply(O0(d7,f7,Si,P0,Zh,Yh,A0,N0,ro,lC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Jh(){var e=0,t=1,r,n,a,o,c=gr,u=!1,f;function h(g){return g==null||isNaN(g=+g)?f:c(a===0?.5:(g=(o(g)-r)*a,u?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t]=g,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(g){return arguments.length?(u=!!g,h):u},h.interpolator=function(g){return arguments.length?(c=g,h):c};function m(g){return function(v){var b,j;return arguments.length?([b,j]=v,c=g(b,j),h):[c(0),c(1)]}}return h.range=m(sl),h.rangeRound=m(p0),h.unknown=function(g){return arguments.length?(f=g,h):f},function(g){return o=g,r=g(e),n=g(t),a=r===n?0:1/(n-r),h}}function Ea(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function uC(){var e=Na(Jh()(gr));return e.copy=function(){return Ea(e,uC())},Ci.apply(e,arguments)}function cC(){var e=x0(Jh()).domain([1,10]);return e.copy=function(){return Ea(e,cC()).base(e.base())},Ci.apply(e,arguments)}function dC(){var e=b0(Jh());return e.copy=function(){return Ea(e,dC()).constant(e.constant())},Ci.apply(e,arguments)}function _0(){var e=w0(Jh());return e.copy=function(){return Ea(e,_0()).exponent(e.exponent())},Ci.apply(e,arguments)}function bB(){return _0.apply(null,arguments).exponent(.5)}function fC(){var e=[],t=gr;function r(n){if(n!=null&&!isNaN(n=+n))return t((ic(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(wa),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)=>a9(e,o/n))},r.copy=function(){return fC(t).domain(e)},Ci.apply(r,arguments)}function em(){var e=0,t=.5,r=1,n=1,a,o,c,u,f,h=gr,m,g=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+m(k))-o)*(n*k<n*o?u:f),h(g?Math.max(0,Math.min(1,k)):k))}b.domain=function(k){return arguments.length?([e,t,r]=k,a=m(e=+e),o=m(t=+t),c=m(r=+r),u=a===o?0:.5/(o-a),f=o===c?0:.5/(c-o),n=o<a?-1:1,b):[e,t,r]},b.clamp=function(k){return arguments.length?(g=!!k,b):g},b.interpolator=function(k){return arguments.length?(h=k,b):h};function j(k){return function(S){var N,E,A;return arguments.length?([N,E,A]=S,h=M9(k,[N,E,A]),b):[h(0),h(.5),h(1)]}}return b.range=j(sl),b.rangeRound=j(p0),b.unknown=function(k){return arguments.length?(v=k,b):v},function(k){return m=k,a=k(e),o=k(t),c=k(r),u=a===o?0:.5/(o-a),f=o===c?0:.5/(c-o),n=o<a?-1:1,b}}function hC(){var e=Na(em()(gr));return e.copy=function(){return Ea(e,hC())},Ci.apply(e,arguments)}function mC(){var e=x0(em()).domain([.1,1,10]);return e.copy=function(){return Ea(e,mC()).base(e.base())},Ci.apply(e,arguments)}function pC(){var e=b0(em());return e.copy=function(){return Ea(e,pC()).constant(e.constant())},Ci.apply(e,arguments)}function M0(){var e=w0(em());return e.copy=function(){return Ea(e,M0()).exponent(e.exponent())},Ci.apply(e,arguments)}function wB(){return M0.apply(null,arguments).exponent(.5)}const gC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:f0,scaleDiverging:hC,scaleDivergingLog:mC,scaleDivergingPow:M0,scaleDivergingSqrt:wB,scaleDivergingSymlog:pC,scaleIdentity:VA,scaleImplicit:ey,scaleLinear:GA,scaleLog:QA,scaleOrdinal:d0,scalePoint:l9,scalePow:k0,scaleQuantile:ZA,scaleQuantize:JA,scaleRadial:XA,scaleSequential:uC,scaleSequentialLog:cC,scaleSequentialPow:_0,scaleSequentialQuantile:fC,scaleSequentialSqrt:bB,scaleSequentialSymlog:dC,scaleSqrt:t7,scaleSymlog:YA,scaleThreshold:eC,scaleTime:yB,scaleUtc:xB,tickFormat:KA},Symbol.toStringTag,{value:"Module"}));function kB(e){var t=gC;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Dy(e));if(r in t&&typeof t[r]=="function")return t[r]()}function xS(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=kB(e);if(n!=null)return n.domain(t).range(r),n}}function I0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?xS(e.scale,r,n):xS(t,r,n)}function jB(e){return"scale".concat(Dy(e))}function SB(e){return jB(e)in gC}var vC=(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 SB(n)?n:"point"}};function NB(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 yC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var c;return(c=e(o))!==null&&c!==void 0?c:0}),a=e.range();if(!(r.length===0||a.length<2))return o=>{var c,u,f=NB(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(c=n[f-1])!==null&&c!==void 0?c:0,m=(u=n[f])!==null&&u!==void 0?u:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function EB(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):yC(e,void 0)}function bS(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 Qf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bS(Object(r),!0).forEach(function(n){AB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AB(e,t,r){return(t=CB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CB(e){var t=PB(e,"string");return typeof t=="symbol"?t:t+""}function PB(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 xC(e,t){return IB(e)||MB(e,t)||_B(e,t)||OB()}function OB(){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 _B(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 MB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function IB(e){if(Array.isArray(e))return e}var iy=[0,"auto"],Ct={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"},bC=(e,t)=>e.cartesianAxis.xAxis[t],Pi=(e,t)=>{var r=bC(e,t);return r??Ct},Pt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:iy,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:Ju},wC=(e,t)=>e.cartesianAxis.yAxis[t],Oi=(e,t)=>{var r=wC(e,t);return r??Pt},TB={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:""},T0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??TB},yr=(e,t,r)=>{switch(t){case"xAxis":return Pi(e,r);case"yAxis":return Oi(e,r);case"zAxis":return T0(e,r);case"angleAxis":return i0(e,r);case"radiusAxis":return a0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},DB=(e,t,r)=>{switch(t){case"xAxis":return Pi(e,r);case"yAxis":return Oi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},lc=(e,t,r)=>{switch(t){case"xAxis":return Pi(e,r);case"yAxis":return Oi(e,r);case"angleAxis":return i0(e,r);case"radiusAxis":return a0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},kC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function jC(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 SC=e=>e.graphicalItems.cartesianItems,RB=q([zt,Gh],jC),NC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),ll=q([SC,yr,RB],NC,{memoizeOptions:{resultEqualityCheck:qh}}),EC=q([ll],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(l0)),AC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),LB=q([ll],AC),CC=e=>e.map(t=>t.data).filter(Boolean).flat(1),$B=q([ll],e=>e.some(t=>!t.data)),PC=q([ll],CC,{memoizeOptions:{resultEqualityCheck:qh}}),OC=(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)},D0=q([PC,Bh],OC),zB=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Lt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Lt(a,n)}))):e.map(n=>({value:n})),_C=(e,t,r,n,a,o)=>{var c=n.chartData,u=c===void 0?[]:c,f=n.dataStartIndex,h=n.dataEndIndex,m=zB(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=u.slice(f,h+1),v=g.map(b=>({value:Lt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},uc=q([D0,yr,ll,Bh,$B,PC],_C);function Es(e){if(Gn(e)||e instanceof Date){var t=Number(e);if(We(t))return t}}function kS(e){if(Array.isArray(e)){var t=[Es(e[0]),Es(e[1])];return Bn(t)?t:void 0}var r=Es(e);if(r!=null)return[r,r]}function Qn(e){return e.map(Es).filter(Ar)}function FB(e,t){var r=Es(e),n=Es(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var BB=q([uc],e=>e==null?void 0:e.map(t=>t.value).sort(FB));function MC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function UB(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Kn(t))n=t;else if(Array.isArray(t)){var a=Qn(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Qn(r.flatMap(o=>{var c=Lt(e,o.dataKey),u,f;if(Array.isArray(c)){var h=xC(c,2);u=h[0],f=h[1]}else u=f=c;if(!(!We(u)||!We(f)))return[n-u,n+f]}))}var _t=e=>{var t=Ft(e),r=ol(e);return lc(e,t,r)},Xs=q([_t],e=>e==null?void 0:e.dataKey),HB=q([EC,Bh,_t],RA),IC=(e,t,r,n)=>{var a={},o=t.reduce((c,u)=>{if(u.stackId==null)return c;var f=c[u.stackId];return f==null&&(f=[]),f.push(u),c[u.stackId]=f,c},a);return Object.fromEntries(Object.entries(o).map(c=>{var u=xC(c,2),f=u[0],h=u[1],m=n?[...h].reverse():h,g=m.map(s0);return[f,{stackedData:sz(e,g,r),graphicalItems:m}]}))},TC=q([HB,EC,Uh,PA],IC),DC=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return dz(e,a,o)},WB=q([yr],e=>e.allowDataOverflow),R0=e=>{var t;if(e==null||!("domain"in e))return iy;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Qn(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:iy},RC=q([yr],R0),LC=q([RC,WB],yA),KB=q([TC,Nn,zt,LC],DC,{memoizeOptions:{resultEqualityCheck:Vh}}),L0=e=>e.errorBars,GB=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>MC(r,n)),Yf=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(),c=Math.min(...o),u=Math.max(...o);return[c,u]}},$C=function(t,r,n,a,o){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u,f;if(n.length>0&&n.forEach(h=>{var m,g=h.data!=null?[...h.data]:c,v=(m=a[h.id])===null||m===void 0?void 0:m.filter(b=>MC(o,b));g.forEach(b=>{var j,k=Lt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=UB(b,k,v);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(u==null||N<u)&&(u=N),(f==null||E>f)&&(f=E)}var A=kS(k);A!=null&&(u=u==null?A[0]:Math.min(u,A[0]),f=f==null?A[1]:Math.max(f,A[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=kS(Lt(h,r.dataKey));m!=null&&(u=u==null?m[0]:Math.min(u,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),We(u)&&We(f))return[u,f]},VB=q([D0,yr,LB,L0,zt,jF],$C,{memoizeOptions:{resultEqualityCheck:Vh}});function qB(e){var t=e.value;if(Gn(t)||t instanceof Date)return t}var QB=(e,t,r)=>{var n=e.map(qB).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&QE(n))?vA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},zC=e=>e.referenceElements.dots,ul=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),YB=q([zC,zt,Gh],ul),FC=e=>e.referenceElements.areas,XB=q([FC,zt,Gh],ul),BC=e=>e.referenceElements.lines,ZB=q([BC,zt,Gh],ul),UC=(e,t)=>{if(e!=null){var r=Qn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},JB=q(YB,zt,UC),HC=(e,t)=>{if(e!=null){var r=Qn(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)]}},eU=q([XB,zt],HC);function tU(e){var t;if(e.x!=null)return Qn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Qn(r)}function rU(e){var t;if(e.y!=null)return Qn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Qn(r)}var WC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?tU(n):rU(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},nU=q([ZB,zt],WC),iU=q(JB,nU,eU,(e,t,r)=>Yf(e,r,t)),KC=(e,t,r,n,a,o,c,u)=>{if(r!=null)return r;var f=c==="vertical"&&u==="xAxis"||c==="horizontal"&&u==="yAxis",h=f?Yf(n,o,a):Yf(o,a);return PF(t,h,e.allowDataOverflow)},aU=q([yr,RC,LC,KB,VB,iU,ft,zt],KC,{memoizeOptions:{resultEqualityCheck:Vh}}),oU=[0,1],GC=(e,t,r,n,a,o,c)=>{if(!((e==null||r==null||r.length===0)&&c===void 0)){var u=e.dataKey,f=e.type,h=Xn(t,o);if(h&&u==null){var m;return vA(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?QB(n,e,h):a==="expand"&&!h?oU:c}},$0=q([yr,ft,D0,uc,Uh,zt,aU],GC),cl=q([yr,kC,t0],vC),VC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=R0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Bn(e)){if(o)return _j(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return Mj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Bn(e))return _j(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Bn(e))return Mj(e,t.tickCount,t.allowDecimals,"adaptive")}}},z0=q([$0,lc,cl],VC),qC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Bn(t)&&Array.isArray(r)&&r.length>0){var a,o,c=t[0],u=(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(c,u),Math.max(f,h)]}return t},sU=q([yr,$0,z0,zt],qC),lU=q(uc,yr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Qn(e.map(g=>g.value))).sort((g,v)=>g-v),a=n[0],o=n[n.length-1];if(a==null||o==null)return 1/0;var c=o-a;if(c===0)return 1/0;for(var u=0;u<n.length-1;u++){var f=n[u],h=n[u+1];if(!(f==null||h==null)){var m=h-f;r=Math.min(r,m)}}return r/c}}),QC=q(lU,ft,$F,Zt,(e,t,r,n,a)=>a,(e,t,r,n,a)=>{if(!We(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var c=Sa(r,e*o),u=e*o/2;return u-c-(u-c)/o*c}return 0}),uU=(e,t,r)=>{var n=Pi(e,t);return n==null||typeof n.padding!="string"?0:QC(e,"xAxis",t,r,n.padding)},cU=(e,t,r)=>{var n=Oi(e,t);return n==null||typeof n.padding!="string"?0:QC(e,"yAxis",t,r,n.padding)},dU=q(Pi,uU,(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}}),fU=q(Oi,cU,(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}}),YC=q([Zt,dU,Dh,Th,(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]}),XC=q([Zt,ft,fU,Dh,Th,(e,t,r)=>r],(e,t,r,n,a,o)=>{var c=a.padding;return o?[n.height-c.bottom,c.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),cc=(e,t,r,n)=>{var a;switch(t){case"xAxis":return YC(e,r,n);case"yAxis":return XC(e,r,n);case"zAxis":return(a=T0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return IA(e);case"radiusAxis":return TA(e,r);default:return}},ZC=q([yr,cc],Hh),hU=q([cl,sU],VF),F0=q([yr,cl,hU,ZC],I0),JC=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,c=Xn(e,n);if(c&&(a==="number"||o!=="auto"))return t.map(u=>u.value)}},B0=q([ft,uc,lc,zt],JC),tm=q([F0],u0);q([F0],EB);q([F0,BB],yC);q([ll,L0,zt],GB);function eP(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var rm=(e,t)=>t,nm=(e,t,r)=>r,mU=q(Mh,rm,nm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(eP)),pU=q(Ih,rm,nm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(eP)),tP=(e,t)=>({width:e.width,height:t.height}),gU=(e,t)=>{var r=typeof t.width=="number"?t.width:Ju;return{width:r,height:e.height}},vU=q(Zt,Pi,tP),yU=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},xU=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},bU=q(Ai,Zt,mU,rm,nm,(e,t,r,n,a)=>{var o={},c;return r.forEach(u=>{var f=tP(t,u);c==null&&(c=yU(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[u.id]=c-Number(h)*f.height,c+=(h?-1:1)*f.height}),o}),wU=q(Ei,Zt,pU,rm,nm,(e,t,r,n,a)=>{var o={},c;return r.forEach(u=>{var f=gU(t,u);c==null&&(c=xU(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[u.id]=c-Number(h)*f.width,c+=(h?-1:1)*f.width}),o}),kU=(e,t)=>{var r=Pi(e,t);if(r!=null)return bU(e,r.orientation,r.mirror)},jU=q([Zt,Pi,kU,(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}}}),SU=(e,t)=>{var r=Oi(e,t);if(r!=null)return wU(e,r.orientation,r.mirror)},NU=q([Zt,Oi,SU,(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}}}),EU=q(Zt,Oi,(e,t)=>{var r=typeof t.width=="number"?t.width:Ju;return{width:r,height:e.height}}),rP=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,c=r.dataKey,u=Xn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(c&&u&&o==="category"&&a&&QE(h))return f}},U0=q([ft,uc,yr,zt],rP),jS=q([ft,DB,cl,tm,U0,B0,cc,z0,zt],(e,t,r,n,a,o,c,u,f)=>{if(t!=null){var h=Xn(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:u,range:c,realScaleType:r,scale:n}}}),AU=(e,t,r,n,a,o,c,u,f)=>{if(!(t==null||n==null)){var h=Xn(e,f),m=t.type,g=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=m==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?Jr(o[0]-o[1])*2*j:j;var k=g||a;return k?k.map((S,N)=>{var E=c?c.indexOf(S):S,A=n.map(E);return We(A)?{index:N,coordinate:A+j,value:S,offset:j}:null}).filter(Ar):h&&u?u.map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(Ar):n.ticks?n.ticks(v).map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(Ar):n.domain().map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+j,value:c?c[S]:S,index:N,offset:j}:null}).filter(Ar)}},nP=q([ft,lc,cl,tm,z0,cc,U0,B0,zt],AU),CU=(e,t,r,n,a,o,c)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=Xn(e,c),f=t.tickCount,h=0;return h=c==="angleAxis"&&(n==null?void 0:n.length)>=2?Jr(n[0]-n[1])*2*h:h,u&&o?o.map((m,g)=>{var v=r.map(m);return We(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(Ar):r.ticks?r.ticks(f).map((m,g)=>{var v=r.map(m);return We(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(Ar):r.domain().map((m,g)=>{var v=r.map(m);return We(v)?{coordinate:v+h,value:a?a[m]:m,index:g,offset:h}:null}).filter(Ar)}},iP=q([ft,lc,tm,cc,U0,B0,zt],CU),aP=q(yr,tm,(e,t)=>{if(!(e==null||t==null))return Qf(Qf({},e),{},{scale:t})}),PU=q([yr,cl,$0,ZC],I0),OU=q([PU],u0);q((e,t,r)=>T0(e,r),OU,(e,t)=>{if(!(e==null||t==null))return Qf(Qf({},e),{},{scale:t})});var _U=q([ft,Mh,Ih],(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}}),MU=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};q([MU],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var o of e){var c=Math.abs(o.coordinate-t);c<n&&(n=c,a=o)}return(r=a)===null||r===void 0?void 0:r.value}});var oP=e=>e.options.defaultTooltipEventType,sP=e=>e.options.validateTooltipEventTypes;function lP(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function dc(e,t){var r=oP(e),n=sP(e);return lP(t,r,n)}function IU(e){return Me(t=>dc(t,e))}var uP=(e,t)=>{var r,n=Number(t);if(!(Kn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},TU=e=>e.tooltip.settings,la={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},DU={itemInteraction:{click:la,hover:la},axisInteraction:{click:la,hover:la},keyboardInteraction:la,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}},cP=lr({name:"tooltip",initialState:DU,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:st()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=en(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:st()},removeTooltipEntrySettings:{reducer(e,t){var r=en(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:st()},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}}}),ln=cP.actions,RU=ln.addTooltipEntrySettings,LU=ln.replaceTooltipEntrySettings,$U=ln.removeTooltipEntrySettings,zU=ln.setTooltipSettingsState,FU=ln.setActiveMouseOverItemIndex;ln.mouseLeaveItem;var dP=ln.mouseLeaveChart;ln.setActiveClickItemIndex;var fP=ln.setMouseOverAxisIndex,BU=ln.setMouseClickAxisIndex,gu=ln.setSyncInteraction,Xf=ln.setKeyboardInteraction,UU=cP.reducer;function SS(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 Wd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SS(Object(r),!0).forEach(function(n){HU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HU(e,t,r){return(t=WU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WU(e){var t=KU(e,"string");return typeof t=="symbol"?t:t+""}function KU(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 GU(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function VU(e){return e.index!=null}var hP=(e,t,r,n)=>{if(t==null)return la;var a=GU(e,t,r);if(a==null)return la;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(VU(a)){if(o)return Wd(Wd({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Wd(Wd({},la),{},{coordinate:a.coordinate})};function qU(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 QU(e,t){var r=qU(e),n=t[0],a=t[1];if(r===void 0)return!1;var o=Math.min(n,a),c=Math.max(n,a);return r>=o&&r<=c}function YU(e,t,r){if(r==null||t==null)return!0;var n=Lt(e,t);return n==null||!Bn(r)?!0:QU(n,r)}var xu=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!We(o))return a;var c=0,u=1/0;t.length>0&&(u=t.length-1);var f=Math.max(c,Math.min(o,u)),h=t[f];return h==null||YU(h,r,n)?String(f):null},mP=(e,t,r,n,a,o,c)=>{if(o!=null){var u=c[0],f=u==null?void 0:u.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}}}},pP=(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(c=>{var u;return((u=c.settings)===null||u===void 0?void 0:u.graphicalItemId)===a})},gP=e=>e.options.tooltipPayloadSearcher,dl=e=>e.tooltip;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 ES(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){XU(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 XU(e,t,r){return(t=ZU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZU(e){var t=JU(e,"string");return typeof t=="symbol"?t:t+""}function JU(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 eH(e){if(typeof e=="string"||typeof e=="number")return e}function tH(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function rH(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function AS(e){if(typeof e=="string")return e}function nH(e){if(!(e==null||typeof e!="object")){var t="name"in e?eH(e.name):void 0,r="unit"in e?tH(e.unit):void 0,n="dataKey"in e?rH(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?AS(e.color):void 0,c="fill"in e?AS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:c}}}function iH(e,t){return e??t}var vP=(e,t,r,n,a,o,c)=>{if(!(t==null||o==null)){var u=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,g=[];return e.reduce((v,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=iH(k,u),E=Array.isArray(N)?U5(N,h,m):N,A=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,P=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&c==="axis"?_=YE(E,n,a):_=o(E,t,f,P),Array.isArray(_))_.forEach(D=>{var U,B,F=nH(D),Y=F==null?void 0:F.name,H=F==null?void 0:F.dataKey,pe=F==null?void 0:F.payload,ue=ES(ES({},S),{},{name:Y,unit:F==null?void 0:F.unit,color:(U=F==null?void 0:F.color)!==null&&U!==void 0?U:S==null?void 0:S.color,fill:(B=F==null?void 0:F.fill)!==null&&B!==void 0?B:S==null?void 0:S.fill});v.push(wk({tooltipEntrySettings:ue,dataKey:H,payload:pe,value:Lt(pe,H),name:Y==null?void 0:String(Y)}))});else{var O;v.push(wk({tooltipEntrySettings:S,dataKey:A,payload:_,value:Lt(_,A),name:(O=Lt(_,P))!==null&&O!==void 0?O:S==null?void 0:S.name}))}return v},g)}},H0=q([_t,kC,t0],vC),aH=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),oH=q([Ft,ol],jC),Io=q([aH,_t,oH],NC,{memoizeOptions:{resultEqualityCheck:qh}}),sH=q([Io],e=>e.filter(l0)),yP=q([Io],CC,{memoizeOptions:{resultEqualityCheck:qh}}),lH=q([Io],e=>e.some(t=>!t.data)),No=q([yP,Nn],OC),uH=q([sH,Nn,_t],RA),W0=q([No,_t,Io,Nn,lH,yP],_C),xP=q([_t],R0),cH=q([_t],e=>e.allowDataOverflow),bP=q([xP,cH],yA),dH=q([Io],e=>e.filter(l0)),fH=q([uH,dH,Uh,PA],IC),hH=q([fH,Nn,Ft,bP],DC),mH=q([Io],AC),pH=q([No,_t,mH,L0,Ft,SF],$C,{memoizeOptions:{resultEqualityCheck:Vh}}),gH=q([zC,Ft,ol],ul),vH=q([gH,Ft],UC),yH=q([FC,Ft,ol],ul),xH=q([yH,Ft],HC),bH=q([BC,Ft,ol],ul),wH=q([bH,Ft],WC),kH=q([vH,wH,xH],Yf),jH=q([_t,xP,bP,hH,pH,kH,ft,Ft],KC),Zs=q([_t,ft,No,W0,Uh,Ft,jH],GC),SH=q([Zs,_t,H0],VC),NH=q([_t,Zs,SH,Ft],qC),wP=e=>{var t=Ft(e),r=ol(e),n=!1;return cc(e,t,r,n)},kP=q([_t,wP],Hh),EH=q([_t,H0,NH,kP],I0),jP=q([EH],u0),AH=q([ft,W0,_t,Ft],rP),CH=q([ft,W0,_t,Ft],JC),PH=(e,t,r,n,a,o,c,u)=>{if(t){var f=t.type,h=Xn(e,u);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return g=u==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Jr(a[0]-a[1])*2*g:g,h&&c?c.map((v,b)=>{var j=n.map(v);return We(j)?{coordinate:j+g,value:v,index:b,offset:g}:null}).filter(Ar):n.domain().map((v,b)=>{var j=n.map(v);return We(j)?{coordinate:j+g,value:o?o[v]:v,index:b,offset:g}:null}).filter(Ar)}}},_i=q([ft,_t,H0,jP,wP,AH,CH,Ft],PH),K0=q([oP,sP,TU],(e,t,r)=>lP(r.shared,e,t)),SP=e=>e.tooltip.settings.trigger,G0=e=>e.tooltip.settings.defaultIndex,fc=q([dl,K0,SP,G0],hP),Fu=q([fc,No,Xs,Zs],xu),NP=q([_i,Fu],uP),OH=q([fc],e=>{if(e)return e.dataKey}),_H=q([fc],e=>{if(e)return e.graphicalItemId}),EP=q([dl,K0,SP,G0],pP),MH=q([Ei,Ai,ft,Zt,_i,G0,EP],mP),IH=q([fc,MH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),TH=q([fc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),DH=q([EP,Fu,Nn,Xs,NP,gP,K0],vP),RH=q([DH],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});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 PS(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){LH(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 LH(e,t,r){return(t=$H(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $H(e){var t=zH(e,"string");return typeof t=="symbol"?t:t+""}function zH(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 FH=()=>Me(_t),BH=()=>{var e=FH(),t=Me(_i),r=Me(jP);return Af(!e||!r?void 0:PS(PS({},e),{},{scale:r}),t)};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 ds(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){UH(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 UH(e,t,r){return(t=HH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HH(e){var t=WH(e,"string");return typeof t=="symbol"?t:t+""}function WH(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 KH=(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}},GH=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var o=a.coordinate,c=n.radius;return ds(ds(ds({},n),Qt(n.cx,n.cy,c,o)),{},{angle:o,radius:c})}var u=a.coordinate,f=n.angle;return ds(ds(ds({},n),Qt(n.cx,n.cy,u,f)),{},{angle:f,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function VH(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 AP=(e,t,r,n,a)=>{var o,c=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(c<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var u=0;u<c;u++){var f,h,m,g,v,b=u>0?(f=r[u-1])===null||f===void 0?void 0:f.coordinate:(h=r[c-1])===null||h===void 0?void 0:h.coordinate,j=(m=r[u])===null||m===void 0?void 0:m.coordinate,k=u>=c-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(v=r[u+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Jr(j-b)!==Jr(k-j)){var N=[];if(Jr(k-j)===Jr(a[1]-a[0])){S=k;var E=j+a[1]-a[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{S=b;var A=k+a[1]-a[0];N[0]=Math.min(j,(A+j)/2),N[1]=Math.max(j,(A+j)/2)}var P=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>P[0]&&e<=P[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[u])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,k),D=Math.max(b,k);if(e>(O+j)/2&&e<=(D+j)/2){var U;return(U=r[u])===null||U===void 0?void 0:U.index}}}else if(t)for(var B=0;B<c;B++){var F=t[B];if(F!=null){var Y=t[B+1],H=t[B-1];if(B===0&&Y!=null&&e<=(F.coordinate+Y.coordinate)/2||B===c-1&&H!=null&&e>(F.coordinate+H.coordinate)/2||B>0&&B<c-1&&H!=null&&Y!=null&&e>(F.coordinate+H.coordinate)/2&&e<=(F.coordinate+Y.coordinate)/2)return F.index}}return-1},CP=()=>Me(t0),V0=(e,t)=>t,PP=(e,t,r)=>r,q0=(e,t,r,n)=>n,qH=q(_i,e=>wh(e,t=>t.coordinate)),Q0=q([dl,V0,PP,q0],hP),Y0=q([Q0,No,Xs,Zs],xu),QH=(e,t,r)=>{if(t!=null){var n=dl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},OP=q([dl,V0,PP,q0],pP),Zf=q([Ei,Ai,ft,Zt,_i,q0,OP],mP),YH=q([Q0,Zf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),_P=q([_i,Y0],uP),XH=q([OP,Y0,Nn,Xs,_P,gP,V0],vP),ZH=q([Q0,Y0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),JH=(e,t,r,n,a,o,c)=>{if(!(!e||!r||!n||!a)&&VH(e,c)){var u=fz(e,t),f=AP(u,o,a,r,n),h=KH(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},eW=(e,t,r,n,a,o,c)=>{if(!(!e||!n||!a||!o||!r)){var u=pF(e,r);if(u){var f=hz(u,t),h=AP(f,c,o,n,a),m=GH(t,o,h,u);return{activeIndex:String(h),activeCoordinate:m}}}},tW=(e,t,r,n,a,o,c,u)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?JH(e,t,n,a,o,c,u):eW(e,t,r,n,a,o,c)},rW=q(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}}),nW=q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(pr)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:GF}});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 MS(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){iW(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 iW(e,t,r){return(t=aW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aW(e){var t=oW(e,"string");return typeof t=="symbol"?t:t+""}function oW(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 sW={},lW={zIndexMap:Object.values(pr).reduce((e,t)=>MS(MS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),sW)},uW=new Set(Object.values(pr));function cW(e){return uW.has(e)}var MP=lr({name:"zIndex",initialState:lW,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:st()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!cW(r)&&delete e.zIndexMap[r])},prepare:st()},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:st()},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:st()}}}),im=MP.actions,dW=im.registerZIndexPortal,Dg=im.unregisterZIndexPortal,fW=im.registerZIndexPortalElement,hW=im.unregisterZIndexPortalElement,mW=MP.reducer;function Mi(e){var t=e.zIndex,r=e.children,n=Xz(),a=n&&t!==void 0&&t!==0,o=Pr(),c=y.useRef(void 0),u=y.useRef(new Set),f=Nt(),h=Me(g=>rW(g,t,o));if(y.useLayoutEffect(()=>{if(!a){var g=u.current;g.forEach(b=>{f(Dg({zIndex:b}))}),g.clear(),c.current=void 0;return}if(u.current.has(t)||(f(dW({zIndex:t})),u.current.add(t)),h){c.current=h;var v=u.current;v.forEach(b=>{b!==t&&(f(Dg({zIndex:b})),v.delete(b))})}},[f,t,a,h]),y.useLayoutEffect(()=>{var g=u.current;return()=>{g.forEach(v=>{f(Dg({zIndex:v}))}),g.clear()}},[f]),!a)return r;var m=h??c.current;return m?fh.createPortal(r,m):null}function ay(){return ay=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},ay.apply(null,arguments)}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 Kd(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){pW(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 pW(e,t,r){return(t=gW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gW(e){var t=vW(e,"string");return typeof t=="symbol"?t:t+""}function vW(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 yW(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return y.isValidElement(t)?y.cloneElement(t,n):y.createElement(r,n)}function xW(e){var t,r=e.coordinate,n=e.payload,a=e.index,o=e.offset,c=e.tooltipAxisBandSize,u=e.layout,f=e.cursor,h=e.tooltipEventType,m=e.chartName,g=r,v=n,b=a;if(!f||!g||m!=="ScatterChart"&&h!=="axis")return null;var j,k,S;if(m==="ScatterChart")j=g,k=j8,S=pr.cursorLine;else if(m==="BarChart")j=S8(u,g,o,c),k=aF,S=pr.cursorRectangle;else if(u==="radial"&&XE(g)){var N=pA(g),E=N.cx,A=N.cy,P=N.radius,_=N.startAngle,O=N.endAngle;j={cx:E,cy:A,startAngle:_,endAngle:O,innerRadius:P,outerRadius:P},k=xF,S=pr.cursorLine}else j={points:bF(u,g,o)},k=rf,S=pr.cursorLine;var D=typeof f=="object"&&"className"in f?f.className:void 0,U=Kd(Kd(Kd(Kd({stroke:"#ccc",pointerEvents:"none"},o),j),yh(f)),{},{payload:v,payloadIndex:b,className:nt("recharts-tooltip-cursor",D)});return y.createElement(Mi,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},y.createElement(yW,{cursor:f,cursorComp:k,cursorProps:U}))}function bW(e){var t=BH(),r=X5(),n=nl(),a=CP();return t==null||r==null||n==null||a==null?null:y.createElement(xW,ay({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}var IP=y.createContext(null),wW=()=>y.useContext(IP),Rg={exports:{}},TS;function kW(){return TS||(TS=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,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,g,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new a(m,g||f,v),j=r?r+h:h;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],b]:f._events[j].push(b):(f._events[j]=b,f._eventsCount++),f}function c(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],m,g;if(this._eventsCount===0)return h;for(g in m=this._events)t.call(m,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},u.prototype.listeners=function(h){var m=r?r+h:h,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var v=0,b=g.length,j=new Array(b);v<b;v++)j[v]=g[v].fn;return j},u.prototype.listenerCount=function(h){var m=r?r+h:h,g=this._events[m];return g?g.fn?1:g.length:0},u.prototype.emit=function(h,m,g,v,b,j){var k=r?r+h:h;if(!this._events[k])return!1;var S=this._events[k],N=arguments.length,E,A;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,m),!0;case 3:return S.fn.call(S.context,m,g),!0;case 4:return S.fn.call(S.context,m,g,v),!0;case 5:return S.fn.call(S.context,m,g,v,b),!0;case 6:return S.fn.call(S.context,m,g,v,b,j),!0}for(A=1,E=new Array(N-1);A<N;A++)E[A-1]=arguments[A];S.fn.apply(S.context,E)}else{var P=S.length,_;for(A=0;A<P;A++)switch(S[A].once&&this.removeListener(h,S[A].fn,void 0,!0),N){case 1:S[A].fn.call(S[A].context);break;case 2:S[A].fn.call(S[A].context,m);break;case 3:S[A].fn.call(S[A].context,m,g);break;case 4:S[A].fn.call(S[A].context,m,g,v);break;default:if(!E)for(_=1,E=new Array(N-1);_<N;_++)E[_-1]=arguments[_];S[A].fn.apply(S[A].context,E)}}return!0},u.prototype.on=function(h,m,g){return o(this,h,m,g,!1)},u.prototype.once=function(h,m,g){return o(this,h,m,g,!0)},u.prototype.removeListener=function(h,m,g,v){var b=r?r+h:h;if(!this._events[b])return this;if(!m)return c(this,b),this;var j=this._events[b];if(j.fn)j.fn===m&&(!v||j.once)&&(!g||j.context===g)&&c(this,b);else{for(var k=0,S=[],N=j.length;k<N;k++)(j[k].fn!==m||v&&!j[k].once||g&&j[k].context!==g)&&S.push(j[k]);S.length?this._events[b]=S.length===1?S[0]:S:c(this,b)}return this},u.prototype.removeAllListeners=function(h){var m;return h?(m=r?r+h:h,this._events[m]&&c(this,m)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Rg)),Rg.exports}var jW=kW();const SW=vy(jW);var Bu=new SW,oy="recharts.syncEvent.tooltip",DS="recharts.syncEvent.brush",NW=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Kn(r))return e[r]}},EW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},TP=lr({name:"options",initialState:EW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),AW=TP.reducer,CW=TP.actions.createEventEmitter;function PW(e){return e.tooltip.syncInteraction}var OW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},DP=lr({name:"chartData",initialState:OW,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)}}}),X0=DP.actions,RS=X0.setChartData,_W=X0.setDataStartEndIndexes;X0.setComputedData;var MW=DP.reducer,IW=["x","y"];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 fs(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){TW(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 TW(e,t,r){return(t=DW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DW(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 LW(e,t){if(e==null)return{};var r,n,a=$W(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 $W(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 zW(){var e=Me(r0),t=Me(n0),r=Nt(),n=Me(OA),a=Me(_i),o=nl(),c=Rh(),u=Me(f=>f.rootProps.className);y.useEffect(()=>{if(e==null)return rl;var f=(h,m,g)=>{if(t!==g&&e===h){if(m.payload.active===!1){r(gu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(c&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,j=b.x,k=b.y,S=LW(b,IW),N=m.payload.sourceViewBox,E=N.x,A=N.y,P=N.width,_=N.height,O=fs(fs({},S),{},{x:c.x+(P?(j-E)/P:0)*c.width,y:c.y+(_?(k-A)/_:0)*c.height});r(fs(fs({},m),{},{payload:fs(fs({},m.payload),{},{coordinate:O})}))}else r(m);return}if(a!=null){var D;if(typeof n=="function"){var U={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},B=n(a,U);D=a[B]}else n==="value"&&(D=a.find(se=>String(se.value)===m.payload.label));var F=m.payload.coordinate;if(F==null||c==null){r(gu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(D==null){r(gu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Y=F.x,H=F.y,pe=Math.min(Y,c.x+c.width),ue=Math.min(H,c.y+c.height),he={x:o==="horizontal"?D.coordinate:pe,y:o==="horizontal"?ue:D.coordinate},ae=gu({active:m.payload.active,coordinate:he,dataKey:m.payload.dataKey,index:String(D.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(ae)}}};return Bu.on(oy,f),()=>{Bu.off(oy,f)}},[u,r,t,e,n,a,o,c])}function FW(){var e=Me(r0),t=Me(n0),r=Nt();y.useEffect(()=>{if(e==null)return rl;var n=(a,o,c)=>{t!==c&&e===a&&r(_W(o))};return Bu.on(DS,n),()=>{Bu.off(DS,n)}},[r,t,e])}function BW(){var e=Nt();y.useEffect(()=>{e(CW())},[e]),zW(),FW()}function UW(e,t,r,n,a,o){var c=Me(j=>QH(j,e,t)),u=Me(_H),f=Me(n0),h=Me(r0),m=Me(OA),g=Me(PW),v=(g==null?void 0:g.sourceViewBox)!=null,b=Rh();y.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=gu({active:o,coordinate:r,dataKey:c,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:u});Bu.emit(oy,h,j,f)}},[v,r,c,u,a,n,f,h,m,o,b])}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 zS(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){HW(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 HW(e,t,r){return(t=WW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WW(e){var t=KW(e,"string");return typeof t=="symbol"?t:t+""}function KW(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 GW(e,t){return YW(e)||QW(e,t)||qW(e,t)||VW()}function VW(){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 qW(e,t){if(e){if(typeof e=="string")return FS(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)?FS(e,t):void 0}}function FS(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 QW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function YW(e){if(Array.isArray(e))return e}function XW(e){return e.dataKey}function ZW(e,t){return y.isValidElement(e)?y.cloneElement(e,t):typeof e=="function"?y.createElement(e,t):y.createElement(U6,t)}var BS=[],JW={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 eK(e){var t,r,n=on(e,JW),a=n.active,o=n.allowEscapeViewBox,c=n.animationDuration,u=n.animationEasing,f=n.content,h=n.filterNull,m=n.isAnimationActive,g=n.offset,v=n.payloadUniqBy,b=n.position,j=n.reverseDirection,k=n.useTranslate3d,S=n.wrapperStyle,N=n.cursor,E=n.shared,A=n.trigger,P=n.defaultIndex,_=n.portal,O=n.axisId,D=Nt(),U=typeof P=="number"?String(P):P;y.useEffect(()=>{D(zU({shared:E,trigger:A,axisId:O,active:a,defaultIndex:U}))},[D,E,A,O,a,U]);var B=Rh(),F=uA(),Y=IU(E),H=(t=Me(_e=>ZH(_e,Y,A,U)))!==null&&t!==void 0?t:{},pe=H.activeIndex,ue=H.isActive,he=Me(_e=>XH(_e,Y,A,U)),ae=Me(_e=>_P(_e,Y,A,U)),se=Me(_e=>YH(_e,Y,A,U)),X=he,te=wW(),J=(r=a??ue)!==null&&r!==void 0?r:!1,I=ZL([X,J]),M=GW(I,2),K=M[0],ne=M[1],Z=Y==="axis"?ae:void 0;UW(Y,A,se,Z,pe,J);var me=_??te;if(me==null||B==null||Y==null)return null;var ge=X??BS;J||(ge=BS),h&&ge.length&&(ge=wL(ge.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),v,XW));var Pe=ge.length>0,re=zS(zS({},n),{},{payload:ge,label:Z,active:J,activeIndex:pe,coordinate:se,accessibilityLayer:F}),xe=y.createElement(u8,{allowEscapeViewBox:o,animationDuration:c,animationEasing:u,isAnimationActive:m,active:J,coordinate:se,hasPayload:Pe,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:B,wrapperStyle:S,lastBoundingBox:K,innerRef:ne,hasPortalFromProps:!!_},ZW(f,re));return y.createElement(y.Fragment,null,fh.createPortal(xe,me),J&&y.createElement(bW,{cursor:N,tooltipEventType:Y,coordinate:se,payload:ge,index:pe}))}function tK(e,t,r){return(t=rK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rK(e){var t=nK(e,"string");return typeof t=="symbol"?t:t+""}function nK(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 iK{constructor(t){tK(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 US(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 aK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?US(Object(r),!0).forEach(function(n){oK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):US(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oK(e,t,r){return(t=sK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sK(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 uK={cacheSize:2e3,enableCache:!0},RP=aK({},uK),HS=new iK(RP.cacheSize),cK={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},WS="recharts_measurement_span";function dK(e,t){var r=t.fontSize||"",n=t.fontFamily||"",a=t.fontWeight||"",o=t.fontStyle||"",c=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(o,"|").concat(c,"|").concat(u)}var KS=(e,t)=>{try{var r=document.getElementById(WS);r||(r=document.createElement("span"),r.setAttribute("id",WS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,cK,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},bu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||nc.isSsr)return{width:0,height:0};if(!RP.enableCache)return KS(t,r);var n=dK(t,r),a=HS.get(n);if(a)return a;var o=KS(t,r);return HS.set(n,o),o},LP;function Jf(e,t){return pK(e)||mK(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 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 mK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],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)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function pK(e){if(Array.isArray(e))return e}function gK(e,t,r){return(t=vK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vK(e){var t=yK(e,"string");return typeof t=="symbol"?t:t+""}function yK(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 VS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xK=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,bK=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,wK={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},kK=["cm","mm","pt","pc","in","Q","px"];function jK(e){return kK.includes(e)}var bs="NaN";function SK(e,t){return e*wK[t]}class Vt{static parse(t){var r,n=(r=bK.exec(t))!==null&&r!==void 0?r:[],a=Jf(n,3),o=a[1],c=a[2];return o==null?Vt.NaN:new Vt(parseFloat(o),c??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Kn(t)&&(this.unit=""),r!==""&&!xK.test(r)&&(this.num=NaN,this.unit=""),jK(r)&&(this.num=SK(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Vt(NaN,""):new Vt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Vt(NaN,""):new Vt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Vt(NaN,""):new Vt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Vt(NaN,""):new Vt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Kn(this.num)}}LP=Vt;gK(Vt,"NaN",new LP(NaN,""));function $P(e){if(e==null||e.includes(bs))return bs;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=VS.exec(t))!==null&&r!==void 0?r:[],a=Jf(n,4),o=a[1],c=a[2],u=a[3],f=Vt.parse(o??""),h=Vt.parse(u??""),m=c==="*"?f.multiply(h):f.divide(h);if(m.isNaN())return bs;t=t.replace(VS,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var g,v=(g=qS.exec(t))!==null&&g!==void 0?g:[],b=Jf(v,4),j=b[1],k=b[2],S=b[3],N=Vt.parse(j??""),E=Vt.parse(S??""),A=k==="+"?N.add(E):N.subtract(E);if(A.isNaN())return bs;t=t.replace(qS,A.toString())}return t}var QS=/\(([^()]*)\)/;function NK(e){for(var t=e,r;(r=QS.exec(t))!=null;){var n=r,a=Jf(n,2),o=a[1];t=t.replace(QS,$P(o))}return t}function EK(e){var t=e.replace(/\s+/g,"");return t=NK(t),t=$P(t),t}function AK(e){try{return EK(e)}catch{return bs}}function Lg(e){var t=AK(e.slice(5,-1));return t===bs?"":t}var CK=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],PK=["dx","dy","angle","className","breakAll"];function sy(){return sy=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},sy.apply(null,arguments)}function YS(e,t){if(e==null)return{};var r,n,a=OK(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 OK(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 XS(e,t){return TK(e)||IK(e,t)||MK(e,t)||_K()}function _K(){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 MK(e,t){if(e){if(typeof e=="string")return ZS(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)?ZS(e,t):void 0}}function ZS(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 IK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],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)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function TK(e){if(Array.isArray(e))return e}var zP=/[ \f\n\r\t\v\u2028\u2029]+/,FP=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];Yt(t)||(r?a=t.toString().split(""):a=t.toString().split(zP));var o=a.map(u=>({word:u,width:bu(u,n).width})),c=r?0:bu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}};function BP(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function DK(e){return Yt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var UP=(e,t,r,n)=>e.reduce((a,o)=>{var c=o.word,u=o.width,f=a[a.length-1];if(f&&u!=null&&(t==null||n||f.width+u+r<Number(t)))f.words.push(c),f.width+=u+r;else{var h={words:[c],width:u};a.push(h)}return a},[]),HP=e=>e.reduce((t,r)=>t.width>r.width?t:r),RK="…",JS=(e,t,r,n,a,o,c,u)=>{var f=e.slice(0,t),h=FP({breakAll:r,style:n,children:f+RK});if(!h)return[!1,[]];var m=UP(h.wordsWithComputedWidth,o,c,u),g=m.length>a||HP(m).width>Number(o);return[g,m]},LK=(e,t,r,n,a)=>{var o=e.maxLines,c=e.children,u=e.style,f=e.breakAll,h=Ee(o),m=String(c),g=UP(t,n,r,a);if(!h||a)return g;var v=g.length>o||HP(g).width>Number(n);if(!v)return g;for(var b=0,j=m.length-1,k=0,S;b<=j&&k<=m.length-1;){var N=Math.floor((b+j)/2),E=N-1,A=JS(m,E,f,u,o,n,r,a),P=XS(A,2),_=P[0],O=P[1],D=JS(m,N,f,u,o,n,r,a),U=XS(D,1),B=U[0];if(!_&&!B&&(b=N+1),_&&B&&(j=N-1),!_&&B){S=O;break}k++}return S||g},e2=e=>{var t=Yt(e)?[]:e.toString().split(zP);return[{words:t,width:void 0}]},$K=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,c=e.maxLines;if((t||r)&&!nc.isSsr){var u,f,h=FP({breakAll:o,children:n,style:a});if(h){var m=h.wordsWithComputedWidth,g=h.spaceWidth;u=m,f=g}else return e2(n);return LK({breakAll:o,children:n,maxLines:c,style:a},u,f,t,!!r)}return e2(n)},WP="#808080",zK={angle:0,breakAll:!1,capHeight:"0.71em",fill:WP,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Z0=y.forwardRef((e,t)=>{var r=on(e,zK),n=r.x,a=r.y,o=r.lineHeight,c=r.capHeight,u=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,g=YS(r,CK),v=y.useMemo(()=>$K({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),b=g.dx,j=g.dy,k=g.angle,S=g.className,N=g.breakAll,E=YS(g,PK);if(!Gn(n)||!Gn(a)||v.length===0)return null;var A=Number(n)+(Ee(b)?b:0),P=Number(a)+(Ee(j)?j:0);if(!We(A)||!We(P))return null;var _;switch(m){case"start":_=Lg("calc(".concat(c,")"));break;case"middle":_=Lg("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:_=Lg("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],D=v[0];if(f&&D!=null){var U=D.width,B=g.width;O.push("scale(".concat(Ee(B)&&Ee(U)?B/U:1,")"))}return k&&O.push("rotate(".concat(k,", ").concat(A,", ").concat(P,")")),O.length&&(E.transform=O.join(" ")),y.createElement("text",sy({},rn(E),{ref:t,x:A,y:P,className:nt("recharts-text",S),textAnchor:h,fill:u.includes("url")?WP:u}),v.map((F,Y)=>{var H=F.words.join(N?"":" ");return y.createElement("tspan",{x:A,dy:Y===0?_:o,key:"".concat(H,"-").concat(Y)},H)}))});Z0.displayName="Text";function t2(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 Tn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(r),!0).forEach(function(n){FK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FK(e,t,r){return(t=BK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BK(e){var t=UK(e,"string");return typeof t=="symbol"?t:t+""}function UK(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 HK=e=>{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,c=Gy(t),u=c.x,f=c.y,h=c.height,m=c.upperWidth,g=c.lowerWidth,v=u,b=u+(m-g)/2,j=(v+b)/2,k=(m+g)/2,S=v+m/2,N=h>=0?1:-1,E=N*a,A=N>0?"end":"start",P=N>0?"start":"end",_=m>=0?1:-1,O=_*a,D=_>0?"end":"start",U=_>0?"start":"end",B=o;if(r==="top"){var F={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:A};return B&&(F.height=Math.max(f-B.y,0),F.width=m),F}if(r==="bottom"){var Y={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:P};return B&&(Y.height=Math.max(B.y+B.height-(f+h),0),Y.width=g),Y}if(r==="left"){var H={x:j-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"};return B&&(H.width=Math.max(H.x-B.x,0),H.height=h),H}if(r==="right"){var pe={x:j+k+O,y:f+h/2,horizontalAnchor:U,verticalAnchor:"middle"};return B&&(pe.width=Math.max(B.x+B.width-pe.x,0),pe.height=h),pe}var ue=B?{width:k,height:h}:{};return r==="insideLeft"?Tn({x:j+O,y:f+h/2,horizontalAnchor:U,verticalAnchor:"middle"},ue):r==="insideRight"?Tn({x:j+k-O,y:f+h/2,horizontalAnchor:D,verticalAnchor:"middle"},ue):r==="insideTop"?Tn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:P},ue):r==="insideBottom"?Tn({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideTopLeft"?Tn({x:v+O,y:f+E,horizontalAnchor:U,verticalAnchor:P},ue):r==="insideTopRight"?Tn({x:v+m-O,y:f+E,horizontalAnchor:D,verticalAnchor:P},ue):r==="insideBottomLeft"?Tn({x:b+O,y:f+h-E,horizontalAnchor:U,verticalAnchor:A},ue):r==="insideBottomRight"?Tn({x:b+g-O,y:f+h-E,horizontalAnchor:D,verticalAnchor:A},ue):r&&typeof r=="object"&&(Ee(r.x)||bo(r.x))&&(Ee(r.y)||bo(r.y))?Tn({x:u+Sa(r.x,k),y:f+Sa(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):Tn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},WK=["labelRef"],KK=["content"];function r2(e,t){if(e==null)return{};var r,n,a=GK(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 GK(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 n2(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 vu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(r),!0).forEach(function(n){VK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VK(e,t,r){return(t=qK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qK(e){var t=QK(e,"string");return typeof t=="symbol"?t:t+""}function QK(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 hi(){return hi=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},hi.apply(null,arguments)}var KP=y.createContext(null),YK=e=>{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,c=e.height,u=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:c}),[t,r,n,a,o,c]);return y.createElement(KP.Provider,{value:f},u)},GP=()=>{var e=y.useContext(KP),t=Rh();return e||(t?Gy(t):void 0)},XK=y.createContext(null),ZK=()=>{var e=y.useContext(XK),t=Me(DA);return e||t},JK=e=>{var t=e.value,r=e.formatter,n=Yt(e.children)?t:e.children;return typeof r=="function"?r(n):n},J0=e=>e!=null&&typeof e=="function",eG=(e,t)=>{var r=Jr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},tG=(e,t,r,n,a)=>{var o=e.offset,c=e.className,u=a.cx,f=a.cy,h=a.innerRadius,m=a.outerRadius,g=a.startAngle,v=a.endAngle,b=a.clockWise,j=(h+m)/2,k=eG(g,v),S=k>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=v-S*o,E=!b;break;case"end":N=v+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=k<=0?E:!E;var A=Qt(u,f,j,N),P=Qt(u,f,j,N+(E?1:-1)*359),_="M".concat(A.x,",").concat(A.y,`
A`).concat(j,",").concat(j,",0,1,").concat(E?0:1,`,
`).concat(P.x,",").concat(P.y),O=Yt(e.id)?Au("recharts-radial-line-"):e.id;return y.createElement("text",hi({},n,{dominantBaseline:"central",className:nt("recharts-radial-bar-label",c)}),y.createElement("defs",null,y.createElement("path",{id:O,d:_})),y.createElement("textPath",{xlinkHref:"#".concat(O)},r))},rG=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,c=e.outerRadius,u=e.startAngle,f=e.endAngle,h=(u+f)/2;if(r==="outside"){var m=Qt(n,a,c+t,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=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+c)/2,j=Qt(n,a,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},nf=e=>e!=null&&"cx"in e&&Ee(e.cx),nG={angle:0,offset:5,zIndex:pr.label,position:"middle",textBreakAll:!1};function iG(e){if(!nf(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 sa(e){var t=on(e,nG),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,c=t.children,u=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,g=t.labelRef,v=ZK(),b=GP(),j=a==="center"?b:v??b,k,S,N;r==null?k=j:nf(r)?k=r:k=Gy(r);var E=iG(k);if(!k||Yt(o)&&Yt(c)&&!y.isValidElement(u)&&typeof u!="function")return null;var A=vu(vu({},t),{},{viewBox:k});if(y.isValidElement(u)){A.labelRef;var P=r2(A,WK);return y.cloneElement(u,P)}if(typeof u=="function"){A.content;var _=r2(A,KK);if(S=y.createElement(u,_),y.isValidElement(S))return S}else S=JK(t);var O=rn(t);if(nf(k)){if(a==="insideStart"||a==="insideEnd"||a==="end")return tG(t,a,S,O,k);N=rG(k,t.offset,t.position)}else{if(!E)return null;var D=HK({viewBox:E,position:a,offset:t.offset,parentViewBox:nf(n)?void 0:n});N=vu(vu({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return y.createElement(Mi,{zIndex:t.zIndex},y.createElement(Z0,hi({ref:g,className:nt("recharts-label",h)},O,N,{textAnchor:BP(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),S))}sa.displayName="Label";var aG=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(sa,hi({key:"label-implicit"},n)):Gn(e)?y.createElement(sa,hi({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===sa?y.cloneElement(e,vu({key:"label-implicit"},n)):y.createElement(sa,hi({key:"label-implicit",content:e},n)):J0(e)?y.createElement(sa,hi({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(sa,hi({},e,{key:"label-implicit"},n)):null};function oG(e){var t=e.label,r=e.labelRef,n=GP();return aG(t,n,r)||null}var sG=["valueAccessor"],lG=["dataKey","clockWise","id","textBreakAll","zIndex"];function eh(){return eh=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},eh.apply(null,arguments)}function i2(e,t){if(e==null)return{};var r,n,a=uG(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 uG(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 cG=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(DK(t))return t},VP=y.createContext(void 0),dG=VP.Provider,qP=y.createContext(void 0);qP.Provider;function fG(){return y.useContext(VP)}function hG(){return y.useContext(qP)}function af(e){var t=e.valueAccessor,r=t===void 0?cG:t,n=i2(e,sG),a=n.dataKey;n.clockWise;var o=n.id,c=n.textBreakAll,u=n.zIndex,f=i2(n,lG),h=fG(),m=hG(),g=h||m;return!g||!g.length?null:y.createElement(Mi,{zIndex:u??pr.label},y.createElement(nn,{className:"recharts-label-list"},g.map((v,b)=>{var j,k=Yt(a)?r(v,b):Lt(v.payload,a),S=Yt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(sa,eh({key:"label-".concat(b)},rn(v),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:k,textBreakAll:c,viewBox:v.viewBox,index:b,zIndex:0}))})))}af.displayName="LabelList";function mG(e){var t=e.label;return t?t===!0?y.createElement(af,{key:"labelList-implicit"}):y.isValidElement(t)||J0(t)?y.createElement(af,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(af,eh({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function ly(){return ly=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},ly.apply(null,arguments)}var QP=e=>{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=nt("recharts-dot",a);return Ee(t)&&Ee(r)&&Ee(n)?y.createElement("circle",ly({},kn(e),Ry(e),{className:o,cx:t,cy:r,r:n})):null},pG={radiusAxis:{},angleAxis:{}},YP=lr({name:"polarAxis",initialState:pG,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]}}}),am=YP.actions;am.addRadiusAxis;am.removeRadiusAxis;am.addAngleAxis;am.removeAngleAxis;var gG=YP.reducer;function vG(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var XP=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function a2(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 o2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?a2(Object(r),!0).forEach(function(n){yG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yG(e,t,r){return(t=xG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xG(e){var t=bG(e,"string");return typeof t=="symbol"?t:t+""}function bG(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 ZP(e,t){return o2(o2({},t),e)}function wG(e){return y.isValidElement(e)?e.props:e}function kG(e,t){return y.cloneElement(e,ZP(wG(e),t))}function jG(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function SG(e){return"isActive"in e&&e.isActive===!0}function NG(e){var t=e.option,r=e.DefaultShape,n=e.shapeProps,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,c=e.inActiveClassName,u=c===void 0?"recharts-shape":c,f=jG(n),h;return y.isValidElement(t)?h=kG(t,n):t===r?h=y.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=y.createElement(r,ZP(t,n)):h=y.createElement(r,n),SG(n)?y.createElement(nn,{className:o},h):y.createElement(nn,{className:u},h)}function EG(e){var t=e.tooltipEntrySettings,r=Nt(),n=Pr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(RU(t)):a.current!==t&&r(LU({prev:a.current,next:t})),a.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{a.current&&(r($U(a.current)),a.current=null)},[r]),null}function AG(e){var t=e.legendPayload,r=Nt(),n=Pr(),a=y.useRef(null);return y.useLayoutEffect(()=>{n||(a.current===null?r(c6(t)):a.current!==t&&r(d6({prev:a.current,next:t})),a.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{a.current&&(r(f6(a.current)),a.current=null)},[r]),null}function CG(e,t){return MG(e)||_G(e,t)||OG(e,t)||PG()}function PG(){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 OG(e,t){if(e){if(typeof e=="string")return s2(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)?s2(e,t):void 0}}function s2(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 _G(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function MG(e){if(Array.isArray(e))return e}var ex="index",IG="append";function tx(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 c=e[o],u=t[o];c!=null?n.push({status:"matched",prev:c,next:u}):n.push({status:"added",next:u})}return n}function TG(e,t){var r=e.length/t.length,n=t.map((a,o)=>e[Math.floor(o*r)]);return tx(n,t)}function DG(e,t){var r=t.map((n,a)=>e[a]);return tx(r,t)}function RG(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 LG(e,t,r){var n=RG(e,r),a=new Set,o=t.map((g,v)=>{var b=r(g,v);if(b!=null){var j=n.get(b);if(j!==void 0)return a.add(b),j}}),c=[];for(var u of n){var f=CG(u,2),h=f[0],m=f[1];a.has(h)||c.push(m)}return tx(o,t,c)}function uy(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===ex?TG(e,t):r===IG?DG(e,t):LG(e,t,r)}function JP(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(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){a.current=!0;return}u===1&&(n.current=c),u>0&&a.current&&f&&(t.current=c)},[t]);return{startValue:n.current,syncStepValue:o}}function $G(e,t){return UG(e)||BG(e,t)||FG(e,t)||zG()}function zG(){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 FG(e,t){if(e){if(typeof e=="string")return l2(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)?l2(e,t):void 0}}function l2(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 BG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function UG(e){if(Array.isArray(e))return e}function HG(e,t){var r=y.useState(!1),n=$G(r,2),a=n[0],o=n[1],c=y.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),u=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:c,handleAnimationEnd:u}}function WG(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,c=e.isAnimationActive,u=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,g=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=mA(r,n),E=JP(N,o),A=(t=E.startValue)!==null&&t!==void 0?t:null,P=uy(A,a,b??ex);return y.createElement(hA,{animationId:N,begin:u,duration:f,isActive:c,easing:h,onAnimationEnd:g,onAnimationStart:m,key:N},_=>{var O=A==null,D=a==null?a:v(P,_,S),U=j?j(_):_>0;return E.syncStepValue(D,_,U),D==null?null:k(D,_,O)})}var $g;function KG(e,t){return QG(e)||qG(e,t)||VG(e,t)||GG()}function GG(){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 VG(e,t){if(e){if(typeof e=="string")return u2(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)?u2(e,t):void 0}}function u2(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 qG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function QG(e){if(Array.isArray(e))return e}var YG=()=>{var e=y.useState(()=>Au("uid-")),t=KG(e,1),r=t[0];return r},eO=($g=lh.useId)!==null&&$g!==void 0?$g:YG;function XG(e,t){var r=eO();return t||(e?"".concat(e,"-").concat(r):r)}var ZG=y.createContext(void 0),JG=e=>{var t=e.id,r=e.type,n=e.children,a=XG("recharts-".concat(r),t);return y.createElement(ZG.Provider,{value:a},n(a))},eV={cartesianItems:[],polarItems:[]},tO=lr({name:"graphicalItems",initialState:eV,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:st()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=en(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:st()},removeCartesianGraphicalItem:{reducer(e,t){var r=en(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:st()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:st()},removePolarGraphicalItem:{reducer(e,t){var r=en(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:st()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,o=en(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:st()}}}),fl=tO.actions,tV=fl.addCartesianGraphicalItem,rV=fl.replaceCartesianGraphicalItem,nV=fl.removeCartesianGraphicalItem;fl.addPolarGraphicalItem;fl.removePolarGraphicalItem;fl.replacePolarGraphicalItem;var iV=tO.reducer,aV=e=>{var t=Nt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(tV(e)):r.current!==e&&t(rV({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(nV(r.current)),r.current=null)},[t]),null},oV=y.memo(aV),sV=["points"];function c2(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 zg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c2(Object(r),!0).forEach(function(n){lV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lV(e,t,r){return(t=uV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uV(e){var t=cV(e,"string");return typeof t=="symbol"?t:t+""}function cV(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 th(){return th=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},th.apply(null,arguments)}function dV(e,t){if(e==null)return{};var r,n,a=fV(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 fV(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 hV(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=nt(n,typeof t!="boolean"?t.className:""),o=r??{};o.points;var c=dV(o,sV);return y.createElement(QP,th({},c,{className:a}))}function mV(e,t){return e==null?!1:t?!0:e.length===1}function pV(e){var t=e.points,r=e.dot,n=e.className,a=e.dotClassName,o=e.dataKey,c=e.baseProps,u=e.needClip,f=e.clipPathId,h=e.zIndex,m=h===void 0?pr.scatter:h;if(!mV(t,r))return null;var g=XP(r),v=YD(r),b=t.map((k,S)=>{var N,E,A=zg(zg(zg({r:3},c),v),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(E=k.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return y.createElement(hV,{key:"dot-".concat(S),option:r,dotProps:A,className:a})}),j={};return u&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),y.createElement(Mi,{zIndex:m},y.createElement(nn,th({className:n},j),b))}function d2(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 f2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(r),!0).forEach(function(n){gV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gV(e,t,r){return(t=vV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vV(e){var t=yV(e,"string");return typeof t=="symbol"?t:t+""}function yV(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 rO=0,xV={xAxis:{},yAxis:{},zAxis:{}},nO=lr({name:"cartesianAxis",initialState:xV,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:st()},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:st()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:st()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:st()},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:st()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:st()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:st()},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:st()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:st()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,a=r.width,o=e.yAxis[n];if(o){var c,u=o.widthHistory||[];if(u.length===3&&u[0]===u[2]&&a===u[1]&&a!==o.width&&Math.abs(a-((c=u[0])!==null&&c!==void 0?c:0))<=1)return;var f=[...u,a].slice(-3);e.yAxis[n]=f2(f2({},o),{},{width:a,widthHistory:f})}}}}),Zn=nO.actions,bV=Zn.addXAxis,wV=Zn.replaceXAxis,kV=Zn.removeXAxis,jV=Zn.addYAxis,SV=Zn.replaceYAxis,NV=Zn.removeYAxis;Zn.addZAxis;Zn.replaceZAxis;Zn.removeZAxis;var EV=Zn.updateYAxisWidth,AV=nO.reducer,CV=q([Zt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),PV=q([CV,Ei,Ai],(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)}}),rx=()=>Me(PV),OV=()=>Me(RH);function h2(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 Fg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?h2(Object(r),!0).forEach(function(n){_V(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _V(e,t,r){return(t=MV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MV(e){var t=IV(e,"string");return typeof t=="symbol"?t:t+""}function IV(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 TV=e=>{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,o=e.dataKey,c=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var u={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=Fg(Fg(Fg({},u),yh(a)),Ry(a)),h;return y.isValidElement(a)?h=y.cloneElement(a,f):typeof a=="function"?h=a(f):h=y.createElement(QP,f),y.createElement(nn,{className:"recharts-active-dot",clipPath:c},h)};function m2(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,c=e.zIndex,u=c===void 0?pr.activeDot:c,f=Me(Fu),h=OV();if(t==null||h==null)return null;var m=t.find(g=>h.includes(g.payload));return Yt(m)?null:y.createElement(Mi,{zIndex:u},y.createElement(TV,{point:m,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var DV=e=>{var t=e.chartData,r=Nt(),n=Pr();return y.useEffect(()=>n?()=>{}:(r(RS(t)),()=>{r(RS(void 0))}),[t,r,n]),null},p2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},iO=lr({name:"brush",initialState:p2,reducers:{setBrushSettings(e,t){return t.payload==null?p2:t.payload}}});iO.actions.setBrushSettings;var RV=iO.reducer;function LV(e){return(e%180+180)%180}var $V=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=LV(a),c=o*Math.PI/180,u=Math.atan(n/r),f=c>u&&c<Math.PI-u?n/Math.sin(c):r/Math.cos(c);return Math.abs(f)},zV={dots:[],areas:[],lines:[]},aO=lr({name:"referenceElements",initialState:zV,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=en(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=en(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=en(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),hl=aO.actions;hl.addDot;hl.removeDot;hl.addArea;hl.removeArea;hl.addLine;hl.removeLine;var FV=aO.reducer;function BV(e,t){return KV(e)||WV(e,t)||HV(e,t)||UV()}function UV(){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 HV(e,t){if(e){if(typeof e=="string")return g2(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)?g2(e,t):void 0}}function g2(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 WV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function KV(e){if(Array.isArray(e))return e}var GV=y.createContext(void 0),VV=e=>{var t=e.children,r=y.useState("".concat(Au("recharts"),"-clip")),n=BV(r,1),a=n[0],o=rx();if(o==null)return null;var c=o.x,u=o.y,f=o.width,h=o.height;return y.createElement(GV.Provider,{value:a},y.createElement("defs",null,y.createElement("clipPath",{id:a},y.createElement("rect",{x:c,y:u,height:h,width:f}))),t)};function oO(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 qV(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return $V(n,r)}function QV(e,t,r){var n=r==="width",a=e.x,o=e.y,c=e.width,u=e.height;return t===1?{start:n?a:o,end:n?a+c:o+u}:{start:n?a+c:o+u,end:n?a:o}}function Uu(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 YV(e,t){return oO(e,t+1)}function XV(e,t,r,n,a){for(var o=(n||[]).slice(),c=t.start,u=t.end,f=0,h=1,m=c,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:oO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),E=j.coordinate,A=f===0||Uu(e,E,N,m,u);A||(f=0,m=c,h+=1),A&&(m=E+e*(N()/2+a),f+=h)},v;h<=o.length;)if(v=g(),v)return v.v;return[]}function ZV(e,t,r,n,a){var o=(n||[]).slice(),c=o.length;if(c===0)return[];for(var u=t.start,f=t.end,h=1;h<=c;h++){for(var m=(c-1)%h,g=u,v=!0,b=function(){var P=n[k];if(P==null)return 0;var _=k,O,D=()=>(O===void 0&&(O=r(P,_)),O),U=P.coordinate,B=k===m||Uu(e,U,D,g,f);if(!B)return v=!1,1;B&&(g=U+e*(D()/2+a))},j,k=m;k<c&&(j=b(),!(j!==0&&j===1));k+=h);if(v){for(var S=[],N=m;N<c;N+=h){var E=n[N];E!=null&&S.push(E)}return S}}return[]}function v2(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 ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v2(Object(r),!0).forEach(function(n){JV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JV(e,t,r){return(t=eq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eq(e){var t=tq(e,"string");return typeof t=="symbol"?t:t+""}function tq(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 rq(e,t,r,n,a){for(var o=(n||[]).slice(),c=o.length,u=t.start,f=t.end,h=function(v){var b=o[v];if(b==null)return 1;var j=b,k,S=()=>(k===void 0&&(k=r(b,v)),k);if(v===c-1){var N=e*(j.coordinate+e*S()/2-f);o[v]=j=ar(ar({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[v]=j=ar(ar({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var E=Uu(e,j.tickCoord,S,u,f);E&&(f=j.tickCoord-e*(S()/2+a),o[v]=ar(ar({},j),{},{isShow:!0}))}},m=c-1;m>=0;m--)h(m);return o}function nq(e,t,r,n,a,o){var c=(n||[]).slice(),u=c.length,f=t.start,h=t.end;if(o){var m=n[u-1];if(m!=null){var g=r(m,u-1),v=e*(m.coordinate+e*g/2-h);if(c[u-1]=m=ar(ar({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Uu(e,m.tickCoord,()=>g,f,h);b&&(h=m.tickCoord-e*(g/2+a),c[u-1]=ar(ar({},m),{},{isShow:!0}))}}}for(var j=o?u-1:u,k=function(E){var A=c[E];if(A==null)return 1;var P=A,_,O=()=>(_===void 0&&(_=r(A,E)),_);if(E===0){var D=e*(P.coordinate-e*O()/2-f);c[E]=P=ar(ar({},P),{},{tickCoord:D<0?P.coordinate-D*e:P.coordinate})}else c[E]=P=ar(ar({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var U=Uu(e,P.tickCoord,O,f,h);U&&(f=P.tickCoord+e*(O()/2+a),c[E]=ar(ar({},P),{},{isShow:!0}))}},S=0;S<j;S++)k(S);return c}function nx(e,t,r){var n=e.tick,a=e.ticks,o=e.viewBox,c=e.minTickGap,u=e.orientation,f=e.interval,h=e.tickFormatter,m=e.unit,g=e.angle;if(!a||!a.length||!n)return[];if(Ee(f)||nc.isSsr){var v;return(v=YV(a,Ee(f)?f:0))!==null&&v!==void 0?v:[]}var b=[],j=u==="top"||u==="bottom"?"width":"height",k=m&&j==="width"?bu(m,{fontSize:t,letterSpacing:r}):{width:0,height:0},S=(_,O)=>{var D=typeof h=="function"?h(_.value,O):_.value;return j==="width"?qV(bu(D,{fontSize:t,letterSpacing:r}),k,g):bu(D,{fontSize:t,letterSpacing:r})[j]},N=a[0],E=a[1],A=a.length>=2&&N!=null&&E!=null?Jr(E.coordinate-N.coordinate):1,P=QV(o,A,j);return f==="equidistantPreserveStart"?XV(A,P,S,a,c):f==="equidistantPreserveEnd"?ZV(A,P,S,a,c):(f==="preserveStart"||f==="preserveStartEnd"?b=nq(A,P,S,a,c,f==="preserveStartEnd"):b=rq(A,P,S,a,c),b.filter(_=>_.isShow))}var iq=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,c=o===void 0?0:o,u=e.tickMargin,f=u===void 0?0:u,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var m=r?r.getBoundingClientRect().width:0,g=c+f,v=h+g+m+(r?a:0);return Math.round(v)}return 0},aq={xAxis:{},yAxis:{}},sO=lr({name:"renderedTicks",initialState:aq,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]}}}),lO=sO.actions,oq=lO.setRenderedTicks,sq=lO.removeRenderedTicks,lq=sO.reducer,uq=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function y2(e,t){return hq(e)||fq(e,t)||dq(e,t)||cq()}function cq(){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 dq(e,t){if(e){if(typeof e=="string")return x2(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)?x2(e,t):void 0}}function x2(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 fq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function hq(e){if(Array.isArray(e))return e}function mq(e,t){if(e==null)return{};var r,n,a=pq(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 pq(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 Eo(){return Eo=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},Eo.apply(null,arguments)}function b2(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 xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b2(Object(r),!0).forEach(function(n){gq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gq(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=yq(e,"string");return typeof t=="symbol"?t:t+""}function yq(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 xi={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:pr.axis};function xq(e){var t=e.x,r=e.y,n=e.width,a=e.height,o=e.orientation,c=e.mirror,u=e.axisLine,f=e.otherSvgProps;if(!u)return null;var h=xt(xt(xt({},f),kn(u)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!c||o==="bottom"&&c);h=xt(xt({},h),{},{x1:t,y1:r+m*a,x2:t+n,y2:r+m*a})}else{var g=+(o==="left"&&!c||o==="right"&&c);h=xt(xt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+a})}return y.createElement("line",Eo({},h,{className:nt("recharts-cartesian-axis-line",Oo(u,"className"))}))}function bq(e,t,r,n,a,o,c,u,f){var h,m,g,v,b,j,k=u?-1:1,S=e.tickSize||c,N=Ee(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=m=e.coordinate,v=r+ +!u*a,g=v-k*S,j=g-k*f,b=N;break;case"left":g=v=e.coordinate,m=t+ +!u*n,h=m-k*S,b=h-k*f,j=N;break;case"right":g=v=e.coordinate,m=t+ +u*n,h=m+k*S,b=h+k*f,j=N;break;default:h=m=e.coordinate,v=r+ +u*a,g=v+k*S,j=g+k*f,b=N;break}return{line:{x1:h,y1:g,x2:m,y2:v},tick:{x:b,y:j}}}function wq(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function kq(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function jq(e){var t=e.option,r=e.tickProps,n=e.value,a,o=nt(r.className,"recharts-cartesian-axis-tick-value");if(y.isValidElement(t))a=y.cloneElement(t,xt(xt({},r),{},{className:o}));else if(typeof t=="function")a=t(xt(xt({},r),{},{className:o}));else{var c="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(c=nt(c,vG(t))),a=y.createElement(Z0,Eo({},r,{className:c}),n)}return a}function Sq(e){var t=e.ticks,r=e.axisType,n=e.axisId,a=Nt();return y.useEffect(()=>{if(n==null||r==null)return rl;var o=t.map(c=>({value:c.value,coordinate:c.coordinate,offset:c.offset,index:c.index}));return a(oq({ticks:o,axisId:n,axisType:r})),()=>{a(sq({axisId:n,axisType:r}))}},[a,t,n,r]),null}var Nq=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,c=e.stroke,u=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,g=e.orientation,v=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,A=e.fontSize,P=e.letterSpacing,_=e.getTicksConfig,O=e.events,D=e.axisType,U=e.axisId,B=nx(xt(xt({},_),{},{ticks:n}),A,P),F=kn(_),Y=yh(a),H=BP(F.textAnchor)?F.textAnchor:wq(g,v),pe=kq(g,v),ue={};typeof o=="object"&&(ue=o);var he=xt(xt({},F),{},{fill:"none"},ue),ae=B.map(te=>xt({entry:te},bq(te,b,j,k,S,g,N,v,E))),se=ae.map(te=>{var J=te.entry,I=te.line;return y.createElement(nn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},o&&y.createElement("line",Eo({},he,I,{className:nt("recharts-cartesian-axis-tick-line",Oo(o,"className"))})))}),X=ae.map((te,J)=>{var I,M,K=te.entry,ne=te.tick,Z=xt(xt(xt(xt({verticalAnchor:pe},F),{},{textAnchor:H,stroke:"none",fill:c},ne),{},{index:J,payload:K,visibleTicksCount:B.length,tickFormatter:u,padding:h},m),{},{angle:(I=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:F.angle)!==null&&I!==void 0?I:0}),me=xt(xt({},Z),Y);return y.createElement(nn,Eo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(K.value,"-").concat(K.coordinate,"-").concat(K.tickCoord)},PR(O,K,J)),a&&y.createElement(jq,{option:a,tickProps:me,value:"".concat(typeof u=="function"?u(K.value,J):K.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(D,"-ticks")},y.createElement(Sq,{ticks:B,axisId:U,axisType:D}),X.length>0&&y.createElement(Mi,{zIndex:pr.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(D,"-tick-labels"),ref:t},X)),se.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(D,"-tick-lines")},se))}),Eq=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,c=e.hide,u=e.ticks,f=e.axisType,h=e.axisId,m=mq(e,uq),g=y.useState(""),v=y2(g,2),b=v[0],j=v[1],k=y.useState(""),S=y2(k,2),N=S[0],E=S[1],A=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return iq({ticks:A.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var P=y.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=O;var D=O[0];if(D){var U=window.getComputedStyle(D),B=U.fontSize,F=U.letterSpacing;(B!==b||F!==N)&&(j(B),E(F))}}},[b,N]);return c||n!=null&&n<=0||a!=null&&a<=0?null:y.createElement(Mi,{zIndex:e.zIndex},y.createElement(nn,{className:nt("recharts-cartesian-axis",o)},y.createElement(xq,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:kn(e)}),y.createElement(Nq,{ref:P,axisType:f,events:m,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:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(YK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(oG,{label:e.label,labelRef:e.labelRef}),e.children)))}),ix=y.forwardRef((e,t)=>{var r=on(e,xi);return y.createElement(Eq,Eo({},r,{ref:t}))});ix.displayName="CartesianAxis";var Aq=["x1","y1","x2","y2","key"],Cq=["offset"],Pq=["xAxisId","yAxisId"],Oq=["xAxisId","yAxisId"];function w2(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 or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w2(Object(r),!0).forEach(function(n){_q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _q(e,t,r){return(t=Mq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mq(e){var t=Iq(e,"string");return typeof t=="symbol"?t:t+""}function Iq(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 no(){return no=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},no.apply(null,arguments)}function rh(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}var Dq=e=>{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,o=e.width,c=e.height,u=e.ry;return y.createElement("rect",{x:n,y:a,ry:u,width:o,height:c,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function uO(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,c=r.y1,u=r.x2,f=r.y2,h=r.key,m=rh(r,Aq),g=(a=kn(m))!==null&&a!==void 0?a:{};g.offset;var v=rh(g,Cq);n=y.createElement("line",no({},v,{x1:o,y1:c,x2:u,y2:f,fill:"none",key:h}))}return n}function Rq(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 c=rh(e,Pq),u=o.map((f,h)=>{var m=or(or({},c),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(uO,{key:"line-".concat(h),option:a,lineItemProps:m})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Lq(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 c=rh(e,Oq),u=o.map((f,h)=>{var m=or(or({},c),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(uO,{option:a,lineItemProps:m,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function $q(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,c=e.height,u=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||u==null)return null;var m=u.map(v=>Math.round(v+a-a)).sort((v,b)=>v-b);a!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?a+c-v:j-v;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:v,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"},g)}function zq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,c=e.y,u=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?o+u-v:j-v;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x:v,y:c,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"},g)}var Fq=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return H5(nx(or(or(or({},xi),r),{},{ticks:W5(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},Bq=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return H5(nx(or(or(or({},xi),r),{},{ticks:W5(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},Uq={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:pr.grid};function cO(e){var t=Z5(),r=J5(),n=X5(),a=or(or({},on(e,Uq)),{},{x:Ee(e.x)?e.x:n.left,y:Ee(e.y)?e.y:n.top,width:Ee(e.width)?e.width:n.width,height:Ee(e.height)?e.height:n.height}),o=a.xAxisId,c=a.yAxisId,u=a.x,f=a.y,h=a.width,m=a.height,g=a.syncWithTicks,v=a.horizontalValues,b=a.verticalValues,j=Pr(),k=Me(B=>jS(B,"xAxis",o,j)),S=Me(B=>jS(B,"yAxis",c,j));if(!Vn(h)||!Vn(m)||!Ee(u)||!Ee(f))return null;var N=a.verticalCoordinatesGenerator||Fq,E=a.horizontalCoordinatesGenerator||Bq,A=a.horizontalPoints,P=a.verticalPoints;if((!A||!A.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:S?or(or({},S),{},{ticks:_?v:S.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:g);Cf(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(A=O)}if((!P||!P.length)&&typeof N=="function"){var D=b&&b.length,U=N({xAxis:k?or(or({},k),{},{ticks:D?b:k.ticks}):void 0,width:t??h,height:r??m,offset:n},D?!0:g);Cf(Array.isArray(U),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof U,"]")),Array.isArray(U)&&(P=U)}return y.createElement(Mi,{zIndex:a.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Dq,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),y.createElement($q,no({},a,{horizontalPoints:A})),y.createElement(zq,no({},a,{verticalPoints:P})),y.createElement(Rq,no({},a,{offset:n,horizontalPoints:A,xAxis:k,yAxis:S})),y.createElement(Lq,no({},a,{offset:n,verticalPoints:P,xAxis:k,yAxis:S}))))}cO.displayName="CartesianGrid";var Hq={},dO=lr({name:"errorBars",initialState:Hq,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(c=>c.dataKey===a.dataKey&&c.direction===a.direction?o:c))},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))}}}),ax=dO.actions;ax.addErrorBar;ax.replaceErrorBar;ax.removeErrorBar;var Wq=dO.reducer;function fO(e,t){var r,n,a=Me(h=>Pi(h,e)),o=Me(h=>Oi(h,t)),c=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:Ct.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Pt.allowDataOverflow,f=c||u;return{needClip:f,needClipX:c,needClipY:u}}function Kq(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=rx(),o=fO(t,r),c=o.needClipX,u=o.needClipY,f=o.needClip,h=Me(A=>YC(A,t,!1)),m=Me(A=>XC(A,r,!1));if(!f||!a)return null;var g=a.x,v=a.y,b=a.width,j=a.height,k=c&&h?Math.min(h[0],h[1]):g-b/2,S=u&&m?Math.min(m[0],m[1]):v-j/2,N=c&&h?Math.abs(h[1]-h[0]):b*2,E=u&&m?Math.abs(m[1]-m[0]):j*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:k,y:S,width:N,height:E}))}function Gq(e){var t=yh(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,c=Number(a),u=Number(o);return(Number.isNaN(c)||c<0)&&(c=r),(Number.isNaN(u)||u<0)&&(u=n),{r:c,strokeWidth:u}}return{r,strokeWidth:n}}function ox(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:rO}function sx(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:rO}var hO=(e,t,r)=>aP(e,"xAxis",ox(e,t),r),mO=(e,t,r)=>iP(e,"xAxis",ox(e,t),r),pO=(e,t,r)=>aP(e,"yAxis",sx(e,t),r),gO=(e,t,r)=>iP(e,"yAxis",sx(e,t),r),Vq=q([ft,hO,pO,mO,gO],(e,t,r,n,a)=>Xn(e,"xAxis")?Af(t,n,!1):Af(r,a,!1)),qq=(e,t)=>t,vO=q([SC,qq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),yO=e=>{var t=ft(e),r=Xn(t,"xAxis");return r?"yAxis":"xAxis"},Qq=(e,t)=>{var r=yO(e);return r==="yAxis"?sx(e,t):ox(e,t)},Yq=(e,t,r)=>TC(e,yO(e),Qq(e,t),r),Xq=q([vO,Yq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=s0(e);if(!(n==null||a==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,c=o==null?void 0:o.find(u=>u.key===a);if(c!=null)return c.map(u=>[u[0],u[1]])}}}),Zq=q([ft,hO,pO,mO,gO,Xq,kF,Vq,vO,zF],(e,t,r,n,a,o,c,u,f,h)=>{var m=c.chartData,g=c.dataStartIndex,v=c.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||u==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=m==null?void 0:m.slice(g,v+1),j!=null)return SQ({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:u})}}),Jq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],eQ=["id","baseLine"];function wu(){return wu=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},wu.apply(null,arguments)}function k2(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,r,n=e.alpha,a=e.baseLine,o=e.points,c=e.strokeWidth,u=(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(!We(u)||!We(f))return null;var h=n*Math.abs(u-f),m=Math.max(...o.map(g=>g.y||0));return Ee(a)?m=Math.max(a,m):a&&Array.isArray(a)&&a.length&&(m=Math.max(...a.map(g=>g.y||0),m)),Ee(m)?y.createElement("rect",{x:u<f?u:u-h,y:0,width:h,height:Math.floor(m+(c?parseInt("".concat(c),10):1))}):null}function nQ(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,c=e.strokeWidth,u=(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(!We(u)||!We(f))return null;var h=n*Math.abs(u-f),m=Math.max(...o.map(g=>g.x||0));return Ee(a)?m=Math.max(a,m):a&&Array.isArray(a)&&a.length&&(m=Math.max(...a.map(g=>g.x||0),m)),Ee(m)?y.createElement("rect",{x:0,y:u<f?u:u-h,width:m+(c?parseInt("".concat(c),10):1),height:Math.floor(h)}):null}function iQ(e){var t=e.alpha,r=e.layout,n=e.points,a=e.baseLine,o=e.strokeWidth;return r==="vertical"?y.createElement(nQ,{alpha:t,points:n,baseLine:a,strokeWidth:o}):y.createElement(rQ,{alpha:t,points:n,baseLine:a,strokeWidth:o})}function aQ(e){var t=e.animationElapsedTime,r=t===void 0?1:t,n=e.isAnimating,a=n===void 0?!1:n,o=e.isEntrance,c=o===void 0?!1:o,u=e.layout,f=e.isRange,h=e.stroke,m=e.connectNulls,g=k2(e,Jq),v=u==="vertical"?"vertical":"horizontal",b=m??!1,j=eO(),k=g.id,S=g.baseLine,N=k2(g,eQ),E=kn(N),A=y.createElement(rf,wu({},g,{id:k,baseLine:S,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:v})),P=h!=="none"&&y.createElement(rf,wu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:g.points})),_=h!=="none"&&f&&Array.isArray(S)&&y.createElement(rf,wu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:S}));if(c&&(a||r<1)){var O;return y.createElement(nn,null,y.createElement("defs",null,y.createElement("clipPath",{id:j},y.createElement(iQ,{alpha:r,points:(O=g.points)!==null&&O!==void 0?O:[],baseLine:S,layout:v,strokeWidth:g.strokeWidth}))),y.createElement(nn,{clipPath:"url(#".concat(j,")")},A,P,_))}return y.createElement(y.Fragment,null,A,P,_)}var oQ=["id"],sQ=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function nh(){return nh=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},nh.apply(null,arguments)}function xO(e,t){if(e==null)return{};var r,n,a=lQ(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 lQ(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 j2(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 Js(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j2(Object(r),!0).forEach(function(n){uQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j2(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)}var fQ=(e,t)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Js(Js({},r.next),{},{x:mi(r.prev.x,r.next.x,t),y:mi(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),bO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:ex,animationInterpolateFn:fQ,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:aQ,xAxisId:0,yAxisId:0,zIndex:pr.area};function ih(e,t){return e&&e!=="none"?e:t}var hQ=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,o=e.legendType,c=e.hide;return[{inactive:c,dataKey:t,type:o,color:ih(n,a),value:K5(r,t),payload:e}]},mQ=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,c=e.name,u=e.hide,f=e.unit,h=e.tooltipType,m=e.id,g={dataDefinedOnItem:r,getPosition:rl,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:K5(c,t),hide:u,type:h,color:ih(n,o),unit:f,graphicalItemId:m}};return y.createElement(EG,{tooltipEntrySettings:g})});function pQ(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,c=n.dataKey,u=kn(n);return y.createElement(pV,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:u,needClip:a,clipPathId:t})}function gQ(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var c,u,f={x:(c=o.x)!==null&&c!==void 0?c:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Js(Js({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return y.createElement(dG,{value:t?a:void 0},r)}function vQ(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,c=e.animationElapsedTime,u=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,g=o.stroke,v=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=xO(o,oQ),N=rn(S),E=Js(Js({},N),{},{id:k,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:c,isAnimating:u,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(nn,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},y.createElement(NG,{option:j,DefaultShape:bO.shape,shapeProps:E})),y.createElement(pQ,{points:t,props:S,clipPathId:a}))}function yQ(e,t,r){if(Ee(e)){var n=Ee(t)?t:void 0;return mi(n,e,r)}if(Yt(e)||Kn(e)){var a=Ee(t)?t:void 0;return mi(a,0,r)}return e}function xQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,c=n.points,u=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,g=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,j=y.useMemo(()=>({points:c,baseLine:u}),[c,u]),k=JP(j,o),S=Vy(),N=HG(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,A=N.handleAnimationStart,P=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var O;return Array.isArray(u)&&Array.isArray(_)?O=uy(_,u,v):Array.isArray(u)?O=uy(null,u,v):O=null,y.createElement(WG,{animationInput:j,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:g,onAnimationStart:A,onAnimationEnd:P,animationInterpolateFn:b,animationMatchBy:v,layout:S},(D,U,B)=>{var F;return U===1?F=u:Array.isArray(u)?F=b(O,U,S):F=B?u:yQ(u,_,U),k.syncStepValue(F,U),y.createElement(gQ,{showLabels:!E,points:c},n.children,y.createElement(vQ,{points:D,baseLine:F,needClip:t,clipPathId:r,props:n,animationElapsedTime:U,isAnimating:E||U<1,isEntrance:B}),y.createElement(mG,{label:n.label}))})}function bQ(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=y.useRef(null),o=y.useRef();return y.createElement(xQ,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class wQ extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,c=t.top,u=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,g=t.width,v=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=nt("recharts-area",o),N=b,E=Gq(n),A=E.r,P=E.strokeWidth,_=XP(n),O=A*2+P,D=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return y.createElement(Mi,{zIndex:k},y.createElement(nn,{className:S},f&&y.createElement("defs",null,y.createElement(Kq,{clipPathId:N,xAxisId:h,yAxisId:m}),!_&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:u-O/2,y:c-O/2,width:g+O,height:v+O}))),y.createElement(bQ,{needClip:f,clipPathId:N,props:this.props})),y.createElement(m2,{points:a,mainColor:ih(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(j)&&y.createElement(m2,{points:j,mainColor:ih(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function kQ(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,c=e.connectNulls,u=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,g=e.isAnimationActive,v=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=xO(e,sQ),N=nl(),E=CP(),A=fO(j,k),P=A.needClip,_=Pr(),O=(t=Me(he=>Zq(he,e.id,_)))!==null&&t!==void 0?t:{},D=O.points,U=O.isRange,B=O.baseLine,F=rx();if(N!=="horizontal"&&N!=="vertical"||F==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Y=F.height,H=F.width,pe=F.x,ue=F.y;return!D||!D.length?null:y.createElement(wQ,nh({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:B,connectNulls:c,dot:u,fill:f,fillOpacity:h,height:Y,hide:m,layout:N,isAnimationActive:g,isRange:U,legendType:v,needClip:P,points:D,stroke:b,width:H,left:pe,top:ue,xAxisId:j,yAxisId:k}))}var jQ=(e,t,r,n,a)=>{var o=r??t;if(Ee(o))return o;var c=e==="horizontal"?a:n,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),h=Math.min(u[0],u[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function SQ(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,c=e.layout,u=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,g=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=jQ(c,u,n,f,h),N=c==="horizontal",E=!1,A=m.map((_,O)=>{var D,U,B,F;if(k)F=o[g+O];else{var Y=Lt(_,a);Array.isArray(Y)?(F=Y,E=!0):F=[S,Y]}var H=(D=(U=F)===null||U===void 0?void 0:U[1])!==null&&D!==void 0?D:null,pe=H==null||k&&!r&&Lt(_,a)==null;if(N){var ue;return{x:yk({axis:f,ticks:v,bandSize:j,entry:_,index:O}),y:pe?null:(ue=h.scale.map(H))!==null&&ue!==void 0?ue:null,value:F,payload:_}}return{x:pe?null:(B=f.scale.map(H))!==null&&B!==void 0?B:null,y:yk({axis:h,ticks:b,bandSize:j,entry:_,index:O}),value:F,payload:_}}),P;return k||E?P=A.map(_=>{var O,D=Array.isArray(_.value)?_.value[0]:null;if(N){var U;return{x:_.x,y:D!=null&&_.y!=null&&(U=h.scale.map(D))!==null&&U!==void 0?U:null,payload:_.payload}}return{x:D!=null&&(O=f.scale.map(D))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):P=N?h.scale.map(S):f.scale.map(S),{points:A,baseLine:P??0,isRange:E}}function NQ(e){var t=on(e,bO),r=Pr();return y.createElement(JG,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(AG,{legendPayload:hQ(t)}),y.createElement(mQ,{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(oV,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:lz(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(kQ,nh({},t,{id:n}))))}var wO=y.memo(NQ,Fh);wO.displayName="Area";var EQ=["domain","range"],AQ=["domain","range"];function S2(e,t){if(e==null)return{};var r,n,a=CQ(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 CQ(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 N2(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 kO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,a=S2(e,EQ),o=t.domain,c=t.range,u=S2(t,AQ);return!N2(r,o)||!N2(n,c)?!1:Fh(a,u)}var PQ=["type"],OQ=["dangerouslySetInnerHTML","ticks","scale"],_Q=["id","scale"];function cy(){return cy=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},cy.apply(null,arguments)}function E2(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 A2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(r),!0).forEach(function(n){MQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MQ(e,t,r){return(t=IQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IQ(e){var t=TQ(e,"string");return typeof t=="symbol"?t:t+""}function TQ(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 dy(e,t){if(e==null)return{};var r,n,a=DQ(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 DQ(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=Nt(),r=y.useRef(null),n=Vy(),a=e.type,o=dy(e,PQ),c=Wh(n,"xAxis",a),u=y.useMemo(()=>{if(c!=null)return A2(A2({},o),{},{type:c})},[o,c]);return y.useLayoutEffect(()=>{u!=null&&(r.current===null?t(bV(u)):r.current!==u&&t(wV({prev:r.current,next:u})),r.current=u)},[u,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(kV(r.current)),r.current=null)},[t]),null}var LQ=e=>{var t=e.xAxisId,r=e.className,n=Me(V5),a=Pr(),o="xAxis",c=Me(v=>nP(v,o,t,a)),u=Me(v=>vU(v,t)),f=Me(v=>jU(v,t)),h=Me(v=>bC(v,t));if(u==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=dy(e,OQ);h.id,h.scale;var g=dy(h,_Q);return y.createElement(ix,cy({},m,g,{x:f.x,y:f.y,width:u.width,height:u.height,className:nt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:c,axisType:o,axisId:t}))},$Q={allowDataOverflow:Ct.allowDataOverflow,allowDecimals:Ct.allowDecimals,allowDuplicatedCategory:Ct.allowDuplicatedCategory,angle:Ct.angle,axisLine:xi.axisLine,height:Ct.height,hide:!1,includeHidden:Ct.includeHidden,interval:Ct.interval,label:!1,minTickGap:Ct.minTickGap,mirror:Ct.mirror,orientation:Ct.orientation,padding:Ct.padding,reversed:Ct.reversed,scale:Ct.scale,tick:Ct.tick,tickCount:Ct.tickCount,tickLine:xi.tickLine,tickSize:xi.tickSize,type:Ct.type,niceTicks:Ct.niceTicks,xAxisId:0},zQ=e=>{var t=on(e,$Q);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(LQ,t))},jO=y.memo(zQ,kO);jO.displayName="XAxis";var FQ=["type"],BQ=["dangerouslySetInnerHTML","ticks","scale"],UQ=["id","scale"];function fy(){return fy=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},fy.apply(null,arguments)}function C2(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 P2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C2(Object(r),!0).forEach(function(n){HQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HQ(e,t,r){return(t=WQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WQ(e){var t=KQ(e,"string");return typeof t=="symbol"?t:t+""}function KQ(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 hy(e,t){if(e==null)return{};var r,n,a=GQ(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 GQ(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 VQ(e){var t=Nt(),r=y.useRef(null),n=Vy(),a=e.type,o=hy(e,FQ),c=Wh(n,"yAxis",a),u=y.useMemo(()=>{if(c!=null)return P2(P2({},o),{},{type:c})},[c,o]);return y.useLayoutEffect(()=>{u!=null&&(r.current===null?t(jV(u)):r.current!==u&&t(SV({prev:r.current,next:u})),r.current=u)},[u,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(NV(r.current)),r.current=null)},[t]),null}function qQ(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=y.useRef(null),c=y.useRef(null),u=Me(V5),f=Pr(),h=Nt(),m="yAxis",g=Me(N=>EU(N,t)),v=Me(N=>NU(N,t)),b=Me(N=>nP(N,m,t,f)),j=Me(N=>wC(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!g||J0(a)||y.isValidElement(a)||j==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(EV({id:t,width:E}))}}},[b,g,h,a,t,n,j]),g==null||v==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=hy(e,BQ);j.id,j.scale;var S=hy(j,UQ);return y.createElement(ix,fy({},k,S,{ref:o,labelRef:c,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:nt("recharts-".concat(m," ").concat(m),r),viewBox:u,ticks:b,axisType:m,axisId:t}))}var QQ={allowDataOverflow:Pt.allowDataOverflow,allowDecimals:Pt.allowDecimals,allowDuplicatedCategory:Pt.allowDuplicatedCategory,angle:Pt.angle,axisLine:xi.axisLine,hide:!1,includeHidden:Pt.includeHidden,interval:Pt.interval,label:!1,minTickGap:Pt.minTickGap,mirror:Pt.mirror,orientation:Pt.orientation,padding:Pt.padding,reversed:Pt.reversed,scale:Pt.scale,tick:Pt.tick,tickCount:Pt.tickCount,tickLine:xi.tickLine,tickSize:xi.tickSize,type:Pt.type,niceTicks:Pt.niceTicks,width:Pt.width,yAxisId:0},YQ=e=>{var t=on(e,QQ);return y.createElement(y.Fragment,null,y.createElement(VQ,{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(qQ,t))},SO=y.memo(YQ,kO);SO.displayName="YAxis";var XQ=(e,t)=>t,lx=q([XQ,ft,DA,Ft,kP,_i,qH,Zt],tW);function ZQ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function ux(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(ZQ(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 c=(u,f)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>c(u.clientX,u.clientY)):c(e.clientX,e.clientY)}var NO=Hr("mouseClick"),EO=Zu();EO.startListening({actionCreator:NO,effect:(e,t)=>{var r=e.payload,n=lx(t.getState(),ux(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(BU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var my=Hr("mouseMove"),AO=Zu(),hs=null,Ha=null,Bg=null;AO.startListening({actionCreator:my,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,c=a.throttledEvents,u=c==="all"||(c==null?void 0:c.includes("mousemove"));hs!==null&&(cancelAnimationFrame(hs),hs=null),Ha!==null&&(typeof o!="number"||!u)&&(clearTimeout(Ha),Ha=null),Bg=ux(r);var f=()=>{var h=t.getState(),m=dc(h,h.tooltip.settings.shared);if(!Bg){hs=null,Ha=null;return}if(m==="axis"){var g=lx(h,Bg);(g==null?void 0:g.activeIndex)!=null?t.dispatch(fP({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(dP())}hs=null,Ha=null};if(!u){f();return}o==="raf"?hs=requestAnimationFrame(f):typeof o=="number"&&Ha===null&&(Ha=setTimeout(f,o))}});function JQ(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 O2={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},CO=lr({name:"rootProps",initialState:O2,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:O2.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}}}),eY=CO.reducer,tY=CO.actions.updateOptions,rY=null,nY={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)},PO=lr({name:"polarOptions",initialState:rY,reducers:nY});PO.actions.updatePolarOptions;var iY=PO.reducer,OO=Hr("keyDown"),_O=Hr("focus"),MO=Hr("blur"),om=Zu(),ms=null,Wa=null,Gd=null;om.startListening({actionCreator:OO,effect:(e,t)=>{Gd=e.payload,ms!==null&&(cancelAnimationFrame(ms),ms=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,c=o==="all"||o.includes("keydown");Wa!==null&&(typeof a!="number"||!c)&&(clearTimeout(Wa),Wa=null);var u=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,g=Gd;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var v=xu(m,No(f),Xs(f),Zs(f)),b=v==null?-1:Number(v),j=!Number.isFinite(b)||b<0,k=_i(f),S=No(f),N=dc(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var E=Zf(f,N,"hover",String(m.index));t.dispatch(Xf({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var A=_U(f),P=A==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,O;if(j){var D=Xs(f),U=Zs(f),B=_*P,F=he=>({active:!1,index:String(he),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,B>0){for(var Y=0;Y<S.length;Y++)if(xu(F(Y),S,D,U)!=null){O=Y;break}}else for(var H=S.length-1;H>=0;H--)if(xu(F(H),S,D,U)!=null){O=H;break}if(O<0)return}else{O=b+_*P;var pe=(k==null?void 0:k.length)||S.length;if(pe===0||O>=pe||O<0)return}var ue=Zf(f,N,"hover",String(O));t.dispatch(Xf({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{ms=null,Wa=null}};if(!c){u();return}a==="raf"?ms=requestAnimationFrame(u):typeof a=="number"&&Wa===null&&(u(),Gd=null,Wa=setTimeout(()=>{Gd?u():(Wa=null,ms=null)},a))}});om.startListening({actionCreator:_O,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",c=dc(r,r.tooltip.settings.shared),u=Zf(r,c,"hover",String(o));t.dispatch(Xf({active:!0,activeIndex:o,activeCoordinate:u}))}}}});om.startListening({actionCreator:MO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Xf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function IO(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 Xr=Hr("externalEvent"),TO=Zu(),Vd=new Map,uu=new Map,Ug=new Map;TO.startListening({actionCreator:Xr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,c=IO(a);Ug.set(o,{handler:n,reactEvent:c});var u=Vd.get(o);u!==void 0&&(cancelAnimationFrame(u),Vd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,g=h.throttledEvents,v=g,b=v==="all"||(v==null?void 0:v.includes(o)),j=uu.get(o);j!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(j),uu.delete(o));var k=()=>{var E=Ug.get(o);try{if(!E)return;var A=E.handler,P=E.reactEvent,_=t.getState(),O={activeCoordinate:IH(_),activeDataKey:OH(_),activeIndex:Fu(_),activeLabel:NP(_),activeTooltipIndex:Fu(_),isTooltipActive:TH(_)};A&&A(O,P)}finally{Vd.delete(o),uu.delete(o),Ug.delete(o)}};if(!b){k();return}if(m==="raf"){var S=requestAnimationFrame(k);Vd.set(o,S)}else if(typeof m=="number"){if(!uu.has(o)){k();var N=setTimeout(k,m);uu.set(o,N)}}else k()}}});var aY=q([dl],e=>e.tooltipItemPayloads),oY=q([aY,(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)}}}),DO=Hr("touchMove"),RO=Zu(),Ka=null,ra=null,_2=null,cu=null;RO.startListening({actionCreator:DO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){cu=IO(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,c=a.throttledEvents,u=c==="all"||c.includes("touchmove");Ka!==null&&(cancelAnimationFrame(Ka),Ka=null),ra!==null&&(typeof o!="number"||!u)&&(clearTimeout(ra),ra=null),_2=Array.from(r.touches).map(h=>ux({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(cu!=null){var h=t.getState(),m=dc(h,h.tooltip.settings.shared);if(m==="axis"){var g,v=(g=_2)===null||g===void 0?void 0:g[0];if(v==null){Ka=null,ra=null;return}var b=lx(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(fP({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var j,k=cu.touches[0];if(document.elementFromPoint==null||k==null)return;var S=document.elementFromPoint(k.clientX,k.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(pz),E=(j=S.getAttribute(gz))!==null&&j!==void 0?j:void 0,A=Io(h).find(O=>O.id===E);if(N==null||A==null||E==null)return;var P=A.dataKey,_=oY(h,N,E);t.dispatch(FU({activeDataKey:P,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Ka=null,ra=null}};if(!u){f();return}o==="raf"?Ka=requestAnimationFrame(f):typeof o=="number"&&ra===null&&(f(),cu=null,ra=setTimeout(()=>{cu?f():(ra=null,Ka=null)},o))}}});var LO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},$O=lr({name:"eventSettings",initialState:LO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),sY=$O.actions.setEventSettings,lY=$O.reducer,uY=m5({brush:RV,cartesianAxis:AV,chartData:MW,errorBars:Wq,eventSettings:lY,graphicalItems:iV,layout:J$,legend:h6,options:AW,polarAxis:gG,polarOptions:iY,referenceElements:FV,renderedTicks:lq,rootProps:eY,tooltip:UU,zIndex:mW}),cY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return S$({reducer:uY,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([EO.middleware,AO.middleware,om.middleware,TO.middleware,RO.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(P5({type:"raf"}))},devTools:{serialize:{replacer:JQ},name:"recharts-".concat(r)}})};function dY(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=Pr(),o=y.useRef(null);if(a)return r;o.current==null&&(o.current=cY(t,n));var c=$y;return y.createElement(P6,{context:c,store:o.current},r)}function fY(e){var t=e.layout,r=e.margin,n=Nt(),a=Pr();return y.useEffect(()=>{a||(n(Y$(t)),n(Q$(r)))},[n,a,t,r]),null}var hY=y.memo(fY,Fh);function mY(e){var t=Nt();return y.useEffect(()=>{t(tY(e))},[t,e]),null}var pY=e=>{var t=Nt();return y.useEffect(()=>{t(sY(e))},[t,e]),null},gY=y.memo(pY,Fh);function M2(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),a=Nt();return y.useLayoutEffect(()=>(n.current&&a(fW({zIndex:t,element:n.current,isPanorama:r})),()=>{a(hW({zIndex:t,isPanorama:r}))}),[a,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function I2(e){var t=e.children,r=e.isPanorama,n=Me(nW);if(!n||n.length===0)return t;var a=n.filter(c=>c<0),o=n.filter(c=>c>0);return y.createElement(y.Fragment,null,a.map(c=>y.createElement(M2,{key:c,zIndex:c,isPanorama:r})),t,o.map(c=>y.createElement(M2,{key:c,zIndex:c,isPanorama:r})))}var vY=["children"];function yY(e,t){if(e==null)return{};var r,n,a=xY(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 xY(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 ah(){return ah=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},ah.apply(null,arguments)}var bY={width:"100%",height:"100%",display:"block"},wY=y.forwardRef((e,t)=>{var r=Z5(),n=J5(),a=uA();if(!Vn(r)||!Vn(n))return null;var o=e.children,c=e.otherAttributes,u=e.title,f=e.desc,h,m;return c!=null&&(typeof c.tabIndex=="number"?h=c.tabIndex:h=a?0:void 0,typeof c.role=="string"?m=c.role:m=a?"application":void 0),y.createElement(ME,ah({},c,{title:u,desc:f,role:m,tabIndex:h,width:r,height:n,style:bY,ref:t}),o)}),kY=e=>{var t=e.children,r=Me(Dh);if(!r)return null;var n=r.width,a=r.height,o=r.y,c=r.x;return y.createElement(ME,{width:n,height:a,x:c,y:o},t)},T2=y.forwardRef((e,t)=>{var r=e.children,n=yY(e,vY),a=Pr();return a?y.createElement(kY,null,y.createElement(I2,{isPanorama:!0},r)):y.createElement(wY,ah({ref:t},n),y.createElement(I2,{isPanorama:!1},r))});function jY(e,t){return AY(e)||EY(e,t)||NY(e,t)||SY()}function SY(){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 NY(e,t){if(e){if(typeof e=="string")return D2(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)?D2(e,t):void 0}}function D2(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 EY(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function AY(e){if(Array.isArray(e))return e}function CY(){var e=Nt(),t=y.useState(null),r=jY(t,2),n=r[0],a=r[1],o=Me(mz);return y.useEffect(()=>{if(n!=null){var c=n.getBoundingClientRect(),u=c.width/n.offsetWidth;We(u)&&u!==o&&e(Z$(u))}},[n,e,o]),a}function R2(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 PY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R2(Object(r),!0).forEach(function(n){OY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OY(e,t,r){return(t=_Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Y(e){var t=MY(e,"string");return typeof t=="symbol"?t:t+""}function MY(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 ka(){return ka=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},ka.apply(null,arguments)}function oh(e,t){return RY(e)||DY(e,t)||TY(e,t)||IY()}function IY(){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 TY(e,t){if(e){if(typeof e=="string")return L2(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)?L2(e,t):void 0}}function L2(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 DY(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,u=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);f=!0);}catch(m){h=!0,a=m}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return u}}function RY(e){if(Array.isArray(e))return e}var LY=()=>(BW(),null);function sh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var $Y=y.forwardRef((e,t)=>{var r,n,a=y.useRef(null),o=y.useState({containerWidth:sh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:sh((n=e.style)===null||n===void 0?void 0:n.height)}),c=oh(o,2),u=c[0],f=c[1],h=y.useCallback((g,v)=>{f(b=>{var j=Math.round(g),k=Math.round(v);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),m=y.useCallback(g=>{if(typeof t=="function"&&t(g),a.current!=null&&(a.current.disconnect(),a.current=null),g!=null&&typeof ResizeObserver<"u"){var v=g.getBoundingClientRect(),b=v.width,j=v.height;h(b,j);var k=N=>{var E=N[0];if(E!=null){var A=E.contentRect,P=A.width,_=A.height;h(P,_)}},S=new ResizeObserver(k);S.observe(g),a.current=S}},[t,h]);return y.useEffect(()=>()=>{var g=a.current;g!=null&&g.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(ec,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",ka({ref:m},e)))}),zY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=y.useState({containerWidth:sh(r),containerHeight:sh(n)}),o=oh(a,2),c=o[0],u=o[1],f=y.useCallback((m,g)=>{u(v=>{var b=Math.round(m),j=Math.round(g);return v.containerWidth===b&&v.containerHeight===j?v:{containerWidth:b,containerHeight:j}})},[]),h=y.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var g=m.getBoundingClientRect(),v=g.width,b=g.height;f(v,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(ec,{width:c.containerWidth,height:c.containerHeight}),y.createElement("div",ka({ref:h},e)))}),FY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(ec,{width:r,height:n}),y.createElement("div",ka({ref:t},e)))}),BY=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(zY,ka({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(FY,ka({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(ec,{width:r,height:n}),y.createElement("div",ka({ref:t},e)))});function UY(e){return e?$Y:BY}var HY=y.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,c=e.onContextMenu,u=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,g=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,A=e.dispatchTouchEvents,P=A===void 0?!0:A,_=y.useRef(null),O=Nt(),D=y.useState(null),U=oh(D,2),B=U[0],F=U[1],Y=y.useState(null),H=oh(Y,2),pe=H[0],ue=H[1],he=CY(),ae=Ky(),se=(ae==null?void 0:ae.width)>0?ae.width:N,X=(ae==null?void 0:ae.height)>0?ae.height:a,te=y.useCallback(Oe=>{he(Oe),typeof t=="function"&&t(Oe),F(Oe),ue(Oe),Oe!=null&&(_.current=Oe)},[he,t,F,ue]),J=y.useCallback(Oe=>{O(NO(Oe)),O(Xr({handler:o,reactEvent:Oe}))},[O,o]),I=y.useCallback(Oe=>{O(my(Oe)),O(Xr({handler:h,reactEvent:Oe}))},[O,h]),M=y.useCallback(Oe=>{O(dP()),O(Xr({handler:m,reactEvent:Oe}))},[O,m]),K=y.useCallback(Oe=>{O(my(Oe)),O(Xr({handler:g,reactEvent:Oe}))},[O,g]),ne=y.useCallback(()=>{O(_O())},[O]),Z=y.useCallback(()=>{O(MO())},[O]),me=y.useCallback(Oe=>{O(OO(Oe.key))},[O]),ge=y.useCallback(Oe=>{O(Xr({handler:c,reactEvent:Oe}))},[O,c]),Pe=y.useCallback(Oe=>{O(Xr({handler:u,reactEvent:Oe}))},[O,u]),re=y.useCallback(Oe=>{O(Xr({handler:f,reactEvent:Oe}))},[O,f]),xe=y.useCallback(Oe=>{O(Xr({handler:v,reactEvent:Oe}))},[O,v]),_e=y.useCallback(Oe=>{O(Xr({handler:k,reactEvent:Oe}))},[O,k]),ie=y.useCallback(Oe=>{P&&O(DO(Oe)),O(Xr({handler:j,reactEvent:Oe}))},[O,P,j]),Je=y.useCallback(Oe=>{O(Xr({handler:b,reactEvent:Oe}))},[O,b]),Fe=UY(E);return y.createElement(IP.Provider,{value:B},y.createElement(nR.Provider,{value:pe},y.createElement(Fe,{width:se??(S==null?void 0:S.width),height:X??(S==null?void 0:S.height),className:nt("recharts-wrapper",n),style:PY({position:"relative",cursor:"default",width:se,height:X},S),onClick:J,onContextMenu:ge,onDoubleClick:Pe,onFocus:ne,onBlur:Z,onKeyDown:me,onMouseDown:re,onMouseEnter:I,onMouseLeave:M,onMouseMove:K,onMouseUp:xe,onTouchEnd:Je,onTouchMove:ie,onTouchStart:_e,ref:te},y.createElement(LY,null),r)))}),WY=["width","height","responsive","children","className","style","compact","title","desc"];function KY(e,t){if(e==null)return{};var r,n,a=GY(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 GY(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 VY=y.forwardRef((e,t)=>{var r=e.width,n=e.height,a=e.responsive,o=e.children,c=e.className,u=e.style,f=e.compact,h=e.title,m=e.desc,g=KY(e,WY),v=kn(g);return f?y.createElement(y.Fragment,null,y.createElement(ec,{width:r,height:n}),y.createElement(T2,{otherAttributes:v,title:h,desc:m},o)):y.createElement(HY,{className:c,style:u,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(T2,{otherAttributes:v,title:h,desc:m,ref:t},y.createElement(VV,null,o)))});function py(){return py=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},py.apply(null,arguments)}function $2(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 qY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(r),!0).forEach(function(n){QY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QY(e,t,r){return(t=YY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YY(e){var t=XY(e,"string");return typeof t=="symbol"?t:t+""}function XY(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 ZY={top:5,right:5,bottom:5,left:5},JY=qY({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:ZY,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},LO),eX=y.forwardRef(function(t,r){var n,a=on(t.categoricalChartProps,JY),o=t.chartName,c=t.defaultTooltipEventType,u=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,m={chartName:o,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return y.createElement(dY,{preloadedState:{options:m},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},y.createElement(DV,{chartData:h.data}),y.createElement(hY,{layout:a.layout,margin:a.margin}),y.createElement(gY,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),y.createElement(mY,{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(VY,py({},a,{ref:r})))}),tX=["axis"],rX=y.forwardRef((e,t)=>y.createElement(eX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:tX,tooltipPayloadSearcher:NW,categoricalChartProps:e,ref:t}));const nX="rgba(130,130,150,0.14)",z2="rgba(130,130,150,0.85)";function iX(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 zO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function aX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:l.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:l.jsx("div",{className:"space-y-1",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),l.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),l.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:zO(n.value,r)})]},n.dataKey))})})}function FO({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((u,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),u),0),c=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(iX(o*1.15),10);return l.jsx("div",{style:{height:a},className:"w-full",children:l.jsx(Qz,{width:"100%",height:"100%",children:l.jsxs(rX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[l.jsx("defs",{children:t.map(u=>l.jsxs("linearGradient",{id:`grad-${u.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:u.color,stopOpacity:.22}),l.jsx("stop",{offset:"100%",stopColor:u.color,stopOpacity:0})]},u.key))}),l.jsx(cO,{vertical:!1,stroke:nX}),l.jsx(jO,{dataKey:"t",hide:!0}),l.jsx(SO,{domain:[0,c],ticks:[0,c/2,c],tickFormatter:u=>zO(u,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:z2}}),l.jsx(eK,{content:l.jsx(aX,{unit:r}),cursor:{stroke:z2,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(u=>l.jsx(wO,{type:"monotone",dataKey:u.key,name:u.label,stroke:u.color,strokeWidth:2,fill:`url(#grad-${u.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},u.key))]})})})}const oX=[{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 BO(){var c,u,f,h;const{sys:e,hist:t}=KD(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=oX.filter(m=>m.key!=="gpu"||r),a={cpu:(c=e==null?void 0:e.cpu)==null?void 0:c.percent,ram:(u=e==null?void 0:e.ram)==null?void 0:u.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?`${aa(e.ram.used)}/${aa(e.ram.total)} GB`:"",gpu:r?`${aa(e.gpu.gtt_used)}/${aa(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${aa(e.disk.used)}/${aa(e.disk.total)} GB`:""};return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx(Hn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),l.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),l.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[m.key]??0),"%"]}),o[m.key]&&l.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),l.jsx(FO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):l.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)&&l.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&&l.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&l.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function du({label:e,value:t,tone:r}){return l.jsxs("div",{className:ee("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:[l.jsx("span",{className:"flex items-center gap-1.5",children:e}),l.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function sX(){var r;const{data:e}=vh(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return l.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:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(D4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&l.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?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(du,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),l.jsx(du,{label:"Inferenz-Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),l.jsx(du,{label:"Router (llama-swap)",tone:e.swap>0?"alert":"muted",value:e.swap>0?"Update verfügbar":"aktuell"}),l.jsx(du,{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=>l.jsx(du,{tone:n.update===!0?"alert":"muted",label:l.jsxs(l.Fragment,{children:[n.name,n.reachable===!1&&l.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))]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),l.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 ",l.jsx(ch,{className:"h-3.5 w-3.5"})]})]})}function UO({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:c,onCancel:u}){const f=y.useRef(null);return l.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),l.jsx("button",{onClick:u||(()=>c()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(Wn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,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 m;h.key==="Enter"&&c((m=f.current)==null?void 0:m.value)}}),a!==void 0&&l.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"})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&l.jsx("button",{onClick:u,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"}),l.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;c(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 Aa(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((u,f,h)=>{t({type:"alert",title:u,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=y.useCallback((u,f,h,m)=>{t({type:"confirm",title:u,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=y.useCallback((u,f,h,m,g,v)=>{t({type:"prompt",title:u,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),g==null||g()}})},[]),c=e?l.jsx(UO,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:c}}function lX(){const e=Yn(),{data:t}=Oy(3e3),{data:r}=Ni(),{showAlert:n,dialogElement:a}=Aa(),[o,c]=y.useState(!1),u=(r==null?void 0:r.models)??[];async function f(h){try{await Se("/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:Ve.agentStatus}),c(!1)}catch(m){n("Fehler",`Fehler beim Wechseln des Gehirns: ${m.message}`)}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(wn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&l.jsxs("a",{href:Ks(t.terminal_url),target:"_blank",rel:"noopener",className:ee("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[l.jsx(Us,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),l.jsxs("div",{onClick:()=>c(!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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),l.jsx(Hn,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[l.jsx(ky,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),l.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),l.jsx(Qu,{className:"h-3 w-3 text-primary"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[l.jsxs("div",{children:["Config: ",t.has_config?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Skills: ",t.has_skills?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),l.jsxs("div",{children:["Memory: ",t.has_memories?l.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):l.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&l.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"Telegram"}),l.jsx("span",{className:ee("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"MCP-Server"}),l.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),l.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[l.jsx("span",{children:"PC Executor"}),l.jsx("span",{className:ee("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(Hn,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),l.jsx("button",{onClick:()=>c(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(Wn,{className:"h-4 w-4"})})]}),l.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 (',l.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",l.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),l.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...u.map(h=>{var m;return((m=h.name.split("/").pop())==null?void 0:m.replace(".gguf",""))||h.name})].map(h=>{const m=["auto","fast","heavy"].includes(h);return l.jsxs("button",{onClick:()=>f(h),className:ee("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:[l.jsxs("div",{className:"flex flex-col text-left",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:m?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&l.jsx(sr,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function uX(){const e=Yn(),{data:t=[]}=vv({limit:3}),[r,n]=y.useState(""),[a,o]=y.useState("stable"),[c,u]=y.useState(!1);async function f(){if(!(!r.trim()||c)){u(!0);try{await Se("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{u(!1)}}}return l.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:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(Ao,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("textarea",{value:r,onChange:h=>n(h.target.value),"aria-label":"Fakt oder Regel im Gedächtnis speichern",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"}),l.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[l.jsxs("select",{value:a,onChange:h=>o(h.target.value),"aria-label":"Kategorie",className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[l.jsx("option",{value:"stable",children:"🔵 Fakt"}),l.jsx("option",{value:"instruction",children:"📋 Regel"}),l.jsx("option",{value:"user",children:"👤 User"}),l.jsx("option",{value:"versioned",children:"🟡 Version"})]}),l.jsxs("button",{onClick:f,disabled:!r.trim()||c,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:[l.jsx(df,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),l.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[l.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),l.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?l.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>l.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[l.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}),l.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),l.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 F2=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function HO(){const{data:e}=Py(3e3),t=HD(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(uh,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&l.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[l.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&l.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[l.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",l.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),l.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),l.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:F2.map(a=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:a.label}),l.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[a.key])??0)})]},a.key))})]}),e?l.jsx(FO,{data:t,series:F2,unit:" tok/s",yMode:"auto",height:150}):l.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),l.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 cX(){const{data:e}=NE(3e3),{showAlert:t,dialogElement:r}=Aa(),[n,a]=y.useState({});async function o(c){a(u=>({...u,[c]:!0}));try{const u=await Se("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:c})});u.ok||t("Fehler",`Neustart fehlgeschlagen: ${u.err||"Unbekannt"}`)}catch(u){t("Fehler",`Fehler: ${u.message}`)}finally{a(u=>({...u,[c]:!1}))}}return l.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:[l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ff,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),l.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?l.jsxs("div",{className:"flex flex-1 flex-col",children:[l.jsx("div",{className:"space-y-1.5",children:e.services.map(c=>l.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:ee("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",c.ok?"bg-emerald-500":"bg-amber-500")}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:c.name}),l.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:c.url})]})]}),l.jsx("button",{onClick:()=>o(c.name),disabled:n[c.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:l.jsx(Xa,{className:ee("h-3.5 w-3.5",n[c.name]&&"animate-spin")})})]},c.name))}),l.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:[l.jsxs("a",{href:Ks(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:[l.jsx(Us,{className:"h-3 w-3"})," Engine"]}),l.jsxs("a",{href:Ks(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:[l.jsx(Us,{className:"h-3 w-3"})," Gateway"]})]})]}):l.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}const Hg=[{key:"stt",label:"STT",hint:"Sprache → Text"},{key:"vision",label:"Bildschirm-Sicht",hint:"Vision-Beschreibung"},{key:"chat_ttfb",label:"Chat-TTFB",hint:"Zeit bis 1. Token"},{key:"tts",label:"TTS",hint:"Text → Sprache"}];function qd(e){return e==null?"—":e>=1e3?`${(e/1e3).toFixed(2)} s`:`${Math.round(e)} ms`}function dX({stat:e,label:t,hint:r,maxP95:n}){const a=!!e&&e.count>0,o=a&&e.p95_ms&&n>0?Math.max(4,Math.min(100,e.p95_ms/n*100)):0;return l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[l.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold text-foreground",children:t}),l.jsx("span",{className:"truncate text-[10px] text-muted-foreground/60",children:r})]}),a?l.jsx("span",{className:"shrink-0 font-mono text-sm font-bold tabular-nums text-foreground",children:qd(e.p50_ms)}):l.jsx("span",{className:"shrink-0 text-[10px] italic text-muted-foreground/50",children:"noch keine Messungen"})]}),l.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-background/50 border border-border/30",children:l.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-teal-500 to-indigo-500 transition-all duration-500",style:{width:`${o}%`}})}),a&&l.jsxs("div",{className:"flex items-center gap-3 font-mono text-[10px] text-muted-foreground/65",children:[l.jsxs("span",{children:["p50 ",qd(e.p50_ms)]}),l.jsxs("span",{children:["p95 ",qd(e.p95_ms)]}),l.jsxs("span",{children:["zuletzt ",qd(e.last_ms)]}),l.jsxs("span",{className:"text-muted-foreground/45",children:["· n=",e.count]})]})]})}function WO(){const{data:e}=ID(5e3),t=Math.max(1,...Hg.map(n=>{var a;return((a=e==null?void 0:e[n.key])==null?void 0:a.p95_ms)??0})),r=Hg.some(n=>{var a;return(((a=e==null?void 0:e[n.key])==null?void 0:a.count)??0)>0});return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(_N,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Sprach-Latenz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Hg.map(n=>l.jsx(dX,{stat:e==null?void 0:e[n.key],label:n.label,hint:n.hint,maxP95:t},n.key))}),l.jsx("div",{className:"mt-4 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:r?"Server-seitige Dauer je Pipeline-Stufe (p50 prominent). Rollender Schnitt über die letzten Turns; Reset bei Neustart.":"Noch keine Voice-Turns gemessen — sprich einmal über den „Sprechen“-Tab, dann erscheinen hier STT/Vision/Chat/TTS."})]})}const KO=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:Ao,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:CN,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"vision",label:"Lucys Augen",short:"Augen",icon:uf,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:Y3,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Fs,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Fs,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:B4,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"}],GO=KO.map(e=>e.role),B2=Object.fromEntries(KO.map(e=>[e.role,e])),U2=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:Ao,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),fX={fast:"hermes",coder_lite:"coder-lite"};function mr(e){return e&&(B2[e]||B2[fX[e]])||U2(e)}function io({role:e,dense:t=!1,className:r}){const n=mr(e),a=n.icon;return l.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[l.jsx(a,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function hX({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 l.jsxs("span",{className:ee("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 H2(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 mX(){var b,j,k;const{data:e}=Ni(2e3),{data:t}=Py(2e3),{data:r}=Po(),n=(e==null?void 0:e.models)??[],a=(e==null?void 0:e.running)??[],o=((b=r==null?void 0:r.gpu)==null?void 0:b.gtt_total)||((j=r==null?void 0:r.gpu)==null?void 0:j.vram_total)||0,c=((k=r==null?void 0:r.gpu)==null?void 0:k.gtt_used)||0,u=o>0?Math.min(100,c/o*100):0,f=u>=88?"bg-red-500":u>=70?"bg-amber-500":"bg-teal-500",h=u>=88?"text-red-400":u>=70?"text-amber-400":"text-foreground",m=y.useRef(null),[g,v]=y.useState(!1);return y.useEffect(()=>{if(!t)return;const S=t.total_tokens;if(m.current!==null&&S>m.current){v(!0);const N=setTimeout(()=>v(!1),4e3);return m.current=S,()=>clearTimeout(N)}m.current=S},[t==null?void 0:t.total_tokens]),l.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",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(lf,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Modelle"})]}),l.jsxs("span",{className:ee("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",g?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[g?l.jsx(xa,{className:"h-3 w-3 animate-pulse"}):l.jsx(N4,{className:"h-3 w-3"}),g?"Inferenz aktiv":"Idle"]})]}),o>0&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-[10px] font-mono text-muted-foreground/80 mb-1",children:[l.jsx("span",{className:"uppercase tracking-wider font-semibold",children:"Speicher-Pool"}),l.jsxs("span",{children:[l.jsx("span",{className:ee("font-bold",h),children:aa(c)})," / ",aa(o)," GB belegt"]})]}),l.jsx("div",{className:"h-1.5 w-full rounded-full bg-background/50 border border-border/30 overflow-hidden",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",f),style:{width:`${u}%`}})})]}),l.jsx("div",{className:"space-y-2 flex-1",children:GO.map(S=>{var A;const N=n.find(P=>P.role===S),E=N?a.includes(N.name):!1;return l.jsxs("div",{className:ee("flex items-center justify-between gap-2 p-2 rounded-xl border transition-all duration-300",E?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":N?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsx(io,{role:S,className:"shrink-0"}),l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:N?(A=N.name.split("/").pop())==null?void 0:A.replace(/\.gguf$/i,""):"nicht zugewiesen"}),N&&l.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap text-muted-foreground/70",children:[l.jsx("span",{className:"text-[9px] font-mono",children:Lr(N.size_bytes)}),N.prompt_cache&&l.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"}),N.spec_active&&l.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: ${N.spec_draft_model})`,children:"SPEC"}),N.parallel_slots>1&&l.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:`${N.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",N.parallel_slots]}),N.incomplete&&l.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"})]})]})]}),l.jsx("span",{className:"shrink-0",children:N?E?l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full bg-emerald-500",g&&"animate-pulse")})," warm"]}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):l.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},S)})}),l.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. Details & Routing im Modell-Manager."})]})}function pX(){var P,_,O,D,U,B;const{data:e}=Cy(),{data:t}=NE(),{data:r}=Ni(),{data:n}=Po(),a=!!e&&!!t,o=F=>{var Y;return(Y=t==null?void 0:t.services.find(H=>H.name.toLowerCase().includes(F)))==null?void 0:Y.ok},c=e==null?void 0:e.engine_reachable,u=(P=e==null?void 0:e.brain)==null?void 0:P.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find(F=>F.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const F={id:"brain",label:"Lucys Hirn",icon:Ao,critical:!0};return a?c===!1?{...F,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:u===!1?{...F,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...F,status:"ok",detail:"Wach und ansprechbar."}:{...F,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const F={id:"memory",label:"Lucys Gedächtnis",icon:CN,critical:!0},Y=o("mem0");return!a||Y===void 0?{...F,status:"loading",detail:"Wird geprüft …"}:Y?{...F,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...F,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const F={id:"gateway",label:"Verbindung (Gateway)",icon:cf,critical:!0},Y=e?e.gateway_reachable:o("integriert");return!a||Y===void 0?{...F,status:"loading",detail:"Wird geprüft …"}:Y?{...F,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...F,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const F={id:"agent",label:"Lucys Agent (Hermes)",icon:wn,critical:!0},Y=o("hermes-gateway");return!a||Y===void 0?{...F,status:"loading",detail:"Wird geprüft …"}:Y?{...F,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...F,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const F={id:"voice",label:"Lucys Stimme",icon:S4,critical:!1},Y=o("voice");return!a||Y===void 0?{...F,status:"loading",detail:"Wird geprüft …"}:Y?{...F,status:"ok",detail:"Lucy kann hören und sprechen."}:{...F,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((D=n==null?void 0:n.gpu)==null?void 0:D.gtt_total)||((U=n==null?void 0:n.gpu)==null?void 0:U.vram_total)||0,g=((B=n==null?void 0:n.gpu)==null?void 0:B.gtt_used)||0,v=m>0?Math.min(100,g/m*100):0,b=1024**3,j=m?v>=90?{status:"full",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:g/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},k=h.some(F=>F.status==="loading"),S=h.filter(F=>F.critical&&F.status==="down"),N=h.filter(F=>F.status==="warn"||!F.critical&&F.status==="down"),E=j.status==="full";return{verdict:k&&!S.length?"loading":S.length?"problem":N.length||E?"warn":"gut",checks:h,memory:j,problems:S}}const gX={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function VO({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:a}=pX(),{showAlert:o,dialogElement:c}=Aa(),u=Yn(),[f,h]=y.useState({});async function m(S,N){h(E=>({...E,[S]:!0}));try{if(N.kind==="loadModel")await Se(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await Se("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?`
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}u.invalidateQueries({queryKey:Ve.health}),u.invalidateQueries({queryKey:Ve.services}),u.invalidateQueries({queryKey:Ve.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[S]:!1}))}}const g=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:dh,iconCls:"text-muted-foreground animate-spin",title:g.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:h4,iconCls:"text-emerald-400",title:g.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:bi,iconCls:"text-amber-400",title:g.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:bi,iconCls:"text-red-400",title:g.problem,sub:`${a.length} wichtige${a.length===1?"s":""} Problem${a.length===1?"":"e"} gefunden.`}}[t],b=v.icon,j={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],k={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return l.jsxs("div",{className:ee("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:l.jsx(b,{className:ee("h-6 w-6",v.iconCls)})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[l.jsx(yu,{className:"h-3.5 w-3.5"})," Speicher"]}),l.jsx("span",{className:ee("font-mono font-bold",k),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",j),style:{width:`${n.pct}%`}})}),l.jsx("p",{className:ee("mt-1.5 text-[11px]",k),children:n.text})]}),l.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(S=>l.jsx(vX,{c:S,busy:!!f[S.id],onRepair:()=>S.repair&&m(S.id,S.repair)},S.id))}),c]})}function vX({c:e,busy:t,onRepair:r}){const n=e.icon,a=e.status==="down"||e.status==="warn";return l.jsxs("div",{className:ee("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[l.jsx(n,{className:"h-4 w-4"}),l.jsx("span",{className:ee("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",gX[e.status],e.status==="down"&&"animate-pulse")})]}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&l.jsx(sr,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&l.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),l.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),a&&e.repair&&l.jsxs("button",{onClick:r,disabled:t,className:ee("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?l.jsx(dh,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Qu,{className:"h-3.5 w-3.5"}),e.repair.label]}),a&&!e.repair&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[l.jsx(L4,{className:"h-3.5 w-3.5"})," manuell"]})]})}function W2({children:e}){return l.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function yX(){return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),l.jsx(VO,{}),l.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[l.jsx(BO,{}),l.jsx(HO,{}),l.jsx(mX,{})]}),l.jsxs("section",{children:[l.jsx(W2,{children:"Stack & Telemetrie"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx(cX,{}),l.jsx(WO,{})]})]}),l.jsxs("section",{children:[l.jsx(W2,{children:"Betrieb & Wissen"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[l.jsx(sX,{}),l.jsx(lX,{}),l.jsx(uX,{})]})]})]})}function xX(){const e=Yn(),{data:t=[]}=DD(2e3),{showAlert:r,dialogElement:n}=Aa();async function a(u){try{await Se(`/api/jobs/${u}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:Ve.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(u=>u.state==="running"||u.state==="queued"),c=t.filter(u=>u.state!=="running"&&u.state!=="queued").slice(-3);return o.length===0&&c.length===0?null:l.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:[l.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(u=>l.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:u.label}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-muted-foreground font-mono",children:[u.progress??0,"% • ",wv(u.done_bytes),"/",wv(u.total_bytes),u.eta_s?` • ETA ${GD(u.eta_s)}`:""]}),l.jsx("button",{onClick:()=>a(u.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"})]})]}),l.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${u.progress??0}%`}})})]},u.id)),c.map(u=>l.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[l.jsx("span",{className:"truncate",children:u.label}),l.jsx("span",{className:ee("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",u.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:u.state})]},u.id)),n]})}function Ga({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 l.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function K2({caps:e}){return e?l.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&l.jsx(Ga,{children:"💻 Code"}),e.vision&&l.jsx(Ga,{children:"👁 Bild"}),e.reasoning&&l.jsx(Ga,{children:"🧠 Reason"}),e.moe&&l.jsxs(Ga,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&l.jsx(Ga,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&l.jsx(Ga,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&l.jsx(Ga,{children:"🔢 Embed"})]}):null}function bX({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:a}=LD(e.gguf_path),[o,c]=y.useState(null),[u,f]=y.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],g=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){c(N??"__clear__"),f("");try{await Se(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),c(null)}}const j=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[l.jsx(xa,{className:"h-4 w-4"})," Speculative Draft"]}),l.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(Wn,{className:"h-4 w-4"})})]}),l.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 ',l.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),l.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:[l.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&v&&l.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:[l.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[l.jsx(sr,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),l.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)&&l.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:[l.jsx(bi,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),l.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?l.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?l.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 ",l.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."]}):m.map(N=>{var P,_;const E=N.filename===v,A=N.compatible===!0;return l.jsxs("div",{className:ee("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",A?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&l.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),l.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Lr(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),A?E?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[l.jsx(sr,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.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"}):l.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 ${(P=N.vocab)==null?void 0:P.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:[l.jsx(bi,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&m.length>0&&g.length===0&&l.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=",l.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",l.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),u&&l.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:u})]})})}const wX=["fast","heavy","heavy_chars"],kX=["coder_lite","coder","coding_escalate_chars"];function jX(){const e=Yn(),{data:t,isLoading:r}=TD(),[n,a]=y.useState(null),[o,c]=y.useState(!1),[u,f]=y.useState(""),[h,m]=y.useState(0);if(y.useEffect(()=>{t!=null&&t.policy&&!n&&a({...t.policy})},[t,n]),r||!t||!n)return l.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const g=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{a(A=>A&&{...A,[N]:E}),f("")},j=N=>b(N,t.defaults[N]);async function k(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){c(!0),f("");try{const{policy:E}=await _D(N);a({...E}),e.invalidateQueries({queryKey:Ve.routingPolicy}),e.invalidateQueries({queryKey:Ve.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{c(!1)}}}function S({k:N}){const E=g(N),A=n[N],P=n[N]===t.defaults[N];return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!P&&l.jsxs("button",{onClick:()=>j(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[l.jsx(_4,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?l.jsxs("button",{onClick:()=>b(N,!A),className:ee("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",A?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[l.jsx("span",{children:A?"An":"Aus"}),l.jsx("span",{className:ee("h-3.5 w-3.5 rounded-full transition-colors",A?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?l.jsx("input",{type:"number",value:A,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(N,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):l.jsx("input",{type:"text",value:A,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:_=>b(N,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return l.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:[l.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(z4,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),l.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[u&&l.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:u,children:u}),h>0&&l.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[l.jsx(sr,{className:"h-3.5 w-3.5"})," gespeichert"]}),l.jsxs("button",{onClick:k,disabled:!v||o,className:ee("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?l.jsx(dh,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",l.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",l.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(k4,{className:"h-4 w-4 text-teal-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),wX.map(N=>l.jsx(S,{k:N},N))]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(i4,{className:"h-4 w-4 text-indigo-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),kX.map(N=>l.jsx(S,{k:N},N))]})]}),l.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:l.jsx("div",{className:"max-w-xs",children:l.jsx(S,{k:"fast_no_think"})})})]})}function SX(){var pe,ue,he;const e=Yn(),{data:t}=Ni(4e3),{data:r}=EE(),{data:n}=Po(),{data:a}=AE(),{showAlert:o,dialogElement:c}=Aa(),[u,f]=y.useState(!1),[h,m]=y.useState(!1),g=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(pe=r==null?void 0:r.groups)==null?void 0:pe.brains,j=(b==null?void 0:b.members)??[],k=ae=>g.find(se=>se.name===ae),S=ae=>{var se;return((se=ae.split("/").pop())==null?void 0:se.replace(/\.gguf$/i,""))||ae},N=j.map(k).filter(Boolean),E=1024**3,A=a==null?void 0:a.budget,P=N.reduce((ae,se)=>ae+(se.size_bytes||0),0)/E,_=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((he=n==null?void 0:n.gpu)==null?void 0:he.vram_total)||0,O=(A==null?void 0:A.gtt_gb)||(_?_/E:0),D=(A==null?void 0:A.warm_projected_gb)??P,U=O>0?Math.min(100,D/O*100):0,B=g.filter(ae=>!j.includes(ae.name)&&!ae.incomplete);async function F(ae){m(!0);try{await SE("brains",ae,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:Ve.groups}),e.invalidateQueries({queryKey:Ve.models}),e.invalidateQueries({queryKey:Ve.hermesBrain})}catch(se){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(se==null?void 0:se.message)||se}`)}finally{m(!1)}}function Y(ae){const se=k(ae);if(se&&mr(se.role).protected){o("Geschützt",`${mr(se.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}F(j.filter(X=>X!==ae))}function H(ae){f(!1),F([...j,ae])}return b?l.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:[l.jsx(G2,{}),l.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&l.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(ae=>{const se=v.includes(ae.name),X=mr(ae.role).protected;return l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",se?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:se?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),ae.role&&l.jsx(io,{role:ae.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:ae.name,children:S(ae.name)}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:Lr(ae.size_bytes)})]}),X?l.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):l.jsx("button",{onClick:()=>Y(ae.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:l.jsx(Wn,{className:"h-3.5 w-3.5"})})]},ae.name)})]}),l.jsxs("button",{onClick:()=>f(!0),disabled:h||B.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[l.jsx(df,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + Arbeitsspeicher (KV-Cache)",children:[l.jsx(yu,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),l.jsxs("span",{className:"font-mono font-bold text-foreground",children:[D.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",U>=85?"bg-red-500":U>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${U}%`}})}),A&&!A.fits&&l.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[l.jsx(bi,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",A.largest_ondemand_gb," GB, z. B. das große Hirn) passt das Set nicht gleichzeitig in den Speicher. Beim Laden wird das Set kurz verdrängt und danach automatisch nachgeladen — kostet ein paar Sekunden."]})]}),A&&A.fits&&l.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[l.jsx(sr,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),u&&l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:l.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),l.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:l.jsx(Wn,{className:"h-4 w-4"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),l.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:B.map(ae=>l.jsxs("button",{onClick:()=>H(ae.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[ae.role&&l.jsx(io,{role:ae.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:S(ae.name)})]}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:Lr(ae.size_bytes)})]},ae.name))})]})}),c]}):l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsx(G2,{}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),c]})}function G2(){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xa,{className:"h-4.5 w-4.5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function qO(){var Fe,Oe,ut,Jt;const e=Yn(),{data:t,isLoading:r,error:n}=Ni(4e3),{data:a}=vh(4e3),{data:o}=AE(),{data:c}=Po(),{data:u}=EE(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:g}=Aa(),v=gE(),b=W=>!!mr(W).protected,j=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],S=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:Ve.models}),e.invalidateQueries({queryKey:Ve.routing})},E=(Fe=u==null?void 0:u.groups)==null?void 0:Fe.brains,A=(E==null?void 0:E.members)??[],P=W=>A.includes(W),_=A.some(W=>k.includes(W));async function O(W){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Ae=A.includes(W)?A.filter(Be=>Be!==W):[...A,W];try{await SE("brains",Ae,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:Ve.groups}),N()}catch(Be){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${Be.message||Be}`)}}const[D,U]=y.useState(null),[B,F]=y.useState(null),[Y,H]=y.useState(null),[pe,ue]=y.useState("grid"),[he,ae]=y.useState("all"),se=j.filter(W=>he==="in_use"?!!W.role||k.includes(W.name):!0);async function X(W){try{await Se(`/api/models/${encodeURIComponent(W)}/load`,{method:"POST"}),N()}catch(ke){f("Fehler",`Fehler beim Laden des Modells: ${ke.message}`)}}async function te(W){if(E&&_&&!P(W)){const ke=A.filter(Ae=>k.includes(Ae)).map(Ae=>Ae.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`${W.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${ke}) raus — Lucy verliert Hirn bzw. Augen.
Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>X(W));return}X(W)}async function J(W){const ke=j.find(Ae=>Ae.name===W);if(ke&&b(ke.role)){f("Geschützt",`${mr(ke.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await Se(`/api/models/${encodeURIComponent(W)}/unload`,{method:"POST"}),N()}catch(Ae){f("Fehler",`Fehler beim Entladen des Modells: ${Ae.message}`)}}async function I(){try{await Se("/api/models/unload",{method:"POST"}),N()}catch(W){f("Fehler",`Fehler beim Entladen aller Modelle: ${W.message}`)}}async function M(W,ke){try{const Ae=await Se(`/api/models/${encodeURIComponent(ke)}/role`,{method:"POST",body:JSON.stringify({role:W||null})});N(),Ae!=null&&Ae.warning&&f("Hirn gesetzt — Hinweis",Ae.warning)}catch(Ae){f("Fehler",`Fehler beim Zuweisen der Rolle: ${Ae.message||Ae}`)}}function K(W){U(W),F(null),Se(`/api/roles/${encodeURIComponent(W)}/recommend`).then(ke=>F(ke)).catch(()=>{})}async function ne(W,ke){let Ae=null;try{Ae=await Se(`/api/models/${encodeURIComponent(W)}/ctx/auto`)}catch{}const Be=Ae?`Optimal für dein Setup: ${(Ae.ctx/1024).toFixed(0)}k (${Ae.ctx}) — GTT ${Ae.gtt_gb} GB reserviert ${Ae.reserved_gb} GB (${Ae.mode}) → ${Ae.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",Be,String(ke||32768),async et=>{if(et)try{await Se(`/api/models/${encodeURIComponent(W)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(et,10)})}),N()}catch(Ut){f("Fehler",`Fehler beim Setzen des Kontexts: ${Ut.message||Ut}`)}},void 0,Ae?{autoValue:String(Ae.ctx),autoLabel:`Auto (${(Ae.ctx/1024).toFixed(0)}k)`}:void 0)}async function Z(W){const ke=j.find(Ae=>Ae.name===W);if(ke&&b(ke.role)){f("Geschützt",`${mr(ke.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${W}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await Se(`/api/models/${encodeURIComponent(W)}`,{method:"DELETE"}),N()}catch(Ae){f("Fehler",`Fehler beim Löschen: ${Ae.message||Ae}`)}})}async function me(W,ke,Ae,Be){try{await Se("/api/models/install",{method:"POST",body:JSON.stringify({repo:W,role:ke,quant:Ae,jinja:Be})}),f("Herunterladen gestartet",`Download für '${W}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(et){f("Fehler",`Fehler beim Starten des Upgrades: ${et.message||et}`)}}async function ge(W){const ke=o==null?void 0:o.budget,Ae=ke&&!ke.fits?`
⚠ Speicher-Warnung: Dieses Brain (~${ke.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${ke.largest_ondemand_gb} GB) sprengt das das Budget (${ke.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";h("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${W.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Ae}`,async()=>{try{await Se("/api/models/install",{method:"POST",body:JSON.stringify({repo:W,role:"hermes",quant:"Q4_K_M",jinja:!0})}),f("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),N()}catch(Be){f("Fehler",`Update fehlgeschlagen: ${Be.message||Be}`)}})}if(r)return l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(S)return l.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 (",S,")."]});const Pe=j.filter(W=>k.includes(W.name)),re=Pe.reduce((W,ke)=>W+(ke.size_bytes||0),0),xe=((Oe=c==null?void 0:c.gpu)==null?void 0:Oe.gtt_total)||((ut=c==null?void 0:c.gpu)==null?void 0:ut.vram_total)||0,_e=((Jt=c==null?void 0:c.gpu)==null?void 0:Jt.gtt_used)||0,ie=16*1024**3,Je=xe>2*1024**3?xe:re>ie?re*1.2:ie;return l.jsxs("div",{className:"space-y-8",children:[l.jsx("style",{children:`
@keyframes flow-dash {
to {
stroke-dashoffset: -20;
}
}
.svg-flow-path {
stroke-dasharray: 4 6;
animation: flow-dash 1s linear infinite;
}
`}),l.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:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(yu,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Lr(re)," Gewichte",_e>0?` · ${Lr(_e)} real belegt (inkl. KV)`:""," / ",Lr(Je)]}),v&&k.length>0&&l.jsx("button",{onClick:I,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"})]})]}),l.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:Pe.length===0?l.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"}):Pe.map((W,ke)=>{var et;const Ae=(W.size_bytes||0)/Je*100,Be=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][ke%4];return l.jsxs("div",{style:{width:`${Ae}%`},className:ee("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",Be),title:`${W.name} (${Lr(W.size_bytes)})`,children:[l.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[W.role?`[${mr(W.role).short}] `:"",(et=W.name.split("/").pop())==null?void 0:et.replace(".gguf","")]}),l.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Lr(W.size_bytes)})]},W.name)})})]}),l.jsx(SX,{}),v&&l.jsx(jX,{}),l.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:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:GO.map(W=>{var Be;const ke=j.find(et=>et.role===W),Ae=ke?k.includes(ke.name):!1;return l.jsxs("div",{onClick:()=>K(W),className:ee("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]",Ae?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":ke?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(io,{role:W}),Ae&&l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),l.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:ke==null?void 0:ke.name,children:ke?(Be=ke.name.split("/").pop())==null?void 0:Be.replace(/\.gguf$/i,""):"nicht zugewiesen"}),l.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},W)})})]}),(o==null?void 0:o.current)&&l.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:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(wn,{className:"h-4.5 w-4.5 text-indigo-400"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&l.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",o.current.version]})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),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",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),l.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:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:o.current.quant||"GGUF"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:Lr(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?l.jsxs("button",{onClick:()=>ge(o.recommended.repo),className:ee("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",o.budget&&!o.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:[l.jsx(Bs,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):l.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:[l.jsx(sr,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&l.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",l.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&l.jsxs("div",{className:ee("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[l.jsx(yu,{className:"h-3 w-3 shrink-0 mt-0.5"}),l.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[l.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",se.length," von ",j.length,")"]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ae("all"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),l.jsx("button",{onClick:()=>ae("in_use"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",he==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ue("grid"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),l.jsx("button",{onClick:()=>ue("list"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),pe==="grid"?l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:se.length===0?l.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:he==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(W=>{const ke=k.includes(W.name),Ae=a==null?void 0:a.model_list.find(et=>et.role===W.role),Be=H2(W.name);return l.jsxs("div",{className:ee("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",ke?"border-primary/45 shadow-primary/5":W.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex items-start justify-between gap-3",children:l.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[l.jsx("div",{className:ee("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Be.color),title:Be.name,children:Be.initial}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:W.name,children:W.name.split("/").pop()}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[l.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:W.quant||"GGUF"}),ke&&l.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[l.jsx(uh,{className:"h-3 w-3 animate-pulse"})," Warm"]}),W.role&&l.jsx(io,{role:W.role,dense:!0}),b(W.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(W.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&W.prompt_cache&&l.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"}),v&&(W.spec_active?l.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: ${W.spec_draft_model})`,children:"SPEC"}):W.spec_draft_model?l.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 (${W.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&W.parallel_slots>1&&l.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:`${W.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",W.parallel_slots]}),W.incomplete&&l.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"})]})]})]})}),l.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:l.jsx(K2,{caps:W.capabilities})})]}),l.jsxs("div",{className:"space-y-3 pt-1",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(yu,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),l.jsx("div",{className:"text-foreground font-semibold",children:Lr(W.size_bytes)})]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(C4,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),l.jsx("div",{className:"text-foreground font-semibold",children:$w(W.ctx)})]})]})]}),Ae&&l.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:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),l.jsxs("span",{children:["Upgrade verfügbar: ",Ae.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>me(Ae.repo,W.role,W.quant||"Q4_K_M",W.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:[l.jsx(Bs,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const et=b(W.role),Ut=ke&&et,ht=W.incomplete&&!ke||Ut;return l.jsx("button",{onClick:()=>ke?J(W.name):te(W.name),disabled:ht,title:Ut?`${mr(W.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",ht?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ke?"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:Ut?"🔒 geladen":ke?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(W.name,W.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"}),v&&E&&l.jsx("button",{onClick:()=>O(W.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(W.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(W.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>H(W),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",W.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":W.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:[l.jsx(xa,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(W.name),disabled:b(W.role),className:ee("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(W.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(W.role)?`${mr(W.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(cv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},W.name)})}):l.jsx("div",{className:"space-y-2",children:se.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:he==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(W=>{const ke=k.includes(W.name),Ae=H2(W.name);return l.jsxs("div",{className:ee("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",ke?"border-primary/45":W.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsx("div",{className:ee("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ae.color),title:Ae.name,children:Ae.initial}),l.jsxs("div",{className:"min-w-0 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:W.name,children:W.name.split("/").pop()}),W.role&&l.jsx(io,{role:W.role,dense:!0,className:"shrink-0"}),b(W.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(W.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&W.prompt_cache&&l.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"}),v&&(W.spec_active?l.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: ${W.spec_draft_model})`,children:"SPEC"}):W.spec_draft_model?l.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 (${W.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&W.parallel_slots>1&&l.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:`${W.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",W.parallel_slots]}),W.incomplete&&l.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"}),ke&&l.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{children:["Größe: ",Lr(W.size_bytes)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Kontext: ",$w(W.ctx)]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:"font-mono text-[9px]",children:W.quant||"GGUF"})]})]})]}),l.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[l.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:l.jsx(K2,{caps:W.capabilities})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const Be=b(W.role),et=ke&&Be,Ut=W.incomplete&&!ke||et;return l.jsx("button",{onClick:()=>ke?J(W.name):te(W.name),disabled:Ut,title:et?`${mr(W.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",Ut?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ke?"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:et?"🔒 geladen":ke?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ne(W.name,W.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"}),v&&E&&l.jsx("button",{onClick:()=>O(W.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(W.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(W.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>H(W),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",W.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":W.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:[l.jsx(xa,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>Z(W.name),disabled:b(W.role),className:ee("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(W.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(W.role)?`${mr(W.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(cv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},W.name)})})]}),D&&(()=>{var et,Ut;const W=B&&B.role===D?B:null,ke={};W==null||W.models.forEach(ht=>{ke[ht.name]=ht});const Ae=W?W.models.map(ht=>j.find(ur=>ur.name===ht.name)).filter(Boolean):j,Be=ht=>{M(D,ht),U(null)};return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${mr(D).label} konfigurieren`,children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(io,{role:D})," festlegen"]}),l.jsx("button",{onClick:()=>U(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(Wn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",l.jsx("strong",{className:"text-foreground",children:mr(D).label}),l.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:mr(D).desc})]}),(W==null?void 0:W.recommended)&&l.jsxs("button",{onClick:()=>Be(W.recommended),title:(et=ke[W.recommended])==null?void 0:et.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:[l.jsx(xa,{className:"h-3 w-3"})," Auto: ",(Ut=W.recommended.split("/").pop())==null?void 0:Ut.replace(/\.gguf$/i,"")]})]}),l.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[b(D)?l.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):l.jsx("button",{onClick:()=>Be(""),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:l.jsx("span",{children:"Zuweisung entfernen"})}),Ae.map(ht=>{var Or;const ur=ke[ht.name],Ca=ht.role===D,Jn=!!(ur!=null&&ur.recommended),Ii=!!ur&&!ur.suitable;return l.jsxs("button",{onClick:()=>Be(ht.name),className:ee("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",Jn?"border-primary/50 bg-primary/10":Ca?"text-primary font-bold bg-primary/5 border-primary/30":Ii?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[l.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[l.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(Or=ht.name.split("/").pop())==null?void 0:Or.replace(/\.gguf$/i,""),Jn&&l.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:ur?`${ur.params_b}B · ${ht.quant} · ${ur.reason}`:`${Lr(ht.size_bytes)} · ${ht.quant}`})]}),Ca&&l.jsx(sr,{className:"h-4 w-4 shrink-0 text-primary"})]},ht.name)})]})]})})})(),Y&&l.jsx(bX,{model:Y,onClose:()=>H(null),onChanged:N}),g]})}const NX=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],EX=["fast","heavy","coder","vision","hermes","scout"],AX=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function V2(e){return AX.format(e)}function CX(){const{data:e}=Ni(),t=(e==null?void 0:e.models)??[],[r,n]=y.useState(""),[a,o]=y.useState([]),[c,u]=y.useState(!1),[f,h]=y.useState(""),[m,g]=y.useState("popular"),[v,b]=y.useState(""),[j,k]=y.useState(null),[S,N]=y.useState([]),[E,A]=y.useState("Q4_K_M"),[P,_]=y.useState(""),[O,D]=y.useState(null),[U,B]=y.useState(!1),[F,Y]=y.useState({});async function H(M){u(!0),h("");try{const K=await Se(`/api/hf/search?q=${encodeURIComponent(M)}`);o(K.results),K.results.length||h("Keine Ergebnisse.")}catch(K){h(`Suche fehlgeschlagen: ${K}`)}finally{u(!1)}}y.useEffect(()=>{H("")},[]);function pe(M){g(M.key),n(""),H(M.q)}function ue(){g(""),H(r)}async function he(M,K,ne){B(!1);try{const Z=await Se(`/api/fit?params_b=0&quant=${encodeURIComponent(K)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(ne)}`);D(Z)}catch{D(null)}}async function ae(M){if(j===M){k(null);return}k(M),N([]),D(null),_(""),B(!1),h("Analysiere Repository…");try{const K=await Se(`/api/hf/quants?repo=${encodeURIComponent(M)}`);N(K.quants);const ne=K.quants.includes("Q4_K_M")?"Q4_K_M":K.quants[0]||"Q4_K_M";A(ne),h(K.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),K.quants.length&&he(K.repo,ne,"")}catch(K){h(`Fehler: ${K}`)}}function se(){const M=v.trim();M&&(o(K=>K.some(ne=>ne.repo===M)?K:[{repo:M,downloads:0,likes:0},...K]),b(""),ae(M))}const X=P?t.find(M=>(M.role||"").toLowerCase()===P):void 0;async function te(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!U){B(!0);return}Y(K=>({...K,[M]:"Starte…"}));try{await Se("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:P||void 0,jinja:!0})}),Y(K=>({...K,[M]:"Download läuft"})),B(!1)}catch{Y(ne=>({...ne,[M]:"Fehler"}))}}const J=M=>{var ne;const K=((ne=M.split("/").pop())==null?void 0:ne.toLowerCase().replace(/-gguf$/i,""))||"";return K.length>3&&t.some(Z=>Z.name.toLowerCase().includes(K))},I=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(MN,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),l.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:NX.map(M=>l.jsxs("button",{onClick:()=>pe(M),className:ee("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&l.jsx(u4,{className:"h-3 w-3"}),M.label]},M.key))}),c?l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):l.jsxs("div",{className:"space-y-2",children:[a.map(M=>{const K=j===M.repo,ne=J(M.repo),Z=M.repo.includes("/")?M.repo.split("/")[0]:"—",me=M.repo.split("/").pop();return l.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md transition-all",K?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[l.jsxs("button",{onClick:()=>ae(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:me}),ne&&l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[l.jsx(sr,{className:"h-2.5 w-2.5"})," installiert"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[l.jsx("span",{children:Z}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(Bs,{className:"h-3 w-3"})," ",V2(M.downloads)]}),M.likes>0&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(m4,{className:"h-3 w-3"})," ",V2(M.likes)]})]})]}),K?l.jsx(ON,{className:"h-4 w-4 text-muted-foreground shrink-0"}):l.jsx(PN,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),K&&l.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:S.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),l.jsx("select",{value:E,onChange:ge=>{A(ge.target.value),he(M.repo,ge.target.value,P)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:S.map(ge=>l.jsx("option",{value:ge,className:"bg-popover text-foreground",children:ge},ge))}),l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),l.jsxs("select",{value:P,onChange:ge=>{_(ge.target.value),he(M.repo,E,ge.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[l.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),EX.map(ge=>l.jsx("option",{value:ge,className:"bg-popover text-foreground",children:ge},ge))]}),l.jsx("button",{onClick:()=>te(M.repo),disabled:!!F[M.repo]&&F[M.repo]==="Download läuft",className:ee("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",U?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:F[M.repo]?F[M.repo]:U?l.jsxs(l.Fragment,{children:[l.jsx(bi,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):l.jsxs(l.Fragment,{children:[l.jsx(Bs,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&l.jsxs("div",{className:ee("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",I(O.fit.level)),children:[l.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),l.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?l.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):l.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),X&&l.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] text-amber-400",children:[l.jsx(bi,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),l.jsxs("span",{children:["Rolle ",l.jsxs("strong",{children:["„",P,'"']})," hält aktuell ",l.jsx("strong",{children:X.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!a.length&&!c&&l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),l.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),l.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&se(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (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 font-mono"}),l.jsx("button",{onClick:se,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:"Laden"})]})]})}const PX={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:xa},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Ao},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Fs},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:uf},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:Q3},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:lv}};function OX(){const{data:e,isLoading:t,error:r}=RD(),{data:n}=Ni(),{data:a}=vh(),o=(n==null?void 0:n.models)??[],c=r?String(r):"",[u,f]=y.useState({}),[h,m]=y.useState({}),[g,v]=y.useState("recommended");async function b(j,k,S,N){f(E=>({...E,[j]:"Starte..."}));try{await Se("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(E=>({...E,[j]:"Download läuft"}))}catch{f(A=>({...A,[j]:"Fehler"}))}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([j,k])=>l.jsx("button",{onClick:()=>v(j),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",g===j?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:k},j))}),g==="browse"?l.jsx(CX,{}):t?l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):c||!e?l.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 (",c,")."]}):l.jsxs("div",{className:"space-y-8",children:[l.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:[l.jsxs("div",{children:["Modell-Registry geladen für ",l.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(F4,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),l.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),l.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=PX[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:ky},S=k.icon,N=o.find(D=>D.role===j.role),E=a==null?void 0:a.model_list.find(D=>D.role===j.role),A=j.models.find(D=>D.repo===j.recommended)||j.models[0];if(!A)return null;const P=u[A.repo],_=j.models.filter(D=>D.repo!==j.recommended),O=!!h[j.role];return l.jsxs("div",{className:ee("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:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.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:l.jsx(S,{className:"h-5.5 w-5.5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),l.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: ",j.role]})]})]}),N?l.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:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):l.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"})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),l.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[l.jsxs("span",{children:["Größe: ",wv(N.size_bytes||0)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:A.name,children:A.name}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[l.jsxs("span",{children:["Ersteller: ",A.author]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",A.quant]})]}),l.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:l.jsx(hX,{fit:A.fit})})]})}),l.jsx("div",{className:"pt-1",children:N?E?l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),l.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>b(E.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!u[E.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:[l.jsx(Bs,{className:"h-3.5 w-3.5"}),u[E.repo]||"Auf neue Version aktualisieren"]})]}):l.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:[l.jsx(sr,{className:"h-4 w-4"})," Auf neuestem Stand"]}):l.jsxs("button",{onClick:()=>b(A.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!P,className:ee("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",P?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[l.jsx(Bs,{className:"h-3.5 w-3.5"}),P||"Optimales Modell einsetzen"]})})]}),_.length>0&&l.jsxs("div",{className:"border-t border-border/20 pt-3",children:[l.jsxs("button",{onClick:()=>m(D=>({...D,[j.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?l.jsx(ON,{className:"h-3 w-3"}):l.jsx(PN,{className:"h-3 w-3"}),l.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&l.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(D=>l.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:D.name,children:D.name}),l.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[l.jsxs("span",{children:["Quant: ",D.quant]}),l.jsx("span",{children:"•"}),l.jsx("span",{children:D.fit.text})]})]}),l.jsx("button",{onClick:()=>b(D.repo,j.role,D.quant||"Q4_K_M",D.caps.tools!=="no"),disabled:!!u[D.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:u[D.repo]||"Installieren"})]},D.repo))})]})]},j.role)})})]})]})}function _X(){const[e,t]=y.useState("cockpit");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),l.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=>l.jsx("button",{onClick:()=>t(r),className:ee("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))})]}),l.jsx(xX,{}),l.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?l.jsx(qO,{}):l.jsx(OX,{})})]})}const MX={cline:"cline_settings.json",cursor:"Settings → Models",opencode:"opencode.jsonc",zed:"settings.json",continue:"~/.continue/config.json",claude_code:"~/.zshrc / env"};function q2({line:e,loading:t}){return t||!e?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[l.jsx(dh,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[l.jsx(e4,{className:"h-3 w-3"})," ",e.detail]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[l.jsx(r4,{className:"h-3 w-3"})," ",e.detail]})}function Q2({tool:e,fileName:t,accent:r,copied:n,onCopy:a}){return l.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[l.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),l.jsx("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:l.jsx("span",{children:t})}),l.jsxs("button",{onClick:a,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:[n?l.jsx(sr,{className:"h-3.5 w-3.5 text-emerald-400"}):l.jsx(uv,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),l.jsx("pre",{className:ee("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:l.jsx("code",{children:e.snippet})})]})}function QO(){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"),[c,u]=y.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:m}=$D(f.toString()),{data:g,isLoading:v}=zD(),b=m?String(m):"";function j(E){t(E),E&&localStorage.setItem("mc_host",E)}function k(E){n(E),localStorage.setItem("mc_mcp_path",E)}const S=h==null?void 0:h.tools[a];async function N(E,A){A&&(await navigator.clipboard.writeText(A),u(E),setTimeout(()=>u(null),1500))}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",l.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),l.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[l.jsx(g4,{className:"h-7 w-7 mx-auto text-muted-foreground"}),l.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),l.jsxs("div",{className:"flex flex-col gap-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(sf,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[l.jsx(Hn,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),l.jsx(q2,{line:g==null?void 0:g.gateway,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(sf,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[l.jsx(Ao,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),l.jsx(q2,{line:g==null?void 0:g.memory,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),l.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",l.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",l.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),l.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:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(f4,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),l.jsx("input",{value:e,onChange:E=>j(E.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,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"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(c4,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",l.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),l.jsx("input",{value:r,onChange:E=>k(E.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,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-violet-500/50 text-foreground"})]})]}),b&&l.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: ",b]}),h&&l.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,A])=>l.jsx("button",{onClick:()=>o(E),className:ee("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",a===E?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:A.label},E))}),S&&l.jsxs(l.Fragment,{children:[S.note&&l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(mw,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),l.jsx("span",{children:S.note})]}),l.jsx(Q2,{tool:S,fileName:MX[a]||"config.json",accent:"teal",copied:c==="model",onCopy:()=>N("model",S.snippet)})]})]}),l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",l.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",l.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(mw,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),l.jsx("span",{children:h.memory.note})]}),l.jsx(Q2,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:c==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const IX="modulepreload",TX=function(e){return"/"+e},Y2={},DX=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let c=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));a=c(r.map(h=>{if(h=TX(h),h in Y2)return;Y2[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":IX,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,j)=>{v.addEventListener("load",b),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return a.then(c=>{for(const u of c||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};class RX extends y.Component{constructor(){super(...arguments);Yl(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?l.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[l.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),l.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const LX=y.lazy(()=>DX(()=>import("./GraphView-CfrAKviO.js"),[]).then(e=>({default:e.GraphView}))),Qd=["identity","knowledge","rules","events"],X2=new Set(["auto","agent","hermes"]),Wg={identity:{label:"Identität",icon:U4,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:ws,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:M4,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:n4,bg:"bg-amber-500/10",text:"text-amber-400"}},Z2={label:"Gedächtnis",icon:sv,text:"text-muted-foreground"},$X={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},J2=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu:
1) wer ich bin und woran ich gerade arbeite,
2) wie ich angesprochen werden möchte,
3) meine bevorzugten Tools, Sprachen und Arbeitsweise,
4) wichtige Regeln/Konventionen, die du beachten sollst,
5) meine Infrastruktur (Server, Dienste ohne Geheimnisse).
Frag immer nur eine Sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function YO(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[a,o]=y.useState(""),[c,u]=y.useState("knowledge"),[f,h]=y.useState(!1),[m,g]=y.useState(!1),[v,b]=y.useState("liste"),[j,k]=y.useState(!1),S=Yn(),{showAlert:N,showConfirm:E,dialogElement:A}=Aa(),{data:P=[]}=vv({}),{data:_=[],error:O}=vv({q:r,category:e}),{data:D}=MD(v==="graph"),U=O?String(O):"",B=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},F=y.useMemo(()=>{const I=P.length,M=P.filter(K=>X2.has(K.source)).length;return{total:I,auto:M,manual:I-M,cats:new Set(P.map(K=>K.category)).size}},[P]),Y=P.length===0,H=y.useMemo(()=>{const I=D??{nodes:[],edges:[]};if(!r.trim())return I;const M=r.toLowerCase(),K=I.nodes.filter(Z=>Z.content.toLowerCase().includes(M)),ne=new Set(K.map(Z=>Z.id));return{nodes:K,edges:I.edges.filter(Z=>ne.has(Z.source)&&ne.has(Z.target))}},[D,r]),pe=y.useMemo(()=>{const I={};return _.forEach(M=>{var K;(I[K=M.category]??(I[K]=[])).push(M)}),I},[_]),ue=y.useMemo(()=>_.filter(I=>!Qd.includes(I.category)),[_]);async function he(){a.trim()&&(await Se("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:c,source:"ui"})}),o(""),k(!1),B())}function ae(I){E("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await Se(`/api/memory/${I}`,{method:"DELETE"}),B()}catch(M){N("Fehler",`Löschen fehlgeschlagen: ${M.message||M}`)}})}async function se(){try{await navigator.clipboard.writeText(J2),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function X(){se(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function te(){h(!0);try{const I=await Se("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(I.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${I.duplicate_count} Dublette(n) in ${I.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await Se("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),B()}catch(M){N("Fehler",`Fehler beim Löschen: ${M.message}`)}})}catch(I){N("Fehler",`Fehler bei der Deduplizierung: ${I.message}`)}finally{h(!1)}}const J=({value:I,label:M,accent:K})=>l.jsxs("span",{className:ee("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",K==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[K==="auto"&&l.jsx(ys,{className:"h-3 w-3"}),l.jsx("b",{className:ee("font-semibold",K==="auto"?"":"text-foreground"),children:I})," ",M]});return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.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"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{value:r,onChange:I=>n(I.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),l.jsx(MN,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),l.jsxs("button",{onClick:()=>k(I=>!I),className:"h-9 px-3 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:[l.jsx(df,{className:"h-4 w-4"})," Eintrag"]}),l.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",b4,"Liste"],["graph",T4,"Graph"]].map(([I,M,K])=>l.jsxs("button",{onClick:()=>b(I),className:ee("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",v===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(M,{className:"h-3.5 w-3.5"})," ",K]},I))}),l.jsx("button",{onClick:te,disabled:f,className:"flex h-9 w-9 items-center justify-center rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50","aria-label":"Duplikate bereinigen",title:"Deduplizieren",children:l.jsx(ys,{className:"h-4 w-4 text-primary","aria-hidden":"true"})})]})]}),!Y&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(J,{value:F.total,label:"Fakten"}),l.jsx(J,{value:F.auto,label:"auto gelernt",accent:"auto"}),l.jsx(J,{value:F.manual,label:"manuell"}),l.jsx(J,{value:F.cats,label:"Kategorien"}),l.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(ys,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),l.jsx("button",{onClick:()=>k(!1),"aria-label":"Schließen",className:"text-muted-foreground hover:text-foreground",children:l.jsx(Wn,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("textarea",{value:a,onChange:I=>o(I.target.value),rows:2,"aria-label":"Eintragstext",placeholder:"Eine Regel, Vorliebe oder einen stabilen Fakt über dich oder das Projekt…",className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("select",{value:c,onChange:I=>u(I.target.value),"aria-label":"Kategorie",className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 text-xs outline-none font-semibold text-foreground cursor-pointer",children:Qd.map(I=>{var M;return l.jsx("option",{value:I,className:"bg-popover text-foreground",children:((M=Wg[I])==null?void 0:M.label)||I},I)})}),l.jsxs("button",{onClick:he,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",children:[l.jsx(df,{className:"h-4 w-4"})," Speichern"]})]})]}),U&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",U]}),Y?l.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[l.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:l.jsx(j4,{className:"h-7 w-7 text-primary"})}),l.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),l.jsxs("div",{className:"w-full max-w-lg text-left",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),l.jsx("button",{onClick:se,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?l.jsxs(l.Fragment,{children:[l.jsx(sr,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):l.jsxs(l.Fragment,{children:[l.jsx(uv,{className:"h-3 w-3"})," Kopieren"]})})]}),l.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:J2})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[l.jsxs("button",{onClick:X,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",children:[l.jsx(TN,{className:"h-4 w-4"})," Im Terminal starten"]}),l.jsxs("button",{onClick:se,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?l.jsx(sr,{className:"h-4 w-4 text-emerald-400"}):l.jsx(uv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(I4,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",l.jsx("button",{onClick:()=>k(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):v==="graph"?l.jsx(RX,{children:l.jsx(y.Suspense,{fallback:l.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:l.jsx(LX,{data:H,onDelete:ae})})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl w-fit",children:[l.jsx("button",{onClick:()=>t(""),className:ee("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Qd.map(I=>{const M=Wg[I]||Z2,K=M.icon;return l.jsxs("button",{onClick:()=>t(I),className:ee("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(K,{className:"h-3 w-3"})," ",M.label]},I)})]}),_.length===0?l.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."}):l.jsx("div",{className:"space-y-5",children:[...Qd,"__other"].map(I=>{const M=I==="__other"?ue:pe[I]||[];if(!M.length)return null;const K=Wg[I]||Z2,ne=K.icon;return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[l.jsx(ne,{className:ee("h-3.5 w-3.5",K.text)}),l.jsx("span",{className:ee("text-[11px] font-bold uppercase tracking-wider",K.text),children:K.label}),l.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1.5 py-0.5",children:M.length}),l.jsx("div",{className:"ml-1 h-px flex-1 bg-border/30"})]}),l.jsx("div",{className:"space-y-2",children:M.map(Z=>{const me=X2.has(Z.source);return l.jsxs("div",{className:ee("flex items-start justify-between gap-4 p-3.5 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 hover:border-primary/20 transition-all group",$X[Z.category]||"border-l-muted"),children:[l.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:Z.content}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[typeof Z.score=="number"&&l.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded",title:"Relevanz der semantischen Suche",children:[Math.round(Z.score*100),"%"]}),l.jsxs("span",{className:ee("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded",me?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:me?"Automatisch gelernt":"Manuell angelegt",children:[me&&l.jsx(ys,{className:"h-2.5 w-2.5"}),Z.source]}),l.jsx("button",{onClick:()=>ae(Z.id),"aria-label":"Eintrag löschen",title:"Eintrag löschen",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",children:l.jsx(cv,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]},Z.id)})})]},I)})})]}),A]})}const zX=["chat","coding","fast","heavy"];function XO(){const{data:e,error:t}=Oy(5e3),{data:r}=Ni(),{showAlert:n,dialogElement:a}=Aa(),o=Yn(),c=t?String(t):"",[u,f]=y.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await Se("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:Ve.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function g(v){try{await Se("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:Ve.agentStatus}),o.invalidateQueries({queryKey:Ve.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.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"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",l.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&l.jsxs("a",{href:Ks(e.terminal_url),target:"_blank",rel:"noopener",className:ee("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.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[l.jsx(Us,{className:"h-4 w-4"}),l.jsx("span",{children:"Terminal öffnen"})]})]}),c&&l.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 (",c,")."]}),e&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(wn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[l.jsxs("button",{onClick:()=>e.terminal_reachable&&window.open(Ks(e.terminal_url),"_blank"),title:e.terminal_reachable?"Hermes-Terminal öffnen":"Terminal offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(uh,{className:ee("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Terminal"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"hermes chat · Clients"})]}),l.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),l.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[l.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[l.jsx(wn,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),l.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),l.jsxs("span",{className:ee("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),l.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[l.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Hn,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),l.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),l.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Qu,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[l.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),l.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),l.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(pw,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),l.jsxs("div",{className:ee("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),l.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:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pw,{className:"h-5 w-5 text-primary"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("p",{children:["Der ",l.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",l.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."]}),l.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",l.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."]})]}),l.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?l.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[l.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),l.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",l.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",l.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",l.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),l.jsxs("p",{children:["Starte ",l.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",l.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),l.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&&l.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:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ws,{className:"h-5 w-5 text-amber-500"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[l.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),l.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",l.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),l.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[l.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),l.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",l.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&&u&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:l.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:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(Hn,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),l.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(Wn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:zX.map(v=>{const b=e.brain_model===v;return l.jsxs("button",{onClick:()=>m(v),className:ee("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&l.jsx(sr,{className:"h-3.5 w-3.5"})]},v)})}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",l.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),l.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var j;const b=v.role==="hermes";return l.jsxs("button",{onClick:()=>!b&&g(v.name),disabled:b||v.incomplete,className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.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:[l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(j=v.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[l.jsx(sr,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),l.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[l.jsx("span",{children:"💡"}),l.jsxs("span",{children:["Für einen ",l.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),a]})}function FX(){const{data:e}=Oy(5e3),t=e!=null&&e.terminal_url?Ks(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Hermes Terminal"}),l.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",l.jsx("code",{className:"rounded bg-background/40 px-1 font-mono text-[11px] text-primary",children:"hermes chat"}),') mit Tools & PC-Steuerung — „mehr als Chatten".']})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[l.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&l.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[l.jsx(Us,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?l.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&l.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[l.jsx(bi,{className:"h-8 w-8 text-amber-400"}),l.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),l.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",l.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",l.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),l.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):l.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[l.jsx(IN,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}const eN=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function BX(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Rr({id:e,icon:t,color:r,title:n,kicker:a,children:o,wide:c}){return l.jsxs("section",{id:e,className:ee("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",c&&"md:col-span-2"),children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(t,{className:ee("h-5 w-5 shrink-0",r)}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),a&&l.jsx("span",{className:ee("text-[9px] font-mono",r),children:a})]})]}),l.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function Va({children:e}){return l.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[l.jsx(ys,{className:"h-3 w-3"})," Bei dir konkret"]}),l.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function ze({children:e}){return l.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function kt({href:e,name:t,note:r}){return l.jsxs("li",{className:"leading-relaxed",children:[l.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,l.jsx(G3,{className:"h-3 w-3 opacity-60"})]}),l.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function UX(){const[e,t]=y.useState(!1);return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[l.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:l.jsx(sv,{className:"h-6 w-6 text-primary"})}),l.jsxs("div",{className:"space-y-1",children:[l.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:"Die AI-Bibel"}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",l.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",l.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),l.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:l.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(lv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?eN:eN.slice(0,9)).map(r=>l.jsx("button",{onClick:()=>BX(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),l.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsxs(Rr,{id:"grundlagen",icon:Hn,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[l.jsxs("p",{children:["Ein LLM ist im Kern ein ",l.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),l.jsxs("li",{children:[l.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",l.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),l.jsxs(Rr,{id:"moe",icon:ky,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",l.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",l.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),l.jsxs("p",{children:[l.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx(ze,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),l.jsxs(Va,{children:["VRAM/RAM ist die harte Grenze — ",l.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",l.jsx(ze,{children:"Q4_K_M"}),"/",l.jsx(ze,{children:"Q6_K"}),"."]})]}),l.jsxs(Rr,{id:"lokal",icon:ff,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"llama-swap"})," — Proxy, der ",l.jsx("em",{children:"mehrere"})," Modelle hinter ",l.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx(ze,{children:"CUDA"})," NVIDIA · ",l.jsx(ze,{children:"ROCm"})," AMD · ",l.jsx(ze,{children:"Vulkan"})," herstellerübergreifend · ",l.jsx(ze,{children:"Metal"})," Apple"]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",l.jsx(ze,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",l.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),l.jsxs(Va,{children:["Deine Box hat eine AMD-APU (gfx1151). ",l.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",l.jsx(ze,{children:"Vulkan/RADV"})," das offizielle ",l.jsx(ze,{children:"ROCm"})," bei Token-Generierung um ~1222 % — darum läuft die Engine auf Vulkan.",l.jsx(ze,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",l.jsx(ze,{children:"coder"})," nutzt Spec-Decoding."]})]}),l.jsxs(Rr,{id:"modelle",icon:lf,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Llama"})," (Meta), ",l.jsx("strong",{children:"Gemma"})," (Google), ",l.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"DeepSeek"}),", ",l.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Frontier (Cloud-API):"})}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx("strong",{children:"Claude"})," (Anthropic), ",l.jsx("strong",{children:"GPT"})," (OpenAI), ",l.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),l.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),l.jsxs(Va,{children:["Dein Line-up via llama-swap: ",l.jsx(ze,{children:"fast"})," (Alltag/Vision/MoE) · ",l.jsx(ze,{children:"heavy"})," (schwere Logik) ·",l.jsx(ze,{children:"coder"})," · ",l.jsx(ze,{children:"scout"})," · ",l.jsx(ze,{children:"vision"})," · ",l.jsx(ze,{children:"embed"})," (fürs Gedächtnis) ·",l.jsx(ze,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",l.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),l.jsxs(Rr,{id:"gateway",icon:E4,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[l.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",l.jsx("strong",{children:"OpenAI-Format"})," (",l.jsx(ze,{children:"/v1/chat/completions"}),"). Ein",l.jsx("strong",{children:" Gateway"})," davor gibt dir ",l.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",l.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),l.jsxs("p",{children:["Die ",l.jsx(ze,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),l.jsxs(Va,{children:["Dein Gateway: ",l.jsx(ze,{children:"http://192.168.178.151:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",l.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),l.jsxs(Rr,{id:"mcp",icon:cf,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[l.jsxs("p",{children:["Das ",l.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",l.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),l.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),l.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[l.jsx(w4,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),l.jsxs(Rr,{id:"skills",icon:O4,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",l.jsx(ze,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),l.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: Treibt Entwicklung mit strikter TDD-Praxis
---
# Instructions
...`}),l.jsxs("p",{children:["Suchen & installieren über die ",l.jsx("strong",{children:"skills.sh"}),"-Registry: ",l.jsx(ze,{children:"npx skills find"})," /",l.jsx(ze,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),l.jsxs(Rr,{id:"memory",icon:s4,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["LLMs sind ",l.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",l.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:["extrahiert Fakten ",l.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),l.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),l.jsxs("li",{children:[l.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",l.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),l.jsxs(Va,{children:["Dein Gedächtnis (Tab ",l.jsx("strong",{children:"Gedächtnis"}),") ist ",l.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",l.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",l.jsx(ze,{children:"Identität"})," · ",l.jsx(ze,{children:"Wissen"})," · ",l.jsx(ze,{children:"Regeln"})," · ",l.jsx(ze,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",l.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",l.jsx("br",{}),l.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),l.jsxs(Rr,{id:"agents",icon:wn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",l.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",l.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),l.jsxs(Va,{children:[l.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",l.jsx(ze,{children:"fast"}),"). Reden tust du mit ihm im",l.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",l.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",l.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",l.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),l.jsxs(Rr,{id:"ide",icon:Fs,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[l.jsxs("p",{children:["Jede ",l.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Cline"})," & ",l.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Continue"}),", ",l.jsx("strong",{children:"aider"})," (CLI), ",l.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),l.jsxs(Va,{children:["Tipp den Kram nicht ab: der ",l.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",l.jsx(ze,{children:"…:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", Key beliebig."]})]}),l.jsx(Rr,{id:"tricks",icon:x4,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:l.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>l.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[l.jsx(xa,{className:"h-3 w-3 text-amber-400"})," ",r]}),l.jsx("p",{className:"text-[11px]",children:n})]},r))})}),l.jsx(Rr,{id:"wartung",icon:ws,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(_N,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(Qu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",l.jsx(ze,{children:"restore.sh"})," (Doku in ",l.jsx(ze,{children:"docs/BACKUP.md"}),")."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",l.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",l.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),l.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),l.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(lv,{className:"h-5 w-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),l.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(lf,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),l.jsx(kt,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),l.jsx(kt,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),l.jsx(kt,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),l.jsx(kt,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),l.jsx(kt,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(cf,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),l.jsx(kt,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),l.jsx(kt,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),l.jsx(kt,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),l.jsx(kt,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(wn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),l.jsx(kt,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),l.jsx(kt,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),l.jsx(kt,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),l.jsx(kt,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(sv,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),l.jsx(kt,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),l.jsx(kt,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),l.jsx(kt,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),l.jsx(kt,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),l.jsx(Rr,{id:"troubleshooting",icon:y4,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:l.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",l.jsx(ze,{children:":9001"}),")? Backend-Status in der ",l.jsx("strong",{children:"Zentrale"})," prüfen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",l.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",l.jsx(ze,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",l.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",l.jsx(ze,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),l.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function HX({title:e,hint:t}){return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-semibold",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.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:[l.jsx(o4,{className:"h-8 w-8 text-muted-foreground"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const tN=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user",reach:"hermes-terminal"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function fu({icon:e,iconClass:t,name:r,status:n,available:a,busy:o,actionLabel:c,onAction:u}){return l.jsxs("div",{className:ee("flex items-center gap-3 rounded-lg border px-3 py-2",a?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[l.jsx(e,{className:ee("h-4 w-4 shrink-0",t)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:r}),l.jsx("div",{className:ee("text-[10px] truncate",a?"text-amber-400/90":"text-muted-foreground"),children:n})]}),l.jsx("button",{onClick:u,disabled:!a||o,className:ee("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",a?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":c})]})}function WX({label:e,ok:t,system:r,busy:n,onRestart:a,onLogs:o}){return l.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[l.jsx("span",{className:ee("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),l.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&l.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),l.jsx("button",{onClick:a,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:l.jsx(Xa,{className:ee("h-3.5 w-3.5",n&&"animate-spin")})}),l.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:l.jsx(l4,{className:"h-3.5 w-3.5"})})]})}function Kg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function ZO({open:e,onClose:t,defaultTab:r="maintenance"}){var Ti;const[n,a]=y.useState(null),[o,c]=y.useState([]),[u,f]=y.useState("llama-swap"),[h,m]=y.useState(""),[g,v]=y.useState(!1),[b,j]=y.useState(null),[k,S]=y.useState({}),[N,E]=y.useState("maintenance"),[A,P]=y.useState(!1),[_,O]=y.useState(""),[D,U]=y.useState(!1),[B,F]=y.useState(null),[Y,H]=y.useState([]),[pe,ue]=y.useState(!1),[he,ae]=y.useState(null),[se,X]=y.useState(null);function te($,Le,cr){X({type:"alert",title:$,message:Le,onConfirm:()=>{X(null),cr&&cr()}})}function J($,Le,cr){X({type:"confirm",title:$,message:Le,onConfirm:()=>{X(null),cr()},onCancel:()=>X(null)})}function I($){return $?new Date($*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[M,K]=y.useState(""),[ne,Z]=y.useState(""),[me,ge]=y.useState(!1),[Pe,re]=y.useState(!1);y.useEffect(()=>{e&&(K(localStorage.getItem("mc_sudo_password")||""),Z(localStorage.getItem("mc_hf_token")||""))},[e]),y.useEffect(()=>{e&&r&&E(r)},[e,r]);const xe=y.useRef(null);function _e(){Se("/api/maintenance/updates").then(a).catch($=>console.error("Error loading updates",$))}function ie(){Se("/api/jobs").then($=>c($.jobs||[])).catch($=>console.error("Error loading jobs",$))}function Je(){Se("/api/system/services").then(F).catch(()=>{})}function Fe(){Se("/api/system/backups").then($=>H($.backups||[])).catch(()=>{})}function Oe($){v(!0),j(null),Se(`/api/maintenance/logs?service=${$}&lines=150`).then(Le=>{Le.ok?m(Le.text):(m(`Fehler beim Laden der Logs: ${Le.err||"Unbekannter Fehler"}`),(Le.status==="incorrect_password"||Le.status==="password_required")&&j(Le.status))}).catch(Le=>m(`Fehler: ${Le.message}`)).finally(()=>{v(!1),setTimeout(()=>{xe.current&&(xe.current.scrollTop=xe.current.scrollHeight)},50)})}y.useEffect(()=>{if(!e)return;_e(),ie(),Je(),Fe();const $=setInterval(()=>{ie(),_e(),Je()},3e3);return()=>clearInterval($)},[e]),y.useEffect(()=>{!e||N!=="logs"||Oe(u)},[e,N,u]);function ut($){return($==null?void 0:$.status)==="busy"?(te("Update läuft bereits",`Es läuft gerade „${$.running}". Bitte warte, bis es fertig ist.`),ie(),!0):!1}async function Jt(){try{const $=await Se("/api/maintenance/os-update",{method:"POST"});if(ut($))return;ie(),E("maintenance")}catch($){te("Fehler",`Fehler beim Starten des OS-Updates: ${$.message}`)}}async function W(){try{const $=await Se("/api/maintenance/engine-update",{method:"POST"});if(ut($))return;ie(),E("maintenance")}catch($){te("Fehler",`Fehler beim Engine-Update: ${$.message}`)}}async function ke(){try{const $=await Se("/api/maintenance/swap-update",{method:"POST"});if(ut($))return;ie(),E("maintenance")}catch($){te("Fehler",`Fehler beim Router-Update: ${$.message}`)}}async function Ae(){ue(!0);try{const $=await Se("/api/maintenance/hermes-update",{method:"POST"});if(ut($))return;ie()}catch($){te("Fehler",`Hermes-Update fehlgeschlagen: ${$.message}`)}finally{ue(!1)}}async function Be($){ae({kind:$,loading:!0,data:null});try{const Le=await Se(`/api/maintenance/update-details?kind=${$}`);ae({kind:$,loading:!1,data:Le})}catch(Le){ae({kind:$,loading:!1,data:{kind:$,error:Le.message}})}}function et(){const $=he==null?void 0:he.kind;ae(null),$==="os"?Jt():$==="engine"?W():$==="swap"?ke():$==="hermes"&&Ae()}async function Ut(){P(!0);try{await Se("/api/maintenance/check-updates",{method:"POST"}),ie(),E("maintenance")}catch($){te("Fehler",`Fehler bei der Update-Suche: ${$.message}`)}finally{P(!1)}}async function ht($,Le){try{await Se("/api/models/install",{method:"POST",body:JSON.stringify({repo:$,role:Le})}),te("Gestartet",`Modell-Upgrade für '${Le}' (${$}) gestartet.`),ie(),E("maintenance")}catch(cr){te("Fehler",`Fehler beim Starten des Modell-Upgrades: ${cr.message}`)}}async function ur(){J("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Se("/api/maintenance/reboot",{method:"POST"}),te("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch($){te("Fehler",`Fehler beim Reboot: ${$.message}`)}})}async function Ca(){U(!0),O("Snapshot wird erzeugt...");try{const $=await Se("/api/system/backup",{method:"POST"});O($.ok?`Snapshot erzeugt: ${$.snapshot} (${$.files.length} Komponenten)`:"Backup fehlgeschlagen."),Fe()}catch($){O(`Fehler: ${$.message}`)}finally{U(!1)}}async function Jn($){S(Le=>({...Le,[$]:!0}));try{const Le=await Se("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:$})});Le.ok?te("Dienst neu gestartet",`Dienst ${$} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&u===$&&Oe($)}):te("Fehler",`Fehler beim Neustart: ${Le.err||"Unbekannter Fehler"}`)}catch(Le){te("Fehler",`Fehler beim Neustart: ${Le.message}`)}finally{S(Le=>({...Le,[$]:!1}))}}async function Ii($){try{await Se(`/api/jobs/${$}/cancel`,{method:"POST"}),ie()}catch(Le){te("Fehler",`Fehler beim Abbrechen: ${Le.message}`)}}const Or=o.find($=>($.state==="running"||$.state==="queued")&&$.group==="maintenance");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ee("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}),l.jsxs("div",{className:ee("fixed inset-y-0 right-0 w-full sm:w-[640px] 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:[l.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Hn,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),l.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:l.jsx(Wn,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[l.jsx("button",{onClick:()=>E("maintenance"),className:ee("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"}),l.jsx("button",{onClick:()=>E("logs"),className:ee("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"}),l.jsx("button",{onClick:()=>E("settings"),className:ee("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"})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"space-y-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),l.jsxs("button",{onClick:Ut,disabled:A||!!Or,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[l.jsx(Xa,{className:ee("h-3 w-3",A&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&l.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",I(n.last_check)]}),Or&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[l.jsx(Xa,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),l.jsxs("span",{children:["Update läuft: ",l.jsx("span",{className:"font-semibold",children:Or.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(fu,{icon:ws,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>Be("os")}),l.jsx(fu,{icon:ff,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Be("engine")}),l.jsx(fu,{icon:gw,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Be("swap")}),(()=>{var Le;const $=(Le=n==null?void 0:n.components)==null?void 0:Le.find(cr=>cr.key==="hermes_agent");return l.jsx(fu,{icon:wn,iconClass:"text-amber-400",name:"Hermes-Agent",available:($==null?void 0:$.update)===!0,busy:pe,status:($==null?void 0:$.update)===!0?`Update: ${$.latest}`:($==null?void 0:$.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>Be("hermes")})})(),(Ti=n==null?void 0:n.model_list)==null?void 0:Ti.map($=>l.jsx(fu,{icon:q3,iconClass:"text-emerald-400",name:`Modell · ${$.role}`,available:!0,status:$.title,actionLabel:"Upgrade",onAction:()=>ht($.repo,$.role)},$.role))]})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),l.jsx("div",{className:"space-y-1.5",children:tN.map($=>{var Le;return l.jsx(WX,{label:$.label,system:$.type==="system",ok:(Le=B==null?void 0:B.services.find(cr=>cr.name.toLowerCase().includes($.reach)))==null?void 0:Le.ok,busy:k[$.id],onRestart:()=>Jn($.id),onLogs:()=>{f($.id),E("logs")}},$.id)})})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),l.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:Y[0]?`Letztes: ${Y[0].snapshot}`:"Noch kein Backup"}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Y.length," Snapshots · Restore per CLI (restore.sh)"]})]}),l.jsxs("button",{onClick:Ca,disabled:D,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[l.jsx(X3,{className:ee("h-3.5 w-3.5",D&&"animate-pulse")})," Snapshot"]})]}),_&&l.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:_})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),l.jsxs("button",{onClick:ur,className:"flex w-full items-center gap-3 p-3 rounded-lg 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:[l.jsx(P4,{className:"h-4.5 w-4.5"}),l.jsxs("div",{children:[l.jsx("div",{children:"Host-System neu starten"}),l.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),l.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter($=>$.state==="running"||$.state==="queued").length," Aktiv"]})]}),l.jsx("div",{className:"space-y-3",children:o.length===0?l.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($=>{const Le=$.state==="running"||$.state==="queued";return l.jsxs("div",{className:ee("p-3 rounded-xl border transition-all duration-300",Le?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Le&&l.jsxs("span",{className:"flex h-2 w-2 relative",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),$.label]}),l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[l.jsxs("span",{children:["ID: ",$.id]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:ee($.state==="done"&&"text-emerald-400",$.state==="failed"&&"text-red-400",$.state==="running"&&"text-primary",$.state==="queued"&&"text-amber-400",$.state==="canceled"&&"text-muted-foreground"),children:$.state})]})]}),Le&&l.jsx("button",{onClick:()=>Ii($.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"})]}),$.state==="running"&&l.jsxs("div",{className:"mt-3 space-y-1",children:[l.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${$.progress??0}%`}})}),l.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[l.jsxs("span",{children:[$.progress??0,"%"]}),$.done_bytes!=null&&$.total_bytes!=null&&l.jsxs("span",{children:[Kg($.done_bytes)," / ",Kg($.total_bytes),$.rate_bps!=null&&` (${Kg($.rate_bps)}/s)`]}),$.eta_s!=null&&l.jsxs("span",{children:["ETA: ",$.eta_s,"s"]})]})]})]},$.id)})})]})]}),N==="logs"&&l.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("select",{value:u,onChange:$=>f($.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:tN.map($=>l.jsxs("option",{value:$.id,children:[$.label," (",$.type==="system"?"systemd-root":"user",")"]},$.id))}),l.jsxs("button",{onClick:()=>Jn(u),disabled:k[u],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:[l.jsx(Xa,{className:ee("h-3.5 w-3.5",k[u]&&"animate-spin")}),"Restart"]})]}),l.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:[l.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[l.jsx(TN,{className:"h-3 w-3 text-primary"}),l.jsxs("span",{children:["stdout/stderr - ",u]})]}),l.jsx("button",{onClick:()=>Oe(u),disabled:g,className:"text-muted-foreground hover:text-foreground transition-colors",children:l.jsx(Xa,{className:ee("h-3 w-3",g&&"animate-spin")})})]}),l.jsx("pre",{ref:xe,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"?l.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[l.jsx(bi,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),l.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."}),l.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",u," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),l.jsx("button",{onClick:()=>E("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"})]}):g&&!h?l.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||l.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(ws,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:me?"text":"password",value:M,onChange:$=>K($.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>ge(!me),"aria-label":me?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:me?l.jsx(hw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(uf,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(p4,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:Pe?"text":"password",value:ne,onChange:$=>Z($.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,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"}),l.jsx("button",{type:"button",onClick:()=>re(!Pe),"aria-label":Pe?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Pe?l.jsx(hw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(uf,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.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."})]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",M),localStorage.setItem("mc_hf_token",ne),te("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"}),l.jsx("button",{onClick:()=>{K(""),Z(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),te("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"})]})]})]})]}),he&&(()=>{var mc;const $=he.data,Le={os:{icon:ws,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:ff,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:gw,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:wn,cls:"text-amber-400",title:"Hermes-Agent"}}[he.kind],cr=Le.icon,hc=$?he.kind==="os"?($.count??0)===0:he.kind==="hermes"?($.behind??0)===0:$.installed_build!=null&&$.latest_build!=null&&$.latest_build<=$.installed_build:!0;return l.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>ae(null)}),l.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[l.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(cr,{className:ee("h-4.5 w-4.5",Le.cls)}),l.jsx("h3",{className:"text-sm font-semibold",children:Le.title})]}),l.jsx("button",{onClick:()=>ae(null),className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(Wn,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:he.loading?l.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[l.jsx(Xa,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):$!=null&&$.error?l.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:$.error}):he.kind==="os"?(($==null?void 0:$.count)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[$.count," Paket(e) werden aktualisiert:"]}),l.jsx("div",{className:"space-y-1",children:$.packages.map(_r=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(A4,{className:"h-3 w-3 text-cyan-400 shrink-0"}),_r.name]}),l.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[l.jsx("span",{children:_r.current}),l.jsx(sf,{className:"h-3 w-3"}),l.jsx("span",{className:"text-emerald-400",children:_r.candidate})]})]},_r.name))})]}):he.kind==="engine"||he.kind==="swap"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[l.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",($==null?void 0:$.installed_build)??"?"]}),l.jsx(sf,{className:"h-3.5 w-3.5 text-muted-foreground"}),l.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",($==null?void 0:$.latest_build)??"?"]})]}),(($==null?void 0:$.name)||($==null?void 0:$.latest_tag))&&l.jsxs("div",{className:"text-muted-foreground",children:["Release: ",l.jsx("span",{className:"text-foreground",children:$==null?void 0:$.name}),$!=null&&$.latest_tag?` (${$.latest_tag})`:""]}),($==null?void 0:$.url)&&l.jsxs("a",{href:$.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Release-Notes auf GitHub ",l.jsx(Us,{className:"h-3 w-3"})]}),($==null?void 0:$.body)&&l.jsx("pre",{className:"whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:$.body})]}):(((mc=$==null?void 0:$.commits)==null?void 0:mc.length)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[$.behind," neue Commit(s) auf ",l.jsxs("span",{className:"font-mono text-foreground",children:["origin/",$.branch]}),":"]}),l.jsx("div",{className:"space-y-1",children:$.commits.map(_r=>l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsx(d4,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[11px] truncate",children:_r.subject}),l.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[_r.hash," · ",_r.when]})]})]},_r.hash))}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Vor dem Update wird automatisch ein Backup erstellt; danach startet der Hermes-Gateway neu."})]})}),l.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[l.jsx("button",{onClick:()=>ae(null),className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),l.jsx("button",{onClick:et,disabled:he.loading||hc||!!Or,title:Or?`Update läuft bereits: ${Or.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:Or?"Update läuft…":"Jetzt aktualisieren"})]})]})]})})(),se&&l.jsx(UO,{type:se.type,title:se.title,message:se.message,onConfirm:se.onConfirm,onCancel:se.onCancel})]})}function KX(){const{data:e}=vh(3e4),{data:t}=Ni(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),a=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],c=a.find(m=>m.role==="hermes"),u=a.find(m=>m.role==="coder-lite")||a.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var g;return((g=m==null?void 0:m.split("/").pop())==null?void 0:g.replace(/\.gguf$/i,""))||"—"};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.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:"Basisstation"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),l.jsx(VO,{frame:"box"}),l.jsxs("button",{onClick:n,className:ee("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?l.jsx(J3,{className:"h-6 w-6 shrink-0 text-amber-400"}):l.jsx(sr,{className:"h-6 w-6 shrink-0 text-emerald-400"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:ee("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&l.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",l.jsx(ch,{className:"h-4 w-4"})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),l.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:Hn,label:"Lucys Hirn",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)},{icon:Fs,label:"Coder (Vibe-Coding)",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)}].map(m=>l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),l.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),l.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),l.jsx("span",{className:ee("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsx(BO,{}),l.jsx(HO,{})]}),l.jsx(WO,{})]})}function Gg({icon:e,title:t,sub:r,onClick:n}){return l.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[l.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm text-foreground",children:t}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),l.jsx(ch,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function GX(){const[e,t]=y.useState(null);return e?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[l.jsx(AN,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?l.jsx(qO,{}):l.jsx(XO,{})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.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:"Maschinenraum"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),l.jsx(jE,{})]}),l.jsx(Gg,{icon:Hn,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),l.jsx(Gg,{icon:R4,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),l.jsx(Gg,{icon:wn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const VX=[{id:"start",label:"Start",icon:uh},{id:"vibe",label:"Vibe-Coding",icon:Fs},{id:"konstitution",label:"Konstitution",icon:V3},{id:"maschinenraum",label:"Maschinenraum",icon:Qu}];function qX(){const[e,t]=y.useState("start"),[r,n]=y.useState(!1),[a,o]=y.useState("maintenance"),{data:c}=Cy();y.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const u=c&&c.engine_reachable&&(c.brain?c.brain.ready:!0);return l.jsxs("div",{className:"flex h-full relative",children:[l.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:l.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),l.jsx(ZO,{open:r,onClose:()=>n(!1),defaultTab:a}),l.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:VX.map(f=>l.jsxs("button",{onClick:()=>t(f.id),className:ee("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[l.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),l.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",u?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u?"Box läuft":"prüfen"]}),l.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(AN,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),l.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&l.jsx(KX,{}),e==="vibe"&&l.jsx(QO,{}),e==="konstitution"&&l.jsx(YO,{}),e==="maschinenraum"&&l.jsx(GX,{})]})]})}function QX(){var j,k,S,N,E;WD();const[e,t]=y.useState(()=>{const A=window.location.hash.slice(1);return mu.some(P=>P.id===A)?A:"dashboard"}),r=y.useCallback(A=>{window.location.hash.slice(1)===A?t(A):window.location.hash=A},[]),[n,a]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,c]=y.useState(!1),[u,f]=y.useState("maintenance"),[h,m]=y.useState(()=>window.location.hash==="#mc3"),{data:g}=Cy(),{data:v}=Po(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const A=P=>{var O;f(((O=P.detail)==null?void 0:O.tab)||"maintenance"),c(!0)};return window.addEventListener("open-system-drawer",A),()=>window.removeEventListener("open-system-drawer",A)},[]),y.useEffect(()=>{const A=P=>{var O;const _=(O=P.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",A),()=>window.removeEventListener("mc-navigate",A)},[r]),y.useEffect(()=>{const A=()=>{m(window.location.hash==="#mc3");const P=window.location.hash.slice(1);mu.some(_=>_.id===P)&&t(P)};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]);const b=mu.find(A=>A.id===e);return h?l.jsx(qX,{}):l.jsxs("div",{className:"flex h-full relative",children:[l.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[l.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]"}),l.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),l.jsx(YT,{onNavigate:r}),l.jsx(ZO,{open:o,onClose:()=>c(!1),defaultTab:u}),l.jsxs("aside",{className:ee("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[l.jsxs("div",{className:ee("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[l.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),l.jsx("button",{onClick:()=>{a(A=>{const P=!A;return localStorage.setItem("mc_sidebar_collapsed",P.toString()),P})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?l.jsx(ch,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(Z3,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:mu.map(A=>l.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:ee("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[l.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&l.jsx("span",{className:"truncate",children:A.label})]},A.id))}),l.jsx("div",{className:ee("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?l.jsx("div",{className:"flex justify-center",children:l.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",g?g.engine_reachable?g.brain&&!g.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:g?g.engine_reachable?g.brain&&!g.brain.ready?`Hirn offline (${g.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):l.jsxs("div",{className:"space-y-2 text-left",children:[g?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full animate-pulse",g.engine_reachable?"bg-emerald-500":"bg-amber-500")}),l.jsxs("span",{className:"truncate",children:["Engine ",g.engine_reachable?"online":"offline"]})]}),g.brain&&!g.brain.ready&&l.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${g.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),l.jsxs("span",{className:"truncate",children:["Hirn offline",g.brain.model?` (${g.brain.model})`:""]})]})]}):l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",l.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&l.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[l.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:((j=v.versions.engine)==null?void 0:j.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((k=v.versions.engine)==null?void 0:k.version_text)||"unbekannt",children:[l.jsx("strong",{children:"Engine:"})," ",((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_ui?`${v.versions.hermes_ui.branch}-${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""} (${v.versions.hermes_ui.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes UI:"})," ",v.versions.hermes_ui?`${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.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:[l.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jE,{}),l.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"}),l.jsxs("button",{onClick:()=>{const A=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(A)},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:[l.jsx(a4,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"Suchen"}),l.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),l.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&l.jsx(yX,{}),e==="models"&&l.jsx(_X,{}),e==="connect"&&l.jsx(QO,{}),e==="memory"&&l.jsx(YO,{}),e==="agent"&&l.jsx(XO,{}),e==="terminal"&&l.jsx(FX,{}),e==="guide"&&l.jsx(UX,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&l.jsx(HX,{title:b.label,hint:b.hint})]})]})]})}const YX=new O3({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});i3.createRoot(document.getElementById("root")).render(l.jsx(fN.StrictMode,{children:l.jsx(_3,{client:YX,children:l.jsx(QX,{})})}));export{Xa as R,ys as S,cv as T,T4 as a,vy as g,l as j,y as r};