2360ad173a
Kompletter Rework von GuideView: statt veralteter Editor-Setups + KI-Wissensdatenbank jetzt ein allgemeines AI-Nachschlagewerk mit 14 Sektionen (Grundlagen, MoE/Quant, lokal betreiben, Modell-Landschaft, Gateway-Trick, MCP, Skills, Gedaechtnis/RAG, Agenten, IDE, Tricks/Kniffe, Sicherheit/Wartung, kuratierte Ressourcen, Troubleshooting) + Sprung-Nav. Allgemein gehalten; Stack-Spezifika nur als "Bei dir konkret"-Callouts, wo eine echte Einschraenkung sie rechtfertigt. Tote Verweise entfernt: AnythingLLM, hermes-webui/ChatUI :8787, reasoning-Rolle. Neuer Stand drin: Mem0 (auto-lernend/semantisch/graph, 4-Typen-Taxonomie, Hermes-Onboarding), Terminal (ttyd), Backup+restore.sh, git-basierter Update-Check + Hermes-Update + Gehirn-Check. Live gegen die Box verifiziert; Frontend gebaut, dist committed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
565 lines
840 KiB
JavaScript
565 lines
840 KiB
JavaScript
var hM=Object.defineProperty;var L1=e=>{throw TypeError(e)};var pM=(e,t,r)=>t in e?hM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ql=(e,t,r)=>pM(e,typeof t!="symbol"?t+"":t,r),zm=(e,t,r)=>t.has(e)||L1("Cannot "+r);var L=(e,t,r)=>(zm(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?L1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),xe=(e,t,r,n)=>(zm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),We=(e,t,r)=>(zm(e,t,"access private method"),r);var wd=(e,t,r,n)=>({set _(a){xe(e,t,a,r)},get _(){return L(e,t,n)}});function mM(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 cy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fm={exports:{}},Yl={},Bm={exports:{}},Fe={};/**
|
||
* @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 z1;function gM(){if(z1)return Fe;z1=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"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S(D,T,Z){this.props=D,this.context=T,this.refs=k,this.updater=Z||b}S.prototype.isReactComponent={},S.prototype.setState=function(D,T){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,T,"setState")},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(D,T,Z){this.props=D,this.context=T,this.refs=k,this.updater=Z||b}var O=E.prototype=new N;O.constructor=E,j(O,S.prototype),O.isPureReactComponent=!0;var P=Array.isArray,_=Object.prototype.hasOwnProperty,C={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function B(D,T,Z){var oe,re={},ue=null,me=null;if(T!=null)for(oe in T.ref!==void 0&&(me=T.ref),T.key!==void 0&&(ue=""+T.key),T)_.call(T,oe)&&!I.hasOwnProperty(oe)&&(re[oe]=T[oe]);var Pe=arguments.length-2;if(Pe===1)re.children=Z;else if(1<Pe){for(var te=Array(Pe),ve=0;ve<Pe;ve++)te[ve]=arguments[ve+2];re.children=te}if(D&&D.defaultProps)for(oe in Pe=D.defaultProps,Pe)re[oe]===void 0&&(re[oe]=Pe[oe]);return{$$typeof:e,type:D,key:ue,ref:me,props:re,_owner:C.current}}function U(D,T){return{$$typeof:e,type:D.type,key:T,ref:D.ref,props:D.props,_owner:D._owner}}function G(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function X(D){var T={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(Z){return T[Z]})}var $=/\/+/g;function fe(D,T){return typeof D=="object"&&D!==null&&D.key!=null?X(""+D.key):T.toString(36)}function J(D,T,Z,oe,re){var ue=typeof D;(ue==="undefined"||ue==="boolean")&&(D=null);var me=!1;if(D===null)me=!0;else switch(ue){case"string":case"number":me=!0;break;case"object":switch(D.$$typeof){case e:case t:me=!0}}if(me)return me=D,re=re(me),D=oe===""?"."+fe(me,0):oe,P(re)?(Z="",D!=null&&(Z=D.replace($,"$&/")+"/"),J(re,T,Z,"",function(ve){return ve})):re!=null&&(G(re)&&(re=U(re,Z+(!re.key||me&&me.key===re.key?"":(""+re.key).replace($,"$&/")+"/")+D)),T.push(re)),1;if(me=0,oe=oe===""?".":oe+":",P(D))for(var Pe=0;Pe<D.length;Pe++){ue=D[Pe];var te=oe+fe(ue,Pe);me+=J(ue,T,Z,te,re)}else if(te=x(D),typeof te=="function")for(D=te.call(D),Pe=0;!(ue=D.next()).done;)ue=ue.value,te=oe+fe(ue,Pe++),me+=J(ue,T,Z,te,re);else if(ue==="object")throw T=String(D),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return me}function pe(D,T,Z){if(D==null)return D;var oe=[],re=0;return J(D,oe,"","",function(ue){return T.call(Z,ue,re++)}),oe}function be(D){if(D._status===-1){var T=D._result;T=T(),T.then(function(Z){(D._status===0||D._status===-1)&&(D._status=1,D._result=Z)},function(Z){(D._status===0||D._status===-1)&&(D._status=2,D._result=Z)}),D._status===-1&&(D._status=0,D._result=T)}if(D._status===1)return D._result.default;throw D._result}var de={current:null},Y={transition:null},V={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:Y,ReactCurrentOwner:C};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:pe,forEach:function(D,T,Z){pe(D,function(){T.apply(this,arguments)},Z)},count:function(D){var T=0;return pe(D,function(){T++}),T},toArray:function(D){return pe(D,function(T){return T})||[]},only:function(D){if(!G(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Fe.Component=S,Fe.Fragment=r,Fe.Profiler=a,Fe.PureComponent=E,Fe.StrictMode=n,Fe.Suspense=f,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,Fe.act=Q,Fe.cloneElement=function(D,T,Z){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var oe=j({},D.props),re=D.key,ue=D.ref,me=D._owner;if(T!=null){if(T.ref!==void 0&&(ue=T.ref,me=C.current),T.key!==void 0&&(re=""+T.key),D.type&&D.type.defaultProps)var Pe=D.type.defaultProps;for(te in T)_.call(T,te)&&!I.hasOwnProperty(te)&&(oe[te]=T[te]===void 0&&Pe!==void 0?Pe[te]:T[te])}var te=arguments.length-2;if(te===1)oe.children=Z;else if(1<te){Pe=Array(te);for(var ve=0;ve<te;ve++)Pe[ve]=arguments[ve+2];oe.children=Pe}return{$$typeof:e,type:D.type,key:re,ref:ue,props:oe,_owner:me}},Fe.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},Fe.createElement=B,Fe.createFactory=function(D){var T=B.bind(null,D);return T.type=D,T},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(D){return{$$typeof:l,render:D}},Fe.isValidElement=G,Fe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:be}},Fe.memo=function(D,T){return{$$typeof:h,type:D,compare:T===void 0?null:T}},Fe.startTransition=function(D){var T=Y.transition;Y.transition={};try{D()}finally{Y.transition=T}},Fe.unstable_act=Q,Fe.useCallback=function(D,T){return de.current.useCallback(D,T)},Fe.useContext=function(D){return de.current.useContext(D)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(D){return de.current.useDeferredValue(D)},Fe.useEffect=function(D,T){return de.current.useEffect(D,T)},Fe.useId=function(){return de.current.useId()},Fe.useImperativeHandle=function(D,T,Z){return de.current.useImperativeHandle(D,T,Z)},Fe.useInsertionEffect=function(D,T){return de.current.useInsertionEffect(D,T)},Fe.useLayoutEffect=function(D,T){return de.current.useLayoutEffect(D,T)},Fe.useMemo=function(D,T){return de.current.useMemo(D,T)},Fe.useReducer=function(D,T,Z){return de.current.useReducer(D,T,Z)},Fe.useRef=function(D){return de.current.useRef(D)},Fe.useState=function(D){return de.current.useState(D)},Fe.useSyncExternalStore=function(D,T,Z){return de.current.useSyncExternalStore(D,T,Z)},Fe.useTransition=function(){return de.current.useTransition()},Fe.version="18.3.1",Fe}var F1;function Vs(){return F1||(F1=1,Bm.exports=gM()),Bm.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 B1;function vM(){if(B1)return Yl;B1=1;var e=Vs(),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(l,f,h){var p,g={},x=null,b=null;h!==void 0&&(x=""+h),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(b=f.ref);for(p in f)n.call(f,p)&&!o.hasOwnProperty(p)&&(g[p]=f[p]);if(l&&l.defaultProps)for(p in f=l.defaultProps,f)g[p]===void 0&&(g[p]=f[p]);return{$$typeof:t,type:l,key:x,ref:b,props:g,_owner:a.current}}return Yl.Fragment=r,Yl.jsx=c,Yl.jsxs=c,Yl}var U1;function yM(){return U1||(U1=1,Fm.exports=vM()),Fm.exports}var u=yM(),v=Vs();const Z2=cy(v),ih=mM({__proto__:null,default:Z2},[v]);var kd={},Um={exports:{}},kr={},Wm={exports:{}},Hm={};/**
|
||
* @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 W1;function xM(){return W1||(W1=1,(function(e){function t(Y,V){var Q=Y.length;Y.push(V);e:for(;0<Q;){var D=Q-1>>>1,T=Y[D];if(0<a(T,V))Y[D]=V,Y[Q]=T,Q=D;else break e}}function r(Y){return Y.length===0?null:Y[0]}function n(Y){if(Y.length===0)return null;var V=Y[0],Q=Y.pop();if(Q!==V){Y[0]=Q;e:for(var D=0,T=Y.length,Z=T>>>1;D<Z;){var oe=2*(D+1)-1,re=Y[oe],ue=oe+1,me=Y[ue];if(0>a(re,Q))ue<T&&0>a(me,re)?(Y[D]=me,Y[ue]=Q,D=ue):(Y[D]=re,Y[oe]=Q,D=oe);else if(ue<T&&0>a(me,Q))Y[D]=me,Y[ue]=Q,D=ue;else break e}}return V}function a(Y,V){var Q=Y.sortIndex-V.sortIndex;return Q!==0?Q:Y.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,l=c.now();e.unstable_now=function(){return c.now()-l}}var f=[],h=[],p=1,g=null,x=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 O(Y){for(var V=r(h);V!==null;){if(V.callback===null)n(h);else if(V.startTime<=Y)n(h),V.sortIndex=V.expirationTime,t(f,V);else break;V=r(h)}}function P(Y){if(k=!1,O(Y),!j)if(r(f)!==null)j=!0,be(_);else{var V=r(h);V!==null&&de(P,V.startTime-Y)}}function _(Y,V){j=!1,k&&(k=!1,N(B),B=-1),b=!0;var Q=x;try{for(O(V),g=r(f);g!==null&&(!(g.expirationTime>V)||Y&&!X());){var D=g.callback;if(typeof D=="function"){g.callback=null,x=g.priorityLevel;var T=D(g.expirationTime<=V);V=e.unstable_now(),typeof T=="function"?g.callback=T:g===r(f)&&n(f),O(V)}else n(f);g=r(f)}if(g!==null)var Z=!0;else{var oe=r(h);oe!==null&&de(P,oe.startTime-V),Z=!1}return Z}finally{g=null,x=Q,b=!1}}var C=!1,I=null,B=-1,U=5,G=-1;function X(){return!(e.unstable_now()-G<U)}function $(){if(I!==null){var Y=e.unstable_now();G=Y;var V=!0;try{V=I(!0,Y)}finally{V?fe():(C=!1,I=null)}}else C=!1}var fe;if(typeof E=="function")fe=function(){E($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,pe=J.port2;J.port1.onmessage=$,fe=function(){pe.postMessage(null)}}else fe=function(){S($,0)};function be(Y){I=Y,C||(C=!0,fe())}function de(Y,V){B=S(function(){Y(e.unstable_now())},V)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){j||b||(j=!0,be(_))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var V=3;break;default:V=x}var Q=x;x=V;try{return Y()}finally{x=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,V){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var Q=x;x=Y;try{return V()}finally{x=Q}},e.unstable_scheduleCallback=function(Y,V,Q){var D=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?D+Q:D):Q=D,Y){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=Q+T,Y={id:p++,callback:V,priorityLevel:Y,startTime:Q,expirationTime:T,sortIndex:-1},Q>D?(Y.sortIndex=Q,t(h,Y),r(f)===null&&Y===r(h)&&(k?(N(B),B=-1):k=!0,de(P,Q-D))):(Y.sortIndex=T,t(f,Y),j||b||(j=!0,be(_))),Y},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(Y){var V=x;return function(){var Q=x;x=V;try{return Y.apply(this,arguments)}finally{x=Q}}}})(Hm)),Hm}var H1;function bM(){return H1||(H1=1,Wm.exports=xM()),Wm.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 K1;function wM(){if(K1)return kr;K1=1;var e=Vs(),t=bM();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 l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function x(i){return f.call(g,i)?!0:f.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function b(i,s,d,m){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function j(i,s,d,m){if(s===null||typeof s>"u"||b(i,s,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,d,m,y,w,A){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=m,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=i,this.type=s,this.sanitizeURL=w,this.removeEmptyString=A}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 O(i,s,d,m){var y=S.hasOwnProperty(s)?S[s]:null;(y!==null?y.type!==0:m||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(j(s,d,y,m)&&(d=null),m||y===null?x(s)&&(d===null?i.removeAttribute(s):i.setAttribute(s,""+d)):y.mustUseProperty?i[y.propertyName]=d===null?y.type===3?!1:"":d:(s=y.attributeName,m=y.attributeNamespace,d===null?i.removeAttribute(s):(y=y.type,d=y===3||y===4&&d===!0?"":""+d,m?i.setAttributeNS(m,s,d):i.setAttribute(s,d))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),C=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),G=Symbol.for("react.provider"),X=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),Y=Symbol.iterator;function V(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var Q=Object.assign,D;function T(i){if(D===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);D=s&&s[1]||""}return`
|
||
`+D+i}var Z=!1;function oe(i,s){if(!i||Z)return"";Z=!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 m=q}Reflect.construct(i,[],s)}else{try{s.call()}catch(q){m=q}i.call(s.prototype)}else{try{throw Error()}catch(q){m=q}i()}}catch(q){if(q&&m&&typeof q.stack=="string"){for(var y=q.stack.split(`
|
||
`),w=m.stack.split(`
|
||
`),A=y.length-1,M=w.length-1;1<=A&&0<=M&&y[A]!==w[M];)M--;for(;1<=A&&0<=M;A--,M--)if(y[A]!==w[M]){if(A!==1||M!==1)do if(A--,M--,0>M||y[A]!==w[M]){var R=`
|
||
`+y[A].replace(" at new "," at ");return i.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",i.displayName)),R}while(1<=A&&0<=M);break}}}finally{Z=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?T(i):""}function re(i){switch(i.tag){case 5:return T(i.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return i=oe(i.type,!1),i;case 11:return i=oe(i.type.render,!1),i;case 1:return i=oe(i.type,!0),i;default:return""}}function ue(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case I:return"Fragment";case C:return"Portal";case U:return"Profiler";case B:return"StrictMode";case fe:return"Suspense";case J:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case X:return(i.displayName||"Context")+".Consumer";case G:return(i._context.displayName||"Context")+".Provider";case $:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case pe:return s=i.displayName||null,s!==null?s:ue(i.type)||"Memo";case be:s=i._payload,i=i._init;try{return ue(i(s))}catch{}}return null}function me(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(s);case 8:return s===B?"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 te(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ve(i){var s=te(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),m=""+i[s];if(!i.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,w=d.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return y.call(this)},set:function(A){m=""+A,w.call(this,A)}}),Object.defineProperty(i,s,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(A){m=""+A},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Oe(i){i._valueTracker||(i._valueTracker=ve(i))}function ie(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var d=s.getValue(),m="";return i&&(m=te(i)?i.checked?"true":"false":i.value),i=m,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 Be(i,s){var d=s.checked;return Q({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function _e(i,s){var d=s.defaultValue==null?"":s.defaultValue,m=s.checked!=null?s.checked:s.defaultChecked;d=Pe(s.value!=null?s.value:d),i._wrapperState={initialChecked:m,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function jt(i,s){s=s.checked,s!=null&&O(i,"checked",s,!1)}function ur(i,s){jt(i,s);var d=Pe(s.value),m=s.type;if(d!=null)m==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Yn(i,s.type,d):s.hasOwnProperty("defaultValue")&&Yn(i,s.type,Pe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Qn(i,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var m=s.type;if(!(m!=="submit"&&m!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,d||s===i.value||(i.value=s),i.defaultValue=s}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function Yn(i,s,d){(s!=="number"||Je(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var sn=Array.isArray;function Fr(i,s,d,m){if(i=i.options,s){s={};for(var y=0;y<d.length;y++)s["$"+d[y]]=!0;for(d=0;d<i.length;d++)y=s.hasOwnProperty("$"+i[d].value),i[d].selected!==y&&(i[d].selected=y),y&&m&&(i[d].defaultSelected=!0)}else{for(d=""+Pe(d),s=null,y=0;y<i.length;y++){if(i[y].value===d){i[y].selected=!0,m&&(i[y].defaultSelected=!0);return}s!==null||i[y].disabled||(s=i[y])}s!==null&&(s.selected=!0)}}function Oi(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return Q({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function _i(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(sn(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 ee(i,s){var d=Pe(s.value),m=Pe(s.defaultValue);d!=null&&(d=""+d,d!==i.value&&(i.value=d),s.defaultValue==null&&i.defaultValue!==d&&(i.defaultValue=d)),m!=null&&(i.defaultValue=""+m)}function $e(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function At(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 Oo(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?At(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Sa,ll=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,d,m,y){MSApp.execUnsafeLocalFunction(function(){return i(s,d,m,y)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Sa=Sa||document.createElement("div"),Sa.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Sa.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Mi(i,s){if(s){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=s;return}}i.textContent=s}var Ii={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},fc=["Webkit","ms","Moz","O"];Object.keys(Ii).forEach(function(i){fc.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Ii[s]=Ii[i]})});function ul(i,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||Ii.hasOwnProperty(i)&&Ii[i]?(""+s).trim():s+"px"}function cl(i,s){i=i.style;for(var d in s)if(s.hasOwnProperty(d)){var m=d.indexOf("--")===0,y=ul(d,s[d],m);d==="float"&&(d="cssFloat"),m?i.setProperty(d,y):i[d]=y}}var F=Q({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 he(i,s){if(s){if(F[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Ae(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 Ue=null;function Ye(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Jt=null,tt=null,yt=null;function Na(i){if(i=Tl(i)){if(typeof Jt!="function")throw Error(r(280));var s=i.stateNode;s&&(s=Rc(s),Jt(i.stateNode,i.type,s))}}function dl(i){tt?yt?yt.push(i):yt=[i]:tt=i}function hc(){if(tt){var i=tt,s=yt;if(yt=tt=null,Na(i),s)for(i=0;i<s.length;i++)Na(s[i])}}function fl(i,s){return i(s)}function ax(){}var rp=!1;function ox(i,s,d){if(rp)return i(s,d);rp=!0;try{return fl(i,s,d)}finally{rp=!1,(tt!==null||yt!==null)&&(ax(),hc())}}function hl(i,s){var d=i.stateNode;if(d===null)return null;var m=Rc(d);if(m===null)return null;d=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var np=!1;if(l)try{var pl={};Object.defineProperty(pl,"passive",{get:function(){np=!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{np=!1}function x_(i,s,d,m,y,w,A,M,R){var q=Array.prototype.slice.call(arguments,3);try{s.apply(d,q)}catch(ae){this.onError(ae)}}var ml=!1,pc=null,mc=!1,ip=null,b_={onError:function(i){ml=!0,pc=i}};function w_(i,s,d,m,y,w,A,M,R){ml=!1,pc=null,x_.apply(b_,arguments)}function k_(i,s,d,m,y,w,A,M,R){if(w_.apply(this,arguments),ml){if(ml){var q=pc;ml=!1,pc=null}else throw Error(r(198));mc||(mc=!0,ip=q)}}function Ea(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 sx(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 lx(i){if(Ea(i)!==i)throw Error(r(188))}function j_(i){var s=i.alternate;if(!s){if(s=Ea(i),s===null)throw Error(r(188));return s!==i?null:i}for(var d=i,m=s;;){var y=d.return;if(y===null)break;var w=y.alternate;if(w===null){if(m=y.return,m!==null){d=m;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===d)return lx(y),i;if(w===m)return lx(y),s;w=w.sibling}throw Error(r(188))}if(d.return!==m.return)d=y,m=w;else{for(var A=!1,M=y.child;M;){if(M===d){A=!0,d=y,m=w;break}if(M===m){A=!0,m=y,d=w;break}M=M.sibling}if(!A){for(M=w.child;M;){if(M===d){A=!0,d=w,m=y;break}if(M===m){A=!0,m=w,d=y;break}M=M.sibling}if(!A)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:s}function ux(i){return i=j_(i),i!==null?cx(i):null}function cx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=cx(i);if(s!==null)return s;i=i.sibling}return null}var dx=t.unstable_scheduleCallback,fx=t.unstable_cancelCallback,S_=t.unstable_shouldYield,N_=t.unstable_requestPaint,xt=t.unstable_now,E_=t.unstable_getCurrentPriorityLevel,ap=t.unstable_ImmediatePriority,hx=t.unstable_UserBlockingPriority,gc=t.unstable_NormalPriority,A_=t.unstable_LowPriority,px=t.unstable_IdlePriority,vc=null,Sn=null;function P_(i){if(Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(vc,i,void 0,(i.current.flags&128)===128)}catch{}}var ln=Math.clz32?Math.clz32:__,C_=Math.log,O_=Math.LN2;function __(i){return i>>>=0,i===0?32:31-(C_(i)/O_|0)|0}var yc=64,xc=4194304;function gl(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 bc(i,s){var d=i.pendingLanes;if(d===0)return 0;var m=0,y=i.suspendedLanes,w=i.pingedLanes,A=d&268435455;if(A!==0){var M=A&~y;M!==0?m=gl(M):(w&=A,w!==0&&(m=gl(w)))}else A=d&~y,A!==0?m=gl(A):w!==0&&(m=gl(w));if(m===0)return 0;if(s!==0&&s!==m&&(s&y)===0&&(y=m&-m,w=s&-s,y>=w||y===16&&(w&4194240)!==0))return s;if((m&4)!==0&&(m|=d&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=m;0<s;)d=31-ln(s),y=1<<d,m|=i[d],s&=~y;return m}function M_(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 I_(i,s){for(var d=i.suspendedLanes,m=i.pingedLanes,y=i.expirationTimes,w=i.pendingLanes;0<w;){var A=31-ln(w),M=1<<A,R=y[A];R===-1?((M&d)===0||(M&m)!==0)&&(y[A]=M_(M,s)):R<=s&&(i.expiredLanes|=M),w&=~M}}function op(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function mx(){var i=yc;return yc<<=1,(yc&4194240)===0&&(yc=64),i}function sp(i){for(var s=[],d=0;31>d;d++)s.push(i);return s}function vl(i,s,d){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-ln(s),i[s]=d}function T_(i,s){var d=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0<d;){var y=31-ln(d),w=1<<y;s[y]=0,m[y]=-1,i[y]=-1,d&=~w}}function lp(i,s){var d=i.entangledLanes|=s;for(i=i.entanglements;d;){var m=31-ln(d),y=1<<m;y&s|i[m]&s&&(i[m]|=s),d&=~y}}var Ze=0;function gx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var vx,up,yx,xx,bx,cp=!1,wc=[],Ti=null,Di=null,Ri=null,yl=new Map,xl=new Map,$i=[],D_="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 wx(i,s){switch(i){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":yl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":xl.delete(s.pointerId)}}function bl(i,s,d,m,y,w){return i===null||i.nativeEvent!==w?(i={blockedOn:s,domEventName:d,eventSystemFlags:m,nativeEvent:w,targetContainers:[y]},s!==null&&(s=Tl(s),s!==null&&up(s)),i):(i.eventSystemFlags|=m,s=i.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),i)}function R_(i,s,d,m,y){switch(s){case"focusin":return Ti=bl(Ti,i,s,d,m,y),!0;case"dragenter":return Di=bl(Di,i,s,d,m,y),!0;case"mouseover":return Ri=bl(Ri,i,s,d,m,y),!0;case"pointerover":var w=y.pointerId;return yl.set(w,bl(yl.get(w)||null,i,s,d,m,y)),!0;case"gotpointercapture":return w=y.pointerId,xl.set(w,bl(xl.get(w)||null,i,s,d,m,y)),!0}return!1}function kx(i){var s=Aa(i.target);if(s!==null){var d=Ea(s);if(d!==null){if(s=d.tag,s===13){if(s=sx(d),s!==null){i.blockedOn=s,bx(i.priority,function(){yx(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 kc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var d=fp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(d===null){d=i.nativeEvent;var m=new d.constructor(d.type,d);Ue=m,d.target.dispatchEvent(m),Ue=null}else return s=Tl(d),s!==null&&up(s),i.blockedOn=d,!1;s.shift()}return!0}function jx(i,s,d){kc(i)&&d.delete(s)}function $_(){cp=!1,Ti!==null&&kc(Ti)&&(Ti=null),Di!==null&&kc(Di)&&(Di=null),Ri!==null&&kc(Ri)&&(Ri=null),yl.forEach(jx),xl.forEach(jx)}function wl(i,s){i.blockedOn===s&&(i.blockedOn=null,cp||(cp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,$_)))}function kl(i){function s(y){return wl(y,i)}if(0<wc.length){wl(wc[0],i);for(var d=1;d<wc.length;d++){var m=wc[d];m.blockedOn===i&&(m.blockedOn=null)}}for(Ti!==null&&wl(Ti,i),Di!==null&&wl(Di,i),Ri!==null&&wl(Ri,i),yl.forEach(s),xl.forEach(s),d=0;d<$i.length;d++)m=$i[d],m.blockedOn===i&&(m.blockedOn=null);for(;0<$i.length&&(d=$i[0],d.blockedOn===null);)kx(d),d.blockedOn===null&&$i.shift()}var _o=P.ReactCurrentBatchConfig,jc=!0;function L_(i,s,d,m){var y=Ze,w=_o.transition;_o.transition=null;try{Ze=1,dp(i,s,d,m)}finally{Ze=y,_o.transition=w}}function z_(i,s,d,m){var y=Ze,w=_o.transition;_o.transition=null;try{Ze=4,dp(i,s,d,m)}finally{Ze=y,_o.transition=w}}function dp(i,s,d,m){if(jc){var y=fp(i,s,d,m);if(y===null)Cp(i,s,m,Sc,d),wx(i,m);else if(R_(y,i,s,d,m))m.stopPropagation();else if(wx(i,m),s&4&&-1<D_.indexOf(i)){for(;y!==null;){var w=Tl(y);if(w!==null&&vx(w),w=fp(i,s,d,m),w===null&&Cp(i,s,m,Sc,d),w===y)break;y=w}y!==null&&m.stopPropagation()}else Cp(i,s,m,null,d)}}var Sc=null;function fp(i,s,d,m){if(Sc=null,i=Ye(m),i=Aa(i),i!==null)if(s=Ea(i),s===null)i=null;else if(d=s.tag,d===13){if(i=sx(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 Sc=i,null}function Sx(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(E_()){case ap:return 1;case hx:return 4;case gc:case A_:return 16;case px:return 536870912;default:return 16}default:return 16}}var Li=null,hp=null,Nc=null;function Nx(){if(Nc)return Nc;var i,s=hp,d=s.length,m,y="value"in Li?Li.value:Li.textContent,w=y.length;for(i=0;i<d&&s[i]===y[i];i++);var A=d-i;for(m=1;m<=A&&s[d-m]===y[w-m];m++);return Nc=y.slice(i,1<m?1-m:void 0)}function Ec(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 Ac(){return!0}function Ex(){return!1}function Pr(i){function s(d,m,y,w,A){this._reactName=d,this._targetInst=y,this.type=m,this.nativeEvent=w,this.target=A,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(d=i[M],this[M]=d?d(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Ac:Ex,this.isPropagationStopped=Ex,this}return Q(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=Ac)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Ac)},persist:function(){},isPersistent:Ac}),s}var Mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pp=Pr(Mo),jl=Q({},Mo,{view:0,detail:0}),F_=Pr(jl),mp,gp,Sl,Pc=Q({},jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yp,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!==Sl&&(Sl&&i.type==="mousemove"?(mp=i.screenX-Sl.screenX,gp=i.screenY-Sl.screenY):gp=mp=0,Sl=i),mp)},movementY:function(i){return"movementY"in i?i.movementY:gp}}),Ax=Pr(Pc),B_=Q({},Pc,{dataTransfer:0}),U_=Pr(B_),W_=Q({},jl,{relatedTarget:0}),vp=Pr(W_),H_=Q({},Mo,{animationName:0,elapsedTime:0,pseudoElement:0}),K_=Pr(H_),G_=Q({},Mo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),V_=Pr(G_),q_=Q({},Mo,{data:0}),Px=Pr(q_),Q_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y_={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"},X_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z_(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=X_[i])?!!s[i]:!1}function yp(){return Z_}var J_=Q({},jl,{key:function(i){if(i.key){var s=Q_[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ec(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Y_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yp,charCode:function(i){return i.type==="keypress"?Ec(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ec(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),e5=Pr(J_),t5=Q({},Pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cx=Pr(t5),r5=Q({},jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yp}),n5=Pr(r5),i5=Q({},Mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),a5=Pr(i5),o5=Q({},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}),s5=Pr(o5),l5=[9,13,27,32],xp=l&&"CompositionEvent"in window,Nl=null;l&&"documentMode"in document&&(Nl=document.documentMode);var u5=l&&"TextEvent"in window&&!Nl,Ox=l&&(!xp||Nl&&8<Nl&&11>=Nl),_x=" ",Mx=!1;function Ix(i,s){switch(i){case"keyup":return l5.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Io=!1;function c5(i,s){switch(i){case"compositionend":return Tx(s);case"keypress":return s.which!==32?null:(Mx=!0,_x);case"textInput":return i=s.data,i===_x&&Mx?null:i;default:return null}}function d5(i,s){if(Io)return i==="compositionend"||!xp&&Ix(i,s)?(i=Nx(),Nc=hp=Li=null,Io=!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 Ox&&s.locale!=="ko"?null:s.data;default:return null}}var f5={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 Dx(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!f5[i.type]:s==="textarea"}function Rx(i,s,d,m){dl(m),s=Ic(s,"onChange"),0<s.length&&(d=new pp("onChange","change",null,d,m),i.push({event:d,listeners:s}))}var El=null,Al=null;function h5(i){eb(i,0)}function Cc(i){var s=Lo(i);if(ie(s))return i}function p5(i,s){if(i==="change")return s}var $x=!1;if(l){var bp;if(l){var wp="oninput"in document;if(!wp){var Lx=document.createElement("div");Lx.setAttribute("oninput","return;"),wp=typeof Lx.oninput=="function"}bp=wp}else bp=!1;$x=bp&&(!document.documentMode||9<document.documentMode)}function zx(){El&&(El.detachEvent("onpropertychange",Fx),Al=El=null)}function Fx(i){if(i.propertyName==="value"&&Cc(Al)){var s=[];Rx(s,Al,i,Ye(i)),ox(h5,s)}}function m5(i,s,d){i==="focusin"?(zx(),El=s,Al=d,El.attachEvent("onpropertychange",Fx)):i==="focusout"&&zx()}function g5(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Cc(Al)}function v5(i,s){if(i==="click")return Cc(s)}function y5(i,s){if(i==="input"||i==="change")return Cc(s)}function x5(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var un=typeof Object.is=="function"?Object.is:x5;function Pl(i,s){if(un(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var d=Object.keys(i),m=Object.keys(s);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var y=d[m];if(!f.call(s,y)||!un(i[y],s[y]))return!1}return!0}function Bx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Ux(i,s){var d=Bx(i);i=0;for(var m;d;){if(d.nodeType===3){if(m=i+d.textContent.length,i<=s&&m>=s)return{node:d,offset:s-i};i=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Bx(d)}}function Wx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Wx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Hx(){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 kp(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 b5(i){var s=Hx(),d=i.focusedElem,m=i.selectionRange;if(s!==d&&d&&d.ownerDocument&&Wx(d.ownerDocument.documentElement,d)){if(m!==null&&kp(d)){if(s=m.start,i=m.end,i===void 0&&(i=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(i,d.value.length);else if(i=(s=d.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var y=d.textContent.length,w=Math.min(m.start,y);m=m.end===void 0?w:Math.min(m.end,y),!i.extend&&w>m&&(y=m,m=w,w=y),y=Ux(d,w);var A=Ux(d,m);y&&A&&(i.rangeCount!==1||i.anchorNode!==y.node||i.anchorOffset!==y.offset||i.focusNode!==A.node||i.focusOffset!==A.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),i.removeAllRanges(),w>m?(i.addRange(s),i.extend(A.node,A.offset)):(s.setEnd(A.node,A.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 w5=l&&"documentMode"in document&&11>=document.documentMode,To=null,jp=null,Cl=null,Sp=!1;function Kx(i,s,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Sp||To==null||To!==Je(m)||(m=To,"selectionStart"in m&&kp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Cl&&Pl(Cl,m)||(Cl=m,m=Ic(jp,"onSelect"),0<m.length&&(s=new pp("onSelect","select",null,s,d),i.push({event:s,listeners:m}),s.target=To)))}function Oc(i,s){var d={};return d[i.toLowerCase()]=s.toLowerCase(),d["Webkit"+i]="webkit"+s,d["Moz"+i]="moz"+s,d}var Do={animationend:Oc("Animation","AnimationEnd"),animationiteration:Oc("Animation","AnimationIteration"),animationstart:Oc("Animation","AnimationStart"),transitionend:Oc("Transition","TransitionEnd")},Np={},Gx={};l&&(Gx=document.createElement("div").style,"AnimationEvent"in window||(delete Do.animationend.animation,delete Do.animationiteration.animation,delete Do.animationstart.animation),"TransitionEvent"in window||delete Do.transitionend.transition);function _c(i){if(Np[i])return Np[i];if(!Do[i])return i;var s=Do[i],d;for(d in s)if(s.hasOwnProperty(d)&&d in Gx)return Np[i]=s[d];return i}var Vx=_c("animationend"),qx=_c("animationiteration"),Qx=_c("animationstart"),Yx=_c("transitionend"),Xx=new Map,Zx="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 zi(i,s){Xx.set(i,s),o(s,[i])}for(var Ep=0;Ep<Zx.length;Ep++){var Ap=Zx[Ep],k5=Ap.toLowerCase(),j5=Ap[0].toUpperCase()+Ap.slice(1);zi(k5,"on"+j5)}zi(Vx,"onAnimationEnd"),zi(qx,"onAnimationIteration"),zi(Qx,"onAnimationStart"),zi("dblclick","onDoubleClick"),zi("focusin","onFocus"),zi("focusout","onBlur"),zi(Yx,"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 Ol="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(" "),S5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ol));function Jx(i,s,d){var m=i.type||"unknown-event";i.currentTarget=d,k_(m,s,void 0,i),i.currentTarget=null}function eb(i,s){s=(s&4)!==0;for(var d=0;d<i.length;d++){var m=i[d],y=m.event;m=m.listeners;e:{var w=void 0;if(s)for(var A=m.length-1;0<=A;A--){var M=m[A],R=M.instance,q=M.currentTarget;if(M=M.listener,R!==w&&y.isPropagationStopped())break e;Jx(y,M,q),w=R}else for(A=0;A<m.length;A++){if(M=m[A],R=M.instance,q=M.currentTarget,M=M.listener,R!==w&&y.isPropagationStopped())break e;Jx(y,M,q),w=R}}}if(mc)throw i=ip,mc=!1,ip=null,i}function it(i,s){var d=s[Dp];d===void 0&&(d=s[Dp]=new Set);var m=i+"__bubble";d.has(m)||(tb(s,i,2,!1),d.add(m))}function Pp(i,s,d){var m=0;s&&(m|=4),tb(d,i,m,s)}var Mc="_reactListening"+Math.random().toString(36).slice(2);function _l(i){if(!i[Mc]){i[Mc]=!0,n.forEach(function(d){d!=="selectionchange"&&(S5.has(d)||Pp(d,!1,i),Pp(d,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Mc]||(s[Mc]=!0,Pp("selectionchange",!1,s))}}function tb(i,s,d,m){switch(Sx(s)){case 1:var y=L_;break;case 4:y=z_;break;default:y=dp}d=y.bind(null,s,d,i),y=void 0,!np||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),m?y!==void 0?i.addEventListener(s,d,{capture:!0,passive:y}):i.addEventListener(s,d,!0):y!==void 0?i.addEventListener(s,d,{passive:y}):i.addEventListener(s,d,!1)}function Cp(i,s,d,m,y){var w=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var A=m.tag;if(A===3||A===4){var M=m.stateNode.containerInfo;if(M===y||M.nodeType===8&&M.parentNode===y)break;if(A===4)for(A=m.return;A!==null;){var R=A.tag;if((R===3||R===4)&&(R=A.stateNode.containerInfo,R===y||R.nodeType===8&&R.parentNode===y))return;A=A.return}for(;M!==null;){if(A=Aa(M),A===null)return;if(R=A.tag,R===5||R===6){m=w=A;continue e}M=M.parentNode}}m=m.return}ox(function(){var q=w,ae=Ye(d),se=[];e:{var ne=Xx.get(i);if(ne!==void 0){var ye=pp,je=i;switch(i){case"keypress":if(Ec(d)===0)break e;case"keydown":case"keyup":ye=e5;break;case"focusin":je="focus",ye=vp;break;case"focusout":je="blur",ye=vp;break;case"beforeblur":case"afterblur":ye=vp;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":ye=Ax;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=U_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=n5;break;case Vx:case qx:case Qx:ye=K_;break;case Yx:ye=a5;break;case"scroll":ye=F_;break;case"wheel":ye=s5;break;case"copy":case"cut":case"paste":ye=V_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=Cx}var Se=(s&4)!==0,bt=!Se&&i==="scroll",W=Se?ne!==null?ne+"Capture":null:ne;Se=[];for(var z=q,H;z!==null;){H=z;var le=H.stateNode;if(H.tag===5&&le!==null&&(H=le,W!==null&&(le=hl(z,W),le!=null&&Se.push(Ml(z,le,H)))),bt)break;z=z.return}0<Se.length&&(ne=new ye(ne,je,null,d,ae),se.push({event:ne,listeners:Se}))}}if((s&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",ye=i==="mouseout"||i==="pointerout",ne&&d!==Ue&&(je=d.relatedTarget||d.fromElement)&&(Aa(je)||je[Xn]))break e;if((ye||ne)&&(ne=ae.window===ae?ae:(ne=ae.ownerDocument)?ne.defaultView||ne.parentWindow:window,ye?(je=d.relatedTarget||d.toElement,ye=q,je=je?Aa(je):null,je!==null&&(bt=Ea(je),je!==bt||je.tag!==5&&je.tag!==6)&&(je=null)):(ye=null,je=q),ye!==je)){if(Se=Ax,le="onMouseLeave",W="onMouseEnter",z="mouse",(i==="pointerout"||i==="pointerover")&&(Se=Cx,le="onPointerLeave",W="onPointerEnter",z="pointer"),bt=ye==null?ne:Lo(ye),H=je==null?ne:Lo(je),ne=new Se(le,z+"leave",ye,d,ae),ne.target=bt,ne.relatedTarget=H,le=null,Aa(ae)===q&&(Se=new Se(W,z+"enter",je,d,ae),Se.target=H,Se.relatedTarget=bt,le=Se),bt=le,ye&&je)t:{for(Se=ye,W=je,z=0,H=Se;H;H=Ro(H))z++;for(H=0,le=W;le;le=Ro(le))H++;for(;0<z-H;)Se=Ro(Se),z--;for(;0<H-z;)W=Ro(W),H--;for(;z--;){if(Se===W||W!==null&&Se===W.alternate)break t;Se=Ro(Se),W=Ro(W)}Se=null}else Se=null;ye!==null&&rb(se,ne,ye,Se,!1),je!==null&&bt!==null&&rb(se,bt,je,Se,!0)}}e:{if(ne=q?Lo(q):window,ye=ne.nodeName&&ne.nodeName.toLowerCase(),ye==="select"||ye==="input"&&ne.type==="file")var Ee=p5;else if(Dx(ne))if($x)Ee=y5;else{Ee=g5;var Ie=m5}else(ye=ne.nodeName)&&ye.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Ee=v5);if(Ee&&(Ee=Ee(i,q))){Rx(se,Ee,d,ae);break e}Ie&&Ie(i,ne,q),i==="focusout"&&(Ie=ne._wrapperState)&&Ie.controlled&&ne.type==="number"&&Yn(ne,"number",ne.value)}switch(Ie=q?Lo(q):window,i){case"focusin":(Dx(Ie)||Ie.contentEditable==="true")&&(To=Ie,jp=q,Cl=null);break;case"focusout":Cl=jp=To=null;break;case"mousedown":Sp=!0;break;case"contextmenu":case"mouseup":case"dragend":Sp=!1,Kx(se,d,ae);break;case"selectionchange":if(w5)break;case"keydown":case"keyup":Kx(se,d,ae)}var Te;if(xp)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 Io?Ix(i,d)&&(Re="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(Re="onCompositionStart");Re&&(Ox&&d.locale!=="ko"&&(Io||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Io&&(Te=Nx()):(Li=ae,hp="value"in Li?Li.value:Li.textContent,Io=!0)),Ie=Ic(q,Re),0<Ie.length&&(Re=new Px(Re,i,null,d,ae),se.push({event:Re,listeners:Ie}),Te?Re.data=Te:(Te=Tx(d),Te!==null&&(Re.data=Te)))),(Te=u5?c5(i,d):d5(i,d))&&(q=Ic(q,"onBeforeInput"),0<q.length&&(ae=new Px("onBeforeInput","beforeinput",null,d,ae),se.push({event:ae,listeners:q}),ae.data=Te))}eb(se,s)})}function Ml(i,s,d){return{instance:i,listener:s,currentTarget:d}}function Ic(i,s){for(var d=s+"Capture",m=[];i!==null;){var y=i,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=hl(i,d),w!=null&&m.unshift(Ml(i,w,y)),w=hl(i,s),w!=null&&m.push(Ml(i,w,y))),i=i.return}return m}function Ro(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function rb(i,s,d,m,y){for(var w=s._reactName,A=[];d!==null&&d!==m;){var M=d,R=M.alternate,q=M.stateNode;if(R!==null&&R===m)break;M.tag===5&&q!==null&&(M=q,y?(R=hl(d,w),R!=null&&A.unshift(Ml(d,R,M))):y||(R=hl(d,w),R!=null&&A.push(Ml(d,R,M)))),d=d.return}A.length!==0&&i.push({event:s,listeners:A})}var N5=/\r\n?/g,E5=/\u0000|\uFFFD/g;function nb(i){return(typeof i=="string"?i:""+i).replace(N5,`
|
||
`).replace(E5,"")}function Tc(i,s,d){if(s=nb(s),nb(i)!==s&&d)throw Error(r(425))}function Dc(){}var Op=null,_p=null;function Mp(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 Ip=typeof setTimeout=="function"?setTimeout:void 0,A5=typeof clearTimeout=="function"?clearTimeout:void 0,ib=typeof Promise=="function"?Promise:void 0,P5=typeof queueMicrotask=="function"?queueMicrotask:typeof ib<"u"?function(i){return ib.resolve(null).then(i).catch(C5)}:Ip;function C5(i){setTimeout(function(){throw i})}function Tp(i,s){var d=s,m=0;do{var y=d.nextSibling;if(i.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"){if(m===0){i.removeChild(y),kl(s);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=y}while(d);kl(s)}function Fi(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 ab(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 $o=Math.random().toString(36).slice(2),Nn="__reactFiber$"+$o,Il="__reactProps$"+$o,Xn="__reactContainer$"+$o,Dp="__reactEvents$"+$o,O5="__reactListeners$"+$o,_5="__reactHandles$"+$o;function Aa(i){var s=i[Nn];if(s)return s;for(var d=i.parentNode;d;){if(s=d[Xn]||d[Nn]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(i=ab(i);i!==null;){if(d=i[Nn])return d;i=ab(i)}return s}i=d,d=i.parentNode}return null}function Tl(i){return i=i[Nn]||i[Xn],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Lo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(r(33))}function Rc(i){return i[Il]||null}var Rp=[],zo=-1;function Bi(i){return{current:i}}function at(i){0>zo||(i.current=Rp[zo],Rp[zo]=null,zo--)}function rt(i,s){zo++,Rp[zo]=i.current,i.current=s}var Ui={},er=Bi(Ui),vr=Bi(!1),Pa=Ui;function Fo(i,s){var d=i.type.contextTypes;if(!d)return Ui;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===s)return m.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in d)y[w]=s[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=y),y}function yr(i){return i=i.childContextTypes,i!=null}function $c(){at(vr),at(er)}function ob(i,s,d){if(er.current!==Ui)throw Error(r(168));rt(er,s),rt(vr,d)}function sb(i,s,d){var m=i.stateNode;if(s=s.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var y in m)if(!(y in s))throw Error(r(108,me(i)||"Unknown",y));return Q({},d,m)}function Lc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ui,Pa=er.current,rt(er,i),rt(vr,vr.current),!0}function lb(i,s,d){var m=i.stateNode;if(!m)throw Error(r(169));d?(i=sb(i,s,Pa),m.__reactInternalMemoizedMergedChildContext=i,at(vr),at(er),rt(er,i)):at(vr),rt(vr,d)}var Zn=null,zc=!1,$p=!1;function ub(i){Zn===null?Zn=[i]:Zn.push(i)}function M5(i){zc=!0,ub(i)}function Wi(){if(!$p&&Zn!==null){$p=!0;var i=0,s=Ze;try{var d=Zn;for(Ze=1;i<d.length;i++){var m=d[i];do m=m(!0);while(m!==null)}Zn=null,zc=!1}catch(y){throw Zn!==null&&(Zn=Zn.slice(i+1)),dx(ap,Wi),y}finally{Ze=s,$p=!1}}return null}var Bo=[],Uo=0,Fc=null,Bc=0,Br=[],Ur=0,Ca=null,Jn=1,ei="";function Oa(i,s){Bo[Uo++]=Bc,Bo[Uo++]=Fc,Fc=i,Bc=s}function cb(i,s,d){Br[Ur++]=Jn,Br[Ur++]=ei,Br[Ur++]=Ca,Ca=i;var m=Jn;i=ei;var y=32-ln(m)-1;m&=~(1<<y),d+=1;var w=32-ln(s)+y;if(30<w){var A=y-y%5;w=(m&(1<<A)-1).toString(32),m>>=A,y-=A,Jn=1<<32-ln(s)+y|d<<y|m,ei=w+i}else Jn=1<<w|d<<y|m,ei=i}function Lp(i){i.return!==null&&(Oa(i,1),cb(i,1,0))}function zp(i){for(;i===Fc;)Fc=Bo[--Uo],Bo[Uo]=null,Bc=Bo[--Uo],Bo[Uo]=null;for(;i===Ca;)Ca=Br[--Ur],Br[Ur]=null,ei=Br[--Ur],Br[Ur]=null,Jn=Br[--Ur],Br[Ur]=null}var Cr=null,Or=null,ut=!1,cn=null;function db(i,s){var d=Gr(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 fb(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,Cr=i,Or=Fi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Cr=i,Or=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(d=Ca!==null?{id:Jn,overflow:ei}:null,i.memoizedState={dehydrated:s,treeContext:d,retryLane:1073741824},d=Gr(18,null,null,0),d.stateNode=s,d.return=i,i.child=d,Cr=i,Or=null,!0):!1;default:return!1}}function Fp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Bp(i){if(ut){var s=Or;if(s){var d=s;if(!fb(i,s)){if(Fp(i))throw Error(r(418));s=Fi(d.nextSibling);var m=Cr;s&&fb(i,s)?db(m,d):(i.flags=i.flags&-4097|2,ut=!1,Cr=i)}}else{if(Fp(i))throw Error(r(418));i.flags=i.flags&-4097|2,ut=!1,Cr=i}}}function hb(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Cr=i}function Uc(i){if(i!==Cr)return!1;if(!ut)return hb(i),ut=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Mp(i.type,i.memoizedProps)),s&&(s=Or)){if(Fp(i))throw pb(),Error(r(418));for(;s;)db(i,s),s=Fi(s.nextSibling)}if(hb(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){Or=Fi(i.nextSibling);break e}s--}else d!=="$"&&d!=="$!"&&d!=="$?"||s++}i=i.nextSibling}Or=null}}else Or=Cr?Fi(i.stateNode.nextSibling):null;return!0}function pb(){for(var i=Or;i;)i=Fi(i.nextSibling)}function Wo(){Or=Cr=null,ut=!1}function Up(i){cn===null?cn=[i]:cn.push(i)}var I5=P.ReactCurrentBatchConfig;function Dl(i,s,d){if(i=d.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var m=d.stateNode}if(!m)throw Error(r(147,i));var y=m,w=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(A){var M=y.refs;A===null?delete M[w]:M[w]=A},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 mb(i){var s=i._init;return s(i._payload)}function gb(i){function s(W,z){if(i){var H=W.deletions;H===null?(W.deletions=[z],W.flags|=16):H.push(z)}}function d(W,z){if(!i)return null;for(;z!==null;)s(W,z),z=z.sibling;return null}function m(W,z){for(W=new Map;z!==null;)z.key!==null?W.set(z.key,z):W.set(z.index,z),z=z.sibling;return W}function y(W,z){return W=Xi(W,z),W.index=0,W.sibling=null,W}function w(W,z,H){return W.index=H,i?(H=W.alternate,H!==null?(H=H.index,H<z?(W.flags|=2,z):H):(W.flags|=2,z)):(W.flags|=1048576,z)}function A(W){return i&&W.alternate===null&&(W.flags|=2),W}function M(W,z,H,le){return z===null||z.tag!==6?(z=Im(H,W.mode,le),z.return=W,z):(z=y(z,H),z.return=W,z)}function R(W,z,H,le){var Ee=H.type;return Ee===I?ae(W,z,H.props.children,le,H.key):z!==null&&(z.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===be&&mb(Ee)===z.type)?(le=y(z,H.props),le.ref=Dl(W,z,H),le.return=W,le):(le=hd(H.type,H.key,H.props,null,W.mode,le),le.ref=Dl(W,z,H),le.return=W,le)}function q(W,z,H,le){return z===null||z.tag!==4||z.stateNode.containerInfo!==H.containerInfo||z.stateNode.implementation!==H.implementation?(z=Tm(H,W.mode,le),z.return=W,z):(z=y(z,H.children||[]),z.return=W,z)}function ae(W,z,H,le,Ee){return z===null||z.tag!==7?(z=La(H,W.mode,le,Ee),z.return=W,z):(z=y(z,H),z.return=W,z)}function se(W,z,H){if(typeof z=="string"&&z!==""||typeof z=="number")return z=Im(""+z,W.mode,H),z.return=W,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return H=hd(z.type,z.key,z.props,null,W.mode,H),H.ref=Dl(W,null,z),H.return=W,H;case C:return z=Tm(z,W.mode,H),z.return=W,z;case be:var le=z._init;return se(W,le(z._payload),H)}if(sn(z)||V(z))return z=La(z,W.mode,H,null),z.return=W,z;Wc(W,z)}return null}function ne(W,z,H,le){var Ee=z!==null?z.key:null;if(typeof H=="string"&&H!==""||typeof H=="number")return Ee!==null?null:M(W,z,""+H,le);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return H.key===Ee?R(W,z,H,le):null;case C:return H.key===Ee?q(W,z,H,le):null;case be:return Ee=H._init,ne(W,z,Ee(H._payload),le)}if(sn(H)||V(H))return Ee!==null?null:ae(W,z,H,le,null);Wc(W,H)}return null}function ye(W,z,H,le,Ee){if(typeof le=="string"&&le!==""||typeof le=="number")return W=W.get(H)||null,M(z,W,""+le,Ee);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case _:return W=W.get(le.key===null?H:le.key)||null,R(z,W,le,Ee);case C:return W=W.get(le.key===null?H:le.key)||null,q(z,W,le,Ee);case be:var Ie=le._init;return ye(W,z,H,Ie(le._payload),Ee)}if(sn(le)||V(le))return W=W.get(H)||null,ae(z,W,le,Ee,null);Wc(z,le)}return null}function je(W,z,H,le){for(var Ee=null,Ie=null,Te=z,Re=z=0,Rt=null;Te!==null&&Re<H.length;Re++){Te.index>Re?(Rt=Te,Te=null):Rt=Te.sibling;var qe=ne(W,Te,H[Re],le);if(qe===null){Te===null&&(Te=Rt);break}i&&Te&&qe.alternate===null&&s(W,Te),z=w(qe,z,Re),Ie===null?Ee=qe:Ie.sibling=qe,Ie=qe,Te=Rt}if(Re===H.length)return d(W,Te),ut&&Oa(W,Re),Ee;if(Te===null){for(;Re<H.length;Re++)Te=se(W,H[Re],le),Te!==null&&(z=w(Te,z,Re),Ie===null?Ee=Te:Ie.sibling=Te,Ie=Te);return ut&&Oa(W,Re),Ee}for(Te=m(W,Te);Re<H.length;Re++)Rt=ye(Te,W,Re,H[Re],le),Rt!==null&&(i&&Rt.alternate!==null&&Te.delete(Rt.key===null?Re:Rt.key),z=w(Rt,z,Re),Ie===null?Ee=Rt:Ie.sibling=Rt,Ie=Rt);return i&&Te.forEach(function(Zi){return s(W,Zi)}),ut&&Oa(W,Re),Ee}function Se(W,z,H,le){var Ee=V(H);if(typeof Ee!="function")throw Error(r(150));if(H=Ee.call(H),H==null)throw Error(r(151));for(var Ie=Ee=null,Te=z,Re=z=0,Rt=null,qe=H.next();Te!==null&&!qe.done;Re++,qe=H.next()){Te.index>Re?(Rt=Te,Te=null):Rt=Te.sibling;var Zi=ne(W,Te,qe.value,le);if(Zi===null){Te===null&&(Te=Rt);break}i&&Te&&Zi.alternate===null&&s(W,Te),z=w(Zi,z,Re),Ie===null?Ee=Zi:Ie.sibling=Zi,Ie=Zi,Te=Rt}if(qe.done)return d(W,Te),ut&&Oa(W,Re),Ee;if(Te===null){for(;!qe.done;Re++,qe=H.next())qe=se(W,qe.value,le),qe!==null&&(z=w(qe,z,Re),Ie===null?Ee=qe:Ie.sibling=qe,Ie=qe);return ut&&Oa(W,Re),Ee}for(Te=m(W,Te);!qe.done;Re++,qe=H.next())qe=ye(Te,W,Re,qe.value,le),qe!==null&&(i&&qe.alternate!==null&&Te.delete(qe.key===null?Re:qe.key),z=w(qe,z,Re),Ie===null?Ee=qe:Ie.sibling=qe,Ie=qe);return i&&Te.forEach(function(fM){return s(W,fM)}),ut&&Oa(W,Re),Ee}function bt(W,z,H,le){if(typeof H=="object"&&H!==null&&H.type===I&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case _:e:{for(var Ee=H.key,Ie=z;Ie!==null;){if(Ie.key===Ee){if(Ee=H.type,Ee===I){if(Ie.tag===7){d(W,Ie.sibling),z=y(Ie,H.props.children),z.return=W,W=z;break e}}else if(Ie.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===be&&mb(Ee)===Ie.type){d(W,Ie.sibling),z=y(Ie,H.props),z.ref=Dl(W,Ie,H),z.return=W,W=z;break e}d(W,Ie);break}else s(W,Ie);Ie=Ie.sibling}H.type===I?(z=La(H.props.children,W.mode,le,H.key),z.return=W,W=z):(le=hd(H.type,H.key,H.props,null,W.mode,le),le.ref=Dl(W,z,H),le.return=W,W=le)}return A(W);case C:e:{for(Ie=H.key;z!==null;){if(z.key===Ie)if(z.tag===4&&z.stateNode.containerInfo===H.containerInfo&&z.stateNode.implementation===H.implementation){d(W,z.sibling),z=y(z,H.children||[]),z.return=W,W=z;break e}else{d(W,z);break}else s(W,z);z=z.sibling}z=Tm(H,W.mode,le),z.return=W,W=z}return A(W);case be:return Ie=H._init,bt(W,z,Ie(H._payload),le)}if(sn(H))return je(W,z,H,le);if(V(H))return Se(W,z,H,le);Wc(W,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,z!==null&&z.tag===6?(d(W,z.sibling),z=y(z,H),z.return=W,W=z):(d(W,z),z=Im(H,W.mode,le),z.return=W,W=z),A(W)):d(W,z)}return bt}var Ho=gb(!0),vb=gb(!1),Hc=Bi(null),Kc=null,Ko=null,Wp=null;function Hp(){Wp=Ko=Kc=null}function Kp(i){var s=Hc.current;at(Hc),i._currentValue=s}function Gp(i,s,d){for(;i!==null;){var m=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),i===d)break;i=i.return}}function Go(i,s){Kc=i,Wp=Ko=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(xr=!0),i.firstContext=null)}function Wr(i){var s=i._currentValue;if(Wp!==i)if(i={context:i,memoizedValue:s,next:null},Ko===null){if(Kc===null)throw Error(r(308));Ko=i,Kc.dependencies={lanes:0,firstContext:i}}else Ko=Ko.next=i;return s}var _a=null;function Vp(i){_a===null?_a=[i]:_a.push(i)}function yb(i,s,d,m){var y=s.interleaved;return y===null?(d.next=d,Vp(s)):(d.next=y.next,y.next=d),s.interleaved=d,ti(i,m)}function ti(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 Hi=!1;function qp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xb(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 ri(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ki(i,s,d){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(Ve&2)!==0){var y=m.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),m.pending=s,ti(i,d)}return y=m.interleaved,y===null?(s.next=s,Vp(m)):(s.next=y.next,y.next=s),m.interleaved=s,ti(i,d)}function Gc(i,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,lp(i,d)}}function bb(i,s){var d=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var y=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var A={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?y=w=A:w=w.next=A,d=d.next}while(d!==null);w===null?y=w=s:w=w.next=s}else y=w=s;d={baseState:m.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=s:i.next=s,d.lastBaseUpdate=s}function Vc(i,s,d,m){var y=i.updateQueue;Hi=!1;var w=y.firstBaseUpdate,A=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var R=M,q=R.next;R.next=null,A===null?w=q:A.next=q,A=R;var ae=i.alternate;ae!==null&&(ae=ae.updateQueue,M=ae.lastBaseUpdate,M!==A&&(M===null?ae.firstBaseUpdate=q:M.next=q,ae.lastBaseUpdate=R))}if(w!==null){var se=y.baseState;A=0,ae=q=R=null,M=w;do{var ne=M.lane,ye=M.eventTime;if((m&ne)===ne){ae!==null&&(ae=ae.next={eventTime:ye,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var je=i,Se=M;switch(ne=s,ye=d,Se.tag){case 1:if(je=Se.payload,typeof je=="function"){se=je.call(ye,se,ne);break e}se=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Se.payload,ne=typeof je=="function"?je.call(ye,se,ne):je,ne==null)break e;se=Q({},se,ne);break e;case 2:Hi=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,ne=y.effects,ne===null?y.effects=[M]:ne.push(M))}else ye={eventTime:ye,lane:ne,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ae===null?(q=ae=ye,R=se):ae=ae.next=ye,A|=ne;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);if(ae===null&&(R=se),y.baseState=R,y.firstBaseUpdate=q,y.lastBaseUpdate=ae,s=y.shared.interleaved,s!==null){y=s;do A|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);Ta|=A,i.lanes=A,i.memoizedState=se}}function wb(i,s,d){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var m=i[s],y=m.callback;if(y!==null){if(m.callback=null,m=d,typeof y!="function")throw Error(r(191,y));y.call(m)}}}var Rl={},En=Bi(Rl),$l=Bi(Rl),Ll=Bi(Rl);function Ma(i){if(i===Rl)throw Error(r(174));return i}function Qp(i,s){switch(rt(Ll,s),rt($l,i),rt(En,Rl),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Oo(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Oo(s,i)}at(En),rt(En,s)}function Vo(){at(En),at($l),at(Ll)}function kb(i){Ma(Ll.current);var s=Ma(En.current),d=Oo(s,i.type);s!==d&&(rt($l,i),rt(En,d))}function Yp(i){$l.current===i&&(at(En),at($l))}var ft=Bi(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 Xp=[];function Zp(){for(var i=0;i<Xp.length;i++)Xp[i]._workInProgressVersionPrimary=null;Xp.length=0}var Qc=P.ReactCurrentDispatcher,Jp=P.ReactCurrentBatchConfig,Ia=0,ht=null,Pt=null,Tt=null,Yc=!1,zl=!1,Fl=0,T5=0;function tr(){throw Error(r(321))}function em(i,s){if(s===null)return!1;for(var d=0;d<s.length&&d<i.length;d++)if(!un(i[d],s[d]))return!1;return!0}function tm(i,s,d,m,y,w){if(Ia=w,ht=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Qc.current=i===null||i.memoizedState===null?L5:z5,i=d(m,y),zl){w=0;do{if(zl=!1,Fl=0,25<=w)throw Error(r(301));w+=1,Tt=Pt=null,s.updateQueue=null,Qc.current=F5,i=d(m,y)}while(zl)}if(Qc.current=Jc,s=Pt!==null&&Pt.next!==null,Ia=0,Tt=Pt=ht=null,Yc=!1,s)throw Error(r(300));return i}function rm(){var i=Fl!==0;return Fl=0,i}function An(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?ht.memoizedState=Tt=i:Tt=Tt.next=i,Tt}function Hr(){if(Pt===null){var i=ht.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var s=Tt===null?ht.memoizedState:Tt.next;if(s!==null)Tt=s,Pt=i;else{if(i===null)throw Error(r(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Tt===null?ht.memoizedState=Tt=i:Tt=Tt.next=i}return Tt}function Bl(i,s){return typeof s=="function"?s(i):s}function nm(i){var s=Hr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var m=Pt,y=m.baseQueue,w=d.pending;if(w!==null){if(y!==null){var A=y.next;y.next=w.next,w.next=A}m.baseQueue=y=w,d.pending=null}if(y!==null){w=y.next,m=m.baseState;var M=A=null,R=null,q=w;do{var ae=q.lane;if((Ia&ae)===ae)R!==null&&(R=R.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),m=q.hasEagerState?q.eagerState:i(m,q.action);else{var se={lane:ae,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};R===null?(M=R=se,A=m):R=R.next=se,ht.lanes|=ae,Ta|=ae}q=q.next}while(q!==null&&q!==w);R===null?A=m:R.next=M,un(m,s.memoizedState)||(xr=!0),s.memoizedState=m,s.baseState=A,s.baseQueue=R,d.lastRenderedState=m}if(i=d.interleaved,i!==null){y=i;do w=y.lane,ht.lanes|=w,Ta|=w,y=y.next;while(y!==i)}else y===null&&(d.lanes=0);return[s.memoizedState,d.dispatch]}function im(i){var s=Hr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var m=d.dispatch,y=d.pending,w=s.memoizedState;if(y!==null){d.pending=null;var A=y=y.next;do w=i(w,A.action),A=A.next;while(A!==y);un(w,s.memoizedState)||(xr=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),d.lastRenderedState=w}return[w,m]}function jb(){}function Sb(i,s){var d=ht,m=Hr(),y=s(),w=!un(m.memoizedState,y);if(w&&(m.memoizedState=y,xr=!0),m=m.queue,am(Ab.bind(null,d,m,i),[i]),m.getSnapshot!==s||w||Tt!==null&&Tt.memoizedState.tag&1){if(d.flags|=2048,Ul(9,Eb.bind(null,d,m,y,s),void 0,null),Dt===null)throw Error(r(349));(Ia&30)!==0||Nb(d,s,y)}return y}function Nb(i,s,d){i.flags|=16384,i={getSnapshot:s,value:d},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.stores=[i]):(d=s.stores,d===null?s.stores=[i]:d.push(i))}function Eb(i,s,d,m){s.value=d,s.getSnapshot=m,Pb(s)&&Cb(i)}function Ab(i,s,d){return d(function(){Pb(s)&&Cb(i)})}function Pb(i){var s=i.getSnapshot;i=i.value;try{var d=s();return!un(i,d)}catch{return!0}}function Cb(i){var s=ti(i,1);s!==null&&pn(s,i,1,-1)}function Ob(i){var s=An();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bl,lastRenderedState:i},s.queue=i,i=i.dispatch=$5.bind(null,ht,i),[s.memoizedState,i]}function Ul(i,s,d,m){return i={tag:i,create:s,destroy:d,deps:m,next:null},s=ht.updateQueue,s===null?(s={lastEffect:null,stores:null},ht.updateQueue=s,s.lastEffect=i.next=i):(d=s.lastEffect,d===null?s.lastEffect=i.next=i:(m=d.next,d.next=i,i.next=m,s.lastEffect=i)),i}function _b(){return Hr().memoizedState}function Xc(i,s,d,m){var y=An();ht.flags|=i,y.memoizedState=Ul(1|s,d,void 0,m===void 0?null:m)}function Zc(i,s,d,m){var y=Hr();m=m===void 0?null:m;var w=void 0;if(Pt!==null){var A=Pt.memoizedState;if(w=A.destroy,m!==null&&em(m,A.deps)){y.memoizedState=Ul(s,d,w,m);return}}ht.flags|=i,y.memoizedState=Ul(1|s,d,w,m)}function Mb(i,s){return Xc(8390656,8,i,s)}function am(i,s){return Zc(2048,8,i,s)}function Ib(i,s){return Zc(4,2,i,s)}function Tb(i,s){return Zc(4,4,i,s)}function Db(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 Rb(i,s,d){return d=d!=null?d.concat([i]):null,Zc(4,4,Db.bind(null,s,i),d)}function om(){}function $b(i,s){var d=Hr();s=s===void 0?null:s;var m=d.memoizedState;return m!==null&&s!==null&&em(s,m[1])?m[0]:(d.memoizedState=[i,s],i)}function Lb(i,s){var d=Hr();s=s===void 0?null:s;var m=d.memoizedState;return m!==null&&s!==null&&em(s,m[1])?m[0]:(i=i(),d.memoizedState=[i,s],i)}function zb(i,s,d){return(Ia&21)===0?(i.baseState&&(i.baseState=!1,xr=!0),i.memoizedState=d):(un(d,s)||(d=mx(),ht.lanes|=d,Ta|=d,i.baseState=!0),s)}function D5(i,s){var d=Ze;Ze=d!==0&&4>d?d:4,i(!0);var m=Jp.transition;Jp.transition={};try{i(!1),s()}finally{Ze=d,Jp.transition=m}}function Fb(){return Hr().memoizedState}function R5(i,s,d){var m=Qi(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},Bb(i))Ub(s,d);else if(d=yb(i,s,d,m),d!==null){var y=dr();pn(d,i,m,y),Wb(d,s,m)}}function $5(i,s,d){var m=Qi(i),y={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(Bb(i))Ub(s,y);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var A=s.lastRenderedState,M=w(A,d);if(y.hasEagerState=!0,y.eagerState=M,un(M,A)){var R=s.interleaved;R===null?(y.next=y,Vp(s)):(y.next=R.next,R.next=y),s.interleaved=y;return}}catch{}finally{}d=yb(i,s,y,m),d!==null&&(y=dr(),pn(d,i,m,y),Wb(d,s,m))}}function Bb(i){var s=i.alternate;return i===ht||s!==null&&s===ht}function Ub(i,s){zl=Yc=!0;var d=i.pending;d===null?s.next=s:(s.next=d.next,d.next=s),i.pending=s}function Wb(i,s,d){if((d&4194240)!==0){var m=s.lanes;m&=i.pendingLanes,d|=m,s.lanes=d,lp(i,d)}}var Jc={readContext:Wr,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},L5={readContext:Wr,useCallback:function(i,s){return An().memoizedState=[i,s===void 0?null:s],i},useContext:Wr,useEffect:Mb,useImperativeHandle:function(i,s,d){return d=d!=null?d.concat([i]):null,Xc(4194308,4,Db.bind(null,s,i),d)},useLayoutEffect:function(i,s){return Xc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Xc(4,2,i,s)},useMemo:function(i,s){var d=An();return s=s===void 0?null:s,i=i(),d.memoizedState=[i,s],i},useReducer:function(i,s,d){var m=An();return s=d!==void 0?d(s):s,m.memoizedState=m.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},m.queue=i,i=i.dispatch=R5.bind(null,ht,i),[m.memoizedState,i]},useRef:function(i){var s=An();return i={current:i},s.memoizedState=i},useState:Ob,useDebugValue:om,useDeferredValue:function(i){return An().memoizedState=i},useTransition:function(){var i=Ob(!1),s=i[0];return i=D5.bind(null,i[1]),An().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,d){var m=ht,y=An();if(ut){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),Dt===null)throw Error(r(349));(Ia&30)!==0||Nb(m,s,d)}y.memoizedState=d;var w={value:d,getSnapshot:s};return y.queue=w,Mb(Ab.bind(null,m,w,i),[i]),m.flags|=2048,Ul(9,Eb.bind(null,m,w,d,s),void 0,null),d},useId:function(){var i=An(),s=Dt.identifierPrefix;if(ut){var d=ei,m=Jn;d=(m&~(1<<32-ln(m)-1)).toString(32)+d,s=":"+s+"R"+d,d=Fl++,0<d&&(s+="H"+d.toString(32)),s+=":"}else d=T5++,s=":"+s+"r"+d.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},z5={readContext:Wr,useCallback:$b,useContext:Wr,useEffect:am,useImperativeHandle:Rb,useInsertionEffect:Ib,useLayoutEffect:Tb,useMemo:Lb,useReducer:nm,useRef:_b,useState:function(){return nm(Bl)},useDebugValue:om,useDeferredValue:function(i){var s=Hr();return zb(s,Pt.memoizedState,i)},useTransition:function(){var i=nm(Bl)[0],s=Hr().memoizedState;return[i,s]},useMutableSource:jb,useSyncExternalStore:Sb,useId:Fb,unstable_isNewReconciler:!1},F5={readContext:Wr,useCallback:$b,useContext:Wr,useEffect:am,useImperativeHandle:Rb,useInsertionEffect:Ib,useLayoutEffect:Tb,useMemo:Lb,useReducer:im,useRef:_b,useState:function(){return im(Bl)},useDebugValue:om,useDeferredValue:function(i){var s=Hr();return Pt===null?s.memoizedState=i:zb(s,Pt.memoizedState,i)},useTransition:function(){var i=im(Bl)[0],s=Hr().memoizedState;return[i,s]},useMutableSource:jb,useSyncExternalStore:Sb,useId:Fb,unstable_isNewReconciler:!1};function dn(i,s){if(i&&i.defaultProps){s=Q({},s),i=i.defaultProps;for(var d in i)s[d]===void 0&&(s[d]=i[d]);return s}return s}function sm(i,s,d,m){s=i.memoizedState,d=d(m,s),d=d==null?s:Q({},s,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var ed={isMounted:function(i){return(i=i._reactInternals)?Ea(i)===i:!1},enqueueSetState:function(i,s,d){i=i._reactInternals;var m=dr(),y=Qi(i),w=ri(m,y);w.payload=s,d!=null&&(w.callback=d),s=Ki(i,w,y),s!==null&&(pn(s,i,y,m),Gc(s,i,y))},enqueueReplaceState:function(i,s,d){i=i._reactInternals;var m=dr(),y=Qi(i),w=ri(m,y);w.tag=1,w.payload=s,d!=null&&(w.callback=d),s=Ki(i,w,y),s!==null&&(pn(s,i,y,m),Gc(s,i,y))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var d=dr(),m=Qi(i),y=ri(d,m);y.tag=2,s!=null&&(y.callback=s),s=Ki(i,y,m),s!==null&&(pn(s,i,m,d),Gc(s,i,m))}};function Hb(i,s,d,m,y,w,A){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,A):s.prototype&&s.prototype.isPureReactComponent?!Pl(d,m)||!Pl(y,w):!0}function Kb(i,s,d){var m=!1,y=Ui,w=s.contextType;return typeof w=="object"&&w!==null?w=Wr(w):(y=yr(s)?Pa:er.current,m=s.contextTypes,w=(m=m!=null)?Fo(i,y):Ui),s=new s(d,w),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ed,i.stateNode=s,s._reactInternals=i,m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=y,i.__reactInternalMemoizedMaskedChildContext=w),s}function Gb(i,s,d,m){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,m),s.state!==i&&ed.enqueueReplaceState(s,s.state,null)}function lm(i,s,d,m){var y=i.stateNode;y.props=d,y.state=i.memoizedState,y.refs={},qp(i);var w=s.contextType;typeof w=="object"&&w!==null?y.context=Wr(w):(w=yr(s)?Pa:er.current,y.context=Fo(i,w)),y.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(sm(i,s,w,d),y.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(s=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),s!==y.state&&ed.enqueueReplaceState(y,y.state,null),Vc(i,d,y,m),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308)}function qo(i,s){try{var d="",m=s;do d+=re(m),m=m.return;while(m);var y=d}catch(w){y=`
|
||
Error generating stack: `+w.message+`
|
||
`+w.stack}return{value:i,source:s,stack:y,digest:null}}function um(i,s,d){return{value:i,source:null,stack:d??null,digest:s??null}}function cm(i,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var B5=typeof WeakMap=="function"?WeakMap:Map;function Vb(i,s,d){d=ri(-1,d),d.tag=3,d.payload={element:null};var m=s.value;return d.callback=function(){sd||(sd=!0,Nm=m),cm(i,s)},d}function qb(i,s,d){d=ri(-1,d),d.tag=3;var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var y=s.value;d.payload=function(){return m(y)},d.callback=function(){cm(i,s)}}var w=i.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){cm(i,s),typeof m!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var A=s.stack;this.componentDidCatch(s.value,{componentStack:A!==null?A:""})}),d}function Qb(i,s,d){var m=i.pingCache;if(m===null){m=i.pingCache=new B5;var y=new Set;m.set(s,y)}else y=m.get(s),y===void 0&&(y=new Set,m.set(s,y));y.has(d)||(y.add(d),i=tM.bind(null,i,s,d),s.then(i,i))}function Yb(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 Xb(i,s,d,m,y){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=ri(-1,1),s.tag=2,Ki(d,s,1))),d.lanes|=1),i):(i.flags|=65536,i.lanes=y,i)}var U5=P.ReactCurrentOwner,xr=!1;function cr(i,s,d,m){s.child=i===null?vb(s,null,d,m):Ho(s,i.child,d,m)}function Zb(i,s,d,m,y){d=d.render;var w=s.ref;return Go(s,y),m=tm(i,s,d,m,w,y),d=rm(),i!==null&&!xr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~y,ni(i,s,y)):(ut&&d&&Lp(s),s.flags|=1,cr(i,s,m,y),s.child)}function Jb(i,s,d,m,y){if(i===null){var w=d.type;return typeof w=="function"&&!Mm(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,e1(i,s,w,m,y)):(i=hd(d.type,null,m,s,s.mode,y),i.ref=s.ref,i.return=s,s.child=i)}if(w=i.child,(i.lanes&y)===0){var A=w.memoizedProps;if(d=d.compare,d=d!==null?d:Pl,d(A,m)&&i.ref===s.ref)return ni(i,s,y)}return s.flags|=1,i=Xi(w,m),i.ref=s.ref,i.return=s,s.child=i}function e1(i,s,d,m,y){if(i!==null){var w=i.memoizedProps;if(Pl(w,m)&&i.ref===s.ref)if(xr=!1,s.pendingProps=m=w,(i.lanes&y)!==0)(i.flags&131072)!==0&&(xr=!0);else return s.lanes=i.lanes,ni(i,s,y)}return dm(i,s,d,m,y)}function t1(i,s,d){var m=s.pendingProps,y=m.children,w=i!==null?i.memoizedState:null;if(m.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},rt(Yo,_r),_r|=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(Yo,_r),_r|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:d,rt(Yo,_r),_r|=m}else w!==null?(m=w.baseLanes|d,s.memoizedState=null):m=d,rt(Yo,_r),_r|=m;return cr(i,s,y,d),s.child}function r1(i,s){var d=s.ref;(i===null&&d!==null||i!==null&&i.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function dm(i,s,d,m,y){var w=yr(d)?Pa:er.current;return w=Fo(s,w),Go(s,y),d=tm(i,s,d,m,w,y),m=rm(),i!==null&&!xr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~y,ni(i,s,y)):(ut&&m&&Lp(s),s.flags|=1,cr(i,s,d,y),s.child)}function n1(i,s,d,m,y){if(yr(d)){var w=!0;Lc(s)}else w=!1;if(Go(s,y),s.stateNode===null)rd(i,s),Kb(s,d,m),lm(s,d,m,y),m=!0;else if(i===null){var A=s.stateNode,M=s.memoizedProps;A.props=M;var R=A.context,q=d.contextType;typeof q=="object"&&q!==null?q=Wr(q):(q=yr(d)?Pa:er.current,q=Fo(s,q));var ae=d.getDerivedStateFromProps,se=typeof ae=="function"||typeof A.getSnapshotBeforeUpdate=="function";se||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(M!==m||R!==q)&&Gb(s,A,m,q),Hi=!1;var ne=s.memoizedState;A.state=ne,Vc(s,m,A,y),R=s.memoizedState,M!==m||ne!==R||vr.current||Hi?(typeof ae=="function"&&(sm(s,d,ae,m),R=s.memoizedState),(M=Hi||Hb(s,d,M,m,ne,R,q))?(se||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(s.flags|=4194308)):(typeof A.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=R),A.props=m,A.state=R,A.context=q,m=M):(typeof A.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{A=s.stateNode,xb(i,s),M=s.memoizedProps,q=s.type===s.elementType?M:dn(s.type,M),A.props=q,se=s.pendingProps,ne=A.context,R=d.contextType,typeof R=="object"&&R!==null?R=Wr(R):(R=yr(d)?Pa:er.current,R=Fo(s,R));var ye=d.getDerivedStateFromProps;(ae=typeof ye=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(M!==se||ne!==R)&&Gb(s,A,m,R),Hi=!1,ne=s.memoizedState,A.state=ne,Vc(s,m,A,y);var je=s.memoizedState;M!==se||ne!==je||vr.current||Hi?(typeof ye=="function"&&(sm(s,d,ye,m),je=s.memoizedState),(q=Hi||Hb(s,d,q,m,ne,je,R)||!1)?(ae||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(m,je,R),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(m,je,R)),typeof A.componentDidUpdate=="function"&&(s.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof A.componentDidUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=je),A.props=m,A.state=je,A.context=R,m=q):(typeof A.componentDidUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&ne===i.memoizedState||(s.flags|=1024),m=!1)}return fm(i,s,d,m,w,y)}function fm(i,s,d,m,y,w){r1(i,s);var A=(s.flags&128)!==0;if(!m&&!A)return y&&lb(s,d,!1),ni(i,s,w);m=s.stateNode,U5.current=s;var M=A&&typeof d.getDerivedStateFromError!="function"?null:m.render();return s.flags|=1,i!==null&&A?(s.child=Ho(s,i.child,null,w),s.child=Ho(s,null,M,w)):cr(i,s,M,w),s.memoizedState=m.state,y&&lb(s,d,!0),s.child}function i1(i){var s=i.stateNode;s.pendingContext?ob(i,s.pendingContext,s.pendingContext!==s.context):s.context&&ob(i,s.context,!1),Qp(i,s.containerInfo)}function a1(i,s,d,m,y){return Wo(),Up(y),s.flags|=256,cr(i,s,d,m),s.child}var hm={dehydrated:null,treeContext:null,retryLane:0};function pm(i){return{baseLanes:i,cachePool:null,transitions:null}}function o1(i,s,d){var m=s.pendingProps,y=ft.current,w=!1,A=(s.flags&128)!==0,M;if((M=A)||(M=i!==null&&i.memoizedState===null?!1:(y&2)!==0),M?(w=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(y|=1),rt(ft,y&1),i===null)return Bp(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):(A=m.children,i=m.fallback,w?(m=s.mode,w=s.child,A={mode:"hidden",children:A},(m&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=A):w=pd(A,m,0,null),i=La(i,m,d,null),w.return=s,i.return=s,w.sibling=i,s.child=w,s.child.memoizedState=pm(d),s.memoizedState=hm,i):mm(s,A));if(y=i.memoizedState,y!==null&&(M=y.dehydrated,M!==null))return W5(i,s,A,m,M,y,d);if(w){w=m.fallback,A=s.mode,y=i.child,M=y.sibling;var R={mode:"hidden",children:m.children};return(A&1)===0&&s.child!==y?(m=s.child,m.childLanes=0,m.pendingProps=R,s.deletions=null):(m=Xi(y,R),m.subtreeFlags=y.subtreeFlags&14680064),M!==null?w=Xi(M,w):(w=La(w,A,d,null),w.flags|=2),w.return=s,m.return=s,m.sibling=w,s.child=m,m=w,w=s.child,A=i.child.memoizedState,A=A===null?pm(d):{baseLanes:A.baseLanes|d,cachePool:null,transitions:A.transitions},w.memoizedState=A,w.childLanes=i.childLanes&~d,s.memoizedState=hm,m}return w=i.child,i=w.sibling,m=Xi(w,{mode:"visible",children:m.children}),(s.mode&1)===0&&(m.lanes=d),m.return=s,m.sibling=null,i!==null&&(d=s.deletions,d===null?(s.deletions=[i],s.flags|=16):d.push(i)),s.child=m,s.memoizedState=null,m}function mm(i,s){return s=pd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function td(i,s,d,m){return m!==null&&Up(m),Ho(s,i.child,null,d),i=mm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function W5(i,s,d,m,y,w,A){if(d)return s.flags&256?(s.flags&=-257,m=um(Error(r(422))),td(i,s,A,m)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(w=m.fallback,y=s.mode,m=pd({mode:"visible",children:m.children},y,0,null),w=La(w,y,A,null),w.flags|=2,m.return=s,w.return=s,m.sibling=w,s.child=m,(s.mode&1)!==0&&Ho(s,i.child,null,A),s.child.memoizedState=pm(A),s.memoizedState=hm,w);if((s.mode&1)===0)return td(i,s,A,null);if(y.data==="$!"){if(m=y.nextSibling&&y.nextSibling.dataset,m)var M=m.dgst;return m=M,w=Error(r(419)),m=um(w,m,void 0),td(i,s,A,m)}if(M=(A&i.childLanes)!==0,xr||M){if(m=Dt,m!==null){switch(A&-A){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(m.suspendedLanes|A))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,ti(i,y),pn(m,i,y,-1))}return _m(),m=um(Error(r(421))),td(i,s,A,m)}return y.data==="$?"?(s.flags|=128,s.child=i.child,s=rM.bind(null,i),y._reactRetry=s,null):(i=w.treeContext,Or=Fi(y.nextSibling),Cr=s,ut=!0,cn=null,i!==null&&(Br[Ur++]=Jn,Br[Ur++]=ei,Br[Ur++]=Ca,Jn=i.id,ei=i.overflow,Ca=s),s=mm(s,m.children),s.flags|=4096,s)}function s1(i,s,d){i.lanes|=s;var m=i.alternate;m!==null&&(m.lanes|=s),Gp(i.return,s,d)}function gm(i,s,d,m,y){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=d,w.tailMode=y)}function l1(i,s,d){var m=s.pendingProps,y=m.revealOrder,w=m.tail;if(cr(i,s,m.children,d),m=ft.current,(m&2)!==0)m=m&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&s1(i,d,s);else if(i.tag===19)s1(i,d,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}m&=1}if(rt(ft,m),(s.mode&1)===0)s.memoizedState=null;else switch(y){case"forwards":for(d=s.child,y=null;d!==null;)i=d.alternate,i!==null&&qc(i)===null&&(y=d),d=d.sibling;d=y,d===null?(y=s.child,s.child=null):(y=d.sibling,d.sibling=null),gm(s,!1,y,d,w);break;case"backwards":for(d=null,y=s.child,s.child=null;y!==null;){if(i=y.alternate,i!==null&&qc(i)===null){s.child=y;break}i=y.sibling,y.sibling=d,d=y,y=i}gm(s,!0,d,null,w);break;case"together":gm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function rd(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function ni(i,s,d){if(i!==null&&(s.dependencies=i.dependencies),Ta|=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=Xi(i,i.pendingProps),s.child=d,d.return=s;i.sibling!==null;)i=i.sibling,d=d.sibling=Xi(i,i.pendingProps),d.return=s;d.sibling=null}return s.child}function H5(i,s,d){switch(s.tag){case 3:i1(s),Wo();break;case 5:kb(s);break;case 1:yr(s.type)&&Lc(s);break;case 4:Qp(s,s.stateNode.containerInfo);break;case 10:var m=s.type._context,y=s.memoizedProps.value;rt(Hc,m._currentValue),m._currentValue=y;break;case 13:if(m=s.memoizedState,m!==null)return m.dehydrated!==null?(rt(ft,ft.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?o1(i,s,d):(rt(ft,ft.current&1),i=ni(i,s,d),i!==null?i.sibling:null);rt(ft,ft.current&1);break;case 19:if(m=(d&s.childLanes)!==0,(i.flags&128)!==0){if(m)return l1(i,s,d);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),rt(ft,ft.current),m)break;return null;case 22:case 23:return s.lanes=0,t1(i,s,d)}return ni(i,s,d)}var u1,vm,c1,d1;u1=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}},vm=function(){},c1=function(i,s,d,m){var y=i.memoizedProps;if(y!==m){i=s.stateNode,Ma(En.current);var w=null;switch(d){case"input":y=Be(i,y),m=Be(i,m),w=[];break;case"select":y=Q({},y,{value:void 0}),m=Q({},m,{value:void 0}),w=[];break;case"textarea":y=Oi(i,y),m=Oi(i,m),w=[];break;default:typeof y.onClick!="function"&&typeof m.onClick=="function"&&(i.onclick=Dc)}he(d,m);var A;d=null;for(q in y)if(!m.hasOwnProperty(q)&&y.hasOwnProperty(q)&&y[q]!=null)if(q==="style"){var M=y[q];for(A in M)M.hasOwnProperty(A)&&(d||(d={}),d[A]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(a.hasOwnProperty(q)?w||(w=[]):(w=w||[]).push(q,null));for(q in m){var R=m[q];if(M=y!=null?y[q]:void 0,m.hasOwnProperty(q)&&R!==M&&(R!=null||M!=null))if(q==="style")if(M){for(A in M)!M.hasOwnProperty(A)||R&&R.hasOwnProperty(A)||(d||(d={}),d[A]="");for(A in R)R.hasOwnProperty(A)&&M[A]!==R[A]&&(d||(d={}),d[A]=R[A])}else d||(w||(w=[]),w.push(q,d)),d=R;else q==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,M=M?M.__html:void 0,R!=null&&M!==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||M===R||(w=[])):(w=w||[]).push(q,R))}d&&(w=w||[]).push("style",d);var q=w;(s.updateQueue=q)&&(s.flags|=4)}},d1=function(i,s,d,m){d!==m&&(s.flags|=4)};function Wl(i,s){if(!ut)switch(i.tailMode){case"hidden":s=i.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function rr(i){var s=i.alternate!==null&&i.alternate.child===i.child,d=0,m=0;if(s)for(var y=i.child;y!==null;)d|=y.lanes|y.childLanes,m|=y.subtreeFlags&14680064,m|=y.flags&14680064,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)d|=y.lanes|y.childLanes,m|=y.subtreeFlags,m|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=m,i.childLanes=d,s}function K5(i,s,d){var m=s.pendingProps;switch(zp(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 yr(s.type)&&$c(),rr(s),null;case 3:return m=s.stateNode,Vo(),at(vr),at(er),Zp(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(i===null||i.child===null)&&(Uc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,cn!==null&&(Pm(cn),cn=null))),vm(i,s),rr(s),null;case 5:Yp(s);var y=Ma(Ll.current);if(d=s.type,i!==null&&s.stateNode!=null)c1(i,s,d,m,y),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!m){if(s.stateNode===null)throw Error(r(166));return rr(s),null}if(i=Ma(En.current),Uc(s)){m=s.stateNode,d=s.type;var w=s.memoizedProps;switch(m[Nn]=s,m[Il]=w,i=(s.mode&1)!==0,d){case"dialog":it("cancel",m),it("close",m);break;case"iframe":case"object":case"embed":it("load",m);break;case"video":case"audio":for(y=0;y<Ol.length;y++)it(Ol[y],m);break;case"source":it("error",m);break;case"img":case"image":case"link":it("error",m),it("load",m);break;case"details":it("toggle",m);break;case"input":_e(m,w),it("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},it("invalid",m);break;case"textarea":_i(m,w),it("invalid",m)}he(d,w),y=null;for(var A in w)if(w.hasOwnProperty(A)){var M=w[A];A==="children"?typeof M=="string"?m.textContent!==M&&(w.suppressHydrationWarning!==!0&&Tc(m.textContent,M,i),y=["children",M]):typeof M=="number"&&m.textContent!==""+M&&(w.suppressHydrationWarning!==!0&&Tc(m.textContent,M,i),y=["children",""+M]):a.hasOwnProperty(A)&&M!=null&&A==="onScroll"&&it("scroll",m)}switch(d){case"input":Oe(m),Qn(m,w,!0);break;case"textarea":Oe(m),$e(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=Dc)}m=y,s.updateQueue=m,m!==null&&(s.flags|=4)}else{A=y.nodeType===9?y:y.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=At(d)),i==="http://www.w3.org/1999/xhtml"?d==="script"?(i=A.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=A.createElement(d,{is:m.is}):(i=A.createElement(d),d==="select"&&(A=i,m.multiple?A.multiple=!0:m.size&&(A.size=m.size))):i=A.createElementNS(i,d),i[Nn]=s,i[Il]=m,u1(i,s,!1,!1),s.stateNode=i;e:{switch(A=Ae(d,m),d){case"dialog":it("cancel",i),it("close",i),y=m;break;case"iframe":case"object":case"embed":it("load",i),y=m;break;case"video":case"audio":for(y=0;y<Ol.length;y++)it(Ol[y],i);y=m;break;case"source":it("error",i),y=m;break;case"img":case"image":case"link":it("error",i),it("load",i),y=m;break;case"details":it("toggle",i),y=m;break;case"input":_e(i,m),y=Be(i,m),it("invalid",i);break;case"option":y=m;break;case"select":i._wrapperState={wasMultiple:!!m.multiple},y=Q({},m,{value:void 0}),it("invalid",i);break;case"textarea":_i(i,m),y=Oi(i,m),it("invalid",i);break;default:y=m}he(d,y),M=y;for(w in M)if(M.hasOwnProperty(w)){var R=M[w];w==="style"?cl(i,R):w==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&ll(i,R)):w==="children"?typeof R=="string"?(d!=="textarea"||R!=="")&&Mi(i,R):typeof R=="number"&&Mi(i,""+R):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(a.hasOwnProperty(w)?R!=null&&w==="onScroll"&&it("scroll",i):R!=null&&O(i,w,R,A))}switch(d){case"input":Oe(i),Qn(i,m,!1);break;case"textarea":Oe(i),$e(i);break;case"option":m.value!=null&&i.setAttribute("value",""+Pe(m.value));break;case"select":i.multiple=!!m.multiple,w=m.value,w!=null?Fr(i,!!m.multiple,w,!1):m.defaultValue!=null&&Fr(i,!!m.multiple,m.defaultValue,!0);break;default:typeof y.onClick=="function"&&(i.onclick=Dc)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return rr(s),null;case 6:if(i&&s.stateNode!=null)d1(i,s,i.memoizedProps,m);else{if(typeof m!="string"&&s.stateNode===null)throw Error(r(166));if(d=Ma(Ll.current),Ma(En.current),Uc(s)){if(m=s.stateNode,d=s.memoizedProps,m[Nn]=s,(w=m.nodeValue!==d)&&(i=Cr,i!==null))switch(i.tag){case 3:Tc(m.nodeValue,d,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Tc(m.nodeValue,d,(i.mode&1)!==0)}w&&(s.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[Nn]=s,s.stateNode=m}return rr(s),null;case 13:if(at(ft),m=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(ut&&Or!==null&&(s.mode&1)!==0&&(s.flags&128)===0)pb(),Wo(),s.flags|=98560,w=!1;else if(w=Uc(s),m!==null&&m.dehydrated!==null){if(i===null){if(!w)throw Error(r(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[Nn]=s}else Wo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;rr(s),w=!1}else cn!==null&&(Pm(cn),cn=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=d,s):(m=m!==null,m!==(i!==null&&i.memoizedState!==null)&&m&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(ft.current&1)!==0?Ct===0&&(Ct=3):_m())),s.updateQueue!==null&&(s.flags|=4),rr(s),null);case 4:return Vo(),vm(i,s),i===null&&_l(s.stateNode.containerInfo),rr(s),null;case 10:return Kp(s.type._context),rr(s),null;case 17:return yr(s.type)&&$c(),rr(s),null;case 19:if(at(ft),w=s.memoizedState,w===null)return rr(s),null;if(m=(s.flags&128)!==0,A=w.rendering,A===null)if(m)Wl(w,!1);else{if(Ct!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(A=qc(i),A!==null){for(s.flags|=128,Wl(w,!1),m=A.updateQueue,m!==null&&(s.updateQueue=m,s.flags|=4),s.subtreeFlags=0,m=d,d=s.child;d!==null;)w=d,i=m,w.flags&=14680066,A=w.alternate,A===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=A.childLanes,w.lanes=A.lanes,w.child=A.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=A.memoizedProps,w.memoizedState=A.memoizedState,w.updateQueue=A.updateQueue,w.type=A.type,i=A.dependencies,w.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),d=d.sibling;return rt(ft,ft.current&1|2),s.child}i=i.sibling}w.tail!==null&&xt()>Xo&&(s.flags|=128,m=!0,Wl(w,!1),s.lanes=4194304)}else{if(!m)if(i=qc(A),i!==null){if(s.flags|=128,m=!0,d=i.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Wl(w,!0),w.tail===null&&w.tailMode==="hidden"&&!A.alternate&&!ut)return rr(s),null}else 2*xt()-w.renderingStartTime>Xo&&d!==1073741824&&(s.flags|=128,m=!0,Wl(w,!1),s.lanes=4194304);w.isBackwards?(A.sibling=s.child,s.child=A):(d=w.last,d!==null?d.sibling=A:s.child=A,w.last=A)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=xt(),s.sibling=null,d=ft.current,rt(ft,m?d&1|2:d&1),s):(rr(s),null);case 22:case 23:return Om(),m=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(s.flags|=8192),m&&(s.mode&1)!==0?(_r&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 G5(i,s){switch(zp(s),s.tag){case 1:return yr(s.type)&&$c(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Vo(),at(vr),at(er),Zp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Yp(s),null;case 13:if(at(ft),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Wo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return at(ft),null;case 4:return Vo(),null;case 10:return Kp(s.type._context),null;case 22:case 23:return Om(),null;case 24:return null;default:return null}}var nd=!1,nr=!1,V5=typeof WeakSet=="function"?WeakSet:Set,we=null;function Qo(i,s){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){pt(i,s,m)}else d.current=null}function ym(i,s,d){try{d()}catch(m){pt(i,s,m)}}var f1=!1;function q5(i,s){if(Op=jc,i=Hx(),kp(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var y=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var A=0,M=-1,R=-1,q=0,ae=0,se=i,ne=null;t:for(;;){for(var ye;se!==d||y!==0&&se.nodeType!==3||(M=A+y),se!==w||m!==0&&se.nodeType!==3||(R=A+m),se.nodeType===3&&(A+=se.nodeValue.length),(ye=se.firstChild)!==null;)ne=se,se=ye;for(;;){if(se===i)break t;if(ne===d&&++q===y&&(M=A),ne===w&&++ae===m&&(R=A),(ye=se.nextSibling)!==null)break;se=ne,ne=se.parentNode}se=ye}d=M===-1||R===-1?null:{start:M,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(_p={focusedElem:i,selectionRange:d},jc=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;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 Se=je.memoizedProps,bt=je.memoizedState,W=s.stateNode,z=W.getSnapshotBeforeUpdate(s.elementType===s.type?Se:dn(s.type,Se),bt);W.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var H=s.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(le){pt(s,s.return,le)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return je=f1,f1=!1,je}function Hl(i,s,d){var m=s.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var y=m=m.next;do{if((y.tag&i)===i){var w=y.destroy;y.destroy=void 0,w!==void 0&&ym(s,d,w)}y=y.next}while(y!==m)}}function id(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==s)}}function xm(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 h1(i){var s=i.alternate;s!==null&&(i.alternate=null,h1(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Nn],delete s[Il],delete s[Dp],delete s[O5],delete s[_5])),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 p1(i){return i.tag===5||i.tag===3||i.tag===4}function m1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||p1(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 bm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(i,s):d.insertBefore(i,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(i,d)):(s=d,s.appendChild(i)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Dc));else if(m!==4&&(i=i.child,i!==null))for(bm(i,s,d),i=i.sibling;i!==null;)bm(i,s,d),i=i.sibling}function wm(i,s,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,s?d.insertBefore(i,s):d.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(wm(i,s,d),i=i.sibling;i!==null;)wm(i,s,d),i=i.sibling}var Wt=null,fn=!1;function Gi(i,s,d){for(d=d.child;d!==null;)g1(i,s,d),d=d.sibling}function g1(i,s,d){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(vc,d)}catch{}switch(d.tag){case 5:nr||Qo(d,s);case 6:var m=Wt,y=fn;Wt=null,Gi(i,s,d),Wt=m,fn=y,Wt!==null&&(fn?(i=Wt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Wt.removeChild(d.stateNode));break;case 18:Wt!==null&&(fn?(i=Wt,d=d.stateNode,i.nodeType===8?Tp(i.parentNode,d):i.nodeType===1&&Tp(i,d),kl(i)):Tp(Wt,d.stateNode));break;case 4:m=Wt,y=fn,Wt=d.stateNode.containerInfo,fn=!0,Gi(i,s,d),Wt=m,fn=y;break;case 0:case 11:case 14:case 15:if(!nr&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){y=m=m.next;do{var w=y,A=w.destroy;w=w.tag,A!==void 0&&((w&2)!==0||(w&4)!==0)&&ym(d,s,A),y=y.next}while(y!==m)}Gi(i,s,d);break;case 1:if(!nr&&(Qo(d,s),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(M){pt(d,s,M)}Gi(i,s,d);break;case 21:Gi(i,s,d);break;case 22:d.mode&1?(nr=(m=nr)||d.memoizedState!==null,Gi(i,s,d),nr=m):Gi(i,s,d);break;default:Gi(i,s,d)}}function v1(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new V5),s.forEach(function(m){var y=nM.bind(null,i,m);d.has(m)||(d.add(m),m.then(y,y))})}}function hn(i,s){var d=s.deletions;if(d!==null)for(var m=0;m<d.length;m++){var y=d[m];try{var w=i,A=s,M=A;e:for(;M!==null;){switch(M.tag){case 5:Wt=M.stateNode,fn=!1;break e;case 3:Wt=M.stateNode.containerInfo,fn=!0;break e;case 4:Wt=M.stateNode.containerInfo,fn=!0;break e}M=M.return}if(Wt===null)throw Error(r(160));g1(w,A,y),Wt=null,fn=!1;var R=y.alternate;R!==null&&(R.return=null),y.return=null}catch(q){pt(y,s,q)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)y1(s,i),s=s.sibling}function y1(i,s){var d=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(hn(s,i),Pn(i),m&4){try{Hl(3,i,i.return),id(3,i)}catch(Se){pt(i,i.return,Se)}try{Hl(5,i,i.return)}catch(Se){pt(i,i.return,Se)}}break;case 1:hn(s,i),Pn(i),m&512&&d!==null&&Qo(d,d.return);break;case 5:if(hn(s,i),Pn(i),m&512&&d!==null&&Qo(d,d.return),i.flags&32){var y=i.stateNode;try{Mi(y,"")}catch(Se){pt(i,i.return,Se)}}if(m&4&&(y=i.stateNode,y!=null)){var w=i.memoizedProps,A=d!==null?d.memoizedProps:w,M=i.type,R=i.updateQueue;if(i.updateQueue=null,R!==null)try{M==="input"&&w.type==="radio"&&w.name!=null&&jt(y,w),Ae(M,A);var q=Ae(M,w);for(A=0;A<R.length;A+=2){var ae=R[A],se=R[A+1];ae==="style"?cl(y,se):ae==="dangerouslySetInnerHTML"?ll(y,se):ae==="children"?Mi(y,se):O(y,ae,se,q)}switch(M){case"input":ur(y,w);break;case"textarea":ee(y,w);break;case"select":var ne=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var ye=w.value;ye!=null?Fr(y,!!w.multiple,ye,!1):ne!==!!w.multiple&&(w.defaultValue!=null?Fr(y,!!w.multiple,w.defaultValue,!0):Fr(y,!!w.multiple,w.multiple?[]:"",!1))}y[Il]=w}catch(Se){pt(i,i.return,Se)}}break;case 6:if(hn(s,i),Pn(i),m&4){if(i.stateNode===null)throw Error(r(162));y=i.stateNode,w=i.memoizedProps;try{y.nodeValue=w}catch(Se){pt(i,i.return,Se)}}break;case 3:if(hn(s,i),Pn(i),m&4&&d!==null&&d.memoizedState.isDehydrated)try{kl(s.containerInfo)}catch(Se){pt(i,i.return,Se)}break;case 4:hn(s,i),Pn(i);break;case 13:hn(s,i),Pn(i),y=i.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(Sm=xt())),m&4&&v1(i);break;case 22:if(ae=d!==null&&d.memoizedState!==null,i.mode&1?(nr=(q=nr)||ae,hn(s,i),nr=q):hn(s,i),Pn(i),m&8192){if(q=i.memoizedState!==null,(i.stateNode.isHidden=q)&&!ae&&(i.mode&1)!==0)for(we=i,ae=i.child;ae!==null;){for(se=we=ae;we!==null;){switch(ne=we,ye=ne.child,ne.tag){case 0:case 11:case 14:case 15:Hl(4,ne,ne.return);break;case 1:Qo(ne,ne.return);var je=ne.stateNode;if(typeof je.componentWillUnmount=="function"){m=ne,d=ne.return;try{s=m,je.props=s.memoizedProps,je.state=s.memoizedState,je.componentWillUnmount()}catch(Se){pt(m,d,Se)}}break;case 5:Qo(ne,ne.return);break;case 22:if(ne.memoizedState!==null){w1(se);continue}}ye!==null?(ye.return=ne,we=ye):w1(se)}ae=ae.sibling}e:for(ae=null,se=i;;){if(se.tag===5){if(ae===null){ae=se;try{y=se.stateNode,q?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(M=se.stateNode,R=se.memoizedProps.style,A=R!=null&&R.hasOwnProperty("display")?R.display:null,M.style.display=ul("display",A))}catch(Se){pt(i,i.return,Se)}}}else if(se.tag===6){if(ae===null)try{se.stateNode.nodeValue=q?"":se.memoizedProps}catch(Se){pt(i,i.return,Se)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===i)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===i)break e;for(;se.sibling===null;){if(se.return===null||se.return===i)break e;ae===se&&(ae=null),se=se.return}ae===se&&(ae=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:hn(s,i),Pn(i),m&4&&v1(i);break;case 21:break;default:hn(s,i),Pn(i)}}function Pn(i){var s=i.flags;if(s&2){try{e:{for(var d=i.return;d!==null;){if(p1(d)){var m=d;break e}d=d.return}throw Error(r(160))}switch(m.tag){case 5:var y=m.stateNode;m.flags&32&&(Mi(y,""),m.flags&=-33);var w=m1(i);wm(i,w,y);break;case 3:case 4:var A=m.stateNode.containerInfo,M=m1(i);bm(i,M,A);break;default:throw Error(r(161))}}catch(R){pt(i,i.return,R)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function Q5(i,s,d){we=i,x1(i)}function x1(i,s,d){for(var m=(i.mode&1)!==0;we!==null;){var y=we,w=y.child;if(y.tag===22&&m){var A=y.memoizedState!==null||nd;if(!A){var M=y.alternate,R=M!==null&&M.memoizedState!==null||nr;M=nd;var q=nr;if(nd=A,(nr=R)&&!q)for(we=y;we!==null;)A=we,R=A.child,A.tag===22&&A.memoizedState!==null?k1(y):R!==null?(R.return=A,we=R):k1(y);for(;w!==null;)we=w,x1(w),w=w.sibling;we=y,nd=M,nr=q}b1(i)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,we=w):b1(i)}}function b1(i){for(;we!==null;){var s=we;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||id(5,s);break;case 1:var m=s.stateNode;if(s.flags&4&&!nr)if(d===null)m.componentDidMount();else{var y=s.elementType===s.type?d.memoizedProps:dn(s.type,d.memoizedProps);m.componentDidUpdate(y,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&wb(s,w,m);break;case 3:var A=s.updateQueue;if(A!==null){if(d=null,s.child!==null)switch(s.child.tag){case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}wb(s,A,d)}break;case 5:var M=s.stateNode;if(d===null&&s.flags&4){d=M;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 ae=q.memoizedState;if(ae!==null){var se=ae.dehydrated;se!==null&&kl(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}nr||s.flags&512&&xm(s)}catch(ne){pt(s,s.return,ne)}}if(s===i){we=null;break}if(d=s.sibling,d!==null){d.return=s.return,we=d;break}we=s.return}}function w1(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var d=s.sibling;if(d!==null){d.return=s.return,we=d;break}we=s.return}}function k1(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var d=s.return;try{id(4,s)}catch(R){pt(s,d,R)}break;case 1:var m=s.stateNode;if(typeof m.componentDidMount=="function"){var y=s.return;try{m.componentDidMount()}catch(R){pt(s,y,R)}}var w=s.return;try{xm(s)}catch(R){pt(s,w,R)}break;case 5:var A=s.return;try{xm(s)}catch(R){pt(s,A,R)}}}catch(R){pt(s,s.return,R)}if(s===i){we=null;break}var M=s.sibling;if(M!==null){M.return=s.return,we=M;break}we=s.return}}var Y5=Math.ceil,ad=P.ReactCurrentDispatcher,km=P.ReactCurrentOwner,Kr=P.ReactCurrentBatchConfig,Ve=0,Dt=null,St=null,Ht=0,_r=0,Yo=Bi(0),Ct=0,Kl=null,Ta=0,od=0,jm=0,Gl=null,br=null,Sm=0,Xo=1/0,ii=null,sd=!1,Nm=null,Vi=null,ld=!1,qi=null,ud=0,Vl=0,Em=null,cd=-1,dd=0;function dr(){return(Ve&6)!==0?xt():cd!==-1?cd:cd=xt()}function Qi(i){return(i.mode&1)===0?1:(Ve&2)!==0&&Ht!==0?Ht&-Ht:I5.transition!==null?(dd===0&&(dd=mx()),dd):(i=Ze,i!==0||(i=window.event,i=i===void 0?16:Sx(i.type)),i)}function pn(i,s,d,m){if(50<Vl)throw Vl=0,Em=null,Error(r(185));vl(i,d,m),((Ve&2)===0||i!==Dt)&&(i===Dt&&((Ve&2)===0&&(od|=d),Ct===4&&Yi(i,Ht)),wr(i,m),d===1&&Ve===0&&(s.mode&1)===0&&(Xo=xt()+500,zc&&Wi()))}function wr(i,s){var d=i.callbackNode;I_(i,s);var m=bc(i,i===Dt?Ht:0);if(m===0)d!==null&&fx(d),i.callbackNode=null,i.callbackPriority=0;else if(s=m&-m,i.callbackPriority!==s){if(d!=null&&fx(d),s===1)i.tag===0?M5(S1.bind(null,i)):ub(S1.bind(null,i)),P5(function(){(Ve&6)===0&&Wi()}),d=null;else{switch(gx(m)){case 1:d=ap;break;case 4:d=hx;break;case 16:d=gc;break;case 536870912:d=px;break;default:d=gc}d=M1(d,j1.bind(null,i))}i.callbackPriority=s,i.callbackNode=d}}function j1(i,s){if(cd=-1,dd=0,(Ve&6)!==0)throw Error(r(327));var d=i.callbackNode;if(Zo()&&i.callbackNode!==d)return null;var m=bc(i,i===Dt?Ht:0);if(m===0)return null;if((m&30)!==0||(m&i.expiredLanes)!==0||s)s=fd(i,m);else{s=m;var y=Ve;Ve|=2;var w=E1();(Dt!==i||Ht!==s)&&(ii=null,Xo=xt()+500,Ra(i,s));do try{J5();break}catch(M){N1(i,M)}while(!0);Hp(),ad.current=w,Ve=y,St!==null?s=0:(Dt=null,Ht=0,s=Ct)}if(s!==0){if(s===2&&(y=op(i),y!==0&&(m=y,s=Am(i,y))),s===1)throw d=Kl,Ra(i,0),Yi(i,m),wr(i,xt()),d;if(s===6)Yi(i,m);else{if(y=i.current.alternate,(m&30)===0&&!X5(y)&&(s=fd(i,m),s===2&&(w=op(i),w!==0&&(m=w,s=Am(i,w))),s===1))throw d=Kl,Ra(i,0),Yi(i,m),wr(i,xt()),d;switch(i.finishedWork=y,i.finishedLanes=m,s){case 0:case 1:throw Error(r(345));case 2:$a(i,br,ii);break;case 3:if(Yi(i,m),(m&130023424)===m&&(s=Sm+500-xt(),10<s)){if(bc(i,0)!==0)break;if(y=i.suspendedLanes,(y&m)!==m){dr(),i.pingedLanes|=i.suspendedLanes&y;break}i.timeoutHandle=Ip($a.bind(null,i,br,ii),s);break}$a(i,br,ii);break;case 4:if(Yi(i,m),(m&4194240)===m)break;for(s=i.eventTimes,y=-1;0<m;){var A=31-ln(m);w=1<<A,A=s[A],A>y&&(y=A),m&=~w}if(m=y,m=xt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*Y5(m/1960))-m,10<m){i.timeoutHandle=Ip($a.bind(null,i,br,ii),m);break}$a(i,br,ii);break;case 5:$a(i,br,ii);break;default:throw Error(r(329))}}}return wr(i,xt()),i.callbackNode===d?j1.bind(null,i):null}function Am(i,s){var d=Gl;return i.current.memoizedState.isDehydrated&&(Ra(i,s).flags|=256),i=fd(i,s),i!==2&&(s=br,br=d,s!==null&&Pm(s)),i}function Pm(i){br===null?br=i:br.push.apply(br,i)}function X5(i){for(var s=i;;){if(s.flags&16384){var d=s.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var y=d[m],w=y.getSnapshot;y=y.value;try{if(!un(w(),y))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 Yi(i,s){for(s&=~jm,s&=~od,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var d=31-ln(s),m=1<<d;i[d]=-1,s&=~m}}function S1(i){if((Ve&6)!==0)throw Error(r(327));Zo();var s=bc(i,0);if((s&1)===0)return wr(i,xt()),null;var d=fd(i,s);if(i.tag!==0&&d===2){var m=op(i);m!==0&&(s=m,d=Am(i,m))}if(d===1)throw d=Kl,Ra(i,0),Yi(i,s),wr(i,xt()),d;if(d===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,$a(i,br,ii),wr(i,xt()),null}function Cm(i,s){var d=Ve;Ve|=1;try{return i(s)}finally{Ve=d,Ve===0&&(Xo=xt()+500,zc&&Wi())}}function Da(i){qi!==null&&qi.tag===0&&(Ve&6)===0&&Zo();var s=Ve;Ve|=1;var d=Kr.transition,m=Ze;try{if(Kr.transition=null,Ze=1,i)return i()}finally{Ze=m,Kr.transition=d,Ve=s,(Ve&6)===0&&Wi()}}function Om(){_r=Yo.current,at(Yo)}function Ra(i,s){i.finishedWork=null,i.finishedLanes=0;var d=i.timeoutHandle;if(d!==-1&&(i.timeoutHandle=-1,A5(d)),St!==null)for(d=St.return;d!==null;){var m=d;switch(zp(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&$c();break;case 3:Vo(),at(vr),at(er),Zp();break;case 5:Yp(m);break;case 4:Vo();break;case 13:at(ft);break;case 19:at(ft);break;case 10:Kp(m.type._context);break;case 22:case 23:Om()}d=d.return}if(Dt=i,St=i=Xi(i.current,null),Ht=_r=s,Ct=0,Kl=null,jm=od=Ta=0,br=Gl=null,_a!==null){for(s=0;s<_a.length;s++)if(d=_a[s],m=d.interleaved,m!==null){d.interleaved=null;var y=m.next,w=d.pending;if(w!==null){var A=w.next;w.next=y,m.next=A}d.pending=m}_a=null}return i}function N1(i,s){do{var d=St;try{if(Hp(),Qc.current=Jc,Yc){for(var m=ht.memoizedState;m!==null;){var y=m.queue;y!==null&&(y.pending=null),m=m.next}Yc=!1}if(Ia=0,Tt=Pt=ht=null,zl=!1,Fl=0,km.current=null,d===null||d.return===null){Ct=1,Kl=s,St=null;break}e:{var w=i,A=d.return,M=d,R=s;if(s=Ht,M.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var q=R,ae=M,se=ae.tag;if((ae.mode&1)===0&&(se===0||se===11||se===15)){var ne=ae.alternate;ne?(ae.updateQueue=ne.updateQueue,ae.memoizedState=ne.memoizedState,ae.lanes=ne.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var ye=Yb(A);if(ye!==null){ye.flags&=-257,Xb(ye,A,M,w,s),ye.mode&1&&Qb(w,q,s),s=ye,R=q;var je=s.updateQueue;if(je===null){var Se=new Set;Se.add(R),s.updateQueue=Se}else je.add(R);break e}else{if((s&1)===0){Qb(w,q,s),_m();break e}R=Error(r(426))}}else if(ut&&M.mode&1){var bt=Yb(A);if(bt!==null){(bt.flags&65536)===0&&(bt.flags|=256),Xb(bt,A,M,w,s),Up(qo(R,M));break e}}w=R=qo(R,M),Ct!==4&&(Ct=2),Gl===null?Gl=[w]:Gl.push(w),w=A;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var W=Vb(w,R,s);bb(w,W);break e;case 1:M=R;var z=w.type,H=w.stateNode;if((w.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(Vi===null||!Vi.has(H)))){w.flags|=65536,s&=-s,w.lanes|=s;var le=qb(w,M,s);bb(w,le);break e}}w=w.return}while(w!==null)}P1(d)}catch(Ee){s=Ee,St===d&&d!==null&&(St=d=d.return);continue}break}while(!0)}function E1(){var i=ad.current;return ad.current=Jc,i===null?Jc:i}function _m(){(Ct===0||Ct===3||Ct===2)&&(Ct=4),Dt===null||(Ta&268435455)===0&&(od&268435455)===0||Yi(Dt,Ht)}function fd(i,s){var d=Ve;Ve|=2;var m=E1();(Dt!==i||Ht!==s)&&(ii=null,Ra(i,s));do try{Z5();break}catch(y){N1(i,y)}while(!0);if(Hp(),Ve=d,ad.current=m,St!==null)throw Error(r(261));return Dt=null,Ht=0,Ct}function Z5(){for(;St!==null;)A1(St)}function J5(){for(;St!==null&&!S_();)A1(St)}function A1(i){var s=_1(i.alternate,i,_r);i.memoizedProps=i.pendingProps,s===null?P1(i):St=s,km.current=null}function P1(i){var s=i;do{var d=s.alternate;if(i=s.return,(s.flags&32768)===0){if(d=K5(d,s,_r),d!==null){St=d;return}}else{if(d=G5(d,s),d!==null){d.flags&=32767,St=d;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ct=6,St=null;return}}if(s=s.sibling,s!==null){St=s;return}St=s=i}while(s!==null);Ct===0&&(Ct=5)}function $a(i,s,d){var m=Ze,y=Kr.transition;try{Kr.transition=null,Ze=1,eM(i,s,d,m)}finally{Kr.transition=y,Ze=m}return null}function eM(i,s,d,m){do Zo();while(qi!==null);if((Ve&6)!==0)throw Error(r(327));d=i.finishedWork;var y=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(T_(i,w),i===Dt&&(St=Dt=null,Ht=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||ld||(ld=!0,M1(gc,function(){return Zo(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Kr.transition,Kr.transition=null;var A=Ze;Ze=1;var M=Ve;Ve|=4,km.current=null,q5(i,d),y1(d,i),b5(_p),jc=!!Op,_p=Op=null,i.current=d,Q5(d),N_(),Ve=M,Ze=A,Kr.transition=w}else i.current=d;if(ld&&(ld=!1,qi=i,ud=y),w=i.pendingLanes,w===0&&(Vi=null),P_(d.stateNode),wr(i,xt()),s!==null)for(m=i.onRecoverableError,d=0;d<s.length;d++)y=s[d],m(y.value,{componentStack:y.stack,digest:y.digest});if(sd)throw sd=!1,i=Nm,Nm=null,i;return(ud&1)!==0&&i.tag!==0&&Zo(),w=i.pendingLanes,(w&1)!==0?i===Em?Vl++:(Vl=0,Em=i):Vl=0,Wi(),null}function Zo(){if(qi!==null){var i=gx(ud),s=Kr.transition,d=Ze;try{if(Kr.transition=null,Ze=16>i?16:i,qi===null)var m=!1;else{if(i=qi,qi=null,ud=0,(Ve&6)!==0)throw Error(r(331));var y=Ve;for(Ve|=4,we=i.current;we!==null;){var w=we,A=w.child;if((we.flags&16)!==0){var M=w.deletions;if(M!==null){for(var R=0;R<M.length;R++){var q=M[R];for(we=q;we!==null;){var ae=we;switch(ae.tag){case 0:case 11:case 15:Hl(8,ae,w)}var se=ae.child;if(se!==null)se.return=ae,we=se;else for(;we!==null;){ae=we;var ne=ae.sibling,ye=ae.return;if(h1(ae),ae===q){we=null;break}if(ne!==null){ne.return=ye,we=ne;break}we=ye}}}var je=w.alternate;if(je!==null){var Se=je.child;if(Se!==null){je.child=null;do{var bt=Se.sibling;Se.sibling=null,Se=bt}while(Se!==null)}}we=w}}if((w.subtreeFlags&2064)!==0&&A!==null)A.return=w,we=A;else e:for(;we!==null;){if(w=we,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Hl(9,w,w.return)}var W=w.sibling;if(W!==null){W.return=w.return,we=W;break e}we=w.return}}var z=i.current;for(we=z;we!==null;){A=we;var H=A.child;if((A.subtreeFlags&2064)!==0&&H!==null)H.return=A,we=H;else e:for(A=z;we!==null;){if(M=we,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:id(9,M)}}catch(Ee){pt(M,M.return,Ee)}if(M===A){we=null;break e}var le=M.sibling;if(le!==null){le.return=M.return,we=le;break e}we=M.return}}if(Ve=y,Wi(),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(vc,i)}catch{}m=!0}return m}finally{Ze=d,Kr.transition=s}}return!1}function C1(i,s,d){s=qo(d,s),s=Vb(i,s,1),i=Ki(i,s,1),s=dr(),i!==null&&(vl(i,1,s),wr(i,s))}function pt(i,s,d){if(i.tag===3)C1(i,i,d);else for(;s!==null;){if(s.tag===3){C1(s,i,d);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Vi===null||!Vi.has(m))){i=qo(d,i),i=qb(s,i,1),s=Ki(s,i,1),i=dr(),s!==null&&(vl(s,1,i),wr(s,i));break}}s=s.return}}function tM(i,s,d){var m=i.pingCache;m!==null&&m.delete(s),s=dr(),i.pingedLanes|=i.suspendedLanes&d,Dt===i&&(Ht&d)===d&&(Ct===4||Ct===3&&(Ht&130023424)===Ht&&500>xt()-Sm?Ra(i,0):jm|=d),wr(i,s)}function O1(i,s){s===0&&((i.mode&1)===0?s=1:(s=xc,xc<<=1,(xc&130023424)===0&&(xc=4194304)));var d=dr();i=ti(i,s),i!==null&&(vl(i,s,d),wr(i,d))}function rM(i){var s=i.memoizedState,d=0;s!==null&&(d=s.retryLane),O1(i,d)}function nM(i,s){var d=0;switch(i.tag){case 13:var m=i.stateNode,y=i.memoizedState;y!==null&&(d=y.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(s),O1(i,d)}var _1;_1=function(i,s,d){if(i!==null)if(i.memoizedProps!==s.pendingProps||vr.current)xr=!0;else{if((i.lanes&d)===0&&(s.flags&128)===0)return xr=!1,H5(i,s,d);xr=(i.flags&131072)!==0}else xr=!1,ut&&(s.flags&1048576)!==0&&cb(s,Bc,s.index);switch(s.lanes=0,s.tag){case 2:var m=s.type;rd(i,s),i=s.pendingProps;var y=Fo(s,er.current);Go(s,d),y=tm(null,s,m,i,y,d);var w=rm();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,yr(m)?(w=!0,Lc(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,qp(s),y.updater=ed,s.stateNode=y,y._reactInternals=s,lm(s,m,i,d),s=fm(null,s,m,!0,w,d)):(s.tag=0,ut&&w&&Lp(s),cr(null,s,y,d),s=s.child),s;case 16:m=s.elementType;e:{switch(rd(i,s),i=s.pendingProps,y=m._init,m=y(m._payload),s.type=m,y=s.tag=aM(m),i=dn(m,i),y){case 0:s=dm(null,s,m,i,d);break e;case 1:s=n1(null,s,m,i,d);break e;case 11:s=Zb(null,s,m,i,d);break e;case 14:s=Jb(null,s,m,dn(m.type,i),d);break e}throw Error(r(306,m,""))}return s;case 0:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:dn(m,y),dm(i,s,m,y,d);case 1:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:dn(m,y),n1(i,s,m,y,d);case 3:e:{if(i1(s),i===null)throw Error(r(387));m=s.pendingProps,w=s.memoizedState,y=w.element,xb(i,s),Vc(s,m,null,d);var A=s.memoizedState;if(m=A.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=qo(Error(r(423)),s),s=a1(i,s,m,d,y);break e}else if(m!==y){y=qo(Error(r(424)),s),s=a1(i,s,m,d,y);break e}else for(Or=Fi(s.stateNode.containerInfo.firstChild),Cr=s,ut=!0,cn=null,d=vb(s,null,m,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Wo(),m===y){s=ni(i,s,d);break e}cr(i,s,m,d)}s=s.child}return s;case 5:return kb(s),i===null&&Bp(s),m=s.type,y=s.pendingProps,w=i!==null?i.memoizedProps:null,A=y.children,Mp(m,y)?A=null:w!==null&&Mp(m,w)&&(s.flags|=32),r1(i,s),cr(i,s,A,d),s.child;case 6:return i===null&&Bp(s),null;case 13:return o1(i,s,d);case 4:return Qp(s,s.stateNode.containerInfo),m=s.pendingProps,i===null?s.child=Ho(s,null,m,d):cr(i,s,m,d),s.child;case 11:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:dn(m,y),Zb(i,s,m,y,d);case 7:return cr(i,s,s.pendingProps,d),s.child;case 8:return cr(i,s,s.pendingProps.children,d),s.child;case 12:return cr(i,s,s.pendingProps.children,d),s.child;case 10:e:{if(m=s.type._context,y=s.pendingProps,w=s.memoizedProps,A=y.value,rt(Hc,m._currentValue),m._currentValue=A,w!==null)if(un(w.value,A)){if(w.children===y.children&&!vr.current){s=ni(i,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var M=w.dependencies;if(M!==null){A=w.child;for(var R=M.firstContext;R!==null;){if(R.context===m){if(w.tag===1){R=ri(-1,d&-d),R.tag=2;var q=w.updateQueue;if(q!==null){q=q.shared;var ae=q.pending;ae===null?R.next=R:(R.next=ae.next,ae.next=R),q.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),Gp(w.return,d,s),M.lanes|=d;break}R=R.next}}else if(w.tag===10)A=w.type===s.type?null:w.child;else if(w.tag===18){if(A=w.return,A===null)throw Error(r(341));A.lanes|=d,M=A.alternate,M!==null&&(M.lanes|=d),Gp(A,d,s),A=w.sibling}else A=w.child;if(A!==null)A.return=w;else for(A=w;A!==null;){if(A===s){A=null;break}if(w=A.sibling,w!==null){w.return=A.return,A=w;break}A=A.return}w=A}cr(i,s,y.children,d),s=s.child}return s;case 9:return y=s.type,m=s.pendingProps.children,Go(s,d),y=Wr(y),m=m(y),s.flags|=1,cr(i,s,m,d),s.child;case 14:return m=s.type,y=dn(m,s.pendingProps),y=dn(m.type,y),Jb(i,s,m,y,d);case 15:return e1(i,s,s.type,s.pendingProps,d);case 17:return m=s.type,y=s.pendingProps,y=s.elementType===m?y:dn(m,y),rd(i,s),s.tag=1,yr(m)?(i=!0,Lc(s)):i=!1,Go(s,d),Kb(s,m,y),lm(s,m,y,d),fm(null,s,m,!0,i,d);case 19:return l1(i,s,d);case 22:return t1(i,s,d)}throw Error(r(156,s.tag))};function M1(i,s){return dx(i,s)}function iM(i,s,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gr(i,s,d,m){return new iM(i,s,d,m)}function Mm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function aM(i){if(typeof i=="function")return Mm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===$)return 11;if(i===pe)return 14}return 2}function Xi(i,s){var d=i.alternate;return d===null?(d=Gr(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 hd(i,s,d,m,y,w){var A=2;if(m=i,typeof i=="function")Mm(i)&&(A=1);else if(typeof i=="string")A=5;else e:switch(i){case I:return La(d.children,y,w,s);case B:A=8,y|=8;break;case U:return i=Gr(12,d,s,y|2),i.elementType=U,i.lanes=w,i;case fe:return i=Gr(13,d,s,y),i.elementType=fe,i.lanes=w,i;case J:return i=Gr(19,d,s,y),i.elementType=J,i.lanes=w,i;case de:return pd(d,y,w,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case G:A=10;break e;case X:A=9;break e;case $:A=11;break e;case pe:A=14;break e;case be:A=16,m=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=Gr(A,d,s,y),s.elementType=i,s.type=m,s.lanes=w,s}function La(i,s,d,m){return i=Gr(7,i,m,s),i.lanes=d,i}function pd(i,s,d,m){return i=Gr(22,i,m,s),i.elementType=de,i.lanes=d,i.stateNode={isHidden:!1},i}function Im(i,s,d){return i=Gr(6,i,null,s),i.lanes=d,i}function Tm(i,s,d){return s=Gr(4,i.children!==null?i.children:[],i.key,s),s.lanes=d,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function oM(i,s,d,m,y){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=sp(0),this.expirationTimes=sp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sp(0),this.identifierPrefix=m,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Dm(i,s,d,m,y,w,A,M,R){return i=new oM(i,s,d,M,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Gr(3,null,null,s),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},qp(w),i}function sM(i,s,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:m==null?null:""+m,children:i,containerInfo:s,implementation:d}}function I1(i){if(!i)return Ui;i=i._reactInternals;e:{if(Ea(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(yr(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(yr(d))return sb(i,d,s)}return s}function T1(i,s,d,m,y,w,A,M,R){return i=Dm(d,m,!0,i,y,w,A,M,R),i.context=I1(null),d=i.current,m=dr(),y=Qi(d),w=ri(m,y),w.callback=s??null,Ki(d,w,y),i.current.lanes=y,vl(i,y,m),wr(i,m),i}function md(i,s,d,m){var y=s.current,w=dr(),A=Qi(y);return d=I1(d),s.context===null?s.context=d:s.pendingContext=d,s=ri(w,A),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Ki(y,s,A),i!==null&&(pn(i,y,A,w),Gc(i,y,A)),A}function gd(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 D1(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<s?d:s}}function Rm(i,s){D1(i,s),(i=i.alternate)&&D1(i,s)}function lM(){return null}var R1=typeof reportError=="function"?reportError:function(i){console.error(i)};function $m(i){this._internalRoot=i}vd.prototype.render=$m.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));md(i,s,null,null)},vd.prototype.unmount=$m.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Da(function(){md(null,i,null,null)}),s[Xn]=null}};function vd(i){this._internalRoot=i}vd.prototype.unstable_scheduleHydration=function(i){if(i){var s=xx();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&&kx(i)}};function Lm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function yd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function $1(){}function uM(i,s,d,m,y){if(y){if(typeof m=="function"){var w=m;m=function(){var q=gd(A);w.call(q)}}var A=T1(s,m,i,0,null,!1,!1,"",$1);return i._reactRootContainer=A,i[Xn]=A.current,_l(i.nodeType===8?i.parentNode:i),Da(),A}for(;y=i.lastChild;)i.removeChild(y);if(typeof m=="function"){var M=m;m=function(){var q=gd(R);M.call(q)}}var R=Dm(i,0,!1,null,null,!1,!1,"",$1);return i._reactRootContainer=R,i[Xn]=R.current,_l(i.nodeType===8?i.parentNode:i),Da(function(){md(s,R,d,m)}),R}function xd(i,s,d,m,y){var w=d._reactRootContainer;if(w){var A=w;if(typeof y=="function"){var M=y;y=function(){var R=gd(A);M.call(R)}}md(s,A,i,y)}else A=uM(d,s,i,y,m);return gd(A)}vx=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var d=gl(s.pendingLanes);d!==0&&(lp(s,d|1),wr(s,xt()),(Ve&6)===0&&(Xo=xt()+500,Wi()))}break;case 13:Da(function(){var m=ti(i,1);if(m!==null){var y=dr();pn(m,i,1,y)}}),Rm(i,1)}},up=function(i){if(i.tag===13){var s=ti(i,134217728);if(s!==null){var d=dr();pn(s,i,134217728,d)}Rm(i,134217728)}},yx=function(i){if(i.tag===13){var s=Qi(i),d=ti(i,s);if(d!==null){var m=dr();pn(d,i,s,m)}Rm(i,s)}},xx=function(){return Ze},bx=function(i,s){var d=Ze;try{return Ze=i,s()}finally{Ze=d}},Jt=function(i,s,d){switch(s){case"input":if(ur(i,d),s=d.name,d.type==="radio"&&s!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<d.length;s++){var m=d[s];if(m!==i&&m.form===i.form){var y=Rc(m);if(!y)throw Error(r(90));ie(m),ur(m,y)}}}break;case"textarea":ee(i,d);break;case"select":s=d.value,s!=null&&Fr(i,!!d.multiple,s,!1)}},fl=Cm,ax=Da;var cM={usingClientEntryPoint:!1,Events:[Tl,Lo,Rc,dl,hc,Cm]},ql={findFiberByHostInstance:Aa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dM={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=ux(i),i===null?null:i.stateNode},findFiberByHostInstance:ql.findFiberByHostInstance||lM,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 bd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bd.isDisabled&&bd.supportsFiber)try{vc=bd.inject(dM),Sn=bd}catch{}}return kr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cM,kr.createPortal=function(i,s){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lm(s))throw Error(r(200));return sM(i,s,null,d)},kr.createRoot=function(i,s){if(!Lm(i))throw Error(r(299));var d=!1,m="",y=R1;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=Dm(i,1,!1,null,null,d,!1,m,y),i[Xn]=s.current,_l(i.nodeType===8?i.parentNode:i),new $m(s)},kr.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=ux(s),i=i===null?null:i.stateNode,i},kr.flushSync=function(i){return Da(i)},kr.hydrate=function(i,s,d){if(!yd(s))throw Error(r(200));return xd(null,i,s,!0,d)},kr.hydrateRoot=function(i,s,d){if(!Lm(i))throw Error(r(405));var m=d!=null&&d.hydratedSources||null,y=!1,w="",A=R1;if(d!=null&&(d.unstable_strictMode===!0&&(y=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(A=d.onRecoverableError)),s=T1(s,null,i,1,d??null,y,!1,w,A),i[Xn]=s.current,_l(i),m)for(i=0;i<m.length;i++)d=m[i],y=d._getVersion,y=y(d._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[d,y]:s.mutableSourceEagerHydrationData.push(d,y);return new vd(s)},kr.render=function(i,s,d){if(!yd(s))throw Error(r(200));return xd(null,i,s,!1,d)},kr.unmountComponentAtNode=function(i){if(!yd(i))throw Error(r(40));return i._reactRootContainer?(Da(function(){xd(null,null,i,!1,function(){i._reactRootContainer=null,i[Xn]=null})}),!0):!1},kr.unstable_batchedUpdates=Cm,kr.unstable_renderSubtreeIntoContainer=function(i,s,d,m){if(!yd(d))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return xd(i,s,d,!1,m)},kr.version="18.3.1-next-f1338f8080-20240426",kr}var G1;function J2(){if(G1)return Um.exports;G1=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(),Um.exports=wM(),Um.exports}var V1;function kM(){if(V1)return kd;V1=1;var e=J2();return kd.createRoot=e.createRoot,kd.hydrateRoot=e.hydrateRoot,kd}var jM=kM();const SM=cy(jM);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(){}},eo,sa,ws,U2,NM=(U2=class extends qu{constructor(){super();De(this,eo);De(this,sa);De(this,ws);xe(this,ws,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,sa)||this.setEventListener(L(this,ws))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,sa))==null||t.call(this),xe(this,sa,void 0))}setEventListener(t){var r;xe(this,ws,t),(r=L(this,sa))==null||r.call(this),xe(this,sa,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,eo)!==t&&(xe(this,eo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,eo)=="boolean"?L(this,eo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},eo=new WeakMap,sa=new WeakMap,ws=new WeakMap,U2),dy=new NM,EM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},la,uy,W2,AM=(W2=class{constructor(){De(this,la,EM);De(this,uy,!1)}setTimeoutProvider(e){xe(this,la,e)}setTimeout(e,t){return L(this,la).setTimeout(e,t)}clearTimeout(e){L(this,la).clearTimeout(e)}setInterval(e,t){return L(this,la).setInterval(e,t)}clearInterval(e){L(this,la).clearInterval(e)}},la=new WeakMap,uy=new WeakMap,W2),qa=new AM;function PM(e){setTimeout(e,0)}var CM=typeof window>"u"||"Deno"in globalThis;function Sr(){}function OM(e,t){return typeof e=="function"?e(t):e}function $g(e){return typeof e=="number"&&e>=0&&e!==1/0}function eN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ga(e,t){return typeof e=="function"?e(t):e}function Tr(e,t){return typeof e=="function"?e(t):e}function q1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:c,stale:l}=e;if(c){if(n){if(t.queryHash!==fy(c,t.options))return!1}else if(!bu(t.queryKey,c))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||o&&!o(t))}function Q1(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(xu(t.options.mutationKey)!==xu(o))return!1}else if(!bu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function fy(e,t){return((t==null?void 0:t.queryKeyHashFn)||xu)(e)}function xu(e){return JSON.stringify(e,(t,r)=>zg(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function bu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>bu(e[r],t[r])):!1}var _M=Object.prototype.hasOwnProperty;function tN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=Y1(e)&&Y1(t);if(!n&&!(zg(e)&&zg(t)))return t;const o=(n?e:Object.keys(e)).length,c=n?t:Object.keys(t),l=c.length,f=n?new Array(l):{};let h=0;for(let p=0;p<l;p++){const g=n?p:c[p],x=e[g],b=t[g];if(x===b){f[g]=x,(n?p<o:_M.call(e,g))&&h++;continue}if(x===null||b===null||typeof x!="object"||typeof b!="object"){f[g]=b;continue}const j=tN(x,b,r+1);f[g]=j,j===x&&h++}return o===l&&h===o?e:f}function Lg(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 Y1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zg(e){if(!X1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!X1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function X1(e){return Object.prototype.toString.call(e)==="[object Object]"}function MM(e){return new Promise(t=>{qa.setTimeout(t,e)})}function Fg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?tN(e,t):t}function IM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function TM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var hy=Symbol();function rN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===hy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function nN(e,t){return typeof e=="function"?e(...t):!!e}function DM(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 wu=(()=>{let e=()=>CM;return{isServer(){return e()},setIsServer(t){e=t}}})();function Bg(){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 RM=PM;function $M(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=RM;const o=l=>{t?e.push(l):a(()=>{r(l)})},c=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(f=>{r(f)})})})};return{batch:l=>{let f;t++;try{f=l()}finally{t--,t||c()}return f},batchCalls:l=>(...f)=>{o(()=>{l(...f)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var qt=$M(),ks,ua,js,H2,LM=(H2=class extends qu{constructor(){super();De(this,ks,!0);De(this,ua);De(this,js);xe(this,js,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,ua)||this.setEventListener(L(this,js))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ua))==null||t.call(this),xe(this,ua,void 0))}setEventListener(t){var r;xe(this,js,t),(r=L(this,ua))==null||r.call(this),xe(this,ua,t(this.setOnline.bind(this)))}setOnline(t){L(this,ks)!==t&&(xe(this,ks,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,ks)}},ks=new WeakMap,ua=new WeakMap,js=new WeakMap,H2),of=new LM;function zM(e){return Math.min(1e3*2**e,3e4)}function iN(e){return(e??"online")==="online"?of.isOnline():!0}var Ug=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function aN(e){let t=!1,r=0,n;const a=Bg(),o=()=>a.status!=="pending",c=k=>{var S;if(!o()){const N=new Ug(k);x(N),(S=e.onCancel)==null||S.call(e,N)}},l=()=>{t=!0},f=()=>{t=!1},h=()=>dy.isFocused()&&(e.networkMode==="always"||of.isOnline())&&e.canRun(),p=()=>iN(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),a.resolve(k))},x=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 C;if(o())return;const E=e.retry??(wu.isServer()?0:3),O=e.retryDelay??zM,P=typeof O=="function"?O(r,N):O,_=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,N);if(t||!_){x(N);return}r++,(C=e.onFail)==null||C.call(e,r,N),MM(P).then(()=>h()?void 0:b()).then(()=>{t?x(N):j()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(n==null||n(),a),cancelRetry:l,continueRetry:f,canStart:p,start:()=>(p()?j():b().then(j),a)}}var to,K2,oN=(K2=class{constructor(){De(this,to)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$g(this.gcTime)&&xe(this,to,qa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,to)!==void 0&&(qa.clearTimeout(L(this,to)),xe(this,to,void 0))}},to=new WeakMap,K2);function FM(e){return{onFetch:(t,r)=>{var p,g,x,b,j;const n=t.options,a=(x=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],c=((j=t.state.data)==null?void 0:j.pageParams)||[];let l={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=O=>{DM(O,()=>t.signal,()=>k=!0)},N=rN(t.options,t.fetchOptions),E=async(O,P,_)=>{if(k)return Promise.reject(t.signal.reason);if(P==null&&O.pages.length)return Promise.resolve(O);const I=(()=>{const X={client:t.client,queryKey:t.queryKey,pageParam:P,direction:_?"backward":"forward",meta:t.options.meta};return S(X),X})(),B=await N(I),{maxPages:U}=t.options,G=_?TM:IM;return{pages:G(O.pages,B,U),pageParams:G(O.pageParams,P,U)}};if(a&&o.length){const O=a==="backward",P=O?BM:Z1,_={pages:o,pageParams:c},C=P(n,_);l=await E(_,C,O)}else{const O=e??o.length;do{const P=f===0?c[0]??n.initialPageParam:Z1(n,l);if(f>0&&P==null)break;l=await E(l,P),f++}while(f<O)}return l};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 Z1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function BM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ss,ro,Ns,Qr,no,$t,Wu,io,Ir,sN,oi,G2,UM=(G2=class extends oN{constructor(t){super();De(this,Ir);De(this,Ss);De(this,ro);De(this,Ns);De(this,Qr);De(this,no);De(this,$t);De(this,Wu);De(this,io);xe(this,io,!1),xe(this,Wu,t.defaultOptions),this.setOptions(t.options),this.observers=[],xe(this,no,t.client),xe(this,Qr,L(this,no).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,xe(this,ro,ew(this.options)),this.state=t.state??L(this,ro),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,Ss)}get promise(){var t;return(t=L(this,$t))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Wu),...t},t!=null&&t._type&&xe(this,Ss,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=ew(this.options);r.data!==void 0&&(this.setState(J1(r.data,r.dataUpdatedAt)),xe(this,ro,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Qr).remove(this)}setData(t,r){const n=Fg(this.state.data,t,this.options);return We(this,Ir,oi).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){We(this,Ir,oi).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,$t))==null?void 0:n.promise;return(a=L(this,$t))==null||a.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,ro)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Tr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ga(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:!eN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,$t))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,$t))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Qr).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,$t)&&(L(this,io)||We(this,Ir,sN).call(this)?L(this,$t).cancel({revert:!0}):L(this,$t).cancelRetry()),this.scheduleGc()),L(this,Qr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,Ir,oi).call(this,{type:"invalidate"})}async fetch(t,r){var h,p,g,x,b,j,k,S,N,E,O;if(this.state.fetchStatus!=="idle"&&((h=L(this,$t))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,$t))return L(this,$t).continueRetry(),L(this,$t).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:()=>(xe(this,io,!0),n.signal)})},o=()=>{const P=rN(this.options,r),C=(()=>{const I={client:L(this,no),queryKey:this.queryKey,meta:this.meta};return a(I),I})();return xe(this,io,!1),this.options.persister?this.options.persister(P,C,this):P(C)},l=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,no),state:this.state,fetchFn:o};return a(P),P})(),f=L(this,Ss)==="infinite"?FM(this.options.pages):this.options.behavior;f==null||f.onFetch(l,this),xe(this,Ns,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=l.fetchOptions)==null?void 0:p.meta))&&We(this,Ir,oi).call(this,{type:"fetch",meta:(g=l.fetchOptions)==null?void 0:g.meta}),xe(this,$t,aN({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:P=>{P instanceof Ug&&P.revert&&this.setState({...L(this,Ns),fetchStatus:"idle"}),n.abort()},onFail:(P,_)=>{We(this,Ir,oi).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{We(this,Ir,oi).call(this,{type:"pause"})},onContinue:()=>{We(this,Ir,oi).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const P=await L(this,$t).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(x=L(this,Qr).config).onSuccess)==null||b.call(x,P,this),(k=(j=L(this,Qr).config).onSettled)==null||k.call(j,P,this.state.error,this),P}catch(P){if(P instanceof Ug){if(P.silent)return L(this,$t).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw We(this,Ir,oi).call(this,{type:"error",error:P}),(N=(S=L(this,Qr).config).onError)==null||N.call(S,P,this),(O=(E=L(this,Qr).config).onSettled)==null||O.call(E,this.state.data,P,this),P}finally{this.scheduleGc()}}},Ss=new WeakMap,ro=new WeakMap,Ns=new WeakMap,Qr=new WeakMap,no=new WeakMap,$t=new WeakMap,Wu=new WeakMap,io=new WeakMap,Ir=new WeakSet,sN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},oi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...lN(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...J1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return xe(this,Ns,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,Qr).notify({query:this,type:"updated",action:t})})},G2);function lN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function J1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ew(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 jr,Ke,Hu,fr,ao,Es,li,ca,Ku,As,Ps,oo,so,da,Cs,Xe,cu,Wg,Hg,Kg,Gg,Vg,qg,Qg,uN,V2,WM=(V2=class extends qu{constructor(t,r){super();De(this,Xe);De(this,jr);De(this,Ke);De(this,Hu);De(this,fr);De(this,ao);De(this,Es);De(this,li);De(this,ca);De(this,Ku);De(this,As);De(this,Ps);De(this,oo);De(this,so);De(this,da);De(this,Cs,new Set);this.options=r,xe(this,jr,t),xe(this,ca,null),xe(this,li,Bg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ke).addObserver(this),tw(L(this,Ke),this.options)?We(this,Xe,cu).call(this):this.updateResult(),We(this,Xe,Gg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Yg(L(this,Ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Yg(L(this,Ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,We(this,Xe,Vg).call(this),We(this,Xe,qg).call(this),L(this,Ke).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,Ke);if(this.options=L(this,jr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tr(this.options.enabled,L(this,Ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");We(this,Xe,Qg).call(this),L(this,Ke).setOptions(this.options),r._defaulted&&!Lg(this.options,r)&&L(this,jr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ke),observer:this});const a=this.hasListeners();a&&rw(L(this,Ke),n,this.options,r)&&We(this,Xe,cu).call(this),this.updateResult(),a&&(L(this,Ke)!==n||Tr(this.options.enabled,L(this,Ke))!==Tr(r.enabled,L(this,Ke))||ga(this.options.staleTime,L(this,Ke))!==ga(r.staleTime,L(this,Ke)))&&We(this,Xe,Wg).call(this);const o=We(this,Xe,Hg).call(this);a&&(L(this,Ke)!==n||Tr(this.options.enabled,L(this,Ke))!==Tr(r.enabled,L(this,Ke))||o!==L(this,da))&&We(this,Xe,Kg).call(this,o)}getOptimisticResult(t){const r=L(this,jr).getQueryCache().build(L(this,jr),t),n=this.createResult(r,t);return KM(this,n)&&(xe(this,fr,n),xe(this,Es,this.options),xe(this,ao,L(this,Ke).state)),n}getCurrentResult(){return L(this,fr)}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,li).status==="pending"&&L(this,li).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,Cs).add(t)}getCurrentQuery(){return L(this,Ke)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,jr).defaultQueryOptions(t),n=L(this,jr).getQueryCache().build(L(this,jr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return We(this,Xe,cu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,fr)))}createResult(t,r){var U;const n=L(this,Ke),a=this.options,o=L(this,fr),c=L(this,ao),l=L(this,Es),h=t!==n?t.state:L(this,Hu),{state:p}=t;let g={...p},x=!1,b;if(r._optimisticResults){const G=this.hasListeners(),X=!G&&tw(t,r),$=G&&rw(t,n,r,a);(X||$)&&(g={...g,...lN(p.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 G;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(G=o.data,N=!0):G=typeof r.placeholderData=="function"?r.placeholderData((U=L(this,Ps))==null?void 0:U.state.data,L(this,Ps)):r.placeholderData,G!==void 0&&(S="success",b=Fg(o==null?void 0:o.data,G,r),x=!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,As);else try{xe(this,Ku,r.select),b=r.select(b),b=Fg(o==null?void 0:o.data,b,r),xe(this,As,b),xe(this,ca,null)}catch(G){xe(this,ca,G)}L(this,ca)&&(j=L(this,ca),b=L(this,As),k=Date.now(),S="error");const E=g.fetchStatus==="fetching",O=S==="pending",P=S==="error",_=O&&E,C=b!==void 0,B={status:S,fetchStatus:g.fetchStatus,isPending:O,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&&!O,isLoadingError:P&&!C,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:P&&C,isStale:py(t,r),refetch:this.refetch,promise:L(this,li),isEnabled:Tr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=B.data!==void 0,X=B.status==="error"&&!G,$=pe=>{X?pe.reject(B.error):G&&pe.resolve(B.data)},fe=()=>{const pe=xe(this,li,B.promise=Bg());$(pe)},J=L(this,li);switch(J.status){case"pending":t.queryHash===n.queryHash&&$(J);break;case"fulfilled":(X||B.data!==J.value)&&fe();break;case"rejected":(!X||B.error!==J.reason)&&fe();break}}return B}updateResult(){const t=L(this,fr),r=this.createResult(L(this,Ke),this.options);if(xe(this,ao,L(this,Ke).state),xe(this,Es,this.options),L(this,ao).data!==void 0&&xe(this,Ps,L(this,Ke)),Lg(r,t))return;xe(this,fr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!L(this,Cs).size)return!0;const c=new Set(o??L(this,Cs));return this.options.throwOnError&&c.add("error"),Object.keys(L(this,fr)).some(l=>{const f=l;return L(this,fr)[f]!==t[f]&&c.has(f)})};We(this,Xe,uN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&We(this,Xe,Gg).call(this)}},jr=new WeakMap,Ke=new WeakMap,Hu=new WeakMap,fr=new WeakMap,ao=new WeakMap,Es=new WeakMap,li=new WeakMap,ca=new WeakMap,Ku=new WeakMap,As=new WeakMap,Ps=new WeakMap,oo=new WeakMap,so=new WeakMap,da=new WeakMap,Cs=new WeakMap,Xe=new WeakSet,cu=function(t){We(this,Xe,Qg).call(this);let r=L(this,Ke).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},Wg=function(){We(this,Xe,Vg).call(this);const t=ga(this.options.staleTime,L(this,Ke));if(wu.isServer()||L(this,fr).isStale||!$g(t))return;const n=eN(L(this,fr).dataUpdatedAt,t)+1;xe(this,oo,qa.setTimeout(()=>{L(this,fr).isStale||this.updateResult()},n))},Hg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ke)):this.options.refetchInterval)??!1},Kg=function(t){We(this,Xe,qg).call(this),xe(this,da,t),!(wu.isServer()||Tr(this.options.enabled,L(this,Ke))===!1||!$g(L(this,da))||L(this,da)===0)&&xe(this,so,qa.setInterval(()=>{(this.options.refetchIntervalInBackground||dy.isFocused())&&We(this,Xe,cu).call(this)},L(this,da)))},Gg=function(){We(this,Xe,Wg).call(this),We(this,Xe,Kg).call(this,We(this,Xe,Hg).call(this))},Vg=function(){L(this,oo)!==void 0&&(qa.clearTimeout(L(this,oo)),xe(this,oo,void 0))},qg=function(){L(this,so)!==void 0&&(qa.clearInterval(L(this,so)),xe(this,so,void 0))},Qg=function(){const t=L(this,jr).getQueryCache().build(L(this,jr),this.options);if(t===L(this,Ke))return;const r=L(this,Ke);xe(this,Ke,t),xe(this,Hu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},uN=function(t){qt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,fr))}),L(this,jr).getQueryCache().notify({query:L(this,Ke),type:"observerResultsUpdated"})})},V2);function HM(e,t){return Tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Tr(t.retryOnMount,e)===!1)}function tw(e,t){return HM(e,t)||e.state.data!==void 0&&Yg(e,t,t.refetchOnMount)}function Yg(e,t,r){if(Tr(t.enabled,e)!==!1&&ga(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&py(e,t)}return!1}function rw(e,t,r,n){return(e!==t||Tr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&py(e,r)}function py(e,t){return Tr(t.enabled,e)!==!1&&e.isStaleByTime(ga(t.staleTime,e))}function KM(e,t){return!Lg(e.getCurrentResult(),t)}var Gu,In,ir,lo,Tn,ra,q2,GM=(q2=class extends oN{constructor(t){super();De(this,Tn);De(this,Gu);De(this,In);De(this,ir);De(this,lo);xe(this,Gu,t.client),this.mutationId=t.mutationId,xe(this,ir,t.mutationCache),xe(this,In,[]),this.state=t.state||VM(),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,In).includes(t)||(L(this,In).push(t),this.clearGcTimeout(),L(this,ir).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){xe(this,In,L(this,In).filter(r=>r!==t)),this.scheduleGc(),L(this,ir).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,In).length||(this.state.status==="pending"?this.scheduleGc():L(this,ir).remove(this))}continue(){var t;return((t=L(this,lo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,l,f,h,p,g,x,b,j,k,S,N,E,O,P,_,C,I;const r=()=>{We(this,Tn,ra).call(this,{type:"continue"})},n={client:L(this,Gu),meta:this.options.meta,mutationKey:this.options.mutationKey};xe(this,lo,aN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,U)=>{We(this,Tn,ra).call(this,{type:"failed",failureCount:B,error:U})},onPause:()=>{We(this,Tn,ra).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,lo).canStart();try{if(a)r();else{We(this,Tn,ra).call(this,{type:"pending",variables:t,isPaused:o}),L(this,ir).config.onMutate&&await L(this,ir).config.onMutate(t,this,n);const U=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));U!==this.state.context&&We(this,Tn,ra).call(this,{type:"pending",context:U,variables:t,isPaused:o})}const B=await L(this,lo).start();return await((h=(f=L(this,ir).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,B,t,this.state.context,n)),await((b=(x=L(this,ir).config).onSettled)==null?void 0:b.call(x,B,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,B,null,t,this.state.context,n)),We(this,Tn,ra).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(S=L(this,ir).config).onError)==null?void 0:N.call(S,B,t,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((O=(E=this.options).onError)==null?void 0:O.call(E,B,t,this.state.context,n))}catch(U){Promise.reject(U)}try{await((_=(P=L(this,ir).config).onSettled)==null?void 0:_.call(P,void 0,B,this.state.variables,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((I=(C=this.options).onSettled)==null?void 0:I.call(C,void 0,B,t,this.state.context,n))}catch(U){Promise.reject(U)}throw We(this,Tn,ra).call(this,{type:"error",error:B}),B}finally{L(this,ir).runNext(this)}}},Gu=new WeakMap,In=new WeakMap,ir=new WeakMap,lo=new WeakMap,Tn=new WeakSet,ra=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,In).forEach(n=>{n.onMutationUpdate(t)}),L(this,ir).notify({mutation:this,type:"updated",action:t})})},q2);function VM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ui,gn,Vu,Q2,qM=(Q2=class extends qu{constructor(t={}){super();De(this,ui);De(this,gn);De(this,Vu);this.config=t,xe(this,ui,new Set),xe(this,gn,new Map),xe(this,Vu,0)}build(t,r,n){const a=new GM({client:t,mutationCache:this,mutationId:++wd(this,Vu)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,ui).add(t);const r=jd(t);if(typeof r=="string"){const n=L(this,gn).get(r);n?n.push(t):L(this,gn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,ui).delete(t)){const r=jd(t);if(typeof r=="string"){const n=L(this,gn).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,gn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=jd(t);if(typeof r=="string"){const n=L(this,gn).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=jd(t);if(typeof r=="string"){const a=(n=L(this,gn).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,ui).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,ui).clear(),L(this,gn).clear()})}getAll(){return Array.from(L(this,ui))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Q1(r,n))}findAll(t={}){return this.getAll().filter(r=>Q1(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(Sr))))}},ui=new WeakMap,gn=new WeakMap,Vu=new WeakMap,Q2);function jd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Dn,Y2,QM=(Y2=class extends qu{constructor(t={}){super();De(this,Dn);this.config=t,xe(this,Dn,new Map)}build(t,r,n){const a=r.queryKey,o=r.queryHash??fy(a,r);let c=this.get(o);return c||(c=new UM({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(c)),c}add(t){L(this,Dn).has(t.queryHash)||(L(this,Dn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,Dn).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,Dn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Dn).get(t)}getAll(){return[...L(this,Dn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>q1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>q1(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()})})}},Dn=new WeakMap,Y2),mt,fa,ha,Os,_s,pa,Ms,Is,X2,YM=(X2=class{constructor(e={}){De(this,mt);De(this,fa);De(this,ha);De(this,Os);De(this,_s);De(this,pa);De(this,Ms);De(this,Is);xe(this,mt,e.queryCache||new QM),xe(this,fa,e.mutationCache||new qM),xe(this,ha,e.defaultOptions||{}),xe(this,Os,new Map),xe(this,_s,new Map),xe(this,pa,0)}mount(){wd(this,pa)._++,L(this,pa)===1&&(xe(this,Ms,dy.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onFocus())})),xe(this,Is,of.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,mt).onOnline())})))}unmount(){var e,t;wd(this,pa)._--,L(this,pa)===0&&((e=L(this,Ms))==null||e.call(this),xe(this,Ms,void 0),(t=L(this,Is))==null||t.call(this),xe(this,Is,void 0))}isFetching(e){return L(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,fa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,mt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,mt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ga(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,mt).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,mt).get(n.queryHash),o=a==null?void 0:a.state.data,c=OM(t,o);if(c!==void 0)return L(this,mt).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return qt.batch(()=>L(this,mt).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,mt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,mt);qt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,mt);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,mt).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return qt.batch(()=>(L(this,mt).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,mt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(Sr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,mt).build(this,t);return r.isStaleByTime(ga(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return of.isOnline()?L(this,fa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,mt)}getMutationCache(){return L(this,fa)}getDefaultOptions(){return L(this,ha)}setDefaultOptions(e){xe(this,ha,e)}setQueryDefaults(e,t){L(this,Os).set(xu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Os).values()],r={};return t.forEach(n=>{bu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,_s).set(xu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,_s).values()],r={};return t.forEach(n=>{bu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,ha).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fy(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===hy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,ha).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,mt).clear(),L(this,fa).clear()}},mt=new WeakMap,fa=new WeakMap,ha=new WeakMap,Os=new WeakMap,_s=new WeakMap,pa=new WeakMap,Ms=new WeakMap,Is=new WeakMap,X2),cN=v.createContext(void 0),jo=e=>{const t=v.useContext(cN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},XM=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(cN.Provider,{value:e,children:t})),dN=v.createContext(!1),ZM=()=>v.useContext(dN);dN.Provider;function JM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var eI=v.createContext(JM()),tI=()=>v.useContext(eI),rI=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?nN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},nI=e=>{v.useEffect(()=>{e.clearReset()},[e])},iI=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||nN(r,[e.error,n])),aI=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))}},oI=(e,t)=>e.isLoading&&e.isFetching&&!t,sI=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,nw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function lI(e,t,r){var b,j,k,S;const n=ZM(),a=tI(),o=jo(),c=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,c);const l=o.getQueryCache().get(c.queryHash),f=e.subscribed!==!1;c._optimisticResults=n?"isRestoring":f?"optimistic":void 0,aI(c),rI(c,a,l),nI(a);const h=!o.getQueryCache().get(c.queryHash),[p]=v.useState(()=>new t(o,c)),g=p.getOptimisticResult(c),x=!n&&f;if(v.useSyncExternalStore(v.useCallback(N=>{const E=x?p.subscribe(qt.batchCalls(N)):Sr;return p.updateResult(),E},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),v.useEffect(()=>{p.setOptions(c)},[c,p]),sI(c,g))throw nw(c,p,a);if(iI({result:g,errorResetBoundary:a,throwOnError:c.throwOnError,query:l,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&&!wu.isServer()&&oI(g,n)){const N=h?nw(c,p,a):l==null?void 0:l.promise;N==null||N.catch(Sr).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?g:p.trackResult(g)}function sr(e,t){return lI(e,WM)}/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const uI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fN=(...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 cI={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 dI=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:o,iconNode:c,...l},f)=>v.createElement("svg",{ref:f,...cI,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:fN("lucide",a),...l},[...c.map(([h,p])=>v.createElement(h,p)),...Array.isArray(o)?o:[o]]));/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ge=(e,t)=>{const r=v.forwardRef(({className:n,...a},o)=>v.createElement(dI,{ref:o,iconNode:t,className:fN(`lucide-${uI(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 ku=ge("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 iw=ge("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 fI=ge("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 Xg=ge("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 yi=ge("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 hI=ge("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 Zg=ge("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 ah=ge("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 pI=ge("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 Yr=ge("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 mI=ge("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 gI=ge("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hN=ge("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 vI=ge("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 yI=ge("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 xI=ge("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 bI=ge("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 wI=ge("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 pN=ge("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 kI=ge("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 Jg=ge("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 jI=ge("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 sf=ge("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 zn=ge("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 SI=ge("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 Ts=ge("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 ju=ge("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 aw=ge("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 ev=ge("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 NI=ge("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 EI=ge("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 AI=ge("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 PI=ge("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 Km=ge("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 ow=ge("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 CI=ge("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 OI=ge("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 oh=ge("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 _I=ge("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 MI=ge("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 II=ge("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 TI=ge("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 DI=ge("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 RI=ge("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 $I=ge("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 LI=ge("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 zI=ge("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 FI=ge("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 BI=ge("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 tv=ge("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 rv=ge("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 UI=ge("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 WI=ge("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 mu=ge("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 HI=ge("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 my=ge("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 KI=ge("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 gy=ge("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 GI=ge("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 VI=ge("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 Su=ge("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 du=ge("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 mN=ge("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 qI=ge("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 gN=ge("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 nv=ge("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 Ds=ge("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 QI=ge("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 lf=ge("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 pi=ge("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 uo=ge("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"}]]),iv=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:_I},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:Zg},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:ah},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:tv},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:yi},{id:"terminal",label:"Terminal",hint:"Interaktives Hermes-Agent-Terminal",icon:mN},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:xI}];var sw=1,YI=.9,XI=.8,ZI=.17,Gm=.1,Vm=.999,JI=.9999,eT=.99,tT=/[\\\/_+.#"@\[\(\{&]/,rT=/[\\\/_+.#"@\[\(\{&]/g,nT=/[\s-]/,vN=/[\s-]/g;function av(e,t,r,n,a,o,c){if(o===t.length)return a===e.length?sw:eT;var l=`${a},${o}`;if(c[l]!==void 0)return c[l];for(var f=n.charAt(o),h=r.indexOf(f,a),p=0,g,x,b,j;h>=0;)g=av(e,t,r,n,h+1,o+1,c),g>p&&(h===a?g*=sw:tT.test(e.charAt(h-1))?(g*=XI,b=e.slice(a,h-1).match(rT),b&&a>0&&(g*=Math.pow(Vm,b.length))):nT.test(e.charAt(h-1))?(g*=YI,j=e.slice(a,h-1).match(vN),j&&a>0&&(g*=Math.pow(Vm,j.length))):(g*=ZI,a>0&&(g*=Math.pow(Vm,h-a))),e.charAt(h)!==t.charAt(o)&&(g*=JI)),(g<Gm&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(x=av(e,t,r,n,h+1,o+2,c),x*Gm>g&&(g=x*Gm)),g>p&&(p=g),h=r.indexOf(f,h+1);return c[l]=p,p}function lw(e){return e.toLowerCase().replace(vN," ")}function iT(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,av(e,t,lw(e),lw(t),0,0,{})}function va(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 uw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rs(...e){return t=>{let r=!1;const n=e.map(a=>{const o=uw(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():uw(e[a],null)}}}}function So(...e){return v.useCallback(Rs(...e),e)}function aT(e,t=[]){let r=[];function n(o,c){const l=v.createContext(c);l.displayName=o+"Context";const f=r.length;r=[...r,c];const h=g=>{var N;const{scope:x,children:b,...j}=g,k=((N=x==null?void 0:x[e])==null?void 0:N[f])||l,S=v.useMemo(()=>j,Object.values(j));return u.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function p(g,x){var k;const b=((k=x==null?void 0:x[e])==null?void 0:k[f])||l,j=v.useContext(b);if(j)return j;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,p]}const a=()=>{const o=r.map(c=>v.createContext(c));return function(l){const f=(l==null?void 0:l[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return a.scopeName=e,[n,oT(a,...t)]}function oT(...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((l,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...l,...g}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var Nu=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},sT=ih[" useId ".trim().toString()]||(()=>{}),lT=0;function mi(e){const[t,r]=v.useState(sT());return Nu(()=>{r(n=>n??String(lT++))},[e]),t?`radix-${t}`:""}var uT=ih[" useInsertionEffect ".trim().toString()]||Nu;function cT({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,o,c]=dT({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:a;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const g=p.current;g!==l&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=l},[l,n])}const h=v.useCallback(p=>{var g;if(l){const x=fT(p)?p(e):p;x!==e&&((g=c.current)==null||g.call(c,x))}else o(p)},[l,e,o,c]);return[f,h]}function dT({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),a=v.useRef(r),o=v.useRef(t);return uT(()=>{o.current=t},[t]),v.useEffect(()=>{var c;a.current!==r&&((c=o.current)==null||c.call(o,r),a.current=r)},[r,a]),[r,n,o]}function fT(e){return typeof e=="function"}var sh=J2();function yN(e){const t=v.forwardRef((r,n)=>{let{children:a,...o}=r,c=null,l=!1;const f=[];cw(a)&&typeof Sd=="function"&&(a=Sd(a._payload)),v.Children.forEach(a,x=>{var b;if(vT(x)){l=!0;const j=x;let k="child"in j.props?j.props.child:j.props.children;cw(k)&&typeof Sd=="function"&&(k=Sd(k._payload)),c=pT(j,k),f.push((b=c==null?void 0:c.props)==null?void 0:b.children)}else f.push(x)}),c?c=v.cloneElement(c,void 0,f):!l&&v.Children.count(a)===1&&v.isValidElement(a)&&(c=a);const h=c?gT(c):void 0,p=So(n,h);if(!c){if(a||a===0)throw new Error(l?wT(e):bT(e));return a}const g=mT(o,c.props??{});return c.type!==v.Fragment&&(g.ref=n?p:h),v.cloneElement(c,g)});return t.displayName=`${e}.Slot`,t}var hT=Symbol.for("radix.slottable"),pT=(e,t)=>{if("child"in e.props){const r=e.props.child;return v.isValidElement(r)?v.cloneElement(r,void 0,e.props.children(r.props.children)):null}return v.isValidElement(t)?t:null};function mT(e,t){const r={...t};for(const n in t){const a=e[n],o=t[n];/^on[A-Z]/.test(n)?a&&o?r[n]=(...l)=>{const f=o(...l);return a(...l),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...o}:n==="className"&&(r[n]=[a,o].filter(Boolean).join(" "))}return{...e,...r}}function gT(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 vT(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hT}var yT=Symbol.for("react.lazy");function cw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===yT&&"_payload"in e&&xT(e._payload)}function xT(e){return typeof e=="object"&&e!==null&&"then"in e}var bT=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,wT=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Sd=ih[" use ".trim().toString()],kT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xt=kT.reduce((e,t)=>{const r=yN(`Primitive.${t}`),n=v.forwardRef((a,o)=>{const{asChild:c,...l}=a,f=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(f,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jT(e,t){e&&sh.flushSync(()=>e.dispatchEvent(t))}function Eu(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function ST(e,t=globalThis==null?void 0:globalThis.document){const r=Eu(e);v.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 NT="DismissableLayer",ov="dismissableLayer.update",ET="dismissableLayer.pointerDownOutside",AT="dismissableLayer.focusOutside",dw,vy=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),xN=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:l,onDismiss:f,...h}=e,p=v.useContext(vy),[g,x]=v.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=v.useState({}),k=So(t,U=>x(U)),S=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),O=g?S.indexOf(g):-1,P=p.layersWithOutsidePointerEventsDisabled.size>0,_=O>=E,C=v.useRef(!1),I=_T(U=>{const G=U.target;if(!(G instanceof Node))return;const X=[...p.branches].some($=>$.contains(G));!_||X||(o==null||o(U),l==null||l(U),U.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:p.dismissableSurfaces}),B=MT(U=>{if(n&&C.current)return;const G=U.target;[...p.branches].some($=>$.contains(G))||(c==null||c(U),l==null||l(U),U.defaultPrevented||f==null||f())},b);return ST(U=>{O===p.layers.size-1&&(a==null||a(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},b),v.useEffect(()=>{if(g)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(dw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),fw(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(g),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=dw))}},[g,b,r,p]),v.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),fw())},[g,p]),v.useEffect(()=>{const U=()=>j({});return document.addEventListener(ov,U),()=>document.removeEventListener(ov,U)},[]),u.jsx(Xt.div,{...h,ref:k,style:{pointerEvents:P?_?"auto":"none":void 0,...e.style},onFocusCapture:va(e.onFocusCapture,B.onFocusCapture),onBlurCapture:va(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:va(e.onPointerDownCapture,I.onPointerDownCapture)})});xN.displayName=NT;var PT="DismissableLayerBranch",CT=v.forwardRef((e,t)=>{const r=v.useContext(vy),n=v.useRef(null),a=So(t,n);return v.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),u.jsx(Xt.div,{...e,ref:a})});CT.displayName=PT;function OT(){const e=v.useContext(vy),[t,r]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function _T(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,c=Eu(e),l=v.useRef(!1),f=v.useRef(!1),h=v.useRef(new Map),p=v.useRef(()=>{});return v.useEffect(()=>{function g(){f.current=!1,a.current=!1,h.current.clear()}function x(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const O=E.target;O instanceof Node&&[...o].some(_=>_.contains(O))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function j(E){f.current&&h.current.set(E.type,!1)}const k=E=>{if(E.target&&!l.current){let O=function(){r.removeEventListener("click",p.current);const _=x();g(),_||bN(ET,c,P,{discrete:!0})};const P={originalEvent:E};f.current=!0,a.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?O():(r.removeEventListener("click",p.current),p.current=O,r.addEventListener("click",p.current,{once:!0}))}else r.removeEventListener("click",p.current),g();l.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",p.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,j)}},[r,c,n,a,o]),{onPointerDownCapture:()=>l.current=!0}}function MT(e,t=globalThis==null?void 0:globalThis.document){const r=Eu(e),n=v.useRef(!1);return v.useEffect(()=>{const a=o=>{o.target&&!n.current&&bN(AT,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 fw(){const e=new CustomEvent(ov);document.dispatchEvent(e)}function bN(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?jT(a,o):a.dispatchEvent(o)}var qm="focusScope.autoFocusOnMount",Qm="focusScope.autoFocusOnUnmount",hw={bubbles:!1,cancelable:!0},IT="FocusScope",wN=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...c}=e,[l,f]=v.useState(null),h=Eu(a),p=Eu(o),g=v.useRef(null),x=So(t,k=>f(k)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let k=function(O){if(b.paused||!l)return;const P=O.target;l.contains(P)?g.current=P:na(g.current,{select:!0})},S=function(O){if(b.paused||!l)return;const P=O.relatedTarget;P!==null&&(l.contains(P)||na(g.current,{select:!0}))},N=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&na(l)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const E=new MutationObserver(N);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),E.disconnect()}}},[n,l,b.paused]),v.useEffect(()=>{if(l){mw.add(b);const k=document.activeElement;if(!l.contains(k)){const N=new CustomEvent(qm,hw);l.addEventListener(qm,h),l.dispatchEvent(N),N.defaultPrevented||(TT(zT(kN(l)),{select:!0}),document.activeElement===k&&na(l))}return()=>{l.removeEventListener(qm,h),setTimeout(()=>{const N=new CustomEvent(Qm,hw);l.addEventListener(Qm,p),l.dispatchEvent(N),N.defaultPrevented||na(k??document.body,{select:!0}),l.removeEventListener(Qm,p),mw.remove(b)},0)}}},[l,h,p,b]);const j=v.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,[O,P]=DT(E);O&&P?!k.shiftKey&&N===P?(k.preventDefault(),r&&na(O,{select:!0})):k.shiftKey&&N===O&&(k.preventDefault(),r&&na(P,{select:!0})):N===E&&k.preventDefault()}},[r,n,b.paused]);return u.jsx(Xt.div,{tabIndex:-1,...c,ref:x,onKeyDown:j})});wN.displayName=IT;function TT(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(na(n,{select:t}),document.activeElement!==r)return}function DT(e){const t=kN(e),r=pw(t,e),n=pw(t.reverse(),e);return[r,n]}function kN(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 pw(e,t){for(const r of e)if(!RT(r,{upTo:t}))return r}function RT(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 $T(e){return e instanceof HTMLInputElement&&"select"in e}function na(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$T(e)&&t&&e.select()}}var mw=LT();function LT(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=gw(e,t),e.unshift(t)},remove(t){var r;e=gw(e,t),(r=e[0])==null||r.resume()}}}function gw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function zT(e){return e.filter(t=>t.tagName!=="A")}var FT="Portal",jN=v.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,o]=v.useState(!1);Nu(()=>o(!0),[]);const c=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return c?sh.createPortal(u.jsx(Xt.div,{...n,ref:t}),c):null});jN.displayName=FT;function BT(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var lh=e=>{const{present:t,children:r}=e,n=UT(t),a=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),o=WT(n.ref,HT(a));return typeof r=="function"||n.isPresent?v.cloneElement(a,{ref:o}):null};lh.displayName="Presence";function UT(e){const[t,r]=v.useState(),n=v.useRef(null),a=v.useRef(e),o=v.useRef("none"),c=e?"mounted":"unmounted",[l,f]=BT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Nd(n.current);o.current=l==="mounted"?h:"none"},[l]),Nu(()=>{const h=n.current,p=a.current;if(p!==e){const x=o.current,b=Nd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&x!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Nu(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,g=b=>{const k=Nd(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=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},x=b=>{b.target===t&&(o.current=Nd(n.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function vw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function WT(...e){const t=v.useRef(e);return t.current=e,v.useCallback(r=>{const n=t.current;let a=!1;const o=n.map(c=>{const l=vw(c,r);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let c=0;c<o.length;c++){const l=o[c];typeof l=="function"?l():vw(n[c],null)}}},[])}function Nd(e){return(e==null?void 0:e.animationName)||"none"}function HT(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 Ed=0,Cn=null;function KT(){v.useEffect(()=>{Cn||(Cn={start:yw(),end:yw()});const{start:e,end:t}=Cn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Ed++,()=>{Ed===1&&(Cn==null||Cn.start.remove(),Cn==null||Cn.end.remove(),Cn=null),Ed=Math.max(0,Ed-1)}},[])}function yw(){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 Rn=function(){return Rn=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},Rn.apply(this,arguments)};function SN(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 GT(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",VT="with-scroll-bars-hidden",qT="--removed-body-scroll-bar-size";function Ym(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function QT(e,t){var r=v.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 YT=typeof window<"u"?v.useLayoutEffect:v.useEffect,xw=new WeakMap;function XT(e,t){var r=QT(null,function(n){return e.forEach(function(a){return Ym(a,n)})});return YT(function(){var n=xw.get(r);if(n){var a=new Set(n),o=new Set(e),c=r.current;a.forEach(function(l){o.has(l)||Ym(l,null)}),o.forEach(function(l){a.has(l)||Ym(l,c)})}xw.set(r,e)},[e]),r}function ZT(e){return e}function JT(e,t){t===void 0&&(t=ZT);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(l){return l!==c})}},assignSyncMedium:function(o){for(n=!0;r.length;){var c=r;r=[],c.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var c=[];if(r.length){var l=r;r=[],l.forEach(o),c=r}var f=function(){var p=c;c=[],p.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(p){c.push(p),h()},filter:function(p){return c=c.filter(p),r}}}};return a}function e3(e){e===void 0&&(e={});var t=JT(null);return t.options=Rn({async:!0,ssr:!1},e),t}var NN=function(e){var t=e.sideCar,r=SN(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 v.createElement(n,Rn({},r))};NN.isSideCarExport=!0;function t3(e,t){return e.useMedium(t),NN}var EN=e3(),Xm=function(){},uh=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:Xm,onWheelCapture:Xm,onTouchMoveCapture:Xm}),a=n[0],o=n[1],c=e.forwardProps,l=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,g=e.shards,x=e.sideCar,b=e.noRelative,j=e.noIsolation,k=e.inert,S=e.allowPinchZoom,N=e.as,E=N===void 0?"div":N,O=e.gapMode,P=SN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=x,C=XT([r,t]),I=Rn(Rn({},P),a);return v.createElement(v.Fragment,null,p&&v.createElement(_,{sideCar:EN,removeScrollBar:h,shards:g,noRelative:b,noIsolation:j,inert:k,setCallbacks:o,allowPinchZoom:!!S,lockRef:r,gapMode:O}),c?v.cloneElement(v.Children.only(l),Rn(Rn({},I),{ref:C})):v.createElement(E,Rn({},I,{className:f,ref:C}),l))});uh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};uh.classNames={fullWidth:Xd,zeroRight:Yd};var r3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function n3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=r3();return t&&e.setAttribute("nonce",t),e}function i3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function a3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var o3=function(){var e=0,t=null;return{add:function(r){e==0&&(t=n3())&&(i3(t,r),a3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},s3=function(){var e=o3();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},AN=function(){var e=s3(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},l3={left:0,top:0,right:0,gap:0},Zm=function(e){return parseInt(e||"",10)||0},u3=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[Zm(r),Zm(n),Zm(a)]},c3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return l3;var t=u3(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])}},d3=AN(),gs="data-scroll-locked",f3=function(e,t,r,n){var a=e.left,o=e.top,c=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
||
.`.concat(VT,` {
|
||
overflow: hidden `).concat(n,`;
|
||
padding-right: `).concat(l,"px ").concat(n,`;
|
||
}
|
||
body[`).concat(gs,`] {
|
||
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(l,"px ").concat(n,`;
|
||
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(Yd,` {
|
||
right: `).concat(l,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(Xd,` {
|
||
margin-right: `).concat(l,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(Yd," .").concat(Yd,` {
|
||
right: 0 `).concat(n,`;
|
||
}
|
||
|
||
.`).concat(Xd," .").concat(Xd,` {
|
||
margin-right: 0 `).concat(n,`;
|
||
}
|
||
|
||
body[`).concat(gs,`] {
|
||
`).concat(qT,": ").concat(l,`px;
|
||
}
|
||
`)},bw=function(){var e=parseInt(document.body.getAttribute(gs)||"0",10);return isFinite(e)?e:0},h3=function(){v.useEffect(function(){return document.body.setAttribute(gs,(bw()+1).toString()),function(){var e=bw()-1;e<=0?document.body.removeAttribute(gs):document.body.setAttribute(gs,e.toString())}},[])},p3=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;h3();var o=v.useMemo(function(){return c3(a)},[a]);return v.createElement(d3,{styles:f3(o,!t,a,r?"":"!important")})},sv=!1;if(typeof window<"u")try{var Ad=Object.defineProperty({},"passive",{get:function(){return sv=!0,!0}});window.addEventListener("test",Ad,Ad),window.removeEventListener("test",Ad,Ad)}catch{sv=!1}var Jo=sv?{passive:!1}:!1,m3=function(e){return e.tagName==="TEXTAREA"},PN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!m3(e)&&r[t]==="visible")},g3=function(e){return PN(e,"overflowY")},v3=function(e){return PN(e,"overflowX")},ww=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=CN(e,n);if(a){var o=ON(e,n),c=o[1],l=o[2];if(c>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},y3=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},x3=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},CN=function(e,t){return e==="v"?g3(t):v3(t)},ON=function(e,t){return e==="v"?y3(t):x3(t)},b3=function(e,t){return e==="h"&&t==="rtl"?-1:1},w3=function(e,t,r,n,a){var o=b3(e,window.getComputedStyle(t).direction),c=o*n,l=r.target,f=t.contains(l),h=!1,p=c>0,g=0,x=0;do{if(!l)break;var b=ON(e,l),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&CN(e,l)&&(g+=N,x+=j);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(p&&Math.abs(g)<1||!p&&Math.abs(x)<1)&&(h=!0),h},Pd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kw=function(e){return[e.deltaX,e.deltaY]},jw=function(e){return e&&"current"in e?e.current:e},k3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},j3=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},S3=0,es=[];function N3(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),a=v.useState(S3++)[0],o=v.useState(AN)[0],c=v.useRef(e);v.useEffect(function(){c.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=GT([e.lockRef.current],(e.shards||[]).map(jw),!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 l=v.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,O="deltaX"in k?k.deltaX:E[0]-N[0],P="deltaY"in k?k.deltaY:E[1]-N[1],_,C=k.target,I=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in k&&I==="h"&&C.type==="range")return!1;var B=window.getSelection(),U=B&&B.anchorNode,G=U?U===C||U.contains(C):!1;if(G)return!1;var X=ww(I,C);if(!X)return!0;if(X?_=I:(_=I==="v"?"h":"v",X=ww(I,C)),!X)return!1;if(!n.current&&"changedTouches"in k&&(O||P)&&(n.current=_),!_)return!0;var $=n.current||_;return w3($,S,k,$==="h"?O:P)},[]),f=v.useCallback(function(k){var S=k;if(!(!es.length||es[es.length-1]!==o)){var N="deltaY"in S?kw(S):Pd(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&k3(_.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var O=(c.current.shards||[]).map(jw).filter(Boolean).filter(function(_){return _.contains(S.target)}),P=O.length>0?l(S,O[0]):!c.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),h=v.useCallback(function(k,S,N,E){var O={name:k,delta:S,target:N,should:E,shadowParent:E3(N)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),p=v.useCallback(function(k){r.current=Pd(k),n.current=void 0},[]),g=v.useCallback(function(k){h(k.type,kw(k),k.target,l(k,e.lockRef.current))},[]),x=v.useCallback(function(k){h(k.type,Pd(k),k.target,l(k,e.lockRef.current))},[]);v.useEffect(function(){return es.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:x}),document.addEventListener("wheel",f,Jo),document.addEventListener("touchmove",f,Jo),document.addEventListener("touchstart",p,Jo),function(){es=es.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,Jo),document.removeEventListener("touchmove",f,Jo),document.removeEventListener("touchstart",p,Jo)}},[]);var b=e.removeScrollBar,j=e.inert;return v.createElement(v.Fragment,null,j?v.createElement(o,{styles:j3(a)}):null,b?v.createElement(p3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function E3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const A3=t3(EN,N3);var _N=v.forwardRef(function(e,t){return v.createElement(uh,Rn({},e,{ref:t,sideCar:A3}))});_N.classNames=uh.classNames;var P3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ts=new WeakMap,Cd=new WeakMap,Od={},Jm=0,MN=function(e){return e&&(e.host||MN(e.parentNode))},C3=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=MN(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})},O3=function(e,t,r,n){var a=C3(t,Array.isArray(e)?e:[e]);Od[r]||(Od[r]=new WeakMap);var o=Od[r],c=[],l=new Set,f=new Set(a),h=function(g){!g||l.has(g)||(l.add(g),h(g.parentNode))};a.forEach(h);var p=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(x){if(l.has(x))p(x);else try{var b=x.getAttribute(n),j=b!==null&&b!=="false",k=(ts.get(x)||0)+1,S=(o.get(x)||0)+1;ts.set(x,k),o.set(x,S),c.push(x),k===1&&j&&Cd.set(x,!0),S===1&&x.setAttribute(r,"true"),j||x.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return p(t),l.clear(),Jm++,function(){c.forEach(function(g){var x=ts.get(g)-1,b=o.get(g)-1;ts.set(g,x),o.set(g,b),x||(Cd.has(g)||g.removeAttribute(n),Cd.delete(g)),b||g.removeAttribute(r)}),Jm--,Jm||(ts=new WeakMap,ts=new WeakMap,Cd=new WeakMap,Od={})}},_3=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=P3(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),O3(n,a,r,"aria-hidden")):function(){return null}},ch="Dialog",[IN]=aT(ch),[M3,kn]=IN(ch),TN=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:c=!0}=e,l=v.useRef(null),f=v.useRef(null),[h,p]=cT({prop:n,defaultProp:a??!1,onChange:o,caller:ch});return u.jsx(M3,{scope:t,triggerRef:l,contentRef:f,contentId:mi(),titleId:mi(),descriptionId:mi(),open:h,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(g=>!g),[p]),modal:c,children:r})};TN.displayName=ch;var DN="DialogTrigger",I3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=kn(DN,r),o=So(t,a.triggerRef);return u.jsx(Xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":xy(a.open),...n,ref:o,onClick:va(e.onClick,a.onOpenToggle)})});I3.displayName=DN;var yy="DialogPortal",[T3,RN]=IN(yy,{forceMount:void 0}),$N=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=kn(yy,t);return u.jsx(T3,{scope:t,forceMount:r,children:v.Children.map(n,c=>u.jsx(lh,{present:r||o.open,children:u.jsx(jN,{asChild:!0,container:a,children:c})}))})};$N.displayName=yy;var uf="DialogOverlay",LN=v.forwardRef((e,t)=>{const r=RN(uf,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=kn(uf,e.__scopeDialog);return o.modal?u.jsx(lh,{present:n||o.open,children:u.jsx(R3,{...a,ref:t})}):null});LN.displayName=uf;var D3=yN("DialogOverlay.RemoveScroll"),R3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=kn(uf,r),o=OT(),c=So(t,o);return u.jsx(_N,{as:D3,allowPinchZoom:!0,shards:[a.contentRef],children:u.jsx(Xt.div,{"data-state":xy(a.open),...n,ref:c,style:{pointerEvents:"auto",...n.style}})})}),$s="DialogContent",zN=v.forwardRef((e,t)=>{const r=RN($s,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=kn($s,e.__scopeDialog);return u.jsx(lh,{present:n||o.open,children:o.modal?u.jsx($3,{...a,ref:t}):u.jsx(L3,{...a,ref:t})})});zN.displayName=$s;var $3=v.forwardRef((e,t)=>{const r=kn($s,e.__scopeDialog),n=v.useRef(null),a=So(t,r.contentRef,n);return v.useEffect(()=>{const o=n.current;if(o)return _3(o)},[]),u.jsx(FN,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:va(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:va(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&o.preventDefault()}),onFocusOutside:va(e.onFocusOutside,o=>o.preventDefault())})}),L3=v.forwardRef((e,t)=>{const r=kn($s,e.__scopeDialog),n=v.useRef(!1),a=v.useRef(!1);return u.jsx(FN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),FN=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...c}=e,l=kn($s,r);return KT(),u.jsx(u.Fragment,{children:u.jsx(wN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:u.jsx(xN,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":xy(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})}),BN="DialogTitle",z3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=kn(BN,r);return u.jsx(Xt.h2,{id:a.titleId,...n,ref:t})});z3.displayName=BN;var UN="DialogDescription",F3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=kn(UN,r);return u.jsx(Xt.p,{id:a.descriptionId,...n,ref:t})});F3.displayName=UN;var WN="DialogClose",B3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=kn(WN,r);return u.jsx(Xt.button,{type:"button",...n,ref:t,onClick:va(e.onClick,()=>a.onOpenChange(!1))})});B3.displayName=WN;function xy(e){return e?"open":"closed"}var Xl='[cmdk-group=""]',eg='[cmdk-group-items=""]',U3='[cmdk-group-heading=""]',HN='[cmdk-item=""]',Sw=`${HN}:not([aria-disabled="true"])`,lv="cmdk-item-select",ds="data-value",W3=(e,t,r)=>iT(e,t,r),KN=v.createContext(void 0),Qu=()=>v.useContext(KN),GN=v.createContext(void 0),by=()=>v.useContext(GN),VN=v.createContext(void 0),qN=v.forwardRef((e,t)=>{let r=fs(()=>{var T,Z;return{search:"",value:(Z=(T=e.value)!=null?T:e.defaultValue)!=null?Z:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=fs(()=>new Set),a=fs(()=>new Map),o=fs(()=>new Map),c=fs(()=>new Set),l=QN(e),{label:f,children:h,value:p,onValueChange:g,filter:x,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,E=mi(),O=mi(),P=mi(),_=v.useRef(null),C=e4();po(()=>{if(p!==void 0){let T=p.trim();r.current.value=T,I.emit()}},[p]),po(()=>{C(6,fe)},[]);let I=v.useMemo(()=>({subscribe:T=>(c.current.add(T),()=>c.current.delete(T)),snapshot:()=>r.current,setState:(T,Z,oe)=>{var re,ue,me,Pe;if(!Object.is(r.current[T],Z)){if(r.current[T]=Z,T==="search")$(),G(),C(1,X);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let te=document.getElementById(P);te?te.focus():(re=document.getElementById(E))==null||re.focus()}if(C(7,()=>{var te;r.current.selectedItemId=(te=J())==null?void 0:te.id,I.emit()}),oe||C(5,fe),((ue=l.current)==null?void 0:ue.value)!==void 0){let te=Z??"";(Pe=(me=l.current).onValueChange)==null||Pe.call(me,te);return}}I.emit()}},emit:()=>{c.current.forEach(T=>T())}}),[]),B=v.useMemo(()=>({value:(T,Z,oe)=>{var re;Z!==((re=o.current.get(T))==null?void 0:re.value)&&(o.current.set(T,{value:Z,keywords:oe}),r.current.filtered.items.set(T,U(Z,oe)),C(2,()=>{G(),I.emit()}))},item:(T,Z)=>(n.current.add(T),Z&&(a.current.has(Z)?a.current.get(Z).add(T):a.current.set(Z,new Set([T]))),C(3,()=>{$(),G(),r.current.value||X(),I.emit()}),()=>{o.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let oe=J();C(4,()=>{$(),(oe==null?void 0:oe.getAttribute("id"))===T&&X(),I.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{o.current.delete(T),a.current.delete(T)}),filter:()=>l.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:E,inputId:P,labelId:O,listInnerRef:_}),[]);function U(T,Z){var oe,re;let ue=(re=(oe=l.current)==null?void 0:oe.filter)!=null?re:W3;return T?ue(T,r.current.search,Z):0}function G(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,Z=[];r.current.filtered.groups.forEach(re=>{let ue=a.current.get(re),me=0;ue.forEach(Pe=>{let te=T.get(Pe);me=Math.max(te,me)}),Z.push([re,me])});let oe=_.current;pe().sort((re,ue)=>{var me,Pe;let te=re.getAttribute("id"),ve=ue.getAttribute("id");return((me=T.get(ve))!=null?me:0)-((Pe=T.get(te))!=null?Pe:0)}).forEach(re=>{let ue=re.closest(eg);ue?ue.appendChild(re.parentElement===ue?re:re.closest(`${eg} > *`)):oe.appendChild(re.parentElement===oe?re:re.closest(`${eg} > *`))}),Z.sort((re,ue)=>ue[1]-re[1]).forEach(re=>{var ue;let me=(ue=_.current)==null?void 0:ue.querySelector(`${Xl}[${ds}="${encodeURIComponent(re[0])}"]`);me==null||me.parentElement.appendChild(me)})}function X(){let T=pe().find(oe=>oe.getAttribute("aria-disabled")!=="true"),Z=T==null?void 0:T.getAttribute(ds);I.setState("value",Z||void 0)}function $(){var T,Z,oe,re;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ue=0;for(let me of n.current){let Pe=(Z=(T=o.current.get(me))==null?void 0:T.value)!=null?Z:"",te=(re=(oe=o.current.get(me))==null?void 0:oe.keywords)!=null?re:[],ve=U(Pe,te);r.current.filtered.items.set(me,ve),ve>0&&ue++}for(let[me,Pe]of a.current)for(let te of Pe)if(r.current.filtered.items.get(te)>0){r.current.filtered.groups.add(me);break}r.current.filtered.count=ue}function fe(){var T,Z,oe;let re=J();re&&(((T=re.parentElement)==null?void 0:T.firstChild)===re&&((oe=(Z=re.closest(Xl))==null?void 0:Z.querySelector(U3))==null||oe.scrollIntoView({block:"nearest"})),re.scrollIntoView({block:"nearest"}))}function J(){var T;return(T=_.current)==null?void 0:T.querySelector(`${HN}[aria-selected="true"]`)}function pe(){var T;return Array.from(((T=_.current)==null?void 0:T.querySelectorAll(Sw))||[])}function be(T){let Z=pe()[T];Z&&I.setState("value",Z.getAttribute(ds))}function de(T){var Z;let oe=J(),re=pe(),ue=re.findIndex(Pe=>Pe===oe),me=re[ue+T];(Z=l.current)!=null&&Z.loop&&(me=ue+T<0?re[re.length-1]:ue+T===re.length?re[0]:re[ue+T]),me&&I.setState("value",me.getAttribute(ds))}function Y(T){let Z=J(),oe=Z==null?void 0:Z.closest(Xl),re;for(;oe&&!re;)oe=T>0?Z3(oe,Xl):J3(oe,Xl),re=oe==null?void 0:oe.querySelector(Sw);re?I.setState("value",re.getAttribute(ds)):de(T)}let V=()=>be(pe().length-1),Q=T=>{T.preventDefault(),T.metaKey?V():T.altKey?Y(1):de(1)},D=T=>{T.preventDefault(),T.metaKey?be(0):T.altKey?Y(-1):de(-1)};return v.createElement(Xt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:T=>{var Z;(Z=N.onKeyDown)==null||Z.call(N,T);let oe=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||oe))switch(T.key){case"n":case"j":{S&&T.ctrlKey&&Q(T);break}case"ArrowDown":{Q(T);break}case"p":case"k":{S&&T.ctrlKey&&D(T);break}case"ArrowUp":{D(T);break}case"Home":{T.preventDefault(),be(0);break}case"End":{T.preventDefault(),V();break}case"Enter":{T.preventDefault();let re=J();if(re){let ue=new Event(lv);re.dispatchEvent(ue)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:r4},f),dh(e,T=>v.createElement(GN.Provider,{value:I},v.createElement(KN.Provider,{value:B},T))))}),H3=v.forwardRef((e,t)=>{var r,n;let a=mi(),o=v.useRef(null),c=v.useContext(VN),l=Qu(),f=QN(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:c==null?void 0:c.forceMount;po(()=>{if(!h)return l.item(a,c==null?void 0:c.id)},[h]);let p=YN(a,o,[e.value,e.children,o],e.keywords),g=by(),x=ba(C=>C.value&&C.value===p.current),b=ba(C=>h||l.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);v.useEffect(()=>{let C=o.current;if(!(!C||e.disabled))return C.addEventListener(lv,j),()=>C.removeEventListener(lv,j)},[b,e.onSelect,e.disabled]);function j(){var C,I;k(),(I=(C=f.current).onSelect)==null||I.call(C,p.current)}function k(){g.setState("value",p.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:O,keywords:P,..._}=e;return v.createElement(Xt.div,{ref:Rs(o,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!x,"data-disabled":!!S,"data-selected":!!x,onPointerMove:S||l.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),K3=v.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...o}=e,c=mi(),l=v.useRef(null),f=v.useRef(null),h=mi(),p=Qu(),g=ba(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);po(()=>p.group(c),[]),YN(c,l,[e.value,e.heading,f]);let x=v.useMemo(()=>({id:c,forceMount:a}),[a]);return v.createElement(Xt.div,{ref:Rs(l,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&v.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),dh(e,b=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},v.createElement(VN.Provider,{value:x},b))))}),G3=v.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=v.useRef(null),o=ba(c=>!c.search);return!r&&!o?null:v.createElement(Xt.div,{ref:Rs(a,t),...n,"cmdk-separator":"",role:"separator"})}),V3=v.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,o=by(),c=ba(h=>h.search),l=ba(h=>h.selectedItemId),f=Qu();return v.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),v.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":l,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)}})}),q3=v.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,o=v.useRef(null),c=v.useRef(null),l=ba(h=>h.selectedItemId),f=Qu();return v.useEffect(()=>{if(c.current&&o.current){let h=c.current,p=o.current,g,x=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;p.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(h),()=>{cancelAnimationFrame(g),x.unobserve(h)}}},[]),v.createElement(Xt.div,{ref:Rs(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:f.listId},dh(e,h=>v.createElement("div",{ref:Rs(c,f.listInnerRef),"cmdk-list-sizer":""},h)))}),Q3=v.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:o,container:c,...l}=e;return v.createElement(TN,{open:r,onOpenChange:n},v.createElement($N,{container:c},v.createElement(LN,{"cmdk-overlay":"",className:a}),v.createElement(zN,{"aria-label":e.label,"cmdk-dialog":"",className:o},v.createElement(qN,{ref:t,...l}))))}),Y3=v.forwardRef((e,t)=>ba(r=>r.filtered.count===0)?v.createElement(Xt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),X3=v.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...o}=e;return v.createElement(Xt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},dh(e,c=>v.createElement("div",{"aria-hidden":!0},c)))}),rs=Object.assign(qN,{List:q3,Item:H3,Input:V3,Group:K3,Separator:G3,Dialog:Q3,Empty:Y3,Loading:X3});function Z3(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function J3(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function QN(e){let t=v.useRef(e);return po(()=>{t.current=e}),t}var po=typeof window>"u"?v.useEffect:v.useLayoutEffect;function fs(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function ba(e){let t=by(),r=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,r,r)}function YN(e,t,r,n=[]){let a=v.useRef(),o=Qu();return po(()=>{var c;let l=(()=>{var h;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(h=p.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());o.value(e,l,f),(c=t.current)==null||c.setAttribute(ds,l),a.current=l}),a}var e4=()=>{let[e,t]=v.useState(),r=fs(()=>new Map);return po(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function t4(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function dh({asChild:e,children:t},r){return e&&v.isValidElement(t)?v.cloneElement(t4(t),{ref:t.ref},r(t.props.children)):r(t)}var r4={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function n4({onNavigate:e}){const[t,r]=v.useState(!1);return v.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)},[]),u.jsx(rs.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>r(!1),children:u.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:[u.jsx(rs.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"}),u.jsxs(rs.List,{className:"max-h-80 overflow-y-auto p-2",children:[u.jsx(rs.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),u.jsx(rs.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:iv.map(n=>u.jsxs(rs.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:[u.jsx(n.icon,{className:"h-4 w-4 text-primary"}),u.jsx("span",{children:n.label}),u.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}async function Ce(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let p=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,p=!0),a&&!("hf_token"in h)&&(h.hf_token=a,p=!0),p&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const l=await fetch(e,{...t,headers:r,body:o});if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return l.json()}const kt={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"]},i4=(e=!0)=>sr({queryKey:kt.memoryGraph,queryFn:()=>Ce("/api/memory/graph"),enabled:e}),a4=()=>sr({queryKey:kt.health,queryFn:()=>Ce("/api/health"),refetchInterval:1e4}),fh=(e=5e3)=>sr({queryKey:kt.systemStatus,queryFn:()=>Ce("/api/system/status"),refetchInterval:e}),o4=(e=3e3)=>sr({queryKey:kt.services,queryFn:()=>Ce("/api/system/services"),refetchInterval:e}),No=(e=4e3)=>sr({queryKey:kt.models,queryFn:()=>Ce("/api/models"),refetchInterval:e}),s4=(e=4e3)=>sr({queryKey:kt.routing,queryFn:()=>Ce("/api/routing"),refetchInterval:e}),l4=(e=2e3)=>sr({queryKey:kt.jobs,queryFn:()=>Ce("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),wy=(e=3e3)=>sr({queryKey:kt.tokenStats,queryFn:()=>Ce("/api/system/token-stats"),refetchInterval:e}),ky=(e=5e3)=>sr({queryKey:kt.agentStatus,queryFn:()=>Ce("/api/agent/status"),refetchInterval:e}),u4=(e=6e4)=>sr({queryKey:kt.hermesBrain,queryFn:()=>Ce("/api/agent/brain"),refetchInterval:e}),jy=e=>sr({queryKey:kt.updates,queryFn:()=>Ce("/api/maintenance/updates"),refetchInterval:e}),c4=()=>sr({queryKey:kt.discover,queryFn:()=>Ce("/api/discover")}),d4=e=>sr({queryKey:kt.drafts(e),queryFn:()=>Ce(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),XN=e=>sr({queryKey:kt.connect(e),queryFn:()=>Ce(e?`/api/connect?${e}`:"/api/connect")}),f4=()=>sr({queryKey:kt.connectHealth,queryFn:()=>Ce("/api/connect/health"),refetchInterval:15e3}),uv=e=>sr({queryKey:kt.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),Ce(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function ns(e){return(e/1024**3).toFixed(1)}function cv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function qr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function h4(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function Nw(e){return e?`${Math.round(e/1024)}k`:"—"}function ZN(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=ZN(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=ZN(e))&&(n&&(n+=" "),n+=t);return n}const Sy="-",p4=e=>{const t=g4(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const l=c.split(Sy);return l[0]===""&&l.length!==1&&l.shift(),JN(l,t)||m4(c)},getConflictingClassGroupIds:(c,l)=>{const f=r[c]||[];return l&&n[c]?[...f,...n[c]]:f}}},JN=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?JN(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(Sy);return(c=t.validators.find(({validator:l})=>l(o)))==null?void 0:c.classGroupId},Ew=/^\[(.+)\]$/,m4=e=>{if(Ew.test(e)){const t=Ew.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},g4=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return y4(Object.entries(e.classGroups),r).forEach(([o,c])=>{dv(c,n,o,t)}),n},dv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:Aw(t,a);o.classGroupId=r;return}if(typeof a=="function"){if(v4(a)){dv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,c])=>{dv(c,Aw(t,o),r,n)})})},Aw=(e,t)=>{let r=e;return t.split(Sy).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},v4=e=>e.isThemeGetter,y4=(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,l])=>[t+c,l])):o);return[r,a]}):e,x4=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)}}},eE="!",b4=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],o=t.length,c=l=>{const f=[];let h=0,p=0,g;for(let S=0;S<l.length;S++){let N=l[S];if(h===0){if(N===a&&(n||l.slice(S,S+o)===t)){f.push(l.slice(p,S)),p=S+o;continue}if(N==="/"){g=S;continue}}N==="["?h++:N==="]"&&h--}const x=f.length===0?l:l.substring(p),b=x.startsWith(eE),j=b?x.substring(1):x,k=g&&g>p?g-p:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?l=>r({className:l,parseClassName:c}):c},w4=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},k4=e=>({cache:x4(e.cacheSize),parseClassName:b4(e),...p4(e)}),j4=/\s+/,S4=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,o=[],c=e.trim().split(j4);let l="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:p,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?x.substring(0,b):x);if(!k){if(!j){l=h+(l.length>0?" "+l:l);continue}if(k=n(x),!k){l=h+(l.length>0?" "+l:l);continue}j=!1}const S=w4(p).join(":"),N=g?S+eE:S,E=N+k;if(o.includes(E))continue;o.push(E);const O=a(k,j);for(let P=0;P<O.length;++P){const _=O[P];o.push(N+_)}l=h+(l.length>0?" "+l:l)}return l};function N4(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=tE(t))&&(n&&(n+=" "),n+=r);return n}const tE=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=tE(e[n]))&&(r&&(r+=" "),r+=t);return r};function E4(e,...t){let r,n,a,o=c;function c(f){const h=t.reduce((p,g)=>g(p),e());return r=k4(h),n=r.cache.get,a=r.cache.set,o=l,l(f)}function l(f){const h=n(f);if(h)return h;const p=S4(f,r);return a(f,p),p}return function(){return o(N4.apply(null,arguments))}}const ot=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},rE=/^\[(?:([a-z-]+):)?(.+)\]$/i,A4=/^\d+\/\d+$/,P4=new Set(["px","full","screen"]),C4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O4=/\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$/,_4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,M4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,I4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ai=e=>vs(e)||P4.has(e)||A4.test(e),Ji=e=>qs(e,"length",B4),vs=e=>!!e&&!Number.isNaN(Number(e)),tg=e=>qs(e,"number",vs),Zl=e=>!!e&&Number.isInteger(Number(e)),T4=e=>e.endsWith("%")&&vs(e.slice(0,-1)),Le=e=>rE.test(e),ea=e=>C4.test(e),D4=new Set(["length","size","percentage"]),R4=e=>qs(e,D4,nE),$4=e=>qs(e,"position",nE),L4=new Set(["image","url"]),z4=e=>qs(e,L4,W4),F4=e=>qs(e,"",U4),Jl=()=>!0,qs=(e,t,r)=>{const n=rE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},B4=e=>O4.test(e)&&!_4.test(e),nE=()=>!1,U4=e=>M4.test(e),W4=e=>I4.test(e),H4=()=>{const e=ot("colors"),t=ot("spacing"),r=ot("blur"),n=ot("brightness"),a=ot("borderColor"),o=ot("borderRadius"),c=ot("borderSpacing"),l=ot("borderWidth"),f=ot("contrast"),h=ot("grayscale"),p=ot("hueRotate"),g=ot("invert"),x=ot("gap"),b=ot("gradientColorStops"),j=ot("gradientColorStopPositions"),k=ot("inset"),S=ot("margin"),N=ot("opacity"),E=ot("padding"),O=ot("saturate"),P=ot("scale"),_=ot("sepia"),C=ot("skew"),I=ot("space"),B=ot("translate"),U=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",Le,t],$=()=>[Le,t],fe=()=>["",ai,Ji],J=()=>["auto",vs,Le],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],be=()=>["solid","dashed","dotted","double","none"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Le],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[vs,Le];return{cacheSize:500,separator:":",theme:{colors:[Jl],spacing:[ai,Ji],blur:["none","",ea,Le],brightness:D(),borderColor:[e],borderRadius:["none","","full",ea,Le],borderSpacing:$(),borderWidth:fe(),contrast:D(),grayscale:V(),hueRotate:D(),invert:V(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[T4,Ji],inset:X(),margin:X(),opacity:D(),padding:$(),saturate:D(),scale:D(),sepia:V(),skew:D(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[ea]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...pe(),Le]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],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",Zl,Le]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",Zl,Le]}],"grid-cols":[{"grid-cols":[Jl]}],"col-start-end":[{col:["auto",{span:["full",Zl,Le]},Le]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Jl]}],"row-start-end":[{row:["auto",{span:[Zl,Le]},Le]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"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":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Le,t]}],"min-w":[{"min-w":[Le,t,"min","max","fit"]}],"max-w":[{"max-w":[Le,t,"none","full","min","max","fit","prose",{screen:[ea]},ea]}],h:[{h:[Le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ea,Ji]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tg]}],"font-family":[{font:[Jl]}],"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",Le]}],"line-clamp":[{"line-clamp":["none",vs,tg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ai,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"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:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ai,Ji]}],"underline-offset":[{"underline-offset":["auto",ai,Le]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],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",Le]}],"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:[...pe(),$4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",R4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},z4]}],"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:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...be(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:be()}],"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:["",...be()]}],"outline-offset":[{"outline-offset":[ai,Le]}],"outline-w":[{outline:[ai,Ji]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ai,Ji]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ea,F4]}],"shadow-color":[{shadow:[Jl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...de(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":de()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",ea,Le]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[O]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"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",Le]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Zl,Le]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],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",Le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",Le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ai,Ji,tg]}],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"]}}},K4=E4(H4);function ce(...e){return K4(nt(e))}function Ls(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const iE=["fast","heavy","coder","vision","scout"],G4={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},Ny=e=>e&&G4[e]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function V4({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 u.jsxs("span",{className:ce("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 Pw(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 q4(){const{data:e}=No(2e3),{data:t}=wy(2e3),r=(e==null?void 0:e.models)??[],n=(e==null?void 0:e.running)??[],a=r.filter(f=>n.includes(f.name)),o=v.useRef(null),[c,l]=v.useState(!1);return v.useEffect(()=>{if(!t)return;const f=t.total_tokens;if(o.current!==null&&f>o.current){l(!0);const h=setTimeout(()=>l(!1),4e3);return o.current=f,()=>clearTimeout(h)}o.current=f},[t==null?void 0:t.total_tokens]),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ku,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),u.jsxs("span",{className:ce("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",c?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[c?u.jsx(uo,{className:"h-3 w-3 animate-pulse"}):u.jsx(zI,{className:"h-3 w-3"}),c?"Inferenz aktiv":"Idle"]})]}),a.length===0?u.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):u.jsx("div",{className:"grid gap-2",children:a.map(f=>{var h;return u.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[f.role&&u.jsx("span",{className:ce("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Ny(f.role)),children:f.role}),u.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(h=f.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")})]}),u.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[qr(f.size_bytes)," im Unified-RAM"]})]}),u.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[u.jsx("span",{className:ce("h-1.5 w-1.5 rounded-full bg-emerald-500",c&&"animate-pulse")})," warm"]})]},f.name)})})]})}let fv=[],hv=[];const pv=new Set,aE=()=>pv.forEach(e=>e());function oE(e){return pv.add(e),()=>{pv.delete(e)}}function Q4(e){fv=[...fv,e].slice(-40),aE()}function Y4(e){hv=[...hv,e].slice(-40),aE()}const X4=()=>v.useSyncExternalStore(oE,()=>fv),Z4=()=>v.useSyncExternalStore(oE,()=>hv);function J4(){const{data:e,dataUpdatedAt:t}=fh(3e3),{data:r,dataUpdatedAt:n}=wy(3e3),a=v.useRef(null);v.useEffect(()=>{var o,c,l,f;e&&Q4({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((c=e.ram)==null?void 0:c.percent)??0,gpu:((l=e.gpu)==null?void 0:l.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),v.useEffect(()=>{if(!r)return;const o=Date.now(),c=r.prompt_tokens,l=r.completion_tokens;if(a.current){const f=Math.max((o-a.current.t)/1e3,.001);Y4({t:o,prompt:Math.max(0,(c-a.current.p)/f),completion:Math.max(0,(l-a.current.c)/f)})}a.current={p:c,c:l,t:o}},[n])}function eD(){const{data:e,error:t}=fh(3e3),r=X4();return{sys:e,hist:r,error:t}}var tD=["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 Ey(e){if(typeof e!="string")return!1;var t=tD;return t.includes(e)}var rD=["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"],nD=new Set(rD);function sE(e){return typeof e!="string"?!1:nD.has(e)}function lE(e){return typeof e=="string"&&e.startsWith("data-")}function bn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(sE(r)||lE(r))&&(t[r]=e[r]);return t}function hh(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return bn(t)}return typeof e=="object"&&!Array.isArray(e)?bn(e):null}function en(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(sE(r)||lE(r)||Ey(r))&&(t[r]=e[r]);return t}function iD(e){return e==null?null:v.isValidElement(e)?en(e.props):typeof e=="object"&&!Array.isArray(e)?en(e):null}var aD=["children","width","height","viewBox","className","style","title","desc"];function mv(){return mv=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},mv.apply(null,arguments)}function oD(e,t){if(e==null)return{};var r,n,a=sD(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 sD(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 uE=v.forwardRef((e,t)=>{var r=e.children,n=e.width,a=e.height,o=e.viewBox,c=e.className,l=e.style,f=e.title,h=e.desc,p=oD(e,aD),g=o||{width:n,height:a,x:0,y:0},x=nt("recharts-surface",c);return v.createElement("svg",mv({},en(p),{className:x,width:n,height:a,style:l,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),v.createElement("title",null,f),v.createElement("desc",null,h),r)}),lD=["children","className"];function gv(){return gv=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},gv.apply(null,arguments)}function uD(e,t){if(e==null)return{};var r,n,a=cD(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 cD(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 tn=v.forwardRef((e,t)=>{var r=e.children,n=e.className,a=uD(e,lD),o=nt("recharts-layer",n);return v.createElement("g",gv({className:o},en(a),{ref:t}),r)}),dD=v.createContext(null);function gt(e){return function(){return e}}const vv=Math.PI,yv=2*vv,Ka=1e-6,fD=yv-Ka;function cE(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function hD(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return cE;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 pD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?cE:hD(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,l=this._y1,f=n-t,h=a-r,p=c-t,g=l-r,x=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(x>Ka)if(!(Math.abs(g*f-h*p)>Ka)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-c,j=a-l,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),E=Math.sqrt(x),O=o*Math.tan((vv-Math.acos((k+x-S)/(2*N*E)))/2),P=O/E,_=O/N;Math.abs(P-1)>Ka&&this._append`L${t+P*p},${r+P*g}`,this._append`A${o},${o},0,0,${+(g*b>p*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 l=n*Math.cos(a),f=n*Math.sin(a),h=t+l,p=r+f,g=1^c,x=c?a-o:o-a;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Ka||Math.abs(this._y1-p)>Ka)&&this._append`L${h},${p}`,n&&(x<0&&(x=x%yv+yv),x>fD?this._append`A${n},${n},0,1,${g},${t-l},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=p}`:x>Ka&&this._append`A${n},${n},0,${+(x>=vv)},${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 dE(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 pD(t)}function Ay(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fE(e){this._context=e}fE.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 ph(e){return new fE(e)}function hE(e){return e[0]}function pE(e){return e[1]}function mE(e,t){var r=gt(!0),n=null,a=ph,o=null,c=dE(l);e=typeof e=="function"?e:e===void 0?hE:gt(e),t=typeof t=="function"?t:t===void 0?pE:gt(t);function l(f){var h,p=(f=Ay(f)).length,g,x=!1,b;for(n==null&&(o=a(b=c())),h=0;h<=p;++h)!(h<p&&r(g=f[h],h,f))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+e(g,h,f),+t(g,h,f));if(b)return o=null,b+""||null}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:gt(+f),l):e},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:gt(+f),l):t},l.defined=function(f){return arguments.length?(r=typeof f=="function"?f:gt(!!f),l):r},l.curve=function(f){return arguments.length?(a=f,n!=null&&(o=a(n)),l):a},l.context=function(f){return arguments.length?(f==null?n=o=null:o=a(n=f),l):n},l}function _d(e,t,r){var n=null,a=gt(!0),o=null,c=ph,l=null,f=dE(h);e=typeof e=="function"?e:e===void 0?hE:gt(+e),t=typeof t=="function"?t:gt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?pE:gt(+r);function h(g){var x,b,j,k=(g=Ay(g)).length,S,N=!1,E,O=new Array(k),P=new Array(k);for(o==null&&(l=c(E=f())),x=0;x<=k;++x){if(!(x<k&&a(S=g[x],x,g))===N)if(N=!N)b=x,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),j=x-1;j>=b;--j)l.point(O[j],P[j]);l.lineEnd(),l.areaEnd()}N&&(O[x]=+e(S,x,g),P[x]=+t(S,x,g),l.point(n?+n(S,x,g):O[x],r?+r(S,x,g):P[x]))}if(E)return l=null,E+""||null}function p(){return mE().defined(a).curve(c).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:gt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:gt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:gt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:gt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:gt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:gt(+g),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(g){return arguments.length?(a=typeof g=="function"?g:gt(!!g),h):a},h.curve=function(g){return arguments.length?(c=g,o!=null&&(l=c(o)),h):c},h.context=function(g){return arguments.length?(g==null?o=l=null:l=c(o=g),h):o},h}class gE{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 mD(e){return new gE(e,!0)}function gD(e){return new gE(e,!1)}function cf(){}function df(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 vE(e){this._context=e}vE.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:df(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:df(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vD(e){return new vE(e)}function yE(e){this._context=e}yE.prototype={areaStart:cf,areaEnd:cf,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:df(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yD(e){return new yE(e)}function xE(e){this._context=e}xE.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:df(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xD(e){return new xE(e)}function bE(e){this._context=e}bE.prototype={areaStart:cf,areaEnd:cf,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 bD(e){return new bE(e)}function Cw(e){return e<0?-1:1}function Ow(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),l=(o*a+c*n)/(n+a);return(Cw(o)+Cw(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(l))||0}function _w(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function rg(e,t,r){var n=e._x0,a=e._y0,o=e._x1,c=e._y1,l=(o-n)/3;e._context.bezierCurveTo(n+l,a+l*t,o-l,c-l*r,o,c)}function ff(e){this._context=e}ff.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:rg(this,this._t0,_w(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,rg(this,_w(this,r=Ow(this,e,t)),r);break;default:rg(this,this._t0,r=Ow(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(ff.prototype)).point=function(e,t){ff.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 wD(e){return new ff(e)}function kD(e){return new wE(e)}function jE(e){this._context=e}jE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Mw(e),a=Mw(t),o=0,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 Mw(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 jD(e){return new jE(e)}function mh(e,t){this._context=e,this._t=t}mh.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 SD(e){return new mh(e,.5)}function ND(e){return new mh(e,0)}function ED(e){return new mh(e,1)}function mo(e,t){if((c=e.length)>1)for(var r=1,n,a,o=e[t[0]],c,l=o.length;r<c;++r)for(a=o,o=e[t[r]],n=0;n<l;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function xv(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function AD(e,t){return e[t]}function PD(e){const t=[];return t.key=e,t}function CD(){var e=gt([]),t=xv,r=mo,n=AD;function a(o){var c=Array.from(e.apply(this,arguments),PD),l,f=c.length,h=-1,p;for(const g of o)for(l=0,++h;l<f;++l)(c[l][h]=[0,+n(g,c[l].key,h,o)]).data=g;for(l=0,p=Ay(t(c));l<f;++l)c[p[l]].index=l;return r(c,p),c}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:gt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:gt(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?xv:typeof o=="function"?o:gt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??mo,a):r},a}function OD(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}mo(e,t)}}function _D(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,l=0;c<a;++c)l+=e[c][r][1]||0;n[r][1]+=n[r][0]=-l/2}mo(e,t)}}function MD(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 l=0,f=0,h=0;l<c;++l){for(var p=e[t[l]],g=p[n][1]||0,x=p[n-1][1]||0,b=(g-x)/2,j=0;j<l;++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,mo(e,t)}}function bv(e){return e==="__proto__"}function SE(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Py(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 NE(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(NE).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Cy(e){if(Array.isArray(e))return e.map(Py);if(typeof e=="symbol")return[e];e=NE(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 l=e[n];if(o)l==="\\"&&n+1<r?(n++,a+=e[n]):l===o?o="":a+=l;else if(c)l==='"'||l==="'"?o=l:l==="]"?(c=!1,t.push(a),a=""):a+=l;else if(l==="[")c=!0,a&&(t.push(a),a="");else if(l==="."){a&&(t.push(a),a="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else a+=l;n++}return a&&t.push(a),t}function Eo(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(bv(t))return r;const n=e[t];return n===void 0?SE(t)&&!Object.hasOwn(e,t)?Eo(e,Cy(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=Py(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return ID(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),bv(t))return r;const n=e[t];return n===void 0?r:n}}}function ID(e,t,r){if(t.length===0)return r;let n=e;for(let a=0;a<t.length;a++){if(n==null||bv(t[a]))return r;n=n[t[a]]}return n===void 0?r:n}var TD=4;function ma(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:TD,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 l=r[c-1];return typeof l=="string"?a+l+o:l!==void 0?a+ma(l)+o:a+o},"")}var Xr=e=>e===0?0:e>0?1:-1,Un=e=>typeof e=="number"&&e!=+e,go=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!Un(e),Wn=e=>Ne(e)||typeof e=="string",DD=0,Au=e=>{var t=++DD;return"".concat(e||"").concat(t)},wa=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return n;var o;if(go(t)){if(r==null)return n;var c=t.indexOf("%");o=r*parseFloat(t.slice(0,c))/100}else o=+t;return Un(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},EE=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 di(e,t,r){return Ne(e)&&Ne(t)?ma(e+r*(t-e)):t}function AE(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Eo(n,t))===r)}var Yt=e=>e===null||typeof e>"u",Oy=e=>Yt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Nr(e){return e!=null}function Qs(){}var PE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,_y=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{Ey(a)&&typeof r[a]=="function"&&(n[a]=(o=>r[a](r,o)))}),n},RD=(e,t,r)=>n=>(e(t,r,n),null),$D=(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];Ey(a)&&typeof o=="function"&&(n||(n={}),n[a]=RD(o,t,r))}),n};function Iw(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 LD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iw(Object(r),!0).forEach(function(n){zD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zD(e,t,r){return(t=FD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FD(e){var t=BD(e,"string");return typeof t=="symbol"?t:t+""}function BD(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 nn(e,t){var r=LD({},e),n=t,a=Object.keys(t),o=a.reduce((c,l)=>(c[l]===void 0&&n[l]!==void 0&&(c[l]=n[l]),c),r);return o}function UD(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 WD(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function CE(e){return e}function HD(e){return function(t){return Eo(t,e)}}function wv(e){return e==null||typeof e!="object"&&typeof e!="function"}function KD(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function GD(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function My(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const VD="[object RegExp]",OE="[object String]",_E="[object Number]",ME="[object Boolean]",IE="[object Arguments]",qD="[object Symbol]",QD="[object Date]",YD="[object Map]",XD="[object Set]",ZD="[object Array]",JD="[object ArrayBuffer]",eR="[object Object]",tR="[object DataView]",rR="[object Uint8Array]",nR="[object Uint8ClampedArray]",iR="[object Uint16Array]",aR="[object Uint32Array]",oR="[object Int8Array]",sR="[object Int16Array]",lR="[object Int32Array]",uR="[object Float32Array]",cR="[object Float64Array]",Tw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function dR(e){return typeof Tw.Buffer<"u"&&Tw.Buffer.isBuffer(e)}function fR(e,t){return Qa(e,void 0,e,new Map,t)}function Qa(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(wv(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 l=0;l<e.length;l++)c[l]=Qa(e[l],l,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[l,f]of e)c.set(l,Qa(f,l,r,n,a));return c}if(e instanceof Set){const c=new Set;n.set(e,c);for(const l of e)c.add(Qa(l,void 0,r,n,a));return c}if(dR(e))return e.subarray();if(KD(e)){const c=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,c);for(let l=0;l<e.length;l++)c[l]=Qa(e[l],l,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),mn(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),mn(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),mn(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,mn(c,e,r,n,a),c}if(e instanceof Boolean){const c=new Boolean(e.valueOf());return n.set(e,c),mn(c,e,r,n,a),c}if(e instanceof Number){const c=new Number(e.valueOf());return n.set(e,c),mn(c,e,r,n,a),c}if(e instanceof String){const c=new String(e.valueOf());return n.set(e,c),mn(c,e,r,n,a),c}if(typeof e=="object"&&hR(e)){const c=Object.create(Object.getPrototypeOf(e));return n.set(e,c),mn(c,e,r,n,a),c}return e}function mn(e,t,r=e,n,a){const o=[...Object.keys(t),...GD(t)];for(let c=0;c<o.length;c++){const l=o[c],f=Object.getOwnPropertyDescriptor(e,l);(f==null||f.writable)&&(e[l]=Qa(t[l],l,r,n,a))}}function hR(e){switch(My(e)){case IE:case ZD:case JD:case tR:case ME:case QD:case uR:case cR:case oR:case sR:case lR:case YD:case _E:case eR:case VD:case XD:case OE:case qD:case rR:case nR:case iR:case aR:return!0;default:return!1}}function pR(e){return Qa(e,void 0,e,new Map,void 0)}function Zd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function TE(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function DE(e,t,r){return typeof r!="function"?DE(e,t,()=>{}):kv(e,t,function n(a,o,c,l,f,h){const p=r(a,o,c,l,f,h);return p!==void 0?!!p:kv(a,o,n,h,!1)},new Map,!0)}function kv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return mR(e,t,r,n);case"function":return Object.keys(t).length>0?kv(e,{...t},r,n,a):Zd(e,t);default:return TE(e)&&a?typeof t=="string"?t==="":!0:Zd(e,t)}}function mR(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return RE(e,t,r,n);if(t instanceof Map)return gR(e,t,r,n);if(t instanceof Set)return vR(e,t,r,n);const a=Object.keys(t);if(e==null||wv(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(!wv(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 gR(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 RE(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 l=!1;for(let f=0;f<e.length;f++){if(a.has(f))continue;const h=e[f];let p=!1;if(r(h,c,o,e,t,n)&&(p=!0),p){a.add(f),l=!0;break}}if(!l)return!1}return!0}function vR(e,t,r,n){return t.size===0?!0:e instanceof Set?RE([...e],[...t],r,n):!1}function $E(e,t){return DE(e,t,()=>{})}function yR(e){return e=pR(e),t=>$E(t,e)}function xR(e,t){return fR(e,(r,n,a,o)=>{if(typeof e=="object"){if(My(e)==="[object Object]"&&typeof e.constructor!="function"){const c={};return o.set(e,c),mn(c,e,a,o),c}switch(Object.prototype.toString.call(e)){case _E:case OE:case ME:{const c=new e.constructor(e==null?void 0:e.valueOf());return mn(c,e),c}case IE:{const c={};return mn(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function bR(e){return xR(e)}const wR=/^(?:0|[1-9]\d*)$/;function LE(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 wR.test(e)}}function kR(e){return e!==null&&typeof e=="object"&&My(e)==="[object Arguments]"}function jR(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&SE(t)&&(e==null?void 0:e[t])==null?r=Cy(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)||kR(n))&&LE(o)&&o<n.length))return!1;n=n[o]}return!0}function SR(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=Py(e);break}return t=bR(t),function(r){const n=Eo(r,e);return n===void 0?jR(r,e):t===void 0?n===void 0:$E(n,t)}}function NR(e){if(e==null)return CE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?SR(e[0],e[1]):yR(e);case"string":case"symbol":case"number":return HD(e)}}function ER(e){return Number.isSafeInteger(e)&&e>=0}function zE(e){return e!=null&&typeof e!="function"&&ER(e.length)}function AR(e){return typeof e=="object"&&e!==null}function PR(e){return AR(e)&&zE(e)}function Dw(e,t=CE){return PR(e)?UD(Array.from(e),WD(NR(t),1)):[]}function CR(e,t,r){return t===!0?Dw(e,r):typeof t=="function"?Dw(e,t):e}var ng={exports:{}},ig={},ag={exports:{}},og={};/**
|
||
* @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 Rw;function OR(){if(Rw)return og;Rw=1;var e=Vs();function t(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function l(g,x){var b=x(),j=n({inst:{value:b,getSnapshot:x}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=x,f(k)&&S({inst:k})},[g,b,x]),a(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),c(b),b}function f(g){var x=g.getSnapshot;g=g.value;try{var b=x();return!r(g,b)}catch{return!0}}function h(g,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return og.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,og}var $w;function _R(){return $w||($w=1,ag.exports=OR()),ag.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 Lw;function MR(){if(Lw)return ig;Lw=1;var e=Vs(),t=_R();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,c=e.useEffect,l=e.useMemo,f=e.useDebugValue;return ig.useSyncExternalStoreWithSelector=function(h,p,g,x,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=l(function(){function N(C){if(!E){if(E=!0,O=C,C=x(C),b!==void 0&&k.hasValue){var I=k.value;if(b(I,C))return P=I}return P=C}if(I=P,n(O,C))return I;var B=x(C);return b!==void 0&&b(I,B)?(O=C,I):(O=C,P=B)}var E=!1,O,P,_=g===void 0?null:g;return[function(){return N(p())},_===null?void 0:function(){return N(_())}]},[p,g,x,b]);var S=a(h,j[0],j[1]);return c(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},ig}var zw;function IR(){return zw||(zw=1,ng.exports=MR()),ng.exports}var TR=IR(),Iy=v.createContext(null),DR=e=>e,Et=()=>{var e=v.useContext(Iy);return e?e.store.dispatch:DR},Jd=()=>{},RR=()=>Jd,$R=(e,t)=>e===t;function Me(e){var t=v.useContext(Iy),r=v.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Jd,[t,e]);return TR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:RR,t?t.store.getState:Jd,t?t.store.getState:Jd,r,$R)}function LR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function zR(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 Fw=e=>Array.isArray(e)?e:[e];function FR(e){const t=Array.isArray(e[0])?e[0]:e;return zR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function BR(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var UR=class{constructor(e){this.value=e}deref(){return this.value}},WR=()=>typeof WeakRef>"u"?UR:WeakRef,FE=WR(),HR=0,Bw=1;function Md(){return{s:HR,v:void 0,o:null,p:null}}function KR(e){return e instanceof FE?e.deref():e}function BE(e,t={}){let r=Md();const{resultEqualityCheck:n}=t;let a,o=0;function c(){let l=r;const{length:f}=arguments;for(let g=0,x=f;g<x;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let j=l.o;j===null&&(l.o=j=new WeakMap);const k=j.get(b);k===void 0?(l=Md(),j.set(b,l)):l=k}else{let j=l.p;j===null&&(l.p=j=new Map);const k=j.get(b);k===void 0?(l=Md(),j.set(b,l)):l=k}}const h=l;let p;if(l.s===Bw)p=l.v;else if(p=e.apply(null,arguments),o++,n){const g=KR(a);g!=null&&n(g,p)&&(p=g,o!==0&&o--),a=typeof p=="object"&&p!==null||typeof p=="function"?new FE(p):p}return h.s=Bw,h.v=p,p}return c.clearCache=()=>{r=Md(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function GR(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,c=0,l,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),LR(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:g,memoizeOptions:x=[],argsMemoize:b=BE,argsMemoizeOptions:j=[]}=p,k=Fw(x),S=Fw(j),N=FR(a),E=g(function(){return o++,h.apply(null,arguments)},...k),O=b(function(){c++;const _=BR(N,arguments);return l=E.apply(null,_),l},...S);return Object.assign(O,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>l,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var K=GR(BE);function VR(e,t=1){const r=[],n=Math.floor(t),a=(o,c)=>{for(let l=0;l<o.length;l++){const f=o[l];Array.isArray(f)&&c<n?a(f,c+1):r.push(f)}};return a(e,0),r}function jv(e,t,r){return TE(r)&&(typeof t=="number"&&zE(r)&&LE(t)&&t<r.length||typeof t=="string"&&t in r)?Zd(r[t],e):!1}function Uw(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const qR=(e,t,r)=>{if(e!==t){const n=Uw(e),a=Uw(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 UE(e){return typeof e=="symbol"||e instanceof Symbol}const QR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,YR=/^\w*$/;function XR(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||UE(e)?!0:typeof e=="string"&&(YR.test(e)||!QR.test(e))||t!=null}function ZR(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(l=>String(l));const a=(l,f)=>{let h=l;for(let p=0;p<f.length&&h!=null;++p)h=h[f[p]];return h},o=(l,f)=>f==null||l==null?f:typeof l=="object"&&"key"in l?Object.hasOwn(f,l.key)?f[l.key]:a(f,l.path):typeof l=="function"?l(f):Array.isArray(l)?a(f,l):typeof f=="object"?f[l]:f,c=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||XR(l)?l:{key:l,path:Cy(l)}));return e.map(l=>({original:l,criteria:c.map(f=>o(f,l))})).slice().sort((l,f)=>{for(let h=0;h<c.length;h++){const p=qR(l.criteria[h],f.criteria[h],r[h]);if(p!==0)return p}return 0}).map(l=>l.original)}function gh(e,...t){const r=t.length;return r>1&&jv(e,t[0],t[1])?t=[]:r>2&&jv(t[0],t[1],t[2])&&(t=[t[0]]),ZR(e,VR(t),["asc"])}var WE=e=>e.legend.settings,JR=e=>e.legend.size,e$=e=>e.legend.payload;K([e$,WE],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?gh(n,r):n});function t$(e,t){return a$(e)||i$(e,t)||n$(e,t)||r$()}function r$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n$(e,t){if(e){if(typeof e=="string")return Ww(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)?Ww(e,t):void 0}}function Ww(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 i$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function a$(e){if(Array.isArray(e))return e}var Id=1;function Hw(e,t){return Math.abs(e.height-t.height)>Id||Math.abs(e.left-t.left)>Id||Math.abs(e.top-t.top)>Id||Math.abs(e.width-t.width)>Id}function Kw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function o$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=v.useState({height:0,left:0,top:0,width:0}),r=t$(t,2),n=r[0],a=r[1],o=v.useRef(null),c=v.useRef(n);c.current=n;var l=v.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Kw(f);if(Hw(h,c.current)&&a(h),typeof ResizeObserver<"u"){var p=new ResizeObserver(()=>{var g=Kw(f);Hw(g,c.current)&&a(g)});p.observe(f),o.current=p}}},[...e]);return v.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,l]}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 s$=typeof Symbol=="function"&&Symbol.observable||"@@observable",Gw=s$,sg=()=>Math.random().toString(36).substring(7).split("").join("."),l$={INIT:`@@redux/INIT${sg()}`,REPLACE:`@@redux/REPLACE${sg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${sg()}`},hf=l$;function Ty(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 HE(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(HE)(e,t)}let n=e,a=t,o=new Map,c=o,l=0,f=!1;function h(){c===o&&(c=new Map,o.forEach((S,N)=>{c.set(N,S)}))}function p(){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=l++;return c.set(E,S),function(){if(N){if(f)throw new Error(Kt(6));N=!1,h(),c.delete(E),o=null}}}function x(S){if(!Ty(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,x({type:hf.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(p())}return E(),{unsubscribe:S(E)}},[Gw](){return this}}}return x({type:hf.INIT}),{dispatch:x,subscribe:g,getState:p,replaceReducer:b,[Gw]:j}}function u$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:hf.INIT})>"u")throw new Error(Kt(12));if(typeof r(void 0,{type:hf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Kt(13))})}function KE(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{u$(r)}catch(o){a=o}return function(c={},l){if(a)throw a;let f=!1;const h={};for(let p=0;p<n.length;p++){const g=n[p],x=r[g],b=c[g],j=x(b,l);if(typeof j>"u")throw l&&l.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 pf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function c$(...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)},l=e.map(f=>f(c));return o=pf(...l)(a.dispatch),{...a,dispatch:o}}}function GE(e){return Ty(e)&&"type"in e&&typeof e.type=="string"}var VE=Symbol.for("immer-nothing"),Vw=Symbol.for("immer-draftable"),mr=Symbol.for("immer-state");function vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rr=Object,zs=Rr.getPrototypeOf,mf="constructor",vh="prototype",Sv="configurable",gf="enumerable",ef="writable",Pu="value",xi=e=>!!e&&!!e[mr];function wn(e){var t;return e?qE(e)||xh(e)||!!e[Vw]||!!((t=e[mf])!=null&&t[Vw])||bh(e)||wh(e):!1}var d$=Rr[vh][mf].toString(),qw=new WeakMap;function qE(e){if(!e||!Dy(e))return!1;const t=zs(e);if(t===null||t===Rr[vh])return!0;const r=Rr.hasOwnProperty.call(t,mf)&&t[mf];if(r===Object)return!0;if(!hs(r))return!1;let n=qw.get(r);return n===void 0&&(n=Function.toString.call(r),qw.set(r,n)),n===d$}function yh(e,t,r=!0){Yu(e)===0?(r?Reflect.ownKeys(e):Rr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Yu(e){const t=e[mr];return t?t.type_:xh(e)?1:bh(e)?2:wh(e)?3:0}var Qw=(e,t,r=Yu(e))=>r===2?e.has(t):Rr[vh].hasOwnProperty.call(e,t),Nv=(e,t,r=Yu(e))=>r===2?e.get(t):e[t],vf=(e,t,r,n=Yu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function f$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var xh=Array.isArray,bh=e=>e instanceof Map,wh=e=>e instanceof Set,Dy=e=>typeof e=="object",hs=e=>typeof e=="function",lg=e=>typeof e=="boolean";function h$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var si=e=>e.copy_||e.base_,Ry=e=>e.modified_?e.copy_:e.base_;function Ev(e,t){if(bh(e))return new Map(e);if(wh(e))return new Set(e);if(xh(e))return Array[vh].slice.call(e);const r=qE(e);if(t===!0||t==="class_only"&&!r){const n=Rr.getOwnPropertyDescriptors(e);delete n[mr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const c=a[o],l=n[c];l[ef]===!1&&(l[ef]=!0,l[Sv]=!0),(l.get||l.set)&&(n[c]={[Sv]:!0,[ef]:!0,[gf]:l[gf],[Pu]:e[c]})}return Rr.create(zs(e),n)}else{const n=zs(e);if(n!==null&&r)return{...e};const a=Rr.create(n);return Rr.assign(a,e)}}function $y(e,t=!1){return kh(e)||xi(e)||!wn(e)||(Yu(e)>1&&Rr.defineProperties(e,{set:Td,add:Td,clear:Td,delete:Td}),Rr.freeze(e),t&&yh(e,(r,n)=>{$y(n,!0)},!1)),e}function p$(){vn(2)}var Td={[Pu]:p$};function kh(e){return e===null||!Dy(e)?!0:Rr.isFrozen(e)}var yf="MapSet",Av="Patches",Yw="ArrayMethods",QE={};function vo(e){const t=QE[e];return t||vn(0,e),t}var Xw=e=>!!QE[e],Cu,YE=()=>Cu,m$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Xw(yf)?vo(yf):void 0,arrayMethodsPlugin_:Xw(Yw)?vo(Yw):void 0});function Zw(e,t){t&&(e.patchPlugin_=vo(Av),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pv(e){Cv(e),e.drafts_.forEach(g$),e.drafts_=null}function Cv(e){e===Cu&&(Cu=e.parent_)}var Jw=e=>Cu=m$(Cu,e);function g$(e){const t=e[mr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ek(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[mr].modified_&&(Pv(t),vn(4)),wn(e)&&(e=tk(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[mr].base_,e,t)}else e=tk(t,r);return v$(t,e,!0),Pv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==VE?e:void 0}function tk(e,t){if(kh(t))return t;const r=t[mr];if(!r)return xf(t,e.handledSet_,e);if(!jh(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);JE(r,e)}return r.copy_}function v$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$y(t,r)}function XE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var jh=(e,t)=>e.scope_===t,y$=[];function ZE(e,t,r,n){const a=si(e),o=e.type_;if(n!==void 0&&Nv(a,n,o)===t){vf(a,n,r,o);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;yh(a,(f,h)=>{if(xi(h)){const p=l.get(h)||[];p.push(f),l.set(h,p)}})}const c=e.draftLocations_.get(t)??y$;for(const l of c)vf(a,l,r,o)}function x$(e,t,r){e.callbacks_.push(function(a){var l;const o=t;if(!o||!jh(o,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(o);const c=Ry(o);ZE(e,o.draft_??o,c,r),JE(o,a)})}function JE(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)}XE(e)}}function b$(e,t,r){const{scope_:n}=e;if(xi(r)){const a=r[mr];jh(a,n)&&a.callbacks_.push(function(){tf(e);const c=Ry(a);ZE(e,r,c,t)})}else wn(r)&&e.callbacks_.push(function(){const o=si(e);e.type_===3?o.has(r)&&xf(r,n.handledSet_,n):Nv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xf(Nv(e.copy_,t,e.type_),n.handledSet_,n)})}function xf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||xi(e)||t.has(e)||!wn(e)||kh(e)||(t.add(e),yh(e,(n,a)=>{if(xi(a)){const o=a[mr];if(jh(o,r)){const c=Ry(o);vf(e,n,c,e.type_),XE(o)}}else wn(a)&&xf(a,t,r)})),e}function w$(e,t){const r=xh(e),n={type_:r?1:0,scope_:t?t.scope_:YE(),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=bf;r&&(a=[n],o=Ou);const{revoke:c,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=c,[l,n]}var bf={get(e,t){if(t===mr)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=si(e);if(!Qw(a,t,e.type_))return k$(e,a,t);const o=a[t];if(e.finalized_||!wn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&h$(t))return o;if(o===ug(e.base_,t)){tf(e);const c=e.type_===1?+t:t,l=_v(e.scope_,o,e,c);return e.copy_[c]=l}return o},has(e,t){return t in si(e)},ownKeys(e){return Reflect.ownKeys(si(e))},set(e,t,r){const n=eA(si(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=ug(si(e),t),o=a==null?void 0:a[mr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(f$(r,a)&&(r!==void 0||Qw(e.base_,t,e.type_)))return!0;tf(e),Ov(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),b$(e,t,r)),!0},deleteProperty(e,t){return tf(e),ug(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ov(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=si(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ef]:!0,[Sv]:e.type_!==1||t!=="length",[gf]:n[gf],[Pu]:r[t]}},defineProperty(){vn(11)},getPrototypeOf(e){return zs(e.base_)},setPrototypeOf(){vn(12)}},Ou={};for(let e in bf){let t=bf[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 bf.set.call(this,e[0],t,r,e[0])};function ug(e,t){const r=e[mr];return(r?si(r):e)[t]}function k$(e,t,r){var a;const n=eA(t,r);return n?Pu in n?n[Pu]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function eA(e,t){if(!(t in e))return;let r=zs(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=zs(r)}}function Ov(e){e.modified_||(e.modified_=!0,e.parent_&&Ov(e.parent_))}function tf(e){e.copy_||(e.assigned_=new Map,e.copy_=Ev(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var j$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(hs(r)&&!hs(n)){const c=n;n=r;const l=this;return function(h=c,...p){return l.produce(h,g=>n.call(this,g,...p))}}hs(n)||vn(6),a!==void 0&&!hs(a)&&vn(7);let o;if(wn(r)){const c=Jw(this),l=_v(c,r,void 0);let f=!0;try{o=n(l),f=!1}finally{f?Pv(c):Cv(c)}return Zw(c,a),ek(o,c)}else if(!r||!Dy(r)){if(o=n(r),o===void 0&&(o=r),o===VE&&(o=void 0),this.autoFreeze_&&$y(o,!0),a){const c=[],l=[];vo(Av).generateReplacementPatches_(r,o,{patches_:c,inversePatches_:l}),a(c,l)}return o}else vn(1,r)},this.produceWithPatches=(r,n)=>{if(hs(r))return(l,...f)=>this.produceWithPatches(l,h=>r(h,...f));let a,o;return[this.produce(r,n,(l,f)=>{a=l,o=f}),a,o]},lg(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),lg(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),lg(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){wn(t)||vn(8),xi(t)&&(t=Zr(t));const r=Jw(this),n=_v(r,t,void 0);return n[mr].isManual_=!0,Cv(r),n}finishDraft(t,r){const n=t&&t[mr];(!n||!n.isManual_)&&vn(9);const{scope_:a}=n;return Zw(a,r),ek(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=vo(Av).applyPatches_;return xi(t)?a(t,r):this.produce(t,o=>a(o,r))}};function _v(e,t,r,n){const[a,o]=bh(t)?vo(yf).proxyMap_(t,r):wh(t)?vo(yf).proxySet_(t,r):w$(t,r);return((r==null?void 0:r.scope_)??YE()).drafts_.push(a),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?x$(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),a}function Zr(e){return xi(e)||vn(10,e),tA(e)}function tA(e){if(!wn(e)||kh(e))return e;const t=e[mr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ev(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ev(e,!0);return yh(r,(a,o)=>{vf(r,a,tA(o))},n),t&&(t.finalized_=!1),r}var S$=new j$,rA=S$.produce;function nA(e){return({dispatch:r,getState:n})=>a=>o=>typeof o=="function"?o(r,n,e):a(o)}var N$=nA(),E$=nA,A$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pf:pf.apply(null,arguments)};function Lr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error($r(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>GE(n)&&n.type===e,r}var iA=class fu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fu.prototype)}static get[Symbol.species](){return fu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fu(...t[0].concat(this)):new fu(...t.concat(this))}};function rk(e){return wn(e)?rA(e,()=>{}):e}function Dd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function P$(e){return typeof e=="boolean"}var C$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:o=!0}=t??{};let c=new iA;return r&&(P$(r)?c.push(N$):c.push(E$(r.extraArgument))),c},aA="RTK_autoBatch",st=()=>e=>({payload:e,meta:{[aA]:!0}}),nk=e=>t=>{setTimeout(t,e)},O$=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(c),r())},o=e(a),c=setTimeout(a,t)},oA=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,o=!1,c=!1;const l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?O$(window.requestAnimationFrame,100):nk(10):e.type==="callback"?e.queueNotification:nk(e.timeout),h=()=>{c=!1,o&&(o=!1,l.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const g=()=>a&&p(),x=n.subscribe(g);return l.add(p),()=>{x(),l.delete(p)}},dispatch(p){var g;try{return a=!((g=p==null?void 0:p.meta)!=null&&g[aA]),o=!a,o&&(c||(c=!0,f(h))),n.dispatch(p)}finally{a=!0}}})},_$=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new iA(e);return n&&a.push(oA(typeof n=="object"?n:void 0)),a};function M$(e){const t=C$(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:o=void 0,enhancers:c=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(Ty(r))l=KE(r);else throw new Error($r(1));let f;typeof n=="function"?f=n(t):f=t();let h=pf;a&&(h=A$({trace:!1,...typeof a=="object"&&a}));const p=c$(...f),g=_$(p);let x=typeof c=="function"?c(g):g();const b=h(...x);return HE(l,o,b)}function sA(e){const t={},r=[];let n;const a={addCase(o,c){const l=typeof o=="string"?o:o.type;if(!l)throw new Error($r(28));if(l in t)throw new Error($r(29));return t[l]=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 I$(e){return typeof e=="function"}function T$(e,t){let[r,n,a]=sA(t),o;if(I$(e))o=()=>rk(e());else{const l=rk(e);o=()=>l}function c(l=o(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[a]),h.reduce((p,g)=>{if(g)if(xi(p)){const b=g(p,f);return b===void 0?p:b}else{if(wn(p))return rA(p,x=>g(x,f));{const x=g(p,f);if(x===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return p},l)}return c.getInitialState=o,c}var D$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",R$=(e=21)=>{let t="",r=e;for(;r--;)t+=D$[Math.random()*64|0];return t},$$=Symbol.for("rtk-slice-createasyncthunk");function L$(e,t){return`${e}/${t}`}function z$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[$$];return function(a){const{name:o,reducerPath:c=o}=a;if(!o)throw new Error($r(11));const l=(typeof a.reducers=="function"?a.reducers(B$()):a.reducers)||{},f=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(P,_){const C=typeof P=="string"?P:P.type;if(!C)throw new Error($r(12));if(C in h.sliceCaseReducersByType)throw new Error($r(13));return h.sliceCaseReducersByType[C]=_,p},addMatcher(P,_){return h.sliceMatchers.push({matcher:P,reducer:_}),p},exposeAction(P,_){return h.actionCreators[P]=_,p},exposeCaseReducer(P,_){return h.sliceCaseReducersByName[P]=_,p}};f.forEach(P=>{const _=l[P],C={reducerName:P,type:L$(o,P),createNotation:typeof a.reducers=="function"};W$(_)?K$(C,_,p,t):U$(C,_,p)});function g(){const[P={},_=[],C=void 0]=typeof a.extraReducers=="function"?sA(a.extraReducers):[a.extraReducers],I={...P,...h.sliceCaseReducersByType};return T$(a.initialState,B=>{for(let U in I)B.addCase(U,I[U]);for(let U of h.sliceMatchers)B.addMatcher(U.matcher,U.reducer);for(let U of _)B.addMatcher(U.matcher,U.reducer);C&&B.addDefaultCase(C)})}const x=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 C(B){let U=B[P];return typeof U>"u"&&_&&(U=Dd(j,C,N)),U}function I(B=x){const U=Dd(b,_,()=>new WeakMap);return Dd(U,B,()=>{const G={};for(const[X,$]of Object.entries(a.selectors??{}))G[X]=F$($,B,()=>Dd(j,B,N),_);return G})}return{reducerPath:P,getSelectors:I,get selectors(){return I(C)},selectSlice:C}}const O={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(c),injectInto(P,{reducerPath:_,...C}={}){const I=_??c;return P.inject({reducerPath:I,reducer:S},C),{...O,...E(I,!0)}}};return O}}function F$(e,t,r,n){function a(o,...c){let l=t(o);return typeof l>"u"&&n&&(l=r()),e(l,...c)}return a.unwrapped=e,a}var lr=z$();function B$(){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 U$({type:e,reducerName:t,createNotation:r},n,a){let o,c;if("reducer"in n){if(r&&!H$(n))throw new Error($r(17));o=n.reducer,c=n.prepare}else o=n;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,c?Lr(e,c):Lr(e))}function W$(e){return e._reducerDefinitionType==="asyncThunk"}function H$(e){return e._reducerDefinitionType==="reducerWithPrepare"}function K$({type:e,reducerName:t},r,n,a){if(!a)throw new Error($r(18));const{payloadCreator:o,fulfilled:c,pending:l,rejected:f,settled:h,options:p}=r,g=a(e,o,p);n.exposeAction(t,g),c&&n.addCase(g.fulfilled,c),l&&n.addCase(g.pending,l),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:c||Rd,pending:l||Rd,rejected:f||Rd,settled:h||Rd})}function Rd(){}var G$="task",lA="listener",uA="completed",Ly="cancelled",V$=`task-${Ly}`,q$=`task-${uA}`,Mv=`${lA}-${Ly}`,Q$=`${lA}-${uA}`,Sh=class{constructor(e){Ql(this,"code");Ql(this,"name","TaskAbortError");Ql(this,"message");this.code=e,this.message=`${G$} ${Ly} (reason: ${e})`}},zy=(e,t)=>{if(typeof e!="function")throw new TypeError($r(32))},wf=()=>{},cA=(e,t=wf)=>(e.catch(t),e),dA=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),co=e=>{if(e.aborted)throw new Sh(e.reason)};function fA(e,t){let r=wf;return new Promise((n,a)=>{const o=()=>a(new Sh(e.reason));if(e.aborted){o();return}r=dA(e,o),t.finally(()=>r()).then(n,a)}).finally(()=>{r=wf})}var Y$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Sh?"cancelled":"rejected",error:r}}finally{t==null||t()}},kf=e=>t=>cA(fA(e,t).then(r=>(co(e),r))),hA=e=>{const t=kf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ys}=Object,ik={},Nh="listenerMiddleware",X$=(e,t)=>{const r=n=>dA(e,()=>n.abort(e.reason));return(n,a)=>{zy(n);const o=new AbortController;r(o);const c=Y$(async()=>{co(e),co(o.signal);const l=await n({pause:kf(o.signal),delay:hA(o.signal),signal:o.signal});return co(o.signal),l},()=>o.abort(q$));return a!=null&&a.autoJoin&&t.push(c.catch(wf)),{result:kf(e)(c),cancel(){o.abort(V$)}}}},Z$=(e,t)=>{const r=async(n,a)=>{co(t);let o=()=>{};const l=[new Promise((f,h)=>{let p=e({predicate:n,effect:(g,x)=>{x.unsubscribe(),f([g,x.getState(),x.getOriginalState()])}});o=()=>{p(),h()}})];a!=null&&l.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await fA(t,Promise.race(l));return co(t),f}finally{o()}};return((n,a)=>cA(r(n,a)))},pA=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:o}=e;if(t)a=Lr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error($r(21));return zy(o),{predicate:a,type:t,effect:o}},mA=ys(e=>{const{type:t,predicate:r,effect:n}=pA(e);return{id:R$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error($r(22))}}},{withTypes:()=>mA}),ak=(e,t)=>{const{type:r,effect:n,predicate:a}=pA(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===a)&&o.effect===n)},Iv=e=>{e.pending.forEach(t=>{t.abort(Mv)})},J$=(e,t)=>()=>{for(const r of t.keys())Iv(r);e.clear()},ok=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},gA=ys(Lr(`${Nh}/add`),{withTypes:()=>gA}),eL=Lr(`${Nh}/removeAll`),vA=ys(Lr(`${Nh}/remove`),{withTypes:()=>vA}),tL=(...e)=>{console.error(`${Nh}/error`,...e)},Xu=(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=tL}=e;zy(c);const l=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&Iv(b)}),f=(b=>{const j=ak(t,b)??mA(b);return l(j)});ys(f,{withTypes:()=>f});const h=b=>{const j=ak(t,b);return j&&(j.unsubscribe(),b.cancelActive&&Iv(j)),!!j};ys(h,{withTypes:()=>h});const p=async(b,j,k,S)=>{const N=new AbortController,E=Z$(f,N.signal),O=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,ys({},k,{getOriginalState:S,condition:(P,_)=>E(P,_).then(Boolean),take:E,delay:hA(N.signal),pause:kf(N.signal),extra:o,signal:N.signal,fork:X$(N.signal,O),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((P,_,C)=>{P!==N&&(P.abort(Mv),C.delete(P))})},cancel:()=>{N.abort(Mv),b.pending.delete(N)},throwIfCancelled:()=>{co(N.signal)}})))}catch(P){P instanceof Sh||ok(c,P,{raisedBy:"effect"})}finally{await Promise.all(O),N.abort(Q$),a(b),b.pending.delete(N)}},g=J$(t,r);return{middleware:b=>j=>k=>{if(!GE(k))return j(k);if(gA.match(k))return f(k.payload);if(eL.match(k)){g();return}if(vA.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===ik)throw new Error($r(23));return S};let E;try{if(E=j(k),t.size>0){const O=b.getState(),P=Array.from(t.values());for(const _ of P){let C=!1;try{C=_.predicate(k,O,S)}catch(I){C=!1,ok(c,I,{raisedBy:"predicate"})}C&&p(_,k,b,N)}}}finally{S=ik}return E},startListening:f,stopListening:h,clearListeners:g}};function $r(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var rL={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},yA=lr({name:"chartLayout",initialState:rL,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}}}),Eh=yA.actions,nL=Eh.setMargin,iL=Eh.setLayout,aL=Eh.setChartSize,oL=Eh.setScale,sL=yA.reducer;function xA(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function He(e){return Number.isFinite(e)}function Hn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function sk(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?sk(Object(r),!0).forEach(function(n){lL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lL(e,t,r){return(t=uL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uL(e){var t=cL(e,"string");return typeof t=="symbol"?t:t+""}function cL(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 zt(e,t,r){return Yt(e)||Yt(t)?r:Wn(t)?Eo(e,t,r):typeof t=="function"?t(e):r}var dL=(e,t,r)=>{if(t&&r){var n=r.width,a=r.height,o=t.align,c=t.verticalAlign,l=t.layout;if((l==="vertical"||l==="horizontal"&&c==="middle")&&o!=="center"&&Ne(e[o]))return ps(ps({},e),{},{[o]:e[o]+(n||0)});if((l==="horizontal"||l==="vertical"&&o==="center")&&c!=="middle"&&Ne(e[c]))return ps(ps({},e),{},{[c]:e[c]+(a||0)})}return e},Vn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",bA=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var a,o,c=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate));return a||c.push(t),o||c.push(r),c},wA=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,o=e.range,c=e.scale,l=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,p=e.tickCount,g=e.ticks,x=e.niceTicks,b=e.axisType;if(!c)return null;var j=l==="scaleBand"&&c.bandwidth?c.bandwidth()/2:2,k=a==="category"&&c.bandwidth?c.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?Xr(o[0]-o[1])*2*k:k,g||x){var S=(g||x||[]).map((N,E)=>{var O=n?n.indexOf(N):N,P=c.map(O);return He(P)?{coordinate:P+k,value:N,offset:k,index:E}:null}).filter(Nr);return S}return f&&h?h.map((N,E)=>{var O=c.map(N);return He(O)?{coordinate:O+k,value:N,index:E,offset:k}:null}).filter(Nr):c.ticks&&p!=null?c.ticks(p).map((N,E)=>{var O=c.map(N);return He(O)?{coordinate:O+k,value:N,index:E,offset:k}:null}).filter(Nr):c.domain().map((N,E)=>{var O=c.map(N);return He(O)?{coordinate:O+k,value:n?n[N]:N,index:E,offset:k}:null}).filter(Nr)},fL=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,l=0;l<r;++l){var f=e[l],h=f==null?void 0:f[a];if(h!=null){var p=h[1],g=h[0],x=Un(p)?g:p;x>=0?(h[0]=o,o+=x,h[1]=o):(h[0]=c,c+=x,h[1]=c)}}}},hL=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 l=e[c],f=l==null?void 0:l[a];if(f!=null){var h=Un(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},pL={sign:fL,expand:OD,none:mo,silhouette:_D,wiggle:MD,positive:hL},mL=(e,t,r)=>{var n,a=(n=pL[r])!==null&&n!==void 0?n:mo,o=CD().keys(t).value((l,f)=>Number(zt(l,f,0))).order(xv).offset(a),c=o(e);return c.forEach((l,f)=>{l.forEach((h,p)=>{var g=zt(e[p],t[f],0);Array.isArray(g)&&g.length===2&&Ne(g[0])&&Ne(g[1])&&(h[0]=g[0],h[1]=g[1])})}),c};function gL(e){return e==null?void 0:String(e)}function lk(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 l=AE(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=zt(a,Yt(c)?t.dataKey:c),h=t.scale.map(f);return Ne(h)?h:null}var vL=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},yL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],xL=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return yL(Object.keys(e).reduce((n,a)=>{var o=e[a];if(!o)return n;var c=o.stackedData,l=c.reduce((f,h)=>{var p=xA(h,t,r),g=vL(p);return!He(g[0])||!He(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},uk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ck=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jf=(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=gh(t,p=>p.coordinate),o=1/0,c=1,l=a.length;c<l;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 dk(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,a=e.value,o=e.name;return ps(ps({},t),{},{dataKey:r,payload:n,value:a,name:o})}function kA(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var bL=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},wL=(e,t)=>t==="centric"?e.angle:e.radius,ji=e=>e.layout.width,Si=e=>e.layout.height,kL=e=>e.layout.scale,jA=e=>e.layout.margin,Ah=K(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Ph=K(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),jL="data-recharts-item-index",SL="data-recharts-item-id",Zu=60;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 $d(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){NL(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 NL(e,t,r){return(t=EL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EL(e){var t=AL(e,"string");return typeof t=="symbol"?t:t+""}function AL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PL=e=>e.brush.height;function CL(e){var t=Ph(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Zu;return r+a}return r},0)}function OL(e){var t=Ph(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:Zu;return r+a}return r},0)}function _L(e){var t=Ah(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function ML(e){var t=Ah(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Zt=K([ji,Si,jA,PL,CL,OL,_L,ML,WE,JR],(e,t,r,n,a,o,c,l,f,h)=>{var p={left:(r.left||0)+a,right:(r.right||0)+o},g={top:(r.top||0)+c,bottom:(r.bottom||0)+l},x=$d($d({},g),p),b=x.bottom;x.bottom+=n,x=dL(x,f,h);var j=e-x.left-x.right,k=t-x.top-x.bottom;return $d($d({brushBottom:b},x),{},{width:Math.max(j,0),height:Math.max(k,0)})}),IL=K(Zt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),SA=K(ji,Si,(e,t)=>({x:0,y:0,width:e,height:t})),TL=v.createContext(null),Ar=()=>v.useContext(TL)!=null,Ch=e=>e.brush,Oh=K([Ch,Zt,jA],(e,t,r)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ne(e.width)?e.width:t.width}));function DL(e,t,{signal:r,edges:n}={}){let a,o=null;const c=n!=null&&n.includes("leading"),l=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},h=()=>{l&&f(),b()};let p=null;const g=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},t)},x=()=>{p!==null&&(clearTimeout(p),p=null)},b=()=>{x(),a=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;a=this,o=S;const N=p==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 RL(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 l,f=null;const h=DL(function(...x){l=e.apply(this,x),f=null},t,{edges:c}),p=function(...x){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(l=e.apply(this,x),f=Date.now(),h.cancel(),h.schedule(),l):(h.apply(this,x),l)},g=()=>(h.flush(),l);return p.cancel=h.cancel,p.flush=g,p}function $L(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return RL(e,t,{leading:n,maxWait:t,trailing:a})}var Sf=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++]))}},$n={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},NA=(e,t,r)=>{var n=r.width,a=n===void 0?$n.width:n,o=r.height,c=o===void 0?$n.height:o,l=r.aspect,f=r.maxHeight,h=go(a)?e:Number(a),p=go(c)?t:Number(c);return l&&l>0&&(h?p=h/l:p&&(h=p*l),f&&p!=null&&p>f&&(p=f)),{calculatedWidth:h,calculatedHeight:p}},LL={width:0,height:0,overflow:"visible"},zL={width:0,overflowX:"visible"},FL={height:0,overflowY:"visible"},BL={},UL=e=>{var t=e.width,r=e.height,n=go(t),a=go(r);return n&&a?LL:n?zL:a?FL:BL};function WL(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=$n.width,o=$n.height):a===void 0?a=n&&n>0?void 0:$n.width:o===void 0&&(o=n&&n>0?void 0:$n.height),{width:a,height:o}}var HL=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Nf(){return Nf=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},Nf.apply(null,arguments)}function hk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hk(Object(r),!0).forEach(function(n){KL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KL(e,t,r){return(t=GL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GL(e){var t=VL(e,"string");return typeof t=="symbol"?t:t+""}function VL(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 qL(e,t){return ZL(e)||XL(e,t)||YL(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 YL(e,t){if(e){if(typeof e=="string")return mk(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)?mk(e,t):void 0}}function mk(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 XL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function ZL(e){if(Array.isArray(e))return e}function JL(e,t){if(e==null)return{};var r,n,a=ez(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 ez(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 EA=v.createContext($n.initialDimension);function tz(e){return Hn(e.width)&&Hn(e.height)}function AA(e){var t=e.children,r=e.width,n=e.height,a=v.useMemo(()=>({width:r,height:n}),[r,n]);return tz(a)?v.createElement(EA.Provider,{value:a},t):null}var Fy=()=>v.useContext(EA),rz=v.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?$n.initialDimension:n,o=e.width,c=e.height,l=e.minWidth,f=l===void 0?$n.minWidth:l,h=e.minHeight,p=e.maxHeight,g=e.children,x=e.debounce,b=x===void 0?$n.debounce:x,j=e.id,k=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,O=JL(e,HL),P=v.useRef(null),_=v.useRef();_.current=S,v.useImperativeHandle(t,()=>P.current);var C=v.useState({containerWidth:a.width,containerHeight:a.height}),I=qL(C,2),B=I[0],U=I[1],G=v.useCallback((be,de)=>{U(Y=>{var V=Math.round(be),Q=Math.round(de);return Y.containerWidth===V&&Y.containerHeight===Q?Y:{containerWidth:V,containerHeight:Q}})},[]);v.useEffect(()=>{if(P.current==null||typeof ResizeObserver>"u")return Qs;var be=D=>{var T,Z=D[0];if(Z!=null){var oe=Z.contentRect,re=oe.width,ue=oe.height;G(re,ue),(T=_.current)===null||T===void 0||T.call(_,re,ue)}};b>0&&(be=$L(be,b,{trailing:!0,leading:!1}));var de=new ResizeObserver(be),Y=P.current.getBoundingClientRect(),V=Y.width,Q=Y.height;return G(V,Q),de.observe(P.current),()=>{de.disconnect()}},[G,b]);var X=B.containerWidth,$=B.containerHeight;Sf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var fe=NA(X,$,{width:o,height:c,aspect:r,maxHeight:p}),J=fe.calculatedWidth,pe=fe.calculatedHeight;return Sf(X<0||$<0||J!=null&&J>0||pe!=null&&pe>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.`,J,pe,o,c,f,h,r),v.createElement("div",Nf({id:j?"".concat(j):void 0,className:nt("recharts-responsive-container",k),style:pk(pk({},E),{},{width:o,height:c,minWidth:f,minHeight:h,maxHeight:p}),ref:P},O),v.createElement("div",{style:UL({width:o,height:c})},v.createElement(AA,{width:J,height:pe},g)))}),nz=v.forwardRef((e,t)=>{var r=Fy();if(Hn(r.width)&&Hn(r.height))return e.children;var n=WL({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,o=n.height,c=NA(void 0,void 0,{width:a,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),l=c.calculatedWidth,f=c.calculatedHeight;return Ne(l)&&Ne(f)?v.createElement(AA,{width:l,height:f},e.children):v.createElement(rz,Nf({},e,{width:a,height:o,ref:t}))});function By(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 _h=()=>{var e,t=Ar(),r=Me(IL),n=Me(Oh),a=(e=Me(Ch))===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}},iz={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},PA=()=>{var e;return(e=Me(Zt))!==null&&e!==void 0?e:iz},CA=()=>Me(ji),OA=()=>Me(Si),dt=e=>e.layout.layoutType,Ys=()=>Me(dt),Uy=()=>{var e=Ys();if(e==="horizontal"||e==="vertical")return e},_A=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},az=()=>{var e=Ys();return e!==void 0},Ju=e=>{var t=Et(),r=Ar(),n=e.width,a=e.height,o=Fy(),c=n,l=a;return o&&(c=o.width>0?o.width:n,l=o.height>0?o.height:a),v.useEffect(()=>{!r&&Hn(c)&&Hn(l)&&t(aL({width:c,height:l}))},[t,r,c,l]),null},MA=Symbol.for("immer-nothing"),gk=Symbol.for("immer-draftable"),zr=Symbol.for("immer-state");function yn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _u=Object.getPrototypeOf;function Fs(e){return!!e&&!!e[zr]}function yo(e){var t;return e?IA(e)||Array.isArray(e)||!!e[gk]||!!((t=e.constructor)!=null&&t[gk])||ec(e)||Ih(e):!1}var oz=Object.prototype.constructor.toString(),vk=new WeakMap;function IA(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=vk.get(r);return n===void 0&&(n=Function.toString.call(r),vk.set(r,n)),n===oz}function Ef(e,t,r=!0){Mh(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 Mh(e){const t=e[zr];return t?t.type_:Array.isArray(e)?1:ec(e)?2:Ih(e)?3:0}function Tv(e,t){return Mh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function TA(e,t,r){const n=Mh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function sz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ec(e){return e instanceof Map}function Ih(e){return e instanceof Set}function Ga(e){return e.copy_||e.base_}function Dv(e,t){if(ec(e))return new Map(e);if(Ih(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=IA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[zr];let a=Reflect.ownKeys(n);for(let o=0;o<a.length;o++){const c=a[o],l=n[c];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[c]={configurable:!0,writable:!0,enumerable:l.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 Wy(e,t=!1){return Th(e)||Fs(e)||!yo(e)||(Mh(e)>1&&Object.defineProperties(e,{set:Ld,add:Ld,clear:Ld,delete:Ld}),Object.freeze(e),t&&Object.values(e).forEach(r=>Wy(r,!0))),e}function lz(){yn(2)}var Ld={value:lz};function Th(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var uz={};function xo(e){const t=uz[e];return t||yn(0,e),t}var Mu;function DA(){return Mu}function cz(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yk(e,t){t&&(xo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Rv(e){$v(e),e.drafts_.forEach(dz),e.drafts_=null}function $v(e){e===Mu&&(Mu=e.parent_)}function xk(e){return Mu=cz(Mu,e)}function dz(e){const t=e[zr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[zr].modified_&&(Rv(t),yn(4)),yo(e)&&(e=Af(t,e),t.parent_||Pf(t,e)),t.patches_&&xo("Patches").generateReplacementPatches_(r[zr].base_,e,t.patches_,t.inversePatches_)):e=Af(t,r,[]),Rv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==MA?e:void 0}function Af(e,t,r){if(Th(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[zr];if(!a)return Ef(t,(o,c)=>wk(e,a,t,o,c,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Pf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const o=a.copy_;let c=o,l=!1;a.type_===3&&(c=new Set(o),o.clear(),l=!0),Ef(c,(f,h)=>wk(e,a,o,f,h,r,l),n),Pf(e,o,!1),r&&e.patches_&&xo("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function wk(e,t,r,n,a,o,c){if(a==null||typeof a!="object"&&!c)return;const l=Th(a);if(!(l&&!c)){if(Fs(a)){const f=o&&t&&t.type_!==3&&!Tv(t.assigned_,n)?o.concat(n):void 0,h=Af(e,a,f);if(TA(r,n,h),Fs(h))e.canAutoFreeze_=!1;else return}else c&&r.add(a);if(yo(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&l)return;Af(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(ec(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Pf(e,a)}}}function Pf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wy(t,r)}function fz(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:DA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,o=Hy;r&&(a=[n],o=Iu);const{revoke:c,proxy:l}=Proxy.revocable(a,o);return n.draft_=l,n.revoke_=c,l}var Hy={get(e,t){if(t===zr)return e;const r=Ga(e);if(!Tv(r,t))return hz(e,r,t);const n=r[t];return e.finalized_||!yo(n)?n:n===cg(e.base_,t)?(dg(e),e.copy_[t]=zv(n,e)):n},has(e,t){return t in Ga(e)},ownKeys(e){return Reflect.ownKeys(Ga(e))},set(e,t,r){const n=RA(Ga(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=cg(Ga(e),t),o=a==null?void 0:a[zr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(sz(r,a)&&(r!==void 0||Tv(e.base_,t)))return!0;dg(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_[t]=!0),!0},deleteProperty(e,t){return cg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,dg(e),Lv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ga(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){yn(11)},getPrototypeOf(e){return _u(e.base_)},setPrototypeOf(){yn(12)}},Iu={};Ef(Hy,(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 Hy.set.call(this,e[0],t,r,e[0])};function cg(e,t){const r=e[zr];return(r?Ga(r):e)[t]}function hz(e,t,r){var a;const n=RA(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function RA(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 Lv(e){e.modified_||(e.modified_=!0,e.parent_&&Lv(e.parent_))}function dg(e){e.copy_||(e.copy_=Dv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pz=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,p=>r.call(this,p,...h))}}typeof r!="function"&&yn(6),n!==void 0&&typeof n!="function"&&yn(7);let a;if(yo(t)){const o=xk(this),c=zv(t,void 0);let l=!0;try{a=r(c),l=!1}finally{l?Rv(o):$v(o)}return yk(o,n),bk(a,o)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===MA&&(a=void 0),this.autoFreeze_&&Wy(a,!0),n){const o=[],c=[];xo("Patches").generateReplacementPatches_(t,a,o,c),n(o,c)}return a}else yn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(c,...l)=>this.produceWithPatches(c,f=>t(f,...l));let n,a;return[this.produce(t,r,(c,l)=>{n=c,a=l}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){yo(e)||yn(8),Fs(e)&&(e=mz(e));const t=xk(this),r=zv(e,void 0);return r[zr].isManual_=!0,$v(t),r}finishDraft(e,t){const r=e&&e[zr];(!r||!r.isManual_)&&yn(9);const{scope_:n}=r;return yk(n,t),bk(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=xo("Patches").applyPatches_;return Fs(e)?n(e,t):this.produce(e,a=>n(a,t))}};function zv(e,t){const r=ec(e)?xo("MapSet").proxyMap_(e,t):Ih(e)?xo("MapSet").proxySet_(e,t):fz(e,t);return(t?t.scope_:DA()).drafts_.push(r),r}function mz(e){return Fs(e)||yn(10,e),$A(e)}function $A(e){if(!yo(e)||Th(e))return e;const t=e[zr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Dv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Dv(e,!0);return Ef(r,(a,o)=>{TA(r,a,$A(o))},n),t&&(t.finalized_=!1),r}var gz=new pz;gz.produce;var vz={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},LA=lr({name:"legend",initialState:vz,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=Zr(e).payload.indexOf(n);o>-1&&(e.payload[o]=a)},prepare:st()},removeLegendPayload:{reducer(e,t){var r=Zr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:st()}}}),tc=LA.actions;tc.setLegendSize;tc.setLegendSettings;var yz=tc.addLegendPayload,xz=tc.replaceLegendPayload,bz=tc.removeLegendPayload,wz=LA.reducer,fg={exports:{}},hg={};/**
|
||
* @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 kk;function kz(){if(kk)return hg;kk=1;var e=Vs();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,l=e.useDebugValue;return hg.useSyncExternalStoreWithSelector=function(f,h,p,g,x){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(_),x!==void 0&&j.hasValue){var C=j.value;if(x(C,_))return O=C}return O=_}if(C=O,r(E,_))return C;var I=g(_);return x!==void 0&&x(C,I)?(E=_,C):(E=_,O=I)}var N=!1,E,O,P=p===void 0?null:p;return[function(){return S(h())},P===null?void 0:function(){return S(P())}]},[h,p,g,x]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),l(k),k},hg}var jk;function jz(){return jk||(jk=1,fg.exports=kz()),fg.exports}jz();function Sz(e){e()}function Nz(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Sz(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var Sk={notify(){},get:()=>[]};function Ez(e,t){let r,n=Sk,a=0,o=!1;function c(k){p();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function l(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function p(){a++,r||(r=e.subscribe(f),n=Nz())}function g(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=Sk)}function x(){o||(o=!0,p())}function b(){o&&(o=!1,g())}const j={addNestedSub:c,notifyNestedSubs:l,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:b,getListeners:()=>n};return j}var Az=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Pz=Az(),Cz=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Oz=Cz(),_z=()=>Pz||Oz?v.useLayoutEffect:v.useEffect,Mz=_z();function Nk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Iz(e,t){if(Nk(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])||!Nk(e[r[a]],t[r[a]]))return!1;return!0}var pg=Symbol.for("react-redux-context"),mg=typeof globalThis<"u"?globalThis:{};function Tz(){if(!v.createContext)return{};const e=mg[pg]??(mg[pg]=new Map);let t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var Dz=Tz();function Rz(e){const{children:t,context:r,serverState:n,store:a}=e,o=v.useMemo(()=>{const f=Ez(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),c=v.useMemo(()=>a.getState(),[a]);Mz(()=>{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 l=r||Dz;return v.createElement(l.Provider,{value:o},t)}var $z=Rz,Lz=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function zz(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Dh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(Lz.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Iz(e[n],t[n]))return!1}else if(!zz(e[n],t[n]))return!1;return!0}function Fv(){return Fv=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},Fv.apply(null,arguments)}function Ek(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 eu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ek(Object(r),!0).forEach(function(n){Fz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ek(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fz(e,t,r){return(t=Bz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bz(e){var t=Uz(e,"string");return typeof t=="symbol"?t:t+""}function Uz(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 Wz(e,t){return Vz(e)||Gz(e,t)||Kz(e,t)||Hz()}function Hz(){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 Kz(e,t){if(e){if(typeof e=="string")return Ak(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)?Ak(e,t):void 0}}function Ak(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Gz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function Vz(e){if(Array.isArray(e))return e}function qz(e){return Array.isArray(e)&&Wn(e[0])&&Wn(e[1])?e.join(" ~ "):e}var is={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 Qz(e,t){return t==null?e:gh(e,t)}var Yz=e=>{var t=e.separator,r=t===void 0?is.separator:t,n=e.contentStyle,a=e.itemStyle,o=e.labelStyle,c=o===void 0?is.labelStyle:o,l=e.payload,f=e.formatter,h=e.itemSorter,p=e.wrapperClassName,g=e.labelClassName,x=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?is.accessibilityLayer:j,S=()=>{if(l&&l.length){var B={padding:0,margin:0},U=Qz(l,h),G=U.map((X,$)=>{if(!X||X.type==="none")return null;var fe=X.formatter||f||qz,J=X.value,pe=X.name,be=J,de=pe;if(fe){var Y=fe(J,pe,X,$,l);if(Array.isArray(Y)){var V=Wz(Y,2);be=V[0],de=V[1]}else if(Y!=null)be=Y;else return null}var Q=eu(eu({},is.itemStyle),{},{color:X.color||is.itemStyle.color},a);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:Q},Wn(de)?v.createElement("span",{className:"recharts-tooltip-item-name"},de):null,Wn(de)?v.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,v.createElement("span",{className:"recharts-tooltip-item-value"},be),v.createElement("span",{className:"recharts-tooltip-item-unit"},X.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:B},G)}return null},N=eu(eu({},is.contentStyle),n),E=eu({margin:0},c),O=!Yt(x),P=O?x:"",_=nt("recharts-default-tooltip",p),C=nt("recharts-tooltip-label",g);O&&b&&l!==void 0&&l!==null&&(P=b(x,l));var I=k?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",Fv({className:_,style:N},I),v.createElement("p",{className:C,style:E},v.isValidElement(P)?P:"".concat(P)),S())},tu="recharts-tooltip-wrapper",Xz={visibility:"hidden"};function Zz(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return nt(tu,{["".concat(tu,"-right")]:Ne(r)&&t&&Ne(t.x)&&r>=t.x,["".concat(tu,"-left")]:Ne(r)&&t&&Ne(t.x)&&r<t.x,["".concat(tu,"-bottom")]:Ne(n)&&t&&Ne(t.y)&&n>=t.y,["".concat(tu,"-top")]:Ne(n)&&t&&Ne(t.y)&&n<t.y})}function Pk(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offset,o=e.position,c=e.reverseDirection,l=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Ne(o[n]))return o[n];var p=r[n]-l-(a>0?a:0),g=r[n]+a;if(t[n])return c[n]?p:g;var x=f[n];if(x==null)return 0;if(c[n]){var b=p,j=x;return b<j?Math.max(g,x):Math.max(p,x)}if(h==null)return 0;var k=g+l,S=x+h;return k>S?Math.max(p,x):Math.max(g,x)}function Jz(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 e6(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,o=e.position,c=e.reverseDirection,l=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,p,g,x;return l.height>0&&l.width>0&&r?(g=Pk({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:o,reverseDirection:c,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),x=Pk({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:c,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),p=Jz({translateX:g,translateY:x,useTranslate3d:f})):p=Xz,{cssProperties:p,cssClasses:Zz({translateX:g,translateY:x,coordinate:r})}}var t6=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),rc={isSsr:t6()};function r6(e,t){return o6(e)||a6(e,t)||i6(e,t)||n6()}function n6(){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 i6(e,t){if(e){if(typeof e=="string")return Ck(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ck(e,t):void 0}}function Ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function o6(e){if(Array.isArray(e))return e}function zA(){var e=v.useState(()=>rc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=r6(e,2),r=t[0],n=t[1];return v.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 Ok(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function as(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ok(Object(r),!0).forEach(function(n){s6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ok(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s6(e,t,r){return(t=l6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l6(e){var t=u6(e,"string");return typeof t=="symbol"?t:t+""}function u6(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 c6(e,t){return p6(e)||h6(e,t)||f6(e,t)||d6()}function d6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f6(e,t){if(e){if(typeof e=="string")return _k(e,t);var 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)?_k(e,t):void 0}}function _k(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 h6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function p6(e){if(Array.isArray(e))return e}function m6(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 g6(e){var t,r,n,a,o,c,l=zA(),f=v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=c6(f,2),p=h[0],g=h[1];v.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var O,P,_,C;g({dismissed:!0,dismissedAtCoordinate:{x:(O=(P=e.coordinate)===null||P===void 0?void 0:P.x)!==null&&O!==void 0?O:0,y:(_=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),p.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==p.dismissedAtCoordinate.x||((o=(c=e.coordinate)===null||c===void 0?void 0:c.y)!==null&&o!==void 0?o:0)!==p.dismissedAtCoordinate.y)&&g(as(as({},p),{},{dismissed:!1}));var x=e6({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=x.cssClasses,j=x.cssProperties,k=e.hasPortalFromProps?{}:as(as({transition:m6({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=as(as({},k),{},{visibility:!p.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var v6=v.memo(g6),FA=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Bv(){return Bv=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},Bv.apply(null,arguments)}function Mk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ik(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mk(Object(r),!0).forEach(function(n){y6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y6(e,t,r){return(t=x6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x6(e){var t=b6(e,"string");return typeof t=="symbol"?t:t+""}function b6(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 Tk={curveBasisClosed:yD,curveBasisOpen:xD,curveBasis:vD,curveBumpX:mD,curveBumpY:gD,curveLinearClosed:bD,curveLinear:ph,curveMonotoneX:wD,curveMonotoneY:kD,curveNatural:jD,curveStep:SD,curveStepAfter:ED,curveStepBefore:ND},Cf=e=>He(e.x)&&He(e.y),Dk=e=>e.base!=null&&Cf(e.base)&&Cf(e),ru=e=>e.x,nu=e=>e.y,w6=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Oy(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Tk["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Tk[r]||ph},Rk={connectNulls:!1,type:"linear"},k6=e=>{var t=e.type,r=t===void 0?Rk.type:t,n=e.points,a=n===void 0?[]:n,o=e.baseLine,c=e.layout,l=e.connectNulls,f=l===void 0?Rk.connectNulls:l,h=w6(r,c),p=f?a.filter(Cf):a;if(Array.isArray(o)){var g,x=a.map((N,E)=>Ik(Ik({},N),{},{base:o[E]}));c==="vertical"?g=_d().y(nu).x1(ru).x0(N=>N.base.x):g=_d().x(ru).y1(nu).y0(N=>N.base.y);var b=g.defined(Dk).curve(h),j=f?x.filter(Dk):x;return b(j)}var k;c==="vertical"&&Ne(o)?k=_d().y(nu).x1(ru).x0(o):Ne(o)?k=_d().x(ru).y1(nu).y0(o):k=mE().x(ru).y(nu);var S=k.defined(Cf).curve(h);return S(p)},rf=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,o=Ys();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},l=r&&r.length?k6(c):n;return v.createElement("path",Bv({},bn(e),_y(e),{className:nt("recharts-curve",t),d:l===null?void 0:l,ref:a}))},j6=["x","y","top","left","width","height","className"];function Uv(){return Uv=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},Uv.apply(null,arguments)}function $k(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 S6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$k(Object(r),!0).forEach(function(n){N6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$k(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N6(e,t,r){return(t=E6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E6(e){var t=A6(e,"string");return typeof t=="symbol"?t:t+""}function A6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P6(e,t){if(e==null)return{};var r,n,a=C6(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 C6(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 O6=(e,t,r,n,a,o)=>"M".concat(e,",").concat(a,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),_6=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,l=e.left,f=l===void 0?0:l,h=e.width,p=h===void 0?0:h,g=e.height,x=g===void 0?0:g,b=e.className,j=P6(e,j6),k=S6({x:r,y:a,top:c,left:f,width:p,height:x},j);return!Ne(r)||!Ne(a)||!Ne(p)||!Ne(x)||!Ne(c)||!Ne(f)?null:v.createElement("path",Uv({},en(k),{className:nt("recharts-cross",b),d:O6(r,a,p,x,c,f)}))};function M6(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 Of=1e-4,BA=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],UA=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Lk=(e,t)=>r=>{var n=BA(e,t);return UA(n,r)},I6=(e,t)=>r=>{var n=BA(e,t),a=[...n.map((o,c)=>o*c).slice(1),0];return UA(a,r)},T6=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]]},D6=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=T6(r[0]);if(a)return a}}return r.length===4?r:[0,0,1,1]},R6=(e,t,r,n)=>{var a=Lk(e,r),o=Lk(t,n),c=I6(e,r),l=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,g=p,x=0;x<8;++x){var b=a(g)-p,j=c(g);if(Math.abs(b-p)<Of||j<Of)return o(g);g=l(g-b/j)}return o(g)};return f.isStepper=!1,f},zk=function(){return R6(...D6(...arguments))},$6=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,l=c===void 0?16.67:c,f=1,h=[0],p=0,g=0,x=1e4,b=0;b<x;){var j=-(p-f)*n,k=g*o;if(g+=(j-k)*l/1e3,p+=g*l/1e3,h.push(p),Math.abs(p-f)<Of&&Math.abs(g)<Of)break;b++}h[h.length-1]=f;var S=h.length-1;return N=>{var E,O,P;if(N<=0)return 0;if(N>=1)return f;var _=N*S,C=Math.floor(_),I=_-C;return((E=h[C])!==null&&E!==void 0?E:0)+(((O=h[C+1])!==null&&O!==void 0?O:0)-((P=h[C])!==null&&P!==void 0?P:0))*I}},L6=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return zk(e);case"spring":return $6();default:if(e.split("(")[0]==="cubic-bezier")return zk(e)}return typeof e=="function"?e:null},z6=(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()}},WA=v.createContext(z6);WA.Provider;function F6(e){var t=v.useContext(WA);return v.useMemo(()=>e??t,[e,t])}function B6(e,t,r){return(t=U6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U6(e){var t=W6(e,"string");return typeof t=="symbol"?t:t+""}function W6(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 Fk="init",Bk="pending",Uk="active",H6="completed";function gg(e){return Math.max(0,e)}class K6{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;B6(this,"state",Fk),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=gg(t.animationDuration),this.animationBegin=gg(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()===Fk)return this.state=Bk,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Bk){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Uk,this.animationStartedTime=t,this.nextAnimationUpdate(0)):gg(this.animationBegin-r)}if(this.getState()===Uk){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=H6}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class G6 extends K6{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(di(this.getFrom(),this.getTo(),this.getProgress()))}}class V6{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 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 Wk(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)?Wk(e,t):void 0}}function Wk(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,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function Z6(e){if(Array.isArray(e))return e}var J6={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Hk=0,vg=1;function HA(e){var t=nn(e,J6),r=t.animationId,n=t.isActive,a=t.canBegin,o=t.duration,c=t.easing,l=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,p=t.children,g=zA(),x=n==="auto"?!rc.isSsr&&!g:n,b=F6(t.animationController),j=v.useState(x?Hk:vg),k=q6(j,2),S=k[0],N=k[1];return v.useEffect(()=>{x||N(vg)},[x]),v.useEffect(()=>{var E=L6(c);if(!x||!a||E==null)return Qs;var O=new V6,P=new G6({animationId:r,easing:E,animationDuration:o,animationBegin:l,onAnimationStart:h,onAnimationEnd:f,from:Hk,to:vg});return b(O,P,N)},[b,r,x,a,o,c,l,h,f]),p(Number(S))}function KA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=v.useRef(Au(t)),n=v.useRef(e);return n.current!==e&&(r.current=Au(t),n.current=e),r.current}var eF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),tF=(e,t,r)=>e.map(n=>"".concat(eF(n)," ").concat(t,"ms ").concat(r)).join(","),rF=["radius"],nF=["radius"],Kk,Gk,Vk,qk,Qk,Yk,Xk,Zk,Jk,ej;function tj(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 rj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tj(Object(r),!0).forEach(function(n){iF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iF(e,t,r){return(t=aF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aF(e){var t=oF(e,"string");return typeof t=="symbol"?t:t+""}function oF(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 _f(){return _f=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},_f.apply(null,arguments)}function nj(e,t){if(e==null)return{};var r,n,a=sF(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 sF(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 lF(e,t){return fF(e)||dF(e,t)||cF(e,t)||uF()}function uF(){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 cF(e,t){if(e){if(typeof e=="string")return ij(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)?ij(e,t):void 0}}function ij(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,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function fF(e){if(Array.isArray(e))return e}function On(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var aj=(e,t,r,n,a)=>{var o=ma(r),c=ma(n),l=Math.min(Math.abs(o)/2,Math.abs(c)/2),f=c>=0?1:-1,h=o>=0?1:-1,p=c>=0&&o>=0||c<0&&o<0?1:0,g;if(l>0&&Array.isArray(a)){for(var x=[0,0,0,0],b=0,j=4;b<j;b++){var k,S=(k=a[b])!==null&&k!==void 0?k:0;x[b]=S>l?l:S}g=Gt(Kk||(Kk=On(["M",",",""])),e,t+f*x[0]),x[0]>0&&(g+=Gt(Gk||(Gk=On(["A ",",",",0,0,",",",",",""])),x[0],x[0],p,e+h*x[0],t)),g+=Gt(Vk||(Vk=On(["L ",",",""])),e+r-h*x[1],t),x[1]>0&&(g+=Gt(qk||(qk=On(["A ",",",",0,0,",`,
|
||
`,",",""])),x[1],x[1],p,e+r,t+f*x[1])),g+=Gt(Qk||(Qk=On(["L ",",",""])),e+r,t+n-f*x[2]),x[2]>0&&(g+=Gt(Yk||(Yk=On(["A ",",",",0,0,",`,
|
||
`,",",""])),x[2],x[2],p,e+r-h*x[2],t+n)),g+=Gt(Xk||(Xk=On(["L ",",",""])),e+h*x[3],t+n),x[3]>0&&(g+=Gt(Zk||(Zk=On(["A ",",",",0,0,",`,
|
||
`,",",""])),x[3],x[3],p,e,t+n-f*x[3])),g+="Z"}else if(l>0&&a===+a&&a>0){var N=Math.min(l,a);g=Gt(Jk||(Jk=On(["M ",",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,p,e+h*N,t,e+r-h*N,t,N,N,p,e+r,t+f*N,e+r,t+n-f*N,N,N,p,e+r-h*N,t+n,e+h*N,t+n,N,N,p,e,t+n-f*N)}else g=Gt(ej||(ej=On(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},oj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},hF=e=>{var t=nn(e,oj),r=v.useRef(null),n=v.useState(-1),a=lF(n,2),o=a[0],c=a[1];v.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Y=r.current.getTotalLength();Y&&c(Y)}catch{}},[]);var l=t.x,f=t.y,h=t.width,p=t.height,g=t.radius,x=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=v.useRef(h),O=v.useRef(p),P=v.useRef(l),_=v.useRef(f),C=v.useMemo(()=>({x:l,y:f,width:h,height:p,radius:g}),[l,f,h,p,g]),I=KA(C,"rectangle-");if(l!==+l||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var B=nt("recharts-rectangle",x);if(!N){var U=en(t);U.radius;var G=nj(U,rF);return v.createElement("path",_f({},G,{x:ma(l),y:ma(f),width:ma(h),height:ma(p),radius:typeof g=="number"?g:void 0,className:B,d:aj(l,f,h,p,g)}))}var X=E.current,$=O.current,fe=P.current,J=_.current,pe="0px ".concat(o===-1?1:o,"px"),be="".concat(o,"px ").concat(o,"px"),de=tF(["strokeDasharray"],j,typeof b=="string"?b:oj.animationEasing);return v.createElement(HA,{animationId:I,key:I,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},Y=>{var V=di(X,h,Y),Q=di($,p,Y),D=di(fe,l,Y),T=di(J,f,Y);r.current&&(E.current=V,O.current=Q,P.current=D,_.current=T);var Z;S?Y>0?Z={transition:de,strokeDasharray:be}:Z={strokeDasharray:pe}:Z={strokeDasharray:be};var oe=en(t);oe.radius;var re=nj(oe,nF);return v.createElement("path",_f({},re,{radius:typeof g=="number"?g:void 0,className:B,d:aj(D,T,V,Q,g),ref:r,style:rj(rj({},Z),t.style)}))})};function sj(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 lj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sj(Object(r),!0).forEach(function(n){pF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pF(e,t,r){return(t=mF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mF(e){var t=gF(e,"string");return typeof t=="symbol"?t:t+""}function gF(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 Mf=Math.PI/180,vF=e=>e*180/Math.PI,Qt=(e,t,r,n)=>({x:e+Math.cos(-Mf*n)*r,y:t+Math.sin(-Mf*n)*r}),yF=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},xF=(e,t)=>{var r=e.x,n=e.y,a=t.x,o=t.y;return Math.sqrt((r-a)**2+(n-o)**2)},bF=(e,t)=>{var r=e.x,n=e.y,a=t.cx,o=t.cy,c=xF({x:r,y:n},{x:a,y:o});if(c<=0)return{radius:c,angle:0};var l=(r-a)/c,f=Math.acos(l);return n>o&&(f=2*Math.PI-f),{radius:c,angle:vF(f),angleInRadian:f}},wF=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}},kF=(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},jF=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=bF({x:r,y:n},t),o=a.radius,c=a.angle,l=t.innerRadius,f=t.outerRadius;if(o<l||o>f||o===0)return null;var h=wF(t),p=h.startAngle,g=h.endAngle,x=c,b;if(p<=g){for(;x>g;)x-=360;for(;x<p;)x+=360;b=x>=p&&x<=g}else{for(;x>p;)x-=360;for(;x<g;)x+=360;b=x>=g&&x<=p}return b?lj(lj({},t),{},{radius:o,angle:kF(x,t)}):null};function GA(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,o=e.endAngle,c=Qt(t,r,n,a),l=Qt(t,r,n,o);return{points:[c,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:o}}var uj,cj,dj,fj,hj,pj,mj;function Wv(){return Wv=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},Wv.apply(null,arguments)}function Ya(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var SF=(e,t)=>{var r=Xr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},zd=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,o=e.sign,c=e.isExternal,l=e.cornerRadius,f=e.cornerIsExternal,h=l*(c?1:-1)+n,p=Math.asin(l/h)/Mf,g=f?a:a+o*p,x=Qt(t,r,h,g),b=Qt(t,r,n,g),j=f?a-o*p:a,k=Qt(t,r,h*Math.cos(p*Mf),j);return{center:x,circleTangency:b,lineTangency:k,theta:p}},VA=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.startAngle,c=e.endAngle,l=SF(o,c),f=o+l,h=Qt(t,r,a,o),p=Qt(t,r,a,f),g=Gt(uj||(uj=Ya(["M ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,",",`
|
||
`])),h.x,h.y,a,a,+(Math.abs(l)>180),+(o>f),p.x,p.y);if(n>0){var x=Qt(t,r,n,o),b=Qt(t,r,n,f);g+=Gt(cj||(cj=Ya(["L ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(l)>180),+(o<=f),x.x,x.y)}else g+=Gt(dj||(dj=Ya(["L ",","," Z"])),t,r);return g},NF=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,c=e.forceCornerRadius,l=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,p=Xr(h-f),g=zd({cx:t,cy:r,radius:a,angle:f,sign:p,cornerRadius:o,cornerIsExternal:l}),x=g.circleTangency,b=g.lineTangency,j=g.theta,k=zd({cx:t,cy:r,radius:a,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:l}),S=k.circleTangency,N=k.lineTangency,E=k.theta,O=l?Math.abs(f-h):Math.abs(f-h)-j-E;if(O<0)return c?Gt(fj||(fj=Ya(["M ",",",`
|
||
a`,",",",0,0,1,",`,0
|
||
a`,",",",0,0,1,",`,0
|
||
`])),b.x,b.y,o,o,o*2,o,o,-o*2):VA({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var P=Gt(hj||(hj=Ya(["M ",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
`])),b.x,b.y,o,o,+(p<0),x.x,x.y,a,a,+(O>180),+(p<0),S.x,S.y,o,o,+(p<0),N.x,N.y);if(n>0){var _=zd({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),C=_.circleTangency,I=_.lineTangency,B=_.theta,U=zd({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),G=U.circleTangency,X=U.lineTangency,$=U.theta,fe=l?Math.abs(f-h):Math.abs(f-h)-B-$;if(fe<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=Gt(pj||(pj=Ya(["L",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",","Z"])),X.x,X.y,o,o,+(p<0),G.x,G.y,n,n,+(fe>180),+(p>0),C.x,C.y,o,o,+(p<0),I.x,I.y)}else P+=Gt(mj||(mj=Ya(["L",",","Z"])),t,r);return P},EF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},AF=e=>{var t=nn(e,EF),r=t.cx,n=t.cy,a=t.innerRadius,o=t.outerRadius,c=t.cornerRadius,l=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,g=t.className;if(o<a||h===p)return null;var x=nt("recharts-sector",g),b=o-a,j=wa(c,b,0,!0),k;return j>0&&Math.abs(h-p)<360?k=NF({cx:r,cy:n,innerRadius:a,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:l,cornerIsExternal:f,startAngle:h,endAngle:p}):k=VA({cx:r,cy:n,innerRadius:a,outerRadius:o,startAngle:h,endAngle:p}),v.createElement("path",Wv({},en(t),{className:x,d:k}))};function PF(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(PE(t)){if(e==="centric"){var n=t.cx,a=t.cy,o=t.innerRadius,c=t.outerRadius,l=t.angle,f=Qt(n,a,o,l),h=Qt(n,a,c,l);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return GA(t)}}function CF(e){return UE(e)?NaN:Number(e)}function yg(e){return e?(e=CF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function qA(e,t,r){r&&typeof r!="number"&&jv(e,t,r)&&(t=r=void 0),e=yg(e),t===void 0?(t=e,e=0):t=yg(t),r=r===void 0?e<t?1:-1:yg(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 jn=e=>e.chartData,Ky=K([jn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Rh=(e,t,r,n)=>n?Ky(e):jn(e),OF=(e,t,r)=>r?Ky(e):jn(e),_F=K([Rh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});K([Ky],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var MF=K([jn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Gy(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 gj(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)?gj(e,t):void 0}}function gj(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,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function RF(e){if(Array.isArray(e))return e}function Fn(e){if(Array.isArray(e)&&e.length===2){var t=Gy(e,2),r=t[0],n=t[1];if(He(r)&&He(n))return!0}return!1}function vj(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function QA(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=Gy(e,2),n=r[0],a=r[1],o,c;if(He(n))o=n;else if(typeof n=="function")return;if(He(a))c=a;else if(typeof a=="function")return;var l=[o,c];if(Fn(l))return l}}function $F(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Fn(n))return vj(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var a=Gy(e,2),o=a[0],c=a[1],l,f;if(o==="auto")t!=null&&(l=Math.min(...t));else if(Ne(o))l=o;else if(typeof o=="function")try{t!=null&&(l=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&uk.test(o)){var h=uk.exec(o);if(h==null||h[1]==null||t==null)l=void 0;else{var p=+h[1];l=t[0]-p}}else l=t==null?void 0:t[0];if(c==="auto")t!=null&&(f=Math.max(...t));else if(Ne(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"&&ck.test(c)){var g=ck.exec(c);if(g==null||g[1]==null||t==null)f=void 0;else{var x=+g[1];f=t[1]+x}}else f=t==null?void 0:t[1];var b=[l,f];if(Fn(b))return t==null?b:vj(b,t,r)}}}var Xs=1e9,LF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},qy,ct=!0,rn="[DecimalError] ",fo=rn+"Invalid argument: ",Vy=rn+"Exponent out of range: ",Zs=Math.floor,Va=Math.pow,zF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dr,Lt=1e7,lt=7,YA=9007199254740991,If=Zs(YA/lt),ke={};ke.absoluteValue=ke.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ke.comparedTo=ke.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};ke.decimalPlaces=ke.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};ke.dividedBy=ke.div=function(e){return gi(this,new this.constructor(e))};ke.dividedToIntegerBy=ke.idiv=function(e){var t=this,r=t.constructor;return et(gi(t,new r(e),0,1),r.precision)};ke.equals=ke.eq=function(e){return!this.cmp(e)};ke.exponent=function(){return Nt(this)};ke.greaterThan=ke.gt=function(e){return this.cmp(e)>0};ke.greaterThanOrEqualTo=ke.gte=function(e){return this.cmp(e)>=0};ke.isInteger=ke.isint=function(){return this.e>this.d.length-2};ke.isNegative=ke.isneg=function(){return this.s<0};ke.isPositive=ke.ispos=function(){return this.s>0};ke.isZero=function(){return this.s===0};ke.lessThan=ke.lt=function(e){return this.cmp(e)<0};ke.lessThanOrEqualTo=ke.lte=function(e){return this.cmp(e)<1};ke.logarithm=ke.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(Dr))throw Error(rn+"NaN");if(r.s<1)throw Error(rn+(r.s?"NaN":"-Infinity"));return r.eq(Dr)?new n(0):(ct=!1,t=gi(Tu(r,o),Tu(e,o),o),ct=!0,et(t,a))};ke.minus=ke.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?JA(t,e):XA(t,(e.s=-e.s,e))};ke.modulo=ke.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(rn+"NaN");return r.s?(ct=!1,t=gi(r,e,0,1).times(e),ct=!0,r.minus(t)):et(new n(r),a)};ke.naturalExponential=ke.exp=function(){return ZA(this)};ke.naturalLogarithm=ke.ln=function(){return Tu(this)};ke.negated=ke.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ke.plus=ke.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?XA(t,e):JA(t,(e.s=-e.s,e))};ke.precision=ke.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(fo+e);if(t=Nt(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};ke.squareRoot=ke.sqrt=function(){var e,t,r,n,a,o,c,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(rn+"NaN")}for(e=Nt(l),ct=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=Ln(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Zs((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(gi(l,o,c+2)).times(.5),Ln(o.d).slice(0,c)===(t=Ln(n.d)).slice(0,c)){if(t=t.slice(c-3,c+1),a==c&&t=="4999"){if(et(o,r+1,0),o.times(o).eq(l)){n=o;break}}else if(t!="9999")break;c+=4}return ct=!0,et(n,r)};ke.times=ke.mul=function(e){var t,r,n,a,o,c,l,f,h,p=this,g=p.constructor,x=p.d,b=(e=new g(e)).d;if(!p.s||!e.s)return new g(0);for(e.s*=p.s,r=p.e+e.e,f=x.length,h=b.length,f<h&&(o=x,x=b,b=o,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;)l=o[a]+b[n]*x[a-n-1]+t,o[a--]=l%Lt|0,t=l/Lt|0;o[a]=(o[a]+t)%Lt|0}for(;!o[--c];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ct?et(e,g.precision):e};ke.toDecimalPlaces=ke.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Kn(e,0,Xs),t===void 0?t=n.rounding:Kn(t,0,8),et(r,e+Nt(r)+1,t))};ke.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=bo(n,!0):(Kn(e,0,Xs),t===void 0?t=a.rounding:Kn(t,0,8),n=et(new a(n),e+1,t),r=bo(n,!0,e+1)),r};ke.toFixed=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?bo(a):(Kn(e,0,Xs),t===void 0?t=o.rounding:Kn(t,0,8),n=et(new o(a),e+Nt(a)+1,t),r=bo(n.abs(),!1,e+Nt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};ke.toInteger=ke.toint=function(){var e=this,t=e.constructor;return et(new t(e),Nt(e)+1,t.rounding)};ke.toNumber=function(){return+this};ke.toPower=ke.pow=function(e){var t,r,n,a,o,c,l=this,f=l.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Dr);if(l=new f(l),!l.s){if(e.s<1)throw Error(rn+"Infinity");return l}if(l.eq(Dr))return l;if(n=f.precision,e.eq(Dr))return et(l,n);if(t=e.e,r=e.d.length-1,c=t>=r,o=l.s,c){if((r=p<0?-p:p)<=YA){for(a=new f(Dr),t=Math.ceil(n/lt+4),ct=!1;r%2&&(a=a.times(l),xj(a.d,t)),r=Zs(r/2),r!==0;)l=l.times(l),xj(l.d,t);return ct=!0,e.s<0?new f(Dr).div(a):et(a,n)}}else if(o<0)throw Error(rn+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,ct=!1,a=e.times(Tu(l,n+h)),ct=!0,a=ZA(a),a.s=o,a};ke.toPrecision=function(e,t){var r,n,a=this,o=a.constructor;return e===void 0?(r=Nt(a),n=bo(a,r<=o.toExpNeg||r>=o.toExpPos)):(Kn(e,1,Xs),t===void 0?t=o.rounding:Kn(t,0,8),a=et(new o(a),e,t),r=Nt(a),n=bo(a,e<=r||r<=o.toExpNeg,e)),n};ke.toSignificantDigits=ke.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Kn(e,1,Xs),t===void 0?t=n.rounding:Kn(t,0,8)),et(new n(r),e,t)};ke.toString=ke.valueOf=ke.val=ke.toJSON=ke[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Nt(e),r=e.constructor;return bo(e,t<=r.toExpNeg||t>=r.toExpPos)};function XA(e,t){var r,n,a,o,c,l,f,h,p=e.constructor,g=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ct?et(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,l=h.length):(n=h,a=c,l=f.length),c=Math.ceil(g/lt),l=c>l?c+1:l+1,o>l&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(l=f.length,o=h.length,l-o<0&&(o=l,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Lt|0,f[o]%=Lt;for(r&&(f.unshift(r),++a),l=f.length;f[--l]==0;)f.pop();return t.d=f,t.e=a,ct?et(t,g):t}function Kn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(fo+e)}function Ln(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+=ia(r)),o+=n;c=e[t],n=c+"",r=lt-n.length,r&&(o+=ia(r))}else if(c===0)return"0";for(;c%10===0;)c/=10;return o+c}var gi=(function(){function e(n,a){var o,c=0,l=n.length;for(n=n.slice();l--;)o=n[l]*a+c,n[l]=o%Lt|0,c=o/Lt|0;return c&&n.unshift(c),n}function t(n,a,o,c){var l,f;if(o!=c)f=o>c?1:-1;else for(l=f=0;l<o;l++)if(n[l]!=a[l]){f=n[l]>a[l]?1:-1;break}return f}function r(n,a,o){for(var c=0;o--;)n[o]-=c,c=n[o]<a[o]?1:0,n[o]=c*Lt+n[o]-a[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,o,c){var l,f,h,p,g,x,b,j,k,S,N,E,O,P,_,C,I,B,U=n.constructor,G=n.s==a.s?1:-1,X=n.d,$=a.d;if(!n.s)return new U(n);if(!a.s)throw Error(rn+"Division by zero");for(f=n.e-a.e,I=$.length,_=X.length,b=new U(G),j=b.d=[],h=0;$[h]==(X[h]||0);)++h;if($[h]>(X[h]||0)&&--f,o==null?E=o=U.precision:c?E=o+(Nt(n)-Nt(a))+1:E=o,E<0)return new U(0);if(E=E/lt+2|0,h=0,I==1)for(p=0,$=$[0],E++;(h<_||p)&&E--;h++)O=p*Lt+(X[h]||0),j[h]=O/$|0,p=O%$|0;else{for(p=Lt/($[0]+1)|0,p>1&&($=e($,p),X=e(X,p),I=$.length,_=X.length),P=I,k=X.slice(0,I),S=k.length;S<I;)k[S++]=0;B=$.slice(),B.unshift(0),C=$[0],$[1]>=Lt/2&&++C;do p=0,l=t($,k,I,S),l<0?(N=k[0],I!=S&&(N=N*Lt+(k[1]||0)),p=N/C|0,p>1?(p>=Lt&&(p=Lt-1),g=e($,p),x=g.length,S=k.length,l=t(g,k,x,S),l==1&&(p--,r(g,I<x?B:$,x))):(p==0&&(l=p=1),g=$.slice()),x=g.length,x<S&&g.unshift(0),r(k,g,S),l==-1&&(S=k.length,l=t($,k,I,S),l<1&&(p++,r(k,I<S?B:$,S))),S=k.length):l===0&&(p++,k=[0]),j[h++]=p,l&&k[0]?k[S++]=X[P]||0:(k=[X[P]],S=1);while((P++<_||k[0]!==void 0)&&E--)}return j[0]||j.shift(),b.e=f,et(b,c?o+Nt(b)+1:o)}})();function ZA(e,t){var r,n,a,o,c,l,f=0,h=0,p=e.constructor,g=p.precision;if(Nt(e)>16)throw Error(Vy+Nt(e));if(!e.s)return new p(Dr);for(ct=!1,l=g,c=new p(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(n=Math.log(Va(2,h))/Math.LN10*2+5|0,l+=n,r=a=o=new p(Dr),p.precision=l;;){if(a=et(a.times(e),l),r=r.times(++f),c=o.plus(gi(a,r,l)),Ln(c.d).slice(0,l)===Ln(o.d).slice(0,l)){for(;h--;)o=et(o.times(o),l);return p.precision=g,t==null?(ct=!0,et(o,g)):o}o=c}}function Nt(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function xg(e,t,r){if(t>e.LN10.sd())throw ct=!0,r&&(e.precision=r),Error(rn+"LN10 precision limit exceeded");return et(new e(e.LN10),t)}function ia(e){for(var t="";e--;)t+="0";return t}function Tu(e,t){var r,n,a,o,c,l,f,h,p,g=1,x=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(rn+(b.s?"NaN":"-Infinity"));if(b.eq(Dr))return new k(0);if(t==null?(ct=!1,h=S):h=t,b.eq(10))return t==null&&(ct=!0),xg(k,h);if(h+=x,k.precision=h,r=Ln(j),n=r.charAt(0),o=Nt(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Ln(b.d),n=r.charAt(0),g++;o=Nt(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=xg(k,h+2,S).times(o+""),b=Tu(new k(n+"."+r.slice(1)),h-x).plus(f),k.precision=S,t==null?(ct=!0,et(b,S)):b;for(l=c=b=gi(b.minus(Dr),b.plus(Dr),h),p=et(b.times(b),h),a=3;;){if(c=et(c.times(p),h),f=l.plus(gi(c,new k(a),h)),Ln(f.d).slice(0,h)===Ln(l.d).slice(0,h))return l=l.times(2),o!==0&&(l=l.plus(xg(k,h+2,S).times(o+""))),l=gi(l,new k(g),h),k.precision=S,t==null?(ct=!0,et(l,S)):l;l=f,a+=2}}function yj(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=Zs(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),ct&&(e.e>If||e.e<-If))throw Error(Vy+r)}else e.s=0,e.e=0,e.d=[0];return e}function et(e,t,r){var n,a,o,c,l,f,h,p,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[p=0];else{if(p=Math.ceil((n+1)/lt),o=g.length,p>=o)return e;for(h=o=g[p],c=1;o>=10;o/=10)c++;n%=lt,a=n-lt+c}if(r!==void 0&&(o=Va(10,c-a-1),l=h/o%10|0,f=t<0||g[p+1]!==void 0||h%o,f=r<4?(l||f)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||f||r==6&&(n>0?a>0?h/Va(10,c-a):0:g[p-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=Nt(e),g.length=1,t=t-o-1,g[0]=Va(10,(lt-t%lt)%lt),e.e=Zs(-t/lt)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=p,o=1,p--):(g.length=p+1,o=Va(10,lt-n),g[p]=a>0?(h/Va(10,c-a)%Va(10,a)|0)*o:0),f)for(;;)if(p==0){(g[0]+=o)==Lt&&(g[0]=1,++e.e);break}else{if(g[p]+=o,g[p]!=Lt)break;g[p--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ct&&(e.e>If||e.e<-If))throw Error(Vy+Nt(e));return e}function JA(e,t){var r,n,a,o,c,l,f,h,p,g,x=e.constructor,b=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),ct?et(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),c=h-n,c){for(p=c<0,p?(r=f,c=-c,l=g.length):(r=g,n=h,l=f.length),a=Math.max(Math.ceil(b/lt),l)+2,c>a&&(c=a,r.length=1),r.reverse(),a=c;a--;)r.push(0);r.reverse()}else{for(a=f.length,l=g.length,p=a<l,p&&(l=a),a=0;a<l;a++)if(f[a]!=g[a]){p=f[a]<g[a];break}c=0}for(p&&(r=f,f=g,g=r,t.s=-t.s),l=f.length,a=g.length-l;a>0;--a)f[l++]=0;for(a=g.length;a>c;){if(f[--a]<g[a]){for(o=a;o&&f[--o]===0;)f[o]=Lt-1;--f[o],f[a]+=Lt}f[a]-=g[a]}for(;f[--l]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ct?et(t,b):t):new x(0)}function bo(e,t,r){var n,a=Nt(e),o=Ln(e.d),c=o.length;return t?(r&&(n=r-c)>0?o=o.charAt(0)+"."+o.slice(1)+ia(n):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+ia(-a-1)+o,r&&(n=r-c)>0&&(o+=ia(n))):a>=c?(o+=ia(a+1-c),r&&(n=r-a-1)>0&&(o=o+"."+ia(n))):((n=a+1)<c&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-c)>0&&(a+1===c&&(o+="."),o+=ia(n))),e.s<0?"-"+o:o}function xj(e,t){if(e.length>t)return e.length=t,!0}function eP(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(fo+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 yj(c,o.toString())}else if(typeof o!="string")throw Error(fo+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,zF.test(o))yj(c,o);else throw Error(fo+o)}if(a.prototype=ke,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=eP,a.config=a.set=FF,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 FF(e){if(!e||typeof e!="object")throw Error(rn+"Object expected");var t,r,n,a=["precision",1,Xs,"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(Zs(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(fo+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(fo+r+": "+n);return this}var qy=eP(LF);Dr=new qy(1);const Ge=qy;function tP(e){var t;return e===0?t=1:t=Math.floor(new Ge(e).abs().log(10).toNumber())+1,t}function rP(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 HF(e)||WF(e,t)||UF(e,t)||BF()}function BF(){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 UF(e,t){if(e){if(typeof e=="string")return bj(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)?bj(e,t):void 0}}function bj(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 WF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function HF(e){if(Array.isArray(e))return e}var nP=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]},Qy=(e,t,r)=>{if(e.lte(0))return new Ge(0);var n=tP(e.toNumber()),a=new Ge(10).pow(n),o=e.div(a),c=n!==1?.05:.1,l=new Ge(Math.ceil(o.div(c).toNumber())).add(r).mul(c),f=l.mul(a);return t?new Ge(f.toNumber()):new Ge(Math.ceil(f.toNumber()))},iP=(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()),l=new Ge(10).pow(c),f=e.div(l).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(l=l.mul(10),h=0),h+=r,h>=a.length){var p=Math.floor(h/a.length);h%=a.length,l=l.mul(new Ge(10).pow(p))}var g=(n=a[h])!==null&&n!==void 0?n:1,x=new Ge(g).mul(l);return t?x:new Ge(Math.ceil(x.toNumber()))},KF=(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(tP(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),l=[],f=0;f<t;f++)l.push(a.add(new Ge(f-c).mul(n)).toNumber());return l},aP=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]:Qy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ge(0),tickMin:new Ge(0),tickMax:new Ge(0)};var l=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(l)));var h=Math.ceil(f.sub(t).div(l).toNumber()),p=Math.ceil(new Ge(r).sub(f).div(l).toNumber()),g=h+p+1;return g>n?aP(t,r,n,a,o+1,c):(g<n&&(p=r>0?p+(n-g):p,h=r>0?h:h+(n-g)),{step:l,tickMin:f.sub(new Ge(h).mul(l)),tickMax:f.add(new Ge(p).mul(l))})},wj=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,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=nP([n,a]),p=Du(h,2),g=p[0],x=p[1];if(g===-1/0||x===1/0){var b=x===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),x];return n>a?b.reverse():b}if(g===x)return KF(g,o,c);var j=l==="snap125"?iP:Qy,k=aP(g,x,f,c,0,j),S=k.step,N=k.tickMin,E=k.tickMax,O=rP(N,E.add(new Ge(.1).mul(S)),S);return n>a?O.reverse():O},kj=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,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=nP([a,o]),h=Du(f,2),p=h[0],g=h[1];if(p===-1/0||g===1/0)return[a,o];if(p===g)return[p];var x=l==="snap125"?iP:Qy,b=Math.max(r,2),j=x(new Ge(g).sub(p).div(b-1),c,0),k=[...rP(new Ge(p),new Ge(g),j),g];return c===!1&&(k=k.map(S=>Math.round(S))),a>o?k.reverse():k},GF=e=>e.rootProps.barCategoryGap,$h=e=>e.rootProps.stackOffset,oP=e=>e.rootProps.reverseStackOrder,Yy=e=>e.options.chartName,Xy=e=>e.rootProps.syncId,sP=e=>e.rootProps.syncMethod,Zy=e=>e.options.eventEmitter,VF=e=>e.rootProps.baseValue,hr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},za={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},_n={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Lh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function zh(e,t,r){if(r!=="auto")return r;if(e!=null)return Vn(e,t)?"category":"number"}function jj(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 Tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jj(Object(r),!0).forEach(function(n){qF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qF(e,t,r){return(t=QF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QF(e){var t=YF(e,"string");return typeof t=="symbol"?t:t+""}function YF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sj={allowDataOverflow:za.allowDataOverflow,allowDecimals:za.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:za.angleAxisId,includeHidden:!1,name:void 0,reversed:za.reversed,scale:za.scale,tick:za.tick,tickCount:void 0,ticks:void 0,type:za.type,unit:void 0,niceTicks:"auto"},Nj={allowDataOverflow:_n.allowDataOverflow,allowDecimals:_n.allowDecimals,allowDuplicatedCategory:_n.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:_n.radiusAxisId,includeHidden:_n.includeHidden,name:void 0,reversed:_n.reversed,scale:_n.scale,tick:_n.tick,tickCount:_n.tickCount,ticks:void 0,type:_n.type,unit:void 0,niceTicks:"auto"},XF=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Jy=K([XF,_A],(e,t)=>{var r;if(e!=null)return e;var n=(r=zh(t,"angleAxis",Sj.type))!==null&&r!==void 0?r:"category";return Tf(Tf({},Sj),{},{type:n})}),ZF=(e,t)=>e.polarAxis.radiusAxis[t],e0=K([ZF,_A],(e,t)=>{var r;if(e!=null)return e;var n=(r=zh(t,"radiusAxis",Nj.type))!==null&&r!==void 0?r:"category";return Tf(Tf({},Nj),{},{type:n})}),Fh=e=>e.polarOptions,t0=K([ji,Si,Zt],yF),lP=K([Fh,t0],(e,t)=>{if(e!=null)return wa(e.innerRadius,t,0)}),uP=K([Fh,t0],(e,t)=>{if(e!=null)return wa(e.outerRadius,t,t*.8)}),JF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},cP=K([Fh],JF);K([Jy,cP],Lh);var dP=K([t0,lP,uP],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});K([e0,dP],Lh);var fP=K([dt,Fh,lP,uP,ji,Si],(e,t,r,n,a,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var c=t.cx,l=t.cy,f=t.startAngle,h=t.endAngle;return{cx:wa(c,a,a/2),cy:wa(l,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Ft=(e,t)=>t,Bh=(e,t,r)=>r;function r0(e){return e==null?void 0:e.id}function hP(e,t,r){var n=t.chartData,a=n===void 0?[]:n,o=r.allowDuplicatedCategory,c=r.dataKey,l=new Map;return e.forEach(f=>{var h,p=(h=f.data)!==null&&h!==void 0?h:a;if(!(p==null||p.length===0)){var g=r0(f);p.forEach((x,b)=>{var j=c==null||o?b:String(zt(x,c,null)),k=zt(x,f.dataKey,0),S;l.has(j)?S=l.get(j):S={},Object.assign(S,{[g]:k}),l.set(j,S)})}}),Array.from(l.values())}function n0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Uh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Wh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function e8(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 Bt=e=>{var t=dt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Js=e=>e.tooltip.settings.axisId;function i0(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],l=a[1];return c<=l?o>=c&&o<=l:o>=l&&o<=c},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,c)=>{var l=e(o);if(l!=null){if(e.bandwidth&&c!==null&&c!==void 0&&c.position){var f=e.bandwidth();switch(c.position){case"middle":l+=f/2;break;case"end":l+=f;break}}return l}}}}}var t8=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Fn(t)){for(var r,n,a=0;a<t.length;a++){var o=t[a];He(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 ya(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function r8(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a0(e){let t,r,n;e.length!==2?(t=ya,r=(l,f)=>ya(e(l),f),n=(l,f)=>e(l)-f):(t=e===ya||e===r8?e:n8,r=e,n=e);function a(l,f,h=0,p=l.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(l[g],f)<0?h=g+1:p=g}while(h<p)}return h}function o(l,f,h=0,p=l.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(l[g],f)<=0?h=g+1:p=g}while(h<p)}return h}function c(l,f,h=0,p=l.length){const g=a(l,f,h,p-1);return g>h&&n(l[g-1],f)>-n(l[g],f)?g-1:g}return{left:a,center:c,right:o}}function n8(){return 0}function pP(e){return e===null?NaN:+e}function*i8(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const a8=a0(ya),nc=a8.right;a0(pP).center;class Ej extends Map{constructor(t,r=l8){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(Aj(this,t))}has(t){return super.has(Aj(this,t))}set(t,r){return super.set(o8(this,t),r)}delete(t){return super.delete(s8(this,t))}}function Aj({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function o8({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function s8({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function l8(e){return e!==null&&typeof e=="object"?e.valueOf():e}function u8(e=ya){if(e===ya)return mP;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 mP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const c8=Math.sqrt(50),d8=Math.sqrt(10),f8=Math.sqrt(2);function Df(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>=c8?10:o>=d8?5:o>=f8?2:1;let l,f,h;return a<0?(h=Math.pow(10,-a)/c,l=Math.round(e*h),f=Math.round(t*h),l/h<e&&++l,f/h>t&&--f,h=-h):(h=Math.pow(10,a)*c,l=Math.round(e/h),f=Math.round(t/h),l*h<e&&++l,f*h>t&&--f),f<l&&.5<=r&&r<2?Df(e,t,r*2):[l,f,h]}function Hv(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?Df(t,e,r):Df(e,t,r);if(!(o>=a))return[];const l=o-a+1,f=new Array(l);if(n)if(c<0)for(let h=0;h<l;++h)f[h]=(o-h)/-c;else for(let h=0;h<l;++h)f[h]=(o-h)*c;else if(c<0)for(let h=0;h<l;++h)f[h]=(a+h)/-c;else for(let h=0;h<l;++h)f[h]=(a+h)*c;return f}function Kv(e,t,r){return t=+t,e=+e,r=+r,Df(e,t,r)[2]}function Gv(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Kv(t,e,r):Kv(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Pj(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Cj(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function gP(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?mP:u8(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),g=.5*Math.exp(2*p/3),x=.5*Math.sqrt(p*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+x)),j=Math.min(n,Math.floor(t+(f-h)*g/f+x));gP(e,t,b,j,a)}const o=e[t];let c=r,l=n;for(iu(e,r,t),a(e[n],o)>0&&iu(e,r,n);c<l;){for(iu(e,c,l),++c,--l;a(e[c],o)<0;)++c;for(;a(e[l],o)>0;)--l}a(e[r],o)===0?iu(e,r,l):(++l,iu(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function iu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function h8(e,t,r){if(e=Float64Array.from(i8(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Cj(e);if(t>=1)return Pj(e);var n,a=(n-1)*t,o=Math.floor(a),c=Pj(gP(e,o).subarray(0,o+1)),l=Cj(e.subarray(o+1));return c+(l-c)*(a-o)}}function p8(e,t,r=pP){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),l=+r(e[o+1],o+1,e);return c+(l-c)*(a-o)}}function m8(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 an(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ni(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 Vv=Symbol("implicit");function o0(){var e=new Ej,t=[],r=[],n=Vv;function a(o){let c=e.get(o);if(c===void 0){if(n!==Vv)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 Ej;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 o0(t,r).unknown(n)},an.apply(a,arguments),a}function s0(){var e=o0().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,c,l=!1,f=0,h=0,p=.5;delete e.unknown;function g(){var x=t().length,b=a<n,j=b?a:n,k=b?n:a;o=(k-j)/Math.max(1,x-f+h*2),l&&(o=Math.floor(o)),j+=(k-j-o*(x-f))*p,c=o*(1-f),l&&(j=Math.round(j),c=Math.round(c));var S=m8(x).map(function(N){return j+o*N});return r(b?S.reverse():S)}return e.domain=function(x){return arguments.length?(t(x),g()):t()},e.range=function(x){return arguments.length?([n,a]=x,n=+n,a=+a,g()):[n,a]},e.rangeRound=function(x){return[n,a]=x,n=+n,a=+a,l=!0,g()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(x){return arguments.length?(l=!!x,g()):l},e.padding=function(x){return arguments.length?(f=Math.min(1,h=+x),g()):f},e.paddingInner=function(x){return arguments.length?(f=Math.min(1,x),g()):f},e.paddingOuter=function(x){return arguments.length?(h=+x,g()):h},e.align=function(x){return arguments.length?(p=Math.max(0,Math.min(1,x)),g()):p},e.copy=function(){return s0(t(),[n,a]).round(l).paddingInner(f).paddingOuter(h).align(p)},an.apply(g(),arguments)}function vP(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return vP(t())},e}function g8(){return vP(s0.apply(null,arguments).paddingInner(1))}function l0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function yP(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ic(){}var Ru=.7,Rf=1/Ru,xs="\\s*([+-]?\\d+)\\s*",$u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",v8=/^#([0-9a-f]{3,8})$/,y8=new RegExp(`^rgb\\(${xs},${xs},${xs}\\)$`),x8=new RegExp(`^rgb\\(${Bn},${Bn},${Bn}\\)$`),b8=new RegExp(`^rgba\\(${xs},${xs},${xs},${$u}\\)$`),w8=new RegExp(`^rgba\\(${Bn},${Bn},${Bn},${$u}\\)$`),k8=new RegExp(`^hsl\\(${$u},${Bn},${Bn}\\)$`),j8=new RegExp(`^hsla\\(${$u},${Bn},${Bn},${$u}\\)$`),Oj={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};l0(ic,Lu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_j,formatHex:_j,formatHex8:S8,formatHsl:N8,formatRgb:Mj,toString:Mj});function _j(){return this.rgb().formatHex()}function S8(){return this.rgb().formatHex8()}function N8(){return xP(this).formatHsl()}function Mj(){return this.rgb().formatRgb()}function Lu(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=v8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ij(t):r===3?new Er(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Fd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Fd(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=y8.exec(e))?new Er(t[1],t[2],t[3],1):(t=x8.exec(e))?new Er(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=b8.exec(e))?Fd(t[1],t[2],t[3],t[4]):(t=w8.exec(e))?Fd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=k8.exec(e))?Rj(t[1],t[2]/100,t[3]/100,1):(t=j8.exec(e))?Rj(t[1],t[2]/100,t[3]/100,t[4]):Oj.hasOwnProperty(e)?Ij(Oj[e]):e==="transparent"?new Er(NaN,NaN,NaN,0):null}function Ij(e){return new Er(e>>16&255,e>>8&255,e&255,1)}function Fd(e,t,r,n){return n<=0&&(e=t=r=NaN),new Er(e,t,r,n)}function E8(e){return e instanceof ic||(e=Lu(e)),e?(e=e.rgb(),new Er(e.r,e.g,e.b,e.opacity)):new Er}function qv(e,t,r,n){return arguments.length===1?E8(e):new Er(e,t,r,n??1)}function Er(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}l0(Er,qv,yP(ic,{brighter(e){return e=e==null?Rf:Math.pow(Rf,e),new Er(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ru:Math.pow(Ru,e),new Er(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Er(ho(this.r),ho(this.g),ho(this.b),$f(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:Tj,formatHex:Tj,formatHex8:A8,formatRgb:Dj,toString:Dj}));function Tj(){return`#${Xa(this.r)}${Xa(this.g)}${Xa(this.b)}`}function A8(){return`#${Xa(this.r)}${Xa(this.g)}${Xa(this.b)}${Xa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dj(){const e=$f(this.opacity);return`${e===1?"rgb(":"rgba("}${ho(this.r)}, ${ho(this.g)}, ${ho(this.b)}${e===1?")":`, ${e})`}`}function $f(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ho(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xa(e){return e=ho(e),(e<16?"0":"")+e.toString(16)}function Rj(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new xn(e,t,r,n)}function xP(e){if(e instanceof xn)return new xn(e.h,e.s,e.l,e.opacity);if(e instanceof ic||(e=Lu(e)),!e)return new xn;if(e instanceof xn)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,l=o-a,f=(o+a)/2;return l?(t===o?c=(r-n)/l+(r<n)*6:r===o?c=(n-t)/l+2:c=(t-r)/l+4,l/=f<.5?o+a:2-o-a,c*=60):l=f>0&&f<1?0:c,new xn(c,l,f,e.opacity)}function P8(e,t,r,n){return arguments.length===1?xP(e):new xn(e,t,r,n??1)}function xn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}l0(xn,P8,yP(ic,{brighter(e){return e=e==null?Rf:Math.pow(Rf,e),new xn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ru:Math.pow(Ru,e),new xn(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 Er(bg(e>=240?e-240:e+120,a,n),bg(e,a,n),bg(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new xn($j(this.h),Bd(this.s),Bd(this.l),$f(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=$f(this.opacity);return`${e===1?"hsl(":"hsla("}${$j(this.h)}, ${Bd(this.s)*100}%, ${Bd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $j(e){return e=(e||0)%360,e<0?e+360:e}function Bd(e){return Math.max(0,Math.min(1,e||0))}function bg(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 u0=e=>()=>e;function C8(e,t){return function(r){return e+r*t}}function O8(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 _8(e){return(e=+e)==1?bP:function(t,r){return r-t?O8(t,r,e):u0(isNaN(t)?r:t)}}function bP(e,t){var r=t-e;return r?C8(e,r):u0(isNaN(e)?t:e)}const Lj=(function e(t){var r=_8(t);function n(a,o){var c=r((a=qv(a)).r,(o=qv(o)).r),l=r(a.g,o.g),f=r(a.b,o.b),h=bP(a.opacity,o.opacity);return function(p){return a.r=c(p),a.g=l(p),a.b=f(p),a.opacity=h(p),a+""}}return n.gamma=e,n})(1);function M8(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 I8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function T8(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]=el(e[c],t[c]);for(;c<r;++c)o[c]=t[c];return function(l){for(c=0;c<n;++c)o[c]=a[c](l);return o}}function D8(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Lf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function R8(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]=el(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Qv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wg=new RegExp(Qv.source,"g");function $8(e){return function(){return e}}function L8(e){return function(t){return e(t)+""}}function z8(e,t){var r=Qv.lastIndex=wg.lastIndex=0,n,a,o,c=-1,l=[],f=[];for(e=e+"",t=t+"";(n=Qv.exec(e))&&(a=wg.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),l[c]?l[c]+=o:l[++c]=o),(n=n[0])===(a=a[0])?l[c]?l[c]+=a:l[++c]=a:(l[++c]=null,f.push({i:c,x:Lf(n,a)})),r=wg.lastIndex;return r<t.length&&(o=t.slice(r),l[c]?l[c]+=o:l[++c]=o),l.length<2?f[0]?L8(f[0].x):$8(t):(t=f.length,function(h){for(var p=0,g;p<t;++p)l[(g=f[p]).i]=g.x(h);return l.join("")})}function el(e,t){var r=typeof t,n;return t==null||r==="boolean"?u0(t):(r==="number"?Lf:r==="string"?(n=Lu(t))?(t=n,Lj):z8:t instanceof Lu?Lj:t instanceof Date?D8:I8(t)?M8:Array.isArray(t)?T8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?R8:Lf)(e,t)}function c0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function F8(e,t){t===void 0&&(t=e,e=el);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 l=Math.max(0,Math.min(n-1,Math.floor(c*=n)));return o[l](c-l)}}function B8(e){return function(){return e}}function zf(e){return+e}var zj=[0,1];function pr(e){return e}function Yv(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:B8(isNaN(t)?NaN:.5)}function U8(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function W8(e,t,r){var n=e[0],a=e[1],o=t[0],c=t[1];return a<n?(n=Yv(a,n),o=r(c,o)):(n=Yv(n,a),o=r(o,c)),function(l){return o(n(l))}}function H8(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]=Yv(e[c],e[c+1]),o[c]=r(t[c],t[c+1]);return function(l){var f=nc(e,l,1,n)-1;return o[f](a[f](l))}}function ac(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Hh(){var e=zj,t=zj,r=el,n,a,o,c=pr,l,f,h;function p(){var x=Math.min(e.length,t.length);return c!==pr&&(c=U8(e[0],e[x-1])),l=x>2?H8:W8,f=h=null,g}function g(x){return x==null||isNaN(x=+x)?o:(f||(f=l(e.map(n),t,r)))(n(c(x)))}return g.invert=function(x){return c(a((h||(h=l(t,e.map(n),Lf)))(x)))},g.domain=function(x){return arguments.length?(e=Array.from(x,zf),p()):e.slice()},g.range=function(x){return arguments.length?(t=Array.from(x),p()):t.slice()},g.rangeRound=function(x){return t=Array.from(x),r=c0,p()},g.clamp=function(x){return arguments.length?(c=x?!0:pr,p()):c!==pr},g.interpolate=function(x){return arguments.length?(r=x,p()):r},g.unknown=function(x){return arguments.length?(o=x,g):o},function(x,b){return n=x,a=b,p()}}function d0(){return Hh()(pr,pr)}function K8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ff(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 Bs(e){return e=Ff(Math.abs(e)),e?e[1]:NaN}function G8(e,t){return function(r,n){for(var a=r.length,o=[],c=0,l=e[0],f=0;a>0&&l>0&&(f+l+1>n&&(l=Math.max(1,n-f)),o.push(r.substring(a-=l,a+l)),!((f+=l+1)>n));)l=e[c=(c+1)%e.length];return o.reverse().join(t)}}function V8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var q8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function zu(e){if(!(t=q8.exec(e)))throw new Error("invalid format: "+e);var t;return new f0({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=f0.prototype;function f0(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+""}f0.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 Q8(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 Bf;function Y8(e,t){var r=Ff(e,t);if(!r)return Bf=void 0,e.toPrecision(t);var n=r[0],a=r[1],o=a-(Bf=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")+Ff(e,Math.max(0,t+o-1))[0]}function Fj(e,t){var r=Ff(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 Bj={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:K8,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)=>Fj(e*100,t),r:Fj,s:Y8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Uj(e){return e}var Wj=Array.prototype.map,Hj=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function X8(e){var t=e.grouping===void 0||e.thousands===void 0?Uj:G8(Wj.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?Uj:V8(Wj.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,x){g=zu(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,E=g.width,O=g.comma,P=g.precision,_=g.trim,C=g.type;C==="n"?(O=!0,C="g"):Bj[C]||(P===void 0&&(P=12),_=!0,C="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var I=(x&&x.prefix!==void 0?x.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),B=(S==="$"?n:/[%p]/.test(C)?c:"")+(x&&x.suffix!==void 0?x.suffix:""),U=Bj[C],G=/[defgprs%]/.test(C);P=P===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function X($){var fe=I,J=B,pe,be,de;if(C==="c")J=U($)+J,$="";else{$=+$;var Y=$<0||1/$<0;if($=isNaN($)?f:U(Math.abs($),P),_&&($=Q8($)),Y&&+$==0&&k!=="+"&&(Y=!1),fe=(Y?k==="("?k:l:k==="-"||k==="("?"":k)+fe,J=(C==="s"&&!isNaN($)&&Bf!==void 0?Hj[8+Bf/3]:"")+J+(Y&&k==="("?")":""),G){for(pe=-1,be=$.length;++pe<be;)if(de=$.charCodeAt(pe),48>de||de>57){J=(de===46?a+$.slice(pe+1):$.slice(pe))+J,$=$.slice(0,pe);break}}}O&&!N&&($=t($,1/0));var V=fe.length+$.length+J.length,Q=V<E?new Array(E-V+1).join(b):"";switch(O&&N&&($=t(Q+$,Q.length?E-J.length:1/0),Q=""),j){case"<":$=fe+$+J+Q;break;case"=":$=fe+Q+$+J;break;case"^":$=Q.slice(0,V=Q.length>>1)+fe+$+J+Q.slice(V);break;default:$=Q+fe+$+J;break}return o($)}return X.toString=function(){return g+""},X}function p(g,x){var b=Math.max(-8,Math.min(8,Math.floor(Bs(x)/3)))*3,j=Math.pow(10,-b),k=h((g=zu(g),g.type="f",g),{suffix:Hj[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:p}}var Ud,h0,wP;Z8({thousands:",",grouping:[3],currency:["$",""]});function Z8(e){return Ud=X8(e),h0=Ud.format,wP=Ud.formatPrefix,Ud}function J8(e){return Math.max(0,-Bs(Math.abs(e)))}function eB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Bs(t)/3)))*3-Bs(Math.abs(e)))}function tB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bs(t)-Bs(e))+1}function kP(e,t,r,n){var a=Gv(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=eB(a,c))&&(n.precision=o),wP(n,c)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=tB(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=J8(a))&&(n.precision=o-(n.type==="%")*2);break}}return h0(n)}function ka(e){var t=e.domain;return e.ticks=function(r){var n=t();return Hv(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return kP(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],l=n[o],f,h,p=10;for(l<c&&(h=c,c=l,l=h,h=a,a=o,o=h);p-- >0;){if(h=Kv(c,l,r),h===f)return n[a]=c,n[o]=l,t(n);if(h>0)c=Math.floor(c/h)*h,l=Math.ceil(l/h)*h;else if(h<0)c=Math.ceil(c*h)/h,l=Math.floor(l*h)/h;else break;f=h}return e},e}function jP(){var e=d0();return e.copy=function(){return ac(e,jP())},an.apply(e,arguments),ka(e)}function SP(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,zf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return SP(e).unknown(t)},e=arguments.length?Array.from(e,zf):[0,1],ka(r)}function NP(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 Kj(e){return Math.log(e)}function Gj(e){return Math.exp(e)}function rB(e){return-Math.log(-e)}function nB(e){return-Math.exp(-e)}function iB(e){return isFinite(e)?+("1e"+e):e<0?0:e}function aB(e){return e===10?iB:e===Math.E?Math.exp:t=>Math.pow(e,t)}function oB(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 Vj(e){return(t,r)=>-e(-t,r)}function p0(e){const t=e(Kj,Gj),r=t.domain;let n=10,a,o;function c(){return a=oB(n),o=aB(n),r()[0]<0?(a=Vj(a),o=Vj(o),e(rB,nB)):e(Kj,Gj),t}return t.base=function(l){return arguments.length?(n=+l,c()):n},t.domain=function(l){return arguments.length?(r(l),c()):r()},t.ticks=l=>{const f=r();let h=f[0],p=f[f.length-1];const g=p<h;g&&([h,p]=[p,h]);let x=a(h),b=a(p),j,k;const S=l==null?10:+l;let N=[];if(!(n%1)&&b-x<S){if(x=Math.floor(x),b=Math.ceil(b),h>0){for(;x<=b;++x)for(j=1;j<n;++j)if(k=x<0?j/o(-x):j*o(x),!(k<h)){if(k>p)break;N.push(k)}}else for(;x<=b;++x)for(j=n-1;j>=1;--j)if(k=x>0?j/o(-x):j*o(x),!(k<h)){if(k>p)break;N.push(k)}N.length*2<S&&(N=Hv(h,p,S))}else N=Hv(x,b,Math.min(b-x,S)).map(o);return g?N.reverse():N},t.tickFormat=(l,f)=>{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=zu(f)).precision==null&&(f.trim=!0),f=h0(f)),l===1/0)return f;const h=Math.max(1,n*l/t.ticks().length);return p=>{let g=p/o(Math.round(a(p)));return g*n<n-.5&&(g*=n),g<=h?f(p):""}},t.nice=()=>r(NP(r(),{floor:l=>o(Math.floor(a(l))),ceil:l=>o(Math.ceil(a(l)))})),t}function EP(){const e=p0(Hh()).domain([1,10]);return e.copy=()=>ac(e,EP()).base(e.base()),an.apply(e,arguments),e}function qj(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Qj(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function m0(e){var t=1,r=e(qj(t),Qj(t));return r.constant=function(n){return arguments.length?e(qj(t=+n),Qj(t)):t},ka(r)}function AP(){var e=m0(Hh());return e.copy=function(){return ac(e,AP()).constant(e.constant())},an.apply(e,arguments)}function Yj(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function sB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lB(e){return e<0?-e*e:e*e}function g0(e){var t=e(pr,pr),r=1;function n(){return r===1?e(pr,pr):r===.5?e(sB,lB):e(Yj(r),Yj(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ka(t)}function v0(){var e=g0(Hh());return e.copy=function(){return ac(e,v0()).exponent(e.exponent())},an.apply(e,arguments),e}function uB(){return v0.apply(null,arguments).exponent(.5)}function Xj(e){return Math.sign(e)*e*e}function cB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function PP(){var e=d0(),t=[0,1],r=!1,n;function a(o){var c=cB(e(o));return isNaN(c)?n:r?Math.round(c):c}return a.invert=function(o){return e.invert(Xj(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,zf)).map(Xj)),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 PP(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},an.apply(a,arguments),ka(a)}function CP(){var e=[],t=[],r=[],n;function a(){var c=0,l=Math.max(1,t.length);for(r=new Array(l-1);++c<l;)r[c-1]=p8(e,c/l);return o}function o(c){return c==null||isNaN(c=+c)?n:t[nc(r,c)]}return o.invertExtent=function(c){var l=t.indexOf(c);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},o.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let l of c)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(ya),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 CP().domain(e).range(t).unknown(n)},an.apply(o,arguments)}function OP(){var e=0,t=1,r=1,n=[.5],a=[0,1],o;function c(f){return f!=null&&f<=f?a[nc(n,f,0,r)]:o}function l(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return c}return c.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,l()):[e,t]},c.range=function(f){return arguments.length?(r=(a=Array.from(f)).length-1,l()):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 OP().domain([e,t]).range(a).unknown(o)},an.apply(ka(c),arguments)}function _P(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[nc(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 _P().domain(e).range(t).unknown(r)},an.apply(a,arguments)}const kg=new Date,jg=new Date;function Mt(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),l=a.ceil(o);return o-c<l-o?c:l},a.offset=(o,c)=>(t(o=new Date(+o),c==null?1:Math.floor(c)),o),a.range=(o,c,l)=>{const f=[];if(o=a.ceil(o),l=l==null?1:Math.floor(l),!(o<c)||!(l>0))return f;let h;do f.push(h=new Date(+o)),t(o,l),e(o);while(h<o&&o<c);return f},a.filter=o=>Mt(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,l)=>{if(c>=c)if(l<0)for(;++l<=0;)for(;t(c,-1),!o(c););else for(;--l>=0;)for(;t(c,1),!o(c););}),r&&(a.count=(o,c)=>(kg.setTime(+o),jg.setTime(+c),e(kg),e(jg),Math.floor(r(kg,jg))),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 Uf=Mt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Mt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Uf);Uf.range;const fi=1e3,Jr=fi*60,hi=Jr*60,bi=hi*24,y0=bi*7,Zj=bi*30,Sg=bi*365,Za=Mt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*fi)},(e,t)=>(t-e)/fi,e=>e.getUTCSeconds());Za.range;const x0=Mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fi)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getMinutes());x0.range;const b0=Mt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getUTCMinutes());b0.range;const w0=Mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fi-e.getMinutes()*Jr)},(e,t)=>{e.setTime(+e+t*hi)},(e,t)=>(t-e)/hi,e=>e.getHours());w0.range;const k0=Mt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*hi)},(e,t)=>(t-e)/hi,e=>e.getUTCHours());k0.range;const oc=Mt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Jr)/bi,e=>e.getDate()-1);oc.range;const Kh=Mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bi,e=>e.getUTCDate()-1);Kh.range;const MP=Mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bi,e=>Math.floor(e/bi));MP.range;function Ao(e){return Mt(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())*Jr)/y0)}const Gh=Ao(0),Wf=Ao(1),dB=Ao(2),fB=Ao(3),Us=Ao(4),hB=Ao(5),pB=Ao(6);Gh.range;Wf.range;dB.range;fB.range;Us.range;hB.range;pB.range;function Po(e){return Mt(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)/y0)}const Vh=Po(0),Hf=Po(1),mB=Po(2),gB=Po(3),Ws=Po(4),vB=Po(5),yB=Po(6);Vh.range;Hf.range;mB.range;gB.range;Ws.range;vB.range;yB.range;const j0=Mt(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());j0.range;const S0=Mt(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());S0.range;const wi=Mt(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());wi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mt(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)});wi.range;const ki=Mt(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());ki.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mt(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)});ki.range;function IP(e,t,r,n,a,o){const c=[[Za,1,fi],[Za,5,5*fi],[Za,15,15*fi],[Za,30,30*fi],[o,1,Jr],[o,5,5*Jr],[o,15,15*Jr],[o,30,30*Jr],[a,1,hi],[a,3,3*hi],[a,6,6*hi],[a,12,12*hi],[n,1,bi],[n,2,2*bi],[r,1,y0],[t,1,Zj],[t,3,3*Zj],[e,1,Sg]];function l(h,p,g){const x=p<h;x&&([h,p]=[p,h]);const b=g&&typeof g.range=="function"?g:f(h,p,g),j=b?b.range(h,+p+1):[];return x?j.reverse():j}function f(h,p,g){const x=Math.abs(p-h)/g,b=a0(([,,S])=>S).right(c,x);if(b===c.length)return e.every(Gv(h/Sg,p/Sg,g));if(b===0)return Uf.every(Math.max(Gv(h,p,g),1));const[j,k]=c[x/c[b-1][2]<c[b][2]/x?b-1:b];return j.every(k)}return[l,f]}const[xB,bB]=IP(ki,S0,Vh,MP,k0,b0),[wB,kB]=IP(wi,j0,Gh,oc,w0,x0);function Ng(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 Eg(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 au(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function jB(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,c=e.shortDays,l=e.months,f=e.shortMonths,h=ou(a),p=su(a),g=ou(o),x=su(o),b=ou(c),j=su(c),k=ou(l),S=su(l),N=ou(f),E=su(f),O={a:de,A:Y,b:V,B:Q,c:null,d:iS,e:iS,f:GB,g:r9,G:i9,H:WB,I:HB,j:KB,L:TP,m:VB,M:qB,p:D,q:T,Q:sS,s:lS,S:QB,u:YB,U:XB,V:ZB,w:JB,W:e9,x:null,X:null,y:t9,Y:n9,Z:a9,"%":oS},P={a:Z,A:oe,b:re,B:ue,c:null,d:aS,e:aS,f:u9,g:x9,G:w9,H:o9,I:s9,j:l9,L:RP,m:c9,M:d9,p:me,q:Pe,Q:sS,s:lS,S:f9,u:h9,U:p9,V:m9,w:g9,W:v9,x:null,X:null,y:y9,Y:b9,Z:k9,"%":oS},_={a:G,A:X,b:$,B:fe,c:J,d:rS,e:rS,f:zB,g:tS,G:eS,H:nS,I:nS,j:DB,L:LB,m:TB,M:RB,p:U,q:IB,Q:BB,s:UB,S:$B,u:PB,U:CB,V:OB,w:AB,W:_B,x:pe,X:be,y:tS,Y:eS,Z:MB,"%":FB};O.x=C(r,O),O.X=C(n,O),O.c=C(t,O),P.x=C(r,P),P.X=C(n,P),P.c=C(t,P);function C(te,ve){return function(Oe){var ie=[],Je=-1,Be=0,_e=te.length,jt,ur,Qn;for(Oe instanceof Date||(Oe=new Date(+Oe));++Je<_e;)te.charCodeAt(Je)===37&&(ie.push(te.slice(Be,Je)),(ur=Jj[jt=te.charAt(++Je)])!=null?jt=te.charAt(++Je):ur=jt==="e"?" ":"0",(Qn=ve[jt])&&(jt=Qn(Oe,ur)),ie.push(jt),Be=Je+1);return ie.push(te.slice(Be,Je)),ie.join("")}}function I(te,ve){return function(Oe){var ie=au(1900,void 0,1),Je=B(ie,te,Oe+="",0),Be,_e;if(Je!=Oe.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(ve&&!("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?(Be=Eg(au(ie.y,0,1)),_e=Be.getUTCDay(),Be=_e>4||_e===0?Hf.ceil(Be):Hf(Be),Be=Kh.offset(Be,(ie.V-1)*7),ie.y=Be.getUTCFullYear(),ie.m=Be.getUTCMonth(),ie.d=Be.getUTCDate()+(ie.w+6)%7):(Be=Ng(au(ie.y,0,1)),_e=Be.getDay(),Be=_e>4||_e===0?Wf.ceil(Be):Wf(Be),Be=oc.offset(Be,(ie.V-1)*7),ie.y=Be.getFullYear(),ie.m=Be.getMonth(),ie.d=Be.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),_e="Z"in ie?Eg(au(ie.y,0,1)).getUTCDay():Ng(au(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(_e+5)%7:ie.w+ie.U*7-(_e+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,Eg(ie)):Ng(ie)}}function B(te,ve,Oe,ie){for(var Je=0,Be=ve.length,_e=Oe.length,jt,ur;Je<Be;){if(ie>=_e)return-1;if(jt=ve.charCodeAt(Je++),jt===37){if(jt=ve.charAt(Je++),ur=_[jt in Jj?ve.charAt(Je++):jt],!ur||(ie=ur(te,Oe,ie))<0)return-1}else if(jt!=Oe.charCodeAt(ie++))return-1}return ie}function U(te,ve,Oe){var ie=h.exec(ve.slice(Oe));return ie?(te.p=p.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function G(te,ve,Oe){var ie=b.exec(ve.slice(Oe));return ie?(te.w=j.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function X(te,ve,Oe){var ie=g.exec(ve.slice(Oe));return ie?(te.w=x.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function $(te,ve,Oe){var ie=N.exec(ve.slice(Oe));return ie?(te.m=E.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function fe(te,ve,Oe){var ie=k.exec(ve.slice(Oe));return ie?(te.m=S.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function J(te,ve,Oe){return B(te,t,ve,Oe)}function pe(te,ve,Oe){return B(te,r,ve,Oe)}function be(te,ve,Oe){return B(te,n,ve,Oe)}function de(te){return c[te.getDay()]}function Y(te){return o[te.getDay()]}function V(te){return f[te.getMonth()]}function Q(te){return l[te.getMonth()]}function D(te){return a[+(te.getHours()>=12)]}function T(te){return 1+~~(te.getMonth()/3)}function Z(te){return c[te.getUTCDay()]}function oe(te){return o[te.getUTCDay()]}function re(te){return f[te.getUTCMonth()]}function ue(te){return l[te.getUTCMonth()]}function me(te){return a[+(te.getUTCHours()>=12)]}function Pe(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var ve=C(te+="",O);return ve.toString=function(){return te},ve},parse:function(te){var ve=I(te+="",!1);return ve.toString=function(){return te},ve},utcFormat:function(te){var ve=C(te+="",P);return ve.toString=function(){return te},ve},utcParse:function(te){var ve=I(te+="",!0);return ve.toString=function(){return te},ve}}}var Jj={"-":"",_:" ",0:"0"},Ut=/^\s*\d+/,SB=/^%/,NB=/[\\^$*+?|[\]().{}]/g;function Qe(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 EB(e){return e.replace(NB,"\\$&")}function ou(e){return new RegExp("^(?:"+e.map(EB).join("|")+")","i")}function su(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function AB(e,t,r){var n=Ut.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function PB(e,t,r){var n=Ut.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function CB(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function OB(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function _B(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function eS(e,t,r){var n=Ut.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function tS(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function MB(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 IB(e,t,r){var n=Ut.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function TB(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function rS(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function DB(e,t,r){var n=Ut.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function nS(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function RB(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function $B(e,t,r){var n=Ut.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function LB(e,t,r){var n=Ut.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function zB(e,t,r){var n=Ut.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function FB(e,t,r){var n=SB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function BB(e,t,r){var n=Ut.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function UB(e,t,r){var n=Ut.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function iS(e,t){return Qe(e.getDate(),t,2)}function WB(e,t){return Qe(e.getHours(),t,2)}function HB(e,t){return Qe(e.getHours()%12||12,t,2)}function KB(e,t){return Qe(1+oc.count(wi(e),e),t,3)}function TP(e,t){return Qe(e.getMilliseconds(),t,3)}function GB(e,t){return TP(e,t)+"000"}function VB(e,t){return Qe(e.getMonth()+1,t,2)}function qB(e,t){return Qe(e.getMinutes(),t,2)}function QB(e,t){return Qe(e.getSeconds(),t,2)}function YB(e){var t=e.getDay();return t===0?7:t}function XB(e,t){return Qe(Gh.count(wi(e)-1,e),t,2)}function DP(e){var t=e.getDay();return t>=4||t===0?Us(e):Us.ceil(e)}function ZB(e,t){return e=DP(e),Qe(Us.count(wi(e),e)+(wi(e).getDay()===4),t,2)}function JB(e){return e.getDay()}function e9(e,t){return Qe(Wf.count(wi(e)-1,e),t,2)}function t9(e,t){return Qe(e.getFullYear()%100,t,2)}function r9(e,t){return e=DP(e),Qe(e.getFullYear()%100,t,2)}function n9(e,t){return Qe(e.getFullYear()%1e4,t,4)}function i9(e,t){var r=e.getDay();return e=r>=4||r===0?Us(e):Us.ceil(e),Qe(e.getFullYear()%1e4,t,4)}function a9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qe(t/60|0,"0",2)+Qe(t%60,"0",2)}function aS(e,t){return Qe(e.getUTCDate(),t,2)}function o9(e,t){return Qe(e.getUTCHours(),t,2)}function s9(e,t){return Qe(e.getUTCHours()%12||12,t,2)}function l9(e,t){return Qe(1+Kh.count(ki(e),e),t,3)}function RP(e,t){return Qe(e.getUTCMilliseconds(),t,3)}function u9(e,t){return RP(e,t)+"000"}function c9(e,t){return Qe(e.getUTCMonth()+1,t,2)}function d9(e,t){return Qe(e.getUTCMinutes(),t,2)}function f9(e,t){return Qe(e.getUTCSeconds(),t,2)}function h9(e){var t=e.getUTCDay();return t===0?7:t}function p9(e,t){return Qe(Vh.count(ki(e)-1,e),t,2)}function $P(e){var t=e.getUTCDay();return t>=4||t===0?Ws(e):Ws.ceil(e)}function m9(e,t){return e=$P(e),Qe(Ws.count(ki(e),e)+(ki(e).getUTCDay()===4),t,2)}function g9(e){return e.getUTCDay()}function v9(e,t){return Qe(Hf.count(ki(e)-1,e),t,2)}function y9(e,t){return Qe(e.getUTCFullYear()%100,t,2)}function x9(e,t){return e=$P(e),Qe(e.getUTCFullYear()%100,t,2)}function b9(e,t){return Qe(e.getUTCFullYear()%1e4,t,4)}function w9(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ws(e):Ws.ceil(e),Qe(e.getUTCFullYear()%1e4,t,4)}function k9(){return"+0000"}function oS(){return"%"}function sS(e){return+e}function lS(e){return Math.floor(+e/1e3)}var os,LP,zP;j9({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 j9(e){return os=jB(e),LP=os.format,os.parse,zP=os.utcFormat,os.utcParse,os}function S9(e){return new Date(e)}function N9(e){return e instanceof Date?+e:+new Date(+e)}function N0(e,t,r,n,a,o,c,l,f,h){var p=d0(),g=p.invert,x=p.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),O=h("%B"),P=h("%Y");function _(C){return(f(C)<C?b:l(C)<C?j:c(C)<C?k:o(C)<C?S:n(C)<C?a(C)<C?N:E:r(C)<C?O:P)(C)}return p.invert=function(C){return new Date(g(C))},p.domain=function(C){return arguments.length?x(Array.from(C,N9)):x().map(S9)},p.ticks=function(C){var I=x();return e(I[0],I[I.length-1],C??10)},p.tickFormat=function(C,I){return I==null?_:h(I)},p.nice=function(C){var I=x();return(!C||typeof C.range!="function")&&(C=t(I[0],I[I.length-1],C??10)),C?x(NP(I,C)):p},p.copy=function(){return ac(p,N0(e,t,r,n,a,o,c,l,f,h))},p}function E9(){return an.apply(N0(wB,kB,wi,j0,Gh,oc,w0,x0,Za,LP).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function A9(){return an.apply(N0(xB,bB,ki,S0,Vh,Kh,k0,b0,Za,zP).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function qh(){var e=0,t=1,r,n,a,o,c=pr,l=!1,f;function h(g){return g==null||isNaN(g=+g)?f:c(a===0?.5:(g=(o(g)-r)*a,l?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?(l=!!g,h):l},h.interpolator=function(g){return arguments.length?(c=g,h):c};function p(g){return function(x){var b,j;return arguments.length?([b,j]=x,c=g(b,j),h):[c(0),c(1)]}}return h.range=p(el),h.rangeRound=p(c0),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 ja(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function FP(){var e=ka(qh()(pr));return e.copy=function(){return ja(e,FP())},Ni.apply(e,arguments)}function BP(){var e=p0(qh()).domain([1,10]);return e.copy=function(){return ja(e,BP()).base(e.base())},Ni.apply(e,arguments)}function UP(){var e=m0(qh());return e.copy=function(){return ja(e,UP()).constant(e.constant())},Ni.apply(e,arguments)}function E0(){var e=g0(qh());return e.copy=function(){return ja(e,E0()).exponent(e.exponent())},Ni.apply(e,arguments)}function P9(){return E0.apply(null,arguments).exponent(.5)}function WP(){var e=[],t=pr;function r(n){if(n!=null&&!isNaN(n=+n))return t((nc(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(ya),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)=>h8(e,o/n))},r.copy=function(){return WP(t).domain(e)},Ni.apply(r,arguments)}function Qh(){var e=0,t=.5,r=1,n=1,a,o,c,l,f,h=pr,p,g=!1,x;function b(k){return isNaN(k=+k)?x:(k=.5+((k=+p(k))-o)*(n*k<n*o?l:f),h(g?Math.max(0,Math.min(1,k)):k))}b.domain=function(k){return arguments.length?([e,t,r]=k,a=p(e=+e),o=p(t=+t),c=p(r=+r),l=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,O;return arguments.length?([N,E,O]=S,h=F8(k,[N,E,O]),b):[h(0),h(.5),h(1)]}}return b.range=j(el),b.rangeRound=j(c0),b.unknown=function(k){return arguments.length?(x=k,b):x},function(k){return p=k,a=k(e),o=k(t),c=k(r),l=a===o?0:.5/(o-a),f=o===c?0:.5/(c-o),n=o<a?-1:1,b}}function HP(){var e=ka(Qh()(pr));return e.copy=function(){return ja(e,HP())},Ni.apply(e,arguments)}function KP(){var e=p0(Qh()).domain([.1,1,10]);return e.copy=function(){return ja(e,KP()).base(e.base())},Ni.apply(e,arguments)}function GP(){var e=m0(Qh());return e.copy=function(){return ja(e,GP()).constant(e.constant())},Ni.apply(e,arguments)}function A0(){var e=g0(Qh());return e.copy=function(){return ja(e,A0()).exponent(e.exponent())},Ni.apply(e,arguments)}function C9(){return A0.apply(null,arguments).exponent(.5)}const VP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:s0,scaleDiverging:HP,scaleDivergingLog:KP,scaleDivergingPow:A0,scaleDivergingSqrt:C9,scaleDivergingSymlog:GP,scaleIdentity:SP,scaleImplicit:Vv,scaleLinear:jP,scaleLog:EP,scaleOrdinal:o0,scalePoint:g8,scalePow:v0,scaleQuantile:CP,scaleQuantize:OP,scaleRadial:PP,scaleSequential:FP,scaleSequentialLog:BP,scaleSequentialPow:E0,scaleSequentialQuantile:WP,scaleSequentialSqrt:P9,scaleSequentialSymlog:UP,scaleSqrt:uB,scaleSymlog:AP,scaleThreshold:_P,scaleTime:E9,scaleUtc:A9,tickFormat:kP},Symbol.toStringTag,{value:"Module"}));function O9(e){var t=VP;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Oy(e));if(r in t&&typeof t[r]=="function")return t[r]()}function uS(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=O9(e);if(n!=null)return n.domain(t).range(r),n}}function P0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?uS(e.scale,r,n):uS(t,r,n)}function _9(e){return"scale".concat(Oy(e))}function M9(e){return _9(e)in VP}var qP=(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 M9(n)?n:"point"}};function I9(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 QP(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,l,f=I9(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,p=(l=n[f])!==null&&l!==void 0?l:0;return Math.abs(o-h)<=Math.abs(o-p)?r[f-1]:r[f]}}}function T9(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):QP(e,void 0)}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 Kf(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){D9(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 D9(e,t,r){return(t=R9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R9(e){var t=$9(e,"string");return typeof t=="symbol"?t:t+""}function $9(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 YP(e,t){return B9(e)||F9(e,t)||z9(e,t)||L9()}function L9(){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 z9(e,t){if(e){if(typeof e=="string")return dS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dS(e,t):void 0}}function dS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function F9(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function B9(e){if(Array.isArray(e))return e}var Xv=[0,"auto"],Ot={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"},XP=(e,t)=>e.cartesianAxis.xAxis[t],Ei=(e,t)=>{var r=XP(e,t);return r??Ot},_t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Xv,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:Zu},ZP=(e,t)=>e.cartesianAxis.yAxis[t],Ai=(e,t)=>{var r=ZP(e,t);return r??_t},U9={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:""},C0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??U9},gr=(e,t,r)=>{switch(t){case"xAxis":return Ei(e,r);case"yAxis":return Ai(e,r);case"zAxis":return C0(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},W9=(e,t,r)=>{switch(t){case"xAxis":return Ei(e,r);case"yAxis":return Ai(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},sc=(e,t,r)=>{switch(t){case"xAxis":return Ei(e,r);case"yAxis":return Ai(e,r);case"angleAxis":return Jy(e,r);case"radiusAxis":return e0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},JP=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function eC(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 tC=e=>e.graphicalItems.cartesianItems,H9=K([Ft,Bh],eC),rC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),tl=K([tC,gr,H9],rC,{memoizeOptions:{resultEqualityCheck:Wh}}),nC=K([tl],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(n0)),iC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),K9=K([tl],iC),aC=e=>e.map(t=>t.data).filter(Boolean).flat(1),G9=K([tl],e=>e.some(t=>!t.data)),oC=K([tl],aC,{memoizeOptions:{resultEqualityCheck:Wh}}),sC=(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)},O0=K([oC,Rh],sC),V9=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:zt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:zt(a,n)}))):e.map(n=>({value:n})),lC=(e,t,r,n,a,o)=>{var c=n.chartData,l=c===void 0?[]:c,f=n.dataStartIndex,h=n.dataEndIndex,p=V9(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=l.slice(f,h+1),x=g.map(b=>({value:zt(b,t.dataKey)})).filter(b=>b.value!=null);return[...x,...p]}return p},lc=K([O0,gr,tl,Rh,G9,oC],lC);function bs(e){if(Wn(e)||e instanceof Date){var t=Number(e);if(He(t))return t}}function fS(e){if(Array.isArray(e)){var t=[bs(e[0]),bs(e[1])];return Fn(t)?t:void 0}var r=bs(e);if(r!=null)return[r,r]}function Gn(e){return e.map(bs).filter(Nr)}function q9(e,t){var r=bs(e),n=bs(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var Q9=K([lc],e=>e==null?void 0:e.map(t=>t.value).sort(q9));function uC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Y9(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Un(t))n=t;else if(Array.isArray(t)){var a=Gn(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:Gn(r.flatMap(o=>{var c=zt(e,o.dataKey),l,f;if(Array.isArray(c)){var h=YP(c,2);l=h[0],f=h[1]}else l=f=c;if(!(!He(l)||!He(f)))return[n-l,n+f]}))}var It=e=>{var t=Bt(e),r=Js(e);return sc(e,t,r)},Hs=K([It],e=>e==null?void 0:e.dataKey),X9=K([nC,Rh,It],hP),cC=(e,t,r,n)=>{var a={},o=t.reduce((c,l)=>{if(l.stackId==null)return c;var f=c[l.stackId];return f==null&&(f=[]),f.push(l),c[l.stackId]=f,c},a);return Object.fromEntries(Object.entries(o).map(c=>{var l=YP(c,2),f=l[0],h=l[1],p=n?[...h].reverse():h,g=p.map(r0);return[f,{stackedData:mL(e,g,r),graphicalItems:p}]}))},dC=K([X9,nC,$h,oP],cC),fC=(e,t,r,n)=>{var a=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return xL(e,a,o)},Z9=K([gr],e=>e.allowDataOverflow),_0=e=>{var t;if(e==null||!("domain"in e))return Xv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Gn(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:Xv},hC=K([gr],_0),pC=K([hC,Z9],QA),J9=K([dC,jn,Ft,pC],fC,{memoizeOptions:{resultEqualityCheck:Uh}}),M0=e=>e.errorBars,e7=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>uC(r,n)),Gf=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),l=Math.max(...o);return[c,l]}},mC=function(t,r,n,a,o){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l,f;if(n.length>0&&n.forEach(h=>{var p,g=h.data!=null?[...h.data]:c,x=(p=a[h.id])===null||p===void 0?void 0:p.filter(b=>uC(o,b));g.forEach(b=>{var j,k=zt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=Y9(b,k,x);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(l==null||N<l)&&(l=N),(f==null||E>f)&&(f=E)}var O=fS(k);O!=null&&(l=l==null?O[0]:Math.min(l,O[0]),f=f==null?O[1]:Math.max(f,O[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=fS(zt(h,r.dataKey));p!=null&&(l=l==null?p[0]:Math.min(l,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),He(l)&&He(f))return[l,f]},t7=K([O0,gr,K9,M0,Ft,_F],mC,{memoizeOptions:{resultEqualityCheck:Uh}});function r7(e){var t=e.value;if(Wn(t)||t instanceof Date)return t}var n7=(e,t,r)=>{var n=e.map(r7).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&EE(n))?qA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},gC=e=>e.referenceElements.dots,rl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),i7=K([gC,Ft,Bh],rl),vC=e=>e.referenceElements.areas,a7=K([vC,Ft,Bh],rl),yC=e=>e.referenceElements.lines,o7=K([yC,Ft,Bh],rl),xC=(e,t)=>{if(e!=null){var r=Gn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},s7=K(i7,Ft,xC),bC=(e,t)=>{if(e!=null){var r=Gn(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)]}},l7=K([a7,Ft],bC);function u7(e){var t;if(e.x!=null)return Gn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Gn(r)}function c7(e){var t;if(e.y!=null)return Gn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Gn(r)}var wC=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?u7(n):c7(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},d7=K([o7,Ft],wC),f7=K(s7,d7,l7,(e,t,r)=>Gf(e,r,t)),kC=(e,t,r,n,a,o,c,l)=>{if(r!=null)return r;var f=c==="vertical"&&l==="xAxis"||c==="horizontal"&&l==="yAxis",h=f?Gf(n,o,a):Gf(o,a);return $F(t,h,e.allowDataOverflow)},h7=K([gr,hC,pC,J9,t7,f7,dt,Ft],kC,{memoizeOptions:{resultEqualityCheck:Uh}}),p7=[0,1],jC=(e,t,r,n,a,o,c)=>{if(!((e==null||r==null||r.length===0)&&c===void 0)){var l=e.dataKey,f=e.type,h=Vn(t,o);if(h&&l==null){var p;return qA(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?n7(n,e,h):a==="expand"&&!h?p7:c}},I0=K([gr,dt,O0,lc,$h,Ft,h7],jC),nl=K([gr,JP,Yy],qP),SC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=_0(t),o=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Fn(e)){if(o)return wj(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return kj(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Fn(e))return wj(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Fn(e))return kj(e,t.tickCount,t.allowDecimals,"adaptive")}}},T0=K([I0,sc,nl],SC),NC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Fn(t)&&Array.isArray(r)&&r.length>0){var a,o,c=t[0],l=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(c,l),Math.max(f,h)]}return t},m7=K([gr,I0,T0,Ft],NC),g7=K(lc,gr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Gn(e.map(g=>g.value))).sort((g,x)=>g-x),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 l=0;l<n.length-1;l++){var f=n[l],h=n[l+1];if(!(f==null||h==null)){var p=h-f;r=Math.min(r,p)}}return r/c}}),EC=K(g7,dt,GF,Zt,(e,t,r,n,a)=>a,(e,t,r,n,a)=>{if(!He(e))return 0;var o=t==="vertical"?n.height:n.width;if(a==="gap")return e*o/2;if(a==="no-gap"){var c=wa(r,e*o),l=e*o/2;return l-c-(l-c)/o*c}return 0}),v7=(e,t,r)=>{var n=Ei(e,t);return n==null||typeof n.padding!="string"?0:EC(e,"xAxis",t,r,n.padding)},y7=(e,t,r)=>{var n=Ai(e,t);return n==null||typeof n.padding!="string"?0:EC(e,"yAxis",t,r,n.padding)},x7=K(Ei,v7,(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}}),b7=K(Ai,y7,(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}}),AC=K([Zt,x7,Oh,Ch,(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]}),PC=K([Zt,dt,b7,Oh,Ch,(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]}),uc=(e,t,r,n)=>{var a;switch(t){case"xAxis":return AC(e,r,n);case"yAxis":return PC(e,r,n);case"zAxis":return(a=C0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return cP(e);case"radiusAxis":return dP(e,r);default:return}},CC=K([gr,uc],Lh),w7=K([nl,m7],t8),D0=K([gr,nl,w7,CC],P0),OC=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,o=r.scale,c=Vn(e,n);if(c&&(a==="number"||o!=="auto"))return t.map(l=>l.value)}},R0=K([dt,lc,sc,Ft],OC),Yh=K([D0],i0);K([D0],T9);K([D0,Q9],QP);K([tl,M0,Ft],e7);function _C(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Xh=(e,t)=>t,Zh=(e,t,r)=>r,k7=K(Ah,Xh,Zh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(_C)),j7=K(Ph,Xh,Zh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(_C)),MC=(e,t)=>({width:e.width,height:t.height}),S7=(e,t)=>{var r=typeof t.width=="number"?t.width:Zu;return{width:r,height:e.height}},N7=K(Zt,Ei,MC),E7=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},A7=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},P7=K(Si,Zt,k7,Xh,Zh,(e,t,r,n,a)=>{var o={},c;return r.forEach(l=>{var f=MC(t,l);c==null&&(c=E7(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;o[l.id]=c-Number(h)*f.height,c+=(h?-1:1)*f.height}),o}),C7=K(ji,Zt,j7,Xh,Zh,(e,t,r,n,a)=>{var o={},c;return r.forEach(l=>{var f=S7(t,l);c==null&&(c=A7(t,n,e));var h=n==="left"&&!a||n==="right"&&a;o[l.id]=c-Number(h)*f.width,c+=(h?-1:1)*f.width}),o}),O7=(e,t)=>{var r=Ei(e,t);if(r!=null)return P7(e,r.orientation,r.mirror)},_7=K([Zt,Ei,O7,(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}}}),M7=(e,t)=>{var r=Ai(e,t);if(r!=null)return C7(e,r.orientation,r.mirror)},I7=K([Zt,Ai,M7,(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}}}),T7=K(Zt,Ai,(e,t)=>{var r=typeof t.width=="number"?t.width:Zu;return{width:r,height:e.height}}),IC=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,o=r.type,c=r.dataKey,l=Vn(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(c&&l&&o==="category"&&a&&EE(h))return f}},$0=K([dt,lc,gr,Ft],IC),hS=K([dt,W9,nl,Yh,$0,R0,uc,T0,Ft],(e,t,r,n,a,o,c,l,f)=>{if(t!=null){var h=Vn(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:a,isCategorical:h,niceTicks:l,range:c,realScaleType:r,scale:n}}}),D7=(e,t,r,n,a,o,c,l,f)=>{if(!(t==null||n==null)){var h=Vn(e,f),p=t.type,g=t.ticks,x=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=p==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?Xr(o[0]-o[1])*2*j:j;var k=g||a;return k?k.map((S,N)=>{var E=c?c.indexOf(S):S,O=n.map(E);return He(O)?{index:N,coordinate:O+j,value:S,offset:j}:null}).filter(Nr):h&&l?l.map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(Nr):n.ticks?n.ticks(x).map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(Nr):n.domain().map((S,N)=>{var E=n.map(S);return He(E)?{coordinate:E+j,value:c?c[S]:S,index:N,offset:j}:null}).filter(Nr)}},TC=K([dt,sc,nl,Yh,T0,uc,$0,R0,Ft],D7),R7=(e,t,r,n,a,o,c)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=Vn(e,c),f=t.tickCount,h=0;return h=c==="angleAxis"&&(n==null?void 0:n.length)>=2?Xr(n[0]-n[1])*2*h:h,l&&o?o.map((p,g)=>{var x=r.map(p);return He(x)?{coordinate:x+h,value:p,index:g,offset:h}:null}).filter(Nr):r.ticks?r.ticks(f).map((p,g)=>{var x=r.map(p);return He(x)?{coordinate:x+h,value:p,index:g,offset:h}:null}).filter(Nr):r.domain().map((p,g)=>{var x=r.map(p);return He(x)?{coordinate:x+h,value:a?a[p]:p,index:g,offset:h}:null}).filter(Nr)}},DC=K([dt,sc,Yh,uc,$0,R0,Ft],R7),RC=K(gr,Yh,(e,t)=>{if(!(e==null||t==null))return Kf(Kf({},e),{},{scale:t})}),$7=K([gr,nl,I0,CC],P0),L7=K([$7],i0);K((e,t,r)=>C0(e,r),L7,(e,t)=>{if(!(e==null||t==null))return Kf(Kf({},e),{},{scale:t})});var z7=K([dt,Ah,Ph],(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}}),F7=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};K([F7],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 $C=e=>e.options.defaultTooltipEventType,LC=e=>e.options.validateTooltipEventTypes;function zC(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function cc(e,t){var r=$C(e),n=LC(e);return zC(t,r,n)}function B7(e){return Me(t=>cc(t,e))}var FC=(e,t)=>{var r,n=Number(t);if(!(Un(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},U7=e=>e.tooltip.settings,oa={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},W7={itemInteraction:{click:oa,hover:oa},axisInteraction:{click:oa,hover:oa},keyboardInteraction:oa,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},BC=lr({name:"tooltip",initialState:W7,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=Zr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=a)},prepare:st()},removeTooltipEntrySettings:{reducer(e,t){var r=Zr(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}}}),on=BC.actions,H7=on.addTooltipEntrySettings,K7=on.replaceTooltipEntrySettings,G7=on.removeTooltipEntrySettings,V7=on.setTooltipSettingsState,q7=on.setActiveMouseOverItemIndex;on.mouseLeaveItem;var UC=on.mouseLeaveChart;on.setActiveClickItemIndex;var WC=on.setMouseOverAxisIndex,Q7=on.setMouseClickAxisIndex,hu=on.setSyncInteraction,Vf=on.setKeyboardInteraction,Y7=BC.reducer;function pS(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?pS(Object(r),!0).forEach(function(n){X7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X7(e,t,r){return(t=Z7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z7(e){var t=J7(e,"string");return typeof t=="symbol"?t:t+""}function J7(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 eU(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function tU(e){return e.index!=null}var HC=(e,t,r,n)=>{if(t==null)return oa;var a=eU(e,t,r);if(a==null)return oa;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(tU(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({},oa),{},{coordinate:a.coordinate})};function rU(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 nU(e,t){var r=rU(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 iU(e,t,r){if(r==null||t==null)return!0;var n=zt(e,t);return n==null||!Fn(r)?!0:nU(n,r)}var gu=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var o=Number(a);if(!He(o))return a;var c=0,l=1/0;t.length>0&&(l=t.length-1);var f=Math.max(c,Math.min(o,l)),h=t[f];return h==null||iU(h,r,n)?String(f):null},KC=(e,t,r,n,a,o,c)=>{if(o!=null){var l=c[0],f=l==null?void 0:l.getPosition(o);if(f!=null)return f;var h=a==null?void 0:a[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},GC=(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 l;return((l=c.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},VC=e=>e.options.tooltipPayloadSearcher,il=e=>e.tooltip;function mS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mS(Object(r),!0).forEach(function(n){aU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aU(e,t,r){return(t=oU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oU(e){var t=sU(e,"string");return typeof t=="symbol"?t:t+""}function sU(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 lU(e){if(typeof e=="string"||typeof e=="number")return e}function uU(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function cU(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function vS(e){if(typeof e=="string")return e}function dU(e){if(!(e==null||typeof e!="object")){var t="name"in e?lU(e.name):void 0,r="unit"in e?uU(e.unit):void 0,n="dataKey"in e?cU(e.dataKey):void 0,a="payload"in e?e.payload:void 0,o="color"in e?vS(e.color):void 0,c="fill"in e?vS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:o,fill:c}}}function fU(e,t){return e??t}var qC=(e,t,r,n,a,o,c)=>{if(!(t==null||o==null)){var l=r.chartData,f=r.computedData,h=r.dataStartIndex,p=r.dataEndIndex,g=[];return e.reduce((x,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=fU(k,l),E=Array.isArray(N)?xA(N,h,p):N,O=(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"?_=AE(E,n,a):_=o(E,t,f,P),Array.isArray(_))_.forEach(I=>{var B,U,G=dU(I),X=G==null?void 0:G.name,$=G==null?void 0:G.dataKey,fe=G==null?void 0:G.payload,J=gS(gS({},S),{},{name:X,unit:G==null?void 0:G.unit,color:(B=G==null?void 0:G.color)!==null&&B!==void 0?B:S==null?void 0:S.color,fill:(U=G==null?void 0:G.fill)!==null&&U!==void 0?U:S==null?void 0:S.fill});x.push(dk({tooltipEntrySettings:J,dataKey:$,payload:fe,value:zt(fe,$),name:X==null?void 0:String(X)}))});else{var C;x.push(dk({tooltipEntrySettings:S,dataKey:O,payload:_,value:zt(_,O),name:(C=zt(_,P))!==null&&C!==void 0?C:S==null?void 0:S.name}))}return x},g)}},L0=K([It,JP,Yy],qP),hU=K([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),pU=K([Bt,Js],eC),Co=K([hU,It,pU],rC,{memoizeOptions:{resultEqualityCheck:Wh}}),mU=K([Co],e=>e.filter(n0)),QC=K([Co],aC,{memoizeOptions:{resultEqualityCheck:Wh}}),gU=K([Co],e=>e.some(t=>!t.data)),wo=K([QC,jn],sC),vU=K([mU,jn,It],hP),z0=K([wo,It,Co,jn,gU,QC],lC),YC=K([It],_0),yU=K([It],e=>e.allowDataOverflow),XC=K([YC,yU],QA),xU=K([Co],e=>e.filter(n0)),bU=K([vU,xU,$h,oP],cC),wU=K([bU,jn,Bt,XC],fC),kU=K([Co],iC),jU=K([wo,It,kU,M0,Bt,MF],mC,{memoizeOptions:{resultEqualityCheck:Uh}}),SU=K([gC,Bt,Js],rl),NU=K([SU,Bt],xC),EU=K([vC,Bt,Js],rl),AU=K([EU,Bt],bC),PU=K([yC,Bt,Js],rl),CU=K([PU,Bt],wC),OU=K([NU,CU,AU],Gf),_U=K([It,YC,XC,wU,jU,OU,dt,Bt],kC),Ks=K([It,dt,wo,z0,$h,Bt,_U],jC),MU=K([Ks,It,L0],SC),IU=K([It,Ks,MU,Bt],NC),ZC=e=>{var t=Bt(e),r=Js(e),n=!1;return uc(e,t,r,n)},JC=K([It,ZC],Lh),TU=K([It,L0,IU,JC],P0),eO=K([TU],i0),DU=K([dt,z0,It,Bt],IC),RU=K([dt,z0,It,Bt],OC),$U=(e,t,r,n,a,o,c,l)=>{if(t){var f=t.type,h=Vn(e,l);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return g=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Xr(a[0]-a[1])*2*g:g,h&&c?c.map((x,b)=>{var j=n.map(x);return He(j)?{coordinate:j+g,value:x,index:b,offset:g}:null}).filter(Nr):n.domain().map((x,b)=>{var j=n.map(x);return He(j)?{coordinate:j+g,value:o?o[x]:x,index:b,offset:g}:null}).filter(Nr)}}},Pi=K([dt,It,L0,eO,ZC,DU,RU,Bt],$U),F0=K([$C,LC,U7],(e,t,r)=>zC(r.shared,e,t)),tO=e=>e.tooltip.settings.trigger,B0=e=>e.tooltip.settings.defaultIndex,dc=K([il,F0,tO,B0],HC),Fu=K([dc,wo,Hs,Ks],gu),rO=K([Pi,Fu],FC),LU=K([dc],e=>{if(e)return e.dataKey}),zU=K([dc],e=>{if(e)return e.graphicalItemId}),nO=K([il,F0,tO,B0],GC),FU=K([ji,Si,dt,Zt,Pi,B0,nO],KC),BU=K([dc,FU],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),UU=K([dc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),WU=K([nO,Fu,jn,Hs,rO,VC,F0],qC),HU=K([WU],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function yS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yS(Object(r),!0).forEach(function(n){KU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KU(e,t,r){return(t=GU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GU(e){var t=VU(e,"string");return typeof t=="symbol"?t:t+""}function VU(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 qU=()=>Me(It),QU=()=>{var e=qU(),t=Me(Pi),r=Me(eO);return jf(!e||!r?void 0:xS(xS({},e),{},{scale:r}),t)};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 ss(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){YU(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 YU(e,t,r){return(t=XU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XU(e){var t=ZU(e,"string");return typeof t=="symbol"?t:t+""}function ZU(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 JU=(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}},eW=(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 ss(ss(ss({},n),Qt(n.cx,n.cy,c,o)),{},{angle:o,radius:c})}var l=a.coordinate,f=n.angle;return ss(ss(ss({},n),Qt(n.cx,n.cy,l,f)),{},{angle:f,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function tW(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 iO=(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 l=0;l<c;l++){var f,h,p,g,x,b=l>0?(f=r[l-1])===null||f===void 0?void 0:f.coordinate:(h=r[c-1])===null||h===void 0?void 0:h.coordinate,j=(p=r[l])===null||p===void 0?void 0:p.coordinate,k=l>=c-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(x=r[l+1])===null||x===void 0?void 0:x.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Xr(j-b)!==Xr(k-j)){var N=[];if(Xr(k-j)===Xr(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 O=k+a[1]-a[0];N[0]=Math.min(j,(O+j)/2),N[1]=Math.max(j,(O+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[l])===null||_===void 0?void 0:_.index}}else{var C=Math.min(b,k),I=Math.max(b,k);if(e>(C+j)/2&&e<=(I+j)/2){var B;return(B=r[l])===null||B===void 0?void 0:B.index}}}else if(t)for(var U=0;U<c;U++){var G=t[U];if(G!=null){var X=t[U+1],$=t[U-1];if(U===0&&X!=null&&e<=(G.coordinate+X.coordinate)/2||U===c-1&&$!=null&&e>(G.coordinate+$.coordinate)/2||U>0&&U<c-1&&$!=null&&X!=null&&e>(G.coordinate+$.coordinate)/2&&e<=(G.coordinate+X.coordinate)/2)return G.index}}return-1},aO=()=>Me(Yy),U0=(e,t)=>t,oO=(e,t,r)=>r,W0=(e,t,r,n)=>n,rW=K(Pi,e=>gh(e,t=>t.coordinate)),H0=K([il,U0,oO,W0],HC),K0=K([H0,wo,Hs,Ks],gu),nW=(e,t,r)=>{if(t!=null){var n=il(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},sO=K([il,U0,oO,W0],GC),qf=K([ji,Si,dt,Zt,Pi,W0,sO],KC),iW=K([H0,qf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),lO=K([Pi,K0],FC),aW=K([sO,K0,jn,Hs,lO,VC,U0],qC),oW=K([H0,K0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),sW=(e,t,r,n,a,o,c)=>{if(!(!e||!r||!n||!a)&&tW(e,c)){var l=bL(e,t),f=iO(l,o,a,r,n),h=JU(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},lW=(e,t,r,n,a,o,c)=>{if(!(!e||!n||!a||!o||!r)){var l=jF(e,r);if(l){var f=wL(l,t),h=iO(f,c,o,n,a),p=eW(t,o,h,l);return{activeIndex:String(h),activeCoordinate:p}}}},uW=(e,t,r,n,a,o,c,l)=>{if(!(!e||!t||!n||!a||!o))return t==="horizontal"||t==="vertical"?sW(e,t,n,a,o,c,l):lW(e,t,r,n,a,o,c)},cW=K(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),dW=K(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(hr)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:e8}});function wS(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 kS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wS(Object(r),!0).forEach(function(n){fW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fW(e,t,r){return(t=hW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hW(e){var t=pW(e,"string");return typeof t=="symbol"?t:t+""}function pW(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 mW={},gW={zIndexMap:Object.values(hr).reduce((e,t)=>kS(kS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),mW)},vW=new Set(Object.values(hr));function yW(e){return vW.has(e)}var uO=lr({name:"zIndex",initialState:gW,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&&!yW(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()}}}),Jh=uO.actions,xW=Jh.registerZIndexPortal,Ag=Jh.unregisterZIndexPortal,bW=Jh.registerZIndexPortalElement,wW=Jh.unregisterZIndexPortalElement,kW=uO.reducer;function Ci(e){var t=e.zIndex,r=e.children,n=az(),a=n&&t!==void 0&&t!==0,o=Ar(),c=v.useRef(void 0),l=v.useRef(new Set),f=Et(),h=Me(g=>cW(g,t,o));if(v.useLayoutEffect(()=>{if(!a){var g=l.current;g.forEach(b=>{f(Ag({zIndex:b}))}),g.clear(),c.current=void 0;return}if(l.current.has(t)||(f(xW({zIndex:t})),l.current.add(t)),h){c.current=h;var x=l.current;x.forEach(b=>{b!==t&&(f(Ag({zIndex:b})),x.delete(b))})}},[f,t,a,h]),v.useLayoutEffect(()=>{var g=l.current;return()=>{g.forEach(x=>{f(Ag({zIndex:x}))}),g.clear()}},[f]),!a)return r;var p=h??c.current;return p?sh.createPortal(r,p):null}function Zv(){return Zv=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},Zv.apply(null,arguments)}function jS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jS(Object(r),!0).forEach(function(n){jW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jW(e,t,r){return(t=SW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SW(e){var t=NW(e,"string");return typeof t=="symbol"?t:t+""}function NW(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 EW(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return v.isValidElement(t)?v.cloneElement(t,n):v.createElement(r,n)}function AW(e){var t,r=e.coordinate,n=e.payload,a=e.index,o=e.offset,c=e.tooltipAxisBandSize,l=e.layout,f=e.cursor,h=e.tooltipEventType,p=e.chartName,g=r,x=n,b=a;if(!f||!g||p!=="ScatterChart"&&h!=="axis")return null;var j,k,S;if(p==="ScatterChart")j=g,k=_6,S=hr.cursorLine;else if(p==="BarChart")j=M6(l,g,o,c),k=hF,S=hr.cursorRectangle;else if(l==="radial"&&PE(g)){var N=GA(g),E=N.cx,O=N.cy,P=N.radius,_=N.startAngle,C=N.endAngle;j={cx:E,cy:O,startAngle:_,endAngle:C,innerRadius:P,outerRadius:P},k=AF,S=hr.cursorLine}else j={points:PF(l,g,o)},k=rf,S=hr.cursorLine;var I=typeof f=="object"&&"className"in f?f.className:void 0,B=Hd(Hd(Hd(Hd({stroke:"#ccc",pointerEvents:"none"},o),j),hh(f)),{},{payload:x,payloadIndex:b,className:nt("recharts-tooltip-cursor",I)});return v.createElement(Ci,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},v.createElement(EW,{cursor:f,cursorComp:k,cursorProps:B}))}function PW(e){var t=QU(),r=PA(),n=Ys(),a=aO();return t==null||r==null||n==null||a==null?null:v.createElement(AW,Zv({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:a}))}var cO=v.createContext(null),CW=()=>v.useContext(cO),Pg={exports:{}},SS;function OW(){return SS||(SS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,g,x){if(typeof p!="function")throw new TypeError("The listener must be a function");var b=new a(p,g||f,x),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 l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],p,g;if(this._eventsCount===0)return h;for(g in p=this._events)t.call(p,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},l.prototype.listeners=function(h){var p=r?r+h:h,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var x=0,b=g.length,j=new Array(b);x<b;x++)j[x]=g[x].fn;return j},l.prototype.listenerCount=function(h){var p=r?r+h:h,g=this._events[p];return g?g.fn?1:g.length:0},l.prototype.emit=function(h,p,g,x,b,j){var k=r?r+h:h;if(!this._events[k])return!1;var S=this._events[k],N=arguments.length,E,O;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),N){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,p),!0;case 3:return S.fn.call(S.context,p,g),!0;case 4:return S.fn.call(S.context,p,g,x),!0;case 5:return S.fn.call(S.context,p,g,x,b),!0;case 6:return S.fn.call(S.context,p,g,x,b,j),!0}for(O=1,E=new Array(N-1);O<N;O++)E[O-1]=arguments[O];S.fn.apply(S.context,E)}else{var P=S.length,_;for(O=0;O<P;O++)switch(S[O].once&&this.removeListener(h,S[O].fn,void 0,!0),N){case 1:S[O].fn.call(S[O].context);break;case 2:S[O].fn.call(S[O].context,p);break;case 3:S[O].fn.call(S[O].context,p,g);break;case 4:S[O].fn.call(S[O].context,p,g,x);break;default:if(!E)for(_=1,E=new Array(N-1);_<N;_++)E[_-1]=arguments[_];S[O].fn.apply(S[O].context,E)}}return!0},l.prototype.on=function(h,p,g){return o(this,h,p,g,!1)},l.prototype.once=function(h,p,g){return o(this,h,p,g,!0)},l.prototype.removeListener=function(h,p,g,x){var b=r?r+h:h;if(!this._events[b])return this;if(!p)return c(this,b),this;var j=this._events[b];if(j.fn)j.fn===p&&(!x||j.once)&&(!g||j.context===g)&&c(this,b);else{for(var k=0,S=[],N=j.length;k<N;k++)(j[k].fn!==p||x&&!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},l.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&c(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Pg)),Pg.exports}var _W=OW();const MW=cy(_W);var Bu=new MW,Jv="recharts.syncEvent.tooltip",NS="recharts.syncEvent.brush",IW=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Un(r))return e[r]}},TW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},dO=lr({name:"options",initialState:TW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),DW=dO.reducer,RW=dO.actions.createEventEmitter;function $W(e){return e.tooltip.syncInteraction}var LW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},fO=lr({name:"chartData",initialState:LW,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)}}}),G0=fO.actions,ES=G0.setChartData,zW=G0.setDataStartEndIndexes;G0.setComputedData;var FW=fO.reducer,BW=["x","y"];function AS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ls(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AS(Object(r),!0).forEach(function(n){UW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UW(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=HW(e,"string");return typeof t=="symbol"?t:t+""}function HW(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 KW(e,t){if(e==null)return{};var r,n,a=GW(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 GW(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 VW(){var e=Me(Xy),t=Me(Zy),r=Et(),n=Me(sP),a=Me(Pi),o=Ys(),c=_h(),l=Me(f=>f.rootProps.className);v.useEffect(()=>{if(e==null)return Qs;var f=(h,p,g)=>{if(t!==g&&e===h){if(p.payload.active===!1){r(hu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var x;if(c&&p!==null&&p!==void 0&&(x=p.payload)!==null&&x!==void 0&&x.coordinate&&p.payload.sourceViewBox){var b=p.payload.coordinate,j=b.x,k=b.y,S=KW(b,BW),N=p.payload.sourceViewBox,E=N.x,O=N.y,P=N.width,_=N.height,C=ls(ls({},S),{},{x:c.x+(P?(j-E)/P:0)*c.width,y:c.y+(_?(k-O)/_:0)*c.height});r(ls(ls({},p),{},{payload:ls(ls({},p.payload),{},{coordinate:C})}))}else r(p);return}if(a!=null){var I;if(typeof n=="function"){var B={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},U=n(a,B);I=a[U]}else n==="value"&&(I=a.find(de=>String(de.value)===p.payload.label));var G=p.payload.coordinate;if(G==null||c==null){r(hu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(I==null){r(hu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var X=G.x,$=G.y,fe=Math.min(X,c.x+c.width),J=Math.min($,c.y+c.height),pe={x:o==="horizontal"?I.coordinate:fe,y:o==="horizontal"?J:I.coordinate},be=hu({active:p.payload.active,coordinate:pe,dataKey:p.payload.dataKey,index:String(I.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(be)}}};return Bu.on(Jv,f),()=>{Bu.off(Jv,f)}},[l,r,t,e,n,a,o,c])}function qW(){var e=Me(Xy),t=Me(Zy),r=Et();v.useEffect(()=>{if(e==null)return Qs;var n=(a,o,c)=>{t!==c&&e===a&&r(zW(o))};return Bu.on(NS,n),()=>{Bu.off(NS,n)}},[r,t,e])}function QW(){var e=Et();v.useEffect(()=>{e(RW())},[e]),VW(),qW()}function YW(e,t,r,n,a,o){var c=Me(j=>nW(j,e,t)),l=Me(zU),f=Me(Zy),h=Me(Xy),p=Me(sP),g=Me($W),x=(g==null?void 0:g.sourceViewBox)!=null,b=_h();v.useEffect(()=>{if(!x&&h!=null&&f!=null){var j=hu({active:o,coordinate:r,dataKey:c,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:l});Bu.emit(Jv,h,j,f)}},[x,r,c,l,a,n,f,h,p,o,b])}function PS(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 CS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PS(Object(r),!0).forEach(function(n){XW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XW(e,t,r){return(t=ZW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZW(e){var t=JW(e,"string");return typeof t=="symbol"?t:t+""}function JW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eH(e,t){return iH(e)||nH(e,t)||rH(e,t)||tH()}function tH(){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 rH(e,t){if(e){if(typeof e=="string")return OS(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)?OS(e,t):void 0}}function OS(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 nH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function iH(e){if(Array.isArray(e))return e}function aH(e){return e.dataKey}function oH(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e=="function"?v.createElement(e,t):v.createElement(Yz,t)}var _S=[],sH={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 lH(e){var t,r,n=nn(e,sH),a=n.active,o=n.allowEscapeViewBox,c=n.animationDuration,l=n.animationEasing,f=n.content,h=n.filterNull,p=n.isAnimationActive,g=n.offset,x=n.payloadUniqBy,b=n.position,j=n.reverseDirection,k=n.useTranslate3d,S=n.wrapperStyle,N=n.cursor,E=n.shared,O=n.trigger,P=n.defaultIndex,_=n.portal,C=n.axisId,I=Et(),B=typeof P=="number"?String(P):P;v.useEffect(()=>{I(V7({shared:E,trigger:O,axisId:C,active:a,defaultIndex:B}))},[I,E,O,C,a,B]);var U=_h(),G=FA(),X=B7(E),$=(t=Me(Oe=>oW(Oe,X,O,B)))!==null&&t!==void 0?t:{},fe=$.activeIndex,J=$.isActive,pe=Me(Oe=>aW(Oe,X,O,B)),be=Me(Oe=>lO(Oe,X,O,B)),de=Me(Oe=>iW(Oe,X,O,B)),Y=pe,V=CW(),Q=(r=a??J)!==null&&r!==void 0?r:!1,D=o$([Y,Q]),T=eH(D,2),Z=T[0],oe=T[1],re=X==="axis"?be:void 0;YW(X,O,de,re,fe,Q);var ue=_??V;if(ue==null||U==null||X==null)return null;var me=Y??_S;Q||(me=_S),h&&me.length&&(me=CR(me.filter(Oe=>Oe.value!=null&&(Oe.hide!==!0||n.includeHidden)),x,aH));var Pe=me.length>0,te=CS(CS({},n),{},{payload:me,label:re,active:Q,activeIndex:fe,coordinate:de,accessibilityLayer:G}),ve=v.createElement(v6,{allowEscapeViewBox:o,animationDuration:c,animationEasing:l,isAnimationActive:p,active:Q,coordinate:de,hasPayload:Pe,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:U,wrapperStyle:S,lastBoundingBox:Z,innerRef:oe,hasPortalFromProps:!!_},oH(f,te));return v.createElement(v.Fragment,null,sh.createPortal(ve,ue),Q&&v.createElement(PW,{cursor:N,tooltipEventType:X,coordinate:de,payload:me,index:fe}))}function uH(e,t,r){return(t=cH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cH(e){var t=dH(e,"string");return typeof t=="symbol"?t:t+""}function dH(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 fH{constructor(t){uH(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function MS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MS(Object(r),!0).forEach(function(n){pH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pH(e,t,r){return(t=mH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mH(e){var t=gH(e,"string");return typeof t=="symbol"?t:t+""}function gH(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 vH={cacheSize:2e3,enableCache:!0},hO=hH({},vH),IS=new fH(hO.cacheSize),yH={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},TS="recharts_measurement_span";function xH(e,t){var r=t.fontSize||"",n=t.fontFamily||"",a=t.fontWeight||"",o=t.fontStyle||"",c=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(o,"|").concat(c,"|").concat(l)}var DS=(e,t)=>{try{var r=document.getElementById(TS);r||(r=document.createElement("span"),r.setAttribute("id",TS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,yH,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},vu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||rc.isSsr)return{width:0,height:0};if(!hO.enableCache)return DS(t,r);var n=xH(t,r),a=IS.get(n);if(a)return a;var o=DS(t,r);return IS.set(n,o),o},pO;function Qf(e,t){return jH(e)||kH(e,t)||wH(e,t)||bH()}function bH(){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 wH(e,t){if(e){if(typeof e=="string")return RS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?RS(e,t):void 0}}function RS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function kH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function jH(e){if(Array.isArray(e))return e}function SH(e,t,r){return(t=NH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NH(e){var t=EH(e,"string");return typeof t=="symbol"?t:t+""}function EH(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 $S=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,LS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,AH=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,PH=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,CH={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},OH=["cm","mm","pt","pc","in","Q","px"];function _H(e){return OH.includes(e)}var ms="NaN";function MH(e,t){return e*CH[t]}class Vt{static parse(t){var r,n=(r=PH.exec(t))!==null&&r!==void 0?r:[],a=Qf(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,Un(t)&&(this.unit=""),r!==""&&!AH.test(r)&&(this.num=NaN,this.unit=""),_H(r)&&(this.num=MH(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 Un(this.num)}}pO=Vt;SH(Vt,"NaN",new pO(NaN,""));function mO(e){if(e==null||e.includes(ms))return ms;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=$S.exec(t))!==null&&r!==void 0?r:[],a=Qf(n,4),o=a[1],c=a[2],l=a[3],f=Vt.parse(o??""),h=Vt.parse(l??""),p=c==="*"?f.multiply(h):f.divide(h);if(p.isNaN())return ms;t=t.replace($S,p.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var g,x=(g=LS.exec(t))!==null&&g!==void 0?g:[],b=Qf(x,4),j=b[1],k=b[2],S=b[3],N=Vt.parse(j??""),E=Vt.parse(S??""),O=k==="+"?N.add(E):N.subtract(E);if(O.isNaN())return ms;t=t.replace(LS,O.toString())}return t}var zS=/\(([^()]*)\)/;function IH(e){for(var t=e,r;(r=zS.exec(t))!=null;){var n=r,a=Qf(n,2),o=a[1];t=t.replace(zS,mO(o))}return t}function TH(e){var t=e.replace(/\s+/g,"");return t=IH(t),t=mO(t),t}function DH(e){try{return TH(e)}catch{return ms}}function Cg(e){var t=DH(e.slice(5,-1));return t===ms?"":t}var RH=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],$H=["dx","dy","angle","className","breakAll"];function ey(){return ey=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},ey.apply(null,arguments)}function FS(e,t){if(e==null)return{};var r,n,a=LH(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 LH(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 BS(e,t){return UH(e)||BH(e,t)||FH(e,t)||zH()}function zH(){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 FH(e,t){if(e){if(typeof e=="string")return US(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)?US(e,t):void 0}}function US(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 BH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function UH(e){if(Array.isArray(e))return e}var gO=/[ \f\n\r\t\v\u2028\u2029]+/,vO=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(gO));var o=a.map(l=>({word:l,width:vu(l,n).width})),c=r?0:vu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}};function yO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function WH(e){return Yt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var xO=(e,t,r,n)=>e.reduce((a,o)=>{var c=o.word,l=o.width,f=a[a.length-1];if(f&&l!=null&&(t==null||n||f.width+l+r<Number(t)))f.words.push(c),f.width+=l+r;else{var h={words:[c],width:l};a.push(h)}return a},[]),bO=e=>e.reduce((t,r)=>t.width>r.width?t:r),HH="…",WS=(e,t,r,n,a,o,c,l)=>{var f=e.slice(0,t),h=vO({breakAll:r,style:n,children:f+HH});if(!h)return[!1,[]];var p=xO(h.wordsWithComputedWidth,o,c,l),g=p.length>a||bO(p).width>Number(o);return[g,p]},KH=(e,t,r,n,a)=>{var o=e.maxLines,c=e.children,l=e.style,f=e.breakAll,h=Ne(o),p=String(c),g=xO(t,n,r,a);if(!h||a)return g;var x=g.length>o||bO(g).width>Number(n);if(!x)return g;for(var b=0,j=p.length-1,k=0,S;b<=j&&k<=p.length-1;){var N=Math.floor((b+j)/2),E=N-1,O=WS(p,E,f,l,o,n,r,a),P=BS(O,2),_=P[0],C=P[1],I=WS(p,N,f,l,o,n,r,a),B=BS(I,1),U=B[0];if(!_&&!U&&(b=N+1),_&&U&&(j=N-1),!_&&U){S=C;break}k++}return S||g},HS=e=>{var t=Yt(e)?[]:e.toString().split(gO);return[{words:t,width:void 0}]},GH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,o=e.breakAll,c=e.maxLines;if((t||r)&&!rc.isSsr){var l,f,h=vO({breakAll:o,children:n,style:a});if(h){var p=h.wordsWithComputedWidth,g=h.spaceWidth;l=p,f=g}else return HS(n);return KH({breakAll:o,children:n,maxLines:c,style:a},l,f,t,!!r)}return HS(n)},wO="#808080",VH={angle:0,breakAll:!1,capHeight:"0.71em",fill:wO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},V0=v.forwardRef((e,t)=>{var r=nn(e,VH),n=r.x,a=r.y,o=r.lineHeight,c=r.capHeight,l=r.fill,f=r.scaleToFit,h=r.textAnchor,p=r.verticalAnchor,g=FS(r,RH),x=v.useMemo(()=>GH({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=FS(g,$H);if(!Wn(n)||!Wn(a)||x.length===0)return null;var O=Number(n)+(Ne(b)?b:0),P=Number(a)+(Ne(j)?j:0);if(!He(O)||!He(P))return null;var _;switch(p){case"start":_=Cg("calc(".concat(c,")"));break;case"middle":_=Cg("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:_=Cg("calc(".concat(x.length-1," * -").concat(o,")"));break}var C=[],I=x[0];if(f&&I!=null){var B=I.width,U=g.width;C.push("scale(".concat(Ne(U)&&Ne(B)?U/B:1,")"))}return k&&C.push("rotate(".concat(k,", ").concat(O,", ").concat(P,")")),C.length&&(E.transform=C.join(" ")),v.createElement("text",ey({},en(E),{ref:t,x:O,y:P,className:nt("recharts-text",S),textAnchor:h,fill:l.includes("url")?wO:l}),x.map((G,X)=>{var $=G.words.join(N?"":" ");return v.createElement("tspan",{x:O,dy:X===0?_:o,key:"".concat($,"-").concat(X)},$)}))});V0.displayName="Text";function KS(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 Mn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KS(Object(r),!0).forEach(function(n){qH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qH(e,t,r){return(t=QH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QH(e){var t=YH(e,"string");return typeof t=="symbol"?t:t+""}function YH(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 XH=e=>{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,o=e.parentViewBox,c=By(t),l=c.x,f=c.y,h=c.height,p=c.upperWidth,g=c.lowerWidth,x=l,b=l+(p-g)/2,j=(x+b)/2,k=(p+g)/2,S=x+p/2,N=h>=0?1:-1,E=N*a,O=N>0?"end":"start",P=N>0?"start":"end",_=p>=0?1:-1,C=_*a,I=_>0?"end":"start",B=_>0?"start":"end",U=o;if(r==="top"){var G={x:x+p/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:O};return U&&(G.height=Math.max(f-U.y,0),G.width=p),G}if(r==="bottom"){var X={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:P};return U&&(X.height=Math.max(U.y+U.height-(f+h),0),X.width=g),X}if(r==="left"){var $={x:j-C,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"};return U&&($.width=Math.max($.x-U.x,0),$.height=h),$}if(r==="right"){var fe={x:j+k+C,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return U&&(fe.width=Math.max(U.x+U.width-fe.x,0),fe.height=h),fe}var J=U?{width:k,height:h}:{};return r==="insideLeft"?Mn({x:j+C,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},J):r==="insideRight"?Mn({x:j+k-C,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"},J):r==="insideTop"?Mn({x:x+p/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:P},J):r==="insideBottom"?Mn({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:O},J):r==="insideTopLeft"?Mn({x:x+C,y:f+E,horizontalAnchor:B,verticalAnchor:P},J):r==="insideTopRight"?Mn({x:x+p-C,y:f+E,horizontalAnchor:I,verticalAnchor:P},J):r==="insideBottomLeft"?Mn({x:b+C,y:f+h-E,horizontalAnchor:B,verticalAnchor:O},J):r==="insideBottomRight"?Mn({x:b+g-C,y:f+h-E,horizontalAnchor:I,verticalAnchor:O},J):r&&typeof r=="object"&&(Ne(r.x)||go(r.x))&&(Ne(r.y)||go(r.y))?Mn({x:l+wa(r.x,k),y:f+wa(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},J):Mn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},J)},ZH=["labelRef"],JH=["content"];function GS(e,t){if(e==null)return{};var r,n,a=eK(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 eK(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 VS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VS(Object(r),!0).forEach(function(n){tK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function 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)}function ci(){return ci=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},ci.apply(null,arguments)}var kO=v.createContext(null),iK=e=>{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,o=e.width,c=e.height,l=e.children,f=v.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:o,height:c}),[t,r,n,a,o,c]);return v.createElement(kO.Provider,{value:f},l)},jO=()=>{var e=v.useContext(kO),t=_h();return e||(t?By(t):void 0)},aK=v.createContext(null),oK=()=>{var e=v.useContext(aK),t=Me(fP);return e||t},sK=e=>{var t=e.value,r=e.formatter,n=Yt(e.children)?t:e.children;return typeof r=="function"?r(n):n},q0=e=>e!=null&&typeof e=="function",lK=(e,t)=>{var r=Xr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},uK=(e,t,r,n,a)=>{var o=e.offset,c=e.className,l=a.cx,f=a.cy,h=a.innerRadius,p=a.outerRadius,g=a.startAngle,x=a.endAngle,b=a.clockWise,j=(h+p)/2,k=lK(g,x),S=k>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=x-S*o,E=!b;break;case"end":N=x+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=k<=0?E:!E;var O=Qt(l,f,j,N),P=Qt(l,f,j,N+(E?1:-1)*359),_="M".concat(O.x,",").concat(O.y,`
|
||
A`).concat(j,",").concat(j,",0,1,").concat(E?0:1,`,
|
||
`).concat(P.x,",").concat(P.y),C=Yt(e.id)?Au("recharts-radial-line-"):e.id;return v.createElement("text",ci({},n,{dominantBaseline:"central",className:nt("recharts-radial-bar-label",c)}),v.createElement("defs",null,v.createElement("path",{id:C,d:_})),v.createElement("textPath",{xlinkHref:"#".concat(C)},r))},cK=(e,t,r)=>{var n=e.cx,a=e.cy,o=e.innerRadius,c=e.outerRadius,l=e.startAngle,f=e.endAngle,h=(l+f)/2;if(r==="outside"){var p=Qt(n,a,c+t,h),g=p.x,x=p.y;return{x:g,y:x,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&&Ne(e.cx),dK={angle:0,offset:5,zIndex:hr.label,position:"middle",textBreakAll:!1};function fK(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 aa(e){var t=nn(e,dK),r=t.viewBox,n=t.parentViewBox,a=t.position,o=t.value,c=t.children,l=t.content,f=t.className,h=f===void 0?"":f,p=t.textBreakAll,g=t.labelRef,x=oK(),b=jO(),j=a==="center"?b:x??b,k,S,N;r==null?k=j:nf(r)?k=r:k=By(r);var E=fK(k);if(!k||Yt(o)&&Yt(c)&&!v.isValidElement(l)&&typeof l!="function")return null;var O=pu(pu({},t),{},{viewBox:k});if(v.isValidElement(l)){O.labelRef;var P=GS(O,ZH);return v.cloneElement(l,P)}if(typeof l=="function"){O.content;var _=GS(O,JH);if(S=v.createElement(l,_),v.isValidElement(S))return S}else S=sK(t);var C=en(t);if(nf(k)){if(a==="insideStart"||a==="insideEnd"||a==="end")return uK(t,a,S,C,k);N=cK(k,t.offset,t.position)}else{if(!E)return null;var I=XH({viewBox:E,position:a,offset:t.offset,parentViewBox:nf(n)?void 0:n});N=pu(pu({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return v.createElement(Ci,{zIndex:t.zIndex},v.createElement(V0,ci({ref:g,className:nt("recharts-label",h)},C,N,{textAnchor:yO(C.textAnchor)?C.textAnchor:N.textAnchor,breakAll:p}),S))}aa.displayName="Label";var hK=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?v.createElement(aa,ci({key:"label-implicit"},n)):Wn(e)?v.createElement(aa,ci({key:"label-implicit",value:e},n)):v.isValidElement(e)?e.type===aa?v.cloneElement(e,pu({key:"label-implicit"},n)):v.createElement(aa,ci({key:"label-implicit",content:e},n)):q0(e)?v.createElement(aa,ci({key:"label-implicit",content:e},n)):e&&typeof e=="object"?v.createElement(aa,ci({},e,{key:"label-implicit"},n)):null};function pK(e){var t=e.label,r=e.labelRef,n=jO();return hK(t,n,r)||null}var mK=["valueAccessor"],gK=["dataKey","clockWise","id","textBreakAll","zIndex"];function Yf(){return Yf=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},Yf.apply(null,arguments)}function qS(e,t){if(e==null)return{};var r,n,a=vK(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 vK(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 yK=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(WH(t))return t},SO=v.createContext(void 0),xK=SO.Provider,NO=v.createContext(void 0);NO.Provider;function bK(){return v.useContext(SO)}function wK(){return v.useContext(NO)}function af(e){var t=e.valueAccessor,r=t===void 0?yK:t,n=qS(e,mK),a=n.dataKey;n.clockWise;var o=n.id,c=n.textBreakAll,l=n.zIndex,f=qS(n,gK),h=bK(),p=wK(),g=h||p;return!g||!g.length?null:v.createElement(Ci,{zIndex:l??hr.label},v.createElement(tn,{className:"recharts-label-list"},g.map((x,b)=>{var j,k=Yt(a)?r(x,b):zt(x.payload,a),S=Yt(o)?{}:{id:"".concat(o,"-").concat(b)};return v.createElement(aa,Yf({key:"label-".concat(b)},en(x),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:x.fill,parentViewBox:x.parentViewBox,value:k,textBreakAll:c,viewBox:x.viewBox,index:b,zIndex:0}))})))}af.displayName="LabelList";function kK(e){var t=e.label;return t?t===!0?v.createElement(af,{key:"labelList-implicit"}):v.isValidElement(t)||q0(t)?v.createElement(af,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(af,Yf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function ty(){return ty=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},ty.apply(null,arguments)}var EO=e=>{var t=e.cx,r=e.cy,n=e.r,a=e.className,o=nt("recharts-dot",a);return Ne(t)&&Ne(r)&&Ne(n)?v.createElement("circle",ty({},bn(e),_y(e),{className:o,cx:t,cy:r,r:n})):null},jK={radiusAxis:{},angleAxis:{}},AO=lr({name:"polarAxis",initialState:jK,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]}}}),ep=AO.actions;ep.addRadiusAxis;ep.removeRadiusAxis;ep.addAngleAxis;ep.removeAngleAxis;var SK=AO.reducer;function NK(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var PO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function QS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function YS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QS(Object(r),!0).forEach(function(n){EK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EK(e,t,r){return(t=AK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AK(e){var t=PK(e,"string");return typeof t=="symbol"?t:t+""}function PK(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 CO(e,t){return YS(YS({},t),e)}function CK(e){return v.isValidElement(e)?e.props:e}function OK(e,t){return v.cloneElement(e,CO(CK(e),t))}function _K(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function MK(e){return"isActive"in e&&e.isActive===!0}function IK(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,l=c===void 0?"recharts-shape":c,f=_K(n),h;return v.isValidElement(t)?h=OK(t,n):t===r?h=v.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=v.createElement(r,CO(t,n)):h=v.createElement(r,n),MK(n)?v.createElement(tn,{className:o},h):v.createElement(tn,{className:l},h)}function TK(e){var t=e.tooltipEntrySettings,r=Et(),n=Ar(),a=v.useRef(null);return v.useLayoutEffect(()=>{n||(a.current===null?r(H7(t)):a.current!==t&&r(K7({prev:a.current,next:t})),a.current=t)},[t,r,n]),v.useLayoutEffect(()=>()=>{a.current&&(r(G7(a.current)),a.current=null)},[r]),null}function DK(e){var t=e.legendPayload,r=Et(),n=Ar(),a=v.useRef(null);return v.useLayoutEffect(()=>{n||(a.current===null?r(yz(t)):a.current!==t&&r(xz({prev:a.current,next:t})),a.current=t)},[r,n,t]),v.useLayoutEffect(()=>()=>{a.current&&(r(bz(a.current)),a.current=null)},[r]),null}function RK(e,t){return FK(e)||zK(e,t)||LK(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 LK(e,t){if(e){if(typeof e=="string")return XS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?XS(e,t):void 0}}function XS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function zK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function FK(e){if(Array.isArray(e))return e}var Q0="index",BK="append";function Y0(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],l=t[o];c!=null?n.push({status:"matched",prev:c,next:l}):n.push({status:"added",next:l})}return n}function UK(e,t){var r=e.length/t.length,n=t.map((a,o)=>e[Math.floor(o*r)]);return Y0(n,t)}function WK(e,t){var r=t.map((n,a)=>e[a]);return Y0(r,t)}function HK(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 KK(e,t,r){var n=HK(e,r),a=new Set,o=t.map((g,x)=>{var b=r(g,x);if(b!=null){var j=n.get(b);if(j!==void 0)return a.add(b),j}}),c=[];for(var l of n){var f=RK(l,2),h=f[0],p=f[1];a.has(h)||c.push(p)}return Y0(o,t,c)}function ry(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===Q0?UK(e,t):r===BK?WK(e,t):KK(e,t,r)}function OO(e,t){var r=v.useRef(e),n=v.useRef(t.current),a=v.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var o=v.useCallback(function(c,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(l===0){a.current=!0;return}l===1&&(n.current=c),l>0&&a.current&&f&&(t.current=c)},[t]);return{startValue:n.current,syncStepValue:o}}function GK(e,t){return YK(e)||QK(e,t)||qK(e,t)||VK()}function VK(){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 qK(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 QK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function YK(e){if(Array.isArray(e))return e}function XK(e,t){var r=v.useState(!1),n=GK(r,2),a=n[0],o=n[1],c=v.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),l=v.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:a,handleAnimationStart:c,handleAnimationEnd:l}}function ZK(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,o=e.previousItemsRef,c=e.isAnimationActive,l=e.animationBegin,f=e.animationDuration,h=e.animationEasing,p=e.onAnimationStart,g=e.onAnimationEnd,x=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=KA(r,n),E=OO(N,o),O=(t=E.startValue)!==null&&t!==void 0?t:null,P=ry(O,a,b??Q0);return v.createElement(HA,{animationId:N,begin:l,duration:f,isActive:c,easing:h,onAnimationEnd:g,onAnimationStart:p,key:N},_=>{var C=O==null,I=a==null?a:x(P,_,S),B=j?j(_):_>0;return E.syncStepValue(I,_,B),I==null?null:k(I,_,C)})}var Og;function JK(e,t){return nG(e)||rG(e,t)||tG(e,t)||eG()}function eG(){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 tG(e,t){if(e){if(typeof e=="string")return JS(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)?JS(e,t):void 0}}function JS(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 rG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function nG(e){if(Array.isArray(e))return e}var iG=()=>{var e=v.useState(()=>Au("uid-")),t=JK(e,1),r=t[0];return r},_O=(Og=ih.useId)!==null&&Og!==void 0?Og:iG;function aG(e,t){var r=_O();return t||(e?"".concat(e,"-").concat(r):r)}var oG=v.createContext(void 0),sG=e=>{var t=e.id,r=e.type,n=e.children,a=aG("recharts-".concat(r),t);return v.createElement(oG.Provider,{value:a},n(a))},lG={cartesianItems:[],polarItems:[]},MO=lr({name:"graphicalItems",initialState:lG,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=Zr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=a)},prepare:st()},removeCartesianGraphicalItem:{reducer(e,t){var r=Zr(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=Zr(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=Zr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=a)},prepare:st()}}}),al=MO.actions,uG=al.addCartesianGraphicalItem,cG=al.replaceCartesianGraphicalItem,dG=al.removeCartesianGraphicalItem;al.addPolarGraphicalItem;al.removePolarGraphicalItem;al.replacePolarGraphicalItem;var fG=MO.reducer,hG=e=>{var t=Et(),r=v.useRef(null);return v.useLayoutEffect(()=>{r.current===null?t(uG(e)):r.current!==e&&t(cG({prev:r.current,next:e})),r.current=e},[t,e]),v.useLayoutEffect(()=>()=>{r.current&&(t(dG(r.current)),r.current=null)},[t]),null},pG=v.memo(hG),mG=["points"];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 _g(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){gG(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 gG(e,t,r){return(t=vG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vG(e){var t=yG(e,"string");return typeof t=="symbol"?t:t+""}function yG(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 Xf(){return Xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xf.apply(null,arguments)}function xG(e,t){if(e==null)return{};var r,n,a=bG(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 bG(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 wG(e){var t=e.option,r=e.dotProps,n=e.className;if(v.isValidElement(t))return v.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=xG(o,mG);return v.createElement(EO,Xf({},c,{className:a}))}function kG(e,t){return e==null?!1:t?!0:e.length===1}function jG(e){var t=e.points,r=e.dot,n=e.className,a=e.dotClassName,o=e.dataKey,c=e.baseProps,l=e.needClip,f=e.clipPathId,h=e.zIndex,p=h===void 0?hr.scatter:h;if(!kG(t,r))return null;var g=PO(r),x=iD(r),b=t.map((k,S)=>{var N,E,O=_g(_g(_g({r:3},c),x),{},{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 v.createElement(wG,{key:"dot-".concat(S),option:r,dotProps:O,className:a})}),j={};return l&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),v.createElement(Ci,{zIndex:p},v.createElement(tn,Xf({className:n},j),b))}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 r2(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){SG(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 SG(e,t,r){return(t=NG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NG(e){var t=EG(e,"string");return typeof t=="symbol"?t:t+""}function EG(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 IO=0,AG={xAxis:{},yAxis:{},zAxis:{}},TO=lr({name:"cartesianAxis",initialState:AG,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,l=o.widthHistory||[];if(l.length===3&&l[0]===l[2]&&a===l[1]&&a!==o.width&&Math.abs(a-((c=l[0])!==null&&c!==void 0?c:0))<=1)return;var f=[...l,a].slice(-3);e.yAxis[n]=r2(r2({},o),{},{width:a,widthHistory:f})}}}}),qn=TO.actions,PG=qn.addXAxis,CG=qn.replaceXAxis,OG=qn.removeXAxis,_G=qn.addYAxis,MG=qn.replaceYAxis,IG=qn.removeYAxis;qn.addZAxis;qn.replaceZAxis;qn.removeZAxis;var TG=qn.updateYAxisWidth,DG=TO.reducer,RG=K([Zt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),$G=K([RG,ji,Si],(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)}}),X0=()=>Me($G),LG=()=>Me(HU);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 Mg(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){zG(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 zG(e,t,r){return(t=FG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FG(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)}var UG=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 l={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Mg(Mg(Mg({},l),hh(a)),_y(a)),h;return v.isValidElement(a)?h=v.cloneElement(a,f):typeof a=="function"?h=a(f):h=v.createElement(EO,f),v.createElement(tn,{className:"recharts-active-dot",clipPath:c},h)};function i2(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,o=e.clipPath,c=e.zIndex,l=c===void 0?hr.activeDot:c,f=Me(Fu),h=LG();if(t==null||h==null)return null;var p=t.find(g=>h.includes(g.payload));return Yt(p)?null:v.createElement(Ci,{zIndex:l},v.createElement(UG,{point:p,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:o}))}var WG=e=>{var t=e.chartData,r=Et(),n=Ar();return v.useEffect(()=>n?()=>{}:(r(ES(t)),()=>{r(ES(void 0))}),[t,r,n]),null},a2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},DO=lr({name:"brush",initialState:a2,reducers:{setBrushSettings(e,t){return t.payload==null?a2:t.payload}}});DO.actions.setBrushSettings;var HG=DO.reducer;function KG(e){return(e%180+180)%180}var GG=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=KG(a),c=o*Math.PI/180,l=Math.atan(n/r),f=c>l&&c<Math.PI-l?n/Math.sin(c):r/Math.cos(c);return Math.abs(f)},VG={dots:[],areas:[],lines:[]},RO=lr({name:"referenceElements",initialState:VG,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Zr(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=Zr(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=Zr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),ol=RO.actions;ol.addDot;ol.removeDot;ol.addArea;ol.removeArea;ol.addLine;ol.removeLine;var qG=RO.reducer;function QG(e,t){return JG(e)||ZG(e,t)||XG(e,t)||YG()}function YG(){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 XG(e,t){if(e){if(typeof e=="string")return o2(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)?o2(e,t):void 0}}function o2(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 ZG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function JG(e){if(Array.isArray(e))return e}var eV=v.createContext(void 0),tV=e=>{var t=e.children,r=v.useState("".concat(Au("recharts"),"-clip")),n=QG(r,1),a=n[0],o=X0();if(o==null)return null;var c=o.x,l=o.y,f=o.width,h=o.height;return v.createElement(eV.Provider,{value:a},v.createElement("defs",null,v.createElement("clipPath",{id:a},v.createElement("rect",{x:c,y:l,height:h,width:f}))),t)};function $O(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 rV(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return GG(n,r)}function nV(e,t,r){var n=r==="width",a=e.x,o=e.y,c=e.width,l=e.height;return t===1?{start:n?a:o,end:n?a+c:o+l}:{start:n?a+c:o+l,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 iV(e,t){return $O(e,t+1)}function aV(e,t,r,n,a){for(var o=(n||[]).slice(),c=t.start,l=t.end,f=0,h=1,p=c,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:$O(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),E=j.coordinate,O=f===0||Uu(e,E,N,p,l);O||(f=0,p=c,h+=1),O&&(p=E+e*(N()/2+a),f+=h)},x;h<=o.length;)if(x=g(),x)return x.v;return[]}function oV(e,t,r,n,a){var o=(n||[]).slice(),c=o.length;if(c===0)return[];for(var l=t.start,f=t.end,h=1;h<=c;h++){for(var p=(c-1)%h,g=l,x=!0,b=function(){var P=n[k];if(P==null)return 0;var _=k,C,I=()=>(C===void 0&&(C=r(P,_)),C),B=P.coordinate,U=k===p||Uu(e,B,I,g,f);if(!U)return x=!1,1;U&&(g=B+e*(I()/2+a))},j,k=p;k<c&&(j=b(),!(j!==0&&j===1));k+=h);if(x){for(var S=[],N=p;N<c;N+=h){var E=n[N];E!=null&&S.push(E)}return S}}return[]}function s2(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?s2(Object(r),!0).forEach(function(n){sV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sV(e,t,r){return(t=lV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lV(e){var t=uV(e,"string");return typeof t=="symbol"?t:t+""}function uV(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 cV(e,t,r,n,a){for(var o=(n||[]).slice(),c=o.length,l=t.start,f=t.end,h=function(x){var b=o[x];if(b==null)return 1;var j=b,k,S=()=>(k===void 0&&(k=r(b,x)),k);if(x===c-1){var N=e*(j.coordinate+e*S()/2-f);o[x]=j=ar(ar({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[x]=j=ar(ar({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var E=Uu(e,j.tickCoord,S,l,f);E&&(f=j.tickCoord-e*(S()/2+a),o[x]=ar(ar({},j),{},{isShow:!0}))}},p=c-1;p>=0;p--)h(p);return o}function dV(e,t,r,n,a,o){var c=(n||[]).slice(),l=c.length,f=t.start,h=t.end;if(o){var p=n[l-1];if(p!=null){var g=r(p,l-1),x=e*(p.coordinate+e*g/2-h);if(c[l-1]=p=ar(ar({},p),{},{tickCoord:x>0?p.coordinate-x*e:p.coordinate}),p.tickCoord!=null){var b=Uu(e,p.tickCoord,()=>g,f,h);b&&(h=p.tickCoord-e*(g/2+a),c[l-1]=ar(ar({},p),{},{isShow:!0}))}}}for(var j=o?l-1:l,k=function(E){var O=c[E];if(O==null)return 1;var P=O,_,C=()=>(_===void 0&&(_=r(O,E)),_);if(E===0){var I=e*(P.coordinate-e*C()/2-f);c[E]=P=ar(ar({},P),{},{tickCoord:I<0?P.coordinate-I*e:P.coordinate})}else c[E]=P=ar(ar({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var B=Uu(e,P.tickCoord,C,f,h);B&&(f=P.tickCoord+e*(C()/2+a),c[E]=ar(ar({},P),{},{isShow:!0}))}},S=0;S<j;S++)k(S);return c}function Z0(e,t,r){var n=e.tick,a=e.ticks,o=e.viewBox,c=e.minTickGap,l=e.orientation,f=e.interval,h=e.tickFormatter,p=e.unit,g=e.angle;if(!a||!a.length||!n)return[];if(Ne(f)||rc.isSsr){var x;return(x=iV(a,Ne(f)?f:0))!==null&&x!==void 0?x:[]}var b=[],j=l==="top"||l==="bottom"?"width":"height",k=p&&j==="width"?vu(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},S=(_,C)=>{var I=typeof h=="function"?h(_.value,C):_.value;return j==="width"?rV(vu(I,{fontSize:t,letterSpacing:r}),k,g):vu(I,{fontSize:t,letterSpacing:r})[j]},N=a[0],E=a[1],O=a.length>=2&&N!=null&&E!=null?Xr(E.coordinate-N.coordinate):1,P=nV(o,O,j);return f==="equidistantPreserveStart"?aV(O,P,S,a,c):f==="equidistantPreserveEnd"?oV(O,P,S,a,c):(f==="preserveStart"||f==="preserveStartEnd"?b=dV(O,P,S,a,c,f==="preserveStartEnd"):b=cV(O,P,S,a,c),b.filter(_=>_.isShow))}var fV=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,o=e.tickSize,c=o===void 0?0:o,l=e.tickMargin,f=l===void 0?0:l,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var p=r?r.getBoundingClientRect().width:0,g=c+f,x=h+g+p+(r?a:0);return Math.round(x)}return 0},hV={xAxis:{},yAxis:{}},LO=lr({name:"renderedTicks",initialState:hV,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]}}}),zO=LO.actions,pV=zO.setRenderedTicks,mV=zO.removeRenderedTicks,gV=LO.reducer,vV=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function l2(e,t){return wV(e)||bV(e,t)||xV(e,t)||yV()}function yV(){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 xV(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 bV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function wV(e){if(Array.isArray(e))return e}function kV(e,t){if(e==null)return{};var r,n,a=jV(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 jV(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 ko(){return ko=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},ko.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 vt(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){SV(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 SV(e,t,r){return(t=NV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NV(e){var t=EV(e,"string");return typeof t=="symbol"?t:t+""}function EV(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 vi={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:hr.axis};function AV(e){var t=e.x,r=e.y,n=e.width,a=e.height,o=e.orientation,c=e.mirror,l=e.axisLine,f=e.otherSvgProps;if(!l)return null;var h=vt(vt(vt({},f),bn(l)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!c||o==="bottom"&&c);h=vt(vt({},h),{},{x1:t,y1:r+p*a,x2:t+n,y2:r+p*a})}else{var g=+(o==="left"&&!c||o==="right"&&c);h=vt(vt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+a})}return v.createElement("line",ko({},h,{className:nt("recharts-cartesian-axis-line",Eo(l,"className"))}))}function PV(e,t,r,n,a,o,c,l,f){var h,p,g,x,b,j,k=l?-1:1,S=e.tickSize||c,N=Ne(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,x=r+ +!l*a,g=x-k*S,j=g-k*f,b=N;break;case"left":g=x=e.coordinate,p=t+ +!l*n,h=p-k*S,b=h-k*f,j=N;break;case"right":g=x=e.coordinate,p=t+ +l*n,h=p+k*S,b=h+k*f,j=N;break;default:h=p=e.coordinate,x=r+ +l*a,g=x+k*S,j=g+k*f,b=N;break}return{line:{x1:h,y1:g,x2:p,y2:x},tick:{x:b,y:j}}}function CV(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function OV(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function _V(e){var t=e.option,r=e.tickProps,n=e.value,a,o=nt(r.className,"recharts-cartesian-axis-tick-value");if(v.isValidElement(t))a=v.cloneElement(t,vt(vt({},r),{},{className:o}));else if(typeof t=="function")a=t(vt(vt({},r),{},{className:o}));else{var c="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(c=nt(c,NK(t))),a=v.createElement(V0,ko({},r,{className:c}),n)}return a}function MV(e){var t=e.ticks,r=e.axisType,n=e.axisId,a=Et();return v.useEffect(()=>{if(n==null||r==null)return Qs;var o=t.map(c=>({value:c.value,coordinate:c.coordinate,offset:c.offset,index:c.index}));return a(pV({ticks:o,axisId:n,axisType:r})),()=>{a(mV({axisId:n,axisType:r}))}},[a,t,n,r]),null}var IV=v.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,o=e.tickLine,c=e.stroke,l=e.tickFormatter,f=e.unit,h=e.padding,p=e.tickTextProps,g=e.orientation,x=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,O=e.fontSize,P=e.letterSpacing,_=e.getTicksConfig,C=e.events,I=e.axisType,B=e.axisId,U=Z0(vt(vt({},_),{},{ticks:n}),O,P),G=bn(_),X=hh(a),$=yO(G.textAnchor)?G.textAnchor:CV(g,x),fe=OV(g,x),J={};typeof o=="object"&&(J=o);var pe=vt(vt({},G),{},{fill:"none"},J),be=U.map(V=>vt({entry:V},PV(V,b,j,k,S,g,N,x,E))),de=be.map(V=>{var Q=V.entry,D=V.line;return v.createElement(tn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},o&&v.createElement("line",ko({},pe,D,{className:nt("recharts-cartesian-axis-tick-line",Eo(o,"className"))})))}),Y=be.map((V,Q)=>{var D,T,Z=V.entry,oe=V.tick,re=vt(vt(vt(vt({verticalAnchor:fe},G),{},{textAnchor:$,stroke:"none",fill:c},oe),{},{index:Q,payload:Z,visibleTicksCount:U.length,tickFormatter:l,padding:h},p),{},{angle:(D=(T=p==null?void 0:p.angle)!==null&&T!==void 0?T:G.angle)!==null&&D!==void 0?D:0}),ue=vt(vt({},re),X);return v.createElement(tn,ko({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Z.value,"-").concat(Z.coordinate,"-").concat(Z.tickCoord)},$D(C,Z,Q)),a&&v.createElement(_V,{option:a,tickProps:ue,value:"".concat(typeof l=="function"?l(Z.value,Q):Z.value).concat(f||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(I,"-ticks")},v.createElement(MV,{ticks:U,axisId:B,axisType:I}),Y.length>0&&v.createElement(Ci,{zIndex:hr.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(I,"-tick-labels"),ref:t},Y)),de.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(I,"-tick-lines")},de))}),TV=v.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,o=e.className,c=e.hide,l=e.ticks,f=e.axisType,h=e.axisId,p=kV(e,vV),g=v.useState(""),x=l2(g,2),b=x[0],j=x[1],k=v.useState(""),S=l2(k,2),N=S[0],E=S[1],O=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return fV({ticks:O.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var P=v.useCallback(_=>{if(_){var C=_.getElementsByClassName("recharts-cartesian-axis-tick-value");O.current=C;var I=C[0];if(I){var B=window.getComputedStyle(I),U=B.fontSize,G=B.letterSpacing;(U!==b||G!==N)&&(j(U),E(G))}}},[b,N]);return c||n!=null&&n<=0||a!=null&&a<=0?null:v.createElement(Ci,{zIndex:e.zIndex},v.createElement(tn,{className:nt("recharts-cartesian-axis",o)},v.createElement(AV,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:bn(e)}),v.createElement(IV,{ref:P,axisType:f,events:p,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),v.createElement(iK,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(pK,{label:e.label,labelRef:e.labelRef}),e.children)))}),J0=v.forwardRef((e,t)=>{var r=nn(e,vi);return v.createElement(TV,ko({},r,{ref:t}))});J0.displayName="CartesianAxis";var DV=["x1","y1","x2","y2","key"],RV=["offset"],$V=["xAxisId","yAxisId"],LV=["xAxisId","yAxisId"];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 or(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){zV(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 zV(e,t,r){return(t=FV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FV(e){var t=BV(e,"string");return typeof t=="symbol"?t:t+""}function BV(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 Ja(){return Ja=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},Ja.apply(null,arguments)}function Zf(e,t){if(e==null)return{};var r,n,a=UV(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 UV(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 WV=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,l=e.ry;return v.createElement("rect",{x:n,y:a,ry:l,width:o,height:c,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function FO(e){var t=e.option,r=e.lineItemProps,n;if(v.isValidElement(t))n=v.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,o=r.x1,c=r.y1,l=r.x2,f=r.y2,h=r.key,p=Zf(r,DV),g=(a=bn(p))!==null&&a!==void 0?a:{};g.offset;var x=Zf(g,RV);n=v.createElement("line",Ja({},x,{x1:o,y1:c,x2:l,y2:f,fill:"none",key:h}))}return n}function HV(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=Zf(e,$V),l=o.map((f,h)=>{var p=or(or({},c),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return v.createElement(FO,{key:"line-".concat(h),option:a,lineItemProps:p})});return v.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function KV(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=Zf(e,LV),l=o.map((f,h)=>{var p=or(or({},c),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return v.createElement(FO,{option:a,lineItemProps:p,key:"line-".concat(h)})});return v.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function GV(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,o=e.width,c=e.height,l=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||l==null)return null;var p=l.map(x=>Math.round(x+a-a)).sort((x,b)=>x-b);a!==p[0]&&p.unshift(0);var g=p.map((x,b)=>{var j=p[b+1],k=j==null,S=k?a+c-x:j-x;if(S<=0)return null;var N=b%t.length;return v.createElement("rect",{key:"react-".concat(b),y:x,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function VV(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,o=e.x,c=e.y,l=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var p=h.map(x=>Math.round(x+o-o)).sort((x,b)=>x-b);o!==p[0]&&p.unshift(0);var g=p.map((x,b)=>{var j=p[b+1],k=j==null,S=k?o+l-x:j-x;if(S<=0)return null;var N=b%n.length;return v.createElement("rect",{key:"react-".concat(b),x,y:c,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var qV=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,o=e.offset;return bA(Z0(or(or(or({},vi),r),{},{ticks:wA(r),viewBox:{x:0,y:0,width:n,height:a}})),o.left,o.left+o.width,t)},QV=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,o=e.offset;return bA(Z0(or(or(or({},vi),r),{},{ticks:wA(r),viewBox:{x:0,y:0,width:n,height:a}})),o.top,o.top+o.height,t)},YV={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:hr.grid};function BO(e){var t=CA(),r=OA(),n=PA(),a=or(or({},nn(e,YV)),{},{x:Ne(e.x)?e.x:n.left,y:Ne(e.y)?e.y:n.top,width:Ne(e.width)?e.width:n.width,height:Ne(e.height)?e.height:n.height}),o=a.xAxisId,c=a.yAxisId,l=a.x,f=a.y,h=a.width,p=a.height,g=a.syncWithTicks,x=a.horizontalValues,b=a.verticalValues,j=Ar(),k=Me(U=>hS(U,"xAxis",o,j)),S=Me(U=>hS(U,"yAxis",c,j));if(!Hn(h)||!Hn(p)||!Ne(l)||!Ne(f))return null;var N=a.verticalCoordinatesGenerator||qV,E=a.horizontalCoordinatesGenerator||QV,O=a.horizontalPoints,P=a.verticalPoints;if((!O||!O.length)&&typeof E=="function"){var _=x&&x.length,C=E({yAxis:S?or(or({},S),{},{ticks:_?x:S.ticks}):void 0,width:t??h,height:r??p,offset:n},_?!0:g);Sf(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(O=C)}if((!P||!P.length)&&typeof N=="function"){var I=b&&b.length,B=N({xAxis:k?or(or({},k),{},{ticks:I?b:k.ticks}):void 0,width:t??h,height:r??p,offset:n},I?!0:g);Sf(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(P=B)}return v.createElement(Ci,{zIndex:a.zIndex},v.createElement("g",{className:"recharts-cartesian-grid"},v.createElement(WV,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),v.createElement(GV,Ja({},a,{horizontalPoints:O})),v.createElement(VV,Ja({},a,{verticalPoints:P})),v.createElement(HV,Ja({},a,{offset:n,horizontalPoints:O,xAxis:k,yAxis:S})),v.createElement(KV,Ja({},a,{offset:n,verticalPoints:P,xAxis:k,yAxis:S}))))}BO.displayName="CartesianGrid";var XV={},UO=lr({name:"errorBars",initialState:XV,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))}}}),ex=UO.actions;ex.addErrorBar;ex.replaceErrorBar;ex.removeErrorBar;var ZV=UO.reducer;function WO(e,t){var r,n,a=Me(h=>Ei(h,e)),o=Me(h=>Ai(h,t)),c=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:Ot.allowDataOverflow,l=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:_t.allowDataOverflow,f=c||l;return{needClip:f,needClipX:c,needClipY:l}}function JV(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=X0(),o=WO(t,r),c=o.needClipX,l=o.needClipY,f=o.needClip,h=Me(O=>AC(O,t,!1)),p=Me(O=>PC(O,r,!1));if(!f||!a)return null;var g=a.x,x=a.y,b=a.width,j=a.height,k=c&&h?Math.min(h[0],h[1]):g-b/2,S=l&&p?Math.min(p[0],p[1]):x-j/2,N=c&&h?Math.abs(h[1]-h[0]):b*2,E=l&&p?Math.abs(p[1]-p[0]):j*2;return v.createElement("clipPath",{id:"clipPath-".concat(n)},v.createElement("rect",{x:k,y:S,width:N,height:E}))}function eq(e){var t=hh(e),r=3,n=2;if(t!=null){var a=t.r,o=t.strokeWidth,c=Number(a),l=Number(o);return(Number.isNaN(c)||c<0)&&(c=r),(Number.isNaN(l)||l<0)&&(l=n),{r:c,strokeWidth:l}}return{r,strokeWidth:n}}function tx(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:IO}function rx(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:IO}var HO=(e,t,r)=>RC(e,"xAxis",tx(e,t),r),KO=(e,t,r)=>DC(e,"xAxis",tx(e,t),r),GO=(e,t,r)=>RC(e,"yAxis",rx(e,t),r),VO=(e,t,r)=>DC(e,"yAxis",rx(e,t),r),tq=K([dt,HO,GO,KO,VO],(e,t,r,n,a)=>Vn(e,"xAxis")?jf(t,n,!1):jf(r,a,!1)),rq=(e,t)=>t,qO=K([tC,rq],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),QO=e=>{var t=dt(e),r=Vn(t,"xAxis");return r?"yAxis":"xAxis"},nq=(e,t)=>{var r=QO(e);return r==="yAxis"?rx(e,t):tx(e,t)},iq=(e,t,r)=>dC(e,QO(e),nq(e,t),r),aq=K([qO,iq],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=r0(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(l=>l.key===a);if(c!=null)return c.map(l=>[l[0],l[1]])}}}),oq=K([dt,HO,GO,KO,VO,aq,OF,tq,qO,VF],(e,t,r,n,a,o,c,l,f,h)=>{var p=c.chartData,g=c.dataStartIndex,x=c.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||l==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=p==null?void 0:p.slice(g,x+1),j!=null)return Mq({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:l})}}),sq=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],lq=["id","baseLine"];function yu(){return yu=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},yu.apply(null,arguments)}function f2(e,t){if(e==null)return{};var r,n,a=uq(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 uq(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 cq(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,c=e.strokeWidth,l=(t=o[0])===null||t===void 0?void 0:t.x,f=(r=o[o.length-1])===null||r===void 0?void 0:r.x;if(!He(l)||!He(f))return null;var h=n*Math.abs(l-f),p=Math.max(...o.map(g=>g.y||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.y||0),p)),Ne(p)?v.createElement("rect",{x:l<f?l:l-h,y:0,width:h,height:Math.floor(p+(c?parseInt("".concat(c),10):1))}):null}function dq(e){var t,r,n=e.alpha,a=e.baseLine,o=e.points,c=e.strokeWidth,l=(t=o[0])===null||t===void 0?void 0:t.y,f=(r=o[o.length-1])===null||r===void 0?void 0:r.y;if(!He(l)||!He(f))return null;var h=n*Math.abs(l-f),p=Math.max(...o.map(g=>g.x||0));return Ne(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.x||0),p)),Ne(p)?v.createElement("rect",{x:0,y:l<f?l:l-h,width:p+(c?parseInt("".concat(c),10):1),height:Math.floor(h)}):null}function fq(e){var t=e.alpha,r=e.layout,n=e.points,a=e.baseLine,o=e.strokeWidth;return r==="vertical"?v.createElement(dq,{alpha:t,points:n,baseLine:a,strokeWidth:o}):v.createElement(cq,{alpha:t,points:n,baseLine:a,strokeWidth:o})}function hq(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,l=e.layout,f=e.isRange,h=e.stroke,p=e.connectNulls,g=f2(e,sq),x=l==="vertical"?"vertical":"horizontal",b=p??!1,j=_O(),k=g.id,S=g.baseLine,N=f2(g,lq),E=bn(N),O=v.createElement(rf,yu({},g,{id:k,baseLine:S,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:x})),P=h!=="none"&&v.createElement(rf,yu({},E,{className:"recharts-area-curve",layout:x,type:g.type,connectNulls:b,fill:"none",stroke:h,points:g.points})),_=h!=="none"&&f&&Array.isArray(S)&&v.createElement(rf,yu({},E,{className:"recharts-area-curve",layout:x,type:g.type,connectNulls:b,fill:"none",stroke:h,points:S}));if(c&&(a||r<1)){var C;return v.createElement(tn,null,v.createElement("defs",null,v.createElement("clipPath",{id:j},v.createElement(fq,{alpha:r,points:(C=g.points)!==null&&C!==void 0?C:[],baseLine:S,layout:x,strokeWidth:g.strokeWidth}))),v.createElement(tn,{clipPath:"url(#".concat(j,")")},O,P,_))}return v.createElement(v.Fragment,null,O,P,_)}var pq=["id"],mq=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Jf(){return Jf=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},Jf.apply(null,arguments)}function YO(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 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 Gs(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){vq(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 vq(e,t,r){return(t=yq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yq(e){var t=xq(e,"string");return typeof t=="symbol"?t:t+""}function xq(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 bq=(e,t)=>e==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Gs(Gs({},r.next),{},{x:di(r.prev.x,r.next.x,t),y:di(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),XO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:Q0,animationInterpolateFn:bq,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:hq,xAxisId:0,yAxisId:0,zIndex:hr.area};function eh(e,t){return e&&e!=="none"?e:t}var wq=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:eh(n,a),value:kA(r,t),payload:e}]},kq=v.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,o=e.fill,c=e.name,l=e.hide,f=e.unit,h=e.tooltipType,p=e.id,g={dataDefinedOnItem:r,getPosition:Qs,settings:{stroke:n,strokeWidth:a,fill:o,dataKey:t,nameKey:void 0,name:kA(c,t),hide:l,type:h,color:eh(n,o),unit:f,graphicalItemId:p}};return v.createElement(TK,{tooltipEntrySettings:g})});function jq(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,o=n.dot,c=n.dataKey,l=bn(n);return v.createElement(jG,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:l,needClip:a,clipPathId:t})}function Sq(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(o=>{var c,l,f={x:(c=o.x)!==null&&c!==void 0?c:0,y:(l=o.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Gs(Gs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return v.createElement(xK,{value:t?a:void 0},r)}function Nq(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,o=e.props,c=e.animationElapsedTime,l=e.isAnimating,f=e.isEntrance,h=o.layout,p=o.type,g=o.stroke,x=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=YO(o,pq),N=en(S),E=Gs(Gs({},N),{},{id:k,points:t,connectNulls:x,type:p,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:c,isAnimating:l,isEntrance:f});return v.createElement(v.Fragment,null,(t==null?void 0:t.length)>1&&v.createElement(tn,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},v.createElement(IK,{option:j,DefaultShape:XO.shape,shapeProps:E})),v.createElement(jq,{points:t,props:S,clipPathId:a}))}function Eq(e,t,r){if(Ne(e)){var n=Ne(t)?t:void 0;return di(n,e,r)}if(Yt(e)||Un(e)){var a=Ne(t)?t:void 0;return di(a,0,r)}return e}function Aq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,c=n.points,l=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,p=n.animationDuration,g=n.animationEasing,x=n.animationMatchBy,b=n.animationInterpolateFn,j=v.useMemo(()=>({points:c,baseLine:l}),[c,l]),k=OO(j,o),S=Uy(),N=XK(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,O=N.handleAnimationStart,P=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var C;return Array.isArray(l)&&Array.isArray(_)?C=ry(_,l,x):Array.isArray(l)?C=ry(null,l,x):C=null,v.createElement(ZK,{animationInput:j,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:g,onAnimationStart:O,onAnimationEnd:P,animationInterpolateFn:b,animationMatchBy:x,layout:S},(I,B,U)=>{var G;return B===1?G=l:Array.isArray(l)?G=b(C,B,S):G=U?l:Eq(l,_,B),k.syncStepValue(G,B),v.createElement(Sq,{showLabels:!E,points:c},n.children,v.createElement(Nq,{points:I,baseLine:G,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:U}),v.createElement(kK,{label:n.label}))})}function Pq(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=v.useRef(null),o=v.useRef();return v.createElement(Aq,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:o})}class Cq extends v.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,o=t.className,c=t.top,l=t.left,f=t.needClip,h=t.xAxisId,p=t.yAxisId,g=t.width,x=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=nt("recharts-area",o),N=b,E=eq(n),O=E.r,P=E.strokeWidth,_=PO(n),C=O*2+P,I=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return v.createElement(Ci,{zIndex:k},v.createElement(tn,{className:S},f&&v.createElement("defs",null,v.createElement(JV,{clipPathId:N,xAxisId:h,yAxisId:p}),!_&&v.createElement("clipPath",{id:"clipPath-dots-".concat(N)},v.createElement("rect",{x:l-C/2,y:c-C/2,width:g+C,height:x+C}))),v.createElement(Pq,{needClip:f,clipPathId:N,props:this.props})),v.createElement(i2,{points:a,mainColor:eh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(j)&&v.createElement(i2,{points:j,mainColor:eh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}function Oq(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,o=e.animationEasing,c=e.connectNulls,l=e.dot,f=e.fill,h=e.fillOpacity,p=e.hide,g=e.isAnimationActive,x=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=YO(e,mq),N=Ys(),E=aO(),O=WO(j,k),P=O.needClip,_=Ar(),C=(t=Me(pe=>oq(pe,e.id,_)))!==null&&t!==void 0?t:{},I=C.points,B=C.isRange,U=C.baseLine,G=X0();if(N!=="horizontal"&&N!=="vertical"||G==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var X=G.height,$=G.width,fe=G.x,J=G.y;return!I||!I.length?null:v.createElement(Cq,Jf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:o,baseLine:U,connectNulls:c,dot:l,fill:f,fillOpacity:h,height:X,hide:p,layout:N,isAnimationActive:g,isRange:B,legendType:x,needClip:P,points:I,stroke:b,width:$,left:fe,top:J,xAxisId:j,yAxisId:k}))}var _q=(e,t,r,n,a)=>{var o=r??t;if(Ne(o))return o;var c=e==="horizontal"?a:n,l=c.scale.domain();if(c.type==="number"){var f=Math.max(l[0],l[1]),h=Math.min(l[0],l[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return o==="dataMin"?l[0]:o==="dataMax"?l[1]:l[0]};function Mq(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,o=e.stackedData,c=e.layout,l=e.chartBaseValue,f=e.xAxis,h=e.yAxis,p=e.displayedData,g=e.dataStartIndex,x=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=_q(c,l,n,f,h),N=c==="horizontal",E=!1,O=p.map((_,C)=>{var I,B,U,G;if(k)G=o[g+C];else{var X=zt(_,a);Array.isArray(X)?(G=X,E=!0):G=[S,X]}var $=(I=(B=G)===null||B===void 0?void 0:B[1])!==null&&I!==void 0?I:null,fe=$==null||k&&!r&&zt(_,a)==null;if(N){var J;return{x:lk({axis:f,ticks:x,bandSize:j,entry:_,index:C}),y:fe?null:(J=h.scale.map($))!==null&&J!==void 0?J:null,value:G,payload:_}}return{x:fe?null:(U=f.scale.map($))!==null&&U!==void 0?U:null,y:lk({axis:h,ticks:b,bandSize:j,entry:_,index:C}),value:G,payload:_}}),P;return k||E?P=O.map(_=>{var C,I=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:I!=null&&_.y!=null&&(B=h.scale.map(I))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:I!=null&&(C=f.scale.map(I))!==null&&C!==void 0?C:null,y:_.y,payload:_.payload}}):P=N?h.scale.map(S):f.scale.map(S),{points:O,baseLine:P??0,isRange:E}}function Iq(e){var t=nn(e,XO),r=Ar();return v.createElement(sG,{id:t.id,type:"area"},n=>v.createElement(v.Fragment,null,v.createElement(DK,{legendPayload:wq(t)}),v.createElement(kq,{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}),v.createElement(pG,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:gL(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),v.createElement(Oq,Jf({},t,{id:n}))))}var ZO=v.memo(Iq,Dh);ZO.displayName="Area";var Tq=["domain","range"],Dq=["domain","range"];function p2(e,t){if(e==null)return{};var r,n,a=Rq(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 Rq(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 m2(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 JO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,a=p2(e,Tq),o=t.domain,c=t.range,l=p2(t,Dq);return!m2(r,o)||!m2(n,c)?!1:Dh(a,l)}var $q=["type"],Lq=["dangerouslySetInnerHTML","ticks","scale"],zq=["id","scale"];function ny(){return ny=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},ny.apply(null,arguments)}function g2(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 v2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g2(Object(r),!0).forEach(function(n){Fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fq(e,t,r){return(t=Bq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bq(e){var t=Uq(e,"string");return typeof t=="symbol"?t:t+""}function Uq(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 iy(e,t){if(e==null)return{};var r,n,a=Wq(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 Wq(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Hq(e){var t=Et(),r=v.useRef(null),n=Uy(),a=e.type,o=iy(e,$q),c=zh(n,"xAxis",a),l=v.useMemo(()=>{if(c!=null)return v2(v2({},o),{},{type:c})},[o,c]);return v.useLayoutEffect(()=>{l!=null&&(r.current===null?t(PG(l)):r.current!==l&&t(CG({prev:r.current,next:l})),r.current=l)},[l,t]),v.useLayoutEffect(()=>()=>{r.current&&(t(OG(r.current)),r.current=null)},[t]),null}var Kq=e=>{var t=e.xAxisId,r=e.className,n=Me(SA),a=Ar(),o="xAxis",c=Me(x=>TC(x,o,t,a)),l=Me(x=>N7(x,t)),f=Me(x=>_7(x,t)),h=Me(x=>XP(x,t));if(l==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var p=iy(e,Lq);h.id,h.scale;var g=iy(h,zq);return v.createElement(J0,ny({},p,g,{x:f.x,y:f.y,width:l.width,height:l.height,className:nt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:c,axisType:o,axisId:t}))},Gq={allowDataOverflow:Ot.allowDataOverflow,allowDecimals:Ot.allowDecimals,allowDuplicatedCategory:Ot.allowDuplicatedCategory,angle:Ot.angle,axisLine:vi.axisLine,height:Ot.height,hide:!1,includeHidden:Ot.includeHidden,interval:Ot.interval,label:!1,minTickGap:Ot.minTickGap,mirror:Ot.mirror,orientation:Ot.orientation,padding:Ot.padding,reversed:Ot.reversed,scale:Ot.scale,tick:Ot.tick,tickCount:Ot.tickCount,tickLine:vi.tickLine,tickSize:vi.tickSize,type:Ot.type,niceTicks:Ot.niceTicks,xAxisId:0},Vq=e=>{var t=nn(e,Gq);return v.createElement(v.Fragment,null,v.createElement(Hq,{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}),v.createElement(Kq,t))},e_=v.memo(Vq,JO);e_.displayName="XAxis";var qq=["type"],Qq=["dangerouslySetInnerHTML","ticks","scale"],Yq=["id","scale"];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 y2(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 x2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y2(Object(r),!0).forEach(function(n){Xq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xq(e,t,r){return(t=Zq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zq(e){var t=Jq(e,"string");return typeof t=="symbol"?t:t+""}function Jq(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 oy(e,t){if(e==null)return{};var r,n,a=eQ(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 eQ(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 tQ(e){var t=Et(),r=v.useRef(null),n=Uy(),a=e.type,o=oy(e,qq),c=zh(n,"yAxis",a),l=v.useMemo(()=>{if(c!=null)return x2(x2({},o),{},{type:c})},[c,o]);return v.useLayoutEffect(()=>{l!=null&&(r.current===null?t(_G(l)):r.current!==l&&t(MG({prev:r.current,next:l})),r.current=l)},[l,t]),v.useLayoutEffect(()=>()=>{r.current&&(t(IG(r.current)),r.current=null)},[t]),null}function rQ(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,o=v.useRef(null),c=v.useRef(null),l=Me(SA),f=Ar(),h=Et(),p="yAxis",g=Me(N=>T7(N,t)),x=Me(N=>I7(N,t)),b=Me(N=>TC(N,p,t,f)),j=Me(N=>ZP(N,t));if(v.useLayoutEffect(()=>{if(!(n!=="auto"||!g||q0(a)||v.isValidElement(a)||j==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(TG({id:t,width:E}))}}},[b,g,h,a,t,n,j]),g==null||x==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=oy(e,Qq);j.id,j.scale;var S=oy(j,Yq);return v.createElement(J0,ay({},k,S,{ref:o,labelRef:c,x:x.x,y:x.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:nt("recharts-".concat(p," ").concat(p),r),viewBox:l,ticks:b,axisType:p,axisId:t}))}var nQ={allowDataOverflow:_t.allowDataOverflow,allowDecimals:_t.allowDecimals,allowDuplicatedCategory:_t.allowDuplicatedCategory,angle:_t.angle,axisLine:vi.axisLine,hide:!1,includeHidden:_t.includeHidden,interval:_t.interval,label:!1,minTickGap:_t.minTickGap,mirror:_t.mirror,orientation:_t.orientation,padding:_t.padding,reversed:_t.reversed,scale:_t.scale,tick:_t.tick,tickCount:_t.tickCount,tickLine:vi.tickLine,tickSize:vi.tickSize,type:_t.type,niceTicks:_t.niceTicks,width:_t.width,yAxisId:0},iQ=e=>{var t=nn(e,nQ);return v.createElement(v.Fragment,null,v.createElement(tQ,{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}),v.createElement(rQ,t))},t_=v.memo(iQ,JO);t_.displayName="YAxis";var aQ=(e,t)=>t,nx=K([aQ,dt,fP,Bt,JC,Pi,rW,Zt],uW);function oQ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function ix(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(oQ(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=(l,f)=>({relativeX:Math.round((l-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(l=>c(l.clientX,l.clientY)):c(e.clientX,e.clientY)}var r_=Lr("mouseClick"),n_=Xu();n_.startListening({actionCreator:r_,effect:(e,t)=>{var r=e.payload,n=nx(t.getState(),ix(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(Q7({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var sy=Lr("mouseMove"),i_=Xu(),us=null,Fa=null,Ig=null;i_.startListening({actionCreator:sy,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,o=a.throttleDelay,c=a.throttledEvents,l=c==="all"||(c==null?void 0:c.includes("mousemove"));us!==null&&(cancelAnimationFrame(us),us=null),Fa!==null&&(typeof o!="number"||!l)&&(clearTimeout(Fa),Fa=null),Ig=ix(r);var f=()=>{var h=t.getState(),p=cc(h,h.tooltip.settings.shared);if(!Ig){us=null,Fa=null;return}if(p==="axis"){var g=nx(h,Ig);(g==null?void 0:g.activeIndex)!=null?t.dispatch(WC({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(UC())}us=null,Fa=null};if(!l){f();return}o==="raf"?us=requestAnimationFrame(f):typeof o=="number"&&Fa===null&&(Fa=setTimeout(f,o))}});function sQ(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 b2={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},a_=lr({name:"rootProps",initialState:b2,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:b2.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}}}),lQ=a_.reducer,uQ=a_.actions.updateOptions,cQ=null,dQ={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)},o_=lr({name:"polarOptions",initialState:cQ,reducers:dQ});o_.actions.updatePolarOptions;var fQ=o_.reducer,s_=Lr("keyDown"),l_=Lr("focus"),u_=Lr("blur"),tp=Xu(),cs=null,Ba=null,Kd=null;tp.startListening({actionCreator:s_,effect:(e,t)=>{Kd=e.payload,cs!==null&&(cancelAnimationFrame(cs),cs=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,o=n.throttledEvents,c=o==="all"||o.includes("keydown");Ba!==null&&(typeof a!="number"||!c)&&(clearTimeout(Ba),Ba=null);var l=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var p=f.tooltip.keyboardInteraction,g=Kd;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var x=gu(p,wo(f),Hs(f),Ks(f)),b=x==null?-1:Number(x),j=!Number.isFinite(b)||b<0,k=Pi(f),S=wo(f),N=cc(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var E=qf(f,N,"hover",String(p.index));t.dispatch(Vf({active:!p.active,activeIndex:p.index,activeCoordinate:E}));return}var O=z7(f),P=O==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,C;if(j){var I=Hs(f),B=Ks(f),U=_*P,G=pe=>({active:!1,index:String(pe),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,U>0){for(var X=0;X<S.length;X++)if(gu(G(X),S,I,B)!=null){C=X;break}}else for(var $=S.length-1;$>=0;$--)if(gu(G($),S,I,B)!=null){C=$;break}if(C<0)return}else{C=b+_*P;var fe=(k==null?void 0:k.length)||S.length;if(fe===0||C>=fe||C<0)return}var J=qf(f,N,"hover",String(C));t.dispatch(Vf({active:!0,activeIndex:C.toString(),activeCoordinate:J}))}finally{cs=null,Ba=null}};if(!c){l();return}a==="raf"?cs=requestAnimationFrame(l):typeof a=="number"&&Ba===null&&(l(),Kd=null,Ba=setTimeout(()=>{Kd?l():(Ba=null,cs=null)},a))}});tp.startListening({actionCreator:l_,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=cc(r,r.tooltip.settings.shared),l=qf(r,c,"hover",String(o));t.dispatch(Vf({active:!0,activeIndex:o,activeCoordinate:l}))}}}});tp.startListening({actionCreator:u_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Vf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function c_(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 Vr=Lr("externalEvent"),d_=Xu(),Gd=new Map,lu=new Map,Tg=new Map;d_.startListening({actionCreator:Vr,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var o=a.type,c=c_(a);Tg.set(o,{handler:n,reactEvent:c});var l=Gd.get(o);l!==void 0&&(cancelAnimationFrame(l),Gd.delete(o));var f=t.getState(),h=f.eventSettings,p=h.throttleDelay,g=h.throttledEvents,x=g,b=x==="all"||(x==null?void 0:x.includes(o)),j=lu.get(o);j!==void 0&&(typeof p!="number"||!b)&&(clearTimeout(j),lu.delete(o));var k=()=>{var E=Tg.get(o);try{if(!E)return;var O=E.handler,P=E.reactEvent,_=t.getState(),C={activeCoordinate:BU(_),activeDataKey:LU(_),activeIndex:Fu(_),activeLabel:rO(_),activeTooltipIndex:Fu(_),isTooltipActive:UU(_)};O&&O(C,P)}finally{Gd.delete(o),lu.delete(o),Tg.delete(o)}};if(!b){k();return}if(p==="raf"){var S=requestAnimationFrame(k);Gd.set(o,S)}else if(typeof p=="number"){if(!lu.has(o)){k();var N=setTimeout(k,p);lu.set(o,N)}}else k()}}});var hQ=K([il],e=>e.tooltipItemPayloads),pQ=K([hQ,(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)}}}),f_=Lr("touchMove"),h_=Xu(),Ua=null,ta=null,w2=null,uu=null;h_.startListening({actionCreator:f_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){uu=c_(r);var n=t.getState(),a=n.eventSettings,o=a.throttleDelay,c=a.throttledEvents,l=c==="all"||c.includes("touchmove");Ua!==null&&(cancelAnimationFrame(Ua),Ua=null),ta!==null&&(typeof o!="number"||!l)&&(clearTimeout(ta),ta=null),w2=Array.from(r.touches).map(h=>ix({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(uu!=null){var h=t.getState(),p=cc(h,h.tooltip.settings.shared);if(p==="axis"){var g,x=(g=w2)===null||g===void 0?void 0:g[0];if(x==null){Ua=null,ta=null;return}var b=nx(h,x);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(WC({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(p==="item"){var j,k=uu.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(jL),E=(j=S.getAttribute(SL))!==null&&j!==void 0?j:void 0,O=Co(h).find(C=>C.id===E);if(N==null||O==null||E==null)return;var P=O.dataKey,_=pQ(h,N,E);t.dispatch(q7({activeDataKey:P,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Ua=null,ta=null}};if(!l){f();return}o==="raf"?Ua=requestAnimationFrame(f):typeof o=="number"&&ta===null&&(f(),uu=null,ta=setTimeout(()=>{uu?f():(ta=null,Ua=null)},o))}}});var p_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},m_=lr({name:"eventSettings",initialState:p_,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),mQ=m_.actions.setEventSettings,gQ=m_.reducer,vQ=KE({brush:HG,cartesianAxis:DG,chartData:FW,errorBars:ZV,eventSettings:gQ,graphicalItems:fG,layout:sL,legend:wz,options:DW,polarAxis:SK,polarOptions:fQ,referenceElements:qG,renderedTicks:gV,rootProps:lQ,tooltip:Y7,zIndex:kW}),yQ=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return M$({reducer:vQ,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([n_.middleware,i_.middleware,tp.middleware,d_.middleware,h_.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(oA({type:"raf"}))},devTools:{serialize:{replacer:sQ},name:"recharts-".concat(r)}})};function xQ(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=Ar(),o=v.useRef(null);if(a)return r;o.current==null&&(o.current=yQ(t,n));var c=Iy;return v.createElement($z,{context:c,store:o.current},r)}function bQ(e){var t=e.layout,r=e.margin,n=Et(),a=Ar();return v.useEffect(()=>{a||(n(iL(t)),n(nL(r)))},[n,a,t,r]),null}var wQ=v.memo(bQ,Dh);function kQ(e){var t=Et();return v.useEffect(()=>{t(uQ(e))},[t,e]),null}var jQ=e=>{var t=Et();return v.useEffect(()=>{t(mQ(e))},[t,e]),null},SQ=v.memo(jQ,Dh);function k2(e){var t=e.zIndex,r=e.isPanorama,n=v.useRef(null),a=Et();return v.useLayoutEffect(()=>(n.current&&a(bW({zIndex:t,element:n.current,isPanorama:r})),()=>{a(wW({zIndex:t,isPanorama:r}))}),[a,t,r]),v.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function j2(e){var t=e.children,r=e.isPanorama,n=Me(dW);if(!n||n.length===0)return t;var a=n.filter(c=>c<0),o=n.filter(c=>c>0);return v.createElement(v.Fragment,null,a.map(c=>v.createElement(k2,{key:c,zIndex:c,isPanorama:r})),t,o.map(c=>v.createElement(k2,{key:c,zIndex:c,isPanorama:r})))}var NQ=["children"];function EQ(e,t){if(e==null)return{};var r,n,a=AQ(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 AQ(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 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)}var PQ={width:"100%",height:"100%",display:"block"},CQ=v.forwardRef((e,t)=>{var r=CA(),n=OA(),a=FA();if(!Hn(r)||!Hn(n))return null;var o=e.children,c=e.otherAttributes,l=e.title,f=e.desc,h,p;return c!=null&&(typeof c.tabIndex=="number"?h=c.tabIndex:h=a?0:void 0,typeof c.role=="string"?p=c.role:p=a?"application":void 0),v.createElement(uE,th({},c,{title:l,desc:f,role:p,tabIndex:h,width:r,height:n,style:PQ,ref:t}),o)}),OQ=e=>{var t=e.children,r=Me(Oh);if(!r)return null;var n=r.width,a=r.height,o=r.y,c=r.x;return v.createElement(uE,{width:n,height:a,x:c,y:o},t)},S2=v.forwardRef((e,t)=>{var r=e.children,n=EQ(e,NQ),a=Ar();return a?v.createElement(OQ,null,v.createElement(j2,{isPanorama:!0},r)):v.createElement(CQ,th({ref:t},n),v.createElement(j2,{isPanorama:!1},r))});function _Q(e,t){return DQ(e)||TQ(e,t)||IQ(e,t)||MQ()}function MQ(){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 IQ(e,t){if(e){if(typeof e=="string")return N2(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)?N2(e,t):void 0}}function N2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function TQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function DQ(e){if(Array.isArray(e))return e}function RQ(){var e=Et(),t=v.useState(null),r=_Q(t,2),n=r[0],a=r[1],o=Me(kL);return v.useEffect(()=>{if(n!=null){var c=n.getBoundingClientRect(),l=c.width/n.offsetWidth;He(l)&&l!==o&&e(oL(l))}},[n,e,o]),a}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 $Q(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){LQ(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 LQ(e,t,r){return(t=zQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zQ(e){var t=FQ(e,"string");return typeof t=="symbol"?t:t+""}function FQ(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 xa(){return xa=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},xa.apply(null,arguments)}function rh(e,t){return HQ(e)||WQ(e,t)||UQ(e,t)||BQ()}function BQ(){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 UQ(e,t){if(e){if(typeof e=="string")return A2(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)?A2(e,t):void 0}}function A2(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 WQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,c,l=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);f=!0);}catch(p){h=!0,a=p}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(h)throw a}}return l}}function HQ(e){if(Array.isArray(e))return e}var KQ=()=>(QW(),null);function nh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var GQ=v.forwardRef((e,t)=>{var r,n,a=v.useRef(null),o=v.useState({containerWidth:nh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:nh((n=e.style)===null||n===void 0?void 0:n.height)}),c=rh(o,2),l=c[0],f=c[1],h=v.useCallback((g,x)=>{f(b=>{var j=Math.round(g),k=Math.round(x);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),p=v.useCallback(g=>{if(typeof t=="function"&&t(g),a.current!=null&&(a.current.disconnect(),a.current=null),g!=null&&typeof ResizeObserver<"u"){var x=g.getBoundingClientRect(),b=x.width,j=x.height;h(b,j);var k=N=>{var E=N[0];if(E!=null){var O=E.contentRect,P=O.width,_=O.height;h(P,_)}},S=new ResizeObserver(k);S.observe(g),a.current=S}},[t,h]);return v.useEffect(()=>()=>{var g=a.current;g!=null&&g.disconnect()},[h]),v.createElement(v.Fragment,null,v.createElement(Ju,{width:l.containerWidth,height:l.containerHeight}),v.createElement("div",xa({ref:p},e)))}),VQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height,a=v.useState({containerWidth:nh(r),containerHeight:nh(n)}),o=rh(a,2),c=o[0],l=o[1],f=v.useCallback((p,g)=>{l(x=>{var b=Math.round(p),j=Math.round(g);return x.containerWidth===b&&x.containerHeight===j?x:{containerWidth:b,containerHeight:j}})},[]),h=v.useCallback(p=>{if(typeof t=="function"&&t(p),p!=null){var g=p.getBoundingClientRect(),x=g.width,b=g.height;f(x,b)}},[t,f]);return v.createElement(v.Fragment,null,v.createElement(Ju,{width:c.containerWidth,height:c.containerHeight}),v.createElement("div",xa({ref:h},e)))}),qQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height;return v.createElement(v.Fragment,null,v.createElement(Ju,{width:r,height:n}),v.createElement("div",xa({ref:t},e)))}),QQ=v.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?v.createElement(VQ,xa({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?v.createElement(qQ,xa({},e,{width:r,height:n,ref:t})):v.createElement(v.Fragment,null,v.createElement(Ju,{width:r,height:n}),v.createElement("div",xa({ref:t},e)))});function YQ(e){return e?GQ:QQ}var XQ=v.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,o=e.onClick,c=e.onContextMenu,l=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,p=e.onMouseLeave,g=e.onMouseMove,x=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,O=e.dispatchTouchEvents,P=O===void 0?!0:O,_=v.useRef(null),C=Et(),I=v.useState(null),B=rh(I,2),U=B[0],G=B[1],X=v.useState(null),$=rh(X,2),fe=$[0],J=$[1],pe=RQ(),be=Fy(),de=(be==null?void 0:be.width)>0?be.width:N,Y=(be==null?void 0:be.height)>0?be.height:a,V=v.useCallback(_e=>{pe(_e),typeof t=="function"&&t(_e),G(_e),J(_e),_e!=null&&(_.current=_e)},[pe,t,G,J]),Q=v.useCallback(_e=>{C(r_(_e)),C(Vr({handler:o,reactEvent:_e}))},[C,o]),D=v.useCallback(_e=>{C(sy(_e)),C(Vr({handler:h,reactEvent:_e}))},[C,h]),T=v.useCallback(_e=>{C(UC()),C(Vr({handler:p,reactEvent:_e}))},[C,p]),Z=v.useCallback(_e=>{C(sy(_e)),C(Vr({handler:g,reactEvent:_e}))},[C,g]),oe=v.useCallback(()=>{C(l_())},[C]),re=v.useCallback(()=>{C(u_())},[C]),ue=v.useCallback(_e=>{C(s_(_e.key))},[C]),me=v.useCallback(_e=>{C(Vr({handler:c,reactEvent:_e}))},[C,c]),Pe=v.useCallback(_e=>{C(Vr({handler:l,reactEvent:_e}))},[C,l]),te=v.useCallback(_e=>{C(Vr({handler:f,reactEvent:_e}))},[C,f]),ve=v.useCallback(_e=>{C(Vr({handler:x,reactEvent:_e}))},[C,x]),Oe=v.useCallback(_e=>{C(Vr({handler:k,reactEvent:_e}))},[C,k]),ie=v.useCallback(_e=>{P&&C(f_(_e)),C(Vr({handler:j,reactEvent:_e}))},[C,P,j]),Je=v.useCallback(_e=>{C(Vr({handler:b,reactEvent:_e}))},[C,b]),Be=YQ(E);return v.createElement(cO.Provider,{value:U},v.createElement(dD.Provider,{value:fe},v.createElement(Be,{width:de??(S==null?void 0:S.width),height:Y??(S==null?void 0:S.height),className:nt("recharts-wrapper",n),style:$Q({position:"relative",cursor:"default",width:de,height:Y},S),onClick:Q,onContextMenu:me,onDoubleClick:Pe,onFocus:oe,onBlur:re,onKeyDown:ue,onMouseDown:te,onMouseEnter:D,onMouseLeave:T,onMouseMove:Z,onMouseUp:ve,onTouchEnd:Je,onTouchMove:ie,onTouchStart:Oe,ref:V},v.createElement(KQ,null),r)))}),ZQ=["width","height","responsive","children","className","style","compact","title","desc"];function JQ(e,t){if(e==null)return{};var r,n,a=eY(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 eY(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 tY=v.forwardRef((e,t)=>{var r=e.width,n=e.height,a=e.responsive,o=e.children,c=e.className,l=e.style,f=e.compact,h=e.title,p=e.desc,g=JQ(e,ZQ),x=bn(g);return f?v.createElement(v.Fragment,null,v.createElement(Ju,{width:r,height:n}),v.createElement(S2,{otherAttributes:x,title:h,desc:p},o)):v.createElement(XQ,{className:c,style:l,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(S2,{otherAttributes:x,title:h,desc:p,ref:t},v.createElement(tV,null,o)))});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)}function P2(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 rY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P2(Object(r),!0).forEach(function(n){nY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nY(e,t,r){return(t=iY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iY(e){var t=aY(e,"string");return typeof t=="symbol"?t:t+""}function aY(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 oY={top:5,right:5,bottom:5,left:5},sY=rY({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:oY,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},p_),lY=v.forwardRef(function(t,r){var n,a=nn(t.categoricalChartProps,sY),o=t.chartName,c=t.defaultTooltipEventType,l=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,p={chartName:o,defaultTooltipEventType:c,validateTooltipEventTypes:l,tooltipPayloadSearcher:f,eventEmitter:void 0};return v.createElement(xQ,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},v.createElement(WG,{chartData:h.data}),v.createElement(wQ,{layout:a.layout,margin:a.margin}),v.createElement(SQ,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),v.createElement(kQ,{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}),v.createElement(tY,ly({},a,{ref:r})))}),uY=["axis"],cY=v.forwardRef((e,t)=>v.createElement(lY,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:uY,tooltipPayloadSearcher:IW,categoricalChartProps:e,ref:t}));const dY="rgba(130,130,150,0.14)",C2="rgba(130,130,150,0.85)";function fY(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 g_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function hY({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:u.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:u.jsx("div",{className:"space-y-1",children:t.map(n=>u.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[u.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),u.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),u.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:g_(n.value,r)})]},n.dataKey))})})}function v_({data:e,series:t,unit:r="%",yMode:n="percent",height:a=176}){const o=e.reduce((l,f)=>t.reduce((h,p)=>Math.max(h,Number(f[p.key])||0),l),0),c=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(fY(o*1.15),10);return u.jsx("div",{style:{height:a},className:"w-full",children:u.jsx(nz,{width:"100%",height:"100%",children:u.jsxs(cY,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[u.jsx("defs",{children:t.map(l=>u.jsxs("linearGradient",{id:`grad-${l.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"0%",stopColor:l.color,stopOpacity:.22}),u.jsx("stop",{offset:"100%",stopColor:l.color,stopOpacity:0})]},l.key))}),u.jsx(BO,{vertical:!1,stroke:dY}),u.jsx(e_,{dataKey:"t",hide:!0}),u.jsx(t_,{domain:[0,c],ticks:[0,c/2,c],tickFormatter:l=>g_(l,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:C2}}),u.jsx(lH,{content:u.jsx(hY,{unit:r}),cursor:{stroke:C2,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(l=>u.jsx(ZO,{type:"monotone",dataKey:l.key,name:l.label,stroke:l.color,strokeWidth:2,fill:`url(#grad-${l.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},l.key))]})})})}const pY=[{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 mY(){var c,l,f,h;const{sys:e,hist:t}=eD(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=pY.filter(p=>p.key!=="gpu"||r),a={cpu:(c=e==null?void 0:e.cpu)==null?void 0:c.percent,ram:(l=e==null?void 0:e.ram)==null?void 0:l.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${ns(e.ram.used)}/${ns(e.ram.total)} GB`:"",gpu:r?`${ns(e.gpu.gtt_used)}/${ns(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${ns(e.disk.used)}/${ns(e.disk.total)} GB`:""};return u.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:[u.jsxs("div",{children:[u.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[u.jsx(zn,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),u.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(p=>u.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[u.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:p.color}}),u.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),u.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(a[p.key]??0),"%"]}),o[p.key]&&u.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[p.key]})]},p.key))}),u.jsx(v_,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):u.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)&&u.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&&u.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&u.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function Vd({label:e,value:t,tone:r}){return u.jsxs("div",{className:ce("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:[u.jsx("span",{className:"flex items-center gap-1.5",children:e}),u.jsx("span",{className:"font-mono text-[10px]",children:t})]})}function gY(){var r;const{data:e}=jy(3e3),t=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}));return u.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:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border/20 pb-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(VI,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Updates & Pflege"})]}),(e==null?void 0:e.last_check)&&u.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?u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Vd,{label:"OS-Pakete",tone:e.os>0?"alert":"muted",value:e.os>0?`${e.os} verfügbar`:"aktuell"}),u.jsx(Vd,{label:"Engine (llama.cpp)",tone:e.engine>0?"alert":"muted",value:e.engine>0?"Update verfügbar":"aktuell"}),u.jsx(Vd,{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=>u.jsx(Vd,{tone:n.update===!0?"alert":"muted",label:u.jsxs(u.Fragment,{children:[n.name,n.reachable===!1&&u.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))]}):u.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."})]}),u.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 ",u.jsx(hN,{className:"h-3.5 w-3.5"})]})]})}function y_({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:o,onConfirm:c,onCancel:l}){const f=v.useRef(null);return u.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:u.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:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),u.jsx("button",{onClick:l||(()=>c()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{ref:f,type:"text",defaultValue:n,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var p;h.key==="Enter"&&c((p=f.current)==null?void 0:p.value)}}),a!==void 0&&u.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"})]}),u.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&u.jsx("button",{onClick:l,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),u.jsx("button",{onClick:()=>{var p;const h=e==="prompt"?(p=f.current)==null?void 0:p.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 sl(){const[e,t]=v.useState(null),r=v.useCallback(()=>t(null),[]),n=v.useCallback((l,f,h)=>{t({type:"alert",title:l,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=v.useCallback((l,f,h,p)=>{t({type:"confirm",title:l,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),p==null||p()}})},[]),o=v.useCallback((l,f,h,p,g,x)=>{t({type:"prompt",title:l,message:f,defaultValue:h,autoValue:x==null?void 0:x.autoValue,autoLabel:x==null?void 0:x.autoLabel,onConfirm:b=>{t(null),p(b)},onCancel:()=>{t(null),g==null||g()}})},[]),c=e?u.jsx(y_,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:o,close:r,dialogElement:c}}function vY(){const e=jo(),{data:t}=ky(3e3),{data:r}=No(),{showAlert:n,dialogElement:a}=sl(),[o,c]=v.useState(!1),l=(r==null?void 0:r.models)??[];async function f(h){try{await Ce("/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:kt.agentStatus}),c(!1)}catch(p){n("Fehler",`Fehler beim Wechseln des Gehirns: ${p.message}`)}}return u.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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(yi,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.terminal_url)&&u.jsxs("a",{href:Ls(t.terminal_url),target:"_blank",rel:"noopener",className:ce("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:[u.jsx(ju,{className:"h-3 w-3"})," Terminal öffnen"]})]}),t?u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[u.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),u.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[u.jsx("span",{className:ce("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),u.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[u.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Terminal"}),u.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[u.jsx("span",{className:ce("h-2 w-2 rounded-full",t.terminal_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u.jsx("span",{className:"text-xs font-medium",children:t.terminal_reachable?"Online":"Offline"})]})]}),u.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:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),u.jsx(zn,{className:"h-3 w-3 text-primary"})]}),u.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[u.jsx(oh,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),u.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),u.jsx(lf,{className:"h-3 w-3 text-primary"})]}),u.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[u.jsxs("div",{children:["Config: ",t.has_config?u.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),u.jsxs("div",{children:["Skills: ",t.has_skills?u.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),u.jsxs("div",{children:["Memory: ",t.has_memories?u.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):u.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&u.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[u.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[u.jsx("span",{children:"Telegram"}),u.jsx("span",{className:ce("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),u.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[u.jsx("span",{children:"MCP-Server"}),u.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),u.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[u.jsx("span",{children:"PC Executor"}),u.jsx("span",{className:ce("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&o&&u.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:u.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:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[u.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[u.jsx(zn,{className:"h-4 w-4"}),u.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),u.jsx("button",{onClick:()=>c(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.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 (',u.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",u.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",u.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),u.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...l.map(h=>{var p;return((p=h.name.split("/").pop())==null?void 0:p.replace(".gguf",""))||h.name})].map(h=>{const p=["auto","fast","heavy"].includes(h);return u.jsxs("button",{onClick:()=>f(h),className:ce("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:[u.jsxs("div",{className:"flex flex-col text-left",children:[u.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),u.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&u.jsx(Yr,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function yY(){const{data:e}=No(3e3),t=(e==null?void 0:e.models)??[],r=(e==null?void 0:e.running)??[];return u.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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(oh,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),u.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:iE.map(n=>{var c;const a=t.find(l=>l.role===n),o=a?r.includes(a.name):!1;return u.jsxs("div",{className:ce("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",o?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":a?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[u.jsx("div",{className:"min-w-0 flex-1 mr-2",children:u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx("span",{className:ce("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Ny(n)),children:n}),u.jsxs("div",{className:"flex flex-col min-w-0",children:[u.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:a?(c=a.name.split("/").pop())==null?void 0:c.replace(/\.gguf$/i,""):"nicht zugewiesen"}),a&&u.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[a.prompt_cache&&u.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),a.spec_active&&u.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${a.spec_draft_model})`,children:"SPEC"}),a.parallel_slots>1&&u.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${a.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",a.parallel_slots]}),a.incomplete&&u.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"})]})]})]})}),u.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a?o?u.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):u.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):u.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},n)})})]}),u.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function xY(){const e=jo(),{data:t=[]}=uv({limit:3}),[r,n]=v.useState(""),[a,o]=v.useState("stable"),[c,l]=v.useState(!1);async function f(){if(!(!r.trim()||c)){l(!0);try{await Ce("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{l(!1)}}}return u.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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(ah,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsx("textarea",{value:r,onChange:h=>n(h.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),u.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[u.jsxs("select",{value:a,onChange:h=>o(h.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[u.jsx("option",{value:"stable",children:"🔵 Fakt"}),u.jsx("option",{value:"instruction",children:"📋 Regel"}),u.jsx("option",{value:"user",children:"👤 User"}),u.jsx("option",{value:"versioned",children:"🟡 Version"})]}),u.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:[u.jsx(rv,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),u.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[u.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),u.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?u.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>u.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[u.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}),u.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),u.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 O2=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function bY(){const{data:e}=wy(3e3),t=Z4(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[u.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ku,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),u.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&u.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[u.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),u.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&u.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[u.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",u.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),u.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),u.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:O2.map(a=>u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:a.color}}),u.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:a.label}),u.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?u.jsx(v_,{data:t,series:O2,unit:" tok/s",yMode:"auto",height:150}):u.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),u.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 wY(){const{data:e}=o4(3e3),{showAlert:t,dialogElement:r}=sl(),[n,a]=v.useState({});async function o(c){a(l=>({...l,[c]:!0}));try{const l=await Ce("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:c})});l.ok||t("Fehler",`Neustart fehlgeschlagen: ${l.err||"Unbekannt"}`)}catch(l){t("Fehler",`Fehler: ${l.message}`)}finally{a(l=>({...l,[c]:!1}))}}return u.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:[u.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(gy,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Dienste"})]}),u.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?u.jsxs("div",{className:"flex flex-1 flex-col",children:[u.jsx("div",{className:"space-y-1.5",children:e.services.map(c=>u.jsxs("div",{className:"group flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[u.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[u.jsx("span",{className:ce("h-2.5 w-2.5 shrink-0 rounded-full ring-2 ring-black/40",c.ok?"bg-emerald-500":"bg-amber-500")}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"truncate text-xs font-bold text-foreground",children:c.name}),u.jsx("div",{className:"truncate font-mono text-[9px] text-muted-foreground/60",children:c.url})]})]}),u.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:u.jsx(mu,{className:ce("h-3.5 w-3.5",n[c.name]&&"animate-spin")})})]},c.name))}),u.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:[u.jsxs("a",{href:Ls(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:[u.jsx(ju,{className:"h-3 w-3"})," Engine"]}),u.jsxs("a",{href:Ls(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:[u.jsx(ju,{className:"h-3 w-3"})," Gateway"]})]})]}):u.jsx("div",{className:"flex h-24 items-center justify-center text-xs text-muted-foreground",children:"Lade Dienste…"}),r]})}function _2({children:e}){return u.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function kY(){return u.jsxs("div",{className:"space-y-7",children:[u.jsxs("div",{children:[u.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"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),u.jsxs("div",{className:"grid items-stretch gap-6 lg:grid-cols-3",children:[u.jsx(mY,{}),u.jsx(bY,{}),u.jsx(q4,{})]}),u.jsxs("section",{children:[u.jsx(_2,{children:"Stack-Status"}),u.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[u.jsx(yY,{}),u.jsx(wY,{})]})]}),u.jsxs("section",{children:[u.jsx(_2,{children:"Betrieb & Wissen"}),u.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[u.jsx(gY,{}),u.jsx(vY,{}),u.jsx(xY,{})]})]})]})}function jY(){const e=jo(),{data:t=[]}=l4(2e3),{showAlert:r,dialogElement:n}=sl();async function a(l){try{await Ce(`/api/jobs/${l}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:kt.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(l=>l.state==="running"||l.state==="queued"),c=t.filter(l=>l.state!=="running"&&l.state!=="queued").slice(-3);return o.length===0&&c.length===0?null:u.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:[u.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(l=>u.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[u.jsxs("div",{className:"flex justify-between items-center text-xs",children:[u.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:l.label}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"text-muted-foreground font-mono",children:[l.progress??0,"% • ",cv(l.done_bytes),"/",cv(l.total_bytes),l.eta_s?` • ETA ${h4(l.eta_s)}`:""]}),u.jsx("button",{onClick:()=>a(l.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),u.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:u.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${l.progress??0}%`}})})]},l.id)),c.map(l=>u.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[u.jsx("span",{className:"truncate",children:l.label}),u.jsx("span",{className:ce("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",l.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:l.state})]},l.id)),n]})}function Wa({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 u.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function M2({caps:e}){return e?u.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&u.jsx(Wa,{children:"💻 Code"}),e.vision&&u.jsx(Wa,{children:"👁 Bild"}),e.reasoning&&u.jsx(Wa,{children:"🧠 Reason"}),e.moe&&u.jsxs(Wa,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&u.jsx(Wa,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&u.jsx(Wa,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&u.jsx(Wa,{children:"🔢 Embed"})]}):null}function SY({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:a}=d4(e.gguf_path),[o,c]=v.useState(null),[l,f]=v.useState(""),h=n==null?void 0:n.target_vocab,p=(n==null?void 0:n.drafts)??[],g=p.filter(N=>N.compatible===!0),x=e.spec_draft_model;async function b(N){c(N??"__clear__"),f("");try{await Ce(`/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 u.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:u.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:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[u.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[u.jsx(uo,{className:"h-4 w-4"})," Speculative Draft"]}),u.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.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 ',u.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),u.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:[u.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),u.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&x&&u.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:[u.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[u.jsx(Yr,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",x]}),u.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)&&u.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:[u.jsx(Ds,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),u.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?u.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):p.length===0?u.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 ",u.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):p.map(N=>{var P,_;const E=N.filename===x,O=N.compatible===!0;return u.jsxs("div",{className:ce("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",O?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:N.filename}),u.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[qr(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),O?E?u.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[u.jsx(Yr,{className:"h-3.5 w-3.5"})," Aktiv"]}):u.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"}):u.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:[u.jsx(Ds,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&p.length>0&&g.length===0&&u.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=",u.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",u.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),l&&u.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:l})]})})}function NY(){var Oo,Sa,ll,Mi,Ii,fc,ul,cl;const e=jo(),{data:t,isLoading:r,error:n}=No(4e3),{data:a}=s4(4e3),{data:o}=XN(),{data:c}=jy(4e3),{data:l}=u4(),{data:f}=fh(),{showAlert:h,showConfirm:p,showPrompt:g,dialogElement:x}=sl(),b=(t==null?void 0:t.models)??[],j=(t==null?void 0:t.running)??[],k=n?String(n):"",S=()=>{e.invalidateQueries({queryKey:kt.models}),e.invalidateQueries({queryKey:kt.routing})},[N,E]=v.useState(null),[O,P]=v.useState(null),[_,C]=v.useState(null),[I,B]=v.useState(null),[U,G]=v.useState(!1),[X,$]=v.useState(!1),[fe,J]=v.useState(null),[pe,be]=v.useState("grid"),[de,Y]=v.useState("all"),V=b.filter(F=>de==="in_use"?!!F.role||j.includes(F.name):!0),[Q,D]=v.useState({width:800,height:360}),T=v.useRef(null),Z=v.useCallback(F=>{if(T.current&&(T.current.disconnect(),T.current=null),F){const he=new ResizeObserver(Ae=>{if(!Ae||Ae.length===0)return;const Ue=Ae[0].contentRect;D({width:Ue.width,height:Ue.height})});he.observe(F),T.current=he}},[]),oe=Q.width,re=Q.height,ue=F=>{const he=oe*.1,Ae=re*F,Ue=oe*.5,Ye=re*.5,Jt=oe*.3,tt=Ae,yt=oe*.3;return`M ${he} ${Ae} C ${Jt} ${tt}, ${yt} ${Ye}, ${Ue} ${Ye}`},me=F=>{const he=oe*.5,Ae=re*.5,Ue=oe*.9,Ye=re*F,Jt=oe*.7,tt=Ae,yt=oe*.7;return`M ${he} ${Ae} C ${Jt} ${tt}, ${yt} ${Ye}, ${Ue} ${Ye}`};async function Pe(F){try{await Ce(`/api/models/${encodeURIComponent(F)}/load`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Laden des Modells: ${he.message}`)}}async function te(F){try{await Ce(`/api/models/${encodeURIComponent(F)}/unload`,{method:"POST"}),S()}catch(he){h("Fehler",`Fehler beim Entladen des Modells: ${he.message}`)}}async function ve(){try{await Ce("/api/models/unload",{method:"POST"}),S()}catch(F){h("Fehler",`Fehler beim Entladen aller Modelle: ${F.message}`)}}async function Oe(F,he){try{await Ce(`/api/models/${encodeURIComponent(he)}/role`,{method:"POST",body:JSON.stringify({role:F||null})}),S()}catch(Ae){h("Fehler",`Fehler beim Zuweisen der Rolle: ${Ae.message||Ae}`)}}function ie(F){P(F),C(null),Ce(`/api/roles/${encodeURIComponent(F)}/recommend`).then(he=>C(he)).catch(()=>{})}async function Je(F,he){let Ae=null;try{Ae=await Ce(`/api/models/${encodeURIComponent(F)}/ctx/auto`)}catch{}const Ue=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:";g("Kontextlänge anpassen",Ue,String(he||32768),async Ye=>{if(Ye)try{await Ce(`/api/models/${encodeURIComponent(F)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Ye,10)})}),S()}catch(Jt){h("Fehler",`Fehler beim Setzen des Kontexts: ${Jt.message||Jt}`)}},void 0,Ae?{autoValue:String(Ae.ctx),autoLabel:`Auto (${(Ae.ctx/1024).toFixed(0)}k)`}:void 0)}async function Be(F){p("Modell löschen?",`Modell '${F}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await Ce(`/api/models/${encodeURIComponent(F)}`,{method:"DELETE"}),S()}catch(he){h("Fehler",`Fehler beim Löschen: ${he.message||he}`)}})}async function _e(F,he,Ae,Ue){try{await Ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:he,quant:Ae,jinja:Ue})}),h("Herunterladen gestartet",`Download für '${F}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Ye){h("Fehler",`Fehler beim Starten des Upgrades: ${Ye.message||Ye}`)}}async function jt(F){const he=l==null?void 0:l.budget,Ae=he&&!he.fits?`
|
||
|
||
⚠ Speicher-Warnung: Dieses Brain (~${he.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${he.largest_ondemand_gb} GB) sprengt das das Budget (${he.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";p("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${F.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Ae}`,async()=>{try{await Ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:"hermes",quant:"Q4_K_M",jinja:!0})}),h("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(Ue){h("Fehler",`Update fehlgeschlagen: ${Ue.message||Ue}`)}})}async function ur(F){p("Agent-Hirn wechseln?",`'${F.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await Ce("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:F})}),h("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),G(!1),S()}catch(he){h("Fehler",`Wechsel fehlgeschlagen: ${he.message||he}`)}})}async function Qn(F){F&&(await navigator.clipboard.writeText(F),$(!0),setTimeout(()=>$(!1),1500))}if(r)return u.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(k)return u.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 (",k,")."]});const Yn=b.filter(F=>j.includes(F.name)),sn=Yn.reduce((F,he)=>F+(he.size_bytes||0),0),Fr=((Oo=f==null?void 0:f.gpu)==null?void 0:Oo.gtt_total)||((Sa=f==null?void 0:f.gpu)==null?void 0:Sa.vram_total)||0,Oi=((ll=f==null?void 0:f.gpu)==null?void 0:ll.gtt_used)||0,_i=16*1024**3,ee=Fr>2*1024**3?Fr:sn>_i?sn*1.2:_i,$e=F=>b.find(he=>he.role===F),At=F=>{const he=$e(F);return he?j.includes(he.name):!1};return u.jsxs("div",{className:"space-y-8",children:[u.jsx("style",{children:`
|
||
@keyframes flow-dash {
|
||
to {
|
||
stroke-dashoffset: -20;
|
||
}
|
||
}
|
||
.svg-flow-path {
|
||
stroke-dasharray: 4 6;
|
||
animation: flow-dash 1s linear infinite;
|
||
}
|
||
`}),u.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:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Km,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",qr(sn)," Gewichte",Oi>0?` · ${qr(Oi)} real belegt (inkl. KV)`:""," / ",qr(ee)]}),j.length>0&&u.jsx("button",{onClick:ve,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"})]})]}),u.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:Yn.length===0?u.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"}):Yn.map((F,he)=>{var Ye;const Ae=(F.size_bytes||0)/ee*100,Ue=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][he%4];return u.jsxs("div",{style:{width:`${Ae}%`},className:ce("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",Ue),title:`${F.name} (${qr(F.size_bytes)})`,children:[u.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[F.role?`[${F.role}] `:"",(Ye=F.name.split("/").pop())==null?void 0:Ye.replace(".gguf","")]}),u.jsx("span",{className:"text-[8px] font-mono opacity-80",children:qr(F.size_bytes)})]},F.name)})})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),u.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),u.jsxs("div",{ref:Z,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[u.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[u.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),u.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),u.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[u.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),u.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),u.jsx("path",{d:ue(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="roocode"||N==="roocode")&&u.jsx("path",{d:ue(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:ue(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="cursor"||N==="cursor")&&u.jsx("path",{d:ue(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:ue(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="opencode"||N==="opencode")&&u.jsx("path",{d:ue(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:ue(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="zed"||N==="zed")&&u.jsx("path",{d:ue(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:ue(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(fe==="continue"||N==="continue")&&u.jsx("path",{d:ue(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:me(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),At("fast")&&u.jsx("path",{d:me(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:me(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),At("heavy")&&u.jsx("path",{d:me(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:me(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),At("coder")&&u.jsx("path",{d:me(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:me(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),At("vision")&&u.jsx("path",{d:me(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:me(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),At("scout")&&u.jsx("path",{d:me(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),u.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>J("roocode"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="roocode"?null:"roocode"),children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),u.jsx("span",{children:"Roo Code"})]}),u.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>J("cursor"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="cursor"?null:"cursor"),children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),u.jsx("span",{children:"Cursor IDE"})]}),u.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>J("opencode"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="opencode"?null:"opencode"),children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),u.jsx("span",{children:"OpenCode"})]}),u.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>J("zed"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="zed"?null:"zed"),children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),u.jsx("span",{children:"Zed"})]}),u.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>J("continue"),onMouseLeave:()=>J(null),onClick:()=>E(F=>F==="continue"?null:"continue"),children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),u.jsx("span",{children:"Continue"})]}),u.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[u.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),u.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",a!=null&&a.heavy_threshold_chars?a.heavy_threshold_chars/1e3:"4","k Zeichen"]}),u.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),iE.map(F=>{var Jt;const he=["12%","31%","50%","69%","88%"],Ae=$e(F),Ue=Ae?j.includes(Ae.name):!1;if(F==="agent")return null;const Ye={fast:0,heavy:1,coder:2,vision:3,scout:4}[F];return u.jsxs("div",{className:ce("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",Ue?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":Ae?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:he[Ye]},onClick:()=>ie(F),children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:F}),Ue&&u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),u.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:Ae?(Jt=Ae.name.split("/").pop())==null?void 0:Jt.replace(".gguf",""):"Keine Zuweisung"})]},F)}),N&&o&&u.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:u.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[u.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[N==="roocode"&&"Roo Code Setup",N==="cursor"&&"Cursor Setup",N==="opencode"&&"OpenCode Setup",N==="zed"&&"Zed Setup",N==="continue"&&"Continue Setup"]}),u.jsx("button",{onClick:()=>E(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[N==="roocode"&&u.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[u.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",u.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),u.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",u.jsx("strong",{children:"OpenAI Compatible"}),"."]}),u.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",u.jsx("code",{children:"settings.json"})," ein."]})]}),N==="cursor"&&u.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[u.jsxs("li",{children:["Öffne Cursor Settings ➔ ",u.jsx("strong",{children:"Models"}),"."]}),u.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",u.jsx("strong",{children:"OpenAI API"})," auf."]}),u.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",u.jsx("strong",{children:"auto"}),"."]})]}),N==="opencode"&&u.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[u.jsxs("li",{children:["Öffne die ",u.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),u.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",u.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),N==="zed"&&u.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[u.jsxs("li",{children:["Öffne die Zed Settings (",u.jsx("code",{children:"ctrl+,"}),")."]}),u.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",u.jsx("code",{children:"language_models"})," ein."]})]}),N==="continue"&&u.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[u.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),u.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",u.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),o.tools&&u.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[u.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[u.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),u.jsxs("button",{onClick:()=>{var F,he,Ae,Ue,Ye;return Qn(N==="roocode"?(F=o.tools.cline)==null?void 0:F.snippet:N==="cursor"?(he=o.tools.cursor)==null?void 0:he.snippet:N==="opencode"?(Ae=o.tools.opencode)==null?void 0:Ae.snippet:N==="zed"?(Ue=o.tools.zed)==null?void 0:Ue.snippet:(Ye=o.tools.continue)==null?void 0:Ye.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[X?u.jsx(Yr,{className:"h-3.5 w-3.5 text-emerald-400"}):u.jsx(sf,{className:"h-3.5 w-3.5"}),u.jsx("span",{children:X?"Kopiert":"Kopieren"})]})]}),u.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:u.jsxs("code",{children:[N==="roocode"&&((Mi=o.tools.cline)==null?void 0:Mi.snippet),N==="cursor"&&((Ii=o.tools.cursor)==null?void 0:Ii.snippet),N==="opencode"&&((fc=o.tools.opencode)==null?void 0:fc.snippet),N==="zed"&&((ul=o.tools.zed)==null?void 0:ul.snippet),N==="continue"&&((cl=o.tools.continue)==null?void 0:cl.snippet)]})})]}),u.jsx("button",{onClick:()=>E(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),u.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),u.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),u.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),u.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:[u.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),u.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(F=>{var Ue;const he=b.find(Ye=>Ye.role===F),Ae=he?j.includes(he.name):!1;return u.jsxs("div",{onClick:()=>ie(F),className:ce("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":he?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:ce("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",Ny(F)),children:F}),Ae&&u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),u.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:he==null?void 0:he.name,children:he?(Ue=he.name.split("/").pop())==null?void 0:Ue.replace(/\.gguf$/i,""):"nicht zugewiesen"}),u.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},F)})})]}),(l==null?void 0:l.current)&&u.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:[u.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(yi,{className:"h-4.5 w-4.5 text-indigo-400"}),u.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),l.current.version!=null&&u.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",l.current.version]})]}),u.jsx("button",{onClick:()=>G(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),u.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:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:l.current.name,children:l.current.name.split("/").pop()}),u.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[u.jsx("span",{children:l.current.params_b?`${l.current.params_b}B`:"—"}),u.jsx("span",{children:"•"}),u.jsx("span",{children:l.current.quant||"GGUF"}),u.jsx("span",{children:"•"}),u.jsx("span",{children:qr(l.current.size_bytes||0)})]})]}),l.update_available&&l.recommended?u.jsxs("button",{onClick:()=>jt(l.recommended.repo),className:ce("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",l.budget&&!l.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[u.jsx(Ts,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):u.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:[u.jsx(Yr,{className:"h-4 w-4"})," Neueste Generation"]})]}),l.update_available&&l.recommended&&u.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",u.jsx("span",{className:"font-mono font-bold",children:l.recommended.name.replace(/-GGUF$/i,"")}),"(v",l.recommended.version,", ",l.recommended.params_b,"B) — von NousResearch."]}),l.budget&&u.jsxs("div",{className:ce("text-[10px] flex items-start gap-1.5 leading-relaxed",l.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[u.jsx(Km,{className:"h-3 w-3 shrink-0 mt-0.5"}),u.jsxs("span",{children:["Always-On-Brain ~",l.budget.brain_gb," GB + größtes on-demand (~",l.budget.largest_ondemand_gb," GB) = ",(l.budget.brain_gb+l.budget.largest_ondemand_gb).toFixed(1)," / ",l.budget.gtt_gb," GB",l.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[u.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",V.length," von ",b.length,")"]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[u.jsx("button",{onClick:()=>Y("all"),className:ce("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",de==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),u.jsx("button",{onClick:()=>Y("in_use"),className:ce("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",de==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),u.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[u.jsx("button",{onClick:()=>be("grid"),className:ce("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"}),u.jsx("button",{onClick:()=>be("list"),className:ce("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"?u.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:V.length===0?u.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:de==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):V.map(F=>{const he=j.includes(F.name),Ae=c==null?void 0:c.model_list.find(Ye=>Ye.role===F.role),Ue=Pw(F.name);return u.jsxs("div",{className:ce("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",he?"border-primary/45 shadow-primary/5":F.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[u.jsxs("div",{className:"space-y-3",children:[u.jsx("div",{className:"flex items-start justify-between gap-3",children:u.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[u.jsx("div",{className:ce("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ue.color),title:Ue.name,children:Ue.initial}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:F.name,children:F.name.split("/").pop()}),u.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[u.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:F.quant||"GGUF"}),he&&u.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[u.jsx(ku,{className:"h-3 w-3 animate-pulse"})," Warm"]}),F.role&&u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:F.role}),F.prompt_cache&&u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),F.spec_active?u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${F.spec_draft_model})`,children:"SPEC"}):F.spec_draft_model?u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${F.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,F.parallel_slots>1&&u.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${F.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",F.parallel_slots]}),F.incomplete&&u.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"})]})]})]})}),u.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:u.jsx(M2,{caps:F.capabilities})})]}),u.jsxs("div",{className:"space-y-3 pt-1",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[u.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[u.jsx(Km,{className:"h-3.5 w-3.5 text-primary/80"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),u.jsx("div",{className:"text-foreground font-semibold",children:qr(F.size_bytes)})]})]}),u.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[u.jsx(BI,{className:"h-3.5 w-3.5 text-primary/80"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),u.jsx("div",{className:"text-foreground font-semibold",children:Nw(F.ctx)})]})]})]}),Ae&&u.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:[u.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),u.jsxs("span",{children:["Upgrade verfügbar: ",Ae.repo.split("/").pop()]})]}),u.jsxs("button",{onClick:()=>_e(Ae.repo,F.role,F.quant||"Q4_K_M",F.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[u.jsx(Ts,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),u.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[u.jsx("button",{onClick:()=>he?te(F.name):Pe(F.name),disabled:F.incomplete&&!he,className:ce("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",F.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"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:he?"Entladen":"Laden"}),u.jsx("button",{onClick:()=>Je(F.name,F.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),u.jsxs("button",{onClick:()=>B(F),className:ce("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",F.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":F.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[u.jsx(uo,{className:"h-3 w-3"})," Spec"]}),u.jsx("button",{onClick:()=>Be(F.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:u.jsx(nv,{className:"h-3.5 w-3.5"})})]})]})]},F.name)})}):u.jsx("div",{className:"space-y-2",children:V.length===0?u.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:de==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):V.map(F=>{const he=j.includes(F.name),Ae=Pw(F.name);return u.jsxs("div",{className:ce("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",he?"border-primary/45":F.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u.jsx("div",{className:ce("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}),u.jsxs("div",{className:"min-w-0 text-left",children:[u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:F.name,children:F.name.split("/").pop()}),F.role&&u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:F.role}),F.prompt_cache&&u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),F.spec_active?u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${F.spec_draft_model})`,children:"SPEC"}):F.spec_draft_model?u.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${F.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,F.parallel_slots>1&&u.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${F.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",F.parallel_slots]}),F.incomplete&&u.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"}),he&&u.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),u.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[u.jsxs("span",{children:["Größe: ",qr(F.size_bytes)]}),u.jsx("span",{children:"•"}),u.jsxs("span",{children:["Kontext: ",Nw(F.ctx)]}),u.jsx("span",{children:"•"}),u.jsx("span",{className:"font-mono text-[9px]",children:F.quant||"GGUF"})]})]})]}),u.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[u.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:u.jsx(M2,{caps:F.capabilities})}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("button",{onClick:()=>he?te(F.name):Pe(F.name),disabled:F.incomplete&&!he,className:ce("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",F.incomplete&&!he?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":he?"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:he?"Entladen":"Laden"}),u.jsx("button",{onClick:()=>Je(F.name,F.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),u.jsxs("button",{onClick:()=>B(F),className:ce("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",F.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":F.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[u.jsx(uo,{className:"h-3 w-3"})," Spec"]}),u.jsx("button",{onClick:()=>Be(F.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:u.jsx(nv,{className:"h-3.5 w-3.5"})})]})]})]},F.name)})})]}),O&&(()=>{var Ye,Jt;const F=_&&_.role===O?_:null,he={};F==null||F.models.forEach(tt=>{he[tt.name]=tt});const Ae=F?F.models.map(tt=>b.find(yt=>yt.name===tt.name)).filter(Boolean):b,Ue=tt=>{Oe(O,tt),P(null)};return u.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:u.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:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[u.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),u.jsx("button",{onClick:()=>P(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für die Rolle ",u.jsx("strong",{className:"text-foreground",children:O}),":"]}),(F==null?void 0:F.recommended)&&u.jsxs("button",{onClick:()=>Ue(F.recommended),title:(Ye=he[F.recommended])==null?void 0:Ye.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:[u.jsx(uo,{className:"h-3 w-3"})," Auto: ",(Jt=F.recommended.split("/").pop())==null?void 0:Jt.replace(/\.gguf$/i,"")]})]}),u.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[u.jsx("button",{onClick:()=>Ue(""),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:u.jsx("span",{children:"Zuweisung entfernen"})}),Ae.map(tt=>{var fl;const yt=he[tt.name],Na=tt.role===O,dl=!!(yt!=null&&yt.recommended),hc=!!yt&&!yt.suitable;return u.jsxs("button",{onClick:()=>Ue(tt.name),className:ce("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",dl?"border-primary/50 bg-primary/10":Na?"text-primary font-bold bg-primary/5 border-primary/30":hc?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[u.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[u.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(fl=tt.name.split("/").pop())==null?void 0:fl.replace(/\.gguf$/i,""),dl&&u.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),u.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:yt?`${yt.params_b}B · ${tt.quant} · ${yt.reason}`:`${qr(tt.size_bytes)} · ${tt.quant}`})]}),Na&&u.jsx(Yr,{className:"h-4 w-4 shrink-0 text-primary"})]},tt.name)})]})]})})})(),I&&u.jsx(SY,{model:I,onClose:()=>B(null),onChanged:S}),U&&u.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:u.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:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[u.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[u.jsx(yi,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),u.jsx("button",{onClick:()=>G(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",u.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",u.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),u.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:b.map(F=>{var Ae;const he=F.role==="hermes";return u.jsxs("button",{onClick:()=>!he&&ur(F.name),disabled:he||F.incomplete,className:ce("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",he?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":F.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[u.jsxs("div",{className:"flex flex-col min-w-0",children:[u.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(Ae=F.name.split("/").pop())==null?void 0:Ae.replace(/\.gguf$/i,"")}),u.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[F.capabilities.params_b?`${F.capabilities.params_b}B`:"?"," · ",qr(F.size_bytes),F.role&&` · Rolle: ${F.role}`,F.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),he?u.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[u.jsx(Yr,{className:"h-3.5 w-3.5"})," Aktiv"]}):u.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},F.name)})}),u.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[u.jsx("span",{children:"💡"}),u.jsxs("span",{children:["Für einen ",u.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),x]})}function EY(){const[e,t]=v.useState(""),[r,n]=v.useState([]),[a,o]=v.useState("Q4_K_M"),[c,l]=v.useState(""),[f,h]=v.useState(""),[p,g]=v.useState(""),[x,b]=v.useState([]),[j,k]=v.useState(null),[S,N]=v.useState(!1),E=["fast","heavy","coder","vision","scout"],{data:O}=No(),P=f?O==null?void 0:O.models.find($=>($.role||"").toLowerCase()===f):void 0;async function _($,fe,J){if(N(!1),!$.trim()){k(null);return}try{const pe=await Ce(`/api/fit?params_b=0&quant=${encodeURIComponent(fe)}&ctx=8192&name=${encodeURIComponent($)}&role=${encodeURIComponent(J)}`);k(pe)}catch{k(null)}}async function C($){const fe=$??e;if(fe.trim()){l("Analysiere HuggingFace Repository..."),k(null);try{const J=await Ce(`/api/hf/quants?repo=${encodeURIComponent(fe)}`);t(J.repo),n(J.quants);const pe=J.quants.length?J.quants.includes("Q4_K_M")?"Q4_K_M":J.quants[0]:a;J.quants.length&&o(pe),l(J.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),J.quants.length&&_(J.repo,pe,f)}catch(J){l(`Fehler: ${J}`)}}}function I($){o($),_(e,$,f)}function B($){h($),r.length&&_(e,a,$)}async function U(){if(p.trim()){l("Durchsuche HuggingFace...");try{const $=await Ce(`/api/hf/search?q=${encodeURIComponent(p)}`);b($.results),l($.results.length?"":"Keine Ergebnisse gefunden.")}catch($){l(`Suche fehlgeschlagen: ${$}`)}}}async function G(){if(e.trim()){if((j==null?void 0:j.fit.level)==="too_tight"&&!S){N(!0);return}l("Download-Job wird initiiert...");try{await Ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:e,quant:a,role:f||void 0,jinja:!0})}),N(!1),l(`Download gestartet: ${e} (${a})${f?`, Rolle: ${f}`:""}. Fortschritt oben.`+(P?` „${f}" wurde von ${P.name} übernommen.`:"")+(f==="fast"||f==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch($){l(`Download-Fehler: ${$}`)}}}const X=(j==null?void 0:j.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(j==null?void 0:j.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return u.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[u.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[u.jsx("input",{value:e,onChange:$=>{t($.target.value),k(null),N(!1)},placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:()=>C(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),r.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("select",{value:a,onChange:$=>I($.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:r.map($=>u.jsx("option",{value:$,className:"bg-popover text-foreground",children:$},$))}),u.jsxs("select",{value:f,onChange:$=>B($.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[u.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),E.map($=>u.jsx("option",{value:$,className:"bg-popover text-foreground",children:$},$))]}),u.jsx("button",{onClick:G,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${S?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:S?u.jsxs(u.Fragment,{children:[u.jsx(Ds,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):u.jsxs(u.Fragment,{children:[u.jsx(Ts,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),j&&u.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${X}`,children:[u.jsx("span",{className:"font-bold uppercase tracking-wide",children:j.fit.text}),u.jsxs("span",{className:"font-mono opacity-90",children:["~",j.params_b,"B · ~",j.fit.req_gb," GB / ",j.sys_ram_gb," GB RAM · ~",j.fit.tps," t/s"]}),j.fit.level!=="too_tight"&&u.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${j.budget.gtt_gb} GB − reserviert ${j.budget.reserved_gb} GB (${j.budget.mode}) → ${j.budget.budget_gb} GB frei`,children:["ctx → ",(j.assigned_ctx/1024).toFixed(0),"k"]}),j.fit.level==="too_tight"&&u.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),P&&u.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] font-medium text-amber-400",children:[u.jsx(Ds,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),u.jsxs("span",{children:["Rolle ",u.jsxs("strong",{children:["„",f,'"']})," ist aktuell ",u.jsx("strong",{children:P.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",P.name," bleibt installiert, verliert sie aber."]})]}),u.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[u.jsxs("div",{className:"relative flex-1",children:[u.jsx("input",{value:p,onChange:$=>g($.target.value),onKeyDown:$=>$.key==="Enter"&&U(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),u.jsx(my,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),u.jsx("button",{onClick:U,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),x.length>0&&u.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:x.map($=>u.jsxs("button",{onClick:()=>{t($.repo),b([]),g(""),C($.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[u.jsx("span",{className:"font-semibold truncate",children:$.repo}),u.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[u.jsx(Ts,{className:"h-3 w-3"})," ",$.downloads.toLocaleString()]})]},$.repo))}),c&&u.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:c})]})}const AY={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:uo},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:ah},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:pN},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:ev},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Jg}};function PY(){const{data:e,isLoading:t,error:r}=c4(),{data:n}=No(),{data:a}=jy(),o=(n==null?void 0:n.models)??[],c=r?String(r):"",[l,f]=v.useState({}),[h,p]=v.useState({}),[g,x]=v.useState(!1);async function b(j,k,S,N){f(E=>({...E,[j]:"Starte..."}));try{await Ce("/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(O=>({...O,[j]:"Fehler"}))}}return t?u.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):c||!e?u.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,")."]}):u.jsxs("div",{className:"space-y-8",children:[u.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:[u.jsxs("div",{children:["Modell-Registry geladen für ",u.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(qI,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),u.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),u.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=AY[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:oh},S=k.icon,N=o.find(I=>I.role===j.role),E=a==null?void 0:a.model_list.find(I=>I.role===j.role),O=j.models.find(I=>I.repo===j.recommended)||j.models[0];if(!O)return null;const P=l[O.repo],_=j.models.filter(I=>I.repo!==j.recommended),C=!!h[j.role];return u.jsxs("div",{className:ce("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:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.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:u.jsx(S,{className:"h-5.5 w-5.5"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),u.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?u.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:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):u.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"})]}),u.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),u.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),u.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),u.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[u.jsxs("span",{children:["Größe: ",cv(N.size_bytes||0)]}),u.jsx("span",{children:"•"}),u.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),u.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:O.name,children:O.name}),u.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[u.jsxs("span",{children:["Ersteller: ",O.author]}),u.jsx("span",{children:"•"}),u.jsxs("span",{children:["Quant: ",O.quant]})]}),u.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:u.jsx(V4,{fit:O.fit})})]})}),u.jsx("div",{className:"pt-1",children:N?E?u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),u.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),u.jsxs("button",{onClick:()=>b(E.repo,j.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!l[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:[u.jsx(Ts,{className:"h-3.5 w-3.5"}),l[E.repo]||"Auf neue Version aktualisieren"]})]}):u.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:[u.jsx(Yr,{className:"h-4 w-4"})," Auf neuestem Stand"]}):u.jsxs("button",{onClick:()=>b(O.repo,j.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!P,className:ce("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:[u.jsx(Ts,{className:"h-3.5 w-3.5"}),P||"Optimales Modell einsetzen"]})})]}),_.length>0&&u.jsxs("div",{className:"border-t border-border/20 pt-3",children:[u.jsxs("button",{onClick:()=>p(I=>({...I,[j.role]:!C})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[C?u.jsx(vI,{className:"h-3 w-3"}):u.jsx(mI,{className:"h-3 w-3"}),u.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),C&&u.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(I=>u.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:I.name,children:I.name}),u.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[u.jsxs("span",{children:["Quant: ",I.quant]}),u.jsx("span",{children:"•"}),u.jsx("span",{children:I.fit.text})]})]}),u.jsx("button",{onClick:()=>b(I.repo,j.role,I.quant||"Q4_K_M",I.caps.tools!=="no"),disabled:!!l[I.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:l[I.repo]||"Installieren"})]},I.repo))})]})]},j.role)})}),u.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[u.jsxs("button",{onClick:()=>x(!g),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(my,{className:"h-4 w-4 text-primary"}),u.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),u.jsx("span",{className:"text-[10px] text-primary hover:underline",children:g?"Ausblenden ▲":"Anzeigen ▼"})]}),g&&u.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:u.jsx(EY,{})})]})]})}function CY(){const[e,t]=v.useState("cockpit");return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[u.jsxs("div",{children:[u.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"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),u.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=>u.jsx("button",{onClick:()=>t(r),className:ce("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))})]}),u.jsx(jY,{}),u.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?u.jsx(NY,{}):u.jsx(PY,{})})]})}const OY={cline:"cline_settings.json",cursor:"Settings → Models",opencode:"opencode.jsonc",zed:"settings.json",continue:"~/.continue/config.json",claude_code:"~/.zshrc / env"};function I2({line:e,loading:t}){return t||!e?u.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[u.jsx(DI,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?u.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[u.jsx(yI,{className:"h-3 w-3"})," ",e.detail]}):u.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[u.jsx(bI,{className:"h-3 w-3"})," ",e.detail]})}function T2({tool:e,fileName:t,accent:r,copied:n,onCopy:a}){return u.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[u.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),u.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),u.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),u.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:u.jsx("span",{children:t})}),u.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?u.jsx(Yr,{className:"h-3.5 w-3.5 text-emerald-400"}):u.jsx(sf,{className:"h-3.5 w-3.5"}),u.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),u.jsx("pre",{className:ce("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:u.jsx("code",{children:e.snippet})})]})}function _Y(){const[e,t]=v.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=v.useState(localStorage.getItem("mc_mcp_path")||""),[a,o]=v.useState("cline"),[c,l]=v.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:p}=XN(f.toString()),{data:g,isLoading:x}=f4(),b=p?String(p):"";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,O){O&&(await navigator.clipboard.writeText(O),l(E),setTimeout(()=>l(null),1500))}return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.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"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",u.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),u.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[u.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[u.jsx(OI,{className:"h-7 w-7 mx-auto text-muted-foreground"}),u.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),u.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),u.jsxs("div",{className:"flex flex-col gap-2.5",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(iw,{className:"h-4 w-4 text-muted-foreground shrink-0"}),u.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[u.jsx(zn,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),u.jsx(I2,{line:g==null?void 0:g.gateway,loading:x})]}),u.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · model auto"})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(iw,{className:"h-4 w-4 text-muted-foreground shrink-0"}),u.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[u.jsx(ah,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),u.jsx(I2,{line:g==null?void 0:g.memory,loading:x})]}),u.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),u.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",u.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",u.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),u.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:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[u.jsx(PI,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),u.jsx("input",{value:e,onChange:E=>j(E.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[u.jsx(EI,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",u.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),u.jsx("input",{value:r,onChange:E=>k(E.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-violet-500/50 text-foreground"})]})]}),b&&u.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&&u.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[u.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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[u.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"]}),u.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),u.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,O])=>u.jsx("button",{onClick:()=>o(E),className:ce("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:O.label},E))}),S&&u.jsxs(u.Fragment,{children:[S.note&&u.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:[u.jsx(ow,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),u.jsx("span",{children:S.note})]}),u.jsx(T2,{tool:S,fileName:OY[a]||"config.json",accent:"teal",copied:c==="model",onCopy:()=>N("model",S.snippet)})]})]}),u.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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[u.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",u.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),u.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",u.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),u.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:[u.jsx(ow,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),u.jsx("span",{children:h.memory.note})]}),u.jsx(T2,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:c==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const MY="modulepreload",IY=function(e){return"/"+e},D2={},TY=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let c=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=c(r.map(h=>{if(h=IY(h),h in D2)return;D2[h]=!0;const p=h.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":MY,p||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),p)return new Promise((b,j)=>{x.addEventListener("load",b),x.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=c,window.dispatchEvent(l),!l.defaultPrevented)throw c}return a.then(c=>{for(const l of c||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};class DY extends v.Component{constructor(){super(...arguments);Ql(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?u.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:[u.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),u.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const RY=v.lazy(()=>TY(()=>import("./GraphView-DvI7ySJd.js"),[]).then(e=>({default:e.GraphView}))),R2=["identity","knowledge","rules","events"],$2=new Set(["auto","agent","hermes"]),Dg={identity:{label:"Identität",icon:QI,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:Su,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:HI,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:wI,bg:"bg-amber-500/10",text:"text-amber-400"}},L2={label:"Gedächtnis",icon:Xg,bg:"bg-muted/10",text:"text-muted-foreground"},$Y={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},z2=`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 LY(){const[e,t]=v.useState(""),[r,n]=v.useState(""),[a,o]=v.useState(""),[c,l]=v.useState("knowledge"),[f,h]=v.useState(!1),[p,g]=v.useState(!1),[x,b]=v.useState("graph"),[j,k]=v.useState(!1),S=jo(),{showAlert:N,showConfirm:E,dialogElement:O}=sl(),{data:P=[]}=uv({}),{data:_=[],error:C}=uv({q:r,category:e}),{data:I}=i4(x==="graph"),B=C?String(C):"",U=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},G=v.useMemo(()=>{const V=P.length,Q=P.filter(D=>$2.has(D.source)).length;return{total:V,auto:Q,manual:V-Q,cats:new Set(P.map(D=>D.category)).size}},[P]),X=P.length===0,$=v.useMemo(()=>{const V=I??{nodes:[],edges:[]};if(!r.trim())return V;const Q=r.toLowerCase(),D=V.nodes.filter(Z=>Z.content.toLowerCase().includes(Q)),T=new Set(D.map(Z=>Z.id));return{nodes:D,edges:V.edges.filter(Z=>T.has(Z.source)&&T.has(Z.target))}},[I,r]);async function fe(){a.trim()&&(await Ce("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:c,source:"ui"})}),o(""),k(!1),U())}async function J(V){await Ce(`/api/memory/${V}`,{method:"DELETE"}),U()}async function pe(){try{await navigator.clipboard.writeText(z2),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function be(){pe(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function de(){h(!0);try{const V=await Ce("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(V.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${V.duplicate_count} Dublette(n) in ${V.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await Ce("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),U()}catch(Q){N("Fehler",`Fehler beim Löschen: ${Q.message}`)}})}catch(V){N("Fehler",`Fehler bei der Deduplizierung: ${V.message}`)}finally{h(!1)}}const Y=({value:V,label:Q,accent:D})=>u.jsxs("span",{className:ce("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",D==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[D==="auto"&&u.jsx(du,{className:"h-3 w-3"}),u.jsx("b",{className:ce("font-semibold",D==="auto"?"":"text-foreground"),children:V})," ",Q]});return u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[u.jsxs("div",{children:[u.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"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u.jsxs("div",{className:"relative",children:[u.jsx("input",{value:r,onChange:V=>n(V.target.value),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"}),u.jsx(my,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),u.jsxs("button",{onClick:()=>k(V=>!V),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:[u.jsx(rv,{className:"h-4 w-4"})," Eintrag"]}),u.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",TI,"Liste"],["graph",GI,"Graph"]].map(([V,Q,D])=>u.jsxs("button",{onClick:()=>b(V),className:ce("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",x===V?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[u.jsx(Q,{className:"h-3.5 w-3.5"})," ",D]},V))}),u.jsx("button",{onClick:de,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",title:"Deduplizieren",children:u.jsx(du,{className:"h-4 w-4 text-primary"})})]})]}),!X&&u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(Y,{value:G.total,label:"Fakten"}),u.jsx(Y,{value:G.auto,label:"auto gelernt",accent:"auto"}),u.jsx(Y,{value:G.manual,label:"manuell"}),u.jsx(Y,{value:G.cats,label:"Kategorien"}),u.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[u.jsx(du,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),u.jsx("button",{onClick:()=>k(!1),className:"text-muted-foreground hover:text-foreground",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.jsx("textarea",{value:a,onChange:V=>o(V.target.value),rows:2,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"}),u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsx("select",{value:c,onChange:V=>l(V.target.value),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:R2.map(V=>{var Q;return u.jsx("option",{value:V,className:"bg-popover text-foreground",children:((Q=Dg[V])==null?void 0:Q.label)||V},V)})}),u.jsxs("button",{onClick:fe,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:[u.jsx(rv,{className:"h-4 w-4"})," Speichern"]})]})]}),B&&u.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",B]}),X?u.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:[u.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:u.jsx($I,{className:"h-7 w-7 text-primary"})}),u.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[u.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),u.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."})]}),u.jsxs("div",{className:"w-full max-w-lg text-left",children:[u.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[u.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),u.jsx("button",{onClick:pe,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:p?u.jsxs(u.Fragment,{children:[u.jsx(Yr,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):u.jsxs(u.Fragment,{children:[u.jsx(sf,{className:"h-3 w-3"})," Kopieren"]})})]}),u.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:z2})]}),u.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[u.jsxs("button",{onClick:be,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:[u.jsx(gN,{className:"h-4 w-4"})," Im Terminal starten"]}),u.jsxs("button",{onClick:pe,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:[p?u.jsx(Yr,{className:"h-4 w-4 text-emerald-400"}):u.jsx(sf,{className:"h-4 w-4"})," Prompt kopieren"]})]}),u.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[u.jsx(KI,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",u.jsx("button",{onClick:()=>k(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):x==="graph"?u.jsx(DY,{children:u.jsx(v.Suspense,{fallback:u.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:u.jsx(RY,{data:$,onDelete:J})})}):u.jsxs(u.Fragment,{children:[u.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:[u.jsx("button",{onClick:()=>t(""),className:ce("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"}),R2.map(V=>{const Q=Dg[V]||L2,D=Q.icon;return u.jsxs("button",{onClick:()=>t(V),className:ce("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===V?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[u.jsx(D,{className:"h-3 w-3"})," ",Q.label]},V)})]}),u.jsx("div",{className:"space-y-3",children:_.length===0?u.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."}):_.map(V=>{const Q=Dg[V.category]||L2,D=Q.icon,T=$2.has(V.source);return u.jsxs("div",{className:ce("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",$Y[V.category]||"border-l-muted"),children:[u.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[u.jsxs("span",{className:ce("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",Q.bg,Q.text),children:[u.jsx(D,{className:"h-3 w-3"}),u.jsx("span",{className:"hidden sm:inline",children:Q.label})]}),u.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:V.content})]}),u.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[typeof V.score=="number"&&u.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded uppercase tracking-wider",title:"Relevanz der semantischen Suche",children:[Math.round(V.score*100),"%"]}),u.jsxs("span",{className:ce("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded uppercase tracking-wider",T?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:T?"Automatisch gelernt":"Manuell angelegt",children:[T&&u.jsx(du,{className:"h-2.5 w-2.5"}),V.source]}),u.jsx("button",{onClick:()=>J(V.id),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:u.jsx(nv,{className:"h-3.5 w-3.5"})})]})]},V.id)})})]}),O]})}function qd({label:e,ok:t,detail:r,icon:n,onClick:a}){return u.jsxs("div",{onClick:a,className:ce("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",t?"border-border/60":"border-amber-500/30",a&&"cursor-pointer hover:bg-card/70"),children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:e}),u.jsx(n,{className:ce("h-4.5 w-4.5",t?"text-primary":"text-amber-500")})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:ce("h-2 w-2 rounded-full ring-2 ring-black/40",t?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u.jsx("span",{className:"text-xs font-semibold text-foreground",children:t?"Bereit / Online":"Offline / Inaktiv"})]}),r&&u.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:r,children:r})]}),a&&u.jsxs("button",{onClick:o=>{o.stopPropagation(),a()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[u.jsx(zn,{className:"h-3.5 w-3.5"}),u.jsx("span",{children:"Gehirn wechseln"})]})]})}function zY(){const{data:e,error:t}=ky(5e3),{data:r}=No(),{showAlert:n,dialogElement:a}=sl(),o=jo(),c=t?String(t):"",l=v.useMemo(()=>["auto","fast","heavy",...((r==null?void 0:r.models)??[]).map(_=>{var C;return((C=_.name.split("/").pop())==null?void 0:C.replace(".gguf",""))||_.name})],[r]),[f,h]=v.useState(null),[p,g]=v.useState(!1),[x,b]=v.useState({width:800,height:360}),j=v.useRef(null),k=v.useCallback(P=>{if(j.current&&(j.current.disconnect(),j.current=null),P){const _=new ResizeObserver(C=>{if(!C||C.length===0)return;const I=C[0].contentRect;b({width:I.width,height:I.height})});_.observe(P),j.current=_}},[]),S=x.width,N=x.height,E=(P,_,C,I)=>{const B=(P+C)/2;return`M ${P} ${_} C ${B} ${_}, ${B} ${I}, ${C} ${I}`};async function O(P){try{await Ce("/api/agent/brain",{method:"POST",body:JSON.stringify({model:P})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${P}' geändert. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:kt.agentStatus}),g(!1)}catch(_){n("Fehler",`Fehler beim Wechseln des Gehirns: ${_.message}`)}}return u.jsxs("div",{className:"space-y-6",children:[u.jsx("style",{children:`
|
||
@keyframes flow-dash {
|
||
to {
|
||
stroke-dashoffset: -20;
|
||
}
|
||
}
|
||
.svg-flow-path {
|
||
stroke-dasharray: 4 6;
|
||
animation: flow-dash 1s linear infinite;
|
||
}
|
||
`}),u.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[u.jsxs("div",{children:[u.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"}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",u.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&u.jsxs("a",{href:Ls(e.terminal_url),target:"_blank",rel:"noopener",className:ce("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:[u.jsx(ju,{className:"h-4 w-4"}),u.jsx("span",{children:"Terminal öffnen"})]})]}),c&&u.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&&u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[u.jsx(qd,{label:"Agent Gateway",ok:e.gateway_reachable,detail:"Port :8642 (REST API)",icon:yi}),u.jsx(qd,{label:"Terminal",ok:e.terminal_reachable,detail:"Web-Terminal (hermes chat)",icon:ku}),u.jsx(qd,{label:"Aktives Gehirn",ok:e.gateway_reachable,detail:e.brain_model?`Model: ${e.brain_model}`:"Model: auto",icon:zn,onClick:()=>g(!0)}),u.jsx(qd,{label:"Verdrahtung",ok:e.has_config,detail:`Config: ${e.has_config?"✓":"—"} · Skills: ${e.has_skills?"✓":"—"} · Memory: ${e.has_memories?"✓":"—"}`,icon:lf})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),u.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),u.jsxs("div",{ref:k,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[u.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[u.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),u.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),u.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[u.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),u.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),u.jsx("path",{d:E(S*.15,N*.5,S*.5,N*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="terminal"||e.terminal_reachable)&&u.jsx("path",{d:E(S*.15,N*.5,S*.5,N*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="brain"||e.gateway_reachable)&&u.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),u.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="wiring"||e.gateway_reachable)&&u.jsx("path",{d:E(S*.5,N*.5,S*.85,N*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),u.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>h("terminal"),onMouseLeave:()=>h(null),onClick:()=>e.terminal_reachable&&window.open(Ls(e.terminal_url),"_blank"),title:e.terminal_reachable?"Klicken um das Hermes-Terminal zu öffnen":"Terminal offline",children:[u.jsx(ku,{className:ce("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),u.jsx("span",{children:"Terminal"}),u.jsx("span",{className:ce("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),u.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>h("gateway"),onMouseLeave:()=>h(null),children:[u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(yi,{className:"h-3.5 w-3.5 text-primary"}),u.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),u.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),u.jsx("div",{className:ce("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",e.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:e.gateway_reachable?"Online":"Offline"})]}),u.jsxs("div",{className:ce("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",e.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>h("brain"),onMouseLeave:()=>h(null),onClick:()=>g(!0),children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[u.jsx(zn,{className:"h-3 w-3 text-primary"}),u.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),e.gateway_reachable&&u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),u.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:e.brain_model,children:e.brain_model||"auto"})]}),u.jsxs("div",{className:ce("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",e.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>h("wiring"),onMouseLeave:()=>h(null),children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[u.jsx(lf,{className:"h-3 w-3 text-primary"}),u.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),e.has_config&&u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),u.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[u.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),u.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),u.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),u.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),u.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),u.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:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(LI,{className:"h-5 w-5 text-primary"}),u.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:ce("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),u.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsxs("p",{children:["Der ",u.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",u.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."]}),u.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",u.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."]})]}),u.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?u.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[u.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),u.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",u.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",u.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",u.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):u.jsxs("div",{className:"space-y-2",children:[u.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),u.jsxs("p",{children:["Starte ",u.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",u.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),u.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&&u.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:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Su,{className:"h-5 w-5 text-amber-500"}),u.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),u.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[u.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),u.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",u.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),u.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[u.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),u.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),u.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),u.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",u.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&p&&u.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:u.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:[u.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[u.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[u.jsx(zn,{className:"h-4 w-4"}),u.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),u.jsx("button",{onClick:()=>g(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:u.jsx(pi,{className:"h-4 w-4"})})]}),u.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 (',u.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",u.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",u.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),u.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:l.map(P=>{const _=["auto","fast","heavy"].includes(P);return u.jsxs("button",{onClick:()=>O(P),className:ce("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",e.brain_model===P||!e.brain_model&&P==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[u.jsxs("div",{className:"flex flex-col text-left",children:[u.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:P}),u.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:_?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(e.brain_model===P||!e.brain_model&&P==="auto")&&u.jsx(Yr,{className:"h-4 w-4 shrink-0 text-primary"})]},P)})})]})}),a]})}function FY(){const{data:e}=ky(5e3),t=e!=null&&e.terminal_url?Ls(e.terminal_url):void 0,r=e==null?void 0:e.terminal_reachable;return u.jsxs("div",{className:"flex h-full flex-col gap-4",children:[u.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[u.jsxs("div",{children:[u.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"}),u.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Interaktiver Agent (",u.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".']})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[u.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&u.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:[u.jsx(ju,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?u.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&&u.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[u.jsx(Ds,{className:"h-8 w-8 text-amber-400"}),u.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Terminal nicht erreichbar"}),u.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",u.jsx("code",{className:"font-mono text-primary",children:"hermes-terminal"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",u.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-terminal"}),"."]})]}),u.jsx("iframe",{src:t,title:"Hermes Terminal",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):u.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:[u.jsx(mN,{className:"mr-2 h-4 w-4"})," Lade Terminal…"]})]})}const F2=[{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 BY(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Mr({id:e,icon:t,color:r,title:n,kicker:a,children:o,wide:c}){return u.jsxs("section",{id:e,className:ce("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:[u.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[u.jsx(t,{className:ce("h-5 w-5 shrink-0",r)}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),a&&u.jsx("span",{className:ce("text-[9px] font-mono",r),children:a})]})]}),u.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function Ha({children:e}){return u.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[u.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[u.jsx(du,{className:"h-3 w-3"})," Bei dir konkret"]}),u.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function ze({children:e}){return u.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 wt({href:e,name:t,note:r}){return u.jsxs("li",{className:"leading-relaxed",children:[u.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,u.jsx(fI,{className:"h-3 w-3 opacity-60"})]}),u.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function UY(){const[e,t]=v.useState(!1);return u.jsxs("div",{className:"space-y-7",children:[u.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:[u.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:u.jsx(Xg,{className:"h-6 w-6 text-primary"})}),u.jsxs("div",{className:"space-y-1",children:[u.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"}),u.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. ",u.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",u.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),u.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:u.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:u.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[u.jsx(Jg,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?F2:F2.slice(0,9)).map(r=>u.jsx("button",{onClick:()=>BY(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)),u.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"})]})})}),u.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[u.jsxs(Mr,{id:"grundlagen",icon:zn,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[u.jsxs("p",{children:["Ein LLM ist im Kern ein ",u.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.']}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),u.jsxs("li",{children:[u.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",u.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),u.jsxs(Mr,{id:"moe",icon:oh,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[u.jsxs("p",{children:[u.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",u.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",u.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),u.jsxs("p",{children:[u.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx(ze,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),u.jsxs("li",{children:[u.jsx(ze,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),u.jsxs("li",{children:[u.jsx(ze,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),u.jsxs(Ha,{children:["VRAM/RAM ist die harte Grenze — ",u.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",u.jsx(ze,{children:"Q4_K_M"}),"/",u.jsx(ze,{children:"Q6_K"}),"."]})]}),u.jsxs(Mr,{id:"lokal",icon:gy,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:[u.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"llama-swap"})," — Proxy, der ",u.jsx("em",{children:"mehrere"})," Modelle hinter ",u.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:[u.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),u.jsx("ul",{className:"list-disc pl-4 space-y-1",children:u.jsxs("li",{children:[u.jsx(ze,{children:"CUDA"})," NVIDIA · ",u.jsx(ze,{children:"ROCm"})," AMD · ",u.jsx(ze,{children:"Vulkan"})," herstellerübergreifend · ",u.jsx(ze,{children:"Metal"})," Apple"]})}),u.jsxs("p",{className:"pt-1",children:[u.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",u.jsx(ze,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",u.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),u.jsxs(Ha,{children:["Deine Box hat eine AMD-APU (gfx1151). ",u.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",u.jsx(ze,{children:"Vulkan/RADV"})," das offizielle ",u.jsx(ze,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",u.jsx(ze,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",u.jsx(ze,{children:"coder"})," nutzt Spec-Decoding."]})]}),u.jsxs(Mr,{id:"modelle",icon:Zg,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:u.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Llama"})," (Meta), ",u.jsx("strong",{children:"Gemma"})," (Google), ",u.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"DeepSeek"}),", ",u.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:u.jsx("strong",{children:"Frontier (Cloud-API):"})}),u.jsx("ul",{className:"list-disc pl-4 space-y-1",children:u.jsxs("li",{children:[u.jsx("strong",{children:"Claude"})," (Anthropic), ",u.jsx("strong",{children:"GPT"})," (OpenAI), ",u.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),u.jsxs("p",{className:"pt-1",children:[u.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."]})]})]}),u.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".'}),u.jsxs(Ha,{children:["Dein Line-up via llama-swap: ",u.jsx(ze,{children:"fast"})," (Alltag/Vision/MoE) · ",u.jsx(ze,{children:"heavy"})," (schwere Logik) ·",u.jsx(ze,{children:"coder"})," · ",u.jsx(ze,{children:"scout"})," · ",u.jsx(ze,{children:"vision"})," · ",u.jsx(ze,{children:"embed"})," (fürs Gedächtnis) ·",u.jsx(ze,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",u.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),u.jsxs(Mr,{id:"gateway",icon:FI,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[u.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",u.jsx("strong",{children:"OpenAI-Format"})," (",u.jsx(ze,{children:"/v1/chat/completions"}),"). Ein",u.jsx("strong",{children:" Gateway"})," davor gibt dir ",u.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",u.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),u.jsxs("p",{children:["Die ",u.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.']}),u.jsxs(Ha,{children:["Dein Gateway: ",u.jsx(ze,{children:"http://192.168.178.151:9001/v1"}),", Model ",u.jsx(ze,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",u.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),u.jsxs(Mr,{id:"mcp",icon:tv,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[u.jsxs("p",{children:["Das ",u.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",u.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),u.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),u.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:[u.jsx(RI,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),u.jsxs("span",{children:[u.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),u.jsxs(Mr,{id:"skills",icon:WI,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[u.jsxs("p",{children:["Ein ",u.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",u.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."]}),u.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
|
||
...`}),u.jsxs("p",{children:["Suchen & installieren über die ",u.jsx("strong",{children:"skills.sh"}),"-Registry: ",u.jsx(ze,{children:"npx skills find"})," /",u.jsx(ze,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),u.jsxs(Mr,{id:"memory",icon:SI,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:["LLMs sind ",u.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",u.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:[u.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:["extrahiert Fakten ",u.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),u.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),u.jsxs("li",{children:[u.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",u.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),u.jsxs(Ha,{children:["Dein Gedächtnis (Tab ",u.jsx("strong",{children:"Gedächtnis"}),") ist ",u.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",u.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",u.jsx(ze,{children:"Identität"})," · ",u.jsx(ze,{children:"Wissen"})," · ",u.jsx(ze,{children:"Regeln"})," · ",u.jsx(ze,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",u.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",u.jsx("br",{}),u.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),u.jsxs(Mr,{id:"agents",icon:yi,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[u.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:["Ein ",u.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",u.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{children:[u.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."]}),u.jsxs("p",{children:[u.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",u.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),u.jsxs(Ha,{children:[u.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",u.jsx(ze,{children:"fast"}),"). Reden tust du mit ihm im",u.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",u.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",u.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",u.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),u.jsxs(Mr,{id:"ide",icon:pN,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[u.jsxs("p",{children:["Jede ",u.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Cline"})," & ",u.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Continue"}),", ",u.jsx("strong",{children:"aider"})," (CLI), ",u.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),u.jsxs(Ha,{children:["Tipp den Kram nicht ab: der ",u.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",u.jsx(ze,{children:"…:9001/v1"}),", Model ",u.jsx(ze,{children:"auto"}),", Key beliebig."]})]}),u.jsx(Mr,{id:"tricks",icon:II,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:u.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])=>u.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[u.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[u.jsx(uo,{className:"h-3 w-3 text-amber-400"})," ",r]}),u.jsx("p",{className:"text-[11px]",children:n})]},r))})}),u.jsx(Mr,{id:"wartung",icon:Su,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:u.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[u.jsx(AI,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[u.jsx(lf,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",u.jsx(ze,{children:"restore.sh"})," (Doku in ",u.jsx(ze,{children:"docs/BACKUP.md"}),")."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",u.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",u.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),u.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),u.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:[u.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[u.jsx(Jg,{className:"h-5 w-5 text-primary"}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),u.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),u.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[u.jsx(Zg,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[u.jsx(wt,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),u.jsx(wt,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),u.jsx(wt,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),u.jsx(wt,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),u.jsx(wt,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),u.jsx(wt,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[u.jsx(tv,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[u.jsx(wt,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),u.jsx(wt,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),u.jsx(wt,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),u.jsx(wt,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),u.jsx(wt,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[u.jsx(yi,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[u.jsx(wt,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),u.jsx(wt,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),u.jsx(wt,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),u.jsx(wt,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),u.jsx(wt,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[u.jsx(Xg,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),u.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[u.jsx(wt,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),u.jsx(wt,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),u.jsx(wt,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),u.jsx(wt,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),u.jsx(wt,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),u.jsx(Mr,{id:"troubleshooting",icon:MI,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:u.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",u.jsx(ze,{children:":9001"}),")? Backend-Status in der ",u.jsx("strong",{children:"Zentrale"})," prüfen."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",u.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",u.jsx(ze,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",u.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",u.jsx(ze,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),u.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 WY({title:e,hint:t}){return u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-xl font-semibold",children:e}),u.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),u.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:[u.jsx(jI,{className:"h-8 w-8 text-muted-foreground"}),u.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const B2=[{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 Qd({icon:e,iconClass:t,name:r,status:n,available:a,busy:o,actionLabel:c,onAction:l}){return u.jsxs("div",{className:ce("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:[u.jsx(e,{className:ce("h-4 w-4 shrink-0",t)}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"text-xs text-foreground truncate",children:r}),u.jsx("div",{className:ce("text-[10px] truncate",a?"text-amber-400/90":"text-muted-foreground"),children:n})]}),u.jsx("button",{onClick:l,disabled:!a||o,className:ce("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 HY({label:e,ok:t,system:r,busy:n,onRestart:a,onLogs:o}){return u.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[u.jsx("span",{className:ce("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),u.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&u.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),u.jsx("button",{onClick:a,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:u.jsx(mu,{className:ce("h-3.5 w-3.5",n&&"animate-spin")})}),u.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:u.jsx(NI,{className:"h-3.5 w-3.5"})})]})}function Rg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function KY({open:e,onClose:t,defaultTab:r="maintenance"}){var _i;const[n,a]=v.useState(null),[o,c]=v.useState([]),[l,f]=v.useState("llama-swap"),[h,p]=v.useState(""),[g,x]=v.useState(!1),[b,j]=v.useState(null),[k,S]=v.useState({}),[N,E]=v.useState("maintenance"),[O,P]=v.useState(!1),[_,C]=v.useState(""),[I,B]=v.useState(!1),[U,G]=v.useState(null),[X,$]=v.useState([]),[fe,J]=v.useState(!1),[pe,be]=v.useState(null);function de(ee,$e,At){be({type:"alert",title:ee,message:$e,onConfirm:()=>{be(null),At&&At()}})}function Y(ee,$e,At){be({type:"confirm",title:ee,message:$e,onConfirm:()=>{be(null),At()},onCancel:()=>be(null)})}function V(ee){return ee?new Date(ee*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[Q,D]=v.useState(""),[T,Z]=v.useState(""),[oe,re]=v.useState(!1),[ue,me]=v.useState(!1);v.useEffect(()=>{e&&(D(localStorage.getItem("mc_sudo_password")||""),Z(localStorage.getItem("mc_hf_token")||""))},[e]),v.useEffect(()=>{e&&r&&E(r)},[e,r]);const Pe=v.useRef(null);function te(){Ce("/api/maintenance/updates").then(a).catch(ee=>console.error("Error loading updates",ee))}function ve(){Ce("/api/jobs").then(ee=>c(ee.jobs||[])).catch(ee=>console.error("Error loading jobs",ee))}function Oe(){Ce("/api/system/services").then(G).catch(()=>{})}function ie(){Ce("/api/system/backups").then(ee=>$(ee.backups||[])).catch(()=>{})}function Je(ee){x(!0),j(null),Ce(`/api/maintenance/logs?service=${ee}&lines=150`).then($e=>{$e.ok?p($e.text):(p(`Fehler beim Laden der Logs: ${$e.err||"Unbekannter Fehler"}`),($e.status==="incorrect_password"||$e.status==="password_required")&&j($e.status))}).catch($e=>p(`Fehler: ${$e.message}`)).finally(()=>{x(!1),setTimeout(()=>{Pe.current&&(Pe.current.scrollTop=Pe.current.scrollHeight)},50)})}v.useEffect(()=>{if(!e)return;te(),ve(),Oe(),ie();const ee=setInterval(()=>{ve(),te(),Oe()},3e3);return()=>clearInterval(ee)},[e]),v.useEffect(()=>{!e||N!=="logs"||Je(l)},[e,N,l]);async function Be(){try{await Ce("/api/maintenance/os-update",{method:"POST"}),ve(),E("maintenance")}catch(ee){de("Fehler",`Fehler beim Starten des OS-Updates: ${ee.message}`)}}async function _e(){try{await Ce("/api/maintenance/engine-update",{method:"POST"}),ve(),E("maintenance")}catch(ee){de("Fehler",`Fehler beim Engine-Update: ${ee.message}`)}}function jt(){Y("Hermes-Agent aktualisieren","Zieht die neuesten Änderungen aus git, installiert Abhängigkeiten neu und startet den Hermes-Gateway neu (vorher automatisches Backup). Fortschritt unter Hintergrund-Aufgaben.",async()=>{J(!0);try{await Ce("/api/maintenance/hermes-update",{method:"POST"}),ve()}catch(ee){de("Fehler",`Hermes-Update fehlgeschlagen: ${ee.message}`)}finally{J(!1)}})}async function ur(){P(!0);try{await Ce("/api/maintenance/check-updates",{method:"POST"}),ve(),E("maintenance")}catch(ee){de("Fehler",`Fehler bei der Update-Suche: ${ee.message}`)}finally{P(!1)}}async function Qn(ee,$e){try{await Ce("/api/models/install",{method:"POST",body:JSON.stringify({repo:ee,role:$e})}),de("Gestartet",`Modell-Upgrade für '${$e}' (${ee}) gestartet.`),ve(),E("maintenance")}catch(At){de("Fehler",`Fehler beim Starten des Modell-Upgrades: ${At.message}`)}}async function Yn(){Y("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Ce("/api/maintenance/reboot",{method:"POST"}),de("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(ee){de("Fehler",`Fehler beim Reboot: ${ee.message}`)}})}async function sn(){B(!0),C("Snapshot wird erzeugt...");try{const ee=await Ce("/api/system/backup",{method:"POST"});C(ee.ok?`Snapshot erzeugt: ${ee.snapshot} (${ee.files.length} Komponenten)`:"Backup fehlgeschlagen."),ie()}catch(ee){C(`Fehler: ${ee.message}`)}finally{B(!1)}}async function Fr(ee){S($e=>({...$e,[ee]:!0}));try{const $e=await Ce("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:ee})});$e.ok?de("Dienst neu gestartet",`Dienst ${ee} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&l===ee&&Je(ee)}):de("Fehler",`Fehler beim Neustart: ${$e.err||"Unbekannter Fehler"}`)}catch($e){de("Fehler",`Fehler beim Neustart: ${$e.message}`)}finally{S($e=>({...$e,[ee]:!1}))}}async function Oi(ee){try{await Ce(`/api/jobs/${ee}/cancel`,{method:"POST"}),ve()}catch($e){de("Fehler",`Fehler beim Abbrechen: ${$e.message}`)}}return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:ce("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}),u.jsxs("div",{className:ce("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:[u.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(zn,{className:"h-4.5 w-4.5 text-primary"}),u.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),u.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:u.jsx(pi,{className:"h-4 w-4"})})]}),u.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[u.jsx("button",{onClick:()=>E("maintenance"),className:ce("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"}),u.jsx("button",{onClick:()=>E("logs"),className:ce("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"}),u.jsx("button",{onClick:()=>E("settings"),className:ce("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"})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"space-y-2.5",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),u.jsxs("button",{onClick:ur,disabled:O,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[u.jsx(mu,{className:ce("h-3 w-3",O&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&u.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",V(n.last_check)]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Qd,{icon:Su,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Aktualisieren",onAction:Be}),u.jsx(Qd,{icon:gy,iconClass:"text-violet-400",name:"Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Aktualisieren",onAction:_e}),(()=>{var $e;const ee=($e=n==null?void 0:n.components)==null?void 0:$e.find(At=>At.key==="hermes_agent");return u.jsx(Qd,{icon:yi,iconClass:"text-amber-400",name:"Hermes-Agent",available:(ee==null?void 0:ee.update)===!0,busy:fe,status:(ee==null?void 0:ee.update)===!0?`Update: ${ee.latest}`:(ee==null?void 0:ee.reachable)===!1?"offline":"aktuell",actionLabel:"Aktualisieren",onAction:jt})})(),(_i=n==null?void 0:n.model_list)==null?void 0:_i.map(ee=>u.jsx(Qd,{icon:hI,iconClass:"text-emerald-400",name:`Modell · ${ee.role}`,available:!0,status:ee.title,actionLabel:"Upgrade",onAction:()=>Qn(ee.repo,ee.role)},ee.role))]})]}),u.jsxs("div",{className:"space-y-2.5",children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),u.jsx("div",{className:"space-y-1.5",children:B2.map(ee=>{var $e;return u.jsx(HY,{label:ee.label,system:ee.type==="system",ok:($e=U==null?void 0:U.services.find(At=>At.name.toLowerCase().includes(ee.reach)))==null?void 0:$e.ok,busy:k[ee.id],onRestart:()=>Fr(ee.id),onLogs:()=>{f(ee.id),E("logs")}},ee.id)})})]}),u.jsxs("div",{className:"space-y-2.5",children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),u.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"text-xs text-foreground truncate",children:X[0]?`Letztes: ${X[0].snapshot}`:"Noch kein Backup"}),u.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[X.length," Snapshots · Restore per CLI (restore.sh)"]})]}),u.jsxs("button",{onClick:sn,disabled:I,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:[u.jsx(pI,{className:ce("h-3.5 w-3.5",I&&"animate-pulse")})," Snapshot"]})]}),_&&u.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:_})]}),u.jsxs("div",{className:"space-y-2.5",children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),u.jsxs("button",{onClick:Yn,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:[u.jsx(UI,{className:"h-4.5 w-4.5"}),u.jsxs("div",{children:[u.jsx("div",{children:"Host-System neu starten"}),u.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),u.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(ee=>ee.state==="running"||ee.state==="queued").length," Aktiv"]})]}),u.jsx("div",{className:"space-y-3",children:o.length===0?u.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(ee=>{const $e=ee.state==="running"||ee.state==="queued";return u.jsxs("div",{className:ce("p-3 rounded-xl border transition-all duration-300",$e?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[$e&&u.jsxs("span",{className:"flex h-2 w-2 relative",children:[u.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),u.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),ee.label]}),u.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[u.jsxs("span",{children:["ID: ",ee.id]}),u.jsx("span",{children:"•"}),u.jsx("span",{className:ce(ee.state==="done"&&"text-emerald-400",ee.state==="failed"&&"text-red-400",ee.state==="running"&&"text-primary",ee.state==="queued"&&"text-amber-400",ee.state==="canceled"&&"text-muted-foreground"),children:ee.state})]})]}),$e&&u.jsx("button",{onClick:()=>Oi(ee.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"})]}),ee.state==="running"&&u.jsxs("div",{className:"mt-3 space-y-1",children:[u.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${ee.progress??0}%`}})}),u.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[u.jsxs("span",{children:[ee.progress??0,"%"]}),ee.done_bytes!=null&&ee.total_bytes!=null&&u.jsxs("span",{children:[Rg(ee.done_bytes)," / ",Rg(ee.total_bytes),ee.rate_bps!=null&&` (${Rg(ee.rate_bps)}/s)`]}),ee.eta_s!=null&&u.jsxs("span",{children:["ETA: ",ee.eta_s,"s"]})]})]})]},ee.id)})})]})]}),N==="logs"&&u.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("select",{value:l,onChange:ee=>f(ee.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:B2.map(ee=>u.jsxs("option",{value:ee.id,children:[ee.label," (",ee.type==="system"?"systemd-root":"user",")"]},ee.id))}),u.jsxs("button",{onClick:()=>Fr(l),disabled:k[l],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[u.jsx(mu,{className:ce("h-3.5 w-3.5",k[l]&&"animate-spin")}),"Restart"]})]}),u.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:[u.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[u.jsx(gN,{className:"h-3 w-3 text-primary"}),u.jsxs("span",{children:["stdout/stderr - ",l]})]}),u.jsx("button",{onClick:()=>Je(l),disabled:g,className:"text-muted-foreground hover:text-foreground transition-colors",children:u.jsx(mu,{className:ce("h-3 w-3",g&&"animate-spin")})})]}),u.jsx("pre",{ref:Pe,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"?u.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[u.jsx(Ds,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),u.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."}),u.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",l," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),u.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?u.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||u.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),u.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."})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[u.jsx(Su,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:oe?"text":"password",value:Q,onChange:ee=>D(ee.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),u.jsx("button",{type:"button",onClick:()=>re(!oe),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:oe?u.jsx(aw,{className:"h-4 w-4"}):u.jsx(ev,{className:"h-4 w-4"})})]}),u.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."})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[u.jsx(CI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:ue?"text":"password",value:T,onChange:ee=>Z(ee.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),u.jsx("button",{type:"button",onClick:()=>me(!ue),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:ue?u.jsx(aw,{className:"h-4 w-4"}):u.jsx(ev,{className:"h-4 w-4"})})]}),u.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."})]}),u.jsxs("div",{className:"flex gap-3 pt-2",children:[u.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",Q),localStorage.setItem("mc_hf_token",T),de("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"}),u.jsx("button",{onClick:()=>{D(""),Z(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),de("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"})]})]})]})]}),pe&&u.jsx(y_,{type:pe.type,title:pe.title,message:pe.message,onConfirm:pe.onConfirm,onCancel:pe.onCancel})]})}function GY(){var g,x,b,j,k;J4();const[e,t]=v.useState("dashboard"),[r,n]=v.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[a,o]=v.useState(!1),[c,l]=v.useState("maintenance"),{data:f}=a4(),{data:h}=fh(2e4);v.useEffect(()=>{document.documentElement.classList.add("dark")},[]),v.useEffect(()=>{const S=N=>{var O;l(((O=N.detail)==null?void 0:O.tab)||"maintenance"),o(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]),v.useEffect(()=>{const S=N=>{var O;const E=(O=N.detail)==null?void 0:O.view;E&&t(E)};return window.addEventListener("mc-navigate",S),()=>window.removeEventListener("mc-navigate",S)},[]);const p=iv.find(S=>S.id===e);return u.jsxs("div",{className:"flex h-full relative",children:[u.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[u.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]"}),u.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),u.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),u.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),u.jsx(n4,{onNavigate:t}),u.jsx(KY,{open:a,onClose:()=>o(!1),defaultTab:c}),u.jsxs("aside",{className:ce("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",r?"w-16":"w-60"),children:[u.jsxs("div",{className:ce("flex items-center py-4 border-b border-border/40 shrink-0",r?"flex-col gap-3 px-2":"justify-between px-5"),children:[u.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[u.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!r&&u.jsxs("div",{className:"leading-tight",children:[u.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),u.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),u.jsx("button",{onClick:()=>{n(S=>{const N=!S;return localStorage.setItem("mc_sidebar_collapsed",N.toString()),N})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:r?"Maximieren":"Minimieren",children:r?u.jsx(hN,{className:"h-4 w-4"}):u.jsx(gI,{className:"h-4 w-4"})})]}),u.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:iv.map(S=>u.jsxs("button",{onClick:()=>t(S.id),className:ce("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",r?"justify-center p-2.5":"gap-3 px-3 py-2",e===S.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:r?S.label:void 0,children:[u.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0"}),!r&&u.jsx("span",{className:"truncate",children:S.label})]},S.id))}),u.jsx("div",{className:ce("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",r?"px-2 text-center":"px-5"),children:r?u.jsx("div",{className:"flex justify-center",children:u.jsx("span",{className:ce("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",f?f.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:f?`Engine ${f.engine_reachable?"online":"offline"}`:"Backend offline"})}):u.jsxs("div",{className:"space-y-2 text-left",children:[f?u.jsxs("span",{className:"flex items-center gap-2",children:[u.jsx("span",{className:ce("h-2 w-2 rounded-full animate-pulse",f.engine_reachable?"bg-emerald-500":"bg-amber-500")}),u.jsxs("span",{className:"truncate",children:["Engine ",f.engine_reachable?"online":"offline"]})]}):u.jsxs("span",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",u.jsx("span",{className:"truncate",children:"Backend offline"})]}),(h==null?void 0:h.versions)&&u.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[u.jsxs("div",{className:"truncate",title:h.versions.mc2?`${h.versions.mc2.branch}-${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""} (${h.versions.mc2.date})`:"nicht gefunden",children:[u.jsx("strong",{children:"MC2:"})," ",h.versions.mc2?`${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""}`:"—"]}),u.jsxs("div",{className:"truncate",title:((g=h.versions.engine)==null?void 0:g.type)==="git"?`${h.versions.engine.branch}-${h.versions.engine.hash}${h.versions.engine.dirty?"*":""} (${h.versions.engine.date})`:((x=h.versions.engine)==null?void 0:x.version_text)||"unbekannt",children:[u.jsx("strong",{children:"Engine:"})," ",((b=h.versions.engine)==null?void 0:b.type)==="git"?`${h.versions.engine.hash}${h.versions.engine.dirty?"*":""}`:((k=(j=h.versions.engine)==null?void 0:j.version_text)==null?void 0:k.split(" ").pop())||"—"]}),u.jsxs("div",{className:"truncate",title:h.versions.hermes_ui?`${h.versions.hermes_ui.branch}-${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""} (${h.versions.hermes_ui.date})`:"nicht gefunden",children:[u.jsx("strong",{children:"Hermes UI:"})," ",h.versions.hermes_ui?`${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""}`:"—"]}),u.jsxs("div",{className:"truncate",title:h.versions.hermes_agent?`${h.versions.hermes_agent.branch}-${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""} (${h.versions.hermes_agent.date})`:"nicht gefunden",children:[u.jsx("strong",{children:"Hermes Agent:"})," ",h.versions.hermes_agent?`${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),u.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[u.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:[u.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:p.hint}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.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"}),u.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[u.jsx(kI,{className:"h-3.5 w-3.5"}),u.jsx("span",{children:"Suchen"}),u.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),u.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&u.jsx(kY,{}),e==="models"&&u.jsx(CY,{}),e==="connect"&&u.jsx(_Y,{}),e==="memory"&&u.jsx(LY,{}),e==="agent"&&u.jsx(zY,{}),e==="terminal"&&u.jsx(FY,{}),e==="guide"&&u.jsx(UY,{}),!["dashboard","models","connect","memory","agent","terminal","guide"].includes(e)&&u.jsx(WY,{title:p.label,hint:p.hint})]})]})]})}const VY=new YM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});SM.createRoot(document.getElementById("root")).render(u.jsx(Z2.StrictMode,{children:u.jsx(XM,{client:VY,children:u.jsx(GY,{})})}));export{Z2 as R,du as S,nv as T,Vs as a,GI as b,jM as c,cy as g,u as j,jP as l,v as r};
|