f65f9ca2d0
(1) /v1/models meldet jetzt den ECHTEN Kontext pro Slot: --parallel teilt den Server-Kontext hart auf (131072 / 2 Slots = 65536). Vorher budgetierte Hermes gegen 131k -> Kompaktierung feuerte nie, llama-server kappte bei ~52k-Sessions Prompt/Antwort -> abgerissene Tool-Calls, Retry-Schleifen, gefuehlte Abstuerze (journalctl 07.07 17:11, 152 msgs / ~51.700 Tokens). Dazu auf der Box: context.engine 'default' (existiert nicht, warnte jeden Turn) -> 'compressor' (der echte eingebaute Name). (2) Cockpit: neue Sektion 'Leistung' mit den drei bestehenden Live-Karten (System-Status, Token-Durchsatz, Latenz je Turn) — waren nach UI v3 nur noch in der alten Zentrale, User will sie auf der Startseite. Browser- verifiziert gegen die Box (rendert live, keine Konsolen-Fehler). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
679 lines
900 KiB
JavaScript
679 lines
900 KiB
JavaScript
var f3=Object.defineProperty;var iw=e=>{throw TypeError(e)};var h3=(e,t,r)=>t in e?f3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Zo=(e,t,r)=>h3(e,typeof t!="symbol"?t+"":t,r),Zp=(e,t,r)=>t.has(e)||iw("Cannot "+r);var L=(e,t,r)=>(Zp(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?iw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),be=(e,t,r,n)=>(Zp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),He=(e,t,r)=>(Zp(e,t,"access private method"),r);var xd=(e,t,r,n)=>({set _(i){be(e,t,i,r)},get _(){return L(e,t,n)}});function m3(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function j0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jp={exports:{}},ql={},eg={exports:{}},Be={};/**
|
||
* @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 aw;function p3(){if(aw)return Be;aw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S(I,M,H){this.props=I,this.context=M,this.refs=k,this.updater=H||b}S.prototype.isReactComponent={},S.prototype.setState=function(I,M){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,M,"setState")},S.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function N(){}N.prototype=S.prototype;function E(I,M,H){this.props=I,this.context=M,this.refs=k,this.updater=H||b}var A=E.prototype=new N;A.constructor=E,j(A,S.prototype),A.isPureReactComponent=!0;var P=Array.isArray,_=Object.prototype.hasOwnProperty,O={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function B(I,M,H){var ie,J={},Z=null,ae=null;if(M!=null)for(ie in M.ref!==void 0&&(ae=M.ref),M.key!==void 0&&(Z=""+M.key),M)_.call(M,ie)&&!T.hasOwnProperty(ie)&&(J[ie]=M[ie]);var me=arguments.length-2;if(me===1)J.children=H;else if(1<me){for(var re=Array(me),ye=0;ye<me;ye++)re[ye]=arguments[ye+2];J.children=re}if(I&&I.defaultProps)for(ie in me=I.defaultProps,me)J[ie]===void 0&&(J[ie]=me[ie]);return{$$typeof:e,type:I,key:Z,ref:ae,props:J,_owner:O.current}}function $(I,M){return{$$typeof:e,type:I.type,key:M,ref:I.ref,props:I.props,_owner:I._owner}}function z(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function Q(I){var M={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(H){return M[H]})}var U=/\/+/g;function ve(I,M){return typeof I=="object"&&I!==null&&I.key!=null?Q(""+I.key):M.toString(36)}function ue(I,M,H,ie,J){var Z=typeof I;(Z==="undefined"||Z==="boolean")&&(I=null);var ae=!1;if(I===null)ae=!0;else switch(Z){case"string":case"number":ae=!0;break;case"object":switch(I.$$typeof){case e:case t:ae=!0}}if(ae)return ae=I,J=J(ae),I=ie===""?"."+ve(ae,0):ie,P(J)?(H="",I!=null&&(H=I.replace(U,"$&/")+"/"),ue(J,M,H,"",function(ye){return ye})):J!=null&&(z(J)&&(J=$(J,H+(!J.key||ae&&ae.key===J.key?"":(""+J.key).replace(U,"$&/")+"/")+I)),M.push(J)),1;if(ae=0,ie=ie===""?".":ie+":",P(I))for(var me=0;me<I.length;me++){Z=I[me];var re=ie+ve(Z,me);ae+=ue(Z,M,H,re,J)}else if(re=v(I),typeof re=="function")for(I=re.call(I),me=0;!(Z=I.next()).done;)Z=Z.value,re=ie+ve(Z,me++),ae+=ue(Z,M,H,re,J);else if(Z==="object")throw M=String(I),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.");return ae}function pe(I,M,H){if(I==null)return I;var ie=[],J=0;return ue(I,ie,"","",function(Z){return M.call(H,Z,J++)}),ie}function oe(I){if(I._status===-1){var M=I._result;M=M(),M.then(function(H){(I._status===0||I._status===-1)&&(I._status=1,I._result=H)},function(H){(I._status===0||I._status===-1)&&(I._status=2,I._result=H)}),I._status===-1&&(I._status=0,I._result=M)}if(I._status===1)return I._result.default;throw I._result}var se={current:null},X={transition:null},ne={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:X,ReactCurrentOwner:O};function te(){throw Error("act(...) is not supported in production builds of React.")}return Be.Children={map:pe,forEach:function(I,M,H){pe(I,function(){M.apply(this,arguments)},H)},count:function(I){var M=0;return pe(I,function(){M++}),M},toArray:function(I){return pe(I,function(M){return M})||[]},only:function(I){if(!z(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Be.Component=S,Be.Fragment=r,Be.Profiler=i,Be.PureComponent=E,Be.StrictMode=n,Be.Suspense=f,Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Be.act=te,Be.cloneElement=function(I,M,H){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var ie=j({},I.props),J=I.key,Z=I.ref,ae=I._owner;if(M!=null){if(M.ref!==void 0&&(Z=M.ref,ae=O.current),M.key!==void 0&&(J=""+M.key),I.type&&I.type.defaultProps)var me=I.type.defaultProps;for(re in M)_.call(M,re)&&!T.hasOwnProperty(re)&&(ie[re]=M[re]===void 0&&me!==void 0?me[re]:M[re])}var re=arguments.length-2;if(re===1)ie.children=H;else if(1<re){me=Array(re);for(var ye=0;ye<re;ye++)me[ye]=arguments[ye+2];ie.children=me}return{$$typeof:e,type:I.type,key:J,ref:Z,props:ie,_owner:ae}},Be.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:o,_context:I},I.Consumer=I},Be.createElement=B,Be.createFactory=function(I){var M=B.bind(null,I);return M.type=I,M},Be.createRef=function(){return{current:null}},Be.forwardRef=function(I){return{$$typeof:c,render:I}},Be.isValidElement=z,Be.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:oe}},Be.memo=function(I,M){return{$$typeof:h,type:I,compare:M===void 0?null:M}},Be.startTransition=function(I){var M=X.transition;X.transition={};try{I()}finally{X.transition=M}},Be.unstable_act=te,Be.useCallback=function(I,M){return se.current.useCallback(I,M)},Be.useContext=function(I){return se.current.useContext(I)},Be.useDebugValue=function(){},Be.useDeferredValue=function(I){return se.current.useDeferredValue(I)},Be.useEffect=function(I,M){return se.current.useEffect(I,M)},Be.useId=function(){return se.current.useId()},Be.useImperativeHandle=function(I,M,H){return se.current.useImperativeHandle(I,M,H)},Be.useInsertionEffect=function(I,M){return se.current.useInsertionEffect(I,M)},Be.useLayoutEffect=function(I,M){return se.current.useLayoutEffect(I,M)},Be.useMemo=function(I,M){return se.current.useMemo(I,M)},Be.useReducer=function(I,M,H){return se.current.useReducer(I,M,H)},Be.useRef=function(I){return se.current.useRef(I)},Be.useState=function(I){return se.current.useState(I)},Be.useSyncExternalStore=function(I,M,H){return se.current.useSyncExternalStore(I,M,H)},Be.useTransition=function(){return se.current.useTransition()},Be.version="18.3.1",Be}var ow;function qs(){return ow||(ow=1,eg.exports=p3()),eg.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 sw;function g3(){if(sw)return ql;sw=1;var e=qs(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function u(c,f,h){var m,g={},v=null,b=null;h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(b=f.ref);for(m in f)n.call(f,m)&&!o.hasOwnProperty(m)&&(g[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:c,key:v,ref:b,props:g,_owner:i.current}}return ql.Fragment=r,ql.jsx=u,ql.jsxs=u,ql}var lw;function v3(){return lw||(lw=1,Jp.exports=g3()),Jp.exports}var l=v3(),y=qs();const S0=j0(y),lh=m3({__proto__:null,default:S0},[y]);var bd={},tg={exports:{}},wr={},rg={exports:{}},ng={};/**
|
||
* @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 uw;function y3(){return uw||(uw=1,(function(e){function t(X,ne){var te=X.length;X.push(ne);e:for(;0<te;){var I=te-1>>>1,M=X[I];if(0<i(M,ne))X[I]=ne,X[te]=M,te=I;else break e}}function r(X){return X.length===0?null:X[0]}function n(X){if(X.length===0)return null;var ne=X[0],te=X.pop();if(te!==ne){X[0]=te;e:for(var I=0,M=X.length,H=M>>>1;I<H;){var ie=2*(I+1)-1,J=X[ie],Z=ie+1,ae=X[Z];if(0>i(J,te))Z<M&&0>i(ae,J)?(X[I]=ae,X[Z]=te,I=Z):(X[I]=J,X[ie]=te,I=ie);else if(Z<M&&0>i(ae,te))X[I]=ae,X[Z]=te,I=Z;else break e}}return ne}function i(X,ne){var te=X.sortIndex-ne.sortIndex;return te!==0?te:X.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],h=[],m=1,g=null,v=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(X){for(var ne=r(h);ne!==null;){if(ne.callback===null)n(h);else if(ne.startTime<=X)n(h),ne.sortIndex=ne.expirationTime,t(f,ne);else break;ne=r(h)}}function P(X){if(k=!1,A(X),!j)if(r(f)!==null)j=!0,oe(_);else{var ne=r(h);ne!==null&&se(P,ne.startTime-X)}}function _(X,ne){j=!1,k&&(k=!1,N(B),B=-1),b=!0;var te=v;try{for(A(ne),g=r(f);g!==null&&(!(g.expirationTime>ne)||X&&!Q());){var I=g.callback;if(typeof I=="function"){g.callback=null,v=g.priorityLevel;var M=I(g.expirationTime<=ne);ne=e.unstable_now(),typeof M=="function"?g.callback=M:g===r(f)&&n(f),A(ne)}else n(f);g=r(f)}if(g!==null)var H=!0;else{var ie=r(h);ie!==null&&se(P,ie.startTime-ne),H=!1}return H}finally{g=null,v=te,b=!1}}var O=!1,T=null,B=-1,$=5,z=-1;function Q(){return!(e.unstable_now()-z<$)}function U(){if(T!==null){var X=e.unstable_now();z=X;var ne=!0;try{ne=T(!0,X)}finally{ne?ve():(O=!1,T=null)}}else O=!1}var ve;if(typeof E=="function")ve=function(){E(U)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,pe=ue.port2;ue.port1.onmessage=U,ve=function(){pe.postMessage(null)}}else ve=function(){S(U,0)};function oe(X){T=X,O||(O=!0,ve())}function se(X,ne){B=S(function(){X(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_continueExecution=function(){j||b||(j=!0,oe(_))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(X){switch(v){case 1:case 2:case 3:var ne=3;break;default:ne=v}var te=v;v=ne;try{return X()}finally{v=te}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,ne){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var te=v;v=X;try{return ne()}finally{v=te}},e.unstable_scheduleCallback=function(X,ne,te){var I=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?I+te:I):te=I,X){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=te+M,X={id:m++,callback:ne,priorityLevel:X,startTime:te,expirationTime:M,sortIndex:-1},te>I?(X.sortIndex=te,t(h,X),r(f)===null&&X===r(h)&&(k?(N(B),B=-1):k=!0,se(P,te-I))):(X.sortIndex=M,t(f,X),j||b||(j=!0,oe(_))),X},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(X){var ne=v;return function(){var te=v;v=ne;try{return X.apply(this,arguments)}finally{v=te}}}})(ng)),ng}var cw;function x3(){return cw||(cw=1,rg.exports=y3()),rg.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 dw;function b3(){if(dw)return wr;dw=1;var e=qs(),t=x3();function r(a){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(a,s){u(a,s),u(a+"Capture",s)}function u(a,s){for(i[a]=s,a=0;a<s.length;a++)n.add(s[a])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},g={};function v(a){return f.call(g,a)?!0:f.call(m,a)?!1:h.test(a)?g[a]=!0:(m[a]=!0,!1)}function b(a,s,d,p){if(d!==null&&d.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function j(a,s,d,p){if(s===null||typeof s>"u"||b(a,s,d,p))return!0;if(p)return!1;if(d!==null)switch(d.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(a,s,d,p,x,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=a,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){S[a]=new k(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var s=a[0];S[s]=new k(s,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){S[a]=new k(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){S[a]=new k(a,2,!1,a,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(a){S[a]=new k(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){S[a]=new k(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){S[a]=new k(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){S[a]=new k(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){S[a]=new k(a,5,!1,a.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(a){return a[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(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var s=a.replace(N,E);S[s]=new k(s,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){S[a]=new k(a,1,!1,a.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(a){S[a]=new k(a,1,!1,a.toLowerCase(),null,!0,!0)});function A(a,s,d,p){var x=S.hasOwnProperty(s)?S[s]:null;(x!==null?x.type!==0:p||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(j(s,d,x,p)&&(d=null),p||x===null?v(s)&&(d===null?a.removeAttribute(s):a.setAttribute(s,""+d)):x.mustUseProperty?a[x.propertyName]=d===null?x.type===3?!1:"":d:(s=x.attributeName,p=x.attributeNamespace,d===null?a.removeAttribute(s):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,p?a.setAttributeNS(p,s,d):a.setAttribute(s,d))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),O=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),Q=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),pe=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),X=Symbol.iterator;function ne(a){return a===null||typeof a!="object"?null:(a=X&&a[X]||a["@@iterator"],typeof a=="function"?a:null)}var te=Object.assign,I;function M(a){if(I===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|
||
`+I+a}var H=!1;function ie(a,s){if(!a||H)return"";H=!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(Y){var p=Y}Reflect.construct(a,[],s)}else{try{s.call()}catch(Y){p=Y}a.call(s.prototype)}else{try{throw Error()}catch(Y){p=Y}a()}}catch(Y){if(Y&&p&&typeof Y.stack=="string"){for(var x=Y.stack.split(`
|
||
`),w=p.stack.split(`
|
||
`),C=x.length-1,D=w.length-1;1<=C&&0<=D&&x[C]!==w[D];)D--;for(;1<=C&&0<=D;C--,D--)if(x[C]!==w[D]){if(C!==1||D!==1)do if(C--,D--,0>D||x[C]!==w[D]){var R=`
|
||
`+x[C].replace(" at new "," at ");return a.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",a.displayName)),R}while(1<=C&&0<=D);break}}}finally{H=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?M(a):""}function J(a){switch(a.tag){case 5:return M(a.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return a=ie(a.type,!1),a;case 11:return a=ie(a.type.render,!1),a;case 1:return a=ie(a.type,!0),a;default:return""}}function Z(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case T:return"Fragment";case O:return"Portal";case $:return"Profiler";case B:return"StrictMode";case ve:return"Suspense";case ue:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Q:return(a.displayName||"Context")+".Consumer";case z:return(a._context.displayName||"Context")+".Provider";case U:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case pe:return s=a.displayName||null,s!==null?s:Z(a.type)||"Memo";case oe:s=a._payload,a=a._init;try{return Z(a(s))}catch{}}return null}function ae(a){var s=a.type;switch(a.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 a=s.render,a=a.displayName||a.name||"",s.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z(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 me(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function re(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ye(a){var s=re(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,s),p=""+a[s];if(!a.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,w=d.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){p=""+C,w.call(this,C)}}),Object.defineProperty(a,s,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Oe(a){a._valueTracker||(a._valueTracker=ye(a))}function de(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var d=s.getValue(),p="";return a&&(p=re(a)?a.checked?"true":"false":a.value),a=p,a!==d?(s.setValue(a),!0):!1}function Ze(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Ue(a,s){var d=s.checked;return te({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function _e(a,s){var d=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;d=me(s.value!=null?s.value:d),a._wrapperState={initialChecked:p,initialValue:d,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function xt(a,s){s=s.checked,s!=null&&A(a,"checked",s,!1)}function Jt(a,s){xt(a,s);var d=me(s.value),p=s.type;if(d!=null)p==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(p==="submit"||p==="reset"){a.removeAttribute("value");return}s.hasOwnProperty("value")?Ne(a,s.type,d):s.hasOwnProperty("defaultValue")&&Ne(a,s.type,me(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(a.defaultChecked=!!s.defaultChecked)}function G(a,s,d){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+a._wrapperState.initialValue,d||s===a.value||(a.value=s),a.defaultValue=s}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Ne(a,s,d){(s!=="number"||Ze(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Pe=Array.isArray;function Ve(a,s,d,p){if(a=a.options,s){s={};for(var x=0;x<d.length;x++)s["$"+d[x]]=!0;for(d=0;d<a.length;d++)x=s.hasOwnProperty("$"+a[d].value),a[d].selected!==x&&(a[d].selected=x),x&&p&&(a[d].defaultSelected=!0)}else{for(d=""+me(d),s=null,x=0;x<a.length;x++){if(a[x].value===d){a[x].selected=!0,p&&(a[x].defaultSelected=!0);return}s!==null||a[x].disabled||(s=a[x])}s!==null&&(s.selected=!0)}}function nt(a,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return te({},s,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function K(a,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(Pe(d)){if(1<d.length)throw Error(r(93));d=d[0]}s=d}s==null&&(s=""),d=s}a._wrapperState={initialValue:me(d)}}function Le(a,s){var d=me(s.value),p=me(s.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),s.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),p!=null&&(a.defaultValue=""+p)}function Cr(a){var s=a.textContent;s===a._wrapperState.initialValue&&s!==""&&s!==null&&(a.value=s)}function vx(a){switch(a){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 um(a,s){return a==null||a==="http://www.w3.org/1999/xhtml"?vx(s):a==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var dc,yx=(function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,d,p,x){MSApp.execUnsafeLocalFunction(function(){return a(s,d,p,x)})}:a})(function(a,s){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=s;else{for(dc=dc||document.createElement("div"),dc.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=dc.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;s.firstChild;)a.appendChild(s.firstChild)}});function cl(a,s){if(s){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=s;return}}a.textContent=s}var dl={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},g_=["Webkit","ms","Moz","O"];Object.keys(dl).forEach(function(a){g_.forEach(function(s){s=s+a.charAt(0).toUpperCase()+a.substring(1),dl[s]=dl[a]})});function xx(a,s,d){return s==null||typeof s=="boolean"||s===""?"":d||typeof s!="number"||s===0||dl.hasOwnProperty(a)&&dl[a]?(""+s).trim():s+"px"}function bx(a,s){a=a.style;for(var d in s)if(s.hasOwnProperty(d)){var p=d.indexOf("--")===0,x=xx(d,s[d],p);d==="float"&&(d="cssFloat"),p?a.setProperty(d,x):a[d]=x}}var v_=te({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 cm(a,s){if(s){if(v_[a]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,a));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 dm(a,s){if(a.indexOf("-")===-1)return typeof s.is=="string";switch(a){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 fm=null;function hm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var mm=null,Co=null,Po=null;function wx(a){if(a=Il(a)){if(typeof mm!="function")throw Error(r(280));var s=a.stateNode;s&&(s=Tc(s),mm(a.stateNode,a.type,s))}}function kx(a){Co?Po?Po.push(a):Po=[a]:Co=a}function jx(){if(Co){var a=Co,s=Po;if(Po=Co=null,wx(a),s)for(a=0;a<s.length;a++)wx(s[a])}}function Sx(a,s){return a(s)}function Nx(){}var pm=!1;function Ex(a,s,d){if(pm)return a(s,d);pm=!0;try{return Sx(a,s,d)}finally{pm=!1,(Co!==null||Po!==null)&&(Nx(),jx())}}function fl(a,s){var d=a.stateNode;if(d===null)return null;var p=Tc(d);if(p===null)return null;d=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var gm=!1;if(c)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){gm=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{gm=!1}function y_(a,s,d,p,x,w,C,D,R){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(d,Y)}catch(ce){this.onError(ce)}}var ml=!1,fc=null,hc=!1,vm=null,x_={onError:function(a){ml=!0,fc=a}};function b_(a,s,d,p,x,w,C,D,R){ml=!1,fc=null,y_.apply(x_,arguments)}function w_(a,s,d,p,x,w,C,D,R){if(b_.apply(this,arguments),ml){if(ml){var Y=fc;ml=!1,fc=null}else throw Error(r(198));hc||(hc=!0,vm=Y)}}function ja(a){var s=a,d=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(d=s.return),a=s.return;while(a)}return s.tag===3?d:null}function Ax(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function Cx(a){if(ja(a)!==a)throw Error(r(188))}function k_(a){var s=a.alternate;if(!s){if(s=ja(a),s===null)throw Error(r(188));return s!==a?null:a}for(var d=a,p=s;;){var x=d.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){d=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===d)return Cx(x),a;if(w===p)return Cx(x),s;w=w.sibling}throw Error(r(188))}if(d.return!==p.return)d=x,p=w;else{for(var C=!1,D=x.child;D;){if(D===d){C=!0,d=x,p=w;break}if(D===p){C=!0,p=x,d=w;break}D=D.sibling}if(!C){for(D=w.child;D;){if(D===d){C=!0,d=w,p=x;break}if(D===p){C=!0,p=w,d=x;break}D=D.sibling}if(!C)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:s}function Px(a){return a=k_(a),a!==null?Ox(a):null}function Ox(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var s=Ox(a);if(s!==null)return s;a=a.sibling}return null}var _x=t.unstable_scheduleCallback,Mx=t.unstable_cancelCallback,j_=t.unstable_shouldYield,S_=t.unstable_requestPaint,bt=t.unstable_now,N_=t.unstable_getCurrentPriorityLevel,ym=t.unstable_ImmediatePriority,Ix=t.unstable_UserBlockingPriority,mc=t.unstable_NormalPriority,E_=t.unstable_LowPriority,Tx=t.unstable_IdlePriority,pc=null,jn=null;function A_(a){if(jn&&typeof jn.onCommitFiberRoot=="function")try{jn.onCommitFiberRoot(pc,a,void 0,(a.current.flags&128)===128)}catch{}}var sn=Math.clz32?Math.clz32:O_,C_=Math.log,P_=Math.LN2;function O_(a){return a>>>=0,a===0?32:31-(C_(a)/P_|0)|0}var gc=64,vc=4194304;function pl(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function yc(a,s){var d=a.pendingLanes;if(d===0)return 0;var p=0,x=a.suspendedLanes,w=a.pingedLanes,C=d&268435455;if(C!==0){var D=C&~x;D!==0?p=pl(D):(w&=C,w!==0&&(p=pl(w)))}else C=d&~x,C!==0?p=pl(C):w!==0&&(p=pl(w));if(p===0)return 0;if(s!==0&&s!==p&&(s&x)===0&&(x=p&-p,w=s&-s,x>=w||x===16&&(w&4194240)!==0))return s;if((p&4)!==0&&(p|=d&16),s=a.entangledLanes,s!==0)for(a=a.entanglements,s&=p;0<s;)d=31-sn(s),x=1<<d,p|=a[d],s&=~x;return p}function __(a,s){switch(a){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 M_(a,s){for(var d=a.suspendedLanes,p=a.pingedLanes,x=a.expirationTimes,w=a.pendingLanes;0<w;){var C=31-sn(w),D=1<<C,R=x[C];R===-1?((D&d)===0||(D&p)!==0)&&(x[C]=__(D,s)):R<=s&&(a.expiredLanes|=D),w&=~D}}function xm(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function Dx(){var a=gc;return gc<<=1,(gc&4194240)===0&&(gc=64),a}function bm(a){for(var s=[],d=0;31>d;d++)s.push(a);return s}function gl(a,s,d){a.pendingLanes|=s,s!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,s=31-sn(s),a[s]=d}function I_(a,s){var d=a.pendingLanes&~s;a.pendingLanes=s,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=s,a.mutableReadLanes&=s,a.entangledLanes&=s,s=a.entanglements;var p=a.eventTimes;for(a=a.expirationTimes;0<d;){var x=31-sn(d),w=1<<x;s[x]=0,p[x]=-1,a[x]=-1,d&=~w}}function wm(a,s){var d=a.entangledLanes|=s;for(a=a.entanglements;d;){var p=31-sn(d),x=1<<p;x&s|a[p]&s&&(a[p]|=s),d&=~x}}var Je=0;function Rx(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var Lx,km,$x,zx,Fx,jm=!1,xc=[],Pi=null,Oi=null,_i=null,vl=new Map,yl=new Map,Mi=[],T_="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 Bx(a,s){switch(a){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":vl.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":yl.delete(s.pointerId)}}function xl(a,s,d,p,x,w){return a===null||a.nativeEvent!==w?(a={blockedOn:s,domEventName:d,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},s!==null&&(s=Il(s),s!==null&&km(s)),a):(a.eventSystemFlags|=p,s=a.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),a)}function D_(a,s,d,p,x){switch(s){case"focusin":return Pi=xl(Pi,a,s,d,p,x),!0;case"dragenter":return Oi=xl(Oi,a,s,d,p,x),!0;case"mouseover":return _i=xl(_i,a,s,d,p,x),!0;case"pointerover":var w=x.pointerId;return vl.set(w,xl(vl.get(w)||null,a,s,d,p,x)),!0;case"gotpointercapture":return w=x.pointerId,yl.set(w,xl(yl.get(w)||null,a,s,d,p,x)),!0}return!1}function Ux(a){var s=Sa(a.target);if(s!==null){var d=ja(s);if(d!==null){if(s=d.tag,s===13){if(s=Ax(d),s!==null){a.blockedOn=s,Fx(a.priority,function(){$x(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function bc(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var d=Nm(a.domEventName,a.eventSystemFlags,s[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var p=new d.constructor(d.type,d);fm=p,d.target.dispatchEvent(p),fm=null}else return s=Il(d),s!==null&&km(s),a.blockedOn=d,!1;s.shift()}return!0}function Hx(a,s,d){bc(a)&&d.delete(s)}function R_(){jm=!1,Pi!==null&&bc(Pi)&&(Pi=null),Oi!==null&&bc(Oi)&&(Oi=null),_i!==null&&bc(_i)&&(_i=null),vl.forEach(Hx),yl.forEach(Hx)}function bl(a,s){a.blockedOn===s&&(a.blockedOn=null,jm||(jm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,R_)))}function wl(a){function s(x){return bl(x,a)}if(0<xc.length){bl(xc[0],a);for(var d=1;d<xc.length;d++){var p=xc[d];p.blockedOn===a&&(p.blockedOn=null)}}for(Pi!==null&&bl(Pi,a),Oi!==null&&bl(Oi,a),_i!==null&&bl(_i,a),vl.forEach(s),yl.forEach(s),d=0;d<Mi.length;d++)p=Mi[d],p.blockedOn===a&&(p.blockedOn=null);for(;0<Mi.length&&(d=Mi[0],d.blockedOn===null);)Ux(d),d.blockedOn===null&&Mi.shift()}var Oo=P.ReactCurrentBatchConfig,wc=!0;function L_(a,s,d,p){var x=Je,w=Oo.transition;Oo.transition=null;try{Je=1,Sm(a,s,d,p)}finally{Je=x,Oo.transition=w}}function $_(a,s,d,p){var x=Je,w=Oo.transition;Oo.transition=null;try{Je=4,Sm(a,s,d,p)}finally{Je=x,Oo.transition=w}}function Sm(a,s,d,p){if(wc){var x=Nm(a,s,d,p);if(x===null)Um(a,s,p,kc,d),Bx(a,p);else if(D_(x,a,s,d,p))p.stopPropagation();else if(Bx(a,p),s&4&&-1<T_.indexOf(a)){for(;x!==null;){var w=Il(x);if(w!==null&&Lx(w),w=Nm(a,s,d,p),w===null&&Um(a,s,p,kc,d),w===x)break;x=w}x!==null&&p.stopPropagation()}else Um(a,s,p,null,d)}}var kc=null;function Nm(a,s,d,p){if(kc=null,a=hm(p),a=Sa(a),a!==null)if(s=ja(a),s===null)a=null;else if(d=s.tag,d===13){if(a=Ax(s),a!==null)return a;a=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null);return kc=a,null}function Wx(a){switch(a){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(N_()){case ym:return 1;case Ix:return 4;case mc:case E_:return 16;case Tx:return 536870912;default:return 16}default:return 16}}var Ii=null,Em=null,jc=null;function Kx(){if(jc)return jc;var a,s=Em,d=s.length,p,x="value"in Ii?Ii.value:Ii.textContent,w=x.length;for(a=0;a<d&&s[a]===x[a];a++);var C=d-a;for(p=1;p<=C&&s[d-p]===x[w-p];p++);return jc=x.slice(a,1<p?1-p:void 0)}function Sc(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Nc(){return!0}function Gx(){return!1}function Pr(a){function s(d,p,x,w,C){this._reactName=d,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var D in a)a.hasOwnProperty(D)&&(d=a[D],this[D]=d?d(w):w[D]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Nc:Gx,this.isPropagationStopped=Gx,this}return te(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=Nc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Nc)},persist:function(){},isPersistent:Nc}),s}var _o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Am=Pr(_o),kl=te({},_o,{view:0,detail:0}),z_=Pr(kl),Cm,Pm,jl,Ec=te({},kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_m,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==jl&&(jl&&a.type==="mousemove"?(Cm=a.screenX-jl.screenX,Pm=a.screenY-jl.screenY):Pm=Cm=0,jl=a),Cm)},movementY:function(a){return"movementY"in a?a.movementY:Pm}}),Vx=Pr(Ec),F_=te({},Ec,{dataTransfer:0}),B_=Pr(F_),U_=te({},kl,{relatedTarget:0}),Om=Pr(U_),H_=te({},_o,{animationName:0,elapsedTime:0,pseudoElement:0}),W_=Pr(H_),K_=te({},_o,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),G_=Pr(K_),V_=te({},_o,{data:0}),qx=Pr(V_),q_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q_={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"},Y_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X_(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=Y_[a])?!!s[a]:!1}function _m(){return X_}var Z_=te({},kl,{key:function(a){if(a.key){var s=q_[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Sc(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Q_[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_m,charCode:function(a){return a.type==="keypress"?Sc(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Sc(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),J_=Pr(Z_),e4=te({},Ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qx=Pr(e4),t4=te({},kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_m}),r4=Pr(t4),n4=te({},_o,{propertyName:0,elapsedTime:0,pseudoElement:0}),i4=Pr(n4),a4=te({},Ec,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),o4=Pr(a4),s4=[9,13,27,32],Mm=c&&"CompositionEvent"in window,Sl=null;c&&"documentMode"in document&&(Sl=document.documentMode);var l4=c&&"TextEvent"in window&&!Sl,Yx=c&&(!Mm||Sl&&8<Sl&&11>=Sl),Xx=" ",Zx=!1;function Jx(a,s){switch(a){case"keyup":return s4.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eb(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Mo=!1;function u4(a,s){switch(a){case"compositionend":return eb(s);case"keypress":return s.which!==32?null:(Zx=!0,Xx);case"textInput":return a=s.data,a===Xx&&Zx?null:a;default:return null}}function c4(a,s){if(Mo)return a==="compositionend"||!Mm&&Jx(a,s)?(a=Kx(),jc=Em=Ii=null,Mo=!1,a):null;switch(a){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 Yx&&s.locale!=="ko"?null:s.data;default:return null}}var d4={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 tb(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!d4[a.type]:s==="textarea"}function rb(a,s,d,p){kx(p),s=_c(s,"onChange"),0<s.length&&(d=new Am("onChange","change",null,d,p),a.push({event:d,listeners:s}))}var Nl=null,El=null;function f4(a){bb(a,0)}function Ac(a){var s=Lo(a);if(de(s))return a}function h4(a,s){if(a==="change")return s}var nb=!1;if(c){var Im;if(c){var Tm="oninput"in document;if(!Tm){var ib=document.createElement("div");ib.setAttribute("oninput","return;"),Tm=typeof ib.oninput=="function"}Im=Tm}else Im=!1;nb=Im&&(!document.documentMode||9<document.documentMode)}function ab(){Nl&&(Nl.detachEvent("onpropertychange",ob),El=Nl=null)}function ob(a){if(a.propertyName==="value"&&Ac(El)){var s=[];rb(s,El,a,hm(a)),Ex(f4,s)}}function m4(a,s,d){a==="focusin"?(ab(),Nl=s,El=d,Nl.attachEvent("onpropertychange",ob)):a==="focusout"&&ab()}function p4(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Ac(El)}function g4(a,s){if(a==="click")return Ac(s)}function v4(a,s){if(a==="input"||a==="change")return Ac(s)}function y4(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var ln=typeof Object.is=="function"?Object.is:y4;function Al(a,s){if(ln(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var d=Object.keys(a),p=Object.keys(s);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var x=d[p];if(!f.call(s,x)||!ln(a[x],s[x]))return!1}return!0}function sb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function lb(a,s){var d=sb(a);a=0;for(var p;d;){if(d.nodeType===3){if(p=a+d.textContent.length,a<=s&&p>=s)return{node:d,offset:s-a};a=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=sb(d)}}function ub(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?ub(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function cb(){for(var a=window,s=Ze();s instanceof a.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)a=s.contentWindow;else break;s=Ze(a.document)}return s}function Dm(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}function x4(a){var s=cb(),d=a.focusedElem,p=a.selectionRange;if(s!==d&&d&&d.ownerDocument&&ub(d.ownerDocument.documentElement,d)){if(p!==null&&Dm(d)){if(s=p.start,a=p.end,a===void 0&&(a=s),"selectionStart"in d)d.selectionStart=s,d.selectionEnd=Math.min(a,d.value.length);else if(a=(s=d.ownerDocument||document)&&s.defaultView||window,a.getSelection){a=a.getSelection();var x=d.textContent.length,w=Math.min(p.start,x);p=p.end===void 0?w:Math.min(p.end,x),!a.extend&&w>p&&(x=p,p=w,w=x),x=lb(d,w);var C=lb(d,p);x&&C&&(a.rangeCount!==1||a.anchorNode!==x.node||a.anchorOffset!==x.offset||a.focusNode!==C.node||a.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(x.node,x.offset),a.removeAllRanges(),w>p?(a.addRange(s),a.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),a.addRange(s)))}}for(s=[],a=d;a=a.parentNode;)a.nodeType===1&&s.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<s.length;d++)a=s[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var b4=c&&"documentMode"in document&&11>=document.documentMode,Io=null,Rm=null,Cl=null,Lm=!1;function db(a,s,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Lm||Io==null||Io!==Ze(p)||(p=Io,"selectionStart"in p&&Dm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Cl&&Al(Cl,p)||(Cl=p,p=_c(Rm,"onSelect"),0<p.length&&(s=new Am("onSelect","select",null,s,d),a.push({event:s,listeners:p}),s.target=Io)))}function Cc(a,s){var d={};return d[a.toLowerCase()]=s.toLowerCase(),d["Webkit"+a]="webkit"+s,d["Moz"+a]="moz"+s,d}var To={animationend:Cc("Animation","AnimationEnd"),animationiteration:Cc("Animation","AnimationIteration"),animationstart:Cc("Animation","AnimationStart"),transitionend:Cc("Transition","TransitionEnd")},$m={},fb={};c&&(fb=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function Pc(a){if($m[a])return $m[a];if(!To[a])return a;var s=To[a],d;for(d in s)if(s.hasOwnProperty(d)&&d in fb)return $m[a]=s[d];return a}var hb=Pc("animationend"),mb=Pc("animationiteration"),pb=Pc("animationstart"),gb=Pc("transitionend"),vb=new Map,yb="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 Ti(a,s){vb.set(a,s),o(s,[a])}for(var zm=0;zm<yb.length;zm++){var Fm=yb[zm],w4=Fm.toLowerCase(),k4=Fm[0].toUpperCase()+Fm.slice(1);Ti(w4,"on"+k4)}Ti(hb,"onAnimationEnd"),Ti(mb,"onAnimationIteration"),Ti(pb,"onAnimationStart"),Ti("dblclick","onDoubleClick"),Ti("focusin","onFocus"),Ti("focusout","onBlur"),Ti(gb,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pl="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(" "),j4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pl));function xb(a,s,d){var p=a.type||"unknown-event";a.currentTarget=d,w_(p,s,void 0,a),a.currentTarget=null}function bb(a,s){s=(s&4)!==0;for(var d=0;d<a.length;d++){var p=a[d],x=p.event;p=p.listeners;e:{var w=void 0;if(s)for(var C=p.length-1;0<=C;C--){var D=p[C],R=D.instance,Y=D.currentTarget;if(D=D.listener,R!==w&&x.isPropagationStopped())break e;xb(x,D,Y),w=R}else for(C=0;C<p.length;C++){if(D=p[C],R=D.instance,Y=D.currentTarget,D=D.listener,R!==w&&x.isPropagationStopped())break e;xb(x,D,Y),w=R}}}if(hc)throw a=vm,hc=!1,vm=null,a}function it(a,s){var d=s[qm];d===void 0&&(d=s[qm]=new Set);var p=a+"__bubble";d.has(p)||(wb(s,a,2,!1),d.add(p))}function Bm(a,s,d){var p=0;s&&(p|=4),wb(d,a,p,s)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function Ol(a){if(!a[Oc]){a[Oc]=!0,n.forEach(function(d){d!=="selectionchange"&&(j4.has(d)||Bm(d,!1,a),Bm(d,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Oc]||(s[Oc]=!0,Bm("selectionchange",!1,s))}}function wb(a,s,d,p){switch(Wx(s)){case 1:var x=L_;break;case 4:x=$_;break;default:x=Sm}d=x.bind(null,s,d,a),x=void 0,!gm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?a.addEventListener(s,d,{capture:!0,passive:x}):a.addEventListener(s,d,!0):x!==void 0?a.addEventListener(s,d,{passive:x}):a.addEventListener(s,d,!1)}function Um(a,s,d,p,x){var w=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var C=p.tag;if(C===3||C===4){var D=p.stateNode.containerInfo;if(D===x||D.nodeType===8&&D.parentNode===x)break;if(C===4)for(C=p.return;C!==null;){var R=C.tag;if((R===3||R===4)&&(R=C.stateNode.containerInfo,R===x||R.nodeType===8&&R.parentNode===x))return;C=C.return}for(;D!==null;){if(C=Sa(D),C===null)return;if(R=C.tag,R===5||R===6){p=w=C;continue e}D=D.parentNode}}p=p.return}Ex(function(){var Y=w,ce=hm(d),fe=[];e:{var le=vb.get(a);if(le!==void 0){var xe=Am,Se=a;switch(a){case"keypress":if(Sc(d)===0)break e;case"keydown":case"keyup":xe=J_;break;case"focusin":Se="focus",xe=Om;break;case"focusout":Se="blur",xe=Om;break;case"beforeblur":case"afterblur":xe=Om;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":xe=Vx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=B_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=r4;break;case hb:case mb:case pb:xe=W_;break;case gb:xe=i4;break;case"scroll":xe=z_;break;case"wheel":xe=o4;break;case"copy":case"cut":case"paste":xe=G_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=Qx}var Ee=(s&4)!==0,wt=!Ee&&a==="scroll",W=Ee?le!==null?le+"Capture":null:le;Ee=[];for(var F=Y,V;F!==null;){V=F;var ge=V.stateNode;if(V.tag===5&&ge!==null&&(V=ge,W!==null&&(ge=fl(F,W),ge!=null&&Ee.push(_l(F,ge,V)))),wt)break;F=F.return}0<Ee.length&&(le=new xe(le,Se,null,d,ce),fe.push({event:le,listeners:Ee}))}}if((s&7)===0){e:{if(le=a==="mouseover"||a==="pointerover",xe=a==="mouseout"||a==="pointerout",le&&d!==fm&&(Se=d.relatedTarget||d.fromElement)&&(Sa(Se)||Se[qn]))break e;if((xe||le)&&(le=ce.window===ce?ce:(le=ce.ownerDocument)?le.defaultView||le.parentWindow:window,xe?(Se=d.relatedTarget||d.toElement,xe=Y,Se=Se?Sa(Se):null,Se!==null&&(wt=ja(Se),Se!==wt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(xe=null,Se=Y),xe!==Se)){if(Ee=Vx,ge="onMouseLeave",W="onMouseEnter",F="mouse",(a==="pointerout"||a==="pointerover")&&(Ee=Qx,ge="onPointerLeave",W="onPointerEnter",F="pointer"),wt=xe==null?le:Lo(xe),V=Se==null?le:Lo(Se),le=new Ee(ge,F+"leave",xe,d,ce),le.target=wt,le.relatedTarget=V,ge=null,Sa(ce)===Y&&(Ee=new Ee(W,F+"enter",Se,d,ce),Ee.target=V,Ee.relatedTarget=wt,ge=Ee),wt=ge,xe&&Se)t:{for(Ee=xe,W=Se,F=0,V=Ee;V;V=Do(V))F++;for(V=0,ge=W;ge;ge=Do(ge))V++;for(;0<F-V;)Ee=Do(Ee),F--;for(;0<V-F;)W=Do(W),V--;for(;F--;){if(Ee===W||W!==null&&Ee===W.alternate)break t;Ee=Do(Ee),W=Do(W)}Ee=null}else Ee=null;xe!==null&&kb(fe,le,xe,Ee,!1),Se!==null&&wt!==null&&kb(fe,wt,Se,Ee,!0)}}e:{if(le=Y?Lo(Y):window,xe=le.nodeName&&le.nodeName.toLowerCase(),xe==="select"||xe==="input"&&le.type==="file")var Ce=h4;else if(tb(le))if(nb)Ce=v4;else{Ce=p4;var Ie=m4}else(xe=le.nodeName)&&xe.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Ce=g4);if(Ce&&(Ce=Ce(a,Y))){rb(fe,Ce,d,ce);break e}Ie&&Ie(a,le,Y),a==="focusout"&&(Ie=le._wrapperState)&&Ie.controlled&&le.type==="number"&&Ne(le,"number",le.value)}switch(Ie=Y?Lo(Y):window,a){case"focusin":(tb(Ie)||Ie.contentEditable==="true")&&(Io=Ie,Rm=Y,Cl=null);break;case"focusout":Cl=Rm=Io=null;break;case"mousedown":Lm=!0;break;case"contextmenu":case"mouseup":case"dragend":Lm=!1,db(fe,d,ce);break;case"selectionchange":if(b4)break;case"keydown":case"keyup":db(fe,d,ce)}var Te;if(Mm)e:{switch(a){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Mo?Jx(a,d)&&(Re="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(Re="onCompositionStart");Re&&(Yx&&d.locale!=="ko"&&(Mo||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Mo&&(Te=Kx()):(Ii=ce,Em="value"in Ii?Ii.value:Ii.textContent,Mo=!0)),Ie=_c(Y,Re),0<Ie.length&&(Re=new qx(Re,a,null,d,ce),fe.push({event:Re,listeners:Ie}),Te?Re.data=Te:(Te=eb(d),Te!==null&&(Re.data=Te)))),(Te=l4?u4(a,d):c4(a,d))&&(Y=_c(Y,"onBeforeInput"),0<Y.length&&(ce=new qx("onBeforeInput","beforeinput",null,d,ce),fe.push({event:ce,listeners:Y}),ce.data=Te))}bb(fe,s)})}function _l(a,s,d){return{instance:a,listener:s,currentTarget:d}}function _c(a,s){for(var d=s+"Capture",p=[];a!==null;){var x=a,w=x.stateNode;x.tag===5&&w!==null&&(x=w,w=fl(a,d),w!=null&&p.unshift(_l(a,w,x)),w=fl(a,s),w!=null&&p.push(_l(a,w,x))),a=a.return}return p}function Do(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function kb(a,s,d,p,x){for(var w=s._reactName,C=[];d!==null&&d!==p;){var D=d,R=D.alternate,Y=D.stateNode;if(R!==null&&R===p)break;D.tag===5&&Y!==null&&(D=Y,x?(R=fl(d,w),R!=null&&C.unshift(_l(d,R,D))):x||(R=fl(d,w),R!=null&&C.push(_l(d,R,D)))),d=d.return}C.length!==0&&a.push({event:s,listeners:C})}var S4=/\r\n?/g,N4=/\u0000|\uFFFD/g;function jb(a){return(typeof a=="string"?a:""+a).replace(S4,`
|
||
`).replace(N4,"")}function Mc(a,s,d){if(s=jb(s),jb(a)!==s&&d)throw Error(r(425))}function Ic(){}var Hm=null,Wm=null;function Km(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Gm=typeof setTimeout=="function"?setTimeout:void 0,E4=typeof clearTimeout=="function"?clearTimeout:void 0,Sb=typeof Promise=="function"?Promise:void 0,A4=typeof queueMicrotask=="function"?queueMicrotask:typeof Sb<"u"?function(a){return Sb.resolve(null).then(a).catch(C4)}:Gm;function C4(a){setTimeout(function(){throw a})}function Vm(a,s){var d=s,p=0;do{var x=d.nextSibling;if(a.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(p===0){a.removeChild(x),wl(s);return}p--}else d!=="$"&&d!=="$?"&&d!=="$!"||p++;d=x}while(d);wl(s)}function Di(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return a}function Nb(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(s===0)return a;s--}else d==="/$"&&s++}a=a.previousSibling}return null}var Ro=Math.random().toString(36).slice(2),Sn="__reactFiber$"+Ro,Ml="__reactProps$"+Ro,qn="__reactContainer$"+Ro,qm="__reactEvents$"+Ro,P4="__reactListeners$"+Ro,O4="__reactHandles$"+Ro;function Sa(a){var s=a[Sn];if(s)return s;for(var d=a.parentNode;d;){if(s=d[qn]||d[Sn]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(a=Nb(a);a!==null;){if(d=a[Sn])return d;a=Nb(a)}return s}a=d,d=a.parentNode}return null}function Il(a){return a=a[Sn]||a[qn],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Lo(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(r(33))}function Tc(a){return a[Ml]||null}var Qm=[],$o=-1;function Ri(a){return{current:a}}function at(a){0>$o||(a.current=Qm[$o],Qm[$o]=null,$o--)}function tt(a,s){$o++,Qm[$o]=a.current,a.current=s}var Li={},er=Ri(Li),gr=Ri(!1),Na=Li;function zo(a,s){var d=a.type.contextTypes;if(!d)return Li;var p=a.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in d)x[w]=s[w];return p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=s,a.__reactInternalMemoizedMaskedChildContext=x),x}function vr(a){return a=a.childContextTypes,a!=null}function Dc(){at(gr),at(er)}function Eb(a,s,d){if(er.current!==Li)throw Error(r(168));tt(er,s),tt(gr,d)}function Ab(a,s,d){var p=a.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return d;p=p.getChildContext();for(var x in p)if(!(x in s))throw Error(r(108,ae(a)||"Unknown",x));return te({},d,p)}function Rc(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Li,Na=er.current,tt(er,a),tt(gr,gr.current),!0}function Cb(a,s,d){var p=a.stateNode;if(!p)throw Error(r(169));d?(a=Ab(a,s,Na),p.__reactInternalMemoizedMergedChildContext=a,at(gr),at(er),tt(er,a)):at(gr),tt(gr,d)}var Qn=null,Lc=!1,Ym=!1;function Pb(a){Qn===null?Qn=[a]:Qn.push(a)}function _4(a){Lc=!0,Pb(a)}function $i(){if(!Ym&&Qn!==null){Ym=!0;var a=0,s=Je;try{var d=Qn;for(Je=1;a<d.length;a++){var p=d[a];do p=p(!0);while(p!==null)}Qn=null,Lc=!1}catch(x){throw Qn!==null&&(Qn=Qn.slice(a+1)),_x(ym,$i),x}finally{Je=s,Ym=!1}}return null}var Fo=[],Bo=0,$c=null,zc=0,Br=[],Ur=0,Ea=null,Yn=1,Xn="";function Aa(a,s){Fo[Bo++]=zc,Fo[Bo++]=$c,$c=a,zc=s}function Ob(a,s,d){Br[Ur++]=Yn,Br[Ur++]=Xn,Br[Ur++]=Ea,Ea=a;var p=Yn;a=Xn;var x=32-sn(p)-1;p&=~(1<<x),d+=1;var w=32-sn(s)+x;if(30<w){var C=x-x%5;w=(p&(1<<C)-1).toString(32),p>>=C,x-=C,Yn=1<<32-sn(s)+x|d<<x|p,Xn=w+a}else Yn=1<<w|d<<x|p,Xn=a}function Xm(a){a.return!==null&&(Aa(a,1),Ob(a,1,0))}function Zm(a){for(;a===$c;)$c=Fo[--Bo],Fo[Bo]=null,zc=Fo[--Bo],Fo[Bo]=null;for(;a===Ea;)Ea=Br[--Ur],Br[Ur]=null,Xn=Br[--Ur],Br[Ur]=null,Yn=Br[--Ur],Br[Ur]=null}var Or=null,_r=null,ut=!1,un=null;function _b(a,s){var d=Gr(5,null,null,0);d.elementType="DELETED",d.stateNode=s,d.return=a,s=a.deletions,s===null?(a.deletions=[d],a.flags|=16):s.push(d)}function Mb(a,s){switch(a.tag){case 5:var d=a.type;return s=s.nodeType!==1||d.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(a.stateNode=s,Or=a,_r=Di(s.firstChild),!0):!1;case 6:return s=a.pendingProps===""||s.nodeType!==3?null:s,s!==null?(a.stateNode=s,Or=a,_r=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(d=Ea!==null?{id:Yn,overflow:Xn}:null,a.memoizedState={dehydrated:s,treeContext:d,retryLane:1073741824},d=Gr(18,null,null,0),d.stateNode=s,d.return=a,a.child=d,Or=a,_r=null,!0):!1;default:return!1}}function Jm(a){return(a.mode&1)!==0&&(a.flags&128)===0}function ep(a){if(ut){var s=_r;if(s){var d=s;if(!Mb(a,s)){if(Jm(a))throw Error(r(418));s=Di(d.nextSibling);var p=Or;s&&Mb(a,s)?_b(p,d):(a.flags=a.flags&-4097|2,ut=!1,Or=a)}}else{if(Jm(a))throw Error(r(418));a.flags=a.flags&-4097|2,ut=!1,Or=a}}}function Ib(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Or=a}function Fc(a){if(a!==Or)return!1;if(!ut)return Ib(a),ut=!0,!1;var s;if((s=a.tag!==3)&&!(s=a.tag!==5)&&(s=a.type,s=s!=="head"&&s!=="body"&&!Km(a.type,a.memoizedProps)),s&&(s=_r)){if(Jm(a))throw Tb(),Error(r(418));for(;s;)_b(a,s),s=Di(s.nextSibling)}if(Ib(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(s===0){_r=Di(a.nextSibling);break e}s--}else d!=="$"&&d!=="$!"&&d!=="$?"||s++}a=a.nextSibling}_r=null}}else _r=Or?Di(a.stateNode.nextSibling):null;return!0}function Tb(){for(var a=_r;a;)a=Di(a.nextSibling)}function Uo(){_r=Or=null,ut=!1}function tp(a){un===null?un=[a]:un.push(a)}var M4=P.ReactCurrentBatchConfig;function Tl(a,s,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var p=d.stateNode}if(!p)throw Error(r(147,a));var x=p,w=""+a;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var D=x.refs;C===null?delete D[w]:D[w]=C},s._stringRef=w,s)}if(typeof a!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,a))}return a}function Bc(a,s){throw a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a))}function Db(a){var s=a._init;return s(a._payload)}function Rb(a){function s(W,F){if(a){var V=W.deletions;V===null?(W.deletions=[F],W.flags|=16):V.push(F)}}function d(W,F){if(!a)return null;for(;F!==null;)s(W,F),F=F.sibling;return null}function p(W,F){for(W=new Map;F!==null;)F.key!==null?W.set(F.key,F):W.set(F.index,F),F=F.sibling;return W}function x(W,F){return W=Gi(W,F),W.index=0,W.sibling=null,W}function w(W,F,V){return W.index=V,a?(V=W.alternate,V!==null?(V=V.index,V<F?(W.flags|=2,F):V):(W.flags|=2,F)):(W.flags|=1048576,F)}function C(W){return a&&W.alternate===null&&(W.flags|=2),W}function D(W,F,V,ge){return F===null||F.tag!==6?(F=Gp(V,W.mode,ge),F.return=W,F):(F=x(F,V),F.return=W,F)}function R(W,F,V,ge){var Ce=V.type;return Ce===T?ce(W,F,V.props.children,ge,V.key):F!==null&&(F.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===oe&&Db(Ce)===F.type)?(ge=x(F,V.props),ge.ref=Tl(W,F,V),ge.return=W,ge):(ge=dd(V.type,V.key,V.props,null,W.mode,ge),ge.ref=Tl(W,F,V),ge.return=W,ge)}function Y(W,F,V,ge){return F===null||F.tag!==4||F.stateNode.containerInfo!==V.containerInfo||F.stateNode.implementation!==V.implementation?(F=Vp(V,W.mode,ge),F.return=W,F):(F=x(F,V.children||[]),F.return=W,F)}function ce(W,F,V,ge,Ce){return F===null||F.tag!==7?(F=Da(V,W.mode,ge,Ce),F.return=W,F):(F=x(F,V),F.return=W,F)}function fe(W,F,V){if(typeof F=="string"&&F!==""||typeof F=="number")return F=Gp(""+F,W.mode,V),F.return=W,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case _:return V=dd(F.type,F.key,F.props,null,W.mode,V),V.ref=Tl(W,null,F),V.return=W,V;case O:return F=Vp(F,W.mode,V),F.return=W,F;case oe:var ge=F._init;return fe(W,ge(F._payload),V)}if(Pe(F)||ne(F))return F=Da(F,W.mode,V,null),F.return=W,F;Bc(W,F)}return null}function le(W,F,V,ge){var Ce=F!==null?F.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ce!==null?null:D(W,F,""+V,ge);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case _:return V.key===Ce?R(W,F,V,ge):null;case O:return V.key===Ce?Y(W,F,V,ge):null;case oe:return Ce=V._init,le(W,F,Ce(V._payload),ge)}if(Pe(V)||ne(V))return Ce!==null?null:ce(W,F,V,ge,null);Bc(W,V)}return null}function xe(W,F,V,ge,Ce){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return W=W.get(V)||null,D(F,W,""+ge,Ce);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case _:return W=W.get(ge.key===null?V:ge.key)||null,R(F,W,ge,Ce);case O:return W=W.get(ge.key===null?V:ge.key)||null,Y(F,W,ge,Ce);case oe:var Ie=ge._init;return xe(W,F,V,Ie(ge._payload),Ce)}if(Pe(ge)||ne(ge))return W=W.get(V)||null,ce(F,W,ge,Ce,null);Bc(F,ge)}return null}function Se(W,F,V,ge){for(var Ce=null,Ie=null,Te=F,Re=F=0,Tt=null;Te!==null&&Re<V.length;Re++){Te.index>Re?(Tt=Te,Te=null):Tt=Te.sibling;var Qe=le(W,Te,V[Re],ge);if(Qe===null){Te===null&&(Te=Tt);break}a&&Te&&Qe.alternate===null&&s(W,Te),F=w(Qe,F,Re),Ie===null?Ce=Qe:Ie.sibling=Qe,Ie=Qe,Te=Tt}if(Re===V.length)return d(W,Te),ut&&Aa(W,Re),Ce;if(Te===null){for(;Re<V.length;Re++)Te=fe(W,V[Re],ge),Te!==null&&(F=w(Te,F,Re),Ie===null?Ce=Te:Ie.sibling=Te,Ie=Te);return ut&&Aa(W,Re),Ce}for(Te=p(W,Te);Re<V.length;Re++)Tt=xe(Te,W,Re,V[Re],ge),Tt!==null&&(a&&Tt.alternate!==null&&Te.delete(Tt.key===null?Re:Tt.key),F=w(Tt,F,Re),Ie===null?Ce=Tt:Ie.sibling=Tt,Ie=Tt);return a&&Te.forEach(function(Vi){return s(W,Vi)}),ut&&Aa(W,Re),Ce}function Ee(W,F,V,ge){var Ce=ne(V);if(typeof Ce!="function")throw Error(r(150));if(V=Ce.call(V),V==null)throw Error(r(151));for(var Ie=Ce=null,Te=F,Re=F=0,Tt=null,Qe=V.next();Te!==null&&!Qe.done;Re++,Qe=V.next()){Te.index>Re?(Tt=Te,Te=null):Tt=Te.sibling;var Vi=le(W,Te,Qe.value,ge);if(Vi===null){Te===null&&(Te=Tt);break}a&&Te&&Vi.alternate===null&&s(W,Te),F=w(Vi,F,Re),Ie===null?Ce=Vi:Ie.sibling=Vi,Ie=Vi,Te=Tt}if(Qe.done)return d(W,Te),ut&&Aa(W,Re),Ce;if(Te===null){for(;!Qe.done;Re++,Qe=V.next())Qe=fe(W,Qe.value,ge),Qe!==null&&(F=w(Qe,F,Re),Ie===null?Ce=Qe:Ie.sibling=Qe,Ie=Qe);return ut&&Aa(W,Re),Ce}for(Te=p(W,Te);!Qe.done;Re++,Qe=V.next())Qe=xe(Te,W,Re,Qe.value,ge),Qe!==null&&(a&&Qe.alternate!==null&&Te.delete(Qe.key===null?Re:Qe.key),F=w(Qe,F,Re),Ie===null?Ce=Qe:Ie.sibling=Qe,Ie=Qe);return a&&Te.forEach(function(d3){return s(W,d3)}),ut&&Aa(W,Re),Ce}function wt(W,F,V,ge){if(typeof V=="object"&&V!==null&&V.type===T&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Ce=V.key,Ie=F;Ie!==null;){if(Ie.key===Ce){if(Ce=V.type,Ce===T){if(Ie.tag===7){d(W,Ie.sibling),F=x(Ie,V.props.children),F.return=W,W=F;break e}}else if(Ie.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===oe&&Db(Ce)===Ie.type){d(W,Ie.sibling),F=x(Ie,V.props),F.ref=Tl(W,Ie,V),F.return=W,W=F;break e}d(W,Ie);break}else s(W,Ie);Ie=Ie.sibling}V.type===T?(F=Da(V.props.children,W.mode,ge,V.key),F.return=W,W=F):(ge=dd(V.type,V.key,V.props,null,W.mode,ge),ge.ref=Tl(W,F,V),ge.return=W,W=ge)}return C(W);case O:e:{for(Ie=V.key;F!==null;){if(F.key===Ie)if(F.tag===4&&F.stateNode.containerInfo===V.containerInfo&&F.stateNode.implementation===V.implementation){d(W,F.sibling),F=x(F,V.children||[]),F.return=W,W=F;break e}else{d(W,F);break}else s(W,F);F=F.sibling}F=Vp(V,W.mode,ge),F.return=W,W=F}return C(W);case oe:return Ie=V._init,wt(W,F,Ie(V._payload),ge)}if(Pe(V))return Se(W,F,V,ge);if(ne(V))return Ee(W,F,V,ge);Bc(W,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,F!==null&&F.tag===6?(d(W,F.sibling),F=x(F,V),F.return=W,W=F):(d(W,F),F=Gp(V,W.mode,ge),F.return=W,W=F),C(W)):d(W,F)}return wt}var Ho=Rb(!0),Lb=Rb(!1),Uc=Ri(null),Hc=null,Wo=null,rp=null;function np(){rp=Wo=Hc=null}function ip(a){var s=Uc.current;at(Uc),a._currentValue=s}function ap(a,s,d){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===d)break;a=a.return}}function Ko(a,s){Hc=a,rp=Wo=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&s)!==0&&(yr=!0),a.firstContext=null)}function Hr(a){var s=a._currentValue;if(rp!==a)if(a={context:a,memoizedValue:s,next:null},Wo===null){if(Hc===null)throw Error(r(308));Wo=a,Hc.dependencies={lanes:0,firstContext:a}}else Wo=Wo.next=a;return s}var Ca=null;function op(a){Ca===null?Ca=[a]:Ca.push(a)}function $b(a,s,d,p){var x=s.interleaved;return x===null?(d.next=d,op(s)):(d.next=x.next,x.next=d),s.interleaved=d,Zn(a,p)}function Zn(a,s){a.lanes|=s;var d=a.alternate;for(d!==null&&(d.lanes|=s),d=a,a=a.return;a!==null;)a.childLanes|=s,d=a.alternate,d!==null&&(d.childLanes|=s),d=a,a=a.return;return d.tag===3?d.stateNode:null}var zi=!1;function sp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zb(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Jn(a,s){return{eventTime:a,lane:s,tag:0,payload:null,callback:null,next:null}}function Fi(a,s,d){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(qe&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,Zn(a,d)}return x=p.interleaved,x===null?(s.next=s,op(p)):(s.next=x.next,x.next=s),p.interleaved=s,Zn(a,d)}function Wc(a,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194240)!==0)){var p=s.lanes;p&=a.pendingLanes,d|=p,s.lanes=d,wm(a,d)}}function Fb(a,s){var d=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var x=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?x=w=C:w=w.next=C,d=d.next}while(d!==null);w===null?x=w=s:w=w.next=s}else x=w=s;d={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,effects:p.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=s}function Kc(a,s,d,p){var x=a.updateQueue;zi=!1;var w=x.firstBaseUpdate,C=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var R=D,Y=R.next;R.next=null,C===null?w=Y:C.next=Y,C=R;var ce=a.alternate;ce!==null&&(ce=ce.updateQueue,D=ce.lastBaseUpdate,D!==C&&(D===null?ce.firstBaseUpdate=Y:D.next=Y,ce.lastBaseUpdate=R))}if(w!==null){var fe=x.baseState;C=0,ce=Y=R=null,D=w;do{var le=D.lane,xe=D.eventTime;if((p&le)===le){ce!==null&&(ce=ce.next={eventTime:xe,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Se=a,Ee=D;switch(le=s,xe=d,Ee.tag){case 1:if(Se=Ee.payload,typeof Se=="function"){fe=Se.call(xe,fe,le);break e}fe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ee.payload,le=typeof Se=="function"?Se.call(xe,fe,le):Se,le==null)break e;fe=te({},fe,le);break e;case 2:zi=!0}}D.callback!==null&&D.lane!==0&&(a.flags|=64,le=x.effects,le===null?x.effects=[D]:le.push(D))}else xe={eventTime:xe,lane:le,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ce===null?(Y=ce=xe,R=fe):ce=ce.next=xe,C|=le;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;le=D,D=le.next,le.next=null,x.lastBaseUpdate=le,x.shared.pending=null}}while(!0);if(ce===null&&(R=fe),x.baseState=R,x.firstBaseUpdate=Y,x.lastBaseUpdate=ce,s=x.shared.interleaved,s!==null){x=s;do C|=x.lane,x=x.next;while(x!==s)}else w===null&&(x.shared.lanes=0);_a|=C,a.lanes=C,a.memoizedState=fe}}function Bb(a,s,d){if(a=s.effects,s.effects=null,a!==null)for(s=0;s<a.length;s++){var p=a[s],x=p.callback;if(x!==null){if(p.callback=null,p=d,typeof x!="function")throw Error(r(191,x));x.call(p)}}}var Dl={},Nn=Ri(Dl),Rl=Ri(Dl),Ll=Ri(Dl);function Pa(a){if(a===Dl)throw Error(r(174));return a}function lp(a,s){switch(tt(Ll,s),tt(Rl,a),tt(Nn,Dl),a=s.nodeType,a){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:um(null,"");break;default:a=a===8?s.parentNode:s,s=a.namespaceURI||null,a=a.tagName,s=um(s,a)}at(Nn),tt(Nn,s)}function Go(){at(Nn),at(Rl),at(Ll)}function Ub(a){Pa(Ll.current);var s=Pa(Nn.current),d=um(s,a.type);s!==d&&(tt(Rl,a),tt(Nn,d))}function up(a){Rl.current===a&&(at(Nn),at(Rl))}var ht=Ri(0);function Gc(a){for(var s=a;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===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var cp=[];function dp(){for(var a=0;a<cp.length;a++)cp[a]._workInProgressVersionPrimary=null;cp.length=0}var Vc=P.ReactCurrentDispatcher,fp=P.ReactCurrentBatchConfig,Oa=0,mt=null,Et=null,Mt=null,qc=!1,$l=!1,zl=0,I4=0;function tr(){throw Error(r(321))}function hp(a,s){if(s===null)return!1;for(var d=0;d<s.length&&d<a.length;d++)if(!ln(a[d],s[d]))return!1;return!0}function mp(a,s,d,p,x,w){if(Oa=w,mt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Vc.current=a===null||a.memoizedState===null?L4:$4,a=d(p,x),$l){w=0;do{if($l=!1,zl=0,25<=w)throw Error(r(301));w+=1,Mt=Et=null,s.updateQueue=null,Vc.current=z4,a=d(p,x)}while($l)}if(Vc.current=Xc,s=Et!==null&&Et.next!==null,Oa=0,Mt=Et=mt=null,qc=!1,s)throw Error(r(300));return a}function pp(){var a=zl!==0;return zl=0,a}function En(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?mt.memoizedState=Mt=a:Mt=Mt.next=a,Mt}function Wr(){if(Et===null){var a=mt.alternate;a=a!==null?a.memoizedState:null}else a=Et.next;var s=Mt===null?mt.memoizedState:Mt.next;if(s!==null)Mt=s,Et=a;else{if(a===null)throw Error(r(310));Et=a,a={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},Mt===null?mt.memoizedState=Mt=a:Mt=Mt.next=a}return Mt}function Fl(a,s){return typeof s=="function"?s(a):s}function gp(a){var s=Wr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var p=Et,x=p.baseQueue,w=d.pending;if(w!==null){if(x!==null){var C=x.next;x.next=w.next,w.next=C}p.baseQueue=x=w,d.pending=null}if(x!==null){w=x.next,p=p.baseState;var D=C=null,R=null,Y=w;do{var ce=Y.lane;if((Oa&ce)===ce)R!==null&&(R=R.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),p=Y.hasEagerState?Y.eagerState:a(p,Y.action);else{var fe={lane:ce,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};R===null?(D=R=fe,C=p):R=R.next=fe,mt.lanes|=ce,_a|=ce}Y=Y.next}while(Y!==null&&Y!==w);R===null?C=p:R.next=D,ln(p,s.memoizedState)||(yr=!0),s.memoizedState=p,s.baseState=C,s.baseQueue=R,d.lastRenderedState=p}if(a=d.interleaved,a!==null){x=a;do w=x.lane,mt.lanes|=w,_a|=w,x=x.next;while(x!==a)}else x===null&&(d.lanes=0);return[s.memoizedState,d.dispatch]}function vp(a){var s=Wr(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var p=d.dispatch,x=d.pending,w=s.memoizedState;if(x!==null){d.pending=null;var C=x=x.next;do w=a(w,C.action),C=C.next;while(C!==x);ln(w,s.memoizedState)||(yr=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),d.lastRenderedState=w}return[w,p]}function Hb(){}function Wb(a,s){var d=mt,p=Wr(),x=s(),w=!ln(p.memoizedState,x);if(w&&(p.memoizedState=x,yr=!0),p=p.queue,yp(Vb.bind(null,d,p,a),[a]),p.getSnapshot!==s||w||Mt!==null&&Mt.memoizedState.tag&1){if(d.flags|=2048,Bl(9,Gb.bind(null,d,p,x,s),void 0,null),It===null)throw Error(r(349));(Oa&30)!==0||Kb(d,s,x)}return x}function Kb(a,s,d){a.flags|=16384,a={getSnapshot:s,value:d},s=mt.updateQueue,s===null?(s={lastEffect:null,stores:null},mt.updateQueue=s,s.stores=[a]):(d=s.stores,d===null?s.stores=[a]:d.push(a))}function Gb(a,s,d,p){s.value=d,s.getSnapshot=p,qb(s)&&Qb(a)}function Vb(a,s,d){return d(function(){qb(s)&&Qb(a)})}function qb(a){var s=a.getSnapshot;a=a.value;try{var d=s();return!ln(a,d)}catch{return!0}}function Qb(a){var s=Zn(a,1);s!==null&&hn(s,a,1,-1)}function Yb(a){var s=En();return typeof a=="function"&&(a=a()),s.memoizedState=s.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:a},s.queue=a,a=a.dispatch=R4.bind(null,mt,a),[s.memoizedState,a]}function Bl(a,s,d,p){return a={tag:a,create:s,destroy:d,deps:p,next:null},s=mt.updateQueue,s===null?(s={lastEffect:null,stores:null},mt.updateQueue=s,s.lastEffect=a.next=a):(d=s.lastEffect,d===null?s.lastEffect=a.next=a:(p=d.next,d.next=a,a.next=p,s.lastEffect=a)),a}function Xb(){return Wr().memoizedState}function Qc(a,s,d,p){var x=En();mt.flags|=a,x.memoizedState=Bl(1|s,d,void 0,p===void 0?null:p)}function Yc(a,s,d,p){var x=Wr();p=p===void 0?null:p;var w=void 0;if(Et!==null){var C=Et.memoizedState;if(w=C.destroy,p!==null&&hp(p,C.deps)){x.memoizedState=Bl(s,d,w,p);return}}mt.flags|=a,x.memoizedState=Bl(1|s,d,w,p)}function Zb(a,s){return Qc(8390656,8,a,s)}function yp(a,s){return Yc(2048,8,a,s)}function Jb(a,s){return Yc(4,2,a,s)}function e1(a,s){return Yc(4,4,a,s)}function t1(a,s){if(typeof s=="function")return a=a(),s(a),function(){s(null)};if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function r1(a,s,d){return d=d!=null?d.concat([a]):null,Yc(4,4,t1.bind(null,s,a),d)}function xp(){}function n1(a,s){var d=Wr();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&hp(s,p[1])?p[0]:(d.memoizedState=[a,s],a)}function i1(a,s){var d=Wr();s=s===void 0?null:s;var p=d.memoizedState;return p!==null&&s!==null&&hp(s,p[1])?p[0]:(a=a(),d.memoizedState=[a,s],a)}function a1(a,s,d){return(Oa&21)===0?(a.baseState&&(a.baseState=!1,yr=!0),a.memoizedState=d):(ln(d,s)||(d=Dx(),mt.lanes|=d,_a|=d,a.baseState=!0),s)}function T4(a,s){var d=Je;Je=d!==0&&4>d?d:4,a(!0);var p=fp.transition;fp.transition={};try{a(!1),s()}finally{Je=d,fp.transition=p}}function o1(){return Wr().memoizedState}function D4(a,s,d){var p=Wi(a);if(d={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null},s1(a))l1(s,d);else if(d=$b(a,s,d,p),d!==null){var x=cr();hn(d,a,p,x),u1(d,s,p)}}function R4(a,s,d){var p=Wi(a),x={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null};if(s1(a))l1(s,x);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,D=w(C,d);if(x.hasEagerState=!0,x.eagerState=D,ln(D,C)){var R=s.interleaved;R===null?(x.next=x,op(s)):(x.next=R.next,R.next=x),s.interleaved=x;return}}catch{}finally{}d=$b(a,s,x,p),d!==null&&(x=cr(),hn(d,a,p,x),u1(d,s,p))}}function s1(a){var s=a.alternate;return a===mt||s!==null&&s===mt}function l1(a,s){$l=qc=!0;var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}function u1(a,s,d){if((d&4194240)!==0){var p=s.lanes;p&=a.pendingLanes,d|=p,s.lanes=d,wm(a,d)}}var Xc={readContext:Hr,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},L4={readContext:Hr,useCallback:function(a,s){return En().memoizedState=[a,s===void 0?null:s],a},useContext:Hr,useEffect:Zb,useImperativeHandle:function(a,s,d){return d=d!=null?d.concat([a]):null,Qc(4194308,4,t1.bind(null,s,a),d)},useLayoutEffect:function(a,s){return Qc(4194308,4,a,s)},useInsertionEffect:function(a,s){return Qc(4,2,a,s)},useMemo:function(a,s){var d=En();return s=s===void 0?null:s,a=a(),d.memoizedState=[a,s],a},useReducer:function(a,s,d){var p=En();return s=d!==void 0?d(s):s,p.memoizedState=p.baseState=s,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:s},p.queue=a,a=a.dispatch=D4.bind(null,mt,a),[p.memoizedState,a]},useRef:function(a){var s=En();return a={current:a},s.memoizedState=a},useState:Yb,useDebugValue:xp,useDeferredValue:function(a){return En().memoizedState=a},useTransition:function(){var a=Yb(!1),s=a[0];return a=T4.bind(null,a[1]),En().memoizedState=a,[s,a]},useMutableSource:function(){},useSyncExternalStore:function(a,s,d){var p=mt,x=En();if(ut){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),It===null)throw Error(r(349));(Oa&30)!==0||Kb(p,s,d)}x.memoizedState=d;var w={value:d,getSnapshot:s};return x.queue=w,Zb(Vb.bind(null,p,w,a),[a]),p.flags|=2048,Bl(9,Gb.bind(null,p,w,d,s),void 0,null),d},useId:function(){var a=En(),s=It.identifierPrefix;if(ut){var d=Xn,p=Yn;d=(p&~(1<<32-sn(p)-1)).toString(32)+d,s=":"+s+"R"+d,d=zl++,0<d&&(s+="H"+d.toString(32)),s+=":"}else d=I4++,s=":"+s+"r"+d.toString(32)+":";return a.memoizedState=s},unstable_isNewReconciler:!1},$4={readContext:Hr,useCallback:n1,useContext:Hr,useEffect:yp,useImperativeHandle:r1,useInsertionEffect:Jb,useLayoutEffect:e1,useMemo:i1,useReducer:gp,useRef:Xb,useState:function(){return gp(Fl)},useDebugValue:xp,useDeferredValue:function(a){var s=Wr();return a1(s,Et.memoizedState,a)},useTransition:function(){var a=gp(Fl)[0],s=Wr().memoizedState;return[a,s]},useMutableSource:Hb,useSyncExternalStore:Wb,useId:o1,unstable_isNewReconciler:!1},z4={readContext:Hr,useCallback:n1,useContext:Hr,useEffect:yp,useImperativeHandle:r1,useInsertionEffect:Jb,useLayoutEffect:e1,useMemo:i1,useReducer:vp,useRef:Xb,useState:function(){return vp(Fl)},useDebugValue:xp,useDeferredValue:function(a){var s=Wr();return Et===null?s.memoizedState=a:a1(s,Et.memoizedState,a)},useTransition:function(){var a=vp(Fl)[0],s=Wr().memoizedState;return[a,s]},useMutableSource:Hb,useSyncExternalStore:Wb,useId:o1,unstable_isNewReconciler:!1};function cn(a,s){if(a&&a.defaultProps){s=te({},s),a=a.defaultProps;for(var d in a)s[d]===void 0&&(s[d]=a[d]);return s}return s}function bp(a,s,d,p){s=a.memoizedState,d=d(p,s),d=d==null?s:te({},s,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var Zc={isMounted:function(a){return(a=a._reactInternals)?ja(a)===a:!1},enqueueSetState:function(a,s,d){a=a._reactInternals;var p=cr(),x=Wi(a),w=Jn(p,x);w.payload=s,d!=null&&(w.callback=d),s=Fi(a,w,x),s!==null&&(hn(s,a,x,p),Wc(s,a,x))},enqueueReplaceState:function(a,s,d){a=a._reactInternals;var p=cr(),x=Wi(a),w=Jn(p,x);w.tag=1,w.payload=s,d!=null&&(w.callback=d),s=Fi(a,w,x),s!==null&&(hn(s,a,x,p),Wc(s,a,x))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var d=cr(),p=Wi(a),x=Jn(d,p);x.tag=2,s!=null&&(x.callback=s),s=Fi(a,x,p),s!==null&&(hn(s,a,p,d),Wc(s,a,p))}};function c1(a,s,d,p,x,w,C){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,w,C):s.prototype&&s.prototype.isPureReactComponent?!Al(d,p)||!Al(x,w):!0}function d1(a,s,d){var p=!1,x=Li,w=s.contextType;return typeof w=="object"&&w!==null?w=Hr(w):(x=vr(s)?Na:er.current,p=s.contextTypes,w=(p=p!=null)?zo(a,x):Li),s=new s(d,w),a.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Zc,a.stateNode=s,s._reactInternals=a,p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=x,a.__reactInternalMemoizedMaskedChildContext=w),s}function f1(a,s,d,p){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,p),s.state!==a&&Zc.enqueueReplaceState(s,s.state,null)}function wp(a,s,d,p){var x=a.stateNode;x.props=d,x.state=a.memoizedState,x.refs={},sp(a);var w=s.contextType;typeof w=="object"&&w!==null?x.context=Hr(w):(w=vr(s)?Na:er.current,x.context=zo(a,w)),x.state=a.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(bp(a,s,w,d),x.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(s=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),s!==x.state&&Zc.enqueueReplaceState(x,x.state,null),Kc(a,d,x,p),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308)}function Vo(a,s){try{var d="",p=s;do d+=J(p),p=p.return;while(p);var x=d}catch(w){x=`
|
||
Error generating stack: `+w.message+`
|
||
`+w.stack}return{value:a,source:s,stack:x,digest:null}}function kp(a,s,d){return{value:a,source:null,stack:d??null,digest:s??null}}function jp(a,s){try{console.error(s.value)}catch(d){setTimeout(function(){throw d})}}var F4=typeof WeakMap=="function"?WeakMap:Map;function h1(a,s,d){d=Jn(-1,d),d.tag=3,d.payload={element:null};var p=s.value;return d.callback=function(){ad||(ad=!0,$p=p),jp(a,s)},d}function m1(a,s,d){d=Jn(-1,d),d.tag=3;var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var x=s.value;d.payload=function(){return p(x)},d.callback=function(){jp(a,s)}}var w=a.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){jp(a,s),typeof p!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),d}function p1(a,s,d){var p=a.pingCache;if(p===null){p=a.pingCache=new F4;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(d)||(x.add(d),a=e3.bind(null,a,s,d),s.then(a,a))}function g1(a){do{var s;if((s=a.tag===13)&&(s=a.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return a;a=a.return}while(a!==null);return null}function v1(a,s,d,p,x){return(a.mode&1)===0?(a===s?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(s=Jn(-1,1),s.tag=2,Fi(d,s,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=x,a)}var B4=P.ReactCurrentOwner,yr=!1;function ur(a,s,d,p){s.child=a===null?Lb(s,null,d,p):Ho(s,a.child,d,p)}function y1(a,s,d,p,x){d=d.render;var w=s.ref;return Ko(s,x),p=mp(a,s,d,p,w,x),d=pp(),a!==null&&!yr?(s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~x,ei(a,s,x)):(ut&&d&&Xm(s),s.flags|=1,ur(a,s,p,x),s.child)}function x1(a,s,d,p,x){if(a===null){var w=d.type;return typeof w=="function"&&!Kp(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(s.tag=15,s.type=w,b1(a,s,w,p,x)):(a=dd(d.type,null,p,s,s.mode,x),a.ref=s.ref,a.return=s,s.child=a)}if(w=a.child,(a.lanes&x)===0){var C=w.memoizedProps;if(d=d.compare,d=d!==null?d:Al,d(C,p)&&a.ref===s.ref)return ei(a,s,x)}return s.flags|=1,a=Gi(w,p),a.ref=s.ref,a.return=s,s.child=a}function b1(a,s,d,p,x){if(a!==null){var w=a.memoizedProps;if(Al(w,p)&&a.ref===s.ref)if(yr=!1,s.pendingProps=p=w,(a.lanes&x)!==0)(a.flags&131072)!==0&&(yr=!0);else return s.lanes=a.lanes,ei(a,s,x)}return Sp(a,s,d,p,x)}function w1(a,s,d){var p=s.pendingProps,x=p.children,w=a!==null?a.memoizedState:null;if(p.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(Qo,Mr),Mr|=d;else{if((d&1073741824)===0)return a=w!==null?w.baseLanes|d:d,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:a,cachePool:null,transitions:null},s.updateQueue=null,tt(Qo,Mr),Mr|=a,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=w!==null?w.baseLanes:d,tt(Qo,Mr),Mr|=p}else w!==null?(p=w.baseLanes|d,s.memoizedState=null):p=d,tt(Qo,Mr),Mr|=p;return ur(a,s,x,d),s.child}function k1(a,s){var d=s.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(s.flags|=512,s.flags|=2097152)}function Sp(a,s,d,p,x){var w=vr(d)?Na:er.current;return w=zo(s,w),Ko(s,x),d=mp(a,s,d,p,w,x),p=pp(),a!==null&&!yr?(s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~x,ei(a,s,x)):(ut&&p&&Xm(s),s.flags|=1,ur(a,s,d,x),s.child)}function j1(a,s,d,p,x){if(vr(d)){var w=!0;Rc(s)}else w=!1;if(Ko(s,x),s.stateNode===null)ed(a,s),d1(s,d,p),wp(s,d,p,x),p=!0;else if(a===null){var C=s.stateNode,D=s.memoizedProps;C.props=D;var R=C.context,Y=d.contextType;typeof Y=="object"&&Y!==null?Y=Hr(Y):(Y=vr(d)?Na:er.current,Y=zo(s,Y));var ce=d.getDerivedStateFromProps,fe=typeof ce=="function"||typeof C.getSnapshotBeforeUpdate=="function";fe||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(D!==p||R!==Y)&&f1(s,C,p,Y),zi=!1;var le=s.memoizedState;C.state=le,Kc(s,p,C,x),R=s.memoizedState,D!==p||le!==R||gr.current||zi?(typeof ce=="function"&&(bp(s,d,ce,p),R=s.memoizedState),(D=zi||c1(s,d,D,p,le,R,Y))?(fe||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=R),C.props=p,C.state=R,C.context=Y,p=D):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{C=s.stateNode,zb(a,s),D=s.memoizedProps,Y=s.type===s.elementType?D:cn(s.type,D),C.props=Y,fe=s.pendingProps,le=C.context,R=d.contextType,typeof R=="object"&&R!==null?R=Hr(R):(R=vr(d)?Na:er.current,R=zo(s,R));var xe=d.getDerivedStateFromProps;(ce=typeof xe=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(D!==fe||le!==R)&&f1(s,C,p,R),zi=!1,le=s.memoizedState,C.state=le,Kc(s,p,C,x);var Se=s.memoizedState;D!==fe||le!==Se||gr.current||zi?(typeof xe=="function"&&(bp(s,d,xe,p),Se=s.memoizedState),(Y=zi||c1(s,d,Y,p,le,Se,R)||!1)?(ce||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(p,Se,R),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(p,Se,R)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||D===a.memoizedProps&&le===a.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&le===a.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=Se),C.props=p,C.state=Se,C.context=R,p=Y):(typeof C.componentDidUpdate!="function"||D===a.memoizedProps&&le===a.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&le===a.memoizedState||(s.flags|=1024),p=!1)}return Np(a,s,d,p,w,x)}function Np(a,s,d,p,x,w){k1(a,s);var C=(s.flags&128)!==0;if(!p&&!C)return x&&Cb(s,d,!1),ei(a,s,w);p=s.stateNode,B4.current=s;var D=C&&typeof d.getDerivedStateFromError!="function"?null:p.render();return s.flags|=1,a!==null&&C?(s.child=Ho(s,a.child,null,w),s.child=Ho(s,null,D,w)):ur(a,s,D,w),s.memoizedState=p.state,x&&Cb(s,d,!0),s.child}function S1(a){var s=a.stateNode;s.pendingContext?Eb(a,s.pendingContext,s.pendingContext!==s.context):s.context&&Eb(a,s.context,!1),lp(a,s.containerInfo)}function N1(a,s,d,p,x){return Uo(),tp(x),s.flags|=256,ur(a,s,d,p),s.child}var Ep={dehydrated:null,treeContext:null,retryLane:0};function Ap(a){return{baseLanes:a,cachePool:null,transitions:null}}function E1(a,s,d){var p=s.pendingProps,x=ht.current,w=!1,C=(s.flags&128)!==0,D;if((D=C)||(D=a!==null&&a.memoizedState===null?!1:(x&2)!==0),D?(w=!0,s.flags&=-129):(a===null||a.memoizedState!==null)&&(x|=1),tt(ht,x&1),a===null)return ep(s),a=s.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((s.mode&1)===0?s.lanes=1:a.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=p.children,a=p.fallback,w?(p=s.mode,w=s.child,C={mode:"hidden",children:C},(p&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=fd(C,p,0,null),a=Da(a,p,d,null),w.return=s,a.return=s,w.sibling=a,s.child=w,s.child.memoizedState=Ap(d),s.memoizedState=Ep,a):Cp(s,C));if(x=a.memoizedState,x!==null&&(D=x.dehydrated,D!==null))return U4(a,s,C,p,D,x,d);if(w){w=p.fallback,C=s.mode,x=a.child,D=x.sibling;var R={mode:"hidden",children:p.children};return(C&1)===0&&s.child!==x?(p=s.child,p.childLanes=0,p.pendingProps=R,s.deletions=null):(p=Gi(x,R),p.subtreeFlags=x.subtreeFlags&14680064),D!==null?w=Gi(D,w):(w=Da(w,C,d,null),w.flags|=2),w.return=s,p.return=s,p.sibling=w,s.child=p,p=w,w=s.child,C=a.child.memoizedState,C=C===null?Ap(d):{baseLanes:C.baseLanes|d,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=a.childLanes&~d,s.memoizedState=Ep,p}return w=a.child,a=w.sibling,p=Gi(w,{mode:"visible",children:p.children}),(s.mode&1)===0&&(p.lanes=d),p.return=s,p.sibling=null,a!==null&&(d=s.deletions,d===null?(s.deletions=[a],s.flags|=16):d.push(a)),s.child=p,s.memoizedState=null,p}function Cp(a,s){return s=fd({mode:"visible",children:s},a.mode,0,null),s.return=a,a.child=s}function Jc(a,s,d,p){return p!==null&&tp(p),Ho(s,a.child,null,d),a=Cp(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function U4(a,s,d,p,x,w,C){if(d)return s.flags&256?(s.flags&=-257,p=kp(Error(r(422))),Jc(a,s,C,p)):s.memoizedState!==null?(s.child=a.child,s.flags|=128,null):(w=p.fallback,x=s.mode,p=fd({mode:"visible",children:p.children},x,0,null),w=Da(w,x,C,null),w.flags|=2,p.return=s,w.return=s,p.sibling=w,s.child=p,(s.mode&1)!==0&&Ho(s,a.child,null,C),s.child.memoizedState=Ap(C),s.memoizedState=Ep,w);if((s.mode&1)===0)return Jc(a,s,C,null);if(x.data==="$!"){if(p=x.nextSibling&&x.nextSibling.dataset,p)var D=p.dgst;return p=D,w=Error(r(419)),p=kp(w,p,void 0),Jc(a,s,C,p)}if(D=(C&a.childLanes)!==0,yr||D){if(p=It,p!==null){switch(C&-C){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(p.suspendedLanes|C))!==0?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,Zn(a,x),hn(p,a,x,-1))}return Wp(),p=kp(Error(r(421))),Jc(a,s,C,p)}return x.data==="$?"?(s.flags|=128,s.child=a.child,s=t3.bind(null,a),x._reactRetry=s,null):(a=w.treeContext,_r=Di(x.nextSibling),Or=s,ut=!0,un=null,a!==null&&(Br[Ur++]=Yn,Br[Ur++]=Xn,Br[Ur++]=Ea,Yn=a.id,Xn=a.overflow,Ea=s),s=Cp(s,p.children),s.flags|=4096,s)}function A1(a,s,d){a.lanes|=s;var p=a.alternate;p!==null&&(p.lanes|=s),ap(a.return,s,d)}function Pp(a,s,d,p,x){var w=a.memoizedState;w===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:x}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=p,w.tail=d,w.tailMode=x)}function C1(a,s,d){var p=s.pendingProps,x=p.revealOrder,w=p.tail;if(ur(a,s,p.children,d),p=ht.current,(p&2)!==0)p=p&1|2,s.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&A1(a,d,s);else if(a.tag===19)A1(a,d,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}p&=1}if(tt(ht,p),(s.mode&1)===0)s.memoizedState=null;else switch(x){case"forwards":for(d=s.child,x=null;d!==null;)a=d.alternate,a!==null&&Gc(a)===null&&(x=d),d=d.sibling;d=x,d===null?(x=s.child,s.child=null):(x=d.sibling,d.sibling=null),Pp(s,!1,x,d,w);break;case"backwards":for(d=null,x=s.child,s.child=null;x!==null;){if(a=x.alternate,a!==null&&Gc(a)===null){s.child=x;break}a=x.sibling,x.sibling=d,d=x,x=a}Pp(s,!0,d,null,w);break;case"together":Pp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ed(a,s){(s.mode&1)===0&&a!==null&&(a.alternate=null,s.alternate=null,s.flags|=2)}function ei(a,s,d){if(a!==null&&(s.dependencies=a.dependencies),_a|=s.lanes,(d&s.childLanes)===0)return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,d=Gi(a,a.pendingProps),s.child=d,d.return=s;a.sibling!==null;)a=a.sibling,d=d.sibling=Gi(a,a.pendingProps),d.return=s;d.sibling=null}return s.child}function H4(a,s,d){switch(s.tag){case 3:S1(s),Uo();break;case 5:Ub(s);break;case 1:vr(s.type)&&Rc(s);break;case 4:lp(s,s.stateNode.containerInfo);break;case 10:var p=s.type._context,x=s.memoizedProps.value;tt(Uc,p._currentValue),p._currentValue=x;break;case 13:if(p=s.memoizedState,p!==null)return p.dehydrated!==null?(tt(ht,ht.current&1),s.flags|=128,null):(d&s.child.childLanes)!==0?E1(a,s,d):(tt(ht,ht.current&1),a=ei(a,s,d),a!==null?a.sibling:null);tt(ht,ht.current&1);break;case 19:if(p=(d&s.childLanes)!==0,(a.flags&128)!==0){if(p)return C1(a,s,d);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),tt(ht,ht.current),p)break;return null;case 22:case 23:return s.lanes=0,w1(a,s,d)}return ei(a,s,d)}var P1,Op,O1,_1;P1=function(a,s){for(var d=s.child;d!==null;){if(d.tag===5||d.tag===6)a.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}},Op=function(){},O1=function(a,s,d,p){var x=a.memoizedProps;if(x!==p){a=s.stateNode,Pa(Nn.current);var w=null;switch(d){case"input":x=Ue(a,x),p=Ue(a,p),w=[];break;case"select":x=te({},x,{value:void 0}),p=te({},p,{value:void 0}),w=[];break;case"textarea":x=nt(a,x),p=nt(a,p),w=[];break;default:typeof x.onClick!="function"&&typeof p.onClick=="function"&&(a.onclick=Ic)}cm(d,p);var C;d=null;for(Y in x)if(!p.hasOwnProperty(Y)&&x.hasOwnProperty(Y)&&x[Y]!=null)if(Y==="style"){var D=x[Y];for(C in D)D.hasOwnProperty(C)&&(d||(d={}),d[C]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(i.hasOwnProperty(Y)?w||(w=[]):(w=w||[]).push(Y,null));for(Y in p){var R=p[Y];if(D=x!=null?x[Y]:void 0,p.hasOwnProperty(Y)&&R!==D&&(R!=null||D!=null))if(Y==="style")if(D){for(C in D)!D.hasOwnProperty(C)||R&&R.hasOwnProperty(C)||(d||(d={}),d[C]="");for(C in R)R.hasOwnProperty(C)&&D[C]!==R[C]&&(d||(d={}),d[C]=R[C])}else d||(w||(w=[]),w.push(Y,d)),d=R;else Y==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,D=D?D.__html:void 0,R!=null&&D!==R&&(w=w||[]).push(Y,R)):Y==="children"?typeof R!="string"&&typeof R!="number"||(w=w||[]).push(Y,""+R):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(i.hasOwnProperty(Y)?(R!=null&&Y==="onScroll"&&it("scroll",a),w||D===R||(w=[])):(w=w||[]).push(Y,R))}d&&(w=w||[]).push("style",d);var Y=w;(s.updateQueue=Y)&&(s.flags|=4)}},_1=function(a,s,d,p){d!==p&&(s.flags|=4)};function Ul(a,s){if(!ut)switch(a.tailMode){case"hidden":s=a.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function rr(a){var s=a.alternate!==null&&a.alternate.child===a.child,d=0,p=0;if(s)for(var x=a.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags&14680064,p|=x.flags&14680064,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)d|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=p,a.childLanes=d,s}function W4(a,s,d){var p=s.pendingProps;switch(Zm(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 vr(s.type)&&Dc(),rr(s),null;case 3:return p=s.stateNode,Go(),at(gr),at(er),dp(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(a===null||a.child===null)&&(Fc(s)?s.flags|=4:a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,un!==null&&(Bp(un),un=null))),Op(a,s),rr(s),null;case 5:up(s);var x=Pa(Ll.current);if(d=s.type,a!==null&&s.stateNode!=null)O1(a,s,d,p,x),a.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!p){if(s.stateNode===null)throw Error(r(166));return rr(s),null}if(a=Pa(Nn.current),Fc(s)){p=s.stateNode,d=s.type;var w=s.memoizedProps;switch(p[Sn]=s,p[Ml]=w,a=(s.mode&1)!==0,d){case"dialog":it("cancel",p),it("close",p);break;case"iframe":case"object":case"embed":it("load",p);break;case"video":case"audio":for(x=0;x<Pl.length;x++)it(Pl[x],p);break;case"source":it("error",p);break;case"img":case"image":case"link":it("error",p),it("load",p);break;case"details":it("toggle",p);break;case"input":_e(p,w),it("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!w.multiple},it("invalid",p);break;case"textarea":K(p,w),it("invalid",p)}cm(d,w),x=null;for(var C in w)if(w.hasOwnProperty(C)){var D=w[C];C==="children"?typeof D=="string"?p.textContent!==D&&(w.suppressHydrationWarning!==!0&&Mc(p.textContent,D,a),x=["children",D]):typeof D=="number"&&p.textContent!==""+D&&(w.suppressHydrationWarning!==!0&&Mc(p.textContent,D,a),x=["children",""+D]):i.hasOwnProperty(C)&&D!=null&&C==="onScroll"&&it("scroll",p)}switch(d){case"input":Oe(p),G(p,w,!0);break;case"textarea":Oe(p),Cr(p);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(p.onclick=Ic)}p=x,s.updateQueue=p,p!==null&&(s.flags|=4)}else{C=x.nodeType===9?x:x.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=vx(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=C.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof p.is=="string"?a=C.createElement(d,{is:p.is}):(a=C.createElement(d),d==="select"&&(C=a,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):a=C.createElementNS(a,d),a[Sn]=s,a[Ml]=p,P1(a,s,!1,!1),s.stateNode=a;e:{switch(C=dm(d,p),d){case"dialog":it("cancel",a),it("close",a),x=p;break;case"iframe":case"object":case"embed":it("load",a),x=p;break;case"video":case"audio":for(x=0;x<Pl.length;x++)it(Pl[x],a);x=p;break;case"source":it("error",a),x=p;break;case"img":case"image":case"link":it("error",a),it("load",a),x=p;break;case"details":it("toggle",a),x=p;break;case"input":_e(a,p),x=Ue(a,p),it("invalid",a);break;case"option":x=p;break;case"select":a._wrapperState={wasMultiple:!!p.multiple},x=te({},p,{value:void 0}),it("invalid",a);break;case"textarea":K(a,p),x=nt(a,p),it("invalid",a);break;default:x=p}cm(d,x),D=x;for(w in D)if(D.hasOwnProperty(w)){var R=D[w];w==="style"?bx(a,R):w==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&yx(a,R)):w==="children"?typeof R=="string"?(d!=="textarea"||R!=="")&&cl(a,R):typeof R=="number"&&cl(a,""+R):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?R!=null&&w==="onScroll"&&it("scroll",a):R!=null&&A(a,w,R,C))}switch(d){case"input":Oe(a),G(a,p,!1);break;case"textarea":Oe(a),Cr(a);break;case"option":p.value!=null&&a.setAttribute("value",""+me(p.value));break;case"select":a.multiple=!!p.multiple,w=p.value,w!=null?Ve(a,!!p.multiple,w,!1):p.defaultValue!=null&&Ve(a,!!p.multiple,p.defaultValue,!0);break;default:typeof x.onClick=="function"&&(a.onclick=Ic)}switch(d){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return rr(s),null;case 6:if(a&&s.stateNode!=null)_1(a,s,a.memoizedProps,p);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(d=Pa(Ll.current),Pa(Nn.current),Fc(s)){if(p=s.stateNode,d=s.memoizedProps,p[Sn]=s,(w=p.nodeValue!==d)&&(a=Or,a!==null))switch(a.tag){case 3:Mc(p.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Mc(p.nodeValue,d,(a.mode&1)!==0)}w&&(s.flags|=4)}else p=(d.nodeType===9?d:d.ownerDocument).createTextNode(p),p[Sn]=s,s.stateNode=p}return rr(s),null;case 13:if(at(ht),p=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(ut&&_r!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Tb(),Uo(),s.flags|=98560,w=!1;else if(w=Fc(s),p!==null&&p.dehydrated!==null){if(a===null){if(!w)throw Error(r(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[Sn]=s}else Uo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;rr(s),w=!1}else un!==null&&(Bp(un),un=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=d,s):(p=p!==null,p!==(a!==null&&a.memoizedState!==null)&&p&&(s.child.flags|=8192,(s.mode&1)!==0&&(a===null||(ht.current&1)!==0?At===0&&(At=3):Wp())),s.updateQueue!==null&&(s.flags|=4),rr(s),null);case 4:return Go(),Op(a,s),a===null&&Ol(s.stateNode.containerInfo),rr(s),null;case 10:return ip(s.type._context),rr(s),null;case 17:return vr(s.type)&&Dc(),rr(s),null;case 19:if(at(ht),w=s.memoizedState,w===null)return rr(s),null;if(p=(s.flags&128)!==0,C=w.rendering,C===null)if(p)Ul(w,!1);else{if(At!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(C=Gc(a),C!==null){for(s.flags|=128,Ul(w,!1),p=C.updateQueue,p!==null&&(s.updateQueue=p,s.flags|=4),s.subtreeFlags=0,p=d,d=s.child;d!==null;)w=d,a=p,w.flags&=14680066,C=w.alternate,C===null?(w.childLanes=0,w.lanes=a,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,a=C.dependencies,w.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return tt(ht,ht.current&1|2),s.child}a=a.sibling}w.tail!==null&&bt()>Yo&&(s.flags|=128,p=!0,Ul(w,!1),s.lanes=4194304)}else{if(!p)if(a=Gc(C),a!==null){if(s.flags|=128,p=!0,d=a.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),Ul(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!ut)return rr(s),null}else 2*bt()-w.renderingStartTime>Yo&&d!==1073741824&&(s.flags|=128,p=!0,Ul(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(d=w.last,d!==null?d.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=bt(),s.sibling=null,d=ht.current,tt(ht,p?d&1|2:d&1),s):(rr(s),null);case 22:case 23:return Hp(),p=s.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(Mr&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 K4(a,s){switch(Zm(s),s.tag){case 1:return vr(s.type)&&Dc(),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Go(),at(gr),at(er),dp(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 5:return up(s),null;case 13:if(at(ht),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Uo()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return at(ht),null;case 4:return Go(),null;case 10:return ip(s.type._context),null;case 22:case 23:return Hp(),null;case 24:return null;default:return null}}var td=!1,nr=!1,G4=typeof WeakSet=="function"?WeakSet:Set,ke=null;function qo(a,s){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(p){pt(a,s,p)}else d.current=null}function _p(a,s,d){try{d()}catch(p){pt(a,s,p)}}var M1=!1;function V4(a,s){if(Hm=wc,a=cb(),Dm(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var C=0,D=-1,R=-1,Y=0,ce=0,fe=a,le=null;t:for(;;){for(var xe;fe!==d||x!==0&&fe.nodeType!==3||(D=C+x),fe!==w||p!==0&&fe.nodeType!==3||(R=C+p),fe.nodeType===3&&(C+=fe.nodeValue.length),(xe=fe.firstChild)!==null;)le=fe,fe=xe;for(;;){if(fe===a)break t;if(le===d&&++Y===x&&(D=C),le===w&&++ce===p&&(R=C),(xe=fe.nextSibling)!==null)break;fe=le,le=fe.parentNode}fe=xe}d=D===-1||R===-1?null:{start:D,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Wm={focusedElem:a,selectionRange:d},wc=!1,ke=s;ke!==null;)if(s=ke,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,ke=a;else for(;ke!==null;){s=ke;try{var Se=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Ee=Se.memoizedProps,wt=Se.memoizedState,W=s.stateNode,F=W.getSnapshotBeforeUpdate(s.elementType===s.type?Ee:cn(s.type,Ee),wt);W.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ge){pt(s,s.return,ge)}if(a=s.sibling,a!==null){a.return=s.return,ke=a;break}ke=s.return}return Se=M1,M1=!1,Se}function Hl(a,s,d){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var x=p=p.next;do{if((x.tag&a)===a){var w=x.destroy;x.destroy=void 0,w!==void 0&&_p(s,d,w)}x=x.next}while(x!==p)}}function rd(a,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&a)===a){var p=d.create;d.destroy=p()}d=d.next}while(d!==s)}}function Mp(a){var s=a.ref;if(s!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof s=="function"?s(a):s.current=a}}function I1(a){var s=a.alternate;s!==null&&(a.alternate=null,I1(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&(delete s[Sn],delete s[Ml],delete s[qm],delete s[P4],delete s[O4])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function T1(a){return a.tag===5||a.tag===3||a.tag===4}function D1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||T1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Ip(a,s,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?d.nodeType===8?d.parentNode.insertBefore(a,s):d.insertBefore(a,s):(d.nodeType===8?(s=d.parentNode,s.insertBefore(a,d)):(s=d,s.appendChild(a)),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Ic));else if(p!==4&&(a=a.child,a!==null))for(Ip(a,s,d),a=a.sibling;a!==null;)Ip(a,s,d),a=a.sibling}function Tp(a,s,d){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?d.insertBefore(a,s):d.appendChild(a);else if(p!==4&&(a=a.child,a!==null))for(Tp(a,s,d),a=a.sibling;a!==null;)Tp(a,s,d),a=a.sibling}var Ut=null,dn=!1;function Bi(a,s,d){for(d=d.child;d!==null;)R1(a,s,d),d=d.sibling}function R1(a,s,d){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(pc,d)}catch{}switch(d.tag){case 5:nr||qo(d,s);case 6:var p=Ut,x=dn;Ut=null,Bi(a,s,d),Ut=p,dn=x,Ut!==null&&(dn?(a=Ut,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Ut.removeChild(d.stateNode));break;case 18:Ut!==null&&(dn?(a=Ut,d=d.stateNode,a.nodeType===8?Vm(a.parentNode,d):a.nodeType===1&&Vm(a,d),wl(a)):Vm(Ut,d.stateNode));break;case 4:p=Ut,x=dn,Ut=d.stateNode.containerInfo,dn=!0,Bi(a,s,d),Ut=p,dn=x;break;case 0:case 11:case 14:case 15:if(!nr&&(p=d.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){x=p=p.next;do{var w=x,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&_p(d,s,C),x=x.next}while(x!==p)}Bi(a,s,d);break;case 1:if(!nr&&(qo(d,s),p=d.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=d.memoizedProps,p.state=d.memoizedState,p.componentWillUnmount()}catch(D){pt(d,s,D)}Bi(a,s,d);break;case 21:Bi(a,s,d);break;case 22:d.mode&1?(nr=(p=nr)||d.memoizedState!==null,Bi(a,s,d),nr=p):Bi(a,s,d);break;default:Bi(a,s,d)}}function L1(a){var s=a.updateQueue;if(s!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new G4),s.forEach(function(p){var x=r3.bind(null,a,p);d.has(p)||(d.add(p),p.then(x,x))})}}function fn(a,s){var d=s.deletions;if(d!==null)for(var p=0;p<d.length;p++){var x=d[p];try{var w=a,C=s,D=C;e:for(;D!==null;){switch(D.tag){case 5:Ut=D.stateNode,dn=!1;break e;case 3:Ut=D.stateNode.containerInfo,dn=!0;break e;case 4:Ut=D.stateNode.containerInfo,dn=!0;break e}D=D.return}if(Ut===null)throw Error(r(160));R1(w,C,x),Ut=null,dn=!1;var R=x.alternate;R!==null&&(R.return=null),x.return=null}catch(Y){pt(x,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)$1(s,a),s=s.sibling}function $1(a,s){var d=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(fn(s,a),An(a),p&4){try{Hl(3,a,a.return),rd(3,a)}catch(Ee){pt(a,a.return,Ee)}try{Hl(5,a,a.return)}catch(Ee){pt(a,a.return,Ee)}}break;case 1:fn(s,a),An(a),p&512&&d!==null&&qo(d,d.return);break;case 5:if(fn(s,a),An(a),p&512&&d!==null&&qo(d,d.return),a.flags&32){var x=a.stateNode;try{cl(x,"")}catch(Ee){pt(a,a.return,Ee)}}if(p&4&&(x=a.stateNode,x!=null)){var w=a.memoizedProps,C=d!==null?d.memoizedProps:w,D=a.type,R=a.updateQueue;if(a.updateQueue=null,R!==null)try{D==="input"&&w.type==="radio"&&w.name!=null&&xt(x,w),dm(D,C);var Y=dm(D,w);for(C=0;C<R.length;C+=2){var ce=R[C],fe=R[C+1];ce==="style"?bx(x,fe):ce==="dangerouslySetInnerHTML"?yx(x,fe):ce==="children"?cl(x,fe):A(x,ce,fe,Y)}switch(D){case"input":Jt(x,w);break;case"textarea":Le(x,w);break;case"select":var le=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!w.multiple;var xe=w.value;xe!=null?Ve(x,!!w.multiple,xe,!1):le!==!!w.multiple&&(w.defaultValue!=null?Ve(x,!!w.multiple,w.defaultValue,!0):Ve(x,!!w.multiple,w.multiple?[]:"",!1))}x[Ml]=w}catch(Ee){pt(a,a.return,Ee)}}break;case 6:if(fn(s,a),An(a),p&4){if(a.stateNode===null)throw Error(r(162));x=a.stateNode,w=a.memoizedProps;try{x.nodeValue=w}catch(Ee){pt(a,a.return,Ee)}}break;case 3:if(fn(s,a),An(a),p&4&&d!==null&&d.memoizedState.isDehydrated)try{wl(s.containerInfo)}catch(Ee){pt(a,a.return,Ee)}break;case 4:fn(s,a),An(a);break;case 13:fn(s,a),An(a),x=a.child,x.flags&8192&&(w=x.memoizedState!==null,x.stateNode.isHidden=w,!w||x.alternate!==null&&x.alternate.memoizedState!==null||(Lp=bt())),p&4&&L1(a);break;case 22:if(ce=d!==null&&d.memoizedState!==null,a.mode&1?(nr=(Y=nr)||ce,fn(s,a),nr=Y):fn(s,a),An(a),p&8192){if(Y=a.memoizedState!==null,(a.stateNode.isHidden=Y)&&!ce&&(a.mode&1)!==0)for(ke=a,ce=a.child;ce!==null;){for(fe=ke=ce;ke!==null;){switch(le=ke,xe=le.child,le.tag){case 0:case 11:case 14:case 15:Hl(4,le,le.return);break;case 1:qo(le,le.return);var Se=le.stateNode;if(typeof Se.componentWillUnmount=="function"){p=le,d=le.return;try{s=p,Se.props=s.memoizedProps,Se.state=s.memoizedState,Se.componentWillUnmount()}catch(Ee){pt(p,d,Ee)}}break;case 5:qo(le,le.return);break;case 22:if(le.memoizedState!==null){B1(fe);continue}}xe!==null?(xe.return=le,ke=xe):B1(fe)}ce=ce.sibling}e:for(ce=null,fe=a;;){if(fe.tag===5){if(ce===null){ce=fe;try{x=fe.stateNode,Y?(w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(D=fe.stateNode,R=fe.memoizedProps.style,C=R!=null&&R.hasOwnProperty("display")?R.display:null,D.style.display=xx("display",C))}catch(Ee){pt(a,a.return,Ee)}}}else if(fe.tag===6){if(ce===null)try{fe.stateNode.nodeValue=Y?"":fe.memoizedProps}catch(Ee){pt(a,a.return,Ee)}}else if((fe.tag!==22&&fe.tag!==23||fe.memoizedState===null||fe===a)&&fe.child!==null){fe.child.return=fe,fe=fe.child;continue}if(fe===a)break e;for(;fe.sibling===null;){if(fe.return===null||fe.return===a)break e;ce===fe&&(ce=null),fe=fe.return}ce===fe&&(ce=null),fe.sibling.return=fe.return,fe=fe.sibling}}break;case 19:fn(s,a),An(a),p&4&&L1(a);break;case 21:break;default:fn(s,a),An(a)}}function An(a){var s=a.flags;if(s&2){try{e:{for(var d=a.return;d!==null;){if(T1(d)){var p=d;break e}d=d.return}throw Error(r(160))}switch(p.tag){case 5:var x=p.stateNode;p.flags&32&&(cl(x,""),p.flags&=-33);var w=D1(a);Tp(a,w,x);break;case 3:case 4:var C=p.stateNode.containerInfo,D=D1(a);Ip(a,D,C);break;default:throw Error(r(161))}}catch(R){pt(a,a.return,R)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function q4(a,s,d){ke=a,z1(a)}function z1(a,s,d){for(var p=(a.mode&1)!==0;ke!==null;){var x=ke,w=x.child;if(x.tag===22&&p){var C=x.memoizedState!==null||td;if(!C){var D=x.alternate,R=D!==null&&D.memoizedState!==null||nr;D=td;var Y=nr;if(td=C,(nr=R)&&!Y)for(ke=x;ke!==null;)C=ke,R=C.child,C.tag===22&&C.memoizedState!==null?U1(x):R!==null?(R.return=C,ke=R):U1(x);for(;w!==null;)ke=w,z1(w),w=w.sibling;ke=x,td=D,nr=Y}F1(a)}else(x.subtreeFlags&8772)!==0&&w!==null?(w.return=x,ke=w):F1(a)}}function F1(a){for(;ke!==null;){var s=ke;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||rd(5,s);break;case 1:var p=s.stateNode;if(s.flags&4&&!nr)if(d===null)p.componentDidMount();else{var x=s.elementType===s.type?d.memoizedProps:cn(s.type,d.memoizedProps);p.componentDidUpdate(x,d.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Bb(s,w,p);break;case 3:var C=s.updateQueue;if(C!==null){if(d=null,s.child!==null)switch(s.child.tag){case 5:d=s.child.stateNode;break;case 1:d=s.child.stateNode}Bb(s,C,d)}break;case 5:var D=s.stateNode;if(d===null&&s.flags&4){d=D;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 Y=s.alternate;if(Y!==null){var ce=Y.memoizedState;if(ce!==null){var fe=ce.dehydrated;fe!==null&&wl(fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}nr||s.flags&512&&Mp(s)}catch(le){pt(s,s.return,le)}}if(s===a){ke=null;break}if(d=s.sibling,d!==null){d.return=s.return,ke=d;break}ke=s.return}}function B1(a){for(;ke!==null;){var s=ke;if(s===a){ke=null;break}var d=s.sibling;if(d!==null){d.return=s.return,ke=d;break}ke=s.return}}function U1(a){for(;ke!==null;){var s=ke;try{switch(s.tag){case 0:case 11:case 15:var d=s.return;try{rd(4,s)}catch(R){pt(s,d,R)}break;case 1:var p=s.stateNode;if(typeof p.componentDidMount=="function"){var x=s.return;try{p.componentDidMount()}catch(R){pt(s,x,R)}}var w=s.return;try{Mp(s)}catch(R){pt(s,w,R)}break;case 5:var C=s.return;try{Mp(s)}catch(R){pt(s,C,R)}}}catch(R){pt(s,s.return,R)}if(s===a){ke=null;break}var D=s.sibling;if(D!==null){D.return=s.return,ke=D;break}ke=s.return}}var Q4=Math.ceil,nd=P.ReactCurrentDispatcher,Dp=P.ReactCurrentOwner,Kr=P.ReactCurrentBatchConfig,qe=0,It=null,jt=null,Ht=0,Mr=0,Qo=Ri(0),At=0,Wl=null,_a=0,id=0,Rp=0,Kl=null,xr=null,Lp=0,Yo=1/0,ti=null,ad=!1,$p=null,Ui=null,od=!1,Hi=null,sd=0,Gl=0,zp=null,ld=-1,ud=0;function cr(){return(qe&6)!==0?bt():ld!==-1?ld:ld=bt()}function Wi(a){return(a.mode&1)===0?1:(qe&2)!==0&&Ht!==0?Ht&-Ht:M4.transition!==null?(ud===0&&(ud=Dx()),ud):(a=Je,a!==0||(a=window.event,a=a===void 0?16:Wx(a.type)),a)}function hn(a,s,d,p){if(50<Gl)throw Gl=0,zp=null,Error(r(185));gl(a,d,p),((qe&2)===0||a!==It)&&(a===It&&((qe&2)===0&&(id|=d),At===4&&Ki(a,Ht)),br(a,p),d===1&&qe===0&&(s.mode&1)===0&&(Yo=bt()+500,Lc&&$i()))}function br(a,s){var d=a.callbackNode;M_(a,s);var p=yc(a,a===It?Ht:0);if(p===0)d!==null&&Mx(d),a.callbackNode=null,a.callbackPriority=0;else if(s=p&-p,a.callbackPriority!==s){if(d!=null&&Mx(d),s===1)a.tag===0?_4(W1.bind(null,a)):Pb(W1.bind(null,a)),A4(function(){(qe&6)===0&&$i()}),d=null;else{switch(Rx(p)){case 1:d=ym;break;case 4:d=Ix;break;case 16:d=mc;break;case 536870912:d=Tx;break;default:d=mc}d=Z1(d,H1.bind(null,a))}a.callbackPriority=s,a.callbackNode=d}}function H1(a,s){if(ld=-1,ud=0,(qe&6)!==0)throw Error(r(327));var d=a.callbackNode;if(Xo()&&a.callbackNode!==d)return null;var p=yc(a,a===It?Ht:0);if(p===0)return null;if((p&30)!==0||(p&a.expiredLanes)!==0||s)s=cd(a,p);else{s=p;var x=qe;qe|=2;var w=G1();(It!==a||Ht!==s)&&(ti=null,Yo=bt()+500,Ia(a,s));do try{Z4();break}catch(D){K1(a,D)}while(!0);np(),nd.current=w,qe=x,jt!==null?s=0:(It=null,Ht=0,s=At)}if(s!==0){if(s===2&&(x=xm(a),x!==0&&(p=x,s=Fp(a,x))),s===1)throw d=Wl,Ia(a,0),Ki(a,p),br(a,bt()),d;if(s===6)Ki(a,p);else{if(x=a.current.alternate,(p&30)===0&&!Y4(x)&&(s=cd(a,p),s===2&&(w=xm(a),w!==0&&(p=w,s=Fp(a,w))),s===1))throw d=Wl,Ia(a,0),Ki(a,p),br(a,bt()),d;switch(a.finishedWork=x,a.finishedLanes=p,s){case 0:case 1:throw Error(r(345));case 2:Ta(a,xr,ti);break;case 3:if(Ki(a,p),(p&130023424)===p&&(s=Lp+500-bt(),10<s)){if(yc(a,0)!==0)break;if(x=a.suspendedLanes,(x&p)!==p){cr(),a.pingedLanes|=a.suspendedLanes&x;break}a.timeoutHandle=Gm(Ta.bind(null,a,xr,ti),s);break}Ta(a,xr,ti);break;case 4:if(Ki(a,p),(p&4194240)===p)break;for(s=a.eventTimes,x=-1;0<p;){var C=31-sn(p);w=1<<C,C=s[C],C>x&&(x=C),p&=~w}if(p=x,p=bt()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*Q4(p/1960))-p,10<p){a.timeoutHandle=Gm(Ta.bind(null,a,xr,ti),p);break}Ta(a,xr,ti);break;case 5:Ta(a,xr,ti);break;default:throw Error(r(329))}}}return br(a,bt()),a.callbackNode===d?H1.bind(null,a):null}function Fp(a,s){var d=Kl;return a.current.memoizedState.isDehydrated&&(Ia(a,s).flags|=256),a=cd(a,s),a!==2&&(s=xr,xr=d,s!==null&&Bp(s)),a}function Bp(a){xr===null?xr=a:xr.push.apply(xr,a)}function Y4(a){for(var s=a;;){if(s.flags&16384){var d=s.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var p=0;p<d.length;p++){var x=d[p],w=x.getSnapshot;x=x.value;try{if(!ln(w(),x))return!1}catch{return!1}}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ki(a,s){for(s&=~Rp,s&=~id,a.suspendedLanes|=s,a.pingedLanes&=~s,a=a.expirationTimes;0<s;){var d=31-sn(s),p=1<<d;a[d]=-1,s&=~p}}function W1(a){if((qe&6)!==0)throw Error(r(327));Xo();var s=yc(a,0);if((s&1)===0)return br(a,bt()),null;var d=cd(a,s);if(a.tag!==0&&d===2){var p=xm(a);p!==0&&(s=p,d=Fp(a,p))}if(d===1)throw d=Wl,Ia(a,0),Ki(a,s),br(a,bt()),d;if(d===6)throw Error(r(345));return a.finishedWork=a.current.alternate,a.finishedLanes=s,Ta(a,xr,ti),br(a,bt()),null}function Up(a,s){var d=qe;qe|=1;try{return a(s)}finally{qe=d,qe===0&&(Yo=bt()+500,Lc&&$i())}}function Ma(a){Hi!==null&&Hi.tag===0&&(qe&6)===0&&Xo();var s=qe;qe|=1;var d=Kr.transition,p=Je;try{if(Kr.transition=null,Je=1,a)return a()}finally{Je=p,Kr.transition=d,qe=s,(qe&6)===0&&$i()}}function Hp(){Mr=Qo.current,at(Qo)}function Ia(a,s){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,E4(d)),jt!==null)for(d=jt.return;d!==null;){var p=d;switch(Zm(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Dc();break;case 3:Go(),at(gr),at(er),dp();break;case 5:up(p);break;case 4:Go();break;case 13:at(ht);break;case 19:at(ht);break;case 10:ip(p.type._context);break;case 22:case 23:Hp()}d=d.return}if(It=a,jt=a=Gi(a.current,null),Ht=Mr=s,At=0,Wl=null,Rp=id=_a=0,xr=Kl=null,Ca!==null){for(s=0;s<Ca.length;s++)if(d=Ca[s],p=d.interleaved,p!==null){d.interleaved=null;var x=p.next,w=d.pending;if(w!==null){var C=w.next;w.next=x,p.next=C}d.pending=p}Ca=null}return a}function K1(a,s){do{var d=jt;try{if(np(),Vc.current=Xc,qc){for(var p=mt.memoizedState;p!==null;){var x=p.queue;x!==null&&(x.pending=null),p=p.next}qc=!1}if(Oa=0,Mt=Et=mt=null,$l=!1,zl=0,Dp.current=null,d===null||d.return===null){At=1,Wl=s,jt=null;break}e:{var w=a,C=d.return,D=d,R=s;if(s=Ht,D.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var Y=R,ce=D,fe=ce.tag;if((ce.mode&1)===0&&(fe===0||fe===11||fe===15)){var le=ce.alternate;le?(ce.updateQueue=le.updateQueue,ce.memoizedState=le.memoizedState,ce.lanes=le.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var xe=g1(C);if(xe!==null){xe.flags&=-257,v1(xe,C,D,w,s),xe.mode&1&&p1(w,Y,s),s=xe,R=Y;var Se=s.updateQueue;if(Se===null){var Ee=new Set;Ee.add(R),s.updateQueue=Ee}else Se.add(R);break e}else{if((s&1)===0){p1(w,Y,s),Wp();break e}R=Error(r(426))}}else if(ut&&D.mode&1){var wt=g1(C);if(wt!==null){(wt.flags&65536)===0&&(wt.flags|=256),v1(wt,C,D,w,s),tp(Vo(R,D));break e}}w=R=Vo(R,D),At!==4&&(At=2),Kl===null?Kl=[w]:Kl.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var W=h1(w,R,s);Fb(w,W);break e;case 1:D=R;var F=w.type,V=w.stateNode;if((w.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Ui===null||!Ui.has(V)))){w.flags|=65536,s&=-s,w.lanes|=s;var ge=m1(w,D,s);Fb(w,ge);break e}}w=w.return}while(w!==null)}q1(d)}catch(Ce){s=Ce,jt===d&&d!==null&&(jt=d=d.return);continue}break}while(!0)}function G1(){var a=nd.current;return nd.current=Xc,a===null?Xc:a}function Wp(){(At===0||At===3||At===2)&&(At=4),It===null||(_a&268435455)===0&&(id&268435455)===0||Ki(It,Ht)}function cd(a,s){var d=qe;qe|=2;var p=G1();(It!==a||Ht!==s)&&(ti=null,Ia(a,s));do try{X4();break}catch(x){K1(a,x)}while(!0);if(np(),qe=d,nd.current=p,jt!==null)throw Error(r(261));return It=null,Ht=0,At}function X4(){for(;jt!==null;)V1(jt)}function Z4(){for(;jt!==null&&!j_();)V1(jt)}function V1(a){var s=X1(a.alternate,a,Mr);a.memoizedProps=a.pendingProps,s===null?q1(a):jt=s,Dp.current=null}function q1(a){var s=a;do{var d=s.alternate;if(a=s.return,(s.flags&32768)===0){if(d=W4(d,s,Mr),d!==null){jt=d;return}}else{if(d=K4(d,s),d!==null){d.flags&=32767,jt=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{At=6,jt=null;return}}if(s=s.sibling,s!==null){jt=s;return}jt=s=a}while(s!==null);At===0&&(At=5)}function Ta(a,s,d){var p=Je,x=Kr.transition;try{Kr.transition=null,Je=1,J4(a,s,d,p)}finally{Kr.transition=x,Je=p}return null}function J4(a,s,d,p){do Xo();while(Hi!==null);if((qe&6)!==0)throw Error(r(327));d=a.finishedWork;var x=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(r(177));a.callbackNode=null,a.callbackPriority=0;var w=d.lanes|d.childLanes;if(I_(a,w),a===It&&(jt=It=null,Ht=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||od||(od=!0,Z1(mc,function(){return Xo(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Kr.transition,Kr.transition=null;var C=Je;Je=1;var D=qe;qe|=4,Dp.current=null,V4(a,d),$1(d,a),x4(Wm),wc=!!Hm,Wm=Hm=null,a.current=d,q4(d),S_(),qe=D,Je=C,Kr.transition=w}else a.current=d;if(od&&(od=!1,Hi=a,sd=x),w=a.pendingLanes,w===0&&(Ui=null),A_(d.stateNode),br(a,bt()),s!==null)for(p=a.onRecoverableError,d=0;d<s.length;d++)x=s[d],p(x.value,{componentStack:x.stack,digest:x.digest});if(ad)throw ad=!1,a=$p,$p=null,a;return(sd&1)!==0&&a.tag!==0&&Xo(),w=a.pendingLanes,(w&1)!==0?a===zp?Gl++:(Gl=0,zp=a):Gl=0,$i(),null}function Xo(){if(Hi!==null){var a=Rx(sd),s=Kr.transition,d=Je;try{if(Kr.transition=null,Je=16>a?16:a,Hi===null)var p=!1;else{if(a=Hi,Hi=null,sd=0,(qe&6)!==0)throw Error(r(331));var x=qe;for(qe|=4,ke=a.current;ke!==null;){var w=ke,C=w.child;if((ke.flags&16)!==0){var D=w.deletions;if(D!==null){for(var R=0;R<D.length;R++){var Y=D[R];for(ke=Y;ke!==null;){var ce=ke;switch(ce.tag){case 0:case 11:case 15:Hl(8,ce,w)}var fe=ce.child;if(fe!==null)fe.return=ce,ke=fe;else for(;ke!==null;){ce=ke;var le=ce.sibling,xe=ce.return;if(I1(ce),ce===Y){ke=null;break}if(le!==null){le.return=xe,ke=le;break}ke=xe}}}var Se=w.alternate;if(Se!==null){var Ee=Se.child;if(Ee!==null){Se.child=null;do{var wt=Ee.sibling;Ee.sibling=null,Ee=wt}while(Ee!==null)}}ke=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,ke=C;else e:for(;ke!==null;){if(w=ke,(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,ke=W;break e}ke=w.return}}var F=a.current;for(ke=F;ke!==null;){C=ke;var V=C.child;if((C.subtreeFlags&2064)!==0&&V!==null)V.return=C,ke=V;else e:for(C=F;ke!==null;){if(D=ke,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:rd(9,D)}}catch(Ce){pt(D,D.return,Ce)}if(D===C){ke=null;break e}var ge=D.sibling;if(ge!==null){ge.return=D.return,ke=ge;break e}ke=D.return}}if(qe=x,$i(),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(pc,a)}catch{}p=!0}return p}finally{Je=d,Kr.transition=s}}return!1}function Q1(a,s,d){s=Vo(d,s),s=h1(a,s,1),a=Fi(a,s,1),s=cr(),a!==null&&(gl(a,1,s),br(a,s))}function pt(a,s,d){if(a.tag===3)Q1(a,a,d);else for(;s!==null;){if(s.tag===3){Q1(s,a,d);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ui===null||!Ui.has(p))){a=Vo(d,a),a=m1(s,a,1),s=Fi(s,a,1),a=cr(),s!==null&&(gl(s,1,a),br(s,a));break}}s=s.return}}function e3(a,s,d){var p=a.pingCache;p!==null&&p.delete(s),s=cr(),a.pingedLanes|=a.suspendedLanes&d,It===a&&(Ht&d)===d&&(At===4||At===3&&(Ht&130023424)===Ht&&500>bt()-Lp?Ia(a,0):Rp|=d),br(a,s)}function Y1(a,s){s===0&&((a.mode&1)===0?s=1:(s=vc,vc<<=1,(vc&130023424)===0&&(vc=4194304)));var d=cr();a=Zn(a,s),a!==null&&(gl(a,s,d),br(a,d))}function t3(a){var s=a.memoizedState,d=0;s!==null&&(d=s.retryLane),Y1(a,d)}function r3(a,s){var d=0;switch(a.tag){case 13:var p=a.stateNode,x=a.memoizedState;x!==null&&(d=x.retryLane);break;case 19:p=a.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(s),Y1(a,d)}var X1;X1=function(a,s,d){if(a!==null)if(a.memoizedProps!==s.pendingProps||gr.current)yr=!0;else{if((a.lanes&d)===0&&(s.flags&128)===0)return yr=!1,H4(a,s,d);yr=(a.flags&131072)!==0}else yr=!1,ut&&(s.flags&1048576)!==0&&Ob(s,zc,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;ed(a,s),a=s.pendingProps;var x=zo(s,er.current);Ko(s,d),x=mp(null,s,p,a,x,d);var w=pp();return s.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vr(p)?(w=!0,Rc(s)):w=!1,s.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,sp(s),x.updater=Zc,s.stateNode=x,x._reactInternals=s,wp(s,p,a,d),s=Np(null,s,p,!0,w,d)):(s.tag=0,ut&&w&&Xm(s),ur(null,s,x,d),s=s.child),s;case 16:p=s.elementType;e:{switch(ed(a,s),a=s.pendingProps,x=p._init,p=x(p._payload),s.type=p,x=s.tag=i3(p),a=cn(p,a),x){case 0:s=Sp(null,s,p,a,d);break e;case 1:s=j1(null,s,p,a,d);break e;case 11:s=y1(null,s,p,a,d);break e;case 14:s=x1(null,s,p,cn(p.type,a),d);break e}throw Error(r(306,p,""))}return s;case 0:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:cn(p,x),Sp(a,s,p,x,d);case 1:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:cn(p,x),j1(a,s,p,x,d);case 3:e:{if(S1(s),a===null)throw Error(r(387));p=s.pendingProps,w=s.memoizedState,x=w.element,zb(a,s),Kc(s,p,null,d);var C=s.memoizedState;if(p=C.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){x=Vo(Error(r(423)),s),s=N1(a,s,p,d,x);break e}else if(p!==x){x=Vo(Error(r(424)),s),s=N1(a,s,p,d,x);break e}else for(_r=Di(s.stateNode.containerInfo.firstChild),Or=s,ut=!0,un=null,d=Lb(s,null,p,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Uo(),p===x){s=ei(a,s,d);break e}ur(a,s,p,d)}s=s.child}return s;case 5:return Ub(s),a===null&&ep(s),p=s.type,x=s.pendingProps,w=a!==null?a.memoizedProps:null,C=x.children,Km(p,x)?C=null:w!==null&&Km(p,w)&&(s.flags|=32),k1(a,s),ur(a,s,C,d),s.child;case 6:return a===null&&ep(s),null;case 13:return E1(a,s,d);case 4:return lp(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=Ho(s,null,p,d):ur(a,s,p,d),s.child;case 11:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:cn(p,x),y1(a,s,p,x,d);case 7:return ur(a,s,s.pendingProps,d),s.child;case 8:return ur(a,s,s.pendingProps.children,d),s.child;case 12:return ur(a,s,s.pendingProps.children,d),s.child;case 10:e:{if(p=s.type._context,x=s.pendingProps,w=s.memoizedProps,C=x.value,tt(Uc,p._currentValue),p._currentValue=C,w!==null)if(ln(w.value,C)){if(w.children===x.children&&!gr.current){s=ei(a,s,d);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var D=w.dependencies;if(D!==null){C=w.child;for(var R=D.firstContext;R!==null;){if(R.context===p){if(w.tag===1){R=Jn(-1,d&-d),R.tag=2;var Y=w.updateQueue;if(Y!==null){Y=Y.shared;var ce=Y.pending;ce===null?R.next=R:(R.next=ce.next,ce.next=R),Y.pending=R}}w.lanes|=d,R=w.alternate,R!==null&&(R.lanes|=d),ap(w.return,d,s),D.lanes|=d;break}R=R.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(r(341));C.lanes|=d,D=C.alternate,D!==null&&(D.lanes|=d),ap(C,d,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}ur(a,s,x.children,d),s=s.child}return s;case 9:return x=s.type,p=s.pendingProps.children,Ko(s,d),x=Hr(x),p=p(x),s.flags|=1,ur(a,s,p,d),s.child;case 14:return p=s.type,x=cn(p,s.pendingProps),x=cn(p.type,x),x1(a,s,p,x,d);case 15:return b1(a,s,s.type,s.pendingProps,d);case 17:return p=s.type,x=s.pendingProps,x=s.elementType===p?x:cn(p,x),ed(a,s),s.tag=1,vr(p)?(a=!0,Rc(s)):a=!1,Ko(s,d),d1(s,p,x),wp(s,p,x,d),Np(null,s,p,!0,a,d);case 19:return C1(a,s,d);case 22:return w1(a,s,d)}throw Error(r(156,s.tag))};function Z1(a,s){return _x(a,s)}function n3(a,s,d,p){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gr(a,s,d,p){return new n3(a,s,d,p)}function Kp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function i3(a){if(typeof a=="function")return Kp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===U)return 11;if(a===pe)return 14}return 2}function Gi(a,s){var d=a.alternate;return d===null?(d=Gr(a.tag,s,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=s,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,s=a.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function dd(a,s,d,p,x,w){var C=2;if(p=a,typeof a=="function")Kp(a)&&(C=1);else if(typeof a=="string")C=5;else e:switch(a){case T:return Da(d.children,x,w,s);case B:C=8,x|=8;break;case $:return a=Gr(12,d,s,x|2),a.elementType=$,a.lanes=w,a;case ve:return a=Gr(13,d,s,x),a.elementType=ve,a.lanes=w,a;case ue:return a=Gr(19,d,s,x),a.elementType=ue,a.lanes=w,a;case se:return fd(d,x,w,s);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case z:C=10;break e;case Q:C=9;break e;case U:C=11;break e;case pe:C=14;break e;case oe:C=16,p=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return s=Gr(C,d,s,x),s.elementType=a,s.type=p,s.lanes=w,s}function Da(a,s,d,p){return a=Gr(7,a,p,s),a.lanes=d,a}function fd(a,s,d,p){return a=Gr(22,a,p,s),a.elementType=se,a.lanes=d,a.stateNode={isHidden:!1},a}function Gp(a,s,d){return a=Gr(6,a,null,s),a.lanes=d,a}function Vp(a,s,d){return s=Gr(4,a.children!==null?a.children:[],a.key,s),s.lanes=d,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}function a3(a,s,d,p,x){this.tag=s,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bm(0),this.expirationTimes=bm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bm(0),this.identifierPrefix=p,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function qp(a,s,d,p,x,w,C,D,R){return a=new a3(a,s,d,D,R),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Gr(3,null,null,s),a.current=w,w.stateNode=a,w.memoizedState={element:p,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},sp(w),a}function o3(a,s,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:p==null?null:""+p,children:a,containerInfo:s,implementation:d}}function J1(a){if(!a)return Li;a=a._reactInternals;e:{if(ja(a)!==a||a.tag!==1)throw Error(r(170));var s=a;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(vr(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(a.tag===1){var d=a.type;if(vr(d))return Ab(a,d,s)}return s}function ew(a,s,d,p,x,w,C,D,R){return a=qp(d,p,!0,a,x,w,C,D,R),a.context=J1(null),d=a.current,p=cr(),x=Wi(d),w=Jn(p,x),w.callback=s??null,Fi(d,w,x),a.current.lanes=x,gl(a,x,p),br(a,p),a}function hd(a,s,d,p){var x=s.current,w=cr(),C=Wi(x);return d=J1(d),s.context===null?s.context=d:s.pendingContext=d,s=Jn(w,C),s.payload={element:a},p=p===void 0?null:p,p!==null&&(s.callback=p),a=Fi(x,s,C),a!==null&&(hn(a,x,C,w),Wc(a,x,C)),C}function md(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function tw(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<s?d:s}}function Qp(a,s){tw(a,s),(a=a.alternate)&&tw(a,s)}function s3(){return null}var rw=typeof reportError=="function"?reportError:function(a){console.error(a)};function Yp(a){this._internalRoot=a}pd.prototype.render=Yp.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));hd(a,s,null,null)},pd.prototype.unmount=Yp.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;Ma(function(){hd(null,a,null,null)}),s[qn]=null}};function pd(a){this._internalRoot=a}pd.prototype.unstable_scheduleHydration=function(a){if(a){var s=zx();a={blockedOn:null,target:a,priority:s};for(var d=0;d<Mi.length&&s!==0&&s<Mi[d].priority;d++);Mi.splice(d,0,a),d===0&&Ux(a)}};function Xp(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function gd(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function nw(){}function l3(a,s,d,p,x){if(x){if(typeof p=="function"){var w=p;p=function(){var Y=md(C);w.call(Y)}}var C=ew(s,p,a,0,null,!1,!1,"",nw);return a._reactRootContainer=C,a[qn]=C.current,Ol(a.nodeType===8?a.parentNode:a),Ma(),C}for(;x=a.lastChild;)a.removeChild(x);if(typeof p=="function"){var D=p;p=function(){var Y=md(R);D.call(Y)}}var R=qp(a,0,!1,null,null,!1,!1,"",nw);return a._reactRootContainer=R,a[qn]=R.current,Ol(a.nodeType===8?a.parentNode:a),Ma(function(){hd(s,R,d,p)}),R}function vd(a,s,d,p,x){var w=d._reactRootContainer;if(w){var C=w;if(typeof x=="function"){var D=x;x=function(){var R=md(C);D.call(R)}}hd(s,C,a,x)}else C=l3(d,s,a,x,p);return md(C)}Lx=function(a){switch(a.tag){case 3:var s=a.stateNode;if(s.current.memoizedState.isDehydrated){var d=pl(s.pendingLanes);d!==0&&(wm(s,d|1),br(s,bt()),(qe&6)===0&&(Yo=bt()+500,$i()))}break;case 13:Ma(function(){var p=Zn(a,1);if(p!==null){var x=cr();hn(p,a,1,x)}}),Qp(a,1)}},km=function(a){if(a.tag===13){var s=Zn(a,134217728);if(s!==null){var d=cr();hn(s,a,134217728,d)}Qp(a,134217728)}},$x=function(a){if(a.tag===13){var s=Wi(a),d=Zn(a,s);if(d!==null){var p=cr();hn(d,a,s,p)}Qp(a,s)}},zx=function(){return Je},Fx=function(a,s){var d=Je;try{return Je=a,s()}finally{Je=d}},mm=function(a,s,d){switch(s){case"input":if(Jt(a,d),s=d.name,d.type==="radio"&&s!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<d.length;s++){var p=d[s];if(p!==a&&p.form===a.form){var x=Tc(p);if(!x)throw Error(r(90));de(p),Jt(p,x)}}}break;case"textarea":Le(a,d);break;case"select":s=d.value,s!=null&&Ve(a,!!d.multiple,s,!1)}},Sx=Up,Nx=Ma;var u3={usingClientEntryPoint:!1,Events:[Il,Lo,Tc,kx,jx,Up]},Vl={findFiberByHostInstance:Sa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},c3={bundleType:Vl.bundleType,version:Vl.version,rendererPackageName:Vl.rendererPackageName,rendererConfig:Vl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=Px(a),a===null?null:a.stateNode},findFiberByHostInstance:Vl.findFiberByHostInstance||s3,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 yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yd.isDisabled&&yd.supportsFiber)try{pc=yd.inject(c3),jn=yd}catch{}}return wr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=u3,wr.createPortal=function(a,s){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xp(s))throw Error(r(200));return o3(a,s,null,d)},wr.createRoot=function(a,s){if(!Xp(a))throw Error(r(299));var d=!1,p="",x=rw;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(x=s.onRecoverableError)),s=qp(a,1,!1,null,null,d,!1,p,x),a[qn]=s.current,Ol(a.nodeType===8?a.parentNode:a),new Yp(s)},wr.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=Px(s),a=a===null?null:a.stateNode,a},wr.flushSync=function(a){return Ma(a)},wr.hydrate=function(a,s,d){if(!gd(s))throw Error(r(200));return vd(null,a,s,!0,d)},wr.hydrateRoot=function(a,s,d){if(!Xp(a))throw Error(r(405));var p=d!=null&&d.hydratedSources||null,x=!1,w="",C=rw;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(C=d.onRecoverableError)),s=ew(s,null,a,1,d??null,x,!1,w,C),a[qn]=s.current,Ol(a),p)for(a=0;a<p.length;a++)d=p[a],x=d._getVersion,x=x(d._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[d,x]:s.mutableSourceEagerHydrationData.push(d,x);return new pd(s)},wr.render=function(a,s,d){if(!gd(s))throw Error(r(200));return vd(null,a,s,!1,d)},wr.unmountComponentAtNode=function(a){if(!gd(a))throw Error(r(40));return a._reactRootContainer?(Ma(function(){vd(null,null,a,!1,function(){a._reactRootContainer=null,a[qn]=null})}),!0):!1},wr.unstable_batchedUpdates=Up,wr.unstable_renderSubtreeIntoContainer=function(a,s,d,p){if(!gd(d))throw Error(r(200));if(a==null||a._reactInternals===void 0)throw Error(r(38));return vd(a,s,d,!1,p)},wr.version="18.3.1-next-f1338f8080-20240426",wr}var fw;function NN(){if(fw)return tg.exports;fw=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(),tg.exports=b3(),tg.exports}var hw;function w3(){if(hw)return bd;hw=1;var e=NN();return bd.createRoot=e.createRoot,bd.hydrateRoot=e.hydrateRoot,bd}var k3=w3();const j3=j0(k3);var Ku=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(){}},Ja,ra,ks,pN,S3=(pN=class extends Ku{constructor(){super();De(this,Ja);De(this,ra);De(this,ks);be(this,ks,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,ra)||this.setEventListener(L(this,ks))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ra))==null||t.call(this),be(this,ra,void 0))}setEventListener(t){var r;be(this,ks,t),(r=L(this,ra))==null||r.call(this),be(this,ra,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,Ja)!==t&&(be(this,Ja,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,Ja)=="boolean"?L(this,Ja):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ja=new WeakMap,ra=new WeakMap,ks=new WeakMap,pN),N0=new S3,N3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},na,k0,gN,E3=(gN=class{constructor(){De(this,na,N3);De(this,k0,!1)}setTimeoutProvider(e){be(this,na,e)}setTimeout(e,t){return L(this,na).setTimeout(e,t)}clearTimeout(e){L(this,na).clearTimeout(e)}setInterval(e,t){return L(this,na).setInterval(e,t)}clearInterval(e){L(this,na).clearInterval(e)}},na=new WeakMap,k0=new WeakMap,gN),Ga=new E3;function A3(e){setTimeout(e,0)}var C3=typeof window>"u"||"Deno"in globalThis;function jr(){}function P3(e,t){return typeof e=="function"?e(t):e}function Yg(e){return typeof e=="number"&&e>=0&&e!==1/0}function EN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function da(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function mw(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:u,stale:c}=e;if(u){if(n){if(t.queryHash!==E0(u,t.options))return!1}else if(!yu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function pw(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(vu(t.options.mutationKey)!==vu(o))return!1}else if(!yu(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function E0(e,t){return((t==null?void 0:t.queryKeyHashFn)||vu)(e)}function vu(e){return JSON.stringify(e,(t,r)=>Zg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function yu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>yu(e[r],t[r])):!1}var O3=Object.prototype.hasOwnProperty;function AN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=gw(e)&&gw(t);if(!n&&!(Zg(e)&&Zg(t)))return t;const o=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),c=u.length,f=n?new Array(c):{};let h=0;for(let m=0;m<c;m++){const g=n?m:u[m],v=e[g],b=t[g];if(v===b){f[g]=v,(n?m<o:O3.call(e,g))&&h++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){f[g]=b;continue}const j=AN(v,b,r+1);f[g]=j,j===v&&h++}return o===c&&h===o?e:f}function Xg(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 gw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zg(e){if(!vw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!vw(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vw(e){return Object.prototype.toString.call(e)==="[object Object]"}function _3(e){return new Promise(t=>{Ga.setTimeout(t,e)})}function Jg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?AN(e,t):t}function M3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function I3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var A0=Symbol();function CN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===A0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function PN(e,t){return typeof e=="function"?e(...t):!!e}function T3(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var xu=(()=>{let e=()=>C3;return{isServer(){return e()},setIsServer(t){e=t}}})();function ev(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var D3=A3;function R3(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=D3;const o=c=>{t?e.push(c):i(()=>{r(c)})},u=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||u()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var Vt=R3(),js,ia,Ss,vN,L3=(vN=class extends Ku{constructor(){super();De(this,js,!0);De(this,ia);De(this,Ss);be(this,Ss,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,ia)||this.setEventListener(L(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ia))==null||t.call(this),be(this,ia,void 0))}setEventListener(t){var r;be(this,Ss,t),(r=L(this,ia))==null||r.call(this),be(this,ia,t(this.setOnline.bind(this)))}setOnline(t){L(this,js)!==t&&(be(this,js,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,js)}},js=new WeakMap,ia=new WeakMap,Ss=new WeakMap,vN),af=new L3;function $3(e){return Math.min(1e3*2**e,3e4)}function ON(e){return(e??"online")==="online"?af.isOnline():!0}var tv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _N(e){let t=!1,r=0,n;const i=ev(),o=()=>i.status!=="pending",u=k=>{var S;if(!o()){const N=new tv(k);v(N),(S=e.onCancel)==null||S.call(e,N)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>N0.isFocused()&&(e.networkMode==="always"||af.isOnline())&&e.canRun(),m=()=>ON(e.networkMode)&&e.canRun(),g=k=>{o()||(n==null||n(),i.resolve(k))},v=k=>{o()||(n==null||n(),i.reject(k))},b=()=>new Promise(k=>{var S;n=N=>{(o()||h())&&k(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;n=void 0,o()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(o())return;let k;const S=r===0?e.initialPromise:void 0;try{k=S??e.fn()}catch(N){k=Promise.reject(N)}Promise.resolve(k).then(g).catch(N=>{var O;if(o())return;const E=e.retry??(xu.isServer()?0:3),A=e.retryDelay??$3,P=typeof A=="function"?A(r,N):A,_=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,N);if(t||!_){v(N);return}r++,(O=e.onFail)==null||O.call(e,r,N),_3(P).then(()=>h()?void 0:b()).then(()=>{t?v(N):j()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?j():b().then(j),i)}}var eo,yN,MN=(yN=class{constructor(){De(this,eo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yg(this.gcTime)&&be(this,eo,Ga.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,eo)!==void 0&&(Ga.clearTimeout(L(this,eo)),be(this,eo,void 0))}},eo=new WeakMap,yN);function z3(e){return{onFetch:(t,r)=>{var m,g,v,b,j;const n=t.options,i=(v=(g=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=A=>{T3(A,()=>t.signal,()=>k=!0)},N=CN(t.options,t.fetchOptions),E=async(A,P,_)=>{if(k)return Promise.reject(t.signal.reason);if(P==null&&A.pages.length)return Promise.resolve(A);const T=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:P,direction:_?"backward":"forward",meta:t.options.meta};return S(Q),Q})(),B=await N(T),{maxPages:$}=t.options,z=_?I3:M3;return{pages:z(A.pages,B,$),pageParams:z(A.pageParams,P,$)}};if(i&&o.length){const A=i==="backward",P=A?F3:yw,_={pages:o,pageParams:u},O=P(n,_);c=await E(_,O,A)}else{const A=e??o.length;do{const P=f===0?u[0]??n.initialPageParam:yw(n,c);if(f>0&&P==null)break;c=await E(c,P),f++}while(f<A)}return c};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 yw(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 F3(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 Ns,to,Es,qr,ro,Dt,Fu,no,Tr,IN,ii,xN,B3=(xN=class extends MN{constructor(t){super();De(this,Tr);De(this,Ns);De(this,to);De(this,Es);De(this,qr);De(this,ro);De(this,Dt);De(this,Fu);De(this,no);be(this,no,!1),be(this,Fu,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,ro,t.client),be(this,qr,L(this,ro).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,to,bw(this.options)),this.state=t.state??L(this,to),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,Ns)}get promise(){var t;return(t=L(this,Dt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,Fu),...t},t!=null&&t._type&&be(this,Ns,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=bw(this.options);r.data!==void 0&&(this.setState(xw(r.data,r.dataUpdatedAt)),be(this,to,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,qr).remove(this)}setData(t,r){const n=Jg(this.state.data,t,this.options);return He(this,Tr,ii).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){He(this,Tr,ii).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=L(this,Dt))==null?void 0:n.promise;return(i=L(this,Dt))==null||i.cancel(t),r?r.then(jr).catch(jr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,to)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Dr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===A0||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>da(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,Dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,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,Dt)&&(L(this,no)||He(this,Tr,IN).call(this)?L(this,Dt).cancel({revert:!0}):L(this,Dt).cancelRetry()),this.scheduleGc()),L(this,qr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,Tr,ii).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,g,v,b,j,k,S,N,E,A;if(this.state.fetchStatus!=="idle"&&((h=L(this,Dt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,Dt))return L(this,Dt).continueRetry(),L(this,Dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(_=>_.options.queryFn);P&&this.setOptions(P.options)}const n=new AbortController,i=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(be(this,no,!0),n.signal)})},o=()=>{const P=CN(this.options,r),O=(()=>{const T={client:L(this,ro),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return be(this,no,!1),this.options.persister?this.options.persister(P,O,this):P(O)},c=(()=>{const P={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,ro),state:this.state,fetchFn:o};return i(P),P})(),f=L(this,Ns)==="infinite"?z3(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),be(this,Es,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&He(this,Tr,ii).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta}),be(this,Dt,_N({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:P=>{P instanceof tv&&P.revert&&this.setState({...L(this,Es),fetchStatus:"idle"}),n.abort()},onFail:(P,_)=>{He(this,Tr,ii).call(this,{type:"failed",failureCount:P,error:_})},onPause:()=>{He(this,Tr,ii).call(this,{type:"pause"})},onContinue:()=>{He(this,Tr,ii).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const P=await L(this,Dt).start();if(P===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(P),(b=(v=L(this,qr).config).onSuccess)==null||b.call(v,P,this),(k=(j=L(this,qr).config).onSettled)==null||k.call(j,P,this.state.error,this),P}catch(P){if(P instanceof tv){if(P.silent)return L(this,Dt).promise;if(P.revert){if(this.state.data===void 0)throw P;return this.state.data}}throw He(this,Tr,ii).call(this,{type:"error",error:P}),(N=(S=L(this,qr).config).onError)==null||N.call(S,P,this),(A=(E=L(this,qr).config).onSettled)==null||A.call(E,this.state.data,P,this),P}finally{this.scheduleGc()}}},Ns=new WeakMap,to=new WeakMap,Es=new WeakMap,qr=new WeakMap,ro=new WeakMap,Dt=new WeakMap,Fu=new WeakMap,no=new WeakMap,Tr=new WeakSet,IN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ii=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,...TN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...xw(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return be(this,Es,t.manual?i:void 0),i;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),Vt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,qr).notify({query:this,type:"updated",action:t})})},xN);function TN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ON(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function bw(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 kr,Ke,Bu,dr,io,As,oi,aa,Uu,Cs,Ps,ao,oo,oa,Os,Xe,uu,rv,nv,iv,av,ov,sv,lv,DN,bN,U3=(bN=class extends Ku{constructor(t,r){super();De(this,Xe);De(this,kr);De(this,Ke);De(this,Bu);De(this,dr);De(this,io);De(this,As);De(this,oi);De(this,aa);De(this,Uu);De(this,Cs);De(this,Ps);De(this,ao);De(this,oo);De(this,oa);De(this,Os,new Set);this.options=r,be(this,kr,t),be(this,aa,null),be(this,oi,ev()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ke).addObserver(this),ww(L(this,Ke),this.options)?He(this,Xe,uu).call(this):this.updateResult(),He(this,Xe,av).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return uv(L(this,Ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return uv(L(this,Ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,Xe,ov).call(this),He(this,Xe,sv).call(this),L(this,Ke).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,Ke);if(this.options=L(this,kr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dr(this.options.enabled,L(this,Ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,Xe,lv).call(this),L(this,Ke).setOptions(this.options),r._defaulted&&!Xg(this.options,r)&&L(this,kr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ke),observer:this});const i=this.hasListeners();i&&kw(L(this,Ke),n,this.options,r)&&He(this,Xe,uu).call(this),this.updateResult(),i&&(L(this,Ke)!==n||Dr(this.options.enabled,L(this,Ke))!==Dr(r.enabled,L(this,Ke))||da(this.options.staleTime,L(this,Ke))!==da(r.staleTime,L(this,Ke)))&&He(this,Xe,rv).call(this);const o=He(this,Xe,nv).call(this);i&&(L(this,Ke)!==n||Dr(this.options.enabled,L(this,Ke))!==Dr(r.enabled,L(this,Ke))||o!==L(this,oa))&&He(this,Xe,iv).call(this,o)}getOptimisticResult(t){const r=L(this,kr).getQueryCache().build(L(this,kr),t),n=this.createResult(r,t);return W3(this,n)&&(be(this,dr,n),be(this,As,this.options),be(this,io,L(this,Ke).state)),n}getCurrentResult(){return L(this,dr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,oi).status==="pending"&&L(this,oi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){L(this,Os).add(t)}getCurrentQuery(){return L(this,Ke)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,kr).defaultQueryOptions(t),n=L(this,kr).getQueryCache().build(L(this,kr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return He(this,Xe,uu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,dr)))}createResult(t,r){var $;const n=L(this,Ke),i=this.options,o=L(this,dr),u=L(this,io),c=L(this,As),h=t!==n?t.state:L(this,Bu),{state:m}=t;let g={...m},v=!1,b;if(r._optimisticResults){const z=this.hasListeners(),Q=!z&&ww(t,r),U=z&&kw(t,n,r,i);(Q||U)&&(g={...g,...TN(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let z;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(z=o.data,N=!0):z=typeof r.placeholderData=="function"?r.placeholderData(($=L(this,Ps))==null?void 0:$.state.data,L(this,Ps)):r.placeholderData,z!==void 0&&(S="success",b=Jg(o==null?void 0:o.data,z,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(u==null?void 0:u.data)&&r.select===L(this,Uu))b=L(this,Cs);else try{be(this,Uu,r.select),b=r.select(b),b=Jg(o==null?void 0:o.data,b,r),be(this,Cs,b),be(this,aa,null)}catch(z){be(this,aa,z)}L(this,aa)&&(j=L(this,aa),b=L(this,Cs),k=Date.now(),S="error");const E=g.fetchStatus==="fetching",A=S==="pending",P=S==="error",_=A&&E,O=b!==void 0,B={status:S,fetchStatus:g.fetchStatus,isPending:A,isSuccess:S==="success",isError:P,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:P&&!O,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:P&&O,isStale:C0(t,r),refetch:this.refetch,promise:L(this,oi),isEnabled:Dr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=B.data!==void 0,Q=B.status==="error"&&!z,U=pe=>{Q?pe.reject(B.error):z&&pe.resolve(B.data)},ve=()=>{const pe=be(this,oi,B.promise=ev());U(pe)},ue=L(this,oi);switch(ue.status){case"pending":t.queryHash===n.queryHash&&U(ue);break;case"fulfilled":(Q||B.data!==ue.value)&&ve();break;case"rejected":(!Q||B.error!==ue.reason)&&ve();break}}return B}updateResult(){const t=L(this,dr),r=this.createResult(L(this,Ke),this.options);if(be(this,io,L(this,Ke).state),be(this,As,this.options),L(this,io).data!==void 0&&be(this,Ps,L(this,Ke)),Xg(r,t))return;be(this,dr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!L(this,Os).size)return!0;const u=new Set(o??L(this,Os));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,dr)).some(c=>{const f=c;return L(this,dr)[f]!==t[f]&&u.has(f)})};He(this,Xe,DN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,Xe,av).call(this)}},kr=new WeakMap,Ke=new WeakMap,Bu=new WeakMap,dr=new WeakMap,io=new WeakMap,As=new WeakMap,oi=new WeakMap,aa=new WeakMap,Uu=new WeakMap,Cs=new WeakMap,Ps=new WeakMap,ao=new WeakMap,oo=new WeakMap,oa=new WeakMap,Os=new WeakMap,Xe=new WeakSet,uu=function(t){He(this,Xe,lv).call(this);let r=L(this,Ke).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jr)),r},rv=function(){He(this,Xe,ov).call(this);const t=da(this.options.staleTime,L(this,Ke));if(xu.isServer()||L(this,dr).isStale||!Yg(t))return;const n=EN(L(this,dr).dataUpdatedAt,t)+1;be(this,ao,Ga.setTimeout(()=>{L(this,dr).isStale||this.updateResult()},n))},nv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ke)):this.options.refetchInterval)??!1},iv=function(t){He(this,Xe,sv).call(this),be(this,oa,t),!(xu.isServer()||Dr(this.options.enabled,L(this,Ke))===!1||!Yg(L(this,oa))||L(this,oa)===0)&&be(this,oo,Ga.setInterval(()=>{(this.options.refetchIntervalInBackground||N0.isFocused())&&He(this,Xe,uu).call(this)},L(this,oa)))},av=function(){He(this,Xe,rv).call(this),He(this,Xe,iv).call(this,He(this,Xe,nv).call(this))},ov=function(){L(this,ao)!==void 0&&(Ga.clearTimeout(L(this,ao)),be(this,ao,void 0))},sv=function(){L(this,oo)!==void 0&&(Ga.clearInterval(L(this,oo)),be(this,oo,void 0))},lv=function(){const t=L(this,kr).getQueryCache().build(L(this,kr),this.options);if(t===L(this,Ke))return;const r=L(this,Ke);be(this,Ke,t),be(this,Bu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},DN=function(t){Vt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,dr))}),L(this,kr).getQueryCache().notify({query:L(this,Ke),type:"observerResultsUpdated"})})},bN);function H3(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Dr(t.retryOnMount,e)===!1)}function ww(e,t){return H3(e,t)||e.state.data!==void 0&&uv(e,t,t.refetchOnMount)}function uv(e,t,r){if(Dr(t.enabled,e)!==!1&&da(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&C0(e,t)}return!1}function kw(e,t,r,n){return(e!==t||Dr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&C0(e,r)}function C0(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(da(t.staleTime,e))}function W3(e,t){return!Xg(e.getCurrentResult(),t)}var Hu,Mn,ir,so,In,Xi,wN,K3=(wN=class extends MN{constructor(t){super();De(this,In);De(this,Hu);De(this,Mn);De(this,ir);De(this,so);be(this,Hu,t.client),this.mutationId=t.mutationId,be(this,ir,t.mutationCache),be(this,Mn,[]),this.state=t.state||G3(),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,Mn).includes(t)||(L(this,Mn).push(t),this.clearGcTimeout(),L(this,ir).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,Mn,L(this,Mn).filter(r=>r!==t)),this.scheduleGc(),L(this,ir).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Mn).length||(this.state.status==="pending"?this.scheduleGc():L(this,ir).remove(this))}continue(){var t;return((t=L(this,so))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,T;const r=()=>{He(this,In,Xi).call(this,{type:"continue"})},n={client:L(this,Hu),meta:this.options.meta,mutationKey:this.options.mutationKey};be(this,so,_N({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,$)=>{He(this,In,Xi).call(this,{type:"failed",failureCount:B,error:$})},onPause:()=>{He(this,In,Xi).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 i=this.state.status==="pending",o=!L(this,so).canStart();try{if(i)r();else{He(this,In,Xi).call(this,{type:"pending",variables:t,isPaused:o}),L(this,ir).config.onMutate&&await L(this,ir).config.onMutate(t,this,n);const $=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,n));$!==this.state.context&&He(this,In,Xi).call(this,{type:"pending",context:$,variables:t,isPaused:o})}const B=await L(this,so).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=(m=this.options).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,n)),await((b=(v=L(this,ir).config).onSettled)==null?void 0:b.call(v,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)),He(this,In,Xi).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($){Promise.reject($)}try{await((A=(E=this.options).onError)==null?void 0:A.call(E,B,t,this.state.context,n))}catch($){Promise.reject($)}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($){Promise.reject($)}try{await((T=(O=this.options).onSettled)==null?void 0:T.call(O,void 0,B,t,this.state.context,n))}catch($){Promise.reject($)}throw He(this,In,Xi).call(this,{type:"error",error:B}),B}finally{L(this,ir).runNext(this)}}},Hu=new WeakMap,Mn=new WeakMap,ir=new WeakMap,so=new WeakMap,In=new WeakSet,Xi=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),Vt.batch(()=>{L(this,Mn).forEach(n=>{n.onMutationUpdate(t)}),L(this,ir).notify({mutation:this,type:"updated",action:t})})},wN);function G3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var si,pn,Wu,kN,V3=(kN=class extends Ku{constructor(t={}){super();De(this,si);De(this,pn);De(this,Wu);this.config=t,be(this,si,new Set),be(this,pn,new Map),be(this,Wu,0)}build(t,r,n){const i=new K3({client:t,mutationCache:this,mutationId:++xd(this,Wu)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){L(this,si).add(t);const r=wd(t);if(typeof r=="string"){const n=L(this,pn).get(r);n?n.push(t):L(this,pn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,si).delete(t)){const r=wd(t);if(typeof r=="string"){const n=L(this,pn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&L(this,pn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=wd(t);if(typeof r=="string"){const n=L(this,pn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=wd(t);if(typeof r=="string"){const i=(n=L(this,pn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Vt.batch(()=>{L(this,si).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,si).clear(),L(this,pn).clear()})}getAll(){return Array.from(L(this,si))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>pw(r,n))}findAll(t={}){return this.getAll().filter(r=>pw(t,r))}notify(t){Vt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Vt.batch(()=>Promise.all(t.map(r=>r.continue().catch(jr))))}},si=new WeakMap,pn=new WeakMap,Wu=new WeakMap,kN);function wd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Tn,jN,q3=(jN=class extends Ku{constructor(t={}){super();De(this,Tn);this.config=t,be(this,Tn,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??E0(i,r);let u=this.get(o);return u||(u=new B3({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){L(this,Tn).has(t.queryHash)||(L(this,Tn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,Tn).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,Tn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,Tn).get(t)}getAll(){return[...L(this,Tn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>mw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>mw(t,n)):r}notify(t){Vt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Tn=new WeakMap,jN),gt,sa,la,_s,Ms,ua,Is,Ts,SN,Q3=(SN=class{constructor(e={}){De(this,gt);De(this,sa);De(this,la);De(this,_s);De(this,Ms);De(this,ua);De(this,Is);De(this,Ts);be(this,gt,e.queryCache||new q3),be(this,sa,e.mutationCache||new V3),be(this,la,e.defaultOptions||{}),be(this,_s,new Map),be(this,Ms,new Map),be(this,ua,0)}mount(){xd(this,ua)._++,L(this,ua)===1&&(be(this,Is,N0.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,gt).onFocus())})),be(this,Ts,af.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,gt).onOnline())})))}unmount(){var e,t;xd(this,ua)._--,L(this,ua)===0&&((e=L(this,Is))==null||e.call(this),be(this,Is,void 0),(t=L(this,Ts))==null||t.call(this),be(this,Ts,void 0))}isFetching(e){return L(this,gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,sa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,gt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,gt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(da(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,gt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=L(this,gt).get(n.queryHash),o=i==null?void 0:i.state.data,u=P3(t,o);if(u!==void 0)return L(this,gt).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Vt.batch(()=>L(this,gt).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,gt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,gt);Vt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,gt);return Vt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Vt.batch(()=>L(this,gt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(jr).catch(jr)}invalidateQueries(e,t={}){return Vt.batch(()=>(L(this,gt).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=Vt.batch(()=>L(this,gt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(jr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(jr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,gt).build(this,t);return r.isStaleByTime(da(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jr).catch(jr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jr).catch(jr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return af.isOnline()?L(this,sa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,gt)}getMutationCache(){return L(this,sa)}getDefaultOptions(){return L(this,la)}setDefaultOptions(e){be(this,la,e)}setQueryDefaults(e,t){L(this,_s).set(vu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,_s).values()],r={};return t.forEach(n=>{yu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Ms).set(vu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Ms).values()],r={};return t.forEach(n=>{yu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,la).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=E0(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===A0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,la).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,gt).clear(),L(this,sa).clear()}},gt=new WeakMap,sa=new WeakMap,la=new WeakMap,_s=new WeakMap,Ms=new WeakMap,ua=new WeakMap,Is=new WeakMap,Ts=new WeakMap,SN),RN=y.createContext(void 0),Kn=e=>{const t=y.useContext(RN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Y3=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(RN.Provider,{value:e,children:t})),LN=y.createContext(!1),X3=()=>y.useContext(LN);LN.Provider;function Z3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var J3=y.createContext(Z3()),eM=()=>y.useContext(J3),tM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?PN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},rM=e=>{y.useEffect(()=>{e.clearReset()},[e])},nM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||PN(r,[e.error,n])),iM=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},aM=(e,t)=>e.isLoading&&e.isFetching&&!t,oM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,jw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function sM(e,t,r){var b,j,k,S;const n=X3(),i=eM(),o=Kn(),u=o.defaultQueryOptions(e);(j=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,u);const c=o.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,iM(u),tM(u,i,c),rM(i);const h=!o.getQueryCache().get(u.queryHash),[m]=y.useState(()=>new t(o,u)),g=m.getOptimisticResult(u),v=!n&&f;if(y.useSyncExternalStore(y.useCallback(N=>{const E=v?m.subscribe(Vt.batchCalls(N)):jr;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(u)},[u,m]),oM(u,g))throw jw(u,m,i);if(nM({result:g,errorResetBoundary:i,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw g.error;if((S=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,u,g),u.experimental_prefetchInRender&&!xu.isServer()&&aM(g,n)){const N=h?jw(u,m,i):c==null?void 0:c.promise;N==null||N.catch(jr).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function $t(e,t){return sM(e,U3)}/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$N=(...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 uM={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 cM=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:u,...c},f)=>y.createElement("svg",{ref:f,...uM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:$N("lucide",i),...c},[...u.map(([h,m])=>y.createElement(h,m)),...Array.isArray(o)?o:[o]]));/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const he=(e,t)=>{const r=y.forwardRef(({className:n,...i},o)=>y.createElement(cM,{ref:o,iconNode:t,className:$N(`lucide-${lM(e)}`,n),...i}));return r.displayName=`${e}`,r};/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const uh=he("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 dM=he("AppWindow",[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]);/**
|
||
* @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=he("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const of=he("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 fM=he("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 FN=he("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const cv=he("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 hM=he("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Jr=he("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 mM=he("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 sf=he("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 pM=he("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gM=he("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xa=he("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 vM=he("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 Qt=he("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 BN=he("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 yM=he("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 Gu=he("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 UN=he("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 xM=he("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const HN=he("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 bM=he("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 wM=he("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 WN=he("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 kM=he("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ds=he("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 jM=he("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 dv=he("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 SM=he("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 fv=he("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 pi=he("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 NM=he("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 Rs=he("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 ch=he("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 Sw=he("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 bu=he("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 EM=he("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 AM=he("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const CM=he("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 KN=he("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 PM=he("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const OM=he("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 fa=he("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 GN=he("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _M=he("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Nw=he("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 MM=he("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 IM=he("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 VN=he("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 TM=he("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 DM=he("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 RM=he("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 LM=he("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 Qs=he("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 qN=he("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 $M=he("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const zM=he("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 FM=he("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ew=he("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 BM=he("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 Aw=he("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const QN=he("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 wu=he("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 hv=he("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 UM=he("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["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 YN=he("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 HM=he("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 gs=he("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 WM=he("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const KM=he("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["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 GM=he("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 dh=he("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 VM=he("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 fh=he("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 qM=he("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 XN=he("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 ZN=he("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const QM=he("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ys=he("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 JN=he("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const YM=he("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const XM=he("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const hs=he("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 lf=he("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 ZM=he("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 JM=he("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/**
|
||
* @license lucide-react v0.460.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const e5=he("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 uf=he("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 Er=he("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 eI=he("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 Vu=he("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 gi=he("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 ga=he("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"}]]),cu=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:TM},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:sf},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:xa},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:wu},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Jr},{id:"terminal",label:"Hermes GUI",hint:"Eingebaute Hermes-Weboberfläche (Threads & Tool-Calls)",icon:dM},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:lf},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:bM}];var Cw=1,tI=.9,rI=.8,nI=.17,ig=.1,ag=.999,iI=.9999,aI=.99,oI=/[\\\/_+.#"@\[\(\{&]/,sI=/[\\\/_+.#"@\[\(\{&]/g,lI=/[\s-]/,t5=/[\s-]/g;function mv(e,t,r,n,i,o,u){if(o===t.length)return i===e.length?Cw:aI;var c=`${i},${o}`;if(u[c]!==void 0)return u[c];for(var f=n.charAt(o),h=r.indexOf(f,i),m=0,g,v,b,j;h>=0;)g=mv(e,t,r,n,h+1,o+1,u),g>m&&(h===i?g*=Cw:oI.test(e.charAt(h-1))?(g*=rI,b=e.slice(i,h-1).match(sI),b&&i>0&&(g*=Math.pow(ag,b.length))):lI.test(e.charAt(h-1))?(g*=tI,j=e.slice(i,h-1).match(t5),j&&i>0&&(g*=Math.pow(ag,j.length))):(g*=nI,i>0&&(g*=Math.pow(ag,h-i))),e.charAt(h)!==t.charAt(o)&&(g*=iI)),(g<ig&&r.charAt(h-1)===n.charAt(o+1)||n.charAt(o+1)===n.charAt(o)&&r.charAt(h-1)!==n.charAt(o))&&(v=mv(e,t,r,n,h+1,o+2,u),v*ig>g&&(g=v*ig)),g>m&&(m=g),h=r.indexOf(f,h+1);return u[c]=m,m}function Pw(e){return e.toLowerCase().replace(t5," ")}function uI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,mv(e,t,Pw(e),Pw(t),0,0,{})}function ha(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Ow(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ls(...e){return t=>{let r=!1;const n=e.map(i=>{const o=Ow(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():Ow(e[i],null)}}}}function ko(...e){return y.useCallback(Ls(...e),e)}function cI(e,t=[]){let r=[];function n(o,u){const c=y.createContext(u);c.displayName=o+"Context";const f=r.length;r=[...r,u];const h=g=>{var N;const{scope:v,children:b,...j}=g,k=((N=v==null?void 0:v[e])==null?void 0:N[f])||c,S=y.useMemo(()=>j,Object.values(j));return l.jsx(k.Provider,{value:S,children:b})};h.displayName=o+"Provider";function m(g,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[f])||c,j=y.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,m]}const i=()=>{const o=r.map(u=>y.createContext(u));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return i.scopeName=e,[n,dI(i,...t)]}function dI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const u=n.reduce((c,{useScope:f,scopeName:h})=>{const g=f(o)[`__scope${h}`];return{...c,...g}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var ku=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},fI=lh[" useId ".trim().toString()]||(()=>{}),hI=0;function fi(e){const[t,r]=y.useState(fI());return ku(()=>{r(n=>n??String(hI++))},[e]),t?`radix-${t}`:""}var mI=lh[" useInsertionEffect ".trim().toString()]||ku;function pI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,u]=gI({defaultProp:t,onChange:r}),c=e!==void 0,f=c?e:i;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const g=m.current;g!==c&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,n])}const h=y.useCallback(m=>{var g;if(c){const v=vI(m)?m(e):m;v!==e&&((g=u.current)==null||g.call(u,v))}else o(m)},[c,e,o,u]);return[f,h]}function gI({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),i=y.useRef(r),o=y.useRef(t);return mI(()=>{o.current=t},[t]),y.useEffect(()=>{var u;i.current!==r&&((u=o.current)==null||u.call(o,r),i.current=r)},[r,i]),[r,n,o]}function vI(e){return typeof e=="function"}var hh=NN();function r5(e){const t=y.forwardRef((r,n)=>{let{children:i,...o}=r,u=null,c=!1;const f=[];_w(i)&&typeof kd=="function"&&(i=kd(i._payload)),y.Children.forEach(i,v=>{var b;if(kI(v)){c=!0;const j=v;let k="child"in j.props?j.props.child:j.props.children;_w(k)&&typeof kd=="function"&&(k=kd(k._payload)),u=xI(j,k),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(v)}),u?u=y.cloneElement(u,void 0,f):!c&&y.Children.count(i)===1&&y.isValidElement(i)&&(u=i);const h=u?wI(u):void 0,m=ko(n,h);if(!u){if(i||i===0)throw new Error(c?EI(e):NI(e));return i}const g=bI(o,u.props??{});return u.type!==y.Fragment&&(g.ref=n?m:h),y.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var yI=Symbol.for("radix.slottable"),xI=(e,t)=>{if("child"in e.props){const r=e.props.child;return y.isValidElement(r)?y.cloneElement(r,void 0,e.props.children(r.props.children)):null}return y.isValidElement(t)?t:null};function bI(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...c)=>{const f=o(...c);return i(...c),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function wI(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function kI(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yI}var jI=Symbol.for("react.lazy");function _w(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===jI&&"_payload"in e&&SI(e._payload)}function SI(e){return typeof e=="object"&&e!==null&&"then"in e}var NI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,EI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,kd=lh[" use ".trim().toString()],AI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xt=AI.reduce((e,t)=>{const r=r5(`Primitive.${t}`),n=y.forwardRef((i,o)=>{const{asChild:u,...c}=i,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(f,{...c,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function CI(e,t){e&&hh.flushSync(()=>e.dispatchEvent(t))}function ju(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function PI(e,t=globalThis==null?void 0:globalThis.document){const r=ju(e);y.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var OI="DismissableLayer",pv="dismissableLayer.update",_I="dismissableLayer.pointerDownOutside",MI="dismissableLayer.focusOutside",Mw,P0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),n5=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...h}=e,m=y.useContext(P0),[g,v]=y.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=y.useState({}),k=ko(t,$=>v($)),S=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(N),A=g?S.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,_=A>=E,O=y.useRef(!1),T=RI($=>{const z=$.target;if(!(z instanceof Node))return;const Q=[...m.branches].some(U=>U.contains(z));!_||Q||(o==null||o($),c==null||c($),$.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),B=LI($=>{if(n&&O.current)return;const z=$.target;[...m.branches].some(U=>U.contains(z))||(u==null||u($),c==null||c($),$.defaultPrevented||f==null||f())},b);return PI($=>{A===m.layers.size-1&&(i==null||i($),!$.defaultPrevented&&f&&($.preventDefault(),f()))},b),y.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Mw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Iw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=Mw))}},[g,b,r,m]),y.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Iw())},[g,m]),y.useEffect(()=>{const $=()=>j({});return document.addEventListener(pv,$),()=>document.removeEventListener(pv,$)},[]),l.jsx(Xt.div,{...h,ref:k,style:{pointerEvents:P?_?"auto":"none":void 0,...e.style},onFocusCapture:ha(e.onFocusCapture,B.onFocusCapture),onBlurCapture:ha(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:ha(e.onPointerDownCapture,T.onPointerDownCapture)})});n5.displayName=OI;var II="DismissableLayerBranch",TI=y.forwardRef((e,t)=>{const r=y.useContext(P0),n=y.useRef(null),i=ko(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),l.jsx(Xt.div,{...e,ref:i})});TI.displayName=II;function DI(){const e=y.useContext(P0),[t,r]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function RI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,u=ju(e),c=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),m=y.useRef(()=>{});return y.useEffect(()=>{function g(){f.current=!1,i.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const A=E.target;A instanceof Node&&[...o].some(_=>_.contains(A))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function j(E){f.current&&h.current.set(E.type,!1)}const k=E=>{if(E.target&&!c.current){let A=function(){r.removeEventListener("click",m.current);const _=v();g(),_||i5(_I,u,P,{discrete:!0})};const P={originalEvent:E};f.current=!0,i.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?A():(r.removeEventListener("click",m.current),m.current=A,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),g();c.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of S)r.addEventListener(E,b,!0),r.addEventListener(E,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",m.current);for(const E of S)r.removeEventListener(E,b,!0),r.removeEventListener(E,j)}},[r,u,n,i,o]),{onPointerDownCapture:()=>c.current=!0}}function LI(e,t=globalThis==null?void 0:globalThis.document){const r=ju(e),n=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!n.current&&i5(MI,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Iw(){const e=new CustomEvent(pv);document.dispatchEvent(e)}function i5(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?CI(i,o):i.dispatchEvent(o)}var og="focusScope.autoFocusOnMount",sg="focusScope.autoFocusOnUnmount",Tw={bubbles:!1,cancelable:!0},$I="FocusScope",a5=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...u}=e,[c,f]=y.useState(null),h=ju(i),m=ju(o),g=y.useRef(null),v=ko(t,k=>f(k)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let k=function(A){if(b.paused||!c)return;const P=A.target;c.contains(P)?g.current=P:Zi(g.current,{select:!0})},S=function(A){if(b.paused||!c)return;const P=A.relatedTarget;P!==null&&(c.contains(P)||Zi(g.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const _ of A)_.removedNodes.length>0&&Zi(c)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const E=new MutationObserver(N);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),E.disconnect()}}},[n,c,b.paused]),y.useEffect(()=>{if(c){Rw.add(b);const k=document.activeElement;if(!c.contains(k)){const N=new CustomEvent(og,Tw);c.addEventListener(og,h),c.dispatchEvent(N),N.defaultPrevented||(zI(WI(o5(c)),{select:!0}),document.activeElement===k&&Zi(c))}return()=>{c.removeEventListener(og,h),setTimeout(()=>{const N=new CustomEvent(sg,Tw);c.addEventListener(sg,m),c.dispatchEvent(N),N.defaultPrevented||Zi(k??document.body,{select:!0}),c.removeEventListener(sg,m),Rw.remove(b)},0)}}},[c,h,m,b]);const j=y.useCallback(k=>{if(!r&&!n||b.paused)return;const S=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,N=document.activeElement;if(S&&N){const E=k.currentTarget,[A,P]=FI(E);A&&P?!k.shiftKey&&N===P?(k.preventDefault(),r&&Zi(A,{select:!0})):k.shiftKey&&N===A&&(k.preventDefault(),r&&Zi(P,{select:!0})):N===E&&k.preventDefault()}},[r,n,b.paused]);return l.jsx(Xt.div,{tabIndex:-1,...u,ref:v,onKeyDown:j})});a5.displayName=$I;function zI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Zi(n,{select:t}),document.activeElement!==r)return}function FI(e){const t=o5(e),r=Dw(t,e),n=Dw(t.reverse(),e);return[r,n]}function o5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Dw(e,t){for(const r of e)if(!BI(r,{upTo:t}))return r}function BI(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 UI(e){return e instanceof HTMLInputElement&&"select"in e}function Zi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&UI(e)&&t&&e.select()}}var Rw=HI();function HI(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Lw(e,t),e.unshift(t)},remove(t){var r;e=Lw(e,t),(r=e[0])==null||r.resume()}}}function Lw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function WI(e){return e.filter(t=>t.tagName!=="A")}var KI="Portal",s5=y.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[i,o]=y.useState(!1);ku(()=>o(!0),[]);const u=r||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?hh.createPortal(l.jsx(Xt.div,{...n,ref:t}),u):null});s5.displayName=KI;function GI(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var mh=e=>{const{present:t,children:r}=e,n=VI(t),i=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=qI(n.ref,QI(i));return typeof r=="function"||n.isPresent?y.cloneElement(i,{ref:o}):null};mh.displayName="Presence";function VI(e){const[t,r]=y.useState(),n=y.useRef(null),i=y.useRef(e),o=y.useRef("none"),u=e?"mounted":"unmounted",[c,f]=GI(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=jd(n.current);o.current=c==="mounted"?h:"none"},[c]),ku(()=>{const h=n.current,m=i.current;if(m!==e){const v=o.current,b=jd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),ku(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=b=>{const k=jd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(o.current=jd(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function $w(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qI(...e){const t=y.useRef(e);return t.current=e,y.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(u=>{const c=$w(u,r);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let u=0;u<o.length;u++){const c=o[u];typeof c=="function"?c():$w(n[u],null)}}},[])}function jd(e){return(e==null?void 0:e.animationName)||"none"}function QI(e){var n,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sd=0,Cn=null;function YI(){y.useEffect(()=>{Cn||(Cn={start:zw(),end:zw()});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),Sd++,()=>{Sd===1&&(Cn==null||Cn.start.remove(),Cn==null||Cn.end.remove(),Cn=null),Sd=Math.max(0,Sd-1)}},[])}function zw(){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 Dn=function(){return Dn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Dn.apply(this,arguments)};function l5(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function XI(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;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 Vd="right-scroll-bar-position",qd="width-before-scroll-bar",ZI="with-scroll-bars-hidden",JI="--removed-body-scroll-bar-size";function lg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eT(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var tT=typeof window<"u"?y.useLayoutEffect:y.useEffect,Fw=new WeakMap;function rT(e,t){var r=eT(null,function(n){return e.forEach(function(i){return lg(i,n)})});return tT(function(){var n=Fw.get(r);if(n){var i=new Set(n),o=new Set(e),u=r.current;i.forEach(function(c){o.has(c)||lg(c,null)}),o.forEach(function(c){i.has(c)||lg(c,u)})}Fw.set(r,e)},[e]),r}function nT(e){return e}function iT(e,t){t===void 0&&(t=nT);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var u=t(o,n);return r.push(u),function(){r=r.filter(function(c){return c!==u})}},assignSyncMedium:function(o){for(n=!0;r.length;){var u=r;r=[],u.forEach(o)}r={push:function(c){return o(c)},filter:function(){return r}}},assignMedium:function(o){n=!0;var u=[];if(r.length){var c=r;r=[],c.forEach(o),u=r}var f=function(){var m=u;u=[],m.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),r={push:function(m){u.push(m),h()},filter:function(m){return u=u.filter(m),r}}}};return i}function aT(e){e===void 0&&(e={});var t=iT(null);return t.options=Dn({async:!0,ssr:!1},e),t}var u5=function(e){var t=e.sideCar,r=l5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,Dn({},r))};u5.isSideCarExport=!0;function oT(e,t){return e.useMedium(t),u5}var c5=aT(),ug=function(){},ph=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:ug,onWheelCapture:ug,onTouchMoveCapture:ug}),i=n[0],o=n[1],u=e.forwardProps,c=e.children,f=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,b=e.noRelative,j=e.noIsolation,k=e.inert,S=e.allowPinchZoom,N=e.as,E=N===void 0?"div":N,A=e.gapMode,P=l5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=v,O=rT([r,t]),T=Dn(Dn({},P),i);return y.createElement(y.Fragment,null,m&&y.createElement(_,{sideCar:c5,removeScrollBar:h,shards:g,noRelative:b,noIsolation:j,inert:k,setCallbacks:o,allowPinchZoom:!!S,lockRef:r,gapMode:A}),u?y.cloneElement(y.Children.only(c),Dn(Dn({},T),{ref:O})):y.createElement(E,Dn({},T,{className:f,ref:O}),c))});ph.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ph.classNames={fullWidth:qd,zeroRight:Vd};var sT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sT();return t&&e.setAttribute("nonce",t),e}function uT(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cT(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dT=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lT())&&(uT(t,r),cT(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fT=function(){var e=dT();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},d5=function(){var e=fT(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},hT={left:0,top:0,right:0,gap:0},cg=function(e){return parseInt(e||"",10)||0},mT=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[cg(r),cg(n),cg(i)]},pT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return hT;var t=mT(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])}},gT=d5(),vs="data-scroll-locked",vT=function(e,t,r,n){var i=e.left,o=e.top,u=e.right,c=e.gap;return r===void 0&&(r="margin"),`
|
||
.`.concat(ZI,` {
|
||
overflow: hidden `).concat(n,`;
|
||
padding-right: `).concat(c,"px ").concat(n,`;
|
||
}
|
||
body[`).concat(vs,`] {
|
||
overflow: hidden `).concat(n,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
||
padding-left: `.concat(i,`px;
|
||
padding-top: `).concat(o,`px;
|
||
padding-right: `).concat(u,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(c,"px ").concat(n,`;
|
||
`),r==="padding"&&"padding-right: ".concat(c,"px ").concat(n,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(Vd,` {
|
||
right: `).concat(c,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(qd,` {
|
||
margin-right: `).concat(c,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(Vd," .").concat(Vd,` {
|
||
right: 0 `).concat(n,`;
|
||
}
|
||
|
||
.`).concat(qd," .").concat(qd,` {
|
||
margin-right: 0 `).concat(n,`;
|
||
}
|
||
|
||
body[`).concat(vs,`] {
|
||
`).concat(JI,": ").concat(c,`px;
|
||
}
|
||
`)},Bw=function(){var e=parseInt(document.body.getAttribute(vs)||"0",10);return isFinite(e)?e:0},yT=function(){y.useEffect(function(){return document.body.setAttribute(vs,(Bw()+1).toString()),function(){var e=Bw()-1;e<=0?document.body.removeAttribute(vs):document.body.setAttribute(vs,e.toString())}},[])},xT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;yT();var o=y.useMemo(function(){return pT(i)},[i]);return y.createElement(gT,{styles:vT(o,!t,i,r?"":"!important")})},gv=!1;if(typeof window<"u")try{var Nd=Object.defineProperty({},"passive",{get:function(){return gv=!0,!0}});window.addEventListener("test",Nd,Nd),window.removeEventListener("test",Nd,Nd)}catch{gv=!1}var Jo=gv?{passive:!1}:!1,bT=function(e){return e.tagName==="TEXTAREA"},f5=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bT(e)&&r[t]==="visible")},wT=function(e){return f5(e,"overflowY")},kT=function(e){return f5(e,"overflowX")},Uw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=h5(e,n);if(i){var o=m5(e,n),u=o[1],c=o[2];if(u>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},jT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ST=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},h5=function(e,t){return e==="v"?wT(t):kT(t)},m5=function(e,t){return e==="v"?jT(t):ST(t)},NT=function(e,t){return e==="h"&&t==="rtl"?-1:1},ET=function(e,t,r,n,i){var o=NT(e,window.getComputedStyle(t).direction),u=o*n,c=r.target,f=t.contains(c),h=!1,m=u>0,g=0,v=0;do{if(!c)break;var b=m5(e,c),j=b[0],k=b[1],S=b[2],N=k-S-o*j;(j||N)&&h5(e,c)&&(g+=N,v+=j);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Ed=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hw=function(e){return[e.deltaX,e.deltaY]},Ww=function(e){return e&&"current"in e?e.current:e},AT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CT=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},PT=0,es=[];function OT(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),i=y.useState(PT++)[0],o=y.useState(d5)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=XI([e.lockRef.current],(e.shards||[]).map(Ww),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var N=Ed(k),E=r.current,A="deltaX"in k?k.deltaX:E[0]-N[0],P="deltaY"in k?k.deltaY:E[1]-N[1],_,O=k.target,T=Math.abs(A)>Math.abs(P)?"h":"v";if("touches"in k&&T==="h"&&O.type==="range")return!1;var B=window.getSelection(),$=B&&B.anchorNode,z=$?$===O||$.contains(O):!1;if(z)return!1;var Q=Uw(T,O);if(!Q)return!0;if(Q?_=T:(_=T==="v"?"h":"v",Q=Uw(T,O)),!Q)return!1;if(!n.current&&"changedTouches"in k&&(A||P)&&(n.current=_),!_)return!0;var U=n.current||_;return ET(U,S,k,U==="h"?A:P)},[]),f=y.useCallback(function(k){var S=k;if(!(!es.length||es[es.length-1]!==o)){var N="deltaY"in S?Hw(S):Ed(S),E=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&AT(_.delta,N)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var A=(u.current.shards||[]).map(Ww).filter(Boolean).filter(function(_){return _.contains(S.target)}),P=A.length>0?c(S,A[0]):!u.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),h=y.useCallback(function(k,S,N,E){var A={name:k,delta:S,target:N,should:E,shadowParent:_T(N)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(P){return P!==A})},1)},[]),m=y.useCallback(function(k){r.current=Ed(k),n.current=void 0},[]),g=y.useCallback(function(k){h(k.type,Hw(k),k.target,c(k,e.lockRef.current))},[]),v=y.useCallback(function(k){h(k.type,Ed(k),k.target,c(k,e.lockRef.current))},[]);y.useEffect(function(){return es.push(o),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Jo),document.addEventListener("touchmove",f,Jo),document.addEventListener("touchstart",m,Jo),function(){es=es.filter(function(k){return k!==o}),document.removeEventListener("wheel",f,Jo),document.removeEventListener("touchmove",f,Jo),document.removeEventListener("touchstart",m,Jo)}},[]);var b=e.removeScrollBar,j=e.inert;return y.createElement(y.Fragment,null,j?y.createElement(o,{styles:CT(i)}):null,b?y.createElement(xT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _T(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const MT=oT(c5,OT);var p5=y.forwardRef(function(e,t){return y.createElement(ph,Dn({},e,{ref:t,sideCar:MT}))});p5.classNames=ph.classNames;var IT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ts=new WeakMap,Ad=new WeakMap,Cd={},dg=0,g5=function(e){return e&&(e.host||g5(e.parentNode))},TT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=g5(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})},DT=function(e,t,r,n){var i=TT(t,Array.isArray(e)?e:[e]);Cd[r]||(Cd[r]=new WeakMap);var o=Cd[r],u=[],c=new Set,f=new Set(i),h=function(g){!g||c.has(g)||(c.add(g),h(g.parentNode))};i.forEach(h);var m=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(c.has(v))m(v);else try{var b=v.getAttribute(n),j=b!==null&&b!=="false",k=(ts.get(v)||0)+1,S=(o.get(v)||0)+1;ts.set(v,k),o.set(v,S),u.push(v),k===1&&j&&Ad.set(v,!0),S===1&&v.setAttribute(r,"true"),j||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),c.clear(),dg++,function(){u.forEach(function(g){var v=ts.get(g)-1,b=o.get(g)-1;ts.set(g,v),o.set(g,b),v||(Ad.has(g)||g.removeAttribute(n),Ad.delete(g)),b||g.removeAttribute(r)}),dg--,dg||(ts=new WeakMap,ts=new WeakMap,Ad=new WeakMap,Cd={})}},RT=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=IT(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),DT(n,i,r,"aria-hidden")):function(){return null}},gh="Dialog",[v5]=cI(gh),[LT,wn]=v5(gh),y5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:u=!0}=e,c=y.useRef(null),f=y.useRef(null),[h,m]=pI({prop:n,defaultProp:i??!1,onChange:o,caller:gh});return l.jsx(LT,{scope:t,triggerRef:c,contentRef:f,contentId:fi(),titleId:fi(),descriptionId:fi(),open:h,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(g=>!g),[m]),modal:u,children:r})};y5.displayName=gh;var x5="DialogTrigger",$T=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=wn(x5,r),o=ko(t,i.triggerRef);return l.jsx(Xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":_0(i.open),...n,ref:o,onClick:ha(e.onClick,i.onOpenToggle)})});$T.displayName=x5;var O0="DialogPortal",[zT,b5]=v5(O0,{forceMount:void 0}),w5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=wn(O0,t);return l.jsx(zT,{scope:t,forceMount:r,children:y.Children.map(n,u=>l.jsx(mh,{present:r||o.open,children:l.jsx(s5,{asChild:!0,container:i,children:u})}))})};w5.displayName=O0;var cf="DialogOverlay",k5=y.forwardRef((e,t)=>{const r=b5(cf,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=wn(cf,e.__scopeDialog);return o.modal?l.jsx(mh,{present:n||o.open,children:l.jsx(BT,{...i,ref:t})}):null});k5.displayName=cf;var FT=r5("DialogOverlay.RemoveScroll"),BT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=wn(cf,r),o=DI(),u=ko(t,o);return l.jsx(p5,{as:FT,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(Xt.div,{"data-state":_0(i.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),$s="DialogContent",j5=y.forwardRef((e,t)=>{const r=b5($s,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=wn($s,e.__scopeDialog);return l.jsx(mh,{present:n||o.open,children:o.modal?l.jsx(UT,{...i,ref:t}):l.jsx(HT,{...i,ref:t})})});j5.displayName=$s;var UT=y.forwardRef((e,t)=>{const r=wn($s,e.__scopeDialog),n=y.useRef(null),i=ko(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return RT(o)},[]),l.jsx(S5,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:ha(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ha(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&o.preventDefault()}),onFocusOutside:ha(e.onFocusOutside,o=>o.preventDefault())})}),HT=y.forwardRef((e,t)=>{const r=wn($s,e.__scopeDialog),n=y.useRef(!1),i=y.useRef(!1);return l.jsx(S5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),o.preventDefault()),n.current=!1,i.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"&&(i.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),S5=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...u}=e,c=wn($s,r);return YI(),l.jsx(l.Fragment,{children:l.jsx(a5,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:l.jsx(n5,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":_0(c.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),N5="DialogTitle",WT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=wn(N5,r);return l.jsx(Xt.h2,{id:i.titleId,...n,ref:t})});WT.displayName=N5;var E5="DialogDescription",KT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=wn(E5,r);return l.jsx(Xt.p,{id:i.descriptionId,...n,ref:t})});KT.displayName=E5;var A5="DialogClose",GT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=wn(A5,r);return l.jsx(Xt.button,{type:"button",...n,ref:t,onClick:ha(e.onClick,()=>i.onOpenChange(!1))})});GT.displayName=A5;function _0(e){return e?"open":"closed"}var Ql='[cmdk-group=""]',fg='[cmdk-group-items=""]',VT='[cmdk-group-heading=""]',C5='[cmdk-item=""]',Kw=`${C5}:not([aria-disabled="true"])`,vv="cmdk-item-select",cs="data-value",qT=(e,t,r)=>uI(e,t,r),P5=y.createContext(void 0),qu=()=>y.useContext(P5),O5=y.createContext(void 0),M0=()=>y.useContext(O5),_5=y.createContext(void 0),M5=y.forwardRef((e,t)=>{let r=ds(()=>{var M,H;return{search:"",value:(H=(M=e.value)!=null?M:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=ds(()=>new Set),i=ds(()=>new Map),o=ds(()=>new Map),u=ds(()=>new Set),c=I5(e),{label:f,children:h,value:m,onValueChange:g,filter:v,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,E=fi(),A=fi(),P=fi(),_=y.useRef(null),O=aD();ho(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,T.emit()}},[m]),ho(()=>{O(6,ve)},[]);let T=y.useMemo(()=>({subscribe:M=>(u.current.add(M),()=>u.current.delete(M)),snapshot:()=>r.current,setState:(M,H,ie)=>{var J,Z,ae,me;if(!Object.is(r.current[M],H)){if(r.current[M]=H,M==="search")U(),z(),O(1,Q);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(P);re?re.focus():(J=document.getElementById(E))==null||J.focus()}if(O(7,()=>{var re;r.current.selectedItemId=(re=ue())==null?void 0:re.id,T.emit()}),ie||O(5,ve),((Z=c.current)==null?void 0:Z.value)!==void 0){let re=H??"";(me=(ae=c.current).onValueChange)==null||me.call(ae,re);return}}T.emit()}},emit:()=>{u.current.forEach(M=>M())}}),[]),B=y.useMemo(()=>({value:(M,H,ie)=>{var J;H!==((J=o.current.get(M))==null?void 0:J.value)&&(o.current.set(M,{value:H,keywords:ie}),r.current.filtered.items.set(M,$(H,ie)),O(2,()=>{z(),T.emit()}))},item:(M,H)=>(n.current.add(M),H&&(i.current.has(H)?i.current.get(H).add(M):i.current.set(H,new Set([M]))),O(3,()=>{U(),z(),r.current.value||Q(),T.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let ie=ue();O(4,()=>{U(),(ie==null?void 0:ie.getAttribute("id"))===M&&Q(),T.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>c.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:E,inputId:P,labelId:A,listInnerRef:_}),[]);function $(M,H){var ie,J;let Z=(J=(ie=c.current)==null?void 0:ie.filter)!=null?J:qT;return M?Z(M,r.current.search,H):0}function z(){if(!r.current.search||c.current.shouldFilter===!1)return;let M=r.current.filtered.items,H=[];r.current.filtered.groups.forEach(J=>{let Z=i.current.get(J),ae=0;Z.forEach(me=>{let re=M.get(me);ae=Math.max(re,ae)}),H.push([J,ae])});let ie=_.current;pe().sort((J,Z)=>{var ae,me;let re=J.getAttribute("id"),ye=Z.getAttribute("id");return((ae=M.get(ye))!=null?ae:0)-((me=M.get(re))!=null?me:0)}).forEach(J=>{let Z=J.closest(fg);Z?Z.appendChild(J.parentElement===Z?J:J.closest(`${fg} > *`)):ie.appendChild(J.parentElement===ie?J:J.closest(`${fg} > *`))}),H.sort((J,Z)=>Z[1]-J[1]).forEach(J=>{var Z;let ae=(Z=_.current)==null?void 0:Z.querySelector(`${Ql}[${cs}="${encodeURIComponent(J[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function Q(){let M=pe().find(ie=>ie.getAttribute("aria-disabled")!=="true"),H=M==null?void 0:M.getAttribute(cs);T.setState("value",H||void 0)}function U(){var M,H,ie,J;if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let Z=0;for(let ae of n.current){let me=(H=(M=o.current.get(ae))==null?void 0:M.value)!=null?H:"",re=(J=(ie=o.current.get(ae))==null?void 0:ie.keywords)!=null?J:[],ye=$(me,re);r.current.filtered.items.set(ae,ye),ye>0&&Z++}for(let[ae,me]of i.current)for(let re of me)if(r.current.filtered.items.get(re)>0){r.current.filtered.groups.add(ae);break}r.current.filtered.count=Z}function ve(){var M,H,ie;let J=ue();J&&(((M=J.parentElement)==null?void 0:M.firstChild)===J&&((ie=(H=J.closest(Ql))==null?void 0:H.querySelector(VT))==null||ie.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=_.current)==null?void 0:M.querySelector(`${C5}[aria-selected="true"]`)}function pe(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(Kw))||[])}function oe(M){let H=pe()[M];H&&T.setState("value",H.getAttribute(cs))}function se(M){var H;let ie=ue(),J=pe(),Z=J.findIndex(me=>me===ie),ae=J[Z+M];(H=c.current)!=null&&H.loop&&(ae=Z+M<0?J[J.length-1]:Z+M===J.length?J[0]:J[Z+M]),ae&&T.setState("value",ae.getAttribute(cs))}function X(M){let H=ue(),ie=H==null?void 0:H.closest(Ql),J;for(;ie&&!J;)ie=M>0?nD(ie,Ql):iD(ie,Ql),J=ie==null?void 0:ie.querySelector(Kw);J?T.setState("value",J.getAttribute(cs)):se(M)}let ne=()=>oe(pe().length-1),te=M=>{M.preventDefault(),M.metaKey?ne():M.altKey?X(1):se(1)},I=M=>{M.preventDefault(),M.metaKey?oe(0):M.altKey?X(-1):se(-1)};return y.createElement(Xt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:M=>{var H;(H=N.onKeyDown)==null||H.call(N,M);let ie=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||ie))switch(M.key){case"n":case"j":{S&&M.ctrlKey&&te(M);break}case"ArrowDown":{te(M);break}case"p":case"k":{S&&M.ctrlKey&&I(M);break}case"ArrowUp":{I(M);break}case"Home":{M.preventDefault(),oe(0);break}case"End":{M.preventDefault(),ne();break}case"Enter":{M.preventDefault();let J=ue();if(J){let Z=new Event(vv);J.dispatchEvent(Z)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:sD},f),vh(e,M=>y.createElement(O5.Provider,{value:T},y.createElement(P5.Provider,{value:B},M))))}),QT=y.forwardRef((e,t)=>{var r,n;let i=fi(),o=y.useRef(null),u=y.useContext(_5),c=qu(),f=I5(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;ho(()=>{if(!h)return c.item(i,u==null?void 0:u.id)},[h]);let m=T5(i,o,[e.value,e.children,o],e.keywords),g=M0(),v=va(O=>O.value&&O.value===m.current),b=va(O=>h||c.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);y.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(vv,j),()=>O.removeEventListener(vv,j)},[b,e.onSelect,e.disabled]);function j(){var O,T;k(),(T=(O=f.current).onSelect)==null||T.call(O,m.current)}function k(){g.setState("value",m.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:E,forceMount:A,keywords:P,..._}=e;return y.createElement(Xt.div,{ref:Ls(o,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||c.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),YT=y.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,u=fi(),c=y.useRef(null),f=y.useRef(null),h=fi(),m=qu(),g=va(b=>i||m.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);ho(()=>m.group(u),[]),T5(u,c,[e.value,e.heading,f]);let v=y.useMemo(()=>({id:u,forceMount:i}),[i]);return y.createElement(Xt.div,{ref:Ls(c,t),...o,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),vh(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},y.createElement(_5.Provider,{value:v},b))))}),XT=y.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=y.useRef(null),o=va(u=>!u.search);return!r&&!o?null:y.createElement(Xt.div,{ref:Ls(i,t),...n,"cmdk-separator":"",role:"separator"})}),ZT=y.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=M0(),u=va(h=>h.search),c=va(h=>h.selectedItemId),f=qu();return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement(Xt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":c,id:f.inputId,type:"text",value:i?e.value:u,onChange:h=>{i||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),JT=y.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=y.useRef(null),u=y.useRef(null),c=va(h=>h.selectedItemId),f=qu();return y.useEffect(()=>{if(u.current&&o.current){let h=u.current,m=o.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),y.createElement(Xt.div,{ref:Ls(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":n,id:f.listId},vh(e,h=>y.createElement("div",{ref:Ls(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),eD=y.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:u,...c}=e;return y.createElement(y5,{open:r,onOpenChange:n},y.createElement(w5,{container:u},y.createElement(k5,{"cmdk-overlay":"",className:i}),y.createElement(j5,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(M5,{ref:t,...c}))))}),tD=y.forwardRef((e,t)=>va(r=>r.filtered.count===0)?y.createElement(Xt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),rD=y.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return y.createElement(Xt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},vh(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),rs=Object.assign(M5,{List:JT,Item:QT,Input:ZT,Group:YT,Separator:XT,Dialog:eD,Empty:tD,Loading:rD});function nD(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function iD(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function I5(e){let t=y.useRef(e);return ho(()=>{t.current=e}),t}var ho=typeof window>"u"?y.useEffect:y.useLayoutEffect;function ds(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function va(e){let t=M0(),r=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,r,r)}function T5(e,t,r,n=[]){let i=y.useRef(),o=qu();return ho(()=>{var u;let c=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():i.current}})(),f=n.map(h=>h.trim());o.value(e,c,f),(u=t.current)==null||u.setAttribute(cs,c),i.current=c}),i}var aD=()=>{let[e,t]=y.useState(),r=ds(()=>new Map);return ho(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function oD(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function vh({asChild:e,children:t},r){return e&&y.isValidElement(t)?y.cloneElement(oD(t),{ref:t.ref},r(t.props.children)):r(t)}var sD={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function lD({onNavigate:e}){const[t,r]=y.useState(!1);return y.useEffect(()=>{const n=i=>{(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),l.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] overscroll-contain",onClick:()=>r(!1),children:l.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[l.jsx(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"}),l.jsxs(rs.List,{className:"max-h-80 overflow-y-auto p-2",children:[l.jsx(rs.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),l.jsx(rs.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:cu.map(n=>l.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:[l.jsx(n.icon,{className:"h-4 w-4 text-primary"}),l.jsx("span",{children:n.label}),l.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const D5="mc_expert_mode",yv="mc-expert-mode-change",uD=()=>{try{return localStorage.getItem(D5)==="true"}catch{return!1}};function cD(e){return window.addEventListener(yv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(yv,e),window.removeEventListener("storage",e)}}function Gw(e){localStorage.setItem(D5,String(e)),window.dispatchEvent(new Event(yv))}function I0(){return y.useSyncExternalStore(cD,uD,()=>!1)}function R5(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=R5(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function rt(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=R5(e))&&(n&&(n+=" "),n+=t);return n}const T0="-",dD=e=>{const t=hD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const c=u.split(T0);return c[0]===""&&c.length!==1&&c.shift(),L5(c,t)||fD(u)},getConflictingClassGroupIds:(u,c)=>{const f=r[u]||[];return c&&n[u]?[...f,...n[u]]:f}}},L5=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?L5(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(T0);return(u=t.validators.find(({validator:c})=>c(o)))==null?void 0:u.classGroupId},Vw=/^\[(.+)\]$/,fD=e=>{if(Vw.test(e)){const t=Vw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},hD=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return pD(Object.entries(e.classGroups),r).forEach(([o,u])=>{xv(u,n,o,t)}),n},xv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:qw(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(mD(i)){xv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,u])=>{xv(u,qw(t,o),r,n)})})},qw=(e,t)=>{let r=e;return t.split(T0).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},mD=e=>e.isThemeGetter,pD=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([u,c])=>[t+u,c])):o);return[r,i]}):e,gD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,u)=>{r.set(o,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let u=r.get(o);if(u!==void 0)return u;if((u=n.get(o))!==void 0)return i(o,u),u},set(o,u){r.has(o)?r.set(o,u):i(o,u)}}},$5="!",vD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,u=c=>{const f=[];let h=0,m=0,g;for(let S=0;S<c.length;S++){let N=c[S];if(h===0){if(N===i&&(n||c.slice(S,S+o)===t)){f.push(c.slice(m,S)),m=S+o;continue}if(N==="/"){g=S;continue}}N==="["?h++:N==="]"&&h--}const v=f.length===0?c:c.substring(m),b=v.startsWith($5),j=b?v.substring(1):v,k=g&&g>m?g-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?c=>r({className:c,parseClassName:u}):u},yD=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},xD=e=>({cache:gD(e.cacheSize),parseClassName:vD(e),...dD(e)}),bD=/\s+/,wD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],u=e.trim().split(bD);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:m,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?v.substring(0,b):v);if(!k){if(!j){c=h+(c.length>0?" "+c:c);continue}if(k=n(v),!k){c=h+(c.length>0?" "+c:c);continue}j=!1}const S=yD(m).join(":"),N=g?S+$5:S,E=N+k;if(o.includes(E))continue;o.push(E);const A=i(k,j);for(let P=0;P<A.length;++P){const _=A[P];o.push(N+_)}c=h+(c.length>0?" "+c:c)}return c};function kD(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=z5(t))&&(n&&(n+=" "),n+=r);return n}const z5=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=z5(e[n]))&&(r&&(r+=" "),r+=t);return r};function jD(e,...t){let r,n,i,o=u;function u(f){const h=t.reduce((m,g)=>g(m),e());return r=xD(h),n=r.cache.get,i=r.cache.set,o=c,c(f)}function c(f){const h=n(f);if(h)return h;const m=wD(f,r);return i(f,m),m}return function(){return o(kD.apply(null,arguments))}}const ot=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},F5=/^\[(?:([a-z-]+):)?(.+)\]$/i,SD=/^\d+\/\d+$/,ND=new Set(["px","full","screen"]),ED=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AD=/\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$/,CD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ri=e=>ys(e)||ND.has(e)||SD.test(e),qi=e=>Xs(e,"length",$D),ys=e=>!!e&&!Number.isNaN(Number(e)),hg=e=>Xs(e,"number",ys),Yl=e=>!!e&&Number.isInteger(Number(e)),_D=e=>e.endsWith("%")&&ys(e.slice(0,-1)),$e=e=>F5.test(e),Qi=e=>ED.test(e),MD=new Set(["length","size","percentage"]),ID=e=>Xs(e,MD,B5),TD=e=>Xs(e,"position",B5),DD=new Set(["image","url"]),RD=e=>Xs(e,DD,FD),LD=e=>Xs(e,"",zD),Xl=()=>!0,Xs=(e,t,r)=>{const n=F5.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},$D=e=>AD.test(e)&&!CD.test(e),B5=()=>!1,zD=e=>PD.test(e),FD=e=>OD.test(e),BD=()=>{const e=ot("colors"),t=ot("spacing"),r=ot("blur"),n=ot("brightness"),i=ot("borderColor"),o=ot("borderRadius"),u=ot("borderSpacing"),c=ot("borderWidth"),f=ot("contrast"),h=ot("grayscale"),m=ot("hueRotate"),g=ot("invert"),v=ot("gap"),b=ot("gradientColorStops"),j=ot("gradientColorStopPositions"),k=ot("inset"),S=ot("margin"),N=ot("opacity"),E=ot("padding"),A=ot("saturate"),P=ot("scale"),_=ot("sepia"),O=ot("skew"),T=ot("space"),B=ot("translate"),$=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",$e,t],U=()=>[$e,t],ve=()=>["",ri,qi],ue=()=>["auto",ys,$e],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],oe=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",$e],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[ys,$e];return{cacheSize:500,separator:":",theme:{colors:[Xl],spacing:[ri,qi],blur:["none","",Qi,$e],brightness:I(),borderColor:[e],borderRadius:["none","","full",Qi,$e],borderSpacing:U(),borderWidth:ve(),contrast:I(),grayscale:ne(),hueRotate:I(),invert:ne(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[_D,qi],inset:Q(),margin:Q(),opacity:I(),padding:U(),saturate:I(),scale:I(),sepia:ne(),skew:I(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Qi]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"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(),$e]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],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",Yl,$e]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Yl,$e]}],"grid-cols":[{"grid-cols":[Xl]}],"col-start-end":[{col:["auto",{span:["full",Yl,$e]},$e]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[Xl]}],"row-start-end":[{row:["auto",{span:[Yl,$e]},$e]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Qi]},Qi]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qi,qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hg]}],"font-family":[{font:[Xl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",ys,hg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ri,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ri,qi]}],"underline-offset":[{"underline-offset":["auto",ri,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),TD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ID]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RD]}],"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:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...oe(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:oe()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...oe()]}],"outline-offset":[{"outline-offset":[ri,$e]}],"outline-w":[{outline:[ri,qi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ri,qi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qi,LD]}],"shadow-color":[{shadow:[Xl]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Qi,$e]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[g]}],saturate:[{saturate:[A]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Yl,$e]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ri,qi,hg]}],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"]}}},UD=jD(BD);function ee(...e){return UD(rt(e))}function df(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function U5(){const e=I0();return l.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[l.jsxs("button",{onClick:()=>Gw(!1),"aria-pressed":!e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[l.jsx(hs,{className:"h-3.5 w-3.5"})," Einfach"]}),l.jsxs("button",{onClick:()=>Gw(!0),"aria-pressed":e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx(YM,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function we(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),i=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),i&&!("hf_token"in h)&&(h.hf_token=i,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),i&&(h.hf_token=i),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const c=await fetch(e,{...t,headers:r,body:o});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);return c.json()}const H5=(e,t,r=!1,n=!0)=>we("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),HD=e=>we("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),Fe={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],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"],voiceTrace:["voice-trace"]},WD=(e=12,t=4e3)=>$t({queryKey:Fe.voiceTrace,queryFn:()=>we(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),KD=(e=!0)=>$t({queryKey:Fe.memoryGraph,queryFn:()=>we("/api/memory/graph"),enabled:e}),D0=()=>$t({queryKey:Fe.health,queryFn:()=>we("/api/health"),refetchInterval:1e4}),jo=(e=5e3)=>$t({queryKey:Fe.systemStatus,queryFn:()=>we("/api/system/status"),refetchInterval:e}),W5=(e=3e3)=>$t({queryKey:Fe.services,queryFn:()=>we("/api/system/services"),refetchInterval:e}),wi=(e=4e3)=>$t({queryKey:Fe.models,queryFn:()=>we("/api/models"),refetchInterval:e}),R0=(e=8e3)=>$t({queryKey:Fe.groups,queryFn:()=>we("/api/groups"),refetchInterval:e}),GD=()=>$t({queryKey:Fe.routingPolicy,queryFn:()=>we("/api/routing/policy")}),VD=(e=2e3)=>$t({queryKey:Fe.jobs,queryFn:()=>we("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),K5=(e=3e3)=>$t({queryKey:Fe.tokenStats,queryFn:()=>we("/api/system/token-stats"),refetchInterval:e}),yh=(e=5e3)=>$t({queryKey:Fe.agentStatus,queryFn:()=>we("/api/agent/status"),refetchInterval:e}),G5=(e=6e4)=>$t({queryKey:Fe.hermesBrain,queryFn:()=>we("/api/agent/brain"),refetchInterval:e}),xh=e=>$t({queryKey:Fe.updates,queryFn:()=>we("/api/maintenance/updates"),refetchInterval:e}),qD=()=>$t({queryKey:Fe.discover,queryFn:()=>we("/api/discover")}),QD=e=>$t({queryKey:Fe.drafts(e),queryFn:()=>we(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),YD=e=>$t({queryKey:Fe.connect(e),queryFn:()=>we(e?`/api/connect?${e}`:"/api/connect")}),V5=()=>$t({queryKey:Fe.connectHealth,queryFn:()=>we("/api/connect/health"),refetchInterval:15e3}),bv=e=>$t({queryKey:Fe.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),we(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function q5({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:u,onCancel:c}){const f=y.useRef(null);return l.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:l.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),l.jsx("button",{onClick:c||(()=>u()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(gi,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var m;h.key==="Enter"&&u((m=f.current)==null?void 0:m.value)}}),i!==void 0&&l.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=i)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&l.jsx("button",{onClick:c,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),l.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;u(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function ba(){const[e,t]=y.useState(null),r=y.useCallback(()=>t(null),[]),n=y.useCallback((c,f,h)=>{t({type:"alert",title:c,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),i=y.useCallback((c,f,h,m)=>{t({type:"confirm",title:c,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=y.useCallback((c,f,h,m,g,v)=>{t({type:"prompt",title:c,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?l.jsx(q5,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:u}}function Qr(e){return(e/1024**3).toFixed(1)}function wv(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function or(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function XD(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function kv(e){return e?`${Math.round(e/1024)}k`:"—"}function ZD(){const e=Kn(),{data:t=[]}=VD(2e3),{showAlert:r,dialogElement:n}=ba();async function i(c){try{await we(`/api/jobs/${c}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:Fe.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(c=>c.state==="running"||c.state==="queued"),u=t.filter(c=>c.state!=="running"&&c.state!=="queued").slice(-3);return o.length===0&&u.length===0?null:l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[l.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(c=>l.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:c.label}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-muted-foreground font-mono",children:[c.progress??0,"% • ",wv(c.done_bytes),"/",wv(c.total_bytes),c.eta_s?` • ETA ${XD(c.eta_s)}`:""]}),l.jsx("button",{onClick:()=>i(c.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),l.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${c.progress??0}%`}})})]},c.id)),u.map(c=>l.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[l.jsx("span",{className:"truncate",children:c.label}),l.jsx("span",{className:ee("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",c.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:c.state})]},c.id)),n]})}function Ra({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return l.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function jv({caps:e}){return e?l.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&l.jsx(Ra,{children:"💻 Code"}),e.vision&&l.jsx(Ra,{children:"👁 Bild"}),e.reasoning&&l.jsx(Ra,{children:"🧠 Reason"}),e.moe&&l.jsxs(Ra,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&l.jsx(Ra,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&l.jsx(Ra,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&l.jsx(Ra,{children:"🔢 Embed"})]}):null}const L0=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:xa,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:FN,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"vision",label:"Lucys Augen",short:"Augen",icon:bu,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:gM,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Ds,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Ds,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:JM,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"}],JD=L0.map(e=>e.role),Qw=Object.fromEntries(L0.map(e=>[e.role,e])),Yw=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:xa,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),eR={fast:"hermes",coder_lite:"coder-lite"};function ct(e){return e&&(Qw[e]||Qw[eR[e]])||Yw(e)}function lo({role:e,dense:t=!1,className:r}){const n=ct(e),i=n.icon;return l.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[l.jsx(i,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function tR({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return l.jsxs("span",{className:ee("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function ff(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 Q5({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:i}=QD(e.gguf_path),[o,u]=y.useState(null),[c,f]=y.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],g=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await we(`/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)),u(null)}}const j=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[l.jsx(ga,{className:"h-4 w-4"})," Speculative Draft"]}),l.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(gi,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',l.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),l.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&v&&l.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[l.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[l.jsx(Qt,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),l.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&l.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[l.jsx(Er,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),l.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:i?l.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?l.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",l.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):m.map(N=>{var P,_;const E=N.filename===v,A=N.compatible===!0;return l.jsxs("div",{className:ee("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",A?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&l.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),l.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[or(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),A?E?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[l.jsx(Qt,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):l.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(P=N.vocab)==null?void 0:P.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[l.jsx(Er,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!i&&(n==null?void 0:n.target_exists)&&m.length>0&&g.length===0&&l.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",l.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",l.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),c&&l.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:c})]})})}const Xw={hermes:{bar:"bg-indigo-500",dot:"bg-indigo-500",text:"text-indigo-400"},embed:{bar:"bg-emerald-500",dot:"bg-emerald-500",text:"text-emerald-400"},vision:{bar:"bg-pink-500",dot:"bg-pink-500",text:"text-pink-400"},heavy:{bar:"bg-amber-500",dot:"bg-amber-500",text:"text-amber-400"},"coder-lite":{bar:"bg-violet-500",dot:"bg-violet-500",text:"text-violet-400"},coder:{bar:"bg-fuchsia-500",dot:"bg-fuchsia-500",text:"text-fuchsia-400"},scout:{bar:"bg-teal-500",dot:"bg-teal-500",text:"text-teal-400"}},rR={fast:"hermes",coder_lite:"coder-lite"},Zw={bar:"bg-slate-400",dot:"bg-slate-400",text:"text-slate-300"};function hf(e){return e&&(Xw[e]||Xw[rR[e]])||Zw}const Jw=1024**3,ek=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function nR({running:e,capacityBytes:t,realUsedBytes:r,selected:n,onSelect:i}){const o=t>2*Jw?t:124*Jw,u=e.reduce((h,m)=>h+(m.size_bytes||0),0),c=Math.max(0,o-u),f=c/o*100;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:[l.jsxs("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(fa,{className:"h-5 w-5 text-primary"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Arbeitsspeicher"}),l.jsxs("div",{className:"font-space text-xl font-bold tracking-tight text-foreground",children:[Qr(o)," GB ",l.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"gesamt"})]})]})]}),l.jsxs("div",{className:"text-right text-[11px] font-mono text-muted-foreground",children:[l.jsxs("div",{children:[l.jsxs("span",{className:"font-bold text-foreground",children:[Qr(u)," GB"]})," Modelle geladen"]}),r>0&&l.jsxs("div",{children:[Qr(r)," GB real belegt (inkl. KV-Cache)"]}),l.jsxs("div",{className:"text-emerald-400",children:[Qr(c)," GB frei"]})]})]}),l.jsx("div",{className:"flex h-12 w-full overflow-hidden rounded-xl border border-border/40 bg-background/50 p-1",children:e.length===0?l.jsx("div",{className:"flex w-full items-center justify-center text-[11px] italic text-muted-foreground/60",children:"Kein Modell geladen — Auto-Swap holt bei Anfrage automatisch das passende."}):l.jsxs(l.Fragment,{children:[e.map(h=>{const m=(h.size_bytes||0)/o*100,g=hf(h.role),v=n===h.name;return l.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),style:{width:`${m}%`},title:`${ct(h.role).label} · ${ek(h.name)} · ${or(h.size_bytes)}`,className:ee("group flex h-full min-w-[2.5rem] shrink-0 flex-col justify-center gap-0.5 rounded-lg px-2 text-left text-white transition-all",g.bar,v?"ring-2 ring-white/70":"opacity-90 hover:opacity-100"),children:[l.jsx("span",{className:"truncate font-space text-[10px] font-bold leading-tight tracking-wide",children:ct(h.role).short}),l.jsx("span",{className:"truncate font-mono text-[9px] leading-tight opacity-85",children:or(h.size_bytes)})]},h.name)}),f>1.5&&l.jsx("div",{style:{width:`${f}%`},className:"flex h-full min-w-[2rem] items-center justify-center rounded-lg text-[9px] font-mono text-muted-foreground/50",title:`${Qr(c)} GB frei`,children:"frei"})]})}),e.length>0&&l.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-4 gap-y-1.5",children:[e.map(h=>{const m=hf(h.role);return l.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),className:"flex items-center gap-1.5 text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:[l.jsx("span",{className:ee("h-2.5 w-2.5 rounded-sm",m.dot)}),l.jsx("span",{className:ee("font-semibold",m.text),children:ct(h.role).short}),l.jsx("span",{className:"font-mono text-muted-foreground/70",children:ek(h.name)})]},h.name)}),l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground/60",children:[l.jsx("span",{className:"h-2.5 w-2.5 rounded-sm border border-border/50 bg-background/50"})," frei · ",Qr(c)," GB"]})]})]})}const tk=1024**3,Ua=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function iR(){var M,H,ie,J;const e=Kn(),{data:t,isLoading:r,error:n}=wi(4e3),{data:i}=jo(),{data:o}=R0(),{showAlert:u,showConfirm:c,showPrompt:f,dialogElement:h}=ba(),m=I0(),g=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=Z=>!!ct(Z).protected,j=(M=o==null?void 0:o.groups)==null?void 0:M.brains,k=(j==null?void 0:j.members)??[],S=Z=>k.includes(Z),[N,E]=y.useState(null),[A,P]=y.useState(""),[_,O]=y.useState("all"),[T,B]=y.useState(null),$=()=>{e.invalidateQueries({queryKey:Fe.models}),e.invalidateQueries({queryKey:Fe.routing}),e.invalidateQueries({queryKey:Fe.groups})},z=g.filter(Z=>v.includes(Z.name)),Q=((H=i==null?void 0:i.gpu)==null?void 0:H.gtt_total)||((ie=i==null?void 0:i.gpu)==null?void 0:ie.vram_total)||0,U=((J=i==null?void 0:i.gpu)==null?void 0:J.gtt_used)||0,ve=Q>2*tk?Q:124*tk,ue=y.useMemo(()=>{const Z=A.trim().toLowerCase();return g.filter(ae=>_==="in_use"?!!ae.role||v.includes(ae.name):!0).filter(ae=>Z?ae.name.toLowerCase().includes(Z):!0).sort((ae,me)=>{const re=v.includes(ae.name)?0:1,ye=v.includes(me.name)?0:1;return re!==ye?re-ye:Ua(ae.name).localeCompare(Ua(me.name))})},[g,v,_,A]),pe=g.find(Z=>Z.name===N)??null;async function oe(Z){try{await we(`/api/models/${encodeURIComponent(Z)}/load`,{method:"POST"}),$()}catch(ae){u("Fehler",`Laden fehlgeschlagen: ${ae.message||ae}`)}}async function se(Z){const ae=k.some(me=>v.includes(me));if(j&&ae&&!S(Z)){const me=k.filter(re=>v.includes(re)).map(Ua).join(", ");c("Verdrängt das Hirn?",`„${Ua(Z)}" ist nicht ko-resident. Beim Laden wirft es das warme Hirn (${me}) raus — Lucy verliert Hirn bzw. Augen.
|
||
|
||
Trotzdem exklusiv laden?`,()=>oe(Z));return}oe(Z)}async function X(Z){const ae=g.find(me=>me.name===Z);if(ae&&b(ae.role)){u("Geschützt",`„${ct(ae.role).label}" ist lebenswichtig und bleibt geladen.`);return}try{await we(`/api/models/${encodeURIComponent(Z)}/unload`,{method:"POST"}),$()}catch(me){u("Fehler",`Entladen fehlgeschlagen: ${me.message||me}`)}}async function ne(Z,ae){try{const me=await we(`/api/models/${encodeURIComponent(ae)}/role`,{method:"POST",body:JSON.stringify({role:Z||null})});$(),me!=null&&me.warning&&u("Rolle gesetzt — Hinweis",me.warning)}catch(me){u("Fehler",`Rolle zuweisen fehlgeschlagen: ${me.message||me}`)}}async function te(Z,ae){let me=null;try{me=await we(`/api/models/${encodeURIComponent(Z)}/ctx/auto`)}catch{}const re=me?`Optimal für dein Setup: ${(me.ctx/1024).toFixed(0)}k (${me.ctx}). »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";f("Kontextlänge anpassen",re,String(ae||32768),async ye=>{if(ye)try{await we(`/api/models/${encodeURIComponent(Z)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(ye,10)})}),$()}catch(Oe){u("Fehler",`Kontext setzen fehlgeschlagen: ${Oe.message||Oe}`)}},void 0,me?{autoValue:String(me.ctx),autoLabel:`Auto (${(me.ctx/1024).toFixed(0)}k)`}:void 0)}async function I(Z){const ae=g.find(me=>me.name===Z);if(ae&&b(ae.role)){u("Geschützt",`„${ct(ae.role).label}" kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}c("Modell löschen?",`„${Ua(Z)}" und alle GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await we(`/api/models/${encodeURIComponent(Z)}`,{method:"DELETE"}),N===Z&&E(null),$()}catch(me){u("Fehler",`Löschen fehlgeschlagen: ${me.message||me}`)}})}return r?l.jsx("div",{className:"py-16 text-center text-xs text-muted-foreground",children:"Werkbank wird geladen …"}):n?l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",String(n),")."]}):l.jsxs("div",{className:"space-y-5",children:[l.jsx(nR,{running:z,capacityBytes:ve,realUsedBytes:U,selected:N,onSelect:E}),l.jsxs("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(dh,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/60"}),l.jsx("input",{value:A,onChange:Z=>P(Z.target.value),placeholder:"Modell suchen …",className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 pl-8 pr-2 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-primary/50 focus:outline-none"})]}),l.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:["all","in_use"].map(Z=>l.jsx("button",{onClick:()=>O(Z),className:ee("rounded-md px-2 py-1 text-[9px] font-bold uppercase transition-all cursor-pointer",_===Z?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:Z==="all"?"Alle":"In Benutzung"},Z))})]}),l.jsx("div",{className:"max-h-[60vh] space-y-1.5 overflow-y-auto scrollbar-thin pr-1",children:ue.length===0?l.jsx("div",{className:"rounded-xl border border-dashed border-border/50 p-8 text-center text-xs text-muted-foreground",children:"Keine Modelle."}):ue.map(Z=>{const ae=v.includes(Z.name),me=N===Z.name,re=ff(Z.name),ye=hf(Z.role);return l.jsxs("button",{onClick:()=>E(Z.name),className:ee("flex w-full items-center gap-2.5 rounded-xl border p-2.5 text-left transition-all cursor-pointer",me?"border-primary/60 bg-primary/10":"border-border/40 bg-background/20 hover:border-primary/30 hover:bg-background/40"),children:[l.jsx("span",{className:ee("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border text-[10px] font-bold",re.color),children:re.initial}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"truncate font-mono text-xs font-semibold text-foreground",children:Ua(Z.name)}),l.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[Z.role&&l.jsx("span",{className:ee("h-2 w-2 rounded-sm",ye.dot)}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:Z.role?ct(Z.role).short:"keine Rolle"}),l.jsxs("span",{className:"text-[10px] text-muted-foreground/50",children:["· ",or(Z.size_bytes)]})]})]}),ae?l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[9px] font-bold uppercase text-emerald-400",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]}):Z.incomplete?l.jsx("span",{className:"shrink-0 text-[9px] font-bold uppercase text-amber-400",children:"⚠ fehlt"}):l.jsx("span",{className:"shrink-0 text-[9px] font-semibold uppercase text-muted-foreground/50",children:"bereit"})]},Z.name)})})]}),l.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:pe?l.jsx(aR,{m:pe,warm:v.includes(pe.name),expert:m,protectedRole:b(pe.role),coresident:S(pe.name),onLoad:()=>se(pe.name),onUnload:()=>X(pe.name),onRole:Z=>ne(Z,pe.name),onCtx:()=>te(pe.name,pe.ctx),onSpec:()=>B(pe),onDelete:()=>I(pe.name)}):l.jsxs("div",{className:"flex h-full min-h-[16rem] flex-col items-center justify-center gap-2 text-center text-muted-foreground",children:[l.jsx(pi,{className:"h-8 w-8 opacity-40"}),l.jsx("p",{className:"text-sm font-semibold",children:"Links ein Modell wählen"}),l.jsx("p",{className:"text-xs",children:"Dann verwaltest du es hier — laden, Rolle, Kontext, löschen."})]})})]}),T&&l.jsx(Q5,{model:T,onClose:()=>B(null),onChanged:$}),h]})}function aR({m:e,warm:t,expert:r,protectedRole:n,coresident:i,onLoad:o,onUnload:u,onRole:c,onCtx:f,onSpec:h,onDelete:m}){const g=ff(e.name),v=t&&n;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("span",{className:ee("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border text-sm font-bold",g.color),children:g.initial}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h2",{className:"break-all font-mono text-sm font-bold text-foreground",children:Ua(e.name)}),l.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.role?l.jsx(lo,{role:e.role}):l.jsx("span",{className:"rounded border border-dashed border-border/50 px-1.5 py-0.5 text-[10px] text-muted-foreground",children:"keine Rolle"}),n&&l.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 text-[10px] text-muted-foreground",title:"Lebenswichtig — geschützt",children:[l.jsx(qN,{className:"mr-0.5 inline h-3 w-3"}),"geschützt"]}),i&&l.jsxs("span",{className:"rounded border border-fuchsia-500/30 bg-fuchsia-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase text-fuchsia-300",children:[l.jsx(xa,{className:"mr-0.5 inline h-3 w-3"}),"Ko-resident"]}),t&&l.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold uppercase text-emerald-400",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]})]})]})]}),l.jsxs("button",{onClick:t?u:o,disabled:e.incomplete&&!t||v,className:ee("flex h-11 w-full items-center justify-center gap-2 rounded-xl border text-sm font-bold transition-all cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",t?"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/20"),title:v?`„${ct(e.role).label}" bleibt geladen (geschützt).`:void 0,children:[t?l.jsx(UM,{className:"h-4 w-4"}):l.jsx(YN,{className:"h-4 w-4"}),v?"🔒 bleibt geladen":t?"Entladen":"Ins Warm-Set laden"]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsx("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Rolle"}),l.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[l.jsx(rk,{active:!e.role,onClick:()=>c(""),dot:"bg-slate-400",label:"keine"}),L0.map(b=>l.jsx(rk,{active:e.role===b.role,onClick:()=>c(b.role),dot:hf(b.role).dot,label:b.short},b.role))]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[l.jsx(oR,{icon:fa,label:"Größe",value:or(e.size_bytes)}),l.jsxs("button",{onClick:f,className:"group flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5 text-left transition-colors hover:border-primary/40 cursor-pointer",children:[l.jsx(QN,{className:"h-4 w-4 text-primary/80"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"Kontext · ändern"}),l.jsx("div",{className:"font-semibold text-foreground",children:kv(e.ctx)})]})]})]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Beschleuniger"}),r&&l.jsxs("button",{onClick:h,className:ee("flex h-6 items-center gap-1 rounded-lg border px-2 text-[9px] font-bold uppercase transition-colors cursor-pointer",e.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":e.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),children:[l.jsx(ga,{className:"h-3 w-3"})," Spec"]})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.spec_active&&l.jsx(Pd,{tone:"emerald",label:"Spec-Decoding aktiv"}),!e.spec_active&&e.spec_draft_model&&l.jsx(Pd,{tone:"amber",label:"Spec inaktiv"}),e.prompt_cache&&l.jsx(Pd,{tone:"cyan",label:"Prompt-Cache"}),e.parallel_slots>1&&l.jsx(Pd,{tone:"violet",label:`${e.parallel_slots} Slots`}),!e.spec_active&&!e.spec_draft_model&&!e.prompt_cache&&e.parallel_slots<=1&&l.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:"keine aktiv"})]})]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:l.jsx(jv,{caps:e.capabilities})}),l.jsxs("button",{onClick:m,disabled:n,className:ee("mt-auto flex h-9 items-center justify-center gap-1.5 rounded-lg border text-xs font-semibold transition-colors",n?"cursor-not-allowed border-border/30 text-muted-foreground/40":"border-red-500/30 text-red-400 hover:bg-red-500/10 cursor-pointer"),children:[l.jsx(uf,{className:"h-3.5 w-3.5"})," ",n?"geschützt — nicht löschbar":"Modell löschen"]})]})}function rk({active:e,onClick:t,dot:r,label:n}){return l.jsxs("button",{onClick:t,className:ee("flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[10px] font-semibold transition-all cursor-pointer",e?"border-primary/60 bg-primary/15 text-foreground":"border-border/40 bg-background/20 text-muted-foreground hover:border-primary/30"),children:[l.jsx("span",{className:ee("h-2 w-2 rounded-sm",r)}),n,e&&l.jsx(Qt,{className:"h-3 w-3 text-primary"})]})}function oR({icon:e,label:t,value:r}){return l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5",children:[l.jsx(e,{className:"h-4 w-4 text-primary/80"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:t}),l.jsx("div",{className:"font-semibold text-foreground",children:r})]})]})}function Pd({tone:e,label:t}){const r={emerald:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",amber:"bg-amber-500/10 text-amber-400 border-amber-500/20",cyan:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",violet:"bg-violet-500/10 text-violet-400 border-violet-500/20"}[e];return l.jsx("span",{className:ee("rounded border px-1.5 py-0.5 text-[10px] font-semibold",r),children:t})}const sR=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],lR=["fast","heavy","coder","vision","hermes","scout"],uR=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function nk(e){return uR.format(e)}function cR(){const{data:e}=wi(),t=(e==null?void 0:e.models)??[],[r,n]=y.useState(""),[i,o]=y.useState([]),[u,c]=y.useState(!1),[f,h]=y.useState(""),[m,g]=y.useState("popular"),[v,b]=y.useState(""),[j,k]=y.useState(null),[S,N]=y.useState([]),[E,A]=y.useState("Q4_K_M"),[P,_]=y.useState(""),[O,T]=y.useState(null),[B,$]=y.useState(!1),[z,Q]=y.useState({});async function U(M){c(!0),h("");try{const H=await we(`/api/hf/search?q=${encodeURIComponent(M)}`);o(H.results),H.results.length||h("Keine Ergebnisse.")}catch(H){h(`Suche fehlgeschlagen: ${H}`)}finally{c(!1)}}y.useEffect(()=>{U("")},[]);function ve(M){g(M.key),n(""),U(M.q)}function ue(){g(""),U(r)}async function pe(M,H,ie){$(!1);try{const J=await we(`/api/fit?params_b=0&quant=${encodeURIComponent(H)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(ie)}`);T(J)}catch{T(null)}}async function oe(M){if(j===M){k(null);return}k(M),N([]),T(null),_(""),$(!1),h("Analysiere Repository…");try{const H=await we(`/api/hf/quants?repo=${encodeURIComponent(M)}`);N(H.quants);const ie=H.quants.includes("Q4_K_M")?"Q4_K_M":H.quants[0]||"Q4_K_M";A(ie),h(H.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),H.quants.length&&pe(H.repo,ie,"")}catch(H){h(`Fehler: ${H}`)}}function se(){const M=v.trim();M&&(o(H=>H.some(ie=>ie.repo===M)?H:[{repo:M,downloads:0,likes:0},...H]),b(""),oe(M))}const X=P?t.find(M=>(M.role||"").toLowerCase()===P):void 0;async function ne(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!B){$(!0);return}Q(H=>({...H,[M]:"Starte…"}));try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:P||void 0,jinja:!0})}),Q(H=>({...H,[M]:"Download läuft"})),$(!1)}catch{Q(ie=>({...ie,[M]:"Fehler"}))}}const te=M=>{var ie;const H=((ie=M.split("/").pop())==null?void 0:ie.toLowerCase().replace(/-gguf$/i,""))||"";return H.length>3&&t.some(J=>J.name.toLowerCase().includes(H))},I=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(dh,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),l.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),l.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:sR.map(M=>l.jsxs("button",{onClick:()=>ve(M),className:ee("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&l.jsx(AM,{className:"h-3 w-3"}),M.label]},M.key))}),u?l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):l.jsxs("div",{className:"space-y-2",children:[i.map(M=>{const H=j===M.repo,ie=te(M.repo),J=M.repo.includes("/")?M.repo.split("/")[0]:"—",Z=M.repo.split("/").pop();return l.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md transition-all",H?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[l.jsxs("button",{onClick:()=>oe(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:Z}),ie&&l.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[l.jsx(Qt,{className:"h-2.5 w-2.5"})," installiert"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[l.jsx("span",{children:J}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(Rs,{className:"h-3 w-3"})," ",nk(M.downloads)]}),M.likes>0&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(_M,{className:"h-3 w-3"})," ",nk(M.likes)]})]})]}),H?l.jsx(UN,{className:"h-4 w-4 text-muted-foreground shrink-0"}):l.jsx(BN,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),H&&l.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:S.length===0?l.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),l.jsx("select",{value:E,onChange:ae=>{A(ae.target.value),pe(M.repo,ae.target.value,P)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:S.map(ae=>l.jsx("option",{value:ae,className:"bg-popover text-foreground",children:ae},ae))}),l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),l.jsxs("select",{value:P,onChange:ae=>{_(ae.target.value),pe(M.repo,E,ae.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[l.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),lR.map(ae=>l.jsx("option",{value:ae,className:"bg-popover text-foreground",children:ae},ae))]}),l.jsx("button",{onClick:()=>ne(M.repo),disabled:!!z[M.repo]&&z[M.repo]==="Download läuft",className:ee("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",B?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:z[M.repo]?z[M.repo]:B?l.jsxs(l.Fragment,{children:[l.jsx(Er,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):l.jsxs(l.Fragment,{children:[l.jsx(Rs,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&l.jsxs("div",{className:ee("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",I(O.fit.level)),children:[l.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),l.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?l.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):l.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),X&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-400",children:[l.jsx(Er,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),l.jsxs("span",{children:["Rolle ",l.jsxs("strong",{children:["„",P,'"']})," hält aktuell ",l.jsx("strong",{children:X.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!i.length&&!u&&l.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),l.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),l.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&se(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground font-mono"}),l.jsx("button",{onClick:se,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Laden"})]})]})}const dR={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ga},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:xa},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Ds},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:bu},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:pM},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:dv}};function fR(){const{data:e,isLoading:t,error:r}=qD(),{data:n}=wi(),{data:i}=xh(),o=(n==null?void 0:n.models)??[],u=r?String(r):"",[c,f]=y.useState({}),[h,m]=y.useState({}),[g,v]=y.useState("recommended");async function b(j,k,S,N){f(E=>({...E,[j]:"Starte..."}));try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(E=>({...E,[j]:"Download läuft"}))}catch{f(A=>({...A,[j]:"Fehler"}))}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([j,k])=>l.jsx("button",{onClick:()=>v(j),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",g===j?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:k},j))}),g==="browse"?l.jsx(cR,{}):t?l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",u,")."]}):l.jsxs("div",{className:"space-y-8",children:[l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[l.jsxs("div",{children:["Modell-Registry geladen für ",l.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(ZM,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),l.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),l.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=dR[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:VN},S=k.icon,N=o.find(T=>T.role===j.role||(T.aliases||[]).includes(j.role)),E=i==null?void 0:i.model_list.find(T=>T.role===j.role),A=j.models.find(T=>T.repo===j.recommended)||j.models[0];if(!A)return null;const P=c[A.repo],_=j.models.filter(T=>T.repo!==j.recommended),O=!!h[j.role];return l.jsxs("div",{className:ee("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:l.jsx(S,{className:"h-5.5 w-5.5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),l.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",j.role]})]})]}),N?l.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):l.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),l.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[l.jsxs("span",{children:["Größe: ",wv(N.size_bytes||0)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:A.name,children:A.name}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[l.jsxs("span",{children:["Ersteller: ",A.author]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Quant: ",A.quant]})]}),l.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:l.jsx(tR,{fit:A.fit})})]})}),l.jsx("div",{className:"pt-1",children:N?E?l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),l.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>b(E.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!c[E.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[l.jsx(Rs,{className:"h-3.5 w-3.5"}),c[E.repo]||"Auf neue Version aktualisieren"]})]}):l.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[l.jsx(Qt,{className:"h-4 w-4"})," Auf neuestem Stand"]}):l.jsxs("button",{onClick:()=>b(A.repo,j.role,A.quant||"Q4_K_M",A.caps.tools!=="no"),disabled:!!P,className:ee("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",P?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[l.jsx(Rs,{className:"h-3.5 w-3.5"}),P||"Optimales Modell einsetzen"]})})]}),_.length>0&&l.jsxs("div",{className:"border-t border-border/20 pt-3",children:[l.jsxs("button",{onClick:()=>m(T=>({...T,[j.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?l.jsx(UN,{className:"h-3 w-3"}):l.jsx(BN,{className:"h-3 w-3"}),l.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&l.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(T=>l.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:T.name,children:T.name}),l.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[l.jsxs("span",{children:["Quant: ",T.quant]}),l.jsx("span",{children:"•"}),l.jsx("span",{children:T.fit.text})]})]}),l.jsx("button",{onClick:()=>b(T.repo,j.role,T.quant||"Q4_K_M",T.caps.tools!=="no"),disabled:!!c[T.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:c[T.repo]||"Installieren"})]},T.repo))})]})]},j.role)})})]})]})}function hR(){const[e,t]=y.useState("cockpit");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),l.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>l.jsx("button",{onClick:()=>t(r),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Werkbank":"Modelle finden"},r))})]}),l.jsx(ZD,{}),l.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?l.jsx(iR,{}):l.jsx(fR,{})})]})}const mR={zed:"Zed: settings.json",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function ik({line:e,loading:t}){return t||!e?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[l.jsx(Qs,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[l.jsx(HN,{className:"h-3 w-3"})," ",e.detail]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[l.jsx(wM,{className:"h-3 w-3"})," ",e.detail]})}function ak({tool:e,fileName:t,accent:r,copied:n,onCopy:i}){return l.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[l.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),l.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),l.jsx("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:l.jsx("span",{children:t})}),l.jsxs("button",{onClick:i,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[n?l.jsx(Qt,{className:"h-3.5 w-3.5 text-emerald-400"}):l.jsx(fv,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),l.jsx("pre",{className:ee("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:l.jsx("code",{children:e.snippet})})]})}function Y5(){const[e,t]=y.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=y.useState(localStorage.getItem("mc_mcp_path")||""),[i,o]=y.useState("zed"),[u,c]=y.useState(null),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:m}=YD(f.toString()),{data:g,isLoading:v}=V5(),b=m?String(m):"";function j(E){t(E),E&&localStorage.setItem("mc_host",E)}function k(E){n(E),localStorage.setItem("mc_mcp_path",E)}const S=h==null?void 0:h.tools[i];async function N(E,A){A&&(await navigator.clipboard.writeText(A),c(E),setTimeout(()=>c(null),1500))}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Binde deinen lokalen Agenten an die Box an — über ",l.jsx("span",{className:"text-foreground",children:"zwei getrennte Leitungen"}),": das Modell (Gateway) und das geteilte Gedächtnis (MCP)."]})]}),l.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[l.jsx(IM,{className:"h-7 w-7 mx-auto text-muted-foreground"}),l.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),l.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Cline · Cursor · Zed …"})]}),l.jsxs("div",{className:"flex flex-col gap-2.5",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(of,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[l.jsx(pi,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),l.jsx(ik,{line:g==null?void 0:g.gateway,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(of,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[l.jsx(xa,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),l.jsx(ik,{line:g==null?void 0:g.memory,loading:v})]}),l.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]})]})]}),l.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",l.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",l.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," — beide werden unabhängig eingerichtet."]})]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(OM,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),l.jsx("input",{value:e,onChange:E=>j(E.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[l.jsx(CM,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",l.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),l.jsx("input",{value:r,onChange:E=>k(E.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-violet-500/50 text-foreground"})]})]}),b&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",b]}),h&&l.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(h.tools).map(([E,A])=>l.jsx("button",{onClick:()=>o(E),className:ee("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",i===E?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:A.label},E))}),S&&l.jsxs(l.Fragment,{children:[S.note&&l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(Nw,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),l.jsx("span",{children:S.note})]}),l.jsx(ak,{tool:S,fileName:mR[i]||"config.json",accent:"teal",copied:u==="model",onCopy:()=>N("model",S.snippet)})]})]}),l.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[l.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",l.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",l.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),l.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[l.jsx(Nw,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),l.jsx("span",{children:h.memory.note})]}),l.jsx(ak,{tool:h.memory,fileName:"mcp.json",accent:"violet",copied:u==="memory",onCopy:()=>N("memory",h.memory.snippet)})]})]})]})}const pR="modulepreload",gR=function(e){return"/"+e},ok={},vR=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=u(r.map(h=>{if(h=gR(h),h in ok)return;ok[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":pR,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,j)=>{v.addEventListener("load",b),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return i.then(u=>{for(const c of u||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};class yR extends y.Component{constructor(){super(...arguments);Zo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?l.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[l.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),l.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const xR=y.lazy(()=>vR(()=>import("./GraphView-BRTrAXdV.js"),[]).then(e=>({default:e.GraphView}))),Od=["identity","knowledge","rules","events"],sk=new Set(["auto","agent","hermes"]),mg={identity:{label:"Identität",icon:eI,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:Ys,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:GM,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:WN,bg:"bg-amber-500/10",text:"text-amber-400"}},lk={label:"Gedächtnis",icon:cv,text:"text-muted-foreground"},bR={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},uk=`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 X5(){const[e,t]=y.useState(""),[r,n]=y.useState(""),[i,o]=y.useState(""),[u,c]=y.useState("knowledge"),[f,h]=y.useState(!1),[m,g]=y.useState(!1),[v,b]=y.useState("liste"),[j,k]=y.useState(!1),S=Kn(),{showAlert:N,showConfirm:E,dialogElement:A}=ba(),{data:P=[]}=bv({}),{data:_=[],error:O}=bv({q:r,category:e}),{data:T}=KD(v==="graph"),B=O?String(O):"",$=()=>{S.invalidateQueries({queryKey:["memory"]}),S.invalidateQueries({queryKey:["memory-graph"]})},z=y.useMemo(()=>{const I=P.length,M=P.filter(H=>sk.has(H.source)).length;return{total:I,auto:M,manual:I-M,cats:new Set(P.map(H=>H.category)).size}},[P]),Q=P.length===0,U=y.useMemo(()=>{const I=T??{nodes:[],edges:[]};if(!r.trim())return I;const M=r.toLowerCase(),H=I.nodes.filter(J=>J.content.toLowerCase().includes(M)),ie=new Set(H.map(J=>J.id));return{nodes:H,edges:I.edges.filter(J=>ie.has(J.source)&&ie.has(J.target))}},[T,r]),ve=y.useMemo(()=>{const I={};return _.forEach(M=>{var H;(I[H=M.category]??(I[H]=[])).push(M)}),I},[_]),ue=y.useMemo(()=>_.filter(I=>!Od.includes(I.category)),[_]);async function pe(){i.trim()&&(await we("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:u,source:"ui"})}),o(""),k(!1),$())}function oe(I){E("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await we(`/api/memory/${I}`,{method:"DELETE"}),$()}catch(M){N("Fehler",`Löschen fehlgeschlagen: ${M.message||M}`)}})}async function se(){try{await navigator.clipboard.writeText(uk),g(!0),setTimeout(()=>g(!1),1800)}catch{N("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function X(){se(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function ne(){h(!0);try{const I=await we("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(I.duplicate_count===0){N("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}E("Deduplizierung bestätigen",`${I.duplicate_count} Dublette(n) in ${I.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await we("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),$()}catch(M){N("Fehler",`Fehler beim Löschen: ${M.message}`)}})}catch(I){N("Fehler",`Fehler bei der Deduplizierung: ${I.message}`)}finally{h(!1)}}const te=({value:I,label:M,accent:H})=>l.jsxs("span",{className:ee("flex items-center gap-1.5 text-[11px] rounded-lg px-2.5 py-1 border",H==="auto"?"text-emerald-400 bg-emerald-500/[0.07] border-emerald-500/20":"text-muted-foreground bg-card/40 border-border/50"),children:[H==="auto"&&l.jsx(hs,{className:"h-3 w-3"}),l.jsx("b",{className:ee("font-semibold",H==="auto"?"":"text-foreground"),children:I})," ",M]});return l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geteilte Konstitution — Hermes, IDEs & Gateway lesen und lernen hier per MCP."})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("div",{className:"relative",children:[l.jsx("input",{value:r,onChange:I=>n(I.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-52 h-9 pl-8 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),l.jsx(dh,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),l.jsxs("button",{onClick:()=>k(I=>!I),className:"h-9 px-3 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[l.jsx(hv,{className:"h-4 w-4"})," Eintrag"]}),l.jsx("div",{className:"flex items-center gap-1 p-1 bg-card/30 border border-border/40 rounded-lg",children:[["liste",LM,"Liste"],["graph",qM,"Graph"]].map(([I,M,H])=>l.jsxs("button",{onClick:()=>b(I),className:ee("flex h-7 px-2.5 items-center gap-1.5 text-[11px] font-semibold rounded-md transition-all cursor-pointer",v===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(M,{className:"h-3.5 w-3.5"})," ",H]},I))}),l.jsx("button",{onClick:ne,disabled:f,className:"flex h-9 w-9 items-center justify-center rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50","aria-label":"Duplikate bereinigen",title:"Deduplizieren",children:l.jsx(hs,{className:"h-4 w-4 text-primary","aria-hidden":"true"})})]})]}),!Q&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(te,{value:z.total,label:"Fakten"}),l.jsx(te,{value:z.auto,label:"auto gelernt",accent:"auto"}),l.jsx(te,{value:z.manual,label:"manuell"}),l.jsx(te,{value:z.cats,label:"Kategorien"}),l.jsxs("span",{className:"ml-auto text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(hs,{className:"h-3 w-3 text-emerald-400"})," lernt automatisch aus Hermes-Gesprächen"]})]}),j&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),l.jsx("button",{onClick:()=>k(!1),"aria-label":"Schließen",className:"text-muted-foreground hover:text-foreground",children:l.jsx(gi,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("textarea",{value:i,onChange:I=>o(I.target.value),rows:2,"aria-label":"Eintragstext",placeholder:"Eine Regel, Vorliebe oder einen stabilen Fakt über dich oder das Projekt…",className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("select",{value:u,onChange:I=>c(I.target.value),"aria-label":"Kategorie",className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 text-xs outline-none font-semibold text-foreground cursor-pointer",children:Od.map(I=>{var M;return l.jsx("option",{value:I,className:"bg-popover text-foreground",children:((M=mg[I])==null?void 0:M.label)||I},I)})}),l.jsxs("button",{onClick:pe,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[l.jsx(hv,{className:"h-4 w-4"})," Speichern"]})]})]}),B&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler: ",B]}),Q?l.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[l.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:l.jsx(zM,{className:"h-7 w-7 text-primary"})}),l.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[l.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),l.jsxs("div",{className:"w-full max-w-lg text-left",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),l.jsx("button",{onClick:se,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?l.jsxs(l.Fragment,{children:[l.jsx(Qt,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):l.jsxs(l.Fragment,{children:[l.jsx(fv,{className:"h-3 w-3"})," Kopieren"]})})]}),l.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:uk})]}),l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[l.jsxs("button",{onClick:X,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[l.jsx(e5,{className:"h-4 w-4"})," Im Terminal starten"]}),l.jsxs("button",{onClick:se,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?l.jsx(Qt,{className:"h-4 w-4 text-emerald-400"}):l.jsx(fv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),l.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[l.jsx(VM,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",l.jsx("button",{onClick:()=>k(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):v==="graph"?l.jsx(yR,{children:l.jsx(y.Suspense,{fallback:l.jsx("div",{className:"h-[480px] rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:l.jsx(xR,{data:U,onDelete:oe})})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl w-fit",children:[l.jsx("button",{onClick:()=>t(""),className:ee("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Od.map(I=>{const M=mg[I]||lk,H=M.icon;return l.jsxs("button",{onClick:()=>t(I),className:ee("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1",e===I?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[l.jsx(H,{className:"h-3 w-3"})," ",M.label]},I)})]}),_.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):l.jsx("div",{className:"space-y-5",children:[...Od,"__other"].map(I=>{const M=I==="__other"?ue:ve[I]||[];if(!M.length)return null;const H=mg[I]||lk,ie=H.icon;return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[l.jsx(ie,{className:ee("h-3.5 w-3.5",H.text)}),l.jsx("span",{className:ee("text-[11px] font-bold uppercase tracking-wider",H.text),children:H.label}),l.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1.5 py-0.5",children:M.length}),l.jsx("div",{className:"ml-1 h-px flex-1 bg-border/30"})]}),l.jsx("div",{className:"space-y-2",children:M.map(J=>{const Z=sk.has(J.source);return l.jsxs("div",{className:ee("flex items-start justify-between gap-4 p-3.5 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 hover:border-primary/20 transition-all group",bR[J.category]||"border-l-muted"),children:[l.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:J.content}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[typeof J.score=="number"&&l.jsxs("span",{className:"text-[9px] font-mono text-primary bg-primary/10 px-1.5 py-0.5 rounded",title:"Relevanz der semantischen Suche",children:[Math.round(J.score*100),"%"]}),l.jsxs("span",{className:ee("flex items-center gap-1 text-[9px] font-mono px-1.5 py-0.5 rounded",Z?"text-emerald-400 bg-emerald-500/10":"text-muted-foreground/60 bg-background/20"),title:Z?"Automatisch gelernt":"Manuell angelegt",children:[Z&&l.jsx(hs,{className:"h-2.5 w-2.5"}),J.source]}),l.jsx("button",{onClick:()=>oe(J.id),"aria-label":"Eintrag löschen",title:"Eintrag löschen",className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",children:l.jsx(uf,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]},J.id)})})]},I)})})]}),A]})}const wR=["chat","coding","fast","heavy"];function Z5(){const{data:e,error:t}=yh(5e3),{data:r}=wi(),{showAlert:n,dialogElement:i}=ba(),o=Kn(),u=t?String(t):"",[c,f]=y.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await we("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:Fe.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function g(v){try{await we("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:Fe.agentStatus}),o.invalidateQueries({queryKey:Fe.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",l.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.terminal_url)&&l.jsxs("a",{href:df(e.terminal_url),target:"_blank",rel:"noopener",className:ee("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.terminal_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[l.jsx(ch,{className:"h-4 w-4"}),l.jsx("span",{children:"Terminal öffnen"})]})]}),u&&l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",u,")."]}),e&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(Jr,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[l.jsxs("button",{onClick:()=>e.terminal_reachable&&window.open(df(e.terminal_url),"_blank"),title:e.terminal_reachable?"Hermes-Terminal öffnen":"Terminal offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(uh,{className:ee("h-3.5 w-3.5",e.terminal_reachable?"text-emerald-400":"text-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Terminal"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.terminal_reachable?"bg-emerald-500":"bg-amber-500")})]}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"hermes chat · Clients"})]}),l.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),l.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[l.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[l.jsx(Jr,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),l.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),l.jsxs("span",{className:ee("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[l.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),l.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[l.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(pi,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),l.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),l.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Vu,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),l.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[l.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),l.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),l.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),l.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Ew,{className:"h-3.5 w-3.5 text-primary"}),l.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),l.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),l.jsxs("div",{className:ee("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ew,{className:"h-5 w-5 text-primary"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),l.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("p",{children:["Der ",l.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",l.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),l.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",l.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),l.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?l.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[l.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),l.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",l.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",l.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",l.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),l.jsxs("p",{children:["Starte ",l.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",l.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),l.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ys,{className:"h-5 w-5 text-amber-500"}),l.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[l.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),l.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",l.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),l.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[l.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),l.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-terminal"})]}),l.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",l.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&c&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:l.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(pi,{className:"h-4 w-4"}),l.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),l.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(gi,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:wR.map(v=>{const b=e.brain_model===v;return l.jsxs("button",{onClick:()=>m(v),className:ee("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&l.jsx(Qt,{className:"h-3.5 w-3.5"})]},v)})}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",l.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),l.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var j;const b=v.role==="hermes";return l.jsxs("button",{onClick:()=>!b&&g(v.name),disabled:b||v.incomplete,className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[l.jsxs("div",{className:"flex flex-col min-w-0",children:[l.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(j=v.name.split("/").pop())==null?void 0:j.replace(/\.gguf$/i,"")}),l.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?l.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[l.jsx(Qt,{className:"h-3.5 w-3.5"})," Aktiv"]}):l.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),l.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[l.jsx("span",{children:"💡"}),l.jsxs("span",{children:["Für einen ",l.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),i]})}function kR(){const{data:e}=yh(5e3),t=e!=null&&e.hermes_ui_url?df(e.hermes_ui_url):void 0,r=e==null?void 0:e.hermes_ui_reachable;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Hermes GUI"}),l.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Die eingebaute Hermes-Weboberfläche — Threads, sichtbare Tool-Calls & Chat, direkt im Cockpit statt im Terminal."})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[l.jsx("span",{className:`h-2 w-2 rounded-full ${r?"bg-emerald-500 animate-pulse":"bg-amber-500"}`}),r?"online":"offline"]}),t&&l.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[l.jsx(ch,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?l.jsxs("div",{className:"relative min-h-[68vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&l.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[l.jsx(Er,{className:"h-8 w-8 text-amber-400"}),l.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Hermes-GUI nicht erreichbar"}),l.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",l.jsx("code",{className:"font-mono text-primary",children:"hermes-builtin-ui"}),"-Dienst (",l.jsx("code",{className:"font-mono",children:"hermes serve"}),") läuft nicht. Auf der Box: ",l.jsx("code",{className:"font-mono",children:"systemctl --user restart hermes-builtin-ui"}),"."]})]}),l.jsx("iframe",{src:t,title:"Hermes GUI",className:"h-full w-full border-0",style:{minHeight:"68vh"}})]}):l.jsxs("div",{className:"flex min-h-[68vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[l.jsx(Jr,{className:"mr-2 h-4 w-4"})," Lade Hermes-GUI…"]})]})}function jR(){const{data:e}=yh(5e3),t=e!=null&&e.box_console_url?df(e.box_console_url):void 0,r=e==null?void 0:e.box_console_reachable;return l.jsxs("div",{className:"flex h-full flex-col gap-4",children:[l.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Konsole"}),l.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",r?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r?"online":"offline"]}),t&&l.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[l.jsx(ch,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?l.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&l.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[l.jsx(Er,{className:"h-8 w-8 text-amber-400"}),l.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),l.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",l.jsx("code",{className:"font-mono text-primary",children:"box-console"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",l.jsx("code",{className:"font-mono",children:"systemctl --user restart box-console"}),"."]})]}),l.jsx("iframe",{src:t,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):l.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[l.jsx(lf,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}const ck=[{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 SR(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Ir({id:e,icon:t,color:r,title:n,kicker:i,children:o,wide:u}){return l.jsxs("section",{id:e,className:ee("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",u&&"md:col-span-2"),children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(t,{className:ee("h-5 w-5 shrink-0",r)}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),i&&l.jsx("span",{className:ee("text-[9px] font-mono",r),children:i})]})]}),l.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function La({children:e}){return l.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[l.jsx(hs,{className:"h-3 w-3"})," Bei dir konkret"]}),l.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function ze({children:e}){return l.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function kt({href:e,name:t,note:r}){return l.jsxs("li",{className:"leading-relaxed",children:[l.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,l.jsx(fM,{className:"h-3 w-3 opacity-60"})]}),l.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function NR(){const[e,t]=y.useState(!1);return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[l.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:l.jsx(cv,{className:"h-6 w-6 text-primary"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Die AI-Bibel"}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",l.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",l.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),l.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:l.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx(dv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?ck:ck.slice(0,9)).map(r=>l.jsx("button",{onClick:()=>SR(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),l.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsxs(Ir,{id:"grundlagen",icon:pi,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[l.jsxs("p",{children:["Ein LLM ist im Kern ein ",l.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),l.jsxs("li",{children:[l.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",l.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),l.jsxs(Ir,{id:"moe",icon:VN,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",l.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",l.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),l.jsxs("p",{children:[l.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx(ze,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),l.jsxs("li",{children:[l.jsx(ze,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),l.jsxs(La,{children:["VRAM/RAM ist die harte Grenze — ",l.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",l.jsx(ze,{children:"Q4_K_M"}),"/",l.jsx(ze,{children:"Q6_K"}),"."]})]}),l.jsxs(Ir,{id:"lokal",icon:fh,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"llama-swap"})," — Proxy, der ",l.jsx("em",{children:"mehrere"})," Modelle hinter ",l.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx(ze,{children:"CUDA"})," NVIDIA · ",l.jsx(ze,{children:"ROCm"})," AMD · ",l.jsx(ze,{children:"Vulkan"})," herstellerübergreifend · ",l.jsx(ze,{children:"Metal"})," Apple"]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",l.jsx(ze,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",l.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),l.jsxs(La,{children:["Deine Box hat eine AMD-APU (gfx1151). ",l.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",l.jsx(ze,{children:"Vulkan/RADV"})," das offizielle ",l.jsx(ze,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",l.jsx(ze,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",l.jsx(ze,{children:"coder"})," nutzt Spec-Decoding."]})]}),l.jsxs(Ir,{id:"modelle",icon:sf,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Llama"})," (Meta), ",l.jsx("strong",{children:"Gemma"})," (Google), ",l.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"DeepSeek"}),", ",l.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{children:l.jsx("strong",{children:"Frontier (Cloud-API):"})}),l.jsx("ul",{className:"list-disc pl-4 space-y-1",children:l.jsxs("li",{children:[l.jsx("strong",{children:"Claude"})," (Anthropic), ",l.jsx("strong",{children:"GPT"})," (OpenAI), ",l.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),l.jsxs("p",{className:"pt-1",children:[l.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),l.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),l.jsxs(La,{children:["Dein Line-up via llama-swap: ",l.jsx(ze,{children:"fast"})," (Alltag/Vision/MoE) · ",l.jsx(ze,{children:"heavy"})," (schwere Logik) ·",l.jsx(ze,{children:"coder"})," · ",l.jsx(ze,{children:"scout"})," · ",l.jsx(ze,{children:"vision"})," · ",l.jsx(ze,{children:"embed"})," (fürs Gedächtnis) ·",l.jsx(ze,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",l.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),l.jsxs(Ir,{id:"gateway",icon:BM,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[l.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",l.jsx("strong",{children:"OpenAI-Format"})," (",l.jsx(ze,{children:"/v1/chat/completions"}),"). Ein",l.jsx("strong",{children:" Gateway"})," davor gibt dir ",l.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",l.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),l.jsxs("p",{children:["Die ",l.jsx(ze,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),l.jsxs(La,{children:["Dein Gateway: ",l.jsx(ze,{children:"http://192.168.178.151:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",l.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),l.jsxs(Ir,{id:"mcp",icon:wu,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[l.jsxs("p",{children:["Das ",l.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",l.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),l.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),l.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[l.jsx(qN,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),l.jsxs(Ir,{id:"skills",icon:HM,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",l.jsx(ze,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),l.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`---
|
||
name: tdd-pro
|
||
description: Treibt Entwicklung mit strikter TDD-Praxis
|
||
---
|
||
# Instructions
|
||
...`}),l.jsxs("p",{children:["Suchen & installieren über die ",l.jsx("strong",{children:"skills.sh"}),"-Registry: ",l.jsx(ze,{children:"npx skills find"})," /",l.jsx(ze,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),l.jsxs(Ir,{id:"memory",icon:NM,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["LLMs sind ",l.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",l.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:["extrahiert Fakten ",l.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),l.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),l.jsxs("li",{children:[l.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",l.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),l.jsxs(La,{children:["Dein Gedächtnis (Tab ",l.jsx("strong",{children:"Gedächtnis"}),") ist ",l.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",l.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",l.jsx(ze,{children:"Identität"})," · ",l.jsx(ze,{children:"Wissen"})," · ",l.jsx(ze,{children:"Regeln"})," · ",l.jsx(ze,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",l.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",l.jsx("br",{}),l.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),l.jsxs(Ir,{id:"agents",icon:Jr,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:["Ein ",l.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",l.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",l.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),l.jsxs(La,{children:[l.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",l.jsx(ze,{children:"fast"}),"). Reden tust du mit ihm im",l.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",l.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",l.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",l.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),l.jsxs(Ir,{id:"ide",icon:Ds,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[l.jsxs("p",{children:["Jede ",l.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Cline"})," & ",l.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Continue"}),", ",l.jsx("strong",{children:"aider"})," (CLI), ",l.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),l.jsxs(La,{children:["Tipp den Kram nicht ab: der ",l.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",l.jsx(ze,{children:"…:9001/v1"}),", Model ",l.jsx(ze,{children:"auto"}),", Key beliebig."]})]}),l.jsx(Ir,{id:"tricks",icon:RM,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:l.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>l.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[l.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[l.jsx(ga,{className:"h-3 w-3 text-amber-400"})," ",r]}),l.jsx("p",{className:"text-[11px]",children:n})]},r))})}),l.jsx(Ir,{id:"wartung",icon:Ys,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(KN,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[l.jsx(Vu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",l.jsx(ze,{children:"restore.sh"})," (Doku in ",l.jsx(ze,{children:"docs/BACKUP.md"}),")."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",l.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",l.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),l.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),l.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[l.jsx(dv,{className:"h-5 w-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),l.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(sf,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),l.jsx(kt,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),l.jsx(kt,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),l.jsx(kt,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),l.jsx(kt,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),l.jsx(kt,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(wu,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),l.jsx(kt,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),l.jsx(kt,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),l.jsx(kt,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),l.jsx(kt,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(Jr,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),l.jsx(kt,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),l.jsx(kt,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),l.jsx(kt,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),l.jsx(kt,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[l.jsx(cv,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),l.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[l.jsx(kt,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),l.jsx(kt,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),l.jsx(kt,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),l.jsx(kt,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),l.jsx(kt,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),l.jsx(Ir,{id:"troubleshooting",icon:DM,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:l.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",l.jsx(ze,{children:":9001"}),")? Backend-Status in der ",l.jsx("strong",{children:"Zentrale"})," prüfen."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",l.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",l.jsx(ze,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",l.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",l.jsx(ze,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),l.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function ER({title:e,hint:t}){return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-semibold",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[l.jsx(SM,{className:"h-8 w-8 text-muted-foreground"}),l.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const dk=[{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:"voice-service",label:"Voice (Sprache)",type:"user",reach:"voice"},{id:"hermes-terminal",label:"Hermes Terminal",type:"user",reach:"hermes-terminal"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function Zl({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:u,onAction:c}){return l.jsxs("div",{className:ee("flex items-center gap-3 rounded-lg border px-3 py-2",i?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[l.jsx(e,{className:ee("h-4 w-4 shrink-0",t)}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:r}),l.jsx("div",{className:ee("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),l.jsx("button",{onClick:c,disabled:!i||o,className:ee("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",i?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":u})]})}function AR({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return l.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[l.jsx("span",{className:ee("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),l.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&l.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),l.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:l.jsx(gs,{className:ee("h-3.5 w-3.5",n&&"animate-spin")})}),l.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:l.jsx(EM,{className:"h-3.5 w-3.5"})})]})}function pg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const CR=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,PR=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function OR(e){return CR.test(e)?"error":PR.test(e)?"warn":"info"}const _R={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function MR({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[u,c]=y.useState(!1),[f,h]=y.useState(""),m=y.useRef(null),g=y.useMemo(()=>t?t.split(`
|
||
`).map(S=>({t:S,level:OR(S)})):[],[t]),v=y.useMemo(()=>g.filter(S=>S.level!=="info").length,[g]),b=f.trim().toLowerCase(),j=g.filter(S=>(!u||S.level!=="info")&&(!b||S.t.toLowerCase().includes(b))),k=n==="password_required"||n==="incorrect_password";return l.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[l.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[l.jsx(e5,{className:"h-3 w-3 text-primary"}),l.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsxs("div",{className:"relative",children:[l.jsx(dh,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{value:f,onChange:S=>h(S.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),l.jsxs("button",{onClick:()=>c(S=>!S),title:"Nur Fehler und Warnungen zeigen",className:ee("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",u?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[l.jsx(Er,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),l.jsx("button",{onClick:i,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:l.jsx(gs,{className:ee("h-3 w-3",r&&"animate-spin")})})]})]}),l.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:k?l.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[l.jsx(Er,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),l.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),l.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),l.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?l.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):g.length===0?l.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):j.length===0?l.jsx("span",{className:"text-muted-foreground",children:u?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):j.map((S,N)=>l.jsx("div",{className:ee("whitespace-pre-wrap",_R[S.level]),children:S.t||" "},N))})]})}function IR({open:e,showAlert:t}){const[r,n]=y.useState(""),[i,o]=y.useState(""),[u,c]=y.useState(!1),[f,h]=y.useState(!1);return y.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(Ys,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:u?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),l.jsx("button",{type:"button",onClick:()=>c(!u),"aria-label":u?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:u?l.jsx(Sw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(bu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[l.jsx(MM,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:f?"text":"password",value:i,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,placeholder:"hf_…",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),l.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?l.jsx(Sw,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(bu,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),l.jsxs("div",{className:"flex gap-3 pt-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",i),t("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),l.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("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"})]})]})}function TR({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f,h;const i=e.data,o={os:{icon:Ys,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:fh,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:JN,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:Jr,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],u=o.icon,c=i?e.kind==="os"?(i.count??0)===0:e.kind==="hermes"?(i.behind??0)===0:i.installed_build!=null&&i.latest_build!=null&&i.latest_build<=i.installed_build:!0;return l.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),l.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[l.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(u,{className:ee("h-4.5 w-4.5",o.cls)}),l.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),l.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(gi,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?l.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[l.jsx(gs,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?l.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):l.jsxs(l.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&l.jsxs("div",{className:ee("flex items-start gap-2 rounded-lg border p-3",i.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[i.action_needed?l.jsx(Er,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):l.jsx(HN,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:ee("text-xs font-semibold",i.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",i.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),i.action_needed&&i.action_text&&l.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&l.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[l.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),l.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?l.jsxs(l.Fragment,{children:[((i==null?void 0:i.count)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),l.jsx("div",{className:"space-y-1",children:i.packages.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(Aw,{className:"h-3 w-3 text-cyan-400 shrink-0"}),m.name]}),l.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[l.jsx("span",{children:m.current}),l.jsx(of,{className:"h-3 w-3"}),l.jsx("span",{className:"text-emerald-400",children:m.candidate})]})]},m.name))})]}),(((f=i==null?void 0:i.held_back)==null?void 0:f.length)??0)>0&&l.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[l.jsx(WN,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),l.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),l.jsx("div",{className:"space-y-1",children:i.held_back.map(m=>l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[l.jsx(Aw,{className:"h-3 w-3 text-muted-foreground shrink-0"}),m.name]}),l.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:m.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},m.name))})]})]}):e.kind==="engine"||e.kind==="swap"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[l.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(i==null?void 0:i.installed_build)??"?"]}),l.jsx(of,{className:"h-3.5 w-3.5 text-muted-foreground"}),l.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(i==null?void 0:i.latest_build)??"?"]})]}),((i==null?void 0:i.name)||(i==null?void 0:i.latest_tag))&&l.jsxs("div",{className:"text-muted-foreground",children:["Release: ",l.jsx("span",{className:"text-foreground",children:i==null?void 0:i.name}),i!=null&&i.latest_tag?` (${i.latest_tag})`:""]}),(i==null?void 0:i.url)&&l.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",l.jsx(ch,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&l.jsxs("details",{className:"group",children:[l.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),l.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:i.body})]})]}):(((h=i==null?void 0:i.commits)==null?void 0:h.length)??0)===0?l.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",l.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),l.jsx("div",{className:"space-y-1",children:i.commits.map(m=>l.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[l.jsx(PM,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-[11px] truncate",children:m.subject}),l.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[m.hash," · ",m.when]})]})]},m.hash))})]}),e.kind!=="os"&&!c&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[l.jsx(ZN,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),l.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),l.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[l.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),l.jsx("button",{onClick:n,disabled:e.loading||c||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function J5({open:e,onClose:t,defaultTab:r="maintenance"}){var nt;const[n,i]=y.useState(null),[o,u]=y.useState([]),[c,f]=y.useState("llama-swap"),[h,m]=y.useState(""),[g,v]=y.useState(!1),[b,j]=y.useState(null),[k,S]=y.useState({}),[N,E]=y.useState("maintenance"),[A,P]=y.useState(!1),[_,O]=y.useState(""),[T,B]=y.useState(!1),[$,z]=y.useState(null),[Q,U]=y.useState([]),[ve,ue]=y.useState(!1),[pe,oe]=y.useState(null),[se,X]=y.useState(null);function ne(K,Le,Cr){X({type:"alert",title:K,message:Le,onConfirm:()=>{X(null),Cr&&Cr()}})}function te(K,Le,Cr){X({type:"confirm",title:K,message:Le,onConfirm:()=>{X(null),Cr()},onCancel:()=>X(null)})}function I(K){return K?new Date(K*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}y.useEffect(()=>{e&&r&&E(r)},[e,r]);function M(){we("/api/maintenance/updates").then(i).catch(K=>console.error("Error loading updates",K))}function H(){we("/api/jobs").then(K=>u(K.jobs||[])).catch(K=>console.error("Error loading jobs",K))}function ie(){we("/api/system/services").then(z).catch(()=>{})}function J(){we("/api/system/backups").then(K=>U(K.backups||[])).catch(()=>{})}function Z(K){v(!0),j(null),we(`/api/maintenance/logs?service=${K}&lines=150`).then(Le=>{Le.ok?m(Le.text):(m(`Fehler beim Laden der Logs: ${Le.err||"Unbekannter Fehler"}`),(Le.status==="incorrect_password"||Le.status==="password_required")&&j(Le.status))}).catch(Le=>m(`Fehler: ${Le.message}`)).finally(()=>v(!1))}y.useEffect(()=>{if(!e)return;M(),H(),ie(),J();const K=setInterval(()=>{H(),M(),ie()},3e3);return()=>clearInterval(K)},[e]),y.useEffect(()=>{!e||N!=="logs"||Z(c)},[e,N,c]);function ae(K){return(K==null?void 0:K.status)==="busy"?(ne("Update läuft bereits",`Es läuft gerade „${K.running}". Bitte warte, bis es fertig ist.`),H(),!0):!1}function me(K){return(K==null?void 0:K.status)==="password_required"||(K==null?void 0:K.status)==="incorrect_password"?(ne("Box-Passwort nötig",(K.status==="incorrect_password"?"Das gespeicherte Box-Passwort stimmt nicht. ":"Für dieses Update braucht die Box dein Passwort. ")+"Bitte oben im Reiter „Einstellungen“ setzen bzw. korrigieren."),!0):K&&K.ok===!1?(ne("Update fehlgeschlagen",K.err||"Unbekannter Fehler."),!0):!1}async function re(){try{const K=await we("/api/maintenance/os-update",{method:"POST"});if(ae(K)||me(K))return;H(),E("maintenance")}catch(K){ne("Fehler",`Fehler beim Starten des OS-Updates: ${K.message}`)}}async function ye(){try{const K=await we("/api/maintenance/engine-update",{method:"POST"});if(ae(K)||me(K))return;H(),E("maintenance")}catch(K){ne("Fehler",`Fehler beim Engine-Update: ${K.message}`)}}async function Oe(){try{const K=await we("/api/maintenance/swap-update",{method:"POST"});if(ae(K)||me(K))return;H(),E("maintenance")}catch(K){ne("Fehler",`Fehler beim Router-Update: ${K.message}`)}}async function de(){ue(!0);try{const K=await we("/api/maintenance/hermes-update",{method:"POST"});if(ae(K))return;H()}catch(K){ne("Fehler",`Hermes-Update fehlgeschlagen: ${K.message}`)}finally{ue(!1)}}async function Ze(K){oe({kind:K,loading:!0,data:null});try{const Le=await we(`/api/maintenance/update-details?kind=${K}`);oe({kind:K,loading:!1,data:Le})}catch(Le){oe({kind:K,loading:!1,data:{kind:K,error:Le.message}})}}function Ue(){const K=pe==null?void 0:pe.kind;oe(null),K==="os"?re():K==="engine"?ye():K==="swap"?Oe():K==="hermes"&&de()}async function _e(){P(!0);try{await we("/api/maintenance/check-updates",{method:"POST"}),H(),E("maintenance")}catch(K){ne("Fehler",`Fehler bei der Update-Suche: ${K.message}`)}finally{P(!1)}}async function xt(K,Le){try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:Le})}),ne("Gestartet",`Modell-Upgrade für '${Le}' (${K}) gestartet.`),H(),E("maintenance")}catch(Cr){ne("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Cr.message}`)}}async function Jt(){te("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await we("/api/maintenance/reboot",{method:"POST"}),ne("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(K){ne("Fehler",`Fehler beim Reboot: ${K.message}`)}})}async function G(){B(!0),O("Snapshot wird erzeugt...");try{const K=await we("/api/system/backup",{method:"POST"});O(K.ok?`Snapshot erzeugt: ${K.snapshot} (${K.files.length} Komponenten)`:"Backup fehlgeschlagen."),J()}catch(K){O(`Fehler: ${K.message}`)}finally{B(!1)}}async function Ne(K){S(Le=>({...Le,[K]:!0}));try{const Le=await we("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:K})});Le.ok?ne("Dienst neu gestartet",`Dienst ${K} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&c===K&&Z(K)}):ne("Fehler",`Fehler beim Neustart: ${Le.err||"Unbekannter Fehler"}`)}catch(Le){ne("Fehler",`Fehler beim Neustart: ${Le.message}`)}finally{S(Le=>({...Le,[K]:!1}))}}async function Pe(K){try{await we(`/api/jobs/${K}/cancel`,{method:"POST"}),H()}catch(Le){ne("Fehler",`Fehler beim Abbrechen: ${Le.message}`)}}const Ve=o.find(K=>(K.state==="running"||K.state==="queued")&&K.group==="maintenance");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ee("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),l.jsxs("div",{className:ee("fixed inset-y-0 right-0 w-full sm:w-[640px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[l.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(pi,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),l.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:l.jsx(gi,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[l.jsx("button",{onClick:()=>E("maintenance"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),l.jsx("button",{onClick:()=>E("logs"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),l.jsx("button",{onClick:()=>E("settings"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"space-y-2.5",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),l.jsxs("button",{onClick:_e,disabled:A||!!Ve,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[l.jsx(gs,{className:ee("h-3 w-3",A&&"animate-spin")})," Nach Updates suchen"]})]}),(n==null?void 0:n.last_check)&&l.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",I(n.last_check)]}),Ve&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[l.jsx(gs,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),l.jsxs("span",{children:["Update läuft: ",l.jsx("span",{className:"font-semibold",children:Ve.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(Zl,{icon:Ys,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("os")}),l.jsx(Zl,{icon:fh,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("engine")}),l.jsx(Zl,{icon:JN,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("swap")}),(()=>{var Le;const K=(Le=n==null?void 0:n.components)==null?void 0:Le.find(Cr=>Cr.key==="hermes_agent");return l.jsx(Zl,{icon:Jr,iconClass:"text-amber-400",name:"Hermes-Agent",available:(K==null?void 0:K.update)===!0,busy:ve,status:(K==null?void 0:K.update)===!0?`Update: ${K.latest}`:(K==null?void 0:K.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>Ze("hermes")})})(),(nt=n==null?void 0:n.model_list)==null?void 0:nt.map(K=>l.jsx(Zl,{icon:mM,iconClass:"text-emerald-400",name:`Modell · ${K.role}`,available:!0,status:K.title,actionLabel:"Upgrade",onAction:()=>xt(K.repo,K.role)},K.role))]})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),l.jsx("div",{className:"space-y-1.5",children:dk.map(K=>{var Le;return l.jsx(AR,{label:K.label,system:K.type==="system",ok:(Le=$==null?void 0:$.services.find(Cr=>Cr.name.toLowerCase().includes(K.reach)))==null?void 0:Le.ok,busy:k[K.id],onRestart:()=>Ne(K.id),onLogs:()=>{f(K.id),E("logs")}},K.id)})})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),l.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-xs text-foreground truncate",children:Q[0]?`Letztes: ${Q[0].snapshot}`:"Noch kein Backup"}),l.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Q.length," Snapshots · Restore per CLI (restore.sh)"]})]}),l.jsxs("button",{onClick:G,disabled:T,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[l.jsx(vM,{className:ee("h-3.5 w-3.5",T&&"animate-pulse")})," Snapshot"]})]}),_&&l.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]}),l.jsxs("div",{className:"space-y-2.5",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),l.jsxs("button",{onClick:Jt,className:"flex w-full items-center gap-3 p-3 rounded-lg border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[l.jsx(YN,{className:"h-4.5 w-4.5"}),l.jsxs("div",{children:[l.jsx("div",{children:"Host-System neu starten"}),l.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),l.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(K=>K.state==="running"||K.state==="queued").length," Aktiv"]})]}),l.jsx("div",{className:"space-y-3",children:o.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):o.map(K=>{const Le=K.state==="running"||K.state==="queued";return l.jsxs("div",{className:ee("p-3 rounded-xl border transition-all duration-300",Le?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Le&&l.jsxs("span",{className:"flex h-2 w-2 relative",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),K.label]}),l.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[l.jsxs("span",{children:["ID: ",K.id]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:ee(K.state==="done"&&"text-emerald-400",K.state==="failed"&&"text-red-400",K.state==="running"&&"text-primary",K.state==="queued"&&"text-amber-400",K.state==="canceled"&&"text-muted-foreground"),children:K.state})]})]}),Le&&l.jsx("button",{onClick:()=>Pe(K.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"})]}),K.state==="running"&&l.jsxs("div",{className:"mt-3 space-y-1",children:[l.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${K.progress??0}%`}})}),l.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[l.jsxs("span",{children:[K.progress??0,"%"]}),K.done_bytes!=null&&K.total_bytes!=null&&l.jsxs("span",{children:[pg(K.done_bytes)," / ",pg(K.total_bytes),K.rate_bps!=null&&` (${pg(K.rate_bps)}/s)`]}),K.eta_s!=null&&l.jsxs("span",{children:["ETA: ",K.eta_s,"s"]})]})]})]},K.id)})})]})]}),N==="logs"&&l.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("select",{value:c,onChange:K=>f(K.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:dk.map(K=>l.jsxs("option",{value:K.id,children:[K.label," (",K.type==="system"?"systemd-root":"user",")"]},K.id))}),l.jsxs("button",{onClick:()=>Ne(c),disabled:k[c],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[l.jsx(gs,{className:ee("h-3.5 w-3.5",k[c]&&"animate-spin")}),"Restart"]})]}),l.jsx(MR,{service:c,text:h,loading:g,logStatus:b,onRefresh:()=>Z(c),onOpenSettings:()=>E("settings")})]}),N==="settings"&&l.jsx(IR,{open:e,showAlert:ne})]})]}),pe&&l.jsx(TR,{detail:pe,maintenanceJob:Ve,onClose:()=>oe(null),onApply:Ue}),se&&l.jsx(q5,{type:se.type,title:se.title,message:se.message,onConfirm:se.onConfirm,onCancel:se.onCancel})]})}let Sv=[],Nv=[];const Ev=new Set,eE=()=>Ev.forEach(e=>e());function tE(e){return Ev.add(e),()=>{Ev.delete(e)}}function DR(e){Sv=[...Sv,e].slice(-40),eE()}function RR(e){Nv=[...Nv,e].slice(-40),eE()}const LR=()=>y.useSyncExternalStore(tE,()=>Sv),$R=()=>y.useSyncExternalStore(tE,()=>Nv);function zR(){const{data:e,dataUpdatedAt:t}=jo(3e3),{data:r,dataUpdatedAt:n}=K5(3e3),i=y.useRef(null);y.useEffect(()=>{var o,u,c,f;e&&DR({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((u=e.ram)==null?void 0:u.percent)??0,gpu:((c=e.gpu)==null?void 0:c.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),y.useEffect(()=>{if(!r)return;const o=Date.now(),u=r.prompt_tokens,c=r.completion_tokens;if(i.current){const f=Math.max((o-i.current.t)/1e3,.001);RR({t:o,prompt:Math.max(0,(u-i.current.p)/f),completion:Math.max(0,(c-i.current.c)/f)})}i.current={p:u,c,t:o}},[n])}function rE(){var P,_,O,T,B,$;const{data:e}=D0(),{data:t}=W5(),{data:r}=wi(),{data:n}=jo(),i=!!e&&!!t,o=z=>{var Q;return(Q=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes(z)))==null?void 0:Q.ok},u=e==null?void 0:e.engine_reachable,c=(P=e==null?void 0:e.brain)==null?void 0:P.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find(z=>z.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const z={id:"brain",label:"Lucys Hirn",icon:xa,critical:!0};return i?u===!1?{...z,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:c===!1?{...z,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...z,status:"ok",detail:"Wach und ansprechbar."}:{...z,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const z={id:"vision",label:"Lucys Augen",icon:bu,critical:!1};if(!i||!r)return{...z,status:"loading",detail:"Wird geprüft …"};const Q=r.models.find(ve=>ve.role==="vision");return Q?(r.running??[]).includes(Q.name)?{...z,status:"ok",detail:"Sieht Bildschirm und Bilder."}:{...z,status:"warn",detail:"Lucys Augen sind eingeschlafen — das erste Bild-Ansehen dauert dann kurz.",repair:{kind:"loadModel",model:Q.name,label:"Augen aufwecken"}}:{...z,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),h.push((()=>{const z={id:"memory",label:"Lucys Gedächtnis",icon:FN,critical:!0},Q=o("mem0");return!i||Q===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Q?{...z,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...z,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const z={id:"gateway",label:"Verbindung (Gateway)",icon:wu,critical:!0},Q=e?e.gateway_reachable:o("integriert");return!i||Q===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Q?{...z,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...z,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const z={id:"agent",label:"Lucys Agent (Hermes)",icon:Jr,critical:!0},Q=o("hermes-gateway");return!i||Q===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Q?{...z,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...z,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const z={id:"voice",label:"Lucys Stimme",icon:FM,critical:!1},Q=o("voice");return!i||Q===void 0?{...z,status:"loading",detail:"Wird geprüft …"}:Q?{...z,status:"ok",detail:"Lucy kann hören und sprechen."}:{...z,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((T=n==null?void 0:n.gpu)==null?void 0:T.gtt_total)||((B=n==null?void 0:n.gpu)==null?void 0:B.vram_total)||0,g=(($=n==null?void 0:n.gpu)==null?void 0:$.gtt_used)||0,v=m>0?Math.min(100,g/m*100):0,b=1024**3,j=m?v>=90?{status:"full",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:g/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:g/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},k=h.some(z=>z.status==="loading"),S=h.filter(z=>z.critical&&z.status==="down"),N=h.filter(z=>z.status==="warn"||!z.critical&&z.status==="down"),E=j.status==="full";return{verdict:k&&!S.length?"loading":S.length?"problem":N.length||E?"warn":"gut",checks:h,memory:j,problems:S}}const FR={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function BR({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:i}=rE(),{showAlert:o,dialogElement:u}=ba(),c=Kn(),[f,h]=y.useState({});async function m(S,N){h(E=>({...E,[S]:!0}));try{if(N.kind==="loadModel")await we(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await we("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?`
|
||
|
||
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}c.invalidateQueries({queryKey:Fe.health}),c.invalidateQueries({queryKey:Fe.services}),c.invalidateQueries({queryKey:Fe.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[S]:!1}))}}const g=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:Qs,iconCls:"text-muted-foreground animate-spin",title:g.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:GN,iconCls:"text-emerald-400",title:g.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Er,iconCls:"text-amber-400",title:g.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Er,iconCls:"text-red-400",title:g.problem,sub:`${i.length} wichtige${i.length===1?"s":""} Problem${i.length===1?"":"e"} gefunden.`}}[t],b=v.icon,j={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],k={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return l.jsxs("div",{className:ee("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:l.jsx(b,{className:ee("h-6 w-6",v.iconCls)})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[l.jsx(fa,{className:"h-3.5 w-3.5"})," Speicher"]}),l.jsx("span",{className:ee("font-mono font-bold",k),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",j),style:{width:`${n.pct}%`}})}),l.jsx("p",{className:ee("mt-1.5 text-[11px]",k),children:n.text})]}),l.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(S=>l.jsx(UR,{c:S,busy:!!f[S.id],onRepair:()=>S.repair&&m(S.id,S.repair)},S.id))}),u]})}function UR({c:e,busy:t,onRepair:r}){const n=e.icon,i=e.status==="down"||e.status==="warn";return l.jsxs("div",{className:ee("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[l.jsx(n,{className:"h-4 w-4"}),l.jsx("span",{className:ee("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",FR[e.status],e.status==="down"&&"animate-pulse")})]}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&l.jsx(Qt,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&l.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),l.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),i&&e.repair&&l.jsxs("button",{onClick:r,disabled:t,className:ee("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?l.jsx(Qs,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Vu,{className:"h-3.5 w-3.5"}),e.repair.label]}),i&&!e.repair&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[l.jsx(QM,{className:"h-3.5 w-3.5"})," manuell"]})]})}function HR(){const{data:e,error:t}=jo(3e3),r=LR();return{sys:e,hist:r,error:t}}var WR=["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 $0(e){if(typeof e!="string")return!1;var t=WR;return t.includes(e)}var KR=["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"],GR=new Set(KR);function nE(e){return typeof e!="string"?!1:GR.has(e)}function iE(e){return typeof e=="string"&&e.startsWith("data-")}function xn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(nE(r)||iE(r))&&(t[r]=e[r]);return t}function bh(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return xn(t)}return typeof e=="object"&&!Array.isArray(e)?xn(e):null}function en(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(nE(r)||iE(r)||$0(r))&&(t[r]=e[r]);return t}function VR(e){return e==null?null:y.isValidElement(e)?en(e.props):typeof e=="object"&&!Array.isArray(e)?en(e):null}var qR=["children","width","height","viewBox","className","style","title","desc"];function Av(){return Av=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},Av.apply(null,arguments)}function QR(e,t){if(e==null)return{};var r,n,i=YR(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)&&(i[r]=e[r])}return i}function YR(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 aE=y.forwardRef((e,t)=>{var r=e.children,n=e.width,i=e.height,o=e.viewBox,u=e.className,c=e.style,f=e.title,h=e.desc,m=QR(e,qR),g=o||{width:n,height:i,x:0,y:0},v=rt("recharts-surface",u);return y.createElement("svg",Av({},en(m),{className:v,width:n,height:i,style:c,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),y.createElement("title",null,f),y.createElement("desc",null,h),r)}),XR=["children","className"];function Cv(){return Cv=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},Cv.apply(null,arguments)}function ZR(e,t){if(e==null)return{};var r,n,i=JR(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)&&(i[r]=e[r])}return i}function JR(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=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=ZR(e,XR),o=rt("recharts-layer",n);return y.createElement("g",Cv({className:o},en(i),{ref:t}),r)}),eL=y.createContext(null);function vt(e){return function(){return e}}const Pv=Math.PI,Ov=2*Pv,Ha=1e-6,tL=Ov-Ha;function oE(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function rL(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return oE;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class nL{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?oE:rL(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,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,u){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+u}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let u=this._x1,c=this._y1,f=n-t,h=i-r,m=u-t,g=c-r,v=m*m+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>Ha)if(!(Math.abs(g*f-h*m)>Ha)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,j=i-c,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),E=Math.sqrt(v),A=o*Math.tan((Pv-Math.acos((k+v-S)/(2*N*E)))/2),P=A/E,_=A/N;Math.abs(P-1)>Ha&&this._append`L${t+P*m},${r+P*g}`,this._append`A${o},${o},0,0,${+(g*b>m*j)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,i,o,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),f=n*Math.sin(i),h=t+c,m=r+f,g=1^u,v=u?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>Ha||Math.abs(this._y1-m)>Ha)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%Ov+Ov),v>tL?this._append`A${n},${n},0,1,${g},${t-c},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=m}`:v>Ha&&this._append`A${n},${n},0,${+(v>=Pv)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function sE(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 nL(t)}function z0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lE(e){this._context=e}lE.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 wh(e){return new lE(e)}function uE(e){return e[0]}function cE(e){return e[1]}function dE(e,t){var r=vt(!0),n=null,i=wh,o=null,u=sE(c);e=typeof e=="function"?e:e===void 0?uE:vt(e),t=typeof t=="function"?t:t===void 0?cE:vt(t);function c(f){var h,m=(f=z0(f)).length,g,v=!1,b;for(n==null&&(o=i(b=u())),h=0;h<=m;++h)!(h<m&&r(g=f[h],h,f))===v&&((v=!v)?o.lineStart():o.lineEnd()),v&&o.point(+e(g,h,f),+t(g,h,f));if(b)return o=null,b+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:vt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:vt(+f),c):t},c.defined=function(f){return arguments.length?(r=typeof f=="function"?f:vt(!!f),c):r},c.curve=function(f){return arguments.length?(i=f,n!=null&&(o=i(n)),c):i},c.context=function(f){return arguments.length?(f==null?n=o=null:o=i(n=f),c):n},c}function _d(e,t,r){var n=null,i=vt(!0),o=null,u=wh,c=null,f=sE(h);e=typeof e=="function"?e:e===void 0?uE:vt(+e),t=typeof t=="function"?t:vt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?cE:vt(+r);function h(g){var v,b,j,k=(g=z0(g)).length,S,N=!1,E,A=new Array(k),P=new Array(k);for(o==null&&(c=u(E=f())),v=0;v<=k;++v){if(!(v<k&&i(S=g[v],v,g))===N)if(N=!N)b=v,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),j=v-1;j>=b;--j)c.point(A[j],P[j]);c.lineEnd(),c.areaEnd()}N&&(A[v]=+e(S,v,g),P[v]=+t(S,v,g),c.point(n?+n(S,v,g):A[v],r?+r(S,v,g):P[v]))}if(E)return c=null,E+""||null}function m(){return dE().defined(i).curve(u).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:vt(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:vt(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:vt(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:vt(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:vt(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:vt(+g),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(g){return arguments.length?(i=typeof g=="function"?g:vt(!!g),h):i},h.curve=function(g){return arguments.length?(u=g,o!=null&&(c=u(o)),h):u},h.context=function(g){return arguments.length?(g==null?o=c=null:c=u(o=g),h):o},h}class fE{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 iL(e){return new fE(e,!0)}function aL(e){return new fE(e,!1)}function mf(){}function pf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function hE(e){this._context=e}hE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:pf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oL(e){return new hE(e)}function mE(e){this._context=e}mE.prototype={areaStart:mf,areaEnd:mf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sL(e){return new mE(e)}function pE(e){this._context=e}pE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lL(e){return new pE(e)}function gE(e){this._context=e}gE.prototype={areaStart:mf,areaEnd:mf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function uL(e){return new gE(e)}function fk(e){return e<0?-1:1}function hk(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),u=(r-e._y1)/(i||n<0&&-0),c=(o*i+u*n)/(n+i);return(fk(o)+fk(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(c))||0}function mk(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gg(e,t,r){var n=e._x0,i=e._y0,o=e._x1,u=e._y1,c=(o-n)/3;e._context.bezierCurveTo(n+c,i+c*t,o-c,u-c*r,o,u)}function gf(e){this._context=e}gf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gg(this,this._t0,mk(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,gg(this,mk(this,r=hk(this,e,t)),r);break;default:gg(this,this._t0,r=hk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function vE(e){this._context=new yE(e)}(vE.prototype=Object.create(gf.prototype)).point=function(e,t){gf.prototype.point.call(this,t,e)};function yE(e){this._context=e}yE.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,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function cL(e){return new gf(e)}function dL(e){return new vE(e)}function xE(e){this._context=e}xE.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=pk(e),i=pk(t),o=0,u=1;u<r;++o,++u)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[u],t[u]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function pk(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,u[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,u[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,u[t]-=n*u[t-1];for(i[r-1]=u[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(u[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function fL(e){return new xE(e)}function kh(e,t){this._context=e,this._t=t}kh.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 hL(e){return new kh(e,.5)}function mL(e){return new kh(e,0)}function pL(e){return new kh(e,1)}function mo(e,t){if((u=e.length)>1)for(var r=1,n,i,o=e[t[0]],u,c=o.length;r<u;++r)for(i=o,o=e[t[r]],n=0;n<c;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function _v(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function gL(e,t){return e[t]}function vL(e){const t=[];return t.key=e,t}function yL(){var e=vt([]),t=_v,r=mo,n=gL;function i(o){var u=Array.from(e.apply(this,arguments),vL),c,f=u.length,h=-1,m;for(const g of o)for(c=0,++h;c<f;++c)(u[c][h]=[0,+n(g,u[c].key,h,o)]).data=g;for(c=0,m=z0(t(u));c<f;++c)u[m[c]].index=c;return r(u,m),u}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:vt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:vt(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?_v:typeof o=="function"?o:vt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??mo,i):r},i}function xL(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,u;i<o;++i){for(u=r=0;r<n;++r)u+=e[r][i][1]||0;if(u)for(r=0;r<n;++r)e[r][i][1]/=u}mo(e,t)}}function bL(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var u=0,c=0;u<i;++u)c+=e[u][r][1]||0;n[r][1]+=n[r][0]=-c/2}mo(e,t)}}function wL(e,t){if(!(!((u=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,u;n<o;++n){for(var c=0,f=0,h=0;c<u;++c){for(var m=e[t[c]],g=m[n][1]||0,v=m[n-1][1]||0,b=(g-v)/2,j=0;j<c;++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}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,mo(e,t)}}function Mv(e){return e==="__proto__"}function bE(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function F0(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 wE(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(wE).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function B0(e){if(Array.isArray(e))return e.map(F0);if(typeof e=="symbol")return[e];e=wE(e);const t=[],r=e.length;if(r===0)return t;let n=0,i="",o="",u=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const c=e[n];if(o)c==="\\"&&n+1<r?(n++,i+=e[n]):c===o?o="":i+=c;else if(u)c==='"'||c==="'"?o=c:c==="]"?(u=!1,t.push(i),i=""):i+=c;else if(c==="[")u=!0,i&&(t.push(i),i="");else if(c==="."){i&&(t.push(i),i="");const f=e[n+1];(f===void 0||f===".")&&t.push("")}else i+=c;n++}return i&&t.push(i),t}function So(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(Mv(t))return r;const n=e[t];return n===void 0?bE(t)&&!Object.hasOwn(e,t)?So(e,B0(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=F0(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return kL(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),Mv(t))return r;const n=e[t];return n===void 0?r:n}}}function kL(e,t,r){if(t.length===0)return r;let n=e;for(let i=0;i<t.length;i++){if(n==null||Mv(t[i]))return r;n=n[t[i]]}return n===void 0?r:n}var jL=4;function ca(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jL,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Kt(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((i,o,u)=>{var c=r[u-1];return typeof c=="string"?i+c+o:c!==void 0?i+ca(c)+o:i+o},"")}var Yr=e=>e===0?0:e>0?1:-1,Fn=e=>typeof e=="number"&&e!=+e,po=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ae=e=>(typeof e=="number"||e instanceof Number)&&!Fn(e),Bn=e=>Ae(e)||typeof e=="string",SL=0,Su=e=>{var t=++SL;return"".concat(e||"").concat(t)},ya=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ae(t)&&typeof t!="string")return n;var o;if(po(t)){if(r==null)return n;var u=t.indexOf("%");o=r*parseFloat(t.slice(0,u))/100}else o=+t;return Fn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},kE=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 ui(e,t,r){return Ae(e)&&Ae(t)?ca(e+r*(t-e)):t}function jE(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):So(n,t))===r)}var Yt=e=>e===null||typeof e>"u",U0=e=>Yt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Sr(e){return e!=null}function Zs(){}var SE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,H0=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{$0(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},NL=(e,t,r)=>n=>(e(t,r,n),null),EL=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];$0(i)&&typeof o=="function"&&(n||(n={}),n[i]=NL(o,t,r))}),n};function gk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function AL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gk(Object(r),!0).forEach(function(n){CL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CL(e,t,r){return(t=PL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PL(e){var t=OL(e,"string");return typeof t=="symbol"?t:t+""}function OL(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=AL({},e),n=t,i=Object.keys(t),o=i.reduce((u,c)=>(u[c]===void 0&&n[c]!==void 0&&(u[c]=n[c]),u),r);return o}function _L(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],o=t(i,n,e);r.has(o)||r.set(o,i)}return Array.from(r.values())}function ML(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function NE(e){return e}function IL(e){return function(t){return So(t,e)}}function Iv(e){return e==null||typeof e!="object"&&typeof e!="function"}function TL(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function DL(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function W0(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const RL="[object RegExp]",EE="[object String]",AE="[object Number]",CE="[object Boolean]",PE="[object Arguments]",LL="[object Symbol]",$L="[object Date]",zL="[object Map]",FL="[object Set]",BL="[object Array]",UL="[object ArrayBuffer]",HL="[object Object]",WL="[object DataView]",KL="[object Uint8Array]",GL="[object Uint8ClampedArray]",VL="[object Uint16Array]",qL="[object Uint32Array]",QL="[object Int8Array]",YL="[object Int16Array]",XL="[object Int32Array]",ZL="[object Float32Array]",JL="[object Float64Array]",vk=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function e$(e){return typeof vk.Buffer<"u"&&vk.Buffer.isBuffer(e)}function t$(e,t){return Va(e,void 0,e,new Map,t)}function Va(e,t,r,n=new Map,i=void 0){const o=i==null?void 0:i(e,t,r,n);if(o!==void 0)return o;if(Iv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let c=0;c<e.length;c++)u[c]=Va(e[c],c,r,n,i);return Object.hasOwn(e,"index")&&(u.index=e.index),Object.hasOwn(e,"input")&&(u.input=e.input),u}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const u=new RegExp(e.source,e.flags);return u.lastIndex=e.lastIndex,u}if(e instanceof Map){const u=new Map;n.set(e,u);for(const[c,f]of e)u.set(c,Va(f,c,r,n,i));return u}if(e instanceof Set){const u=new Set;n.set(e,u);for(const c of e)u.add(Va(c,void 0,r,n,i));return u}if(e$(e))return e.subarray();if(TL(e)){const u=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,u);for(let c=0;c<e.length;c++)u[c]=Va(e[c],c,r,n,i);return u}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const u=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,u),mn(u,e,r,n,i),u}if(typeof File<"u"&&e instanceof File){const u=new File([e],e.name,{type:e.type});return n.set(e,u),mn(u,e,r,n,i),u}if(typeof Blob<"u"&&e instanceof Blob){const u=new Blob([e],{type:e.type});return n.set(e,u),mn(u,e,r,n,i),u}if(e instanceof Error){const u=structuredClone(e);return n.set(e,u),u.message=e.message,u.name=e.name,u.stack=e.stack,u.cause=e.cause,u.constructor=e.constructor,mn(u,e,r,n,i),u}if(e instanceof Boolean){const u=new Boolean(e.valueOf());return n.set(e,u),mn(u,e,r,n,i),u}if(e instanceof Number){const u=new Number(e.valueOf());return n.set(e,u),mn(u,e,r,n,i),u}if(e instanceof String){const u=new String(e.valueOf());return n.set(e,u),mn(u,e,r,n,i),u}if(typeof e=="object"&&r$(e)){const u=Object.create(Object.getPrototypeOf(e));return n.set(e,u),mn(u,e,r,n,i),u}return e}function mn(e,t,r=e,n,i){const o=[...Object.keys(t),...DL(t)];for(let u=0;u<o.length;u++){const c=o[u],f=Object.getOwnPropertyDescriptor(e,c);(f==null||f.writable)&&(e[c]=Va(t[c],c,r,n,i))}}function r$(e){switch(W0(e)){case PE:case BL:case UL:case WL:case CE:case $L:case ZL:case JL:case QL:case YL:case XL:case zL:case AE:case HL:case RL:case FL:case EE:case LL:case KL:case GL:case VL:case qL:return!0;default:return!1}}function n$(e){return Va(e,void 0,e,new Map,void 0)}function Qd(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function OE(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function _E(e,t,r){return typeof r!="function"?_E(e,t,()=>{}):Tv(e,t,function n(i,o,u,c,f,h){const m=r(i,o,u,c,f,h);return m!==void 0?!!m:Tv(i,o,n,h,!1)},new Map,!0)}function Tv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return i$(e,t,r,n);case"function":return Object.keys(t).length>0?Tv(e,{...t},r,n,i):Qd(e,t);default:return OE(e)&&i?typeof t=="string"?t==="":!0:Qd(e,t)}}function i$(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return ME(e,t,r,n);if(t instanceof Map)return a$(e,t,r,n);if(t instanceof Set)return o$(e,t,r,n);const i=Object.keys(t);if(e==null||Iv(e))return i.length===0;if(i.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<i.length;o++){const u=i[o];if(!Iv(e)&&!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!r(e[u],t[u],u,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function a$(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries())if(r(e.get(i),o,i,e,t,n)===!1)return!1;return!0}function ME(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const u=t[o];let c=!1;for(let f=0;f<e.length;f++){if(i.has(f))continue;const h=e[f];let m=!1;if(r(h,u,o,e,t,n)&&(m=!0),m){i.add(f),c=!0;break}}if(!c)return!1}return!0}function o$(e,t,r,n){return t.size===0?!0:e instanceof Set?ME([...e],[...t],r,n):!1}function IE(e,t){return _E(e,t,()=>{})}function s$(e){return e=n$(e),t=>IE(t,e)}function l$(e,t){return t$(e,(r,n,i,o)=>{if(typeof e=="object"){if(W0(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return o.set(e,u),mn(u,e,i,o),u}switch(Object.prototype.toString.call(e)){case AE:case EE:case CE:{const u=new e.constructor(e==null?void 0:e.valueOf());return mn(u,e),u}case PE:{const u={};return mn(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function u$(e){return l$(e)}const c$=/^(?:0|[1-9]\d*)$/;function TE(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 c$.test(e)}}function d$(e){return e!==null&&typeof e=="object"&&W0(e)==="[object Arguments]"}function f$(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&bE(t)&&(e==null?void 0:e[t])==null?r=B0(t):r=[t],r.length===0)return!1;let n=e;for(let i=0;i<r.length;i++){const o=r[i];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||d$(n))&&TE(o)&&o<n.length))return!1;n=n[o]}return!0}function h$(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=F0(e);break}return t=u$(t),function(r){const n=So(r,e);return n===void 0?f$(r,e):t===void 0?n===void 0:IE(n,t)}}function m$(e){if(e==null)return NE;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?h$(e[0],e[1]):s$(e);case"string":case"symbol":case"number":return IL(e)}}function p$(e){return Number.isSafeInteger(e)&&e>=0}function DE(e){return e!=null&&typeof e!="function"&&p$(e.length)}function g$(e){return typeof e=="object"&&e!==null}function v$(e){return g$(e)&&DE(e)}function yk(e,t=NE){return v$(e)?_L(Array.from(e),ML(m$(t),1)):[]}function y$(e,t,r){return t===!0?yk(e,r):typeof t=="function"?yk(e,t):e}var vg={exports:{}},yg={},xg={exports:{}},bg={};/**
|
||
* @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 xk;function x$(){if(xk)return bg;xk=1;var e=qs();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function c(g,v){var b=v(),j=n({inst:{value:b,getSnapshot:v}}),k=j[0].inst,S=j[1];return o(function(){k.value=b,k.getSnapshot=v,f(k)&&S({inst:k})},[g,b,v]),i(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),u(b),b}function f(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!r(g,b)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return bg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,bg}var bk;function b$(){return bk||(bk=1,xg.exports=x$()),xg.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 wk;function w$(){if(wk)return yg;wk=1;var e=qs(),t=b$();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,c=e.useMemo,f=e.useDebugValue;return yg.useSyncExternalStoreWithSelector=function(h,m,g,v,b){var j=o(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=c(function(){function N(O){if(!E){if(E=!0,A=O,O=v(O),b!==void 0&&k.hasValue){var T=k.value;if(b(T,O))return P=T}return P=O}if(T=P,n(A,O))return T;var B=v(O);return b!==void 0&&b(T,B)?(A=O,T):(A=O,P=B)}var E=!1,A,P,_=g===void 0?null:g;return[function(){return N(m())},_===null?void 0:function(){return N(_())}]},[m,g,v,b]);var S=i(h,j[0],j[1]);return u(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},yg}var kk;function k$(){return kk||(kk=1,vg.exports=w$()),vg.exports}var j$=k$(),K0=y.createContext(null),S$=e=>e,Nt=()=>{var e=y.useContext(K0);return e?e.store.dispatch:S$},Yd=()=>{},N$=()=>Yd,E$=(e,t)=>e===t;function Me(e){var t=y.useContext(K0),r=y.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Yd,[t,e]);return j$.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:N$,t?t.store.getState:Yd,t?t.store.getState:Yd,r,E$)}function A$(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function C$(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 jk=e=>Array.isArray(e)?e:[e];function P$(e){const t=Array.isArray(e[0])?e[0]:e;return C$(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function O$(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var _$=class{constructor(e){this.value=e}deref(){return this.value}},M$=()=>typeof WeakRef>"u"?_$:WeakRef,RE=M$(),I$=0,Sk=1;function Md(){return{s:I$,v:void 0,o:null,p:null}}function T$(e){return e instanceof RE?e.deref():e}function LE(e,t={}){let r=Md();const{resultEqualityCheck:n}=t;let i,o=0;function u(){let c=r;const{length:f}=arguments;for(let g=0,v=f;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let j=c.o;j===null&&(c.o=j=new WeakMap);const k=j.get(b);k===void 0?(c=Md(),j.set(b,c)):c=k}else{let j=c.p;j===null&&(c.p=j=new Map);const k=j.get(b);k===void 0?(c=Md(),j.set(b,c)):c=k}}const h=c;let m;if(c.s===Sk)m=c.v;else if(m=e.apply(null,arguments),o++,n){const g=T$(i);g!=null&&n(g,m)&&(m=g,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new RE(m):m}return h.s=Sk,h.v=m,m}return u.clearCache=()=>{r=Md(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function D$(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,u=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),A$(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:g,memoizeOptions:v=[],argsMemoize:b=LE,argsMemoizeOptions:j=[]}=m,k=jk(v),S=jk(j),N=P$(i),E=g(function(){return o++,h.apply(null,arguments)},...k),A=b(function(){u++;const _=O$(N,arguments);return c=E.apply(null,_),c},...S);return Object.assign(A,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var q=D$(LE);function R$(e,t=1){const r=[],n=Math.floor(t),i=(o,u)=>{for(let c=0;c<o.length;c++){const f=o[c];Array.isArray(f)&&u<n?i(f,u+1):r.push(f)}};return i(e,0),r}function Dv(e,t,r){return OE(r)&&(typeof t=="number"&&DE(r)&&TE(t)&&t<r.length||typeof t=="string"&&t in r)?Qd(r[t],e):!1}function Nk(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const L$=(e,t,r)=>{if(e!==t){const n=Nk(e),i=Nk(t);if(n===i&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function $E(e){return typeof e=="symbol"||e instanceof Symbol}const $$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z$=/^\w*$/;function F$(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||$E(e)?!0:typeof e=="string"&&(z$.test(e)||!$$.test(e))||t!=null}function B$(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(c=>String(c));const i=(c,f)=>{let h=c;for(let m=0;m<f.length&&h!=null;++m)h=h[f[m]];return h},o=(c,f)=>f==null||c==null?f:typeof c=="object"&&"key"in c?Object.hasOwn(f,c.key)?f[c.key]:i(f,c.path):typeof c=="function"?c(f):Array.isArray(c)?i(f,c):typeof f=="object"?f[c]:f,u=t.map(c=>(Array.isArray(c)&&c.length===1&&(c=c[0]),c==null||typeof c=="function"||Array.isArray(c)||F$(c)?c:{key:c,path:B0(c)}));return e.map(c=>({original:c,criteria:u.map(f=>o(f,c))})).slice().sort((c,f)=>{for(let h=0;h<u.length;h++){const m=L$(c.criteria[h],f.criteria[h],r[h]);if(m!==0)return m}return 0}).map(c=>c.original)}function jh(e,...t){const r=t.length;return r>1&&Dv(e,t[0],t[1])?t=[]:r>2&&Dv(t[0],t[1],t[2])&&(t=[t[0]]),B$(e,R$(t),["asc"])}var zE=e=>e.legend.settings,U$=e=>e.legend.size,H$=e=>e.legend.payload;q([H$,zE],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?jh(n,r):n});function W$(e,t){return q$(e)||V$(e,t)||G$(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 G$(e,t){if(e){if(typeof e=="string")return Ek(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ek(e,t):void 0}}function Ek(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function V$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function q$(e){if(Array.isArray(e))return e}var Id=1;function Ak(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 Ck(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function Q$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=y.useState({height:0,left:0,top:0,width:0}),r=W$(t,2),n=r[0],i=r[1],o=y.useRef(null),u=y.useRef(n);u.current=n;var c=y.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Ck(f);if(Ak(h,u.current)&&i(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var g=Ck(f);Ak(g,u.current)&&i(g)});m.observe(f),o.current=m}}},[...e]);return y.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,c]}function Wt(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 Y$=typeof Symbol=="function"&&Symbol.observable||"@@observable",Pk=Y$,wg=()=>Math.random().toString(36).substring(7).split("").join("."),X$={INIT:`@@redux/INIT${wg()}`,REPLACE:`@@redux/REPLACE${wg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${wg()}`},vf=X$;function G0(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 FE(e,t,r){if(typeof e!="function")throw new Error(Wt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Wt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Wt(1));return r(FE)(e,t)}let n=e,i=t,o=new Map,u=o,c=0,f=!1;function h(){u===o&&(u=new Map,o.forEach((S,N)=>{u.set(N,S)}))}function m(){if(f)throw new Error(Wt(3));return i}function g(S){if(typeof S!="function")throw new Error(Wt(4));if(f)throw new Error(Wt(5));let N=!0;h();const E=c++;return u.set(E,S),function(){if(N){if(f)throw new Error(Wt(6));N=!1,h(),u.delete(E),o=null}}}function v(S){if(!G0(S))throw new Error(Wt(7));if(typeof S.type>"u")throw new Error(Wt(8));if(typeof S.type!="string")throw new Error(Wt(17));if(f)throw new Error(Wt(9));try{f=!0,i=n(i,S)}finally{f=!1}return(o=u).forEach(E=>{E()}),S}function b(S){if(typeof S!="function")throw new Error(Wt(10));n=S,v({type:vf.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Wt(11));function E(){const P=N;P.next&&P.next(m())}return E(),{unsubscribe:S(E)}},[Pk](){return this}}}return v({type:vf.INIT}),{dispatch:v,subscribe:g,getState:m,replaceReducer:b,[Pk]:j}}function Z$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:vf.INIT})>"u")throw new Error(Wt(12));if(typeof r(void 0,{type:vf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Wt(13))})}function BE(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const u=t[o];typeof e[u]=="function"&&(r[u]=e[u])}const n=Object.keys(r);let i;try{Z$(r)}catch(o){i=o}return function(u={},c){if(i)throw i;let f=!1;const h={};for(let m=0;m<n.length;m++){const g=n[m],v=r[g],b=u[g],j=v(b,c);if(typeof j>"u")throw c&&c.type,new Error(Wt(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function yf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function J$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(Wt(15))};const u={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(u));return o=yf(...c)(i.dispatch),{...i,dispatch:o}}}function UE(e){return G0(e)&&"type"in e&&typeof e.type=="string"}var HE=Symbol.for("immer-nothing"),Ok=Symbol.for("immer-draftable"),mr=Symbol.for("immer-state");function gn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lr=Object,zs=Lr.getPrototypeOf,xf="constructor",Sh="prototype",Rv="configurable",bf="enumerable",Xd="writable",Nu="value",vi=e=>!!e&&!!e[mr];function bn(e){var t;return e?WE(e)||Eh(e)||!!e[Ok]||!!((t=e[xf])!=null&&t[Ok])||Ah(e)||Ch(e):!1}var ez=Lr[Sh][xf].toString(),_k=new WeakMap;function WE(e){if(!e||!V0(e))return!1;const t=zs(e);if(t===null||t===Lr[Sh])return!0;const r=Lr.hasOwnProperty.call(t,xf)&&t[xf];if(r===Object)return!0;if(!fs(r))return!1;let n=_k.get(r);return n===void 0&&(n=Function.toString.call(r),_k.set(r,n)),n===ez}function Nh(e,t,r=!0){Qu(e)===0?(r?Reflect.ownKeys(e):Lr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Qu(e){const t=e[mr];return t?t.type_:Eh(e)?1:Ah(e)?2:Ch(e)?3:0}var Mk=(e,t,r=Qu(e))=>r===2?e.has(t):Lr[Sh].hasOwnProperty.call(e,t),Lv=(e,t,r=Qu(e))=>r===2?e.get(t):e[t],wf=(e,t,r,n=Qu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function tz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Eh=Array.isArray,Ah=e=>e instanceof Map,Ch=e=>e instanceof Set,V0=e=>typeof e=="object",fs=e=>typeof e=="function",kg=e=>typeof e=="boolean";function rz(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ai=e=>e.copy_||e.base_,q0=e=>e.modified_?e.copy_:e.base_;function $v(e,t){if(Ah(e))return new Map(e);if(Ch(e))return new Set(e);if(Eh(e))return Array[Sh].slice.call(e);const r=WE(e);if(t===!0||t==="class_only"&&!r){const n=Lr.getOwnPropertyDescriptors(e);delete n[mr];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const u=i[o],c=n[u];c[Xd]===!1&&(c[Xd]=!0,c[Rv]=!0),(c.get||c.set)&&(n[u]={[Rv]:!0,[Xd]:!0,[bf]:c[bf],[Nu]:e[u]})}return Lr.create(zs(e),n)}else{const n=zs(e);if(n!==null&&r)return{...e};const i=Lr.create(n);return Lr.assign(i,e)}}function Q0(e,t=!1){return Ph(e)||vi(e)||!bn(e)||(Qu(e)>1&&Lr.defineProperties(e,{set:Td,add:Td,clear:Td,delete:Td}),Lr.freeze(e),t&&Nh(e,(r,n)=>{Q0(n,!0)},!1)),e}function nz(){gn(2)}var Td={[Nu]:nz};function Ph(e){return e===null||!V0(e)?!0:Lr.isFrozen(e)}var kf="MapSet",zv="Patches",Ik="ArrayMethods",KE={};function go(e){const t=KE[e];return t||gn(0,e),t}var Tk=e=>!!KE[e],Eu,GE=()=>Eu,iz=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Tk(kf)?go(kf):void 0,arrayMethodsPlugin_:Tk(Ik)?go(Ik):void 0});function Dk(e,t){t&&(e.patchPlugin_=go(zv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Fv(e){Bv(e),e.drafts_.forEach(az),e.drafts_=null}function Bv(e){e===Eu&&(Eu=e.parent_)}var Rk=e=>Eu=iz(Eu,e);function az(e){const t=e[mr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[mr].modified_&&(Fv(t),gn(4)),bn(e)&&(e=$k(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[mr].base_,e,t)}else e=$k(t,r);return oz(t,e,!0),Fv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==HE?e:void 0}function $k(e,t){if(Ph(t))return t;const r=t[mr];if(!r)return jf(t,e.handledSet_,e);if(!Oh(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);QE(r,e)}return r.copy_}function oz(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Q0(t,r)}function VE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Oh=(e,t)=>e.scope_===t,sz=[];function qE(e,t,r,n){const i=ai(e),o=e.type_;if(n!==void 0&&Lv(i,n,o)===t){wf(i,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Nh(i,(f,h)=>{if(vi(h)){const m=c.get(h)||[];m.push(f),c.set(h,m)}})}const u=e.draftLocations_.get(t)??sz;for(const c of u)wf(i,c,r,o)}function lz(e,t,r){e.callbacks_.push(function(i){var c;const o=t;if(!o||!Oh(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const u=q0(o);qE(e,o.draft_??o,u,r),QE(o,i)})}function QE(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_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}VE(e)}}function uz(e,t,r){const{scope_:n}=e;if(vi(r)){const i=r[mr];Oh(i,n)&&i.callbacks_.push(function(){Zd(e);const u=q0(i);qE(e,r,u,t)})}else bn(r)&&e.callbacks_.push(function(){const o=ai(e);e.type_===3?o.has(r)&&jf(r,n.handledSet_,n):Lv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&jf(Lv(e.copy_,t,e.type_),n.handledSet_,n)})}function jf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||vi(e)||t.has(e)||!bn(e)||Ph(e)||(t.add(e),Nh(e,(n,i)=>{if(vi(i)){const o=i[mr];if(Oh(o,r)){const u=q0(o);wf(e,n,u,e.type_),VE(o)}}else bn(i)&&jf(i,t,r)})),e}function cz(e,t){const r=Eh(e),n={type_:r?1:0,scope_:t?t.scope_:GE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=Sf;r&&(i=[n],o=Au);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=u,[c,n]}var Sf={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 i=ai(e);if(!Mk(i,t,e.type_))return dz(e,i,t);const o=i[t];if(e.finalized_||!bn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&rz(t))return o;if(o===jg(e.base_,t)){Zd(e);const u=e.type_===1?+t:t,c=Hv(e.scope_,o,e,u);return e.copy_[u]=c}return o},has(e,t){return t in ai(e)},ownKeys(e){return Reflect.ownKeys(ai(e))},set(e,t,r){const n=YE(ai(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=jg(ai(e),t),o=i==null?void 0:i[mr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(tz(r,i)&&(r!==void 0||Mk(e.base_,t,e.type_)))return!0;Zd(e),Uv(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),uz(e,t,r)),!0},deleteProperty(e,t){return Zd(e),jg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Uv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ai(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Xd]:!0,[Rv]:e.type_!==1||t!=="length",[bf]:n[bf],[Nu]:r[t]}},defineProperty(){gn(11)},getPrototypeOf(e){return zs(e.base_)},setPrototypeOf(){gn(12)}},Au={};for(let e in Sf){let t=Sf[e];Au[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Au.deleteProperty=function(e,t){return Au.set.call(this,e,t,void 0)};Au.set=function(e,t,r){return Sf.set.call(this,e[0],t,r,e[0])};function jg(e,t){const r=e[mr];return(r?ai(r):e)[t]}function dz(e,t,r){var i;const n=YE(t,r);return n?Nu in n?n[Nu]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function YE(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 Uv(e){e.modified_||(e.modified_=!0,e.parent_&&Uv(e.parent_))}function Zd(e){e.copy_||(e.assigned_=new Map,e.copy_=$v(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fz=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(fs(r)&&!fs(n)){const u=n;n=r;const c=this;return function(h=u,...m){return c.produce(h,g=>n.call(this,g,...m))}}fs(n)||gn(6),i!==void 0&&!fs(i)&&gn(7);let o;if(bn(r)){const u=Rk(this),c=Hv(u,r,void 0);let f=!0;try{o=n(c),f=!1}finally{f?Fv(u):Bv(u)}return Dk(u,i),Lk(o,u)}else if(!r||!V0(r)){if(o=n(r),o===void 0&&(o=r),o===HE&&(o=void 0),this.autoFreeze_&&Q0(o,!0),i){const u=[],c=[];go(zv).generateReplacementPatches_(r,o,{patches_:u,inversePatches_:c}),i(u,c)}return o}else gn(1,r)},this.produceWithPatches=(r,n)=>{if(fs(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let i,o;return[this.produce(r,n,(c,f)=>{i=c,o=f}),i,o]},kg(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),kg(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),kg(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){bn(t)||gn(8),vi(t)&&(t=Xr(t));const r=Rk(this),n=Hv(r,t,void 0);return n[mr].isManual_=!0,Bv(r),n}finishDraft(t,r){const n=t&&t[mr];(!n||!n.isManual_)&&gn(9);const{scope_:i}=n;return Dk(i,r),Lk(void 0,i)}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 i=go(zv).applyPatches_;return vi(t)?i(t,r):this.produce(t,o=>i(o,r))}};function Hv(e,t,r,n){const[i,o]=Ah(t)?go(kf).proxyMap_(t,r):Ch(t)?go(kf).proxySet_(t,r):cz(t,r);return((r==null?void 0:r.scope_)??GE()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?lz(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function Xr(e){return vi(e)||gn(10,e),XE(e)}function XE(e){if(!bn(e)||Ph(e))return e;const t=e[mr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=$v(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=$v(e,!0);return Nh(r,(i,o)=>{wf(r,i,XE(o))},n),t&&(t.finalized_=!1),r}var hz=new fz,ZE=hz.produce;function JE(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var mz=JE(),pz=JE,gz=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yf:yf.apply(null,arguments)};function zr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error($r(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>UE(n)&&n.type===e,r}var eA=class du extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,du.prototype)}static get[Symbol.species](){return du}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new du(...t[0].concat(this)):new du(...t.concat(this))}};function zk(e){return bn(e)?ZE(e,()=>{}):e}function Dd(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function vz(e){return typeof e=="boolean"}var yz=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let u=new eA;return r&&(vz(r)?u.push(mz):u.push(pz(r.extraArgument))),u},tA="RTK_autoBatch",st=()=>e=>({payload:e,meta:{[tA]:!0}}),Fk=e=>t=>{setTimeout(t,e)},xz=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(u),r())},o=e(i),u=setTimeout(i,t)},rA=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,u=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?xz(window.requestAnimationFrame,100):Fk(10):e.type==="callback"?e.queueNotification:Fk(e.timeout),h=()=>{u=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const g=()=>i&&m(),v=n.subscribe(g);return c.add(m),()=>{v(),c.delete(m)}},dispatch(m){var g;try{return i=!((g=m==null?void 0:m.meta)!=null&&g[tA]),o=!i,o&&(u||(u=!0,f(h))),n.dispatch(m)}finally{i=!0}}})},bz=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new eA(e);return n&&i.push(rA(typeof n=="object"?n:void 0)),i};function wz(e){const t=yz(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(G0(r))c=BE(r);else throw new Error($r(1));let f;typeof n=="function"?f=n(t):f=t();let h=yf;i&&(h=gz({trace:!1,...typeof i=="object"&&i}));const m=J$(...f),g=bz(m);let v=typeof u=="function"?u(g):g();const b=h(...v);return FE(c,o,b)}function nA(e){const t={},r=[];let n;const i={addCase(o,u){const c=typeof o=="string"?o:o.type;if(!c)throw new Error($r(28));if(c in t)throw new Error($r(29));return t[c]=u,i},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:o.settled,reducer:u.settled}),i},addMatcher(o,u){return r.push({matcher:o,reducer:u}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function kz(e){return typeof e=="function"}function jz(e,t){let[r,n,i]=nA(t),o;if(kz(e))o=()=>zk(e());else{const c=zk(e);o=()=>c}function u(c=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,g)=>{if(g)if(vi(m)){const b=g(m,f);return b===void 0?m:b}else{if(bn(m))return ZE(m,v=>g(v,f));{const v=g(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},c)}return u.getInitialState=o,u}var Sz="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Nz=(e=21)=>{let t="",r=e;for(;r--;)t+=Sz[Math.random()*64|0];return t},Ez=Symbol.for("rtk-slice-createasyncthunk");function Az(e,t){return`${e}/${t}`}function Cz({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Ez];return function(i){const{name:o,reducerPath:u=o}=i;if(!o)throw new Error($r(11));const c=(typeof i.reducers=="function"?i.reducers(Oz()):i.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(P,_){const O=typeof P=="string"?P:P.type;if(!O)throw new Error($r(12));if(O in h.sliceCaseReducersByType)throw new Error($r(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(P,_){return h.sliceMatchers.push({matcher:P,reducer:_}),m},exposeAction(P,_){return h.actionCreators[P]=_,m},exposeCaseReducer(P,_){return h.sliceCaseReducersByName[P]=_,m}};f.forEach(P=>{const _=c[P],O={reducerName:P,type:Az(o,P),createNotation:typeof i.reducers=="function"};Mz(_)?Tz(O,_,m,t):_z(O,_,m)});function g(){const[P={},_=[],O=void 0]=typeof i.extraReducers=="function"?nA(i.extraReducers):[i.extraReducers],T={...P,...h.sliceCaseReducersByType};return jz(i.initialState,B=>{for(let $ in T)B.addCase($,T[$]);for(let $ of h.sliceMatchers)B.addMatcher($.matcher,$.reducer);for(let $ of _)B.addMatcher($.matcher,$.reducer);O&&B.addDefaultCase(O)})}const v=P=>P,b=new Map,j=new WeakMap;let k;function S(P,_){return k||(k=g()),k(P,_)}function N(){return k||(k=g()),k.getInitialState()}function E(P,_=!1){function O(B){let $=B[P];return typeof $>"u"&&_&&($=Dd(j,O,N)),$}function T(B=v){const $=Dd(b,_,()=>new WeakMap);return Dd($,B,()=>{const z={};for(const[Q,U]of Object.entries(i.selectors??{}))z[Q]=Pz(U,B,()=>Dd(j,B,N),_);return z})}return{reducerPath:P,getSelectors:T,get selectors(){return T(O)},selectSlice:O}}const A={name:o,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(u),injectInto(P,{reducerPath:_,...O}={}){const T=_??u;return P.inject({reducerPath:T,reducer:S},O),{...A,...E(T,!0)}}};return A}}function Pz(e,t,r,n){function i(o,...u){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...u)}return i.unwrapped=e,i}var lr=Cz();function Oz(){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 _z({type:e,reducerName:t,createNotation:r},n,i){let o,u;if("reducer"in n){if(r&&!Iz(n))throw new Error($r(17));o=n.reducer,u=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?zr(e,u):zr(e))}function Mz(e){return e._reducerDefinitionType==="asyncThunk"}function Iz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Tz({type:e,reducerName:t},r,n,i){if(!i)throw new Error($r(18));const{payloadCreator:o,fulfilled:u,pending:c,rejected:f,settled:h,options:m}=r,g=i(e,o,m);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),c&&n.addCase(g.pending,c),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Rd,pending:c||Rd,rejected:f||Rd,settled:h||Rd})}function Rd(){}var Dz="task",iA="listener",aA="completed",Y0="cancelled",Rz=`task-${Y0}`,Lz=`task-${aA}`,Wv=`${iA}-${Y0}`,$z=`${iA}-${aA}`,_h=class{constructor(e){Zo(this,"code");Zo(this,"name","TaskAbortError");Zo(this,"message");this.code=e,this.message=`${Dz} ${Y0} (reason: ${e})`}},X0=(e,t)=>{if(typeof e!="function")throw new TypeError($r(32))},Nf=()=>{},oA=(e,t=Nf)=>(e.catch(t),e),sA=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),uo=e=>{if(e.aborted)throw new _h(e.reason)};function lA(e,t){let r=Nf;return new Promise((n,i)=>{const o=()=>i(new _h(e.reason));if(e.aborted){o();return}r=sA(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Nf})}var zz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof _h?"cancelled":"rejected",error:r}}finally{t==null||t()}},Ef=e=>t=>oA(lA(e,t).then(r=>(uo(e),r))),uA=e=>{const t=Ef(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:xs}=Object,Bk={},Mh="listenerMiddleware",Fz=(e,t)=>{const r=n=>sA(e,()=>n.abort(e.reason));return(n,i)=>{X0(n);const o=new AbortController;r(o);const u=zz(async()=>{uo(e),uo(o.signal);const c=await n({pause:Ef(o.signal),delay:uA(o.signal),signal:o.signal});return uo(o.signal),c},()=>o.abort(Lz));return i!=null&&i.autoJoin&&t.push(u.catch(Nf)),{result:Ef(e)(u),cancel(){o.abort(Rz)}}}},Bz=(e,t)=>{const r=async(n,i)=>{uo(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:n,effect:(g,v)=>{v.unsubscribe(),f([g,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await lA(t,Promise.race(c));return uo(t),f}finally{o()}};return((n,i)=>oA(r(n,i)))},cA=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=zr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error($r(21));return X0(o),{predicate:i,type:t,effect:o}},dA=xs(e=>{const{type:t,predicate:r,effect:n}=cA(e);return{id:Nz(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error($r(22))}}},{withTypes:()=>dA}),Uk=(e,t)=>{const{type:r,effect:n,predicate:i}=cA(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Kv=e=>{e.pending.forEach(t=>{t.abort(Wv)})},Uz=(e,t)=>()=>{for(const r of t.keys())Kv(r);e.clear()},Hk=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},fA=xs(zr(`${Mh}/add`),{withTypes:()=>fA}),Hz=zr(`${Mh}/removeAll`),hA=xs(zr(`${Mh}/remove`),{withTypes:()=>hA}),Wz=(...e)=>{console.error(`${Mh}/error`,...e)},Yu=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},i=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:o,onError:u=Wz}=e;X0(u);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&Kv(b)}),f=(b=>{const j=Uk(t,b)??dA(b);return c(j)});xs(f,{withTypes:()=>f});const h=b=>{const j=Uk(t,b);return j&&(j.unsubscribe(),b.cancelActive&&Kv(j)),!!j};xs(h,{withTypes:()=>h});const m=async(b,j,k,S)=>{const N=new AbortController,E=Bz(f,N.signal),A=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,xs({},k,{getOriginalState:S,condition:(P,_)=>E(P,_).then(Boolean),take:E,delay:uA(N.signal),pause:Ef(N.signal),extra:o,signal:N.signal,fork:Fz(N.signal,A),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((P,_,O)=>{P!==N&&(P.abort(Wv),O.delete(P))})},cancel:()=>{N.abort(Wv),b.pending.delete(N)},throwIfCancelled:()=>{uo(N.signal)}})))}catch(P){P instanceof _h||Hk(u,P,{raisedBy:"effect"})}finally{await Promise.all(A),N.abort($z),i(b),b.pending.delete(N)}},g=Uz(t,r);return{middleware:b=>j=>k=>{if(!UE(k))return j(k);if(fA.match(k))return f(k.payload);if(Hz.match(k)){g();return}if(hA.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===Bk)throw new Error($r(23));return S};let E;try{if(E=j(k),t.size>0){const A=b.getState(),P=Array.from(t.values());for(const _ of P){let O=!1;try{O=_.predicate(k,A,S)}catch(T){O=!1,Hk(u,T,{raisedBy:"predicate"})}O&&m(_,k,b,N)}}}finally{S=Bk}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 Kz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},mA=lr({name:"chartLayout",initialState:Kz,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,i,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=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),Ih=mA.actions,Gz=Ih.setMargin,Vz=Ih.setLayout,qz=Ih.setChartSize,Qz=Ih.setScale,Yz=mA.reducer;function pA(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function We(e){return Number.isFinite(e)}function Un(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Wk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ms(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wk(Object(r),!0).forEach(function(n){Xz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xz(e,t,r){return(t=Zz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zz(e){var t=Jz(e,"string");return typeof t=="symbol"?t:t+""}function Jz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lt(e,t,r){return Yt(e)||Yt(t)?r:Bn(t)?So(e,t,r):typeof t=="function"?t(e):r}var e6=(e,t,r)=>{if(t&&r){var n=r.width,i=r.height,o=t.align,u=t.verticalAlign,c=t.layout;if((c==="vertical"||c==="horizontal"&&u==="middle")&&o!=="center"&&Ae(e[o]))return ms(ms({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&u!=="middle"&&Ae(e[u]))return ms(ms({},e),{},{[u]:e[u]+(i||0)})}return e},Gn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",gA=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var i,o,u=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===r&&(o=!0),c.coordinate));return i||u.push(t),o||u.push(r),u},vA=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,u=e.scale,c=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,g=e.ticks,v=e.niceTicks,b=e.axisType;if(!u)return null;var j=c==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,k=i==="category"&&u.bandwidth?u.bandwidth()/j:0;if(k=b==="angleAxis"&&o&&o.length>=2?Yr(o[0]-o[1])*2*k:k,g||v){var S=(g||v||[]).map((N,E)=>{var A=n?n.indexOf(N):N,P=u.map(A);return We(P)?{coordinate:P+k,value:N,offset:k,index:E}:null}).filter(Sr);return S}return f&&h?h.map((N,E)=>{var A=u.map(N);return We(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(Sr):u.ticks&&m!=null?u.ticks(m).map((N,E)=>{var A=u.map(N);return We(A)?{coordinate:A+k,value:N,index:E,offset:k}:null}).filter(Sr):u.domain().map((N,E)=>{var A=u.map(N);return We(A)?{coordinate:A+k,value:n?n[N]:N,index:E,offset:k}:null}).filter(Sr)},t6=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 i=0;i<n;++i)for(var o=0,u=0,c=0;c<r;++c){var f=e[c],h=f==null?void 0:f[i];if(h!=null){var m=h[1],g=h[0],v=Fn(m)?g:m;v>=0?(h[0]=o,o+=v,h[1]=o):(h[0]=u,u+=v,h[1]=u)}}}},r6=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 i=0;i<n;++i)for(var o=0,u=0;u<r;++u){var c=e[u],f=c==null?void 0:c[i];if(f!=null){var h=Fn(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},n6={sign:t6,expand:xL,none:mo,silhouette:bL,wiggle:wL,positive:r6},i6=(e,t,r)=>{var n,i=(n=n6[r])!==null&&n!==void 0?n:mo,o=yL().keys(t).value((c,f)=>Number(Lt(c,f,0))).order(_v).offset(i),u=o(e);return u.forEach((c,f)=>{c.forEach((h,m)=>{var g=Lt(e[m],t[f],0);Array.isArray(g)&&g.length===2&&Ae(g[0])&&Ae(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function a6(e){return e==null?void 0:String(e)}function Kk(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Yt(i[t.dataKey])){var c=jE(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Lt(i,Yt(u)?t.dataKey:u),h=t.scale.map(f);return Ae(h)?h:null}var o6=e=>{var t=e.flat(2).filter(Ae);return[Math.min(...t),Math.max(...t)]},s6=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],l6=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return s6(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var u=o.stackedData,c=u.reduce((f,h)=>{var m=pA(h,t,r),g=o6(m);return!We(g[0])||!We(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},Gk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Af=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=jh(t,m=>m.coordinate),o=1/0,u=1,c=i.length;u<c;u++){var f=i[u],h=i[u-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function qk(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,i=e.value,o=e.name;return ms(ms({},t),{},{dataKey:r,payload:n,value:i,name:o})}function yA(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var u6=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},c6=(e,t)=>t==="centric"?e.angle:e.radius,ki=e=>e.layout.width,ji=e=>e.layout.height,d6=e=>e.layout.scale,xA=e=>e.layout.margin,Th=q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Dh=q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),f6="data-recharts-item-index",h6="data-recharts-item-id",Xu=60;function Qk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?Qk(Object(r),!0).forEach(function(n){m6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m6(e,t,r){return(t=p6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p6(e){var t=g6(e,"string");return typeof t=="symbol"?t:t+""}function g6(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 v6=e=>e.brush.height;function y6(e){var t=Dh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Xu;return r+i}return r},0)}function x6(e){var t=Dh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Xu;return r+i}return r},0)}function b6(e){var t=Th(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function w6(e){var t=Th(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Zt=q([ki,ji,xA,v6,y6,x6,b6,w6,zE,U$],(e,t,r,n,i,o,u,c,f,h)=>{var m={left:(r.left||0)+i,right:(r.right||0)+o},g={top:(r.top||0)+u,bottom:(r.bottom||0)+c},v=Ld(Ld({},g),m),b=v.bottom;v.bottom+=n,v=e6(v,f,h);var j=e-v.left-v.right,k=t-v.top-v.bottom;return Ld(Ld({brushBottom:b},v),{},{width:Math.max(j,0),height:Math.max(k,0)})}),k6=q(Zt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),bA=q(ki,ji,(e,t)=>({x:0,y:0,width:e,height:t})),j6=y.createContext(null),Ar=()=>y.useContext(j6)!=null,Rh=e=>e.brush,Lh=q([Rh,Zt,xA],(e,t,r)=>({height:e.height,x:Ae(e.x)?e.x:t.left,y:Ae(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ae(e.width)?e.width:t.width}));function S6(e,t,{signal:r,edges:n}={}){let i,o=null;const u=n!=null&&n.includes("leading"),c=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},h=()=>{c&&f(),b()};let m=null;const g=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),i=void 0,o=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;i=this,o=S;const N=m==null;g(),u&&N&&f()};return k.schedule=g,k.cancel=b,k.flush=j,r==null||r.addEventListener("abort",b,{once:!0}),k}function N6(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,u=Array(2);n&&(u[0]="leading"),i&&(u[1]="trailing");let c,f=null;const h=S6(function(...v){c=e.apply(this,v),f=null},t,{edges:u}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(c=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),c):(h.apply(this,v),c)},g=()=>(h.flush(),c);return m.cancel=h.cancel,m.flush=g,m}function E6(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return N6(e,t,{leading:n,maxWait:t,trailing:i})}var Cf=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;console.warn(r.replace(/%s/g,()=>i[u++]))}},Rn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},wA=(e,t,r)=>{var n=r.width,i=n===void 0?Rn.width:n,o=r.height,u=o===void 0?Rn.height:o,c=r.aspect,f=r.maxHeight,h=po(i)?e:Number(i),m=po(u)?t:Number(u);return c&&c>0&&(h?m=h/c:m&&(h=m*c),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},A6={width:0,height:0,overflow:"visible"},C6={width:0,overflowX:"visible"},P6={height:0,overflowY:"visible"},O6={},_6=e=>{var t=e.width,r=e.height,n=po(t),i=po(r);return n&&i?A6:n?C6:i?P6:O6};function M6(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=Rn.width,o=Rn.height):i===void 0?i=n&&n>0?void 0:Rn.width:o===void 0&&(o=n&&n>0?void 0:Rn.height),{width:i,height:o}}var I6=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Pf(){return Pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pf.apply(null,arguments)}function Yk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yk(Object(r),!0).forEach(function(n){T6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T6(e,t,r){return(t=D6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D6(e){var t=R6(e,"string");return typeof t=="symbol"?t:t+""}function R6(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 L6(e,t){return B6(e)||F6(e,t)||z6(e,t)||$6()}function $6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z6(e,t){if(e){if(typeof e=="string")return Zk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zk(e,t):void 0}}function Zk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function F6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function B6(e){if(Array.isArray(e))return e}function U6(e,t){if(e==null)return{};var r,n,i=H6(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)&&(i[r]=e[r])}return i}function H6(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 kA=y.createContext(Rn.initialDimension);function W6(e){return Un(e.width)&&Un(e.height)}function jA(e){var t=e.children,r=e.width,n=e.height,i=y.useMemo(()=>({width:r,height:n}),[r,n]);return W6(i)?y.createElement(kA.Provider,{value:i},t):null}var Z0=()=>y.useContext(kA),K6=y.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?Rn.initialDimension:n,o=e.width,u=e.height,c=e.minWidth,f=c===void 0?Rn.minWidth:c,h=e.minHeight,m=e.maxHeight,g=e.children,v=e.debounce,b=v===void 0?Rn.debounce:v,j=e.id,k=e.className,S=e.onResize,N=e.style,E=N===void 0?{}:N,A=U6(e,I6),P=y.useRef(null),_=y.useRef();_.current=S,y.useImperativeHandle(t,()=>P.current);var O=y.useState({containerWidth:i.width,containerHeight:i.height}),T=L6(O,2),B=T[0],$=T[1],z=y.useCallback((oe,se)=>{$(X=>{var ne=Math.round(oe),te=Math.round(se);return X.containerWidth===ne&&X.containerHeight===te?X:{containerWidth:ne,containerHeight:te}})},[]);y.useEffect(()=>{if(P.current==null||typeof ResizeObserver>"u")return Zs;var oe=I=>{var M,H=I[0];if(H!=null){var ie=H.contentRect,J=ie.width,Z=ie.height;z(J,Z),(M=_.current)===null||M===void 0||M.call(_,J,Z)}};b>0&&(oe=E6(oe,b,{trailing:!0,leading:!1}));var se=new ResizeObserver(oe),X=P.current.getBoundingClientRect(),ne=X.width,te=X.height;return z(ne,te),se.observe(P.current),()=>{se.disconnect()}},[z,b]);var Q=B.containerWidth,U=B.containerHeight;Cf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ve=wA(Q,U,{width:o,height:u,aspect:r,maxHeight:m}),ue=ve.calculatedWidth,pe=ve.calculatedHeight;return Cf(Q<0||U<0||ue!=null&&ue>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.`,ue,pe,o,u,f,h,r),y.createElement("div",Pf({id:j?"".concat(j):void 0,className:rt("recharts-responsive-container",k),style:Xk(Xk({},E),{},{width:o,height:u,minWidth:f,minHeight:h,maxHeight:m}),ref:P},A),y.createElement("div",{style:_6({width:o,height:u})},y.createElement(jA,{width:ue,height:pe},g)))}),G6=y.forwardRef((e,t)=>{var r=Z0();if(Un(r.width)&&Un(r.height))return e.children;var n=M6({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,u=wA(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),c=u.calculatedWidth,f=u.calculatedHeight;return Ae(c)&&Ae(f)?y.createElement(jA,{width:c,height:f},e.children):y.createElement(K6,Pf({},e,{width:i,height:o,ref:t}))});function J0(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(k6),n=Me(Lh),i=(e=Me(Rh))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},V6={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},SA=()=>{var e;return(e=Me(Zt))!==null&&e!==void 0?e:V6},NA=()=>Me(ki),EA=()=>Me(ji),ft=e=>e.layout.layoutType,Js=()=>Me(ft),ey=()=>{var e=Js();if(e==="horizontal"||e==="vertical")return e},AA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},q6=()=>{var e=Js();return e!==void 0},Zu=e=>{var t=Nt(),r=Ar(),n=e.width,i=e.height,o=Z0(),u=n,c=i;return o&&(u=o.width>0?o.width:n,c=o.height>0?o.height:i),y.useEffect(()=>{!r&&Un(u)&&Un(c)&&t(qz({width:u,height:c}))},[t,r,u,c]),null},CA=Symbol.for("immer-nothing"),Jk=Symbol.for("immer-draftable"),Fr=Symbol.for("immer-state");function vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cu=Object.getPrototypeOf;function Fs(e){return!!e&&!!e[Fr]}function vo(e){var t;return e?PA(e)||Array.isArray(e)||!!e[Jk]||!!((t=e.constructor)!=null&&t[Jk])||Ju(e)||Fh(e):!1}var Q6=Object.prototype.constructor.toString(),ej=new WeakMap;function PA(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=ej.get(r);return n===void 0&&(n=Function.toString.call(r),ej.set(r,n)),n===Q6}function Of(e,t,r=!0){zh(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function zh(e){const t=e[Fr];return t?t.type_:Array.isArray(e)?1:Ju(e)?2:Fh(e)?3:0}function Gv(e,t){return zh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function OA(e,t,r){const n=zh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Y6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ju(e){return e instanceof Map}function Fh(e){return e instanceof Set}function Wa(e){return e.copy_||e.base_}function Vv(e,t){if(Ju(e))return new Map(e);if(Fh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=PA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Fr];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const u=i[o],c=n[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(Cu(e),n)}else{const n=Cu(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function ty(e,t=!1){return Bh(e)||Fs(e)||!vo(e)||(zh(e)>1&&Object.defineProperties(e,{set:$d,add:$d,clear:$d,delete:$d}),Object.freeze(e),t&&Object.values(e).forEach(r=>ty(r,!0))),e}function X6(){vn(2)}var $d={value:X6};function Bh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Z6={};function yo(e){const t=Z6[e];return t||vn(0,e),t}var Pu;function _A(){return Pu}function J6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tj(e,t){t&&(yo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function qv(e){Qv(e),e.drafts_.forEach(e8),e.drafts_=null}function Qv(e){e===Pu&&(Pu=e.parent_)}function rj(e){return Pu=J6(Pu,e)}function e8(e){const t=e[Fr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function nj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Fr].modified_&&(qv(t),vn(4)),vo(e)&&(e=_f(t,e),t.parent_||Mf(t,e)),t.patches_&&yo("Patches").generateReplacementPatches_(r[Fr].base_,e,t.patches_,t.inversePatches_)):e=_f(t,r,[]),qv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==CA?e:void 0}function _f(e,t,r){if(Bh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Fr];if(!i)return Of(t,(o,u)=>ij(e,i,t,o,u,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Mf(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let u=o,c=!1;i.type_===3&&(u=new Set(o),o.clear(),c=!0),Of(u,(f,h)=>ij(e,i,o,f,h,r,c),n),Mf(e,o,!1),r&&e.patches_&&yo("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function ij(e,t,r,n,i,o,u){if(i==null||typeof i!="object"&&!u)return;const c=Bh(i);if(!(c&&!u)){if(Fs(i)){const f=o&&t&&t.type_!==3&&!Gv(t.assigned_,n)?o.concat(n):void 0,h=_f(e,i,f);if(OA(r,n,h),Fs(h))e.canAutoFreeze_=!1;else return}else u&&r.add(i);if(vo(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;_f(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Ju(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Mf(e,i)}}}function Mf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ty(t,r)}function t8(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:_A(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=ry;r&&(i=[n],o=Ou);const{revoke:u,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=u,c}var ry={get(e,t){if(t===Fr)return e;const r=Wa(e);if(!Gv(r,t))return r8(e,r,t);const n=r[t];return e.finalized_||!vo(n)?n:n===Sg(e.base_,t)?(Ng(e),e.copy_[t]=Xv(n,e)):n},has(e,t){return t in Wa(e)},ownKeys(e){return Reflect.ownKeys(Wa(e))},set(e,t,r){const n=MA(Wa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Sg(Wa(e),t),o=i==null?void 0:i[Fr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Y6(r,i)&&(r!==void 0||Gv(e.base_,t)))return!0;Ng(e),Yv(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 Sg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ng(e),Yv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Wa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){vn(11)},getPrototypeOf(e){return Cu(e.base_)},setPrototypeOf(){vn(12)}},Ou={};Of(ry,(e,t)=>{Ou[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ou.deleteProperty=function(e,t){return Ou.set.call(this,e,t,void 0)};Ou.set=function(e,t,r){return ry.set.call(this,e[0],t,r,e[0])};function Sg(e,t){const r=e[Fr];return(r?Wa(r):e)[t]}function r8(e,t,r){var i;const n=MA(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function MA(e,t){if(!(t in e))return;let r=Cu(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Cu(r)}}function Yv(e){e.modified_||(e.modified_=!0,e.parent_&&Yv(e.parent_))}function Ng(e){e.copy_||(e.copy_=Vv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var n8=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const u=this;return function(f=o,...h){return u.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&vn(6),n!==void 0&&typeof n!="function"&&vn(7);let i;if(vo(t)){const o=rj(this),u=Xv(t,void 0);let c=!0;try{i=r(u),c=!1}finally{c?qv(o):Qv(o)}return tj(o,n),nj(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===CA&&(i=void 0),this.autoFreeze_&&ty(i,!0),n){const o=[],u=[];yo("Patches").generateReplacementPatches_(t,i,o,u),n(o,u)}return i}else vn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,f=>t(f,...c));let n,i;return[this.produce(t,r,(u,c)=>{n=u,i=c}),n,i]},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){vo(e)||vn(8),Fs(e)&&(e=i8(e));const t=rj(this),r=Xv(e,void 0);return r[Fr].isManual_=!0,Qv(t),r}finishDraft(e,t){const r=e&&e[Fr];(!r||!r.isManual_)&&vn(9);const{scope_:n}=r;return tj(n,t),nj(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=yo("Patches").applyPatches_;return Fs(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Xv(e,t){const r=Ju(e)?yo("MapSet").proxyMap_(e,t):Fh(e)?yo("MapSet").proxySet_(e,t):t8(e,t);return(t?t.scope_:_A()).drafts_.push(r),r}function i8(e){return Fs(e)||vn(10,e),IA(e)}function IA(e){if(!vo(e)||Bh(e))return e;const t=e[Fr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Vv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Vv(e,!0);return Of(r,(i,o)=>{OA(r,i,IA(o))},n),t&&(t.finalized_=!1),r}var a8=new n8;a8.produce;var o8={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},TA=lr({name:"legend",initialState:o8,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,i=r.next,o=Xr(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:st()},removeLegendPayload:{reducer(e,t){var r=Xr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:st()}}}),ec=TA.actions;ec.setLegendSize;ec.setLegendSettings;var s8=ec.addLegendPayload,l8=ec.replaceLegendPayload,u8=ec.removeLegendPayload,c8=TA.reducer,Eg={exports:{}},Ag={};/**
|
||
* @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 aj;function d8(){if(aj)return Ag;aj=1;var e=qs();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,i=e.useRef,o=e.useEffect,u=e.useMemo,c=e.useDebugValue;return Ag.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var b=i(null);if(b.current===null){var j={hasValue:!1,value:null};b.current=j}else j=b.current;b=u(function(){function S(_){if(!N){if(N=!0,E=_,_=g(_),v!==void 0&&j.hasValue){var O=j.value;if(v(O,_))return A=O}return A=_}if(O=A,r(E,_))return O;var T=g(_);return v!==void 0&&v(O,T)?(E=_,O):(E=_,A=T)}var N=!1,E,A,P=m===void 0?null:m;return[function(){return S(h())},P===null?void 0:function(){return S(P())}]},[h,m,g,v]);var k=n(f,b[0],b[1]);return o(function(){j.hasValue=!0,j.value=k},[k]),c(k),k},Ag}var oj;function f8(){return oj||(oj=1,Eg.exports=d8()),Eg.exports}f8();function h8(e){e()}function m8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){h8(()=>{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 i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var sj={notify(){},get:()=>[]};function p8(e,t){let r,n=sj,i=0,o=!1;function u(k){m();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function c(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return o}function m(){i++,r||(r=e.subscribe(f),n=m8())}function g(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=sj)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,g())}const j={addNestedSub:u,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return j}var g8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v8=g8(),y8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",x8=y8(),b8=()=>v8||x8?y.useLayoutEffect:y.useEffect,w8=b8();function lj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function k8(e,t){if(lj(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 i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!lj(e[r[i]],t[r[i]]))return!1;return!0}var Cg=Symbol.for("react-redux-context"),Pg=typeof globalThis<"u"?globalThis:{};function j8(){if(!y.createContext)return{};const e=Pg[Cg]??(Pg[Cg]=new Map);let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var S8=j8();function N8(e){const{children:t,context:r,serverState:n,store:i}=e,o=y.useMemo(()=>{const f=p8(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),u=y.useMemo(()=>i.getState(),[i]);w8(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,u]);const c=r||S8;return y.createElement(c.Provider,{value:o},t)}var E8=N8,A8=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function C8(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Uh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(A8.has(n)){if(e[n]==null&&t[n]==null)continue;if(!k8(e[n],t[n]))return!1}else if(!C8(e[n],t[n]))return!1;return!0}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 uj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uj(Object(r),!0).forEach(function(n){P8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P8(e,t,r){return(t=O8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O8(e){var t=_8(e,"string");return typeof t=="symbol"?t:t+""}function _8(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 M8(e,t){return R8(e)||D8(e,t)||T8(e,t)||I8()}function I8(){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 T8(e,t){if(e){if(typeof e=="string")return cj(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)?cj(e,t):void 0}}function cj(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 D8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function R8(e){if(Array.isArray(e))return e}function L8(e){return Array.isArray(e)&&Bn(e[0])&&Bn(e[1])?e.join(" ~ "):e}var ns={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 $8(e,t){return t==null?e:jh(e,t)}var z8=e=>{var t=e.separator,r=t===void 0?ns.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,u=o===void 0?ns.labelStyle:o,c=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,g=e.labelClassName,v=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?ns.accessibilityLayer:j,S=()=>{if(c&&c.length){var B={padding:0,margin:0},$=$8(c,h),z=$.map((Q,U)=>{if(!Q||Q.type==="none")return null;var ve=Q.formatter||f||L8,ue=Q.value,pe=Q.name,oe=ue,se=pe;if(ve){var X=ve(ue,pe,Q,U,c);if(Array.isArray(X)){var ne=M8(X,2);oe=ne[0],se=ne[1]}else if(X!=null)oe=X;else return null}var te=Jl(Jl({},ns.itemStyle),{},{color:Q.color||ns.itemStyle.color},i);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:te},Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-name"},se):null,Bn(se)?y.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,y.createElement("span",{className:"recharts-tooltip-item-value"},oe),y.createElement("span",{className:"recharts-tooltip-item-unit"},Q.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:B},z)}return null},N=Jl(Jl({},ns.contentStyle),n),E=Jl({margin:0},u),A=!Yt(v),P=A?v:"",_=rt("recharts-default-tooltip",m),O=rt("recharts-tooltip-label",g);A&&b&&c!==void 0&&c!==null&&(P=b(v,c));var T=k?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",Zv({className:_,style:N},T),y.createElement("p",{className:O,style:E},y.isValidElement(P)?P:"".concat(P)),S())},eu="recharts-tooltip-wrapper",F8={visibility:"hidden"};function B8(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return rt(eu,{["".concat(eu,"-right")]:Ae(r)&&t&&Ae(t.x)&&r>=t.x,["".concat(eu,"-left")]:Ae(r)&&t&&Ae(t.x)&&r<t.x,["".concat(eu,"-bottom")]:Ae(n)&&t&&Ae(t.y)&&n>=t.y,["".concat(eu,"-top")]:Ae(n)&&t&&Ae(t.y)&&n<t.y})}function dj(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offset,o=e.position,u=e.reverseDirection,c=e.tooltipDimension,f=e.viewBox,h=e.viewBoxDimension;if(o&&Ae(o[n]))return o[n];var m=r[n]-c-(i>0?i:0),g=r[n]+i;if(t[n])return u[n]?m:g;var v=f[n];if(v==null)return 0;if(u[n]){var b=m,j=v;return b<j?Math.max(g,v):Math.max(m,v)}if(h==null)return 0;var k=g+c,S=v+h;return k>S?Math.max(m,v):Math.max(g,v)}function U8(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 H8(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,u=e.reverseDirection,c=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,g,v;return c.height>0&&c.width>0&&r?(g=dj({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:u,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),v=dj({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:u,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),m=U8({translateX:g,translateY:v,useTranslate3d:f})):m=F8,{cssProperties:m,cssClasses:B8({translateX:g,translateY:v,coordinate:r})}}var W8=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),tc={isSsr:W8()};function K8(e,t){return Q8(e)||q8(e,t)||V8(e,t)||G8()}function G8(){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 V8(e,t){if(e){if(typeof e=="string")return fj(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)?fj(e,t):void 0}}function fj(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 q8(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function Q8(e){if(Array.isArray(e))return e}function DA(){var e=y.useState(()=>tc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=K8(e,2),r=t[0],n=t[1];return y.useEffect(()=>{if(window.matchMedia){var i=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(i.matches)};return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}}},[]),r}function hj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function is(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hj(Object(r),!0).forEach(function(n){Y8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y8(e,t,r){return(t=X8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X8(e){var t=Z8(e,"string");return typeof t=="symbol"?t:t+""}function Z8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J8(e,t){return nF(e)||rF(e,t)||tF(e,t)||eF()}function eF(){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 mj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mj(e,t):void 0}}function mj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function nF(e){if(Array.isArray(e))return e}function iF(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 aF(e){var t,r,n,i,o,u,c=DA(),f=y.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=J8(f,2),m=h[0],g=h[1];y.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var A,P,_,O;g({dismissed:!0,dismissedAtCoordinate:{x:(A=(P=e.coordinate)===null||P===void 0?void 0:P.x)!==null&&A!==void 0?A:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&g(is(is({},m),{},{dismissed:!1}));var v=H8({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),b=v.cssClasses,j=v.cssProperties,k=e.hasPortalFromProps?{}:is(is({transition:iF({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=is(is({},k),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var oF=y.memo(aF),RA=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jv.apply(null,arguments)}function pj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pj(Object(r),!0).forEach(function(n){sF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sF(e,t,r){return(t=lF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lF(e){var t=uF(e,"string");return typeof t=="symbol"?t:t+""}function uF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vj={curveBasisClosed:sL,curveBasisOpen:lL,curveBasis:oL,curveBumpX:iL,curveBumpY:aL,curveLinearClosed:uL,curveLinear:wh,curveMonotoneX:cL,curveMonotoneY:dL,curveNatural:fL,curveStep:hL,curveStepAfter:pL,curveStepBefore:mL},If=e=>We(e.x)&&We(e.y),yj=e=>e.base!=null&&If(e.base)&&If(e),tu=e=>e.x,ru=e=>e.y,cF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(U0(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=vj["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return vj[r]||wh},xj={connectNulls:!1,type:"linear"},dF=e=>{var t=e.type,r=t===void 0?xj.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?xj.connectNulls:c,h=cF(r,u),m=f?i.filter(If):i;if(Array.isArray(o)){var g,v=i.map((N,E)=>gj(gj({},N),{},{base:o[E]}));u==="vertical"?g=_d().y(ru).x1(tu).x0(N=>N.base.x):g=_d().x(tu).y1(ru).y0(N=>N.base.y);var b=g.defined(yj).curve(h),j=f?v.filter(yj):v;return b(j)}var k;u==="vertical"&&Ae(o)?k=_d().y(ru).x1(tu).x0(o):Ae(o)?k=_d().x(tu).y1(ru).y0(o):k=dE().x(tu).y(ru);var S=k.defined(If).curve(h);return S(m)},Jd=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=Js();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=r&&r.length?dF(u):n;return y.createElement("path",Jv({},xn(e),H0(e),{className:rt("recharts-curve",t),d:c===null?void 0:c,ref:i}))},fF=["x","y","top","left","width","height","className"];function e0(){return e0=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},e0.apply(null,arguments)}function bj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bj(Object(r),!0).forEach(function(n){mF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mF(e,t,r){return(t=pF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pF(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)}function vF(e,t){if(e==null)return{};var r,n,i=yF(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)&&(i[r]=e[r])}return i}function yF(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 xF=(e,t,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),bF=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,u=o===void 0?0:o,c=e.left,f=c===void 0?0:c,h=e.width,m=h===void 0?0:h,g=e.height,v=g===void 0?0:g,b=e.className,j=vF(e,fF),k=hF({x:r,y:i,top:u,left:f,width:m,height:v},j);return!Ae(r)||!Ae(i)||!Ae(m)||!Ae(v)||!Ae(u)||!Ae(f)?null:y.createElement("path",e0({},en(k),{className:rt("recharts-cross",b),d:xF(r,i,m,v,u,f)}))};function wF(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Tf=1e-4,LA=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],$A=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),wj=(e,t)=>r=>{var n=LA(e,t);return $A(n,r)},kF=(e,t)=>r=>{var n=LA(e,t),i=[...n.map((o,u)=>o*u).slice(1),0];return $A(i,r)},jF=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 i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},SF=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 i=jF(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},NF=(e,t,r,n)=>{var i=wj(e,r),o=wj(t,n),u=kF(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,g=m,v=0;v<8;++v){var b=i(g)-m,j=u(g);if(Math.abs(b-m)<Tf||j<Tf)return o(g);g=c(g-b/j)}return o(g)};return f.isStepper=!1,f},kj=function(){return NF(...SF(...arguments))},EF=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,u=t.dt,c=u===void 0?16.67:u,f=1,h=[0],m=0,g=0,v=1e4,b=0;b<v;){var j=-(m-f)*n,k=g*o;if(g+=(j-k)*c/1e3,m+=g*c/1e3,h.push(m),Math.abs(m-f)<Tf&&Math.abs(g)<Tf)break;b++}h[h.length-1]=f;var S=h.length-1;return N=>{var E,A,P;if(N<=0)return 0;if(N>=1)return f;var _=N*S,O=Math.floor(_),T=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((A=h[O+1])!==null&&A!==void 0?A:0)-((P=h[O])!==null&&P!==void 0?P:0))*T}},AF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return kj(e);case"spring":return EF();default:if(e.split("(")[0]==="cubic-bezier")return kj(e)}return typeof e=="function"?e:null},CF=(e,t,r)=>{var n,i=o=>{var u=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(i,u);return}n=e.setTimeout(i,u)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},zA=y.createContext(CF);zA.Provider;function PF(e){var t=y.useContext(zA);return y.useMemo(()=>e??t,[e,t])}function OF(e,t,r){return(t=_F(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _F(e){var t=MF(e,"string");return typeof t=="symbol"?t:t+""}function MF(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 jj="init",Sj="pending",Nj="active",IF="completed";function Og(e){return Math.max(0,e)}class TF{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;OF(this,"state",jj),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Og(t.animationDuration),this.animationBegin=Og(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()===jj)return this.state=Sj,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Sj){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Nj,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Og(this.animationBegin-r)}if(this.getState()===Nj){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=IF}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class DF extends TF{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(ui(this.getFrom(),this.getTo(),this.getProgress()))}}class RF{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=u=>{u-n>=r?t(u):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function LF(e,t){return BF(e)||FF(e,t)||zF(e,t)||$F()}function $F(){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 zF(e,t){if(e){if(typeof e=="string")return Ej(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ej(e,t):void 0}}function Ej(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function FF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function BF(e){if(Array.isArray(e))return e}var UF={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Aj=0,_g=1;function FA(e){var t=nn(e,UF),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,u=t.easing,c=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,g=DA(),v=n==="auto"?!tc.isSsr&&!g:n,b=PF(t.animationController),j=y.useState(v?Aj:_g),k=LF(j,2),S=k[0],N=k[1];return y.useEffect(()=>{v||N(_g)},[v]),y.useEffect(()=>{var E=AF(u);if(!v||!i||E==null)return Zs;var A=new RF,P=new DF({animationId:r,easing:E,animationDuration:o,animationBegin:c,onAnimationStart:h,onAnimationEnd:f,from:Aj,to:_g});return b(A,P,N)},[b,r,v,i,o,u,c,h,f]),m(Number(S))}function BA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=y.useRef(Su(t)),n=y.useRef(e);return n.current!==e&&(r.current=Su(t),n.current=e),r.current}var HF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),WF=(e,t,r)=>e.map(n=>"".concat(HF(n)," ").concat(t,"ms ").concat(r)).join(","),KF=["radius"],GF=["radius"],Cj,Pj,Oj,_j,Mj,Ij,Tj,Dj,Rj,Lj;function $j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$j(Object(r),!0).forEach(function(n){VF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$j(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VF(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=QF(e,"string");return typeof t=="symbol"?t:t+""}function QF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Df(){return Df=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Df.apply(null,arguments)}function Fj(e,t){if(e==null)return{};var r,n,i=YF(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)&&(i[r]=e[r])}return i}function YF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function XF(e,t){return tB(e)||eB(e,t)||JF(e,t)||ZF()}function ZF(){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 JF(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 eB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function tB(e){if(Array.isArray(e))return e}function Pn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Uj=(e,t,r,n,i)=>{var o=ca(r),u=ca(n),c=Math.min(Math.abs(o)/2,Math.abs(u)/2),f=u>=0?1:-1,h=o>=0?1:-1,m=u>=0&&o>=0||u<0&&o<0?1:0,g;if(c>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,j=4;b<j;b++){var k,S=(k=i[b])!==null&&k!==void 0?k:0;v[b]=S>c?c:S}g=Kt(Cj||(Cj=Pn(["M",",",""])),e,t+f*v[0]),v[0]>0&&(g+=Kt(Pj||(Pj=Pn(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),g+=Kt(Oj||(Oj=Pn(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(g+=Kt(_j||(_j=Pn(["A ",",",",0,0,",`,
|
||
`,",",""])),v[1],v[1],m,e+r,t+f*v[1])),g+=Kt(Mj||(Mj=Pn(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(g+=Kt(Ij||(Ij=Pn(["A ",",",",0,0,",`,
|
||
`,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),g+=Kt(Tj||(Tj=Pn(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(g+=Kt(Dj||(Dj=Pn(["A ",",",",0,0,",`,
|
||
`,",",""])),v[3],v[3],m,e,t+n-f*v[3])),g+="Z"}else if(c>0&&i===+i&&i>0){var N=Math.min(c,i);g=Kt(Rj||(Rj=Pn(["M ",",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",",",`
|
||
L `,",",`
|
||
A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else g=Kt(Lj||(Lj=Pn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},Hj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rB=e=>{var t=nn(e,Hj),r=y.useRef(null),n=y.useState(-1),i=XF(n,2),o=i[0],u=i[1];y.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var X=r.current.getTotalLength();X&&u(X)}catch{}},[]);var c=t.x,f=t.y,h=t.width,m=t.height,g=t.radius,v=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,E=y.useRef(h),A=y.useRef(m),P=y.useRef(c),_=y.useRef(f),O=y.useMemo(()=>({x:c,y:f,width:h,height:m,radius:g}),[c,f,h,m,g]),T=BA(O,"rectangle-");if(c!==+c||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var B=rt("recharts-rectangle",v);if(!N){var $=en(t);$.radius;var z=Fj($,KF);return y.createElement("path",Df({},z,{x:ca(c),y:ca(f),width:ca(h),height:ca(m),radius:typeof g=="number"?g:void 0,className:B,d:Uj(c,f,h,m,g)}))}var Q=E.current,U=A.current,ve=P.current,ue=_.current,pe="0px ".concat(o===-1?1:o,"px"),oe="".concat(o,"px ").concat(o,"px"),se=WF(["strokeDasharray"],j,typeof b=="string"?b:Hj.animationEasing);return y.createElement(FA,{animationId:T,key:T,canBegin:o>0,duration:j,easing:b,isActive:N,begin:k},X=>{var ne=ui(Q,h,X),te=ui(U,m,X),I=ui(ve,c,X),M=ui(ue,f,X);r.current&&(E.current=ne,A.current=te,P.current=I,_.current=M);var H;S?X>0?H={transition:se,strokeDasharray:oe}:H={strokeDasharray:pe}:H={strokeDasharray:oe};var ie=en(t);ie.radius;var J=Fj(ie,GF);return y.createElement("path",Df({},J,{radius:typeof g=="number"?g:void 0,className:B,d:Uj(I,M,ne,te,g),ref:r,style:zj(zj({},H),t.style)}))})};function Wj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wj(Object(r),!0).forEach(function(n){nB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nB(e,t,r){return(t=iB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iB(e){var t=aB(e,"string");return typeof t=="symbol"?t:t+""}function aB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rf=Math.PI/180,oB=e=>e*180/Math.PI,qt=(e,t,r,n)=>({x:e+Math.cos(-Rf*n)*r,y:t+Math.sin(-Rf*n)*r}),sB=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},lB=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},uB=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,u=lB({x:r,y:n},{x:i,y:o});if(u<=0)return{radius:u,angle:0};var c=(r-i)/u,f=Math.acos(c);return n>o&&(f=2*Math.PI-f),{radius:u,angle:oB(f),angleInRadian:f}},cB=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},dB=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),u=Math.min(i,o);return e+u*360},fB=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=uB({x:r,y:n},t),o=i.radius,u=i.angle,c=t.innerRadius,f=t.outerRadius;if(o<c||o>f||o===0)return null;var h=cB(t),m=h.startAngle,g=h.endAngle,v=u,b;if(m<=g){for(;v>g;)v-=360;for(;v<m;)v+=360;b=v>=m&&v<=g}else{for(;v>m;)v-=360;for(;v<g;)v+=360;b=v>=g&&v<=m}return b?Kj(Kj({},t),{},{radius:o,angle:dB(v,t)}):null};function UA(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,u=qt(t,r,n,i),c=qt(t,r,n,o);return{points:[u,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var Gj,Vj,qj,Qj,Yj,Xj,Zj;function t0(){return t0=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},t0.apply(null,arguments)}function qa(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var hB=(e,t)=>{var r=Yr(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,i=e.angle,o=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,h=c*(u?1:-1)+n,m=Math.asin(c/h)/Rf,g=f?i:i+o*m,v=qt(t,r,h,g),b=qt(t,r,n,g),j=f?i-o*m:i,k=qt(t,r,h*Math.cos(m*Rf),j);return{center:v,circleTangency:b,lineTangency:k,theta:m}},HA=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,u=e.endAngle,c=hB(o,u),f=o+c,h=qt(t,r,i,o),m=qt(t,r,i,f),g=Kt(Gj||(Gj=qa(["M ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,",",`
|
||
`])),h.x,h.y,i,i,+(Math.abs(c)>180),+(o>f),m.x,m.y);if(n>0){var v=qt(t,r,n,o),b=qt(t,r,n,f);g+=Kt(Vj||(Vj=qa(["L ",",",`
|
||
A `,",",`,0,
|
||
`,",",`,
|
||
`,","," Z"])),b.x,b.y,n,n,+(Math.abs(c)>180),+(o<=f),v.x,v.y)}else g+=Kt(qj||(qj=qa(["L ",","," Z"])),t,r);return g},mB=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=Yr(h-f),g=zd({cx:t,cy:r,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:c}),v=g.circleTangency,b=g.lineTangency,j=g.theta,k=zd({cx:t,cy:r,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:c}),S=k.circleTangency,N=k.lineTangency,E=k.theta,A=c?Math.abs(f-h):Math.abs(f-h)-j-E;if(A<0)return u?Kt(Qj||(Qj=qa(["M ",",",`
|
||
a`,",",",0,0,1,",`,0
|
||
a`,",",",0,0,1,",`,0
|
||
`])),b.x,b.y,o,o,o*2,o,o,-o*2):HA({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var P=Kt(Yj||(Yj=qa(["M ",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
`])),b.x,b.y,o,o,+(m<0),v.x,v.y,i,i,+(A>180),+(m<0),S.x,S.y,o,o,+(m<0),N.x,N.y);if(n>0){var _=zd({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),O=_.circleTangency,T=_.lineTangency,B=_.theta,$=zd({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),z=$.circleTangency,Q=$.lineTangency,U=$.theta,ve=c?Math.abs(f-h):Math.abs(f-h)-B-U;if(ve<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=Kt(Xj||(Xj=qa(["L",",",`
|
||
A`,",",",0,0,",",",",",`
|
||
A`,",",",0,",",",",",",",`
|
||
A`,",",",0,0,",",",",","Z"])),Q.x,Q.y,o,o,+(m<0),z.x,z.y,n,n,+(ve>180),+(m>0),O.x,O.y,o,o,+(m<0),T.x,T.y)}else P+=Kt(Zj||(Zj=qa(["L",",","Z"])),t,r);return P},pB={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},gB=e=>{var t=nn(e,pB),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,u=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,g=t.className;if(o<i||h===m)return null;var v=rt("recharts-sector",g),b=o-i,j=ya(u,b,0,!0),k;return j>0&&Math.abs(h-m)<360?k=mB({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(j,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m}):k=HA({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),y.createElement("path",t0({},en(t),{className:v,d:k}))};function vB(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(SE(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,u=t.outerRadius,c=t.angle,f=qt(n,i,o,c),h=qt(n,i,u,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return UA(t)}}function yB(e){return $E(e)?NaN:Number(e)}function Mg(e){return e?(e=yB(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function WA(e,t,r){r&&typeof r!="number"&&Dv(e,t,r)&&(t=r=void 0),e=Mg(e),t===void 0?(t=e,e=0):t=Mg(t),r=r===void 0?e<t?1:-1:Mg(r);const n=Math.max(Math.ceil((t-e)/(r||1)),0),i=new Array(n);for(let o=0;o<n;o++)i[o]=e,e+=r;return i}var kn=e=>e.chartData,ny=q([kn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Hh=(e,t,r,n)=>n?ny(e):kn(e),xB=(e,t,r)=>r?ny(e):kn(e),bB=q([Hh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});q([ny],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var wB=q([kn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function iy(e,t){return NB(e)||SB(e,t)||jB(e,t)||kB()}function kB(){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 jB(e,t){if(e){if(typeof e=="string")return Jj(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)?Jj(e,t):void 0}}function Jj(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 SB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function NB(e){if(Array.isArray(e))return e}function $n(e){if(Array.isArray(e)&&e.length===2){var t=iy(e,2),r=t[0],n=t[1];if(We(r)&&We(n))return!0}return!1}function e2(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function KA(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var r=iy(e,2),n=r[0],i=r[1],o,u;if(We(n))o=n;else if(typeof n=="function")return;if(We(i))u=i;else if(typeof i=="function")return;var c=[o,u];if($n(c))return c}}function EB(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if($n(n))return e2(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var i=iy(e,2),o=i[0],u=i[1],c,f;if(o==="auto")t!=null&&(c=Math.min(...t));else if(Ae(o))c=o;else if(typeof o=="function")try{t!=null&&(c=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&Gk.test(o)){var h=Gk.exec(o);if(h==null||h[1]==null||t==null)c=void 0;else{var m=+h[1];c=t[0]-m}}else c=t==null?void 0:t[0];if(u==="auto")t!=null&&(f=Math.max(...t));else if(Ae(u))f=u;else if(typeof u=="function")try{t!=null&&(f=u(t==null?void 0:t[1]))}catch{}else if(typeof u=="string"&&Vk.test(u)){var g=Vk.exec(u);if(g==null||g[1]==null||t==null)f=void 0;else{var v=+g[1];f=t[1]+v}}else f=t==null?void 0:t[1];var b=[c,f];if($n(b))return t==null?b:e2(b,t,r)}}}var el=1e9,AB={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},oy,dt=!0,rn="[DecimalError] ",co=rn+"Invalid argument: ",ay=rn+"Exponent out of range: ",tl=Math.floor,Ka=Math.pow,CB=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Rr,Rt=1e7,lt=7,GA=9007199254740991,Lf=tl(GA/lt),je={};je.absoluteValue=je.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};je.comparedTo=je.cmp=function(e){var t,r,n,i,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,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};je.decimalPlaces=je.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};je.dividedBy=je.div=function(e){return hi(this,new this.constructor(e))};je.dividedToIntegerBy=je.idiv=function(e){var t=this,r=t.constructor;return et(hi(t,new r(e),0,1),r.precision)};je.equals=je.eq=function(e){return!this.cmp(e)};je.exponent=function(){return St(this)};je.greaterThan=je.gt=function(e){return this.cmp(e)>0};je.greaterThanOrEqualTo=je.gte=function(e){return this.cmp(e)>=0};je.isInteger=je.isint=function(){return this.e>this.d.length-2};je.isNegative=je.isneg=function(){return this.s<0};je.isPositive=je.ispos=function(){return this.s>0};je.isZero=function(){return this.s===0};je.lessThan=je.lt=function(e){return this.cmp(e)<0};je.lessThanOrEqualTo=je.lte=function(e){return this.cmp(e)<1};je.logarithm=je.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Rr))throw Error(rn+"NaN");if(r.s<1)throw Error(rn+(r.s?"NaN":"-Infinity"));return r.eq(Rr)?new n(0):(dt=!1,t=hi(_u(r,o),_u(e,o),o),dt=!0,et(t,i))};je.minus=je.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?QA(t,e):VA(t,(e.s=-e.s,e))};je.modulo=je.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(rn+"NaN");return r.s?(dt=!1,t=hi(r,e,0,1).times(e),dt=!0,r.minus(t)):et(new n(r),i)};je.naturalExponential=je.exp=function(){return qA(this)};je.naturalLogarithm=je.ln=function(){return _u(this)};je.negated=je.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};je.plus=je.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?VA(t,e):QA(t,(e.s=-e.s,e))};je.precision=je.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(co+e);if(t=St(i)+1,n=i.d.length-1,r=n*lt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};je.squareRoot=je.sqrt=function(){var e,t,r,n,i,o,u,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(rn+"NaN")}for(e=St(c),dt=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Ln(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=tl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=u=r+3;;)if(o=n,n=o.plus(hi(c,o,u+2)).times(.5),Ln(o.d).slice(0,u)===(t=Ln(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),i==u&&t=="4999"){if(et(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;u+=4}return dt=!0,et(n,r)};je.times=je.mul=function(e){var t,r,n,i,o,u,c,f,h,m=this,g=m.constructor,v=m.d,b=(e=new g(e)).d;if(!m.s||!e.s)return new g(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f<h&&(o=v,v=b,b=o,u=f,f=h,h=u),o=[],u=f+h,n=u;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)c=o[i]+b[n]*v[i-n-1]+t,o[i--]=c%Rt|0,t=c/Rt|0;o[i]=(o[i]+t)%Rt|0}for(;!o[--u];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,dt?et(e,g.precision):e};je.toDecimalPlaces=je.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Hn(e,0,el),t===void 0?t=n.rounding:Hn(t,0,8),et(r,e+St(r)+1,t))};je.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xo(n,!0):(Hn(e,0,el),t===void 0?t=i.rounding:Hn(t,0,8),n=et(new i(n),e+1,t),r=xo(n,!0,e+1)),r};je.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?xo(i):(Hn(e,0,el),t===void 0?t=o.rounding:Hn(t,0,8),n=et(new o(i),e+St(i)+1,t),r=xo(n.abs(),!1,e+St(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};je.toInteger=je.toint=function(){var e=this,t=e.constructor;return et(new t(e),St(e)+1,t.rounding)};je.toNumber=function(){return+this};je.toPower=je.pow=function(e){var t,r,n,i,o,u,c=this,f=c.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Rr);if(c=new f(c),!c.s){if(e.s<1)throw Error(rn+"Infinity");return c}if(c.eq(Rr))return c;if(n=f.precision,e.eq(Rr))return et(c,n);if(t=e.e,r=e.d.length-1,u=t>=r,o=c.s,u){if((r=m<0?-m:m)<=GA){for(i=new f(Rr),t=Math.ceil(n/lt+4),dt=!1;r%2&&(i=i.times(c),r2(i.d,t)),r=tl(r/2),r!==0;)c=c.times(c),r2(c.d,t);return dt=!0,e.s<0?new f(Rr).div(i):et(i,n)}}else if(o<0)throw Error(rn+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,dt=!1,i=e.times(_u(c,n+h)),dt=!0,i=qA(i),i.s=o,i};je.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=St(i),n=xo(i,r<=o.toExpNeg||r>=o.toExpPos)):(Hn(e,1,el),t===void 0?t=o.rounding:Hn(t,0,8),i=et(new o(i),e,t),r=St(i),n=xo(i,e<=r||r<=o.toExpNeg,e)),n};je.toSignificantDigits=je.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Hn(e,1,el),t===void 0?t=n.rounding:Hn(t,0,8)),et(new n(r),e,t)};je.toString=je.valueOf=je.val=je.toJSON=je[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=St(e),r=e.constructor;return xo(e,t<=r.toExpNeg||t>=r.toExpPos)};function VA(e,t){var r,n,i,o,u,c,f,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),dt?et(t,g):t;if(f=e.d,h=t.d,u=e.e,i=t.e,f=f.slice(),o=u-i,o){for(o<0?(n=f,o=-o,c=h.length):(n=h,i=u,c=f.length),u=Math.ceil(g/lt),c=u>c?u+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=f.length,o=h.length,c-o<0&&(o=c,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Rt|0,f[o]%=Rt;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,dt?et(t,g):t}function Hn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(co+e)}function Ln(e){var t,r,n,i=e.length-1,o="",u=e[0];if(i>0){for(o+=u,t=1;t<i;t++)n=e[t]+"",r=lt-n.length,r&&(o+=Ji(r)),o+=n;u=e[t],n=u+"",r=lt-n.length,r&&(o+=Ji(r))}else if(u===0)return"0";for(;u%10===0;)u/=10;return o+u}var hi=(function(){function e(n,i){var o,u=0,c=n.length;for(n=n.slice();c--;)o=n[c]*i+u,n[c]=o%Rt|0,u=o/Rt|0;return u&&n.unshift(u),n}function t(n,i,o,u){var c,f;if(o!=u)f=o>u?1:-1;else for(c=f=0;c<o;c++)if(n[c]!=i[c]){f=n[c]>i[c]?1:-1;break}return f}function r(n,i,o){for(var u=0;o--;)n[o]-=u,u=n[o]<i[o]?1:0,n[o]=u*Rt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,u){var c,f,h,m,g,v,b,j,k,S,N,E,A,P,_,O,T,B,$=n.constructor,z=n.s==i.s?1:-1,Q=n.d,U=i.d;if(!n.s)return new $(n);if(!i.s)throw Error(rn+"Division by zero");for(f=n.e-i.e,T=U.length,_=Q.length,b=new $(z),j=b.d=[],h=0;U[h]==(Q[h]||0);)++h;if(U[h]>(Q[h]||0)&&--f,o==null?E=o=$.precision:u?E=o+(St(n)-St(i))+1:E=o,E<0)return new $(0);if(E=E/lt+2|0,h=0,T==1)for(m=0,U=U[0],E++;(h<_||m)&&E--;h++)A=m*Rt+(Q[h]||0),j[h]=A/U|0,m=A%U|0;else{for(m=Rt/(U[0]+1)|0,m>1&&(U=e(U,m),Q=e(Q,m),T=U.length,_=Q.length),P=T,k=Q.slice(0,T),S=k.length;S<T;)k[S++]=0;B=U.slice(),B.unshift(0),O=U[0],U[1]>=Rt/2&&++O;do m=0,c=t(U,k,T,S),c<0?(N=k[0],T!=S&&(N=N*Rt+(k[1]||0)),m=N/O|0,m>1?(m>=Rt&&(m=Rt-1),g=e(U,m),v=g.length,S=k.length,c=t(g,k,v,S),c==1&&(m--,r(g,T<v?B:U,v))):(m==0&&(c=m=1),g=U.slice()),v=g.length,v<S&&g.unshift(0),r(k,g,S),c==-1&&(S=k.length,c=t(U,k,T,S),c<1&&(m++,r(k,T<S?B:U,S))),S=k.length):c===0&&(m++,k=[0]),j[h++]=m,c&&k[0]?k[S++]=Q[P]||0:(k=[Q[P]],S=1);while((P++<_||k[0]!==void 0)&&E--)}return j[0]||j.shift(),b.e=f,et(b,u?o+St(b)+1:o)}})();function qA(e,t){var r,n,i,o,u,c,f=0,h=0,m=e.constructor,g=m.precision;if(St(e)>16)throw Error(ay+St(e));if(!e.s)return new m(Rr);for(dt=!1,c=g,u=new m(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(Ka(2,h))/Math.LN10*2+5|0,c+=n,r=i=o=new m(Rr),m.precision=c;;){if(i=et(i.times(e),c),r=r.times(++f),u=o.plus(hi(i,r,c)),Ln(u.d).slice(0,c)===Ln(o.d).slice(0,c)){for(;h--;)o=et(o.times(o),c);return m.precision=g,t==null?(dt=!0,et(o,g)):o}o=u}}function St(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function Ig(e,t,r){if(t>e.LN10.sd())throw dt=!0,r&&(e.precision=r),Error(rn+"LN10 precision limit exceeded");return et(new e(e.LN10),t)}function Ji(e){for(var t="";e--;)t+="0";return t}function _u(e,t){var r,n,i,o,u,c,f,h,m,g=1,v=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(Rr))return new k(0);if(t==null?(dt=!1,h=S):h=t,b.eq(10))return t==null&&(dt=!0),Ig(k,h);if(h+=v,k.precision=h,r=Ln(j),n=r.charAt(0),o=St(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Ln(b.d),n=r.charAt(0),g++;o=St(b),n>1?(b=new k("0."+r),o++):b=new k(n+"."+r.slice(1))}else return f=Ig(k,h+2,S).times(o+""),b=_u(new k(n+"."+r.slice(1)),h-v).plus(f),k.precision=S,t==null?(dt=!0,et(b,S)):b;for(c=u=b=hi(b.minus(Rr),b.plus(Rr),h),m=et(b.times(b),h),i=3;;){if(u=et(u.times(m),h),f=c.plus(hi(u,new k(i),h)),Ln(f.d).slice(0,h)===Ln(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(Ig(k,h+2,S).times(o+""))),c=hi(c,new k(g),h),k.precision=S,t==null?(dt=!0,et(c,S)):c;c=f,i+=2}}function t2(e,t){var r,n,i;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(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=tl(r/lt),e.d=[],n=(r+1)%lt,r<0&&(n+=lt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=lt;n<i;)e.d.push(+t.slice(n,n+=lt));t=t.slice(n),n=lt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),dt&&(e.e>Lf||e.e<-Lf))throw Error(ay+r)}else e.s=0,e.e=0,e.d=[0];return e}function et(e,t,r){var n,i,o,u,c,f,h,m,g=e.d;for(u=1,o=g[0];o>=10;o/=10)u++;if(n=t-u,n<0)n+=lt,i=t,h=g[m=0];else{if(m=Math.ceil((n+1)/lt),o=g.length,m>=o)return e;for(h=o=g[m],u=1;o>=10;o/=10)u++;n%=lt,i=n-lt+u}if(r!==void 0&&(o=Ka(10,u-i-1),c=h/o%10|0,f=t<0||g[m+1]!==void 0||h%o,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?i>0?h/Ka(10,u-i):0:g[m-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=St(e),g.length=1,t=t-o-1,g[0]=Ka(10,(lt-t%lt)%lt),e.e=tl(-t/lt)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=m,o=1,m--):(g.length=m+1,o=Ka(10,lt-n),g[m]=i>0?(h/Ka(10,u-i)%Ka(10,i)|0)*o:0),f)for(;;)if(m==0){(g[0]+=o)==Rt&&(g[0]=1,++e.e);break}else{if(g[m]+=o,g[m]!=Rt)break;g[m--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(dt&&(e.e>Lf||e.e<-Lf))throw Error(ay+St(e));return e}function QA(e,t){var r,n,i,o,u,c,f,h,m,g,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),dt?et(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(m=u<0,m?(r=f,u=-u,c=g.length):(r=g,n=h,c=f.length),i=Math.max(Math.ceil(b/lt),c)+2,u>i&&(u=i,r.length=1),r.reverse(),i=u;i--;)r.push(0);r.reverse()}else{for(i=f.length,c=g.length,m=i<c,m&&(c=i),i=0;i<c;i++)if(f[i]!=g[i]){m=f[i]<g[i];break}u=0}for(m&&(r=f,f=g,g=r,t.s=-t.s),c=f.length,i=g.length-c;i>0;--i)f[c++]=0;for(i=g.length;i>u;){if(f[--i]<g[i]){for(o=i;o&&f[--o]===0;)f[o]=Rt-1;--f[o],f[i]+=Rt}f[i]-=g[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,dt?et(t,b):t):new v(0)}function xo(e,t,r){var n,i=St(e),o=Ln(e.d),u=o.length;return t?(r&&(n=r-u)>0?o=o.charAt(0)+"."+o.slice(1)+Ji(n):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ji(-i-1)+o,r&&(n=r-u)>0&&(o+=Ji(n))):i>=u?(o+=Ji(i+1-u),r&&(n=r-i-1)>0&&(o=o+"."+Ji(n))):((n=i+1)<u&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-u)>0&&(i+1===u&&(o+="."),o+=Ji(n))),e.s<0?"-"+o:o}function r2(e,t){if(e.length>t)return e.length=t,!0}function YA(e){var t,r,n;function i(o){var u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,o instanceof i){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(co+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return t2(u,o.toString())}else if(typeof o!="string")throw Error(co+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,CB.test(o))t2(u,o);else throw Error(co+o)}if(i.prototype=je,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=YA,i.config=i.set=PB,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 i.config(e),i}function PB(e){if(!e||typeof e!="object")throw Error(rn+"Object expected");var t,r,n,i=["precision",1,el,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(tl(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(co+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(co+r+": "+n);return this}var oy=YA(AB);Rr=new oy(1);const Ge=oy;function XA(e){var t;return e===0?t=1:t=Math.floor(new Ge(e).abs().log(10).toNumber())+1,t}function ZA(e,t,r){for(var n=new Ge(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function Mu(e,t){return IB(e)||MB(e,t)||_B(e,t)||OB()}function OB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _B(e,t){if(e){if(typeof e=="string")return 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 MB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function IB(e){if(Array.isArray(e))return e}var JA=e=>{var t=Mu(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},sy=(e,t,r)=>{if(e.lte(0))return new Ge(0);var n=XA(e.toNumber()),i=new Ge(10).pow(n),o=e.div(i),u=n!==1?.05:.1,c=new Ge(Math.ceil(o.div(u).toNumber())).add(r).mul(u),f=c.mul(i);return t?new Ge(f.toNumber()):new Ge(Math.ceil(f.toNumber()))},eC=(e,t,r)=>{var n;if(e.lte(0))return new Ge(0);var i=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Ge(o).abs().log(10).toNumber()),c=new Ge(10).pow(u),f=e.div(c).toNumber(),h=i.findIndex(b=>b>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=i.length){var m=Math.floor(h/i.length);h%=i.length,c=c.mul(new Ge(10).pow(m))}var g=(n=i[h])!==null&&n!==void 0?n:1,v=new Ge(g).mul(c);return t?v:new Ge(Math.ceil(v.toNumber()))},TB=(e,t,r)=>{var n=new Ge(1),i=new Ge(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Ge(10).pow(XA(e)-1),i=new Ge(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Ge(Math.floor(e)))}else e===0?i=new Ge(Math.floor((t-1)/2)):r||(i=new Ge(Math.floor(e)));for(var u=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(i.add(new Ge(f-u).mul(n)).toNumber());return c},tC=function(t,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:sy;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ge(0),tickMin:new Ge(0),tickMax:new Ge(0)};var c=u(new Ge(r).sub(t).div(n-1),i,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(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),m=Math.ceil(new Ge(r).sub(f).div(c).toNumber()),g=h+m+1;return g>n?tC(t,r,n,i,o+1,u):(g<n&&(m=r>0?m+(n-g):m,h=r>0?h:h+(n-g)),{step:c,tickMin:f.sub(new Ge(h).mul(c)),tickMax:f.add(new Ge(m).mul(c))})},i2=function(t){var r=Mu(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=JA([n,i]),m=Mu(h,2),g=m[0],v=m[1];if(g===-1/0||v===1/0){var b=v===1/0?[g,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(g===v)return TB(g,o,u);var j=c==="snap125"?eC:sy,k=tC(g,v,f,u,0,j),S=k.step,N=k.tickMin,E=k.tickMax,A=ZA(N,E.add(new Ge(.1).mul(S)),S);return n>i?A.reverse():A},a2=function(t,r){var n=Mu(t,2),i=n[0],o=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=JA([i,o]),h=Mu(f,2),m=h[0],g=h[1];if(m===-1/0||g===1/0)return[i,o];if(m===g)return[m];var v=c==="snap125"?eC:sy,b=Math.max(r,2),j=v(new Ge(g).sub(m).div(b-1),u,0),k=[...ZA(new Ge(m),new Ge(g),j),g];return u===!1&&(k=k.map(S=>Math.round(S))),i>o?k.reverse():k},DB=e=>e.rootProps.barCategoryGap,Wh=e=>e.rootProps.stackOffset,rC=e=>e.rootProps.reverseStackOrder,ly=e=>e.options.chartName,uy=e=>e.rootProps.syncId,nC=e=>e.rootProps.syncMethod,cy=e=>e.options.eventEmitter,RB=e=>e.rootProps.baseValue,fr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},$a={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},On={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Kh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Gh(e,t,r){if(r!=="auto")return r;if(e!=null)return Gn(e,t)?"category":"number"}function o2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o2(Object(r),!0).forEach(function(n){LB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LB(e,t,r){return(t=$B(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $B(e){var t=zB(e,"string");return typeof t=="symbol"?t:t+""}function zB(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 s2={allowDataOverflow:$a.allowDataOverflow,allowDecimals:$a.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:$a.angleAxisId,includeHidden:!1,name:void 0,reversed:$a.reversed,scale:$a.scale,tick:$a.tick,tickCount:void 0,ticks:void 0,type:$a.type,unit:void 0,niceTicks:"auto"},l2={allowDataOverflow:On.allowDataOverflow,allowDecimals:On.allowDecimals,allowDuplicatedCategory:On.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:On.radiusAxisId,includeHidden:On.includeHidden,name:void 0,reversed:On.reversed,scale:On.scale,tick:On.tick,tickCount:On.tickCount,ticks:void 0,type:On.type,unit:void 0,niceTicks:"auto"},FB=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},dy=q([FB,AA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Gh(t,"angleAxis",s2.type))!==null&&r!==void 0?r:"category";return $f($f({},s2),{},{type:n})}),BB=(e,t)=>e.polarAxis.radiusAxis[t],fy=q([BB,AA],(e,t)=>{var r;if(e!=null)return e;var n=(r=Gh(t,"radiusAxis",l2.type))!==null&&r!==void 0?r:"category";return $f($f({},l2),{},{type:n})}),Vh=e=>e.polarOptions,hy=q([ki,ji,Zt],sB),iC=q([Vh,hy],(e,t)=>{if(e!=null)return ya(e.innerRadius,t,0)}),aC=q([Vh,hy],(e,t)=>{if(e!=null)return ya(e.outerRadius,t,t*.8)}),UB=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},oC=q([Vh],UB);q([dy,oC],Kh);var sC=q([hy,iC,aC],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});q([fy,sC],Kh);var lC=q([ft,Vh,iC,aC,ki,ji],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,c=t.cy,f=t.startAngle,h=t.endAngle;return{cx:ya(u,i,i/2),cy:ya(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),zt=(e,t)=>t,qh=(e,t,r)=>r;function my(e){return e==null?void 0:e.id}function uC(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,u=r.dataKey,c=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:i;if(!(m==null||m.length===0)){var g=my(f);m.forEach((v,b)=>{var j=u==null||o?b:String(Lt(v,u,null)),k=Lt(v,f.dataKey,0),S;c.has(j)?S=c.get(j):S={},Object.assign(S,{[g]:k}),c.set(j,S)})}}),Array.from(c.values())}function py(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Qh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Yh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function HB(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Ft=e=>{var t=ft(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},rl=e=>e.tooltip.settings.axisId;function gy(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var u=i[0],c=i[1];return u<=c?o>=u&&o<=c:o>=c&&o<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var c=e(o);if(c!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var WB=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!$n(t)){for(var r,n,i=0;i<t.length;i++){var o=t[i];We(o)&&((r===void 0||o<r)&&(r=o),(n===void 0||o>n)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function ma(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function KB(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vy(e){let t,r,n;e.length!==2?(t=ma,r=(c,f)=>ma(e(c),f),n=(c,f)=>e(c)-f):(t=e===ma||e===KB?e:GB,r=e,n=e);function i(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(c[g],f)<0?h=g+1:m=g}while(h<m)}return h}function o(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const g=h+m>>>1;r(c[g],f)<=0?h=g+1:m=g}while(h<m)}return h}function u(c,f,h=0,m=c.length){const g=i(c,f,h,m-1);return g>h&&n(c[g-1],f)>-n(c[g],f)?g-1:g}return{left:i,center:u,right:o}}function GB(){return 0}function cC(e){return e===null?NaN:+e}function*VB(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const qB=vy(ma),rc=qB.right;vy(cC).center;class u2 extends Map{constructor(t,r=XB){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(c2(this,t))}has(t){return super.has(c2(this,t))}set(t,r){return super.set(QB(this,t),r)}delete(t){return super.delete(YB(this,t))}}function c2({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function QB({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function YB({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function XB(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ZB(e=ma){if(e===ma)return dC;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 dC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const JB=Math.sqrt(50),e9=Math.sqrt(10),t9=Math.sqrt(2);function zf(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),u=o>=JB?10:o>=e9?5:o>=t9?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/u,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*u,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=r&&r<2?zf(e,t,r*2):[c,f,h]}function r0(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,o,u]=n?zf(t,e,r):zf(e,t,r);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(n)if(u<0)for(let h=0;h<c;++h)f[h]=(o-h)/-u;else for(let h=0;h<c;++h)f[h]=(o-h)*u;else if(u<0)for(let h=0;h<c;++h)f[h]=(i+h)/-u;else for(let h=0;h<c;++h)f[h]=(i+h)*u;return f}function n0(e,t,r){return t=+t,e=+e,r=+r,zf(e,t,r)[2]}function i0(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?n0(t,e,r):n0(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function d2(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function f2(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function fC(e,t,r=0,n=1/0,i){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(i=i===void 0?dC:ZB(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),g=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*g*(f-g)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*g/f+v)),j=Math.min(n,Math.floor(t+(f-h)*g/f+v));fC(e,t,b,j,i)}const o=e[t];let u=r,c=n;for(nu(e,r,t),i(e[n],o)>0&&nu(e,r,n);u<c;){for(nu(e,u,c),++u,--c;i(e[u],o)<0;)++u;for(;i(e[c],o)>0;)--c}i(e[r],o)===0?nu(e,r,c):(++c,nu(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function nu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function r9(e,t,r){if(e=Float64Array.from(VB(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return f2(e);if(t>=1)return d2(e);var n,i=(n-1)*t,o=Math.floor(i),u=d2(fC(e,o).subarray(0,o+1)),c=f2(e.subarray(o+1));return u+(c-u)*(i-o)}}function n9(e,t,r=cC){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,i=(n-1)*t,o=Math.floor(i),u=+r(e[o],o,e),c=+r(e[o+1],o+1,e);return u+(c-u)*(i-o)}}function i9(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)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 Si(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 a0=Symbol("implicit");function yy(){var e=new u2,t=[],r=[],n=a0;function i(o){let u=e.get(o);if(u===void 0){if(n!==a0)return n;e.set(o,u=t.push(o)-1)}return r[u%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new u2;for(const u of o)e.has(u)||e.set(u,t.push(u)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return yy(t,r).unknown(n)},an.apply(i,arguments),i}function xy(){var e=yy().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,u,c=!1,f=0,h=0,m=.5;delete e.unknown;function g(){var v=t().length,b=i<n,j=b?i:n,k=b?n:i;o=(k-j)/Math.max(1,v-f+h*2),c&&(o=Math.floor(o)),j+=(k-j-o*(v-f))*m,u=o*(1-f),c&&(j=Math.round(j),u=Math.round(u));var S=i9(v).map(function(N){return j+o*N});return r(b?S.reverse():S)}return e.domain=function(v){return arguments.length?(t(v),g()):t()},e.range=function(v){return arguments.length?([n,i]=v,n=+n,i=+i,g()):[n,i]},e.rangeRound=function(v){return[n,i]=v,n=+n,i=+i,c=!0,g()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(v){return arguments.length?(c=!!v,g()):c},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),g()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),g()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,g()):h},e.align=function(v){return arguments.length?(m=Math.max(0,Math.min(1,v)),g()):m},e.copy=function(){return xy(t(),[n,i]).round(c).paddingInner(f).paddingOuter(h).align(m)},an.apply(g(),arguments)}function hC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return hC(t())},e}function a9(){return hC(xy.apply(null,arguments).paddingInner(1))}function by(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function mC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function nc(){}var Iu=.7,Ff=1/Iu,bs="\\s*([+-]?\\d+)\\s*",Tu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o9=/^#([0-9a-f]{3,8})$/,s9=new RegExp(`^rgb\\(${bs},${bs},${bs}\\)$`),l9=new RegExp(`^rgb\\(${zn},${zn},${zn}\\)$`),u9=new RegExp(`^rgba\\(${bs},${bs},${bs},${Tu}\\)$`),c9=new RegExp(`^rgba\\(${zn},${zn},${zn},${Tu}\\)$`),d9=new RegExp(`^hsl\\(${Tu},${zn},${zn}\\)$`),f9=new RegExp(`^hsla\\(${Tu},${zn},${zn},${Tu}\\)$`),h2={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};by(nc,Du,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:m2,formatHex:m2,formatHex8:h9,formatHsl:m9,formatRgb:p2,toString:p2});function m2(){return this.rgb().formatHex()}function h9(){return this.rgb().formatHex8()}function m9(){return pC(this).formatHsl()}function p2(){return this.rgb().formatRgb()}function Du(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=o9.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?g2(t):r===3?new Nr(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=s9.exec(e))?new Nr(t[1],t[2],t[3],1):(t=l9.exec(e))?new Nr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=u9.exec(e))?Fd(t[1],t[2],t[3],t[4]):(t=c9.exec(e))?Fd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=d9.exec(e))?x2(t[1],t[2]/100,t[3]/100,1):(t=f9.exec(e))?x2(t[1],t[2]/100,t[3]/100,t[4]):h2.hasOwnProperty(e)?g2(h2[e]):e==="transparent"?new Nr(NaN,NaN,NaN,0):null}function g2(e){return new Nr(e>>16&255,e>>8&255,e&255,1)}function Fd(e,t,r,n){return n<=0&&(e=t=r=NaN),new Nr(e,t,r,n)}function p9(e){return e instanceof nc||(e=Du(e)),e?(e=e.rgb(),new Nr(e.r,e.g,e.b,e.opacity)):new Nr}function o0(e,t,r,n){return arguments.length===1?p9(e):new Nr(e,t,r,n??1)}function Nr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}by(Nr,o0,mC(nc,{brighter(e){return e=e==null?Ff:Math.pow(Ff,e),new Nr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Iu:Math.pow(Iu,e),new Nr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Nr(fo(this.r),fo(this.g),fo(this.b),Bf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:v2,formatHex:v2,formatHex8:g9,formatRgb:y2,toString:y2}));function v2(){return`#${Qa(this.r)}${Qa(this.g)}${Qa(this.b)}`}function g9(){return`#${Qa(this.r)}${Qa(this.g)}${Qa(this.b)}${Qa((isNaN(this.opacity)?1:this.opacity)*255)}`}function y2(){const e=Bf(this.opacity);return`${e===1?"rgb(":"rgba("}${fo(this.r)}, ${fo(this.g)}, ${fo(this.b)}${e===1?")":`, ${e})`}`}function Bf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qa(e){return e=fo(e),(e<16?"0":"")+e.toString(16)}function x2(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new yn(e,t,r,n)}function pC(e){if(e instanceof yn)return new yn(e.h,e.s,e.l,e.opacity);if(e instanceof nc||(e=Du(e)),!e)return new yn;if(e instanceof yn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),u=NaN,c=o-i,f=(o+i)/2;return c?(t===o?u=(r-n)/c+(r<n)*6:r===o?u=(n-t)/c+2:u=(t-r)/c+4,c/=f<.5?o+i:2-o-i,u*=60):c=f>0&&f<1?0:u,new yn(u,c,f,e.opacity)}function v9(e,t,r,n){return arguments.length===1?pC(e):new yn(e,t,r,n??1)}function yn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}by(yn,v9,mC(nc,{brighter(e){return e=e==null?Ff:Math.pow(Ff,e),new yn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Iu:Math.pow(Iu,e),new yn(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,i=2*r-n;return new Nr(Tg(e>=240?e-240:e+120,i,n),Tg(e,i,n),Tg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new yn(b2(this.h),Bd(this.s),Bd(this.l),Bf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Bf(this.opacity);return`${e===1?"hsl(":"hsla("}${b2(this.h)}, ${Bd(this.s)*100}%, ${Bd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function b2(e){return e=(e||0)%360,e<0?e+360:e}function Bd(e){return Math.max(0,Math.min(1,e||0))}function Tg(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 wy=e=>()=>e;function y9(e,t){return function(r){return e+r*t}}function x9(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 b9(e){return(e=+e)==1?gC:function(t,r){return r-t?x9(t,r,e):wy(isNaN(t)?r:t)}}function gC(e,t){var r=t-e;return r?y9(e,r):wy(isNaN(e)?t:e)}const w2=(function e(t){var r=b9(t);function n(i,o){var u=r((i=o0(i)).r,(o=o0(o)).r),c=r(i.g,o.g),f=r(i.b,o.b),h=gC(i.opacity,o.opacity);return function(m){return i.r=u(m),i.g=c(m),i.b=f(m),i.opacity=h(m),i+""}}return n.gamma=e,n})(1);function w9(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function k9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function j9(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),u;for(u=0;u<n;++u)i[u]=nl(e[u],t[u]);for(;u<r;++u)o[u]=t[u];return function(c){for(u=0;u<n;++u)o[u]=i[u](c);return o}}function S9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Uf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function N9(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=nl(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var s0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dg=new RegExp(s0.source,"g");function E9(e){return function(){return e}}function A9(e){return function(t){return e(t)+""}}function C9(e,t){var r=s0.lastIndex=Dg.lastIndex=0,n,i,o,u=-1,c=[],f=[];for(e=e+"",t=t+"";(n=s0.exec(e))&&(i=Dg.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),c[u]?c[u]+=o:c[++u]=o),(n=n[0])===(i=i[0])?c[u]?c[u]+=i:c[++u]=i:(c[++u]=null,f.push({i:u,x:Uf(n,i)})),r=Dg.lastIndex;return r<t.length&&(o=t.slice(r),c[u]?c[u]+=o:c[++u]=o),c.length<2?f[0]?A9(f[0].x):E9(t):(t=f.length,function(h){for(var m=0,g;m<t;++m)c[(g=f[m]).i]=g.x(h);return c.join("")})}function nl(e,t){var r=typeof t,n;return t==null||r==="boolean"?wy(t):(r==="number"?Uf:r==="string"?(n=Du(t))?(t=n,w2):C9:t instanceof Du?w2:t instanceof Date?S9:k9(t)?w9:Array.isArray(t)?j9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?N9:Uf)(e,t)}function ky(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function P9(e,t){t===void 0&&(t=e,e=nl);for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(u){var c=Math.max(0,Math.min(n-1,Math.floor(u*=n)));return o[c](u-c)}}function O9(e){return function(){return e}}function Hf(e){return+e}var k2=[0,1];function hr(e){return e}function l0(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:O9(isNaN(t)?NaN:.5)}function _9(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function M9(e,t,r){var n=e[0],i=e[1],o=t[0],u=t[1];return i<n?(n=l0(i,n),o=r(u,o)):(n=l0(n,i),o=r(o,u)),function(c){return o(n(c))}}function I9(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),u=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++u<n;)i[u]=l0(e[u],e[u+1]),o[u]=r(t[u],t[u+1]);return function(c){var f=rc(e,c,1,n)-1;return o[f](i[f](c))}}function ic(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Xh(){var e=k2,t=k2,r=nl,n,i,o,u=hr,c,f,h;function m(){var v=Math.min(e.length,t.length);return u!==hr&&(u=_9(e[0],e[v-1])),c=v>2?I9:M9,f=h=null,g}function g(v){return v==null||isNaN(v=+v)?o:(f||(f=c(e.map(n),t,r)))(n(u(v)))}return g.invert=function(v){return u(i((h||(h=c(t,e.map(n),Uf)))(v)))},g.domain=function(v){return arguments.length?(e=Array.from(v,Hf),m()):e.slice()},g.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},g.rangeRound=function(v){return t=Array.from(v),r=ky,m()},g.clamp=function(v){return arguments.length?(u=v?!0:hr,m()):u!==hr},g.interpolate=function(v){return arguments.length?(r=v,m()):r},g.unknown=function(v){return arguments.length?(o=v,g):o},function(v,b){return n=v,i=b,m()}}function jy(){return Xh()(hr,hr)}function T9(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Bs(e){return e=Wf(Math.abs(e)),e?e[1]:NaN}function D9(e,t){return function(r,n){for(var i=r.length,o=[],u=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),o.push(r.substring(i-=c,i+c)),!((f+=c+1)>n));)c=e[u=(u+1)%e.length];return o.reverse().join(t)}}function R9(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var L9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ru(e){if(!(t=L9.exec(e)))throw new Error("invalid format: "+e);var t;return new Sy({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]})}Ru.prototype=Sy.prototype;function Sy(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+""}Sy.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 $9(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Kf;function z9(e,t){var r=Wf(e,t);if(!r)return Kf=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Kf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,u=n.length;return o===u?n:o>u?n+new Array(o-u+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Wf(e,Math.max(0,t+o-1))[0]}function j2(e,t){var r=Wf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const S2={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:T9,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)=>j2(e*100,t),r:j2,s:z9,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function N2(e){return e}var E2=Array.prototype.map,A2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function F9(e){var t=e.grouping===void 0||e.thousands===void 0?N2:D9(E2.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?N2:R9(E2.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,v){g=Ru(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,E=g.width,A=g.comma,P=g.precision,_=g.trim,O=g.type;O==="n"?(A=!0,O="g"):S2[O]||(P===void 0&&(P=12),_=!0,O="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var T=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),B=(S==="$"?n:/[%p]/.test(O)?u:"")+(v&&v.suffix!==void 0?v.suffix:""),$=S2[O],z=/[defgprs%]/.test(O);P=P===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function Q(U){var ve=T,ue=B,pe,oe,se;if(O==="c")ue=$(U)+ue,U="";else{U=+U;var X=U<0||1/U<0;if(U=isNaN(U)?f:$(Math.abs(U),P),_&&(U=$9(U)),X&&+U==0&&k!=="+"&&(X=!1),ve=(X?k==="("?k:c:k==="-"||k==="("?"":k)+ve,ue=(O==="s"&&!isNaN(U)&&Kf!==void 0?A2[8+Kf/3]:"")+ue+(X&&k==="("?")":""),z){for(pe=-1,oe=U.length;++pe<oe;)if(se=U.charCodeAt(pe),48>se||se>57){ue=(se===46?i+U.slice(pe+1):U.slice(pe))+ue,U=U.slice(0,pe);break}}}A&&!N&&(U=t(U,1/0));var ne=ve.length+U.length+ue.length,te=ne<E?new Array(E-ne+1).join(b):"";switch(A&&N&&(U=t(te+U,te.length?E-ue.length:1/0),te=""),j){case"<":U=ve+U+ue+te;break;case"=":U=ve+te+U+ue;break;case"^":U=te.slice(0,ne=te.length>>1)+ve+U+ue+te.slice(ne);break;default:U=te+ve+U+ue;break}return o(U)}return Q.toString=function(){return g+""},Q}function m(g,v){var b=Math.max(-8,Math.min(8,Math.floor(Bs(v)/3)))*3,j=Math.pow(10,-b),k=h((g=Ru(g),g.type="f",g),{suffix:A2[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:m}}var Ud,Ny,vC;B9({thousands:",",grouping:[3],currency:["$",""]});function B9(e){return Ud=F9(e),Ny=Ud.format,vC=Ud.formatPrefix,Ud}function U9(e){return Math.max(0,-Bs(Math.abs(e)))}function H9(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Bs(t)/3)))*3-Bs(Math.abs(e)))}function W9(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bs(t)-Bs(e))+1}function yC(e,t,r,n){var i=i0(e,t,r),o;switch(n=Ru(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=H9(i,u))&&(n.precision=o),vC(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=W9(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=U9(i))&&(n.precision=o-(n.type==="%")*2);break}}return Ny(n)}function wa(e){var t=e.domain;return e.ticks=function(r){var n=t();return r0(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return yC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,u=n[i],c=n[o],f,h,m=10;for(c<u&&(h=u,u=c,c=h,h=i,i=o,o=h);m-- >0;){if(h=n0(u,c,r),h===f)return n[i]=u,n[o]=c,t(n);if(h>0)u=Math.floor(u/h)*h,c=Math.ceil(c/h)*h;else if(h<0)u=Math.ceil(u*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function xC(){var e=jy();return e.copy=function(){return ic(e,xC())},an.apply(e,arguments),wa(e)}function bC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Hf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return bC(e).unknown(t)},e=arguments.length?Array.from(e,Hf):[0,1],wa(r)}function wC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],u;return o<i&&(u=r,r=n,n=u,u=i,i=o,o=u),e[r]=t.floor(i),e[n]=t.ceil(o),e}function C2(e){return Math.log(e)}function P2(e){return Math.exp(e)}function K9(e){return-Math.log(-e)}function G9(e){return-Math.exp(-e)}function V9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function q9(e){return e===10?V9:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Q9(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 O2(e){return(t,r)=>-e(-t,r)}function Ey(e){const t=e(C2,P2),r=t.domain;let n=10,i,o;function u(){return i=Q9(n),o=q9(n),r()[0]<0?(i=O2(i),o=O2(o),e(K9,G9)):e(C2,P2),t}return t.base=function(c){return arguments.length?(n=+c,u()):n},t.domain=function(c){return arguments.length?(r(c),u()):r()},t.ticks=c=>{const f=r();let h=f[0],m=f[f.length-1];const g=m<h;g&&([h,m]=[m,h]);let v=i(h),b=i(m),j,k;const S=c==null?10:+c;let N=[];if(!(n%1)&&b-v<S){if(v=Math.floor(v),b=Math.ceil(b),h>0){for(;v<=b;++v)for(j=1;j<n;++j)if(k=v<0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}}else for(;v<=b;++v)for(j=n-1;j>=1;--j)if(k=v>0?j/o(-v):j*o(v),!(k<h)){if(k>m)break;N.push(k)}N.length*2<S&&(N=r0(h,m,S))}else N=r0(v,b,Math.min(b-v,S)).map(o);return g?N.reverse():N},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Ru(f)).precision==null&&(f.trim=!0),f=Ny(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return m=>{let g=m/o(Math.round(i(m)));return g*n<n-.5&&(g*=n),g<=h?f(m):""}},t.nice=()=>r(wC(r(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function kC(){const e=Ey(Xh()).domain([1,10]);return e.copy=()=>ic(e,kC()).base(e.base()),an.apply(e,arguments),e}function _2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function M2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ay(e){var t=1,r=e(_2(t),M2(t));return r.constant=function(n){return arguments.length?e(_2(t=+n),M2(t)):t},wa(r)}function jC(){var e=Ay(Xh());return e.copy=function(){return ic(e,jC()).constant(e.constant())},an.apply(e,arguments)}function I2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Y9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function X9(e){return e<0?-e*e:e*e}function Cy(e){var t=e(hr,hr),r=1;function n(){return r===1?e(hr,hr):r===.5?e(Y9,X9):e(I2(r),I2(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},wa(t)}function Py(){var e=Cy(Xh());return e.copy=function(){return ic(e,Py()).exponent(e.exponent())},an.apply(e,arguments),e}function Z9(){return Py.apply(null,arguments).exponent(.5)}function T2(e){return Math.sign(e)*e*e}function J9(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function SC(){var e=jy(),t=[0,1],r=!1,n;function i(o){var u=J9(e(o));return isNaN(u)?n:r?Math.round(u):u}return i.invert=function(o){return e.invert(T2(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Hf)).map(T2)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return SC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},an.apply(i,arguments),wa(i)}function NC(){var e=[],t=[],r=[],n;function i(){var u=0,c=Math.max(1,t.length);for(r=new Array(c-1);++u<c;)r[u-1]=n9(e,u/c);return o}function o(u){return u==null||isNaN(u=+u)?n:t[rc(r,u)]}return o.invertExtent=function(u){var c=t.indexOf(u);return c<0?[NaN,NaN]:[c>0?r[c-1]:e[0],c<r.length?r[c]:e[e.length-1]]},o.domain=function(u){if(!arguments.length)return e.slice();e=[];for(let c of u)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(ma),i()},o.range=function(u){return arguments.length?(t=Array.from(u),i()):t.slice()},o.unknown=function(u){return arguments.length?(n=u,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return NC().domain(e).range(t).unknown(n)},an.apply(o,arguments)}function EC(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function u(f){return f!=null&&f<=f?i[rc(n,f,0,r)]:o}function c(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return u}return u.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},u.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,c()):i.slice()},u.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(o=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return EC().domain([e,t]).range(i).unknown(o)},an.apply(wa(u),arguments)}function AC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[rc(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return AC().domain(e).range(t).unknown(r)},an.apply(i,arguments)}const Rg=new Date,Lg=new Date;function Ot(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const u=i(o),c=i.ceil(o);return o-u<c-o?u:c},i.offset=(o,u)=>(t(o=new Date(+o),u==null?1:Math.floor(u)),o),i.range=(o,u,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<u)||!(c>0))return f;let h;do f.push(h=new Date(+o)),t(o,c),e(o);while(h<o&&o<u);return f},i.filter=o=>Ot(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,c)=>{if(u>=u)if(c<0)for(;++c<=0;)for(;t(u,-1),!o(u););else for(;--c>=0;)for(;t(u,1),!o(u););}),r&&(i.count=(o,u)=>(Rg.setTime(+o),Lg.setTime(+u),e(Rg),e(Lg),Math.floor(r(Rg,Lg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?u=>n(u)%o===0:u=>i.count(0,u)%o===0):i)),i}const Gf=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Gf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Gf);Gf.range;const ci=1e3,Zr=ci*60,di=Zr*60,yi=di*24,Oy=yi*7,D2=yi*30,$g=yi*365,Ya=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCSeconds());Ya.range;const _y=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ci)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getMinutes());_y.range;const My=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getUTCMinutes());My.range;const Iy=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ci-e.getMinutes()*Zr)},(e,t)=>{e.setTime(+e+t*di)},(e,t)=>(t-e)/di,e=>e.getHours());Iy.range;const Ty=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*di)},(e,t)=>(t-e)/di,e=>e.getUTCHours());Ty.range;const ac=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zr)/yi,e=>e.getDate()-1);ac.range;const Zh=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yi,e=>e.getUTCDate()-1);Zh.range;const CC=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yi,e=>Math.floor(e/yi));CC.range;function No(e){return Ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Zr)/Oy)}const Jh=No(0),Vf=No(1),e7=No(2),t7=No(3),Us=No(4),r7=No(5),n7=No(6);Jh.range;Vf.range;e7.range;t7.range;Us.range;r7.range;n7.range;function Eo(e){return Ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Oy)}const em=Eo(0),qf=Eo(1),i7=Eo(2),a7=Eo(3),Hs=Eo(4),o7=Eo(5),s7=Eo(6);em.range;qf.range;i7.range;a7.range;Hs.range;o7.range;s7.range;const Dy=Ot(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Dy.range;const Ry=Ot(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Ry.range;const xi=Ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});xi.range;const bi=Ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());bi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});bi.range;function PC(e,t,r,n,i,o){const u=[[Ya,1,ci],[Ya,5,5*ci],[Ya,15,15*ci],[Ya,30,30*ci],[o,1,Zr],[o,5,5*Zr],[o,15,15*Zr],[o,30,30*Zr],[i,1,di],[i,3,3*di],[i,6,6*di],[i,12,12*di],[n,1,yi],[n,2,2*yi],[r,1,Oy],[t,1,D2],[t,3,3*D2],[e,1,$g]];function c(h,m,g){const v=m<h;v&&([h,m]=[m,h]);const b=g&&typeof g.range=="function"?g:f(h,m,g),j=b?b.range(h,+m+1):[];return v?j.reverse():j}function f(h,m,g){const v=Math.abs(m-h)/g,b=vy(([,,S])=>S).right(u,v);if(b===u.length)return e.every(i0(h/$g,m/$g,g));if(b===0)return Gf.every(Math.max(i0(h,m,g),1));const[j,k]=u[v/u[b-1][2]<u[b][2]/v?b-1:b];return j.every(k)}return[c,f]}const[l7,u7]=PC(bi,Ry,em,CC,Ty,My),[c7,d7]=PC(xi,Dy,Jh,ac,Iy,_y);function zg(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 Fg(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 iu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function f7(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,u=e.shortDays,c=e.months,f=e.shortMonths,h=au(i),m=ou(i),g=au(o),v=ou(o),b=au(u),j=ou(u),k=au(c),S=ou(c),N=au(f),E=ou(f),A={a:se,A:X,b:ne,B:te,c:null,d:B2,e:B2,f:D7,g:K7,G:V7,H:M7,I:I7,j:T7,L:OC,m:R7,M:L7,p:I,q:M,Q:W2,s:K2,S:$7,u:z7,U:F7,V:B7,w:U7,W:H7,x:null,X:null,y:W7,Y:G7,Z:q7,"%":H2},P={a:H,A:ie,b:J,B:Z,c:null,d:U2,e:U2,f:Z7,g:lU,G:cU,H:Q7,I:Y7,j:X7,L:MC,m:J7,M:eU,p:ae,q:me,Q:W2,s:K2,S:tU,u:rU,U:nU,V:iU,w:aU,W:oU,x:null,X:null,y:sU,Y:uU,Z:dU,"%":H2},_={a:z,A:Q,b:U,B:ve,c:ue,d:z2,e:z2,f:C7,g:$2,G:L2,H:F2,I:F2,j:S7,L:A7,m:j7,M:N7,p:$,q:k7,Q:O7,s:_7,S:E7,u:v7,U:y7,V:x7,w:g7,W:b7,x:pe,X:oe,y:$2,Y:L2,Z:w7,"%":P7};A.x=O(r,A),A.X=O(n,A),A.c=O(t,A),P.x=O(r,P),P.X=O(n,P),P.c=O(t,P);function O(re,ye){return function(Oe){var de=[],Ze=-1,Ue=0,_e=re.length,xt,Jt,G;for(Oe instanceof Date||(Oe=new Date(+Oe));++Ze<_e;)re.charCodeAt(Ze)===37&&(de.push(re.slice(Ue,Ze)),(Jt=R2[xt=re.charAt(++Ze)])!=null?xt=re.charAt(++Ze):Jt=xt==="e"?" ":"0",(G=ye[xt])&&(xt=G(Oe,Jt)),de.push(xt),Ue=Ze+1);return de.push(re.slice(Ue,Ze)),de.join("")}}function T(re,ye){return function(Oe){var de=iu(1900,void 0,1),Ze=B(de,re,Oe+="",0),Ue,_e;if(Ze!=Oe.length)return null;if("Q"in de)return new Date(de.Q);if("s"in de)return new Date(de.s*1e3+("L"in de?de.L:0));if(ye&&!("Z"in de)&&(de.Z=0),"p"in de&&(de.H=de.H%12+de.p*12),de.m===void 0&&(de.m="q"in de?de.q:0),"V"in de){if(de.V<1||de.V>53)return null;"w"in de||(de.w=1),"Z"in de?(Ue=Fg(iu(de.y,0,1)),_e=Ue.getUTCDay(),Ue=_e>4||_e===0?qf.ceil(Ue):qf(Ue),Ue=Zh.offset(Ue,(de.V-1)*7),de.y=Ue.getUTCFullYear(),de.m=Ue.getUTCMonth(),de.d=Ue.getUTCDate()+(de.w+6)%7):(Ue=zg(iu(de.y,0,1)),_e=Ue.getDay(),Ue=_e>4||_e===0?Vf.ceil(Ue):Vf(Ue),Ue=ac.offset(Ue,(de.V-1)*7),de.y=Ue.getFullYear(),de.m=Ue.getMonth(),de.d=Ue.getDate()+(de.w+6)%7)}else("W"in de||"U"in de)&&("w"in de||(de.w="u"in de?de.u%7:"W"in de?1:0),_e="Z"in de?Fg(iu(de.y,0,1)).getUTCDay():zg(iu(de.y,0,1)).getDay(),de.m=0,de.d="W"in de?(de.w+6)%7+de.W*7-(_e+5)%7:de.w+de.U*7-(_e+6)%7);return"Z"in de?(de.H+=de.Z/100|0,de.M+=de.Z%100,Fg(de)):zg(de)}}function B(re,ye,Oe,de){for(var Ze=0,Ue=ye.length,_e=Oe.length,xt,Jt;Ze<Ue;){if(de>=_e)return-1;if(xt=ye.charCodeAt(Ze++),xt===37){if(xt=ye.charAt(Ze++),Jt=_[xt in R2?ye.charAt(Ze++):xt],!Jt||(de=Jt(re,Oe,de))<0)return-1}else if(xt!=Oe.charCodeAt(de++))return-1}return de}function $(re,ye,Oe){var de=h.exec(ye.slice(Oe));return de?(re.p=m.get(de[0].toLowerCase()),Oe+de[0].length):-1}function z(re,ye,Oe){var de=b.exec(ye.slice(Oe));return de?(re.w=j.get(de[0].toLowerCase()),Oe+de[0].length):-1}function Q(re,ye,Oe){var de=g.exec(ye.slice(Oe));return de?(re.w=v.get(de[0].toLowerCase()),Oe+de[0].length):-1}function U(re,ye,Oe){var de=N.exec(ye.slice(Oe));return de?(re.m=E.get(de[0].toLowerCase()),Oe+de[0].length):-1}function ve(re,ye,Oe){var de=k.exec(ye.slice(Oe));return de?(re.m=S.get(de[0].toLowerCase()),Oe+de[0].length):-1}function ue(re,ye,Oe){return B(re,t,ye,Oe)}function pe(re,ye,Oe){return B(re,r,ye,Oe)}function oe(re,ye,Oe){return B(re,n,ye,Oe)}function se(re){return u[re.getDay()]}function X(re){return o[re.getDay()]}function ne(re){return f[re.getMonth()]}function te(re){return c[re.getMonth()]}function I(re){return i[+(re.getHours()>=12)]}function M(re){return 1+~~(re.getMonth()/3)}function H(re){return u[re.getUTCDay()]}function ie(re){return o[re.getUTCDay()]}function J(re){return f[re.getUTCMonth()]}function Z(re){return c[re.getUTCMonth()]}function ae(re){return i[+(re.getUTCHours()>=12)]}function me(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var ye=O(re+="",A);return ye.toString=function(){return re},ye},parse:function(re){var ye=T(re+="",!1);return ye.toString=function(){return re},ye},utcFormat:function(re){var ye=O(re+="",P);return ye.toString=function(){return re},ye},utcParse:function(re){var ye=T(re+="",!0);return ye.toString=function(){return re},ye}}}var R2={"-":"",_:" ",0:"0"},Bt=/^\s*\d+/,h7=/^%/,m7=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function p7(e){return e.replace(m7,"\\$&")}function au(e){return new RegExp("^(?:"+e.map(p7).join("|")+")","i")}function ou(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function g7(e,t,r){var n=Bt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function v7(e,t,r){var n=Bt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function y7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function x7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function b7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function L2(e,t,r){var n=Bt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function $2(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function w7(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 k7(e,t,r){var n=Bt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function j7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function z2(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function S7(e,t,r){var n=Bt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function F2(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function N7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function E7(e,t,r){var n=Bt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function A7(e,t,r){var n=Bt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function C7(e,t,r){var n=Bt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function P7(e,t,r){var n=h7.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function O7(e,t,r){var n=Bt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function _7(e,t,r){var n=Bt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function B2(e,t){return Ye(e.getDate(),t,2)}function M7(e,t){return Ye(e.getHours(),t,2)}function I7(e,t){return Ye(e.getHours()%12||12,t,2)}function T7(e,t){return Ye(1+ac.count(xi(e),e),t,3)}function OC(e,t){return Ye(e.getMilliseconds(),t,3)}function D7(e,t){return OC(e,t)+"000"}function R7(e,t){return Ye(e.getMonth()+1,t,2)}function L7(e,t){return Ye(e.getMinutes(),t,2)}function $7(e,t){return Ye(e.getSeconds(),t,2)}function z7(e){var t=e.getDay();return t===0?7:t}function F7(e,t){return Ye(Jh.count(xi(e)-1,e),t,2)}function _C(e){var t=e.getDay();return t>=4||t===0?Us(e):Us.ceil(e)}function B7(e,t){return e=_C(e),Ye(Us.count(xi(e),e)+(xi(e).getDay()===4),t,2)}function U7(e){return e.getDay()}function H7(e,t){return Ye(Vf.count(xi(e)-1,e),t,2)}function W7(e,t){return Ye(e.getFullYear()%100,t,2)}function K7(e,t){return e=_C(e),Ye(e.getFullYear()%100,t,2)}function G7(e,t){return Ye(e.getFullYear()%1e4,t,4)}function V7(e,t){var r=e.getDay();return e=r>=4||r===0?Us(e):Us.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function q7(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function U2(e,t){return Ye(e.getUTCDate(),t,2)}function Q7(e,t){return Ye(e.getUTCHours(),t,2)}function Y7(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function X7(e,t){return Ye(1+Zh.count(bi(e),e),t,3)}function MC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function Z7(e,t){return MC(e,t)+"000"}function J7(e,t){return Ye(e.getUTCMonth()+1,t,2)}function eU(e,t){return Ye(e.getUTCMinutes(),t,2)}function tU(e,t){return Ye(e.getUTCSeconds(),t,2)}function rU(e){var t=e.getUTCDay();return t===0?7:t}function nU(e,t){return Ye(em.count(bi(e)-1,e),t,2)}function IC(e){var t=e.getUTCDay();return t>=4||t===0?Hs(e):Hs.ceil(e)}function iU(e,t){return e=IC(e),Ye(Hs.count(bi(e),e)+(bi(e).getUTCDay()===4),t,2)}function aU(e){return e.getUTCDay()}function oU(e,t){return Ye(qf.count(bi(e)-1,e),t,2)}function sU(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function lU(e,t){return e=IC(e),Ye(e.getUTCFullYear()%100,t,2)}function uU(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function cU(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Hs(e):Hs.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function dU(){return"+0000"}function H2(){return"%"}function W2(e){return+e}function K2(e){return Math.floor(+e/1e3)}var as,TC,DC;fU({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 fU(e){return as=f7(e),TC=as.format,as.parse,DC=as.utcFormat,as.utcParse,as}function hU(e){return new Date(e)}function mU(e){return e instanceof Date?+e:+new Date(+e)}function Ly(e,t,r,n,i,o,u,c,f,h){var m=jy(),g=m.invert,v=m.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),E=h("%b %d"),A=h("%B"),P=h("%Y");function _(O){return(f(O)<O?b:c(O)<O?j:u(O)<O?k:o(O)<O?S:n(O)<O?i(O)<O?N:E:r(O)<O?A:P)(O)}return m.invert=function(O){return new Date(g(O))},m.domain=function(O){return arguments.length?v(Array.from(O,mU)):v().map(hU)},m.ticks=function(O){var T=v();return e(T[0],T[T.length-1],O??10)},m.tickFormat=function(O,T){return T==null?_:h(T)},m.nice=function(O){var T=v();return(!O||typeof O.range!="function")&&(O=t(T[0],T[T.length-1],O??10)),O?v(wC(T,O)):m},m.copy=function(){return ic(m,Ly(e,t,r,n,i,o,u,c,f,h))},m}function pU(){return an.apply(Ly(c7,d7,xi,Dy,Jh,ac,Iy,_y,Ya,TC).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function gU(){return an.apply(Ly(l7,u7,bi,Ry,em,Zh,Ty,My,Ya,DC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function tm(){var e=0,t=1,r,n,i,o,u=hr,c=!1,f;function h(g){return g==null||isNaN(g=+g)?f:u(i===0?.5:(g=(o(g)-r)*i,c?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),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(g){return arguments.length?(c=!!g,h):c},h.interpolator=function(g){return arguments.length?(u=g,h):u};function m(g){return function(v){var b,j;return arguments.length?([b,j]=v,u=g(b,j),h):[u(0),u(1)]}}return h.range=m(nl),h.rangeRound=m(ky),h.unknown=function(g){return arguments.length?(f=g,h):f},function(g){return o=g,r=g(e),n=g(t),i=r===n?0:1/(n-r),h}}function ka(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function RC(){var e=wa(tm()(hr));return e.copy=function(){return ka(e,RC())},Si.apply(e,arguments)}function LC(){var e=Ey(tm()).domain([1,10]);return e.copy=function(){return ka(e,LC()).base(e.base())},Si.apply(e,arguments)}function $C(){var e=Ay(tm());return e.copy=function(){return ka(e,$C()).constant(e.constant())},Si.apply(e,arguments)}function $y(){var e=Cy(tm());return e.copy=function(){return ka(e,$y()).exponent(e.exponent())},Si.apply(e,arguments)}function vU(){return $y.apply(null,arguments).exponent(.5)}function zC(){var e=[],t=hr;function r(n){if(n!=null&&!isNaN(n=+n))return t((rc(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ma),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>r9(e,o/n))},r.copy=function(){return zC(t).domain(e)},Si.apply(r,arguments)}function rm(){var e=0,t=.5,r=1,n=1,i,o,u,c,f,h=hr,m,g=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+m(k))-o)*(n*k<n*o?c:f),h(g?Math.max(0,Math.min(1,k)):k))}b.domain=function(k){return arguments.length?([e,t,r]=k,i=m(e=+e),o=m(t=+t),u=m(r=+r),c=i===o?0:.5/(o-i),f=o===u?0:.5/(u-o),n=o<i?-1:1,b):[e,t,r]},b.clamp=function(k){return arguments.length?(g=!!k,b):g},b.interpolator=function(k){return arguments.length?(h=k,b):h};function j(k){return function(S){var N,E,A;return arguments.length?([N,E,A]=S,h=P9(k,[N,E,A]),b):[h(0),h(.5),h(1)]}}return b.range=j(nl),b.rangeRound=j(ky),b.unknown=function(k){return arguments.length?(v=k,b):v},function(k){return m=k,i=k(e),o=k(t),u=k(r),c=i===o?0:.5/(o-i),f=o===u?0:.5/(u-o),n=o<i?-1:1,b}}function FC(){var e=wa(rm()(hr));return e.copy=function(){return ka(e,FC())},Si.apply(e,arguments)}function BC(){var e=Ey(rm()).domain([.1,1,10]);return e.copy=function(){return ka(e,BC()).base(e.base())},Si.apply(e,arguments)}function UC(){var e=Ay(rm());return e.copy=function(){return ka(e,UC()).constant(e.constant())},Si.apply(e,arguments)}function zy(){var e=Cy(rm());return e.copy=function(){return ka(e,zy()).exponent(e.exponent())},Si.apply(e,arguments)}function yU(){return zy.apply(null,arguments).exponent(.5)}const HC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:xy,scaleDiverging:FC,scaleDivergingLog:BC,scaleDivergingPow:zy,scaleDivergingSqrt:yU,scaleDivergingSymlog:UC,scaleIdentity:bC,scaleImplicit:a0,scaleLinear:xC,scaleLog:kC,scaleOrdinal:yy,scalePoint:a9,scalePow:Py,scaleQuantile:NC,scaleQuantize:EC,scaleRadial:SC,scaleSequential:RC,scaleSequentialLog:LC,scaleSequentialPow:$y,scaleSequentialQuantile:zC,scaleSequentialSqrt:vU,scaleSequentialSymlog:$C,scaleSqrt:Z9,scaleSymlog:jC,scaleThreshold:AC,scaleTime:pU,scaleUtc:gU,tickFormat:yC},Symbol.toStringTag,{value:"Module"}));function xU(e){var t=HC;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(U0(e));if(r in t&&typeof t[r]=="function")return t[r]()}function G2(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=xU(e);if(n!=null)return n.domain(t).range(r),n}}function Fy(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?G2(e.scale,r,n):G2(t,r,n)}function bU(e){return"scale".concat(U0(e))}function wU(e){return bU(e)in HC}var WC=(e,t,r)=>{if(e!=null){var n=e.scale,i=e.type;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return wU(n)?n:"point"}};function kU(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(i?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function KC(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var u,c,f=kU(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,m=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function jU(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):KC(e,void 0)}function V2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V2(Object(r),!0).forEach(function(n){SU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SU(e,t,r){return(t=NU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NU(e){var t=EU(e,"string");return typeof t=="symbol"?t:t+""}function EU(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 GC(e,t){return OU(e)||PU(e,t)||CU(e,t)||AU()}function AU(){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 CU(e,t){if(e){if(typeof e=="string")return q2(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)?q2(e,t):void 0}}function q2(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 PU(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function OU(e){if(Array.isArray(e))return e}var u0=[0,"auto"],Ct={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},VC=(e,t)=>e.cartesianAxis.xAxis[t],Ni=(e,t)=>{var r=VC(e,t);return r??Ct},Pt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:u0,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:Xu},qC=(e,t)=>e.cartesianAxis.yAxis[t],Ei=(e,t)=>{var r=qC(e,t);return r??Pt},_U={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:""},By=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??_U},pr=(e,t,r)=>{switch(t){case"xAxis":return Ni(e,r);case"yAxis":return Ei(e,r);case"zAxis":return By(e,r);case"angleAxis":return dy(e,r);case"radiusAxis":return fy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},MU=(e,t,r)=>{switch(t){case"xAxis":return Ni(e,r);case"yAxis":return Ei(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},oc=(e,t,r)=>{switch(t){case"xAxis":return Ni(e,r);case"yAxis":return Ei(e,r);case"angleAxis":return dy(e,r);case"radiusAxis":return fy(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},QC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function YC(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 XC=e=>e.graphicalItems.cartesianItems,IU=q([zt,qh],YC),ZC=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),il=q([XC,pr,IU],ZC,{memoizeOptions:{resultEqualityCheck:Yh}}),JC=q([il],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(py)),eP=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),TU=q([il],eP),tP=e=>e.map(t=>t.data).filter(Boolean).flat(1),DU=q([il],e=>e.some(t=>!t.data)),rP=q([il],tP,{memoizeOptions:{resultEqualityCheck:Yh}}),nP=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(i,o+1)},Uy=q([rP,Hh],nP),RU=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Lt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Lt(i,n)}))):e.map(n=>({value:n})),iP=(e,t,r,n,i,o)=>{var u=n.chartData,c=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,m=RU(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var g=c.slice(f,h+1),v=g.map(b=>({value:Lt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},sc=q([Uy,pr,il,Hh,DU,rP],iP);function ws(e){if(Bn(e)||e instanceof Date){var t=Number(e);if(We(t))return t}}function Q2(e){if(Array.isArray(e)){var t=[ws(e[0]),ws(e[1])];return $n(t)?t:void 0}var r=ws(e);if(r!=null)return[r,r]}function Wn(e){return e.map(ws).filter(Sr)}function LU(e,t){var r=ws(e),n=ws(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var $U=q([sc],e=>e==null?void 0:e.map(t=>t.value).sort(LU));function aP(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function zU(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Fn(t))n=t;else if(Array.isArray(t)){var i=Wn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Wn(r.flatMap(o=>{var u=Lt(e,o.dataKey),c,f;if(Array.isArray(u)){var h=GC(u,2);c=h[0],f=h[1]}else c=f=u;if(!(!We(c)||!We(f)))return[n-c,n+f]}))}var _t=e=>{var t=Ft(e),r=rl(e);return oc(e,t,r)},Ws=q([_t],e=>e==null?void 0:e.dataKey),FU=q([JC,Hh,_t],uC),oP=(e,t,r,n)=>{var i={},o=t.reduce((u,c)=>{if(c.stackId==null)return u;var f=u[c.stackId];return f==null&&(f=[]),f.push(c),u[c.stackId]=f,u},i);return Object.fromEntries(Object.entries(o).map(u=>{var c=GC(u,2),f=c[0],h=c[1],m=n?[...h].reverse():h,g=m.map(my);return[f,{stackedData:i6(e,g,r),graphicalItems:m}]}))},sP=q([FU,JC,Wh,rC],oP),lP=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return l6(e,i,o)},BU=q([pr],e=>e.allowDataOverflow),Hy=e=>{var t;if(e==null||!("domain"in e))return u0;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Wn(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:u0},uP=q([pr],Hy),cP=q([uP,BU],KA),UU=q([sP,kn,zt,cP],lP,{memoizeOptions:{resultEqualityCheck:Qh}}),Wy=e=>e.errorBars,HU=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>aP(r,n)),Yf=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var o=i.flat(),u=Math.min(...o),c=Math.max(...o);return[u,c]}},dP=function(t,r,n,i,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(h=>{var m,g=h.data!=null?[...h.data]:u,v=(m=i[h.id])===null||m===void 0?void 0:m.filter(b=>aP(o,b));g.forEach(b=>{var j,k=Lt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=zU(b,k,v);if(S.length>=2){var N=Math.min(...S),E=Math.max(...S);(c==null||N<c)&&(c=N),(f==null||E>f)&&(f=E)}var A=Q2(k);A!=null&&(c=c==null?A[0]:Math.min(c,A[0]),f=f==null?A[1]:Math.max(f,A[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=Q2(Lt(h,r.dataKey));m!=null&&(c=c==null?m[0]:Math.min(c,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),We(c)&&We(f))return[c,f]},WU=q([Uy,pr,TU,Wy,zt,bB],dP,{memoizeOptions:{resultEqualityCheck:Qh}});function KU(e){var t=e.value;if(Bn(t)||t instanceof Date)return t}var GU=(e,t,r)=>{var n=e.map(KU).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&kE(n))?WA(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},fP=e=>e.referenceElements.dots,al=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),VU=q([fP,zt,qh],al),hP=e=>e.referenceElements.areas,qU=q([hP,zt,qh],al),mP=e=>e.referenceElements.lines,QU=q([mP,zt,qh],al),pP=(e,t)=>{if(e!=null){var r=Wn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},YU=q(VU,zt,pP),gP=(e,t)=>{if(e!=null){var r=Wn(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)]}},XU=q([qU,zt],gP);function ZU(e){var t;if(e.x!=null)return Wn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Wn(r)}function JU(e){var t;if(e.y!=null)return Wn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Wn(r)}var vP=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?ZU(n):JU(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},eH=q([QU,zt],vP),tH=q(YU,eH,XU,(e,t,r)=>Yf(e,r,t)),yP=(e,t,r,n,i,o,u,c)=>{if(r!=null)return r;var f=u==="vertical"&&c==="xAxis"||u==="horizontal"&&c==="yAxis",h=f?Yf(n,o,i):Yf(o,i);return EB(t,h,e.allowDataOverflow)},rH=q([pr,uP,cP,UU,WU,tH,ft,zt],yP,{memoizeOptions:{resultEqualityCheck:Qh}}),nH=[0,1],xP=(e,t,r,n,i,o,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var c=e.dataKey,f=e.type,h=Gn(t,o);if(h&&c==null){var m;return WA(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?GU(n,e,h):i==="expand"&&!h?nH:u}},Ky=q([pr,ft,Uy,sc,Wh,zt,rH],xP),ol=q([pr,QC,ly],WC),bP=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=Hy(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&$n(e)){if(o)return i2(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return a2(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&$n(e))return i2(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&$n(e))return a2(e,t.tickCount,t.allowDecimals,"adaptive")}}},Gy=q([Ky,oc,ol],bP),wP=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&$n(t)&&Array.isArray(r)&&r.length>0){var i,o,u=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,c),Math.max(f,h)]}return t},iH=q([pr,Ky,Gy,zt],wP),aH=q(sc,pr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Wn(e.map(g=>g.value))).sort((g,v)=>g-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var u=o-i;if(u===0)return 1/0;for(var c=0;c<n.length-1;c++){var f=n[c],h=n[c+1];if(!(f==null||h==null)){var m=h-f;r=Math.min(r,m)}}return r/u}}),kP=q(aH,ft,DB,Zt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!We(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var u=ya(r,e*o),c=e*o/2;return c-u-(c-u)/o*u}return 0}),oH=(e,t,r)=>{var n=Ni(e,t);return n==null||typeof n.padding!="string"?0:kP(e,"xAxis",t,r,n.padding)},sH=(e,t,r)=>{var n=Ei(e,t);return n==null||typeof n.padding!="string"?0:kP(e,"yAxis",t,r,n.padding)},lH=q(Ni,oH,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var i=e.padding;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),uH=q(Ei,sH,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var i=e.padding;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),jP=q([Zt,lH,Lh,Rh,(e,t,r)=>r],(e,t,r,n,i)=>{var o=n.padding;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),SP=q([Zt,ft,uH,Lh,Rh,(e,t,r)=>r],(e,t,r,n,i,o)=>{var u=i.padding;return o?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),lc=(e,t,r,n)=>{var i;switch(t){case"xAxis":return jP(e,r,n);case"yAxis":return SP(e,r,n);case"zAxis":return(i=By(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return oC(e);case"radiusAxis":return sC(e,r);default:return}},NP=q([pr,lc],Kh),cH=q([ol,iH],WB),Vy=q([pr,ol,cH,NP],Fy),EP=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,u=Gn(e,n);if(u&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},qy=q([ft,sc,oc,zt],EP),nm=q([Vy],gy);q([Vy],jU);q([Vy,$U],KC);q([il,Wy,zt],HU);function AP(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var im=(e,t)=>t,am=(e,t,r)=>r,dH=q(Th,im,am,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(AP)),fH=q(Dh,im,am,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(AP)),CP=(e,t)=>({width:e.width,height:t.height}),hH=(e,t)=>{var r=typeof t.width=="number"?t.width:Xu;return{width:r,height:e.height}},mH=q(Zt,Ni,CP),pH=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},gH=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},vH=q(ji,Zt,dH,im,am,(e,t,r,n,i)=>{var o={},u;return r.forEach(c=>{var f=CP(t,c);u==null&&(u=pH(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[c.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),o}),yH=q(ki,Zt,fH,im,am,(e,t,r,n,i)=>{var o={},u;return r.forEach(c=>{var f=hH(t,c);u==null&&(u=gH(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[c.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),o}),xH=(e,t)=>{var r=Ni(e,t);if(r!=null)return vH(e,r.orientation,r.mirror)},bH=q([Zt,Ni,xH,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),wH=(e,t)=>{var r=Ei(e,t);if(r!=null)return yH(e,r.orientation,r.mirror)},kH=q([Zt,Ei,wH,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),jH=q(Zt,Ei,(e,t)=>{var r=typeof t.width=="number"?t.width:Xu;return{width:r,height:e.height}}),PP=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,u=r.dataKey,c=Gn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(u&&c&&o==="category"&&i&&kE(h))return f}},Qy=q([ft,sc,pr,zt],PP),Y2=q([ft,MU,ol,nm,Qy,qy,lc,Gy,zt],(e,t,r,n,i,o,u,c,f)=>{if(t!=null){var h=Gn(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:i,isCategorical:h,niceTicks:c,range:u,realScaleType:r,scale:n}}}),SH=(e,t,r,n,i,o,u,c,f)=>{if(!(t==null||n==null)){var h=Gn(e,f),m=t.type,g=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=m==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&o!=null&&o.length>=2?Yr(o[0]-o[1])*2*j:j;var k=g||i;return k?k.map((S,N)=>{var E=u?u.indexOf(S):S,A=n.map(E);return We(A)?{index:N,coordinate:A+j,value:S,offset:j}:null}).filter(Sr):h&&c?c.map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(Sr):n.ticks?n.ticks(v).map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+j,value:S,index:N,offset:j}:null}).filter(Sr):n.domain().map((S,N)=>{var E=n.map(S);return We(E)?{coordinate:E+j,value:u?u[S]:S,index:N,offset:j}:null}).filter(Sr)}},OP=q([ft,oc,ol,nm,Gy,lc,Qy,qy,zt],SH),NH=(e,t,r,n,i,o,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Gn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Yr(n[0]-n[1])*2*h:h,c&&o?o.map((m,g)=>{var v=r.map(m);return We(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(Sr):r.ticks?r.ticks(f).map((m,g)=>{var v=r.map(m);return We(v)?{coordinate:v+h,value:m,index:g,offset:h}:null}).filter(Sr):r.domain().map((m,g)=>{var v=r.map(m);return We(v)?{coordinate:v+h,value:i?i[m]:m,index:g,offset:h}:null}).filter(Sr)}},_P=q([ft,oc,nm,lc,Qy,qy,zt],NH),MP=q(pr,nm,(e,t)=>{if(!(e==null||t==null))return Qf(Qf({},e),{},{scale:t})}),EH=q([pr,ol,Ky,NP],Fy),AH=q([EH],gy);q((e,t,r)=>By(e,r),AH,(e,t)=>{if(!(e==null||t==null))return Qf(Qf({},e),{},{scale:t})});var CH=q([ft,Th,Dh],(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}}),PH=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};q([PH],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);u<n&&(n=u,i=o)}return(r=i)===null||r===void 0?void 0:r.value}});var IP=e=>e.options.defaultTooltipEventType,TP=e=>e.options.validateTooltipEventTypes;function DP(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function uc(e,t){var r=IP(e),n=TP(e);return DP(t,r,n)}function OH(e){return Me(t=>uc(t,e))}var RP=(e,t)=>{var r,n=Number(t);if(!(Fn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},_H=e=>e.tooltip.settings,ta={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},MH={itemInteraction:{click:ta,hover:ta},axisInteraction:{click:ta,hover:ta},keyboardInteraction:ta,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}},LP=lr({name:"tooltip",initialState:MH,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:st()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=Xr(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:st()},removeTooltipEntrySettings:{reducer(e,t){var r=Xr(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=LP.actions,IH=on.addTooltipEntrySettings,TH=on.replaceTooltipEntrySettings,DH=on.removeTooltipEntrySettings,RH=on.setTooltipSettingsState,LH=on.setActiveMouseOverItemIndex;on.mouseLeaveItem;var $P=on.mouseLeaveChart;on.setActiveClickItemIndex;var zP=on.setMouseOverAxisIndex,$H=on.setMouseClickAxisIndex,fu=on.setSyncInteraction,Xf=on.setKeyboardInteraction,zH=LP.reducer;function X2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?X2(Object(r),!0).forEach(function(n){FH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FH(e,t,r){return(t=BH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BH(e){var t=UH(e,"string");return typeof t=="symbol"?t:t+""}function UH(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 HH(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function WH(e){return e.index!=null}var FP=(e,t,r,n)=>{if(t==null)return ta;var i=HH(e,t,r);if(i==null)return ta;if(i.active)return i;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(WH(i)){if(o)return Hd(Hd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Hd(Hd({},ta),{},{coordinate:i.coordinate})};function KH(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 GH(e,t){var r=KH(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),u=Math.max(n,i);return r>=o&&r<=u}function VH(e,t,r){if(r==null||t==null)return!0;var n=Lt(e,t);return n==null||!$n(r)?!0:GH(n,r)}var mu=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!We(o))return i;var u=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(u,Math.min(o,c)),h=t[f];return h==null||VH(h,r,n)?String(f):null},BP=(e,t,r,n,i,o,u)=>{if(o!=null){var c=u[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var h=i==null?void 0:i[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}}}},UP=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var c;return((c=u.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},HP=e=>e.options.tooltipPayloadSearcher,sl=e=>e.tooltip;function Z2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function J2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z2(Object(r),!0).forEach(function(n){qH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z2(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)}function XH(e){if(typeof e=="string"||typeof e=="number")return e}function ZH(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function JH(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function eS(e){if(typeof e=="string")return e}function eW(e){if(!(e==null||typeof e!="object")){var t="name"in e?XH(e.name):void 0,r="unit"in e?ZH(e.unit):void 0,n="dataKey"in e?JH(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?eS(e.color):void 0,u="fill"in e?eS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:u}}}function tW(e,t){return e??t}var WP=(e,t,r,n,i,o,u)=>{if(!(t==null||o==null)){var c=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,g=[];return e.reduce((v,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=tW(k,c),E=Array.isArray(N)?pA(N,h,m):N,A=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,P=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&u==="axis"?_=jE(E,n,i):_=o(E,t,f,P),Array.isArray(_))_.forEach(T=>{var B,$,z=eW(T),Q=z==null?void 0:z.name,U=z==null?void 0:z.dataKey,ve=z==null?void 0:z.payload,ue=J2(J2({},S),{},{name:Q,unit:z==null?void 0:z.unit,color:(B=z==null?void 0:z.color)!==null&&B!==void 0?B:S==null?void 0:S.color,fill:($=z==null?void 0:z.fill)!==null&&$!==void 0?$:S==null?void 0:S.fill});v.push(qk({tooltipEntrySettings:ue,dataKey:U,payload:ve,value:Lt(ve,U),name:Q==null?void 0:String(Q)}))});else{var O;v.push(qk({tooltipEntrySettings:S,dataKey:A,payload:_,value:Lt(_,A),name:(O=Lt(_,P))!==null&&O!==void 0?O:S==null?void 0:S.name}))}return v},g)}},Yy=q([_t,QC,ly],WC),rW=q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),nW=q([Ft,rl],YC),Ao=q([rW,_t,nW],ZC,{memoizeOptions:{resultEqualityCheck:Yh}}),iW=q([Ao],e=>e.filter(py)),KP=q([Ao],tP,{memoizeOptions:{resultEqualityCheck:Yh}}),aW=q([Ao],e=>e.some(t=>!t.data)),bo=q([KP,kn],nP),oW=q([iW,kn,_t],uC),Xy=q([bo,_t,Ao,kn,aW,KP],iP),GP=q([_t],Hy),sW=q([_t],e=>e.allowDataOverflow),VP=q([GP,sW],KA),lW=q([Ao],e=>e.filter(py)),uW=q([oW,lW,Wh,rC],oP),cW=q([uW,kn,Ft,VP],lP),dW=q([Ao],eP),fW=q([bo,_t,dW,Wy,Ft,wB],dP,{memoizeOptions:{resultEqualityCheck:Qh}}),hW=q([fP,Ft,rl],al),mW=q([hW,Ft],pP),pW=q([hP,Ft,rl],al),gW=q([pW,Ft],gP),vW=q([mP,Ft,rl],al),yW=q([vW,Ft],vP),xW=q([mW,yW,gW],Yf),bW=q([_t,GP,VP,cW,fW,xW,ft,Ft],yP),Ks=q([_t,ft,bo,Xy,Wh,Ft,bW],xP),wW=q([Ks,_t,Yy],bP),kW=q([_t,Ks,wW,Ft],wP),qP=e=>{var t=Ft(e),r=rl(e),n=!1;return lc(e,t,r,n)},QP=q([_t,qP],Kh),jW=q([_t,Yy,kW,QP],Fy),YP=q([jW],gy),SW=q([ft,Xy,_t,Ft],PP),NW=q([ft,Xy,_t,Ft],EP),EW=(e,t,r,n,i,o,u,c)=>{if(t){var f=t.type,h=Gn(e,c);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return g=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Yr(i[0]-i[1])*2*g:g,h&&u?u.map((v,b)=>{var j=n.map(v);return We(j)?{coordinate:j+g,value:v,index:b,offset:g}:null}).filter(Sr):n.domain().map((v,b)=>{var j=n.map(v);return We(j)?{coordinate:j+g,value:o?o[v]:v,index:b,offset:g}:null}).filter(Sr)}}},Ai=q([ft,_t,Yy,YP,qP,SW,NW,Ft],EW),Zy=q([IP,TP,_H],(e,t,r)=>DP(r.shared,e,t)),XP=e=>e.tooltip.settings.trigger,Jy=e=>e.tooltip.settings.defaultIndex,cc=q([sl,Zy,XP,Jy],FP),Lu=q([cc,bo,Ws,Ks],mu),ZP=q([Ai,Lu],RP),AW=q([cc],e=>{if(e)return e.dataKey}),CW=q([cc],e=>{if(e)return e.graphicalItemId}),JP=q([sl,Zy,XP,Jy],UP),PW=q([ki,ji,ft,Zt,Ai,Jy,JP],BP),OW=q([cc,PW],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),_W=q([cc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),MW=q([JP,Lu,kn,Ws,ZP,HP,Zy],WP),IW=q([MW],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function tS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tS(Object(r),!0).forEach(function(n){TW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TW(e,t,r){return(t=DW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DW(e){var t=RW(e,"string");return typeof t=="symbol"?t:t+""}function RW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LW=()=>Me(_t),$W=()=>{var e=LW(),t=Me(Ai),r=Me(YP);return Af(!e||!r?void 0:rS(rS({},e),{},{scale:r}),t)};function nS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function os(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nS(Object(r),!0).forEach(function(n){zW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zW(e,t,r){return(t=FW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FW(e){var t=BW(e,"string");return typeof t=="symbol"?t:t+""}function BW(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 UW=(e,t,r,n)=>{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},HW=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var o=i.coordinate,u=n.radius;return os(os(os({},n),qt(n.cx,n.cy,u,o)),{},{angle:o,radius:u})}var c=i.coordinate,f=n.angle;return os(os(os({},n),qt(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function WW(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 eO=(e,t,r,n,i)=>{var o,u=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<u;c++){var f,h,m,g,v,b=c>0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,j=(m=r[c])===null||m===void 0?void 0:m.coordinate,k=c>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Yr(j-b)!==Yr(k-j)){var N=[];if(Yr(k-j)===Yr(i[1]-i[0])){S=k;var E=j+i[1]-i[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{S=b;var A=k+i[1]-i[0];N[0]=Math.min(j,(A+j)/2),N[1]=Math.max(j,(A+j)/2)}var P=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>P[0]&&e<=P[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[c])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,k),T=Math.max(b,k);if(e>(O+j)/2&&e<=(T+j)/2){var B;return(B=r[c])===null||B===void 0?void 0:B.index}}}else if(t)for(var $=0;$<u;$++){var z=t[$];if(z!=null){var Q=t[$+1],U=t[$-1];if($===0&&Q!=null&&e<=(z.coordinate+Q.coordinate)/2||$===u-1&&U!=null&&e>(z.coordinate+U.coordinate)/2||$>0&&$<u-1&&U!=null&&Q!=null&&e>(z.coordinate+U.coordinate)/2&&e<=(z.coordinate+Q.coordinate)/2)return z.index}}return-1},tO=()=>Me(ly),ex=(e,t)=>t,rO=(e,t,r)=>r,tx=(e,t,r,n)=>n,KW=q(Ai,e=>jh(e,t=>t.coordinate)),rx=q([sl,ex,rO,tx],FP),nx=q([rx,bo,Ws,Ks],mu),GW=(e,t,r)=>{if(t!=null){var n=sl(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},nO=q([sl,ex,rO,tx],UP),Zf=q([ki,ji,ft,Zt,Ai,tx,nO],BP),VW=q([rx,Zf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),iO=q([Ai,nx],RP),qW=q([nO,nx,kn,Ws,iO,HP,ex],WP),QW=q([rx,nx],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),YW=(e,t,r,n,i,o,u)=>{if(!(!e||!r||!n||!i)&&WW(e,u)){var c=u6(e,t),f=eO(c,o,i,r,n),h=UW(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},XW=(e,t,r,n,i,o,u)=>{if(!(!e||!n||!i||!o||!r)){var c=fB(e,r);if(c){var f=c6(c,t),h=eO(f,u,o,n,i),m=HW(t,o,h,c);return{activeIndex:String(h),activeCoordinate:m}}}},ZW=(e,t,r,n,i,o,u,c)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?YW(e,t,n,i,o,u,c):XW(e,t,r,n,i,o,u)},JW=q(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),eK=q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(fr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:HB}});function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iS(Object(r),!0).forEach(function(n){tK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function 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)}var iK={},aK={zIndexMap:Object.values(fr).reduce((e,t)=>aS(aS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),iK)},oK=new Set(Object.values(fr));function sK(e){return oK.has(e)}var aO=lr({name:"zIndex",initialState:aK,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&&!sK(r)&&delete e.zIndexMap[r])},prepare:st()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:o?void 0:i,panoramaElement:o?i: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()}}}),om=aO.actions,lK=om.registerZIndexPortal,Bg=om.unregisterZIndexPortal,uK=om.registerZIndexPortalElement,cK=om.unregisterZIndexPortalElement,dK=aO.reducer;function Ci(e){var t=e.zIndex,r=e.children,n=q6(),i=n&&t!==void 0&&t!==0,o=Ar(),u=y.useRef(void 0),c=y.useRef(new Set),f=Nt(),h=Me(g=>JW(g,t,o));if(y.useLayoutEffect(()=>{if(!i){var g=c.current;g.forEach(b=>{f(Bg({zIndex:b}))}),g.clear(),u.current=void 0;return}if(c.current.has(t)||(f(lK({zIndex:t})),c.current.add(t)),h){u.current=h;var v=c.current;v.forEach(b=>{b!==t&&(f(Bg({zIndex:b})),v.delete(b))})}},[f,t,i,h]),y.useLayoutEffect(()=>{var g=c.current;return()=>{g.forEach(v=>{f(Bg({zIndex:v}))}),g.clear()}},[f]),!i)return r;var m=h??u.current;return m?hh.createPortal(r,m):null}function c0(){return c0=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},c0.apply(null,arguments)}function oS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?oS(Object(r),!0).forEach(function(n){fK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fK(e,t,r){return(t=hK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hK(e){var t=mK(e,"string");return typeof t=="symbol"?t:t+""}function mK(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 pK(e){var t=e.cursor,r=e.cursorComp,n=e.cursorProps;return y.isValidElement(t)?y.cloneElement(t,n):y.createElement(r,n)}function gK(e){var t,r=e.coordinate,n=e.payload,i=e.index,o=e.offset,u=e.tooltipAxisBandSize,c=e.layout,f=e.cursor,h=e.tooltipEventType,m=e.chartName,g=r,v=n,b=i;if(!f||!g||m!=="ScatterChart"&&h!=="axis")return null;var j,k,S;if(m==="ScatterChart")j=g,k=bF,S=fr.cursorLine;else if(m==="BarChart")j=wF(c,g,o,u),k=rB,S=fr.cursorRectangle;else if(c==="radial"&&SE(g)){var N=UA(g),E=N.cx,A=N.cy,P=N.radius,_=N.startAngle,O=N.endAngle;j={cx:E,cy:A,startAngle:_,endAngle:O,innerRadius:P,outerRadius:P},k=gB,S=fr.cursorLine}else j={points:vB(c,g,o)},k=Jd,S=fr.cursorLine;var T=typeof f=="object"&&"className"in f?f.className:void 0,B=Wd(Wd(Wd(Wd({stroke:"#ccc",pointerEvents:"none"},o),j),bh(f)),{},{payload:v,payloadIndex:b,className:rt("recharts-tooltip-cursor",T)});return y.createElement(Ci,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},y.createElement(pK,{cursor:f,cursorComp:k,cursorProps:B}))}function vK(e){var t=$W(),r=SA(),n=Js(),i=tO();return t==null||r==null||n==null||i==null?null:y.createElement(gK,c0({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var oO=y.createContext(null),yK=()=>y.useContext(oO),Ug={exports:{}},sS;function xK(){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 i(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,g,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,g||f,v),j=r?r+h:h;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],b]:f._events[j].push(b):(f._events[j]=b,f._eventsCount++),f}function u(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],m,g;if(this._eventsCount===0)return h;for(g in m=this._events)t.call(m,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},c.prototype.listeners=function(h){var m=r?r+h:h,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var v=0,b=g.length,j=new Array(b);v<b;v++)j[v]=g[v].fn;return j},c.prototype.listenerCount=function(h){var m=r?r+h:h,g=this._events[m];return g?g.fn?1:g.length:0},c.prototype.emit=function(h,m,g,v,b,j){var k=r?r+h:h;if(!this._events[k])return!1;var S=this._events[k],N=arguments.length,E,A;if(S.fn){switch(S.once&&this.removeListener(h,S.fn,void 0,!0),N){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,m),!0;case 3:return S.fn.call(S.context,m,g),!0;case 4:return S.fn.call(S.context,m,g,v),!0;case 5:return S.fn.call(S.context,m,g,v,b),!0;case 6:return S.fn.call(S.context,m,g,v,b,j),!0}for(A=1,E=new Array(N-1);A<N;A++)E[A-1]=arguments[A];S.fn.apply(S.context,E)}else{var P=S.length,_;for(A=0;A<P;A++)switch(S[A].once&&this.removeListener(h,S[A].fn,void 0,!0),N){case 1:S[A].fn.call(S[A].context);break;case 2:S[A].fn.call(S[A].context,m);break;case 3:S[A].fn.call(S[A].context,m,g);break;case 4:S[A].fn.call(S[A].context,m,g,v);break;default:if(!E)for(_=1,E=new Array(N-1);_<N;_++)E[_-1]=arguments[_];S[A].fn.apply(S[A].context,E)}}return!0},c.prototype.on=function(h,m,g){return o(this,h,m,g,!1)},c.prototype.once=function(h,m,g){return o(this,h,m,g,!0)},c.prototype.removeListener=function(h,m,g,v){var b=r?r+h:h;if(!this._events[b])return this;if(!m)return u(this,b),this;var j=this._events[b];if(j.fn)j.fn===m&&(!v||j.once)&&(!g||j.context===g)&&u(this,b);else{for(var k=0,S=[],N=j.length;k<N;k++)(j[k].fn!==m||v&&!j[k].once||g&&j[k].context!==g)&&S.push(j[k]);S.length?this._events[b]=S.length===1?S[0]:S:u(this,b)}return this},c.prototype.removeAllListeners=function(h){var m;return h?(m=r?r+h:h,this._events[m]&&u(this,m)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c})(Ug)),Ug.exports}var bK=xK();const wK=j0(bK);var $u=new wK,d0="recharts.syncEvent.tooltip",lS="recharts.syncEvent.brush",kK=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Fn(r))return e[r]}},jK={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},sO=lr({name:"options",initialState:jK,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),SK=sO.reducer,NK=sO.actions.createEventEmitter;function EK(e){return e.tooltip.syncInteraction}var AK={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},lO=lr({name:"chartData",initialState:AK,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,i=r.endIndex;n!=null&&(e.dataStartIndex=n),i!=null&&(e.dataEndIndex=i)}}}),ix=lO.actions,uS=ix.setChartData,CK=ix.setDataStartEndIndexes;ix.setComputedData;var PK=lO.reducer,OK=["x","y"];function cS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?cS(Object(r),!0).forEach(function(n){_K(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 _K(e,t,r){return(t=MK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MK(e){var t=IK(e,"string");return typeof t=="symbol"?t:t+""}function IK(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 TK(e,t){if(e==null)return{};var r,n,i=DK(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)&&(i[r]=e[r])}return i}function DK(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 RK(){var e=Me(uy),t=Me(cy),r=Nt(),n=Me(nC),i=Me(Ai),o=Js(),u=$h(),c=Me(f=>f.rootProps.className);y.useEffect(()=>{if(e==null)return Zs;var f=(h,m,g)=>{if(t!==g&&e===h){if(m.payload.active===!1){r(fu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(u&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,j=b.x,k=b.y,S=TK(b,OK),N=m.payload.sourceViewBox,E=N.x,A=N.y,P=N.width,_=N.height,O=ss(ss({},S),{},{x:u.x+(P?(j-E)/P:0)*u.width,y:u.y+(_?(k-A)/_:0)*u.height});r(ss(ss({},m),{},{payload:ss(ss({},m.payload),{},{coordinate:O})}))}else r(m);return}if(i!=null){var T;if(typeof n=="function"){var B={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},$=n(i,B);T=i[$]}else n==="value"&&(T=i.find(se=>String(se.value)===m.payload.label));var z=m.payload.coordinate;if(z==null||u==null){r(fu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(T==null){r(fu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Q=z.x,U=z.y,ve=Math.min(Q,u.x+u.width),ue=Math.min(U,u.y+u.height),pe={x:o==="horizontal"?T.coordinate:ve,y:o==="horizontal"?ue:T.coordinate},oe=fu({active:m.payload.active,coordinate:pe,dataKey:m.payload.dataKey,index:String(T.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(oe)}}};return $u.on(d0,f),()=>{$u.off(d0,f)}},[c,r,t,e,n,i,o,u])}function LK(){var e=Me(uy),t=Me(cy),r=Nt();y.useEffect(()=>{if(e==null)return Zs;var n=(i,o,u)=>{t!==u&&e===i&&r(CK(o))};return $u.on(lS,n),()=>{$u.off(lS,n)}},[r,t,e])}function $K(){var e=Nt();y.useEffect(()=>{e(NK())},[e]),RK(),LK()}function zK(e,t,r,n,i,o){var u=Me(j=>GW(j,e,t)),c=Me(CW),f=Me(cy),h=Me(uy),m=Me(nC),g=Me(EK),v=(g==null?void 0:g.sourceViewBox)!=null,b=$h();y.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=fu({active:o,coordinate:r,dataKey:u,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:c});$u.emit(d0,h,j,f)}},[v,r,u,c,i,n,f,h,m,o,b])}function dS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dS(Object(r),!0).forEach(function(n){FK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FK(e,t,r){return(t=BK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BK(e){var t=UK(e,"string");return typeof t=="symbol"?t:t+""}function UK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HK(e,t){return VK(e)||GK(e,t)||KK(e,t)||WK()}function WK(){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 KK(e,t){if(e){if(typeof e=="string")return hS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hS(e,t):void 0}}function hS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function GK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function VK(e){if(Array.isArray(e))return e}function qK(e){return e.dataKey}function QK(e,t){return y.isValidElement(e)?y.cloneElement(e,t):typeof e=="function"?y.createElement(e,t):y.createElement(z8,t)}var mS=[],YK={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 XK(e){var t,r,n=nn(e,YK),i=n.active,o=n.allowEscapeViewBox,u=n.animationDuration,c=n.animationEasing,f=n.content,h=n.filterNull,m=n.isAnimationActive,g=n.offset,v=n.payloadUniqBy,b=n.position,j=n.reverseDirection,k=n.useTranslate3d,S=n.wrapperStyle,N=n.cursor,E=n.shared,A=n.trigger,P=n.defaultIndex,_=n.portal,O=n.axisId,T=Nt(),B=typeof P=="number"?String(P):P;y.useEffect(()=>{T(RH({shared:E,trigger:A,axisId:O,active:i,defaultIndex:B}))},[T,E,A,O,i,B]);var $=$h(),z=RA(),Q=OH(E),U=(t=Me(Oe=>QW(Oe,Q,A,B)))!==null&&t!==void 0?t:{},ve=U.activeIndex,ue=U.isActive,pe=Me(Oe=>qW(Oe,Q,A,B)),oe=Me(Oe=>iO(Oe,Q,A,B)),se=Me(Oe=>VW(Oe,Q,A,B)),X=pe,ne=yK(),te=(r=i??ue)!==null&&r!==void 0?r:!1,I=Q$([X,te]),M=HK(I,2),H=M[0],ie=M[1],J=Q==="axis"?oe:void 0;zK(Q,A,se,J,ve,te);var Z=_??ne;if(Z==null||$==null||Q==null)return null;var ae=X??mS;te||(ae=mS),h&&ae.length&&(ae=y$(ae.filter(Oe=>Oe.value!=null&&(Oe.hide!==!0||n.includeHidden)),v,qK));var me=ae.length>0,re=fS(fS({},n),{},{payload:ae,label:J,active:te,activeIndex:ve,coordinate:se,accessibilityLayer:z}),ye=y.createElement(oF,{allowEscapeViewBox:o,animationDuration:u,animationEasing:c,isAnimationActive:m,active:te,coordinate:se,hasPayload:me,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:$,wrapperStyle:S,lastBoundingBox:H,innerRef:ie,hasPortalFromProps:!!_},QK(f,re));return y.createElement(y.Fragment,null,hh.createPortal(ye,Z),te&&y.createElement(vK,{cursor:N,tooltipEventType:Q,coordinate:se,payload:ae,index:ve}))}function ZK(e,t,r){return(t=JK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JK(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)}class tG{constructor(t){ZK(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 pS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rG(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){nG(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 nG(e,t,r){return(t=iG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iG(e){var t=aG(e,"string");return typeof t=="symbol"?t:t+""}function aG(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 oG={cacheSize:2e3,enableCache:!0},uO=rG({},oG),gS=new tG(uO.cacheSize),sG={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},vS="recharts_measurement_span";function lG(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",u=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(u,"|").concat(c)}var yS=(e,t)=>{try{var r=document.getElementById(vS);r||(r=document.createElement("span"),r.setAttribute("id",vS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,sG,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},pu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||tc.isSsr)return{width:0,height:0};if(!uO.enableCache)return yS(t,r);var n=lG(t,r),i=gS.get(n);if(i)return i;var o=yS(t,r);return gS.set(n,o),o},cO;function Jf(e,t){return fG(e)||dG(e,t)||cG(e,t)||uG()}function uG(){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 cG(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 dG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],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)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function fG(e){if(Array.isArray(e))return e}function hG(e,t,r){return(t=mG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mG(e){var t=pG(e,"string");return typeof t=="symbol"?t:t+""}function pG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,wS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,gG=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,vG=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,yG={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},xG=["cm","mm","pt","pc","in","Q","px"];function bG(e){return xG.includes(e)}var ps="NaN";function wG(e,t){return e*yG[t]}class Gt{static parse(t){var r,n=(r=vG.exec(t))!==null&&r!==void 0?r:[],i=Jf(n,3),o=i[1],u=i[2];return o==null?Gt.NaN:new Gt(parseFloat(o),u??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Fn(t)&&(this.unit=""),r!==""&&!gG.test(r)&&(this.num=NaN,this.unit=""),bG(r)&&(this.num=wG(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Gt(NaN,""):new Gt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Gt(NaN,""):new Gt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Gt(NaN,""):new Gt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Gt(NaN,""):new Gt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Fn(this.num)}}cO=Gt;hG(Gt,"NaN",new cO(NaN,""));function dO(e){if(e==null||e.includes(ps))return ps;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=bS.exec(t))!==null&&r!==void 0?r:[],i=Jf(n,4),o=i[1],u=i[2],c=i[3],f=Gt.parse(o??""),h=Gt.parse(c??""),m=u==="*"?f.multiply(h):f.divide(h);if(m.isNaN())return ps;t=t.replace(bS,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var g,v=(g=wS.exec(t))!==null&&g!==void 0?g:[],b=Jf(v,4),j=b[1],k=b[2],S=b[3],N=Gt.parse(j??""),E=Gt.parse(S??""),A=k==="+"?N.add(E):N.subtract(E);if(A.isNaN())return ps;t=t.replace(wS,A.toString())}return t}var kS=/\(([^()]*)\)/;function kG(e){for(var t=e,r;(r=kS.exec(t))!=null;){var n=r,i=Jf(n,2),o=i[1];t=t.replace(kS,dO(o))}return t}function jG(e){var t=e.replace(/\s+/g,"");return t=kG(t),t=dO(t),t}function SG(e){try{return jG(e)}catch{return ps}}function Hg(e){var t=SG(e.slice(5,-1));return t===ps?"":t}var NG=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],EG=["dx","dy","angle","className","breakAll"];function f0(){return f0=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},f0.apply(null,arguments)}function jS(e,t){if(e==null)return{};var r,n,i=AG(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)&&(i[r]=e[r])}return i}function AG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function SS(e,t){return _G(e)||OG(e,t)||PG(e,t)||CG()}function CG(){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 PG(e,t){if(e){if(typeof e=="string")return NS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?NS(e,t):void 0}}function NS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function OG(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],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)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function _G(e){if(Array.isArray(e))return e}var fO=/[ \f\n\r\t\v\u2028\u2029]+/,hO=e=>{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];Yt(t)||(r?i=t.toString().split(""):i=t.toString().split(fO));var o=i.map(c=>({word:c,width:pu(c,n).width})),u=r?0:pu(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function mO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function MG(e){return Yt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var pO=(e,t,r,n)=>e.reduce((i,o)=>{var u=o.word,c=o.width,f=i[i.length-1];if(f&&c!=null&&(t==null||n||f.width+c+r<Number(t)))f.words.push(u),f.width+=c+r;else{var h={words:[u],width:c};i.push(h)}return i},[]),gO=e=>e.reduce((t,r)=>t.width>r.width?t:r),IG="…",ES=(e,t,r,n,i,o,u,c)=>{var f=e.slice(0,t),h=hO({breakAll:r,style:n,children:f+IG});if(!h)return[!1,[]];var m=pO(h.wordsWithComputedWidth,o,u,c),g=m.length>i||gO(m).width>Number(o);return[g,m]},TG=(e,t,r,n,i)=>{var o=e.maxLines,u=e.children,c=e.style,f=e.breakAll,h=Ae(o),m=String(u),g=pO(t,n,r,i);if(!h||i)return g;var v=g.length>o||gO(g).width>Number(n);if(!v)return g;for(var b=0,j=m.length-1,k=0,S;b<=j&&k<=m.length-1;){var N=Math.floor((b+j)/2),E=N-1,A=ES(m,E,f,c,o,n,r,i),P=SS(A,2),_=P[0],O=P[1],T=ES(m,N,f,c,o,n,r,i),B=SS(T,1),$=B[0];if(!_&&!$&&(b=N+1),_&&$&&(j=N-1),!_&&$){S=O;break}k++}return S||g},AS=e=>{var t=Yt(e)?[]:e.toString().split(fO);return[{words:t,width:void 0}]},DG=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,u=e.maxLines;if((t||r)&&!tc.isSsr){var c,f,h=hO({breakAll:o,children:n,style:i});if(h){var m=h.wordsWithComputedWidth,g=h.spaceWidth;c=m,f=g}else return AS(n);return TG({breakAll:o,children:n,maxLines:u,style:i},c,f,t,!!r)}return AS(n)},vO="#808080",RG={angle:0,breakAll:!1,capHeight:"0.71em",fill:vO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},ax=y.forwardRef((e,t)=>{var r=nn(e,RG),n=r.x,i=r.y,o=r.lineHeight,u=r.capHeight,c=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,g=jS(r,NG),v=y.useMemo(()=>DG({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=jS(g,EG);if(!Bn(n)||!Bn(i)||v.length===0)return null;var A=Number(n)+(Ae(b)?b:0),P=Number(i)+(Ae(j)?j:0);if(!We(A)||!We(P))return null;var _;switch(m){case"start":_=Hg("calc(".concat(u,")"));break;case"middle":_=Hg("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:_=Hg("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],T=v[0];if(f&&T!=null){var B=T.width,$=g.width;O.push("scale(".concat(Ae($)&&Ae(B)?$/B:1,")"))}return k&&O.push("rotate(".concat(k,", ").concat(A,", ").concat(P,")")),O.length&&(E.transform=O.join(" ")),y.createElement("text",f0({},en(E),{ref:t,x:A,y:P,className:rt("recharts-text",S),textAnchor:h,fill:c.includes("url")?vO:c}),v.map((z,Q)=>{var U=z.words.join(N?"":" ");return y.createElement("tspan",{x:A,dy:Q===0?_:o,key:"".concat(U,"-").concat(Q)},U)}))});ax.displayName="Text";function CS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _n(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){LG(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 LG(e,t,r){return(t=$G(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $G(e){var t=zG(e,"string");return typeof t=="symbol"?t:t+""}function zG(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 FG=e=>{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,u=J0(t),c=u.x,f=u.y,h=u.height,m=u.upperWidth,g=u.lowerWidth,v=c,b=c+(m-g)/2,j=(v+b)/2,k=(m+g)/2,S=v+m/2,N=h>=0?1:-1,E=N*i,A=N>0?"end":"start",P=N>0?"start":"end",_=m>=0?1:-1,O=_*i,T=_>0?"end":"start",B=_>0?"start":"end",$=o;if(r==="top"){var z={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:A};return $&&(z.height=Math.max(f-$.y,0),z.width=m),z}if(r==="bottom"){var Q={x:b+g/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:P};return $&&(Q.height=Math.max($.y+$.height-(f+h),0),Q.width=g),Q}if(r==="left"){var U={x:j-O,y:f+h/2,horizontalAnchor:T,verticalAnchor:"middle"};return $&&(U.width=Math.max(U.x-$.x,0),U.height=h),U}if(r==="right"){var ve={x:j+k+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return $&&(ve.width=Math.max($.x+$.width-ve.x,0),ve.height=h),ve}var ue=$?{width:k,height:h}:{};return r==="insideLeft"?_n({x:j+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},ue):r==="insideRight"?_n({x:j+k-O,y:f+h/2,horizontalAnchor:T,verticalAnchor:"middle"},ue):r==="insideTop"?_n({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:P},ue):r==="insideBottom"?_n({x:b+g/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideTopLeft"?_n({x:v+O,y:f+E,horizontalAnchor:B,verticalAnchor:P},ue):r==="insideTopRight"?_n({x:v+m-O,y:f+E,horizontalAnchor:T,verticalAnchor:P},ue):r==="insideBottomLeft"?_n({x:b+O,y:f+h-E,horizontalAnchor:B,verticalAnchor:A},ue):r==="insideBottomRight"?_n({x:b+g-O,y:f+h-E,horizontalAnchor:T,verticalAnchor:A},ue):r&&typeof r=="object"&&(Ae(r.x)||po(r.x))&&(Ae(r.y)||po(r.y))?_n({x:c+ya(r.x,k),y:f+ya(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):_n({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},BG=["labelRef"],UG=["content"];function PS(e,t){if(e==null)return{};var r,n,i=HG(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)&&(i[r]=e[r])}return i}function HG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function OS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OS(Object(r),!0).forEach(function(n){WG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WG(e,t,r){return(t=KG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KG(e){var t=GG(e,"string");return typeof t=="symbol"?t:t+""}function GG(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 li(){return li=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},li.apply(null,arguments)}var yO=y.createContext(null),VG=e=>{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,u=e.height,c=e.children,f=y.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:u}),[t,r,n,i,o,u]);return y.createElement(yO.Provider,{value:f},c)},xO=()=>{var e=y.useContext(yO),t=$h();return e||(t?J0(t):void 0)},qG=y.createContext(null),QG=()=>{var e=y.useContext(qG),t=Me(lC);return e||t},YG=e=>{var t=e.value,r=e.formatter,n=Yt(e.children)?t:e.children;return typeof r=="function"?r(n):n},ox=e=>e!=null&&typeof e=="function",XG=(e,t)=>{var r=Yr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},ZG=(e,t,r,n,i)=>{var o=e.offset,u=e.className,c=i.cx,f=i.cy,h=i.innerRadius,m=i.outerRadius,g=i.startAngle,v=i.endAngle,b=i.clockWise,j=(h+m)/2,k=XG(g,v),S=k>=0?1:-1,N,E;switch(t){case"insideStart":N=g+S*o,E=b;break;case"insideEnd":N=v-S*o,E=!b;break;case"end":N=v+S*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=k<=0?E:!E;var A=qt(c,f,j,N),P=qt(c,f,j,N+(E?1:-1)*359),_="M".concat(A.x,",").concat(A.y,`
|
||
A`).concat(j,",").concat(j,",0,1,").concat(E?0:1,`,
|
||
`).concat(P.x,",").concat(P.y),O=Yt(e.id)?Su("recharts-radial-line-"):e.id;return y.createElement("text",li({},n,{dominantBaseline:"central",className:rt("recharts-radial-bar-label",u)}),y.createElement("defs",null,y.createElement("path",{id:O,d:_})),y.createElement("textPath",{xlinkHref:"#".concat(O)},r))},JG=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,u=e.outerRadius,c=e.startAngle,f=e.endAngle,h=(c+f)/2;if(r==="outside"){var m=qt(n,i,u+t,h),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(o+u)/2,j=qt(n,i,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},ef=e=>e!=null&&"cx"in e&&Ae(e.cx),eV={angle:0,offset:5,zIndex:fr.label,position:"middle",textBreakAll:!1};function tV(e){if(!ef(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function ea(e){var t=nn(e,eV),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,u=t.children,c=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,g=t.labelRef,v=QG(),b=xO(),j=i==="center"?b:v??b,k,S,N;r==null?k=j:ef(r)?k=r:k=J0(r);var E=tV(k);if(!k||Yt(o)&&Yt(u)&&!y.isValidElement(c)&&typeof c!="function")return null;var A=hu(hu({},t),{},{viewBox:k});if(y.isValidElement(c)){A.labelRef;var P=PS(A,BG);return y.cloneElement(c,P)}if(typeof c=="function"){A.content;var _=PS(A,UG);if(S=y.createElement(c,_),y.isValidElement(S))return S}else S=YG(t);var O=en(t);if(ef(k)){if(i==="insideStart"||i==="insideEnd"||i==="end")return ZG(t,i,S,O,k);N=JG(k,t.offset,t.position)}else{if(!E)return null;var T=FG({viewBox:E,position:i,offset:t.offset,parentViewBox:ef(n)?void 0:n});N=hu(hu({x:T.x,y:T.y,textAnchor:T.horizontalAnchor,verticalAnchor:T.verticalAnchor},T.width!==void 0?{width:T.width}:{}),T.height!==void 0?{height:T.height}:{})}return y.createElement(Ci,{zIndex:t.zIndex},y.createElement(ax,li({ref:g,className:rt("recharts-label",h)},O,N,{textAnchor:mO(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),S))}ea.displayName="Label";var rV=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?y.createElement(ea,li({key:"label-implicit"},n)):Bn(e)?y.createElement(ea,li({key:"label-implicit",value:e},n)):y.isValidElement(e)?e.type===ea?y.cloneElement(e,hu({key:"label-implicit"},n)):y.createElement(ea,li({key:"label-implicit",content:e},n)):ox(e)?y.createElement(ea,li({key:"label-implicit",content:e},n)):e&&typeof e=="object"?y.createElement(ea,li({},e,{key:"label-implicit"},n)):null};function nV(e){var t=e.label,r=e.labelRef,n=xO();return rV(t,n,r)||null}var iV=["valueAccessor"],aV=["dataKey","clockWise","id","textBreakAll","zIndex"];function eh(){return eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eh.apply(null,arguments)}function _S(e,t){if(e==null)return{};var r,n,i=oV(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)&&(i[r]=e[r])}return i}function oV(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 sV=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(MG(t))return t},bO=y.createContext(void 0),lV=bO.Provider,wO=y.createContext(void 0);wO.Provider;function uV(){return y.useContext(bO)}function cV(){return y.useContext(wO)}function tf(e){var t=e.valueAccessor,r=t===void 0?sV:t,n=_S(e,iV),i=n.dataKey;n.clockWise;var o=n.id,u=n.textBreakAll,c=n.zIndex,f=_S(n,aV),h=uV(),m=cV(),g=h||m;return!g||!g.length?null:y.createElement(Ci,{zIndex:c??fr.label},y.createElement(tn,{className:"recharts-label-list"},g.map((v,b)=>{var j,k=Yt(i)?r(v,b):Lt(v.payload,i),S=Yt(o)?{}:{id:"".concat(o,"-").concat(b)};return y.createElement(ea,eh({key:"label-".concat(b)},en(v),f,S,{fill:(j=n.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:k,textBreakAll:u,viewBox:v.viewBox,index:b,zIndex:0}))})))}tf.displayName="LabelList";function dV(e){var t=e.label;return t?t===!0?y.createElement(tf,{key:"labelList-implicit"}):y.isValidElement(t)||ox(t)?y.createElement(tf,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(tf,eh({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function h0(){return h0=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},h0.apply(null,arguments)}var kO=e=>{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=rt("recharts-dot",i);return Ae(t)&&Ae(r)&&Ae(n)?y.createElement("circle",h0({},xn(e),H0(e),{className:o,cx:t,cy:r,r:n})):null},fV={radiusAxis:{},angleAxis:{}},jO=lr({name:"polarAxis",initialState:fV,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]}}}),sm=jO.actions;sm.addRadiusAxis;sm.removeRadiusAxis;sm.addAngleAxis;sm.removeAngleAxis;var hV=jO.reducer;function mV(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var SO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function MS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function IS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MS(Object(r),!0).forEach(function(n){pV(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 pV(e,t,r){return(t=gV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gV(e){var t=vV(e,"string");return typeof t=="symbol"?t:t+""}function vV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NO(e,t){return IS(IS({},t),e)}function yV(e){return y.isValidElement(e)?e.props:e}function xV(e,t){return y.cloneElement(e,NO(yV(e),t))}function bV(e){if("index"in e){var t=e.index;return typeof t=="number"||typeof t=="string"?t:void 0}}function wV(e){return"isActive"in e&&e.isActive===!0}function kV(e){var t=e.option,r=e.DefaultShape,n=e.shapeProps,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,u=e.inActiveClassName,c=u===void 0?"recharts-shape":u,f=bV(n),h;return y.isValidElement(t)?h=xV(t,n):t===r?h=y.createElement(r,n):typeof t=="function"?h=t(n,f):typeof t=="object"?h=y.createElement(r,NO(t,n)):h=y.createElement(r,n),wV(n)?y.createElement(tn,{className:o},h):y.createElement(tn,{className:c},h)}function jV(e){var t=e.tooltipEntrySettings,r=Nt(),n=Ar(),i=y.useRef(null);return y.useLayoutEffect(()=>{n||(i.current===null?r(IH(t)):i.current!==t&&r(TH({prev:i.current,next:t})),i.current=t)},[t,r,n]),y.useLayoutEffect(()=>()=>{i.current&&(r(DH(i.current)),i.current=null)},[r]),null}function SV(e){var t=e.legendPayload,r=Nt(),n=Ar(),i=y.useRef(null);return y.useLayoutEffect(()=>{n||(i.current===null?r(s8(t)):i.current!==t&&r(l8({prev:i.current,next:t})),i.current=t)},[r,n,t]),y.useLayoutEffect(()=>()=>{i.current&&(r(u8(i.current)),i.current=null)},[r]),null}function NV(e,t){return PV(e)||CV(e,t)||AV(e,t)||EV()}function EV(){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 AV(e,t){if(e){if(typeof e=="string")return TS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?TS(e,t):void 0}}function TS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function CV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function PV(e){if(Array.isArray(e))return e}var sx="index",OV="append";function lx(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;o<t.length;o++){var u=e[o],c=t[o];u!=null?n.push({status:"matched",prev:u,next:c}):n.push({status:"added",next:c})}return n}function _V(e,t){var r=e.length/t.length,n=t.map((i,o)=>e[Math.floor(o*r)]);return lx(n,t)}function MV(e,t){var r=t.map((n,i)=>e[i]);return lx(r,t)}function IV(e,t){for(var r=new Map,n=0;n<e.length;n++){var i=e[n];if(i!=null){var o=t(i,n);o!=null&&!r.has(o)&&r.set(o,i)}}return r}function TV(e,t,r){var n=IV(e,r),i=new Set,o=t.map((g,v)=>{var b=r(g,v);if(b!=null){var j=n.get(b);if(j!==void 0)return i.add(b),j}}),u=[];for(var c of n){var f=NV(c,2),h=f[0],m=f[1];i.has(h)||u.push(m)}return lx(o,t,u)}function m0(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===sx?_V(e,t):r===OV?MV(e,t):TV(e,t,r)}function EO(e,t){var r=y.useRef(e),n=y.useRef(t.current),i=y.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=y.useCallback(function(u,c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(c===0){i.current=!0;return}c===1&&(n.current=u),c>0&&i.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:o}}function DV(e,t){return zV(e)||$V(e,t)||LV(e,t)||RV()}function RV(){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 LV(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 $V(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function zV(e){if(Array.isArray(e))return e}function FV(e,t){var r=y.useState(!1),n=DV(r,2),i=n[0],o=n[1],u=y.useCallback(()=>{typeof e=="function"&&e(),o(!0)},[e]),c=y.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:u,handleAnimationEnd:c}}function BV(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,u=e.isAnimationActive,c=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,g=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=BA(r,n),E=EO(N,o),A=(t=E.startValue)!==null&&t!==void 0?t:null,P=m0(A,i,b??sx);return y.createElement(FA,{animationId:N,begin:c,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:m,key:N},_=>{var O=A==null,T=i==null?i:v(P,_,S),B=j?j(_):_>0;return E.syncStepValue(T,_,B),T==null?null:k(T,_,O)})}var Wg;function UV(e,t){return GV(e)||KV(e,t)||WV(e,t)||HV()}function HV(){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 WV(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 KV(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function GV(e){if(Array.isArray(e))return e}var VV=()=>{var e=y.useState(()=>Su("uid-")),t=UV(e,1),r=t[0];return r},AO=(Wg=lh.useId)!==null&&Wg!==void 0?Wg:VV;function qV(e,t){var r=AO();return t||(e?"".concat(e,"-").concat(r):r)}var QV=y.createContext(void 0),YV=e=>{var t=e.id,r=e.type,n=e.children,i=qV("recharts-".concat(r),t);return y.createElement(QV.Provider,{value:i},n(i))},XV={cartesianItems:[],polarItems:[]},CO=lr({name:"graphicalItems",initialState:XV,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:st()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=Xr(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:st()},removeCartesianGraphicalItem:{reducer(e,t){var r=Xr(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=Xr(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,i=r.next,o=Xr(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:st()}}}),ll=CO.actions,ZV=ll.addCartesianGraphicalItem,JV=ll.replaceCartesianGraphicalItem,eq=ll.removeCartesianGraphicalItem;ll.addPolarGraphicalItem;ll.removePolarGraphicalItem;ll.replacePolarGraphicalItem;var tq=CO.reducer,rq=e=>{var t=Nt(),r=y.useRef(null);return y.useLayoutEffect(()=>{r.current===null?t(ZV(e)):r.current!==e&&t(JV({prev:r.current,next:e})),r.current=e},[t,e]),y.useLayoutEffect(()=>()=>{r.current&&(t(eq(r.current)),r.current=null)},[t]),null},nq=y.memo(rq),iq=["points"];function LS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LS(Object(r),!0).forEach(function(n){aq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aq(e,t,r){return(t=oq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oq(e){var t=sq(e,"string");return typeof t=="symbol"?t:t+""}function sq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function th(){return th=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},th.apply(null,arguments)}function lq(e,t){if(e==null)return{};var r,n,i=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)&&(i[r]=e[r])}return i}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=e.option,r=e.dotProps,n=e.className;if(y.isValidElement(t))return y.cloneElement(t,r);if(typeof t=="function")return t(r);var i=rt(n,typeof t!="boolean"?t.className:""),o=r??{};o.points;var u=lq(o,iq);return y.createElement(kO,th({},u,{className:i}))}function dq(e,t){return e==null?!1:t?!0:e.length===1}function fq(e){var t=e.points,r=e.dot,n=e.className,i=e.dotClassName,o=e.dataKey,u=e.baseProps,c=e.needClip,f=e.clipPathId,h=e.zIndex,m=h===void 0?fr.scatter:h;if(!dq(t,r))return null;var g=SO(r),v=VR(r),b=t.map((k,S)=>{var N,E,A=Kg(Kg(Kg({r:3},u),v),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(E=k.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:k.value,payload:k.payload,points:t});return y.createElement(cq,{key:"dot-".concat(S),option:r,dotProps:A,className:i})}),j={};return c&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),y.createElement(Ci,{zIndex:m},y.createElement(tn,th({className:n},j),b))}function $S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$S(Object(r),!0).forEach(function(n){hq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$S(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hq(e,t,r){return(t=mq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mq(e){var t=pq(e,"string");return typeof t=="symbol"?t:t+""}function pq(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 PO=0,gq={xAxis:{},yAxis:{},zAxis:{}},OO=lr({name:"cartesianAxis",initialState:gq,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,i=r.next;e.xAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.xAxis[n.id],e.xAxis[i.id]=i)},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,i=r.next;e.yAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.yAxis[n.id],e.yAxis[i.id]=i)},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,i=r.next;e.zAxis[n.id]!==void 0&&(n.id!==i.id&&delete e.zAxis[n.id],e.zAxis[i.id]=i)},prepare:st()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:st()},updateYAxisWidth(e,t){var r=t.payload,n=r.id,i=r.width,o=e.yAxis[n];if(o){var u,c=o.widthHistory||[];if(c.length===3&&c[0]===c[2]&&i===c[1]&&i!==o.width&&Math.abs(i-((u=c[0])!==null&&u!==void 0?u:0))<=1)return;var f=[...c,i].slice(-3);e.yAxis[n]=zS(zS({},o),{},{width:i,widthHistory:f})}}}}),Vn=OO.actions,vq=Vn.addXAxis,yq=Vn.replaceXAxis,xq=Vn.removeXAxis,bq=Vn.addYAxis,wq=Vn.replaceYAxis,kq=Vn.removeYAxis;Vn.addZAxis;Vn.replaceZAxis;Vn.removeZAxis;var jq=Vn.updateYAxisWidth,Sq=OO.reducer,Nq=q([Zt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Eq=q([Nq,ki,ji],(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)}}),ux=()=>Me(Eq),Aq=()=>Me(IW);function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FS(Object(r),!0).forEach(function(n){Cq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cq(e,t,r){return(t=Pq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pq(e){var t=Oq(e,"string");return typeof t=="symbol"?t:t+""}function Oq(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 _q=e=>{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,u=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var c={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=Gg(Gg(Gg({},c),bh(i)),H0(i)),h;return y.isValidElement(i)?h=y.cloneElement(i,f):typeof i=="function"?h=i(f):h=y.createElement(kO,f),y.createElement(tn,{className:"recharts-active-dot",clipPath:u},h)};function BS(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,u=e.zIndex,c=u===void 0?fr.activeDot:u,f=Me(Lu),h=Aq();if(t==null||h==null)return null;var m=t.find(g=>h.includes(g.payload));return Yt(m)?null:y.createElement(Ci,{zIndex:c},y.createElement(_q,{point:m,childIndex:Number(f),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var Mq=e=>{var t=e.chartData,r=Nt(),n=Ar();return y.useEffect(()=>n?()=>{}:(r(uS(t)),()=>{r(uS(void 0))}),[t,r,n]),null},US={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},_O=lr({name:"brush",initialState:US,reducers:{setBrushSettings(e,t){return t.payload==null?US:t.payload}}});_O.actions.setBrushSettings;var Iq=_O.reducer;function Tq(e){return(e%180+180)%180}var Dq=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Tq(i),u=o*Math.PI/180,c=Math.atan(n/r),f=u>c&&u<Math.PI-c?n/Math.sin(u):r/Math.cos(u);return Math.abs(f)},Rq={dots:[],areas:[],lines:[]},MO=lr({name:"referenceElements",initialState:Rq,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Xr(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=Xr(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=Xr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),ul=MO.actions;ul.addDot;ul.removeDot;ul.addArea;ul.removeArea;ul.addLine;ul.removeLine;var Lq=MO.reducer;function $q(e,t){return Uq(e)||Bq(e,t)||Fq(e,t)||zq()}function zq(){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 Fq(e,t){if(e){if(typeof e=="string")return HS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?HS(e,t):void 0}}function HS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Bq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function Uq(e){if(Array.isArray(e))return e}var Hq=y.createContext(void 0),Wq=e=>{var t=e.children,r=y.useState("".concat(Su("recharts"),"-clip")),n=$q(r,1),i=n[0],o=ux();if(o==null)return null;var u=o.x,c=o.y,f=o.width,h=o.height;return y.createElement(Hq.Provider,{value:i},y.createElement("defs",null,y.createElement("clipPath",{id:i},y.createElement("rect",{x:u,y:c,height:h,width:f}))),t)};function IO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function Kq(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Dq(n,r)}function Gq(e,t,r){var n=r==="width",i=e.x,o=e.y,u=e.width,c=e.height;return t===1?{start:n?i:o,end:n?i+u:o+c}:{start:n?i+u:o+c,end:n?i:o}}function zu(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function Vq(e,t){return IO(e,t+1)}function qq(e,t,r,n,i){for(var o=(n||[]).slice(),u=t.start,c=t.end,f=0,h=1,m=u,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:IO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),E=j.coordinate,A=f===0||zu(e,E,N,m,c);A||(f=0,m=u,h+=1),A&&(m=E+e*(N()/2+i),f+=h)},v;h<=o.length;)if(v=g(),v)return v.v;return[]}function Qq(e,t,r,n,i){var o=(n||[]).slice(),u=o.length;if(u===0)return[];for(var c=t.start,f=t.end,h=1;h<=u;h++){for(var m=(u-1)%h,g=c,v=!0,b=function(){var P=n[k];if(P==null)return 0;var _=k,O,T=()=>(O===void 0&&(O=r(P,_)),O),B=P.coordinate,$=k===m||zu(e,B,T,g,f);if(!$)return v=!1,1;$&&(g=B+e*(T()/2+i))},j,k=m;k<u&&(j=b(),!(j!==0&&j===1));k+=h);if(v){for(var S=[],N=m;N<u;N+=h){var E=n[N];E!=null&&S.push(E)}return S}}return[]}function WS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?WS(Object(r),!0).forEach(function(n){Yq(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 Yq(e,t,r){return(t=Xq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xq(e){var t=Zq(e,"string");return typeof t=="symbol"?t:t+""}function Zq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jq(e,t,r,n,i){for(var o=(n||[]).slice(),u=o.length,c=t.start,f=t.end,h=function(v){var b=o[v];if(b==null)return 1;var j=b,k,S=()=>(k===void 0&&(k=r(b,v)),k);if(v===u-1){var N=e*(j.coordinate+e*S()/2-f);o[v]=j=ar(ar({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else o[v]=j=ar(ar({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var E=zu(e,j.tickCoord,S,c,f);E&&(f=j.tickCoord-e*(S()/2+i),o[v]=ar(ar({},j),{},{isShow:!0}))}},m=u-1;m>=0;m--)h(m);return o}function eQ(e,t,r,n,i,o){var u=(n||[]).slice(),c=u.length,f=t.start,h=t.end;if(o){var m=n[c-1];if(m!=null){var g=r(m,c-1),v=e*(m.coordinate+e*g/2-h);if(u[c-1]=m=ar(ar({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=zu(e,m.tickCoord,()=>g,f,h);b&&(h=m.tickCoord-e*(g/2+i),u[c-1]=ar(ar({},m),{},{isShow:!0}))}}}for(var j=o?c-1:c,k=function(E){var A=u[E];if(A==null)return 1;var P=A,_,O=()=>(_===void 0&&(_=r(A,E)),_);if(E===0){var T=e*(P.coordinate-e*O()/2-f);u[E]=P=ar(ar({},P),{},{tickCoord:T<0?P.coordinate-T*e:P.coordinate})}else u[E]=P=ar(ar({},P),{},{tickCoord:P.coordinate});if(P.tickCoord!=null){var B=zu(e,P.tickCoord,O,f,h);B&&(f=P.tickCoord+e*(O()/2+i),u[E]=ar(ar({},P),{},{isShow:!0}))}},S=0;S<j;S++)k(S);return u}function cx(e,t,r){var n=e.tick,i=e.ticks,o=e.viewBox,u=e.minTickGap,c=e.orientation,f=e.interval,h=e.tickFormatter,m=e.unit,g=e.angle;if(!i||!i.length||!n)return[];if(Ae(f)||tc.isSsr){var v;return(v=Vq(i,Ae(f)?f:0))!==null&&v!==void 0?v:[]}var b=[],j=c==="top"||c==="bottom"?"width":"height",k=m&&j==="width"?pu(m,{fontSize:t,letterSpacing:r}):{width:0,height:0},S=(_,O)=>{var T=typeof h=="function"?h(_.value,O):_.value;return j==="width"?Kq(pu(T,{fontSize:t,letterSpacing:r}),k,g):pu(T,{fontSize:t,letterSpacing:r})[j]},N=i[0],E=i[1],A=i.length>=2&&N!=null&&E!=null?Yr(E.coordinate-N.coordinate):1,P=Gq(o,A,j);return f==="equidistantPreserveStart"?qq(A,P,S,i,u):f==="equidistantPreserveEnd"?Qq(A,P,S,i,u):(f==="preserveStart"||f==="preserveStartEnd"?b=eQ(A,P,S,i,u,f==="preserveStartEnd"):b=Jq(A,P,S,i,u),b.filter(_=>_.isShow))}var tQ=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,u=o===void 0?0:o,c=e.tickMargin,f=c===void 0?0:c,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var m=r?r.getBoundingClientRect().width:0,g=u+f,v=h+g+m+(r?i:0);return Math.round(v)}return 0},rQ={xAxis:{},yAxis:{}},TO=lr({name:"renderedTicks",initialState:rQ,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),DO=TO.actions,nQ=DO.setRenderedTicks,iQ=DO.removeRenderedTicks,aQ=TO.reducer,oQ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function KS(e,t){return cQ(e)||uQ(e,t)||lQ(e,t)||sQ()}function sQ(){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 lQ(e,t){if(e){if(typeof e=="string")return GS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}function GS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function uQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function cQ(e){if(Array.isArray(e))return e}function dQ(e,t){if(e==null)return{};var r,n,i=fQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function wo(){return wo=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},wo.apply(null,arguments)}function VS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yt(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){hQ(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 hQ(e,t,r){return(t=mQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mQ(e){var t=pQ(e,"string");return typeof t=="symbol"?t:t+""}function pQ(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 mi={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:fr.axis};function gQ(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=e.orientation,u=e.mirror,c=e.axisLine,f=e.otherSvgProps;if(!c)return null;var h=yt(yt(yt({},f),xn(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!u||o==="bottom"&&u);h=yt(yt({},h),{},{x1:t,y1:r+m*i,x2:t+n,y2:r+m*i})}else{var g=+(o==="left"&&!u||o==="right"&&u);h=yt(yt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+i})}return y.createElement("line",wo({},h,{className:rt("recharts-cartesian-axis-line",So(c,"className"))}))}function vQ(e,t,r,n,i,o,u,c,f){var h,m,g,v,b,j,k=c?-1:1,S=e.tickSize||u,N=Ae(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=m=e.coordinate,v=r+ +!c*i,g=v-k*S,j=g-k*f,b=N;break;case"left":g=v=e.coordinate,m=t+ +!c*n,h=m-k*S,b=h-k*f,j=N;break;case"right":g=v=e.coordinate,m=t+ +c*n,h=m+k*S,b=h+k*f,j=N;break;default:h=m=e.coordinate,v=r+ +c*i,g=v+k*S,j=g+k*f,b=N;break}return{line:{x1:h,y1:g,x2:m,y2:v},tick:{x:b,y:j}}}function yQ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function xQ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function bQ(e){var t=e.option,r=e.tickProps,n=e.value,i,o=rt(r.className,"recharts-cartesian-axis-tick-value");if(y.isValidElement(t))i=y.cloneElement(t,yt(yt({},r),{},{className:o}));else if(typeof t=="function")i=t(yt(yt({},r),{},{className:o}));else{var u="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(u=rt(u,mV(t))),i=y.createElement(ax,wo({},r,{className:u}),n)}return i}function wQ(e){var t=e.ticks,r=e.axisType,n=e.axisId,i=Nt();return y.useEffect(()=>{if(n==null||r==null)return Zs;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return i(nQ({ticks:o,axisId:n,axisType:r})),()=>{i(iQ({axisId:n,axisType:r}))}},[i,t,n,r]),null}var kQ=y.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,u=e.stroke,c=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,g=e.orientation,v=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,E=e.tickMargin,A=e.fontSize,P=e.letterSpacing,_=e.getTicksConfig,O=e.events,T=e.axisType,B=e.axisId,$=cx(yt(yt({},_),{},{ticks:n}),A,P),z=xn(_),Q=bh(i),U=mO(z.textAnchor)?z.textAnchor:yQ(g,v),ve=xQ(g,v),ue={};typeof o=="object"&&(ue=o);var pe=yt(yt({},z),{},{fill:"none"},ue),oe=$.map(ne=>yt({entry:ne},vQ(ne,b,j,k,S,g,N,v,E))),se=oe.map(ne=>{var te=ne.entry,I=ne.line;return y.createElement(tn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(te.value,"-").concat(te.coordinate,"-").concat(te.tickCoord)},o&&y.createElement("line",wo({},pe,I,{className:rt("recharts-cartesian-axis-tick-line",So(o,"className"))})))}),X=oe.map((ne,te)=>{var I,M,H=ne.entry,ie=ne.tick,J=yt(yt(yt(yt({verticalAnchor:ve},z),{},{textAnchor:U,stroke:"none",fill:u},ie),{},{index:te,payload:H,visibleTicksCount:$.length,tickFormatter:c,padding:h},m),{},{angle:(I=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:z.angle)!==null&&I!==void 0?I:0}),Z=yt(yt({},J),Q);return y.createElement(tn,wo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},EL(O,H,te)),i&&y.createElement(bQ,{option:i,tickProps:Z,value:"".concat(typeof c=="function"?c(H.value,te):H.value).concat(f||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(T,"-ticks")},y.createElement(wQ,{ticks:$,axisId:B,axisType:T}),X.length>0&&y.createElement(Ci,{zIndex:fr.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(T,"-tick-labels"),ref:t},X)),se.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(T,"-tick-lines")},se))}),jQ=y.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,u=e.hide,c=e.ticks,f=e.axisType,h=e.axisId,m=dQ(e,oQ),g=y.useState(""),v=KS(g,2),b=v[0],j=v[1],k=y.useState(""),S=KS(k,2),N=S[0],E=S[1],A=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return tQ({ticks:A.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var P=y.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");A.current=O;var T=O[0];if(T){var B=window.getComputedStyle(T),$=B.fontSize,z=B.letterSpacing;($!==b||z!==N)&&(j($),E(z))}}},[b,N]);return u||n!=null&&n<=0||i!=null&&i<=0?null:y.createElement(Ci,{zIndex:e.zIndex},y.createElement(tn,{className:rt("recharts-cartesian-axis",o)},y.createElement(gQ,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:xn(e)}),y.createElement(kQ,{ref:P,axisType:f,events:m,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),y.createElement(VG,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(nV,{label:e.label,labelRef:e.labelRef}),e.children)))}),dx=y.forwardRef((e,t)=>{var r=nn(e,mi);return y.createElement(jQ,wo({},r,{ref:t}))});dx.displayName="CartesianAxis";var SQ=["x1","y1","x2","y2","key"],NQ=["offset"],EQ=["xAxisId","yAxisId"],AQ=["xAxisId","yAxisId"];function qS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sr(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){CQ(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 CQ(e,t,r){return(t=PQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PQ(e){var t=OQ(e,"string");return typeof t=="symbol"?t:t+""}function OQ(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){if(e==null)return{};var r,n,i=_Q(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)&&(i[r]=e[r])}return i}function _Q(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 MQ=e=>{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,u=e.height,c=e.ry;return y.createElement("rect",{x:n,y:i,ry:c,width:o,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function RO(e){var t=e.option,r=e.lineItemProps,n;if(y.isValidElement(t))n=y.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,u=r.y1,c=r.x2,f=r.y2,h=r.key,m=rh(r,SQ),g=(i=xn(m))!==null&&i!==void 0?i:{};g.offset;var v=rh(g,NQ);n=y.createElement("line",Xa({},v,{x1:o,y1:u,x2:c,y2:f,fill:"none",key:h}))}return n}function IQ(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=rh(e,EQ),c=o.map((f,h)=>{var m=sr(sr({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return y.createElement(RO,{key:"line-".concat(h),option:i,lineItemProps:m})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function TQ(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var u=rh(e,AQ),c=o.map((f,h)=>{var m=sr(sr({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return y.createElement(RO,{option:i,lineItemProps:m,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function DQ(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,u=e.height,c=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||c==null)return null;var m=c.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?i+u-v:j-v;if(S<=0)return null;var N=b%t.length;return y.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:S,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function RQ(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,u=e.y,c=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var g=m.map((v,b)=>{var j=m[b+1],k=j==null,S=k?o+c-v:j-v;if(S<=0)return null;var N=b%n.length;return y.createElement("rect",{key:"react-".concat(b),x:v,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var LQ=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return gA(cx(sr(sr(sr({},mi),r),{},{ticks:vA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},$Q=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return gA(cx(sr(sr(sr({},mi),r),{},{ticks:vA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},zQ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:fr.grid};function LO(e){var t=NA(),r=EA(),n=SA(),i=sr(sr({},nn(e,zQ)),{},{x:Ae(e.x)?e.x:n.left,y:Ae(e.y)?e.y:n.top,width:Ae(e.width)?e.width:n.width,height:Ae(e.height)?e.height:n.height}),o=i.xAxisId,u=i.yAxisId,c=i.x,f=i.y,h=i.width,m=i.height,g=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,j=Ar(),k=Me($=>Y2($,"xAxis",o,j)),S=Me($=>Y2($,"yAxis",u,j));if(!Un(h)||!Un(m)||!Ae(c)||!Ae(f))return null;var N=i.verticalCoordinatesGenerator||LQ,E=i.horizontalCoordinatesGenerator||$Q,A=i.horizontalPoints,P=i.verticalPoints;if((!A||!A.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:S?sr(sr({},S),{},{ticks:_?v:S.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:g);Cf(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(A=O)}if((!P||!P.length)&&typeof N=="function"){var T=b&&b.length,B=N({xAxis:k?sr(sr({},k),{},{ticks:T?b:k.ticks}):void 0,width:t??h,height:r??m,offset:n},T?!0:g);Cf(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(P=B)}return y.createElement(Ci,{zIndex:i.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(MQ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),y.createElement(DQ,Xa({},i,{horizontalPoints:A})),y.createElement(RQ,Xa({},i,{verticalPoints:P})),y.createElement(IQ,Xa({},i,{offset:n,horizontalPoints:A,xAxis:k,yAxis:S})),y.createElement(TQ,Xa({},i,{offset:n,verticalPoints:P,xAxis:k,yAxis:S}))))}LO.displayName="CartesianGrid";var FQ={},$O=lr({name:"errorBars",initialState:FQ,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===i.dataKey&&u.direction===i.direction?o:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),fx=$O.actions;fx.addErrorBar;fx.replaceErrorBar;fx.removeErrorBar;var BQ=$O.reducer;function zO(e,t){var r,n,i=Me(h=>Ni(h,e)),o=Me(h=>Ei(h,t)),u=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Ct.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:Pt.allowDataOverflow,f=u||c;return{needClip:f,needClipX:u,needClipY:c}}function UQ(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=ux(),o=zO(t,r),u=o.needClipX,c=o.needClipY,f=o.needClip,h=Me(A=>jP(A,t,!1)),m=Me(A=>SP(A,r,!1));if(!f||!i)return null;var g=i.x,v=i.y,b=i.width,j=i.height,k=u&&h?Math.min(h[0],h[1]):g-b/2,S=c&&m?Math.min(m[0],m[1]):v-j/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,E=c&&m?Math.abs(m[1]-m[0]):j*2;return y.createElement("clipPath",{id:"clipPath-".concat(n)},y.createElement("rect",{x:k,y:S,width:N,height:E}))}function HQ(e){var t=bh(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,u=Number(i),c=Number(o);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(c)||c<0)&&(c=n),{r:u,strokeWidth:c}}return{r,strokeWidth:n}}function hx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:PO}function mx(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:PO}var FO=(e,t,r)=>MP(e,"xAxis",hx(e,t),r),BO=(e,t,r)=>_P(e,"xAxis",hx(e,t),r),UO=(e,t,r)=>MP(e,"yAxis",mx(e,t),r),HO=(e,t,r)=>_P(e,"yAxis",mx(e,t),r),WQ=q([ft,FO,UO,BO,HO],(e,t,r,n,i)=>Gn(e,"xAxis")?Af(t,n,!1):Af(r,i,!1)),KQ=(e,t)=>t,WO=q([XC,KQ],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),KO=e=>{var t=ft(e),r=Gn(t,"xAxis");return r?"yAxis":"xAxis"},GQ=(e,t)=>{var r=KO(e);return r==="yAxis"?mx(e,t):hx(e,t)},VQ=(e,t,r)=>sP(e,KO(e),GQ(e,t),r),qQ=q([WO,VQ],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=my(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=o==null?void 0:o.find(c=>c.key===i);if(u!=null)return u.map(c=>[c[0],c[1]])}}}),QQ=q([ft,FO,UO,BO,HO,qQ,xB,WQ,WO,RB],(e,t,r,n,i,o,u,c,f,h)=>{var m=u.chartData,g=u.dataStartIndex,v=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||c==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=m==null?void 0:m.slice(g,v+1),j!=null)return wY({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:g,areaSettings:f,stackedData:o,displayedData:j,chartBaseValue:h,bandSize:c})}}),YQ=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],XQ=["id","baseLine"];function gu(){return gu=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},gu.apply(null,arguments)}function QS(e,t){if(e==null)return{};var r,n,i=ZQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ZQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function JQ(e){var t,r,n=e.alpha,i=e.baseLine,o=e.points,u=e.strokeWidth,c=(t=o[0])===null||t===void 0?void 0:t.x,f=(r=o[o.length-1])===null||r===void 0?void 0:r.x;if(!We(c)||!We(f))return null;var h=n*Math.abs(c-f),m=Math.max(...o.map(g=>g.y||0));return Ae(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(g=>g.y||0),m)),Ae(m)?y.createElement("rect",{x:c<f?c:c-h,y:0,width:h,height:Math.floor(m+(u?parseInt("".concat(u),10):1))}):null}function eY(e){var t,r,n=e.alpha,i=e.baseLine,o=e.points,u=e.strokeWidth,c=(t=o[0])===null||t===void 0?void 0:t.y,f=(r=o[o.length-1])===null||r===void 0?void 0:r.y;if(!We(c)||!We(f))return null;var h=n*Math.abs(c-f),m=Math.max(...o.map(g=>g.x||0));return Ae(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(g=>g.x||0),m)),Ae(m)?y.createElement("rect",{x:0,y:c<f?c:c-h,width:m+(u?parseInt("".concat(u),10):1),height:Math.floor(h)}):null}function tY(e){var t=e.alpha,r=e.layout,n=e.points,i=e.baseLine,o=e.strokeWidth;return r==="vertical"?y.createElement(eY,{alpha:t,points:n,baseLine:i,strokeWidth:o}):y.createElement(JQ,{alpha:t,points:n,baseLine:i,strokeWidth:o})}function rY(e){var t=e.animationElapsedTime,r=t===void 0?1:t,n=e.isAnimating,i=n===void 0?!1:n,o=e.isEntrance,u=o===void 0?!1:o,c=e.layout,f=e.isRange,h=e.stroke,m=e.connectNulls,g=QS(e,YQ),v=c==="vertical"?"vertical":"horizontal",b=m??!1,j=AO(),k=g.id,S=g.baseLine,N=QS(g,XQ),E=xn(N),A=y.createElement(Jd,gu({},g,{id:k,baseLine:S,connectNulls:b,stroke:"none",className:"recharts-area-area",layout:v})),P=h!=="none"&&y.createElement(Jd,gu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:g.points})),_=h!=="none"&&f&&Array.isArray(S)&&y.createElement(Jd,gu({},E,{className:"recharts-area-curve",layout:v,type:g.type,connectNulls:b,fill:"none",stroke:h,points:S}));if(u&&(i||r<1)){var O;return y.createElement(tn,null,y.createElement("defs",null,y.createElement("clipPath",{id:j},y.createElement(tY,{alpha:r,points:(O=g.points)!==null&&O!==void 0?O:[],baseLine:S,layout:v,strokeWidth:g.strokeWidth}))),y.createElement(tn,{clipPath:"url(#".concat(j,")")},A,P,_))}return y.createElement(y.Fragment,null,A,P,_)}var nY=["id"],iY=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function nh(){return nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nh.apply(null,arguments)}function GO(e,t){if(e==null)return{};var r,n,i=aY(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)&&(i[r]=e[r])}return i}function aY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function YS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?YS(Object(r),!0).forEach(function(n){oY(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 oY(e,t,r){return(t=sY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sY(e){var t=lY(e,"string");return typeof t=="symbol"?t:t+""}function lY(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 uY=(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:ui(r.prev.x,r.next.x,t),y:ui(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),VO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:sx,animationInterpolateFn:uY,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:rY,xAxisId:0,yAxisId:0,zIndex:fr.area};function ih(e,t){return e&&e!=="none"?e:t}var cY=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:o,color:ih(n,i),value:yA(r,t),payload:e}]},dY=y.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,u=e.name,c=e.hide,f=e.unit,h=e.tooltipType,m=e.id,g={dataDefinedOnItem:r,getPosition:Zs,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:yA(u,t),hide:c,type:h,color:ih(n,o),unit:f,graphicalItemId:m}};return y.createElement(jV,{tooltipEntrySettings:g})});function fY(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,u=n.dataKey,c=xn(n);return y.createElement(fq,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:c,needClip:i,clipPathId:t})}function hY(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var u,c,f={x:(u=o.x)!==null&&u!==void 0?u:0,y:(c=o.y)!==null&&c!==void 0?c: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 y.createElement(lV,{value:t?i:void 0},r)}function mY(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,u=e.animationElapsedTime,c=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,g=o.stroke,v=o.connectNulls,b=o.isRange,j=o.shape,k=o.id,S=GO(o,nY),N=en(S),E=Gs(Gs({},N),{},{id:k,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:c,isEntrance:f});return y.createElement(y.Fragment,null,(t==null?void 0:t.length)>1&&y.createElement(tn,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},y.createElement(kV,{option:j,DefaultShape:VO.shape,shapeProps:E})),y.createElement(fY,{points:t,props:S,clipPathId:i}))}function pY(e,t,r){if(Ae(e)){var n=Ae(t)?t:void 0;return ui(n,e,r)}if(Yt(e)||Fn(e)){var i=Ae(t)?t:void 0;return ui(i,0,r)}return e}function gY(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,u=n.points,c=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,g=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,j=y.useMemo(()=>({points:u,baseLine:c}),[u,c]),k=EO(j,o),S=ey(),N=FV(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,A=N.handleAnimationStart,P=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var O;return Array.isArray(c)&&Array.isArray(_)?O=m0(_,c,v):Array.isArray(c)?O=m0(null,c,v):O=null,y.createElement(BV,{animationInput:j,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:i,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:g,onAnimationStart:A,onAnimationEnd:P,animationInterpolateFn:b,animationMatchBy:v,layout:S},(T,B,$)=>{var z;return B===1?z=c:Array.isArray(c)?z=b(O,B,S):z=$?c:pY(c,_,B),k.syncStepValue(z,B),y.createElement(hY,{showLabels:!E,points:u},n.children,y.createElement(mY,{points:T,baseLine:z,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:$}),y.createElement(dV,{label:n.label}))})}function vY(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=y.useRef(null),o=y.useRef();return y.createElement(gY,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class yY extends y.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,u=t.top,c=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,g=t.width,v=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=rt("recharts-area",o),N=b,E=HQ(n),A=E.r,P=E.strokeWidth,_=SO(n),O=A*2+P,T=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return y.createElement(Ci,{zIndex:k},y.createElement(tn,{className:S},f&&y.createElement("defs",null,y.createElement(UQ,{clipPathId:N,xAxisId:h,yAxisId:m}),!_&&y.createElement("clipPath",{id:"clipPath-dots-".concat(N)},y.createElement("rect",{x:c-O/2,y:u-O/2,width:g+O,height:v+O}))),y.createElement(vY,{needClip:f,clipPathId:N,props:this.props})),y.createElement(BS,{points:i,mainColor:ih(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:T}),this.props.isRange&&Array.isArray(j)&&y.createElement(BS,{points:j,mainColor:ih(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:T}))}}function xY(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,u=e.connectNulls,c=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,g=e.isAnimationActive,v=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=GO(e,iY),N=Js(),E=tO(),A=zO(j,k),P=A.needClip,_=Ar(),O=(t=Me(pe=>QQ(pe,e.id,_)))!==null&&t!==void 0?t:{},T=O.points,B=O.isRange,$=O.baseLine,z=ux();if(N!=="horizontal"&&N!=="vertical"||z==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Q=z.height,U=z.width,ve=z.x,ue=z.y;return!T||!T.length?null:y.createElement(yY,nh({},S,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:$,connectNulls:u,dot:c,fill:f,fillOpacity:h,height:Q,hide:m,layout:N,isAnimationActive:g,isRange:B,legendType:v,needClip:P,points:T,stroke:b,width:U,left:ve,top:ue,xAxisId:j,yAxisId:k}))}var bY=(e,t,r,n,i)=>{var o=r??t;if(Ae(o))return o;var u=e==="horizontal"?i:n,c=u.scale.domain();if(u.type==="number"){var f=Math.max(c[0],c[1]),h=Math.min(c[0],c[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return o==="dataMin"?c[0]:o==="dataMax"?c[1]:c[0]};function wY(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,u=e.layout,c=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,g=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=o&&o.length,S=bY(u,c,n,f,h),N=u==="horizontal",E=!1,A=m.map((_,O)=>{var T,B,$,z;if(k)z=o[g+O];else{var Q=Lt(_,i);Array.isArray(Q)?(z=Q,E=!0):z=[S,Q]}var U=(T=(B=z)===null||B===void 0?void 0:B[1])!==null&&T!==void 0?T:null,ve=U==null||k&&!r&&Lt(_,i)==null;if(N){var ue;return{x:Kk({axis:f,ticks:v,bandSize:j,entry:_,index:O}),y:ve?null:(ue=h.scale.map(U))!==null&&ue!==void 0?ue:null,value:z,payload:_}}return{x:ve?null:($=f.scale.map(U))!==null&&$!==void 0?$:null,y:Kk({axis:h,ticks:b,bandSize:j,entry:_,index:O}),value:z,payload:_}}),P;return k||E?P=A.map(_=>{var O,T=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:T!=null&&_.y!=null&&(B=h.scale.map(T))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:T!=null&&(O=f.scale.map(T))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):P=N?h.scale.map(S):f.scale.map(S),{points:A,baseLine:P??0,isRange:E}}function kY(e){var t=nn(e,VO),r=Ar();return y.createElement(YV,{id:t.id,type:"area"},n=>y.createElement(y.Fragment,null,y.createElement(SV,{legendPayload:cY(t)}),y.createElement(dY,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),y.createElement(nq,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:a6(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),y.createElement(xY,nh({},t,{id:n}))))}var qO=y.memo(kY,Uh);qO.displayName="Area";var jY=["domain","range"],SY=["domain","range"];function XS(e,t){if(e==null)return{};var r,n,i=NY(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)&&(i[r]=e[r])}return i}function NY(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ZS(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function QO(e,t){if(e===t)return!0;var r=e.domain,n=e.range,i=XS(e,jY),o=t.domain,u=t.range,c=XS(t,SY);return!ZS(r,o)||!ZS(n,u)?!1:Uh(i,c)}var EY=["type"],AY=["dangerouslySetInnerHTML","ticks","scale"],CY=["id","scale"];function p0(){return p0=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},p0.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(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function eN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JS(Object(r),!0).forEach(function(n){PY(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 PY(e,t,r){return(t=OY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OY(e){var t=_Y(e,"string");return typeof t=="symbol"?t:t+""}function _Y(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 g0(e,t){if(e==null)return{};var r,n,i=MY(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)&&(i[r]=e[r])}return i}function MY(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 IY(e){var t=Nt(),r=y.useRef(null),n=ey(),i=e.type,o=g0(e,EY),u=Gh(n,"xAxis",i),c=y.useMemo(()=>{if(u!=null)return eN(eN({},o),{},{type:u})},[o,u]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(vq(c)):r.current!==c&&t(yq({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(xq(r.current)),r.current=null)},[t]),null}var TY=e=>{var t=e.xAxisId,r=e.className,n=Me(bA),i=Ar(),o="xAxis",u=Me(v=>OP(v,o,t,i)),c=Me(v=>mH(v,t)),f=Me(v=>bH(v,t)),h=Me(v=>VC(v,t));if(c==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=g0(e,AY);h.id,h.scale;var g=g0(h,CY);return y.createElement(dx,p0({},m,g,{x:f.x,y:f.y,width:c.width,height:c.height,className:rt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:u,axisType:o,axisId:t}))},DY={allowDataOverflow:Ct.allowDataOverflow,allowDecimals:Ct.allowDecimals,allowDuplicatedCategory:Ct.allowDuplicatedCategory,angle:Ct.angle,axisLine:mi.axisLine,height:Ct.height,hide:!1,includeHidden:Ct.includeHidden,interval:Ct.interval,label:!1,minTickGap:Ct.minTickGap,mirror:Ct.mirror,orientation:Ct.orientation,padding:Ct.padding,reversed:Ct.reversed,scale:Ct.scale,tick:Ct.tick,tickCount:Ct.tickCount,tickLine:mi.tickLine,tickSize:mi.tickSize,type:Ct.type,niceTicks:Ct.niceTicks,xAxisId:0},RY=e=>{var t=nn(e,DY);return y.createElement(y.Fragment,null,y.createElement(IY,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(TY,t))},YO=y.memo(RY,QO);YO.displayName="XAxis";var LY=["type"],$Y=["dangerouslySetInnerHTML","ticks","scale"],zY=["id","scale"];function v0(){return v0=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},v0.apply(null,arguments)}function tN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tN(Object(r),!0).forEach(function(n){FY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FY(e,t,r){return(t=BY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BY(e){var t=UY(e,"string");return typeof t=="symbol"?t:t+""}function UY(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 y0(e,t){if(e==null)return{};var r,n,i=HY(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)&&(i[r]=e[r])}return i}function HY(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 WY(e){var t=Nt(),r=y.useRef(null),n=ey(),i=e.type,o=y0(e,LY),u=Gh(n,"yAxis",i),c=y.useMemo(()=>{if(u!=null)return rN(rN({},o),{},{type:u})},[u,o]);return y.useLayoutEffect(()=>{c!=null&&(r.current===null?t(bq(c)):r.current!==c&&t(wq({prev:r.current,next:c})),r.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{r.current&&(t(kq(r.current)),r.current=null)},[t]),null}function KY(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=y.useRef(null),u=y.useRef(null),c=Me(bA),f=Ar(),h=Nt(),m="yAxis",g=Me(N=>jH(N,t)),v=Me(N=>kH(N,t)),b=Me(N=>OP(N,m,t,f)),j=Me(N=>qC(N,t));if(y.useLayoutEffect(()=>{if(!(n!=="auto"||!g||ox(i)||y.isValidElement(i)||j==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(g.width)!==Math.round(E)&&h(jq({id:t,width:E}))}}},[b,g,h,i,t,n,j]),g==null||v==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=y0(e,$Y);j.id,j.scale;var S=y0(j,zY);return y.createElement(dx,v0({},k,S,{ref:o,labelRef:u,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:rt("recharts-".concat(m," ").concat(m),r),viewBox:c,ticks:b,axisType:m,axisId:t}))}var GY={allowDataOverflow:Pt.allowDataOverflow,allowDecimals:Pt.allowDecimals,allowDuplicatedCategory:Pt.allowDuplicatedCategory,angle:Pt.angle,axisLine:mi.axisLine,hide:!1,includeHidden:Pt.includeHidden,interval:Pt.interval,label:!1,minTickGap:Pt.minTickGap,mirror:Pt.mirror,orientation:Pt.orientation,padding:Pt.padding,reversed:Pt.reversed,scale:Pt.scale,tick:Pt.tick,tickCount:Pt.tickCount,tickLine:mi.tickLine,tickSize:mi.tickSize,type:Pt.type,niceTicks:Pt.niceTicks,width:Pt.width,yAxisId:0},VY=e=>{var t=nn(e,GY);return y.createElement(y.Fragment,null,y.createElement(WY,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(KY,t))},XO=y.memo(VY,QO);XO.displayName="YAxis";var qY=(e,t)=>t,px=q([qY,ft,lC,Ft,QP,Ai,KW,Zt],ZW);function QY(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function gx(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(QY(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>u(c.clientX,c.clientY)):u(e.clientX,e.clientY)}var ZO=zr("mouseClick"),JO=Yu();JO.startListening({actionCreator:ZO,effect:(e,t)=>{var r=e.payload,n=px(t.getState(),gx(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch($H({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var x0=zr("mouseMove"),e_=Yu(),ls=null,za=null,Vg=null;e_.startListening({actionCreator:x0,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,u=i.throttledEvents,c=u==="all"||(u==null?void 0:u.includes("mousemove"));ls!==null&&(cancelAnimationFrame(ls),ls=null),za!==null&&(typeof o!="number"||!c)&&(clearTimeout(za),za=null),Vg=gx(r);var f=()=>{var h=t.getState(),m=uc(h,h.tooltip.settings.shared);if(!Vg){ls=null,za=null;return}if(m==="axis"){var g=px(h,Vg);(g==null?void 0:g.activeIndex)!=null?t.dispatch(zP({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch($P())}ls=null,za=null};if(!c){f();return}o==="raf"?ls=requestAnimationFrame(f):typeof o=="number"&&za===null&&(za=setTimeout(f,o))}});function YY(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var nN={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},t_=lr({name:"rootProps",initialState:nN,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:nN.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),XY=t_.reducer,ZY=t_.actions.updateOptions,JY=null,eX={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)},r_=lr({name:"polarOptions",initialState:JY,reducers:eX});r_.actions.updatePolarOptions;var tX=r_.reducer,n_=zr("keyDown"),i_=zr("focus"),a_=zr("blur"),lm=Yu(),us=null,Fa=null,Kd=null;lm.startListening({actionCreator:n_,effect:(e,t)=>{Kd=e.payload,us!==null&&(cancelAnimationFrame(us),us=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,u=o==="all"||o.includes("keydown");Fa!==null&&(typeof i!="number"||!u)&&(clearTimeout(Fa),Fa=null);var c=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,g=Kd;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var v=mu(m,bo(f),Ws(f),Ks(f)),b=v==null?-1:Number(v),j=!Number.isFinite(b)||b<0,k=Ai(f),S=bo(f),N=uc(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var E=Zf(f,N,"hover",String(m.index));t.dispatch(Xf({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var A=CH(f),P=A==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,O;if(j){var T=Ws(f),B=Ks(f),$=_*P,z=pe=>({active:!1,index:String(pe),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,$>0){for(var Q=0;Q<S.length;Q++)if(mu(z(Q),S,T,B)!=null){O=Q;break}}else for(var U=S.length-1;U>=0;U--)if(mu(z(U),S,T,B)!=null){O=U;break}if(O<0)return}else{O=b+_*P;var ve=(k==null?void 0:k.length)||S.length;if(ve===0||O>=ve||O<0)return}var ue=Zf(f,N,"hover",String(O));t.dispatch(Xf({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{us=null,Fa=null}};if(!u){c();return}i==="raf"?us=requestAnimationFrame(c):typeof i=="number"&&Fa===null&&(c(),Kd=null,Fa=setTimeout(()=>{Kd?c():(Fa=null,us=null)},i))}});lm.startListening({actionCreator:i_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",u=uc(r,r.tooltip.settings.shared),c=Zf(r,u,"hover",String(o));t.dispatch(Xf({active:!0,activeIndex:o,activeCoordinate:c}))}}}});lm.startListening({actionCreator:a_,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(Xf({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function o_(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Vr=zr("externalEvent"),s_=Yu(),Gd=new Map,su=new Map,qg=new Map;s_.startListening({actionCreator:Vr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,u=o_(i);qg.set(o,{handler:n,reactEvent:u});var c=Gd.get(o);c!==void 0&&(cancelAnimationFrame(c),Gd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,g=h.throttledEvents,v=g,b=v==="all"||(v==null?void 0:v.includes(o)),j=su.get(o);j!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(j),su.delete(o));var k=()=>{var E=qg.get(o);try{if(!E)return;var A=E.handler,P=E.reactEvent,_=t.getState(),O={activeCoordinate:OW(_),activeDataKey:AW(_),activeIndex:Lu(_),activeLabel:ZP(_),activeTooltipIndex:Lu(_),isTooltipActive:_W(_)};A&&A(O,P)}finally{Gd.delete(o),su.delete(o),qg.delete(o)}};if(!b){k();return}if(m==="raf"){var S=requestAnimationFrame(k);Gd.set(o,S)}else if(typeof m=="number"){if(!su.has(o)){k();var N=setTimeout(k,m);su.set(o,N)}}else k()}}});var rX=q([sl],e=>e.tooltipItemPayloads),nX=q([rX,(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 i=n.getPosition;if(i!=null)return i(t)}}}),l_=zr("touchMove"),u_=Yu(),Ba=null,Yi=null,iN=null,lu=null;u_.startListening({actionCreator:l_,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){lu=o_(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,u=i.throttledEvents,c=u==="all"||u.includes("touchmove");Ba!==null&&(cancelAnimationFrame(Ba),Ba=null),Yi!==null&&(typeof o!="number"||!c)&&(clearTimeout(Yi),Yi=null),iN=Array.from(r.touches).map(h=>gx({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(lu!=null){var h=t.getState(),m=uc(h,h.tooltip.settings.shared);if(m==="axis"){var g,v=(g=iN)===null||g===void 0?void 0:g[0];if(v==null){Ba=null,Yi=null;return}var b=px(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(zP({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var j,k=lu.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(f6),E=(j=S.getAttribute(h6))!==null&&j!==void 0?j:void 0,A=Ao(h).find(O=>O.id===E);if(N==null||A==null||E==null)return;var P=A.dataKey,_=nX(h,N,E);t.dispatch(LH({activeDataKey:P,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Ba=null,Yi=null}};if(!c){f();return}o==="raf"?Ba=requestAnimationFrame(f):typeof o=="number"&&Yi===null&&(f(),lu=null,Yi=setTimeout(()=>{lu?f():(Yi=null,Ba=null)},o))}}});var c_={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},d_=lr({name:"eventSettings",initialState:c_,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),iX=d_.actions.setEventSettings,aX=d_.reducer,oX=BE({brush:Iq,cartesianAxis:Sq,chartData:PK,errorBars:BQ,eventSettings:aX,graphicalItems:tq,layout:Yz,legend:c8,options:SK,polarAxis:hV,polarOptions:tX,referenceElements:Lq,renderedTicks:aQ,rootProps:XY,tooltip:zH,zIndex:dK}),sX=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return wz({reducer:oX,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([JO.middleware,e_.middleware,lm.middleware,s_.middleware,u_.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(rA({type:"raf"}))},devTools:{serialize:{replacer:YY},name:"recharts-".concat(r)}})};function lX(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=Ar(),o=y.useRef(null);if(i)return r;o.current==null&&(o.current=sX(t,n));var u=K0;return y.createElement(E8,{context:u,store:o.current},r)}function uX(e){var t=e.layout,r=e.margin,n=Nt(),i=Ar();return y.useEffect(()=>{i||(n(Vz(t)),n(Gz(r)))},[n,i,t,r]),null}var cX=y.memo(uX,Uh);function dX(e){var t=Nt();return y.useEffect(()=>{t(ZY(e))},[t,e]),null}var fX=e=>{var t=Nt();return y.useEffect(()=>{t(iX(e))},[t,e]),null},hX=y.memo(fX,Uh);function aN(e){var t=e.zIndex,r=e.isPanorama,n=y.useRef(null),i=Nt();return y.useLayoutEffect(()=>(n.current&&i(uK({zIndex:t,element:n.current,isPanorama:r})),()=>{i(cK({zIndex:t,isPanorama:r}))}),[i,t,r]),y.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function oN(e){var t=e.children,r=e.isPanorama,n=Me(eK);if(!n||n.length===0)return t;var i=n.filter(u=>u<0),o=n.filter(u=>u>0);return y.createElement(y.Fragment,null,i.map(u=>y.createElement(aN,{key:u,zIndex:u,isPanorama:r})),t,o.map(u=>y.createElement(aN,{key:u,zIndex:u,isPanorama:r})))}var mX=["children"];function pX(e,t){if(e==null)return{};var r,n,i=gX(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)&&(i[r]=e[r])}return i}function gX(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ah(){return ah=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ah.apply(null,arguments)}var vX={width:"100%",height:"100%",display:"block"},yX=y.forwardRef((e,t)=>{var r=NA(),n=EA(),i=RA();if(!Un(r)||!Un(n))return null;var o=e.children,u=e.otherAttributes,c=e.title,f=e.desc,h,m;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=i?0:void 0,typeof u.role=="string"?m=u.role:m=i?"application":void 0),y.createElement(aE,ah({},u,{title:c,desc:f,role:m,tabIndex:h,width:r,height:n,style:vX,ref:t}),o)}),xX=e=>{var t=e.children,r=Me(Lh);if(!r)return null;var n=r.width,i=r.height,o=r.y,u=r.x;return y.createElement(aE,{width:n,height:i,x:u,y:o},t)},sN=y.forwardRef((e,t)=>{var r=e.children,n=pX(e,mX),i=Ar();return i?y.createElement(xX,null,y.createElement(oN,{isPanorama:!0},r)):y.createElement(yX,ah({ref:t},n),y.createElement(oN,{isPanorama:!1},r))});function bX(e,t){return SX(e)||jX(e,t)||kX(e,t)||wX()}function wX(){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 kX(e,t){if(e){if(typeof e=="string")return lN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lN(e,t):void 0}}function lN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function jX(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function SX(e){if(Array.isArray(e))return e}function NX(){var e=Nt(),t=y.useState(null),r=bX(t,2),n=r[0],i=r[1],o=Me(d6);return y.useEffect(()=>{if(n!=null){var u=n.getBoundingClientRect(),c=u.width/n.offsetWidth;We(c)&&c!==o&&e(Qz(c))}},[n,e,o]),i}function uN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uN(Object(r),!0).forEach(function(n){AX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AX(e,t,r){return(t=CX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CX(e){var t=PX(e,"string");return typeof t=="symbol"?t:t+""}function PX(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 pa(){return pa=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},pa.apply(null,arguments)}function oh(e,t){return IX(e)||MX(e,t)||_X(e,t)||OX()}function OX(){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 _X(e,t){if(e){if(typeof e=="string")return cN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cN(e,t):void 0}}function cN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function MX(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,u,c=[],f=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(f=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(h)throw i}}return c}}function IX(e){if(Array.isArray(e))return e}var TX=()=>($K(),null);function sh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var DX=y.forwardRef((e,t)=>{var r,n,i=y.useRef(null),o=y.useState({containerWidth:sh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:sh((n=e.style)===null||n===void 0?void 0:n.height)}),u=oh(o,2),c=u[0],f=u[1],h=y.useCallback((g,v)=>{f(b=>{var j=Math.round(g),k=Math.round(v);return b.containerWidth===j&&b.containerHeight===k?b:{containerWidth:j,containerHeight:k}})},[]),m=y.useCallback(g=>{if(typeof t=="function"&&t(g),i.current!=null&&(i.current.disconnect(),i.current=null),g!=null&&typeof ResizeObserver<"u"){var v=g.getBoundingClientRect(),b=v.width,j=v.height;h(b,j);var k=N=>{var E=N[0];if(E!=null){var A=E.contentRect,P=A.width,_=A.height;h(P,_)}},S=new ResizeObserver(k);S.observe(g),i.current=S}},[t,h]);return y.useEffect(()=>()=>{var g=i.current;g!=null&&g.disconnect()},[h]),y.createElement(y.Fragment,null,y.createElement(Zu,{width:c.containerWidth,height:c.containerHeight}),y.createElement("div",pa({ref:m},e)))}),RX=y.forwardRef((e,t)=>{var r=e.width,n=e.height,i=y.useState({containerWidth:sh(r),containerHeight:sh(n)}),o=oh(i,2),u=o[0],c=o[1],f=y.useCallback((m,g)=>{c(v=>{var b=Math.round(m),j=Math.round(g);return v.containerWidth===b&&v.containerHeight===j?v:{containerWidth:b,containerHeight:j}})},[]),h=y.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var g=m.getBoundingClientRect(),v=g.width,b=g.height;f(v,b)}},[t,f]);return y.createElement(y.Fragment,null,y.createElement(Zu,{width:u.containerWidth,height:u.containerHeight}),y.createElement("div",pa({ref:h},e)))}),LX=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return y.createElement(y.Fragment,null,y.createElement(Zu,{width:r,height:n}),y.createElement("div",pa({ref:t},e)))}),$X=y.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?y.createElement(RX,pa({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?y.createElement(LX,pa({},e,{width:r,height:n,ref:t})):y.createElement(y.Fragment,null,y.createElement(Zu,{width:r,height:n}),y.createElement("div",pa({ref:t},e)))});function zX(e){return e?DX:$X}var FX=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,u=e.onContextMenu,c=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,g=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,E=e.responsive,A=e.dispatchTouchEvents,P=A===void 0?!0:A,_=y.useRef(null),O=Nt(),T=y.useState(null),B=oh(T,2),$=B[0],z=B[1],Q=y.useState(null),U=oh(Q,2),ve=U[0],ue=U[1],pe=NX(),oe=Z0(),se=(oe==null?void 0:oe.width)>0?oe.width:N,X=(oe==null?void 0:oe.height)>0?oe.height:i,ne=y.useCallback(_e=>{pe(_e),typeof t=="function"&&t(_e),z(_e),ue(_e),_e!=null&&(_.current=_e)},[pe,t,z,ue]),te=y.useCallback(_e=>{O(ZO(_e)),O(Vr({handler:o,reactEvent:_e}))},[O,o]),I=y.useCallback(_e=>{O(x0(_e)),O(Vr({handler:h,reactEvent:_e}))},[O,h]),M=y.useCallback(_e=>{O($P()),O(Vr({handler:m,reactEvent:_e}))},[O,m]),H=y.useCallback(_e=>{O(x0(_e)),O(Vr({handler:g,reactEvent:_e}))},[O,g]),ie=y.useCallback(()=>{O(i_())},[O]),J=y.useCallback(()=>{O(a_())},[O]),Z=y.useCallback(_e=>{O(n_(_e.key))},[O]),ae=y.useCallback(_e=>{O(Vr({handler:u,reactEvent:_e}))},[O,u]),me=y.useCallback(_e=>{O(Vr({handler:c,reactEvent:_e}))},[O,c]),re=y.useCallback(_e=>{O(Vr({handler:f,reactEvent:_e}))},[O,f]),ye=y.useCallback(_e=>{O(Vr({handler:v,reactEvent:_e}))},[O,v]),Oe=y.useCallback(_e=>{O(Vr({handler:k,reactEvent:_e}))},[O,k]),de=y.useCallback(_e=>{P&&O(l_(_e)),O(Vr({handler:j,reactEvent:_e}))},[O,P,j]),Ze=y.useCallback(_e=>{O(Vr({handler:b,reactEvent:_e}))},[O,b]),Ue=zX(E);return y.createElement(oO.Provider,{value:$},y.createElement(eL.Provider,{value:ve},y.createElement(Ue,{width:se??(S==null?void 0:S.width),height:X??(S==null?void 0:S.height),className:rt("recharts-wrapper",n),style:EX({position:"relative",cursor:"default",width:se,height:X},S),onClick:te,onContextMenu:ae,onDoubleClick:me,onFocus:ie,onBlur:J,onKeyDown:Z,onMouseDown:re,onMouseEnter:I,onMouseLeave:M,onMouseMove:H,onMouseUp:ye,onTouchEnd:Ze,onTouchMove:de,onTouchStart:Oe,ref:ne},y.createElement(TX,null),r)))}),BX=["width","height","responsive","children","className","style","compact","title","desc"];function UX(e,t){if(e==null)return{};var r,n,i=HX(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)&&(i[r]=e[r])}return i}function HX(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 WX=y.forwardRef((e,t)=>{var r=e.width,n=e.height,i=e.responsive,o=e.children,u=e.className,c=e.style,f=e.compact,h=e.title,m=e.desc,g=UX(e,BX),v=xn(g);return f?y.createElement(y.Fragment,null,y.createElement(Zu,{width:r,height:n}),y.createElement(sN,{otherAttributes:v,title:h,desc:m},o)):y.createElement(FX,{className:u,style:c,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},y.createElement(sN,{otherAttributes:v,title:h,desc:m,ref:t},y.createElement(Wq,null,o)))});function b0(){return b0=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},b0.apply(null,arguments)}function dN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dN(Object(r),!0).forEach(function(n){GX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GX(e,t,r){return(t=VX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VX(e){var t=qX(e,"string");return typeof t=="symbol"?t:t+""}function qX(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 QX={top:5,right:5,bottom:5,left:5},YX=KX({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:QX,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},c_),XX=y.forwardRef(function(t,r){var n,i=nn(t.categoricalChartProps,YX),o=t.chartName,u=t.defaultTooltipEventType,c=t.validateTooltipEventTypes,f=t.tooltipPayloadSearcher,h=t.categoricalChartProps,m={chartName:o,defaultTooltipEventType:u,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return y.createElement(lX,{preloadedState:{options:m},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},y.createElement(Mq,{chartData:h.data}),y.createElement(cX,{layout:i.layout,margin:i.margin}),y.createElement(hX,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),y.createElement(dX,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),y.createElement(WX,b0({},i,{ref:r})))}),ZX=["axis"],JX=y.forwardRef((e,t)=>y.createElement(XX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ZX,tooltipPayloadSearcher:kK,categoricalChartProps:e,ref:t}));const eZ="rgba(130,130,150,0.14)",fN="rgba(130,130,150,0.85)";function tZ(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 f_(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function rZ({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:l.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:l.jsx("div",{className:"space-y-1",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),l.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),l.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:f_(n.value,r)})]},n.dataKey))})})}function h_({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176}){const o=e.reduce((c,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),c),0),u=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(tZ(o*1.15),10);return l.jsx("div",{style:{height:i},className:"w-full",children:l.jsx(G6,{width:"100%",height:"100%",children:l.jsxs(JX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[l.jsx("defs",{children:t.map(c=>l.jsxs("linearGradient",{id:`grad-${c.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:c.color,stopOpacity:.22}),l.jsx("stop",{offset:"100%",stopColor:c.color,stopOpacity:0})]},c.key))}),l.jsx(LO,{vertical:!1,stroke:eZ}),l.jsx(YO,{dataKey:"t",hide:!0}),l.jsx(XO,{domain:[0,u],ticks:[0,u/2,u],tickFormatter:c=>f_(c,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:fN}}),l.jsx(XK,{content:l.jsx(rZ,{unit:r}),cursor:{stroke:fN,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(c=>l.jsx(qO,{type:"monotone",dataKey:c.key,name:c.label,stroke:c.color,strokeWidth:2,fill:`url(#grad-${c.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},c.key))]})})})}const nZ=[{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 m_(){var u,c,f,h;const{sys:e,hist:t}=HR(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=nZ.filter(m=>m.key!=="gpu"||r),i={cpu:(u=e==null?void 0:e.cpu)==null?void 0:u.percent,ram:(c=e==null?void 0:e.ram)==null?void 0:c.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?`${Qr(e.ram.used)}/${Qr(e.ram.total)} GB`:"",gpu:r?`${Qr(e.gpu.gtt_used)}/${Qr(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Qr(e.disk.used)}/${Qr(e.disk.total)} GB`:""};return l.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx(pi,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>l.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),l.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),l.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(i[m.key]??0),"%"]}),o[m.key]&&l.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),l.jsx(h_,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):l.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&l.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&l.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&l.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const hN=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function p_(){const{data:e}=K5(3e3),t=$R(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(uh,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&l.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[l.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&l.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[l.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",l.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),l.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),l.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:hN.map(i=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:i.label}),l.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[i.key])??0)})]},i.key))})]}),e?l.jsx(h_,{data:t,series:hN,unit:" tok/s",yMode:"auto",height:150}):l.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),l.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function iZ(){const{data:e}=xh(3e4),{data:t}=wi(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),i=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],u=i.find(m=>m.role==="hermes"),c=i.find(m=>m.role==="coder-lite")||i.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var g;return((g=m==null?void 0:m.split("/").pop())==null?void 0:g.replace(/\.gguf$/i,""))||"—"};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Basisstation"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),l.jsx(BR,{frame:"box"}),l.jsxs("button",{onClick:n,className:ee("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?l.jsx(xM,{className:"h-6 w-6 shrink-0 text-amber-400"}):l.jsx(Qt,{className:"h-6 w-6 shrink-0 text-emerald-400"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:ee("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&l.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",l.jsx(Gu,{className:"h-4 w-4"})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),l.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:pi,label:"Lucys Hirn",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)},{icon:Ds,label:"Coder (Vibe-Coding)",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)}].map(m=>l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),l.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),l.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),l.jsx("span",{className:ee("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsx(m_,{}),l.jsx(p_,{})]})]})}const aZ=e=>!!ct(e).protected;function oZ({role:e,roleRec:t,models:r,onAssign:n,onClose:i}){var f,h;const o=t&&t.role===e?t:null,u={};o==null||o.models.forEach(m=>{u[m.name]=m});const c=o?o.models.map(m=>r.find(g=>g.name===m.name)).filter(Boolean):r;return l.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${ct(e).label} konfigurieren`,children:l.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[l.jsx(lo,{role:e})," festlegen"]}),l.jsx("button",{onClick:i,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:l.jsx(gi,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",l.jsx("strong",{className:"text-foreground",children:ct(e).label}),l.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:ct(e).desc})]}),(o==null?void 0:o.recommended)&&l.jsxs("button",{onClick:()=>n(o.recommended),title:(f=u[o.recommended])==null?void 0:f.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[l.jsx(ga,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),l.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[aZ(e)?l.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):l.jsx("button",{onClick:()=>n(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:l.jsx("span",{children:"Zuweisung entfernen"})}),c.map(m=>{var k;const g=u[m.name],v=m.role===e,b=!!(g!=null&&g.recommended),j=!!g&&!g.suitable;return l.jsxs("button",{onClick:()=>n(m.name),className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":j?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[l.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[l.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(k=m.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,""),b&&l.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),l.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:g?`${g.params_b}B · ${m.quant} · ${g.reason}`:`${or(m.size_bytes)} · ${m.quant}`})]}),v&&l.jsx(Qt,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const sZ=["fast","heavy","heavy_chars"],lZ=["coder_lite","coder","coding_escalate_chars"];function uZ(){const e=Kn(),{data:t,isLoading:r}=GD(),[n,i]=y.useState(null),[o,u]=y.useState(!1),[c,f]=y.useState(""),[h,m]=y.useState(0);if(y.useEffect(()=>{t!=null&&t.policy&&!n&&i({...t.policy})},[t,n]),r||!t||!n)return l.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const g=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{i(A=>A&&{...A,[N]:E}),f("")},j=N=>b(N,t.defaults[N]);async function k(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){u(!0),f("");try{const{policy:E}=await HD(N);i({...E}),e.invalidateQueries({queryKey:Fe.routingPolicy}),e.invalidateQueries({queryKey:Fe.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{u(!1)}}}function S({k:N}){const E=g(N),A=n[N],P=n[N]===t.defaults[N];return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!P&&l.jsxs("button",{onClick:()=>j(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[l.jsx(WM,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?l.jsxs("button",{onClick:()=>b(N,!A),className:ee("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",A?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[l.jsx("span",{children:A?"An":"Aus"}),l.jsx("span",{className:ee("h-3.5 w-3.5 rounded-full transition-colors",A?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?l.jsx("input",{type:"number",value:A,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(N,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):l.jsx("input",{type:"text",value:A,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:_=>b(N,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(XM,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),l.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:c,children:c}),h>0&&l.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[l.jsx(Qt,{className:"h-3.5 w-3.5"})," gespeichert"]}),l.jsxs("button",{onClick:k,disabled:!v||o,className:ee("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?l.jsx(Qs,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),l.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",l.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",l.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx($M,{className:"h-4 w-4 text-teal-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),sZ.map(N=>l.jsx(S,{k:N},N))]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[l.jsx(kM,{className:"h-4 w-4 text-indigo-400"}),l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),l.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),lZ.map(N=>l.jsx(S,{k:N},N))]})]}),l.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:l.jsx("div",{className:"max-w-xs",children:l.jsx(S,{k:"fast_no_think"})})})]})}function cZ(){var ve,ue,pe;const e=Kn(),{data:t}=wi(4e3),{data:r}=R0(),{data:n}=jo(),{data:i}=G5(),{showAlert:o,dialogElement:u}=ba(),[c,f]=y.useState(!1),[h,m]=y.useState(!1),g=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(ve=r==null?void 0:r.groups)==null?void 0:ve.brains,j=(b==null?void 0:b.members)??[],k=oe=>g.find(se=>se.name===oe),S=oe=>{var se;return((se=oe.split("/").pop())==null?void 0:se.replace(/\.gguf$/i,""))||oe},N=j.map(k).filter(Boolean),E=1024**3,A=i==null?void 0:i.budget,P=N.reduce((oe,se)=>oe+(se.size_bytes||0),0)/E,_=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((pe=n==null?void 0:n.gpu)==null?void 0:pe.vram_total)||0,O=(A==null?void 0:A.gtt_gb)||(_?_/E:0),T=(A==null?void 0:A.warm_projected_gb)??P,B=O>0?Math.min(100,T/O*100):0,$=g.filter(oe=>!j.includes(oe.name)&&!oe.incomplete);async function z(oe){m(!0);try{await H5("brains",oe,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:Fe.groups}),e.invalidateQueries({queryKey:Fe.models}),e.invalidateQueries({queryKey:Fe.hermesBrain})}catch(se){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(se==null?void 0:se.message)||se}`)}finally{m(!1)}}function Q(oe){const se=k(oe);if(se&&ct(se.role).protected){o("Geschützt",`„${ct(se.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}z(j.filter(X=>X!==oe))}function U(oe){f(!1),z([...j,oe])}return b?l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[l.jsx(mN,{}),l.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&l.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(oe=>{const se=v.includes(oe.name),X=ct(oe.role).protected;return l.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[l.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",se?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:se?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),oe.role&&l.jsx(lo,{role:oe.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:oe.name,children:S(oe.name)}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:or(oe.size_bytes)})]}),X?l.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):l.jsx("button",{onClick:()=>Q(oe.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:l.jsx(gi,{className:"h-3.5 w-3.5"})})]},oe.name)})]}),l.jsxs("button",{onClick:()=>f(!0),disabled:h||$.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[l.jsx(hv,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),l.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + KV-Cache, berechnet aus den echten Architektur-Daten jedes Modells (Layer × KV-Köpfe × Kontext) und seiner KV-Quantisierung. So viel legt llama.cpp beim Laden wirklich für den eingestellten Kontext an — kein Aufschlag mehr.",children:[l.jsx(fa,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),l.jsxs("span",{className:"font-mono font-bold text-foreground",children:[T.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",B>=85?"bg-red-500":B>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${B}%`}})}),A&&!A.fits&&l.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[l.jsx(Er,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),l.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",A.largest_ondemand_gb," GB) wird der Speicher knapp. Das Set bleibt dabei immer geladen — wird es wirklich eng, schlägt das Laden des großen Modells fehl (es wartet dann, statt das Set zu verdrängen)."]})]}),A&&A.fits&&l.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[l.jsx(Qt,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),c&&l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:l.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[l.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),l.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:l.jsx(gi,{className:"h-4 w-4"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),l.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:$.map(oe=>l.jsxs("button",{onClick:()=>U(oe.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[l.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[oe.role&&l.jsx(lo,{role:oe.role,dense:!0,className:"shrink-0"}),l.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:S(oe.name)})]}),l.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:or(oe.size_bytes)})]},oe.name))})]})}),u]}):l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[l.jsx(mN,{}),l.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),u]})}function mN(){return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ga,{className:"h-4.5 w-4.5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function dZ(){var Ue,_e,xt,Jt;const e=Kn(),{data:t,isLoading:r,error:n}=wi(4e3),{data:i}=xh(4e3),{data:o}=G5(),{data:u}=jo(),{data:c}=R0(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:g}=ba(),v=I0(),b=G=>!!ct(G).protected,j=(t==null?void 0:t.models)??[],k=(t==null?void 0:t.running)??[],S=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:Fe.models}),e.invalidateQueries({queryKey:Fe.routing})},E=(Ue=c==null?void 0:c.groups)==null?void 0:Ue.brains,A=(E==null?void 0:E.members)??[],P=G=>A.includes(G),_=A.some(G=>k.includes(G));async function O(G){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Pe=A.includes(G)?A.filter(Ve=>Ve!==G):[...A,G];try{await H5("brains",Pe,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:Fe.groups}),N()}catch(Ve){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${Ve.message||Ve}`)}}const[T,B]=y.useState(null),[$,z]=y.useState(null),[Q,U]=y.useState(null),[ve,ue]=y.useState("grid"),[pe,oe]=y.useState("all"),se=j.filter(G=>pe==="in_use"?!!G.role||k.includes(G.name):!0);async function X(G){try{await we(`/api/models/${encodeURIComponent(G)}/load`,{method:"POST"}),N()}catch(Ne){f("Fehler",`Fehler beim Laden des Modells: ${Ne.message}`)}}async function ne(G){if(E&&_&&!P(G)){const Ne=A.filter(Pe=>k.includes(Pe)).map(Pe=>Pe.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`„${G.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Ne}) raus — Lucy verliert Hirn bzw. Augen.
|
||
|
||
Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>X(G));return}X(G)}async function te(G){const Ne=j.find(Pe=>Pe.name===G);if(Ne&&b(Ne.role)){f("Geschützt",`„${ct(Ne.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await we(`/api/models/${encodeURIComponent(G)}/unload`,{method:"POST"}),N()}catch(Pe){f("Fehler",`Fehler beim Entladen des Modells: ${Pe.message}`)}}async function I(){try{await we("/api/models/unload",{method:"POST"}),N()}catch(G){f("Fehler",`Fehler beim Entladen aller Modelle: ${G.message}`)}}async function M(G,Ne){try{const Pe=await we(`/api/models/${encodeURIComponent(Ne)}/role`,{method:"POST",body:JSON.stringify({role:G||null})});N(),Pe!=null&&Pe.warning&&f("Hirn gesetzt — Hinweis",Pe.warning)}catch(Pe){f("Fehler",`Fehler beim Zuweisen der Rolle: ${Pe.message||Pe}`)}}function H(G){B(G),z(null),we(`/api/roles/${encodeURIComponent(G)}/recommend`).then(Ne=>z(Ne)).catch(()=>{})}async function ie(G,Ne){let Pe=null;try{Pe=await we(`/api/models/${encodeURIComponent(G)}/ctx/auto`)}catch{}const Ve=Pe?`Optimal für dein Setup: ${(Pe.ctx/1024).toFixed(0)}k (${Pe.ctx}) — GTT ${Pe.gtt_gb} GB − reserviert ${Pe.reserved_gb} GB (${Pe.mode}) → ${Pe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",Ve,String(Ne||32768),async nt=>{if(nt)try{await we(`/api/models/${encodeURIComponent(G)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(nt,10)})}),N()}catch(K){f("Fehler",`Fehler beim Setzen des Kontexts: ${K.message||K}`)}},void 0,Pe?{autoValue:String(Pe.ctx),autoLabel:`Auto (${(Pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function J(G){const Ne=j.find(Pe=>Pe.name===G);if(Ne&&b(Ne.role)){f("Geschützt",`„${ct(Ne.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${G}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await we(`/api/models/${encodeURIComponent(G)}`,{method:"DELETE"}),N()}catch(Pe){f("Fehler",`Fehler beim Löschen: ${Pe.message||Pe}`)}})}async function Z(G,Ne,Pe,Ve){try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:Ne,quant:Pe,jinja:Ve})}),f("Herunterladen gestartet",`Download für '${G}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(nt){f("Fehler",`Fehler beim Starten des Upgrades: ${nt.message||nt}`)}}async function ae(G){const Ne=o==null?void 0:o.budget,Pe=Ne&&!Ne.fits?`
|
||
|
||
⚠ Speicher-Warnung: Dieses Brain (~${Ne.brain_gb} GB) bleibt immer resident (persistent). Zusammen mit dem größten on-demand-Modell (~${Ne.largest_ondemand_gb} GB) sprengt das das Budget (${Ne.gtt_gb} GB) → beim Laden von heavy/coder droht ein Überlauf. Erwäge ein kleineres Brain oder weniger Kontext.`:"";h("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${G.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Pe}`,async()=>{try{await we("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:"hermes",quant:"Q4_K_M",jinja:!0})}),f("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),N()}catch(Ve){f("Fehler",`Update fehlgeschlagen: ${Ve.message||Ve}`)}})}if(r)return l.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(S)return l.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",S,")."]});const me=j.filter(G=>k.includes(G.name)),re=me.reduce((G,Ne)=>G+(Ne.size_bytes||0),0),ye=((_e=u==null?void 0:u.gpu)==null?void 0:_e.gtt_total)||((xt=u==null?void 0:u.gpu)==null?void 0:xt.vram_total)||0,Oe=((Jt=u==null?void 0:u.gpu)==null?void 0:Jt.gtt_used)||0,de=16*1024**3,Ze=ye>2*1024**3?ye:re>de?re*1.2:de;return l.jsxs("div",{className:"space-y-8",children:[l.jsx("style",{children:`
|
||
@keyframes flow-dash {
|
||
to {
|
||
stroke-dashoffset: -20;
|
||
}
|
||
}
|
||
.svg-flow-path {
|
||
stroke-dasharray: 4 6;
|
||
animation: flow-dash 1s linear infinite;
|
||
}
|
||
`}),l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(fa,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",or(re)," Gewichte",Oe>0?` · ${or(Oe)} real belegt (inkl. KV)`:""," / ",or(Ze)]}),v&&k.length>0&&l.jsx("button",{onClick:I,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),l.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:me.length===0?l.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):me.map((G,Ne)=>{var nt;const Pe=(G.size_bytes||0)/Ze*100,Ve=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Ne%4];return l.jsxs("div",{style:{width:`${Pe}%`},className:ee("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Ve),title:`${G.name} (${or(G.size_bytes)})`,children:[l.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[G.role?`[${ct(G.role).short}] `:"",(nt=G.name.split("/").pop())==null?void 0:nt.replace(".gguf","")]}),l.jsx("span",{className:"text-[8px] font-mono opacity-80",children:or(G.size_bytes)})]},G.name)})})]}),l.jsx(cZ,{}),v&&l.jsx(uZ,{}),l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[l.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:JD.map(G=>{var Ve;const Ne=j.find(nt=>nt.role===G),Pe=Ne?k.includes(Ne.name):!1;return l.jsxs("div",{onClick:()=>H(G),className:ee("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",Pe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Ne?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(lo,{role:G}),Pe&&l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),l.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Ne==null?void 0:Ne.name,children:Ne?(Ve=Ne.name.split("/").pop())==null?void 0:Ve.replace(/\.gguf$/i,""):"nicht zugewiesen"}),l.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},G)})})]}),(o==null?void 0:o.current)&&l.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Jr,{className:"h-4.5 w-4.5 text-indigo-400"}),l.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&l.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",o.current.version]})]}),l.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:o.current.quant||"GGUF"}),l.jsx("span",{children:"•"}),l.jsx("span",{children:or(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?l.jsxs("button",{onClick:()=>ae(o.recommended.repo),className:ee("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",o.budget&&!o.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[l.jsx(Rs,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):l.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[l.jsx(Qt,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&l.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",l.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&l.jsxs("div",{className:ee("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[l.jsx(fa,{className:"h-3 w-3 shrink-0 mt-0.5"}),l.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[l.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",se.length," von ",j.length,")"]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>oe("all"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),l.jsx("button",{onClick:()=>oe("in_use"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),l.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[l.jsx("button",{onClick:()=>ue("grid"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ve==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),l.jsx("button",{onClick:()=>ue("list"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ve==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ve==="grid"?l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:se.length===0?l.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(G=>{const Ne=k.includes(G.name),Pe=i==null?void 0:i.model_list.find(nt=>nt.role===G.role),Ve=ff(G.name);return l.jsxs("div",{className:ee("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",Ne?"border-primary/45 shadow-primary/5":G.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"flex items-start justify-between gap-3",children:l.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[l.jsx("div",{className:ee("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ve.color),title:Ve.name,children:Ve.initial}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:G.name,children:G.name.split("/").pop()}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[l.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:G.quant||"GGUF"}),Ne&&l.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[l.jsx(uh,{className:"h-3 w-3 animate-pulse"})," Warm"]}),G.role&&l.jsx(lo,{role:G.role,dense:!0}),b(G.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(G.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&G.prompt_cache&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),v&&(G.spec_active?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${G.spec_draft_model})`,children:"SPEC"}):G.spec_draft_model?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${G.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&G.parallel_slots>1&&l.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${G.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",G.parallel_slots]}),G.incomplete&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),l.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:l.jsx(jv,{caps:G.capabilities})})]}),l.jsxs("div",{className:"space-y-3 pt-1",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(fa,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),l.jsx("div",{className:"text-foreground font-semibold",children:or(G.size_bytes)})]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[l.jsx(QN,{className:"h-3.5 w-3.5 text-primary/80"}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),l.jsx("div",{className:"text-foreground font-semibold",children:kv(G.ctx)})]})]})]}),Pe&&l.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[l.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),l.jsxs("span",{children:["Upgrade verfügbar: ",Pe.repo.split("/").pop()]})]}),l.jsxs("button",{onClick:()=>Z(Pe.repo,G.role,G.quant||"Q4_K_M",G.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[l.jsx(Rs,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const nt=b(G.role),K=Ne&&nt,Le=G.incomplete&&!Ne||K;return l.jsx("button",{onClick:()=>Ne?te(G.name):ne(G.name),disabled:Le,title:K?`„${ct(G.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Le?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ne?"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:K?"🔒 geladen":Ne?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ie(G.name,G.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&l.jsx("button",{onClick:()=>O(G.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(G.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(G.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(G),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",G.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":G.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[l.jsx(ga,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>J(G.name),disabled:b(G.role),className:ee("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(G.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(G.role)?`„${ct(G.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(uf,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},G.name)})}):l.jsx("div",{className:"space-y-2",children:se.length===0?l.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):se.map(G=>{const Ne=k.includes(G.name),Pe=ff(G.name);return l.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",Ne?"border-primary/45":G.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsx("div",{className:ee("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Pe.color),title:Pe.name,children:Pe.initial}),l.jsxs("div",{className:"min-w-0 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:G.name,children:G.name.split("/").pop()}),G.role&&l.jsx(lo,{role:G.role,dense:!0,className:"shrink-0"}),b(G.role)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&P(G.name)&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&G.prompt_cache&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),v&&(G.spec_active?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${G.spec_draft_model})`,children:"SPEC"}):G.spec_draft_model?l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${G.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&G.parallel_slots>1&&l.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${G.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",G.parallel_slots]}),G.incomplete&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),Ne&&l.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),l.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[l.jsxs("span",{children:["Größe: ",or(G.size_bytes)]}),l.jsx("span",{children:"•"}),l.jsxs("span",{children:["Kontext: ",kv(G.ctx)]}),l.jsx("span",{children:"•"}),l.jsx("span",{className:"font-mono text-[9px]",children:G.quant||"GGUF"})]})]})]}),l.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[l.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:l.jsx(jv,{caps:G.capabilities})}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const Ve=b(G.role),nt=Ne&&Ve,K=G.incomplete&&!Ne||nt;return l.jsx("button",{onClick:()=>Ne?te(G.name):ne(G.name),disabled:K,title:nt?`„${ct(G.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",K?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ne?"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:nt?"🔒 geladen":Ne?"Entladen":"Laden"})})(),v&&l.jsx("button",{onClick:()=>ie(G.name,G.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&l.jsx("button",{onClick:()=>O(G.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",P(G.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:P(G.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&l.jsxs("button",{onClick:()=>U(G),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",G.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":G.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[l.jsx(ga,{className:"h-3 w-3"})," Spec"]}),l.jsx("button",{onClick:()=>J(G.name),disabled:b(G.role),className:ee("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(G.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(G.role)?`„${ct(G.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:l.jsx(uf,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},G.name)})})]}),T&&l.jsx(oZ,{role:T,roleRec:$,models:j,onAssign:G=>{M(T,G),B(null)},onClose:()=>B(null)}),Q&&l.jsx(Q5,{model:Q,onClose:()=>U(null),onChanged:N}),g]})}function Qg({icon:e,title:t,sub:r,onClick:n}){return l.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[l.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm text-foreground",children:t}),l.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),l.jsx(Gu,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function fZ(){const[e,t]=y.useState(null);return e?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[l.jsx(zN,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?l.jsx(dZ,{}):l.jsx(Z5,{})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Maschinenraum"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),l.jsx(U5,{})]}),l.jsx(Qg,{icon:pi,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),l.jsx(Qg,{icon:ZN,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),l.jsx(Qg,{icon:Jr,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const hZ=[{id:"start",label:"Start",icon:uh},{id:"vibe",label:"Vibe-Coding",icon:Ds},{id:"konstitution",label:"Konstitution",icon:hM},{id:"maschinenraum",label:"Maschinenraum",icon:Vu}];function mZ(){const[e,t]=y.useState("start"),[r,n]=y.useState(!1),[i,o]=y.useState("maintenance"),{data:u}=D0();y.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const c=u&&u.engine_reachable&&(u.brain?u.brain.ready:!0);return l.jsxs("div",{className:"flex h-full relative",children:[l.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:l.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),l.jsx(J5,{open:r,onClose:()=>n(!1),defaultTab:i}),l.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:hZ.map(f=>l.jsxs("button",{onClick:()=>t(f.id),className:ee("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[l.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),l.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full",c?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c?"Box läuft":"prüfen"]}),l.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(zN,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),l.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&l.jsx(iZ,{}),e==="vibe"&&l.jsx(Y5,{}),e==="konstitution"&&l.jsx(X5,{}),e==="maschinenraum"&&l.jsx(fZ,{})]})]})}const pZ={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},gZ={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function ni({icon:e,title:t,value:r,unit:n,tone:i="muted",hint:o,onClick:u}){return l.jsxs("button",{onClick:u,className:ee("group relative flex flex-col items-start rounded-2xl border border-border/60 bg-card/45 p-5 text-left shadow-lg shadow-black/15 backdrop-blur-md transition-all duration-200 cursor-pointer hover:bg-card/70 hover:shadow-xl",gZ[i]),children:[l.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[l.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:l.jsx(e,{className:"h-5 w-5"})}),l.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",pZ[i]),title:o})]}),l.jsxs("div",{className:"flex items-baseline gap-1.5",children:[l.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),l.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[l.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),l.jsx(Gu,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&l.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}const Vs=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],Za=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function vZ(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function w0(e){return Vs.reduce((t,r)=>t+(e[r.key]??0),0)}function yZ(e){let t=null;for(const r of Vs){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function xZ({t:e,scale:t}){const r=Vs.map(n=>`${n.label} ${Za(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${Za(e.mem0_ms)})`:"");return l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:vZ(e.ts)}),l.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[l.jsx("div",{className:"absolute inset-0 flex",children:Vs.map(n=>{const i=e[n.key];return!i||i<=0?null:l.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&l.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),l.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":Za(w0(e))})]})}function bZ(){const{data:e}=WD(12),t=e??[],r=Math.max(1,...t.map(o=>w0(o))),n=t[0],i=n?yZ(n):null;return l.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[l.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(KN,{className:"h-4.5 w-4.5 text-primary"}),l.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),l.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?l.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[l.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":Za(w0(n))}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&l.jsxs(l.Fragment,{children:[" · Täter: ",l.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",Za(i.ms)]})]})]}):l.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&l.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[Vs.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${Za(n[o.key])}`).join(" · "),n.mem0_ms!=null&&l.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",Za(n.mem0_ms)]})]})]}),l.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Vs.map(o=>l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),l.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?l.jsx("div",{className:"space-y-1.5",children:t.map(o=>l.jsx(xZ,{t:o,scale:r},o.id))}):l.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),l.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const rf=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function wZ({onNavigate:e}){var _,O;const{data:t}=wi(4e3),{data:r}=W5(4e3),{data:n}=xh(8e3),{data:i}=bv(),{data:o}=yh(),{data:u}=V5(),c=rE(),{showAlert:f,dialogElement:h}=ba(),m=Kn(),[g,v]=y.useState({});async function b(T,B){v($=>({...$,[T]:!0}));try{if(B.kind==="loadModel")await we(`/api/models/${encodeURIComponent(B.model)}/load`,{method:"POST"});else{const $=await we("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:B.service})});$.ok||f("Reparatur nicht ganz geklappt",($.err||"Unbekannter Fehler")+(B.needsSudo?`
|
||
|
||
Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}m.invalidateQueries({queryKey:Fe.health}),m.invalidateQueries({queryKey:Fe.services}),m.invalidateQueries({queryKey:Fe.models})}catch($){f("Reparatur fehlgeschlagen",String(($==null?void 0:$.message)||$))}finally{v($=>({...$,[T]:!1}))}}const j=((_=t==null?void 0:t.running)==null?void 0:_.length)??0,k=(r==null?void 0:r.services.filter(T=>T.ok).length)??0,S=(r==null?void 0:r.services.length)??0,N=S-k,E=(i==null?void 0:i.length)??0,A=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((O=n==null?void 0:n.components)==null?void 0:O.filter(T=>T.update===!0).length)??0),P=(u==null?void 0:u.gateway.ok)&&(u==null?void 0:u.memory.ok);return l.jsxs("div",{className:"space-y-7",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),l.jsx(kZ,{verdict:c.verdict,memory:c.memory}),l.jsx(jZ,{problems:c.problems,pendingCount:A,busy:g,onRepair:b}),l.jsxs("section",{children:[l.jsx(nf,{children:"Bereiche"}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[l.jsx(ni,{icon:sf,title:"Modelle",value:j,unit:"warm",tone:j>0?"ok":"muted",hint:"Speicher, laden & Rollen",onClick:()=>e("models")}),l.jsx(ni,{icon:xa,title:"Gedächtnis",value:i?E:"…",unit:"Notizen",tone:i?"ok":"loading",hint:"Lucys geteiltes Wissen",onClick:()=>e("memory")}),l.jsx(ni,{icon:fh,title:"Dienste",value:r?`${k}/${S}`:"…",unit:"laufen",tone:r?N>0?"warn":"ok":"loading",hint:"Status & Neustart",onClick:()=>rf("maintenance")}),l.jsx(ni,{icon:XN,title:"Updates",value:n?A>0?A:"0":"…",unit:A>0?"bereit":"aktuell",tone:n?A>0?"warn":"ok":"loading",hint:"Prüfen & einspielen",onClick:()=>rf("maintenance")}),l.jsx(ni,{icon:wu,title:"Verbinden",value:"Zed",unit:P?"· bereit":"",tone:u?P?"ok":"warn":"loading",hint:"IDE- & Agent-Configs",onClick:()=>e("connect")}),l.jsx(ni,{icon:KM,title:"Logs",value:r?N:"…",unit:"Fehler",tone:r?N>0?"alert":"ok":"loading",hint:"Verlauf & Diagnose",onClick:()=>rf("logs")})]})]}),l.jsxs("section",{children:[l.jsx(nf,{children:"Leistung"}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(m_,{}),l.jsx(p_,{})]}),l.jsx("div",{className:"mt-4",children:l.jsx(bZ,{})})]}),l.jsxs("section",{children:[l.jsx(nf,{children:"Mehr"}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[l.jsx(ni,{icon:Jr,title:"Hermes",value:o?o.gateway_reachable?"bereit":"offline":"…",tone:o?o.gateway_reachable?"ok":"alert":"loading",hint:"Agent-Status & Verdrahtung",onClick:()=>e("agent")}),l.jsx(ni,{icon:lf,title:"Terminal",value:"öffnen",tone:"muted",hint:"Interaktives Agent-Terminal",onClick:()=>e("terminal")}),l.jsx(ni,{icon:lf,title:"Konsole",value:o?o.box_console_reachable?"bereit":"offline":"…",tone:o?o.box_console_reachable?"ok":"warn":"loading",hint:"Direkte Box-Shell (SSH)",onClick:()=>e("konsole")})]})]}),h]})}function nf({children:e}){return l.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function kZ({verdict:e,memory:t}){const r={loading:{ring:"border-border/60 bg-card/45",icon:Qs,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:GN,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Er,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Er,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:"Ein wichtiger Dienst hakt."}}[e],n=r.icon,i={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],o={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return l.jsxs("div",{className:ee("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between",r.ring),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:l.jsx(n,{className:ee("h-6 w-6",r.iconCls)})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:r.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:r.sub})]})]}),l.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[l.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[l.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[l.jsx(fa,{className:"h-3.5 w-3.5"})," Speicher"]}),l.jsx("span",{className:ee("font-mono font-bold",i),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(0)} / ${t.totalGb.toFixed(0)} GB`})]}),l.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:l.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",o),style:{width:`${t.pct}%`}})})]})]})}function jZ({problems:e,pendingCount:t,busy:r,onRepair:n}){const i=t>0,o=e.length===0&&!i;return l.jsxs("section",{children:[l.jsx(nf,{children:"Braucht dich"}),o?l.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4",children:[l.jsx(Qt,{className:"h-5 w-5 shrink-0 text-emerald-400"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):l.jsxs("div",{className:"space-y-2",children:[e.map(u=>l.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[l.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:l.jsx(u.icon,{className:"h-4.5 w-4.5"})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-sm font-bold text-foreground",children:u.label}),l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:u.detail})]})]}),u.repair&&l.jsxs("button",{onClick:()=>u.repair&&n(u.id,u.repair),disabled:!!r[u.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60",children:[r[u.id]?l.jsx(Qs,{className:"h-3.5 w-3.5 animate-spin"}):l.jsx(Vu,{className:"h-3.5 w-3.5"}),u.repair.label]})]},u.id)),i&&l.jsxs("button",{onClick:()=>rf("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:l.jsx(XN,{className:"h-4.5 w-4.5"})}),l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden, ob du es einspielst."})]})]}),l.jsx(Gu,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})]})}function SZ(){var j,k,S,N,E;zR();const[e,t]=y.useState(()=>{const A=window.location.hash.slice(1);return cu.some(P=>P.id===A)?A:"dashboard"}),r=y.useCallback(A=>{window.location.hash.slice(1)===A?t(A):window.location.hash=A},[]),[n,i]=y.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,u]=y.useState(!1),[c,f]=y.useState("maintenance"),[h,m]=y.useState(()=>window.location.hash==="#mc3"),{data:g}=D0(),{data:v}=jo(2e4);y.useEffect(()=>{document.documentElement.classList.add("dark")},[]),y.useEffect(()=>{const A=P=>{var O;f(((O=P.detail)==null?void 0:O.tab)||"maintenance"),u(!0)};return window.addEventListener("open-system-drawer",A),()=>window.removeEventListener("open-system-drawer",A)},[]),y.useEffect(()=>{const A=P=>{var O;const _=(O=P.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",A),()=>window.removeEventListener("mc-navigate",A)},[r]),y.useEffect(()=>{const A=()=>{m(window.location.hash==="#mc3");const P=window.location.hash.slice(1);cu.some(_=>_.id===P)&&t(P)};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]);const b=cu.find(A=>A.id===e);return h?l.jsx(mZ,{}):l.jsxs("div",{className:"flex h-full relative",children:[l.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[l.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),l.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),l.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),l.jsx(lD,{onNavigate:r}),l.jsx(J5,{open:o,onClose:()=>u(!1),defaultTab:c}),l.jsxs("aside",{className:ee("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[l.jsxs("div",{className:ee("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[l.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&l.jsxs("div",{className:"leading-tight",children:[l.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),l.jsx("button",{onClick:()=>{i(A=>{const P=!A;return localStorage.setItem("mc_sidebar_collapsed",P.toString()),P})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?l.jsx(Gu,{className:"h-4 w-4","aria-hidden":"true"}):l.jsx(yM,{className:"h-4 w-4","aria-hidden":"true"})})]}),l.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:cu.map(A=>l.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:ee("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[l.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&l.jsx("span",{className:"truncate",children:A.label})]},A.id))}),l.jsx("div",{className:ee("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?l.jsx("div",{className:"flex justify-center",children:l.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",g?g.engine_reachable?g.brain&&!g.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:g?g.engine_reachable?g.brain&&!g.brain.ready?`Hirn offline (${g.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):l.jsxs("div",{className:"space-y-2 text-left",children:[g?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:ee("h-2 w-2 rounded-full animate-pulse",g.engine_reachable?"bg-emerald-500":"bg-amber-500")}),l.jsxs("span",{className:"truncate",children:["Engine ",g.engine_reachable?"online":"offline"]})]}),g.brain&&!g.brain.ready&&l.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${g.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),l.jsxs("span",{className:"truncate",children:["Hirn offline",g.brain.model?` (${g.brain.model})`:""]})]})]}):l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",l.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&l.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[l.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:((j=v.versions.engine)==null?void 0:j.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((k=v.versions.engine)==null?void 0:k.version_text)||"unbekannt",children:[l.jsx("strong",{children:"Engine:"})," ",((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_ui?`${v.versions.hermes_ui.branch}-${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""} (${v.versions.hermes_ui.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes UI:"})," ",v.versions.hermes_ui?`${v.versions.hermes_ui.hash}${v.versions.hermes_ui.dirty?"*":""}`:"—"]}),l.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[l.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[l.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(U5,{}),l.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),l.jsxs("button",{onClick:()=>{const A=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(A)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[l.jsx(jM,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:"Suchen"}),l.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),l.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&l.jsx(wZ,{onNavigate:A=>r(A)}),e==="models"&&l.jsx(hR,{}),e==="connect"&&l.jsx(Y5,{}),e==="memory"&&l.jsx(X5,{}),e==="agent"&&l.jsx(Z5,{}),e==="terminal"&&l.jsx(kR,{}),e==="konsole"&&l.jsx(jR,{}),e==="guide"&&l.jsx(NR,{}),!["dashboard","models","connect","memory","agent","terminal","konsole","guide"].includes(e)&&l.jsx(ER,{title:b.label,hint:b.hint})]})]})]})}class NZ extends S0.Component{constructor(){super(...arguments);Zo(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:l.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[l.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),l.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),l.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const EZ=new Q3({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});j3.createRoot(document.getElementById("root")).render(l.jsx(S0.StrictMode,{children:l.jsx(NZ,{children:l.jsx(Y3,{client:EZ,children:l.jsx(SZ,{})})})}));export{gs as R,hs as S,uf as T,qM as a,j0 as g,l as j,y as r};
|