From ea256fca0d2400464fb882d4f3533bf6441ecfdb Mon Sep 17 00:00:00 2001 From: Hitonabi Date: Sat, 27 Jun 2026 16:34:53 +0200 Subject: [PATCH] Feat: System-Status als poliertes Live-Chart (Recharts) - Legende, Hover-Tooltip, Spline Auf Wunsch im Stil der Referenz-Dashboards: unified Live-Chart (CPU/RAM/GPU/Disk) mit glatten Flaechen (monotone), Gradient-Fill, Legende mit Live-Werten + GB-Detail, und gestyltem Hover-Tooltip (alle Serien an der Cursor-Position). Dynamische Y-Achse (skaliert in 25er-Schritten auf den Peak), damit Linien auch bei idle-Box den Chart ausfuellen. Reines Live (kein Monats-/Jahres-Dropdown), rollende 40 Punkte (~2 Min). - recharts als Dependency - Sparkline.tsx entfernt (durch Recharts ersetzt) Co-Authored-By: Claude Opus 4.8 --- frontend/dist/assets/index-B_8UgpHG.js | 473 ++++++++++++++++++ frontend/dist/assets/index-BtqbLPzA.css | 1 - frontend/dist/assets/index-CVpN0_0g.js | 397 --------------- frontend/dist/assets/index-CWa0E1B9.css | 1 + frontend/dist/index.html | 4 +- frontend/package-lock.json | 398 +++++++++++++++ frontend/package.json | 1 + .../src/components/dashboard/Sparkline.tsx | 40 -- .../components/dashboard/SystemStatusCard.tsx | 153 ++++-- 9 files changed, 979 insertions(+), 489 deletions(-) create mode 100644 frontend/dist/assets/index-B_8UgpHG.js delete mode 100644 frontend/dist/assets/index-BtqbLPzA.css delete mode 100644 frontend/dist/assets/index-CVpN0_0g.js create mode 100644 frontend/dist/assets/index-CWa0E1B9.css delete mode 100644 frontend/src/components/dashboard/Sparkline.tsx diff --git a/frontend/dist/assets/index-B_8UgpHG.js b/frontend/dist/assets/index-B_8UgpHG.js new file mode 100644 index 0000000..cd9298b --- /dev/null +++ b/frontend/dist/assets/index-B_8UgpHG.js @@ -0,0 +1,473 @@ +var W5=Object.defineProperty;var j1=e=>{throw TypeError(e)};var H5=(e,t,r)=>t in e?W5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vd=(e,t,r)=>H5(e,typeof t!="symbol"?t+"":t,r),Tm=(e,t,r)=>t.has(e)||j1("Cannot "+r);var L=(e,t,r)=>(Tm(e,t,"read from private field"),r?r.call(e):t.get(e)),Te=(e,t,r)=>t.has(e)?j1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ge=(e,t,r,n)=>(Tm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ze=(e,t,r)=>(Tm(e,t,"access private method"),r);var yd=(e,t,r,n)=>({set _(a){ge(e,t,a,r)},get _(){return L(e,t,n)}});function K5(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function Xv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dm={exports:{}},Kl={},Rm={exports:{}},$e={};/** + * @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 k1;function G5(){if(k1)return $e;k1=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function v($){return $===null||typeof $!="object"?null:($=g&&$[g]||$["@@iterator"],typeof $=="function"?$:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function S($,T,J){this.props=$,this.context=T,this.refs=k,this.updater=J||b}S.prototype.isReactComponent={},S.prototype.setState=function($,T){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,T,"setState")},S.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function N(){}N.prototype=S.prototype;function A($,T,J){this.props=$,this.context=T,this.refs=k,this.updater=J||b}var O=A.prototype=new N;O.constructor=A,j(O,S.prototype),O.isPureReactComponent=!0;var C=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function U($,T,J){var oe,ee={},ue=null,he=null;if(T!=null)for(oe in T.ref!==void 0&&(he=T.ref),T.key!==void 0&&(ue=""+T.key),T)_.call(T,oe)&&!M.hasOwnProperty(oe)&&(ee[oe]=T[oe]);var Ce=arguments.length-2;if(Ce===1)ee.children=J;else if(1>>1,T=Q[$];if(0>>1;$a(ee,X))uea(he,ee)?(Q[$]=he,Q[ue]=X,$=ue):(Q[$]=ee,Q[oe]=X,$=oe);else if(uea(he,X))Q[$]=he,Q[ue]=X,$=ue;else break e}}return ne}function a(Q,ne){var X=Q.sortIndex-ne.sortIndex;return X!==0?X:Q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var f=[],h=[],p=1,g=null,v=3,b=!1,j=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(Q){for(var ne=r(h);ne!==null;){if(ne.callback===null)n(h);else if(ne.startTime<=Q)n(h),ne.sortIndex=ne.expirationTime,t(f,ne);else break;ne=r(h)}}function C(Q){if(k=!1,O(Q),!j)if(r(f)!==null)j=!0,be(_);else{var ne=r(h);ne!==null&&pe(C,ne.startTime-Q)}}function _(Q,ne){j=!1,k&&(k=!1,N(U),U=-1),b=!0;var X=v;try{for(O(ne),g=r(f);g!==null&&(!(g.expirationTime>ne)||Q&&!Y());){var $=g.callback;if(typeof $=="function"){g.callback=null,v=g.priorityLevel;var T=$(g.expirationTime<=ne);ne=e.unstable_now(),typeof T=="function"?g.callback=T:g===r(f)&&n(f),O(ne)}else n(f);g=r(f)}if(g!==null)var J=!0;else{var oe=r(h);oe!==null&&pe(C,oe.startTime-ne),J=!1}return J}finally{g=null,v=X,b=!1}}var E=!1,M=null,U=-1,W=5,V=-1;function Y(){return!(e.unstable_now()-VQ||125$?(Q.sortIndex=X,t(h,Q),r(f)===null&&Q===r(h)&&(k?(N(U),U=-1):k=!0,pe(C,X-$))):(Q.sortIndex=T,t(f,Q),j||b||(j=!0,be(_))),Q},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(Q){var ne=v;return function(){var X=v;v=ne;try{return Q.apply(this,arguments)}finally{v=X}}}})(zm)),zm}var A1;function Y5(){return A1||(A1=1,Lm.exports=Q5()),Lm.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var C1;function X5(){if(C1)return mr;C1=1;var e=Bs(),t=Y5();function r(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function v(i){return f.call(g,i)?!0:f.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function b(i,o,d,m){if(d!==null&&d.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function j(i,o,d,m){if(o===null||typeof o>"u"||b(i,o,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function k(i,o,d,m,y,w,P){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=m,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=i,this.type=o,this.sanitizeURL=w,this.removeEmptyString=P}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];S[o]=new k(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new k(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){S[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function A(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(N,A);S[o]=new k(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(N,A);S[o]=new k(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(N,A);S[o]=new k(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function O(i,o,d,m){var y=S.hasOwnProperty(o)?S[o]:null;(y!==null?y.type!==0:m||!(2I||y[P]!==w[I]){var D=` +`+y[P].replace(" at new "," at ");return i.displayName&&D.includes("")&&(D=D.replace("",i.displayName)),D}while(1<=P&&0<=I);break}}}finally{J=!1,Error.prepareStackTrace=d}return(i=i?i.displayName||i.name:"")?T(i):""}function ee(i){switch(i.tag){case 5:return T(i.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return i=oe(i.type,!1),i;case 11:return i=oe(i.type.render,!1),i;case 1:return i=oe(i.type,!0),i;default:return""}}function ue(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case M:return"Fragment";case E:return"Portal";case W:return"Profiler";case U:return"StrictMode";case ce:return"Suspense";case Z:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case R:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ve:return o=i.displayName||null,o!==null?o:ue(i.type)||"Memo";case be:o=i._payload,i=i._init;try{return ue(i(o))}catch{}}return null}function he(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(o);case 8:return o===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ce(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function F(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function se(i){var o=F(i)?"checked":"value",d=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),m=""+i[o];if(!i.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,w=d.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return y.call(this)},set:function(P){m=""+P,w.call(this,P)}}),Object.defineProperty(i,o,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(P){m=""+P},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ne(i){i._valueTracker||(i._valueTracker=se(i))}function ie(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var d=o.getValue(),m="";return i&&(m=F(i)?i.checked?"true":"false":i.value),i=m,i!==d?(o.setValue(i),!0):!1}function at(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Be(i,o){var d=o.checked;return X({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??i._wrapperState.initialChecked})}function _e(i,o){var d=o.defaultValue==null?"":o.defaultValue,m=o.checked!=null?o.checked:o.defaultChecked;d=Ce(o.value!=null?o.value:d),i._wrapperState={initialChecked:m,initialValue:d,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function At(i,o){o=o.checked,o!=null&&O(i,"checked",o,!1)}function kr(i,o){At(i,o);var d=Ce(o.value),m=o.type;if(d!=null)m==="number"?(d===0&&i.value===""||i.value!=d)&&(i.value=""+d):i.value!==""+d&&(i.value=""+d);else if(m==="submit"||m==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?ya(i,o.type,d):o.hasOwnProperty("defaultValue")&&ya(i,o.type,Ce(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function va(i,o,d){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var m=o.type;if(!(m!=="submit"&&m!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,d||o===i.value||(i.value=o),i.defaultValue=o}d=i.name,d!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,d!==""&&(i.name=d)}function ya(i,o,d){(o!=="number"||at(i.ownerDocument)!==i)&&(d==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+d&&(i.defaultValue=""+d))}var Un=Array.isArray;function Wn(i,o,d,m){if(i=i.options,o){o={};for(var y=0;y"+o.valueOf().toString()+"",o=xa.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function ki(i,o){if(o){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=o;return}}i.textContent=o}var Si={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lc=["Webkit","ms","Moz","O"];Object.keys(Si).forEach(function(i){lc.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Si[o]=Si[i]})});function al(i,o,d){return o==null||typeof o=="boolean"||o===""?"":d||typeof o!="number"||o===0||Si.hasOwnProperty(i)&&Si[i]?(""+o).trim():o+"px"}function ol(i,o){i=i.style;for(var d in o)if(o.hasOwnProperty(d)){var m=d.indexOf("--")===0,y=al(d,o[d],m);d==="float"&&(d="cssFloat"),m?i.setProperty(d,y):i[d]=y}}var B=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fe(i,o){if(o){if(B[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(r(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(r(61))}if(o.style!=null&&typeof o.style!="object")throw Error(r(62))}}function Ee(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Le=null;function Ve(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qt=null,Xe=null,gt=null;function ba(i){if(i=Ol(i)){if(typeof qt!="function")throw Error(r(280));var o=i.stateNode;o&&(o=Mc(o),qt(i.stateNode,i.type,o))}}function sl(i){Xe?gt?gt.push(i):gt=[i]:Xe=i}function uc(){if(Xe){var i=Xe,o=gt;if(gt=Xe=null,ba(i),o)for(i=0;i>>=0,i===0?32:31-(a_(i)/o_|0)|0}var pc=64,mc=4194304;function fl(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function gc(i,o){var d=i.pendingLanes;if(d===0)return 0;var m=0,y=i.suspendedLanes,w=i.pingedLanes,P=d&268435455;if(P!==0){var I=P&~y;I!==0?m=fl(I):(w&=P,w!==0&&(m=fl(w)))}else P=d&~y,P!==0?m=fl(P):w!==0&&(m=fl(w));if(m===0)return 0;if(o!==0&&o!==m&&(o&y)===0&&(y=m&-m,w=o&-o,y>=w||y===16&&(w&4194240)!==0))return o;if((m&4)!==0&&(m|=d&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=m;0d;d++)o.push(i);return o}function hl(i,o,d){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-en(o),i[o]=d}function c_(i,o){var d=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var m=i.eventTimes;for(i=i.expirationTimes;0=wl),mx=" ",gx=!1;function vx(i,o){switch(i){case"keyup":return L_.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ao=!1;function F_(i,o){switch(i){case"compositionend":return yx(o);case"keypress":return o.which!==32?null:(gx=!0,mx);case"textInput":return i=o.data,i===mx&&gx?null:i;default:return null}}function B_(i,o){if(Ao)return i==="compositionend"||!pp&&vx(i,o)?(i=ux(),wc=lp=Ci=null,Ao=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:d,offset:o-i};i=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Nx(d)}}function Px(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Px(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Ax(){for(var i=window,o=at();o instanceof i.HTMLIFrameElement;){try{var d=typeof o.contentWindow.location.href=="string"}catch{d=!1}if(d)i=o.contentWindow;else break;o=at(i.document)}return o}function vp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function Y_(i){var o=Ax(),d=i.focusedElem,m=i.selectionRange;if(o!==d&&d&&d.ownerDocument&&Px(d.ownerDocument.documentElement,d)){if(m!==null&&vp(d)){if(o=m.start,i=m.end,i===void 0&&(i=o),"selectionStart"in d)d.selectionStart=o,d.selectionEnd=Math.min(i,d.value.length);else if(i=(o=d.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var y=d.textContent.length,w=Math.min(m.start,y);m=m.end===void 0?w:Math.min(m.end,y),!i.extend&&w>m&&(y=m,m=w,w=y),y=Ex(d,w);var P=Ex(d,m);y&&P&&(i.rangeCount!==1||i.anchorNode!==y.node||i.anchorOffset!==y.offset||i.focusNode!==P.node||i.focusOffset!==P.offset)&&(o=o.createRange(),o.setStart(y.node,y.offset),i.removeAllRanges(),w>m?(i.addRange(o),i.extend(P.node,P.offset)):(o.setEnd(P.node,P.offset),i.addRange(o)))}}for(o=[],i=d;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,Co=null,yp=null,Nl=null,xp=!1;function Cx(i,o,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;xp||Co==null||Co!==at(m)||(m=Co,"selectionStart"in m&&vp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Nl&&Sl(Nl,m)||(Nl=m,m=Cc(yp,"onSelect"),0To||(i.current=_p[To],_p[To]=null,To--)}function Ze(i,o){To++,_p[To]=i.current,i.current=o}var Ii={},Qt=Mi(Ii),cr=Mi(!1),ka=Ii;function Do(i,o){var d=i.type.contextTypes;if(!d)return Ii;var m=i.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===o)return m.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in d)y[w]=o[w];return m&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=y),y}function dr(i){return i=i.childContextTypes,i!=null}function Ic(){tt(cr),tt(Qt)}function Hx(i,o,d){if(Qt.current!==Ii)throw Error(r(168));Ze(Qt,o),Ze(cr,d)}function Kx(i,o,d){var m=i.stateNode;if(o=o.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var y in m)if(!(y in o))throw Error(r(108,he(i)||"Unknown",y));return X({},d,m)}function Tc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Ii,ka=Qt.current,Ze(Qt,i),Ze(cr,cr.current),!0}function Gx(i,o,d){var m=i.stateNode;if(!m)throw Error(r(169));d?(i=Kx(i,o,ka),m.__reactInternalMemoizedMergedChildContext=i,tt(cr),tt(Qt),Ze(Qt,i)):tt(cr),Ze(cr,d)}var Kn=null,Dc=!1,Mp=!1;function Vx(i){Kn===null?Kn=[i]:Kn.push(i)}function l5(i){Dc=!0,Vx(i)}function Ti(){if(!Mp&&Kn!==null){Mp=!0;var i=0,o=Qe;try{var d=Kn;for(Qe=1;i>=P,y-=P,Gn=1<<32-en(o)+y|d<De?(_t=Ie,Ie=null):_t=Ie.sibling;var Ke=te(H,Ie,K[De],le);if(Ke===null){Ie===null&&(Ie=_t);break}i&&Ie&&Ke.alternate===null&&o(H,Ie),z=w(Ke,z,De),Me===null?Se=Ke:Me.sibling=Ke,Me=Ke,Ie=_t}if(De===K.length)return d(H,Ie),ot&&Na(H,De),Se;if(Ie===null){for(;DeDe?(_t=Ie,Ie=null):_t=Ie.sibling;var Wi=te(H,Ie,Ke.value,le);if(Wi===null){Ie===null&&(Ie=_t);break}i&&Ie&&Wi.alternate===null&&o(H,Ie),z=w(Wi,z,De),Me===null?Se=Wi:Me.sibling=Wi,Me=Wi,Ie=_t}if(Ke.done)return d(H,Ie),ot&&Na(H,De),Se;if(Ie===null){for(;!Ke.done;De++,Ke=K.next())Ke=ae(H,Ke.value,le),Ke!==null&&(z=w(Ke,z,De),Me===null?Se=Ke:Me.sibling=Ke,Me=Ke);return ot&&Na(H,De),Se}for(Ie=m(H,Ie);!Ke.done;De++,Ke=K.next())Ke=me(Ie,H,De,Ke.value,le),Ke!==null&&(i&&Ke.alternate!==null&&Ie.delete(Ke.key===null?De:Ke.key),z=w(Ke,z,De),Me===null?Se=Ke:Me.sibling=Ke,Me=Ke);return i&&Ie.forEach(function(U5){return o(H,U5)}),ot&&Na(H,De),Se}function yt(H,z,K,le){if(typeof K=="object"&&K!==null&&K.type===M&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case _:e:{for(var Se=K.key,Me=z;Me!==null;){if(Me.key===Se){if(Se=K.type,Se===M){if(Me.tag===7){d(H,Me.sibling),z=y(Me,K.props.children),z.return=H,H=z;break e}}else if(Me.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===be&&Jx(Se)===Me.type){d(H,Me.sibling),z=y(Me,K.props),z.ref=_l(H,Me,K),z.return=H,H=z;break e}d(H,Me);break}else o(H,Me);Me=Me.sibling}K.type===M?(z=Ia(K.props.children,H.mode,le,K.key),z.return=H,H=z):(le=ud(K.type,K.key,K.props,null,H.mode,le),le.ref=_l(H,z,K),le.return=H,H=le)}return P(H);case E:e:{for(Me=K.key;z!==null;){if(z.key===Me)if(z.tag===4&&z.stateNode.containerInfo===K.containerInfo&&z.stateNode.implementation===K.implementation){d(H,z.sibling),z=y(z,K.children||[]),z.return=H,H=z;break e}else{d(H,z);break}else o(H,z);z=z.sibling}z=Cm(K,H.mode,le),z.return=H,H=z}return P(H);case be:return Me=K._init,yt(H,z,Me(K._payload),le)}if(Un(K))return we(H,z,K,le);if(ne(K))return je(H,z,K,le);zc(H,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,z!==null&&z.tag===6?(d(H,z.sibling),z=y(z,K),z.return=H,H=z):(d(H,z),z=Am(K,H.mode,le),z.return=H,H=z),P(H)):d(H,z)}return yt}var zo=eb(!0),tb=eb(!1),Fc=Mi(null),Bc=null,Fo=null,Lp=null;function zp(){Lp=Fo=Bc=null}function Fp(i){var o=Fc.current;tt(Fc),i._currentValue=o}function Bp(i,o,d){for(;i!==null;){var m=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,m!==null&&(m.childLanes|=o)):m!==null&&(m.childLanes&o)!==o&&(m.childLanes|=o),i===d)break;i=i.return}}function Bo(i,o){Bc=i,Lp=Fo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(fr=!0),i.firstContext=null)}function Lr(i){var o=i._currentValue;if(Lp!==i)if(i={context:i,memoizedValue:o,next:null},Fo===null){if(Bc===null)throw Error(r(308));Fo=i,Bc.dependencies={lanes:0,firstContext:i}}else Fo=Fo.next=i;return o}var Ea=null;function Up(i){Ea===null?Ea=[i]:Ea.push(i)}function rb(i,o,d,m){var y=o.interleaved;return y===null?(d.next=d,Up(o)):(d.next=y.next,y.next=d),o.interleaved=d,qn(i,m)}function qn(i,o){i.lanes|=o;var d=i.alternate;for(d!==null&&(d.lanes|=o),d=i,i=i.return;i!==null;)i.childLanes|=o,d=i.alternate,d!==null&&(d.childLanes|=o),d=i,i=i.return;return d.tag===3?d.stateNode:null}var Di=!1;function Wp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nb(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Qn(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function Ri(i,o,d){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(He&2)!==0){var y=m.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),m.pending=o,qn(i,d)}return y=m.interleaved,y===null?(o.next=o,Up(m)):(o.next=y.next,y.next=o),m.interleaved=o,qn(i,d)}function Uc(i,o,d){if(o=o.updateQueue,o!==null&&(o=o.shared,(d&4194240)!==0)){var m=o.lanes;m&=i.pendingLanes,d|=m,o.lanes=d,np(i,d)}}function ib(i,o){var d=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var y=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var P={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?y=w=P:w=w.next=P,d=d.next}while(d!==null);w===null?y=w=o:w=w.next=o}else y=w=o;d={baseState:m.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:m.shared,effects:m.effects},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=o:i.next=o,d.lastBaseUpdate=o}function Wc(i,o,d,m){var y=i.updateQueue;Di=!1;var w=y.firstBaseUpdate,P=y.lastBaseUpdate,I=y.shared.pending;if(I!==null){y.shared.pending=null;var D=I,q=D.next;D.next=null,P===null?w=q:P.next=q,P=D;var re=i.alternate;re!==null&&(re=re.updateQueue,I=re.lastBaseUpdate,I!==P&&(I===null?re.firstBaseUpdate=q:I.next=q,re.lastBaseUpdate=D))}if(w!==null){var ae=y.baseState;P=0,re=q=D=null,I=w;do{var te=I.lane,me=I.eventTime;if((m&te)===te){re!==null&&(re=re.next={eventTime:me,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var we=i,je=I;switch(te=o,me=d,je.tag){case 1:if(we=je.payload,typeof we=="function"){ae=we.call(me,ae,te);break e}ae=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=je.payload,te=typeof we=="function"?we.call(me,ae,te):we,te==null)break e;ae=X({},ae,te);break e;case 2:Di=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,te=y.effects,te===null?y.effects=[I]:te.push(I))}else me={eventTime:me,lane:te,tag:I.tag,payload:I.payload,callback:I.callback,next:null},re===null?(q=re=me,D=ae):re=re.next=me,P|=te;if(I=I.next,I===null){if(I=y.shared.pending,I===null)break;te=I,I=te.next,te.next=null,y.lastBaseUpdate=te,y.shared.pending=null}}while(!0);if(re===null&&(D=ae),y.baseState=D,y.firstBaseUpdate=q,y.lastBaseUpdate=re,o=y.shared.interleaved,o!==null){y=o;do P|=y.lane,y=y.next;while(y!==o)}else w===null&&(y.shared.lanes=0);Ca|=P,i.lanes=P,i.memoizedState=ae}}function ab(i,o,d){if(i=o.effects,o.effects=null,i!==null)for(o=0;od?d:4,i(!0);var m=qp.transition;qp.transition={};try{i(!1),o()}finally{Qe=d,qp.transition=m}}function Sb(){return zr().memoizedState}function f5(i,o,d){var m=Fi(i);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},Nb(i))Eb(o,d);else if(d=rb(i,o,d,m),d!==null){var y=ir();sn(d,i,m,y),Pb(d,o,m)}}function h5(i,o,d){var m=Fi(i),y={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(Nb(i))Eb(o,y);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var P=o.lastRenderedState,I=w(P,d);if(y.hasEagerState=!0,y.eagerState=I,tn(I,P)){var D=o.interleaved;D===null?(y.next=y,Up(o)):(y.next=D.next,D.next=y),o.interleaved=y;return}}catch{}finally{}d=rb(i,o,y,m),d!==null&&(y=ir(),sn(d,i,m,y),Pb(d,o,m))}}function Nb(i){var o=i.alternate;return i===ct||o!==null&&o===ct}function Eb(i,o){Dl=Gc=!0;var d=i.pending;d===null?o.next=o:(o.next=d.next,d.next=o),i.pending=o}function Pb(i,o,d){if((d&4194240)!==0){var m=o.lanes;m&=i.pendingLanes,d|=m,o.lanes=d,np(i,d)}}var Qc={readContext:Lr,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},p5={readContext:Lr,useCallback:function(i,o){return bn().memoizedState=[i,o===void 0?null:o],i},useContext:Lr,useEffect:gb,useImperativeHandle:function(i,o,d){return d=d!=null?d.concat([i]):null,Vc(4194308,4,xb.bind(null,o,i),d)},useLayoutEffect:function(i,o){return Vc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Vc(4,2,i,o)},useMemo:function(i,o){var d=bn();return o=o===void 0?null:o,i=i(),d.memoizedState=[i,o],i},useReducer:function(i,o,d){var m=bn();return o=d!==void 0?d(o):o,m.memoizedState=m.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},m.queue=i,i=i.dispatch=f5.bind(null,ct,i),[m.memoizedState,i]},useRef:function(i){var o=bn();return i={current:i},o.memoizedState=i},useState:pb,useDebugValue:tm,useDeferredValue:function(i){return bn().memoizedState=i},useTransition:function(){var i=pb(!1),o=i[0];return i=d5.bind(null,i[1]),bn().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,d){var m=ct,y=bn();if(ot){if(d===void 0)throw Error(r(407));d=d()}else{if(d=o(),Ot===null)throw Error(r(349));(Aa&30)!==0||ub(m,o,d)}y.memoizedState=d;var w={value:d,getSnapshot:o};return y.queue=w,gb(db.bind(null,m,w,i),[i]),m.flags|=2048,Ll(9,cb.bind(null,m,w,d,o),void 0,null),d},useId:function(){var i=bn(),o=Ot.identifierPrefix;if(ot){var d=Vn,m=Gn;d=(m&~(1<<32-en(m)-1)).toString(32)+d,o=":"+o+"R"+d,d=Rl++,0<\/script>",i=i.removeChild(i.firstChild)):typeof m.is=="string"?i=P.createElement(d,{is:m.is}):(i=P.createElement(d),d==="select"&&(P=i,m.multiple?P.multiple=!0:m.size&&(P.size=m.size))):i=P.createElementNS(i,d),i[yn]=o,i[Cl]=m,Vb(i,o,!1,!1),o.stateNode=i;e:{switch(P=Ee(d,m),d){case"dialog":et("cancel",i),et("close",i),y=m;break;case"iframe":case"object":case"embed":et("load",i),y=m;break;case"video":case"audio":for(y=0;yGo&&(o.flags|=128,m=!0,zl(w,!1),o.lanes=4194304)}else{if(!m)if(i=Hc(P),i!==null){if(o.flags|=128,m=!0,d=i.updateQueue,d!==null&&(o.updateQueue=d,o.flags|=4),zl(w,!0),w.tail===null&&w.tailMode==="hidden"&&!P.alternate&&!ot)return Xt(o),null}else 2*vt()-w.renderingStartTime>Go&&d!==1073741824&&(o.flags|=128,m=!0,zl(w,!1),o.lanes=4194304);w.isBackwards?(P.sibling=o.child,o.child=P):(d=w.last,d!==null?d.sibling=P:o.child=P,w.last=P)}return w.tail!==null?(o=w.tail,w.rendering=o,w.tail=o.sibling,w.renderingStartTime=vt(),o.sibling=null,d=ut.current,Ze(ut,m?d&1|2:d&1),o):(Xt(o),null);case 22:case 23:return Nm(),m=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==m&&(o.flags|=8192),m&&(o.mode&1)!==0?(Pr&1073741824)!==0&&(Xt(o),o.subtreeFlags&6&&(o.flags|=8192)):Xt(o),null;case 24:return null;case 25:return null}throw Error(r(156,o.tag))}function j5(i,o){switch(Tp(o),o.tag){case 1:return dr(o.type)&&Ic(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Uo(),tt(cr),tt(Qt),Vp(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return Kp(o),null;case 13:if(tt(ut),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Lo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return tt(ut),null;case 4:return Uo(),null;case 10:return Fp(o.type._context),null;case 22:case 23:return Nm(),null;case 24:return null;default:return null}}var Jc=!1,Zt=!1,k5=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Ho(i,o){var d=i.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){dt(i,o,m)}else d.current=null}function hm(i,o,d){try{d()}catch(m){dt(i,o,m)}}var Yb=!1;function S5(i,o){if(Np=xc,i=Ax(),vp(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var y=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var P=0,I=-1,D=-1,q=0,re=0,ae=i,te=null;t:for(;;){for(var me;ae!==d||y!==0&&ae.nodeType!==3||(I=P+y),ae!==w||m!==0&&ae.nodeType!==3||(D=P+m),ae.nodeType===3&&(P+=ae.nodeValue.length),(me=ae.firstChild)!==null;)te=ae,ae=me;for(;;){if(ae===i)break t;if(te===d&&++q===y&&(I=P),te===w&&++re===m&&(D=P),(me=ae.nextSibling)!==null)break;ae=te,te=ae.parentNode}ae=me}d=I===-1||D===-1?null:{start:I,end:D}}else d=null}d=d||{start:0,end:0}}else d=null;for(Ep={focusedElem:i,selectionRange:d},xc=!1,ye=o;ye!==null;)if(o=ye,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,ye=i;else for(;ye!==null;){o=ye;try{var we=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var je=we.memoizedProps,yt=we.memoizedState,H=o.stateNode,z=H.getSnapshotBeforeUpdate(o.elementType===o.type?je:nn(o.type,je),yt);H.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(le){dt(o,o.return,le)}if(i=o.sibling,i!==null){i.return=o.return,ye=i;break}ye=o.return}return we=Yb,Yb=!1,we}function Fl(i,o,d){var m=o.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var y=m=m.next;do{if((y.tag&i)===i){var w=y.destroy;y.destroy=void 0,w!==void 0&&hm(o,d,w)}y=y.next}while(y!==m)}}function ed(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var d=o=o.next;do{if((d.tag&i)===i){var m=d.create;d.destroy=m()}d=d.next}while(d!==o)}}function pm(i){var o=i.ref;if(o!==null){var d=i.stateNode;switch(i.tag){case 5:i=d;break;default:i=d}typeof o=="function"?o(i):o.current=i}}function Xb(i){var o=i.alternate;o!==null&&(i.alternate=null,Xb(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[yn],delete o[Cl],delete o[Op],delete o[o5],delete o[s5])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Zb(i){return i.tag===5||i.tag===3||i.tag===4}function Jb(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Zb(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function mm(i,o,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,o?d.nodeType===8?d.parentNode.insertBefore(i,o):d.insertBefore(i,o):(d.nodeType===8?(o=d.parentNode,o.insertBefore(i,d)):(o=d,o.appendChild(i)),d=d._reactRootContainer,d!=null||o.onclick!==null||(o.onclick=_c));else if(m!==4&&(i=i.child,i!==null))for(mm(i,o,d),i=i.sibling;i!==null;)mm(i,o,d),i=i.sibling}function gm(i,o,d){var m=i.tag;if(m===5||m===6)i=i.stateNode,o?d.insertBefore(i,o):d.appendChild(i);else if(m!==4&&(i=i.child,i!==null))for(gm(i,o,d),i=i.sibling;i!==null;)gm(i,o,d),i=i.sibling}var Lt=null,an=!1;function $i(i,o,d){for(d=d.child;d!==null;)e1(i,o,d),d=d.sibling}function e1(i,o,d){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(hc,d)}catch{}switch(d.tag){case 5:Zt||Ho(d,o);case 6:var m=Lt,y=an;Lt=null,$i(i,o,d),Lt=m,an=y,Lt!==null&&(an?(i=Lt,d=d.stateNode,i.nodeType===8?i.parentNode.removeChild(d):i.removeChild(d)):Lt.removeChild(d.stateNode));break;case 18:Lt!==null&&(an?(i=Lt,d=d.stateNode,i.nodeType===8?Cp(i.parentNode,d):i.nodeType===1&&Cp(i,d),yl(i)):Cp(Lt,d.stateNode));break;case 4:m=Lt,y=an,Lt=d.stateNode.containerInfo,an=!0,$i(i,o,d),Lt=m,an=y;break;case 0:case 11:case 14:case 15:if(!Zt&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){y=m=m.next;do{var w=y,P=w.destroy;w=w.tag,P!==void 0&&((w&2)!==0||(w&4)!==0)&&hm(d,o,P),y=y.next}while(y!==m)}$i(i,o,d);break;case 1:if(!Zt&&(Ho(d,o),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(I){dt(d,o,I)}$i(i,o,d);break;case 21:$i(i,o,d);break;case 22:d.mode&1?(Zt=(m=Zt)||d.memoizedState!==null,$i(i,o,d),Zt=m):$i(i,o,d);break;default:$i(i,o,d)}}function t1(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var d=i.stateNode;d===null&&(d=i.stateNode=new k5),o.forEach(function(m){var y=I5.bind(null,i,m);d.has(m)||(d.add(m),m.then(y,y))})}}function on(i,o){var d=o.deletions;if(d!==null)for(var m=0;my&&(y=P),m&=~w}if(m=y,m=vt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*E5(m/1960))-m,10i?16:i,zi===null)var m=!1;else{if(i=zi,zi=null,ad=0,(He&6)!==0)throw Error(r(331));var y=He;for(He|=4,ye=i.current;ye!==null;){var w=ye,P=w.child;if((ye.flags&16)!==0){var I=w.deletions;if(I!==null){for(var D=0;Dvt()-xm?_a(i,0):ym|=d),pr(i,o)}function p1(i,o){o===0&&((i.mode&1)===0?o=1:(o=mc,mc<<=1,(mc&130023424)===0&&(mc=4194304)));var d=ir();i=qn(i,o),i!==null&&(hl(i,o,d),pr(i,d))}function M5(i){var o=i.memoizedState,d=0;o!==null&&(d=o.retryLane),p1(i,d)}function I5(i,o){var d=0;switch(i.tag){case 13:var m=i.stateNode,y=i.memoizedState;y!==null&&(d=y.retryLane);break;case 19:m=i.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(o),p1(i,d)}var m1;m1=function(i,o,d){if(i!==null)if(i.memoizedProps!==o.pendingProps||cr.current)fr=!0;else{if((i.lanes&d)===0&&(o.flags&128)===0)return fr=!1,b5(i,o,d);fr=(i.flags&131072)!==0}else fr=!1,ot&&(o.flags&1048576)!==0&&qx(o,$c,o.index);switch(o.lanes=0,o.tag){case 2:var m=o.type;Zc(i,o),i=o.pendingProps;var y=Do(o,Qt.current);Bo(o,d),y=Yp(null,o,m,i,y,d);var w=Xp();return o.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,dr(m)?(w=!0,Tc(o)):w=!1,o.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Wp(o),y.updater=Yc,o.stateNode=y,y._reactInternals=o,nm(o,m,i,d),o=sm(null,o,m,!0,w,d)):(o.tag=0,ot&&w&&Ip(o),nr(null,o,y,d),o=o.child),o;case 16:m=o.elementType;e:{switch(Zc(i,o),i=o.pendingProps,y=m._init,m=y(m._payload),o.type=m,y=o.tag=D5(m),i=nn(m,i),y){case 0:o=om(null,o,m,i,d);break e;case 1:o=Bb(null,o,m,i,d);break e;case 11:o=Rb(null,o,m,i,d);break e;case 14:o=$b(null,o,m,nn(m.type,i),d);break e}throw Error(r(306,m,""))}return o;case 0:return m=o.type,y=o.pendingProps,y=o.elementType===m?y:nn(m,y),om(i,o,m,y,d);case 1:return m=o.type,y=o.pendingProps,y=o.elementType===m?y:nn(m,y),Bb(i,o,m,y,d);case 3:e:{if(Ub(o),i===null)throw Error(r(387));m=o.pendingProps,w=o.memoizedState,y=w.element,nb(i,o),Wc(o,m,null,d);var P=o.memoizedState;if(m=P.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){y=Wo(Error(r(423)),o),o=Wb(i,o,m,d,y);break e}else if(m!==y){y=Wo(Error(r(424)),o),o=Wb(i,o,m,d,y);break e}else for(Er=_i(o.stateNode.containerInfo.firstChild),Nr=o,ot=!0,rn=null,d=tb(o,null,m,d),o.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Lo(),m===y){o=Yn(i,o,d);break e}nr(i,o,m,d)}o=o.child}return o;case 5:return ob(o),i===null&&Rp(o),m=o.type,y=o.pendingProps,w=i!==null?i.memoizedProps:null,P=y.children,Pp(m,y)?P=null:w!==null&&Pp(m,w)&&(o.flags|=32),Fb(i,o),nr(i,o,P,d),o.child;case 6:return i===null&&Rp(o),null;case 13:return Hb(i,o,d);case 4:return Hp(o,o.stateNode.containerInfo),m=o.pendingProps,i===null?o.child=zo(o,null,m,d):nr(i,o,m,d),o.child;case 11:return m=o.type,y=o.pendingProps,y=o.elementType===m?y:nn(m,y),Rb(i,o,m,y,d);case 7:return nr(i,o,o.pendingProps,d),o.child;case 8:return nr(i,o,o.pendingProps.children,d),o.child;case 12:return nr(i,o,o.pendingProps.children,d),o.child;case 10:e:{if(m=o.type._context,y=o.pendingProps,w=o.memoizedProps,P=y.value,Ze(Fc,m._currentValue),m._currentValue=P,w!==null)if(tn(w.value,P)){if(w.children===y.children&&!cr.current){o=Yn(i,o,d);break e}}else for(w=o.child,w!==null&&(w.return=o);w!==null;){var I=w.dependencies;if(I!==null){P=w.child;for(var D=I.firstContext;D!==null;){if(D.context===m){if(w.tag===1){D=Qn(-1,d&-d),D.tag=2;var q=w.updateQueue;if(q!==null){q=q.shared;var re=q.pending;re===null?D.next=D:(D.next=re.next,re.next=D),q.pending=D}}w.lanes|=d,D=w.alternate,D!==null&&(D.lanes|=d),Bp(w.return,d,o),I.lanes|=d;break}D=D.next}}else if(w.tag===10)P=w.type===o.type?null:w.child;else if(w.tag===18){if(P=w.return,P===null)throw Error(r(341));P.lanes|=d,I=P.alternate,I!==null&&(I.lanes|=d),Bp(P,d,o),P=w.sibling}else P=w.child;if(P!==null)P.return=w;else for(P=w;P!==null;){if(P===o){P=null;break}if(w=P.sibling,w!==null){w.return=P.return,P=w;break}P=P.return}w=P}nr(i,o,y.children,d),o=o.child}return o;case 9:return y=o.type,m=o.pendingProps.children,Bo(o,d),y=Lr(y),m=m(y),o.flags|=1,nr(i,o,m,d),o.child;case 14:return m=o.type,y=nn(m,o.pendingProps),y=nn(m.type,y),$b(i,o,m,y,d);case 15:return Lb(i,o,o.type,o.pendingProps,d);case 17:return m=o.type,y=o.pendingProps,y=o.elementType===m?y:nn(m,y),Zc(i,o),o.tag=1,dr(m)?(i=!0,Tc(o)):i=!1,Bo(o,d),Cb(o,m,y),nm(o,m,y,d),sm(null,o,m,!0,i,d);case 19:return Gb(i,o,d);case 22:return zb(i,o,d)}throw Error(r(156,o.tag))};function g1(i,o){return Q0(i,o)}function T5(i,o,d,m){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Br(i,o,d,m){return new T5(i,o,d,m)}function Pm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function D5(i){if(typeof i=="function")return Pm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===R)return 11;if(i===ve)return 14}return 2}function Ui(i,o){var d=i.alternate;return d===null?(d=Br(i.tag,o,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=o,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&14680064,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,o=i.dependencies,d.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d}function ud(i,o,d,m,y,w){var P=2;if(m=i,typeof i=="function")Pm(i)&&(P=1);else if(typeof i=="string")P=5;else e:switch(i){case M:return Ia(d.children,y,w,o);case U:P=8,y|=8;break;case W:return i=Br(12,d,o,y|2),i.elementType=W,i.lanes=w,i;case ce:return i=Br(13,d,o,y),i.elementType=ce,i.lanes=w,i;case Z:return i=Br(19,d,o,y),i.elementType=Z,i.lanes=w,i;case pe:return cd(d,y,w,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:P=10;break e;case Y:P=9;break e;case R:P=11;break e;case ve:P=14;break e;case be:P=16,m=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return o=Br(P,d,o,y),o.elementType=i,o.type=m,o.lanes=w,o}function Ia(i,o,d,m){return i=Br(7,i,m,o),i.lanes=d,i}function cd(i,o,d,m){return i=Br(22,i,m,o),i.elementType=pe,i.lanes=d,i.stateNode={isHidden:!1},i}function Am(i,o,d){return i=Br(6,i,null,o),i.lanes=d,i}function Cm(i,o,d){return o=Br(4,i.children!==null?i.children:[],i.key,o),o.lanes=d,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function R5(i,o,d,m,y){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=rp(0),this.expirationTimes=rp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rp(0),this.identifierPrefix=m,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Om(i,o,d,m,y,w,P,I,D){return i=new R5(i,o,d,I,D),o===1?(o=1,w===!0&&(o|=8)):o=0,w=Br(3,null,null,o),i.current=w,w.stateNode=i,w.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wp(w),i}function $5(i,o,d){var m=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),$m.exports=X5(),$m.exports}var _1;function Z5(){if(_1)return xd;_1=1;var e=AN();return xd.createRoot=e.createRoot,xd.hydrateRoot=e.hydrateRoot,xd}var J5=Z5();const eM=Xv(J5);var Hu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qa,Zi,gs,vN,tM=(vN=class extends Hu{constructor(){super();Te(this,qa);Te(this,Zi);Te(this,gs);ge(this,gs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,Zi)||this.setEventListener(L(this,gs))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Zi))==null||t.call(this),ge(this,Zi,void 0))}setEventListener(t){var r;ge(this,gs,t),(r=L(this,Zi))==null||r.call(this),ge(this,Zi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,qa)!==t&&(ge(this,qa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,qa)=="boolean"?L(this,qa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qa=new WeakMap,Zi=new WeakMap,gs=new WeakMap,vN),Zv=new tM,rM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ji,Yv,yN,nM=(yN=class{constructor(){Te(this,Ji,rM);Te(this,Yv,!1)}setTimeoutProvider(e){ge(this,Ji,e)}setTimeout(e,t){return L(this,Ji).setTimeout(e,t)}clearTimeout(e){L(this,Ji).clearTimeout(e)}setInterval(e,t){return L(this,Ji).setInterval(e,t)}clearInterval(e){L(this,Ji).clearInterval(e)}},Ji=new WeakMap,Yv=new WeakMap,yN),Ua=new nM;function iM(e){setTimeout(e,0)}var aM=typeof window>"u"||"Deno"in globalThis;function vr(){}function oM(e,t){return typeof e=="function"?e(t):e}function _g(e){return typeof e=="number"&&e>=0&&e!==1/0}function CN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sa(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){return typeof e=="function"?e(t):e}function M1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:s,queryKey:u,stale:l}=e;if(u){if(n){if(t.queryHash!==Jv(u,t.options))return!1}else if(!hu(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||s&&!s(t))}function I1(e,t){const{exact:r,status:n,predicate:a,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(fu(t.options.mutationKey)!==fu(s))return!1}else if(!hu(t.options.mutationKey,s))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function Jv(e,t){return((t==null?void 0:t.queryKeyHashFn)||fu)(e)}function fu(e){return JSON.stringify(e,(t,r)=>Ig(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function hu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>hu(e[r],t[r])):!1}var sM=Object.prototype.hasOwnProperty;function ON(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=T1(e)&&T1(t);if(!n&&!(Ig(e)&&Ig(t)))return t;const s=(n?e:Object.keys(e)).length,u=n?t:Object.keys(t),l=u.length,f=n?new Array(l):{};let h=0;for(let p=0;p{Ua.setTimeout(t,e)})}function Tg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?ON(e,t):t}function uM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function cM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ey=Symbol();function _N(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ey?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function MN(e,t){return typeof e=="function"?e(...t):!!e}function dM(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var pu=(()=>{let e=()=>aM;return{isServer(){return e()},setIsServer(t){e=t}}})();function Dg(){let e,t;const r=new Promise((a,s)=>{e=a,t=s});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var fM=iM;function hM(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=fM;const s=l=>{t?e.push(l):a(()=>{r(l)})},u=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(f=>{r(f)})})})};return{batch:l=>{let f;t++;try{f=l()}finally{t--,t||u()}return f},batchCalls:l=>(...f)=>{s(()=>{l(...f)})},schedule:s,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Wt=hM(),vs,ea,ys,xN,pM=(xN=class extends Hu{constructor(){super();Te(this,vs,!0);Te(this,ea);Te(this,ys);ge(this,ys,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,ea)||this.setEventListener(L(this,ys))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ea))==null||t.call(this),ge(this,ea,void 0))}setEventListener(t){var r;ge(this,ys,t),(r=L(this,ea))==null||r.call(this),ge(this,ea,t(this.setOnline.bind(this)))}setOnline(t){L(this,vs)!==t&&(ge(this,vs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,vs)}},vs=new WeakMap,ea=new WeakMap,ys=new WeakMap,xN),rf=new pM;function mM(e){return Math.min(1e3*2**e,3e4)}function IN(e){return(e??"online")==="online"?rf.isOnline():!0}var Rg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function TN(e){let t=!1,r=0,n;const a=Dg(),s=()=>a.status!=="pending",u=k=>{var S;if(!s()){const N=new Rg(k);v(N),(S=e.onCancel)==null||S.call(e,N)}},l=()=>{t=!0},f=()=>{t=!1},h=()=>Zv.isFocused()&&(e.networkMode==="always"||rf.isOnline())&&e.canRun(),p=()=>IN(e.networkMode)&&e.canRun(),g=k=>{s()||(n==null||n(),a.resolve(k))},v=k=>{s()||(n==null||n(),a.reject(k))},b=()=>new Promise(k=>{var S;n=N=>{(s()||h())&&k(N)},(S=e.onPause)==null||S.call(e)}).then(()=>{var k;n=void 0,s()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(s())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 E;if(s())return;const A=e.retry??(pu.isServer()?0:3),O=e.retryDelay??mM,C=typeof O=="function"?O(r,N):O,_=A===!0||typeof A=="number"&&rh()?void 0:b()).then(()=>{t?v(N):j()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(n==null||n(),a),cancelRetry:l,continueRetry:f,canStart:p,start:()=>(p()?j():b().then(j),a)}}var Qa,bN,DN=(bN=class{constructor(){Te(this,Qa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_g(this.gcTime)&&ge(this,Qa,Ua.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pu.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,Qa)!==void 0&&(Ua.clearTimeout(L(this,Qa)),ge(this,Qa,void 0))}},Qa=new WeakMap,bN);function gM(e){return{onFetch:(t,r)=>{var p,g,v,b,j;const n=t.options,a=(v=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,s=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let l={pages:[],pageParams:[]},f=0;const h=async()=>{let k=!1;const S=O=>{dM(O,()=>t.signal,()=>k=!0)},N=_N(t.options,t.fetchOptions),A=async(O,C,_)=>{if(k)return Promise.reject(t.signal.reason);if(C==null&&O.pages.length)return Promise.resolve(O);const M=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:C,direction:_?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),U=await N(M),{maxPages:W}=t.options,V=_?cM:uM;return{pages:V(O.pages,U,W),pageParams:V(O.pageParams,C,W)}};if(a&&s.length){const O=a==="backward",C=O?vM:R1,_={pages:s,pageParams:u},E=C(n,_);l=await A(_,E,O)}else{const O=e??s.length;do{const C=f===0?u[0]??n.initialPageParam:R1(n,l);if(f>0&&C==null)break;l=await A(l,C),f++}while(f{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 R1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function vM(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 xs,Ya,bs,Hr,Xa,Mt,zu,Za,Ar,RN,Jn,wN,yM=(wN=class extends DN{constructor(t){super();Te(this,Ar);Te(this,xs);Te(this,Ya);Te(this,bs);Te(this,Hr);Te(this,Xa);Te(this,Mt);Te(this,zu);Te(this,Za);ge(this,Za,!1),ge(this,zu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,Xa,t.client),ge(this,Hr,L(this,Xa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,Ya,L1(this.options)),this.state=t.state??L(this,Ya),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,xs)}get promise(){var t;return(t=L(this,Mt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,zu),...t},t!=null&&t._type&&ge(this,xs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=L1(this.options);r.data!==void 0&&(this.setState($1(r.data,r.dataUpdatedAt)),ge(this,Ya,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Hr).remove(this)}setData(t,r){const n=Tg(this.state.data,t,this.options);return ze(this,Ar,Jn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){ze(this,Ar,Jn).call(this,{type:"setState",state:t})}cancel(t){var n,a;const r=(n=L(this,Mt))==null?void 0:n.promise;return(a=L(this,Mt))==null||a.cancel(t),r?r.then(vr).catch(vr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,Ya)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ey||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>sa(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:!CN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Mt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,Mt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Hr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,Mt)&&(L(this,Za)||ze(this,Ar,RN).call(this)?L(this,Mt).cancel({revert:!0}):L(this,Mt).cancelRetry()),this.scheduleGc()),L(this,Hr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ze(this,Ar,Jn).call(this,{type:"invalidate"})}async fetch(t,r){var h,p,g,v,b,j,k,S,N,A,O;if(this.state.fetchStatus!=="idle"&&((h=L(this,Mt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,Mt))return L(this,Mt).continueRetry(),L(this,Mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const C=this.observers.find(_=>_.options.queryFn);C&&this.setOptions(C.options)}const n=new AbortController,a=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(ge(this,Za,!0),n.signal)})},s=()=>{const C=_N(this.options,r),E=(()=>{const M={client:L(this,Xa),queryKey:this.queryKey,meta:this.meta};return a(M),M})();return ge(this,Za,!1),this.options.persister?this.options.persister(C,E,this):C(E)},l=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,Xa),state:this.state,fetchFn:s};return a(C),C})(),f=L(this,xs)==="infinite"?gM(this.options.pages):this.options.behavior;f==null||f.onFetch(l,this),ge(this,bs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=l.fetchOptions)==null?void 0:p.meta))&&ze(this,Ar,Jn).call(this,{type:"fetch",meta:(g=l.fetchOptions)==null?void 0:g.meta}),ge(this,Mt,TN({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:C=>{C instanceof Rg&&C.revert&&this.setState({...L(this,bs),fetchStatus:"idle"}),n.abort()},onFail:(C,_)=>{ze(this,Ar,Jn).call(this,{type:"failed",failureCount:C,error:_})},onPause:()=>{ze(this,Ar,Jn).call(this,{type:"pause"})},onContinue:()=>{ze(this,Ar,Jn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const C=await L(this,Mt).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(b=(v=L(this,Hr).config).onSuccess)==null||b.call(v,C,this),(k=(j=L(this,Hr).config).onSettled)==null||k.call(j,C,this.state.error,this),C}catch(C){if(C instanceof Rg){if(C.silent)return L(this,Mt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw ze(this,Ar,Jn).call(this,{type:"error",error:C}),(N=(S=L(this,Hr).config).onError)==null||N.call(S,C,this),(O=(A=L(this,Hr).config).onSettled)==null||O.call(A,this.state.data,C,this),C}finally{this.scheduleGc()}}},xs=new WeakMap,Ya=new WeakMap,bs=new WeakMap,Hr=new WeakMap,Xa=new WeakMap,Mt=new WeakMap,zu=new WeakMap,Za=new WeakMap,Ar=new WeakSet,RN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Jn=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,...$N(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...$1(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,bs,t.manual?a:void 0),a;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Wt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Hr).notify({query:this,type:"updated",action:t})})},wN);function $N(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:IN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $1(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function L1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var gr,Ue,Fu,ar,Ja,ws,ti,ta,Bu,js,ks,eo,to,ra,Ss,qe,au,$g,Lg,zg,Fg,Bg,Ug,Wg,LN,jN,xM=(jN=class extends Hu{constructor(t,r){super();Te(this,qe);Te(this,gr);Te(this,Ue);Te(this,Fu);Te(this,ar);Te(this,Ja);Te(this,ws);Te(this,ti);Te(this,ta);Te(this,Bu);Te(this,js);Te(this,ks);Te(this,eo);Te(this,to);Te(this,ra);Te(this,Ss,new Set);this.options=r,ge(this,gr,t),ge(this,ta,null),ge(this,ti,Dg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ue).addObserver(this),z1(L(this,Ue),this.options)?ze(this,qe,au).call(this):this.updateResult(),ze(this,qe,Fg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hg(L(this,Ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hg(L(this,Ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ze(this,qe,Bg).call(this),ze(this,qe,Ug).call(this),L(this,Ue).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,Ue);if(this.options=L(this,gr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cr(this.options.enabled,L(this,Ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ze(this,qe,Wg).call(this),L(this,Ue).setOptions(this.options),r._defaulted&&!Mg(this.options,r)&&L(this,gr).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ue),observer:this});const a=this.hasListeners();a&&F1(L(this,Ue),n,this.options,r)&&ze(this,qe,au).call(this),this.updateResult(),a&&(L(this,Ue)!==n||Cr(this.options.enabled,L(this,Ue))!==Cr(r.enabled,L(this,Ue))||sa(this.options.staleTime,L(this,Ue))!==sa(r.staleTime,L(this,Ue)))&&ze(this,qe,$g).call(this);const s=ze(this,qe,Lg).call(this);a&&(L(this,Ue)!==n||Cr(this.options.enabled,L(this,Ue))!==Cr(r.enabled,L(this,Ue))||s!==L(this,ra))&&ze(this,qe,zg).call(this,s)}getOptimisticResult(t){const r=L(this,gr).getQueryCache().build(L(this,gr),t),n=this.createResult(r,t);return wM(this,n)&&(ge(this,ar,n),ge(this,ws,this.options),ge(this,Ja,L(this,Ue).state)),n}getCurrentResult(){return L(this,ar)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ti).status==="pending"&&L(this,ti).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(t){L(this,Ss).add(t)}getCurrentQuery(){return L(this,Ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,gr).defaultQueryOptions(t),n=L(this,gr).getQueryCache().build(L(this,gr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ze(this,qe,au).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,ar)))}createResult(t,r){var W;const n=L(this,Ue),a=this.options,s=L(this,ar),u=L(this,Ja),l=L(this,ws),h=t!==n?t.state:L(this,Fu),{state:p}=t;let g={...p},v=!1,b;if(r._optimisticResults){const V=this.hasListeners(),Y=!V&&z1(t,r),R=V&&F1(t,n,r,a);(Y||R)&&(g={...g,...$N(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:S}=g;b=g.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&S==="pending"){let V;s!=null&&s.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(V=s.data,N=!0):V=typeof r.placeholderData=="function"?r.placeholderData((W=L(this,ks))==null?void 0:W.state.data,L(this,ks)):r.placeholderData,V!==void 0&&(S="success",b=Tg(s==null?void 0:s.data,V,r),v=!0)}if(r.select&&b!==void 0&&!N)if(s&&b===(u==null?void 0:u.data)&&r.select===L(this,Bu))b=L(this,js);else try{ge(this,Bu,r.select),b=r.select(b),b=Tg(s==null?void 0:s.data,b,r),ge(this,js,b),ge(this,ta,null)}catch(V){ge(this,ta,V)}L(this,ta)&&(j=L(this,ta),b=L(this,js),k=Date.now(),S="error");const A=g.fetchStatus==="fetching",O=S==="pending",C=S==="error",_=O&&A,E=b!==void 0,U={status:S,fetchStatus:g.fetchStatus,isPending:O,isSuccess:S==="success",isError:C,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:A,isRefetching:A&&!O,isLoadingError:C&&!E,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:C&&E,isStale:ty(t,r),refetch:this.refetch,promise:L(this,ti),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const V=U.data!==void 0,Y=U.status==="error"&&!V,R=ve=>{Y?ve.reject(U.error):V&&ve.resolve(U.data)},ce=()=>{const ve=ge(this,ti,U.promise=Dg());R(ve)},Z=L(this,ti);switch(Z.status){case"pending":t.queryHash===n.queryHash&&R(Z);break;case"fulfilled":(Y||U.data!==Z.value)&&ce();break;case"rejected":(!Y||U.error!==Z.reason)&&ce();break}}return U}updateResult(){const t=L(this,ar),r=this.createResult(L(this,Ue),this.options);if(ge(this,Ja,L(this,Ue).state),ge(this,ws,this.options),L(this,Ja).data!==void 0&&ge(this,ks,L(this,Ue)),Mg(r,t))return;ge(this,ar,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!L(this,Ss).size)return!0;const u=new Set(s??L(this,Ss));return this.options.throwOnError&&u.add("error"),Object.keys(L(this,ar)).some(l=>{const f=l;return L(this,ar)[f]!==t[f]&&u.has(f)})};ze(this,qe,LN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ze(this,qe,Fg).call(this)}},gr=new WeakMap,Ue=new WeakMap,Fu=new WeakMap,ar=new WeakMap,Ja=new WeakMap,ws=new WeakMap,ti=new WeakMap,ta=new WeakMap,Bu=new WeakMap,js=new WeakMap,ks=new WeakMap,eo=new WeakMap,to=new WeakMap,ra=new WeakMap,Ss=new WeakMap,qe=new WeakSet,au=function(t){ze(this,qe,Wg).call(this);let r=L(this,Ue).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(vr)),r},$g=function(){ze(this,qe,Bg).call(this);const t=sa(this.options.staleTime,L(this,Ue));if(pu.isServer()||L(this,ar).isStale||!_g(t))return;const n=CN(L(this,ar).dataUpdatedAt,t)+1;ge(this,eo,Ua.setTimeout(()=>{L(this,ar).isStale||this.updateResult()},n))},Lg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ue)):this.options.refetchInterval)??!1},zg=function(t){ze(this,qe,Ug).call(this),ge(this,ra,t),!(pu.isServer()||Cr(this.options.enabled,L(this,Ue))===!1||!_g(L(this,ra))||L(this,ra)===0)&&ge(this,to,Ua.setInterval(()=>{(this.options.refetchIntervalInBackground||Zv.isFocused())&&ze(this,qe,au).call(this)},L(this,ra)))},Fg=function(){ze(this,qe,$g).call(this),ze(this,qe,zg).call(this,ze(this,qe,Lg).call(this))},Bg=function(){L(this,eo)!==void 0&&(Ua.clearTimeout(L(this,eo)),ge(this,eo,void 0))},Ug=function(){L(this,to)!==void 0&&(Ua.clearInterval(L(this,to)),ge(this,to,void 0))},Wg=function(){const t=L(this,gr).getQueryCache().build(L(this,gr),this.options);if(t===L(this,Ue))return;const r=L(this,Ue);ge(this,Ue,t),ge(this,Fu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},LN=function(t){Wt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,ar))}),L(this,gr).getQueryCache().notify({query:L(this,Ue),type:"observerResultsUpdated"})})},jN);function bM(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function z1(e,t){return bM(e,t)||e.state.data!==void 0&&Hg(e,t,t.refetchOnMount)}function Hg(e,t,r){if(Cr(t.enabled,e)!==!1&&sa(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&ty(e,t)}return!1}function F1(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ty(e,r)}function ty(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(sa(t.staleTime,e))}function wM(e,t){return!Mg(e.getCurrentResult(),t)}var Uu,En,Jt,ro,Pn,Vi,kN,jM=(kN=class extends DN{constructor(t){super();Te(this,Pn);Te(this,Uu);Te(this,En);Te(this,Jt);Te(this,ro);ge(this,Uu,t.client),this.mutationId=t.mutationId,ge(this,Jt,t.mutationCache),ge(this,En,[]),this.state=t.state||kM(),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,En).includes(t)||(L(this,En).push(t),this.clearGcTimeout(),L(this,Jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,En,L(this,En).filter(r=>r!==t)),this.scheduleGc(),L(this,Jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,En).length||(this.state.status==="pending"?this.scheduleGc():L(this,Jt).remove(this))}continue(){var t;return((t=L(this,ro))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,l,f,h,p,g,v,b,j,k,S,N,A,O,C,_,E,M;const r=()=>{ze(this,Pn,Vi).call(this,{type:"continue"})},n={client:L(this,Uu),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,ro,TN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(U,W)=>{ze(this,Pn,Vi).call(this,{type:"failed",failureCount:U,error:W})},onPause:()=>{ze(this,Pn,Vi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Jt).canRun(this)}));const a=this.state.status==="pending",s=!L(this,ro).canStart();try{if(a)r();else{ze(this,Pn,Vi).call(this,{type:"pending",variables:t,isPaused:s}),L(this,Jt).config.onMutate&&await L(this,Jt).config.onMutate(t,this,n);const W=await((l=(u=this.options).onMutate)==null?void 0:l.call(u,t,n));W!==this.state.context&&ze(this,Pn,Vi).call(this,{type:"pending",context:W,variables:t,isPaused:s})}const U=await L(this,ro).start();return await((h=(f=L(this,Jt).config).onSuccess)==null?void 0:h.call(f,U,t,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,U,t,this.state.context,n)),await((b=(v=L(this,Jt).config).onSettled)==null?void 0:b.call(v,U,null,this.state.variables,this.state.context,this,n)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,U,null,t,this.state.context,n)),ze(this,Pn,Vi).call(this,{type:"success",data:U}),U}catch(U){try{await((N=(S=L(this,Jt).config).onError)==null?void 0:N.call(S,U,t,this.state.context,this,n))}catch(W){Promise.reject(W)}try{await((O=(A=this.options).onError)==null?void 0:O.call(A,U,t,this.state.context,n))}catch(W){Promise.reject(W)}try{await((_=(C=L(this,Jt).config).onSettled)==null?void 0:_.call(C,void 0,U,this.state.variables,this.state.context,this,n))}catch(W){Promise.reject(W)}try{await((M=(E=this.options).onSettled)==null?void 0:M.call(E,void 0,U,t,this.state.context,n))}catch(W){Promise.reject(W)}throw ze(this,Pn,Vi).call(this,{type:"error",error:U}),U}finally{L(this,Jt).runNext(this)}}},Uu=new WeakMap,En=new WeakMap,Jt=new WeakMap,ro=new WeakMap,Pn=new WeakSet,Vi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Wt.batch(()=>{L(this,En).forEach(n=>{n.onMutationUpdate(t)}),L(this,Jt).notify({mutation:this,type:"updated",action:t})})},kN);function kM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ri,un,Wu,SN,SM=(SN=class extends Hu{constructor(t={}){super();Te(this,ri);Te(this,un);Te(this,Wu);this.config=t,ge(this,ri,new Set),ge(this,un,new Map),ge(this,Wu,0)}build(t,r,n){const a=new jM({client:t,mutationCache:this,mutationId:++yd(this,Wu)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){L(this,ri).add(t);const r=bd(t);if(typeof r=="string"){const n=L(this,un).get(r);n?n.push(t):L(this,un).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,ri).delete(t)){const r=bd(t);if(typeof r=="string"){const n=L(this,un).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&L(this,un).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=bd(t);if(typeof r=="string"){const n=L(this,un).get(r),a=n==null?void 0:n.find(s=>s.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=bd(t);if(typeof r=="string"){const a=(n=L(this,un).get(r))==null?void 0:n.find(s=>s!==t&&s.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Wt.batch(()=>{L(this,ri).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,ri).clear(),L(this,un).clear()})}getAll(){return Array.from(L(this,ri))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>I1(r,n))}findAll(t={}){return this.getAll().filter(r=>I1(t,r))}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Wt.batch(()=>Promise.all(t.map(r=>r.continue().catch(vr))))}},ri=new WeakMap,un=new WeakMap,Wu=new WeakMap,SN);function bd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var An,NN,NM=(NN=class extends Hu{constructor(t={}){super();Te(this,An);this.config=t,ge(this,An,new Map)}build(t,r,n){const a=r.queryKey,s=r.queryHash??Jv(a,r);let u=this.get(s);return u||(u=new yM({client:t,queryKey:a,queryHash:s,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){L(this,An).has(t.queryHash)||(L(this,An).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,An).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,An).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,An).get(t)}getAll(){return[...L(this,An).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>M1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>M1(t,n)):r}notify(t){Wt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},An=new WeakMap,NN),ft,na,ia,Ns,Es,aa,Ps,As,EN,EM=(EN=class{constructor(e={}){Te(this,ft);Te(this,na);Te(this,ia);Te(this,Ns);Te(this,Es);Te(this,aa);Te(this,Ps);Te(this,As);ge(this,ft,e.queryCache||new NM),ge(this,na,e.mutationCache||new SM),ge(this,ia,e.defaultOptions||{}),ge(this,Ns,new Map),ge(this,Es,new Map),ge(this,aa,0)}mount(){yd(this,aa)._++,L(this,aa)===1&&(ge(this,Ps,Zv.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ft).onFocus())})),ge(this,As,rf.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ft).onOnline())})))}unmount(){var e,t;yd(this,aa)._--,L(this,aa)===0&&((e=L(this,Ps))==null||e.call(this),ge(this,Ps,void 0),(t=L(this,As))==null||t.call(this),ge(this,As,void 0))}isFetching(e){return L(this,ft).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,na).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,ft).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,ft).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(sa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,ft).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=L(this,ft).get(n.queryHash),s=a==null?void 0:a.state.data,u=oM(t,s);if(u!==void 0)return L(this,ft).build(this,n).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Wt.batch(()=>L(this,ft).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,ft).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,ft);Wt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,ft);return Wt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Wt.batch(()=>L(this,ft).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(vr).catch(vr)}invalidateQueries(e,t={}){return Wt.batch(()=>(L(this,ft).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Wt.batch(()=>L(this,ft).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let s=a.fetch(void 0,r);return r.throwOnError||(s=s.catch(vr)),a.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(vr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,ft).build(this,t);return r.isStaleByTime(sa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vr).catch(vr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vr).catch(vr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return rf.isOnline()?L(this,na).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ft)}getMutationCache(){return L(this,na)}getDefaultOptions(){return L(this,ia)}setDefaultOptions(e){ge(this,ia,e)}setQueryDefaults(e,t){L(this,Ns).set(fu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Ns).values()],r={};return t.forEach(n=>{hu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Es).set(fu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Es).values()],r={};return t.forEach(n=>{hu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,ia).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Jv(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===ey&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,ia).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,ft).clear(),L(this,na).clear()}},ft=new WeakMap,na=new WeakMap,ia=new WeakMap,Ns=new WeakMap,Es=new WeakMap,aa=new WeakMap,Ps=new WeakMap,As=new WeakMap,EN),zN=x.createContext(void 0),pa=e=>{const t=x.useContext(zN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},PM=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(zN.Provider,{value:e,children:t})),FN=x.createContext(!1),AM=()=>x.useContext(FN);FN.Provider;function CM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var OM=x.createContext(CM()),_M=()=>x.useContext(OM),MM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?MN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},IM=e=>{x.useEffect(()=>{e.clearReset()},[e])},TM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||MN(r,[e.error,n])),DM=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},RM=(e,t)=>e.isLoading&&e.isFetching&&!t,$M=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,B1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function LM(e,t,r){var b,j,k,S;const n=AM(),a=_M(),s=pa(),u=s.defaultQueryOptions(e);(j=(b=s.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||j.call(b,u);const l=s.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=n?"isRestoring":f?"optimistic":void 0,DM(u),MM(u,a,l),IM(a);const h=!s.getQueryCache().get(u.queryHash),[p]=x.useState(()=>new t(s,u)),g=p.getOptimisticResult(u),v=!n&&f;if(x.useSyncExternalStore(x.useCallback(N=>{const A=v?p.subscribe(Wt.batchCalls(N)):vr;return p.updateResult(),A},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),x.useEffect(()=>{p.setOptions(u)},[u,p]),$M(u,g))throw B1(u,p,a);if(TM({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:l,suspense:u.suspense}))throw g.error;if((S=(k=s.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||S.call(k,u,g),u.experimental_prefetchInRender&&!pu.isServer()&&RM(g,n)){const N=h?B1(u,p,a):l==null?void 0:l.promise;N==null||N.catch(vr).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?g:p.trackResult(g)}function wr(e,t){return LM(e,xM)}/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BN=(...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 FM={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 BM=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:u,...l},f)=>x.createElement("svg",{ref:f,...FM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:BN("lucide",a),...l},[...u.map(([h,p])=>x.createElement(h,p)),...Array.isArray(s)?s:[s]]));/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Oe=(e,t)=>{const r=x.forwardRef(({className:n,...a},s)=>x.createElement(BM,{ref:s,iconNode:t,className:BN(`lucide-${zM(e)}`,n),...a}));return r.displayName=`${e}`,r};/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mu=Oe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const U1=Oe("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 UN=Oe("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 Cs=Oe("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 UM=Oe("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 gu=Oe("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 On=Oe("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 WM=Oe("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 HM=Oe("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 KM=Oe("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 GM=Oe("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 VM=Oe("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 qM=Oe("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 Kg=Oe("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 QM=Oe("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** + * @license lucide-react v0.460.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=Oe("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 Gg=Oe("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 XM=Oe("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 WN=Oe("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 Mr=Oe("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 da=Oe("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 nf=Oe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W1=Oe("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 Vg=Oe("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 ZM=Oe("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 JM=Oe("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 Gd=Oe("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 eI=Oe("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 tI=Oe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vu=Oe("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 rI=Oe("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 nI=Oe("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 iI=Oe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aI=Oe("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 oI=Oe("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 HN=Oe("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 KN=Oe("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 no=Oe("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 sI=Oe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lI=Oe("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 ry=Oe("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 uI=Oe("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 cI=Oe("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 Os=Oe("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 dI=Oe("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 GN=Oe("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 fI=Oe("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const af=Oe("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 qg=Oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yu=Oe("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 hI=Oe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xu=Oe("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 si=Oe("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 cs=Oe("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"}]]),Qg=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:rI},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:UM},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Mr},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:gu},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:oI},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:Cs},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:VM}];var H1=1,pI=.9,mI=.8,gI=.17,Fm=.1,Bm=.999,vI=.9999,yI=.99,xI=/[\\\/_+.#"@\[\(\{&]/,bI=/[\\\/_+.#"@\[\(\{&]/g,wI=/[\s-]/,VN=/[\s-]/g;function Yg(e,t,r,n,a,s,u){if(s===t.length)return a===e.length?H1:yI;var l=`${a},${s}`;if(u[l]!==void 0)return u[l];for(var f=n.charAt(s),h=r.indexOf(f,a),p=0,g,v,b,j;h>=0;)g=Yg(e,t,r,n,h+1,s+1,u),g>p&&(h===a?g*=H1:xI.test(e.charAt(h-1))?(g*=mI,b=e.slice(a,h-1).match(bI),b&&a>0&&(g*=Math.pow(Bm,b.length))):wI.test(e.charAt(h-1))?(g*=pI,j=e.slice(a,h-1).match(VN),j&&a>0&&(g*=Math.pow(Bm,j.length))):(g*=gI,a>0&&(g*=Math.pow(Bm,h-a))),e.charAt(h)!==t.charAt(s)&&(g*=vI)),(gg&&(g=v*Fm)),g>p&&(p=g),h=r.indexOf(f,h+1);return u[l]=p,p}function K1(e){return e.toLowerCase().replace(VN," ")}function jI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Yg(e,t,K1(e),K1(t),0,0,{})}function la(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function G1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _s(...e){return t=>{let r=!1;const n=e.map(a=>{const s=G1(a,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a{var N;const{scope:v,children:b,...j}=g,k=((N=v==null?void 0:v[e])==null?void 0:N[f])||l,S=x.useMemo(()=>j,Object.values(j));return c.jsx(k.Provider,{value:S,children:b})};h.displayName=s+"Provider";function p(g,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[f])||l,j=x.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${s}\``)}return[h,p]}const a=()=>{const s=r.map(u=>x.createContext(u));return function(l){const f=(l==null?void 0:l[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...l,[e]:f}}),[l,f])}};return a.scopeName=e,[n,SI(a,...t)]}function SI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const u=n.reduce((l,{useScope:f,scopeName:h})=>{const g=f(s)[`__scope${h}`];return{...l,...g}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var bu=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},NI=th[" useId ".trim().toString()]||(()=>{}),EI=0;function li(e){const[t,r]=x.useState(NI());return bu(()=>{r(n=>n??String(EI++))},[e]),t?`radix-${t}`:""}var PI=th[" useInsertionEffect ".trim().toString()]||bu;function AI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,s,u]=CI({defaultProp:t,onChange:r}),l=e!==void 0,f=l?e:a;{const p=x.useRef(e!==void 0);x.useEffect(()=>{const g=p.current;g!==l&&console.warn(`${n} is changing from ${g?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=l},[l,n])}const h=x.useCallback(p=>{var g;if(l){const v=OI(p)?p(e):p;v!==e&&((g=u.current)==null||g.call(u,v))}else s(p)},[l,e,s,u]);return[f,h]}function CI({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),a=x.useRef(r),s=x.useRef(t);return PI(()=>{s.current=t},[t]),x.useEffect(()=>{var u;a.current!==r&&((u=s.current)==null||u.call(s,r),a.current=r)},[r,a]),[r,n,s]}function OI(e){return typeof e=="function"}var rh=AN();function qN(e){const t=x.forwardRef((r,n)=>{let{children:a,...s}=r,u=null,l=!1;const f=[];V1(a)&&typeof wd=="function"&&(a=wd(a._payload)),x.Children.forEach(a,v=>{var b;if(DI(v)){l=!0;const j=v;let k="child"in j.props?j.props.child:j.props.children;V1(k)&&typeof wd=="function"&&(k=wd(k._payload)),u=MI(j,k),f.push((b=u==null?void 0:u.props)==null?void 0:b.children)}else f.push(v)}),u?u=x.cloneElement(u,void 0,f):!l&&x.Children.count(a)===1&&x.isValidElement(a)&&(u=a);const h=u?TI(u):void 0,p=vo(n,h);if(!u){if(a||a===0)throw new Error(l?zI(e):LI(e));return a}const g=II(s,u.props??{});return u.type!==x.Fragment&&(g.ref=n?p:h),x.cloneElement(u,g)});return t.displayName=`${e}.Slot`,t}var _I=Symbol.for("radix.slottable"),MI=(e,t)=>{if("child"in e.props){const r=e.props.child;return x.isValidElement(r)?x.cloneElement(r,void 0,e.props.children(r.props.children)):null}return x.isValidElement(t)?t:null};function II(e,t){const r={...t};for(const n in t){const a=e[n],s=t[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...l)=>{const f=s(...l);return a(...l),f}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...e,...r}}function TI(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function DI(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_I}var RI=Symbol.for("react.lazy");function V1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RI&&"_payload"in e&&$I(e._payload)}function $I(e){return typeof e=="object"&&e!==null&&"then"in e}var LI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,zI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,wd=th[" use ".trim().toString()],FI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gt=FI.reduce((e,t)=>{const r=qN(`Primitive.${t}`),n=x.forwardRef((a,s)=>{const{asChild:u,...l}=a,f=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(f,{...l,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function BI(e,t){e&&rh.flushSync(()=>e.dispatchEvent(t))}function wu(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function UI(e,t=globalThis==null?void 0:globalThis.document){const r=wu(e);x.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var WI="DismissableLayer",Xg="dismissableLayer.update",HI="dismissableLayer.pointerDownOutside",KI="dismissableLayer.focusOutside",q1,ny=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),QN=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:l,onDismiss:f,...h}=e,p=x.useContext(ny),[g,v]=x.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=x.useState({}),k=vo(t,W=>v(W)),S=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=S.indexOf(N),O=g?S.indexOf(g):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,_=O>=A,E=x.useRef(!1),M=QI(W=>{const V=W.target;if(!(V instanceof Node))return;const Y=[...p.branches].some(R=>R.contains(V));!_||Y||(s==null||s(W),l==null||l(W),W.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:p.dismissableSurfaces}),U=YI(W=>{if(n&&E.current)return;const V=W.target;[...p.branches].some(R=>R.contains(V))||(u==null||u(W),l==null||l(W),W.defaultPrevented||f==null||f())},b);return UI(W=>{O===p.layers.size-1&&(a==null||a(W),!W.defaultPrevented&&f&&(W.preventDefault(),f()))},b),x.useEffect(()=>{if(g)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(q1=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),Q1(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(g),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=q1))}},[g,b,r,p]),x.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),Q1())},[g,p]),x.useEffect(()=>{const W=()=>j({});return document.addEventListener(Xg,W),()=>document.removeEventListener(Xg,W)},[]),c.jsx(Gt.div,{...h,ref:k,style:{pointerEvents:C?_?"auto":"none":void 0,...e.style},onFocusCapture:la(e.onFocusCapture,U.onFocusCapture),onBlurCapture:la(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:la(e.onPointerDownCapture,M.onPointerDownCapture)})});QN.displayName=WI;var GI="DismissableLayerBranch",VI=x.forwardRef((e,t)=>{const r=x.useContext(ny),n=x.useRef(null),a=vo(t,n);return x.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),c.jsx(Gt.div,{...e,ref:a})});VI.displayName=GI;function qI(){const e=x.useContext(ny),[t,r]=x.useState(null);return x.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function QI(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:s}=t,u=wu(e),l=x.useRef(!1),f=x.useRef(!1),h=x.useRef(new Map),p=x.useRef(()=>{});return x.useEffect(()=>{function g(){f.current=!1,a.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(A){if(!f.current)return;const O=A.target;O instanceof Node&&[...s].some(_=>_.contains(O))||h.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function j(A){f.current&&h.current.set(A.type,!1)}const k=A=>{if(A.target&&!l.current){let O=function(){r.removeEventListener("click",p.current);const _=v();g(),_||YN(HI,u,C,{discrete:!0})};const C={originalEvent:A};f.current=!0,a.current=n&&A.button===0,h.current.clear(),!n||A.button!==0?O():(r.removeEventListener("click",p.current),p.current=O,r.addEventListener("click",p.current,{once:!0}))}else r.removeEventListener("click",p.current),g();l.current=!1},S=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of S)r.addEventListener(A,b,!0),r.addEventListener(A,j);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",k),r.removeEventListener("click",p.current);for(const A of S)r.removeEventListener(A,b,!0),r.removeEventListener(A,j)}},[r,u,n,a,s]),{onPointerDownCapture:()=>l.current=!0}}function YI(e,t=globalThis==null?void 0:globalThis.document){const r=wu(e),n=x.useRef(!1);return x.useEffect(()=>{const a=s=>{s.target&&!n.current&&YN(KI,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Q1(){const e=new CustomEvent(Xg);document.dispatchEvent(e)}function YN(e,t,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?BI(a,s):a.dispatchEvent(s)}var Um="focusScope.autoFocusOnMount",Wm="focusScope.autoFocusOnUnmount",Y1={bubbles:!1,cancelable:!0},XI="FocusScope",XN=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...u}=e,[l,f]=x.useState(null),h=wu(a),p=wu(s),g=x.useRef(null),v=vo(t,k=>f(k)),b=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let k=function(O){if(b.paused||!l)return;const C=O.target;l.contains(C)?g.current=C:qi(g.current,{select:!0})},S=function(O){if(b.paused||!l)return;const C=O.relatedTarget;C!==null&&(l.contains(C)||qi(g.current,{select:!0}))},N=function(O){if(document.activeElement===document.body)for(const _ of O)_.removedNodes.length>0&&qi(l)};document.addEventListener("focusin",k),document.addEventListener("focusout",S);const A=new MutationObserver(N);return l&&A.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",S),A.disconnect()}}},[n,l,b.paused]),x.useEffect(()=>{if(l){Z1.add(b);const k=document.activeElement;if(!l.contains(k)){const N=new CustomEvent(Um,Y1);l.addEventListener(Um,h),l.dispatchEvent(N),N.defaultPrevented||(ZI(n3(ZN(l)),{select:!0}),document.activeElement===k&&qi(l))}return()=>{l.removeEventListener(Um,h),setTimeout(()=>{const N=new CustomEvent(Wm,Y1);l.addEventListener(Wm,p),l.dispatchEvent(N),N.defaultPrevented||qi(k??document.body,{select:!0}),l.removeEventListener(Wm,p),Z1.remove(b)},0)}}},[l,h,p,b]);const j=x.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 A=k.currentTarget,[O,C]=JI(A);O&&C?!k.shiftKey&&N===C?(k.preventDefault(),r&&qi(O,{select:!0})):k.shiftKey&&N===O&&(k.preventDefault(),r&&qi(C,{select:!0})):N===A&&k.preventDefault()}},[r,n,b.paused]);return c.jsx(Gt.div,{tabIndex:-1,...u,ref:v,onKeyDown:j})});XN.displayName=XI;function ZI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qi(n,{select:t}),document.activeElement!==r)return}function JI(e){const t=ZN(e),r=X1(t,e),n=X1(t.reverse(),e);return[r,n]}function ZN(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function X1(e,t){for(const r of e)if(!e3(r,{upTo:t}))return r}function e3(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 t3(e){return e instanceof HTMLInputElement&&"select"in e}function qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&t3(e)&&t&&e.select()}}var Z1=r3();function r3(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=J1(e,t),e.unshift(t)},remove(t){var r;e=J1(e,t),(r=e[0])==null||r.resume()}}}function J1(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function n3(e){return e.filter(t=>t.tagName!=="A")}var i3="Portal",JN=x.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,s]=x.useState(!1);bu(()=>s(!0),[]);const u=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return u?rh.createPortal(c.jsx(Gt.div,{...n,ref:t}),u):null});JN.displayName=i3;function a3(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var nh=e=>{const{present:t,children:r}=e,n=o3(t),a=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),s=s3(n.ref,l3(a));return typeof r=="function"||n.isPresent?x.cloneElement(a,{ref:s}):null};nh.displayName="Presence";function o3(e){const[t,r]=x.useState(),n=x.useRef(null),a=x.useRef(e),s=x.useRef("none"),u=e?"mounted":"unmounted",[l,f]=a3(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const h=jd(n.current);s.current=l==="mounted"?h:"none"},[l]),bu(()=>{const h=n.current,p=a.current;if(p!==e){const v=s.current,b=jd(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&v!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),bu(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,g=b=>{const k=jd(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},v=b=>{b.target===t&&(s.current=jd(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function ew(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function s3(...e){const t=x.useRef(e);return t.current=e,x.useCallback(r=>{const n=t.current;let a=!1;const s=n.map(u=>{const l=ew(u,r);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let u=0;u{jn||(jn={start:tw(),end:tw()});const{start:e,end:t}=jn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),kd++,()=>{kd===1&&(jn==null||jn.start.remove(),jn==null||jn.end.remove(),jn=null),kd=Math.max(0,kd-1)}},[])}function tw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Cn=function(){return Cn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n"u")return E3;var t=P3(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])}},C3=n2(),ds="data-scroll-locked",O3=function(e,t,r,n){var a=e.left,s=e.top,u=e.right,l=e.gap;return r===void 0&&(r="margin"),` + .`.concat(d3,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(l,"px ").concat(n,`; + } + body[`).concat(ds,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(a,`px; + padding-top: `).concat(s,`px; + padding-right: `).concat(u,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(l,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(Vd,` { + right: `).concat(l,"px ").concat(n,`; + } + + .`).concat(qd,` { + margin-right: `).concat(l,"px ").concat(n,`; + } + + .`).concat(Vd," .").concat(Vd,` { + right: 0 `).concat(n,`; + } + + .`).concat(qd," .").concat(qd,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(ds,`] { + `).concat(f3,": ").concat(l,`px; + } +`)},nw=function(){var e=parseInt(document.body.getAttribute(ds)||"0",10);return isFinite(e)?e:0},_3=function(){x.useEffect(function(){return document.body.setAttribute(ds,(nw()+1).toString()),function(){var e=nw()-1;e<=0?document.body.removeAttribute(ds):document.body.setAttribute(ds,e.toString())}},[])},M3=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;_3();var s=x.useMemo(function(){return A3(a)},[a]);return x.createElement(C3,{styles:O3(s,!t,a,r?"":"!important")})},Zg=!1;if(typeof window<"u")try{var Sd=Object.defineProperty({},"passive",{get:function(){return Zg=!0,!0}});window.addEventListener("test",Sd,Sd),window.removeEventListener("test",Sd,Sd)}catch{Zg=!1}var qo=Zg?{passive:!1}:!1,I3=function(e){return e.tagName==="TEXTAREA"},i2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!I3(e)&&r[t]==="visible")},T3=function(e){return i2(e,"overflowY")},D3=function(e){return i2(e,"overflowX")},iw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=a2(e,n);if(a){var s=o2(e,n),u=s[1],l=s[2];if(u>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},R3=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},$3=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},a2=function(e,t){return e==="v"?T3(t):D3(t)},o2=function(e,t){return e==="v"?R3(t):$3(t)},L3=function(e,t){return e==="h"&&t==="rtl"?-1:1},z3=function(e,t,r,n,a){var s=L3(e,window.getComputedStyle(t).direction),u=s*n,l=r.target,f=t.contains(l),h=!1,p=u>0,g=0,v=0;do{if(!l)break;var b=o2(e,l),j=b[0],k=b[1],S=b[2],N=k-S-s*j;(j||N)&&a2(e,l)&&(g+=N,v+=j);var A=l.parentNode;l=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!f&&l!==document.body||f&&(t.contains(l)||t===l));return(p&&Math.abs(g)<1||!p&&Math.abs(v)<1)&&(h=!0),h},Nd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aw=function(e){return[e.deltaX,e.deltaY]},ow=function(e){return e&&"current"in e?e.current:e},F3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},B3=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},U3=0,Qo=[];function W3(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),a=x.useState(U3++)[0],s=x.useState(n2)[0],u=x.useRef(e);x.useEffect(function(){u.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=c3([e.lockRef.current],(e.shards||[]).map(ow),!0).filter(Boolean);return k.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback(function(k,S){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var N=Nd(k),A=r.current,O="deltaX"in k?k.deltaX:A[0]-N[0],C="deltaY"in k?k.deltaY:A[1]-N[1],_,E=k.target,M=Math.abs(O)>Math.abs(C)?"h":"v";if("touches"in k&&M==="h"&&E.type==="range")return!1;var U=window.getSelection(),W=U&&U.anchorNode,V=W?W===E||W.contains(E):!1;if(V)return!1;var Y=iw(M,E);if(!Y)return!0;if(Y?_=M:(_=M==="v"?"h":"v",Y=iw(M,E)),!Y)return!1;if(!n.current&&"changedTouches"in k&&(O||C)&&(n.current=_),!_)return!0;var R=n.current||_;return z3(R,S,k,R==="h"?O:C)},[]),f=x.useCallback(function(k){var S=k;if(!(!Qo.length||Qo[Qo.length-1]!==s)){var N="deltaY"in S?aw(S):Nd(S),A=t.current.filter(function(_){return _.name===S.type&&(_.target===S.target||S.target===_.shadowParent)&&F3(_.delta,N)})[0];if(A&&A.should){S.cancelable&&S.preventDefault();return}if(!A){var O=(u.current.shards||[]).map(ow).filter(Boolean).filter(function(_){return _.contains(S.target)}),C=O.length>0?l(S,O[0]):!u.current.noIsolation;C&&S.cancelable&&S.preventDefault()}}},[]),h=x.useCallback(function(k,S,N,A){var O={name:k,delta:S,target:N,should:A,shadowParent:H3(N)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(C){return C!==O})},1)},[]),p=x.useCallback(function(k){r.current=Nd(k),n.current=void 0},[]),g=x.useCallback(function(k){h(k.type,aw(k),k.target,l(k,e.lockRef.current))},[]),v=x.useCallback(function(k){h(k.type,Nd(k),k.target,l(k,e.lockRef.current))},[]);x.useEffect(function(){return Qo.push(s),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",f,qo),document.addEventListener("touchmove",f,qo),document.addEventListener("touchstart",p,qo),function(){Qo=Qo.filter(function(k){return k!==s}),document.removeEventListener("wheel",f,qo),document.removeEventListener("touchmove",f,qo),document.removeEventListener("touchstart",p,qo)}},[]);var b=e.removeScrollBar,j=e.inert;return x.createElement(x.Fragment,null,j?x.createElement(s,{styles:B3(a)}):null,b?x.createElement(M3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const K3=x3(r2,W3);var s2=x.forwardRef(function(e,t){return x.createElement(ih,Cn({},e,{ref:t,sideCar:K3}))});s2.classNames=ih.classNames;var G3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yo=new WeakMap,Ed=new WeakMap,Pd={},Vm=0,l2=function(e){return e&&(e.host||l2(e.parentNode))},V3=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=l2(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})},q3=function(e,t,r,n){var a=V3(t,Array.isArray(e)?e:[e]);Pd[r]||(Pd[r]=new WeakMap);var s=Pd[r],u=[],l=new Set,f=new Set(a),h=function(g){!g||l.has(g)||(l.add(g),h(g.parentNode))};a.forEach(h);var p=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(v){if(l.has(v))p(v);else try{var b=v.getAttribute(n),j=b!==null&&b!=="false",k=(Yo.get(v)||0)+1,S=(s.get(v)||0)+1;Yo.set(v,k),s.set(v,S),u.push(v),k===1&&j&&Ed.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 p(t),l.clear(),Vm++,function(){u.forEach(function(g){var v=Yo.get(g)-1,b=s.get(g)-1;Yo.set(g,v),s.set(g,b),v||(Ed.has(g)||g.removeAttribute(n),Ed.delete(g)),b||g.removeAttribute(r)}),Vm--,Vm||(Yo=new WeakMap,Yo=new WeakMap,Ed=new WeakMap,Pd={})}},Q3=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=G3(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),q3(n,a,r,"aria-hidden")):function(){return null}},ah="Dialog",[u2]=kI(ah),[Y3,mn]=u2(ah),c2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:s,modal:u=!0}=e,l=x.useRef(null),f=x.useRef(null),[h,p]=AI({prop:n,defaultProp:a??!1,onChange:s,caller:ah});return c.jsx(Y3,{scope:t,triggerRef:l,contentRef:f,contentId:li(),titleId:li(),descriptionId:li(),open:h,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(g=>!g),[p]),modal:u,children:r})};c2.displayName=ah;var d2="DialogTrigger",X3=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=mn(d2,r),s=vo(t,a.triggerRef);return c.jsx(Gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":ay(a.open),...n,ref:s,onClick:la(e.onClick,a.onOpenToggle)})});X3.displayName=d2;var iy="DialogPortal",[Z3,f2]=u2(iy,{forceMount:void 0}),h2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,s=mn(iy,t);return c.jsx(Z3,{scope:t,forceMount:r,children:x.Children.map(n,u=>c.jsx(nh,{present:r||s.open,children:c.jsx(JN,{asChild:!0,container:a,children:u})}))})};h2.displayName=iy;var of="DialogOverlay",p2=x.forwardRef((e,t)=>{const r=f2(of,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=mn(of,e.__scopeDialog);return s.modal?c.jsx(nh,{present:n||s.open,children:c.jsx(eT,{...a,ref:t})}):null});p2.displayName=of;var J3=qN("DialogOverlay.RemoveScroll"),eT=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=mn(of,r),s=qI(),u=vo(t,s);return c.jsx(s2,{as:J3,allowPinchZoom:!0,shards:[a.contentRef],children:c.jsx(Gt.div,{"data-state":ay(a.open),...n,ref:u,style:{pointerEvents:"auto",...n.style}})})}),Ms="DialogContent",m2=x.forwardRef((e,t)=>{const r=f2(Ms,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=mn(Ms,e.__scopeDialog);return c.jsx(nh,{present:n||s.open,children:s.modal?c.jsx(tT,{...a,ref:t}):c.jsx(rT,{...a,ref:t})})});m2.displayName=Ms;var tT=x.forwardRef((e,t)=>{const r=mn(Ms,e.__scopeDialog),n=x.useRef(null),a=vo(t,r.contentRef,n);return x.useEffect(()=>{const s=n.current;if(s)return Q3(s)},[]),c.jsx(g2,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:la(e.onCloseAutoFocus,s=>{var u;s.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:la(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&s.preventDefault()}),onFocusOutside:la(e.onFocusOutside,s=>s.preventDefault())})}),rT=x.forwardRef((e,t)=>{const r=mn(Ms,e.__scopeDialog),n=x.useRef(!1),a=x.useRef(!1);return c.jsx(g2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,l;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:s=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=s.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),g2=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:s,...u}=e,l=mn(Ms,r);return u3(),c.jsx(c.Fragment,{children:c.jsx(XN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:s,children:c.jsx(QN,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ay(l.open),...u,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1)})})})}),v2="DialogTitle",nT=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=mn(v2,r);return c.jsx(Gt.h2,{id:a.titleId,...n,ref:t})});nT.displayName=v2;var y2="DialogDescription",iT=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=mn(y2,r);return c.jsx(Gt.p,{id:a.descriptionId,...n,ref:t})});iT.displayName=y2;var x2="DialogClose",aT=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=mn(x2,r);return c.jsx(Gt.button,{type:"button",...n,ref:t,onClick:la(e.onClick,()=>a.onOpenChange(!1))})});aT.displayName=x2;function ay(e){return e?"open":"closed"}var Gl='[cmdk-group=""]',qm='[cmdk-group-items=""]',oT='[cmdk-group-heading=""]',b2='[cmdk-item=""]',sw=`${b2}:not([aria-disabled="true"])`,Jg="cmdk-item-select",as="data-value",sT=(e,t,r)=>jI(e,t,r),w2=x.createContext(void 0),Ku=()=>x.useContext(w2),j2=x.createContext(void 0),oy=()=>x.useContext(j2),k2=x.createContext(void 0),S2=x.forwardRef((e,t)=>{let r=os(()=>{var T,J;return{search:"",value:(J=(T=e.value)!=null?T:e.defaultValue)!=null?J:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=os(()=>new Set),a=os(()=>new Map),s=os(()=>new Map),u=os(()=>new Set),l=N2(e),{label:f,children:h,value:p,onValueChange:g,filter:v,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:S=!0,...N}=e,A=li(),O=li(),C=li(),_=x.useRef(null),E=yT();so(()=>{if(p!==void 0){let T=p.trim();r.current.value=T,M.emit()}},[p]),so(()=>{E(6,ce)},[]);let M=x.useMemo(()=>({subscribe:T=>(u.current.add(T),()=>u.current.delete(T)),snapshot:()=>r.current,setState:(T,J,oe)=>{var ee,ue,he,Ce;if(!Object.is(r.current[T],J)){if(r.current[T]=J,T==="search")R(),V(),E(1,Y);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let F=document.getElementById(C);F?F.focus():(ee=document.getElementById(A))==null||ee.focus()}if(E(7,()=>{var F;r.current.selectedItemId=(F=Z())==null?void 0:F.id,M.emit()}),oe||E(5,ce),((ue=l.current)==null?void 0:ue.value)!==void 0){let F=J??"";(Ce=(he=l.current).onValueChange)==null||Ce.call(he,F);return}}M.emit()}},emit:()=>{u.current.forEach(T=>T())}}),[]),U=x.useMemo(()=>({value:(T,J,oe)=>{var ee;J!==((ee=s.current.get(T))==null?void 0:ee.value)&&(s.current.set(T,{value:J,keywords:oe}),r.current.filtered.items.set(T,W(J,oe)),E(2,()=>{V(),M.emit()}))},item:(T,J)=>(n.current.add(T),J&&(a.current.has(J)?a.current.get(J).add(T):a.current.set(J,new Set([T]))),E(3,()=>{R(),V(),r.current.value||Y(),M.emit()}),()=>{s.current.delete(T),n.current.delete(T),r.current.filtered.items.delete(T);let oe=Z();E(4,()=>{R(),(oe==null?void 0:oe.getAttribute("id"))===T&&Y(),M.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{s.current.delete(T),a.current.delete(T)}),filter:()=>l.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:A,inputId:C,labelId:O,listInnerRef:_}),[]);function W(T,J){var oe,ee;let ue=(ee=(oe=l.current)==null?void 0:oe.filter)!=null?ee:sT;return T?ue(T,r.current.search,J):0}function V(){if(!r.current.search||l.current.shouldFilter===!1)return;let T=r.current.filtered.items,J=[];r.current.filtered.groups.forEach(ee=>{let ue=a.current.get(ee),he=0;ue.forEach(Ce=>{let F=T.get(Ce);he=Math.max(F,he)}),J.push([ee,he])});let oe=_.current;ve().sort((ee,ue)=>{var he,Ce;let F=ee.getAttribute("id"),se=ue.getAttribute("id");return((he=T.get(se))!=null?he:0)-((Ce=T.get(F))!=null?Ce:0)}).forEach(ee=>{let ue=ee.closest(qm);ue?ue.appendChild(ee.parentElement===ue?ee:ee.closest(`${qm} > *`)):oe.appendChild(ee.parentElement===oe?ee:ee.closest(`${qm} > *`))}),J.sort((ee,ue)=>ue[1]-ee[1]).forEach(ee=>{var ue;let he=(ue=_.current)==null?void 0:ue.querySelector(`${Gl}[${as}="${encodeURIComponent(ee[0])}"]`);he==null||he.parentElement.appendChild(he)})}function Y(){let T=ve().find(oe=>oe.getAttribute("aria-disabled")!=="true"),J=T==null?void 0:T.getAttribute(as);M.setState("value",J||void 0)}function R(){var T,J,oe,ee;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ue=0;for(let he of n.current){let Ce=(J=(T=s.current.get(he))==null?void 0:T.value)!=null?J:"",F=(ee=(oe=s.current.get(he))==null?void 0:oe.keywords)!=null?ee:[],se=W(Ce,F);r.current.filtered.items.set(he,se),se>0&&ue++}for(let[he,Ce]of a.current)for(let F of Ce)if(r.current.filtered.items.get(F)>0){r.current.filtered.groups.add(he);break}r.current.filtered.count=ue}function ce(){var T,J,oe;let ee=Z();ee&&(((T=ee.parentElement)==null?void 0:T.firstChild)===ee&&((oe=(J=ee.closest(Gl))==null?void 0:J.querySelector(oT))==null||oe.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function Z(){var T;return(T=_.current)==null?void 0:T.querySelector(`${b2}[aria-selected="true"]`)}function ve(){var T;return Array.from(((T=_.current)==null?void 0:T.querySelectorAll(sw))||[])}function be(T){let J=ve()[T];J&&M.setState("value",J.getAttribute(as))}function pe(T){var J;let oe=Z(),ee=ve(),ue=ee.findIndex(Ce=>Ce===oe),he=ee[ue+T];(J=l.current)!=null&&J.loop&&(he=ue+T<0?ee[ee.length-1]:ue+T===ee.length?ee[0]:ee[ue+T]),he&&M.setState("value",he.getAttribute(as))}function Q(T){let J=Z(),oe=J==null?void 0:J.closest(Gl),ee;for(;oe&&!ee;)oe=T>0?gT(oe,Gl):vT(oe,Gl),ee=oe==null?void 0:oe.querySelector(sw);ee?M.setState("value",ee.getAttribute(as)):pe(T)}let ne=()=>be(ve().length-1),X=T=>{T.preventDefault(),T.metaKey?ne():T.altKey?Q(1):pe(1)},$=T=>{T.preventDefault(),T.metaKey?be(0):T.altKey?Q(-1):pe(-1)};return x.createElement(Gt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:T=>{var J;(J=N.onKeyDown)==null||J.call(N,T);let oe=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||oe))switch(T.key){case"n":case"j":{S&&T.ctrlKey&&X(T);break}case"ArrowDown":{X(T);break}case"p":case"k":{S&&T.ctrlKey&&$(T);break}case"ArrowUp":{$(T);break}case"Home":{T.preventDefault(),be(0);break}case"End":{T.preventDefault(),ne();break}case"Enter":{T.preventDefault();let ee=Z();if(ee){let ue=new Event(Jg);ee.dispatchEvent(ue)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:bT},f),oh(e,T=>x.createElement(j2.Provider,{value:M},x.createElement(w2.Provider,{value:U},T))))}),lT=x.forwardRef((e,t)=>{var r,n;let a=li(),s=x.useRef(null),u=x.useContext(k2),l=Ku(),f=N2(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:u==null?void 0:u.forceMount;so(()=>{if(!h)return l.item(a,u==null?void 0:u.id)},[h]);let p=E2(a,s,[e.value,e.children,s],e.keywords),g=oy(),v=fa(E=>E.value&&E.value===p.current),b=fa(E=>h||l.filter()===!1?!0:E.search?E.filtered.items.get(a)>0:!0);x.useEffect(()=>{let E=s.current;if(!(!E||e.disabled))return E.addEventListener(Jg,j),()=>E.removeEventListener(Jg,j)},[b,e.onSelect,e.disabled]);function j(){var E,M;k(),(M=(E=f.current).onSelect)==null||M.call(E,p.current)}function k(){g.setState("value",p.current,!0)}if(!b)return null;let{disabled:S,value:N,onSelect:A,forceMount:O,keywords:C,..._}=e;return x.createElement(Gt.div,{ref:_s(s,t),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!v,"data-disabled":!!S,"data-selected":!!v,onPointerMove:S||l.getDisablePointerSelection()?void 0:k,onClick:S?void 0:j},e.children)}),uT=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...s}=e,u=li(),l=x.useRef(null),f=x.useRef(null),h=li(),p=Ku(),g=fa(b=>a||p.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);so(()=>p.group(u),[]),E2(u,l,[e.value,e.heading,f]);let v=x.useMemo(()=>({id:u,forceMount:a}),[a]);return x.createElement(Gt.div,{ref:_s(l,t),...s,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&x.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),oh(e,b=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},x.createElement(k2.Provider,{value:v},b))))}),cT=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=x.useRef(null),s=fa(u=>!u.search);return!r&&!s?null:x.createElement(Gt.div,{ref:_s(a,t),...n,"cmdk-separator":"",role:"separator"})}),dT=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,s=oy(),u=fa(h=>h.search),l=fa(h=>h.selectedItemId),f=Ku();return x.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),x.createElement(Gt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":l,id:f.inputId,type:"text",value:a?e.value:u,onChange:h=>{a||s.setState("search",h.target.value),r==null||r(h.target.value)}})}),fT=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,s=x.useRef(null),u=x.useRef(null),l=fa(h=>h.selectedItemId),f=Ku();return x.useEffect(()=>{if(u.current&&s.current){let h=u.current,p=s.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let b=h.offsetHeight;p.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),x.createElement(Gt.div,{ref:_s(s,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:f.listId},oh(e,h=>x.createElement("div",{ref:_s(u,f.listInnerRef),"cmdk-list-sizer":""},h)))}),hT=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:s,container:u,...l}=e;return x.createElement(c2,{open:r,onOpenChange:n},x.createElement(h2,{container:u},x.createElement(p2,{"cmdk-overlay":"",className:a}),x.createElement(m2,{"aria-label":e.label,"cmdk-dialog":"",className:s},x.createElement(S2,{ref:t,...l}))))}),pT=x.forwardRef((e,t)=>fa(r=>r.filtered.count===0)?x.createElement(Gt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),mT=x.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...s}=e;return x.createElement(Gt.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},oh(e,u=>x.createElement("div",{"aria-hidden":!0},u)))}),Xo=Object.assign(S2,{List:fT,Item:lT,Input:dT,Group:uT,Separator:cT,Dialog:hT,Empty:pT,Loading:mT});function gT(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function vT(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function N2(e){let t=x.useRef(e);return so(()=>{t.current=e}),t}var so=typeof window>"u"?x.useEffect:x.useLayoutEffect;function os(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function fa(e){let t=oy(),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function E2(e,t,r,n=[]){let a=x.useRef(),s=Ku();return so(()=>{var u;let l=(()=>{var h;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(h=p.current.textContent)==null?void 0:h.trim():a.current}})(),f=n.map(h=>h.trim());s.value(e,l,f),(u=t.current)==null||u.setAttribute(as,l),a.current=l}),a}var yT=()=>{let[e,t]=x.useState(),r=os(()=>new Map);return so(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function xT(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function oh({asChild:e,children:t},r){return e&&x.isValidElement(t)?x.cloneElement(xT(t),{ref:t.ref},r(t.props.children)):r(t)}var bT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function wT({onNavigate:e}){const[t,r]=x.useState(!1);return x.useEffect(()=>{const n=a=>{(a.metaKey||a.ctrlKey)&&a.key.toLowerCase()==="k"&&(a.preventDefault(),r(s=>!s))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),c.jsx(Xo.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>r(!1),children:c.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[c.jsx(Xo.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),c.jsxs(Xo.List,{className:"max-h-80 overflow-y-auto p-2",children:[c.jsx(Xo.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),c.jsx(Xo.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Qg.map(n=>c.jsxs(Xo.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[c.jsx(n.icon,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:n.label}),c.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}async function Pe(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),a=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let s=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof s=="string")try{const h=JSON.parse(s);let p=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,p=!0),a&&!("hf_token"in h)&&(h.hf_token=a,p=!0),p&&(s=JSON.stringify(h))}catch{}else if(!s){const h={};n&&(h.sudo_password=n),a&&(h.hf_token=a),Object.keys(h).length>0&&(s=JSON.stringify(h))}}const l=await fetch(e,{...t,headers:r,body:s});if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return l.json()}const mt={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],memory:(e,t)=>["memory",e??"",t??""]},jT=()=>wr({queryKey:mt.health,queryFn:()=>Pe("/api/health"),refetchInterval:1e4}),sh=(e=5e3)=>wr({queryKey:mt.systemStatus,queryFn:()=>Pe("/api/system/status"),refetchInterval:e}),kT=(e=3e3)=>wr({queryKey:mt.services,queryFn:()=>Pe("/api/system/services"),refetchInterval:e}),yo=(e=4e3)=>wr({queryKey:mt.models,queryFn:()=>Pe("/api/models"),refetchInterval:e}),ST=(e=4e3)=>wr({queryKey:mt.routing,queryFn:()=>Pe("/api/routing"),refetchInterval:e}),P2=(e=2e3)=>wr({queryKey:mt.jobs,queryFn:()=>Pe("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),A2=(e=3e3)=>wr({queryKey:mt.tokenStats,queryFn:()=>Pe("/api/system/token-stats"),refetchInterval:e}),C2=(e=5e3)=>wr({queryKey:mt.agentStatus,queryFn:()=>Pe("/api/agent/status"),refetchInterval:e}),NT=(e=6e4)=>wr({queryKey:mt.hermesBrain,queryFn:()=>Pe("/api/agent/brain"),refetchInterval:e}),sy=e=>wr({queryKey:mt.updates,queryFn:()=>Pe("/api/maintenance/updates"),refetchInterval:e}),ET=()=>wr({queryKey:mt.discover,queryFn:()=>Pe("/api/discover")}),PT=e=>wr({queryKey:mt.drafts(e),queryFn:()=>Pe(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),O2=e=>wr({queryKey:mt.connect(e),queryFn:()=>Pe(e?`/api/connect?${e}`:"/api/connect")}),_2=e=>wr({queryKey:mt.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),Pe(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function yr(e){return(e/1024**3).toFixed(1)}function ev(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function Wr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function AT(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function lw(e){return e?`${Math.round(e/1024)}k`:"—"}function M2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t=_T(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:u=>{const l=u.split(ly);return l[0]===""&&l.length!==1&&l.shift(),I2(l,t)||OT(u)},getConflictingClassGroupIds:(u,l)=>{const f=r[u]||[];return l&&n[u]?[...f,...n[u]]:f}}},I2=(e,t)=>{var u;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?I2(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(ly);return(u=t.validators.find(({validator:l})=>l(s)))==null?void 0:u.classGroupId},uw=/^\[(.+)\]$/,OT=e=>{if(uw.test(e)){const t=uw.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_T=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return IT(Object.entries(e.classGroups),r).forEach(([s,u])=>{tv(u,n,s,t)}),n},tv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:cw(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(MT(a)){tv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,u])=>{tv(u,cw(t,s),r,n)})})},cw=(e,t)=>{let r=e;return t.split(ly).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},MT=e=>e.isThemeGetter,IT=(e,t)=>t?e.map(([r,n])=>{const a=n.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([u,l])=>[t+u,l])):s);return[r,a]}):e,TT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,u)=>{r.set(s,u),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let u=r.get(s);if(u!==void 0)return u;if((u=n.get(s))!==void 0)return a(s,u),u},set(s,u){r.has(s)?r.set(s,u):a(s,u)}}},T2="!",DT=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],s=t.length,u=l=>{const f=[];let h=0,p=0,g;for(let S=0;Sp?g-p:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}};return r?l=>r({className:l,parseClassName:u}):u},RT=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},$T=e=>({cache:TT(e.cacheSize),parseClassName:DT(e),...CT(e)}),LT=/\s+/,zT=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,s=[],u=e.trim().split(LT);let l="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let j=!!b,k=n(j?v.substring(0,b):v);if(!k){if(!j){l=h+(l.length>0?" "+l:l);continue}if(k=n(v),!k){l=h+(l.length>0?" "+l:l);continue}j=!1}const S=RT(p).join(":"),N=g?S+T2:S,A=N+k;if(s.includes(A))continue;s.push(A);const O=a(k,j);for(let C=0;C0?" "+l:l)}return l};function FT(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;ng(p),e());return r=$T(h),n=r.cache.get,a=r.cache.set,s=l,l(f)}function l(f){const h=n(f);if(h)return h;const p=zT(f,r);return a(f,p),p}return function(){return s(FT.apply(null,arguments))}}const rt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},R2=/^\[(?:([a-z-]+):)?(.+)\]$/i,UT=/^\d+\/\d+$/,WT=new Set(["px","full","screen"]),HT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KT=/\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$/,GT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,VT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zn=e=>fs(e)||WT.has(e)||UT.test(e),Hi=e=>Us(e,"length",r4),fs=e=>!!e&&!Number.isNaN(Number(e)),Qm=e=>Us(e,"number",fs),Vl=e=>!!e&&Number.isInteger(Number(e)),QT=e=>e.endsWith("%")&&fs(e.slice(0,-1)),Re=e=>R2.test(e),Ki=e=>HT.test(e),YT=new Set(["length","size","percentage"]),XT=e=>Us(e,YT,$2),ZT=e=>Us(e,"position",$2),JT=new Set(["image","url"]),e4=e=>Us(e,JT,i4),t4=e=>Us(e,"",n4),ql=()=>!0,Us=(e,t,r)=>{const n=R2.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},r4=e=>KT.test(e)&&!GT.test(e),$2=()=>!1,n4=e=>VT.test(e),i4=e=>qT.test(e),a4=()=>{const e=rt("colors"),t=rt("spacing"),r=rt("blur"),n=rt("brightness"),a=rt("borderColor"),s=rt("borderRadius"),u=rt("borderSpacing"),l=rt("borderWidth"),f=rt("contrast"),h=rt("grayscale"),p=rt("hueRotate"),g=rt("invert"),v=rt("gap"),b=rt("gradientColorStops"),j=rt("gradientColorStopPositions"),k=rt("inset"),S=rt("margin"),N=rt("opacity"),A=rt("padding"),O=rt("saturate"),C=rt("scale"),_=rt("sepia"),E=rt("skew"),M=rt("space"),U=rt("translate"),W=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",Re,t],R=()=>[Re,t],ce=()=>["",Zn,Hi],Z=()=>["auto",fs,Re],ve=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],be=()=>["solid","dashed","dotted","double","none"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Re],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[fs,Re];return{cacheSize:500,separator:":",theme:{colors:[ql],spacing:[Zn,Hi],blur:["none","",Ki,Re],brightness:$(),borderColor:[e],borderRadius:["none","","full",Ki,Re],borderSpacing:R(),borderWidth:ce(),contrast:$(),grayscale:ne(),hueRotate:$(),invert:ne(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[QT,Hi],inset:Y(),margin:Y(),opacity:$(),padding:R(),saturate:$(),scale:$(),sepia:ne(),skew:$(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",Re]}],container:["container"],columns:[{columns:[Ki]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ve(),Re]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],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",Vl,Re]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Re]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Vl,Re]}],"grid-cols":[{"grid-cols":[ql]}],"col-start-end":[{col:["auto",{span:["full",Vl,Re]},Re]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[ql]}],"row-start-end":[{row:["auto",{span:[Vl,Re]},Re]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Re]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],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":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Re,t]}],"min-w":[{"min-w":[Re,t,"min","max","fit"]}],"max-w":[{"max-w":[Re,t,"none","full","min","max","fit","prose",{screen:[Ki]},Ki]}],h:[{h:[Re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ki,Hi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qm]}],"font-family":[{font:[ql]}],"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",Re]}],"line-clamp":[{"line-clamp":["none",fs,Qm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Zn,Re]}],"list-image":[{"list-image":["none",Re]}],"list-style-type":[{list:["none","disc","decimal",Re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Zn,Hi]}],"underline-offset":[{"underline-offset":["auto",Zn,Re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re]}],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",Re]}],"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:[...ve(),ZT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",XT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},e4]}],"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:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...be(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:be()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...be()]}],"outline-offset":[{"outline-offset":[Zn,Re]}],"outline-w":[{outline:[Zn,Hi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Zn,Hi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ki,t4]}],"shadow-color":[{shadow:[ql]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Ki,Re]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[O]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[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",Re]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",Re]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",Re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Vl,Re]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Re]}],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",Re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Zn,Hi,Qm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},o4=BT(a4);function de(...e){return o4(Je(e))}function ju(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const L2=["fast","heavy","coder","vision","scout"],s4={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},uy=e=>e&&s4[e]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function l4({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return c.jsxs("span",{className:de("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function dw(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function u4(){const{data:e}=yo(2e3),{data:t}=A2(2e3),r=(e==null?void 0:e.models)??[],n=(e==null?void 0:e.running)??[],a=r.filter(f=>n.includes(f.name)),s=x.useRef(null),[u,l]=x.useState(!1);return x.useEffect(()=>{if(!t)return;const f=t.total_tokens;if(s.current!==null&&f>s.current){l(!0);const h=setTimeout(()=>l(!1),4e3);return s.current=f,()=>clearTimeout(h)}s.current=f},[t==null?void 0:t.total_tokens]),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(mu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),c.jsxs("span",{className:de("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",u?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[u?c.jsx(cs,{className:"h-3 w-3 animate-pulse"}):c.jsx(iI,{className:"h-3 w-3"}),u?"Inferenz aktiv":"Idle"]})]}),a.length===0?c.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):c.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:a.map(f=>{var h;return c.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[f.role&&c.jsx("span",{className:de("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",uy(f.role)),children:f.role}),c.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(h=f.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")})]}),c.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[Wr(f.size_bytes)," im Unified-RAM"]})]}),c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[c.jsx("span",{className:de("h-1.5 w-1.5 rounded-full bg-emerald-500",u&&"animate-pulse")})," warm"]})]},f.name)})})]})}var c4=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function cy(e){if(typeof e!="string")return!1;var t=c4;return t.includes(e)}var d4=["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"],f4=new Set(d4);function z2(e){return typeof e!="string"?!1:f4.has(e)}function F2(e){return typeof e=="string"&&e.startsWith("data-")}function hn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(z2(r)||F2(r))&&(t[r]=e[r]);return t}function lh(e){if(e==null)return null;if(x.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return hn(t)}return typeof e=="object"&&!Array.isArray(e)?hn(e):null}function qr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(z2(r)||F2(r)||cy(r))&&(t[r]=e[r]);return t}function h4(e){return e==null?null:x.isValidElement(e)?qr(e.props):typeof e=="object"&&!Array.isArray(e)?qr(e):null}var p4=["children","width","height","viewBox","className","style","title","desc"];function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,a=e.height,s=e.viewBox,u=e.className,l=e.style,f=e.title,h=e.desc,p=m4(e,p4),g=s||{width:n,height:a,x:0,y:0},v=Je("recharts-surface",u);return x.createElement("svg",rv({},qr(p),{className:v,width:n,height:a,style:l,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),x.createElement("title",null,f),x.createElement("desc",null,h),r)}),v4=["children","className"];function nv(){return nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,a=y4(e,v4),s=Je("recharts-layer",n);return x.createElement("g",nv({className:s},qr(a),{ref:t}),r)}),b4=x.createContext(null);function ht(e){return function(){return e}}const iv=Math.PI,av=2*iv,za=1e-6,w4=av-za;function U2(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return U2;const r=10**t;return function(n){this._+=n[0];for(let a=1,s=n.length;aza)if(!(Math.abs(g*f-h*p)>za)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-u,j=a-l,k=f*f+h*h,S=b*b+j*j,N=Math.sqrt(k),A=Math.sqrt(v),O=s*Math.tan((iv-Math.acos((k+v-S)/(2*N*A)))/2),C=O/A,_=O/N;Math.abs(C-1)>za&&this._append`L${t+C*p},${r+C*g}`,this._append`A${s},${s},0,0,${+(g*b>p*j)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,a,s,u){if(t=+t,r=+r,n=+n,u=!!u,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),f=n*Math.sin(a),h=t+l,p=r+f,g=1^u,v=u?a-s:s-a;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>za||Math.abs(this._y1-p)>za)&&this._append`L${h},${p}`,n&&(v<0&&(v=v%av+av),v>w4?this._append`A${n},${n},0,1,${g},${t-l},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=p}`:v>za&&this._append`A${n},${n},0,${+(v>=iv)},${g},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function W2(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 k4(t)}function dy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function H2(e){this._context=e}H2.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 uh(e){return new H2(e)}function K2(e){return e[0]}function G2(e){return e[1]}function V2(e,t){var r=ht(!0),n=null,a=uh,s=null,u=W2(l);e=typeof e=="function"?e:e===void 0?K2:ht(e),t=typeof t=="function"?t:t===void 0?G2:ht(t);function l(f){var h,p=(f=dy(f)).length,g,v=!1,b;for(n==null&&(s=a(b=u())),h=0;h<=p;++h)!(h=b;--j)l.point(O[j],C[j]);l.lineEnd(),l.areaEnd()}N&&(O[v]=+e(S,v,g),C[v]=+t(S,v,g),l.point(n?+n(S,v,g):O[v],r?+r(S,v,g):C[v]))}if(A)return l=null,A+""||null}function p(){return V2().defined(a).curve(u).context(s)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:ht(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:ht(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:ht(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:ht(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:ht(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:ht(+g),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(g){return arguments.length?(a=typeof g=="function"?g:ht(!!g),h):a},h.curve=function(g){return arguments.length?(u=g,s!=null&&(l=u(s)),h):u},h.context=function(g){return arguments.length?(g==null?s=l=null:l=u(s=g),h):s},h}class q2{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function S4(e){return new q2(e,!0)}function N4(e){return new q2(e,!1)}function sf(){}function lf(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 Q2(e){this._context=e}Q2.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:lf(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:lf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function E4(e){return new Q2(e)}function Y2(e){this._context=e}Y2.prototype={areaStart:sf,areaEnd:sf,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:lf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function P4(e){return new Y2(e)}function X2(e){this._context=e}X2.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:lf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function A4(e){return new X2(e)}function Z2(e){this._context=e}Z2.prototype={areaStart:sf,areaEnd:sf,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 C4(e){return new Z2(e)}function fw(e){return e<0?-1:1}function hw(e,t,r){var n=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(n||a<0&&-0),u=(r-e._y1)/(a||n<0&&-0),l=(s*a+u*n)/(n+a);return(fw(s)+fw(u))*Math.min(Math.abs(s),Math.abs(u),.5*Math.abs(l))||0}function pw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ym(e,t,r){var n=e._x0,a=e._y0,s=e._x1,u=e._y1,l=(s-n)/3;e._context.bezierCurveTo(n+l,a+l*t,s-l,u-l*r,s,u)}function uf(e){this._context=e}uf.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:Ym(this,this._t0,pw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ym(this,pw(this,r=hw(this,e,t)),r);break;default:Ym(this,this._t0,r=hw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function J2(e){this._context=new eE(e)}(J2.prototype=Object.create(uf.prototype)).point=function(e,t){uf.prototype.point.call(this,t,e)};function eE(e){this._context=e}eE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,s){this._context.bezierCurveTo(t,e,n,r,s,a)}};function O4(e){return new uf(e)}function _4(e){return new J2(e)}function tE(e){this._context=e}tE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=mw(e),a=mw(t),s=0,u=1;u=0;--t)a[t]=(u[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t=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 I4(e){return new ch(e,.5)}function T4(e){return new ch(e,0)}function D4(e){return new ch(e,1)}function lo(e,t){if((u=e.length)>1)for(var r=1,n,a,s=e[t[0]],u,l=s.length;r=0;)r[t]=t;return r}function R4(e,t){return e[t]}function $4(e){const t=[];return t.key=e,t}function L4(){var e=ht([]),t=ov,r=lo,n=R4;function a(s){var u=Array.from(e.apply(this,arguments),$4),l,f=u.length,h=-1,p;for(const g of s)for(l=0,++h;l0){for(var r,n,a=0,s=e[0].length,u;a0){for(var r=0,n=e[t[0]],a,s=n.length;r0)||!((s=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,s,u;n1&&arguments[1]!==void 0?arguments[1]:W4,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var l=r[u-1];return typeof l=="string"?a+l+s:l!==void 0?a+oa(l)+s:a+s},"")}var Kr=e=>e===0?0:e>0?1:-1,Dn=e=>typeof e=="number"&&e!=+e,uo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,ke=e=>(typeof e=="number"||e instanceof Number)&&!Dn(e),Rn=e=>ke(e)||typeof e=="string",H4=0,ku=e=>{var t=++H4;return"".concat(e||"").concat(t)},ha=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ke(t)&&typeof t!="string")return n;var s;if(uo(t)){if(r==null)return n;var u=t.indexOf("%");s=r*parseFloat(t.slice(0,u))/100}else s=+t;return Dn(s)&&(s=n),a&&r!=null&&s>r&&(s=r),s},iE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):xo(n,t))===r)}var Kt=e=>e===null||typeof e>"u",py=e=>Kt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function xr(e){return e!=null}function Ws(){}var oE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,my=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(x.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{cy(a)&&typeof r[a]=="function"&&(n[a]=(s=>r[a](r,s)))}),n},K4=(e,t,r)=>n=>(e(t,r,n),null),G4=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(a=>{var s=e[a];cy(a)&&typeof s=="function"&&(n||(n={}),n[a]=K4(s,t,r))}),n};function gw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function V4(e){for(var t=1;t(u[l]===void 0&&n[l]!==void 0&&(u[l]=n[l]),u),r);return s}function X4(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function gy(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const rD="[object RegExp]",lE="[object String]",uE="[object Number]",cE="[object Boolean]",dE="[object Arguments]",nD="[object Symbol]",iD="[object Date]",aD="[object Map]",oD="[object Set]",sD="[object Array]",lD="[object ArrayBuffer]",uD="[object Object]",cD="[object DataView]",dD="[object Uint8Array]",fD="[object Uint8ClampedArray]",hD="[object Uint16Array]",pD="[object Uint32Array]",mD="[object Int8Array]",gD="[object Int16Array]",vD="[object Int32Array]",yD="[object Float32Array]",xD="[object Float64Array]",vw=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function bD(e){return typeof vw.Buffer<"u"&&vw.Buffer.isBuffer(e)}function wD(e,t){return Wa(e,void 0,e,new Map,t)}function Wa(e,t,r,n=new Map,a=void 0){const s=a==null?void 0:a(e,t,r,n);if(s!==void 0)return s;if(lv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const u=new Array(e.length);n.set(e,u);for(let l=0;l{}):uv(e,t,function n(a,s,u,l,f,h){const p=r(a,s,u,l,f,h);return p!==void 0?!!p:uv(a,s,n,h,!1)},new Map,!0)}function uv(e,t,r,n,a=!1){if(t===e)return!0;switch(typeof t){case"object":return SD(e,t,r,n);case"function":return Object.keys(t).length>0?uv(e,{...t},r,n,a):Qd(e,t);default:return fE(e)&&a?typeof t=="string"?t==="":!0:Qd(e,t)}}function SD(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return pE(e,t,r,n);if(t instanceof Map)return ND(e,t,r,n);if(t instanceof Set)return ED(e,t,r,n);const a=Object.keys(t);if(e==null||lv(e))return a.length===0;if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let s=0;s{})}function PD(e){return e=kD(e),t=>mE(t,e)}function AD(e,t){return wD(e,(r,n,a,s)=>{if(typeof e=="object"){if(gy(e)==="[object Object]"&&typeof e.constructor!="function"){const u={};return s.set(e,u),ln(u,e,a,s),u}switch(Object.prototype.toString.call(e)){case uE:case lE:case cE:{const u=new e.constructor(e==null?void 0:e.valueOf());return ln(u,e),u}case dE:{const u={};return ln(u,e),u.length=e.length,u[Symbol.iterator]=e[Symbol.iterator],u}default:return}}})}function CD(e){return AD(e)}const OD=/^(?:0|[1-9]\d*)$/;function gE(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function vE(e){return e!=null&&typeof e!="function"&&DD(e.length)}function RD(e){return typeof e=="object"&&e!==null}function $D(e){return RD(e)&&vE(e)}function yw(e,t=sE){return $D(e)?X4(Array.from(e),Z4(TD(t),1)):[]}function LD(e,t,r){return t===!0?yw(e,r):typeof t=="function"?yw(e,t):e}var Xm={exports:{}},Zm={},Jm={exports:{}},eg={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xw;function zD(){if(xw)return eg;xw=1;var e=Bs();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,s=e.useLayoutEffect,u=e.useDebugValue;function l(g,v){var b=v(),j=n({inst:{value:b,getSnapshot:v}}),k=j[0].inst,S=j[1];return s(function(){k.value=b,k.getSnapshot=v,f(k)&&S({inst:k})},[g,b,v]),a(function(){return f(k)&&S({inst:k}),g(function(){f(k)&&S({inst:k})})},[g]),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 p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return eg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,eg}var bw;function FD(){return bw||(bw=1,Jm.exports=zD()),Jm.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ww;function BD(){if(ww)return Zm;ww=1;var e=Bs(),t=FD();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,s=e.useRef,u=e.useEffect,l=e.useMemo,f=e.useDebugValue;return Zm.useSyncExternalStoreWithSelector=function(h,p,g,v,b){var j=s(null);if(j.current===null){var k={hasValue:!1,value:null};j.current=k}else k=j.current;j=l(function(){function N(E){if(!A){if(A=!0,O=E,E=v(E),b!==void 0&&k.hasValue){var M=k.value;if(b(M,E))return C=M}return C=E}if(M=C,n(O,E))return M;var U=v(E);return b!==void 0&&b(M,U)?(O=E,M):(O=E,C=U)}var A=!1,O,C,_=g===void 0?null:g;return[function(){return N(p())},_===null?void 0:function(){return N(_())}]},[p,g,v,b]);var S=a(h,j[0],j[1]);return u(function(){k.hasValue=!0,k.value=S},[S]),f(S),S},Zm}var jw;function UD(){return jw||(jw=1,Xm.exports=BD()),Xm.exports}var WD=UD(),vy=x.createContext(null),HD=e=>e,wt=()=>{var e=x.useContext(vy);return e?e.store.dispatch:HD},Yd=()=>{},KD=()=>Yd,GD=(e,t)=>e===t;function Ae(e){var t=x.useContext(vy),r=x.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Yd,[t,e]);return WD.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:KD,t?t.store.getState:Yd,t?t.store.getState:Yd,r,GD)}function VD(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function qD(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 kw=e=>Array.isArray(e)?e:[e];function QD(e){const t=Array.isArray(e[0])?e[0]:e;return qD(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YD(e,t){const r=[],{length:n}=e;for(let a=0;atypeof WeakRef>"u"?XD:WeakRef,yE=ZD(),JD=0,Sw=1;function Cd(){return{s:JD,v:void 0,o:null,p:null}}function eR(e){return e instanceof yE?e.deref():e}function xE(e,t={}){let r=Cd();const{resultEqualityCheck:n}=t;let a,s=0;function u(){let l=r;const{length:f}=arguments;for(let g=0,v=f;g{r=Cd(),u.resetResultsCount()},u.resultsCount=()=>s,u.resetResultsCount=()=>{s=0},u}function tR(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let s=0,u=0,l,f={},h=a.pop();typeof h=="object"&&(f=h,h=a.pop()),VD(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:g,memoizeOptions:v=[],argsMemoize:b=xE,argsMemoizeOptions:j=[]}=p,k=kw(v),S=kw(j),N=QD(a),A=g(function(){return s++,h.apply(null,arguments)},...k),O=b(function(){u++;const _=YD(N,arguments);return l=A.apply(null,_),l},...S);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:N,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:g,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var G=tR(xE);function rR(e,t=1){const r=[],n=Math.floor(t),a=(s,u)=>{for(let l=0;l{if(e!==t){const n=Nw(e),a=Nw(t);if(n===a&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0};function bE(e){return typeof e=="symbol"||e instanceof Symbol}const iR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,aR=/^\w*$/;function oR(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||bE(e)?!0:typeof e=="string"&&(aR.test(e)||!iR.test(e))||t!=null}function sR(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(l=>String(l));const a=(l,f)=>{let h=l;for(let p=0;pf==null||l==null?f:typeof l=="object"&&"key"in l?Object.hasOwn(f,l.key)?f[l.key]:a(f,l.path):typeof l=="function"?l(f):Array.isArray(l)?a(f,l):typeof f=="object"?f[l]:f,u=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||oR(l)?l:{key:l,path:hy(l)}));return e.map(l=>({original:l,criteria:u.map(f=>s(f,l))})).slice().sort((l,f)=>{for(let h=0;hl.original)}function dh(e,...t){const r=t.length;return r>1&&cv(e,t[0],t[1])?t=[]:r>2&&cv(t[0],t[1],t[2])&&(t=[t[0]]),sR(e,rR(t),["asc"])}var wE=e=>e.legend.settings,lR=e=>e.legend.size,uR=e=>e.legend.payload;G([uR,wE],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?dh(n,r):n});function cR(e,t){return pR(e)||hR(e,t)||fR(e,t)||dR()}function dR(){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 fR(e,t){if(e){if(typeof e=="string")return Ew(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ew(e,t):void 0}}function Ew(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rOd||Math.abs(e.left-t.left)>Od||Math.abs(e.top-t.top)>Od||Math.abs(e.width-t.width)>Od}function Aw(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function mR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=x.useState({height:0,left:0,top:0,width:0}),r=cR(t,2),n=r[0],a=r[1],s=x.useRef(null),u=x.useRef(n);u.current=n;var l=x.useCallback(f=>{if(s.current!=null&&(s.current.disconnect(),s.current=null),f!=null){var h=Aw(f);if(Pw(h,u.current)&&a(h),typeof ResizeObserver<"u"){var p=new ResizeObserver(()=>{var g=Aw(f);Pw(g,u.current)&&a(g)});p.observe(f),s.current=p}}},[...e]);return x.useEffect(()=>()=>{var f;(f=s.current)===null||f===void 0||f.disconnect()},[]),[n,l]}function Ft(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var gR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Cw=gR,tg=()=>Math.random().toString(36).substring(7).split("").join("."),vR={INIT:`@@redux/INIT${tg()}`,REPLACE:`@@redux/REPLACE${tg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${tg()}`},cf=vR;function yy(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function jE(e,t,r){if(typeof e!="function")throw new Error(Ft(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ft(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ft(1));return r(jE)(e,t)}let n=e,a=t,s=new Map,u=s,l=0,f=!1;function h(){u===s&&(u=new Map,s.forEach((S,N)=>{u.set(N,S)}))}function p(){if(f)throw new Error(Ft(3));return a}function g(S){if(typeof S!="function")throw new Error(Ft(4));if(f)throw new Error(Ft(5));let N=!0;h();const A=l++;return u.set(A,S),function(){if(N){if(f)throw new Error(Ft(6));N=!1,h(),u.delete(A),s=null}}}function v(S){if(!yy(S))throw new Error(Ft(7));if(typeof S.type>"u")throw new Error(Ft(8));if(typeof S.type!="string")throw new Error(Ft(17));if(f)throw new Error(Ft(9));try{f=!0,a=n(a,S)}finally{f=!1}return(s=u).forEach(A=>{A()}),S}function b(S){if(typeof S!="function")throw new Error(Ft(10));n=S,v({type:cf.REPLACE})}function j(){const S=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ft(11));function A(){const C=N;C.next&&C.next(p())}return A(),{unsubscribe:S(A)}},[Cw](){return this}}}return v({type:cf.INIT}),{dispatch:v,subscribe:g,getState:p,replaceReducer:b,[Cw]:j}}function yR(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:cf.INIT})>"u")throw new Error(Ft(12));if(typeof r(void 0,{type:cf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function kE(e){const t=Object.keys(e),r={};for(let s=0;s"u")throw l&&l.type,new Error(Ft(14));h[g]=j,f=f||j!==b}return f=f||n.length!==Object.keys(u).length,f?h:u}}function df(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function xR(...e){return t=>(r,n)=>{const a=t(r,n);let s=()=>{throw new Error(Ft(15))};const u={getState:a.getState,dispatch:(f,...h)=>s(f,...h)},l=e.map(f=>f(u));return s=df(...l)(a.dispatch),{...a,dispatch:s}}}function SE(e){return yy(e)&&"type"in e&&typeof e.type=="string"}var NE=Symbol.for("immer-nothing"),Ow=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state");function cn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _r=Object,Is=_r.getPrototypeOf,ff="constructor",fh="prototype",dv="configurable",hf="enumerable",Xd="writable",Su="value",di=e=>!!e&&!!e[lr];function pn(e){var t;return e?EE(e)||ph(e)||!!e[Ow]||!!((t=e[ff])!=null&&t[Ow])||mh(e)||gh(e):!1}var bR=_r[fh][ff].toString(),_w=new WeakMap;function EE(e){if(!e||!xy(e))return!1;const t=Is(e);if(t===null||t===_r[fh])return!0;const r=_r.hasOwnProperty.call(t,ff)&&t[ff];if(r===Object)return!0;if(!ss(r))return!1;let n=_w.get(r);return n===void 0&&(n=Function.toString.call(r),_w.set(r,n)),n===bR}function hh(e,t,r=!0){Gu(e)===0?(r?Reflect.ownKeys(e):_r.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Gu(e){const t=e[lr];return t?t.type_:ph(e)?1:mh(e)?2:gh(e)?3:0}var Mw=(e,t,r=Gu(e))=>r===2?e.has(t):_r[fh].hasOwnProperty.call(e,t),fv=(e,t,r=Gu(e))=>r===2?e.get(t):e[t],pf=(e,t,r,n=Gu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function wR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ph=Array.isArray,mh=e=>e instanceof Map,gh=e=>e instanceof Set,xy=e=>typeof e=="object",ss=e=>typeof e=="function",rg=e=>typeof e=="boolean";function jR(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ei=e=>e.copy_||e.base_,by=e=>e.modified_?e.copy_:e.base_;function hv(e,t){if(mh(e))return new Map(e);if(gh(e))return new Set(e);if(ph(e))return Array[fh].slice.call(e);const r=EE(e);if(t===!0||t==="class_only"&&!r){const n=_r.getOwnPropertyDescriptors(e);delete n[lr];let a=Reflect.ownKeys(n);for(let s=0;s1&&_r.defineProperties(e,{set:_d,add:_d,clear:_d,delete:_d}),_r.freeze(e),t&&hh(e,(r,n)=>{wy(n,!0)},!1)),e}function kR(){cn(2)}var _d={[Su]:kR};function vh(e){return e===null||!xy(e)?!0:_r.isFrozen(e)}var mf="MapSet",pv="Patches",Iw="ArrayMethods",PE={};function co(e){const t=PE[e];return t||cn(0,e),t}var Tw=e=>!!PE[e],Nu,AE=()=>Nu,SR=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Tw(mf)?co(mf):void 0,arrayMethodsPlugin_:Tw(Iw)?co(Iw):void 0});function Dw(e,t){t&&(e.patchPlugin_=co(pv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function mv(e){gv(e),e.drafts_.forEach(NR),e.drafts_=null}function gv(e){e===Nu&&(Nu=e.parent_)}var Rw=e=>Nu=SR(Nu,e);function NR(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function $w(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[lr].modified_&&(mv(t),cn(4)),pn(e)&&(e=Lw(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[lr].base_,e,t)}else e=Lw(t,r);return ER(t,e,!0),mv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NE?e:void 0}function Lw(e,t){if(vh(t))return t;const r=t[lr];if(!r)return gf(t,e.handledSet_,e);if(!yh(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);_E(r,e)}return r.copy_}function ER(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&wy(t,r)}function CE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yh=(e,t)=>e.scope_===t,PR=[];function OE(e,t,r,n){const a=ei(e),s=e.type_;if(n!==void 0&&fv(a,n,s)===t){pf(a,n,r,s);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;hh(a,(f,h)=>{if(di(h)){const p=l.get(h)||[];p.push(f),l.set(h,p)}})}const u=e.draftLocations_.get(t)??PR;for(const l of u)pf(a,l,r,s)}function AR(e,t,r){e.callbacks_.push(function(a){var l;const s=t;if(!s||!yh(s,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(s);const u=by(s);OE(e,s.draft_??s,u,r),_E(s,a)})}function _E(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const s=a.getPath(e);s&&a.generatePatches_(e,s,t)}CE(e)}}function CR(e,t,r){const{scope_:n}=e;if(di(r)){const a=r[lr];yh(a,n)&&a.callbacks_.push(function(){Zd(e);const u=by(a);OE(e,r,u,t)})}else pn(r)&&e.callbacks_.push(function(){const s=ei(e);e.type_===3?s.has(r)&&gf(r,n.handledSet_,n):fv(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&gf(fv(e.copy_,t,e.type_),n.handledSet_,n)})}function gf(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||di(e)||t.has(e)||!pn(e)||vh(e)||(t.add(e),hh(e,(n,a)=>{if(di(a)){const s=a[lr];if(yh(s,r)){const u=by(s);pf(e,n,u,e.type_),CE(s)}}else pn(a)&&gf(a,t,r)})),e}function OR(e,t){const r=ph(e),n={type_:r?1:0,scope_:t?t.scope_:AE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=n,s=vf;r&&(a=[n],s=Eu);const{revoke:u,proxy:l}=Proxy.revocable(a,s);return n.draft_=l,n.revoke_=u,[l,n]}var vf={get(e,t){if(t===lr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const a=ei(e);if(!Mw(a,t,e.type_))return _R(e,a,t);const s=a[t];if(e.finalized_||!pn(s)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&jR(t))return s;if(s===ng(e.base_,t)){Zd(e);const u=e.type_===1?+t:t,l=yv(e.scope_,s,e,u);return e.copy_[u]=l}return s},has(e,t){return t in ei(e)},ownKeys(e){return Reflect.ownKeys(ei(e))},set(e,t,r){const n=ME(ei(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=ng(ei(e),t),s=a==null?void 0:a[lr];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(wR(r,a)&&(r!==void 0||Mw(e.base_,t,e.type_)))return!0;Zd(e),vv(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),CR(e,t,r)),!0},deleteProperty(e,t){return Zd(e),ng(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ei(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Xd]:!0,[dv]:e.type_!==1||t!=="length",[hf]:n[hf],[Su]:r[t]}},defineProperty(){cn(11)},getPrototypeOf(e){return Is(e.base_)},setPrototypeOf(){cn(12)}},Eu={};for(let e in vf){let t=vf[e];Eu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Eu.deleteProperty=function(e,t){return Eu.set.call(this,e,t,void 0)};Eu.set=function(e,t,r){return vf.set.call(this,e[0],t,r,e[0])};function ng(e,t){const r=e[lr];return(r?ei(r):e)[t]}function _R(e,t,r){var a;const n=ME(t,r);return n?Su in n?n[Su]:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function ME(e,t){if(!(t in e))return;let r=Is(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Is(r)}}function vv(e){e.modified_||(e.modified_=!0,e.parent_&&vv(e.parent_))}function Zd(e){e.copy_||(e.assigned_=new Map,e.copy_=hv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var MR=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,a)=>{if(ss(r)&&!ss(n)){const u=n;n=r;const l=this;return function(h=u,...p){return l.produce(h,g=>n.call(this,g,...p))}}ss(n)||cn(6),a!==void 0&&!ss(a)&&cn(7);let s;if(pn(r)){const u=Rw(this),l=yv(u,r,void 0);let f=!0;try{s=n(l),f=!1}finally{f?mv(u):gv(u)}return Dw(u,a),$w(s,u)}else if(!r||!xy(r)){if(s=n(r),s===void 0&&(s=r),s===NE&&(s=void 0),this.autoFreeze_&&wy(s,!0),a){const u=[],l=[];co(pv).generateReplacementPatches_(r,s,{patches_:u,inversePatches_:l}),a(u,l)}return s}else cn(1,r)},this.produceWithPatches=(r,n)=>{if(ss(r))return(l,...f)=>this.produceWithPatches(l,h=>r(h,...f));let a,s;return[this.produce(r,n,(l,f)=>{a=l,s=f}),a,s]},rg(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),rg(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),rg(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){pn(t)||cn(8),di(t)&&(t=Gr(t));const r=Rw(this),n=yv(r,t,void 0);return n[lr].isManual_=!0,gv(r),n}finishDraft(t,r){const n=t&&t[lr];(!n||!n.isManual_)&&cn(9);const{scope_:a}=n;return Dw(a,r),$w(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const s=r[n];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}n>-1&&(r=r.slice(n+1));const a=co(pv).applyPatches_;return di(t)?a(t,r):this.produce(t,s=>a(s,r))}};function yv(e,t,r,n){const[a,s]=mh(t)?co(mf).proxyMap_(t,r):gh(t)?co(mf).proxySet_(t,r):OR(t,r);return((r==null?void 0:r.scope_)??AE()).drafts_.push(a),s.callbacks_=(r==null?void 0:r.callbacks_)??[],s.key_=n,r&&n!==void 0?AR(r,s,n):s.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(s);const{patchPlugin_:h}=f;s.modified_&&h&&h.generatePatches_(s,[],f)}),a}function Gr(e){return di(e)||cn(10,e),IE(e)}function IE(e){if(!pn(e)||vh(e))return e;const t=e[lr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=hv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=hv(e,!0);return hh(r,(a,s)=>{pf(r,a,IE(s))},n),t&&(t.finalized_=!1),r}var IR=new MR,TE=IR.produce;function DE(e){return({dispatch:r,getState:n})=>a=>s=>typeof s=="function"?s(r,n,e):a(s)}var TR=DE(),DR=DE,RR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?df:df.apply(null,arguments)};function Tr(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(Ir(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>SE(n)&&n.type===e,r}var RE=class ou extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ou.prototype)}static get[Symbol.species](){return ou}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ou(...t[0].concat(this)):new ou(...t.concat(this))}};function zw(e){return pn(e)?TE(e,()=>{}):e}function Md(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function $R(e){return typeof e=="boolean"}var LR=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:s=!0}=t??{};let u=new RE;return r&&($R(r)?u.push(TR):u.push(DR(r.extraArgument))),u},$E="RTK_autoBatch",nt=()=>e=>({payload:e,meta:{[$E]:!0}}),Fw=e=>t=>{setTimeout(t,e)},zR=(e,t)=>r=>{let n=!1;const a=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(u),r())},s=e(a),u=setTimeout(a,t)},LE=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let a=!0,s=!1,u=!1;const l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?zR(window.requestAnimationFrame,100):Fw(10):e.type==="callback"?e.queueNotification:Fw(e.timeout),h=()=>{u=!1,s&&(s=!1,l.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const g=()=>a&&p(),v=n.subscribe(g);return l.add(p),()=>{v(),l.delete(p)}},dispatch(p){var g;try{return a=!((g=p==null?void 0:p.meta)!=null&&g[$E]),s=!a,s&&(u||(u=!0,f(h))),n.dispatch(p)}finally{a=!0}}})},FR=e=>function(r){const{autoBatch:n=!0}=r??{};let a=new RE(e);return n&&a.push(LE(typeof n=="object"?n:void 0)),a};function BR(e){const t=LR(),{reducer:r=void 0,middleware:n,devTools:a=!0,preloadedState:s=void 0,enhancers:u=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(yy(r))l=kE(r);else throw new Error(Ir(1));let f;typeof n=="function"?f=n(t):f=t();let h=df;a&&(h=RR({trace:!1,...typeof a=="object"&&a}));const p=xR(...f),g=FR(p);let v=typeof u=="function"?u(g):g();const b=h(...v);return jE(l,s,b)}function zE(e){const t={},r=[];let n;const a={addCase(s,u){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(Ir(28));if(l in t)throw new Error(Ir(29));return t[l]=u,a},addAsyncThunk(s,u){return u.pending&&(t[s.pending.type]=u.pending),u.rejected&&(t[s.rejected.type]=u.rejected),u.fulfilled&&(t[s.fulfilled.type]=u.fulfilled),u.settled&&r.push({matcher:s.settled,reducer:u.settled}),a},addMatcher(s,u){return r.push({matcher:s,reducer:u}),a},addDefaultCase(s){return n=s,a}};return e(a),[t,r,n]}function UR(e){return typeof e=="function"}function WR(e,t){let[r,n,a]=zE(t),s;if(UR(e))s=()=>zw(e());else{const l=zw(e);s=()=>l}function u(l=s(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[a]),h.reduce((p,g)=>{if(g)if(di(p)){const b=g(p,f);return b===void 0?p:b}else{if(pn(p))return TE(p,v=>g(v,f));{const v=g(p,f);if(v===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return p},l)}return u.getInitialState=s,u}var HR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",KR=(e=21)=>{let t="",r=e;for(;r--;)t+=HR[Math.random()*64|0];return t},GR=Symbol.for("rtk-slice-createasyncthunk");function VR(e,t){return`${e}/${t}`}function qR({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[GR];return function(a){const{name:s,reducerPath:u=s}=a;if(!s)throw new Error(Ir(11));const l=(typeof a.reducers=="function"?a.reducers(YR()):a.reducers)||{},f=Object.keys(l),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(C,_){const E=typeof C=="string"?C:C.type;if(!E)throw new Error(Ir(12));if(E in h.sliceCaseReducersByType)throw new Error(Ir(13));return h.sliceCaseReducersByType[E]=_,p},addMatcher(C,_){return h.sliceMatchers.push({matcher:C,reducer:_}),p},exposeAction(C,_){return h.actionCreators[C]=_,p},exposeCaseReducer(C,_){return h.sliceCaseReducersByName[C]=_,p}};f.forEach(C=>{const _=l[C],E={reducerName:C,type:VR(s,C),createNotation:typeof a.reducers=="function"};ZR(_)?e$(E,_,p,t):XR(E,_,p)});function g(){const[C={},_=[],E=void 0]=typeof a.extraReducers=="function"?zE(a.extraReducers):[a.extraReducers],M={...C,...h.sliceCaseReducersByType};return WR(a.initialState,U=>{for(let W in M)U.addCase(W,M[W]);for(let W of h.sliceMatchers)U.addMatcher(W.matcher,W.reducer);for(let W of _)U.addMatcher(W.matcher,W.reducer);E&&U.addDefaultCase(E)})}const v=C=>C,b=new Map,j=new WeakMap;let k;function S(C,_){return k||(k=g()),k(C,_)}function N(){return k||(k=g()),k.getInitialState()}function A(C,_=!1){function E(U){let W=U[C];return typeof W>"u"&&_&&(W=Md(j,E,N)),W}function M(U=v){const W=Md(b,_,()=>new WeakMap);return Md(W,U,()=>{const V={};for(const[Y,R]of Object.entries(a.selectors??{}))V[Y]=QR(R,U,()=>Md(j,U,N),_);return V})}return{reducerPath:C,getSelectors:M,get selectors(){return M(E)},selectSlice:E}}const O={name:s,reducer:S,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...A(u),injectInto(C,{reducerPath:_,...E}={}){const M=_??u;return C.inject({reducerPath:M,reducer:S},E),{...O,...A(M,!0)}}};return O}}function QR(e,t,r,n){function a(s,...u){let l=t(s);return typeof l>"u"&&n&&(l=r()),e(l,...u)}return a.unwrapped=e,a}var rr=qR();function YR(){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 XR({type:e,reducerName:t,createNotation:r},n,a){let s,u;if("reducer"in n){if(r&&!JR(n))throw new Error(Ir(17));s=n.reducer,u=n.prepare}else s=n;a.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,u?Tr(e,u):Tr(e))}function ZR(e){return e._reducerDefinitionType==="asyncThunk"}function JR(e){return e._reducerDefinitionType==="reducerWithPrepare"}function e$({type:e,reducerName:t},r,n,a){if(!a)throw new Error(Ir(18));const{payloadCreator:s,fulfilled:u,pending:l,rejected:f,settled:h,options:p}=r,g=a(e,s,p);n.exposeAction(t,g),u&&n.addCase(g.fulfilled,u),l&&n.addCase(g.pending,l),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:u||Id,pending:l||Id,rejected:f||Id,settled:h||Id})}function Id(){}var t$="task",FE="listener",BE="completed",jy="cancelled",r$=`task-${jy}`,n$=`task-${BE}`,xv=`${FE}-${jy}`,i$=`${FE}-${BE}`,xh=class{constructor(e){vd(this,"code");vd(this,"name","TaskAbortError");vd(this,"message");this.code=e,this.message=`${t$} ${jy} (reason: ${e})`}},ky=(e,t)=>{if(typeof e!="function")throw new TypeError(Ir(32))},yf=()=>{},UE=(e,t=yf)=>(e.catch(t),e),WE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),io=e=>{if(e.aborted)throw new xh(e.reason)};function HE(e,t){let r=yf;return new Promise((n,a)=>{const s=()=>a(new xh(e.reason));if(e.aborted){s();return}r=WE(e,s),t.finally(()=>r()).then(n,a)}).finally(()=>{r=yf})}var a$=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof xh?"cancelled":"rejected",error:r}}finally{t==null||t()}},xf=e=>t=>UE(HE(e,t).then(r=>(io(e),r))),KE=e=>{const t=xf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:hs}=Object,Bw={},bh="listenerMiddleware",o$=(e,t)=>{const r=n=>WE(e,()=>n.abort(e.reason));return(n,a)=>{ky(n);const s=new AbortController;r(s);const u=a$(async()=>{io(e),io(s.signal);const l=await n({pause:xf(s.signal),delay:KE(s.signal),signal:s.signal});return io(s.signal),l},()=>s.abort(n$));return a!=null&&a.autoJoin&&t.push(u.catch(yf)),{result:xf(e)(u),cancel(){s.abort(r$)}}}},s$=(e,t)=>{const r=async(n,a)=>{io(t);let s=()=>{};const l=[new Promise((f,h)=>{let p=e({predicate:n,effect:(g,v)=>{v.unsubscribe(),f([g,v.getState(),v.getOriginalState()])}});s=()=>{p(),h()}})];a!=null&&l.push(new Promise(f=>setTimeout(f,a,null)));try{const f=await HE(t,Promise.race(l));return io(t),f}finally{s()}};return((n,a)=>UE(r(n,a)))},GE=e=>{let{type:t,actionCreator:r,matcher:n,predicate:a,effect:s}=e;if(t)a=Tr(t).match;else if(r)t=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(Ir(21));return ky(s),{predicate:a,type:t,effect:s}},VE=hs(e=>{const{type:t,predicate:r,effect:n}=GE(e);return{id:KR(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ir(22))}}},{withTypes:()=>VE}),Uw=(e,t)=>{const{type:r,effect:n,predicate:a}=GE(t);return Array.from(e.values()).find(s=>(typeof r=="string"?s.type===r:s.predicate===a)&&s.effect===n)},bv=e=>{e.pending.forEach(t=>{t.abort(xv)})},l$=(e,t)=>()=>{for(const r of t.keys())bv(r);e.clear()},Ww=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},qE=hs(Tr(`${bh}/add`),{withTypes:()=>qE}),u$=Tr(`${bh}/removeAll`),QE=hs(Tr(`${bh}/remove`),{withTypes:()=>QE}),c$=(...e)=>{console.error(`${bh}/error`,...e)},Vu=(e={})=>{const t=new Map,r=new Map,n=b=>{const j=r.get(b)??0;r.set(b,j+1)},a=b=>{const j=r.get(b)??1;j===1?r.delete(b):r.set(b,j-1)},{extra:s,onError:u=c$}=e;ky(u);const l=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),j=>{b.unsubscribe(),j!=null&&j.cancelActive&&bv(b)}),f=(b=>{const j=Uw(t,b)??VE(b);return l(j)});hs(f,{withTypes:()=>f});const h=b=>{const j=Uw(t,b);return j&&(j.unsubscribe(),b.cancelActive&&bv(j)),!!j};hs(h,{withTypes:()=>h});const p=async(b,j,k,S)=>{const N=new AbortController,A=s$(f,N.signal),O=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(j,hs({},k,{getOriginalState:S,condition:(C,_)=>A(C,_).then(Boolean),take:A,delay:KE(N.signal),pause:xf(N.signal),extra:s,signal:N.signal,fork:o$(N.signal,O),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((C,_,E)=>{C!==N&&(C.abort(xv),E.delete(C))})},cancel:()=>{N.abort(xv),b.pending.delete(N)},throwIfCancelled:()=>{io(N.signal)}})))}catch(C){C instanceof xh||Ww(u,C,{raisedBy:"effect"})}finally{await Promise.all(O),N.abort(i$),a(b),b.pending.delete(N)}},g=l$(t,r);return{middleware:b=>j=>k=>{if(!SE(k))return j(k);if(qE.match(k))return f(k.payload);if(u$.match(k)){g();return}if(QE.match(k))return h(k.payload);let S=b.getState();const N=()=>{if(S===Bw)throw new Error(Ir(23));return S};let A;try{if(A=j(k),t.size>0){const O=b.getState(),C=Array.from(t.values());for(const _ of C){let E=!1;try{E=_.predicate(k,O,S)}catch(M){E=!1,Ww(u,M,{raisedBy:"predicate"})}E&&p(_,k,b,N)}}}finally{S=Bw}return A},startListening:f,stopListening:h,clearListeners:g}};function Ir(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 d$={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},YE=rr({name:"chartLayout",initialState:d$,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,a,s;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(s=t.payload.left)!==null&&s!==void 0?s:0},setScale(e,t){e.scale=t.payload}}}),wh=YE.actions,f$=wh.setMargin,h$=wh.setLayout,p$=wh.setChartSize,m$=wh.setScale,g$=YE.reducer;function XE(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Fe(e){return Number.isFinite(e)}function $n(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Hw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ls(e){for(var t=1;t{if(t&&r){var n=r.width,a=r.height,s=t.align,u=t.verticalAlign,l=t.layout;if((l==="vertical"||l==="horizontal"&&u==="middle")&&s!=="center"&&ke(e[s]))return ls(ls({},e),{},{[s]:e[s]+(n||0)});if((l==="horizontal"||l==="vertical"&&s==="center")&&u!=="middle"&&ke(e[u]))return ls(ls({},e),{},{[u]:e[u]+(a||0)})}return e},Fn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",ZE=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var a,s,u=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===r&&(s=!0),l.coordinate));return a||u.push(t),s||u.push(r),u},JE=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,a=e.type,s=e.range,u=e.scale,l=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,p=e.tickCount,g=e.ticks,v=e.niceTicks,b=e.axisType;if(!u)return null;var j=l==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,k=a==="category"&&u.bandwidth?u.bandwidth()/j:0;if(k=b==="angleAxis"&&s&&s.length>=2?Kr(s[0]-s[1])*2*k:k,g||v){var S=(g||v||[]).map((N,A)=>{var O=n?n.indexOf(N):N,C=u.map(O);return Fe(C)?{coordinate:C+k,value:N,offset:k,index:A}:null}).filter(xr);return S}return f&&h?h.map((N,A)=>{var O=u.map(N);return Fe(O)?{coordinate:O+k,value:N,index:A,offset:k}:null}).filter(xr):u.ticks&&p!=null?u.ticks(p).map((N,A)=>{var O=u.map(N);return Fe(O)?{coordinate:O+k,value:N,index:A,offset:k}:null}).filter(xr):u.domain().map((N,A)=>{var O=u.map(N);return Fe(O)?{coordinate:O+k,value:n?n[N]:N,index:A,offset:k}:null}).filter(xr)},w$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(h[0]=s,s+=v,h[1]=s):(h[0]=u,u+=v,h[1]=u)}}}},j$=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var a=0;a=0?(f[0]=s,s+=h,f[1]=s):(f[0]=0,f[1]=0)}}}},k$={sign:w$,expand:z4,none:lo,silhouette:F4,wiggle:B4,positive:j$},S$=(e,t,r)=>{var n,a=(n=k$[r])!==null&&n!==void 0?n:lo,s=L4().keys(t).value((l,f)=>Number(Tt(l,f,0))).order(ov).offset(a),u=s(e);return u.forEach((l,f)=>{l.forEach((h,p)=>{var g=Tt(e[p],t[f],0);Array.isArray(g)&&g.length===2&&ke(g[0])&&ke(g[1])&&(h[0]=g[0],h[1]=g[1])})}),u};function N$(e){return e==null?void 0:String(e)}function Kw(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,s=e.index,u=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Kt(a[t.dataKey])){var l=aE(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r!=null&&r[s]?r[s].coordinate+n/2:null}var f=Tt(a,Kt(u)?t.dataKey:u),h=t.scale.map(f);return ke(h)?h:null}var E$=e=>{var t=e.flat(2).filter(ke);return[Math.min(...t),Math.max(...t)]},P$=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],A$=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return P$(Object.keys(e).reduce((n,a)=>{var s=e[a];if(!s)return n;var u=s.stackedData,l=u.reduce((f,h)=>{var p=XE(h,t,r),g=E$(p);return!Fe(g[0])||!Fe(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},Gw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var a=dh(t,p=>p.coordinate),s=1/0,u=1,l=a.length;u{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},O$=(e,t)=>t==="centric"?e.angle:e.radius,mi=e=>e.layout.width,gi=e=>e.layout.height,_$=e=>e.layout.scale,tP=e=>e.layout.margin,jh=G(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),kh=G(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),M$="data-recharts-item-index",I$="data-recharts-item-id",qu=60;function Qw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Td(e){for(var t=1;te.brush.height;function L$(e){var t=kh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:qu;return r+a}return r},0)}function z$(e){var t=kh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var a=typeof n.width=="number"?n.width:qu;return r+a}return r},0)}function F$(e){var t=jh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function B$(e){var t=jh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=G([mi,gi,tP,$$,L$,z$,F$,B$,wE,lR],(e,t,r,n,a,s,u,l,f,h)=>{var p={left:(r.left||0)+a,right:(r.right||0)+s},g={top:(r.top||0)+u,bottom:(r.bottom||0)+l},v=Td(Td({},g),p),b=v.bottom;v.bottom+=n,v=b$(v,f,h);var j=e-v.left-v.right,k=t-v.top-v.bottom;return Td(Td({brushBottom:b},v),{},{width:Math.max(j,0),height:Math.max(k,0)})}),U$=G(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),rP=G(mi,gi,(e,t)=>({x:0,y:0,width:e,height:t})),W$=x.createContext(null),jr=()=>x.useContext(W$)!=null,Sh=e=>e.brush,Nh=G([Sh,Vt,tP],(e,t,r)=>({height:e.height,x:ke(e.x)?e.x:t.left,y:ke(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:ke(e.width)?e.width:t.width}));function H$(e,t,{signal:r,edges:n}={}){let a,s=null;const u=n!=null&&n.includes("leading"),l=n==null||n.includes("trailing"),f=()=>{s!==null&&(e.apply(a,s),a=void 0,s=null)},h=()=>{l&&f(),b()};let p=null;const g=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},t)},v=()=>{p!==null&&(clearTimeout(p),p=null)},b=()=>{v(),a=void 0,s=null},j=()=>{f()},k=function(...S){if(r!=null&&r.aborted)return;a=this,s=S;const N=p==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 K$(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:a=!0,maxWait:s}=r,u=Array(2);n&&(u[0]="leading"),a&&(u[1]="trailing");let l,f=null;const h=H$(function(...v){l=e.apply(this,v),f=null},t,{edges:u}),p=function(...v){return s!=null&&(f===null&&(f=Date.now()),Date.now()-f>=s)?(l=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),l):(h.apply(this,v),l)},g=()=>(h.flush(),l);return p.cancel=h.cancel,p.flush=g,p}function G$(e,t=0,r={}){const{leading:n=!0,trailing:a=!0}=r;return K$(e,t,{leading:n,maxWait:t,trailing:a})}var wf=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),s=2;sa[u++]))}},_n={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},nP=(e,t,r)=>{var n=r.width,a=n===void 0?_n.width:n,s=r.height,u=s===void 0?_n.height:s,l=r.aspect,f=r.maxHeight,h=uo(a)?e:Number(a),p=uo(u)?t:Number(u);return l&&l>0&&(h?p=h/l:p&&(h=p*l),f&&p!=null&&p>f&&(p=f)),{calculatedWidth:h,calculatedHeight:p}},V$={width:0,height:0,overflow:"visible"},q$={width:0,overflowX:"visible"},Q$={height:0,overflowY:"visible"},Y$={},X$=e=>{var t=e.width,r=e.height,n=uo(t),a=uo(r);return n&&a?V$:n?q$:a?Q$:Y$};function Z$(e){var t=e.width,r=e.height,n=e.aspect,a=t,s=r;return a===void 0&&s===void 0?(a=_n.width,s=_n.height):a===void 0?a=n&&n>0?void 0:_n.width:s===void 0&&(s=n&&n>0?void 0:_n.height),{width:a,height:s}}var J$=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function jf(){return jf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return cL(a)?x.createElement(iP.Provider,{value:a},t):null}var Sy=()=>x.useContext(iP),dL=x.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?_n.initialDimension:n,s=e.width,u=e.height,l=e.minWidth,f=l===void 0?_n.minWidth:l,h=e.minHeight,p=e.maxHeight,g=e.children,v=e.debounce,b=v===void 0?_n.debounce:v,j=e.id,k=e.className,S=e.onResize,N=e.style,A=N===void 0?{}:N,O=lL(e,J$),C=x.useRef(null),_=x.useRef();_.current=S,x.useImperativeHandle(t,()=>C.current);var E=x.useState({containerWidth:a.width,containerHeight:a.height}),M=nL(E,2),U=M[0],W=M[1],V=x.useCallback((be,pe)=>{W(Q=>{var ne=Math.round(be),X=Math.round(pe);return Q.containerWidth===ne&&Q.containerHeight===X?Q:{containerWidth:ne,containerHeight:X}})},[]);x.useEffect(()=>{if(C.current==null||typeof ResizeObserver>"u")return Ws;var be=$=>{var T,J=$[0];if(J!=null){var oe=J.contentRect,ee=oe.width,ue=oe.height;V(ee,ue),(T=_.current)===null||T===void 0||T.call(_,ee,ue)}};b>0&&(be=G$(be,b,{trailing:!0,leading:!1}));var pe=new ResizeObserver(be),Q=C.current.getBoundingClientRect(),ne=Q.width,X=Q.height;return V(ne,X),pe.observe(C.current),()=>{pe.disconnect()}},[V,b]);var Y=U.containerWidth,R=U.containerHeight;wf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ce=nP(Y,R,{width:s,height:u,aspect:r,maxHeight:p}),Z=ce.calculatedWidth,ve=ce.calculatedHeight;return wf(Y<0||R<0||Z!=null&&Z>0||ve!=null&&ve>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,Z,ve,s,u,f,h,r),x.createElement("div",jf({id:j?"".concat(j):void 0,className:Je("recharts-responsive-container",k),style:Xw(Xw({},A),{},{width:s,height:u,minWidth:f,minHeight:h,maxHeight:p}),ref:C},O),x.createElement("div",{style:X$({width:s,height:u})},x.createElement(aP,{width:Z,height:ve},g)))}),fL=x.forwardRef((e,t)=>{var r=Sy();if($n(r.width)&&$n(r.height))return e.children;var n=Z$({width:e.width,height:e.height,aspect:e.aspect}),a=n.width,s=n.height,u=nP(void 0,void 0,{width:a,height:s,aspect:e.aspect,maxHeight:e.maxHeight}),l=u.calculatedWidth,f=u.calculatedHeight;return ke(l)&&ke(f)?x.createElement(aP,{width:l,height:f},e.children):x.createElement(dL,jf({},e,{width:a,height:s,ref:t}))});function Ny(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Eh=()=>{var e,t=jr(),r=Ae(U$),n=Ae(Nh),a=(e=Ae(Sh))===null||e===void 0?void 0:e.padding;return!t||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},hL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},oP=()=>{var e;return(e=Ae(Vt))!==null&&e!==void 0?e:hL},sP=()=>Ae(mi),lP=()=>Ae(gi),lt=e=>e.layout.layoutType,Hs=()=>Ae(lt),Ey=()=>{var e=Hs();if(e==="horizontal"||e==="vertical")return e},uP=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},pL=()=>{var e=Hs();return e!==void 0},Qu=e=>{var t=wt(),r=jr(),n=e.width,a=e.height,s=Sy(),u=n,l=a;return s&&(u=s.width>0?s.width:n,l=s.height>0?s.height:a),x.useEffect(()=>{!r&&$n(u)&&$n(l)&&t(p$({width:u,height:l}))},[t,r,u,l]),null},cP=Symbol.for("immer-nothing"),Jw=Symbol.for("immer-draftable"),Dr=Symbol.for("immer-state");function dn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pu=Object.getPrototypeOf;function Ts(e){return!!e&&!!e[Dr]}function fo(e){var t;return e?dP(e)||Array.isArray(e)||!!e[Jw]||!!((t=e.constructor)!=null&&t[Jw])||Yu(e)||Ah(e):!1}var mL=Object.prototype.constructor.toString(),ej=new WeakMap;function dP(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===mL}function kf(e,t,r=!0){Ph(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function Ph(e){const t=e[Dr];return t?t.type_:Array.isArray(e)?1:Yu(e)?2:Ah(e)?3:0}function wv(e,t){return Ph(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fP(e,t,r){const n=Ph(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function gL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yu(e){return e instanceof Map}function Ah(e){return e instanceof Set}function Fa(e){return e.copy_||e.base_}function jv(e,t){if(Yu(e))return new Map(e);if(Ah(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=dP(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Dr];let a=Reflect.ownKeys(n);for(let s=0;s1&&Object.defineProperties(e,{set:Dd,add:Dd,clear:Dd,delete:Dd}),Object.freeze(e),t&&Object.values(e).forEach(r=>Py(r,!0))),e}function vL(){dn(2)}var Dd={value:vL};function Ch(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var yL={};function ho(e){const t=yL[e];return t||dn(0,e),t}var Au;function hP(){return Au}function xL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function tj(e,t){t&&(ho("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kv(e){Sv(e),e.drafts_.forEach(bL),e.drafts_=null}function Sv(e){e===Au&&(Au=e.parent_)}function rj(e){return Au=xL(Au,e)}function bL(e){const t=e[Dr];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[Dr].modified_&&(kv(t),dn(4)),fo(e)&&(e=Sf(t,e),t.parent_||Nf(t,e)),t.patches_&&ho("Patches").generateReplacementPatches_(r[Dr].base_,e,t.patches_,t.inversePatches_)):e=Sf(t,r,[]),kv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cP?e:void 0}function Sf(e,t,r){if(Ch(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[Dr];if(!a)return kf(t,(s,u)=>ij(e,a,t,s,u,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return Nf(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const s=a.copy_;let u=s,l=!1;a.type_===3&&(u=new Set(s),s.clear(),l=!0),kf(u,(f,h)=>ij(e,a,s,f,h,r,l),n),Nf(e,s,!1),r&&e.patches_&&ho("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function ij(e,t,r,n,a,s,u){if(a==null||typeof a!="object"&&!u)return;const l=Ch(a);if(!(l&&!u)){if(Ts(a)){const f=s&&t&&t.type_!==3&&!wv(t.assigned_,n)?s.concat(n):void 0,h=Sf(e,a,f);if(fP(r,n,h),Ts(h))e.canAutoFreeze_=!1;else return}else u&&r.add(a);if(fo(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&l)return;Sf(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Yu(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Nf(e,a)}}}function Nf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Py(t,r)}function wL(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:hP(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,s=Ay;r&&(a=[n],s=Cu);const{revoke:u,proxy:l}=Proxy.revocable(a,s);return n.draft_=l,n.revoke_=u,l}var Ay={get(e,t){if(t===Dr)return e;const r=Fa(e);if(!wv(r,t))return jL(e,r,t);const n=r[t];return e.finalized_||!fo(n)?n:n===ig(e.base_,t)?(ag(e),e.copy_[t]=Ev(n,e)):n},has(e,t){return t in Fa(e)},ownKeys(e){return Reflect.ownKeys(Fa(e))},set(e,t,r){const n=pP(Fa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=ig(Fa(e),t),s=a==null?void 0:a[Dr];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(gL(r,a)&&(r!==void 0||wv(e.base_,t)))return!0;ag(e),Nv(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 ig(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ag(e),Nv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Fa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){dn(11)},getPrototypeOf(e){return Pu(e.base_)},setPrototypeOf(){dn(12)}},Cu={};kf(Ay,(e,t)=>{Cu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Cu.deleteProperty=function(e,t){return Cu.set.call(this,e,t,void 0)};Cu.set=function(e,t,r){return Ay.set.call(this,e[0],t,r,e[0])};function ig(e,t){const r=e[Dr];return(r?Fa(r):e)[t]}function jL(e,t,r){var a;const n=pP(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function pP(e,t){if(!(t in e))return;let r=Pu(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Pu(r)}}function Nv(e){e.modified_||(e.modified_=!0,e.parent_&&Nv(e.parent_))}function ag(e){e.copy_||(e.copy_=jv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kL=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 s=r;r=t;const u=this;return function(f=s,...h){return u.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&dn(6),n!==void 0&&typeof n!="function"&&dn(7);let a;if(fo(t)){const s=rj(this),u=Ev(t,void 0);let l=!0;try{a=r(u),l=!1}finally{l?kv(s):Sv(s)}return tj(s,n),nj(a,s)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===cP&&(a=void 0),this.autoFreeze_&&Py(a,!0),n){const s=[],u=[];ho("Patches").generateReplacementPatches_(t,a,s,u),n(s,u)}return a}else dn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,f=>t(f,...l));let n,a;return[this.produce(t,r,(u,l)=>{n=u,a=l}),n,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fo(e)||dn(8),Ts(e)&&(e=SL(e));const t=rj(this),r=Ev(e,void 0);return r[Dr].isManual_=!0,Sv(t),r}finishDraft(e,t){const r=e&&e[Dr];(!r||!r.isManual_)&&dn(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 a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=ho("Patches").applyPatches_;return Ts(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Ev(e,t){const r=Yu(e)?ho("MapSet").proxyMap_(e,t):Ah(e)?ho("MapSet").proxySet_(e,t):wL(e,t);return(t?t.scope_:hP()).drafts_.push(r),r}function SL(e){return Ts(e)||dn(10,e),mP(e)}function mP(e){if(!fo(e)||Ch(e))return e;const t=e[Dr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=jv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=jv(e,!0);return kf(r,(a,s)=>{fP(r,a,mP(s))},n),t&&(t.finalized_=!1),r}var NL=new kL;NL.produce;var EL={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},gP=rr({name:"legend",initialState:EL,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:nt()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,s=Gr(e).payload.indexOf(n);s>-1&&(e.payload[s]=a)},prepare:nt()},removeLegendPayload:{reducer(e,t){var r=Gr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:nt()}}}),Xu=gP.actions;Xu.setLegendSize;Xu.setLegendSettings;var PL=Xu.addLegendPayload,AL=Xu.replaceLegendPayload,CL=Xu.removeLegendPayload,OL=gP.reducer,og={exports:{}},sg={};/** + * @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 _L(){if(aj)return sg;aj=1;var e=Bs();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,a=e.useRef,s=e.useEffect,u=e.useMemo,l=e.useDebugValue;return sg.useSyncExternalStoreWithSelector=function(f,h,p,g,v){var b=a(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,A=_,_=g(_),v!==void 0&&j.hasValue){var E=j.value;if(v(E,_))return O=E}return O=_}if(E=O,r(A,_))return E;var M=g(_);return v!==void 0&&v(E,M)?(A=_,E):(A=_,O=M)}var N=!1,A,O,C=p===void 0?null:p;return[function(){return S(h())},C===null?void 0:function(){return S(C())}]},[h,p,g,v]);var k=n(f,b[0],b[1]);return s(function(){j.hasValue=!0,j.value=k},[k]),l(k),k},sg}var oj;function ML(){return oj||(oj=1,og.exports=_L()),og.exports}ML();function IL(e){e()}function TL(){let e=null,t=null;return{clear(){e=null,t=null},notify(){IL(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=t={callback:r,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!n||e===null||(n=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var sj={notify(){},get:()=>[]};function DL(e,t){let r,n=sj,a=0,s=!1;function u(k){p();const S=n.subscribe(k);let N=!1;return()=>{N||(N=!0,S(),g())}}function l(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return s}function p(){a++,r||(r=e.subscribe(f),n=TL())}function g(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=sj)}function v(){s||(s=!0,p())}function b(){s&&(s=!1,g())}const j={addNestedSub:u,notifyNestedSubs:l,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return j}var RL=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$L=RL(),LL=()=>typeof navigator<"u"&&navigator.product==="ReactNative",zL=LL(),FL=()=>$L||zL?x.useLayoutEffect:x.useEffect,BL=FL();function lj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function UL(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 a=0;a{const f=DL(a);return{store:a,subscription:f,getServerState:n?()=>n:void 0}},[a,n]),u=x.useMemo(()=>a.getState(),[a]);BL(()=>{const{subscription:f}=s;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[s,u]);const l=r||HL;return x.createElement(l.Provider,{value:s},t)}var GL=KL,VL=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function qL(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Oh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(VL.has(n)){if(e[n]==null&&t[n]==null)continue;if(!UL(e[n],t[n]))return!1}else if(!qL(e[n],t[n]))return!1;return!0}function Pv(){return Pv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?Zo.separator:t,n=e.contentStyle,a=e.itemStyle,s=e.labelStyle,u=s===void 0?Zo.labelStyle:s,l=e.payload,f=e.formatter,h=e.itemSorter,p=e.wrapperClassName,g=e.labelClassName,v=e.label,b=e.labelFormatter,j=e.accessibilityLayer,k=j===void 0?Zo.accessibilityLayer:j,S=()=>{if(l&&l.length){var U={padding:0,margin:0},W=iz(l,h),V=W.map((Y,R)=>{if(!Y||Y.type==="none")return null;var ce=Y.formatter||f||nz,Z=Y.value,ve=Y.name,be=Z,pe=ve;if(ce){var Q=ce(Z,ve,Y,R,l);if(Array.isArray(Q)){var ne=ZL(Q,2);be=ne[0],pe=ne[1]}else if(Q!=null)be=Q;else return null}var X=Ql(Ql({},Zo.itemStyle),{},{color:Y.color||Zo.itemStyle.color},a);return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:X},Rn(pe)?x.createElement("span",{className:"recharts-tooltip-item-name"},pe):null,Rn(pe)?x.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,x.createElement("span",{className:"recharts-tooltip-item-value"},be),x.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:U},V)}return null},N=Ql(Ql({},Zo.contentStyle),n),A=Ql({margin:0},u),O=!Kt(v),C=O?v:"",_=Je("recharts-default-tooltip",p),E=Je("recharts-tooltip-label",g);O&&b&&l!==void 0&&l!==null&&(C=b(v,l));var M=k?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",Pv({className:_,style:N},M),x.createElement("p",{className:E,style:A},x.isValidElement(C)?C:"".concat(C)),S())},Yl="recharts-tooltip-wrapper",oz={visibility:"hidden"};function sz(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Je(Yl,{["".concat(Yl,"-right")]:ke(r)&&t&&ke(t.x)&&r>=t.x,["".concat(Yl,"-left")]:ke(r)&&t&&ke(t.x)&&r=t.y,["".concat(Yl,"-top")]:ke(n)&&t&&ke(t.y)&&n0?a:0),g=r[n]+a;if(t[n])return u[n]?p:g;var v=f[n];if(v==null)return 0;if(u[n]){var b=p,j=v;return bS?Math.max(p,v):Math.max(g,v)}function lz(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 uz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,a=e.offsetLeft,s=e.position,u=e.reverseDirection,l=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,p,g,v;return l.height>0&&l.width>0&&r?(g=dj({allowEscapeViewBox:t,coordinate:r,key:"x",offset:a,position:s,reverseDirection:u,tooltipDimension:l.width,viewBox:h,viewBoxDimension:h.width}),v=dj({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:s,reverseDirection:u,tooltipDimension:l.height,viewBox:h,viewBoxDimension:h.height}),p=lz({translateX:g,translateY:v,useTranslate3d:f})):p=oz,{cssProperties:p,cssClasses:sz({translateX:g,translateY:v,coordinate:r})}}var cz=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Zu={isSsr:cz()};function dz(e,t){return mz(e)||pz(e,t)||hz(e,t)||fz()}function fz(){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 hz(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);rZu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=dz(e,2),r=t[0],n=t[1];return x.useEffect(()=>{if(window.matchMedia){var a=window.matchMedia("(prefers-reduced-motion: reduce)"),s=()=>{n(a.matches)};return a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}}},[]),r}function hj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=xz(f,2),p=h[0],g=h[1];x.useEffect(()=>{var N=A=>{if(A.key==="Escape"){var O,C,_,E;g({dismissed:!0,dismissedAtCoordinate:{x:(O=(C=e.coordinate)===null||C===void 0?void 0:C.x)!==null&&O!==void 0?O:0,y:(_=(E=e.coordinate)===null||E===void 0?void 0:E.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),p.dismissed&&(((n=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==p.dismissedAtCoordinate.x||((s=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&s!==void 0?s:0)!==p.dismissedAtCoordinate.y)&&g(Jo(Jo({},p),{},{dismissed:!1}));var v=uz({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?{}:Jo(Jo({transition:Sz({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},j),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),S=Jo(Jo({},k),{},{visibility:!p.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return x.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:S,ref:e.innerRef},e.children)}var Ez=x.memo(Nz),yP=()=>{var e;return(e=Ae(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Av(){return Av=Object.assign?Object.assign.bind():function(e){for(var t=1;tFe(e.x)&&Fe(e.y),yj=e=>e.base!=null&&Ef(e.base)&&Ef(e),Xl=e=>e.x,Zl=e=>e.y,Oz=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(py(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=vj["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return vj[r]||uh},xj={connectNulls:!1,type:"linear"},_z=e=>{var t=e.type,r=t===void 0?xj.type:t,n=e.points,a=n===void 0?[]:n,s=e.baseLine,u=e.layout,l=e.connectNulls,f=l===void 0?xj.connectNulls:l,h=Oz(r,u),p=f?a.filter(Ef):a;if(Array.isArray(s)){var g,v=a.map((N,A)=>gj(gj({},N),{},{base:s[A]}));u==="vertical"?g=Ad().y(Zl).x1(Xl).x0(N=>N.base.x):g=Ad().x(Xl).y1(Zl).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"&&ke(s)?k=Ad().y(Zl).x1(Xl).x0(s):ke(s)?k=Ad().x(Xl).y1(Zl).y0(s):k=V2().x(Xl).y(Zl);var S=k.defined(Ef).curve(h);return S(p)},Jd=e=>{var t=e.className,r=e.points,n=e.path,a=e.pathRef,s=Hs();if((!r||!r.length)&&!n)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||s,connectNulls:e.connectNulls},l=r&&r.length?_z(u):n;return x.createElement("path",Av({},hn(e),my(e),{className:Je("recharts-curve",t),d:l===null?void 0:l,ref:a}))},Mz=["x","y","top","left","width","height","className"];function Cv(){return Cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(a,"v").concat(n,"M").concat(s,",").concat(t,"h").concat(r),Fz=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,a=n===void 0?0:n,s=e.top,u=s===void 0?0:s,l=e.left,f=l===void 0?0:l,h=e.width,p=h===void 0?0:h,g=e.height,v=g===void 0?0:g,b=e.className,j=$z(e,Mz),k=Iz({x:r,y:a,top:u,left:f,width:p,height:v},j);return!ke(r)||!ke(a)||!ke(p)||!ke(v)||!ke(u)||!ke(f)?null:x.createElement("path",Cv({},qr(k),{className:Je("recharts-cross",b),d:zz(r,a,p,v,u,f)}))};function Bz(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Pf=1e-4,xP=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],bP=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),wj=(e,t)=>r=>{var n=xP(e,t);return bP(n,r)},Uz=(e,t)=>r=>{var n=xP(e,t),a=[...n.map((s,u)=>s*u).slice(1),0];return bP(a,r)},Wz=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var a=n.map(s=>parseFloat(s));return[a[0],a[1],a[2],a[3]]},Hz=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var a=wj(e,r),s=wj(t,n),u=Uz(e,r),l=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,g=p,v=0;v<8;++v){var b=a(g)-p,j=u(g);if(Math.abs(b-p)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,s=a===void 0?8:a,u=t.dt,l=u===void 0?16.67:u,f=1,h=[0],p=0,g=0,v=1e4,b=0;b{var A,O,C;if(N<=0)return 0;if(N>=1)return f;var _=N*S,E=Math.floor(_),M=_-E;return((A=h[E])!==null&&A!==void 0?A:0)+(((O=h[E+1])!==null&&O!==void 0?O:0)-((C=h[E])!==null&&C!==void 0?C:0))*M}},Vz=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return jj(e);case"spring":return Gz();default:if(e.split("(")[0]==="cubic-bezier")return jj(e)}return typeof e=="function"?e:null},qz=(e,t,r)=>{var n,a=s=>{var u=t.tick(s);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(a,u);return}n=e.setTimeout(a,u)};return n=e.setTimeout(a,0),()=>{var s;return(s=n)===null||s===void 0?void 0:s()}},wP=x.createContext(qz);wP.Provider;function Qz(e){var t=x.useContext(wP);return x.useMemo(()=>e??t,[e,t])}function Yz(e,t,r){return(t=Xz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xz(e){var t=Zz(e,"string");return typeof t=="symbol"?t:t+""}function Zz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kj="init",Sj="pending",Nj="active",Jz="completed";function cg(e){return Math.max(0,e)}class e6{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;Yz(this,"state",kj),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=cg(t.animationDuration),this.animationBegin=cg(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()===kj)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)):cg(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=Jz}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class t6 extends e6{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(ii(this.getFrom(),this.getTo(),this.getProgress()))}}class r6{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,s=u=>{u-n>=r?t(u):a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{a!=null&&cancelAnimationFrame(a)}}}function n6(e,t){return s6(e)||o6(e,t)||a6(e,t)||i6()}function i6(){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 a6(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{},onAnimationStart:()=>{}},Pj=0,dg=1;function jP(e){var t=Xr(e,l6),r=t.animationId,n=t.isActive,a=t.canBegin,s=t.duration,u=t.easing,l=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,p=t.children,g=vP(),v=n==="auto"?!Zu.isSsr&&!g:n,b=Qz(t.animationController),j=x.useState(v?Pj:dg),k=n6(j,2),S=k[0],N=k[1];return x.useEffect(()=>{v||N(dg)},[v]),x.useEffect(()=>{var A=Vz(u);if(!v||!a||A==null)return Ws;var O=new r6,C=new t6({animationId:r,easing:A,animationDuration:s,animationBegin:l,onAnimationStart:h,onAnimationEnd:f,from:Pj,to:dg});return b(O,C,N)},[b,r,v,a,s,u,l,h,f]),p(Number(S))}function kP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=x.useRef(ku(t)),n=x.useRef(e);return n.current!==e&&(r.current=ku(t),n.current=e),r.current}var u6=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),c6=(e,t,r)=>e.map(n=>"".concat(u6(n)," ").concat(t,"ms ").concat(r)).join(","),d6=["radius"],f6=["radius"],Aj,Cj,Oj,_j,Mj,Ij,Tj,Dj,Rj,$j;function Lj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zj(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var s=oa(r),u=oa(n),l=Math.min(Math.abs(s)/2,Math.abs(u)/2),f=u>=0?1:-1,h=s>=0?1:-1,p=u>=0&&s>=0||u<0&&s<0?1:0,g;if(l>0&&Array.isArray(a)){for(var v=[0,0,0,0],b=0,j=4;bl?l:S}g=Bt(Aj||(Aj=kn(["M",",",""])),e,t+f*v[0]),v[0]>0&&(g+=Bt(Cj||(Cj=kn(["A ",",",",0,0,",",",",",""])),v[0],v[0],p,e+h*v[0],t)),g+=Bt(Oj||(Oj=kn(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(g+=Bt(_j||(_j=kn(["A ",",",",0,0,",`, + `,",",""])),v[1],v[1],p,e+r,t+f*v[1])),g+=Bt(Mj||(Mj=kn(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(g+=Bt(Ij||(Ij=kn(["A ",",",",0,0,",`, + `,",",""])),v[2],v[2],p,e+r-h*v[2],t+n)),g+=Bt(Tj||(Tj=kn(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(g+=Bt(Dj||(Dj=kn(["A ",",",",0,0,",`, + `,",",""])),v[3],v[3],p,e,t+n-f*v[3])),g+="Z"}else if(l>0&&a===+a&&a>0){var N=Math.min(l,a);g=Bt(Rj||(Rj=kn(["M ",",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,p,e+h*N,t,e+r-h*N,t,N,N,p,e+r,t+f*N,e+r,t+n-f*N,N,N,p,e+r-h*N,t+n,e+h*N,t+n,N,N,p,e,t+n-f*N)}else g=Bt($j||($j=kn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},Wj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},j6=e=>{var t=Xr(e,Wj),r=x.useRef(null),n=x.useState(-1),a=v6(n,2),s=a[0],u=a[1];x.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Q=r.current.getTotalLength();Q&&u(Q)}catch{}},[]);var l=t.x,f=t.y,h=t.width,p=t.height,g=t.radius,v=t.className,b=t.animationEasing,j=t.animationDuration,k=t.animationBegin,S=t.isAnimationActive,N=t.isUpdateAnimationActive,A=x.useRef(h),O=x.useRef(p),C=x.useRef(l),_=x.useRef(f),E=x.useMemo(()=>({x:l,y:f,width:h,height:p,radius:g}),[l,f,h,p,g]),M=kP(E,"rectangle-");if(l!==+l||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var U=Je("recharts-rectangle",v);if(!N){var W=qr(t);W.radius;var V=Fj(W,d6);return x.createElement("path",Af({},V,{x:oa(l),y:oa(f),width:oa(h),height:oa(p),radius:typeof g=="number"?g:void 0,className:U,d:Uj(l,f,h,p,g)}))}var Y=A.current,R=O.current,ce=C.current,Z=_.current,ve="0px ".concat(s===-1?1:s,"px"),be="".concat(s,"px ").concat(s,"px"),pe=c6(["strokeDasharray"],j,typeof b=="string"?b:Wj.animationEasing);return x.createElement(jP,{animationId:M,key:M,canBegin:s>0,duration:j,easing:b,isActive:N,begin:k},Q=>{var ne=ii(Y,h,Q),X=ii(R,p,Q),$=ii(ce,l,Q),T=ii(Z,f,Q);r.current&&(A.current=ne,O.current=X,C.current=$,_.current=T);var J;S?Q>0?J={transition:pe,strokeDasharray:be}:J={strokeDasharray:ve}:J={strokeDasharray:be};var oe=qr(t);oe.radius;var ee=Fj(oe,f6);return x.createElement("path",Af({},ee,{radius:typeof g=="number"?g:void 0,className:U,d:Uj($,T,ne,X,g),ref:r,style:zj(zj({},J),t.style)}))})};function Hj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kj(e){for(var t=1;te*180/Math.PI,Ht=(e,t,r,n)=>({x:e+Math.cos(-Cf*n)*r,y:t+Math.sin(-Cf*n)*r}),P6=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},A6=(e,t)=>{var r=e.x,n=e.y,a=t.x,s=t.y;return Math.sqrt((r-a)**2+(n-s)**2)},C6=(e,t)=>{var r=e.x,n=e.y,a=t.cx,s=t.cy,u=A6({x:r,y:n},{x:a,y:s});if(u<=0)return{radius:u,angle:0};var l=(r-a)/u,f=Math.acos(l);return n>s&&(f=2*Math.PI-f),{radius:u,angle:E6(f),angleInRadian:f}},O6=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),a=Math.floor(r/360),s=Math.min(n,a);return{startAngle:t-s*360,endAngle:r-s*360}},_6=(e,t)=>{var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),s=Math.floor(n/360),u=Math.min(a,s);return e+u*360},M6=(e,t)=>{var r=e.relativeX,n=e.relativeY,a=C6({x:r,y:n},t),s=a.radius,u=a.angle,l=t.innerRadius,f=t.outerRadius;if(sf||s===0)return null;var h=O6(t),p=h.startAngle,g=h.endAngle,v=u,b;if(p<=g){for(;v>g;)v-=360;for(;v=p&&v<=g}else{for(;v>p;)v-=360;for(;v=g&&v<=p}return b?Kj(Kj({},t),{},{radius:s,angle:_6(v,t)}):null};function SP(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,s=e.endAngle,u=Ht(t,r,n,a),l=Ht(t,r,n,s);return{points:[u,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:s}}var Gj,Vj,qj,Qj,Yj,Xj,Zj;function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=Kr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Rd=e=>{var t=e.cx,r=e.cy,n=e.radius,a=e.angle,s=e.sign,u=e.isExternal,l=e.cornerRadius,f=e.cornerIsExternal,h=l*(u?1:-1)+n,p=Math.asin(l/h)/Cf,g=f?a:a+s*p,v=Ht(t,r,h,g),b=Ht(t,r,n,g),j=f?a-s*p:a,k=Ht(t,r,h*Math.cos(p*Cf),j);return{center:v,circleTangency:b,lineTangency:k,theta:p}},NP=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,s=e.startAngle,u=e.endAngle,l=I6(s,u),f=s+l,h=Ht(t,r,a,s),p=Ht(t,r,a,f),g=Bt(Gj||(Gj=Ha(["M ",",",` + A `,",",`,0, + `,",",`, + `,",",` + `])),h.x,h.y,a,a,+(Math.abs(l)>180),+(s>f),p.x,p.y);if(n>0){var v=Ht(t,r,n,s),b=Ht(t,r,n,f);g+=Bt(Vj||(Vj=Ha(["L ",",",` + A `,",",`,0, + `,",",`, + `,","," Z"])),b.x,b.y,n,n,+(Math.abs(l)>180),+(s<=f),v.x,v.y)}else g+=Bt(qj||(qj=Ha(["L ",","," Z"])),t,r);return g},T6=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,a=e.outerRadius,s=e.cornerRadius,u=e.forceCornerRadius,l=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,p=Kr(h-f),g=Rd({cx:t,cy:r,radius:a,angle:f,sign:p,cornerRadius:s,cornerIsExternal:l}),v=g.circleTangency,b=g.lineTangency,j=g.theta,k=Rd({cx:t,cy:r,radius:a,angle:h,sign:-p,cornerRadius:s,cornerIsExternal:l}),S=k.circleTangency,N=k.lineTangency,A=k.theta,O=l?Math.abs(f-h):Math.abs(f-h)-j-A;if(O<0)return u?Bt(Qj||(Qj=Ha(["M ",",",` + a`,",",",0,0,1,",`,0 + a`,",",",0,0,1,",`,0 + `])),b.x,b.y,s,s,s*2,s,s,-s*2):NP({cx:t,cy:r,innerRadius:n,outerRadius:a,startAngle:f,endAngle:h});var C=Bt(Yj||(Yj=Ha(["M ",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",",` + `])),b.x,b.y,s,s,+(p<0),v.x,v.y,a,a,+(O>180),+(p<0),S.x,S.y,s,s,+(p<0),N.x,N.y);if(n>0){var _=Rd({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),E=_.circleTangency,M=_.lineTangency,U=_.theta,W=Rd({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),V=W.circleTangency,Y=W.lineTangency,R=W.theta,ce=l?Math.abs(f-h):Math.abs(f-h)-U-R;if(ce<0&&s===0)return"".concat(C,"L").concat(t,",").concat(r,"Z");C+=Bt(Xj||(Xj=Ha(["L",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",","Z"])),Y.x,Y.y,s,s,+(p<0),V.x,V.y,n,n,+(ce>180),+(p>0),E.x,E.y,s,s,+(p<0),M.x,M.y)}else C+=Bt(Zj||(Zj=Ha(["L",",","Z"])),t,r);return C},D6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},R6=e=>{var t=Xr(e,D6),r=t.cx,n=t.cy,a=t.innerRadius,s=t.outerRadius,u=t.cornerRadius,l=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,p=t.endAngle,g=t.className;if(s0&&Math.abs(h-p)<360?k=T6({cx:r,cy:n,innerRadius:a,outerRadius:s,cornerRadius:Math.min(j,b/2),forceCornerRadius:l,cornerIsExternal:f,startAngle:h,endAngle:p}):k=NP({cx:r,cy:n,innerRadius:a,outerRadius:s,startAngle:h,endAngle:p}),x.createElement("path",Ov({},qr(t),{className:v,d:k}))};function $6(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(oE(t)){if(e==="centric"){var n=t.cx,a=t.cy,s=t.innerRadius,u=t.outerRadius,l=t.angle,f=Ht(n,a,s,l),h=Ht(n,a,u,l);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return SP(t)}}function L6(e){return bE(e)?NaN:Number(e)}function fg(e){return e?(e=L6(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function EP(e,t,r){r&&typeof r!="number"&&cv(e,t,r)&&(t=r=void 0),e=fg(e),t===void 0?(t=e,e=0):t=fg(t),r=r===void 0?ee.chartData,Cy=G([gn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),_h=(e,t,r,n)=>n?Cy(e):gn(e),z6=(e,t,r)=>r?Cy(e):gn(e),F6=G([_h],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});G([Cy],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var B6=G([gn],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function Oy(e,t){return K6(e)||H6(e,t)||W6(e,t)||U6()}function U6(){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 W6(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);re.e^s.s<0?1:-1;for(n=s.d.length,a=e.d.length,t=0,r=ne.d[t]^s.s<0?1:-1;return n===a?0:n>a^s.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*it;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};xe.dividedBy=xe.div=function(e){return ui(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,r=t.constructor;return Ye(ui(t,new r(e),0,1),r.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return bt(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,r=this,n=r.constructor,a=n.precision,s=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Or))throw Error(Yr+"NaN");if(r.s<1)throw Error(Yr+(r.s?"NaN":"-Infinity"));return r.eq(Or)?new n(0):(st=!1,t=ui(Ou(r,s),Ou(e,s),s),st=!0,Ye(t,a))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_P(t,e):CP(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Yr+"NaN");return r.s?(st=!1,t=ui(r,e,0,1).times(e),st=!0,r.minus(t)):Ye(new n(r),a)};xe.naturalExponential=xe.exp=function(){return OP(this)};xe.naturalLogarithm=xe.ln=function(){return Ou(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?CP(t,e):_P(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ao+e);if(t=bt(a)+1,n=a.d.length-1,r=n*it+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};xe.squareRoot=xe.sqrt=function(){var e,t,r,n,a,s,u,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(Yr+"NaN")}for(e=bt(l),st=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=Mn(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Gs((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(a.toString()),r=f.precision,a=u=r+3;;)if(s=n,n=s.plus(ui(l,s,u+2)).times(.5),Mn(s.d).slice(0,u)===(t=Mn(n.d)).slice(0,u)){if(t=t.slice(u-3,u+1),a==u&&t=="4999"){if(Ye(s,r+1,0),s.times(s).eq(l)){n=s;break}}else if(t!="9999")break;u+=4}return st=!0,Ye(n,r)};xe.times=xe.mul=function(e){var t,r,n,a,s,u,l,f,h,p=this,g=p.constructor,v=p.d,b=(e=new g(e)).d;if(!p.s||!e.s)return new g(0);for(e.s*=p.s,r=p.e+e.e,f=v.length,h=b.length,f=0;){for(t=0,a=f+n;a>n;)l=s[a]+b[n]*v[a-n-1]+t,s[a--]=l%It|0,t=l/It|0;s[a]=(s[a]+t)%It|0}for(;!s[--u];)s.pop();return t?++r:s.shift(),e.d=s,e.e=r,st?Ye(e,g.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ln(e,0,Ks),t===void 0?t=n.rounding:Ln(t,0,8),Ye(r,e+bt(r)+1,t))};xe.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=po(n,!0):(Ln(e,0,Ks),t===void 0?t=a.rounding:Ln(t,0,8),n=Ye(new a(n),e+1,t),r=po(n,!0,e+1)),r};xe.toFixed=function(e,t){var r,n,a=this,s=a.constructor;return e===void 0?po(a):(Ln(e,0,Ks),t===void 0?t=s.rounding:Ln(t,0,8),n=Ye(new s(a),e+bt(a)+1,t),r=po(n.abs(),!1,e+bt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return Ye(new t(e),bt(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,r,n,a,s,u,l=this,f=l.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Or);if(l=new f(l),!l.s){if(e.s<1)throw Error(Yr+"Infinity");return l}if(l.eq(Or))return l;if(n=f.precision,e.eq(Or))return Ye(l,n);if(t=e.e,r=e.d.length-1,u=t>=r,s=l.s,u){if((r=p<0?-p:p)<=AP){for(a=new f(Or),t=Math.ceil(n/it+4),st=!1;r%2&&(a=a.times(l),rk(a.d,t)),r=Gs(r/2),r!==0;)l=l.times(l),rk(l.d,t);return st=!0,e.s<0?new f(Or).div(a):Ye(a,n)}}else if(s<0)throw Error(Yr+"NaN");return s=s<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,st=!1,a=e.times(Ou(l,n+h)),st=!0,a=OP(a),a.s=s,a};xe.toPrecision=function(e,t){var r,n,a=this,s=a.constructor;return e===void 0?(r=bt(a),n=po(a,r<=s.toExpNeg||r>=s.toExpPos)):(Ln(e,1,Ks),t===void 0?t=s.rounding:Ln(t,0,8),a=Ye(new s(a),e,t),r=bt(a),n=po(a,e<=r||r<=s.toExpNeg,e)),n};xe.toSignificantDigits=xe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ln(e,1,Ks),t===void 0?t=n.rounding:Ln(t,0,8)),Ye(new n(r),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),r=e.constructor;return po(e,t<=r.toExpNeg||t>=r.toExpPos)};function CP(e,t){var r,n,a,s,u,l,f,h,p=e.constructor,g=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),st?Ye(t,g):t;if(f=e.d,h=t.d,u=e.e,a=t.e,f=f.slice(),s=u-a,s){for(s<0?(n=f,s=-s,l=h.length):(n=h,a=u,l=f.length),u=Math.ceil(g/it),l=u>l?u+1:l+1,s>l&&(s=l,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for(l=f.length,s=h.length,l-s<0&&(s=l,n=h,h=f,f=n),r=0;s;)r=(f[--s]=f[s]+h[s]+r)/It|0,f[s]%=It;for(r&&(f.unshift(r),++a),l=f.length;f[--l]==0;)f.pop();return t.d=f,t.e=a,st?Ye(t,g):t}function Ln(e,t,r){if(e!==~~e||er)throw Error(ao+e)}function Mn(e){var t,r,n,a=e.length-1,s="",u=e[0];if(a>0){for(s+=u,t=1;tu?1:-1;else for(l=f=0;la[l]?1:-1;break}return f}function r(n,a,s){for(var u=0;s--;)n[s]-=u,u=n[s]1;)n.shift()}return function(n,a,s,u){var l,f,h,p,g,v,b,j,k,S,N,A,O,C,_,E,M,U,W=n.constructor,V=n.s==a.s?1:-1,Y=n.d,R=a.d;if(!n.s)return new W(n);if(!a.s)throw Error(Yr+"Division by zero");for(f=n.e-a.e,M=R.length,_=Y.length,b=new W(V),j=b.d=[],h=0;R[h]==(Y[h]||0);)++h;if(R[h]>(Y[h]||0)&&--f,s==null?A=s=W.precision:u?A=s+(bt(n)-bt(a))+1:A=s,A<0)return new W(0);if(A=A/it+2|0,h=0,M==1)for(p=0,R=R[0],A++;(h<_||p)&&A--;h++)O=p*It+(Y[h]||0),j[h]=O/R|0,p=O%R|0;else{for(p=It/(R[0]+1)|0,p>1&&(R=e(R,p),Y=e(Y,p),M=R.length,_=Y.length),C=M,k=Y.slice(0,M),S=k.length;S=It/2&&++E;do p=0,l=t(R,k,M,S),l<0?(N=k[0],M!=S&&(N=N*It+(k[1]||0)),p=N/E|0,p>1?(p>=It&&(p=It-1),g=e(R,p),v=g.length,S=k.length,l=t(g,k,v,S),l==1&&(p--,r(g,M16)throw Error(_y+bt(e));if(!e.s)return new p(Or);for(st=!1,l=g,u=new p(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(n=Math.log(Ba(2,h))/Math.LN10*2+5|0,l+=n,r=a=s=new p(Or),p.precision=l;;){if(a=Ye(a.times(e),l),r=r.times(++f),u=s.plus(ui(a,r,l)),Mn(u.d).slice(0,l)===Mn(s.d).slice(0,l)){for(;h--;)s=Ye(s.times(s),l);return p.precision=g,t==null?(st=!0,Ye(s,g)):s}s=u}}function bt(e){for(var t=e.e*it,r=e.d[0];r>=10;r/=10)t++;return t}function hg(e,t,r){if(t>e.LN10.sd())throw st=!0,r&&(e.precision=r),Error(Yr+"LN10 precision limit exceeded");return Ye(new e(e.LN10),t)}function Qi(e){for(var t="";e--;)t+="0";return t}function Ou(e,t){var r,n,a,s,u,l,f,h,p,g=1,v=10,b=e,j=b.d,k=b.constructor,S=k.precision;if(b.s<1)throw Error(Yr+(b.s?"NaN":"-Infinity"));if(b.eq(Or))return new k(0);if(t==null?(st=!1,h=S):h=t,b.eq(10))return t==null&&(st=!0),hg(k,h);if(h+=v,k.precision=h,r=Mn(j),n=r.charAt(0),s=bt(b),Math.abs(s)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Mn(b.d),n=r.charAt(0),g++;s=bt(b),n>1?(b=new k("0."+r),s++):b=new k(n+"."+r.slice(1))}else return f=hg(k,h+2,S).times(s+""),b=Ou(new k(n+"."+r.slice(1)),h-v).plus(f),k.precision=S,t==null?(st=!0,Ye(b,S)):b;for(l=u=b=ui(b.minus(Or),b.plus(Or),h),p=Ye(b.times(b),h),a=3;;){if(u=Ye(u.times(p),h),f=l.plus(ui(u,new k(a),h)),Mn(f.d).slice(0,h)===Mn(l.d).slice(0,h))return l=l.times(2),s!==0&&(l=l.plus(hg(k,h+2,S).times(s+""))),l=ui(l,new k(g),h),k.precision=S,t==null?(st=!0,Ye(l,S)):l;l=f,a+=2}}function tk(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Gs(r/it),e.d=[],n=(r+1)%it,r<0&&(n+=it),nOf||e.e<-Of))throw Error(_y+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ye(e,t,r){var n,a,s,u,l,f,h,p,g=e.d;for(u=1,s=g[0];s>=10;s/=10)u++;if(n=t-u,n<0)n+=it,a=t,h=g[p=0];else{if(p=Math.ceil((n+1)/it),s=g.length,p>=s)return e;for(h=s=g[p],u=1;s>=10;s/=10)u++;n%=it,a=n-it+u}if(r!==void 0&&(s=Ba(10,u-a-1),l=h/s%10|0,f=t<0||g[p+1]!==void 0||h%s,f=r<4?(l||f)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||f||r==6&&(n>0?a>0?h/Ba(10,u-a):0:g[p-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(s=bt(e),g.length=1,t=t-s-1,g[0]=Ba(10,(it-t%it)%it),e.e=Gs(-t/it)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=p,s=1,p--):(g.length=p+1,s=Ba(10,it-n),g[p]=a>0?(h/Ba(10,u-a)%Ba(10,a)|0)*s:0),f)for(;;)if(p==0){(g[0]+=s)==It&&(g[0]=1,++e.e);break}else{if(g[p]+=s,g[p]!=It)break;g[p--]=0,s=1}for(n=g.length;g[--n]===0;)g.pop();if(st&&(e.e>Of||e.e<-Of))throw Error(_y+bt(e));return e}function _P(e,t){var r,n,a,s,u,l,f,h,p,g,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),st?Ye(t,b):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),u=h-n,u){for(p=u<0,p?(r=f,u=-u,l=g.length):(r=g,n=h,l=f.length),a=Math.max(Math.ceil(b/it),l)+2,u>a&&(u=a,r.length=1),r.reverse(),a=u;a--;)r.push(0);r.reverse()}else{for(a=f.length,l=g.length,p=a0;--a)f[l++]=0;for(a=g.length;a>u;){if(f[--a]0?s=s.charAt(0)+"."+s.slice(1)+Qi(n):u>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(a<0?"e":"e+")+a):a<0?(s="0."+Qi(-a-1)+s,r&&(n=r-u)>0&&(s+=Qi(n))):a>=u?(s+=Qi(a+1-u),r&&(n=r-a-1)>0&&(s=s+"."+Qi(n))):((n=a+1)0&&(a+1===u&&(s+="."),s+=Qi(n))),e.s<0?"-"+s:s}function rk(e,t){if(e.length>t)return e.length=t,!0}function MP(e){var t,r,n;function a(s){var u=this;if(!(u instanceof a))return new a(s);if(u.constructor=a,s instanceof a){u.s=s.s,u.e=s.e,u.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(ao+s);if(s>0)u.s=1;else if(s<0)s=-s,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(s===~~s&&s<1e7){u.e=0,u.d=[s];return}return tk(u,s.toString())}else if(typeof s!="string")throw Error(ao+s);if(s.charCodeAt(0)===45?(s=s.slice(1),u.s=-1):u.s=1,q6.test(s))tk(u,s);else throw Error(ao+s)}if(a.prototype=xe,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=MP,a.config=a.set=Q6,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(ao+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ao+r+": "+n);return this}var My=MP(V6);Or=new My(1);const We=My;function IP(e){var t;return e===0?t=1:t=Math.floor(new We(e).abs().log(10).toNumber())+1,t}function TP(e,t,r){for(var n=new We(e),a=0,s=[];n.lt(t)&&a<1e5;)s.push(n.toNumber()),n=n.add(r),a++;return s}function _u(e,t){return J6(e)||Z6(e,t)||X6(e,t)||Y6()}function Y6(){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 X6(e,t){if(e){if(typeof e=="string")return nk(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nk(e,t):void 0}}function nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=_u(e,2),r=t[0],n=t[1],a=r,s=n;return r>n&&(a=n,s=r),[a,s]},Iy=(e,t,r)=>{if(e.lte(0))return new We(0);var n=IP(e.toNumber()),a=new We(10).pow(n),s=e.div(a),u=n!==1?.05:.1,l=new We(Math.ceil(s.div(u).toNumber())).add(r).mul(u),f=l.mul(a);return t?new We(f.toNumber()):new We(Math.ceil(f.toNumber()))},RP=(e,t,r)=>{var n;if(e.lte(0))return new We(0);var a=[1,2,2.5,5],s=e.toNumber(),u=Math.floor(new We(s).abs().log(10).toNumber()),l=new We(10).pow(u),f=e.div(l).toNumber(),h=a.findIndex(b=>b>=f-1e-10);if(h===-1&&(l=l.mul(10),h=0),h+=r,h>=a.length){var p=Math.floor(h/a.length);h%=a.length,l=l.mul(new We(10).pow(p))}var g=(n=a[h])!==null&&n!==void 0?n:1,v=new We(g).mul(l);return t?v:new We(Math.ceil(v.toNumber()))},eF=(e,t,r)=>{var n=new We(1),a=new We(e);if(!a.isint()&&r){var s=Math.abs(e);s<1?(n=new We(10).pow(IP(e)-1),a=new We(Math.floor(a.div(n).toNumber())).mul(n)):s>1&&(a=new We(Math.floor(e)))}else e===0?a=new We(Math.floor((t-1)/2)):r||(a=new We(Math.floor(e)));for(var u=Math.floor((t-1)/2),l=[],f=0;f4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Iy;if(!Number.isFinite((r-t)/(n-1)))return{step:new We(0),tickMin:new We(0),tickMax:new We(0)};var l=u(new We(r).sub(t).div(n-1),a,s),f;t<=0&&r>=0?f=new We(0):(f=new We(t).add(r).div(2),f=f.sub(new We(f).mod(l)));var h=Math.ceil(f.sub(t).div(l).toNumber()),p=Math.ceil(new We(r).sub(f).div(l).toNumber()),g=h+p+1;return g>n?$P(t,r,n,a,s+1,u):(g0?p+(n-g):p,h=r>0?h:h+(n-g)),{step:l,tickMin:f.sub(new We(h).mul(l)),tickMax:f.add(new We(p).mul(l))})},ik=function(t){var r=_u(t,2),n=r[0],a=r[1],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(s,2),h=DP([n,a]),p=_u(h,2),g=p[0],v=p[1];if(g===-1/0||v===1/0){var b=v===1/0?[g,...Array(s-1).fill(1/0)]:[...Array(s-1).fill(-1/0),v];return n>a?b.reverse():b}if(g===v)return eF(g,s,u);var j=l==="snap125"?RP:Iy,k=$P(g,v,f,u,0,j),S=k.step,N=k.tickMin,A=k.tickMax,O=TP(N,A.add(new We(.1).mul(S)),S);return n>a?O.reverse():O},ak=function(t,r){var n=_u(t,2),a=n[0],s=n[1],u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=DP([a,s]),h=_u(f,2),p=h[0],g=h[1];if(p===-1/0||g===1/0)return[a,s];if(p===g)return[p];var v=l==="snap125"?RP:Iy,b=Math.max(r,2),j=v(new We(g).sub(p).div(b-1),u,0),k=[...TP(new We(p),new We(g),j),g];return u===!1&&(k=k.map(S=>Math.round(S))),a>s?k.reverse():k},tF=e=>e.rootProps.barCategoryGap,Mh=e=>e.rootProps.stackOffset,LP=e=>e.rootProps.reverseStackOrder,Ty=e=>e.options.chartName,Dy=e=>e.rootProps.syncId,zP=e=>e.rootProps.syncMethod,Ry=e=>e.options.eventEmitter,rF=e=>e.rootProps.baseValue,or={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ta={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Sn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Ih=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Th(e,t,r){if(r!=="auto")return r;if(e!=null)return Fn(e,t)?"category":"number"}function ok(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _f(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},$y=G([oF,uP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Th(t,"angleAxis",sk.type))!==null&&r!==void 0?r:"category";return _f(_f({},sk),{},{type:n})}),sF=(e,t)=>e.polarAxis.radiusAxis[t],Ly=G([sF,uP],(e,t)=>{var r;if(e!=null)return e;var n=(r=Th(t,"radiusAxis",lk.type))!==null&&r!==void 0?r:"category";return _f(_f({},lk),{},{type:n})}),Dh=e=>e.polarOptions,zy=G([mi,gi,Vt],P6),FP=G([Dh,zy],(e,t)=>{if(e!=null)return ha(e.innerRadius,t,0)}),BP=G([Dh,zy],(e,t)=>{if(e!=null)return ha(e.outerRadius,t,t*.8)}),lF=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},UP=G([Dh],lF);G([$y,UP],Ih);var WP=G([zy,FP,BP],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});G([Ly,WP],Ih);var HP=G([lt,Dh,FP,BP,mi,gi],(e,t,r,n,a,s)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var u=t.cx,l=t.cy,f=t.startAngle,h=t.endAngle;return{cx:ha(u,a,a/2),cy:ha(l,s,s/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Dt=(e,t)=>t,Rh=(e,t,r)=>r;function Fy(e){return e==null?void 0:e.id}function KP(e,t,r){var n=t.chartData,a=n===void 0?[]:n,s=r.allowDuplicatedCategory,u=r.dataKey,l=new Map;return e.forEach(f=>{var h,p=(h=f.data)!==null&&h!==void 0?h:a;if(!(p==null||p.length===0)){var g=Fy(f);p.forEach((v,b)=>{var j=u==null||s?b:String(Tt(v,u,null)),k=Tt(v,f.dataKey,0),S;l.has(j)?S=l.get(j):S={},Object.assign(S,{[g]:k}),l.set(j,S)})}}),Array.from(l.values())}function By(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var $h=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Lh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function uF(e,t){if(e.length===t.length){for(var r=0;r{var t=lt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Vs=e=>e.tooltip.settings.axisId;function Uy(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),a=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(s){function u(){return s.apply(this,arguments)}return u.toString=function(){return s.toString()},u})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(s){var u=a[0],l=a[1];return u<=l?s>=u&&s<=l:s>=l&&s<=u},bandwidth:r?()=>r.call(e):void 0,ticks:t?s=>t.call(e,s):void 0,map:(s,u)=>{var l=e(s);if(l!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var f=e.bandwidth();switch(u.position){case"middle":l+=f/2;break;case"end":l+=f;break}}return l}}}}}var cF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!In(t)){for(var r,n,a=0;an)&&(n=s))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function ua(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function dF(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Wy(e){let t,r,n;e.length!==2?(t=ua,r=(l,f)=>ua(e(l),f),n=(l,f)=>e(l)-f):(t=e===ua||e===dF?e:fF,r=e,n=e);function a(l,f,h=0,p=l.length){if(h>>1;r(l[g],f)<0?h=g+1:p=g}while(h>>1;r(l[g],f)<=0?h=g+1:p=g}while(hh&&n(l[g-1],f)>-n(l[g],f)?g-1:g}return{left:a,center:u,right:s}}function fF(){return 0}function GP(e){return e===null?NaN:+e}function*hF(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const pF=Wy(ua),Ju=pF.right;Wy(GP).center;class uk extends Map{constructor(t,r=vF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(ck(this,t))}has(t){return super.has(ck(this,t))}set(t,r){return super.set(mF(this,t),r)}delete(t){return super.delete(gF(this,t))}}function ck({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function mF({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function gF({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function vF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function yF(e=ua){if(e===ua)return VP;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 VP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const xF=Math.sqrt(50),bF=Math.sqrt(10),wF=Math.sqrt(2);function Mf(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),s=n/Math.pow(10,a),u=s>=xF?10:s>=bF?5:s>=wF?2:1;let l,f,h;return a<0?(h=Math.pow(10,-a)/u,l=Math.round(e*h),f=Math.round(t*h),l/ht&&--f,h=-h):(h=Math.pow(10,a)*u,l=Math.round(e/h),f=Math.round(t/h),l*ht&&--f),f0))return[];if(e===t)return[e];const n=t=a))return[];const l=s-a+1,f=new Array(l);if(n)if(u<0)for(let h=0;h=n)&&(r=n);return r}function fk(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function qP(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?VP:yF(a);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),g=.5*Math.exp(2*p/3),v=.5*Math.sqrt(p*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));qP(e,t,b,j,a)}const s=e[t];let u=r,l=n;for(Jl(e,r,t),a(e[n],s)>0&&Jl(e,r,n);u0;)--l}a(e[r],s)===0?Jl(e,r,l):(++l,Jl(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function Jl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function jF(e,t,r){if(e=Float64Array.from(hF(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return fk(e);if(t>=1)return dk(e);var n,a=(n-1)*t,s=Math.floor(a),u=dk(qP(e,s).subarray(0,s+1)),l=fk(e.subarray(s+1));return u+(l-u)*(a-s)}}function kF(e,t,r=GP){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,s=Math.floor(a),u=+r(e[s],s,e),l=+r(e[s+1],s+1,e);return u+(l-u)*(a-s)}}function SF(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(a);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?$d(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?$d(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=PF.exec(e))?new br(t[1],t[2],t[3],1):(t=AF.exec(e))?new br(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=CF.exec(e))?$d(t[1],t[2],t[3],t[4]):(t=OF.exec(e))?$d(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_F.exec(e))?xk(t[1],t[2]/100,t[3]/100,1):(t=MF.exec(e))?xk(t[1],t[2]/100,t[3]/100,t[4]):hk.hasOwnProperty(e)?gk(hk[e]):e==="transparent"?new br(NaN,NaN,NaN,0):null}function gk(e){return new br(e>>16&255,e>>8&255,e&255,1)}function $d(e,t,r,n){return n<=0&&(e=t=r=NaN),new br(e,t,r,n)}function DF(e){return e instanceof ec||(e=Tu(e)),e?(e=e.rgb(),new br(e.r,e.g,e.b,e.opacity)):new br}function Dv(e,t,r,n){return arguments.length===1?DF(e):new br(e,t,r,n??1)}function br(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Gy(br,Dv,YP(ec,{brighter(e){return e=e==null?If:Math.pow(If,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mu:Math.pow(Mu,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new br(oo(this.r),oo(this.g),oo(this.b),Tf(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:vk,formatHex:vk,formatHex8:RF,formatRgb:yk,toString:yk}));function vk(){return`#${Ka(this.r)}${Ka(this.g)}${Ka(this.b)}`}function RF(){return`#${Ka(this.r)}${Ka(this.g)}${Ka(this.b)}${Ka((isNaN(this.opacity)?1:this.opacity)*255)}`}function yk(){const e=Tf(this.opacity);return`${e===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${e===1?")":`, ${e})`}`}function Tf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ka(e){return e=oo(e),(e<16?"0":"")+e.toString(16)}function xk(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new fn(e,t,r,n)}function XP(e){if(e instanceof fn)return new fn(e.h,e.s,e.l,e.opacity);if(e instanceof ec||(e=Tu(e)),!e)return new fn;if(e instanceof fn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),s=Math.max(t,r,n),u=NaN,l=s-a,f=(s+a)/2;return l?(t===s?u=(r-n)/l+(r0&&f<1?0:u,new fn(u,l,f,e.opacity)}function $F(e,t,r,n){return arguments.length===1?XP(e):new fn(e,t,r,n??1)}function fn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Gy(fn,$F,YP(ec,{brighter(e){return e=e==null?If:Math.pow(If,e),new fn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mu:Math.pow(Mu,e),new fn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new br(pg(e>=240?e-240:e+120,a,n),pg(e,a,n),pg(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new fn(bk(this.h),Ld(this.s),Ld(this.l),Tf(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=Tf(this.opacity);return`${e===1?"hsl(":"hsla("}${bk(this.h)}, ${Ld(this.s)*100}%, ${Ld(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bk(e){return e=(e||0)%360,e<0?e+360:e}function Ld(e){return Math.max(0,Math.min(1,e||0))}function pg(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Vy=e=>()=>e;function LF(e,t){return function(r){return e+r*t}}function zF(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 FF(e){return(e=+e)==1?ZP:function(t,r){return r-t?zF(t,r,e):Vy(isNaN(t)?r:t)}}function ZP(e,t){var r=t-e;return r?LF(e,r):Vy(isNaN(e)?t:e)}const wk=(function e(t){var r=FF(t);function n(a,s){var u=r((a=Dv(a)).r,(s=Dv(s)).r),l=r(a.g,s.g),f=r(a.b,s.b),h=ZP(a.opacity,s.opacity);return function(p){return a.r=u(p),a.g=l(p),a.b=f(p),a.opacity=h(p),a+""}}return n.gamma=e,n})(1);function BF(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(s){for(a=0;ar&&(s=t.slice(r,s),l[u]?l[u]+=s:l[++u]=s),(n=n[0])===(a=a[0])?l[u]?l[u]+=a:l[++u]=a:(l[++u]=null,f.push({i:u,x:Df(n,a)})),r=mg.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function ZF(e,t,r){var n=e[0],a=e[1],s=t[0],u=t[1];return a2?JF:ZF,f=h=null,g}function g(v){return v==null||isNaN(v=+v)?s:(f||(f=l(e.map(n),t,r)))(n(u(v)))}return g.invert=function(v){return u(a((h||(h=l(t,e.map(n),Df)))(v)))},g.domain=function(v){return arguments.length?(e=Array.from(v,Rf),p()):e.slice()},g.range=function(v){return arguments.length?(t=Array.from(v),p()):t.slice()},g.rangeRound=function(v){return t=Array.from(v),r=qy,p()},g.clamp=function(v){return arguments.length?(u=v?!0:sr,p()):u!==sr},g.interpolate=function(v){return arguments.length?(r=v,p()):r},g.unknown=function(v){return arguments.length?(s=v,g):s},function(v,b){return n=v,a=b,p()}}function Qy(){return zh()(sr,sr)}function e8(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $f(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 Ds(e){return e=$f(Math.abs(e)),e?e[1]:NaN}function t8(e,t){return function(r,n){for(var a=r.length,s=[],u=0,l=e[0],f=0;a>0&&l>0&&(f+l+1>n&&(l=Math.max(1,n-f)),s.push(r.substring(a-=l,a+l)),!((f+=l+1)>n));)l=e[u=(u+1)%e.length];return s.reverse().join(t)}}function r8(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var n8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Du(e){if(!(t=n8.exec(e)))throw new Error("invalid format: "+e);var t;return new Yy({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Du.prototype=Yy.prototype;function Yy(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Yy.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function i8(e){e:for(var t=e.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Lf;function a8(e,t){var r=$f(e,t);if(!r)return Lf=void 0,e.toPrecision(t);var n=r[0],a=r[1],s=a-(Lf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,u=n.length;return s===u?n:s>u?n+new Array(s-u+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+$f(e,Math.max(0,t+s-1))[0]}function kk(e,t){var r=$f(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Sk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:e8,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)=>kk(e*100,t),r:kk,s:a8,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Nk(e){return e}var Ek=Array.prototype.map,Pk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function o8(e){var t=e.grouping===void 0||e.thousands===void 0?Nk:t8(Ek.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Nk:r8(Ek.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(g,v){g=Du(g);var b=g.fill,j=g.align,k=g.sign,S=g.symbol,N=g.zero,A=g.width,O=g.comma,C=g.precision,_=g.trim,E=g.type;E==="n"?(O=!0,E="g"):Sk[E]||(C===void 0&&(C=12),_=!0,E="g"),(N||b==="0"&&j==="=")&&(N=!0,b="0",j="=");var M=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),U=(S==="$"?n:/[%p]/.test(E)?u:"")+(v&&v.suffix!==void 0?v.suffix:""),W=Sk[E],V=/[defgprs%]/.test(E);C=C===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function Y(R){var ce=M,Z=U,ve,be,pe;if(E==="c")Z=W(R)+Z,R="";else{R=+R;var Q=R<0||1/R<0;if(R=isNaN(R)?f:W(Math.abs(R),C),_&&(R=i8(R)),Q&&+R==0&&k!=="+"&&(Q=!1),ce=(Q?k==="("?k:l:k==="-"||k==="("?"":k)+ce,Z=(E==="s"&&!isNaN(R)&&Lf!==void 0?Pk[8+Lf/3]:"")+Z+(Q&&k==="("?")":""),V){for(ve=-1,be=R.length;++vepe||pe>57){Z=(pe===46?a+R.slice(ve+1):R.slice(ve))+Z,R=R.slice(0,ve);break}}}O&&!N&&(R=t(R,1/0));var ne=ce.length+R.length+Z.length,X=ne>1)+ce+R+Z+X.slice(ne);break;default:R=X+ce+R+Z;break}return s(R)}return Y.toString=function(){return g+""},Y}function p(g,v){var b=Math.max(-8,Math.min(8,Math.floor(Ds(v)/3)))*3,j=Math.pow(10,-b),k=h((g=Du(g),g.type="f",g),{suffix:Pk[8+b/3]});return function(S){return k(j*S)}}return{format:h,formatPrefix:p}}var zd,Xy,JP;s8({thousands:",",grouping:[3],currency:["$",""]});function s8(e){return zd=o8(e),Xy=zd.format,JP=zd.formatPrefix,zd}function l8(e){return Math.max(0,-Ds(Math.abs(e)))}function u8(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ds(t)/3)))*3-Ds(Math.abs(e)))}function c8(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ds(t)-Ds(e))+1}function eA(e,t,r,n){var a=Iv(e,t,r),s;switch(n=Du(n??",f"),n.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=u8(a,u))&&(n.precision=s),JP(n,u)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=c8(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=l8(a))&&(n.precision=s-(n.type==="%")*2);break}}return Xy(n)}function ma(e){var t=e.domain;return e.ticks=function(r){var n=t();return _v(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return eA(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,s=n.length-1,u=n[a],l=n[s],f,h,p=10;for(l0;){if(h=Mv(u,l,r),h===f)return n[a]=u,n[s]=l,t(n);if(h>0)u=Math.floor(u/h)*h,l=Math.ceil(l/h)*h;else if(h<0)u=Math.ceil(u*h)/h,l=Math.floor(l*h)/h;else break;f=h}return e},e}function tA(){var e=Qy();return e.copy=function(){return tc(e,tA())},Zr.apply(e,arguments),ma(e)}function rA(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,Rf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rA(e).unknown(t)},e=arguments.length?Array.from(e,Rf):[0,1],ma(r)}function nA(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],s=e[n],u;return sMath.pow(e,t)}function m8(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 Ok(e){return(t,r)=>-e(-t,r)}function Zy(e){const t=e(Ak,Ck),r=t.domain;let n=10,a,s;function u(){return a=m8(n),s=p8(n),r()[0]<0?(a=Ok(a),s=Ok(s),e(d8,f8)):e(Ak,Ck),t}return t.base=function(l){return arguments.length?(n=+l,u()):n},t.domain=function(l){return arguments.length?(r(l),u()):r()},t.ticks=l=>{const f=r();let h=f[0],p=f[f.length-1];const g=p0){for(;v<=b;++v)for(j=1;jp)break;N.push(k)}}else for(;v<=b;++v)for(j=n-1;j>=1;--j)if(k=v>0?j/s(-v):j*s(v),!(kp)break;N.push(k)}N.length*2{if(l==null&&(l=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Du(f)).precision==null&&(f.trim=!0),f=Xy(f)),l===1/0)return f;const h=Math.max(1,n*l/t.ticks().length);return p=>{let g=p/s(Math.round(a(p)));return g*nr(nA(r(),{floor:l=>s(Math.floor(a(l))),ceil:l=>s(Math.ceil(a(l)))})),t}function iA(){const e=Zy(zh()).domain([1,10]);return e.copy=()=>tc(e,iA()).base(e.base()),Zr.apply(e,arguments),e}function _k(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Mk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Jy(e){var t=1,r=e(_k(t),Mk(t));return r.constant=function(n){return arguments.length?e(_k(t=+n),Mk(t)):t},ma(r)}function aA(){var e=Jy(zh());return e.copy=function(){return tc(e,aA()).constant(e.constant())},Zr.apply(e,arguments)}function Ik(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function g8(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function v8(e){return e<0?-e*e:e*e}function e0(e){var t=e(sr,sr),r=1;function n(){return r===1?e(sr,sr):r===.5?e(g8,v8):e(Ik(r),Ik(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},ma(t)}function t0(){var e=e0(zh());return e.copy=function(){return tc(e,t0()).exponent(e.exponent())},Zr.apply(e,arguments),e}function y8(){return t0.apply(null,arguments).exponent(.5)}function Tk(e){return Math.sign(e)*e*e}function x8(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function oA(){var e=Qy(),t=[0,1],r=!1,n;function a(s){var u=x8(e(s));return isNaN(u)?n:r?Math.round(u):u}return a.invert=function(s){return e.invert(Tk(s))},a.domain=function(s){return arguments.length?(e.domain(s),a):e.domain()},a.range=function(s){return arguments.length?(e.range((t=Array.from(s,Rf)).map(Tk)),a):t.slice()},a.rangeRound=function(s){return a.range(s).round(!0)},a.round=function(s){return arguments.length?(r=!!s,a):r},a.clamp=function(s){return arguments.length?(e.clamp(s),a):e.clamp()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.copy=function(){return oA(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Zr.apply(a,arguments),ma(a)}function sA(){var e=[],t=[],r=[],n;function a(){var u=0,l=Math.max(1,t.length);for(r=new Array(l-1);++u0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[h-1],n[h]]},u.unknown=function(f){return arguments.length&&(s=f),u},u.thresholds=function(){return n.slice()},u.copy=function(){return lA().domain([e,t]).range(a).unknown(s)},Zr.apply(ma(u),arguments)}function uA(){var e=[.5],t=[0,1],r,n=1;function a(s){return s!=null&&s<=s?t[Ju(e,s,0,n)]:r}return a.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(s){var u=t.indexOf(s);return[e[u-1],e[u]]},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return uA().domain(e).range(t).unknown(r)},Zr.apply(a,arguments)}const gg=new Date,vg=new Date;function Et(e,t,r,n){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(e(s=new Date(+s)),s),a.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),a.round=s=>{const u=a(s),l=a.ceil(s);return s-u(t(s=new Date(+s),u==null?1:Math.floor(u)),s),a.range=(s,u,l)=>{const f=[];if(s=a.ceil(s),l=l==null?1:Math.floor(l),!(s0))return f;let h;do f.push(h=new Date(+s)),t(s,l),e(s);while(hEt(u=>{if(u>=u)for(;e(u),!s(u);)u.setTime(u-1)},(u,l)=>{if(u>=u)if(l<0)for(;++l<=0;)for(;t(u,-1),!s(u););else for(;--l>=0;)for(;t(u,1),!s(u););}),r&&(a.count=(s,u)=>(gg.setTime(+s),vg.setTime(+u),e(gg),e(vg),Math.floor(r(gg,vg))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(n?u=>n(u)%s===0:u=>a.count(0,u)%s===0):a)),a}const zf=Et(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);zf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Et(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):zf);zf.range;const ai=1e3,Vr=ai*60,oi=Vr*60,fi=oi*24,r0=fi*7,Dk=fi*30,yg=fi*365,Ga=Et(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getUTCSeconds());Ga.range;const n0=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ai)},(e,t)=>{e.setTime(+e+t*Vr)},(e,t)=>(t-e)/Vr,e=>e.getMinutes());n0.range;const i0=Et(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vr)},(e,t)=>(t-e)/Vr,e=>e.getUTCMinutes());i0.range;const a0=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ai-e.getMinutes()*Vr)},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getHours());a0.range;const o0=Et(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getUTCHours());o0.range;const rc=Et(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vr)/fi,e=>e.getDate()-1);rc.range;const Fh=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fi,e=>e.getUTCDate()-1);Fh.range;const cA=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fi,e=>Math.floor(e/fi));cA.range;function bo(e){return Et(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())*Vr)/r0)}const Bh=bo(0),Ff=bo(1),b8=bo(2),w8=bo(3),Rs=bo(4),j8=bo(5),k8=bo(6);Bh.range;Ff.range;b8.range;w8.range;Rs.range;j8.range;k8.range;function wo(e){return Et(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/r0)}const Uh=wo(0),Bf=wo(1),S8=wo(2),N8=wo(3),$s=wo(4),E8=wo(5),P8=wo(6);Uh.range;Bf.range;S8.range;N8.range;$s.range;E8.range;P8.range;const s0=Et(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());s0.range;const l0=Et(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());l0.range;const hi=Et(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());hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(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)});hi.range;const pi=Et(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());pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(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)});pi.range;function dA(e,t,r,n,a,s){const u=[[Ga,1,ai],[Ga,5,5*ai],[Ga,15,15*ai],[Ga,30,30*ai],[s,1,Vr],[s,5,5*Vr],[s,15,15*Vr],[s,30,30*Vr],[a,1,oi],[a,3,3*oi],[a,6,6*oi],[a,12,12*oi],[n,1,fi],[n,2,2*fi],[r,1,r0],[t,1,Dk],[t,3,3*Dk],[e,1,yg]];function l(h,p,g){const v=pS).right(u,v);if(b===u.length)return e.every(Iv(h/yg,p/yg,g));if(b===0)return zf.every(Math.max(Iv(h,p,g),1));const[j,k]=u[v/u[b-1][2]53)return null;"w"in ie||(ie.w=1),"Z"in ie?(Be=bg(eu(ie.y,0,1)),_e=Be.getUTCDay(),Be=_e>4||_e===0?Bf.ceil(Be):Bf(Be),Be=Fh.offset(Be,(ie.V-1)*7),ie.y=Be.getUTCFullYear(),ie.m=Be.getUTCMonth(),ie.d=Be.getUTCDate()+(ie.w+6)%7):(Be=xg(eu(ie.y,0,1)),_e=Be.getDay(),Be=_e>4||_e===0?Ff.ceil(Be):Ff(Be),Be=rc.offset(Be,(ie.V-1)*7),ie.y=Be.getFullYear(),ie.m=Be.getMonth(),ie.d=Be.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),_e="Z"in ie?bg(eu(ie.y,0,1)).getUTCDay():xg(eu(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(_e+5)%7:ie.w+ie.U*7-(_e+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,bg(ie)):xg(ie)}}function U(F,se,Ne,ie){for(var at=0,Be=se.length,_e=Ne.length,At,kr;at=_e)return-1;if(At=se.charCodeAt(at++),At===37){if(At=se.charAt(at++),kr=_[At in Rk?se.charAt(at++):At],!kr||(ie=kr(F,Ne,ie))<0)return-1}else if(At!=Ne.charCodeAt(ie++))return-1}return ie}function W(F,se,Ne){var ie=h.exec(se.slice(Ne));return ie?(F.p=p.get(ie[0].toLowerCase()),Ne+ie[0].length):-1}function V(F,se,Ne){var ie=b.exec(se.slice(Ne));return ie?(F.w=j.get(ie[0].toLowerCase()),Ne+ie[0].length):-1}function Y(F,se,Ne){var ie=g.exec(se.slice(Ne));return ie?(F.w=v.get(ie[0].toLowerCase()),Ne+ie[0].length):-1}function R(F,se,Ne){var ie=N.exec(se.slice(Ne));return ie?(F.m=A.get(ie[0].toLowerCase()),Ne+ie[0].length):-1}function ce(F,se,Ne){var ie=k.exec(se.slice(Ne));return ie?(F.m=S.get(ie[0].toLowerCase()),Ne+ie[0].length):-1}function Z(F,se,Ne){return U(F,t,se,Ne)}function ve(F,se,Ne){return U(F,r,se,Ne)}function be(F,se,Ne){return U(F,n,se,Ne)}function pe(F){return u[F.getDay()]}function Q(F){return s[F.getDay()]}function ne(F){return f[F.getMonth()]}function X(F){return l[F.getMonth()]}function $(F){return a[+(F.getHours()>=12)]}function T(F){return 1+~~(F.getMonth()/3)}function J(F){return u[F.getUTCDay()]}function oe(F){return s[F.getUTCDay()]}function ee(F){return f[F.getUTCMonth()]}function ue(F){return l[F.getUTCMonth()]}function he(F){return a[+(F.getUTCHours()>=12)]}function Ce(F){return 1+~~(F.getUTCMonth()/3)}return{format:function(F){var se=E(F+="",O);return se.toString=function(){return F},se},parse:function(F){var se=M(F+="",!1);return se.toString=function(){return F},se},utcFormat:function(F){var se=E(F+="",C);return se.toString=function(){return F},se},utcParse:function(F){var se=M(F+="",!0);return se.toString=function(){return F},se}}}var Rk={"-":"",_:" ",0:"0"},$t=/^\s*\d+/,I8=/^%/,T8=/[\\^$*+?|[\]().{}]/g;function Ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",s=a.length;return n+(s[t.toLowerCase(),r]))}function R8(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function $8(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function L8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function z8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function F8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function $k(e,t,r){var n=$t.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Lk(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function B8(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 U8(e,t,r){var n=$t.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function W8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function zk(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function H8(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Fk(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function K8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function G8(e,t,r){var n=$t.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function V8(e,t,r){var n=$t.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function q8(e,t,r){var n=$t.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Q8(e,t,r){var n=I8.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Y8(e,t,r){var n=$t.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function X8(e,t,r){var n=$t.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Bk(e,t){return Ge(e.getDate(),t,2)}function Z8(e,t){return Ge(e.getHours(),t,2)}function J8(e,t){return Ge(e.getHours()%12||12,t,2)}function eB(e,t){return Ge(1+rc.count(hi(e),e),t,3)}function fA(e,t){return Ge(e.getMilliseconds(),t,3)}function tB(e,t){return fA(e,t)+"000"}function rB(e,t){return Ge(e.getMonth()+1,t,2)}function nB(e,t){return Ge(e.getMinutes(),t,2)}function iB(e,t){return Ge(e.getSeconds(),t,2)}function aB(e){var t=e.getDay();return t===0?7:t}function oB(e,t){return Ge(Bh.count(hi(e)-1,e),t,2)}function hA(e){var t=e.getDay();return t>=4||t===0?Rs(e):Rs.ceil(e)}function sB(e,t){return e=hA(e),Ge(Rs.count(hi(e),e)+(hi(e).getDay()===4),t,2)}function lB(e){return e.getDay()}function uB(e,t){return Ge(Ff.count(hi(e)-1,e),t,2)}function cB(e,t){return Ge(e.getFullYear()%100,t,2)}function dB(e,t){return e=hA(e),Ge(e.getFullYear()%100,t,2)}function fB(e,t){return Ge(e.getFullYear()%1e4,t,4)}function hB(e,t){var r=e.getDay();return e=r>=4||r===0?Rs(e):Rs.ceil(e),Ge(e.getFullYear()%1e4,t,4)}function pB(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ge(t/60|0,"0",2)+Ge(t%60,"0",2)}function Uk(e,t){return Ge(e.getUTCDate(),t,2)}function mB(e,t){return Ge(e.getUTCHours(),t,2)}function gB(e,t){return Ge(e.getUTCHours()%12||12,t,2)}function vB(e,t){return Ge(1+Fh.count(pi(e),e),t,3)}function pA(e,t){return Ge(e.getUTCMilliseconds(),t,3)}function yB(e,t){return pA(e,t)+"000"}function xB(e,t){return Ge(e.getUTCMonth()+1,t,2)}function bB(e,t){return Ge(e.getUTCMinutes(),t,2)}function wB(e,t){return Ge(e.getUTCSeconds(),t,2)}function jB(e){var t=e.getUTCDay();return t===0?7:t}function kB(e,t){return Ge(Uh.count(pi(e)-1,e),t,2)}function mA(e){var t=e.getUTCDay();return t>=4||t===0?$s(e):$s.ceil(e)}function SB(e,t){return e=mA(e),Ge($s.count(pi(e),e)+(pi(e).getUTCDay()===4),t,2)}function NB(e){return e.getUTCDay()}function EB(e,t){return Ge(Bf.count(pi(e)-1,e),t,2)}function PB(e,t){return Ge(e.getUTCFullYear()%100,t,2)}function AB(e,t){return e=mA(e),Ge(e.getUTCFullYear()%100,t,2)}function CB(e,t){return Ge(e.getUTCFullYear()%1e4,t,4)}function OB(e,t){var r=e.getUTCDay();return e=r>=4||r===0?$s(e):$s.ceil(e),Ge(e.getUTCFullYear()%1e4,t,4)}function _B(){return"+0000"}function Wk(){return"%"}function Hk(e){return+e}function Kk(e){return Math.floor(+e/1e3)}var es,gA,vA;MB({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 MB(e){return es=M8(e),gA=es.format,es.parse,vA=es.utcFormat,es.utcParse,es}function IB(e){return new Date(e)}function TB(e){return e instanceof Date?+e:+new Date(+e)}function u0(e,t,r,n,a,s,u,l,f,h){var p=Qy(),g=p.invert,v=p.domain,b=h(".%L"),j=h(":%S"),k=h("%I:%M"),S=h("%I %p"),N=h("%a %d"),A=h("%b %d"),O=h("%B"),C=h("%Y");function _(E){return(f(E)t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,s)=>jF(e,s/n))},r.copy=function(){return wA(t).domain(e)},vi.apply(r,arguments)}function Hh(){var e=0,t=.5,r=1,n=1,a,s,u,l,f,h=sr,p,g=!1,v;function b(k){return isNaN(k=+k)?v:(k=.5+((k=+p(k))-s)*(n*k{if(e!=null){var n=e.scale,a=e.type;if(n==="auto")return a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof n=="string")return BB(n)?n:"point"}};function UB(e,t){for(var r=0,n=e.length,a=e[0]t)?r=s+1:n=s}return r}function PA(e,t){if(e){var r=t??e.domain(),n=r.map(s=>{var u;return(u=e(s))!==null&&u!==void 0?u:0}),a=e.range();if(!(r.length===0||a.length<2))return s=>{var u,l,f=UB(n,s);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(u=n[f-1])!==null&&u!==void 0?u:0,p=(l=n[f])!==null&&l!==void 0?l:0;return Math.abs(s-h)<=Math.abs(s-p)?r[f-1]:r[f]}}}function WB(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):PA(e,void 0)}function Vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Uf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],yi=(e,t)=>{var r=CA(e,t);return r??St},Nt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Lv,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:qu},OA=(e,t)=>e.cartesianAxis.yAxis[t],xi=(e,t)=>{var r=OA(e,t);return r??Nt},XB={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},h0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??XB},ur=(e,t,r)=>{switch(t){case"xAxis":return yi(e,r);case"yAxis":return xi(e,r);case"zAxis":return h0(e,r);case"angleAxis":return $y(e,r);case"radiusAxis":return Ly(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},ZB=(e,t,r)=>{switch(t){case"xAxis":return yi(e,r);case"yAxis":return xi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},nc=(e,t,r)=>{switch(t){case"xAxis":return yi(e,r);case"yAxis":return xi(e,r);case"angleAxis":return $y(e,r);case"radiusAxis":return Ly(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},_A=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function MA(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 IA=e=>e.graphicalItems.cartesianItems,JB=G([Dt,Rh],MA),TA=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Qs=G([IA,ur,JB],TA,{memoizeOptions:{resultEqualityCheck:Lh}}),DA=G([Qs],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(By)),RA=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),e9=G([Qs],RA),$A=e=>e.map(t=>t.data).filter(Boolean).flat(1),t9=G([Qs],e=>e.some(t=>!t.data)),LA=G([Qs],$A,{memoizeOptions:{resultEqualityCheck:Lh}}),zA=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,a=t.dataStartIndex,s=t.dataEndIndex;return e.length>0?e:n.slice(a,s+1)},p0=G([LA,_h],zA),r9=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Tt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(a=>({value:Tt(a,n)}))):e.map(n=>({value:n})),FA=(e,t,r,n,a,s)=>{var u=n.chartData,l=u===void 0?[]:u,f=n.dataStartIndex,h=n.dataEndIndex,p=r9(e,t,r);if(a&&(t==null?void 0:t.dataKey)!=null&&s.length>0){var g=l.slice(f,h+1),v=g.map(b=>({value:Tt(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...p]}return p},ic=G([p0,ur,Qs,_h,t9,LA],FA);function ms(e){if(Rn(e)||e instanceof Date){var t=Number(e);if(Fe(t))return t}}function Qk(e){if(Array.isArray(e)){var t=[ms(e[0]),ms(e[1])];return In(t)?t:void 0}var r=ms(e);if(r!=null)return[r,r]}function zn(e){return e.map(ms).filter(xr)}function n9(e,t){var r=ms(e),n=ms(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var i9=G([ic],e=>e==null?void 0:e.map(t=>t.value).sort(n9));function BA(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function a9(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Dn(t))n=t;else if(Array.isArray(t)){var a=zn(t);a.length>0&&(n=Math.max(...a))}return n==null?[]:zn(r.flatMap(s=>{var u=Tt(e,s.dataKey),l,f;if(Array.isArray(u)){var h=AA(u,2);l=h[0],f=h[1]}else l=f=u;if(!(!Fe(l)||!Fe(f)))return[n-l,n+f]}))}var Pt=e=>{var t=Rt(e),r=Vs(e);return nc(e,t,r)},Ls=G([Pt],e=>e==null?void 0:e.dataKey),o9=G([DA,_h,Pt],KP),UA=(e,t,r,n)=>{var a={},s=t.reduce((u,l)=>{if(l.stackId==null)return u;var f=u[l.stackId];return f==null&&(f=[]),f.push(l),u[l.stackId]=f,u},a);return Object.fromEntries(Object.entries(s).map(u=>{var l=AA(u,2),f=l[0],h=l[1],p=n?[...h].reverse():h,g=p.map(Fy);return[f,{stackedData:S$(e,g,r),graphicalItems:p}]}))},WA=G([o9,DA,Mh,LP],UA),HA=(e,t,r,n)=>{var a=t.dataStartIndex,s=t.dataEndIndex;if(n==null&&r!=="zAxis")return A$(e,a,s)},s9=G([ur],e=>e.allowDataOverflow),m0=e=>{var t;if(e==null||!("domain"in e))return Lv;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=zn(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:Lv},KA=G([ur],m0),GA=G([KA,s9],PP),l9=G([WA,gn,Dt,GA],HA,{memoizeOptions:{resultEqualityCheck:$h}}),g0=e=>e.errorBars,u9=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>BA(r,n)),Wf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],l,f;if(n.length>0&&n.forEach(h=>{var p,g=h.data!=null?[...h.data]:u,v=(p=a[h.id])===null||p===void 0?void 0:p.filter(b=>BA(s,b));g.forEach(b=>{var j,k=Tt(b,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),S=a9(b,k,v);if(S.length>=2){var N=Math.min(...S),A=Math.max(...S);(l==null||Nf)&&(f=A)}var O=Qk(k);O!=null&&(l=l==null?O[0]:Math.min(l,O[0]),f=f==null?O[1]:Math.max(f,O[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=Qk(Tt(h,r.dataKey));p!=null&&(l=l==null?p[0]:Math.min(l,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Fe(l)&&Fe(f))return[l,f]},c9=G([p0,ur,e9,g0,Dt,F6],VA,{memoizeOptions:{resultEqualityCheck:$h}});function d9(e){var t=e.value;if(Rn(t)||t instanceof Date)return t}var f9=(e,t,r)=>{var n=e.map(d9).filter(a=>a!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&iE(n))?EP(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},qA=e=>e.referenceElements.dots,Ys=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),h9=G([qA,Dt,Rh],Ys),QA=e=>e.referenceElements.areas,p9=G([QA,Dt,Rh],Ys),YA=e=>e.referenceElements.lines,m9=G([YA,Dt,Rh],Ys),XA=(e,t)=>{if(e!=null){var r=zn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},g9=G(h9,Dt,XA),ZA=(e,t)=>{if(e!=null){var r=zn(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)]}},v9=G([p9,Dt],ZA);function y9(e){var t;if(e.x!=null)return zn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:zn(r)}function x9(e){var t;if(e.y!=null)return zn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:zn(r)}var JA=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?y9(n):x9(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},b9=G([m9,Dt],JA),w9=G(g9,b9,v9,(e,t,r)=>Wf(e,r,t)),eC=(e,t,r,n,a,s,u,l)=>{if(r!=null)return r;var f=u==="vertical"&&l==="xAxis"||u==="horizontal"&&l==="yAxis",h=f?Wf(n,s,a):Wf(s,a);return G6(t,h,e.allowDataOverflow)},j9=G([ur,KA,GA,l9,c9,w9,lt,Dt],eC,{memoizeOptions:{resultEqualityCheck:$h}}),k9=[0,1],tC=(e,t,r,n,a,s,u)=>{if(!((e==null||r==null||r.length===0)&&u===void 0)){var l=e.dataKey,f=e.type,h=Fn(t,s);if(h&&l==null){var p;return EP(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?f9(n,e,h):a==="expand"&&!h?k9:u}},v0=G([ur,lt,p0,ic,Mh,Dt,j9],tC),Xs=G([ur,_A,Ty],EA),rC=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var a=m0(t),s=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&In(e)){if(s)return ik(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return ak(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(s&&In(e))return ik(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&In(e))return ak(e,t.tickCount,t.allowDecimals,"adaptive")}}},y0=G([v0,nc,Xs],rC),nC=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&In(t)&&Array.isArray(r)&&r.length>0){var a,s,u=t[0],l=(a=r[0])!==null&&a!==void 0?a:0,f=t[1],h=(s=r[r.length-1])!==null&&s!==void 0?s:0;return[Math.min(u,l),Math.max(f,h)]}return t},S9=G([ur,v0,y0,Dt],nC),N9=G(ic,ur,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(zn(e.map(g=>g.value))).sort((g,v)=>g-v),a=n[0],s=n[n.length-1];if(a==null||s==null)return 1/0;var u=s-a;if(u===0)return 1/0;for(var l=0;la,(e,t,r,n,a)=>{if(!Fe(e))return 0;var s=t==="vertical"?n.height:n.width;if(a==="gap")return e*s/2;if(a==="no-gap"){var u=ha(r,e*s),l=e*s/2;return l-u-(l-u)/s*u}return 0}),E9=(e,t,r)=>{var n=yi(e,t);return n==null||typeof n.padding!="string"?0:iC(e,"xAxis",t,r,n.padding)},P9=(e,t,r)=>{var n=xi(e,t);return n==null||typeof n.padding!="string"?0:iC(e,"yAxis",t,r,n.padding)},A9=G(yi,E9,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var a=e.padding;return typeof a=="string"?{left:t,right:t}:{left:((r=a.left)!==null&&r!==void 0?r:0)+t,right:((n=a.right)!==null&&n!==void 0?n:0)+t}}),C9=G(xi,P9,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var a=e.padding;return typeof a=="string"?{top:t,bottom:t}:{top:((r=a.top)!==null&&r!==void 0?r:0)+t,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+t}}),aC=G([Vt,A9,Nh,Sh,(e,t,r)=>r],(e,t,r,n,a)=>{var s=n.padding;return a?[s.left,r.width-s.right]:[e.left+t.left,e.left+e.width-t.right]}),oC=G([Vt,lt,C9,Nh,Sh,(e,t,r)=>r],(e,t,r,n,a,s)=>{var u=a.padding;return s?[n.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),ac=(e,t,r,n)=>{var a;switch(t){case"xAxis":return aC(e,r,n);case"yAxis":return oC(e,r,n);case"zAxis":return(a=h0(e,r))===null||a===void 0?void 0:a.range;case"angleAxis":return UP(e);case"radiusAxis":return WP(e,r);default:return}},sC=G([ur,ac],Ih),O9=G([Xs,S9],cF),x0=G([ur,Xs,O9,sC],f0),lC=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var a=r.type,s=r.scale,u=Fn(e,n);if(u&&(a==="number"||s!=="auto"))return t.map(l=>l.value)}},b0=G([lt,ic,nc,Dt],lC),Kh=G([x0],Uy);G([x0],WB);G([x0,i9],PA);G([Qs,g0,Dt],u9);function uC(e,t){return e.idt.id?1:0}var Gh=(e,t)=>t,Vh=(e,t,r)=>r,_9=G(jh,Gh,Vh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(uC)),M9=G(kh,Gh,Vh,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(uC)),cC=(e,t)=>({width:e.width,height:t.height}),I9=(e,t)=>{var r=typeof t.width=="number"?t.width:qu;return{width:r,height:e.height}},T9=G(Vt,yi,cC),D9=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},R9=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},$9=G(gi,Vt,_9,Gh,Vh,(e,t,r,n,a)=>{var s={},u;return r.forEach(l=>{var f=cC(t,l);u==null&&(u=D9(t,n,e));var h=n==="top"&&!a||n==="bottom"&&a;s[l.id]=u-Number(h)*f.height,u+=(h?-1:1)*f.height}),s}),L9=G(mi,Vt,M9,Gh,Vh,(e,t,r,n,a)=>{var s={},u;return r.forEach(l=>{var f=I9(t,l);u==null&&(u=R9(t,n,e));var h=n==="left"&&!a||n==="right"&&a;s[l.id]=u-Number(h)*f.width,u+=(h?-1:1)*f.width}),s}),z9=(e,t)=>{var r=yi(e,t);if(r!=null)return $9(e,r.orientation,r.mirror)},F9=G([Vt,yi,z9,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),B9=(e,t)=>{var r=xi(e,t);if(r!=null)return L9(e,r.orientation,r.mirror)},U9=G([Vt,xi,B9,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var a=r==null?void 0:r[n];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),W9=G(Vt,xi,(e,t)=>{var r=typeof t.width=="number"?t.width:qu;return{width:r,height:e.height}}),dC=(e,t,r,n)=>{if(r!=null){var a=r.allowDuplicatedCategory,s=r.type,u=r.dataKey,l=Fn(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(u&&l&&s==="category"&&a&&iE(h))return f}},w0=G([lt,ic,ur,Dt],dC),Yk=G([lt,ZB,Xs,Kh,w0,b0,ac,y0,Dt],(e,t,r,n,a,s,u,l,f)=>{if(t!=null){var h=Fn(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:s,duplicateDomain:a,isCategorical:h,niceTicks:l,range:u,realScaleType:r,scale:n}}}),H9=(e,t,r,n,a,s,u,l,f)=>{if(!(t==null||n==null)){var h=Fn(e,f),p=t.type,g=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=p==="category"&&n.bandwidth?n.bandwidth()/b:0;j=f==="angleAxis"&&s!=null&&s.length>=2?Kr(s[0]-s[1])*2*j:j;var k=g||a;return k?k.map((S,N)=>{var A=u?u.indexOf(S):S,O=n.map(A);return Fe(O)?{index:N,coordinate:O+j,value:S,offset:j}:null}).filter(xr):h&&l?l.map((S,N)=>{var A=n.map(S);return Fe(A)?{coordinate:A+j,value:S,index:N,offset:j}:null}).filter(xr):n.ticks?n.ticks(v).map((S,N)=>{var A=n.map(S);return Fe(A)?{coordinate:A+j,value:S,index:N,offset:j}:null}).filter(xr):n.domain().map((S,N)=>{var A=n.map(S);return Fe(A)?{coordinate:A+j,value:u?u[S]:S,index:N,offset:j}:null}).filter(xr)}},fC=G([lt,nc,Xs,Kh,y0,ac,w0,b0,Dt],H9),K9=(e,t,r,n,a,s,u)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var l=Fn(e,u),f=t.tickCount,h=0;return h=u==="angleAxis"&&(n==null?void 0:n.length)>=2?Kr(n[0]-n[1])*2*h:h,l&&s?s.map((p,g)=>{var v=r.map(p);return Fe(v)?{coordinate:v+h,value:p,index:g,offset:h}:null}).filter(xr):r.ticks?r.ticks(f).map((p,g)=>{var v=r.map(p);return Fe(v)?{coordinate:v+h,value:p,index:g,offset:h}:null}).filter(xr):r.domain().map((p,g)=>{var v=r.map(p);return Fe(v)?{coordinate:v+h,value:a?a[p]:p,index:g,offset:h}:null}).filter(xr)}},hC=G([lt,nc,Kh,ac,w0,b0,Dt],K9),pC=G(ur,Kh,(e,t)=>{if(!(e==null||t==null))return Uf(Uf({},e),{},{scale:t})}),G9=G([ur,Xs,v0,sC],f0),V9=G([G9],Uy);G((e,t,r)=>h0(e,r),V9,(e,t)=>{if(!(e==null||t==null))return Uf(Uf({},e),{},{scale:t})});var q9=G([lt,jh,kh],(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}}),Q9=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};G([Q9],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,a=e[0];for(var s of e){var u=Math.abs(s.coordinate-t);ue.options.defaultTooltipEventType,gC=e=>e.options.validateTooltipEventTypes;function vC(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function oc(e,t){var r=mC(e),n=gC(e);return vC(t,r,n)}function Y9(e){return Ae(t=>oc(t,e))}var yC=(e,t)=>{var r,n=Number(t);if(!(Dn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},X9=e=>e.tooltip.settings,Xi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Z9={itemInteraction:{click:Xi,hover:Xi},axisInteraction:{click:Xi,hover:Xi},keyboardInteraction:Xi,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}},xC=rr({name:"tooltip",initialState:Z9,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:nt()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,s=Gr(e).tooltipItemPayloads.indexOf(n);s>-1&&(e.tooltipItemPayloads[s]=a)},prepare:nt()},removeTooltipEntrySettings:{reducer(e,t){var r=Gr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:nt()},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}}}),Jr=xC.actions,J9=Jr.addTooltipEntrySettings,eU=Jr.replaceTooltipEntrySettings,tU=Jr.removeTooltipEntrySettings,rU=Jr.setTooltipSettingsState,nU=Jr.setActiveMouseOverItemIndex;Jr.mouseLeaveItem;var bC=Jr.mouseLeaveChart;Jr.setActiveClickItemIndex;var wC=Jr.setMouseOverAxisIndex,iU=Jr.setMouseClickAxisIndex,su=Jr.setSyncInteraction,Hf=Jr.setKeyboardInteraction,aU=xC.reducer;function Xk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fd(e){for(var t=1;t{if(t==null)return Xi;var a=uU(e,t,r);if(a==null)return Xi;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var s=e.settings.active===!0;if(cU(a)){if(s)return Fd(Fd({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Fd(Fd({},Xi),{},{coordinate:a.coordinate})};function dU(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 fU(e,t){var r=dU(e),n=t[0],a=t[1];if(r===void 0)return!1;var s=Math.min(n,a),u=Math.max(n,a);return r>=s&&r<=u}function hU(e,t,r){if(r==null||t==null)return!0;var n=Tt(e,t);return n==null||!In(r)?!0:fU(n,r)}var uu=(e,t,r,n)=>{var a=e==null?void 0:e.index;if(a==null)return null;var s=Number(a);if(!Fe(s))return a;var u=0,l=1/0;t.length>0&&(l=t.length-1);var f=Math.max(u,Math.min(s,l)),h=t[f];return h==null||hU(h,r,n)?String(f):null},kC=(e,t,r,n,a,s,u)=>{if(s!=null){var l=u[0],f=l==null?void 0:l.getPosition(s);if(f!=null)return f;var h=a==null?void 0:a[Number(s)];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}}}},SC=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(r==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(n!=null||e.keyboardInteraction.active)){var s=e.tooltipItemPayloads[0];return s!=null?[s]:[]}return e.tooltipItemPayloads.filter(u=>{var l;return((l=u.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},NC=e=>e.options.tooltipPayloadSearcher,Zs=e=>e.tooltip;function Zk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jk(e){for(var t=1;te(t)}function eS(e){if(typeof e=="string")return e}function bU(e){if(!(e==null||typeof e!="object")){var t="name"in e?vU(e.name):void 0,r="unit"in e?yU(e.unit):void 0,n="dataKey"in e?xU(e.dataKey):void 0,a="payload"in e?e.payload:void 0,s="color"in e?eS(e.color):void 0,u="fill"in e?eS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:a,color:s,fill:u}}}function wU(e,t){return e??t}var EC=(e,t,r,n,a,s,u)=>{if(!(t==null||s==null)){var l=r.chartData,f=r.computedData,h=r.dataStartIndex,p=r.dataEndIndex,g=[];return e.reduce((v,b)=>{var j,k=b.dataDefinedOnItem,S=b.settings,N=wU(k,l),A=Array.isArray(N)?XE(N,h,p):N,O=(j=S==null?void 0:S.dataKey)!==null&&j!==void 0?j:n,C=S==null?void 0:S.nameKey,_;if(n&&Array.isArray(A)&&!Array.isArray(A[0])&&u==="axis"?_=aE(A,n,a):_=s(A,t,f,C),Array.isArray(_))_.forEach(M=>{var U,W,V=bU(M),Y=V==null?void 0:V.name,R=V==null?void 0:V.dataKey,ce=V==null?void 0:V.payload,Z=Jk(Jk({},S),{},{name:Y,unit:V==null?void 0:V.unit,color:(U=V==null?void 0:V.color)!==null&&U!==void 0?U:S==null?void 0:S.color,fill:(W=V==null?void 0:V.fill)!==null&&W!==void 0?W:S==null?void 0:S.fill});v.push(qw({tooltipEntrySettings:Z,dataKey:R,payload:ce,value:Tt(ce,R),name:Y==null?void 0:String(Y)}))});else{var E;v.push(qw({tooltipEntrySettings:S,dataKey:O,payload:_,value:Tt(_,O),name:(E=Tt(_,C))!==null&&E!==void 0?E:S==null?void 0:S.name}))}return v},g)}},j0=G([Pt,_A,Ty],EA),jU=G([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),kU=G([Rt,Vs],MA),jo=G([jU,Pt,kU],TA,{memoizeOptions:{resultEqualityCheck:Lh}}),SU=G([jo],e=>e.filter(By)),PC=G([jo],$A,{memoizeOptions:{resultEqualityCheck:Lh}}),NU=G([jo],e=>e.some(t=>!t.data)),mo=G([PC,gn],zA),EU=G([SU,gn,Pt],KP),k0=G([mo,Pt,jo,gn,NU,PC],FA),AC=G([Pt],m0),PU=G([Pt],e=>e.allowDataOverflow),CC=G([AC,PU],PP),AU=G([jo],e=>e.filter(By)),CU=G([EU,AU,Mh,LP],UA),OU=G([CU,gn,Rt,CC],HA),_U=G([jo],RA),MU=G([mo,Pt,_U,g0,Rt,B6],VA,{memoizeOptions:{resultEqualityCheck:$h}}),IU=G([qA,Rt,Vs],Ys),TU=G([IU,Rt],XA),DU=G([QA,Rt,Vs],Ys),RU=G([DU,Rt],ZA),$U=G([YA,Rt,Vs],Ys),LU=G([$U,Rt],JA),zU=G([TU,LU,RU],Wf),FU=G([Pt,AC,CC,OU,MU,zU,lt,Rt],eC),zs=G([Pt,lt,mo,k0,Mh,Rt,FU],tC),BU=G([zs,Pt,j0],rC),UU=G([Pt,zs,BU,Rt],nC),OC=e=>{var t=Rt(e),r=Vs(e),n=!1;return ac(e,t,r,n)},_C=G([Pt,OC],Ih),WU=G([Pt,j0,UU,_C],f0),MC=G([WU],Uy),HU=G([lt,k0,Pt,Rt],dC),KU=G([lt,k0,Pt,Rt],lC),GU=(e,t,r,n,a,s,u,l)=>{if(t){var f=t.type,h=Fn(e,l);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return g=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Kr(a[0]-a[1])*2*g:g,h&&u?u.map((v,b)=>{var j=n.map(v);return Fe(j)?{coordinate:j+g,value:v,index:b,offset:g}:null}).filter(xr):n.domain().map((v,b)=>{var j=n.map(v);return Fe(j)?{coordinate:j+g,value:s?s[v]:v,index:b,offset:g}:null}).filter(xr)}}},bi=G([lt,Pt,j0,MC,OC,HU,KU,Rt],GU),S0=G([mC,gC,X9],(e,t,r)=>vC(r.shared,e,t)),IC=e=>e.tooltip.settings.trigger,N0=e=>e.tooltip.settings.defaultIndex,sc=G([Zs,S0,IC,N0],jC),Ru=G([sc,mo,Ls,zs],uu),TC=G([bi,Ru],yC),VU=G([sc],e=>{if(e)return e.dataKey}),qU=G([sc],e=>{if(e)return e.graphicalItemId}),DC=G([Zs,S0,IC,N0],SC),QU=G([mi,gi,lt,Vt,bi,N0,DC],kC),YU=G([sc,QU],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),XU=G([sc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),ZU=G([DC,Ru,gn,Ls,TC,NC,S0],EC),JU=G([ZU],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function tS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rS(e){for(var t=1;tAe(Pt),i7=()=>{var e=n7(),t=Ae(bi),r=Ae(MC);return bf(!e||!r?void 0:rS(rS({},e),{},{scale:r}),t)};function nS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ts(e){for(var t=1;t{var a=t.find(s=>s&&s.index===r);if(a){if(e==="horizontal")return{x:a.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:a.coordinate}}return{x:0,y:0}},u7=(e,t,r,n)=>{var a=t.find(h=>h&&h.index===r);if(a){if(e==="centric"){var s=a.coordinate,u=n.radius;return ts(ts(ts({},n),Ht(n.cx,n.cy,u,s)),{},{angle:s,radius:u})}var l=a.coordinate,f=n.angle;return ts(ts(ts({},n),Ht(n.cx,n.cy,l,f)),{},{angle:f,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function c7(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 RC=(e,t,r,n,a)=>{var s,u=(s=t==null?void 0:t.length)!==null&&s!==void 0?s:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l0?(f=r[l-1])===null||f===void 0?void 0:f.coordinate:(h=r[u-1])===null||h===void 0?void 0:h.coordinate,j=(p=r[l])===null||p===void 0?void 0:p.coordinate,k=l>=u-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(v=r[l+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(b==null||j==null||k==null))if(Kr(j-b)!==Kr(k-j)){var N=[];if(Kr(k-j)===Kr(a[1]-a[0])){S=k;var A=j+a[1]-a[0];N[0]=Math.min(A,(A+b)/2),N[1]=Math.max(A,(A+b)/2)}else{S=b;var O=k+a[1]-a[0];N[0]=Math.min(j,(O+j)/2),N[1]=Math.max(j,(O+j)/2)}var C=[Math.min(j,(S+j)/2),Math.max(j,(S+j)/2)];if(e>C[0]&&e<=C[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[l])===null||_===void 0?void 0:_.index}}else{var E=Math.min(b,k),M=Math.max(b,k);if(e>(E+j)/2&&e<=(M+j)/2){var U;return(U=r[l])===null||U===void 0?void 0:U.index}}}else if(t)for(var W=0;W(V.coordinate+R.coordinate)/2||W>0&&W(V.coordinate+R.coordinate)/2&&e<=(V.coordinate+Y.coordinate)/2)return V.index}}return-1},$C=()=>Ae(Ty),E0=(e,t)=>t,LC=(e,t,r)=>r,P0=(e,t,r,n)=>n,d7=G(bi,e=>dh(e,t=>t.coordinate)),A0=G([Zs,E0,LC,P0],jC),C0=G([A0,mo,Ls,zs],uu),f7=(e,t,r)=>{if(t!=null){var n=Zs(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},zC=G([Zs,E0,LC,P0],SC),Kf=G([mi,gi,lt,Vt,bi,P0,zC],kC),h7=G([A0,Kf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),FC=G([bi,C0],yC),p7=G([zC,C0,gn,Ls,FC,NC,E0],EC),m7=G([A0,C0],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),g7=(e,t,r,n,a,s,u)=>{if(!(!e||!r||!n||!a)&&c7(e,u)){var l=C$(e,t),f=RC(l,s,a,r,n),h=l7(t,a,f,e);return{activeIndex:String(f),activeCoordinate:h}}},v7=(e,t,r,n,a,s,u)=>{if(!(!e||!n||!a||!s||!r)){var l=M6(e,r);if(l){var f=O$(l,t),h=RC(f,u,s,n,a),p=u7(t,s,h,l);return{activeIndex:String(h),activeCoordinate:p}}}},y7=(e,t,r,n,a,s,u,l)=>{if(!(!e||!t||!n||!a||!s))return t==="horizontal"||t==="vertical"?g7(e,t,n,a,s,u,l):v7(e,t,r,n,a,s,u)},x7=G(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}}),b7=G(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(or)),r=Array.from(new Set(t));return r.sort((n,a)=>n-a)},{memoizeOptions:{resultEqualityCheck:uF}});function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function aS(e){for(var t=1;taS(aS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),S7)},E7=new Set(Object.values(or));function P7(e){return E7.has(e)}var BC=rr({name:"zIndex",initialState:N7,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:nt()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!P7(r)&&delete e.zIndexMap[r])},prepare:nt()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,a=r.element,s=r.isPanorama;e.zIndexMap[n]?s?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:s?void 0:a,panoramaElement:s?a:void 0}},prepare:nt()},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:nt()}}}),qh=BC.actions,A7=qh.registerZIndexPortal,wg=qh.unregisterZIndexPortal,C7=qh.registerZIndexPortalElement,O7=qh.unregisterZIndexPortalElement,_7=BC.reducer;function wi(e){var t=e.zIndex,r=e.children,n=pL(),a=n&&t!==void 0&&t!==0,s=jr(),u=x.useRef(void 0),l=x.useRef(new Set),f=wt(),h=Ae(g=>x7(g,t,s));if(x.useLayoutEffect(()=>{if(!a){var g=l.current;g.forEach(b=>{f(wg({zIndex:b}))}),g.clear(),u.current=void 0;return}if(l.current.has(t)||(f(A7({zIndex:t})),l.current.add(t)),h){u.current=h;var v=l.current;v.forEach(b=>{b!==t&&(f(wg({zIndex:b})),v.delete(b))})}},[f,t,a,h]),x.useLayoutEffect(()=>{var g=l.current;return()=>{g.forEach(v=>{f(wg({zIndex:v}))}),g.clear()}},[f]),!a)return r;var p=h??u.current;return p?rh.createPortal(r,p):null}function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;tx.useContext(UC),jg={exports:{}},sS;function z7(){return sS||(sS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function s(f,h,p,g,v){if(typeof p!="function")throw new TypeError("The listener must be a function");var b=new a(p,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 l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],p,g;if(this._eventsCount===0)return h;for(g in p=this._events)t.call(p,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},l.prototype.listeners=function(h){var p=r?r+h:h,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var v=0,b=g.length,j=new Array(b);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Dn(r))return e[r]}},W7={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},WC=rr({name:"options",initialState:W7,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),H7=WC.reducer,K7=WC.actions.createEventEmitter;function G7(e){return e.tooltip.syncInteraction}var V7={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},HC=rr({name:"chartData",initialState:V7,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var r=t.payload,n=r.startIndex,a=r.endIndex;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),O0=HC.actions,uS=O0.setChartData,q7=O0.setDataStartEndIndexes;O0.setComputedData;var Q7=HC.reducer,Y7=["x","y"];function cS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;tf.rootProps.className);x.useEffect(()=>{if(e==null)return Ws;var f=(h,p,g)=>{if(t!==g&&e===h){if(p.payload.active===!1){r(su({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&&p!==null&&p!==void 0&&(v=p.payload)!==null&&v!==void 0&&v.coordinate&&p.payload.sourceViewBox){var b=p.payload.coordinate,j=b.x,k=b.y,S=eW(b,Y7),N=p.payload.sourceViewBox,A=N.x,O=N.y,C=N.width,_=N.height,E=rs(rs({},S),{},{x:u.x+(C?(j-A)/C:0)*u.width,y:u.y+(_?(k-O)/_:0)*u.height});r(rs(rs({},p),{},{payload:rs(rs({},p.payload),{},{coordinate:E})}))}else r(p);return}if(a!=null){var M;if(typeof n=="function"){var U={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},W=n(a,U);M=a[W]}else n==="value"&&(M=a.find(pe=>String(pe.value)===p.payload.label));var V=p.payload.coordinate;if(V==null||u==null){r(su({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(M==null){r(su({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var Y=V.x,R=V.y,ce=Math.min(Y,u.x+u.width),Z=Math.min(R,u.y+u.height),ve={x:s==="horizontal"?M.coordinate:ce,y:s==="horizontal"?Z:M.coordinate},be=su({active:p.payload.active,coordinate:ve,dataKey:p.payload.dataKey,index:String(M.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(be)}}};return $u.on(Fv,f),()=>{$u.off(Fv,f)}},[l,r,t,e,n,a,s,u])}function nW(){var e=Ae(Dy),t=Ae(Ry),r=wt();x.useEffect(()=>{if(e==null)return Ws;var n=(a,s,u)=>{t!==u&&e===a&&r(q7(s))};return $u.on(lS,n),()=>{$u.off(lS,n)}},[r,t,e])}function iW(){var e=wt();x.useEffect(()=>{e(K7())},[e]),rW(),nW()}function aW(e,t,r,n,a,s){var u=Ae(j=>f7(j,e,t)),l=Ae(qU),f=Ae(Ry),h=Ae(Dy),p=Ae(zP),g=Ae(G7),v=(g==null?void 0:g.sourceViewBox)!=null,b=Eh();x.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=su({active:s,coordinate:r,dataKey:u,index:a,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:l});$u.emit(Fv,h,j,f)}},[v,r,u,l,a,n,f,h,p,s,b])}function dS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{M(rU({shared:A,trigger:O,axisId:E,active:a,defaultIndex:U}))},[M,A,O,E,a,U]);var W=Eh(),V=yP(),Y=Y9(A),R=(t=Ae(Ne=>m7(Ne,Y,O,U)))!==null&&t!==void 0?t:{},ce=R.activeIndex,Z=R.isActive,ve=Ae(Ne=>p7(Ne,Y,O,U)),be=Ae(Ne=>FC(Ne,Y,O,U)),pe=Ae(Ne=>h7(Ne,Y,O,U)),Q=ve,ne=L7(),X=(r=a??Z)!==null&&r!==void 0?r:!1,$=mR([Q,X]),T=uW($,2),J=T[0],oe=T[1],ee=Y==="axis"?be:void 0;aW(Y,O,pe,ee,ce,X);var ue=_??ne;if(ue==null||W==null||Y==null)return null;var he=Q??pS;X||(he=pS),h&&he.length&&(he=LD(he.filter(Ne=>Ne.value!=null&&(Ne.hide!==!0||n.includeHidden)),v,pW));var Ce=he.length>0,F=fS(fS({},n),{},{payload:he,label:ee,active:X,activeIndex:ce,coordinate:pe,accessibilityLayer:V}),se=x.createElement(Ez,{allowEscapeViewBox:s,animationDuration:u,animationEasing:l,isAnimationActive:p,active:X,coordinate:pe,hasPayload:Ce,offset:g,position:b,reverseDirection:j,useTranslate3d:k,viewBox:W,wrapperStyle:S,lastBoundingBox:J,innerRef:oe,hasPortalFromProps:!!_},mW(f,F));return x.createElement(x.Fragment,null,rh.createPortal(se,ue),X&&x.createElement($7,{cursor:N,tooltipEventType:Y,coordinate:pe,payload:he,index:ce}))}function yW(e,t,r){return(t=xW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xW(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)}class wW{constructor(t){yW(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function mS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jW(e){for(var t=1;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,PW,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},cu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Zu.isSsr)return{width:0,height:0};if(!KC.enableCache)return yS(t,r);var n=AW(t,r),a=gS.get(n);if(a)return a;var s=yS(t,r);return gS.set(n,s),s},GC;function Gf(e,t){return MW(e)||_W(e,t)||OW(e,t)||CW()}function CW(){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 OW(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);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var a=[];Kt(t)||(r?a=t.toString().split(""):a=t.toString().split(qC));var s=a.map(l=>({word:l,width:cu(l,n).width})),u=r?0:cu(" ",n).width;return{wordsWithComputedWidth:s,spaceWidth:u}}catch{return null}};function YC(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function ZW(e){return Kt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var XC=(e,t,r,n)=>e.reduce((a,s)=>{var u=s.word,l=s.width,f=a[a.length-1];if(f&&l!=null&&(t==null||n||f.width+l+re.reduce((t,r)=>t.width>r.width?t:r),JW="…",ES=(e,t,r,n,a,s,u,l)=>{var f=e.slice(0,t),h=QC({breakAll:r,style:n,children:f+JW});if(!h)return[!1,[]];var p=XC(h.wordsWithComputedWidth,s,u,l),g=p.length>a||ZC(p).width>Number(s);return[g,p]},eH=(e,t,r,n,a)=>{var s=e.maxLines,u=e.children,l=e.style,f=e.breakAll,h=ke(s),p=String(u),g=XC(t,n,r,a);if(!h||a)return g;var v=g.length>s||ZC(g).width>Number(n);if(!v)return g;for(var b=0,j=p.length-1,k=0,S;b<=j&&k<=p.length-1;){var N=Math.floor((b+j)/2),A=N-1,O=ES(p,A,f,l,s,n,r,a),C=SS(O,2),_=C[0],E=C[1],M=ES(p,N,f,l,s,n,r,a),U=SS(M,1),W=U[0];if(!_&&!W&&(b=N+1),_&&W&&(j=N-1),!_&&W){S=E;break}k++}return S||g},PS=e=>{var t=Kt(e)?[]:e.toString().split(qC);return[{words:t,width:void 0}]},tH=e=>{var t=e.width,r=e.scaleToFit,n=e.children,a=e.style,s=e.breakAll,u=e.maxLines;if((t||r)&&!Zu.isSsr){var l,f,h=QC({breakAll:s,children:n,style:a});if(h){var p=h.wordsWithComputedWidth,g=h.spaceWidth;l=p,f=g}else return PS(n);return eH({breakAll:s,children:n,maxLines:u,style:a},l,f,t,!!r)}return PS(n)},JC="#808080",rH={angle:0,breakAll:!1,capHeight:"0.71em",fill:JC,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},_0=x.forwardRef((e,t)=>{var r=Xr(e,rH),n=r.x,a=r.y,s=r.lineHeight,u=r.capHeight,l=r.fill,f=r.scaleToFit,h=r.textAnchor,p=r.verticalAnchor,g=kS(r,KW),v=x.useMemo(()=>tH({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,A=kS(g,GW);if(!Rn(n)||!Rn(a)||v.length===0)return null;var O=Number(n)+(ke(b)?b:0),C=Number(a)+(ke(j)?j:0);if(!Fe(O)||!Fe(C))return null;var _;switch(p){case"start":_=kg("calc(".concat(u,")"));break;case"middle":_=kg("calc(".concat((v.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:_=kg("calc(".concat(v.length-1," * -").concat(s,")"));break}var E=[],M=v[0];if(f&&M!=null){var U=M.width,W=g.width;E.push("scale(".concat(ke(W)&&ke(U)?W/U:1,")"))}return k&&E.push("rotate(".concat(k,", ").concat(O,", ").concat(C,")")),E.length&&(A.transform=E.join(" ")),x.createElement("text",Bv({},qr(A),{ref:t,x:O,y:C,className:Je("recharts-text",S),textAnchor:h,fill:l.includes("url")?JC:l}),v.map((V,Y)=>{var R=V.words.join(N?"":" ");return x.createElement("tspan",{x:O,dy:Y===0?_:s,key:"".concat(R,"-").concat(Y)},R)}))});_0.displayName="Text";function AS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,a=n===void 0?0:n,s=e.parentViewBox,u=Ny(t),l=u.x,f=u.y,h=u.height,p=u.upperWidth,g=u.lowerWidth,v=l,b=l+(p-g)/2,j=(v+b)/2,k=(p+g)/2,S=v+p/2,N=h>=0?1:-1,A=N*a,O=N>0?"end":"start",C=N>0?"start":"end",_=p>=0?1:-1,E=_*a,M=_>0?"end":"start",U=_>0?"start":"end",W=s;if(r==="top"){var V={x:v+p/2,y:f-A,horizontalAnchor:"middle",verticalAnchor:O};return W&&(V.height=Math.max(f-W.y,0),V.width=p),V}if(r==="bottom"){var Y={x:b+g/2,y:f+h+A,horizontalAnchor:"middle",verticalAnchor:C};return W&&(Y.height=Math.max(W.y+W.height-(f+h),0),Y.width=g),Y}if(r==="left"){var R={x:j-E,y:f+h/2,horizontalAnchor:M,verticalAnchor:"middle"};return W&&(R.width=Math.max(R.x-W.x,0),R.height=h),R}if(r==="right"){var ce={x:j+k+E,y:f+h/2,horizontalAnchor:U,verticalAnchor:"middle"};return W&&(ce.width=Math.max(W.x+W.width-ce.x,0),ce.height=h),ce}var Z=W?{width:k,height:h}:{};return r==="insideLeft"?Nn({x:j+E,y:f+h/2,horizontalAnchor:U,verticalAnchor:"middle"},Z):r==="insideRight"?Nn({x:j+k-E,y:f+h/2,horizontalAnchor:M,verticalAnchor:"middle"},Z):r==="insideTop"?Nn({x:v+p/2,y:f+A,horizontalAnchor:"middle",verticalAnchor:C},Z):r==="insideBottom"?Nn({x:b+g/2,y:f+h-A,horizontalAnchor:"middle",verticalAnchor:O},Z):r==="insideTopLeft"?Nn({x:v+E,y:f+A,horizontalAnchor:U,verticalAnchor:C},Z):r==="insideTopRight"?Nn({x:v+p-E,y:f+A,horizontalAnchor:M,verticalAnchor:C},Z):r==="insideBottomLeft"?Nn({x:b+E,y:f+h-A,horizontalAnchor:U,verticalAnchor:O},Z):r==="insideBottomRight"?Nn({x:b+g-E,y:f+h-A,horizontalAnchor:M,verticalAnchor:O},Z):r&&typeof r=="object"&&(ke(r.x)||uo(r.x))&&(ke(r.y)||uo(r.y))?Nn({x:l+ha(r.x,k),y:f+ha(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},Z):Nn({x:S,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},Z)},sH=["labelRef"],lH=["content"];function CS(e,t){if(e==null)return{};var r,n,a=uH(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,a=e.lowerWidth,s=e.width,u=e.height,l=e.children,f=x.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:a,width:s,height:u}),[t,r,n,a,s,u]);return x.createElement(eO.Provider,{value:f},l)},tO=()=>{var e=x.useContext(eO),t=Eh();return e||(t?Ny(t):void 0)},pH=x.createContext(null),mH=()=>{var e=x.useContext(pH),t=Ae(HP);return e||t},gH=e=>{var t=e.value,r=e.formatter,n=Kt(e.children)?t:e.children;return typeof r=="function"?r(n):n},M0=e=>e!=null&&typeof e=="function",vH=(e,t)=>{var r=Kr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},yH=(e,t,r,n,a)=>{var s=e.offset,u=e.className,l=a.cx,f=a.cy,h=a.innerRadius,p=a.outerRadius,g=a.startAngle,v=a.endAngle,b=a.clockWise,j=(h+p)/2,k=vH(g,v),S=k>=0?1:-1,N,A;switch(t){case"insideStart":N=g+S*s,A=b;break;case"insideEnd":N=v-S*s,A=!b;break;case"end":N=v+S*s,A=b;break;default:throw new Error("Unsupported position ".concat(t))}A=k<=0?A:!A;var O=Ht(l,f,j,N),C=Ht(l,f,j,N+(A?1:-1)*359),_="M".concat(O.x,",").concat(O.y,` + A`).concat(j,",").concat(j,",0,1,").concat(A?0:1,`, + `).concat(C.x,",").concat(C.y),E=Kt(e.id)?ku("recharts-radial-line-"):e.id;return x.createElement("text",ni({},n,{dominantBaseline:"central",className:Je("recharts-radial-bar-label",u)}),x.createElement("defs",null,x.createElement("path",{id:E,d:_})),x.createElement("textPath",{xlinkHref:"#".concat(E)},r))},xH=(e,t,r)=>{var n=e.cx,a=e.cy,s=e.innerRadius,u=e.outerRadius,l=e.startAngle,f=e.endAngle,h=(l+f)/2;if(r==="outside"){var p=Ht(n,a,u+t,h),g=p.x,v=p.y;return{x:g,y:v,textAnchor:g>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(s+u)/2,j=Ht(n,a,b,h),k=j.x,S=j.y;return{x:k,y:S,textAnchor:"middle",verticalAnchor:"middle"}},ef=e=>e!=null&&"cx"in e&&ke(e.cx),bH={angle:0,offset:5,zIndex:or.label,position:"middle",textBreakAll:!1};function wH(e){if(!ef(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,a=n*2;return{x:t-n,y:r-n,width:a,upperWidth:a,lowerWidth:a,height:a}}function Yi(e){var t=Xr(e,bH),r=t.viewBox,n=t.parentViewBox,a=t.position,s=t.value,u=t.children,l=t.content,f=t.className,h=f===void 0?"":f,p=t.textBreakAll,g=t.labelRef,v=mH(),b=tO(),j=a==="center"?b:v??b,k,S,N;r==null?k=j:ef(r)?k=r:k=Ny(r);var A=wH(k);if(!k||Kt(s)&&Kt(u)&&!x.isValidElement(l)&&typeof l!="function")return null;var O=lu(lu({},t),{},{viewBox:k});if(x.isValidElement(l)){O.labelRef;var C=CS(O,sH);return x.cloneElement(l,C)}if(typeof l=="function"){O.content;var _=CS(O,lH);if(S=x.createElement(l,_),x.isValidElement(S))return S}else S=gH(t);var E=qr(t);if(ef(k)){if(a==="insideStart"||a==="insideEnd"||a==="end")return yH(t,a,S,E,k);N=xH(k,t.offset,t.position)}else{if(!A)return null;var M=oH({viewBox:A,position:a,offset:t.offset,parentViewBox:ef(n)?void 0:n});N=lu(lu({x:M.x,y:M.y,textAnchor:M.horizontalAnchor,verticalAnchor:M.verticalAnchor},M.width!==void 0?{width:M.width}:{}),M.height!==void 0?{height:M.height}:{})}return x.createElement(wi,{zIndex:t.zIndex},x.createElement(_0,ni({ref:g,className:Je("recharts-label",h)},E,N,{textAnchor:YC(E.textAnchor)?E.textAnchor:N.textAnchor,breakAll:p}),S))}Yi.displayName="Label";var jH=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?x.createElement(Yi,ni({key:"label-implicit"},n)):Rn(e)?x.createElement(Yi,ni({key:"label-implicit",value:e},n)):x.isValidElement(e)?e.type===Yi?x.cloneElement(e,lu({key:"label-implicit"},n)):x.createElement(Yi,ni({key:"label-implicit",content:e},n)):M0(e)?x.createElement(Yi,ni({key:"label-implicit",content:e},n)):e&&typeof e=="object"?x.createElement(Yi,ni({},e,{key:"label-implicit"},n)):null};function kH(e){var t=e.label,r=e.labelRef,n=tO();return jH(t,n,r)||null}var SH=["valueAccessor"],NH=["dataKey","clockWise","id","textBreakAll","zIndex"];function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(ZW(t))return t},rO=x.createContext(void 0),AH=rO.Provider,nO=x.createContext(void 0);nO.Provider;function CH(){return x.useContext(rO)}function OH(){return x.useContext(nO)}function tf(e){var t=e.valueAccessor,r=t===void 0?PH:t,n=_S(e,SH),a=n.dataKey;n.clockWise;var s=n.id,u=n.textBreakAll,l=n.zIndex,f=_S(n,NH),h=CH(),p=OH(),g=h||p;return!g||!g.length?null:x.createElement(wi,{zIndex:l??or.label},x.createElement(Qr,{className:"recharts-label-list"},g.map((v,b)=>{var j,k=Kt(a)?r(v,b):Tt(v.payload,a),S=Kt(s)?{}:{id:"".concat(s,"-").concat(b)};return x.createElement(Yi,Vf({key:"label-".concat(b)},qr(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 _H(e){var t=e.label;return t?t===!0?x.createElement(tf,{key:"labelList-implicit"}):x.isValidElement(t)||M0(t)?x.createElement(tf,{key:"labelList-implicit",content:t}):typeof t=="object"?x.createElement(tf,Vf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Uv(){return Uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,a=e.className,s=Je("recharts-dot",a);return ke(t)&&ke(r)&&ke(n)?x.createElement("circle",Uv({},hn(e),my(e),{className:s,cx:t,cy:r,r:n})):null},MH={radiusAxis:{},angleAxis:{}},aO=rr({name:"polarAxis",initialState:MH,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]}}}),Qh=aO.actions;Qh.addRadiusAxis;Qh.removeRadiusAxis;Qh.addAngleAxis;Qh.removeAngleAxis;var IH=aO.reducer;function TH(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var oO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function MS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function IS(e){for(var t=1;t{n||(a.current===null?r(J9(t)):a.current!==t&&r(eU({prev:a.current,next:t})),a.current=t)},[t,r,n]),x.useLayoutEffect(()=>()=>{a.current&&(r(tU(a.current)),a.current=null)},[r]),null}function HH(e){var t=e.legendPayload,r=wt(),n=jr(),a=x.useRef(null);return x.useLayoutEffect(()=>{n||(a.current===null?r(PL(t)):a.current!==t&&r(AL({prev:a.current,next:t})),a.current=t)},[r,n,t]),x.useLayoutEffect(()=>()=>{a.current&&(r(CL(a.current)),a.current=null)},[r]),null}function KH(e,t){return QH(e)||qH(e,t)||VH(e,t)||GH()}function GH(){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 VH(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);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var a of r)n.push({status:"removed",prev:a});for(var s=0;se[Math.floor(s*r)]);return T0(n,t)}function ZH(e,t){var r=t.map((n,a)=>e[a]);return T0(r,t)}function JH(e,t){for(var r=new Map,n=0;n{var b=r(g,v);if(b!=null){var j=n.get(b);if(j!==void 0)return a.add(b),j}}),u=[];for(var l of n){var f=KH(l,2),h=f[0],p=f[1];a.has(h)||u.push(p)}return T0(s,t,u)}function Wv(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===I0?XH(e,t):r===YH?ZH(e,t):eK(e,t,r)}function lO(e,t){var r=x.useRef(e),n=x.useRef(t.current),a=x.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,a.current=!1);var s=x.useCallback(function(u,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(l===0){a.current=!0;return}l===1&&(n.current=u),l>0&&a.current&&f&&(t.current=u)},[t]);return{startValue:n.current,syncStepValue:s}}function tK(e,t){return aK(e)||iK(e,t)||nK(e,t)||rK()}function rK(){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 nK(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{typeof e=="function"&&e(),s(!0)},[e]),l=x.useCallback(()=>{typeof t=="function"&&t(),s(!1)},[t]);return{isAnimating:a,handleAnimationStart:u,handleAnimationEnd:l}}function sK(e){var t,r=e.animationInput,n=e.animationIdPrefix,a=e.items,s=e.previousItemsRef,u=e.isAnimationActive,l=e.animationBegin,f=e.animationDuration,h=e.animationEasing,p=e.onAnimationStart,g=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,j=e.shouldUpdatePreviousRef,k=e.children,S=e.layout,N=kP(r,n),A=lO(N,s),O=(t=A.startValue)!==null&&t!==void 0?t:null,C=Wv(O,a,b??I0);return x.createElement(jP,{animationId:N,begin:l,duration:f,isActive:u,easing:h,onAnimationEnd:g,onAnimationStart:p,key:N},_=>{var E=O==null,M=a==null?a:v(C,_,S),U=j?j(_):_>0;return A.syncStepValue(M,_,U),M==null?null:k(M,_,E)})}var Sg;function lK(e,t){return fK(e)||dK(e,t)||cK(e,t)||uK()}function uK(){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 cK(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{var e=x.useState(()=>ku("uid-")),t=lK(e,1),r=t[0];return r},uO=(Sg=th.useId)!==null&&Sg!==void 0?Sg:hK;function pK(e,t){var r=uO();return t||(e?"".concat(e,"-").concat(r):r)}var mK=x.createContext(void 0),gK=e=>{var t=e.id,r=e.type,n=e.children,a=pK("recharts-".concat(r),t);return x.createElement(mK.Provider,{value:a},n(a))},vK={cartesianItems:[],polarItems:[]},cO=rr({name:"graphicalItems",initialState:vK,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:nt()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,s=Gr(e).cartesianItems.indexOf(n);s>-1&&(e.cartesianItems[s]=a)},prepare:nt()},removeCartesianGraphicalItem:{reducer(e,t){var r=Gr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:nt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:nt()},removePolarGraphicalItem:{reducer(e,t){var r=Gr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:nt()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,a=r.next,s=Gr(e).polarItems.indexOf(n);s>-1&&(e.polarItems[s]=a)},prepare:nt()}}}),Js=cO.actions,yK=Js.addCartesianGraphicalItem,xK=Js.replaceCartesianGraphicalItem,bK=Js.removeCartesianGraphicalItem;Js.addPolarGraphicalItem;Js.removePolarGraphicalItem;Js.replacePolarGraphicalItem;var wK=cO.reducer,jK=e=>{var t=wt(),r=x.useRef(null);return x.useLayoutEffect(()=>{r.current===null?t(yK(e)):r.current!==e&&t(xK({prev:r.current,next:e})),r.current=e},[t,e]),x.useLayoutEffect(()=>()=>{r.current&&(t(bK(r.current)),r.current=null)},[t]),null},kK=x.memo(jK),SK=["points"];function $S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ng(e){for(var t=1;t{var N,A,O=Ng(Ng(Ng({r:3},u),v),{},{index:S,cx:(N=k.x)!==null&&N!==void 0?N:void 0,cy:(A=k.y)!==null&&A!==void 0?A:void 0,dataKey:s,value:k.value,payload:k.payload,points:t});return x.createElement(OK,{key:"dot-".concat(S),option:r,dotProps:O,className:a})}),j={};return l&&f!=null&&(j.clipPath="url(#clipPath-".concat(g?"":"dots-").concat(f,")")),x.createElement(wi,{zIndex:p},x.createElement(Qr,qf({className:n},j),b))}function LS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zS(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),GK=G([KK,mi,gi],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),D0=()=>Ae(GK),VK=()=>Ae(JU);function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Eg(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,a=e.activeDot,s=e.dataKey,u=e.clipPath;if(a===!1||t.x==null||t.y==null)return null;var l={index:r,dataKey:s,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Eg(Eg(Eg({},l),lh(a)),my(a)),h;return x.isValidElement(a)?h=x.cloneElement(a,f):typeof a=="function"?h=a(f):h=x.createElement(iO,f),x.createElement(Qr,{className:"recharts-active-dot",clipPath:u},h)};function BS(e){var t=e.points,r=e.mainColor,n=e.activeDot,a=e.itemDataKey,s=e.clipPath,u=e.zIndex,l=u===void 0?or.activeDot:u,f=Ae(Ru),h=VK();if(t==null||h==null)return null;var p=t.find(g=>h.includes(g.payload));return Kt(p)?null:x.createElement(wi,{zIndex:l},x.createElement(XK,{point:p,childIndex:Number(f),mainColor:r,dataKey:a,activeDot:n,clipPath:s}))}var ZK=e=>{var t=e.chartData,r=wt(),n=jr();return x.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}},hO=rr({name:"brush",initialState:US,reducers:{setBrushSettings(e,t){return t.payload==null?US:t.payload}}});hO.actions.setBrushSettings;var JK=hO.reducer;function eG(e){return(e%180+180)%180}var tG=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=eG(a),u=s*Math.PI/180,l=Math.atan(n/r),f=u>l&&u{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Gr(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=Gr(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=Gr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),el=pO.actions;el.addDot;el.removeDot;el.addArea;el.removeArea;el.addLine;el.removeLine;var nG=pO.reducer;function iG(e,t){return lG(e)||sG(e,t)||oG(e,t)||aG()}function aG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oG(e,t){if(e){if(typeof e=="string")return WS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?WS(e,t):void 0}}function WS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=x.useState("".concat(ku("recharts"),"-clip")),n=iG(r,1),a=n[0],s=D0();if(s==null)return null;var u=s.x,l=s.y,f=s.width,h=s.height;return x.createElement(uG.Provider,{value:a},x.createElement("defs",null,x.createElement("clipPath",{id:a},x.createElement("rect",{x:u,y:l,height:h,width:f}))),t)};function mO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*a)return!1;var s=r();return e*(t-e*s/2-n)>=0&&e*(t+e*s/2-a)<=0}function hG(e,t){return mO(e,t+1)}function pG(e,t,r,n,a){for(var s=(n||[]).slice(),u=t.start,l=t.end,f=0,h=1,p=u,g=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:mO(n,h)};var k=f,S,N=()=>(S===void 0&&(S=r(j,k)),S),A=j.coordinate,O=f===0||Lu(e,A,N,p,l);O||(f=0,p=u,h+=1),O&&(p=A+e*(N()/2+a),f+=h)},v;h<=s.length;)if(v=g(),v)return v.v;return[]}function mG(e,t,r,n,a){var s=(n||[]).slice(),u=s.length;if(u===0)return[];for(var l=t.start,f=t.end,h=1;h<=u;h++){for(var p=(u-1)%h,g=l,v=!0,b=function(){var C=n[k];if(C==null)return 0;var _=k,E,M=()=>(E===void 0&&(E=r(C,_)),E),U=C.coordinate,W=k===p||Lu(e,U,M,g,f);if(!W)return v=!1,1;W&&(g=U+e*(M()/2+a))},j,k=p;k(k===void 0&&(k=r(b,v)),k);if(v===u-1){var N=e*(j.coordinate+e*S()/2-f);s[v]=j=er(er({},j),{},{tickCoord:N>0?j.coordinate-N*e:j.coordinate})}else s[v]=j=er(er({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var A=Lu(e,j.tickCoord,S,l,f);A&&(f=j.tickCoord-e*(S()/2+a),s[v]=er(er({},j),{},{isShow:!0}))}},p=u-1;p>=0;p--)h(p);return s}function bG(e,t,r,n,a,s){var u=(n||[]).slice(),l=u.length,f=t.start,h=t.end;if(s){var p=n[l-1];if(p!=null){var g=r(p,l-1),v=e*(p.coordinate+e*g/2-h);if(u[l-1]=p=er(er({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate}),p.tickCoord!=null){var b=Lu(e,p.tickCoord,()=>g,f,h);b&&(h=p.tickCoord-e*(g/2+a),u[l-1]=er(er({},p),{},{isShow:!0}))}}}for(var j=s?l-1:l,k=function(A){var O=u[A];if(O==null)return 1;var C=O,_,E=()=>(_===void 0&&(_=r(O,A)),_);if(A===0){var M=e*(C.coordinate-e*E()/2-f);u[A]=C=er(er({},C),{},{tickCoord:M<0?C.coordinate-M*e:C.coordinate})}else u[A]=C=er(er({},C),{},{tickCoord:C.coordinate});if(C.tickCoord!=null){var U=Lu(e,C.tickCoord,E,f,h);U&&(f=C.tickCoord+e*(E()/2+a),u[A]=er(er({},C),{},{isShow:!0}))}},S=0;S{var M=typeof h=="function"?h(_.value,E):_.value;return j==="width"?dG(cu(M,{fontSize:t,letterSpacing:r}),k,g):cu(M,{fontSize:t,letterSpacing:r})[j]},N=a[0],A=a[1],O=a.length>=2&&N!=null&&A!=null?Kr(A.coordinate-N.coordinate):1,C=fG(s,O,j);return f==="equidistantPreserveStart"?pG(O,C,S,a,u):f==="equidistantPreserveEnd"?mG(O,C,S,a,u):(f==="preserveStart"||f==="preserveStartEnd"?b=bG(O,C,S,a,u,f==="preserveStartEnd"):b=xG(O,C,S,a,u),b.filter(_=>_.isShow))}var wG=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,a=n,s=e.tickSize,u=s===void 0?0:s,l=e.tickMargin,f=l===void 0?0:l,h=0;if(t){Array.from(t).forEach(b=>{if(b){var j=b.getBoundingClientRect();j.width>h&&(h=j.width)}});var p=r?r.getBoundingClientRect().width:0,g=u+f,v=h+g+p+(r?a:0);return Math.round(v)}return 0},jG={xAxis:{},yAxis:{}},gO=rr({name:"renderedTicks",initialState:jG,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId,s=r.ticks;e[n][a]=s},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,a=r.axisId;delete e[n][a]}}}),vO=gO.actions,kG=vO.setRenderedTicks,SG=vO.removeRenderedTicks,NG=gO.reducer,EG=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function KS(e,t){return OG(e)||CG(e,t)||AG(e,t)||PG()}function PG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AG(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{if(n==null||r==null)return Ws;var s=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return a(kG({ticks:s,axisId:n,axisType:r})),()=>{a(SG({axisId:n,axisType:r}))}},[a,t,n,r]),null}var UG=x.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,a=e.tick,s=e.tickLine,u=e.stroke,l=e.tickFormatter,f=e.unit,h=e.padding,p=e.tickTextProps,g=e.orientation,v=e.mirror,b=e.x,j=e.y,k=e.width,S=e.height,N=e.tickSize,A=e.tickMargin,O=e.fontSize,C=e.letterSpacing,_=e.getTicksConfig,E=e.events,M=e.axisType,U=e.axisId,W=R0(pt(pt({},_),{},{ticks:n}),O,C),V=hn(_),Y=lh(a),R=YC(V.textAnchor)?V.textAnchor:LG(g,v),ce=zG(g,v),Z={};typeof s=="object"&&(Z=s);var ve=pt(pt({},V),{},{fill:"none"},Z),be=W.map(ne=>pt({entry:ne},$G(ne,b,j,k,S,g,N,v,A))),pe=be.map(ne=>{var X=ne.entry,$=ne.line;return x.createElement(Qr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},s&&x.createElement("line",go({},ve,$,{className:Je("recharts-cartesian-axis-tick-line",xo(s,"className"))})))}),Q=be.map((ne,X)=>{var $,T,J=ne.entry,oe=ne.tick,ee=pt(pt(pt(pt({verticalAnchor:ce},V),{},{textAnchor:R,stroke:"none",fill:u},oe),{},{index:X,payload:J,visibleTicksCount:W.length,tickFormatter:l,padding:h},p),{},{angle:($=(T=p==null?void 0:p.angle)!==null&&T!==void 0?T:V.angle)!==null&&$!==void 0?$:0}),ue=pt(pt({},ee),Y);return x.createElement(Qr,go({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},G4(E,J,X)),a&&x.createElement(FG,{option:a,tickProps:ue,value:"".concat(typeof l=="function"?l(J.value,X):J.value).concat(f||"")}))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(M,"-ticks")},x.createElement(BG,{ticks:W,axisId:U,axisType:M}),Q.length>0&&x.createElement(wi,{zIndex:or.label},x.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(M,"-tick-labels"),ref:t},Q)),pe.length>0&&x.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(M,"-tick-lines")},pe))}),WG=x.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,a=e.height,s=e.className,u=e.hide,l=e.ticks,f=e.axisType,h=e.axisId,p=_G(e,EG),g=x.useState(""),v=KS(g,2),b=v[0],j=v[1],k=x.useState(""),S=KS(k,2),N=S[0],A=S[1],O=x.useRef(null);x.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return wG({ticks:O.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var C=x.useCallback(_=>{if(_){var E=_.getElementsByClassName("recharts-cartesian-axis-tick-value");O.current=E;var M=E[0];if(M){var U=window.getComputedStyle(M),W=U.fontSize,V=U.letterSpacing;(W!==b||V!==N)&&(j(W),A(V))}}},[b,N]);return u||n!=null&&n<=0||a!=null&&a<=0?null:x.createElement(wi,{zIndex:e.zIndex},x.createElement(Qr,{className:Je("recharts-cartesian-axis",s)},x.createElement(RG,{x:e.x,y:e.y,width:n,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:hn(e)}),x.createElement(UG,{ref:C,axisType:f,events:p,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),x.createElement(hH,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(kH,{label:e.label,labelRef:e.labelRef}),e.children)))}),$0=x.forwardRef((e,t)=>{var r=Xr(e,ci);return x.createElement(WG,go({},r,{ref:t}))});$0.displayName="CartesianAxis";var HG=["x1","y1","x2","y2","key"],KG=["offset"],GG=["xAxisId","yAxisId"],VG=["xAxisId","yAxisId"];function qS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,a=e.y,s=e.width,u=e.height,l=e.ry;return x.createElement("rect",{x:n,y:a,ry:l,width:s,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function yO(e){var t=e.option,r=e.lineItemProps,n;if(x.isValidElement(t))n=x.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var a,s=r.x1,u=r.y1,l=r.x2,f=r.y2,h=r.key,p=Qf(r,HG),g=(a=hn(p))!==null&&a!==void 0?a:{};g.offset;var v=Qf(g,KG);n=x.createElement("line",Va({},v,{x1:s,y1:u,x2:l,y2:f,fill:"none",key:h}))}return n}function JG(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,s=e.horizontalPoints;if(!a||!s||!s.length)return null;e.xAxisId,e.yAxisId;var u=Qf(e,GG),l=s.map((f,h)=>{var p=tr(tr({},u),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return x.createElement(yO,{key:"line-".concat(h),option:a,lineItemProps:p})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function eV(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,s=e.verticalPoints;if(!a||!s||!s.length)return null;e.xAxisId,e.yAxisId;var u=Qf(e,VG),l=s.map((f,h)=>{var p=tr(tr({},u),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return x.createElement(yO,{option:a,lineItemProps:p,key:"line-".concat(h)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function tV(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,s=e.width,u=e.height,l=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||l==null)return null;var p=l.map(v=>Math.round(v+a-a)).sort((v,b)=>v-b);a!==p[0]&&p.unshift(0);var g=p.map((v,b)=>{var j=p[b+1],k=j==null,S=k?a+u-v:j-v;if(S<=0)return null;var N=b%t.length;return x.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:S,width:s,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},g)}function rV(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,s=e.x,u=e.y,l=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var p=h.map(v=>Math.round(v+s-s)).sort((v,b)=>v-b);s!==p[0]&&p.unshift(0);var g=p.map((v,b)=>{var j=p[b+1],k=j==null,S=k?s+l-v:j-v;if(S<=0)return null;var N=b%n.length;return x.createElement("rect",{key:"react-".concat(b),x:v,y:u,width:S,height:f,stroke:"none",fill:n[N],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},g)}var nV=(e,t)=>{var r=e.xAxis,n=e.width,a=e.height,s=e.offset;return ZE(R0(tr(tr(tr({},ci),r),{},{ticks:JE(r),viewBox:{x:0,y:0,width:n,height:a}})),s.left,s.left+s.width,t)},iV=(e,t)=>{var r=e.yAxis,n=e.width,a=e.height,s=e.offset;return ZE(R0(tr(tr(tr({},ci),r),{},{ticks:JE(r),viewBox:{x:0,y:0,width:n,height:a}})),s.top,s.top+s.height,t)},aV={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:or.grid};function xO(e){var t=sP(),r=lP(),n=oP(),a=tr(tr({},Xr(e,aV)),{},{x:ke(e.x)?e.x:n.left,y:ke(e.y)?e.y:n.top,width:ke(e.width)?e.width:n.width,height:ke(e.height)?e.height:n.height}),s=a.xAxisId,u=a.yAxisId,l=a.x,f=a.y,h=a.width,p=a.height,g=a.syncWithTicks,v=a.horizontalValues,b=a.verticalValues,j=jr(),k=Ae(W=>Yk(W,"xAxis",s,j)),S=Ae(W=>Yk(W,"yAxis",u,j));if(!$n(h)||!$n(p)||!ke(l)||!ke(f))return null;var N=a.verticalCoordinatesGenerator||nV,A=a.horizontalCoordinatesGenerator||iV,O=a.horizontalPoints,C=a.verticalPoints;if((!O||!O.length)&&typeof A=="function"){var _=v&&v.length,E=A({yAxis:S?tr(tr({},S),{},{ticks:_?v:S.ticks}):void 0,width:t??h,height:r??p,offset:n},_?!0:g);wf(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(O=E)}if((!C||!C.length)&&typeof N=="function"){var M=b&&b.length,U=N({xAxis:k?tr(tr({},k),{},{ticks:M?b:k.ticks}):void 0,width:t??h,height:r??p,offset:n},M?!0:g);wf(Array.isArray(U),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof U,"]")),Array.isArray(U)&&(C=U)}return x.createElement(wi,{zIndex:a.zIndex},x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(ZG,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),x.createElement(tV,Va({},a,{horizontalPoints:O})),x.createElement(rV,Va({},a,{verticalPoints:C})),x.createElement(JG,Va({},a,{offset:n,horizontalPoints:O,xAxis:k,yAxis:S})),x.createElement(eV,Va({},a,{offset:n,verticalPoints:C,xAxis:k,yAxis:S}))))}xO.displayName="CartesianGrid";var oV={},bO=rr({name:"errorBars",initialState:oV,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.prev,s=r.next;e[n]&&(e[n]=e[n].map(u=>u.dataKey===a.dataKey&&u.direction===a.direction?s:u))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,a=r.errorBar;e[n]&&(e[n]=e[n].filter(s=>s.dataKey!==a.dataKey||s.direction!==a.direction))}}}),L0=bO.actions;L0.addErrorBar;L0.replaceErrorBar;L0.removeErrorBar;var sV=bO.reducer;function wO(e,t){var r,n,a=Ae(h=>yi(h,e)),s=Ae(h=>xi(h,t)),u=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:St.allowDataOverflow,l=(n=s==null?void 0:s.allowDataOverflow)!==null&&n!==void 0?n:Nt.allowDataOverflow,f=u||l;return{needClip:f,needClipX:u,needClipY:l}}function lV(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,a=D0(),s=wO(t,r),u=s.needClipX,l=s.needClipY,f=s.needClip,h=Ae(O=>aC(O,t,!1)),p=Ae(O=>oC(O,r,!1));if(!f||!a)return null;var g=a.x,v=a.y,b=a.width,j=a.height,k=u&&h?Math.min(h[0],h[1]):g-b/2,S=l&&p?Math.min(p[0],p[1]):v-j/2,N=u&&h?Math.abs(h[1]-h[0]):b*2,A=l&&p?Math.abs(p[1]-p[0]):j*2;return x.createElement("clipPath",{id:"clipPath-".concat(n)},x.createElement("rect",{x:k,y:S,width:N,height:A}))}function uV(e){var t=lh(e),r=3,n=2;if(t!=null){var a=t.r,s=t.strokeWidth,u=Number(a),l=Number(s);return(Number.isNaN(u)||u<0)&&(u=r),(Number.isNaN(l)||l<0)&&(l=n),{r:u,strokeWidth:l}}return{r,strokeWidth:n}}function z0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:dO}function F0(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:dO}var jO=(e,t,r)=>pC(e,"xAxis",z0(e,t),r),kO=(e,t,r)=>hC(e,"xAxis",z0(e,t),r),SO=(e,t,r)=>pC(e,"yAxis",F0(e,t),r),NO=(e,t,r)=>hC(e,"yAxis",F0(e,t),r),cV=G([lt,jO,SO,kO,NO],(e,t,r,n,a)=>Fn(e,"xAxis")?bf(t,n,!1):bf(r,a,!1)),dV=(e,t)=>t,EO=G([IA,dV],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),PO=e=>{var t=lt(e),r=Fn(t,"xAxis");return r?"yAxis":"xAxis"},fV=(e,t)=>{var r=PO(e);return r==="yAxis"?F0(e,t):z0(e,t)},hV=(e,t,r)=>WA(e,PO(e),fV(e,t),r),pV=G([EO,hV],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,a=Fy(e);if(!(n==null||a==null)){var s=(r=t[n])===null||r===void 0?void 0:r.stackedData,u=s==null?void 0:s.find(l=>l.key===a);if(u!=null)return u.map(l=>[l[0],l[1]])}}}),mV=G([lt,jO,SO,kO,NO,pV,z6,cV,EO,rF],(e,t,r,n,a,s,u,l,f,h)=>{var p=u.chartData,g=u.dataStartIndex,v=u.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||a==null||n.length===0||a.length===0||l==null)){var b=f.data,j;if(b&&b.length>0?j=b:j=p==null?void 0:p.slice(g,v+1),j!=null)return BV({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:g,areaSettings:f,stackedData:s,displayedData:j,chartBaseValue:h,bandSize:l})}}),gV=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],vV=["id","baseLine"];function du(){return du=Object.assign?Object.assign.bind():function(e){for(var t=1;tg.y||0));return ke(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.y||0),p)),ke(p)?x.createElement("rect",{x:lg.x||0));return ke(a)?p=Math.max(a,p):a&&Array.isArray(a)&&a.length&&(p=Math.max(...a.map(g=>g.x||0),p)),ke(p)?x.createElement("rect",{x:0,y:le==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Fs(Fs({},r.next),{},{x:ii(r.prev.x,r.next.x,t),y:ii(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),CO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:I0,animationInterpolateFn:CV,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:jV,xAxisId:0,yAxisId:0,zIndex:or.area};function Xf(e,t){return e&&e!=="none"?e:t}var OV=e=>{var t=e.dataKey,r=e.name,n=e.stroke,a=e.fill,s=e.legendType,u=e.hide;return[{inactive:u,dataKey:t,type:s,color:Xf(n,a),value:eP(r,t),payload:e}]},_V=x.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,a=e.strokeWidth,s=e.fill,u=e.name,l=e.hide,f=e.unit,h=e.tooltipType,p=e.id,g={dataDefinedOnItem:r,getPosition:Ws,settings:{stroke:n,strokeWidth:a,fill:s,dataKey:t,nameKey:void 0,name:eP(u,t),hide:l,type:h,color:Xf(n,s),unit:f,graphicalItemId:p}};return x.createElement(WH,{tooltipEntrySettings:g})});function MV(e){var t=e.clipPathId,r=e.points,n=e.props,a=n.needClip,s=n.dot,u=n.dataKey,l=hn(n);return x.createElement(MK,{points:r,dot:s,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:u,baseProps:l,needClip:a,clipPathId:t})}function IV(e){var t=e.showLabels,r=e.children,n=e.points,a=n.map(s=>{var u,l,f={x:(u=s.x)!==null&&u!==void 0?u:0,y:(l=s.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Fs(Fs({},f),{},{value:s.value,payload:s.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return x.createElement(AH,{value:t?a:void 0},r)}function TV(e){var t=e.points,r=e.baseLine,n=e.needClip,a=e.clipPathId,s=e.props,u=e.animationElapsedTime,l=e.isAnimating,f=e.isEntrance,h=s.layout,p=s.type,g=s.stroke,v=s.connectNulls,b=s.isRange,j=s.shape,k=s.id,S=AO(s,kV),N=qr(S),A=Fs(Fs({},N),{},{id:k,points:t,connectNulls:v,type:p,baseLine:r,layout:h,stroke:g,isRange:b,animationElapsedTime:u,isAnimating:l,isEntrance:f});return x.createElement(x.Fragment,null,(t==null?void 0:t.length)>1&&x.createElement(Qr,{clipPath:n?"url(#clipPath-".concat(a,")"):void 0},x.createElement(UH,{option:j,DefaultShape:CO.shape,shapeProps:A})),x.createElement(MV,{points:t,props:S,clipPathId:a}))}function DV(e,t,r){if(ke(e)){var n=ke(t)?t:void 0;return ii(n,e,r)}if(Kt(e)||Dn(e)){var a=ke(t)?t:void 0;return ii(a,0,r)}return e}function RV(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=e.previousPointsRef,s=e.previousBaselineRef,u=n.points,l=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,p=n.animationDuration,g=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,j=x.useMemo(()=>({points:u,baseLine:l}),[u,l]),k=lO(j,s),S=Ey(),N=oK(n.onAnimationStart,n.onAnimationEnd),A=N.isAnimating,O=N.handleAnimationStart,C=N.handleAnimationEnd,_=k.startValue;if(S==null)return null;var E;return Array.isArray(l)&&Array.isArray(_)?E=Wv(_,l,v):Array.isArray(l)?E=Wv(null,l,v):E=null,x.createElement(sK,{animationInput:j,animationIdPrefix:"recharts-area-",items:u,previousItemsRef:a,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:g,onAnimationStart:O,onAnimationEnd:C,animationInterpolateFn:b,animationMatchBy:v,layout:S},(M,U,W)=>{var V;return U===1?V=l:Array.isArray(l)?V=b(E,U,S):V=W?l:DV(l,_,U),k.syncStepValue(V,U),x.createElement(IV,{showLabels:!A,points:u},n.children,x.createElement(TV,{points:M,baseLine:V,needClip:t,clipPathId:r,props:n,animationElapsedTime:U,isAnimating:A||U<1,isEntrance:W}),x.createElement(_H,{label:n.label}))})}function $V(e){var t=e.needClip,r=e.clipPathId,n=e.props,a=x.useRef(null),s=x.useRef();return x.createElement(RV,{needClip:t,clipPathId:r,props:n,previousPointsRef:a,previousBaselineRef:s})}class LV extends x.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,a=t.points,s=t.className,u=t.top,l=t.left,f=t.needClip,h=t.xAxisId,p=t.yAxisId,g=t.width,v=t.height,b=t.id,j=t.baseLine,k=t.zIndex;if(r)return null;var S=Je("recharts-area",s),N=b,A=uV(n),O=A.r,C=A.strokeWidth,_=oO(n),E=O*2+C,M=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return x.createElement(wi,{zIndex:k},x.createElement(Qr,{className:S},f&&x.createElement("defs",null,x.createElement(lV,{clipPathId:N,xAxisId:h,yAxisId:p}),!_&&x.createElement("clipPath",{id:"clipPath-dots-".concat(N)},x.createElement("rect",{x:l-E/2,y:u-E/2,width:g+E,height:v+E}))),x.createElement($V,{needClip:f,clipPathId:N,props:this.props})),x.createElement(BS,{points:a,mainColor:Xf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:M}),this.props.isRange&&Array.isArray(j)&&x.createElement(BS,{points:j,mainColor:Xf(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:M}))}}function zV(e){var t,r=e.activeDot,n=e.animationBegin,a=e.animationDuration,s=e.animationEasing,u=e.connectNulls,l=e.dot,f=e.fill,h=e.fillOpacity,p=e.hide,g=e.isAnimationActive,v=e.legendType,b=e.stroke,j=e.xAxisId,k=e.yAxisId,S=AO(e,SV),N=Hs(),A=$C(),O=wO(j,k),C=O.needClip,_=jr(),E=(t=Ae(ve=>mV(ve,e.id,_)))!==null&&t!==void 0?t:{},M=E.points,U=E.isRange,W=E.baseLine,V=D0();if(N!=="horizontal"&&N!=="vertical"||V==null||A!=="AreaChart"&&A!=="ComposedChart")return null;var Y=V.height,R=V.width,ce=V.x,Z=V.y;return!M||!M.length?null:x.createElement(LV,Yf({},S,{activeDot:r,animationBegin:n,animationDuration:a,animationEasing:s,baseLine:W,connectNulls:u,dot:l,fill:f,fillOpacity:h,height:Y,hide:p,layout:N,isAnimationActive:g,isRange:U,legendType:v,needClip:C,points:M,stroke:b,width:R,left:ce,top:Z,xAxisId:j,yAxisId:k}))}var FV=(e,t,r,n,a)=>{var s=r??t;if(ke(s))return s;var u=e==="horizontal"?a:n,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),h=Math.min(l[0],l[1]);return s==="dataMin"?h:s==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]};function BV(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,a=t.dataKey,s=e.stackedData,u=e.layout,l=e.chartBaseValue,f=e.xAxis,h=e.yAxis,p=e.displayedData,g=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,j=e.bandSize,k=s&&s.length,S=FV(u,l,n,f,h),N=u==="horizontal",A=!1,O=p.map((_,E)=>{var M,U,W,V;if(k)V=s[g+E];else{var Y=Tt(_,a);Array.isArray(Y)?(V=Y,A=!0):V=[S,Y]}var R=(M=(U=V)===null||U===void 0?void 0:U[1])!==null&&M!==void 0?M:null,ce=R==null||k&&!r&&Tt(_,a)==null;if(N){var Z;return{x:Kw({axis:f,ticks:v,bandSize:j,entry:_,index:E}),y:ce?null:(Z=h.scale.map(R))!==null&&Z!==void 0?Z:null,value:V,payload:_}}return{x:ce?null:(W=f.scale.map(R))!==null&&W!==void 0?W:null,y:Kw({axis:h,ticks:b,bandSize:j,entry:_,index:E}),value:V,payload:_}}),C;return k||A?C=O.map(_=>{var E,M=Array.isArray(_.value)?_.value[0]:null;if(N){var U;return{x:_.x,y:M!=null&&_.y!=null&&(U=h.scale.map(M))!==null&&U!==void 0?U:null,payload:_.payload}}return{x:M!=null&&(E=f.scale.map(M))!==null&&E!==void 0?E:null,y:_.y,payload:_.payload}}):C=N?h.scale.map(S):f.scale.map(S),{points:O,baseLine:C??0,isRange:A}}function UV(e){var t=Xr(e,CO),r=jr();return x.createElement(gK,{id:t.id,type:"area"},n=>x.createElement(x.Fragment,null,x.createElement(HH,{legendPayload:OV(t)}),x.createElement(_V,{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}),x.createElement(kK,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:N$(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),x.createElement(zV,Yf({},t,{id:n}))))}var OO=x.memo(UV,Oh);OO.displayName="Area";var WV=["domain","range"],HV=["domain","range"];function XS(e,t){if(e==null)return{};var r,n,a=KV(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{if(u!=null)return eN(eN({},s),{},{type:u})},[s,u]);return x.useLayoutEffect(()=>{l!=null&&(r.current===null?t($K(l)):r.current!==l&&t(LK({prev:r.current,next:l})),r.current=l)},[l,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(zK(r.current)),r.current=null)},[t]),null}var eq=e=>{var t=e.xAxisId,r=e.className,n=Ae(rP),a=jr(),s="xAxis",u=Ae(v=>fC(v,s,t,a)),l=Ae(v=>T9(v,t)),f=Ae(v=>F9(v,t)),h=Ae(v=>CA(v,t));if(l==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var p=Kv(e,VV);h.id,h.scale;var g=Kv(h,qV);return x.createElement($0,Hv({},p,g,{x:f.x,y:f.y,width:l.width,height:l.height,className:Je("recharts-".concat(s," ").concat(s),r),viewBox:n,ticks:u,axisType:s,axisId:t}))},tq={allowDataOverflow:St.allowDataOverflow,allowDecimals:St.allowDecimals,allowDuplicatedCategory:St.allowDuplicatedCategory,angle:St.angle,axisLine:ci.axisLine,height:St.height,hide:!1,includeHidden:St.includeHidden,interval:St.interval,label:!1,minTickGap:St.minTickGap,mirror:St.mirror,orientation:St.orientation,padding:St.padding,reversed:St.reversed,scale:St.scale,tick:St.tick,tickCount:St.tickCount,tickLine:ci.tickLine,tickSize:ci.tickSize,type:St.type,niceTicks:St.niceTicks,xAxisId:0},rq=e=>{var t=Xr(e,tq);return x.createElement(x.Fragment,null,x.createElement(JV,{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}),x.createElement(eq,t))},MO=x.memo(rq,_O);MO.displayName="XAxis";var nq=["type"],iq=["dangerouslySetInnerHTML","ticks","scale"],aq=["id","scale"];function Gv(){return Gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(u!=null)return rN(rN({},s),{},{type:u})},[u,s]);return x.useLayoutEffect(()=>{l!=null&&(r.current===null?t(FK(l)):r.current!==l&&t(BK({prev:r.current,next:l})),r.current=l)},[l,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(UK(r.current)),r.current=null)},[t]),null}function dq(e){var t=e.yAxisId,r=e.className,n=e.width,a=e.label,s=x.useRef(null),u=x.useRef(null),l=Ae(rP),f=jr(),h=wt(),p="yAxis",g=Ae(N=>W9(N,t)),v=Ae(N=>U9(N,t)),b=Ae(N=>fC(N,p,t,f)),j=Ae(N=>OA(N,t));if(x.useLayoutEffect(()=>{if(!(n!=="auto"||!g||M0(a)||x.isValidElement(a)||j==null)){var N=s.current;if(N){var A=N.getCalculatedWidth();Math.round(g.width)!==Math.round(A)&&h(WK({id:t,width:A}))}}},[b,g,h,a,t,n,j]),g==null||v==null||j==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var k=Vv(e,iq);j.id,j.scale;var S=Vv(j,aq);return x.createElement($0,Gv({},k,S,{ref:s,labelRef:u,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:Je("recharts-".concat(p," ").concat(p),r),viewBox:l,ticks:b,axisType:p,axisId:t}))}var fq={allowDataOverflow:Nt.allowDataOverflow,allowDecimals:Nt.allowDecimals,allowDuplicatedCategory:Nt.allowDuplicatedCategory,angle:Nt.angle,axisLine:ci.axisLine,hide:!1,includeHidden:Nt.includeHidden,interval:Nt.interval,label:!1,minTickGap:Nt.minTickGap,mirror:Nt.mirror,orientation:Nt.orientation,padding:Nt.padding,reversed:Nt.reversed,scale:Nt.scale,tick:Nt.tick,tickCount:Nt.tickCount,tickLine:ci.tickLine,tickSize:ci.tickSize,type:Nt.type,niceTicks:Nt.niceTicks,width:Nt.width,yAxisId:0},hq=e=>{var t=Xr(e,fq);return x.createElement(x.Fragment,null,x.createElement(cq,{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}),x.createElement(dq,t))},IO=x.memo(hq,_O);IO.displayName="YAxis";var pq=(e,t)=>t,B0=G([pq,lt,HP,Rt,_C,bi,d7,Vt],y7);function mq(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function U0(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(mq(e)){var a=e.currentTarget.getBBox();r=a.width>0?t.width/a.width:1,n=a.height>0?t.height/a.height:1}else{var s=e.currentTarget;r=s.offsetWidth>0?t.width/s.offsetWidth:1,n=s.offsetHeight>0?t.height/s.offsetHeight:1}var u=(l,f)=>({relativeX:Math.round((l-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(l=>u(l.clientX,l.clientY)):u(e.clientX,e.clientY)}var TO=Tr("mouseClick"),DO=Vu();DO.startListening({actionCreator:TO,effect:(e,t)=>{var r=e.payload,n=B0(t.getState(),U0(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(iU({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var qv=Tr("mouseMove"),RO=Vu(),ns=null,Da=null,Pg=null;RO.startListening({actionCreator:qv,effect:(e,t)=>{var r=e.payload,n=t.getState(),a=n.eventSettings,s=a.throttleDelay,u=a.throttledEvents,l=u==="all"||(u==null?void 0:u.includes("mousemove"));ns!==null&&(cancelAnimationFrame(ns),ns=null),Da!==null&&(typeof s!="number"||!l)&&(clearTimeout(Da),Da=null),Pg=U0(r);var f=()=>{var h=t.getState(),p=oc(h,h.tooltip.settings.shared);if(!Pg){ns=null,Da=null;return}if(p==="axis"){var g=B0(h,Pg);(g==null?void 0:g.activeIndex)!=null?t.dispatch(wC({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate})):t.dispatch(bC())}ns=null,Da=null};if(!l){f();return}s==="raf"?ns=requestAnimationFrame(f):typeof s=="number"&&Da===null&&(Da=setTimeout(f,s))}});function gq(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?"<>":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},$O=rr({name:"rootProps",initialState:nN,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:nN.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),vq=$O.reducer,yq=$O.actions.updateOptions,xq=null,bq={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)},LO=rr({name:"polarOptions",initialState:xq,reducers:bq});LO.actions.updatePolarOptions;var wq=LO.reducer,zO=Tr("keyDown"),FO=Tr("focus"),BO=Tr("blur"),Yh=Vu(),is=null,Ra=null,Ud=null;Yh.startListening({actionCreator:zO,effect:(e,t)=>{Ud=e.payload,is!==null&&(cancelAnimationFrame(is),is=null);var r=t.getState(),n=r.eventSettings,a=n.throttleDelay,s=n.throttledEvents,u=s==="all"||s.includes("keydown");Ra!==null&&(typeof a!="number"||!u)&&(clearTimeout(Ra),Ra=null);var l=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var p=f.tooltip.keyboardInteraction,g=Ud;if(g!=="ArrowRight"&&g!=="ArrowLeft"&&g!=="Enter")return;var v=uu(p,mo(f),Ls(f),zs(f)),b=v==null?-1:Number(v),j=!Number.isFinite(b)||b<0,k=bi(f),S=mo(f),N=oc(f,f.tooltip.settings.shared);if(g==="Enter"){if(j)return;var A=Kf(f,N,"hover",String(p.index));t.dispatch(Hf({active:!p.active,activeIndex:p.index,activeCoordinate:A}));return}var O=q9(f),C=O==="left-to-right"?1:-1,_=g==="ArrowRight"?1:-1,E;if(j){var M=Ls(f),U=zs(f),W=_*C,V=ve=>({active:!1,index:String(ve),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(E=-1,W>0){for(var Y=0;Y=0;R--)if(uu(V(R),S,M,U)!=null){E=R;break}if(E<0)return}else{E=b+_*C;var ce=(k==null?void 0:k.length)||S.length;if(ce===0||E>=ce||E<0)return}var Z=Kf(f,N,"hover",String(E));t.dispatch(Hf({active:!0,activeIndex:E.toString(),activeCoordinate:Z}))}finally{is=null,Ra=null}};if(!u){l();return}a==="raf"?is=requestAnimationFrame(l):typeof a=="number"&&Ra===null&&(l(),Ud=null,Ra=setTimeout(()=>{Ud?l():(Ra=null,is=null)},a))}});Yh.startListening({actionCreator:FO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;if(!a.active&&a.index==null){var s="0",u=oc(r,r.tooltip.settings.shared),l=Kf(r,u,"hover",String(s));t.dispatch(Hf({active:!0,activeIndex:s,activeCoordinate:l}))}}}});Yh.startListening({actionCreator:BO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var a=r.tooltip.keyboardInteraction;a.active&&t.dispatch(Hf({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function UO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var a=Reflect.get(r,n);return typeof a=="function"?a.bind(r):a}})}var Ur=Tr("externalEvent"),WO=Vu(),Wd=new Map,nu=new Map,Ag=new Map;WO.startListening({actionCreator:Ur,effect:(e,t)=>{var r=e.payload,n=r.handler,a=r.reactEvent;if(n!=null){var s=a.type,u=UO(a);Ag.set(s,{handler:n,reactEvent:u});var l=Wd.get(s);l!==void 0&&(cancelAnimationFrame(l),Wd.delete(s));var f=t.getState(),h=f.eventSettings,p=h.throttleDelay,g=h.throttledEvents,v=g,b=v==="all"||(v==null?void 0:v.includes(s)),j=nu.get(s);j!==void 0&&(typeof p!="number"||!b)&&(clearTimeout(j),nu.delete(s));var k=()=>{var A=Ag.get(s);try{if(!A)return;var O=A.handler,C=A.reactEvent,_=t.getState(),E={activeCoordinate:YU(_),activeDataKey:VU(_),activeIndex:Ru(_),activeLabel:TC(_),activeTooltipIndex:Ru(_),isTooltipActive:XU(_)};O&&O(E,C)}finally{Wd.delete(s),nu.delete(s),Ag.delete(s)}};if(!b){k();return}if(p==="raf"){var S=requestAnimationFrame(k);Wd.set(s,S)}else if(typeof p=="number"){if(!nu.has(s)){k();var N=setTimeout(k,p);nu.set(s,N)}}else k()}}});var jq=G([Zs],e=>e.tooltipItemPayloads),kq=G([jq,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(s=>s.settings.graphicalItemId===r);if(n!=null){var a=n.getPosition;if(a!=null)return a(t)}}}),HO=Tr("touchMove"),KO=Vu(),$a=null,Gi=null,iN=null,iu=null;KO.startListening({actionCreator:HO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){iu=UO(r);var n=t.getState(),a=n.eventSettings,s=a.throttleDelay,u=a.throttledEvents,l=u==="all"||u.includes("touchmove");$a!==null&&(cancelAnimationFrame($a),$a=null),Gi!==null&&(typeof s!="number"||!l)&&(clearTimeout(Gi),Gi=null),iN=Array.from(r.touches).map(h=>U0({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(iu!=null){var h=t.getState(),p=oc(h,h.tooltip.settings.shared);if(p==="axis"){var g,v=(g=iN)===null||g===void 0?void 0:g[0];if(v==null){$a=null,Gi=null;return}var b=B0(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(wC({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(p==="item"){var j,k=iu.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(M$),A=(j=S.getAttribute(I$))!==null&&j!==void 0?j:void 0,O=jo(h).find(E=>E.id===A);if(N==null||O==null||A==null)return;var C=O.dataKey,_=kq(h,N,A);t.dispatch(nU({activeDataKey:C,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:A}))}$a=null,Gi=null}};if(!l){f();return}s==="raf"?$a=requestAnimationFrame(f):typeof s=="number"&&Gi===null&&(f(),iu=null,Gi=setTimeout(()=>{iu?f():(Gi=null,$a=null)},s))}}});var GO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},VO=rr({name:"eventSettings",initialState:GO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),Sq=VO.actions.setEventSettings,Nq=VO.reducer,Eq=kE({brush:JK,cartesianAxis:HK,chartData:Q7,errorBars:sV,eventSettings:Nq,graphicalItems:wK,layout:g$,legend:OL,options:H7,polarAxis:IH,polarOptions:wq,referenceElements:nG,renderedTicks:NG,rootProps:vq,tooltip:aU,zIndex:_7}),Pq=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return BR({reducer:Eq,preloadedState:t,middleware:n=>{var a;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([DO.middleware,RO.middleware,Yh.middleware,WO.middleware,KO.middleware])},enhancers:n=>{var a=n;return typeof n=="function"&&(a=n()),a.concat(LE({type:"raf"}))},devTools:{serialize:{replacer:gq},name:"recharts-".concat(r)}})};function Aq(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,a=jr(),s=x.useRef(null);if(a)return r;s.current==null&&(s.current=Pq(t,n));var u=vy;return x.createElement(GL,{context:u,store:s.current},r)}function Cq(e){var t=e.layout,r=e.margin,n=wt(),a=jr();return x.useEffect(()=>{a||(n(h$(t)),n(f$(r)))},[n,a,t,r]),null}var Oq=x.memo(Cq,Oh);function _q(e){var t=wt();return x.useEffect(()=>{t(yq(e))},[t,e]),null}var Mq=e=>{var t=wt();return x.useEffect(()=>{t(Sq(e))},[t,e]),null},Iq=x.memo(Mq,Oh);function aN(e){var t=e.zIndex,r=e.isPanorama,n=x.useRef(null),a=wt();return x.useLayoutEffect(()=>(n.current&&a(C7({zIndex:t,element:n.current,isPanorama:r})),()=>{a(O7({zIndex:t,isPanorama:r}))}),[a,t,r]),x.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function oN(e){var t=e.children,r=e.isPanorama,n=Ae(b7);if(!n||n.length===0)return t;var a=n.filter(u=>u<0),s=n.filter(u=>u>0);return x.createElement(x.Fragment,null,a.map(u=>x.createElement(aN,{key:u,zIndex:u,isPanorama:r})),t,s.map(u=>x.createElement(aN,{key:u,zIndex:u,isPanorama:r})))}var Tq=["children"];function Dq(e,t){if(e==null)return{};var r,n,a=Rq(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var r=sP(),n=lP(),a=yP();if(!$n(r)||!$n(n))return null;var s=e.children,u=e.otherAttributes,l=e.title,f=e.desc,h,p;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=a?0:void 0,typeof u.role=="string"?p=u.role:p=a?"application":void 0),x.createElement(B2,Zf({},u,{title:l,desc:f,role:p,tabIndex:h,width:r,height:n,style:$q,ref:t}),s)}),zq=e=>{var t=e.children,r=Ae(Nh);if(!r)return null;var n=r.width,a=r.height,s=r.y,u=r.x;return x.createElement(B2,{width:n,height:a,x:u,y:s},t)},sN=x.forwardRef((e,t)=>{var r=e.children,n=Dq(e,Tq),a=jr();return a?x.createElement(zq,null,x.createElement(oN,{isPanorama:!0},r)):x.createElement(Lq,Zf({ref:t},n),x.createElement(oN,{isPanorama:!1},r))});function Fq(e,t){return Hq(e)||Wq(e,t)||Uq(e,t)||Bq()}function Bq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uq(e,t){if(e){if(typeof e=="string")return 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{if(n!=null){var u=n.getBoundingClientRect(),l=u.width/n.offsetWidth;Fe(l)&&l!==s&&e(m$(l))}},[n,e,s]),a}function uN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gq(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(iW(),null);function eh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var tQ=x.forwardRef((e,t)=>{var r,n,a=x.useRef(null),s=x.useState({containerWidth:eh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:eh((n=e.style)===null||n===void 0?void 0:n.height)}),u=Jf(s,2),l=u[0],f=u[1],h=x.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}})},[]),p=x.useCallback(g=>{if(typeof t=="function"&&t(g),a.current!=null&&(a.current.disconnect(),a.current=null),g!=null&&typeof ResizeObserver<"u"){var v=g.getBoundingClientRect(),b=v.width,j=v.height;h(b,j);var k=N=>{var A=N[0];if(A!=null){var O=A.contentRect,C=O.width,_=O.height;h(C,_)}},S=new ResizeObserver(k);S.observe(g),a.current=S}},[t,h]);return x.useEffect(()=>()=>{var g=a.current;g!=null&&g.disconnect()},[h]),x.createElement(x.Fragment,null,x.createElement(Qu,{width:l.containerWidth,height:l.containerHeight}),x.createElement("div",ca({ref:p},e)))}),rQ=x.forwardRef((e,t)=>{var r=e.width,n=e.height,a=x.useState({containerWidth:eh(r),containerHeight:eh(n)}),s=Jf(a,2),u=s[0],l=s[1],f=x.useCallback((p,g)=>{l(v=>{var b=Math.round(p),j=Math.round(g);return v.containerWidth===b&&v.containerHeight===j?v:{containerWidth:b,containerHeight:j}})},[]),h=x.useCallback(p=>{if(typeof t=="function"&&t(p),p!=null){var g=p.getBoundingClientRect(),v=g.width,b=g.height;f(v,b)}},[t,f]);return x.createElement(x.Fragment,null,x.createElement(Qu,{width:u.containerWidth,height:u.containerHeight}),x.createElement("div",ca({ref:h},e)))}),nQ=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return x.createElement(x.Fragment,null,x.createElement(Qu,{width:r,height:n}),x.createElement("div",ca({ref:t},e)))}),iQ=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?x.createElement(rQ,ca({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?x.createElement(nQ,ca({},e,{width:r,height:n,ref:t})):x.createElement(x.Fragment,null,x.createElement(Qu,{width:r,height:n}),x.createElement("div",ca({ref:t},e)))});function aQ(e){return e?tQ:iQ}var oQ=x.forwardRef((e,t)=>{var r=e.children,n=e.className,a=e.height,s=e.onClick,u=e.onContextMenu,l=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,p=e.onMouseLeave,g=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,j=e.onTouchMove,k=e.onTouchStart,S=e.style,N=e.width,A=e.responsive,O=e.dispatchTouchEvents,C=O===void 0?!0:O,_=x.useRef(null),E=wt(),M=x.useState(null),U=Jf(M,2),W=U[0],V=U[1],Y=x.useState(null),R=Jf(Y,2),ce=R[0],Z=R[1],ve=Kq(),be=Sy(),pe=(be==null?void 0:be.width)>0?be.width:N,Q=(be==null?void 0:be.height)>0?be.height:a,ne=x.useCallback(_e=>{ve(_e),typeof t=="function"&&t(_e),V(_e),Z(_e),_e!=null&&(_.current=_e)},[ve,t,V,Z]),X=x.useCallback(_e=>{E(TO(_e)),E(Ur({handler:s,reactEvent:_e}))},[E,s]),$=x.useCallback(_e=>{E(qv(_e)),E(Ur({handler:h,reactEvent:_e}))},[E,h]),T=x.useCallback(_e=>{E(bC()),E(Ur({handler:p,reactEvent:_e}))},[E,p]),J=x.useCallback(_e=>{E(qv(_e)),E(Ur({handler:g,reactEvent:_e}))},[E,g]),oe=x.useCallback(()=>{E(FO())},[E]),ee=x.useCallback(()=>{E(BO())},[E]),ue=x.useCallback(_e=>{E(zO(_e.key))},[E]),he=x.useCallback(_e=>{E(Ur({handler:u,reactEvent:_e}))},[E,u]),Ce=x.useCallback(_e=>{E(Ur({handler:l,reactEvent:_e}))},[E,l]),F=x.useCallback(_e=>{E(Ur({handler:f,reactEvent:_e}))},[E,f]),se=x.useCallback(_e=>{E(Ur({handler:v,reactEvent:_e}))},[E,v]),Ne=x.useCallback(_e=>{E(Ur({handler:k,reactEvent:_e}))},[E,k]),ie=x.useCallback(_e=>{C&&E(HO(_e)),E(Ur({handler:j,reactEvent:_e}))},[E,C,j]),at=x.useCallback(_e=>{E(Ur({handler:b,reactEvent:_e}))},[E,b]),Be=aQ(A);return x.createElement(UC.Provider,{value:W},x.createElement(b4.Provider,{value:ce},x.createElement(Be,{width:pe??(S==null?void 0:S.width),height:Q??(S==null?void 0:S.height),className:Je("recharts-wrapper",n),style:Gq({position:"relative",cursor:"default",width:pe,height:Q},S),onClick:X,onContextMenu:he,onDoubleClick:Ce,onFocus:oe,onBlur:ee,onKeyDown:ue,onMouseDown:F,onMouseEnter:$,onMouseLeave:T,onMouseMove:J,onMouseUp:se,onTouchEnd:at,onTouchMove:ie,onTouchStart:Ne,ref:ne},x.createElement(eQ,null),r)))}),sQ=["width","height","responsive","children","className","style","compact","title","desc"];function lQ(e,t){if(e==null)return{};var r,n,a=uQ(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,a=e.responsive,s=e.children,u=e.className,l=e.style,f=e.compact,h=e.title,p=e.desc,g=lQ(e,sQ),v=hn(g);return f?x.createElement(x.Fragment,null,x.createElement(Qu,{width:r,height:n}),x.createElement(sN,{otherAttributes:v,title:h,desc:p},s)):x.createElement(oQ,{className:u,style:l,width:r,height:n,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},x.createElement(sN,{otherAttributes:v,title:h,desc:p,ref:t},x.createElement(cG,null,s)))});function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;tx.createElement(vQ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:yQ,tooltipPayloadSearcher:U7,categoricalChartProps:e,ref:t}));const fN=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}],bQ="rgba(130,130,150,0.14)",hN="rgba(130,130,150,0.85)";function wQ({active:e,payload:t}){return!e||!(t!=null&&t.length)?null:c.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:c.jsx("div",{className:"space-y-1",children:t.map(r=>c.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:r.color}}),c.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:r.name}),c.jsxs("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:[Math.round(r.value),"%"]})]},r.dataKey))})})}function jQ(){var p,g,v,b;const{data:e,dataUpdatedAt:t}=sh(3e3),[r,n]=x.useState([]);x.useEffect(()=>{e&&n(j=>{var k,S,N,A;return[...j,{t:Date.now(),cpu:((k=e.cpu)==null?void 0:k.percent)??0,ram:((S=e.ram)==null?void 0:S.percent)??0,gpu:((N=e.gpu)==null?void 0:N.busy_percent)??null,disk:((A=e.disk)==null?void 0:A.percent)??null}].slice(-40)})},[t]);const a=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),s=fN.filter(j=>j.key!=="gpu"||a),u=r.reduce((j,k)=>Math.max(j,k.cpu,k.ram,k.gpu??0,k.disk??0),0),l=Math.min(100,Math.max(25,Math.ceil(u*1.2/25)*25)),f={cpu:(p=e==null?void 0:e.cpu)==null?void 0:p.percent,ram:(g=e==null?void 0:e.ram)==null?void 0:g.percent,gpu:a?e.gpu.busy_percent:null,disk:(v=e==null?void 0:e.disk)==null?void 0:v.percent},h={cpu:(b=e==null?void 0:e.cpu)!=null&&b.cores?`${e.cpu.cores} Cores`:"",ram:e?`${yr(e.ram.used)}/${yr(e.ram.total)} GB`:"",gpu:a?`${yr(e.gpu.gtt_used)}/${yr(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${yr(e.disk.used)}/${yr(e.disk.total)} GB`:""};return c.jsxs("div",{className:"md:col-span-2 flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[c.jsx(Mr,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),c.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-1 flex flex-wrap gap-x-5 gap-y-1.5",children:s.map(j=>c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:j.color}}),c.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:j.label}),c.jsxs("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(f[j.key]??0),"%"]}),h[j.key]&&c.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/60",children:h[j.key]})]},j.key))}),c.jsx("div",{className:"h-44 w-full",children:c.jsx(fL,{width:"100%",height:"100%",children:c.jsxs(xQ,{data:r,margin:{top:8,right:6,bottom:0,left:-18},children:[c.jsx("defs",{children:fN.map(j=>c.jsxs("linearGradient",{id:`grad-${j.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:j.color,stopOpacity:.22}),c.jsx("stop",{offset:"100%",stopColor:j.color,stopOpacity:0})]},j.key))}),c.jsx(xO,{vertical:!1,stroke:bQ}),c.jsx(MO,{dataKey:"t",hide:!0}),c.jsx(IO,{domain:[0,l],ticks:[0,l/2,l],tickFormatter:j=>`${j}%`,width:34,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:hN}}),c.jsx(vW,{content:c.jsx(wQ,{}),cursor:{stroke:hN,strokeOpacity:.4,strokeDasharray:"3 3"}}),s.map(j=>c.jsx(OO,{type:"monotone",dataKey:j.key,name:j.label,stroke:j.color,strokeWidth:2,fill:`url(#grad-${j.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},j.key))]})})})]}):c.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&c.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&c.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&c.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}function qO({type:e,title:t,message:r,defaultValue:n,autoValue:a,autoLabel:s,onConfirm:u,onCancel:l}){const f=x.useRef(null);return c.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),c.jsx("button",{onClick:l||(()=>u()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r}),e==="prompt"&&c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{ref:f,type:"text",defaultValue:n,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var p;h.key==="Enter"&&u((p=f.current)==null?void 0:p.value)}}),a!==void 0&&c.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:s||"Auto"})]}),c.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&c.jsx("button",{onClick:l,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),c.jsx("button",{onClick:()=>{var p;const h=e==="prompt"?(p=f.current)==null?void 0:p.value:void 0;u(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function ko(){const[e,t]=x.useState(null),r=x.useCallback(()=>t(null),[]),n=x.useCallback((l,f,h)=>{t({type:"alert",title:l,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),a=x.useCallback((l,f,h,p)=>{t({type:"confirm",title:l,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),p==null||p()}})},[]),s=x.useCallback((l,f,h,p,g,v)=>{t({type:"prompt",title:l,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),p(b)},onCancel:()=>{t(null),g==null||g()}})},[]),u=e?c.jsx(qO,{...e}):null;return{showAlert:n,showConfirm:a,showPrompt:s,close:r,dialogElement:u}}function kQ(){var _;const e=pa(),{data:t}=sy(3e3),{data:r=[]}=P2(3e3),{showConfirm:n,dialogElement:a}=ko(),[s,u]=x.useState(""),[l,f]=x.useState(!1),[h,p]=x.useState(""),[g,v]=x.useState(!1),[b,j]=x.useState({open:!1,actionPath:"",actionLabel:""}),k=()=>{e.invalidateQueries({queryKey:mt.updates}),e.invalidateQueries({queryKey:mt.jobs}),e.invalidateQueries({queryKey:mt.models})};async function S(E,M,U,W){u(`${M} wird ausgeführt...`),f(!0);try{const V={...U},Y=await Pe(E,{method:"POST",body:JSON.stringify(V)});if(Y.status==="password_required"||Y.status==="incorrect_password"){j({open:!0,actionPath:E,actionLabel:M,payload:U,error:Y.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),u("");return}Y.job_id?u(`${M} gestartet (Job-ID: ${Y.job_id})`):Y.ok?u(`${M} erfolgreich ausgeführt.`):u(`Fehler: ${Y.err||"Unbekannter Fehler"}`),k()}catch(V){u(`Fehler bei ${M}: ${V.message}`)}finally{f(!1)}}async function N(){v(!0);try{const E={...b.payload,sudo_password:h},M=await Pe(b.actionPath,{method:"POST",body:JSON.stringify(E)});if(M.status==="password_required"||M.status==="incorrect_password"){j(U=>({...U,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}M.job_id?u(`${b.actionLabel} gestartet (Job-ID: ${M.job_id})`):M.ok?u(`${b.actionLabel} erfolgreich ausgeführt.`):u(`Fehler: ${M.err||"Unbekannter Fehler"}`),j({open:!1,actionPath:"",actionLabel:""}),p(""),k()}catch(E){u(`Fehler: ${E.message}`),j({open:!1,actionPath:"",actionLabel:""}),p("")}finally{v(!1)}}async function A(E,M){u(`Upgrade für ${E} wird gestartet...`);try{await Pe("/api/models/install",{method:"POST",body:JSON.stringify({repo:E,role:M,quant:"Q4_K_M",jinja:!0})}),u("Upgrade-Download gestartet."),k()}catch(U){u(`Upgrade fehlgeschlagen: ${U.message}`)}}const O=r.find(E=>E.label.includes("OS-Update")&&(E.state==="running"||E.state==="queued")),C=r.find(E=>E.label.includes("Engine-Update")&&(E.state==="running"||E.state==="queued"));return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[b.open&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:c.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/60 bg-card/90 backdrop-blur-xl p-5 shadow-2xl space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-space",children:"Sudo-Passwort erforderlich"}),c.jsx("button",{onClick:()=>{j({open:!1,actionPath:"",actionLabel:""}),p("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Für die Aktion ",c.jsx("strong",{children:b.actionLabel})," wird das Administrator-Passwort (Sudo) auf der Box benötigt."]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("input",{type:"password",value:h,onChange:E=>p(E.target.value),placeholder:"Sudo-Passwort eingeben...",className:"w-full 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",onKeyDown:E=>E.key==="Enter"&&N(),autoFocus:!0}),b.error&&c.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:b.error})]}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx("button",{onClick:()=>{j({open:!1,actionPath:"",actionLabel:""}),p("")},className:"h-8 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent transition-all cursor-pointer",children:"Abbrechen"}),c.jsx("button",{onClick:N,disabled:!h||g,className:"h-8 px-4 rounded-lg bg-primary text-primary-foreground text-[10px] font-bold uppercase hover:opacity-90 transition-all disabled:opacity-50 cursor-pointer flex items-center justify-center gap-1.5",children:g?"Prüfe...":"Ausführen"})]})]})}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 border-b border-border/20 pb-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(cI,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Updates & Pflege"})]}),(t==null?void 0:t.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground/80 font-mono",children:["Zuletzt gesucht: ",new Date(t.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),t?c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:de("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",t.os>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsx("span",{children:"OS-Pakete"}),c.jsx("span",{className:"font-mono",children:t.os>0?`${t.os} verfügbar`:"aktuell"})]}),c.jsxs("div",{className:de("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",t.engine>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsx("span",{children:"Engine (llama.cpp)"}),c.jsx("span",{className:"font-mono",children:t.engine>0?"Update verfügbar":"aktuell"})]}),c.jsxs("div",{className:de("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",t.models>0?"border-primary/30 bg-primary/5 text-primary font-semibold animate-pulse":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsx("span",{children:"Modell-Upgrades"}),c.jsx("span",{className:"font-mono",children:t.models>0?`${t.models} verfügbar`:"aktuell"})]}),(_=t.components)==null?void 0:_.map(E=>{const M=E.update===!0;return c.jsxs("div",{className:de("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",M?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[E.name,E.reachable===!1&&c.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),c.jsx("span",{className:"font-mono text-[10px]",title:E.current?`installiert: ${E.current}`:void 0,children:M?`Update: ${E.latest}`:E.update===!1?"aktuell":E.latest?`neueste: ${E.latest}`:"—"})]},E.key)})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[c.jsx("button",{onClick:()=>S("/api/maintenance/os-update","OS-Update"),disabled:l||!!O,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:O?c.jsxs(c.Fragment,{children:[c.jsx(no,{className:"h-3 w-3 animate-spin text-primary"}),c.jsxs("span",{children:["Aktiv (",O.progress??0,"%)"]})]}):c.jsx("span",{children:"OS Update"})}),c.jsx("button",{onClick:()=>S("/api/maintenance/engine-update","Engine-Update"),disabled:l||!!C,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:C?c.jsxs(c.Fragment,{children:[c.jsx(no,{className:"h-3 w-3 animate-spin text-primary"}),c.jsxs("span",{children:["Aktiv (",C.progress??0,"%)"]})]}):c.jsx("span",{children:"Engine Update"})})]}),c.jsxs("button",{onClick:()=>{n("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>S("/api/maintenance/reboot","Reboot"))},disabled:l,className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 text-red-400 text-[10px] font-bold uppercase hover:bg-red-500/10 transition-all cursor-pointer disabled:opacity-50",children:[c.jsx(KN,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Host Reboot"})]}),t.model_list.length>0&&c.jsxs("div",{className:"space-y-1.5 border-t border-border/20 pt-3",children:[c.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 tracking-wider",children:"Verfügbare Modell-Upgrades:"}),c.jsx("div",{className:"max-h-24 overflow-y-auto space-y-1.5 pr-1 scrollbar-thin",children:t.model_list.map(E=>c.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-background/25 border border-border/30 text-[10px] font-mono text-muted-foreground",children:[c.jsxs("span",{className:"truncate flex-1 mr-1.5",title:`${E.role}: ${E.repo}`,children:[c.jsx("span",{className:"text-primary font-bold uppercase",children:E.role}),": ",E.repo.split("/").pop()]}),c.jsxs("button",{onClick:()=>A(E.repo,E.role),className:"px-2 py-0.5 text-[8px] font-bold uppercase rounded bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer flex items-center gap-0.5",children:[c.jsx(da,{className:"h-2.5 w-2.5"})," Laden"]})]},E.repo))})]})]}):c.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),s&&c.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:s}),c.jsxs("div",{className:"text-[9px] text-muted-foreground/60 leading-normal border-t border-border/10 pt-2.5 flex items-start gap-1",children:[c.jsx(Os,{className:"h-3 w-3 shrink-0 text-muted-foreground/50 mt-0.5"}),c.jsxs("span",{children:["OS-Update & Reboot benötigen NOPASSWD in ",c.jsx("code",{children:"/etc/sudoers"})," (z.B. ",c.jsx("code",{children:"hitonabi ALL=(root) NOPASSWD:..."}),") oder ein gültiges Sudo-Passwort per Pop-up."]})]})]}),c.jsx("div",{className:"mt-4 border-t border-border/30 pt-3 shrink-0",children:c.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer")),className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer shadow-md shadow-primary/10",children:"System-Zentrale öffnen"})}),a]})}function SQ(){const e=pa(),{data:t}=C2(3e3),{data:r}=yo(),{showAlert:n,dialogElement:a}=ko(),[s,u]=x.useState(!1),l=(r==null?void 0:r.models)??[];async function f(h){try{await Pe("/api/agent/brain",{method:"POST",body:JSON.stringify({model:h})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${h}' geändert. Der Gateway-Dienst wurde neu gestartet.`),e.invalidateQueries({queryKey:mt.agentStatus}),u(!1)}catch(p){n("Fehler",`Fehler beim Wechseln des Gehirns: ${p.message}`)}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Cs,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(t==null?void 0:t.webui_url)&&c.jsxs("a",{href:ju(t.webui_url),target:"_blank",rel:"noopener",className:de("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",t.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[c.jsx(nf,{className:"h-3 w-3"})," AnythingLLM öffnen"]})]}),t?c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full",t.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.gateway_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"AnythingLLM"}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full",t.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-medium",children:t.webui_reachable?"Online":"Offline"})]})]}),c.jsxs("div",{onClick:()=>u(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),c.jsx(Mr,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[c.jsx(vu,{className:"h-3 w-3 shrink-0"}),t.brain_model||"auto"]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),c.jsx(xu,{className:"h-3 w-3 text-primary"})]}),c.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[c.jsxs("div",{children:["Config: ",t.has_config?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Skills: ",t.has_skills?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),c.jsxs("div",{children:["Memory: ",t.has_memories?c.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):c.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),t&&c.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"Telegram"}),c.jsx("span",{className:de("font-semibold",t.telegram_enabled?"text-emerald-400":""),children:t.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"MCP-Server"}),c.jsxs("span",{className:"font-semibold text-foreground",children:[t.mcp_server_count??0," verbunden"]})]}),c.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[c.jsx("span",{children:"PC Executor"}),c.jsx("span",{className:de("font-semibold",t.pc_executor_reachable?"text-emerald-400":""),children:t.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),t&&s&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(Mr,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>u(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...l.map(h=>{var p;return((p=h.name.split("/").pop())==null?void 0:p.replace(".gguf",""))||h.name})].map(h=>{const p=["auto","fast","heavy"].includes(h);return c.jsxs("button",{onClick:()=>f(h),className:de("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",t.brain_model===h||!t.brain_model&&h==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:h}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(t.brain_model===h||!t.brain_model&&h==="auto")&&c.jsx(On,{className:"h-4 w-4 shrink-0 text-primary"})]},h)})})]})}),a]})}function NQ(){const{data:e}=yo(3e3),t=(e==null?void 0:e.models)??[],r=(e==null?void 0:e.running)??[];return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(vu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),c.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:L2.map(n=>{var u;const a=t.find(l=>l.role===n),s=a?r.includes(a.name):!1;return c.jsxs("div",{className:de("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",s?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":a?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[c.jsx("div",{className:"min-w-0 flex-1 mr-2",children:c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("span",{className:de("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",uy(n)),children:n}),c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:a?(u=a.name.split("/").pop())==null?void 0:u.replace(/\.gguf$/i,""):"nicht zugewiesen"}),a&&c.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[a.prompt_cache&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),a.spec_active&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${a.spec_draft_model})`,children:"SPEC"}),a.parallel_slots>1&&c.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${a.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",a.parallel_slots]}),a.incomplete&&c.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),c.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a?s?c.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):c.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},n)})})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function EQ(){const e=pa(),{data:t=[]}=_2({limit:3}),[r,n]=x.useState(""),[a,s]=x.useState("stable"),[u,l]=x.useState(!1);async function f(){if(!(!r.trim()||u)){l(!0);try{await Pe("/api/memory",{method:"POST",body:JSON.stringify({content:r,category:a,source:"dashboard"})}),n(""),e.invalidateQueries({queryKey:["memory"]})}catch(h){console.error(h)}finally{l(!1)}}}return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(gu,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("textarea",{value:r,onChange:h=>n(h.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),c.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[c.jsxs("select",{value:a,onChange:h=>s(h.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[c.jsx("option",{value:"stable",children:"🔵 Fakt"}),c.jsx("option",{value:"instruction",children:"📋 Regel"}),c.jsx("option",{value:"user",children:"👤 User"}),c.jsx("option",{value:"versioned",children:"🟡 Version"})]}),c.jsxs("button",{onClick:f,disabled:!r.trim()||u,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[c.jsx(HN,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),c.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[c.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),c.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:t.length===0?c.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):t.map(h=>c.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[c.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:h.category}),c.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:h.content,children:h.content})]},h.id))})]})]}),c.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}function PQ(){var t;const{data:e}=A2(3e3);return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(QM,{className:"h-4.5 w-4.5 text-primary animate-pulse"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Effizienz & Ersparnis"})]}),e?c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Geld gespart"}),c.jsxs("div",{className:"text-base font-bold text-emerald-400 mt-0.5 tracking-tight font-space",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," €"]}),c.jsxs("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:["(",e.saved_usd.toLocaleString("en-US",{minimumFractionDigits:2})," $)"]})]}),c.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Gesamt-Tokens"}),c.jsx("div",{className:"text-base font-bold text-primary mt-0.5 tracking-tight font-space",children:e.total_tokens.toLocaleString("de-DE")}),c.jsx("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:"(Lokale Inferenz)"})]})]}),c.jsxs("div",{className:"space-y-2 border-t border-border/20 pt-3 text-[10px] text-muted-foreground",children:[c.jsxs("div",{className:"flex justify-between items-center font-mono",children:[c.jsx("span",{children:"Input (Prompts):"}),c.jsxs("span",{className:"font-semibold text-foreground",children:[e.prompt_tokens.toLocaleString("de-DE")," tkn"]})]}),c.jsxs("div",{className:"flex justify-between items-center font-mono",children:[c.jsx("span",{children:"Output (Antworten):"}),c.jsxs("span",{className:"font-semibold text-foreground",children:[e.completion_tokens.toLocaleString("de-DE")," tkn"]})]})]})]}):c.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Statistiken…"})]}),c.jsxs("div",{className:"mt-4 text-[9px] text-muted-foreground/70 border-t border-border/30 pt-2.5 leading-normal",children:["Berechnet ggü. Cloud-APIs",(t=e==null?void 0:e.pricing)!=null&&t.heavy?` (Ø ${(e.pricing.heavy.in??0).toFixed(2).replace(".",",")} $ / ${(e.pricing.heavy.out??0).toFixed(2).replace(".",",")} $ pro 1M tkn).`:"."]})]})}function AQ(){return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),c.jsx(u4,{}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[c.jsx(jQ,{}),c.jsx(kQ,{})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:[c.jsx(SQ,{}),c.jsx(NQ,{}),c.jsx(EQ,{}),c.jsx(PQ,{})]})]})}function CQ(){const e=pa(),{data:t=[]}=P2(2e3),{showAlert:r,dialogElement:n}=ko();async function a(l){try{await Pe(`/api/jobs/${l}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:mt.jobs})}catch(f){r("Fehler",f.message)}}const s=t.filter(l=>l.state==="running"||l.state==="queued"),u=t.filter(l=>l.state!=="running"&&l.state!=="queued").slice(-3);return s.length===0&&u.length===0?null:c.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),s.map(l=>c.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[c.jsxs("div",{className:"flex justify-between items-center text-xs",children:[c.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:l.label}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-muted-foreground font-mono",children:[l.progress??0,"% • ",ev(l.done_bytes),"/",ev(l.total_bytes),l.eta_s?` • ETA ${AT(l.eta_s)}`:""]}),c.jsx("button",{onClick:()=>a(l.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),c.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:c.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${l.progress??0}%`}})})]},l.id)),u.map(l=>c.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[c.jsx("span",{className:"truncate",children:l.label}),c.jsx("span",{className:de("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",l.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:l.state})]},l.id)),n]})}function La({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function pN({caps:e}){return e?c.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&c.jsx(La,{children:"💻 Code"}),e.vision&&c.jsx(La,{children:"👁 Bild"}),e.reasoning&&c.jsx(La,{children:"🧠 Reason"}),e.moe&&c.jsxs(La,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&c.jsx(La,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&c.jsx(La,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&c.jsx(La,{children:"🔢 Embed"})]}):null}function OQ({model:e,onClose:t,onChanged:r}){var k,S;const{data:n,isLoading:a}=PT(e.gguf_path),[s,u]=x.useState(null),[l,f]=x.useState(""),h=n==null?void 0:n.target_vocab,p=(n==null?void 0:n.drafts)??[],g=p.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){u(N??"__clear__"),f("");try{await Pe(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(A){f(String((A==null?void 0:A.message)||A)),u(null)}}const j=N=>{var A;return N?`${N.pre??"?"} · ${((A=N.n_vocab)==null?void 0:A.toLocaleString())??"?"} Tokens`:"—"};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[c.jsx(cs,{className:"h-4 w-4"})," Speculative Draft"]}),c.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',c.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),c.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:(k=e.name.split("/").pop())==null?void 0:k.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-foreground",children:["Vocab: ",j(h)]})]}),e.spec_active&&v&&c.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[c.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[c.jsx(On,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),c.jsx("button",{onClick:()=>b(null),disabled:s!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[c.jsx(yu,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),c.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:a?c.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):p.length===0?c.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",c.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):p.map(N=>{var C,_;const A=N.filename===v,O=N.compatible===!0;return c.jsxs("div",{className:de("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",O?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",A&&"border-primary/40 bg-primary/10"),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:N.filename}),c.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Wr(N.size_bytes)," · Vocab: ",j(N.vocab)]})]}),O?A?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[c.jsx(On,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("button",{onClick:()=>b(N.path),disabled:s!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):c.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(C=N.vocab)==null?void 0:C.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[c.jsx(yu,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!a&&(n==null?void 0:n.target_exists)&&p.length>0&&g.length===0&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",c.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",c.jsx("span",{className:"font-mono",children:(S=h==null?void 0:h.n_vocab)==null?void 0:S.toLocaleString()}),")."]}),l&&c.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:l})]})})}function _Q(){var No,xa,il,ki,Si,lc,al,ol;const e=pa(),{data:t,isLoading:r,error:n}=yo(4e3),{data:a}=ST(4e3),{data:s}=O2(),{data:u}=sy(4e3),{data:l}=NT(),{data:f}=sh(),{showAlert:h,showConfirm:p,showPrompt:g,dialogElement:v}=ko(),b=(t==null?void 0:t.models)??[],j=(t==null?void 0:t.running)??[],k=n?String(n):"",S=()=>{e.invalidateQueries({queryKey:mt.models}),e.invalidateQueries({queryKey:mt.routing})},[N,A]=x.useState(null),[O,C]=x.useState(null),[_,E]=x.useState(null),[M,U]=x.useState(null),[W,V]=x.useState(!1),[Y,R]=x.useState(!1),[ce,Z]=x.useState(null),[ve,be]=x.useState("grid"),[pe,Q]=x.useState("all"),ne=b.filter(B=>pe==="in_use"?!!B.role||j.includes(B.name):!0),[X,$]=x.useState({width:800,height:360}),T=x.useRef(null),J=x.useCallback(B=>{if(T.current&&(T.current.disconnect(),T.current=null),B){const fe=new ResizeObserver(Ee=>{if(!Ee||Ee.length===0)return;const Le=Ee[0].contentRect;$({width:Le.width,height:Le.height})});fe.observe(B),T.current=fe}},[]),oe=X.width,ee=X.height,ue=B=>{const fe=oe*.1,Ee=ee*B,Le=oe*.5,Ve=ee*.5,qt=oe*.3,Xe=Ee,gt=oe*.3;return`M ${fe} ${Ee} C ${qt} ${Xe}, ${gt} ${Ve}, ${Le} ${Ve}`},he=B=>{const fe=oe*.5,Ee=ee*.5,Le=oe*.9,Ve=ee*B,qt=oe*.7,Xe=Ee,gt=oe*.7;return`M ${fe} ${Ee} C ${qt} ${Xe}, ${gt} ${Ve}, ${Le} ${Ve}`};async function Ce(B){try{await Pe(`/api/models/${encodeURIComponent(B)}/load`,{method:"POST"}),S()}catch(fe){h("Fehler",`Fehler beim Laden des Modells: ${fe.message}`)}}async function F(B){try{await Pe(`/api/models/${encodeURIComponent(B)}/unload`,{method:"POST"}),S()}catch(fe){h("Fehler",`Fehler beim Entladen des Modells: ${fe.message}`)}}async function se(){try{await Pe("/api/models/unload",{method:"POST"}),S()}catch(B){h("Fehler",`Fehler beim Entladen aller Modelle: ${B.message}`)}}async function Ne(B,fe){try{await Pe(`/api/models/${encodeURIComponent(fe)}/role`,{method:"POST",body:JSON.stringify({role:B||null})}),S()}catch(Ee){h("Fehler",`Fehler beim Zuweisen der Rolle: ${Ee.message||Ee}`)}}function ie(B){C(B),E(null),Pe(`/api/roles/${encodeURIComponent(B)}/recommend`).then(fe=>E(fe)).catch(()=>{})}async function at(B,fe){let Ee=null;try{Ee=await Pe(`/api/models/${encodeURIComponent(B)}/ctx/auto`)}catch{}const Le=Ee?`Optimal für dein Setup: ${(Ee.ctx/1024).toFixed(0)}k (${Ee.ctx}) — GTT ${Ee.gtt_gb} GB − reserviert ${Ee.reserved_gb} GB (${Ee.mode}) → ${Ee.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";g("Kontextlänge anpassen",Le,String(fe||32768),async Ve=>{if(Ve)try{await Pe(`/api/models/${encodeURIComponent(B)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Ve,10)})}),S()}catch(qt){h("Fehler",`Fehler beim Setzen des Kontexts: ${qt.message||qt}`)}},void 0,Ee?{autoValue:String(Ee.ctx),autoLabel:`Auto (${(Ee.ctx/1024).toFixed(0)}k)`}:void 0)}async function Be(B){p("Modell löschen?",`Modell '${B}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await Pe(`/api/models/${encodeURIComponent(B)}`,{method:"DELETE"}),S()}catch(fe){h("Fehler",`Fehler beim Löschen: ${fe.message||fe}`)}})}async function _e(B,fe,Ee,Le){try{await Pe("/api/models/install",{method:"POST",body:JSON.stringify({repo:B,role:fe,quant:Ee,jinja:Le})}),h("Herunterladen gestartet",`Download für '${B}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Ve){h("Fehler",`Fehler beim Starten des Upgrades: ${Ve.message||Ve}`)}}async function At(B){const fe=l==null?void 0:l.budget,Ee=fe&&!fe.fits?` + +⚠ Speicher-Warnung: Dieses Brain (~${fe.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${fe.largest_ondemand_gb} GB) sprengt das das Budget (${fe.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";p("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${B.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Ee}`,async()=>{try{await Pe("/api/models/install",{method:"POST",body:JSON.stringify({repo:B,role:"hermes",quant:"Q4_K_M",jinja:!0})}),h("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),S()}catch(Le){h("Fehler",`Update fehlgeschlagen: ${Le.message||Le}`)}})}async function kr(B){p("Agent-Hirn wechseln?",`'${B.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await Pe("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:B})}),h("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),V(!1),S()}catch(fe){h("Fehler",`Wechsel fehlgeschlagen: ${fe.message||fe}`)}})}async function va(B){B&&(await navigator.clipboard.writeText(B),R(!0),setTimeout(()=>R(!1),1500))}if(r)return c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(k)return c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",k,")."]});const ya=b.filter(B=>j.includes(B.name)),Un=ya.reduce((B,fe)=>B+(fe.size_bytes||0),0),Wn=((No=f==null?void 0:f.gpu)==null?void 0:No.gtt_total)||((xa=f==null?void 0:f.gpu)==null?void 0:xa.vram_total)||0,So=((il=f==null?void 0:f.gpu)==null?void 0:il.gtt_used)||0,tl=16*1024**3,rl=Wn>2*1024**3?Wn:Un>tl?Un*1.2:tl,nl=B=>b.find(fe=>fe.role===B),ji=B=>{const fe=nl(B);return fe?j.includes(fe.name):!1};return c.jsxs("div",{className:"space-y-8",children:[c.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Gd,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Wr(Un)," Gewichte",So>0?` · ${Wr(So)} real belegt (inkl. KV)`:""," / ",Wr(rl)]}),j.length>0&&c.jsx("button",{onClick:se,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),c.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:ya.length===0?c.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):ya.map((B,fe)=>{var Ve;const Ee=(B.size_bytes||0)/rl*100,Le=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][fe%4];return c.jsxs("div",{style:{width:`${Ee}%`},className:de("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",Le),title:`${B.name} (${Wr(B.size_bytes)})`,children:[c.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[B.role?`[${B.role}] `:"",(Ve=B.name.split("/").pop())==null?void 0:Ve.replace(".gguf","")]}),c.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Wr(B.size_bytes)})]},B.name)})})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),c.jsxs("div",{ref:J,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:ue(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ce==="roocode"||N==="roocode")&&c.jsx("path",{d:ue(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ce==="cursor"||N==="cursor")&&c.jsx("path",{d:ue(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ce==="opencode"||N==="opencode")&&c.jsx("path",{d:ue(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ce==="zed"||N==="zed")&&c.jsx("path",{d:ue(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:ue(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(ce==="continue"||N==="continue")&&c.jsx("path",{d:ue(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:he(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ji("fast")&&c.jsx("path",{d:he(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:he(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ji("heavy")&&c.jsx("path",{d:he(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:he(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ji("coder")&&c.jsx("path",{d:he(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:he(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ji("vision")&&c.jsx("path",{d:he(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:he(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),ji("scout")&&c.jsx("path",{d:he(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>Z("roocode"),onMouseLeave:()=>Z(null),onClick:()=>A(B=>B==="roocode"?null:"roocode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Roo Code"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>Z("cursor"),onMouseLeave:()=>Z(null),onClick:()=>A(B=>B==="cursor"?null:"cursor"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Cursor IDE"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>Z("opencode"),onMouseLeave:()=>Z(null),onClick:()=>A(B=>B==="opencode"?null:"opencode"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"OpenCode"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>Z("zed"),onMouseLeave:()=>Z(null),onClick:()=>A(B=>B==="zed"?null:"zed"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Zed"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>Z("continue"),onMouseLeave:()=>Z(null),onClick:()=>A(B=>B==="continue"?null:"continue"),children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),c.jsx("span",{children:"Continue"})]}),c.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[c.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",a!=null&&a.heavy_threshold_chars?a.heavy_threshold_chars/1e3:"4","k Zeichen"]}),c.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),L2.map(B=>{var qt;const fe=["12%","31%","50%","69%","88%"],Ee=nl(B),Le=Ee?j.includes(Ee.name):!1;if(B==="agent")return null;const Ve={fast:0,heavy:1,coder:2,vision:3,scout:4}[B];return c.jsxs("div",{className:de("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",Le?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":Ee?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:fe[Ve]},onClick:()=>ie(B),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:B}),Le&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:Ee?(qt=Ee.name.split("/").pop())==null?void 0:qt.replace(".gguf",""):"Keine Zuweisung"})]},B)}),N&&s&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[N==="roocode"&&"Roo Code Setup",N==="cursor"&&"Cursor Setup",N==="opencode"&&"OpenCode Setup",N==="zed"&&"Zed Setup",N==="continue"&&"Continue Setup"]}),c.jsx("button",{onClick:()=>A(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[N==="roocode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),c.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",c.jsx("strong",{children:"OpenAI Compatible"}),"."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",c.jsx("code",{children:"settings.json"})," ein."]})]}),N==="cursor"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne Cursor Settings ➔ ",c.jsx("strong",{children:"Models"}),"."]}),c.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",c.jsx("strong",{children:"OpenAI API"})," auf."]}),c.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",c.jsx("strong",{children:"auto"}),"."]})]}),N==="opencode"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die ",c.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),c.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",c.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),N==="zed"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsxs("li",{children:["Öffne die Zed Settings (",c.jsx("code",{children:"ctrl+,"}),")."]}),c.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",c.jsx("code",{children:"language_models"})," ein."]})]}),N==="continue"&&c.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[c.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),c.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",c.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),s.tools&&c.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),c.jsxs("button",{onClick:()=>{var B,fe,Ee,Le,Ve;return va(N==="roocode"?(B=s.tools.cline)==null?void 0:B.snippet:N==="cursor"?(fe=s.tools.cursor)==null?void 0:fe.snippet:N==="opencode"?(Ee=s.tools.opencode)==null?void 0:Ee.snippet:N==="zed"?(Le=s.tools.zed)==null?void 0:Le.snippet:(Ve=s.tools.continue)==null?void 0:Ve.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[Y?c.jsx(On,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(WN,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:Y?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:c.jsxs("code",{children:[N==="roocode"&&((ki=s.tools.cline)==null?void 0:ki.snippet),N==="cursor"&&((Si=s.tools.cursor)==null?void 0:Si.snippet),N==="opencode"&&((lc=s.tools.opencode)==null?void 0:lc.snippet),N==="zed"&&((al=s.tools.zed)==null?void 0:al.snippet),N==="continue"&&((ol=s.tools.continue)==null?void 0:ol.snippet)]})})]}),c.jsx("button",{onClick:()=>A(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),c.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(B=>{var Le;const fe=b.find(Ve=>Ve.role===B),Ee=fe?j.includes(fe.name):!1;return c.jsxs("div",{onClick:()=>ie(B),className:de("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]",Ee?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":fe?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:de("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",uy(B)),children:B}),Ee&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:fe==null?void 0:fe.name,children:fe?(Le=fe.name.split("/").pop())==null?void 0:Le.replace(/\.gguf$/i,""):"nicht zugewiesen"}),c.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},B)})})]}),(l==null?void 0:l.current)&&c.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[c.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Cs,{className:"h-4.5 w-4.5 text-indigo-400"}),c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),l.current.version!=null&&c.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",l.current.version]})]}),c.jsx("button",{onClick:()=>V(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:l.current.name,children:l.current.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsx("span",{children:l.current.params_b?`${l.current.params_b}B`:"—"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:l.current.quant||"GGUF"}),c.jsx("span",{children:"•"}),c.jsx("span",{children:Wr(l.current.size_bytes||0)})]})]}),l.update_available&&l.recommended?c.jsxs("button",{onClick:()=>At(l.recommended.repo),className:de("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",l.budget&&!l.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[c.jsx(da,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):c.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[c.jsx(On,{className:"h-4 w-4"})," Neueste Generation"]})]}),l.update_available&&l.recommended&&c.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",c.jsx("span",{className:"font-mono font-bold",children:l.recommended.name.replace(/-GGUF$/i,"")}),"(v",l.recommended.version,", ",l.recommended.params_b,"B) — von NousResearch."]}),l.budget&&c.jsxs("div",{className:de("text-[10px] flex items-start gap-1.5 leading-relaxed",l.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[c.jsx(Gd,{className:"h-3 w-3 shrink-0 mt-0.5"}),c.jsxs("span",{children:["Always-On-Brain ~",l.budget.brain_gb," GB + größtes on-demand (~",l.budget.largest_ondemand_gb," GB) = ",(l.budget.brain_gb+l.budget.largest_ondemand_gb).toFixed(1)," / ",l.budget.gtt_gb," GB",l.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[c.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",ne.length," von ",b.length,")"]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>Q("all"),className:de("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"}),c.jsx("button",{onClick:()=>Q("in_use"),className:de("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"})]}),c.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[c.jsx("button",{onClick:()=>be("grid"),className:de("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"}),c.jsx("button",{onClick:()=>be("list"),className:de("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"?c.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:ne.length===0?c.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ne.map(B=>{const fe=j.includes(B.name),Ee=u==null?void 0:u.model_list.find(Ve=>Ve.role===B.role),Le=dw(B.name);return c.jsxs("div",{className:de("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",fe?"border-primary/45 shadow-primary/5":B.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"flex items-start justify-between gap-3",children:c.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[c.jsx("div",{className:de("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Le.color),title:Le.name,children:Le.initial}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:B.name,children:B.name.split("/").pop()}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:B.quant||"GGUF"}),fe&&c.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[c.jsx(mu,{className:"h-3 w-3 animate-pulse"})," Warm"]}),B.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:B.role}),B.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),B.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${B.spec_draft_model})`,children:"SPEC"}):B.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${B.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,B.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${B.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",B.parallel_slots]}),B.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),c.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:c.jsx(pN,{caps:B.capabilities})})]}),c.jsxs("div",{className:"space-y-3 pt-1",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(Gd,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),c.jsx("div",{className:"text-foreground font-semibold",children:Wr(B.size_bytes)})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[c.jsx(aI,{className:"h-3.5 w-3.5 text-primary/80"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),c.jsx("div",{className:"text-foreground font-semibold",children:lw(B.ctx)})]})]})]}),Ee&&c.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),c.jsxs("span",{children:["Upgrade verfügbar: ",Ee.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>_e(Ee.repo,B.role,B.quant||"Q4_K_M",B.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[c.jsx(da,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[c.jsx("button",{onClick:()=>fe?F(B.name):Ce(B.name),disabled:B.incomplete&&!fe,className:de("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",B.incomplete&&!fe?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":fe?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:fe?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>at(B.name,B.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>U(B),className:de("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",B.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":B.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(cs,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Be(B.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:c.jsx(qg,{className:"h-3.5 w-3.5"})})]})]})]},B.name)})}):c.jsx("div",{className:"space-y-2",children:ne.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ne.map(B=>{const fe=j.includes(B.name),Ee=dw(B.name);return c.jsxs("div",{className:de("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",fe?"border-primary/45":B.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[c.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[c.jsx("div",{className:de("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ee.color),title:Ee.name,children:Ee.initial}),c.jsxs("div",{className:"min-w-0 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:B.name,children:B.name.split("/").pop()}),B.role&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:B.role}),B.prompt_cache&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),B.spec_active?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${B.spec_draft_model})`,children:"SPEC"}):B.spec_draft_model?c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${B.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,B.parallel_slots>1&&c.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${B.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",B.parallel_slots]}),B.incomplete&&c.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),fe&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[c.jsxs("span",{children:["Größe: ",Wr(B.size_bytes)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Kontext: ",lw(B.ctx)]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:"font-mono text-[9px]",children:B.quant||"GGUF"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[c.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:c.jsx(pN,{caps:B.capabilities})}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("button",{onClick:()=>fe?F(B.name):Ce(B.name),disabled:B.incomplete&&!fe,className:de("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",B.incomplete&&!fe?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":fe?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:fe?"Entladen":"Laden"}),c.jsx("button",{onClick:()=>at(B.name,B.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),c.jsxs("button",{onClick:()=>U(B),className:de("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",B.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":B.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[c.jsx(cs,{className:"h-3 w-3"})," Spec"]}),c.jsx("button",{onClick:()=>Be(B.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:c.jsx(qg,{className:"h-3.5 w-3.5"})})]})]})]},B.name)})})]}),O&&(()=>{var Ve,qt;const B=_&&_.role===O?_:null,fe={};B==null||B.models.forEach(Xe=>{fe[Xe.name]=Xe});const Ee=B?B.models.map(Xe=>b.find(gt=>gt.name===Xe.name)).filter(Boolean):b,Le=Xe=>{Ne(O,Xe),C(null)};return c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",O,"' konfigurieren"]}),c.jsx("button",{onClick:()=>C(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für die Rolle ",c.jsx("strong",{className:"text-foreground",children:O}),":"]}),(B==null?void 0:B.recommended)&&c.jsxs("button",{onClick:()=>Le(B.recommended),title:(Ve=fe[B.recommended])==null?void 0:Ve.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[c.jsx(cs,{className:"h-3 w-3"})," Auto: ",(qt=B.recommended.split("/").pop())==null?void 0:qt.replace(/\.gguf$/i,"")]})]}),c.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[c.jsx("button",{onClick:()=>Le(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:c.jsx("span",{children:"Zuweisung entfernen"})}),Ee.map(Xe=>{var ll;const gt=fe[Xe.name],ba=Xe.role===O,sl=!!(gt!=null&>.recommended),uc=!!gt&&!gt.suitable;return c.jsxs("button",{onClick:()=>Le(Xe.name),className:de("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",sl?"border-primary/50 bg-primary/10":ba?"text-primary font-bold bg-primary/5 border-primary/30":uc?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[c.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[c.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(ll=Xe.name.split("/").pop())==null?void 0:ll.replace(/\.gguf$/i,""),sl&&c.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:gt?`${gt.params_b}B · ${Xe.quant} · ${gt.reason}`:`${Wr(Xe.size_bytes)} · ${Xe.quant}`})]}),ba&&c.jsx(On,{className:"h-4 w-4 shrink-0 text-primary"})]},Xe.name)})]})]})})})(),M&&c.jsx(OQ,{model:M,onClose:()=>U(null),onChanged:S}),W&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(Cs,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),c.jsx("button",{onClick:()=>V(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",c.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",c.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),c.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:b.map(B=>{var Ee;const fe=B.role==="hermes";return c.jsxs("button",{onClick:()=>!fe&&kr(B.name),disabled:fe||B.incomplete,className:de("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",fe?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":B.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(Ee=B.name.split("/").pop())==null?void 0:Ee.replace(/\.gguf$/i,"")}),c.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[B.capabilities.params_b?`${B.capabilities.params_b}B`:"?"," · ",Wr(B.size_bytes),B.role&&` · Rolle: ${B.role}`,B.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),fe?c.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[c.jsx(On,{className:"h-3.5 w-3.5"})," Aktiv"]}):c.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},B.name)})}),c.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[c.jsx("span",{children:"💡"}),c.jsxs("span",{children:["Für einen ",c.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),v]})}function MQ(){const[e,t]=x.useState(""),[r,n]=x.useState([]),[a,s]=x.useState("Q4_K_M"),[u,l]=x.useState(""),[f,h]=x.useState(""),[p,g]=x.useState(""),[v,b]=x.useState([]),[j,k]=x.useState(null),[S,N]=x.useState(!1),A=["fast","heavy","coder","vision","scout"],{data:O}=yo(),C=f?O==null?void 0:O.models.find(R=>(R.role||"").toLowerCase()===f):void 0;async function _(R,ce,Z){if(N(!1),!R.trim()){k(null);return}try{const ve=await Pe(`/api/fit?params_b=0&quant=${encodeURIComponent(ce)}&ctx=8192&name=${encodeURIComponent(R)}&role=${encodeURIComponent(Z)}`);k(ve)}catch{k(null)}}async function E(R){const ce=R??e;if(ce.trim()){l("Analysiere HuggingFace Repository..."),k(null);try{const Z=await Pe(`/api/hf/quants?repo=${encodeURIComponent(ce)}`);t(Z.repo),n(Z.quants);const ve=Z.quants.length?Z.quants.includes("Q4_K_M")?"Q4_K_M":Z.quants[0]:a;Z.quants.length&&s(ve),l(Z.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),Z.quants.length&&_(Z.repo,ve,f)}catch(Z){l(`Fehler: ${Z}`)}}}function M(R){s(R),_(e,R,f)}function U(R){h(R),r.length&&_(e,a,R)}async function W(){if(p.trim()){l("Durchsuche HuggingFace...");try{const R=await Pe(`/api/hf/search?q=${encodeURIComponent(p)}`);b(R.results),l(R.results.length?"":"Keine Ergebnisse gefunden.")}catch(R){l(`Suche fehlgeschlagen: ${R}`)}}}async function V(){if(e.trim()){if((j==null?void 0:j.fit.level)==="too_tight"&&!S){N(!0);return}l("Download-Job wird initiiert...");try{await Pe("/api/models/install",{method:"POST",body:JSON.stringify({repo:e,quant:a,role:f||void 0,jinja:!0})}),N(!1),l(`Download gestartet: ${e} (${a})${f?`, Rolle: ${f}`:""}. Fortschritt oben.`+(C?` „${f}" wurde von ${C.name} übernommen.`:"")+(f==="fast"||f==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(R){l(`Download-Fehler: ${R}`)}}}const Y=(j==null?void 0:j.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(j==null?void 0:j.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return c.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),c.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[c.jsx("input",{value:e,onChange:R=>{t(R.target.value),k(null),N(!1)},placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{onClick:()=>E(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),r.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("select",{value:a,onChange:R=>M(R.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:r.map(R=>c.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))}),c.jsxs("select",{value:f,onChange:R=>U(R.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[c.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),A.map(R=>c.jsx("option",{value:R,className:"bg-popover text-foreground",children:R},R))]}),c.jsx("button",{onClick:V,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${S?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:S?c.jsxs(c.Fragment,{children:[c.jsx(yu,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):c.jsxs(c.Fragment,{children:[c.jsx(da,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),j&&c.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${Y}`,children:[c.jsx("span",{className:"font-bold uppercase tracking-wide",children:j.fit.text}),c.jsxs("span",{className:"font-mono opacity-90",children:["~",j.params_b,"B · ~",j.fit.req_gb," GB / ",j.sys_ram_gb," GB RAM · ~",j.fit.tps," t/s"]}),j.fit.level!=="too_tight"&&c.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${j.budget.gtt_gb} GB − reserviert ${j.budget.reserved_gb} GB (${j.budget.mode}) → ${j.budget.budget_gb} GB frei`,children:["ctx → ",(j.assigned_ctx/1024).toFixed(0),"k"]}),j.fit.level==="too_tight"&&c.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),C&&c.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] font-medium text-amber-400",children:[c.jsx(yu,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),c.jsxs("span",{children:["Rolle ",c.jsxs("strong",{children:["„",f,'"']})," ist aktuell ",c.jsx("strong",{children:C.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",C.name," bleibt installiert, verliert sie aber."]})]}),c.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:p,onChange:R=>g(R.target.value),onKeyDown:R=>R.key==="Enter"&&W(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(ry,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsx("button",{onClick:W,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),v.length>0&&c.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:v.map(R=>c.jsxs("button",{onClick:()=>{t(R.repo),b([]),g(""),E(R.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[c.jsx("span",{className:"font-semibold truncate",children:R.repo}),c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[c.jsx(da,{className:"h-3 w-3"})," ",R.downloads.toLocaleString()]})]},R.repo))}),u&&c.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:u})]})}const IQ={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:cs},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:gu},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Kg},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Vg},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:Gg}};function TQ(){const{data:e,isLoading:t,error:r}=ET(),{data:n}=yo(),{data:a}=sy(),s=(n==null?void 0:n.models)??[],u=r?String(r):"",[l,f]=x.useState({}),[h,p]=x.useState({}),[g,v]=x.useState(!1);async function b(j,k,S,N){f(A=>({...A,[j]:"Starte..."}));try{await Pe("/api/models/install",{method:"POST",body:JSON.stringify({repo:j,role:k,quant:S,jinja:N})}),f(A=>({...A,[j]:"Download läuft"}))}catch{f(O=>({...O,[j]:"Fehler"}))}}return t?c.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):u||!e?c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",u,")."]}):c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[c.jsxs("div",{children:["Modell-Registry geladen für ",c.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(GN,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),c.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),c.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(j=>{const k=IQ[j.role]||{title:j.title||j.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:vu},S=k.icon,N=s.find(M=>M.role===j.role),A=a==null?void 0:a.model_list.find(M=>M.role===j.role),O=j.models.find(M=>M.repo===j.recommended)||j.models[0];if(!O)return null;const C=l[O.repo],_=j.models.filter(M=>M.repo!==j.recommended),E=!!h[j.role];return c.jsxs("div",{className:de("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:c.jsx(S,{className:"h-5.5 w-5.5"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:k.title}),c.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",j.role]})]})]}),N?c.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):c.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:k.desc}),c.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[c.jsxs("span",{children:["Größe: ",ev(N.size_bytes||0)]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),c.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:O.name,children:O.name}),c.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[c.jsxs("span",{children:["Ersteller: ",O.author]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["Quant: ",O.quant]})]}),c.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:c.jsx(l4,{fit:O.fit})})]})}),c.jsx("div",{className:"pt-1",children:N?A?c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),c.jsxs("span",{children:["Bessere Version in der Registry: ",A.repo.split("/").pop()]})]}),c.jsxs("button",{onClick:()=>b(A.repo,j.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!l[A.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[c.jsx(da,{className:"h-3.5 w-3.5"}),l[A.repo]||"Auf neue Version aktualisieren"]})]}):c.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[c.jsx(On,{className:"h-4 w-4"})," Auf neuestem Stand"]}):c.jsxs("button",{onClick:()=>b(O.repo,j.role,O.quant||"Q4_K_M",O.caps.tools!=="no"),disabled:!!C,className:de("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",C?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[c.jsx(da,{className:"h-3.5 w-3.5"}),C||"Optimales Modell einsetzen"]})})]}),_.length>0&&c.jsxs("div",{className:"border-t border-border/20 pt-3",children:[c.jsxs("button",{onClick:()=>p(M=>({...M,[j.role]:!E})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[E?c.jsx(GM,{className:"h-3 w-3"}):c.jsx(WM,{className:"h-3 w-3"}),c.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),E&&c.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(M=>c.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:M.name,children:M.name}),c.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[c.jsxs("span",{children:["Quant: ",M.quant]}),c.jsx("span",{children:"•"}),c.jsx("span",{children:M.fit.text})]})]}),c.jsx("button",{onClick:()=>b(M.repo,j.role,M.quant||"Q4_K_M",M.caps.tools!=="no"),disabled:!!l[M.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:l[M.repo]||"Installieren"})]},M.repo))})]})]},j.role)})}),c.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[c.jsxs("button",{onClick:()=>v(!g),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ry,{className:"h-4 w-4 text-primary"}),c.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),c.jsx("span",{className:"text-[10px] text-primary hover:underline",children:g?"Ausblenden ▲":"Anzeigen ▼"})]}),g&&c.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:c.jsx(MQ,{})})]})]})}function DQ(){const[e,t]=x.useState("cockpit");return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),c.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>c.jsx("button",{onClick:()=>t(r),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Cockpit":"Modelle finden"},r))})]}),c.jsx(CQ,{}),c.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?c.jsx(_Q,{}):c.jsx(TQ,{})})]})}function Hd({label:e,percent:t,detail:r,icon:n}){const a=t>90?"bg-red-500 shadow-md shadow-red-500/20":t>75?"bg-amber-500 shadow-md shadow-amber-500/20":"bg-primary shadow-md shadow-primary/20";return c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/30 transition-all duration-300",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(n,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:e})]}),c.jsxs("span",{className:"text-xs font-mono font-bold text-foreground",children:[Math.round(t),"%"]})]}),c.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:c.jsx("div",{className:de("h-full transition-all duration-700 ease-out",a),style:{width:`${Math.min(t,100)}%`}})}),r&&c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:r})]})}function RQ(){const{data:e,error:t}=sh(3e3),{data:r}=kT(3e3),{showAlert:n,dialogElement:a}=ko(),s=t?String(t):"",[u,l]=x.useState(""),[f,h]=x.useState({});async function p(){l("Backup snapshotted...");try{const v=await Pe("/api/system/backup",{method:"POST"});l(v.ok?`Snapshot erzeugt: ${v.snapshot} (${v.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(v){l(`Fehler: ${v.message}`)}}async function g(v){h(b=>({...b,[v]:!0}));try{const b=await Pe("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:v})});b.ok?n("Erfolgreich",`Dienst ${v} wurde erfolgreich neu gestartet.`):n("Fehler beim Neustart",`Fehler beim Neustart: ${b.err||"Unbekannter Fehler"}`)}catch(b){n("Fehler",`Fehler: ${b.message}`)}finally{h(b=>({...b,[v]:!1}))}}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"System-Diagnose & Status"}),c.jsx("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:"Echtzeit-Ressourcen der Box, Dienst-Überwachung und Systempflege."})]}),s&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["System-Status nicht lesbar (",s,")."]}),e&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[c.jsx(Hd,{label:"CPU",percent:e.cpu.percent,detail:e.cpu.cores?`${e.cpu.cores} Cores`:void 0,icon:Mr}),c.jsx(Hd,{label:"RAM",percent:e.ram.percent,detail:`${yr(e.ram.used)} / ${yr(e.ram.total)} GB`,icon:mu}),e.gpu&&e.gpu.busy_percent!=null&&c.jsx(Hd,{label:"GPU",percent:e.gpu.busy_percent,detail:e.gpu.gtt_used!=null&&e.gpu.gtt_total?`${yr(e.gpu.gtt_used)} / ${yr(e.gpu.gtt_total)} GB (GTT/unified)`:e.gpu.vram_used!=null&&e.gpu.vram_total?`${yr(e.gpu.vram_used)} / ${yr(e.gpu.vram_total)} GB VRAM`:void 0,icon:Mr}),e.disk&&c.jsx(Hd,{label:"Disk",percent:e.disk.percent,detail:`${yr(e.disk.used)} / ${yr(e.disk.total)} GB`,icon:Gd})]}),e.temp&&(e.temp.cpu||e.temp.gpu)&&c.jsxs("div",{className:"flex gap-3 text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-2.5 rounded-xl self-start w-fit",children:[e.temp.cpu!=null&&c.jsxs("span",{className:"flex items-center gap-1",children:["CPU-Temperatur: ",c.jsxs("span",{className:"text-foreground font-bold",children:[e.temp.cpu," °C"]})]}),e.temp.cpu!=null&&e.temp.gpu!=null&&c.jsx("span",{children:"|"}),e.temp.gpu!=null&&c.jsxs("span",{className:"flex items-center gap-1",children:["GPU-Temperatur: ",c.jsxs("span",{className:"text-foreground font-bold",children:[e.temp.gpu," °C"]})]})]})]}),r&&c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Homelab-Dienste"}),c.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"h-7 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",children:"System-Logs anzeigen"})]}),c.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:r.services.map(v=>c.jsxs("div",{className:"flex items-center justify-between p-3.5 rounded-xl bg-background/20 border border-border/30 hover:border-primary/20 transition-all group",children:[c.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[c.jsx("span",{className:de("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",v.ok?"bg-emerald-500":"bg-amber-500")}),c.jsxs("div",{className:"truncate",children:[c.jsx("div",{className:"text-xs font-bold text-foreground truncate",children:v.name}),c.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:v.url})]})]}),c.jsx("button",{onClick:()=>g(v.name),disabled:f[v.name],className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-primary hover:bg-primary/5 flex items-center justify-center transition-all opacity-0 group-hover:opacity-100",title:"Dienst neu starten",children:c.jsx(no,{className:de("h-3.5 w-3.5",f[v.name]&&"animate-spin")})})]},v.name))}),c.jsxs("div",{className:"flex flex-wrap gap-4 border-t border-border/20 pt-4 text-[10px] font-semibold text-muted-foreground",children:[c.jsxs("a",{href:ju(r.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[c.jsx(nf,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),c.jsxs("a",{href:ju(r.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[c.jsx(nf,{className:"h-3 w-3"})," OpenAI Gateway"]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"System-Backup & Snapshot"}),c.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Erzeuge einen Git-Snapshot der aktuellen Konfigurationen und des System-Zustands."})]}),c.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto shrink-0",children:c.jsxs("button",{onClick:p,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[c.jsx(sI,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),u&&c.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:u}),a]})}function $Q(){const[e,t]=x.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=x.useState(localStorage.getItem("mc_mcp_path")||""),[a,s]=x.useState("cline"),[u,l]=x.useState(!1),f=new URLSearchParams({host:e});r&&f.set("mcp_path",r);const{data:h,error:p}=O2(f.toString()),g=p?String(p):"";function v(S){t(S),S&&localStorage.setItem("mc_host",S)}function b(S){n(S),localStorage.setItem("mc_mcp_path",S)}const j=h==null?void 0:h.tools[a];async function k(){j&&(await navigator.clipboard.writeText(j.snippet),l(!0),setTimeout(()=>l(!1),1500))}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(JM,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),c.jsx("input",{value:e,onChange:S=>v(S.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[c.jsx(ZM,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),c.jsx("input",{value:r,onChange:S=>b(S.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),g&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",g]}),h&&c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(h.tools).map(([S,N])=>c.jsx("button",{onClick:()=>s(S),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a===S?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:N.label},S))}),j&&c.jsxs("div",{className:"space-y-3",children:[j.note&&c.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[c.jsx(eI,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),c.jsx("span",{children:j.note})]}),c.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[c.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),c.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[c.jsx(af,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{children:a==="cline"||a==="cursor"?"config.json":"settings.json"})]}),c.jsxs("button",{onClick:k,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[u?c.jsx(On,{className:"h-3.5 w-3.5 text-emerald-400"}):c.jsx(WN,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:u?"Kopiert":"Kopieren"})]})]}),c.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:c.jsx("code",{children:j.snippet})})]})]})]})]})}const mN=["user","instruction","stable","versioned","ephemeral"],Cg={user:{label:"User",icon:hI,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:lI,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:Os,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:fI,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:qM,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},gN={label:"Gedächtnis",icon:UN,bg:"bg-muted/10",text:"text-muted-foreground"},LQ={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function zQ(){const[e,t]=x.useState(""),[r,n]=x.useState(""),[a,s]=x.useState(""),[u,l]=x.useState("stable"),[f,h]=x.useState(!1),p=pa(),{showAlert:g,showConfirm:v,dialogElement:b}=ko(),{data:j=[],error:k}=_2({q:r,category:e}),S=k?String(k):"",N=()=>p.invalidateQueries({queryKey:["memory"]});async function A(){a.trim()&&(await Pe("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"ui"})}),s(""),N())}async function O(_){await Pe(`/api/memory/${_}`,{method:"DELETE"}),N()}async function C(){h(!0);try{const _=await Pe("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(_.duplicate_count===0){g("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}v("Deduplizierung bestätigen",`${_.duplicate_count} Dublette(n) in ${_.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await Pe("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),N()}catch(E){g("Fehler",`Fehler beim Löschen: ${E.message}`)}})}catch(_){g("Fehler",`Fehler bei der Deduplizierung: ${_.message}`)}finally{h(!1)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),c.jsxs("button",{onClick:C,disabled:f,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50 shrink-0 self-start",children:[c.jsx(dI,{className:"h-4 w-4 text-primary animate-pulse"}),c.jsx("span",{children:"Deduplizieren"})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),c.jsx("textarea",{value:a,onChange:_=>s(_.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),c.jsx("select",{value:u,onChange:_=>l(_.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:mN.map(_=>{var E;return c.jsx("option",{value:_,className:"bg-popover text-foreground",children:((E=Cg[_])==null?void 0:E.label)||_},_)})})]}),c.jsxs("button",{onClick:A,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[c.jsx(HN,{className:"h-4 w-4"})," Speichern"]})]})]}),c.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx("input",{value:r,onChange:_=>n(_.target.value),placeholder:"Gedächtnis durchsuchen...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),c.jsx(ry,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[c.jsx("button",{onClick:()=>t(""),className:de("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),mN.map(_=>{const E=Cg[_]||gN,M=E.icon;return c.jsxs("button",{onClick:()=>t(_),className:de("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",e===_?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[c.jsx(M,{className:"h-3 w-3"}),c.jsx("span",{children:E.label})]},_)})]})]}),S&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",S]}),c.jsx("div",{className:"space-y-3",children:j.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center",children:"Keine Einträge für die aktuellen Filterkriterien gefunden."}):j.map(_=>{const E=Cg[_.category]||gN,M=E.icon;return c.jsxs("div",{className:de("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",LQ[_.category]||"border-l-muted"),children:[c.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[c.jsxs("span",{className:de("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",E.bg,E.text),children:[c.jsx(M,{className:"h-3 w-3"}),c.jsx("span",{className:"hidden sm:inline",children:E.label})]}),c.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:_.content})]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-background/20 px-1.5 py-0.5 rounded uppercase tracking-wider",children:_.source}),c.jsx("button",{onClick:()=>O(_.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:c.jsx(qg,{className:"h-3.5 w-3.5"})})]})]},_.id)})}),b]})}function Kd({label:e,ok:t,detail:r,icon:n,onClick:a}){return c.jsxs("div",{onClick:a,className:de("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",t?"border-border/60":"border-amber-500/30",a&&"cursor-pointer hover:bg-card/70"),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:e}),c.jsx(n,{className:de("h-4.5 w-4.5",t?"text-primary":"text-amber-500")})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full ring-2 ring-black/40",t?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:t?"Bereit / Online":"Offline / Inaktiv"})]}),r&&c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:r,children:r})]}),a&&c.jsxs("button",{onClick:s=>{s.stopPropagation(),a()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[c.jsx(Mr,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Gehirn wechseln"})]})]})}function FQ(){const{data:e,error:t}=C2(5e3),{data:r}=yo(),{showAlert:n,dialogElement:a}=ko(),s=pa(),u=t?String(t):"",l=x.useMemo(()=>["auto","fast","heavy",...((r==null?void 0:r.models)??[]).map(_=>{var E;return((E=_.name.split("/").pop())==null?void 0:E.replace(".gguf",""))||_.name})],[r]),[f,h]=x.useState(null),[p,g]=x.useState(!1),[v,b]=x.useState({width:800,height:360}),j=x.useRef(null),k=x.useCallback(C=>{if(j.current&&(j.current.disconnect(),j.current=null),C){const _=new ResizeObserver(E=>{if(!E||E.length===0)return;const M=E[0].contentRect;b({width:M.width,height:M.height})});_.observe(C),j.current=_}},[]),S=v.width,N=v.height,A=(C,_,E,M)=>{const U=(C+E)/2;return`M ${C} ${_} C ${U} ${_}, ${U} ${M}, ${E} ${M}`};async function O(C){try{await Pe("/api/agent/brain",{method:"POST",body:JSON.stringify({model:C})}),n("Erfolgreich",`Hermes-Gehirn wurde auf '${C}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:mt.agentStatus}),g(!1)}catch(_){n("Fehler",`Fehler beim Wechseln des Gehirns: ${_.message}`)}}return c.jsxs("div",{className:"space-y-6",children:[c.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),c.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",c.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.webui_url)&&c.jsxs("a",{href:ju(e.webui_url),target:"_blank",rel:"noopener",className:de("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[c.jsx(nf,{className:"h-4 w-4"}),c.jsx("span",{children:"AnythingLLM öffnen"})]})]}),u&&c.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",u,")."]}),e&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[c.jsx(Kd,{label:"Agent Gateway",ok:e.gateway_reachable,detail:"Port :8642 (REST API)",icon:Cs}),c.jsx(Kd,{label:"AnythingLLM",ok:e.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:mu}),c.jsx(Kd,{label:"Aktives Gehirn",ok:e.gateway_reachable,detail:e.brain_model?`Model: ${e.brain_model}`:"Model: auto",icon:Mr,onClick:()=>g(!0)}),c.jsx(Kd,{label:"Verdrahtung",ok:e.has_config,detail:`Config: ${e.has_config?"✓":"—"} · Skills: ${e.has_skills?"✓":"—"} · Memory: ${e.has_memories?"✓":"—"}`,icon:xu})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),c.jsxs("div",{ref:k,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[c.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),c.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),c.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[c.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),c.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),c.jsx("path",{d:A(S*.15,N*.5,S*.5,N*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="webui"||e.webui_reachable)&&c.jsx("path",{d:A(S*.15,N*.5,S*.5,N*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:A(S*.5,N*.5,S*.85,N*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="brain"||e.gateway_reachable)&&c.jsx("path",{d:A(S*.5,N*.5,S*.85,N*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),c.jsx("path",{d:A(S*.5,N*.5,S*.85,N*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(f==="gateway"||f==="wiring"||e.gateway_reachable)&&c.jsx("path",{d:A(S*.5,N*.5,S*.85,N*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),c.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>h("webui"),onMouseLeave:()=>h(null),onClick:()=>e.webui_reachable&&window.open(ju(e.webui_url),"_blank"),title:e.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[c.jsx(mu,{className:de("h-3.5 w-3.5",e.webui_reachable?"text-emerald-400":"text-amber-500")}),c.jsx("span",{children:"AnythingLLM"}),c.jsx("span",{className:de("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",e.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),c.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>h("gateway"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Cs,{className:"h-3.5 w-3.5 text-primary"}),c.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),c.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),c.jsx("div",{className:de("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",e.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:e.gateway_reachable?"Online":"Offline"})]}),c.jsxs("div",{className:de("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",e.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>h("brain"),onMouseLeave:()=>h(null),onClick:()=>g(!0),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(Mr,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),e.gateway_reachable&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:e.brain_model,children:e.brain_model||"auto"})]}),c.jsxs("div",{className:de("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",e.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>h("wiring"),onMouseLeave:()=>h(null),children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(xu,{className:"h-3 w-3 text-primary"}),c.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),e.has_config&&c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),c.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[c.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),c.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),c.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),c.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),c.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(nI,{className:"h-5 w-5 text-primary"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),c.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("p",{children:["Der ",c.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),c.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",c.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),c.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?c.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[c.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[c.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),c.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder WebUI Befehle auf TobisNicerPC ausführen. Nutze ",c.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",c.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",c.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),c.jsxs("p",{children:["Starte ",c.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",c.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),c.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Os,{className:"h-5 w-5 text-amber-500"}),c.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[c.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),c.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",c.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),c.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[c.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),c.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),c.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",c.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&p&&c.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:c.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[c.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[c.jsx(Mr,{className:"h-4 w-4"}),c.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),c.jsx("button",{onClick:()=>g(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',c.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",c.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),c.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:l.map(C=>{const _=["auto","fast","heavy"].includes(C);return c.jsxs("button",{onClick:()=>O(C),className:de("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",e.brain_model===C||!e.brain_model&&C==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[c.jsxs("div",{className:"flex flex-col text-left",children:[c.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:C}),c.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:_?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(e.brain_model===C||!e.brain_model&&C==="auto")&&c.jsx(On,{className:"h-4 w-4 shrink-0 text-primary"})]},C)})})]})}),a]})}function BQ(){const[e,t]=x.useState("connect"),[r,n]=x.useState("roocode"),[a,s]=x.useState(null),u="192.168.178.151",[l,f]=x.useState(!1),[h,p]=x.useState(null);function g(){f(!0),Pe("/api/health").then(v=>{s(v),p(v.engine_reachable?"success":"partial")}).catch(()=>{s(null),p("fail")}).finally(()=>f(!1))}return x.useEffect(()=>{g()},[]),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),c.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[c.jsx("button",{onClick:()=>t("connect"),className:de("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),c.jsx("button",{onClick:()=>t("concepts"),className:de("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",e==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),e==="connect"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:de("h-3 w-3 rounded-full ring-2 ring-black/40",h==="success"&&"bg-emerald-500 animate-pulse",h==="partial"&&"bg-amber-500",h==="fail"&&"bg-red-500",!h&&"bg-muted")}),c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),c.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[h==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(a==null?void 0:a.version)||""}).`,h==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",h==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!h&&"Verbindung wird geprüft..."]})]})]}),c.jsxs("button",{onClick:g,disabled:l,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[c.jsx(no,{className:de("h-3.5 w-3.5",l&&"animate-spin")}),c.jsx("span",{children:"Testen"})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(UN,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),c.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(Mr,{className:"h-4 w-4 text-cyan-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(vu,{className:"h-4 w-4 text-violet-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",c.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),c.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(gu,{className:"h-4 w-4 text-indigo-400"}),c.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),c.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(Kg,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),c.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[c.jsxs("button",{onClick:()=>n("roocode"),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",r==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[c.jsx(GN,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),c.jsx("button",{onClick:()=>n("cursor"),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),c.jsx("button",{onClick:()=>n("opencode"),className:de("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",r==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r==="roocode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),c.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),c.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",c.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),c.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),c.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",c.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",c.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),r==="cursor"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),c.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),c.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",c.jsx("strong",{children:"Models"}),"."]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),c.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",c.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",c.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),c.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",c.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),r==="opencode"&&c.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),c.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),c.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),c.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),c.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),c.jsx("div",{className:"pl-6 pt-1",children:c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",u,":9001/v1"]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[c.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),c.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(af,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),c.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",c.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",c.jsx("strong",{children:"Restart"}),"."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in AnythingLLM einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[c.jsx(Gg,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),c.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(vu,{className:"h-5 w-5 text-cyan-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),c.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",c.jsx("em",{children:"Experts"}),"). Ein intelligenter ",c.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),c.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[c.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(Gg,{className:"h-5 w-5 text-violet-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),c.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),c.jsxs("li",{children:[c.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(gu,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",c.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",c.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),c.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- +name: tdd-pro +description: Drive development with strict TDD practices +--- +# Instructions +...`}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[c.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),c.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",c.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",c.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills find"}),c.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",c.jsx("br",{}),c.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Globaler Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",c.jsx("i",{children:"code-simplification"}),", ",c.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Projekt-Pfad:"})," ",c.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",c.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(Mr,{className:"h-5 w-5 text-indigo-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),c.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),c.jsx("p",{children:c.jsx("strong",{children:"Best Practices für Hermes:"})}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",c.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (AnythingLLM-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(xu,{className:"h-5 w-5 text-amber-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),c.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(af,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),c.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",c.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(Kg,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),c.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",c.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),c.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[c.jsx(xu,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),c.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),c.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[c.jsx(Os,{className:"h-5 w-5 text-emerald-400"}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),c.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[c.jsxs("p",{children:["Mission Control 2 ist als ",c.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),c.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(U1,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),c.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),c.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[c.jsx(U1,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),c.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),c.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[c.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function UQ({title:e,hint:t}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),c.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[c.jsx(XM,{className:"h-8 w-8 text-muted-foreground"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const WQ=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-dashboard",label:"Hermes Dashboard",type:"user"},{id:"hermes-webui",label:"Hermes WebUI",type:"user"}];function Og(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}function HQ({open:e,onClose:t,defaultTab:r="maintenance"}){const[n,a]=x.useState(null),[s,u]=x.useState([]),[l,f]=x.useState("llama-swap"),[h,p]=x.useState(""),[g,v]=x.useState(!1),[b,j]=x.useState(null),[k,S]=x.useState({}),[N,A]=x.useState("maintenance"),[O,C]=x.useState(!1),[_,E]=x.useState(null);function M(F,se,Ne){E({type:"alert",title:F,message:se,onConfirm:()=>{E(null),Ne&&Ne()}})}function U(F,se,Ne){E({type:"confirm",title:F,message:se,onConfirm:()=>{E(null),Ne()},onCancel:()=>E(null)})}function W(F){return F?new Date(F*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[V,Y]=x.useState(""),[R,ce]=x.useState(""),[Z,ve]=x.useState(!1),[be,pe]=x.useState(!1);x.useEffect(()=>{e&&(Y(localStorage.getItem("mc_sudo_password")||""),ce(localStorage.getItem("mc_hf_token")||""))},[e]),x.useEffect(()=>{e&&r&&A(r)},[e,r]);const Q=x.useRef(null);function ne(){Pe("/api/maintenance/updates").then(a).catch(F=>console.error("Error loading updates",F))}function X(){Pe("/api/jobs").then(F=>u(F.jobs||[])).catch(F=>console.error("Error loading jobs",F))}function $(F){v(!0),j(null),Pe(`/api/maintenance/logs?service=${F}&lines=150`).then(se=>{se.ok?p(se.text):(p(`Fehler beim Laden der Logs: ${se.err||"Unbekannter Fehler"}`),(se.status==="incorrect_password"||se.status==="password_required")&&j(se.status))}).catch(se=>p(`Fehler: ${se.message}`)).finally(()=>{v(!1),setTimeout(()=>{Q.current&&(Q.current.scrollTop=Q.current.scrollHeight)},50)})}x.useEffect(()=>{if(!e)return;ne(),X();const F=setInterval(()=>{X(),ne()},3e3);return()=>clearInterval(F)},[e]),x.useEffect(()=>{!e||N!=="logs"||$(l)},[e,N,l]);async function T(){try{await Pe("/api/maintenance/os-update",{method:"POST"}),X(),A("maintenance")}catch(F){M("Fehler",`Fehler beim Starten des OS-Updates: ${F.message}`)}}async function J(){try{await Pe("/api/maintenance/engine-update",{method:"POST"}),X(),A("maintenance")}catch(F){M("Fehler",`Fehler beim Engine-Update: ${F.message}`)}}async function oe(){C(!0);try{await Pe("/api/maintenance/check-updates",{method:"POST"}),X(),A("maintenance")}catch(F){M("Fehler",`Fehler bei der Update-Suche: ${F.message}`)}finally{C(!1)}}async function ee(F,se){try{await Pe("/api/models/install",{method:"POST",body:JSON.stringify({repo:F,role:se})}),M("Gestartet",`Modell-Upgrade für '${se}' (${F}) gestartet.`),X(),A("maintenance")}catch(Ne){M("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Ne.message}`)}}async function ue(){U("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await Pe("/api/maintenance/reboot",{method:"POST"}),M("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(F){M("Fehler",`Fehler beim Reboot: ${F.message}`)}})}async function he(F){S(se=>({...se,[F]:!0}));try{const se=await Pe("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:F})});se.ok?M("Dienst neu gestartet",`Dienst ${F} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&l===F&&$(F)}):M("Fehler",`Fehler beim Neustart: ${se.err||"Unbekannter Fehler"}`)}catch(se){M("Fehler",`Fehler beim Neustart: ${se.message}`)}finally{S(se=>({...se,[F]:!1}))}}async function Ce(F){try{await Pe(`/api/jobs/${F}/cancel`,{method:"POST"}),X()}catch(se){M("Fehler",`Fehler beim Abbrechen: ${se.message}`)}}return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:de("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),c.jsxs("div",{className:de("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[c.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Mr,{className:"h-4.5 w-4.5 text-primary"}),c.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),c.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:c.jsx(si,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[c.jsx("button",{onClick:()=>A("maintenance"),className:de("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),c.jsx("button",{onClick:()=>A("logs"),className:de("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),c.jsx("button",{onClick:()=>A("settings"),className:de("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),c.jsxs("div",{className:"flex items-center gap-2",children:[(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",W(n.last_check)]}),c.jsxs("button",{onClick:oe,disabled:O,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[c.jsx(no,{className:de("h-3 w-3",O&&"animate-spin")}),"Nach Updates suchen"]})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("button",{onClick:T,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(Os,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.os?`${n.os} Updates verfügbar`:"Auf neuestem Stand"})]}),c.jsxs("button",{onClick:J,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[c.jsx(uI,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),c.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:n!=null&&n.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),c.jsxs("button",{onClick:ue,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[c.jsx(KN,{className:"h-4.5 w-4.5"}),c.jsxs("div",{children:[c.jsx("div",{children:"Host-System neu starten (Reboot)"}),c.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),(n==null?void 0:n.model_list)&&n.model_list.length>0&&c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(n==null?void 0:n.last_check)&&c.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",W(n.last_check)]})]}),c.jsx("div",{className:"space-y-2",children:n.model_list.map(F=>c.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-xs font-semibold",children:F.title}),c.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:F.repo}),c.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",F.role]})]}),c.jsxs("button",{onClick:()=>ee(F.repo,F.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[c.jsx(da,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},F.role))})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),c.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[s.filter(F=>F.state==="running"||F.state==="queued").length," Aktiv"]})]}),c.jsx("div",{className:"space-y-3",children:s.length===0?c.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):s.map(F=>{const se=F.state==="running"||F.state==="queued";return c.jsxs("div",{className:de("p-3 rounded-xl border transition-all duration-300",se?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[se&&c.jsxs("span",{className:"flex h-2 w-2 relative",children:[c.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),c.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),F.label]}),c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[c.jsxs("span",{children:["ID: ",F.id]}),c.jsx("span",{children:"•"}),c.jsx("span",{className:de(F.state==="done"&&"text-emerald-400",F.state==="failed"&&"text-red-400",F.state==="running"&&"text-primary",F.state==="queued"&&"text-amber-400",F.state==="canceled"&&"text-muted-foreground"),children:F.state})]})]}),se&&c.jsx("button",{onClick:()=>Ce(F.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"})]}),F.state==="running"&&c.jsxs("div",{className:"mt-3 space-y-1",children:[c.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${F.progress??0}%`}})}),c.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[c.jsxs("span",{children:[F.progress??0,"%"]}),F.done_bytes!=null&&F.total_bytes!=null&&c.jsxs("span",{children:[Og(F.done_bytes)," / ",Og(F.total_bytes),F.rate_bps!=null&&` (${Og(F.rate_bps)}/s)`]}),F.eta_s!=null&&c.jsxs("span",{children:["ETA: ",F.eta_s,"s"]})]})]})]},F.id)})})]})]}),N==="logs"&&c.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("select",{value:l,onChange:F=>f(F.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:WQ.map(F=>c.jsxs("option",{value:F.id,children:[F.label," (",F.type==="system"?"systemd-root":"user",")"]},F.id))}),c.jsxs("button",{onClick:()=>he(l),disabled:k[l],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[c.jsx(no,{className:de("h-3.5 w-3.5",k[l]&&"animate-spin")}),"Restart"]})]}),c.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[c.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[c.jsx(af,{className:"h-3 w-3 text-primary"}),c.jsxs("span",{children:["stdout/stderr - ",l]})]}),c.jsx("button",{onClick:()=>$(l),disabled:g,className:"text-muted-foreground hover:text-foreground transition-colors",children:c.jsx(no,{className:de("h-3 w-3",g&&"animate-spin")})})]}),c.jsx("pre",{ref:Q,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:b==="password_required"||b==="incorrect_password"?c.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[c.jsx(yu,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),c.jsx("div",{className:"text-xs font-semibold text-amber-300",children:b==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),c.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",l," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),c.jsx("button",{onClick:()=>A("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):g&&!h?c.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):h||c.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),N==="settings"&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),c.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(Os,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:Z?"text":"password",value:V,onChange:F=>Y(F.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>ve(!Z),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Z?c.jsx(W1,{className:"h-4 w-4"}):c.jsx(Vg,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[c.jsx(tI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),c.jsxs("div",{className:"relative",children:[c.jsx("input",{type:be?"text":"password",value:R,onChange:F=>ce(F.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),c.jsx("button",{type:"button",onClick:()=>pe(!be),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:be?c.jsx(W1,{className:"h-4 w-4"}):c.jsx(Vg,{className:"h-4 w-4"})})]}),c.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),c.jsxs("div",{className:"flex gap-3 pt-2",children:[c.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",V),localStorage.setItem("mc_hf_token",R),M("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),c.jsx("button",{onClick:()=>{Y(""),ce(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),M("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"})]})]})]})]}),_&&c.jsx(qO,{type:_.type,title:_.title,message:_.message,onConfirm:_.onConfirm,onCancel:_.onCancel})]})}function KQ(){var g,v,b,j,k;const[e,t]=x.useState("dashboard"),[r,n]=x.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[a,s]=x.useState(!1),[u,l]=x.useState("maintenance"),{data:f}=jT(),{data:h}=sh(2e4);x.useEffect(()=>{document.documentElement.classList.add("dark")},[]),x.useEffect(()=>{const S=N=>{var O;l(((O=N.detail)==null?void 0:O.tab)||"maintenance"),s(!0)};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[]);const p=Qg.find(S=>S.id===e);return c.jsxs("div",{className:"flex h-full relative",children:[c.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[c.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),c.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),c.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),c.jsx(wT,{onNavigate:t}),c.jsx(HQ,{open:a,onClose:()=>s(!1),defaultTab:u}),c.jsxs("aside",{className:de("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",r?"w-16":"w-60"),children:[c.jsxs("div",{className:de("flex items-center py-4 border-b border-border/40 shrink-0",r?"flex-col gap-3 px-2":"justify-between px-5"),children:[c.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[c.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!r&&c.jsxs("div",{className:"leading-tight",children:[c.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),c.jsx("button",{onClick:()=>{n(S=>{const N=!S;return localStorage.setItem("mc_sidebar_collapsed",N.toString()),N})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:r?"Maximieren":"Minimieren",children:r?c.jsx(KM,{className:"h-4 w-4"}):c.jsx(HM,{className:"h-4 w-4"})})]}),c.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:Qg.map(S=>c.jsxs("button",{onClick:()=>t(S.id),className:de("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",r?"justify-center p-2.5":"gap-3 px-3 py-2",e===S.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:r?S.label:void 0,children:[c.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0"}),!r&&c.jsx("span",{className:"truncate",children:S.label})]},S.id))}),c.jsx("div",{className:de("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",r?"px-2 text-center":"px-5"),children:r?c.jsx("div",{className:"flex justify-center",children:c.jsx("span",{className:de("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",f?f.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:f?`Engine ${f.engine_reachable?"online":"offline"}`:"Backend offline"})}):c.jsxs("div",{className:"space-y-2 text-left",children:[f?c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:de("h-2 w-2 rounded-full animate-pulse",f.engine_reachable?"bg-emerald-500":"bg-amber-500")}),c.jsxs("span",{className:"truncate",children:["Engine ",f.engine_reachable?"online":"offline"]})]}):c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",c.jsx("span",{className:"truncate",children:"Backend offline"})]}),(h==null?void 0:h.versions)&&c.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[c.jsxs("div",{className:"truncate",title:h.versions.mc2?`${h.versions.mc2.branch}-${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""} (${h.versions.mc2.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"MC2:"})," ",h.versions.mc2?`${h.versions.mc2.hash}${h.versions.mc2.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:((g=h.versions.engine)==null?void 0:g.type)==="git"?`${h.versions.engine.branch}-${h.versions.engine.hash}${h.versions.engine.dirty?"*":""} (${h.versions.engine.date})`:((v=h.versions.engine)==null?void 0:v.version_text)||"unbekannt",children:[c.jsx("strong",{children:"Engine:"})," ",((b=h.versions.engine)==null?void 0:b.type)==="git"?`${h.versions.engine.hash}${h.versions.engine.dirty?"*":""}`:((k=(j=h.versions.engine)==null?void 0:j.version_text)==null?void 0:k.split(" ").pop())||"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_ui?`${h.versions.hermes_ui.branch}-${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""} (${h.versions.hermes_ui.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes UI:"})," ",h.versions.hermes_ui?`${h.versions.hermes_ui.hash}${h.versions.hermes_ui.dirty?"*":""}`:"—"]}),c.jsxs("div",{className:"truncate",title:h.versions.hermes_agent?`${h.versions.hermes_agent.branch}-${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""} (${h.versions.hermes_agent.date})`:"nicht gefunden",children:[c.jsx("strong",{children:"Hermes Agent:"})," ",h.versions.hermes_agent?`${h.versions.hermes_agent.hash}${h.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[c.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[c.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:p.hint}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),c.jsxs("button",{onClick:()=>{const S=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(S)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[c.jsx(YM,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:"Suchen"}),c.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),c.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&c.jsx(AQ,{}),e==="models"&&c.jsx(DQ,{}),e==="system"&&c.jsx(RQ,{}),e==="connect"&&c.jsx($Q,{}),e==="memory"&&c.jsx(zQ,{}),e==="agent"&&c.jsx(FQ,{}),e==="guide"&&c.jsx(BQ,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(e)&&c.jsx(UQ,{title:p.label,hint:p.hint})]})]})]})}const GQ=new EM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});eM.createRoot(document.getElementById("root")).render(c.jsx(PN.StrictMode,{children:c.jsx(PM,{client:GQ,children:c.jsx(KQ,{})})})); diff --git a/frontend/dist/assets/index-BtqbLPzA.css b/frontend/dist/assets/index-BtqbLPzA.css deleted file mode 100644 index e7db538..0000000 --- a/frontend/dist/assets/index-BtqbLPzA.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-3{column-gap:calc(var(--spacing) * 3)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover{background-color:hsl(var(--popover))}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-none{fill:none}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.stroke-amber-500{stroke:var(--color-amber-500)}.stroke-border\/40{stroke:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.stroke-border\/40{stroke:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.stroke-muted{stroke:hsl(var(--muted))}.stroke-primary{stroke:hsl(var(--primary))}.stroke-red-500{stroke:var(--color-red-500)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/20{--tw-shadow-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[130px\]{--tw-blur:blur(130px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[140px\]{--tw-blur:blur(140px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[160px\]{--tw-blur:blur(160px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-CVpN0_0g.js b/frontend/dist/assets/index-CVpN0_0g.js deleted file mode 100644 index 98de453..0000000 --- a/frontend/dist/assets/index-CVpN0_0g.js +++ /dev/null @@ -1,397 +0,0 @@ -var cp=s=>{throw TypeError(s)};var Cd=(s,o,a)=>o.has(s)||cp("Cannot "+a);var N=(s,o,a)=>(Cd(s,o,"read from private field"),a?a.call(s):o.get(s)),be=(s,o,a)=>o.has(s)?cp("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,a),oe=(s,o,a,d)=>(Cd(s,o,"write to private field"),d?d.call(s,a):o.set(s,a),a),Pe=(s,o,a)=>(Cd(s,o,"access private method"),a);var va=(s,o,a,d)=>({set _(u){oe(s,o,u,a)},get _(){return N(s,o,d)}});function jg(s,o){for(var a=0;ad[u]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))d(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&d(h)}).observe(document,{childList:!0,subtree:!0});function a(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function d(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function pm(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ed={exports:{}},zo={},_d={exports:{}},Ce={};/** - * @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 up;function kg(){if(up)return Ce;up=1;var s=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),w=Symbol.iterator;function P(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function k(M,C,Y){this.props=M,this.context=C,this.refs=E,this.updater=Y||R}k.prototype.isReactComponent={},k.prototype.setState=function(M,C){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,C,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=k.prototype;function I(M,C,Y){this.props=M,this.context=C,this.refs=E,this.updater=Y||R}var B=I.prototype=new S;B.constructor=I,A(B,k.prototype),B.isPureReactComponent=!0;var L=Array.isArray,$=Object.prototype.hasOwnProperty,z={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function ne(M,C,Y){var te,Q={},re=null,ce=null;if(C!=null)for(te in C.ref!==void 0&&(ce=C.ref),C.key!==void 0&&(re=""+C.key),C)$.call(C,te)&&!H.hasOwnProperty(te)&&(Q[te]=C[te]);var ke=arguments.length-2;if(ke===1)Q.children=Y;else if(1>>1,C=Z[M];if(0>>1;Mu(Q,X))reu(ce,Q)?(Z[M]=ce,Z[re]=X,M=re):(Z[M]=Q,Z[te]=X,M=te);else if(reu(ce,X))Z[M]=ce,Z[re]=X,M=re;else break e}}return ae}function u(Z,ae){var X=Z.sortIndex-ae.sortIndex;return X!==0?X:Z.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();s.unstable_now=function(){return h.now()-p}}var v=[],x=[],b=1,w=null,P=3,R=!1,A=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(Z){for(var ae=a(x);ae!==null;){if(ae.callback===null)d(x);else if(ae.startTime<=Z)d(x),ae.sortIndex=ae.expirationTime,o(v,ae);else break;ae=a(x)}}function L(Z){if(E=!1,B(Z),!A)if(a(v)!==null)A=!0,Te($);else{var ae=a(x);ae!==null&&_e(L,ae.startTime-Z)}}function $(Z,ae){A=!1,E&&(E=!1,S(ne),ne=-1),R=!0;var X=P;try{for(B(ae),w=a(v);w!==null&&(!(w.expirationTime>ae)||Z&&!je());){var M=w.callback;if(typeof M=="function"){w.callback=null,P=w.priorityLevel;var C=M(w.expirationTime<=ae);ae=s.unstable_now(),typeof C=="function"?w.callback=C:w===a(v)&&d(v),B(ae)}else d(v);w=a(v)}if(w!==null)var Y=!0;else{var te=a(x);te!==null&&_e(L,te.startTime-ae),Y=!1}return Y}finally{w=null,P=X,R=!1}}var z=!1,H=null,ne=-1,le=5,xe=-1;function je(){return!(s.unstable_now()-xeZ||125M?(Z.sortIndex=X,o(x,Z),a(v)===null&&Z===a(x)&&(E?(S(ne),ne=-1):E=!0,_e(L,X-M))):(Z.sortIndex=C,o(v,Z),A||R||(A=!0,Te($))),Z},s.unstable_shouldYield=je,s.unstable_wrapCallback=function(Z){var ae=P;return function(){var X=P;P=ae;try{return Z.apply(this,arguments)}finally{P=X}}}})(Rd)),Rd}var xp;function Eg(){return xp||(xp=1,Pd.exports=Cg()),Pd.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 gp;function _g(){if(gp)return Nt;gp=1;var s=xc(),o=Eg();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,x=/^[: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]*$/,b={},w={};function P(e){return v.call(w,e)?!0:v.call(b,e)?!1:x.test(e)?w[e]=!0:(b[e]=!0,!1)}function R(e,t,n,l){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function A(e,t,n,l){if(t===null||typeof t>"u"||R(e,t,n,l))return!0;if(l)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function E(e,t,n,l,i,c,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=m}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new E(e,2,!1,e,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(e){k[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){k[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function I(e){return e[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(e){var t=e.replace(S,I);k[t]=new E(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(S,I);k[t]=new E(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(S,I);k[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),k.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){k[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function B(e,t,n,l){var i=k.hasOwnProperty(t)?k[t]:null;(i!==null?i.type!==0:l||!(2y||i[m]!==c[y]){var j=` -`+i[m].replace(" at new "," at ");return e.displayName&&j.includes("")&&(j=j.replace("",e.displayName)),j}while(1<=m&&0<=y);break}}}finally{Y=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?C(e):""}function Q(e){switch(e.tag){case 5:return C(e.type);case 16:return C("Lazy");case 13:return C("Suspense");case 19:return C("SuspenseList");case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return""}}function re(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case z:return"Portal";case le:return"Profiler";case ne:return"StrictMode";case Ee:return"Suspense";case me:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case je:return(e.displayName||"Context")+".Consumer";case xe:return(e._context.displayName||"Context")+".Provider";case V:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Re:return t=e.displayName||null,t!==null?t:re(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}function ce(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(t);case 8:return t===ne?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ke(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function we(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(m){l=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mt(e){e._valueTracker||(e._valueTracker=we(e))}function Gs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=U(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function pn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wn(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ll(e,t){var n=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;n=ke(t.value!=null?t.value:n),e._wrapperState={initialChecked:l,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function al(e,t){t=t.checked,t!=null&&B(e,"checked",t,!1)}function Vs(e,t){al(e,t);var n=ke(t.value),l=t.type;if(n!=null)l==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mn(e,t.type,n):t.hasOwnProperty("defaultValue")&&mn(e,t.type,ke(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function il(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function mn(e,t,n){(t!=="number"||pn(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function fr(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=hn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _r(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mr={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},dl=["Webkit","ms","Moz","O"];Object.keys(Mr).forEach(function(e){dl.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mr[t]=Mr[e]})});function Zs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mr.hasOwnProperty(e)&&Mr[e]?(""+t).trim():t+"px"}function Ys(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var l=n.indexOf("--")===0,i=Zs(n,t[n],l);n==="float"&&(n="cssFloat"),l?e.setProperty(n,i):e[n]=i}}var O=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ee(e,t){if(t){if(O[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function pe(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Me=null;function Le(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ct=null,Ie=null,Ze=null;function xn(e){if(e=jo(e)){if(typeof ct!="function")throw Error(a(280));var t=e.stateNode;t&&(t=Al(t),ct(e.stateNode,e.type,t))}}function Js(e){Ie?Ze?Ze.push(e):Ze=[e]:Ie=e}function cl(){if(Ie){var e=Ie,t=Ze;if(Ze=Ie=null,xn(e),t)for(e=0;e>>=0,e===0?32:31-(Fh(e)/Ih|0)|0}var hl=64,xl=4194304;function no(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gl(e,t){var n=e.pendingLanes;if(n===0)return 0;var l=0,i=e.suspendedLanes,c=e.pingedLanes,m=n&268435455;if(m!==0){var y=m&~i;y!==0?l=no(y):(c&=m,c!==0&&(l=no(c)))}else m=n&~i,m!==0?l=no(m):c!==0&&(l=no(c));if(l===0)return 0;if(t!==0&&t!==l&&(t&i)===0&&(i=l&-l,c=t&-t,i>=c||i===16&&(c&4194240)!==0))return t;if((l&4)!==0&&(l|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0n;n++)t.push(e);return t}function so(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vt(t),e[t]=n}function Hh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=po),ru=" ",nu=!1;function su(e,t){switch(e){case"keyup":return gx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yn=!1;function yx(e,t){switch(e){case"compositionend":return ou(t);case"keypress":return t.which!==32?null:(nu=!0,ru);case"textInput":return e=t.data,e===ru&&nu?null:e;default:return null}}function bx(e,t){if(Yn)return e==="compositionend"||!li&&su(e,t)?(e=Zc(),jl=ei=Dr=null,Yn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fu(n)}}function mu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hu(){for(var e=window,t=pn();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pn(e.document)}return t}function di(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Mx(e){var t=hu(),n=e.focusedElem,l=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mu(n.ownerDocument.documentElement,n)){if(l!==null&&di(n)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,c=Math.min(l.start,i);l=l.end===void 0?c:Math.min(l.end,i),!e.extend&&c>l&&(i=l,l=c,c=i),i=pu(n,c);var m=pu(n,l);i&&m&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),c>l?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jn=null,ci=null,go=null,ui=!1;function xu(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ui||Jn==null||Jn!==pn(l)||(l=Jn,"selectionStart"in l&&di(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),go&&xo(go,l)||(go=l,l=Pl(ci,"onSelect"),0ns||(e.current=ki[ns],ki[ns]=null,ns--)}function $e(e,t){ns++,ki[ns]=e.current,e.current=t}var Fr={},ut=zr(Fr),yt=zr(!1),yn=Fr;function ss(e,t){var n=e.type.contextTypes;if(!n)return Fr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var i={},c;for(c in n)i[c]=t[c];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function bt(e){return e=e.childContextTypes,e!=null}function Dl(){Be(yt),Be(ut)}function Ru(e,t,n){if(ut.current!==Fr)throw Error(a(168));$e(ut,t),$e(yt,n)}function Ou(e,t,n){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return n;l=l.getChildContext();for(var i in l)if(!(i in t))throw Error(a(108,ce(e)||"Unknown",i));return X({},n,l)}function Tl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fr,yn=ut.current,$e(ut,e),$e(yt,yt.current),!0}function Au(e,t,n){var l=e.stateNode;if(!l)throw Error(a(169));n?(e=Ou(e,t,yn),l.__reactInternalMemoizedMergedChildContext=e,Be(yt),Be(ut),$e(ut,e)):Be(yt),$e(yt,n)}var mr=null,Ll=!1,Ni=!1;function Du(e){mr===null?mr=[e]:mr.push(e)}function Ux(e){Ll=!0,Du(e)}function Ir(){if(!Ni&&mr!==null){Ni=!0;var e=0,t=Fe;try{var n=mr;for(Fe=1;e>=m,i-=m,hr=1<<32-Vt(t)+i|n<Ne?(st=ye,ye=null):st=ye.sibling;var De=G(D,ye,T[Ne],q);if(De===null){ye===null&&(ye=st);break}e&&ye&&De.alternate===null&&t(D,ye),_=c(De,_,Ne),ve===null?fe=De:ve.sibling=De,ve=De,ye=st}if(Ne===T.length)return n(D,ye),Ge&&wn(D,Ne),fe;if(ye===null){for(;NeNe?(st=ye,ye=null):st=ye.sibling;var Qr=G(D,ye,De.value,q);if(Qr===null){ye===null&&(ye=st);break}e&&ye&&Qr.alternate===null&&t(D,ye),_=c(Qr,_,Ne),ve===null?fe=Qr:ve.sibling=Qr,ve=Qr,ye=st}if(De.done)return n(D,ye),Ge&&wn(D,Ne),fe;if(ye===null){for(;!De.done;Ne++,De=T.next())De=K(D,De.value,q),De!==null&&(_=c(De,_,Ne),ve===null?fe=De:ve.sibling=De,ve=De);return Ge&&wn(D,Ne),fe}for(ye=l(D,ye);!De.done;Ne++,De=T.next())De=se(ye,D,Ne,De.value,q),De!==null&&(e&&De.alternate!==null&&ye.delete(De.key===null?Ne:De.key),_=c(De,_,Ne),ve===null?fe=De:ve.sibling=De,ve=De);return e&&ye.forEach(function(wg){return t(D,wg)}),Ge&&wn(D,Ne),fe}function Je(D,_,T,q){if(typeof T=="object"&&T!==null&&T.type===H&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case $:e:{for(var fe=T.key,ve=_;ve!==null;){if(ve.key===fe){if(fe=T.type,fe===H){if(ve.tag===7){n(D,ve.sibling),_=i(ve,T.props.children),_.return=D,D=_;break e}}else if(ve.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Te&&$u(fe)===ve.type){n(D,ve.sibling),_=i(ve,T.props),_.ref=ko(D,ve,T),_.return=D,D=_;break e}n(D,ve);break}else t(D,ve);ve=ve.sibling}T.type===H?(_=Mn(T.props.children,D.mode,q,T.key),_.return=D,D=_):(q=ca(T.type,T.key,T.props,null,D.mode,q),q.ref=ko(D,_,T),q.return=D,D=q)}return m(D);case z:e:{for(ve=T.key;_!==null;){if(_.key===ve)if(_.tag===4&&_.stateNode.containerInfo===T.containerInfo&&_.stateNode.implementation===T.implementation){n(D,_.sibling),_=i(_,T.children||[]),_.return=D,D=_;break e}else{n(D,_);break}else t(D,_);_=_.sibling}_=wd(T,D.mode,q),_.return=D,D=_}return m(D);case Te:return ve=T._init,Je(D,_,ve(T._payload),q)}if(ur(T))return de(D,_,T,q);if(ae(T))return ue(D,_,T,q);$l(D,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,_!==null&&_.tag===6?(n(D,_.sibling),_=i(_,T),_.return=D,D=_):(n(D,_),_=bd(T,D.mode,q),_.return=D,D=_),m(D)):n(D,_)}return Je}var is=Uu(!0),Bu=Uu(!1),Ul=zr(null),Bl=null,ds=null,Pi=null;function Ri(){Pi=ds=Bl=null}function Oi(e){var t=Ul.current;Be(Ul),e._currentValue=t}function Ai(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function cs(e,t){Bl=e,Pi=ds=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(wt=!0),e.firstContext=null)}function It(e){var t=e._currentValue;if(Pi!==e)if(e={context:e,memoizedValue:t,next:null},ds===null){if(Bl===null)throw Error(a(308));ds=e,Bl.dependencies={lanes:0,firstContext:e}}else ds=ds.next=e;return t}var jn=null;function Di(e){jn===null?jn=[e]:jn.push(e)}function Hu(e,t,n,l){var i=t.interleaved;return i===null?(n.next=n,Di(t)):(n.next=i.next,i.next=n),t.interleaved=n,gr(e,l)}function gr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $r=!1;function Ti(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ur(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ae&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,gr(e,n)}return i=l.interleaved,i===null?(t.next=t,Di(l)):(t.next=i.next,i.next=t),l.interleaved=t,gr(e,n)}function Hl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,qa(e,n)}}function Vu(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};c===null?i=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:l.shared,effects:l.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gl(e,t,n,l){var i=e.updateQueue;$r=!1;var c=i.firstBaseUpdate,m=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var j=y,F=j.next;j.next=null,m===null?c=F:m.next=F,m=j;var W=e.alternate;W!==null&&(W=W.updateQueue,y=W.lastBaseUpdate,y!==m&&(y===null?W.firstBaseUpdate=F:y.next=F,W.lastBaseUpdate=j))}if(c!==null){var K=i.baseState;m=0,W=F=j=null,y=c;do{var G=y.lane,se=y.eventTime;if((l&G)===G){W!==null&&(W=W.next={eventTime:se,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var de=e,ue=y;switch(G=t,se=n,ue.tag){case 1:if(de=ue.payload,typeof de=="function"){K=de.call(se,K,G);break e}K=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ue.payload,G=typeof de=="function"?de.call(se,K,G):de,G==null)break e;K=X({},K,G);break e;case 2:$r=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,G=i.effects,G===null?i.effects=[y]:G.push(y))}else se={eventTime:se,lane:G,tag:y.tag,payload:y.payload,callback:y.callback,next:null},W===null?(F=W=se,j=K):W=W.next=se,m|=G;if(y=y.next,y===null){if(y=i.shared.pending,y===null)break;G=y,y=G.next,G.next=null,i.lastBaseUpdate=G,i.shared.pending=null}}while(!0);if(W===null&&(j=K),i.baseState=j,i.firstBaseUpdate=F,i.lastBaseUpdate=W,t=i.shared.interleaved,t!==null){i=t;do m|=i.lane,i=i.next;while(i!==t)}else c===null&&(i.shared.lanes=0);Sn|=m,e.lanes=m,e.memoizedState=K}}function Wu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var l=$i.transition;$i.transition={};try{e(!1),t()}finally{Fe=n,$i.transition=l}}function ff(){return $t().memoizedState}function Vx(e,t,n){var l=Vr(e);if(n={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null},pf(e))mf(t,n);else if(n=Hu(e,t,n,l),n!==null){var i=gt();Yt(n,e,l,i),hf(n,t,l)}}function Wx(e,t,n){var l=Vr(e),i={lane:l,action:n,hasEagerState:!1,eagerState:null,next:null};if(pf(e))mf(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,y=c(m,n);if(i.hasEagerState=!0,i.eagerState=y,Wt(y,m)){var j=t.interleaved;j===null?(i.next=i,Di(t)):(i.next=j.next,j.next=i),t.interleaved=i;return}}catch{}finally{}n=Hu(e,t,i,l),n!==null&&(i=gt(),Yt(n,e,l,i),hf(n,t,l))}}function pf(e){var t=e.alternate;return e===We||t!==null&&t===We}function mf(e,t){Eo=Kl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hf(e,t,n){if((n&4194240)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,qa(e,n)}}var Zl={readContext:It,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},Kx={readContext:It,useCallback:function(e,t){return nr().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:nf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ql(4194308,4,lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ql(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ql(4,2,e,t)},useMemo:function(e,t){var n=nr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var l=nr();return t=n!==void 0?n(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=Vx.bind(null,We,e),[l.memoizedState,e]},useRef:function(e){var t=nr();return e={current:e},t.memoizedState=e},useState:tf,useDebugValue:Ki,useDeferredValue:function(e){return nr().memoizedState=e},useTransition:function(){var e=tf(!1),t=e[0];return e=Gx.bind(null,e[1]),nr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var l=We,i=nr();if(Ge){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),nt===null)throw Error(a(349));(Nn&30)!==0||Zu(l,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,nf(Ju.bind(null,l,c,e),[e]),l.flags|=2048,Po(9,Yu.bind(null,l,c,n,t),void 0,null),n},useId:function(){var e=nr(),t=nt.identifierPrefix;if(Ge){var n=xr,l=hr;n=(l&~(1<<32-Vt(l)-1)).toString(32)+n,t=":"+t+"R"+n,n=_o++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=m.createElement(n,{is:l.is}):(e=m.createElement(n),n==="select"&&(m=e,l.multiple?m.multiple=!0:l.size&&(m.size=l.size))):e=m.createElementNS(e,n),e[tr]=t,e[wo]=l,Tf(e,t,!1,!1),t.stateNode=e;e:{switch(m=pe(n,l),n){case"dialog":Ue("cancel",e),Ue("close",e),i=l;break;case"iframe":case"object":case"embed":Ue("load",e),i=l;break;case"video":case"audio":for(i=0;ihs&&(t.flags|=128,l=!0,Ro(c,!1),t.lanes=4194304)}else{if(!l)if(e=Vl(m),e!==null){if(t.flags|=128,l=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ro(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!Ge)return pt(t),null}else 2*Ye()-c.renderingStartTime>hs&&n!==1073741824&&(t.flags|=128,l=!0,Ro(c,!1),t.lanes=4194304);c.isBackwards?(m.sibling=t.child,t.child=m):(n=c.last,n!==null?n.sibling=m:t.child=m,c.last=m)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Ye(),t.sibling=null,n=Ve.current,$e(Ve,l?n&1|2:n&1),t):(pt(t),null);case 22:case 23:return gd(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&(t.mode&1)!==0?(At&1073741824)!==0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function tg(e,t){switch(Ci(t),t.tag){case 1:return bt(t.type)&&Dl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return us(),Be(yt),Be(ut),Ii(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return zi(t),null;case 13:if(Be(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));as()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Be(Ve),null;case 4:return us(),null;case 10:return Oi(t.type._context),null;case 22:case 23:return gd(),null;case 24:return null;default:return null}}var ea=!1,mt=!1,rg=typeof WeakSet=="function"?WeakSet:Set,ie=null;function ps(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(l){Ke(e,t,l)}else n.current=null}function od(e,t,n){try{n()}catch(l){Ke(e,t,l)}}var Ff=!1;function ng(e,t){if(gi=bl,e=hu(),di(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,y=-1,j=-1,F=0,W=0,K=e,G=null;t:for(;;){for(var se;K!==n||i!==0&&K.nodeType!==3||(y=m+i),K!==c||l!==0&&K.nodeType!==3||(j=m+l),K.nodeType===3&&(m+=K.nodeValue.length),(se=K.firstChild)!==null;)G=K,K=se;for(;;){if(K===e)break t;if(G===n&&++F===i&&(y=m),G===c&&++W===l&&(j=m),(se=K.nextSibling)!==null)break;K=G,G=K.parentNode}K=se}n=y===-1||j===-1?null:{start:y,end:j}}else n=null}n=n||{start:0,end:0}}else n=null;for(vi={focusedElem:e,selectionRange:n},bl=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var de=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(de!==null){var ue=de.memoizedProps,Je=de.memoizedState,D=t.stateNode,_=D.getSnapshotBeforeUpdate(t.elementType===t.type?ue:Qt(t.type,ue),Je);D.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(q){Ke(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return de=Ff,Ff=!1,de}function Oo(e,t,n){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var i=l=l.next;do{if((i.tag&e)===e){var c=i.destroy;i.destroy=void 0,c!==void 0&&od(t,n,c)}i=i.next}while(i!==l)}}function ta(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var l=n.create;n.destroy=l()}n=n.next}while(n!==t)}}function ld(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function If(e){var t=e.alternate;t!==null&&(e.alternate=null,If(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tr],delete t[wo],delete t[ji],delete t[Ix],delete t[$x])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $f(e){return e.tag===5||e.tag===3||e.tag===4}function Uf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$f(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ad(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ol));else if(l!==4&&(e=e.child,e!==null))for(ad(e,t,n),e=e.sibling;e!==null;)ad(e,t,n),e=e.sibling}function id(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(id(e,t,n),e=e.sibling;e!==null;)id(e,t,n),e=e.sibling}var lt=null,qt=!1;function Br(e,t,n){for(n=n.child;n!==null;)Bf(e,t,n),n=n.sibling}function Bf(e,t,n){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(ml,n)}catch{}switch(n.tag){case 5:mt||ps(n,t);case 6:var l=lt,i=qt;lt=null,Br(e,t,n),lt=l,qt=i,lt!==null&&(qt?(e=lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):lt.removeChild(n.stateNode));break;case 18:lt!==null&&(qt?(e=lt,n=n.stateNode,e.nodeType===8?wi(e.parentNode,n):e.nodeType===1&&wi(e,n),co(e)):wi(lt,n.stateNode));break;case 4:l=lt,i=qt,lt=n.stateNode.containerInfo,qt=!0,Br(e,t,n),lt=l,qt=i;break;case 0:case 11:case 14:case 15:if(!mt&&(l=n.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){i=l=l.next;do{var c=i,m=c.destroy;c=c.tag,m!==void 0&&((c&2)!==0||(c&4)!==0)&&od(n,t,m),i=i.next}while(i!==l)}Br(e,t,n);break;case 1:if(!mt&&(ps(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=n.memoizedProps,l.state=n.memoizedState,l.componentWillUnmount()}catch(y){Ke(n,t,y)}Br(e,t,n);break;case 21:Br(e,t,n);break;case 22:n.mode&1?(mt=(l=mt)||n.memoizedState!==null,Br(e,t,n),mt=l):Br(e,t,n);break;default:Br(e,t,n)}}function Hf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rg),t.forEach(function(l){var i=fg.bind(null,e,l);n.has(l)||(n.add(l),l.then(i,i))})}}function Zt(e,t){var n=t.deletions;if(n!==null)for(var l=0;li&&(i=m),l&=~c}if(l=i,l=Ye()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*og(l/1960))-l,10e?16:e,Gr===null)var l=!1;else{if(e=Gr,Gr=null,la=0,(Ae&6)!==0)throw Error(a(331));var i=Ae;for(Ae|=4,ie=e.current;ie!==null;){var c=ie,m=c.child;if((ie.flags&16)!==0){var y=c.deletions;if(y!==null){for(var j=0;jYe()-ud?En(e,0):cd|=n),kt(e,t)}function rp(e,t){t===0&&((e.mode&1)===0?t=1:(t=xl,xl<<=1,(xl&130023424)===0&&(xl=4194304)));var n=gt();e=gr(e,t),e!==null&&(so(e,t,n),kt(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rp(e,n)}function fg(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(a(314))}l!==null&&l.delete(t),rp(e,n)}var np;np=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yt.current)wt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return wt=!1,Xx(e,t,n);wt=(e.flags&131072)!==0}else wt=!1,Ge&&(t.flags&1048576)!==0&&Tu(t,Fl,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;Xl(e,t),e=t.pendingProps;var i=ss(t,ut.current);cs(t,n),i=Bi(null,t,l,e,i,n);var c=Hi();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,bt(l)?(c=!0,Tl(t)):c=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ti(t),i.updater=Yl,t.stateNode=i,i._reactInternals=t,qi(t,l,e,n),t=Xi(null,t,l,!0,c,n)):(t.tag=0,Ge&&c&&Si(t),xt(null,t,i,n),t=t.child),t;case 16:l=t.elementType;e:{switch(Xl(e,t),e=t.pendingProps,i=l._init,l=i(l._payload),t.type=l,i=t.tag=mg(l),e=Qt(l,e),i){case 0:t=Ji(null,t,l,e,n);break e;case 1:t=Mf(null,t,l,e,n);break e;case 11:t=Nf(null,t,l,e,n);break e;case 14:t=Sf(null,t,l,Qt(l.type,e),n);break e}throw Error(a(306,l,""))}return t;case 0:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Qt(l,i),Ji(e,t,l,i,n);case 1:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Qt(l,i),Mf(e,t,l,i,n);case 3:e:{if(Pf(t),e===null)throw Error(a(387));l=t.pendingProps,c=t.memoizedState,i=c.element,Gu(e,t),Gl(t,l,null,n);var m=t.memoizedState;if(l=m.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){i=fs(Error(a(423)),t),t=Rf(e,t,l,n,i);break e}else if(l!==i){i=fs(Error(a(424)),t),t=Rf(e,t,l,n,i);break e}else for(Ot=Lr(t.stateNode.containerInfo.firstChild),Rt=t,Ge=!0,Kt=null,n=Bu(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(as(),l===i){t=yr(e,t,n);break e}xt(e,t,l,n)}t=t.child}return t;case 5:return Ku(t),e===null&&_i(t),l=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,m=i.children,yi(l,i)?m=null:c!==null&&yi(l,c)&&(t.flags|=32),_f(e,t),xt(e,t,m,n),t.child;case 6:return e===null&&_i(t),null;case 13:return Of(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=is(t,null,l,n):xt(e,t,l,n),t.child;case 11:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Qt(l,i),Nf(e,t,l,i,n);case 7:return xt(e,t,t.pendingProps,n),t.child;case 8:return xt(e,t,t.pendingProps.children,n),t.child;case 12:return xt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(l=t.type._context,i=t.pendingProps,c=t.memoizedProps,m=i.value,$e(Ul,l._currentValue),l._currentValue=m,c!==null)if(Wt(c.value,m)){if(c.children===i.children&&!yt.current){t=yr(e,t,n);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var y=c.dependencies;if(y!==null){m=c.child;for(var j=y.firstContext;j!==null;){if(j.context===l){if(c.tag===1){j=vr(-1,n&-n),j.tag=2;var F=c.updateQueue;if(F!==null){F=F.shared;var W=F.pending;W===null?j.next=j:(j.next=W.next,W.next=j),F.pending=j}}c.lanes|=n,j=c.alternate,j!==null&&(j.lanes|=n),Ai(c.return,n,t),y.lanes|=n;break}j=j.next}}else if(c.tag===10)m=c.type===t.type?null:c.child;else if(c.tag===18){if(m=c.return,m===null)throw Error(a(341));m.lanes|=n,y=m.alternate,y!==null&&(y.lanes|=n),Ai(m,n,t),m=c.sibling}else m=c.child;if(m!==null)m.return=c;else for(m=c;m!==null;){if(m===t){m=null;break}if(c=m.sibling,c!==null){c.return=m.return,m=c;break}m=m.return}c=m}xt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,l=t.pendingProps.children,cs(t,n),i=It(i),l=l(i),t.flags|=1,xt(e,t,l,n),t.child;case 14:return l=t.type,i=Qt(l,t.pendingProps),i=Qt(l.type,i),Sf(e,t,l,i,n);case 15:return Cf(e,t,t.type,t.pendingProps,n);case 17:return l=t.type,i=t.pendingProps,i=t.elementType===l?i:Qt(l,i),Xl(e,t),t.tag=1,bt(l)?(e=!0,Tl(t)):e=!1,cs(t,n),gf(t,l,i),qi(t,l,i,n),Xi(null,t,l,!0,e,n);case 19:return Df(e,t,n);case 22:return Ef(e,t,n)}throw Error(a(156,t.tag))};function sp(e,t){return Lc(e,t)}function pg(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,t,n,l){return new pg(e,t,n,l)}function yd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mg(e){if(typeof e=="function")return yd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V)return 11;if(e===Re)return 14}return 2}function Kr(e,t){var n=e.alternate;return n===null?(n=Bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ca(e,t,n,l,i,c){var m=2;if(l=e,typeof e=="function")yd(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case H:return Mn(n.children,i,c,t);case ne:m=8,i|=8;break;case le:return e=Bt(12,n,t,i|2),e.elementType=le,e.lanes=c,e;case Ee:return e=Bt(13,n,t,i),e.elementType=Ee,e.lanes=c,e;case me:return e=Bt(19,n,t,i),e.elementType=me,e.lanes=c,e;case _e:return ua(n,i,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xe:m=10;break e;case je:m=9;break e;case V:m=11;break e;case Re:m=14;break e;case Te:m=16,l=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=Bt(m,n,t,i),t.elementType=e,t.type=l,t.lanes=c,t}function Mn(e,t,n,l){return e=Bt(7,e,l,t),e.lanes=n,e}function ua(e,t,n,l){return e=Bt(22,e,l,t),e.elementType=_e,e.lanes=n,e.stateNode={isHidden:!1},e}function bd(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function wd(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hg(e,t,n,l,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qa(0),this.expirationTimes=Qa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qa(0),this.identifierPrefix=l,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jd(e,t,n,l,i,c,m,y,j){return e=new hg(e,t,n,y,j),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Bt(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:l,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ti(c),e}function xg(e,t,n){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Md.exports=_g(),Md.exports}var yp;function Mg(){if(yp)return ya;yp=1;var s=hm();return ya.createRoot=s.createRoot,ya.hydrateRoot=s.hydrateRoot,ya}var Pg=Mg();const Rg=pm(Pg);var sl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},On,Xr,Cs,nm,Og=(nm=class extends sl{constructor(){super();be(this,On);be(this,Xr);be(this,Cs);oe(this,Cs,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){N(this,Xr)||this.setEventListener(N(this,Cs))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,Xr))==null||o.call(this),oe(this,Xr,void 0))}setEventListener(o){var a;oe(this,Cs,o),(a=N(this,Xr))==null||a.call(this),oe(this,Xr,o(d=>{typeof d=="boolean"?this.setFocused(d):this.onFocus()}))}setFocused(o){N(this,On)!==o&&(oe(this,On,o),this.onFocus())}onFocus(){const o=this.isFocused();this.listeners.forEach(a=>{a(o)})}isFocused(){var o;return typeof N(this,On)=="boolean"?N(this,On):((o=globalThis.document)==null?void 0:o.visibilityState)!=="hidden"}},On=new WeakMap,Xr=new WeakMap,Cs=new WeakMap,nm),vc=new Og,Ag={setTimeout:(s,o)=>setTimeout(s,o),clearTimeout:s=>clearTimeout(s),setInterval:(s,o)=>setInterval(s,o),clearInterval:s=>clearInterval(s)},en,hc,sm,Dg=(sm=class{constructor(){be(this,en,Ag);be(this,hc,!1)}setTimeoutProvider(s){oe(this,en,s)}setTimeout(s,o){return N(this,en).setTimeout(s,o)}clearTimeout(s){N(this,en).clearTimeout(s)}setInterval(s,o){return N(this,en).setInterval(s,o)}clearInterval(s){N(this,en).clearInterval(s)}},en=new WeakMap,hc=new WeakMap,sm),Rn=new Dg;function Tg(s){setTimeout(s,0)}var Lg=typeof window>"u"||"Deno"in globalThis;function Ct(){}function zg(s,o){return typeof s=="function"?s(o):s}function Gd(s){return typeof s=="number"&&s>=0&&s!==1/0}function xm(s,o){return Math.max(s+(o||0)-Date.now(),0)}function an(s,o){return typeof s=="function"?s(o):s}function Tt(s,o){return typeof s=="function"?s(o):s}function bp(s,o){const{type:a="all",exact:d,fetchStatus:u,predicate:f,queryKey:h,stale:p}=s;if(h){if(d){if(o.queryHash!==yc(h,o.options))return!1}else if(!Ho(o.queryKey,h))return!1}if(a!=="all"){const v=o.isActive();if(a==="active"&&!v||a==="inactive"&&v)return!1}return!(typeof p=="boolean"&&o.isStale()!==p||u&&u!==o.state.fetchStatus||f&&!f(o))}function wp(s,o){const{exact:a,status:d,predicate:u,mutationKey:f}=s;if(f){if(!o.options.mutationKey)return!1;if(a){if(Bo(o.options.mutationKey)!==Bo(f))return!1}else if(!Ho(o.options.mutationKey,f))return!1}return!(d&&o.state.status!==d||u&&!u(o))}function yc(s,o){return((o==null?void 0:o.queryKeyHashFn)||Bo)(s)}function Bo(s){return JSON.stringify(s,(o,a)=>Wd(a)?Object.keys(a).sort().reduce((d,u)=>(d[u]=a[u],d),{}):a)}function Ho(s,o){return s===o?!0:typeof s!=typeof o?!1:s&&o&&typeof s=="object"&&typeof o=="object"?Object.keys(o).every(a=>Ho(s[a],o[a])):!1}var Fg=Object.prototype.hasOwnProperty;function gm(s,o,a=0){if(s===o)return s;if(a>500)return o;const d=jp(s)&&jp(o);if(!d&&!(Wd(s)&&Wd(o)))return o;const f=(d?s:Object.keys(s)).length,h=d?o:Object.keys(o),p=h.length,v=d?new Array(p):{};let x=0;for(let b=0;b{Rn.setTimeout(o,s)})}function Kd(s,o,a){return typeof a.structuralSharing=="function"?a.structuralSharing(s,o):a.structuralSharing!==!1?gm(s,o):o}function $g(s,o,a=0){const d=[...s,o];return a&&d.length>a?d.slice(1):d}function Ug(s,o,a=0){const d=[o,...s];return a&&d.length>a?d.slice(0,-1):d}var bc=Symbol();function vm(s,o){return!s.queryFn&&(o!=null&&o.initialPromise)?()=>o.initialPromise:!s.queryFn||s.queryFn===bc?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function ym(s,o){return typeof s=="function"?s(...o):!!s}function Bg(s,o,a){let d=!1,u;return Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(u??(u=o()),d||(d=!0,u.aborted?a():u.addEventListener("abort",a,{once:!0})),u)}),s}var Go=(()=>{let s=()=>Lg;return{isServer(){return s()},setIsServer(o){s=o}}})();function Qd(){let s,o;const a=new Promise((u,f)=>{s=u,o=f});a.status="pending",a.catch(()=>{});function d(u){Object.assign(a,u),delete a.resolve,delete a.reject}return a.resolve=u=>{d({status:"fulfilled",value:u}),s(u)},a.reject=u=>{d({status:"rejected",reason:u}),o(u)},a}var Hg=Tg;function Gg(){let s=[],o=0,a=p=>{p()},d=p=>{p()},u=Hg;const f=p=>{o?s.push(p):u(()=>{a(p)})},h=()=>{const p=s;s=[],p.length&&u(()=>{d(()=>{p.forEach(v=>{a(v)})})})};return{batch:p=>{let v;o++;try{v=p()}finally{o--,o||h()}return v},batchCalls:p=>(...v)=>{f(()=>{p(...v)})},schedule:f,setNotifyFunction:p=>{a=p},setBatchNotifyFunction:p=>{d=p},setScheduler:p=>{u=p}}}var it=Gg(),Es,tn,_s,om,Vg=(om=class extends sl{constructor(){super();be(this,Es,!0);be(this,tn);be(this,_s);oe(this,_s,o=>{if(typeof window<"u"&&window.addEventListener){const a=()=>o(!0),d=()=>o(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",d,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",d)}}})}onSubscribe(){N(this,tn)||this.setEventListener(N(this,_s))}onUnsubscribe(){var o;this.hasListeners()||((o=N(this,tn))==null||o.call(this),oe(this,tn,void 0))}setEventListener(o){var a;oe(this,_s,o),(a=N(this,tn))==null||a.call(this),oe(this,tn,o(this.setOnline.bind(this)))}setOnline(o){N(this,Es)!==o&&(oe(this,Es,o),this.listeners.forEach(d=>{d(o)}))}isOnline(){return N(this,Es)}},Es=new WeakMap,tn=new WeakMap,_s=new WeakMap,om),Da=new Vg;function Wg(s){return Math.min(1e3*2**s,3e4)}function bm(s){return(s??"online")==="online"?Da.isOnline():!0}var qd=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function wm(s){let o=!1,a=0,d;const u=Qd(),f=()=>u.status!=="pending",h=E=>{var k;if(!f()){const S=new qd(E);P(S),(k=s.onCancel)==null||k.call(s,S)}},p=()=>{o=!0},v=()=>{o=!1},x=()=>vc.isFocused()&&(s.networkMode==="always"||Da.isOnline())&&s.canRun(),b=()=>bm(s.networkMode)&&s.canRun(),w=E=>{f()||(d==null||d(),u.resolve(E))},P=E=>{f()||(d==null||d(),u.reject(E))},R=()=>new Promise(E=>{var k;d=S=>{(f()||x())&&E(S)},(k=s.onPause)==null||k.call(s)}).then(()=>{var E;d=void 0,f()||(E=s.onContinue)==null||E.call(s)}),A=()=>{if(f())return;let E;const k=a===0?s.initialPromise:void 0;try{E=k??s.fn()}catch(S){E=Promise.reject(S)}Promise.resolve(E).then(w).catch(S=>{var z;if(f())return;const I=s.retry??(Go.isServer()?0:3),B=s.retryDelay??Wg,L=typeof B=="function"?B(a,S):B,$=I===!0||typeof I=="number"&&ax()?void 0:R()).then(()=>{o?P(S):A()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(d==null||d(),u),cancelRetry:p,continueRetry:v,canStart:b,start:()=>(b()?A():R().then(A),u)}}var An,lm,jm=(lm=class{constructor(){be(this,An)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Gd(this.gcTime)&&oe(this,An,Rn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Go.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,An)!==void 0&&(Rn.clearTimeout(N(this,An)),oe(this,An,void 0))}},An=new WeakMap,lm);function Kg(s){return{onFetch:(o,a)=>{var b,w,P,R,A;const d=o.options,u=(P=(w=(b=o.fetchOptions)==null?void 0:b.meta)==null?void 0:w.fetchMore)==null?void 0:P.direction,f=((R=o.state.data)==null?void 0:R.pages)||[],h=((A=o.state.data)==null?void 0:A.pageParams)||[];let p={pages:[],pageParams:[]},v=0;const x=async()=>{let E=!1;const k=B=>{Bg(B,()=>o.signal,()=>E=!0)},S=vm(o.options,o.fetchOptions),I=async(B,L,$)=>{if(E)return Promise.reject(o.signal.reason);if(L==null&&B.pages.length)return Promise.resolve(B);const H=(()=>{const je={client:o.client,queryKey:o.queryKey,pageParam:L,direction:$?"backward":"forward",meta:o.options.meta};return k(je),je})(),ne=await S(H),{maxPages:le}=o.options,xe=$?Ug:$g;return{pages:xe(B.pages,ne,le),pageParams:xe(B.pageParams,L,le)}};if(u&&f.length){const B=u==="backward",L=B?Qg:Np,$={pages:f,pageParams:h},z=L(d,$);p=await I($,z,B)}else{const B=s??f.length;do{const L=v===0?h[0]??d.initialPageParam:Np(d,p);if(v>0&&L==null)break;p=await I(p,L),v++}while(v{var E,k;return(k=(E=o.options).persister)==null?void 0:k.call(E,x,{client:o.client,queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},a)}:o.fetchFn=x}}}function Np(s,{pages:o,pageParams:a}){const d=o.length-1;return o.length>0?s.getNextPageParam(o[d],o,a[d],a):void 0}function Qg(s,{pages:o,pageParams:a}){var d;return o.length>0?(d=s.getPreviousPageParam)==null?void 0:d.call(s,o[0],o,a[0],a):void 0}var Ms,Dn,Ps,Gt,Tn,ot,Xo,Ln,Dt,km,jr,am,qg=(am=class extends jm{constructor(o){super();be(this,Dt);be(this,Ms);be(this,Dn);be(this,Ps);be(this,Gt);be(this,Tn);be(this,ot);be(this,Xo);be(this,Ln);oe(this,Ln,!1),oe(this,Xo,o.defaultOptions),this.setOptions(o.options),this.observers=[],oe(this,Tn,o.client),oe(this,Gt,N(this,Tn).getQueryCache()),this.queryKey=o.queryKey,this.queryHash=o.queryHash,oe(this,Dn,Cp(this.options)),this.state=o.state??N(this,Dn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,Ms)}get promise(){var o;return(o=N(this,ot))==null?void 0:o.promise}setOptions(o){if(this.options={...N(this,Xo),...o},o!=null&&o._type&&oe(this,Ms,o._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Cp(this.options);a.data!==void 0&&(this.setState(Sp(a.data,a.dataUpdatedAt)),oe(this,Dn,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Gt).remove(this)}setData(o,a){const d=Kd(this.state.data,o,this.options);return Pe(this,Dt,jr).call(this,{data:d,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),d}setState(o){Pe(this,Dt,jr).call(this,{type:"setState",state:o})}cancel(o){var d,u;const a=(d=N(this,ot))==null?void 0:d.promise;return(u=N(this,ot))==null||u.cancel(o),a?a.then(Ct).catch(Ct):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,Dn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(o=>Tt(o.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(o=>an(o.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(o=>o.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(o=0){return this.state.data===void 0?!0:o==="static"?!1:this.state.isInvalidated?!0:!xm(this.state.dataUpdatedAt,o)}onFocus(){var a;const o=this.observers.find(d=>d.shouldFetchOnWindowFocus());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,ot))==null||a.continue()}onOnline(){var a;const o=this.observers.find(d=>d.shouldFetchOnReconnect());o==null||o.refetch({cancelRefetch:!1}),(a=N(this,ot))==null||a.continue()}addObserver(o){this.observers.includes(o)||(this.observers.push(o),this.clearGcTimeout(),N(this,Gt).notify({type:"observerAdded",query:this,observer:o}))}removeObserver(o){this.observers.includes(o)&&(this.observers=this.observers.filter(a=>a!==o),this.observers.length||(N(this,ot)&&(N(this,Ln)||Pe(this,Dt,km).call(this)?N(this,ot).cancel({revert:!0}):N(this,ot).cancelRetry()),this.scheduleGc()),N(this,Gt).notify({type:"observerRemoved",query:this,observer:o}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,Dt,jr).call(this,{type:"invalidate"})}async fetch(o,a){var x,b,w,P,R,A,E,k,S,I,B;if(this.state.fetchStatus!=="idle"&&((x=N(this,ot))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(N(this,ot))return N(this,ot).continueRetry(),N(this,ot).promise}if(o&&this.setOptions(o),!this.options.queryFn){const L=this.observers.find($=>$.options.queryFn);L&&this.setOptions(L.options)}const d=new AbortController,u=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(oe(this,Ln,!0),d.signal)})},f=()=>{const L=vm(this.options,a),z=(()=>{const H={client:N(this,Tn),queryKey:this.queryKey,meta:this.meta};return u(H),H})();return oe(this,Ln,!1),this.options.persister?this.options.persister(L,z,this):L(z)},p=(()=>{const L={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:N(this,Tn),state:this.state,fetchFn:f};return u(L),L})(),v=N(this,Ms)==="infinite"?Kg(this.options.pages):this.options.behavior;v==null||v.onFetch(p,this),oe(this,Ps,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=p.fetchOptions)==null?void 0:b.meta))&&Pe(this,Dt,jr).call(this,{type:"fetch",meta:(w=p.fetchOptions)==null?void 0:w.meta}),oe(this,ot,wm({initialPromise:a==null?void 0:a.initialPromise,fn:p.fetchFn,onCancel:L=>{L instanceof qd&&L.revert&&this.setState({...N(this,Ps),fetchStatus:"idle"}),d.abort()},onFail:(L,$)=>{Pe(this,Dt,jr).call(this,{type:"failed",failureCount:L,error:$})},onPause:()=>{Pe(this,Dt,jr).call(this,{type:"pause"})},onContinue:()=>{Pe(this,Dt,jr).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const L=await N(this,ot).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(R=(P=N(this,Gt).config).onSuccess)==null||R.call(P,L,this),(E=(A=N(this,Gt).config).onSettled)==null||E.call(A,L,this.state.error,this),L}catch(L){if(L instanceof qd){if(L.silent)return N(this,ot).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw Pe(this,Dt,jr).call(this,{type:"error",error:L}),(S=(k=N(this,Gt).config).onError)==null||S.call(k,L,this),(B=(I=N(this,Gt).config).onSettled)==null||B.call(I,this.state.data,L,this),L}finally{this.scheduleGc()}}},Ms=new WeakMap,Dn=new WeakMap,Ps=new WeakMap,Gt=new WeakMap,Tn=new WeakMap,ot=new WeakMap,Xo=new WeakMap,Ln=new WeakMap,Dt=new WeakSet,km=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},jr=function(o){const a=d=>{switch(o.type){case"failed":return{...d,fetchFailureCount:o.failureCount,fetchFailureReason:o.error};case"pause":return{...d,fetchStatus:"paused"};case"continue":return{...d,fetchStatus:"fetching"};case"fetch":return{...d,...Nm(d.data,this.options),fetchMeta:o.meta??null};case"success":const u={...d,...Sp(o.data,o.dataUpdatedAt),dataUpdateCount:d.dataUpdateCount+1,...!o.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return oe(this,Ps,o.manual?u:void 0),u;case"error":const f=o.error;return{...d,error:f,errorUpdateCount:d.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:d.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...d,isInvalidated:!0};case"setState":return{...d,...o.state}}};this.state=a(this.state),it.batch(()=>{this.observers.forEach(d=>{d.onQueryUpdate()}),N(this,Gt).notify({query:this,type:"updated",action:o})})},am);function Nm(s,o){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bm(o.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function Sp(s,o){return{data:s,dataUpdatedAt:o??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Cp(s){const o=typeof s.initialData=="function"?s.initialData():s.initialData,a=o!==void 0,d=a?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:a?d??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var St,Oe,el,vt,zn,Rs,kr,rn,tl,Os,As,Fn,In,nn,Ds,ze,Uo,Zd,Yd,Jd,Xd,ec,tc,rc,Sm,im,Zg=(im=class extends sl{constructor(o,a){super();be(this,ze);be(this,St);be(this,Oe);be(this,el);be(this,vt);be(this,zn);be(this,Rs);be(this,kr);be(this,rn);be(this,tl);be(this,Os);be(this,As);be(this,Fn);be(this,In);be(this,nn);be(this,Ds,new Set);this.options=a,oe(this,St,o),oe(this,rn,null),oe(this,kr,Qd()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,Oe).addObserver(this),Ep(N(this,Oe),this.options)?Pe(this,ze,Uo).call(this):this.updateResult(),Pe(this,ze,Xd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nc(N(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nc(N(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,ze,ec).call(this),Pe(this,ze,tc).call(this),N(this,Oe).removeObserver(this)}setOptions(o){const a=this.options,d=N(this,Oe);if(this.options=N(this,St).defaultQueryOptions(o),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tt(this.options.enabled,N(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,ze,rc).call(this),N(this,Oe).setOptions(this.options),a._defaulted&&!Vd(this.options,a)&&N(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,Oe),observer:this});const u=this.hasListeners();u&&_p(N(this,Oe),d,this.options,a)&&Pe(this,ze,Uo).call(this),this.updateResult(),u&&(N(this,Oe)!==d||Tt(this.options.enabled,N(this,Oe))!==Tt(a.enabled,N(this,Oe))||an(this.options.staleTime,N(this,Oe))!==an(a.staleTime,N(this,Oe)))&&Pe(this,ze,Zd).call(this);const f=Pe(this,ze,Yd).call(this);u&&(N(this,Oe)!==d||Tt(this.options.enabled,N(this,Oe))!==Tt(a.enabled,N(this,Oe))||f!==N(this,nn))&&Pe(this,ze,Jd).call(this,f)}getOptimisticResult(o){const a=N(this,St).getQueryCache().build(N(this,St),o),d=this.createResult(a,o);return Jg(this,d)&&(oe(this,vt,d),oe(this,Rs,this.options),oe(this,zn,N(this,Oe).state)),d}getCurrentResult(){return N(this,vt)}trackResult(o,a){return new Proxy(o,{get:(d,u)=>(this.trackProp(u),a==null||a(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,kr).status==="pending"&&N(this,kr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(d,u))})}trackProp(o){N(this,Ds).add(o)}getCurrentQuery(){return N(this,Oe)}refetch({...o}={}){return this.fetch({...o})}fetchOptimistic(o){const a=N(this,St).defaultQueryOptions(o),d=N(this,St).getQueryCache().build(N(this,St),a);return d.fetch().then(()=>this.createResult(d,a))}fetch(o){return Pe(this,ze,Uo).call(this,{...o,cancelRefetch:o.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,vt)))}createResult(o,a){var le;const d=N(this,Oe),u=this.options,f=N(this,vt),h=N(this,zn),p=N(this,Rs),x=o!==d?o.state:N(this,el),{state:b}=o;let w={...b},P=!1,R;if(a._optimisticResults){const xe=this.hasListeners(),je=!xe&&Ep(o,a),V=xe&&_p(o,d,a,u);(je||V)&&(w={...w,...Nm(b.data,o.options)}),a._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:A,errorUpdatedAt:E,status:k}=w;R=w.data;let S=!1;if(a.placeholderData!==void 0&&R===void 0&&k==="pending"){let xe;f!=null&&f.isPlaceholderData&&a.placeholderData===(p==null?void 0:p.placeholderData)?(xe=f.data,S=!0):xe=typeof a.placeholderData=="function"?a.placeholderData((le=N(this,As))==null?void 0:le.state.data,N(this,As)):a.placeholderData,xe!==void 0&&(k="success",R=Kd(f==null?void 0:f.data,xe,a),P=!0)}if(a.select&&R!==void 0&&!S)if(f&&R===(h==null?void 0:h.data)&&a.select===N(this,tl))R=N(this,Os);else try{oe(this,tl,a.select),R=a.select(R),R=Kd(f==null?void 0:f.data,R,a),oe(this,Os,R),oe(this,rn,null)}catch(xe){oe(this,rn,xe)}N(this,rn)&&(A=N(this,rn),R=N(this,Os),E=Date.now(),k="error");const I=w.fetchStatus==="fetching",B=k==="pending",L=k==="error",$=B&&I,z=R!==void 0,ne={status:k,fetchStatus:w.fetchStatus,isPending:B,isSuccess:k==="success",isError:L,isInitialLoading:$,isLoading:$,data:R,dataUpdatedAt:w.dataUpdatedAt,error:A,errorUpdatedAt:E,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:o.isFetched(),isFetchedAfterMount:w.dataUpdateCount>x.dataUpdateCount||w.errorUpdateCount>x.errorUpdateCount,isFetching:I,isRefetching:I&&!B,isLoadingError:L&&!z,isPaused:w.fetchStatus==="paused",isPlaceholderData:P,isRefetchError:L&&z,isStale:wc(o,a),refetch:this.refetch,promise:N(this,kr),isEnabled:Tt(a.enabled,o)!==!1};if(this.options.experimental_prefetchInRender){const xe=ne.data!==void 0,je=ne.status==="error"&&!xe,V=Re=>{je?Re.reject(ne.error):xe&&Re.resolve(ne.data)},Ee=()=>{const Re=oe(this,kr,ne.promise=Qd());V(Re)},me=N(this,kr);switch(me.status){case"pending":o.queryHash===d.queryHash&&V(me);break;case"fulfilled":(je||ne.data!==me.value)&&Ee();break;case"rejected":(!je||ne.error!==me.reason)&&Ee();break}}return ne}updateResult(){const o=N(this,vt),a=this.createResult(N(this,Oe),this.options);if(oe(this,zn,N(this,Oe).state),oe(this,Rs,this.options),N(this,zn).data!==void 0&&oe(this,As,N(this,Oe)),Vd(a,o))return;oe(this,vt,a);const d=()=>{if(!o)return!0;const{notifyOnChangeProps:u}=this.options,f=typeof u=="function"?u():u;if(f==="all"||!f&&!N(this,Ds).size)return!0;const h=new Set(f??N(this,Ds));return this.options.throwOnError&&h.add("error"),Object.keys(N(this,vt)).some(p=>{const v=p;return N(this,vt)[v]!==o[v]&&h.has(v)})};Pe(this,ze,Sm).call(this,{listeners:d()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,ze,Xd).call(this)}},St=new WeakMap,Oe=new WeakMap,el=new WeakMap,vt=new WeakMap,zn=new WeakMap,Rs=new WeakMap,kr=new WeakMap,rn=new WeakMap,tl=new WeakMap,Os=new WeakMap,As=new WeakMap,Fn=new WeakMap,In=new WeakMap,nn=new WeakMap,Ds=new WeakMap,ze=new WeakSet,Uo=function(o){Pe(this,ze,rc).call(this);let a=N(this,Oe).fetch(this.options,o);return o!=null&&o.throwOnError||(a=a.catch(Ct)),a},Zd=function(){Pe(this,ze,ec).call(this);const o=an(this.options.staleTime,N(this,Oe));if(Go.isServer()||N(this,vt).isStale||!Gd(o))return;const d=xm(N(this,vt).dataUpdatedAt,o)+1;oe(this,Fn,Rn.setTimeout(()=>{N(this,vt).isStale||this.updateResult()},d))},Yd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,Oe)):this.options.refetchInterval)??!1},Jd=function(o){Pe(this,ze,tc).call(this),oe(this,nn,o),!(Go.isServer()||Tt(this.options.enabled,N(this,Oe))===!1||!Gd(N(this,nn))||N(this,nn)===0)&&oe(this,In,Rn.setInterval(()=>{(this.options.refetchIntervalInBackground||vc.isFocused())&&Pe(this,ze,Uo).call(this)},N(this,nn)))},Xd=function(){Pe(this,ze,Zd).call(this),Pe(this,ze,Jd).call(this,Pe(this,ze,Yd).call(this))},ec=function(){N(this,Fn)!==void 0&&(Rn.clearTimeout(N(this,Fn)),oe(this,Fn,void 0))},tc=function(){N(this,In)!==void 0&&(Rn.clearInterval(N(this,In)),oe(this,In,void 0))},rc=function(){const o=N(this,St).getQueryCache().build(N(this,St),this.options);if(o===N(this,Oe))return;const a=N(this,Oe);oe(this,Oe,o),oe(this,el,o.state),this.hasListeners()&&(a==null||a.removeObserver(this),o.addObserver(this))},Sm=function(o){it.batch(()=>{o.listeners&&this.listeners.forEach(a=>{a(N(this,vt))}),N(this,St).getQueryCache().notify({query:N(this,Oe),type:"observerResultsUpdated"})})},im);function Yg(s,o){return Tt(o.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&Tt(o.retryOnMount,s)===!1)}function Ep(s,o){return Yg(s,o)||s.state.data!==void 0&&nc(s,o,o.refetchOnMount)}function nc(s,o,a){if(Tt(o.enabled,s)!==!1&&an(o.staleTime,s)!=="static"){const d=typeof a=="function"?a(s):a;return d==="always"||d!==!1&&wc(s,o)}return!1}function _p(s,o,a,d){return(s!==o||Tt(d.enabled,s)===!1)&&(!a.suspense||s.state.status!=="error")&&wc(s,a)}function wc(s,o){return Tt(o.enabled,s)!==!1&&s.isStaleByTime(an(o.staleTime,s))}function Jg(s,o){return!Vd(s.getCurrentResult(),o)}var rl,lr,ht,$n,ar,Yr,dm,Xg=(dm=class extends jm{constructor(o){super();be(this,ar);be(this,rl);be(this,lr);be(this,ht);be(this,$n);oe(this,rl,o.client),this.mutationId=o.mutationId,oe(this,ht,o.mutationCache),oe(this,lr,[]),this.state=o.state||e0(),this.setOptions(o.options),this.scheduleGc()}setOptions(o){this.options=o,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(o){N(this,lr).includes(o)||(N(this,lr).push(o),this.clearGcTimeout(),N(this,ht).notify({type:"observerAdded",mutation:this,observer:o}))}removeObserver(o){oe(this,lr,N(this,lr).filter(a=>a!==o)),this.scheduleGc(),N(this,ht).notify({type:"observerRemoved",mutation:this,observer:o})}optionalRemove(){N(this,lr).length||(this.state.status==="pending"?this.scheduleGc():N(this,ht).remove(this))}continue(){var o;return((o=N(this,$n))==null?void 0:o.continue())??this.execute(this.state.variables)}async execute(o){var h,p,v,x,b,w,P,R,A,E,k,S,I,B,L,$,z,H;const a=()=>{Pe(this,ar,Yr).call(this,{type:"continue"})},d={client:N(this,rl),meta:this.options.meta,mutationKey:this.options.mutationKey};oe(this,$n,wm({fn:()=>this.options.mutationFn?this.options.mutationFn(o,d):Promise.reject(new Error("No mutationFn found")),onFail:(ne,le)=>{Pe(this,ar,Yr).call(this,{type:"failed",failureCount:ne,error:le})},onPause:()=>{Pe(this,ar,Yr).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,ht).canRun(this)}));const u=this.state.status==="pending",f=!N(this,$n).canStart();try{if(u)a();else{Pe(this,ar,Yr).call(this,{type:"pending",variables:o,isPaused:f}),N(this,ht).config.onMutate&&await N(this,ht).config.onMutate(o,this,d);const le=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,o,d));le!==this.state.context&&Pe(this,ar,Yr).call(this,{type:"pending",context:le,variables:o,isPaused:f})}const ne=await N(this,$n).start();return await((x=(v=N(this,ht).config).onSuccess)==null?void 0:x.call(v,ne,o,this.state.context,this,d)),await((w=(b=this.options).onSuccess)==null?void 0:w.call(b,ne,o,this.state.context,d)),await((R=(P=N(this,ht).config).onSettled)==null?void 0:R.call(P,ne,null,this.state.variables,this.state.context,this,d)),await((E=(A=this.options).onSettled)==null?void 0:E.call(A,ne,null,o,this.state.context,d)),Pe(this,ar,Yr).call(this,{type:"success",data:ne}),ne}catch(ne){try{await((S=(k=N(this,ht).config).onError)==null?void 0:S.call(k,ne,o,this.state.context,this,d))}catch(le){Promise.reject(le)}try{await((B=(I=this.options).onError)==null?void 0:B.call(I,ne,o,this.state.context,d))}catch(le){Promise.reject(le)}try{await(($=(L=N(this,ht).config).onSettled)==null?void 0:$.call(L,void 0,ne,this.state.variables,this.state.context,this,d))}catch(le){Promise.reject(le)}try{await((H=(z=this.options).onSettled)==null?void 0:H.call(z,void 0,ne,o,this.state.context,d))}catch(le){Promise.reject(le)}throw Pe(this,ar,Yr).call(this,{type:"error",error:ne}),ne}finally{N(this,ht).runNext(this)}}},rl=new WeakMap,lr=new WeakMap,ht=new WeakMap,$n=new WeakMap,ar=new WeakSet,Yr=function(o){const a=d=>{switch(o.type){case"failed":return{...d,failureCount:o.failureCount,failureReason:o.error};case"pause":return{...d,isPaused:!0};case"continue":return{...d,isPaused:!1};case"pending":return{...d,context:o.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:o.isPaused,status:"pending",variables:o.variables,submittedAt:Date.now()};case"success":return{...d,data:o.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...d,data:void 0,error:o.error,failureCount:d.failureCount+1,failureReason:o.error,isPaused:!1,status:"error"}}};this.state=a(this.state),it.batch(()=>{N(this,lr).forEach(d=>{d.onMutationUpdate(o)}),N(this,ht).notify({mutation:this,type:"updated",action:o})})},dm);function e0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Nr,Jt,nl,cm,t0=(cm=class extends sl{constructor(o={}){super();be(this,Nr);be(this,Jt);be(this,nl);this.config=o,oe(this,Nr,new Set),oe(this,Jt,new Map),oe(this,nl,0)}build(o,a,d){const u=new Xg({client:o,mutationCache:this,mutationId:++va(this,nl)._,options:o.defaultMutationOptions(a),state:d});return this.add(u),u}add(o){N(this,Nr).add(o);const a=ba(o);if(typeof a=="string"){const d=N(this,Jt).get(a);d?d.push(o):N(this,Jt).set(a,[o])}this.notify({type:"added",mutation:o})}remove(o){if(N(this,Nr).delete(o)){const a=ba(o);if(typeof a=="string"){const d=N(this,Jt).get(a);if(d)if(d.length>1){const u=d.indexOf(o);u!==-1&&d.splice(u,1)}else d[0]===o&&N(this,Jt).delete(a)}}this.notify({type:"removed",mutation:o})}canRun(o){const a=ba(o);if(typeof a=="string"){const d=N(this,Jt).get(a),u=d==null?void 0:d.find(f=>f.state.status==="pending");return!u||u===o}else return!0}runNext(o){var d;const a=ba(o);if(typeof a=="string"){const u=(d=N(this,Jt).get(a))==null?void 0:d.find(f=>f!==o&&f.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){it.batch(()=>{N(this,Nr).forEach(o=>{this.notify({type:"removed",mutation:o})}),N(this,Nr).clear(),N(this,Jt).clear()})}getAll(){return Array.from(N(this,Nr))}find(o){const a={exact:!0,...o};return this.getAll().find(d=>wp(a,d))}findAll(o={}){return this.getAll().filter(a=>wp(o,a))}notify(o){it.batch(()=>{this.listeners.forEach(a=>{a(o)})})}resumePausedMutations(){const o=this.getAll().filter(a=>a.state.isPaused);return it.batch(()=>Promise.all(o.map(a=>a.continue().catch(Ct))))}},Nr=new WeakMap,Jt=new WeakMap,nl=new WeakMap,cm);function ba(s){var o;return(o=s.options.scope)==null?void 0:o.id}var ir,um,r0=(um=class extends sl{constructor(o={}){super();be(this,ir);this.config=o,oe(this,ir,new Map)}build(o,a,d){const u=a.queryKey,f=a.queryHash??yc(u,a);let h=this.get(f);return h||(h=new qg({client:o,queryKey:u,queryHash:f,options:o.defaultQueryOptions(a),state:d,defaultOptions:o.getQueryDefaults(u)}),this.add(h)),h}add(o){N(this,ir).has(o.queryHash)||(N(this,ir).set(o.queryHash,o),this.notify({type:"added",query:o}))}remove(o){const a=N(this,ir).get(o.queryHash);a&&(o.destroy(),a===o&&N(this,ir).delete(o.queryHash),this.notify({type:"removed",query:o}))}clear(){it.batch(()=>{this.getAll().forEach(o=>{this.remove(o)})})}get(o){return N(this,ir).get(o)}getAll(){return[...N(this,ir).values()]}find(o){const a={exact:!0,...o};return this.getAll().find(d=>bp(a,d))}findAll(o={}){const a=this.getAll();return Object.keys(o).length>0?a.filter(d=>bp(o,d)):a}notify(o){it.batch(()=>{this.listeners.forEach(a=>{a(o)})})}onFocus(){it.batch(()=>{this.getAll().forEach(o=>{o.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(o=>{o.onOnline()})})}},ir=new WeakMap,um),Qe,sn,on,Ts,Ls,ln,zs,Fs,fm,n0=(fm=class{constructor(s={}){be(this,Qe);be(this,sn);be(this,on);be(this,Ts);be(this,Ls);be(this,ln);be(this,zs);be(this,Fs);oe(this,Qe,s.queryCache||new r0),oe(this,sn,s.mutationCache||new t0),oe(this,on,s.defaultOptions||{}),oe(this,Ts,new Map),oe(this,Ls,new Map),oe(this,ln,0)}mount(){va(this,ln)._++,N(this,ln)===1&&(oe(this,zs,vc.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Qe).onFocus())})),oe(this,Fs,Da.subscribe(async s=>{s&&(await this.resumePausedMutations(),N(this,Qe).onOnline())})))}unmount(){var s,o;va(this,ln)._--,N(this,ln)===0&&((s=N(this,zs))==null||s.call(this),oe(this,zs,void 0),(o=N(this,Fs))==null||o.call(this),oe(this,Fs,void 0))}isFetching(s){return N(this,Qe).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return N(this,sn).findAll({...s,status:"pending"}).length}getQueryData(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Qe).get(o.queryHash))==null?void 0:a.state.data}ensureQueryData(s){const o=this.defaultQueryOptions(s),a=N(this,Qe).build(this,o),d=a.state.data;return d===void 0?this.fetchQuery(s):(s.revalidateIfStale&&a.isStaleByTime(an(o.staleTime,a))&&this.prefetchQuery(o),Promise.resolve(d))}getQueriesData(s){return N(this,Qe).findAll(s).map(({queryKey:o,state:a})=>{const d=a.data;return[o,d]})}setQueryData(s,o,a){const d=this.defaultQueryOptions({queryKey:s}),u=N(this,Qe).get(d.queryHash),f=u==null?void 0:u.state.data,h=zg(o,f);if(h!==void 0)return N(this,Qe).build(this,d).setData(h,{...a,manual:!0})}setQueriesData(s,o,a){return it.batch(()=>N(this,Qe).findAll(s).map(({queryKey:d})=>[d,this.setQueryData(d,o,a)]))}getQueryState(s){var a;const o=this.defaultQueryOptions({queryKey:s});return(a=N(this,Qe).get(o.queryHash))==null?void 0:a.state}removeQueries(s){const o=N(this,Qe);it.batch(()=>{o.findAll(s).forEach(a=>{o.remove(a)})})}resetQueries(s,o){const a=N(this,Qe);return it.batch(()=>(a.findAll(s).forEach(d=>{d.reset()}),this.refetchQueries({type:"active",...s},o)))}cancelQueries(s,o={}){const a={revert:!0,...o},d=it.batch(()=>N(this,Qe).findAll(s).map(u=>u.cancel(a)));return Promise.all(d).then(Ct).catch(Ct)}invalidateQueries(s,o={}){return it.batch(()=>(N(this,Qe).findAll(s).forEach(a=>{a.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},o)))}refetchQueries(s,o={}){const a={...o,cancelRefetch:o.cancelRefetch??!0},d=it.batch(()=>N(this,Qe).findAll(s).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let f=u.fetch(void 0,a);return a.throwOnError||(f=f.catch(Ct)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(d).then(Ct)}fetchQuery(s){const o=this.defaultQueryOptions(s);o.retry===void 0&&(o.retry=!1);const a=N(this,Qe).build(this,o);return a.isStaleByTime(an(o.staleTime,a))?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(Ct).catch(Ct)}fetchInfiniteQuery(s){return s._type="infinite",this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(Ct).catch(Ct)}ensureInfiniteQueryData(s){return s._type="infinite",this.ensureQueryData(s)}resumePausedMutations(){return Da.isOnline()?N(this,sn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Qe)}getMutationCache(){return N(this,sn)}getDefaultOptions(){return N(this,on)}setDefaultOptions(s){oe(this,on,s)}setQueryDefaults(s,o){N(this,Ts).set(Bo(s),{queryKey:s,defaultOptions:o})}getQueryDefaults(s){const o=[...N(this,Ts).values()],a={};return o.forEach(d=>{Ho(s,d.queryKey)&&Object.assign(a,d.defaultOptions)}),a}setMutationDefaults(s,o){N(this,Ls).set(Bo(s),{mutationKey:s,defaultOptions:o})}getMutationDefaults(s){const o=[...N(this,Ls).values()],a={};return o.forEach(d=>{Ho(s,d.mutationKey)&&Object.assign(a,d.defaultOptions)}),a}defaultQueryOptions(s){if(s._defaulted)return s;const o={...N(this,on).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return o.queryHash||(o.queryHash=yc(o.queryKey,o)),o.refetchOnReconnect===void 0&&(o.refetchOnReconnect=o.networkMode!=="always"),o.throwOnError===void 0&&(o.throwOnError=!!o.suspense),!o.networkMode&&o.persister&&(o.networkMode="offlineFirst"),o.queryFn===bc&&(o.enabled=!1),o}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...N(this,on).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){N(this,Qe).clear(),N(this,sn).clear()}},Qe=new WeakMap,sn=new WeakMap,on=new WeakMap,Ts=new WeakMap,Ls=new WeakMap,ln=new WeakMap,zs=new WeakMap,Fs=new WeakMap,fm),Cm=g.createContext(void 0),fn=s=>{const o=g.useContext(Cm);if(!o)throw new Error("No QueryClient set, use QueryClientProvider to set one");return o},s0=({client:s,children:o})=>(g.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),r.jsx(Cm.Provider,{value:s,children:o})),Em=g.createContext(!1),o0=()=>g.useContext(Em);Em.Provider;function l0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var a0=g.createContext(l0()),i0=()=>g.useContext(a0),d0=(s,o,a)=>{const d=a!=null&&a.state.error&&typeof s.throwOnError=="function"?ym(s.throwOnError,[a.state.error,a]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||d)&&(o.isReset()||(s.retryOnMount=!1))},c0=s=>{g.useEffect(()=>{s.clearReset()},[s])},u0=({result:s,errorResetBoundary:o,throwOnError:a,query:d,suspense:u})=>s.isError&&!o.isReset()&&!s.isFetching&&d&&(u&&s.data===void 0||ym(a,[s.error,d])),f0=s=>{if(s.suspense){const a=u=>u==="static"?u:Math.max(u??1e3,1e3),d=s.staleTime;s.staleTime=typeof d=="function"?(...u)=>a(d(...u)):a(d),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},p0=(s,o)=>s.isLoading&&s.isFetching&&!o,m0=(s,o)=>(s==null?void 0:s.suspense)&&o.isPending,Mp=(s,o,a)=>o.fetchOptimistic(s).catch(()=>{a.clearReset()});function h0(s,o,a){var R,A,E,k;const d=o0(),u=i0(),f=fn(),h=f.defaultQueryOptions(s);(A=(R=f.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||A.call(R,h);const p=f.getQueryCache().get(h.queryHash),v=s.subscribed!==!1;h._optimisticResults=d?"isRestoring":v?"optimistic":void 0,f0(h),d0(h,u,p),c0(u);const x=!f.getQueryCache().get(h.queryHash),[b]=g.useState(()=>new o(f,h)),w=b.getOptimisticResult(h),P=!d&&v;if(g.useSyncExternalStore(g.useCallback(S=>{const I=P?b.subscribe(it.batchCalls(S)):Ct;return b.updateResult(),I},[b,P]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),g.useEffect(()=>{b.setOptions(h)},[h,b]),m0(h,w))throw Mp(h,b,u);if(u0({result:w,errorResetBoundary:u,throwOnError:h.throwOnError,query:p,suspense:h.suspense}))throw w.error;if((k=(E=f.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||k.call(E,h,w),h.experimental_prefetchInRender&&!Go.isServer()&&p0(w,d)){const S=x?Mp(h,b,u):p==null?void 0:p.promise;S==null||S.catch(Ct).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?w:b.trackResult(w)}function _t(s,o){return h0(s,Zg)}/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x0=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_m=(...s)=>s.filter((o,a,d)=>!!o&&o.trim()!==""&&d.indexOf(o)===a).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 g0={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 v0=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:d,className:u="",children:f,iconNode:h,...p},v)=>g.createElement("svg",{ref:v,...g0,width:o,height:o,stroke:s,strokeWidth:d?Number(a)*24/Number(o):a,className:_m("lucide",u),...p},[...h.map(([x,b])=>g.createElement(x,b)),...Array.isArray(f)?f:[f]]));/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ge=(s,o)=>{const a=g.forwardRef(({className:d,...u},f)=>g.createElement(v0,{ref:f,iconNode:o,className:_m(`lucide-${x0(s)}`,d),...u}));return a.displayName=`${s}`,a};/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vo=ge("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pp=ge("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mm=ge("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Is=ge("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y0=ge("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wo=ge("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cr=ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b0=ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const w0=ge("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const j0=ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k0=ge("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const N0=ge("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S0=ge("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sc=ge("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const C0=ge("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const E0=ge("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oc=ge("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _0=ge("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pm=ge("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lt=ge("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cn=ge("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ta=ge("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rp=ge("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lc=ge("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M0=ge("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P0=ge("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ra=ge("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R0=ge("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O0=ge("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ko=ge("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const A0=ge("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const D0=ge("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T0=ge("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const L0=ge("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z0=ge("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rm=ge("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Om=ge("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Un=ge("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F0=ge("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I0=ge("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jc=ge("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $0=ge("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U0=ge("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $s=ge("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const B0=ge("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Am=ge("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H0=ge("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const La=ge("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ac=ge("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qo=ge("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const G0=ge("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qo=ge("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sr=ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ks=ge("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),ic=[{id:"dashboard",label:"Zentrale",hint:"System- & Stack-Status",icon:A0},{id:"models",label:"Modell-Manager",hint:"Verwalten, laden & Gateway-Routing",icon:y0},{id:"system",label:"Diagnose",hint:"Metriken, Dienste, Logs",icon:Lt},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Wo},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:z0},{id:"agent",label:"Hermes",hint:"Agent-Status & AnythingLLM öffnen",icon:Is},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:N0}];var Op=1,V0=.9,W0=.8,K0=.17,Od=.1,Ad=.999,Q0=.9999,q0=.99,Z0=/[\\\/_+.#"@\[\(\{&]/,Y0=/[\\\/_+.#"@\[\(\{&]/g,J0=/[\s-]/,Dm=/[\s-]/g;function dc(s,o,a,d,u,f,h){if(f===o.length)return u===s.length?Op:q0;var p=`${u},${f}`;if(h[p]!==void 0)return h[p];for(var v=d.charAt(f),x=a.indexOf(v,u),b=0,w,P,R,A;x>=0;)w=dc(s,o,a,d,x+1,f+1,h),w>b&&(x===u?w*=Op:Z0.test(s.charAt(x-1))?(w*=W0,R=s.slice(u,x-1).match(Y0),R&&u>0&&(w*=Math.pow(Ad,R.length))):J0.test(s.charAt(x-1))?(w*=V0,A=s.slice(u,x-1).match(Dm),A&&u>0&&(w*=Math.pow(Ad,A.length))):(w*=K0,u>0&&(w*=Math.pow(Ad,x-u))),s.charAt(x)!==o.charAt(f)&&(w*=Q0)),(ww&&(w=P*Od)),w>b&&(b=w),x=a.indexOf(v,x+1);return h[p]=b,b}function Ap(s){return s.toLowerCase().replace(Dm," ")}function X0(s,o,a){return s=a&&a.length>0?`${s+" "+a.join(" ")}`:s,dc(s,o,Ap(s),Ap(o),0,0,{})}function dn(s,o,{checkForDefaultPrevented:a=!0}={}){return function(u){if(s==null||s(u),a===!1||!u.defaultPrevented)return o==null?void 0:o(u)}}function Dp(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Us(...s){return o=>{let a=!1;const d=s.map(u=>{const f=Dp(u,o);return!a&&typeof f=="function"&&(a=!0),f});if(a)return()=>{for(let u=0;u{var S;const{scope:P,children:R,...A}=w,E=((S=P==null?void 0:P[s])==null?void 0:S[v])||p,k=g.useMemo(()=>A,Object.values(A));return r.jsx(E.Provider,{value:k,children:R})};x.displayName=f+"Provider";function b(w,P){var E;const R=((E=P==null?void 0:P[s])==null?void 0:E[v])||p,A=g.useContext(R);if(A)return A;if(h!==void 0)return h;throw new Error(`\`${w}\` must be used within \`${f}\``)}return[x,b]}const u=()=>{const f=a.map(h=>g.createContext(h));return function(p){const v=(p==null?void 0:p[s])||f;return g.useMemo(()=>({[`__scope${s}`]:{...p,[s]:v}}),[p,v])}};return u.scopeName=s,[d,tv(u,...o)]}function tv(...s){const o=s[0];if(s.length===1)return o;const a=()=>{const d=s.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const h=d.reduce((p,{useScope:v,scopeName:x})=>{const w=v(f)[`__scope${x}`];return{...p,...w}},{});return g.useMemo(()=>({[`__scope${o.scopeName}`]:h}),[h])}};return a.scopeName=o.scopeName,a}var Zo=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},rv=gc[" useId ".trim().toString()]||(()=>{}),nv=0;function Cr(s){const[o,a]=g.useState(rv());return Zo(()=>{a(d=>d??String(nv++))},[s]),o?`radix-${o}`:""}var sv=gc[" useInsertionEffect ".trim().toString()]||Zo;function ov({prop:s,defaultProp:o,onChange:a=()=>{},caller:d}){const[u,f,h]=lv({defaultProp:o,onChange:a}),p=s!==void 0,v=p?s:u;{const b=g.useRef(s!==void 0);g.useEffect(()=>{const w=b.current;w!==p&&console.warn(`${d} is changing from ${w?"controlled":"uncontrolled"} to ${p?"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.`),b.current=p},[p,d])}const x=g.useCallback(b=>{var w;if(p){const P=av(b)?b(s):b;P!==s&&((w=h.current)==null||w.call(h,P))}else f(b)},[p,s,f,h]);return[v,x]}function lv({defaultProp:s,onChange:o}){const[a,d]=g.useState(s),u=g.useRef(a),f=g.useRef(o);return sv(()=>{f.current=o},[o]),g.useEffect(()=>{var h;u.current!==a&&((h=f.current)==null||h.call(f,a),u.current=a)},[a,u]),[a,d,f]}function av(s){return typeof s=="function"}var Tm=hm();function Lm(s){const o=g.forwardRef((a,d)=>{let{children:u,...f}=a,h=null,p=!1;const v=[];Tp(u)&&typeof wa=="function"&&(u=wa(u._payload)),g.Children.forEach(u,P=>{var R;if(fv(P)){p=!0;const A=P;let E="child"in A.props?A.props.child:A.props.children;Tp(E)&&typeof wa=="function"&&(E=wa(E._payload)),h=dv(A,E),v.push((R=h==null?void 0:h.props)==null?void 0:R.children)}else v.push(P)}),h?h=g.cloneElement(h,void 0,v):!p&&g.Children.count(u)===1&&g.isValidElement(u)&&(h=u);const x=h?uv(h):void 0,b=Hn(d,x);if(!h){if(u||u===0)throw new Error(p?xv(s):hv(s));return u}const w=cv(f,h.props??{});return h.type!==g.Fragment&&(w.ref=d?b:x),g.cloneElement(h,w)});return o.displayName=`${s}.Slot`,o}var iv=Symbol.for("radix.slottable"),dv=(s,o)=>{if("child"in s.props){const a=s.props.child;return g.isValidElement(a)?g.cloneElement(a,void 0,s.props.children(a.props.children)):null}return g.isValidElement(o)?o:null};function cv(s,o){const a={...o};for(const d in o){const u=s[d],f=o[d];/^on[A-Z]/.test(d)?u&&f?a[d]=(...p)=>{const v=f(...p);return u(...p),v}:u&&(a[d]=u):d==="style"?a[d]={...u,...f}:d==="className"&&(a[d]=[u,f].filter(Boolean).join(" "))}return{...s,...a}}function uv(s){var d,u;let o=(d=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:d.get,a=o&&"isReactWarning"in o&&o.isReactWarning;return a?s.ref:(o=(u=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:u.get,a=o&&"isReactWarning"in o&&o.isReactWarning,a?s.props.ref:s.props.ref||s.ref)}function fv(s){return g.isValidElement(s)&&typeof s.type=="function"&&"__radixId"in s.type&&s.type.__radixId===iv}var pv=Symbol.for("react.lazy");function Tp(s){return s!=null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===pv&&"_payload"in s&&mv(s._payload)}function mv(s){return typeof s=="object"&&s!==null&&"then"in s}var hv=s=>`${s} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,xv=s=>`${s} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,wa=gc[" use ".trim().toString()],gv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dt=gv.reduce((s,o)=>{const a=Lm(`Primitive.${o}`),d=g.forwardRef((u,f)=>{const{asChild:h,...p}=u,v=h?a:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(v,{...p,ref:f})});return d.displayName=`Primitive.${o}`,{...s,[o]:d}},{});function vv(s,o){s&&Tm.flushSync(()=>s.dispatchEvent(o))}function Yo(s){const o=g.useRef(s);return g.useEffect(()=>{o.current=s}),g.useMemo(()=>((...a)=>{var d;return(d=o.current)==null?void 0:d.call(o,...a)}),[])}function yv(s,o=globalThis==null?void 0:globalThis.document){const a=Yo(s);g.useEffect(()=>{const d=u=>{u.key==="Escape"&&a(u)};return o.addEventListener("keydown",d,{capture:!0}),()=>o.removeEventListener("keydown",d,{capture:!0})},[a,o])}var bv="DismissableLayer",cc="dismissableLayer.update",wv="dismissableLayer.pointerDownOutside",jv="dismissableLayer.focusOutside",Lp,kc=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),zm=g.forwardRef((s,o)=>{const{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:d=!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:v,...x}=s,b=g.useContext(kc),[w,P]=g.useState(null),R=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,A]=g.useState({}),E=Hn(o,le=>P(le)),k=Array.from(b.layers),[S]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),I=k.indexOf(S),B=w?k.indexOf(w):-1,L=b.layersWithOutsidePointerEventsDisabled.size>0,$=B>=I,z=g.useRef(!1),H=Cv(le=>{const xe=le.target;if(!(xe instanceof Node))return;const je=[...b.branches].some(V=>V.contains(xe));!$||je||(f==null||f(le),p==null||p(le),le.defaultPrevented||v==null||v())},{ownerDocument:R,deferPointerDownOutside:d,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:b.dismissableSurfaces}),ne=Ev(le=>{if(d&&z.current)return;const xe=le.target;[...b.branches].some(V=>V.contains(xe))||(h==null||h(le),p==null||p(le),le.defaultPrevented||v==null||v())},R);return yv(le=>{B===b.layers.size-1&&(u==null||u(le),!le.defaultPrevented&&v&&(le.preventDefault(),v()))},R),g.useEffect(()=>{if(w)return a&&(b.layersWithOutsidePointerEventsDisabled.size===0&&(Lp=R.body.style.pointerEvents,R.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(w)),b.layers.add(w),zp(),()=>{a&&(b.layersWithOutsidePointerEventsDisabled.delete(w),b.layersWithOutsidePointerEventsDisabled.size===0&&(R.body.style.pointerEvents=Lp))}},[w,R,a,b]),g.useEffect(()=>()=>{w&&(b.layers.delete(w),b.layersWithOutsidePointerEventsDisabled.delete(w),zp())},[w,b]),g.useEffect(()=>{const le=()=>A({});return document.addEventListener(cc,le),()=>document.removeEventListener(cc,le)},[]),r.jsx(dt.div,{...x,ref:E,style:{pointerEvents:L?$?"auto":"none":void 0,...s.style},onFocusCapture:dn(s.onFocusCapture,ne.onFocusCapture),onBlurCapture:dn(s.onBlurCapture,ne.onBlurCapture),onPointerDownCapture:dn(s.onPointerDownCapture,H.onPointerDownCapture)})});zm.displayName=bv;var kv="DismissableLayerBranch",Nv=g.forwardRef((s,o)=>{const a=g.useContext(kc),d=g.useRef(null),u=Hn(o,d);return g.useEffect(()=>{const f=d.current;if(f)return a.branches.add(f),()=>{a.branches.delete(f)}},[a.branches]),r.jsx(dt.div,{...s,ref:u})});Nv.displayName=kv;function Sv(){const s=g.useContext(kc),[o,a]=g.useState(null);return g.useEffect(()=>{if(o)return s.dismissableSurfaces.add(o),()=>{s.dismissableSurfaces.delete(o)}},[o,s.dismissableSurfaces]),a}function Cv(s,o){const{ownerDocument:a=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:d=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f}=o,h=Yo(s),p=g.useRef(!1),v=g.useRef(!1),x=g.useRef(new Map),b=g.useRef(()=>{});return g.useEffect(()=>{function w(){v.current=!1,u.current=!1,x.current.clear()}function P(){return Array.from(x.current.values()).some(Boolean)}function R(I){if(!v.current)return;const B=I.target;B instanceof Node&&[...f].some($=>$.contains(B))||x.current.set(I.type,!0),I.type==="click"&&window.setTimeout(()=>{v.current&&b.current()},0)}function A(I){v.current&&x.current.set(I.type,!1)}const E=I=>{if(I.target&&!p.current){let B=function(){a.removeEventListener("click",b.current);const $=P();w(),$||Fm(wv,h,L,{discrete:!0})};const L={originalEvent:I};v.current=!0,u.current=d&&I.button===0,x.current.clear(),!d||I.button!==0?B():(a.removeEventListener("click",b.current),b.current=B,a.addEventListener("click",b.current,{once:!0}))}else a.removeEventListener("click",b.current),w();p.current=!1},k=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const I of k)a.addEventListener(I,R,!0),a.addEventListener(I,A);const S=window.setTimeout(()=>{a.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(S),a.removeEventListener("pointerdown",E),a.removeEventListener("click",b.current);for(const I of k)a.removeEventListener(I,R,!0),a.removeEventListener(I,A)}},[a,h,d,u,f]),{onPointerDownCapture:()=>p.current=!0}}function Ev(s,o=globalThis==null?void 0:globalThis.document){const a=Yo(s),d=g.useRef(!1);return g.useEffect(()=>{const u=f=>{f.target&&!d.current&&Fm(jv,a,{originalEvent:f},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,a]),{onFocusCapture:()=>d.current=!0,onBlurCapture:()=>d.current=!1}}function zp(){const s=new CustomEvent(cc);document.dispatchEvent(s)}function Fm(s,o,a,{discrete:d}){const u=a.originalEvent.target,f=new CustomEvent(s,{bubbles:!1,cancelable:!0,detail:a});o&&u.addEventListener(s,o,{once:!0}),d?vv(u,f):u.dispatchEvent(f)}var Dd="focusScope.autoFocusOnMount",Td="focusScope.autoFocusOnUnmount",Fp={bubbles:!1,cancelable:!0},_v="FocusScope",Im=g.forwardRef((s,o)=>{const{loop:a=!1,trapped:d=!1,onMountAutoFocus:u,onUnmountAutoFocus:f,...h}=s,[p,v]=g.useState(null),x=Yo(u),b=Yo(f),w=g.useRef(null),P=Hn(o,E=>v(E)),R=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(d){let E=function(B){if(R.paused||!p)return;const L=B.target;p.contains(L)?w.current=L:Jr(w.current,{select:!0})},k=function(B){if(R.paused||!p)return;const L=B.relatedTarget;L!==null&&(p.contains(L)||Jr(w.current,{select:!0}))},S=function(B){if(document.activeElement===document.body)for(const $ of B)$.removedNodes.length>0&&Jr(p)};document.addEventListener("focusin",E),document.addEventListener("focusout",k);const I=new MutationObserver(S);return p&&I.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",k),I.disconnect()}}},[d,p,R.paused]),g.useEffect(()=>{if(p){$p.add(R);const E=document.activeElement;if(!p.contains(E)){const S=new CustomEvent(Dd,Fp);p.addEventListener(Dd,x),p.dispatchEvent(S),S.defaultPrevented||(Mv(Dv($m(p)),{select:!0}),document.activeElement===E&&Jr(p))}return()=>{p.removeEventListener(Dd,x),setTimeout(()=>{const S=new CustomEvent(Td,Fp);p.addEventListener(Td,b),p.dispatchEvent(S),S.defaultPrevented||Jr(E??document.body,{select:!0}),p.removeEventListener(Td,b),$p.remove(R)},0)}}},[p,x,b,R]);const A=g.useCallback(E=>{if(!a&&!d||R.paused)return;const k=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,S=document.activeElement;if(k&&S){const I=E.currentTarget,[B,L]=Pv(I);B&&L?!E.shiftKey&&S===L?(E.preventDefault(),a&&Jr(B,{select:!0})):E.shiftKey&&S===B&&(E.preventDefault(),a&&Jr(L,{select:!0})):S===I&&E.preventDefault()}},[a,d,R.paused]);return r.jsx(dt.div,{tabIndex:-1,...h,ref:P,onKeyDown:A})});Im.displayName=_v;function Mv(s,{select:o=!1}={}){const a=document.activeElement;for(const d of s)if(Jr(d,{select:o}),document.activeElement!==a)return}function Pv(s){const o=$m(s),a=Ip(o,s),d=Ip(o.reverse(),s);return[a,d]}function $m(s){const o=[],a=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:d=>{const u=d.tagName==="INPUT"&&d.type==="hidden";return d.disabled||d.hidden||u?NodeFilter.FILTER_SKIP:d.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)o.push(a.currentNode);return o}function Ip(s,o){for(const a of s)if(!Rv(a,{upTo:o}))return a}function Rv(s,{upTo:o}){if(getComputedStyle(s).visibility==="hidden")return!0;for(;s;){if(o!==void 0&&s===o)return!1;if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}function Ov(s){return s instanceof HTMLInputElement&&"select"in s}function Jr(s,{select:o=!1}={}){if(s&&s.focus){const a=document.activeElement;s.focus({preventScroll:!0}),s!==a&&Ov(s)&&o&&s.select()}}var $p=Av();function Av(){let s=[];return{add(o){const a=s[0];o!==a&&(a==null||a.pause()),s=Up(s,o),s.unshift(o)},remove(o){var a;s=Up(s,o),(a=s[0])==null||a.resume()}}}function Up(s,o){const a=[...s],d=a.indexOf(o);return d!==-1&&a.splice(d,1),a}function Dv(s){return s.filter(o=>o.tagName!=="A")}var Tv="Portal",Um=g.forwardRef((s,o)=>{var p;const{container:a,...d}=s,[u,f]=g.useState(!1);Zo(()=>f(!0),[]);const h=a||u&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return h?Tm.createPortal(r.jsx(dt.div,{...d,ref:o}),h):null});Um.displayName=Tv;function Lv(s,o){return g.useReducer((a,d)=>o[a][d]??a,s)}var Fa=s=>{const{present:o,children:a}=s,d=zv(o),u=typeof a=="function"?a({present:d.isPresent}):g.Children.only(a),f=Fv(d.ref,Iv(u));return typeof a=="function"||d.isPresent?g.cloneElement(u,{ref:f}):null};Fa.displayName="Presence";function zv(s){const[o,a]=g.useState(),d=g.useRef(null),u=g.useRef(s),f=g.useRef("none"),h=s?"mounted":"unmounted",[p,v]=Lv(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const x=ja(d.current);f.current=p==="mounted"?x:"none"},[p]),Zo(()=>{const x=d.current,b=u.current;if(b!==s){const P=f.current,R=ja(x);s?v("MOUNT"):R==="none"||(x==null?void 0:x.display)==="none"?v("UNMOUNT"):v(b&&P!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=s}},[s,v]),Zo(()=>{if(o){let x;const b=o.ownerDocument.defaultView??window,w=R=>{const E=ja(d.current).includes(CSS.escape(R.animationName));if(R.target===o&&E&&(v("ANIMATION_END"),!u.current)){const k=o.style.animationFillMode;o.style.animationFillMode="forwards",x=b.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=k)})}},P=R=>{R.target===o&&(f.current=ja(d.current))};return o.addEventListener("animationstart",P),o.addEventListener("animationcancel",w),o.addEventListener("animationend",w),()=>{b.clearTimeout(x),o.removeEventListener("animationstart",P),o.removeEventListener("animationcancel",w),o.removeEventListener("animationend",w)}}else v("ANIMATION_END")},[o,v]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:g.useCallback(x=>{d.current=x?getComputedStyle(x):null,a(x)},[])}}function Bp(s,o){if(typeof s=="function")return s(o);s!=null&&(s.current=o)}function Fv(...s){const o=g.useRef(s);return o.current=s,g.useCallback(a=>{const d=o.current;let u=!1;const f=d.map(h=>{const p=Bp(h,a);return!u&&typeof p=="function"&&(u=!0),p});if(u)return()=>{for(let h=0;h{or||(or={start:Hp(),end:Hp()});const{start:s,end:o}=or;return document.body.firstElementChild!==s&&document.body.insertAdjacentElement("afterbegin",s),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),ka++,()=>{ka===1&&(or==null||or.start.remove(),or==null||or.end.remove(),or=null),ka=Math.max(0,ka-1)}},[])}function Hp(){const s=document.createElement("span");return s.setAttribute("data-radix-focus-guard",""),s.tabIndex=0,s.style.outline="none",s.style.opacity="0",s.style.position="fixed",s.style.pointerEvents="none",s}var dr=function(){return dr=Object.assign||function(o){for(var a,d=1,u=arguments.length;d"u")return ny;var o=sy(s),a=document.documentElement.clientWidth,d=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,d-a+o[2]-o[0])}},ly=Vm(),Ns="data-scroll-locked",ay=function(s,o,a,d){var u=s.left,f=s.top,h=s.right,p=s.gap;return a===void 0&&(a="margin"),` - .`.concat(Bv,` { - overflow: hidden `).concat(d,`; - padding-right: `).concat(p,"px ").concat(d,`; - } - body[`).concat(Ns,`] { - overflow: hidden `).concat(d,`; - overscroll-behavior: contain; - `).concat([o&&"position: relative ".concat(d,";"),a==="margin"&&` - padding-left: `.concat(u,`px; - padding-top: `).concat(f,`px; - padding-right: `).concat(h,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(p,"px ").concat(d,`; - `),a==="padding"&&"padding-right: ".concat(p,"px ").concat(d,";")].filter(Boolean).join(""),` - } - - .`).concat(Oa,` { - right: `).concat(p,"px ").concat(d,`; - } - - .`).concat(Aa,` { - margin-right: `).concat(p,"px ").concat(d,`; - } - - .`).concat(Oa," .").concat(Oa,` { - right: 0 `).concat(d,`; - } - - .`).concat(Aa," .").concat(Aa,` { - margin-right: 0 `).concat(d,`; - } - - body[`).concat(Ns,`] { - `).concat(Hv,": ").concat(p,`px; - } -`)},Vp=function(){var s=parseInt(document.body.getAttribute(Ns)||"0",10);return isFinite(s)?s:0},iy=function(){g.useEffect(function(){return document.body.setAttribute(Ns,(Vp()+1).toString()),function(){var s=Vp()-1;s<=0?document.body.removeAttribute(Ns):document.body.setAttribute(Ns,s.toString())}},[])},dy=function(s){var o=s.noRelative,a=s.noImportant,d=s.gapMode,u=d===void 0?"margin":d;iy();var f=g.useMemo(function(){return oy(u)},[u]);return g.createElement(ly,{styles:ay(f,!o,u,a?"":"!important")})},uc=!1;if(typeof window<"u")try{var Na=Object.defineProperty({},"passive",{get:function(){return uc=!0,!0}});window.addEventListener("test",Na,Na),window.removeEventListener("test",Na,Na)}catch{uc=!1}var gs=uc?{passive:!1}:!1,cy=function(s){return s.tagName==="TEXTAREA"},Wm=function(s,o){if(!(s instanceof Element))return!1;var a=window.getComputedStyle(s);return a[o]!=="hidden"&&!(a.overflowY===a.overflowX&&!cy(s)&&a[o]==="visible")},uy=function(s){return Wm(s,"overflowY")},fy=function(s){return Wm(s,"overflowX")},Wp=function(s,o){var a=o.ownerDocument,d=o;do{typeof ShadowRoot<"u"&&d instanceof ShadowRoot&&(d=d.host);var u=Km(s,d);if(u){var f=Qm(s,d),h=f[1],p=f[2];if(h>p)return!0}d=d.parentNode}while(d&&d!==a.body);return!1},py=function(s){var o=s.scrollTop,a=s.scrollHeight,d=s.clientHeight;return[o,a,d]},my=function(s){var o=s.scrollLeft,a=s.scrollWidth,d=s.clientWidth;return[o,a,d]},Km=function(s,o){return s==="v"?uy(o):fy(o)},Qm=function(s,o){return s==="v"?py(o):my(o)},hy=function(s,o){return s==="h"&&o==="rtl"?-1:1},xy=function(s,o,a,d,u){var f=hy(s,window.getComputedStyle(o).direction),h=f*d,p=a.target,v=o.contains(p),x=!1,b=h>0,w=0,P=0;do{if(!p)break;var R=Qm(s,p),A=R[0],E=R[1],k=R[2],S=E-k-f*A;(A||S)&&Km(s,p)&&(w+=S,P+=A);var I=p.parentNode;p=I&&I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?I.host:I}while(!v&&p!==document.body||v&&(o.contains(p)||o===p));return(b&&Math.abs(w)<1||!b&&Math.abs(P)<1)&&(x=!0),x},Sa=function(s){return"changedTouches"in s?[s.changedTouches[0].clientX,s.changedTouches[0].clientY]:[0,0]},Kp=function(s){return[s.deltaX,s.deltaY]},Qp=function(s){return s&&"current"in s?s.current:s},gy=function(s,o){return s[0]===o[0]&&s[1]===o[1]},vy=function(s){return` - .block-interactivity-`.concat(s,` {pointer-events: none;} - .allow-interactivity-`).concat(s,` {pointer-events: all;} -`)},yy=0,vs=[];function by(s){var o=g.useRef([]),a=g.useRef([0,0]),d=g.useRef(),u=g.useState(yy++)[0],f=g.useState(Vm)[0],h=g.useRef(s);g.useEffect(function(){h.current=s},[s]),g.useEffect(function(){if(s.inert){document.body.classList.add("block-interactivity-".concat(u));var E=Uv([s.lockRef.current],(s.shards||[]).map(Qp),!0).filter(Boolean);return E.forEach(function(k){return k.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),E.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(u))})}}},[s.inert,s.lockRef.current,s.shards]);var p=g.useCallback(function(E,k){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!h.current.allowPinchZoom;var S=Sa(E),I=a.current,B="deltaX"in E?E.deltaX:I[0]-S[0],L="deltaY"in E?E.deltaY:I[1]-S[1],$,z=E.target,H=Math.abs(B)>Math.abs(L)?"h":"v";if("touches"in E&&H==="h"&&z.type==="range")return!1;var ne=window.getSelection(),le=ne&&ne.anchorNode,xe=le?le===z||le.contains(z):!1;if(xe)return!1;var je=Wp(H,z);if(!je)return!0;if(je?$=H:($=H==="v"?"h":"v",je=Wp(H,z)),!je)return!1;if(!d.current&&"changedTouches"in E&&(B||L)&&(d.current=$),!$)return!0;var V=d.current||$;return xy(V,k,E,V==="h"?B:L)},[]),v=g.useCallback(function(E){var k=E;if(!(!vs.length||vs[vs.length-1]!==f)){var S="deltaY"in k?Kp(k):Sa(k),I=o.current.filter(function($){return $.name===k.type&&($.target===k.target||k.target===$.shadowParent)&&gy($.delta,S)})[0];if(I&&I.should){k.cancelable&&k.preventDefault();return}if(!I){var B=(h.current.shards||[]).map(Qp).filter(Boolean).filter(function($){return $.contains(k.target)}),L=B.length>0?p(k,B[0]):!h.current.noIsolation;L&&k.cancelable&&k.preventDefault()}}},[]),x=g.useCallback(function(E,k,S,I){var B={name:E,delta:k,target:S,should:I,shadowParent:wy(S)};o.current.push(B),setTimeout(function(){o.current=o.current.filter(function(L){return L!==B})},1)},[]),b=g.useCallback(function(E){a.current=Sa(E),d.current=void 0},[]),w=g.useCallback(function(E){x(E.type,Kp(E),E.target,p(E,s.lockRef.current))},[]),P=g.useCallback(function(E){x(E.type,Sa(E),E.target,p(E,s.lockRef.current))},[]);g.useEffect(function(){return vs.push(f),s.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:P}),document.addEventListener("wheel",v,gs),document.addEventListener("touchmove",v,gs),document.addEventListener("touchstart",b,gs),function(){vs=vs.filter(function(E){return E!==f}),document.removeEventListener("wheel",v,gs),document.removeEventListener("touchmove",v,gs),document.removeEventListener("touchstart",b,gs)}},[]);var R=s.removeScrollBar,A=s.inert;return g.createElement(g.Fragment,null,A?g.createElement(f,{styles:vy(u)}):null,R?g.createElement(dy,{noRelative:s.noRelative,gapMode:s.gapMode}):null)}function wy(s){for(var o=null;s!==null;)s instanceof ShadowRoot&&(o=s.host,s=s.host),s=s.parentNode;return o}const jy=Zv(Gm,by);var qm=g.forwardRef(function(s,o){return g.createElement(Ia,dr({},s,{ref:o,sideCar:jy}))});qm.classNames=Ia.classNames;var ky=function(s){if(typeof document>"u")return null;var o=Array.isArray(s)?s[0]:s;return o.ownerDocument.body},ys=new WeakMap,Ca=new WeakMap,Ea={},Id=0,Zm=function(s){return s&&(s.host||Zm(s.parentNode))},Ny=function(s,o){return o.map(function(a){if(s.contains(a))return a;var d=Zm(a);return d&&s.contains(d)?d:(console.error("aria-hidden",a,"in not contained inside",s,". Doing nothing"),null)}).filter(function(a){return!!a})},Sy=function(s,o,a,d){var u=Ny(o,Array.isArray(s)?s:[s]);Ea[a]||(Ea[a]=new WeakMap);var f=Ea[a],h=[],p=new Set,v=new Set(u),x=function(w){!w||p.has(w)||(p.add(w),x(w.parentNode))};u.forEach(x);var b=function(w){!w||v.has(w)||Array.prototype.forEach.call(w.children,function(P){if(p.has(P))b(P);else try{var R=P.getAttribute(d),A=R!==null&&R!=="false",E=(ys.get(P)||0)+1,k=(f.get(P)||0)+1;ys.set(P,E),f.set(P,k),h.push(P),E===1&&A&&Ca.set(P,!0),k===1&&P.setAttribute(a,"true"),A||P.setAttribute(d,"true")}catch(S){console.error("aria-hidden: cannot operate on ",P,S)}})};return b(o),p.clear(),Id++,function(){h.forEach(function(w){var P=ys.get(w)-1,R=f.get(w)-1;ys.set(w,P),f.set(w,R),P||(Ca.has(w)||w.removeAttribute(d),Ca.delete(w)),R||w.removeAttribute(a)}),Id--,Id||(ys=new WeakMap,ys=new WeakMap,Ca=new WeakMap,Ea={})}},Cy=function(s,o,a){a===void 0&&(a="data-aria-hidden");var d=Array.from(Array.isArray(s)?s:[s]),u=ky(s);return u?(d.push.apply(d,Array.from(u.querySelectorAll("[aria-live], script"))),Sy(d,u,a,"aria-hidden")):function(){return null}},$a="Dialog",[Ym]=ev($a),[Ey,Xt]=Ym($a),Jm=s=>{const{__scopeDialog:o,children:a,open:d,defaultOpen:u,onOpenChange:f,modal:h=!0}=s,p=g.useRef(null),v=g.useRef(null),[x,b]=ov({prop:d,defaultProp:u??!1,onChange:f,caller:$a});return r.jsx(Ey,{scope:o,triggerRef:p,contentRef:v,contentId:Cr(),titleId:Cr(),descriptionId:Cr(),open:x,onOpenChange:b,onOpenToggle:g.useCallback(()=>b(w=>!w),[b]),modal:h,children:a})};Jm.displayName=$a;var Xm="DialogTrigger",_y=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Xt(Xm,a),f=Hn(o,u.triggerRef);return r.jsx(dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":Sc(u.open),...d,ref:f,onClick:dn(s.onClick,u.onOpenToggle)})});_y.displayName=Xm;var Nc="DialogPortal",[My,eh]=Ym(Nc,{forceMount:void 0}),th=s=>{const{__scopeDialog:o,forceMount:a,children:d,container:u}=s,f=Xt(Nc,o);return r.jsx(My,{scope:o,forceMount:a,children:g.Children.map(d,h=>r.jsx(Fa,{present:a||f.open,children:r.jsx(Um,{asChild:!0,container:u,children:h})}))})};th.displayName=Nc;var za="DialogOverlay",rh=g.forwardRef((s,o)=>{const a=eh(za,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Xt(za,s.__scopeDialog);return f.modal?r.jsx(Fa,{present:d||f.open,children:r.jsx(Ry,{...u,ref:o})}):null});rh.displayName=za;var Py=Lm("DialogOverlay.RemoveScroll"),Ry=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Xt(za,a),f=Sv(),h=Hn(o,f);return r.jsx(qm,{as:Py,allowPinchZoom:!0,shards:[u.contentRef],children:r.jsx(dt.div,{"data-state":Sc(u.open),...d,ref:h,style:{pointerEvents:"auto",...d.style}})})}),Bs="DialogContent",nh=g.forwardRef((s,o)=>{const a=eh(Bs,s.__scopeDialog),{forceMount:d=a.forceMount,...u}=s,f=Xt(Bs,s.__scopeDialog);return r.jsx(Fa,{present:d||f.open,children:f.modal?r.jsx(Oy,{...u,ref:o}):r.jsx(Ay,{...u,ref:o})})});nh.displayName=Bs;var Oy=g.forwardRef((s,o)=>{const a=Xt(Bs,s.__scopeDialog),d=g.useRef(null),u=Hn(o,a.contentRef,d);return g.useEffect(()=>{const f=d.current;if(f)return Cy(f)},[]),r.jsx(sh,{...s,ref:u,trapFocus:a.open,disableOutsidePointerEvents:a.open,onCloseAutoFocus:dn(s.onCloseAutoFocus,f=>{var h;f.preventDefault(),(h=a.triggerRef.current)==null||h.focus()}),onPointerDownOutside:dn(s.onPointerDownOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0;(h.button===2||p)&&f.preventDefault()}),onFocusOutside:dn(s.onFocusOutside,f=>f.preventDefault())})}),Ay=g.forwardRef((s,o)=>{const a=Xt(Bs,s.__scopeDialog),d=g.useRef(!1),u=g.useRef(!1);return r.jsx(sh,{...s,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:f=>{var h,p;(h=s.onCloseAutoFocus)==null||h.call(s,f),f.defaultPrevented||(d.current||(p=a.triggerRef.current)==null||p.focus(),f.preventDefault()),d.current=!1,u.current=!1},onInteractOutside:f=>{var v,x;(v=s.onInteractOutside)==null||v.call(s,f),f.defaultPrevented||(d.current=!0,f.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const h=f.target;((x=a.triggerRef.current)==null?void 0:x.contains(h))&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&u.current&&f.preventDefault()}})}),sh=g.forwardRef((s,o)=>{const{__scopeDialog:a,trapFocus:d,onOpenAutoFocus:u,onCloseAutoFocus:f,...h}=s,p=Xt(Bs,a);return $v(),r.jsx(r.Fragment,{children:r.jsx(Im,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:u,onUnmountAutoFocus:f,children:r.jsx(zm,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":Sc(p.open),...h,ref:o,deferPointerDownOutside:!0,onDismiss:()=>p.onOpenChange(!1)})})})}),oh="DialogTitle",Dy=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Xt(oh,a);return r.jsx(dt.h2,{id:u.titleId,...d,ref:o})});Dy.displayName=oh;var lh="DialogDescription",Ty=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Xt(lh,a);return r.jsx(dt.p,{id:u.descriptionId,...d,ref:o})});Ty.displayName=lh;var ah="DialogClose",Ly=g.forwardRef((s,o)=>{const{__scopeDialog:a,...d}=s,u=Xt(ah,a);return r.jsx(dt.button,{type:"button",...d,ref:o,onClick:dn(s.onClick,()=>u.onOpenChange(!1))})});Ly.displayName=ah;function Sc(s){return s?"open":"closed"}var Fo='[cmdk-group=""]',$d='[cmdk-group-items=""]',zy='[cmdk-group-heading=""]',ih='[cmdk-item=""]',qp=`${ih}:not([aria-disabled="true"])`,fc="cmdk-item-select",ws="data-value",Fy=(s,o,a)=>X0(s,o,a),dh=g.createContext(void 0),ol=()=>g.useContext(dh),ch=g.createContext(void 0),Cc=()=>g.useContext(ch),uh=g.createContext(void 0),fh=g.forwardRef((s,o)=>{let a=js(()=>{var C,Y;return{search:"",value:(Y=(C=s.value)!=null?C:s.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=js(()=>new Set),u=js(()=>new Map),f=js(()=>new Map),h=js(()=>new Set),p=ph(s),{label:v,children:x,value:b,onValueChange:w,filter:P,shouldFilter:R,loop:A,disablePointerSelection:E=!1,vimBindings:k=!0,...S}=s,I=Cr(),B=Cr(),L=Cr(),$=g.useRef(null),z=qy();Bn(()=>{if(b!==void 0){let C=b.trim();a.current.value=C,H.emit()}},[b]),Bn(()=>{z(6,Ee)},[]);let H=g.useMemo(()=>({subscribe:C=>(h.current.add(C),()=>h.current.delete(C)),snapshot:()=>a.current,setState:(C,Y,te)=>{var Q,re,ce,ke;if(!Object.is(a.current[C],Y)){if(a.current[C]=Y,C==="search")V(),xe(),z(1,je);else if(C==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(L);U?U.focus():(Q=document.getElementById(I))==null||Q.focus()}if(z(7,()=>{var U;a.current.selectedItemId=(U=me())==null?void 0:U.id,H.emit()}),te||z(5,Ee),((re=p.current)==null?void 0:re.value)!==void 0){let U=Y??"";(ke=(ce=p.current).onValueChange)==null||ke.call(ce,U);return}}H.emit()}},emit:()=>{h.current.forEach(C=>C())}}),[]),ne=g.useMemo(()=>({value:(C,Y,te)=>{var Q;Y!==((Q=f.current.get(C))==null?void 0:Q.value)&&(f.current.set(C,{value:Y,keywords:te}),a.current.filtered.items.set(C,le(Y,te)),z(2,()=>{xe(),H.emit()}))},item:(C,Y)=>(d.current.add(C),Y&&(u.current.has(Y)?u.current.get(Y).add(C):u.current.set(Y,new Set([C]))),z(3,()=>{V(),xe(),a.current.value||je(),H.emit()}),()=>{f.current.delete(C),d.current.delete(C),a.current.filtered.items.delete(C);let te=me();z(4,()=>{V(),(te==null?void 0:te.getAttribute("id"))===C&&je(),H.emit()})}),group:C=>(u.current.has(C)||u.current.set(C,new Set),()=>{f.current.delete(C),u.current.delete(C)}),filter:()=>p.current.shouldFilter,label:v||s["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:I,inputId:L,labelId:B,listInnerRef:$}),[]);function le(C,Y){var te,Q;let re=(Q=(te=p.current)==null?void 0:te.filter)!=null?Q:Fy;return C?re(C,a.current.search,Y):0}function xe(){if(!a.current.search||p.current.shouldFilter===!1)return;let C=a.current.filtered.items,Y=[];a.current.filtered.groups.forEach(Q=>{let re=u.current.get(Q),ce=0;re.forEach(ke=>{let U=C.get(ke);ce=Math.max(U,ce)}),Y.push([Q,ce])});let te=$.current;Re().sort((Q,re)=>{var ce,ke;let U=Q.getAttribute("id"),we=re.getAttribute("id");return((ce=C.get(we))!=null?ce:0)-((ke=C.get(U))!=null?ke:0)}).forEach(Q=>{let re=Q.closest($d);re?re.appendChild(Q.parentElement===re?Q:Q.closest(`${$d} > *`)):te.appendChild(Q.parentElement===te?Q:Q.closest(`${$d} > *`))}),Y.sort((Q,re)=>re[1]-Q[1]).forEach(Q=>{var re;let ce=(re=$.current)==null?void 0:re.querySelector(`${Fo}[${ws}="${encodeURIComponent(Q[0])}"]`);ce==null||ce.parentElement.appendChild(ce)})}function je(){let C=Re().find(te=>te.getAttribute("aria-disabled")!=="true"),Y=C==null?void 0:C.getAttribute(ws);H.setState("value",Y||void 0)}function V(){var C,Y,te,Q;if(!a.current.search||p.current.shouldFilter===!1){a.current.filtered.count=d.current.size;return}a.current.filtered.groups=new Set;let re=0;for(let ce of d.current){let ke=(Y=(C=f.current.get(ce))==null?void 0:C.value)!=null?Y:"",U=(Q=(te=f.current.get(ce))==null?void 0:te.keywords)!=null?Q:[],we=le(ke,U);a.current.filtered.items.set(ce,we),we>0&&re++}for(let[ce,ke]of u.current)for(let U of ke)if(a.current.filtered.items.get(U)>0){a.current.filtered.groups.add(ce);break}a.current.filtered.count=re}function Ee(){var C,Y,te;let Q=me();Q&&(((C=Q.parentElement)==null?void 0:C.firstChild)===Q&&((te=(Y=Q.closest(Fo))==null?void 0:Y.querySelector(zy))==null||te.scrollIntoView({block:"nearest"})),Q.scrollIntoView({block:"nearest"}))}function me(){var C;return(C=$.current)==null?void 0:C.querySelector(`${ih}[aria-selected="true"]`)}function Re(){var C;return Array.from(((C=$.current)==null?void 0:C.querySelectorAll(qp))||[])}function Te(C){let Y=Re()[C];Y&&H.setState("value",Y.getAttribute(ws))}function _e(C){var Y;let te=me(),Q=Re(),re=Q.findIndex(ke=>ke===te),ce=Q[re+C];(Y=p.current)!=null&&Y.loop&&(ce=re+C<0?Q[Q.length-1]:re+C===Q.length?Q[0]:Q[re+C]),ce&&H.setState("value",ce.getAttribute(ws))}function Z(C){let Y=me(),te=Y==null?void 0:Y.closest(Fo),Q;for(;te&&!Q;)te=C>0?Ky(te,Fo):Qy(te,Fo),Q=te==null?void 0:te.querySelector(qp);Q?H.setState("value",Q.getAttribute(ws)):_e(C)}let ae=()=>Te(Re().length-1),X=C=>{C.preventDefault(),C.metaKey?ae():C.altKey?Z(1):_e(1)},M=C=>{C.preventDefault(),C.metaKey?Te(0):C.altKey?Z(-1):_e(-1)};return g.createElement(dt.div,{ref:o,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:C=>{var Y;(Y=S.onKeyDown)==null||Y.call(S,C);let te=C.nativeEvent.isComposing||C.keyCode===229;if(!(C.defaultPrevented||te))switch(C.key){case"n":case"j":{k&&C.ctrlKey&&X(C);break}case"ArrowDown":{X(C);break}case"p":case"k":{k&&C.ctrlKey&&M(C);break}case"ArrowUp":{M(C);break}case"Home":{C.preventDefault(),Te(0);break}case"End":{C.preventDefault(),ae();break}case"Enter":{C.preventDefault();let Q=me();if(Q){let re=new Event(fc);Q.dispatchEvent(re)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:ne.inputId,id:ne.labelId,style:Yy},v),Ua(s,C=>g.createElement(ch.Provider,{value:H},g.createElement(dh.Provider,{value:ne},C))))}),Iy=g.forwardRef((s,o)=>{var a,d;let u=Cr(),f=g.useRef(null),h=g.useContext(uh),p=ol(),v=ph(s),x=(d=(a=v.current)==null?void 0:a.forceMount)!=null?d:h==null?void 0:h.forceMount;Bn(()=>{if(!x)return p.item(u,h==null?void 0:h.id)},[x]);let b=mh(u,f,[s.value,s.children,f],s.keywords),w=Cc(),P=un(z=>z.value&&z.value===b.current),R=un(z=>x||p.filter()===!1?!0:z.search?z.filtered.items.get(u)>0:!0);g.useEffect(()=>{let z=f.current;if(!(!z||s.disabled))return z.addEventListener(fc,A),()=>z.removeEventListener(fc,A)},[R,s.onSelect,s.disabled]);function A(){var z,H;E(),(H=(z=v.current).onSelect)==null||H.call(z,b.current)}function E(){w.setState("value",b.current,!0)}if(!R)return null;let{disabled:k,value:S,onSelect:I,forceMount:B,keywords:L,...$}=s;return g.createElement(dt.div,{ref:Us(f,o),...$,id:u,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!P,"data-disabled":!!k,"data-selected":!!P,onPointerMove:k||p.getDisablePointerSelection()?void 0:E,onClick:k?void 0:A},s.children)}),$y=g.forwardRef((s,o)=>{let{heading:a,children:d,forceMount:u,...f}=s,h=Cr(),p=g.useRef(null),v=g.useRef(null),x=Cr(),b=ol(),w=un(R=>u||b.filter()===!1?!0:R.search?R.filtered.groups.has(h):!0);Bn(()=>b.group(h),[]),mh(h,p,[s.value,s.heading,v]);let P=g.useMemo(()=>({id:h,forceMount:u}),[u]);return g.createElement(dt.div,{ref:Us(p,o),...f,"cmdk-group":"",role:"presentation",hidden:w?void 0:!0},a&&g.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:x},a),Ua(s,R=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?x:void 0},g.createElement(uh.Provider,{value:P},R))))}),Uy=g.forwardRef((s,o)=>{let{alwaysRender:a,...d}=s,u=g.useRef(null),f=un(h=>!h.search);return!a&&!f?null:g.createElement(dt.div,{ref:Us(u,o),...d,"cmdk-separator":"",role:"separator"})}),By=g.forwardRef((s,o)=>{let{onValueChange:a,...d}=s,u=s.value!=null,f=Cc(),h=un(x=>x.search),p=un(x=>x.selectedItemId),v=ol();return g.useEffect(()=>{s.value!=null&&f.setState("search",s.value)},[s.value]),g.createElement(dt.input,{ref:o,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":p,id:v.inputId,type:"text",value:u?s.value:h,onChange:x=>{u||f.setState("search",x.target.value),a==null||a(x.target.value)}})}),Hy=g.forwardRef((s,o)=>{let{children:a,label:d="Suggestions",...u}=s,f=g.useRef(null),h=g.useRef(null),p=un(x=>x.selectedItemId),v=ol();return g.useEffect(()=>{if(h.current&&f.current){let x=h.current,b=f.current,w,P=new ResizeObserver(()=>{w=requestAnimationFrame(()=>{let R=x.offsetHeight;b.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return P.observe(x),()=>{cancelAnimationFrame(w),P.unobserve(x)}}},[]),g.createElement(dt.div,{ref:Us(f,o),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":d,id:v.listId},Ua(s,x=>g.createElement("div",{ref:Us(h,v.listInnerRef),"cmdk-list-sizer":""},x)))}),Gy=g.forwardRef((s,o)=>{let{open:a,onOpenChange:d,overlayClassName:u,contentClassName:f,container:h,...p}=s;return g.createElement(Jm,{open:a,onOpenChange:d},g.createElement(th,{container:h},g.createElement(rh,{"cmdk-overlay":"",className:u}),g.createElement(nh,{"aria-label":s.label,"cmdk-dialog":"",className:f},g.createElement(fh,{ref:o,...p}))))}),Vy=g.forwardRef((s,o)=>un(a=>a.filtered.count===0)?g.createElement(dt.div,{ref:o,...s,"cmdk-empty":"",role:"presentation"}):null),Wy=g.forwardRef((s,o)=>{let{progress:a,children:d,label:u="Loading...",...f}=s;return g.createElement(dt.div,{ref:o,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},Ua(s,h=>g.createElement("div",{"aria-hidden":!0},h)))}),bs=Object.assign(fh,{List:Hy,Item:Iy,Input:By,Group:$y,Separator:Uy,Dialog:Gy,Empty:Vy,Loading:Wy});function Ky(s,o){let a=s.nextElementSibling;for(;a;){if(a.matches(o))return a;a=a.nextElementSibling}}function Qy(s,o){let a=s.previousElementSibling;for(;a;){if(a.matches(o))return a;a=a.previousElementSibling}}function ph(s){let o=g.useRef(s);return Bn(()=>{o.current=s}),o}var Bn=typeof window>"u"?g.useEffect:g.useLayoutEffect;function js(s){let o=g.useRef();return o.current===void 0&&(o.current=s()),o}function un(s){let o=Cc(),a=()=>s(o.snapshot());return g.useSyncExternalStore(o.subscribe,a,a)}function mh(s,o,a,d=[]){let u=g.useRef(),f=ol();return Bn(()=>{var h;let p=(()=>{var x;for(let b of a){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(x=b.current.textContent)==null?void 0:x.trim():u.current}})(),v=d.map(x=>x.trim());f.value(s,p,v),(h=o.current)==null||h.setAttribute(ws,p),u.current=p}),u}var qy=()=>{let[s,o]=g.useState(),a=js(()=>new Map);return Bn(()=>{a.current.forEach(d=>d()),a.current=new Map},[s]),(d,u)=>{a.current.set(d,u),o({})}};function Zy(s){let o=s.type;return typeof o=="function"?o(s.props):"render"in o?o.render(s.props):s}function Ua({asChild:s,children:o},a){return s&&g.isValidElement(o)?g.cloneElement(Zy(o),{ref:o.ref},a(o.props.children)):a(o)}var Yy={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Jy({onNavigate:s}){const[o,a]=g.useState(!1);return g.useEffect(()=>{const d=u=>{(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),a(f=>!f))};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[]),r.jsx(bs.Dialog,{open:o,onOpenChange:a,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>a(!1),children:r.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:d=>d.stopPropagation(),children:[r.jsx(bs.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"}),r.jsxs(bs.List,{className:"max-h-80 overflow-y-auto p-2",children:[r.jsx(bs.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),r.jsx(bs.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:ic.map(d=>r.jsxs(bs.Item,{value:`${d.label} ${d.hint}`,onSelect:()=>{s(d.id),a(!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:[r.jsx(d.icon,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:d.label}),r.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:d.hint})]},d.id))})]})]})})}async function he(s,o){var v;const a={"Content-Type":"application/json",...o==null?void 0:o.headers},d=localStorage.getItem("mc_sudo_password"),u=localStorage.getItem("mc_hf_token");d&&(a["X-Sudo-Password"]=d);let f=o==null?void 0:o.body;if((((v=o==null?void 0:o.method)==null?void 0:v.toUpperCase())||"GET")==="POST"){if(typeof f=="string")try{const x=JSON.parse(f);let b=!1;d&&!("sudo_password"in x)&&(x.sudo_password=d,b=!0),u&&!("hf_token"in x)&&(x.hf_token=u,b=!0),b&&(f=JSON.stringify(x))}catch{}else if(!f){const x={};d&&(x.sudo_password=d),u&&(x.hf_token=u),Object.keys(x).length>0&&(f=JSON.stringify(x))}}const p=await fetch(s,{...o,headers:a,body:f});if(!p.ok)throw new Error(`${p.status} ${p.statusText}`);return p.json()}const qe={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],routing:["routing"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:s=>["drafts",s??""],connect:s=>["connect",s??""],memory:(s,o)=>["memory",s??"",o??""]},Xy=()=>_t({queryKey:qe.health,queryFn:()=>he("/api/health"),refetchInterval:1e4}),Ba=(s=5e3)=>_t({queryKey:qe.systemStatus,queryFn:()=>he("/api/system/status"),refetchInterval:s}),eb=(s=3e3)=>_t({queryKey:qe.services,queryFn:()=>he("/api/system/services"),refetchInterval:s}),Gn=(s=4e3)=>_t({queryKey:qe.models,queryFn:()=>he("/api/models"),refetchInterval:s}),tb=(s=4e3)=>_t({queryKey:qe.routing,queryFn:()=>he("/api/routing"),refetchInterval:s}),hh=(s=2e3)=>_t({queryKey:qe.jobs,queryFn:()=>he("/api/jobs"),refetchInterval:s,select:o=>o.jobs??[]}),xh=(s=3e3)=>_t({queryKey:qe.tokenStats,queryFn:()=>he("/api/system/token-stats"),refetchInterval:s}),gh=(s=5e3)=>_t({queryKey:qe.agentStatus,queryFn:()=>he("/api/agent/status"),refetchInterval:s}),rb=(s=6e4)=>_t({queryKey:qe.hermesBrain,queryFn:()=>he("/api/agent/brain"),refetchInterval:s}),Ec=s=>_t({queryKey:qe.updates,queryFn:()=>he("/api/maintenance/updates"),refetchInterval:s}),nb=()=>_t({queryKey:qe.discover,queryFn:()=>he("/api/discover")}),sb=s=>_t({queryKey:qe.drafts(s),queryFn:()=>he(`/api/models/drafts?target=${encodeURIComponent(s??"")}`),enabled:!!s}),vh=s=>_t({queryKey:qe.connect(s),queryFn:()=>he(s?`/api/connect?${s}`:"/api/connect")}),yh=s=>_t({queryKey:qe.memory(s==null?void 0:s.q,s==null?void 0:s.category),queryFn:()=>{const o=new URLSearchParams;return s!=null&&s.q&&o.set("q",s.q),s!=null&&s.category&&o.set("category",s.category),he(`/api/memory?${o}`)},select:o=>s!=null&&s.limit?o.slice(0,s.limit):o});function Et(s){return(s/1024**3).toFixed(1)}function pc(s){return s?s>1024**3?`${(s/1024**3).toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`:""}function Ht(s){if(!s)return"—";const o=s/1024**3;return o>=1?`${o.toFixed(1)} GB`:`${(s/1024**2).toFixed(0)} MB`}function ob(s){if(!s)return"";const o=Math.floor(s/60);return o>0?`${o} min`:`${s} s`}function Zp(s){return s?`${Math.round(s/1024)}k`:"—"}function bh(s){var o,a,d="";if(typeof s=="string"||typeof s=="number")d+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(o=0;o{const o=db(s),{conflictingClassGroups:a,conflictingClassGroupModifiers:d}=s;return{getClassGroupId:h=>{const p=h.split(_c);return p[0]===""&&p.length!==1&&p.shift(),wh(p,o)||ib(h)},getConflictingClassGroupIds:(h,p)=>{const v=a[h]||[];return p&&d[h]?[...v,...d[h]]:v}}},wh=(s,o)=>{var h;if(s.length===0)return o.classGroupId;const a=s[0],d=o.nextPart.get(a),u=d?wh(s.slice(1),d):void 0;if(u)return u;if(o.validators.length===0)return;const f=s.join(_c);return(h=o.validators.find(({validator:p})=>p(f)))==null?void 0:h.classGroupId},Yp=/^\[(.+)\]$/,ib=s=>{if(Yp.test(s)){const o=Yp.exec(s)[1],a=o==null?void 0:o.substring(0,o.indexOf(":"));if(a)return"arbitrary.."+a}},db=s=>{const{theme:o,prefix:a}=s,d={nextPart:new Map,validators:[]};return ub(Object.entries(s.classGroups),a).forEach(([f,h])=>{mc(h,d,f,o)}),d},mc=(s,o,a,d)=>{s.forEach(u=>{if(typeof u=="string"){const f=u===""?o:Jp(o,u);f.classGroupId=a;return}if(typeof u=="function"){if(cb(u)){mc(u(d),o,a,d);return}o.validators.push({validator:u,classGroupId:a});return}Object.entries(u).forEach(([f,h])=>{mc(h,Jp(o,f),a,d)})})},Jp=(s,o)=>{let a=s;return o.split(_c).forEach(d=>{a.nextPart.has(d)||a.nextPart.set(d,{nextPart:new Map,validators:[]}),a=a.nextPart.get(d)}),a},cb=s=>s.isThemeGetter,ub=(s,o)=>o?s.map(([a,d])=>{const u=d.map(f=>typeof f=="string"?o+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,p])=>[o+h,p])):f);return[a,u]}):s,fb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,a=new Map,d=new Map;const u=(f,h)=>{a.set(f,h),o++,o>s&&(o=0,d=a,a=new Map)};return{get(f){let h=a.get(f);if(h!==void 0)return h;if((h=d.get(f))!==void 0)return u(f,h),h},set(f,h){a.has(f)?a.set(f,h):u(f,h)}}},jh="!",pb=s=>{const{separator:o,experimentalParseClassName:a}=s,d=o.length===1,u=o[0],f=o.length,h=p=>{const v=[];let x=0,b=0,w;for(let k=0;kb?w-b:void 0;return{modifiers:v,hasImportantModifier:R,baseClassName:A,maybePostfixModifierPosition:E}};return a?p=>a({className:p,parseClassName:h}):h},mb=s=>{if(s.length<=1)return s;const o=[];let a=[];return s.forEach(d=>{d[0]==="["?(o.push(...a.sort(),d),a=[]):a.push(d)}),o.push(...a.sort()),o},hb=s=>({cache:fb(s.cacheSize),parseClassName:pb(s),...ab(s)}),xb=/\s+/,gb=(s,o)=>{const{parseClassName:a,getClassGroupId:d,getConflictingClassGroupIds:u}=o,f=[],h=s.trim().split(xb);let p="";for(let v=h.length-1;v>=0;v-=1){const x=h[v],{modifiers:b,hasImportantModifier:w,baseClassName:P,maybePostfixModifierPosition:R}=a(x);let A=!!R,E=d(A?P.substring(0,R):P);if(!E){if(!A){p=x+(p.length>0?" "+p:p);continue}if(E=d(P),!E){p=x+(p.length>0?" "+p:p);continue}A=!1}const k=mb(b).join(":"),S=w?k+jh:k,I=S+E;if(f.includes(I))continue;f.push(I);const B=u(E,A);for(let L=0;L0?" "+p:p)}return p};function vb(){let s=0,o,a,d="";for(;s{if(typeof s=="string")return s;let o,a="";for(let d=0;dw(b),s());return a=hb(x),d=a.cache.get,u=a.cache.set,f=p,p(v)}function p(v){const x=d(v);if(x)return x;const b=gb(v,a);return u(v,b),b}return function(){return f(vb.apply(null,arguments))}}const He=s=>{const o=a=>a[s]||[];return o.isThemeGetter=!0,o},Nh=/^\[(?:([a-z-]+):)?(.+)\]$/i,bb=/^\d+\/\d+$/,wb=new Set(["px","full","screen"]),jb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kb=/\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$/,Nb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wr=s=>Ss(s)||wb.has(s)||bb.test(s),qr=s=>Hs(s,"length",Db),Ss=s=>!!s&&!Number.isNaN(Number(s)),Ud=s=>Hs(s,"number",Ss),Io=s=>!!s&&Number.isInteger(Number(s)),Eb=s=>s.endsWith("%")&&Ss(s.slice(0,-1)),Se=s=>Nh.test(s),Zr=s=>jb.test(s),_b=new Set(["length","size","percentage"]),Mb=s=>Hs(s,_b,Sh),Pb=s=>Hs(s,"position",Sh),Rb=new Set(["image","url"]),Ob=s=>Hs(s,Rb,Lb),Ab=s=>Hs(s,"",Tb),$o=()=>!0,Hs=(s,o,a)=>{const d=Nh.exec(s);return d?d[1]?typeof o=="string"?d[1]===o:o.has(d[1]):a(d[2]):!1},Db=s=>kb.test(s)&&!Nb.test(s),Sh=()=>!1,Tb=s=>Sb.test(s),Lb=s=>Cb.test(s),zb=()=>{const s=He("colors"),o=He("spacing"),a=He("blur"),d=He("brightness"),u=He("borderColor"),f=He("borderRadius"),h=He("borderSpacing"),p=He("borderWidth"),v=He("contrast"),x=He("grayscale"),b=He("hueRotate"),w=He("invert"),P=He("gap"),R=He("gradientColorStops"),A=He("gradientColorStopPositions"),E=He("inset"),k=He("margin"),S=He("opacity"),I=He("padding"),B=He("saturate"),L=He("scale"),$=He("sepia"),z=He("skew"),H=He("space"),ne=He("translate"),le=()=>["auto","contain","none"],xe=()=>["auto","hidden","clip","visible","scroll"],je=()=>["auto",Se,o],V=()=>[Se,o],Ee=()=>["",wr,qr],me=()=>["auto",Ss,Se],Re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Te=()=>["solid","dashed","dotted","double","none"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],ae=()=>["","0",Se],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Ss,Se];return{cacheSize:500,separator:":",theme:{colors:[$o],spacing:[wr,qr],blur:["none","",Zr,Se],brightness:M(),borderColor:[s],borderRadius:["none","","full",Zr,Se],borderSpacing:V(),borderWidth:Ee(),contrast:M(),grayscale:ae(),hueRotate:M(),invert:ae(),gap:V(),gradientColorStops:[s],gradientColorStopPositions:[Eb,qr],inset:je(),margin:je(),opacity:M(),padding:V(),saturate:M(),scale:M(),sepia:ae(),skew:M(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Zr]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Re(),Se]}],overflow:[{overflow:xe()}],"overflow-x":[{"overflow-x":xe()}],"overflow-y":[{"overflow-y":xe()}],overscroll:[{overscroll:le()}],"overscroll-x":[{"overscroll-x":le()}],"overscroll-y":[{"overscroll-y":le()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Io,Se]}],basis:[{basis:je()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Io,Se]}],"grid-cols":[{"grid-cols":[$o]}],"col-start-end":[{col:["auto",{span:["full",Io,Se]},Se]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[$o]}],"row-start-end":[{row:["auto",{span:[Io,Se]},Se]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Se,o]}],"min-w":[{"min-w":[Se,o,"min","max","fit"]}],"max-w":[{"max-w":[Se,o,"none","full","min","max","fit","prose",{screen:[Zr]},Zr]}],h:[{h:[Se,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Se,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Se,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Se,o,"auto","min","max","fit"]}],"font-size":[{text:["base",Zr,qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ud]}],"font-family":[{font:[$o]}],"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",Se]}],"line-clamp":[{"line-clamp":["none",Ss,Ud]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wr,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wr,qr]}],"underline-offset":[{"underline-offset":["auto",wr,Se]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se]}],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",Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Re(),Pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ob]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...Te(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:Te()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...Te()]}],"outline-offset":[{"outline-offset":[wr,Se]}],"outline-w":[{outline:[wr,qr]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[wr,qr]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",Zr,Ab]}],"shadow-color":[{shadow:[$o]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[..._e(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_e()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[d]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",Zr,Se]}],grayscale:[{grayscale:[x]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[w]}],saturate:[{saturate:[B]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[d]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[x]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[B]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Se]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Io,Se]}],"translate-x":[{"translate-x":[ne]}],"translate-y":[{"translate-y":[ne]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Se]}],accent:[{accent:["auto",s]}],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",Se]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",Se]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[wr,qr,Ud]}],stroke:[{stroke:[s,"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"]}}},Fb=yb(zb);function J(...s){return Fb(lb(s))}function Jo(s){return s?s.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}const Ch=["fast","heavy","coder","vision","scout"],Ib={fast:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25",heavy:"bg-amber-500/15 text-amber-400 border-amber-500/25",coder:"bg-violet-500/15 text-violet-400 border-violet-500/25",vision:"bg-pink-500/15 text-pink-400 border-pink-500/25",scout:"bg-teal-500/15 text-teal-400 border-teal-500/25",hermes:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25"},Mc=s=>s&&Ib[s]||"bg-slate-500/15 text-slate-300 border-slate-500/25";function $b({fit:s}){const o={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"}[s.level];return r.jsxs("span",{className:J("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",o),children:[s.text," • ",s.req_gb," GB RAM"]})}function Xp(s){const o=s.toLowerCase();return o.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:o.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:o.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:o.includes("mistral")||o.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:o.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:o.includes("hermes")||o.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:o.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 Ub(){const{data:s}=Gn(2e3),{data:o}=xh(2e3),a=(s==null?void 0:s.models)??[],d=(s==null?void 0:s.running)??[],u=a.filter(v=>d.includes(v.name)),f=g.useRef(null),[h,p]=g.useState(!1);return g.useEffect(()=>{if(!o)return;const v=o.total_tokens;if(f.current!==null&&v>f.current){p(!0);const x=setTimeout(()=>p(!1),4e3);return f.current=v,()=>clearTimeout(x)}f.current=v},[o==null?void 0:o.total_tokens]),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Vo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Aktive Modelle (Live)"})]}),r.jsxs("span",{className:J("flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-wider font-mono px-2 py-0.5 rounded-full border transition-colors",h?"bg-emerald-500/10 text-emerald-400 border-emerald-500/30":"bg-background/30 text-muted-foreground/70 border-border/40"),children:[h?r.jsx(ks,{className:"h-3 w-3 animate-pulse"}):r.jsx(T0,{className:"h-3 w-3"}),h?"Inferenz aktiv":"Idle"]})]}),u.length===0?r.jsx("div",{className:"flex items-center justify-center gap-2 h-20 text-xs text-muted-foreground/70 italic",children:"Kein Modell geladen — Auto-Swap lädt bei Anfrage."}):r.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:u.map(v=>{var x;return r.jsxs("div",{className:"flex items-center justify-between gap-2 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[v.role&&r.jsx("span",{className:J("text-[8px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Mc(v.role)),children:v.role}),r.jsx("span",{className:"text-xs font-semibold font-mono text-foreground truncate",children:(x=v.name.split("/").pop())==null?void 0:x.replace(/\.gguf$/i,"")})]}),r.jsxs("div",{className:"text-[9px] font-mono text-muted-foreground/70 mt-0.5",children:[Ht(v.size_bytes)," im Unified-RAM"]})]}),r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono shrink-0",children:[r.jsx("span",{className:J("h-1.5 w-1.5 rounded-full bg-emerald-500",h&&"animate-pulse")})," warm"]})]},v.name)})})]})}function Bb({data:s,tone:o,max:a=100}){const f=s.length,h=w=>Math.min(Math.max(w,0),a),p=s.map((w,P)=>{const R=f<=1?0:P/(f-1)*100,A=40-h(w)/a*40;return[R,A]}),v=p.map((w,P)=>`${P===0?"M":"L"}${w[0].toFixed(2)},${w[1].toFixed(2)}`).join(" "),x=f>1?`${v} L100,40 L0,40 Z`:"",b=p[p.length-1];return r.jsxs("svg",{viewBox:"0 0 100 40",preserveAspectRatio:"none",className:J("h-full w-full overflow-visible",o),children:[r.jsx("line",{x1:"0",y1:40-.5,x2:100,y2:40-.5,className:"stroke-border/40",strokeWidth:"1",vectorEffect:"non-scaling-stroke"}),f>1&&r.jsx("path",{d:x,fill:"currentColor",opacity:.12,stroke:"none"}),f>1&&r.jsx("path",{d:v,fill:"none",stroke:"currentColor",strokeWidth:1.75,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round"}),b&&r.jsx("circle",{cx:b[0],cy:b[1],r:2,fill:"currentColor",vectorEffect:"non-scaling-stroke"})]})}function Hb(s){return s>90?"text-red-500":s>75?"text-amber-500":"text-primary"}function _a({value:s,label:o,detail:a,data:d}){const u=Hb(s);return r.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl border border-border/40 bg-background/20 p-2.5",children:[r.jsxs("div",{className:"flex items-baseline justify-between",children:[r.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o}),r.jsxs("span",{className:J("font-mono text-xs font-bold tabular-nums",u),children:[Math.round(s),"%"]})]}),r.jsx("div",{className:"h-12 w-full",children:r.jsx(Bb,{data:d,tone:u})}),a&&r.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/80",children:a})]})}function Gb(){const{data:s,dataUpdatedAt:o}=Ba(3e3),[a,d]=g.useState({cpu:[],ram:[],gpu:[],disk:[]});g.useEffect(()=>{if(!s)return;const f=(h,p)=>p==null?h:[...h,p].slice(-40);d(h=>{var p,v,x,b;return{cpu:f(h.cpu,(p=s.cpu)==null?void 0:p.percent),ram:f(h.ram,(v=s.ram)==null?void 0:v.percent),gpu:f(h.gpu,(x=s.gpu)==null?void 0:x.busy_percent),disk:f(h.disk,(b=s.disk)==null?void 0:b.percent)}})},[o]);const u=(s==null?void 0:s.gpu)&&s.gpu.busy_percent!=null&&s.gpu.gtt_used!=null&&s.gpu.gtt_total!=null;return r.jsxs("div",{className:"md:col-span-2 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:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Lt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"System-Status"}),r.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),s?r.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[r.jsx(_a,{value:s.cpu.percent,label:"CPU",data:a.cpu,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0}),r.jsx(_a,{value:s.ram.percent,label:"RAM",data:a.ram,detail:`${Et(s.ram.used)} / ${Et(s.ram.total)} GB`}),u&&r.jsx(_a,{value:s.gpu.busy_percent,label:"GPU",data:a.gpu,detail:`${Et(s.gpu.gtt_used)} / ${Et(s.gpu.gtt_total)} GB`}),s.disk&&r.jsx(_a,{value:s.disk.percent,label:"Disk",data:a.disk,detail:`${Et(s.disk.used)} / ${Et(s.disk.total)} GB`})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(s==null?void 0:s.temp)&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"mt-4 flex gap-4 text-xs font-mono text-muted-foreground/80 border-t border-border/30 pt-3",children:[s.temp.cpu!=null&&r.jsxs("span",{children:["CPU Temp: ",s.temp.cpu," °C"]}),s.temp.gpu!=null&&r.jsxs("span",{children:["GPU Temp: ",s.temp.gpu," °C"]})]})]})}function Eh({type:s,title:o,message:a,defaultValue:d,autoValue:u,autoLabel:f,onConfirm:h,onCancel:p}){const v=g.useRef(null);return r.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.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:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:o}),r.jsx("button",{onClick:p||(()=>h()),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:a}),s==="prompt"&&r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{ref:v,type:"text",defaultValue:d,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:x=>{var b;x.key==="Enter"&&h((b=v.current)==null?void 0:b.value)}}),u!==void 0&&r.jsx("button",{type:"button",onClick:()=>{v.current&&(v.current.value=u)},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:f||"Auto"})]}),r.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(s==="confirm"||s==="prompt")&&r.jsx("button",{onClick:p,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"}),r.jsx("button",{onClick:()=>{var b;const x=s==="prompt"?(b=v.current)==null?void 0:b.value:void 0;h(x)},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:s==="confirm"?"Ja, fortfahren":s==="prompt"?"Übernehmen":"OK"})]})]})})}function Vn(){const[s,o]=g.useState(null),a=g.useCallback(()=>o(null),[]),d=g.useCallback((p,v,x)=>{o({type:"alert",title:p,message:v,onConfirm:()=>{o(null),x==null||x()}})},[]),u=g.useCallback((p,v,x,b)=>{o({type:"confirm",title:p,message:v,onConfirm:()=>{o(null),x()},onCancel:()=>{o(null),b==null||b()}})},[]),f=g.useCallback((p,v,x,b,w,P)=>{o({type:"prompt",title:p,message:v,defaultValue:x,autoValue:P==null?void 0:P.autoValue,autoLabel:P==null?void 0:P.autoLabel,onConfirm:R=>{o(null),b(R)},onCancel:()=>{o(null),w==null||w()}})},[]),h=s?r.jsx(Eh,{...s}):null;return{showAlert:d,showConfirm:u,showPrompt:f,close:a,dialogElement:h}}function Vb(){var $;const s=fn(),{data:o}=Ec(3e3),{data:a=[]}=hh(3e3),{showConfirm:d,dialogElement:u}=Vn(),[f,h]=g.useState(""),[p,v]=g.useState(!1),[x,b]=g.useState(""),[w,P]=g.useState(!1),[R,A]=g.useState({open:!1,actionPath:"",actionLabel:""}),E=()=>{s.invalidateQueries({queryKey:qe.updates}),s.invalidateQueries({queryKey:qe.jobs}),s.invalidateQueries({queryKey:qe.models})};async function k(z,H,ne,le){h(`${H} wird ausgeführt...`),v(!0);try{const xe={...ne},je=await he(z,{method:"POST",body:JSON.stringify(xe)});if(je.status==="password_required"||je.status==="incorrect_password"){A({open:!0,actionPath:z,actionLabel:H,payload:ne,error:je.status==="incorrect_password"?"Falsches Sudo-Passwort. Bitte erneut versuchen.":void 0}),h("");return}je.job_id?h(`${H} gestartet (Job-ID: ${je.job_id})`):je.ok?h(`${H} erfolgreich ausgeführt.`):h(`Fehler: ${je.err||"Unbekannter Fehler"}`),E()}catch(xe){h(`Fehler bei ${H}: ${xe.message}`)}finally{v(!1)}}async function S(){P(!0);try{const z={...R.payload,sudo_password:x},H=await he(R.actionPath,{method:"POST",body:JSON.stringify(z)});if(H.status==="password_required"||H.status==="incorrect_password"){A(ne=>({...ne,error:"Falsches Sudo-Passwort. Bitte erneut versuchen."}));return}H.job_id?h(`${R.actionLabel} gestartet (Job-ID: ${H.job_id})`):H.ok?h(`${R.actionLabel} erfolgreich ausgeführt.`):h(`Fehler: ${H.err||"Unbekannter Fehler"}`),A({open:!1,actionPath:"",actionLabel:""}),b(""),E()}catch(z){h(`Fehler: ${z.message}`),A({open:!1,actionPath:"",actionLabel:""}),b("")}finally{P(!1)}}async function I(z,H){h(`Upgrade für ${z} wird gestartet...`);try{await he("/api/models/install",{method:"POST",body:JSON.stringify({repo:z,role:H,quant:"Q4_K_M",jinja:!0})}),h("Upgrade-Download gestartet."),E()}catch(ne){h(`Upgrade fehlgeschlagen: ${ne.message}`)}}const B=a.find(z=>z.label.includes("OS-Update")&&(z.state==="running"||z.state==="queued")),L=a.find(z=>z.label.includes("Engine-Update")&&(z.state==="running"||z.state==="queued"));return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[R.open&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:r.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/60 bg-card/90 backdrop-blur-xl p-5 shadow-2xl space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-space",children:"Sudo-Passwort erforderlich"}),r.jsx("button",{onClick:()=>{A({open:!1,actionPath:"",actionLabel:""}),b("")},className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Für die Aktion ",r.jsx("strong",{children:R.actionLabel})," wird das Administrator-Passwort (Sudo) auf der Box benötigt."]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("input",{type:"password",value:x,onChange:z=>b(z.target.value),placeholder:"Sudo-Passwort eingeben...",className:"w-full 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",onKeyDown:z=>z.key==="Enter"&&S(),autoFocus:!0}),R.error&&r.jsx("div",{className:"text-[10px] font-semibold text-red-400",children:R.error})]}),r.jsxs("div",{className:"flex gap-2 justify-end",children:[r.jsx("button",{onClick:()=>{A({open:!1,actionPath:"",actionLabel:""}),b("")},className:"h-8 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent transition-all cursor-pointer",children:"Abbrechen"}),r.jsx("button",{onClick:S,disabled:!x||w,className:"h-8 px-4 rounded-lg bg-primary text-primary-foreground text-[10px] font-bold uppercase hover:opacity-90 transition-all disabled:opacity-50 cursor-pointer flex items-center justify-center gap-1.5",children:w?"Prüfe...":"Ausführen"})]})]})}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2 border-b border-border/20 pb-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(U0,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Updates & Pflege"})]}),(o==null?void 0:o.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground/80 font-mono",children:["Zuletzt gesucht: ",new Date(o.last_check*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),o?r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.os>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"OS-Pakete"}),r.jsx("span",{className:"font-mono",children:o.os>0?`${o.os} verfügbar`:"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.engine>0?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Engine (llama.cpp)"}),r.jsx("span",{className:"font-mono",children:o.engine>0?"Update verfügbar":"aktuell"})]}),r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",o.models>0?"border-primary/30 bg-primary/5 text-primary font-semibold animate-pulse":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsx("span",{children:"Modell-Upgrades"}),r.jsx("span",{className:"font-mono",children:o.models>0?`${o.models} verfügbar`:"aktuell"})]}),($=o.components)==null?void 0:$.map(z=>{const H=z.update===!0;return r.jsxs("div",{className:J("flex items-center justify-between px-3 py-1.5 rounded-lg border text-xs",H?"border-amber-500/30 bg-amber-500/5 text-amber-400 font-semibold":"border-border/30 bg-background/25 text-muted-foreground"),children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[z.name,z.reachable===!1&&r.jsx("span",{className:"text-[8px] font-bold uppercase text-red-400/80",children:"offline"})]}),r.jsx("span",{className:"font-mono text-[10px]",title:z.current?`installiert: ${z.current}`:void 0,children:H?`Update: ${z.latest}`:z.update===!1?"aktuell":z.latest?`neueste: ${z.latest}`:"—"})]},z.key)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-border/20 pt-3",children:[r.jsx("button",{onClick:()=>k("/api/maintenance/os-update","OS-Update"),disabled:p||!!B,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:B?r.jsxs(r.Fragment,{children:[r.jsx(Un,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",B.progress??0,"%)"]})]}):r.jsx("span",{children:"OS Update"})}),r.jsx("button",{onClick:()=>k("/api/maintenance/engine-update","Engine-Update"),disabled:p||!!L,className:"h-8 px-2 rounded-lg border border-border/60 bg-background/20 text-[10px] font-bold uppercase hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer disabled:opacity-50 flex items-center justify-center gap-1",children:L?r.jsxs(r.Fragment,{children:[r.jsx(Un,{className:"h-3 w-3 animate-spin text-primary"}),r.jsxs("span",{children:["Aktiv (",L.progress??0,"%)"]})]}):r.jsx("span",{children:"Engine Update"})})]}),r.jsxs("button",{onClick:()=>{d("Host-System neu starten?","Bist du sicher, dass du das Host-System neu starten willst?",()=>k("/api/maintenance/reboot","Reboot"))},disabled:p,className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 text-red-400 text-[10px] font-bold uppercase hover:bg-red-500/10 transition-all cursor-pointer disabled:opacity-50",children:[r.jsx(Om,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Host Reboot"})]}),o.model_list.length>0&&r.jsxs("div",{className:"space-y-1.5 border-t border-border/20 pt-3",children:[r.jsx("div",{className:"text-[9px] uppercase font-bold text-muted-foreground/60 tracking-wider",children:"Verfügbare Modell-Upgrades:"}),r.jsx("div",{className:"max-h-24 overflow-y-auto space-y-1.5 pr-1 scrollbar-thin",children:o.model_list.map(z=>r.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-background/25 border border-border/30 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("span",{className:"truncate flex-1 mr-1.5",title:`${z.role}: ${z.repo}`,children:[r.jsx("span",{className:"text-primary font-bold uppercase",children:z.role}),": ",z.repo.split("/").pop()]}),r.jsxs("button",{onClick:()=>I(z.repo,z.role),className:"px-2 py-0.5 text-[8px] font-bold uppercase rounded bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer flex items-center gap-0.5",children:[r.jsx(cn,{className:"h-2.5 w-2.5"})," Laden"]})]},z.repo))})]})]}):r.jsx("div",{className:"h-24 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Updates..."}),f&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:f}),r.jsxs("div",{className:"text-[9px] text-muted-foreground/60 leading-normal border-t border-border/10 pt-2.5 flex items-start gap-1",children:[r.jsx($s,{className:"h-3 w-3 shrink-0 text-muted-foreground/50 mt-0.5"}),r.jsxs("span",{children:["OS-Update & Reboot benötigen NOPASSWD in ",r.jsx("code",{children:"/etc/sudoers"})," (z.B. ",r.jsx("code",{children:"hitonabi ALL=(root) NOPASSWD:..."}),") oder ein gültiges Sudo-Passwort per Pop-up."]})]})]}),r.jsx("div",{className:"mt-4 border-t border-border/30 pt-3 shrink-0",children:r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer")),className:"w-full h-8 flex items-center justify-center gap-1.5 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer shadow-md shadow-primary/10",children:"System-Zentrale öffnen"})}),u]})}function Wb(){const s=fn(),{data:o}=gh(3e3),{data:a}=Gn(),{showAlert:d,dialogElement:u}=Vn(),[f,h]=g.useState(!1),p=(a==null?void 0:a.models)??[];async function v(x){try{await he("/api/agent/brain",{method:"POST",body:JSON.stringify({model:x})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${x}' geändert. Der Gateway-Dienst wurde neu gestartet.`),s.invalidateQueries({queryKey:qe.agentStatus}),h(!1)}catch(b){d("Fehler",`Fehler beim Wechseln des Gehirns: ${b.message}`)}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Is,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Hermes Agent"})]}),(o==null?void 0:o.webui_url)&&r.jsxs("a",{href:Jo(o.webui_url),target:"_blank",rel:"noopener",className:J("flex items-center gap-1 px-3 py-1 rounded-lg text-xs font-medium transition-all",o.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/20":"border border-border text-muted-foreground"),children:[r.jsx(Ta,{className:"h-3 w-3"})," AnythingLLM öffnen"]})]}),o?r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gateway"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.gateway_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"AnythingLLM"}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",o.webui_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-medium",children:o.webui_reachable?"Online":"Offline"})]})]}),r.jsxs("div",{onClick:()=>h(!0),className:"p-3 bg-background/20 rounded-xl border border-border/40 hover:border-primary/45 hover:bg-background/30 transition-all duration-300 cursor-pointer",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Gehirn"}),r.jsx(Lt,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-xs font-medium mt-1 font-mono text-primary truncate flex items-center gap-1",children:[r.jsx(Ko,{className:"h-3 w-3 shrink-0"}),o.brain_model||"auto"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("span",{className:"text-[10px] text-muted-foreground uppercase font-semibold",children:"Verdrahtung"}),r.jsx(qo,{className:"h-3 w-3 text-primary"})]}),r.jsxs("div",{className:"text-[10px] font-mono mt-1 space-y-0.5 text-muted-foreground",children:[r.jsxs("div",{children:["Config: ",o.has_config?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Skills: ",o.has_skills?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]}),r.jsxs("div",{children:["Memory: ",o.has_memories?r.jsx("span",{className:"text-emerald-400",children:"✓"}):"—"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Agenten-Status…"})]}),o&&r.jsxs("div",{className:"mt-3 border-t border-border/30 pt-3 space-y-1.5",children:[r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"Telegram"}),r.jsx("span",{className:J("font-semibold",o.telegram_enabled?"text-emerald-400":""),children:o.telegram_enabled?"aktiv":"nicht konfiguriert"})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"MCP-Server"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[o.mcp_server_count??0," verbunden"]})]}),r.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[r.jsx("span",{children:"PC Executor"}),r.jsx("span",{className:J("font-semibold",o.pc_executor_reachable?"text-emerald-400":""),children:o.pc_executor_reachable?"erreichbar":"nicht verbunden"})]})]}),o&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.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:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Lt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>h(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:["auto","fast","heavy",...p.map(x=>{var b;return((b=x.name.split("/").pop())==null?void 0:b.replace(".gguf",""))||x.name})].map(x=>{const b=["auto","fast","heavy"].includes(x);return r.jsxs("button",{onClick:()=>v(x),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",o.brain_model===x||!o.brain_model&&x==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:x}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:b?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(o.brain_model===x||!o.brain_model&&x==="auto")&&r.jsx(cr,{className:"h-4 w-4 shrink-0 text-primary"})]},x)})})]})}),u]})}function Kb(){const{data:s}=Gn(3e3),o=(s==null?void 0:s.models)??[],a=(s==null?void 0:s.running)??[];return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Ko,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Rollen-Belegung"})]}),r.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1 scrollbar-thin",children:Ch.map(d=>{var h;const u=o.find(p=>p.role===d),f=u?a.includes(u.name):!1;return r.jsxs("div",{className:J("flex items-center justify-between p-2 rounded-xl border transition-all duration-300",f?"border-emerald-500/30 bg-emerald-500/5 shadow-sm shadow-emerald-500/5":u?"border-primary/20 bg-primary/5":"border-border/30 bg-background/10 opacity-60"),children:[r.jsx("div",{className:"min-w-0 flex-1 mr-2",children:r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:J("text-[9px] font-semibold uppercase px-1.5 py-0.5 rounded font-mono border tracking-wider shrink-0",Mc(d)),children:d}),r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"text-xs font-semibold truncate font-mono text-foreground",children:u?(h=u.name.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,""):"nicht zugewiesen"}),u&&r.jsxs("div",{className:"flex gap-1 items-center mt-0.5 flex-wrap",children:[u.prompt_cache&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-cyan-500/10 text-cyan-400 border border-cyan-500/20 px-1 py-0.5 rounded",title:"Prompt Caching aktiv",children:"PC"}),u.spec_active&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1 py-0.5 rounded",title:`Speculative Decoding aktiv (Draft: ${u.spec_draft_model})`,children:"SPEC"}),u.parallel_slots>1&&r.jsxs("span",{className:"text-[7px] leading-none font-mono font-bold bg-violet-500/10 text-violet-400 border border-violet-500/20 px-1 py-0.5 rounded",title:`${u.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",u.parallel_slots]}),u.incomplete&&r.jsx("span",{className:"text-[7px] leading-none font-mono font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1 py-0.5 rounded",title:"GGUF-Datei fehlt",children:"⚠ fehlt"})]})]})]})}),r.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:u?f?r.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider font-mono",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground uppercase tracking-wider font-mono",children:"bereit"}):r.jsx("span",{className:"text-[8px] font-semibold text-muted-foreground/60 uppercase tracking-wider font-mono",children:"—"})})]},d)})})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Laden erfolgt automatisch per Auto-Swap."})]})}function Qb(){const s=fn(),{data:o=[]}=yh({limit:3}),[a,d]=g.useState(""),[u,f]=g.useState("stable"),[h,p]=g.useState(!1);async function v(){if(!(!a.trim()||h)){p(!0);try{await he("/api/memory",{method:"POST",body:JSON.stringify({content:a,category:u,source:"dashboard"})}),d(""),s.invalidateQueries({queryKey:["memory"]})}catch(x){console.error(x)}finally{p(!1)}}}return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Wo,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Gedächtnis"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsx("textarea",{value:a,onChange:x=>d(x.target.value),placeholder:"Fakt / Regel im Pool speichern...",rows:2,className:"w-full resize-none rounded-xl border border-border/50 bg-background/30 p-2 text-[10px] outline-none focus:ring-1 focus:ring-primary transition-all leading-normal"}),r.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[r.jsxs("select",{value:u,onChange:x=>f(x.target.value),className:"h-7 rounded-lg border border-border/50 bg-background/50 px-2 text-[10px] outline-none cursor-pointer",children:[r.jsx("option",{value:"stable",children:"🔵 Fakt"}),r.jsx("option",{value:"instruction",children:"📋 Regel"}),r.jsx("option",{value:"user",children:"👤 User"}),r.jsx("option",{value:"versioned",children:"🟡 Version"})]}),r.jsxs("button",{onClick:v,disabled:!a.trim()||h,className:"flex h-7 items-center gap-1 rounded-lg bg-primary px-3 text-[10px] font-semibold text-primary-foreground hover:opacity-90 disabled:opacity-50 transition-all cursor-pointer",children:[r.jsx(Rm,{className:"h-3.5 w-3.5"})," Speichern"]})]})]}),r.jsxs("div",{className:"mt-3.5 space-y-1.5",children:[r.jsx("div",{className:"text-[9px] text-muted-foreground uppercase font-bold tracking-wider",children:"Zuletzt gespeichert:"}),r.jsx("div",{className:"max-h-20 overflow-y-auto space-y-1 pr-1 scrollbar-thin",children:o.length===0?r.jsx("div",{className:"text-[10px] text-muted-foreground/75 py-1",children:"Keine Einträge vorhanden."}):o.map(x=>r.jsxs("div",{className:"text-[10px] bg-background/10 border border-border/30 rounded p-1.5 flex items-start gap-1.5",children:[r.jsx("span",{className:"shrink-0 text-[8px] font-mono text-muted-foreground/80 px-1 py-0.5 rounded bg-muted/20",children:x.category}),r.jsx("span",{className:"truncate flex-1 text-muted-foreground hover:text-foreground transition-colors",title:x.content,children:x.content})]},x.id))})]})]}),r.jsx("div",{className:"mt-4 text-[10px] text-muted-foreground/80 border-t border-border/30 pt-3",children:"Steht allen Clients per MCP zur Verfügung."})]})}function qb(){var o;const{data:s}=xh(3e3);return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15 flex flex-col justify-between",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(C0,{className:"h-4.5 w-4.5 text-primary animate-pulse"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase text-foreground",children:"Effizienz & Ersparnis"})]}),s?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Geld gespart"}),r.jsxs("div",{className:"text-base font-bold text-emerald-400 mt-0.5 tracking-tight font-space",children:[s.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," €"]}),r.jsxs("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:["(",s.saved_usd.toLocaleString("en-US",{minimumFractionDigits:2})," $)"]})]}),r.jsxs("div",{className:"p-3 bg-background/20 rounded-xl border border-border/40 text-left",children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Gesamt-Tokens"}),r.jsx("div",{className:"text-base font-bold text-primary mt-0.5 tracking-tight font-space",children:s.total_tokens.toLocaleString("de-DE")}),r.jsx("div",{className:"text-[8px] text-muted-foreground/80 mt-0.5 font-mono",children:"(Lokale Inferenz)"})]})]}),r.jsxs("div",{className:"space-y-2 border-t border-border/20 pt-3 text-[10px] text-muted-foreground",children:[r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Input (Prompts):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.prompt_tokens.toLocaleString("de-DE")," tkn"]})]}),r.jsxs("div",{className:"flex justify-between items-center font-mono",children:[r.jsx("span",{children:"Output (Antworten):"}),r.jsxs("span",{className:"font-semibold text-foreground",children:[s.completion_tokens.toLocaleString("de-DE")," tkn"]})]})]})]}):r.jsx("div",{className:"h-28 flex items-center justify-center text-xs text-muted-foreground",children:"Lade Statistiken…"})]}),r.jsxs("div",{className:"mt-4 text-[9px] text-muted-foreground/70 border-t border-border/30 pt-2.5 leading-normal",children:["Berechnet ggü. Cloud-APIs",(o=s==null?void 0:s.pricing)!=null&&o.heavy?` (Ø ${(s.pricing.heavy.in??0).toFixed(2).replace(".",",")} $ / ${(s.pricing.heavy.out??0).toFixed(2).replace(".",",")} $ pro 1M tkn).`:"."]})]})}function Zb(){return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Zentrale"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Aktueller Status von System, Modellen und Agent."})]}),r.jsx(Ub,{}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[r.jsx(Gb,{}),r.jsx(Vb,{})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:[r.jsx(Wb,{}),r.jsx(Kb,{}),r.jsx(Qb,{}),r.jsx(qb,{})]})]})}function Yb(){const s=fn(),{data:o=[]}=hh(2e3),{showAlert:a,dialogElement:d}=Vn();async function u(p){try{await he(`/api/jobs/${p}/cancel`,{method:"POST"}),s.invalidateQueries({queryKey:qe.jobs})}catch(v){a("Fehler",v.message)}}const f=o.filter(p=>p.state==="running"||p.state==="queued"),h=o.filter(p=>p.state!=="running"&&p.state!=="queued").slice(-3);return f.length===0&&h.length===0?null:r.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:[r.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),f.map(p=>r.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[r.jsxs("div",{className:"flex justify-between items-center text-xs",children:[r.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:p.label}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-muted-foreground font-mono",children:[p.progress??0,"% • ",pc(p.done_bytes),"/",pc(p.total_bytes),p.eta_s?` • ETA ${ob(p.eta_s)}`:""]}),r.jsx("button",{onClick:()=>u(p.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"})]})]}),r.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:r.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${p.progress??0}%`}})})]},p.id)),h.map(p=>r.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[r.jsx("span",{className:"truncate",children:p.label}),r.jsx("span",{className:J("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",p.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:p.state})]},p.id)),d]})}function Pn({children:s,tone:o="muted"}){const a={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return r.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${a[o]}`,children:s})}function em({caps:s}){return s?r.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[s.coder&&r.jsx(Pn,{children:"💻 Code"}),s.vision&&r.jsx(Pn,{children:"👁 Bild"}),s.reasoning&&r.jsx(Pn,{children:"🧠 Reason"}),s.moe&&r.jsxs(Pn,{tone:"primary",children:["🧩 MoE",s.active_b?`·${s.active_b}b`:""]}),s.tools==="yes"&&r.jsx(Pn,{tone:"primary",children:"🛠 Tools"}),s.tools==="likely"&&r.jsx(Pn,{tone:"warn",children:"🛠 Tools?"}),s.embedding&&r.jsx(Pn,{children:"🔢 Embed"})]}):null}function Jb({model:s,onClose:o,onChanged:a}){var E,k;const{data:d,isLoading:u}=sb(s.gguf_path),[f,h]=g.useState(null),[p,v]=g.useState(""),x=d==null?void 0:d.target_vocab,b=(d==null?void 0:d.drafts)??[],w=b.filter(S=>S.compatible===!0),P=s.spec_draft_model;async function R(S){h(S??"__clear__"),v("");try{await he(`/api/models/${encodeURIComponent(s.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:S})}),a(),o()}catch(I){v(String((I==null?void 0:I.message)||I)),h(null)}}const A=S=>{var I;return S?`${S.pre??"?"} · ${((I=S.n_vocab)==null?void 0:I.toLocaleString())??"?"} Tokens`:"—"};return r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.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:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[r.jsx(ks,{className:"h-4 w-4"})," Speculative Draft"]}),r.jsx("button",{onClick:o,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.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 ',r.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),r.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:[r.jsx("span",{className:"text-muted-foreground",children:(E=s.name.split("/").pop())==null?void 0:E.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-foreground",children:["Vocab: ",A(x)]})]}),s.spec_active&&P&&r.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:[r.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[r.jsx(cr,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",P]}),r.jsx("button",{onClick:()=>R(null),disabled:f!==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"})]}),!(d!=null&&d.target_exists)&&r.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:[r.jsx(Qo,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),r.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:u?r.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):b.length===0?r.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 ",r.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."]}):b.map(S=>{var L,$;const I=S.filename===P,B=S.compatible===!0;return r.jsxs("div",{className:J("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",B?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",I&&"border-primary/40 bg-primary/10"),children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate",children:S.filename}),r.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[Ht(S.size_bytes)," · Vocab: ",A(S.vocab)]})]}),B?I?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[r.jsx(cr,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("button",{onClick:()=>R(S.path),disabled:f!==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"}):r.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:S.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(L=S.vocab)==null?void 0:L.pre}/${($=S.vocab)==null?void 0:$.n_vocab} ≠ Modell ${x==null?void 0:x.pre}/${x==null?void 0:x.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[r.jsx(Qo,{className:"h-3.5 w-3.5"})," ",S.compatible===!1?"Vocab ≠":"n/a"]})]},S.path)})}),!u&&(d==null?void 0:d.target_exists)&&b.length>0&&w.length===0&&r.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=",r.jsx("span",{className:"font-mono",children:x==null?void 0:x.pre}),", n_vocab=",r.jsx("span",{className:"font-mono",children:(k=x==null?void 0:x.n_vocab)==null?void 0:k.toLocaleString()}),")."]}),p&&r.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:p})]})})}function Xb(){var Qn,hn,qs,_r,Mr,dl,Zs,Ys;const s=fn(),{data:o,isLoading:a,error:d}=Gn(4e3),{data:u}=tb(4e3),{data:f}=vh(),{data:h}=Ec(4e3),{data:p}=rb(),{data:v}=Ba(),{showAlert:x,showConfirm:b,showPrompt:w,dialogElement:P}=Vn(),R=(o==null?void 0:o.models)??[],A=(o==null?void 0:o.running)??[],E=d?String(d):"",k=()=>{s.invalidateQueries({queryKey:qe.models}),s.invalidateQueries({queryKey:qe.routing})},[S,I]=g.useState(null),[B,L]=g.useState(null),[$,z]=g.useState(null),[H,ne]=g.useState(null),[le,xe]=g.useState(!1),[je,V]=g.useState(!1),[Ee,me]=g.useState(null),[Re,Te]=g.useState("grid"),[_e,Z]=g.useState("all"),ae=R.filter(O=>_e==="in_use"?!!O.role||A.includes(O.name):!0),[X,M]=g.useState({width:800,height:360}),C=g.useRef(null),Y=g.useCallback(O=>{if(C.current&&(C.current.disconnect(),C.current=null),O){const ee=new ResizeObserver(pe=>{if(!pe||pe.length===0)return;const Me=pe[0].contentRect;M({width:Me.width,height:Me.height})});ee.observe(O),C.current=ee}},[]),te=X.width,Q=X.height,re=O=>{const ee=te*.1,pe=Q*O,Me=te*.5,Le=Q*.5,ct=te*.3,Ie=pe,Ze=te*.3;return`M ${ee} ${pe} C ${ct} ${Ie}, ${Ze} ${Le}, ${Me} ${Le}`},ce=O=>{const ee=te*.5,pe=Q*.5,Me=te*.9,Le=Q*O,ct=te*.7,Ie=pe,Ze=te*.7;return`M ${ee} ${pe} C ${ct} ${Ie}, ${Ze} ${Le}, ${Me} ${Le}`};async function ke(O){try{await he(`/api/models/${encodeURIComponent(O)}/load`,{method:"POST"}),k()}catch(ee){x("Fehler",`Fehler beim Laden des Modells: ${ee.message}`)}}async function U(O){try{await he(`/api/models/${encodeURIComponent(O)}/unload`,{method:"POST"}),k()}catch(ee){x("Fehler",`Fehler beim Entladen des Modells: ${ee.message}`)}}async function we(){try{await he("/api/models/unload",{method:"POST"}),k()}catch(O){x("Fehler",`Fehler beim Entladen aller Modelle: ${O.message}`)}}async function Mt(O,ee){try{await he(`/api/models/${encodeURIComponent(ee)}/role`,{method:"POST",body:JSON.stringify({role:O||null})}),k()}catch(pe){x("Fehler",`Fehler beim Zuweisen der Rolle: ${pe.message||pe}`)}}function Gs(O){L(O),z(null),he(`/api/roles/${encodeURIComponent(O)}/recommend`).then(ee=>z(ee)).catch(()=>{})}async function pn(O,ee){let pe=null;try{pe=await he(`/api/models/${encodeURIComponent(O)}/ctx/auto`)}catch{}const Me=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:";w("Kontextlänge anpassen",Me,String(ee||32768),async Le=>{if(Le)try{await he(`/api/models/${encodeURIComponent(O)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(Le,10)})}),k()}catch(ct){x("Fehler",`Fehler beim Setzen des Kontexts: ${ct.message||ct}`)}},void 0,pe?{autoValue:String(pe.ctx),autoLabel:`Auto (${(pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function Wn(O){b("Modell löschen?",`Modell '${O}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await he(`/api/models/${encodeURIComponent(O)}`,{method:"DELETE"}),k()}catch(ee){x("Fehler",`Fehler beim Löschen: ${ee.message||ee}`)}})}async function ll(O,ee,pe,Me){try{await he("/api/models/install",{method:"POST",body:JSON.stringify({repo:O,role:ee,quant:pe,jinja:Me})}),x("Herunterladen gestartet",`Download für '${O}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(Le){x("Fehler",`Fehler beim Starten des Upgrades: ${Le.message||Le}`)}}async function al(O){const ee=p==null?void 0:p.budget,pe=ee&&!ee.fits?` - -⚠ Speicher-Warnung: Dieses Brain (~${ee.brain_gb} GB) muss immer resident sein. Zusammen mit dem größten on-demand-Modell (~${ee.largest_ondemand_gb} GB) sprengt das das Budget (${ee.gtt_gb} GB) → heavy/coder würden das Brain verdrängen. Erwäge ein kleineres Brain oder weniger Kontext.`:"";b("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${O.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${pe}`,async()=>{try{await he("/api/models/install",{method:"POST",body:JSON.stringify({repo:O,role:"hermes",quant:"Q4_K_M",jinja:!0})}),x("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),k()}catch(Me){x("Fehler",`Update fehlgeschlagen: ${Me.message||Me}`)}})}async function Vs(O){b("Agent-Hirn wechseln?",`'${O.split("/").pop()}' als Agent-Hirn (Alias hermes) setzen? Es wird warm gehalten (brains-Gruppe); Hermes nutzt es nach einem kurzen Gateway-Restart.`,async()=>{try{await he("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:O})}),x("Erledigt","Agent-Hirn gewechselt. Gateway wurde neugestartet."),xe(!1),k()}catch(ee){x("Fehler",`Wechsel fehlgeschlagen: ${ee.message||ee}`)}})}async function il(O){O&&(await navigator.clipboard.writeText(O),V(!0),setTimeout(()=>V(!1),1500))}if(a)return r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(E)return r.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 (",E,")."]});const mn=R.filter(O=>A.includes(O.name)),ur=mn.reduce((O,ee)=>O+(ee.size_bytes||0),0),fr=((Qn=v==null?void 0:v.gpu)==null?void 0:Qn.gtt_total)||((hn=v==null?void 0:v.gpu)==null?void 0:hn.vram_total)||0,Kn=((qs=v==null?void 0:v.gpu)==null?void 0:qs.gtt_used)||0,Ws=16*1024**3,Ks=fr>2*1024**3?fr:ur>Ws?ur*1.2:Ws,Qs=O=>R.find(ee=>ee.role===O),Er=O=>{const ee=Qs(O);return ee?A.includes(ee.name):!1};return r.jsxs("div",{className:"space-y-8",children:[r.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),r.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:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ra,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",Ht(ur)," Gewichte",Kn>0?` · ${Ht(Kn)} real belegt (inkl. KV)`:""," / ",Ht(Ks)]}),A.length>0&&r.jsx("button",{onClick:we,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"})]})]}),r.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:mn.length===0?r.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"}):mn.map((O,ee)=>{var Le;const pe=(O.size_bytes||0)/Ks*100,Me=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][ee%4];return r.jsxs("div",{style:{width:`${pe}%`},className:J("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",Me),title:`${O.name} (${Ht(O.size_bytes)})`,children:[r.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[O.role?`[${O.role}] `:"",(Le=O.name.split("/").pop())==null?void 0:Le.replace(".gguf","")]}),r.jsx("span",{className:"text-[8px] font-mono opacity-80",children:Ht(O.size_bytes)})]},O.name)})})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Gateway Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Klicke links auf Editoren, um Configs zu kopieren. Klicke rechts auf Rollen, um GGUF-Zuweisungen live zu ändern."})]}),r.jsxs("div",{ref:Y,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:re(.1),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(Ee==="roocode"||S==="roocode")&&r.jsx("path",{d:re(.1),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:re(.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(Ee==="cursor"||S==="cursor")&&r.jsx("path",{d:re(.3),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:re(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(Ee==="opencode"||S==="opencode")&&r.jsx("path",{d:re(.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:re(.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(Ee==="zed"||S==="zed")&&r.jsx("path",{d:re(.7),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:re(.9),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(Ee==="continue"||S==="continue")&&r.jsx("path",{d:re(.9),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ce(.12),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Er("fast")&&r.jsx("path",{d:ce(.12),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ce(.31),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Er("heavy")&&r.jsx("path",{d:ce(.31),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ce(.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Er("coder")&&r.jsx("path",{d:ce(.5),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ce(.69),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Er("vision")&&r.jsx("path",{d:ce(.69),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:ce(.88),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),Er("scout")&&r.jsx("path",{d:ce(.88),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"10%"},onMouseEnter:()=>me("roocode"),onMouseLeave:()=>me(null),onClick:()=>I(O=>O==="roocode"?null:"roocode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Roo Code"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"30%"},onMouseEnter:()=>me("cursor"),onMouseLeave:()=>me(null),onClick:()=>I(O=>O==="cursor"?null:"cursor"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Cursor IDE"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"50%"},onMouseEnter:()=>me("opencode"),onMouseLeave:()=>me(null),onClick:()=>I(O=>O==="opencode"?null:"opencode"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"OpenCode"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"70%"},onMouseEnter:()=>me("zed"),onMouseLeave:()=>me(null),onClick:()=>I(O=>O==="zed"?null:"zed"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Zed"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-28 h-8 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"10%",top:"90%"},onMouseEnter:()=>me("continue"),onMouseLeave:()=>me(null),onClick:()=>I(O=>O==="continue"?null:"continue"),children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse"}),r.jsx("span",{children:"Continue"})]}),r.jsxs("div",{className:"absolute select-none z-10 w-36 py-3 px-4 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5",style:{left:"50%",top:"50%"},children:[r.jsx("div",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Gateway Auto"}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mt-0.5",children:["Schwelle: > ",u!=null&&u.heavy_threshold_chars?u.heavy_threshold_chars/1e3:"4","k Zeichen"]}),r.jsx("div",{className:"mt-1 px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-semibold text-primary uppercase font-mono",children:"Auto-Swap"})]}),Ch.map(O=>{var ct;const ee=["12%","31%","50%","69%","88%"],pe=Qs(O),Me=pe?A.includes(pe.name):!1;if(O==="agent")return null;const Le={fast:0,heavy:1,coder:2,vision:3,scout:4}[O];return r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",Me?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":pe?"border-border/60 bg-card/75":"border-dashed border-border/40 bg-background/20"),style:{left:"90%",top:ee[Le]},onClick:()=>Gs(O),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:O}),Me&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground max-w-[150px]",children:pe?(ct=pe.name.split("/").pop())==null?void 0:ct.replace(".gguf",""):"Keine Zuweisung"})]},O)}),S&&f&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200 flex flex-col justify-between",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:[S==="roocode"&&"Roo Code Setup",S==="cursor"&&"Cursor Setup",S==="opencode"&&"OpenCode Setup",S==="zed"&&"Zed Setup",S==="continue"&&"Continue Setup"]}),r.jsx("button",{onClick:()=>I(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed space-y-2",children:[S==="roocode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]}),r.jsxs("li",{children:["Wähle in den Roo Code Einstellungen: Provider: ",r.jsx("strong",{children:"OpenAI Compatible"}),"."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Snippet in die ",r.jsx("code",{children:"settings.json"})," ein."]})]}),S==="cursor"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne Cursor Settings ➔ ",r.jsx("strong",{children:"Models"}),"."]}),r.jsxs("li",{children:["Deaktiviere Cloud-Modelle, klappe ",r.jsx("strong",{children:"OpenAI API"})," auf."]}),r.jsxs("li",{children:["Trage die Base URL unten ein und aktiviere das Modell ",r.jsx("strong",{children:"auto"}),"."]})]}),S==="opencode"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die ",r.jsx("code",{children:"opencode.jsonc"})," Konfigurationsdatei."]}),r.jsxs("li",{children:["Ersetze den Provider-Eintrag unter ",r.jsx("code",{children:"provider"})," mit dem Snippet unten."]})]}),S==="zed"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsxs("li",{children:["Öffne die Zed Settings (",r.jsx("code",{children:"ctrl+,"}),")."]}),r.jsxs("li",{children:["Füge das untenstehende JSON-Segment unter ",r.jsx("code",{children:"language_models"})," ein."]})]}),S==="continue"&&r.jsxs("ul",{className:"list-decimal pl-4 space-y-1",children:[r.jsx("li",{children:"Klicke auf das Zahnrad-Symbol in der Continue-Erweiterung."}),r.jsxs("li",{children:["Füge den Gateway-Eintrag zum ",r.jsx("code",{children:"models"}),"-Array hinzu."]})]})]}),f.tools&&r.jsxs("div",{className:"relative rounded-xl border border-border/40 bg-black/40 overflow-hidden mt-1 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/20 bg-black/20",children:[r.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:"JSON Config"}),r.jsxs("button",{onClick:()=>{var O,ee,pe,Me,Le;return il(S==="roocode"?(O=f.tools.cline)==null?void 0:O.snippet:S==="cursor"?(ee=f.tools.cursor)==null?void 0:ee.snippet:S==="opencode"?(pe=f.tools.opencode)==null?void 0:pe.snippet:S==="zed"?(Me=f.tools.zed)==null?void 0:Me.snippet:(Le=f.tools.continue)==null?void 0:Le.snippet)},className:"text-xs font-semibold text-primary hover:text-primary-foreground flex items-center gap-1 cursor-pointer",children:[je?r.jsx(cr,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Pm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:je?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-3 max-h-48 overflow-y-auto text-xs font-mono text-cyan-200/90 whitespace-pre scrollbar-thin select-text",children:r.jsxs("code",{children:[S==="roocode"&&((_r=f.tools.cline)==null?void 0:_r.snippet),S==="cursor"&&((Mr=f.tools.cursor)==null?void 0:Mr.snippet),S==="opencode"&&((dl=f.tools.opencode)==null?void 0:dl.snippet),S==="zed"&&((Zs=f.tools.zed)==null?void 0:Zs.snippet),S==="continue"&&((Ys=f.tools.continue)==null?void 0:Ys.snippet)]})})]}),r.jsx("button",{onClick:()=>I(null),className:"w-full h-9 rounded-lg bg-primary text-primary-foreground hover:opacity-90 font-semibold text-xs transition-opacity cursor-pointer mt-2",children:"Schließen"})]})})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Gateway"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Aktive Verbindung / Warmes Modell geladen"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded bg-gradient-to-r from-teal-500 to-emerald-500"}),r.jsx("span",{children:"VRAM-Verlauf: Modellspezifischer Speicheranteil"})]})]})]}),r.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:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:"Gateway Steckplatz-Belegung (Slot-Zuweisung)"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:["fast","heavy","coder","vision","scout"].map(O=>{var Me;const ee=R.find(Le=>Le.role===O),pe=ee?A.includes(ee.name):!1;return r.jsxs("div",{onClick:()=>Gs(O),className:J("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":ee?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:J("text-[9px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded border",Mc(O)),children:O}),pe&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:ee==null?void 0:ee.name,children:ee?(Me=ee.name.split("/").pop())==null?void 0:Me.replace(/\.gguf$/i,""):"nicht zugewiesen"}),r.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},O)})})]}),(p==null?void 0:p.current)&&r.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:[r.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Is,{className:"h-4.5 w-4.5 text-indigo-400"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),p.current.version!=null&&r.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",p.current.version]})]}),r.jsx("button",{onClick:()=>xe(!0),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",children:"Hirn wechseln"})]}),r.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:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:p.current.name,children:p.current.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsx("span",{children:p.current.params_b?`${p.current.params_b}B`:"—"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:p.current.quant||"GGUF"}),r.jsx("span",{children:"•"}),r.jsx("span",{children:Ht(p.current.size_bytes||0)})]})]}),p.update_available&&p.recommended?r.jsxs("button",{onClick:()=>al(p.recommended.repo),className:J("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",p.budget&&!p.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:[r.jsx(cn,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):r.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:[r.jsx(cr,{className:"h-4 w-4"})," Neueste Generation"]})]}),p.update_available&&p.recommended&&r.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",r.jsx("span",{className:"font-mono font-bold",children:p.recommended.name.replace(/-GGUF$/i,"")}),"(v",p.recommended.version,", ",p.recommended.params_b,"B) — von NousResearch."]}),p.budget&&r.jsxs("div",{className:J("text-[10px] flex items-start gap-1.5 leading-relaxed",p.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[r.jsx(Ra,{className:"h-3 w-3 shrink-0 mt-0.5"}),r.jsxs("span",{children:["Always-On-Brain ~",p.budget.brain_gb," GB + größtes on-demand (~",p.budget.largest_ondemand_gb," GB) = ",(p.budget.brain_gb+p.budget.largest_ondemand_gb).toFixed(1)," / ",p.budget.gtt_gb," GB",p.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[r.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",ae.length," von ",R.length,")"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>Z("all"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",_e==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),r.jsx("button",{onClick:()=>Z("in_use"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",_e==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),r.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[r.jsx("button",{onClick:()=>Te("grid"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Re==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),r.jsx("button",{onClick:()=>Te("list"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",Re==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),Re==="grid"?r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:ae.length===0?r.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:_e==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ae.map(O=>{const ee=A.includes(O.name),pe=h==null?void 0:h.model_list.find(Le=>Le.role===O.role),Me=Xp(O.name);return r.jsxs("div",{className:J("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",ee?"border-primary/45 shadow-primary/5":O.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"flex items-start justify-between gap-3",children:r.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[r.jsx("div",{className:J("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Me.color),title:Me.name,children:Me.initial}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:O.name,children:O.name.split("/").pop()}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[r.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:O.quant||"GGUF"}),ee&&r.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[r.jsx(Vo,{className:"h-3 w-3 animate-pulse"})," Warm"]}),O.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[9px] font-mono text-primary font-bold uppercase",children:O.role}),O.prompt_cache&&r.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"}),O.spec_active?r.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: ${O.spec_draft_model})`,children:"SPEC"}):O.spec_draft_model?r.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 (${O.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null,O.parallel_slots>1&&r.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:`${O.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",O.parallel_slots]}),O.incomplete&&r.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"})]})]})]})}),r.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:r.jsx(em,{caps:O.capabilities})})]}),r.jsxs("div",{className:"space-y-3 pt-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(Ra,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),r.jsx("div",{className:"text-foreground font-semibold",children:Ht(O.size_bytes)})]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[r.jsx(L0,{className:"h-3.5 w-3.5 text-primary/80"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),r.jsx("div",{className:"text-foreground font-semibold",children:Zp(O.ctx)})]})]})]}),pe&&r.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:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),r.jsxs("span",{children:["Upgrade verfügbar: ",pe.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>ll(pe.repo,O.role,O.quant||"Q4_K_M",O.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:[r.jsx(cn,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[r.jsx("button",{onClick:()=>ee?U(O.name):ke(O.name),disabled:O.incomplete&&!ee,className:J("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",O.incomplete&&!ee?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ee?"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:ee?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>pn(O.name,O.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"}),r.jsxs("button",{onClick:()=>ne(O),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",O.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":O.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:[r.jsx(ks,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>Wn(O.name),className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 flex items-center justify-center transition-colors cursor-pointer",title:"Modell löschen",children:r.jsx(ac,{className:"h-3.5 w-3.5"})})]})]})]},O.name)})}):r.jsx("div",{className:"space-y-2",children:ae.length===0?r.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:_e==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ae.map(O=>{const ee=A.includes(O.name),pe=Xp(O.name);return r.jsxs("div",{className:J("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",ee?"border-primary/45":O.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r.jsx("div",{className:J("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}),r.jsxs("div",{className:"min-w-0 text-left",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:O.name,children:O.name.split("/").pop()}),O.role&&r.jsx("span",{className:"px-1.5 py-0.5 rounded bg-primary/10 border border-primary/20 text-[8px] font-mono text-primary font-bold uppercase shrink-0",children:O.role}),O.prompt_cache&&r.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"}),O.spec_active?r.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: ${O.spec_draft_model})`,children:"SPEC"}):O.spec_draft_model?r.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 (${O.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null,O.parallel_slots>1&&r.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:`${O.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",O.parallel_slots]}),O.incomplete&&r.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"}),ee&&r.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[r.jsxs("span",{children:["Größe: ",Ht(O.size_bytes)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Kontext: ",Zp(O.ctx)]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:"font-mono text-[9px]",children:O.quant||"GGUF"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[r.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:r.jsx(em,{caps:O.capabilities})}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("button",{onClick:()=>ee?U(O.name):ke(O.name),disabled:O.incomplete&&!ee,className:J("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",O.incomplete&&!ee?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":ee?"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:ee?"Entladen":"Laden"}),r.jsx("button",{onClick:()=>pn(O.name,O.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"}),r.jsxs("button",{onClick:()=>ne(O),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",O.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":O.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:[r.jsx(ks,{className:"h-3 w-3"})," Spec"]}),r.jsx("button",{onClick:()=>Wn(O.name),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all cursor-pointer",title:"Modell löschen",children:r.jsx(ac,{className:"h-3.5 w-3.5"})})]})]})]},O.name)})})]}),B&&(()=>{var Le,ct;const O=$&&$.role===B?$:null,ee={};O==null||O.models.forEach(Ie=>{ee[Ie.name]=Ie});const pe=O?O.models.map(Ie=>R.find(Ze=>Ze.name===Ie.name)).filter(Boolean):R,Me=Ie=>{Mt(B,Ie),L(null)};return r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.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:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:["Rolle '",B,"' konfigurieren"]}),r.jsx("button",{onClick:()=>L(null),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für die Rolle ",r.jsx("strong",{className:"text-foreground",children:B}),":"]}),(O==null?void 0:O.recommended)&&r.jsxs("button",{onClick:()=>Me(O.recommended),title:(Le=ee[O.recommended])==null?void 0:Le.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:[r.jsx(ks,{className:"h-3 w-3"})," Auto: ",(ct=O.recommended.split("/").pop())==null?void 0:ct.replace(/\.gguf$/i,"")]})]}),r.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[r.jsx("button",{onClick:()=>Me(""),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:r.jsx("span",{children:"Zuweisung entfernen"})}),pe.map(Ie=>{var Xs;const Ze=ee[Ie.name],xn=Ie.role===B,Js=!!(Ze!=null&&Ze.recommended),cl=!!Ze&&!Ze.suitable;return r.jsxs("button",{onClick:()=>Me(Ie.name),className:J("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",Js?"border-primary/50 bg-primary/10":xn?"text-primary font-bold bg-primary/5 border-primary/30":cl?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[r.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[r.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(Xs=Ie.name.split("/").pop())==null?void 0:Xs.replace(/\.gguf$/i,""),Js&&r.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:Ze?`${Ze.params_b}B · ${Ie.quant} · ${Ze.reason}`:`${Ht(Ie.size_bytes)} · ${Ie.quant}`})]}),xn&&r.jsx(cr,{className:"h-4 w-4 shrink-0 text-primary"})]},Ie.name)})]})]})})})(),H&&r.jsx(Jb,{model:H,onClose:()=>ne(null),onChanged:k}),le&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.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:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Is,{className:"h-4 w-4"})," Agent-Hirn wechseln"]}),r.jsx("button",{onClick:()=>xe(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Wähle ein ",r.jsx("strong",{className:"text-foreground",children:"installiertes"})," Modell als Agent-Hirn. Es bekommt den",r.jsx("code",{className:"text-primary",children:" hermes"}),'-Alias, wird warm gehalten (brains-Gruppe), und Hermes nutzt es nach einem kurzen Gateway-Restart. Neues Modell (z.B. Hermes-4.3 oder Gemma-4)? Erst über „Modelle finden" laden.']}),r.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto pr-1",children:R.map(O=>{var pe;const ee=O.role==="hermes";return r.jsxs("button",{onClick:()=>!ee&&Vs(O.name),disabled:ee||O.incomplete,className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",ee?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":O.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:[r.jsxs("div",{className:"flex flex-col min-w-0",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(pe=O.name.split("/").pop())==null?void 0:pe.replace(/\.gguf$/i,"")}),r.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[O.capabilities.params_b?`${O.capabilities.params_b}B`:"?"," · ",Ht(O.size_bytes),O.role&&` · Rolle: ${O.role}`,O.capabilities.tools!=="no"?" · Tools ✓":" · ohne Tools"]})]}),ee?r.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[r.jsx(cr,{className:"h-3.5 w-3.5"})," Aktiv"]}):r.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Als Hirn setzen →"})]},O.name)})}),r.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[r.jsx("span",{children:"💡"}),r.jsxs("span",{children:["Für einen ",r.jsx("strong",{children:"Agenten"})," sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl als allgemeine Modelle."]})]})]})}),P]})}function e1(){const[s,o]=g.useState(""),[a,d]=g.useState([]),[u,f]=g.useState("Q4_K_M"),[h,p]=g.useState(""),[v,x]=g.useState(""),[b,w]=g.useState(""),[P,R]=g.useState([]),[A,E]=g.useState(null),[k,S]=g.useState(!1),I=["fast","heavy","coder","vision","scout"],{data:B}=Gn(),L=v?B==null?void 0:B.models.find(V=>(V.role||"").toLowerCase()===v):void 0;async function $(V,Ee,me){if(S(!1),!V.trim()){E(null);return}try{const Re=await he(`/api/fit?params_b=0&quant=${encodeURIComponent(Ee)}&ctx=8192&name=${encodeURIComponent(V)}&role=${encodeURIComponent(me)}`);E(Re)}catch{E(null)}}async function z(V){const Ee=V??s;if(Ee.trim()){p("Analysiere HuggingFace Repository..."),E(null);try{const me=await he(`/api/hf/quants?repo=${encodeURIComponent(Ee)}`);o(me.repo),d(me.quants);const Re=me.quants.length?me.quants.includes("Q4_K_M")?"Q4_K_M":me.quants[0]:u;me.quants.length&&f(Re),p(me.quants.length?"":"Keine GGUF-Dateien in diesem Repository gefunden."),me.quants.length&&$(me.repo,Re,v)}catch(me){p(`Fehler: ${me}`)}}}function H(V){f(V),$(s,V,v)}function ne(V){x(V),a.length&&$(s,u,V)}async function le(){if(b.trim()){p("Durchsuche HuggingFace...");try{const V=await he(`/api/hf/search?q=${encodeURIComponent(b)}`);R(V.results),p(V.results.length?"":"Keine Ergebnisse gefunden.")}catch(V){p(`Suche fehlgeschlagen: ${V}`)}}}async function xe(){if(s.trim()){if((A==null?void 0:A.fit.level)==="too_tight"&&!k){S(!0);return}p("Download-Job wird initiiert...");try{await he("/api/models/install",{method:"POST",body:JSON.stringify({repo:s,quant:u,role:v||void 0,jinja:!0})}),S(!1),p(`Download gestartet: ${s} (${u})${v?`, Rolle: ${v}`:""}. Fortschritt oben.`+(L?` „${v}" wurde von ${L.name} übernommen.`:"")+(v==="fast"||v==="coder"?" Speculative Draft (Vocab-geprüft) kannst du nach dem Download an der Modellkarte (»Spec«) setzen.":""))}catch(V){p(`Download-Fehler: ${V}`)}}}const je=(A==null?void 0:A.fit.level)==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":(A==null?void 0:A.fit.level)==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return r.jsxs("div",{className:"space-y-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"HF Download & Suche"}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsx("input",{value:s,onChange:V=>{o(V.target.value),E(null),S(!1)},placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{onClick:()=>z(),className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Quants laden"}),a.length>0&&r.jsxs(r.Fragment,{children:[r.jsx("select",{value:u,onChange:V=>H(V.target.value),className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:a.map(V=>r.jsx("option",{value:V,className:"bg-popover text-foreground",children:V},V))}),r.jsxs("select",{value:v,onChange:V=>ne(V.target.value),title:"Rolle (optional) — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none text-foreground font-semibold",children:[r.jsx("option",{value:"",className:"bg-popover text-foreground",children:"Rolle…"}),I.map(V=>r.jsx("option",{value:V,className:"bg-popover text-foreground",children:V},V))]}),r.jsx("button",{onClick:xe,className:`h-9 px-4 rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5 ${k?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"}`,children:k?r.jsxs(r.Fragment,{children:[r.jsx(Qo,{className:"h-3.5 w-3.5"})," OOM-Risiko — trotzdem laden"]}):r.jsxs(r.Fragment,{children:[r.jsx(cn,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]})]})]}),A&&r.jsxs("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium ${je}`,children:[r.jsx("span",{className:"font-bold uppercase tracking-wide",children:A.fit.text}),r.jsxs("span",{className:"font-mono opacity-90",children:["~",A.params_b,"B · ~",A.fit.req_gb," GB / ",A.sys_ram_gb," GB RAM · ~",A.fit.tps," t/s"]}),A.fit.level!=="too_tight"&&r.jsxs("span",{className:"font-mono opacity-80",title:`Setup-bewusst: GTT ${A.budget.gtt_gb} GB − reserviert ${A.budget.reserved_gb} GB (${A.budget.mode}) → ${A.budget.budget_gb} GB frei`,children:["ctx → ",(A.assigned_ctx/1024).toFixed(0),"k"]}),A.fit.level==="too_tight"&&r.jsx("span",{className:"opacity-90",children:"— passt nicht in den Speicher, würde beim Laden abstürzen (OOM)."})]}),L&&r.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] font-medium text-amber-400",children:[r.jsx(Qo,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),r.jsxs("span",{children:["Rolle ",r.jsxs("strong",{children:["„",v,'"']})," ist aktuell ",r.jsx("strong",{children:L.name})," zugewiesen. Beim Download übernimmt das neue Modell diese Rolle — ",L.name," bleibt installiert, verliert sie aber."]})]}),r.jsxs("div",{className:"flex gap-2 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:b,onChange:V=>w(V.target.value),onKeyDown:V=>V.key==="Enter"&&le(),placeholder:"HuggingFace durchsuchen (z.B. Llama-3.1)...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(jc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsx("button",{onClick:le,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer",children:"Suchen"})]}),P.length>0&&r.jsx("div",{className:"max-h-48 space-y-1.5 overflow-y-auto border border-border/40 bg-background/20 p-2 rounded-xl scrollbar-thin",children:P.map(V=>r.jsxs("button",{onClick:()=>{o(V.repo),R([]),w(""),z(V.repo)},className:"flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-xs bg-background/10 border border-border/10 hover:border-primary/30 hover:bg-background/30 transition-all",children:[r.jsx("span",{className:"font-semibold truncate",children:V.repo}),r.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground flex items-center gap-1 shrink-0",children:[r.jsx(cn,{className:"h-3 w-3"})," ",V.downloads.toLocaleString()]})]},V.repo))}),h&&r.jsx("div",{className:"text-[10px] font-medium text-primary font-mono",children:h})]})}const t1={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:ks},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Wo},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:sc},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:lc},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:oc}};function r1(){const{data:s,isLoading:o,error:a}=nb(),{data:d}=Gn(),{data:u}=Ec(),f=(d==null?void 0:d.models)??[],h=a?String(a):"",[p,v]=g.useState({}),[x,b]=g.useState({}),[w,P]=g.useState(!1);async function R(A,E,k,S){v(I=>({...I,[A]:"Starte..."}));try{await he("/api/models/install",{method:"POST",body:JSON.stringify({repo:A,role:E,quant:k,jinja:S})}),v(I=>({...I,[A]:"Download läuft"}))}catch{v(B=>({...B,[A]:"Fehler"}))}}return o?r.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):h||!s?r.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 (",h,")."]}):r.jsxs("div",{className:"space-y-8",children:[r.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:[r.jsxs("div",{children:["Modell-Registry geladen für ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.sys_ram_gb," GB"]})," System-RAM."]}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Am,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),r.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),r.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:s.categories.map(A=>{const E=t1[A.role]||{title:A.title||A.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:Ko},k=E.icon,S=f.find(H=>H.role===A.role),I=u==null?void 0:u.model_list.find(H=>H.role===A.role),B=A.models.find(H=>H.repo===A.recommended)||A.models[0];if(!B)return null;const L=p[B.repo],$=A.models.filter(H=>H.repo!==A.recommended),z=!!x[A.role];return r.jsxs("div",{className:J("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",S?"border-border/60":"border-primary/20 shadow-primary/5"),children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.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:r.jsx(k,{className:"h-5.5 w-5.5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:E.title}),r.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: ",A.role]})]})]}),S?r.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:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):r.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"})]}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:E.desc}),r.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:S?r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:S.name,children:S.name.split("/").pop()}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[r.jsxs("span",{children:["Größe: ",pc(S.size_bytes||0)]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",S.quant||"GGUF"]})]})]}):r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),r.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:B.name,children:B.name}),r.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[r.jsxs("span",{children:["Ersteller: ",B.author]}),r.jsx("span",{children:"•"}),r.jsxs("span",{children:["Quant: ",B.quant]})]}),r.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:r.jsx($b,{fit:B.fit})})]})}),r.jsx("div",{className:"pt-1",children:S?I?r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),r.jsxs("span",{children:["Bessere Version in der Registry: ",I.repo.split("/").pop()]})]}),r.jsxs("button",{onClick:()=>R(I.repo,A.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!p[I.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:[r.jsx(cn,{className:"h-3.5 w-3.5"}),p[I.repo]||"Auf neue Version aktualisieren"]})]}):r.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:[r.jsx(cr,{className:"h-4 w-4"})," Auf neuestem Stand"]}):r.jsxs("button",{onClick:()=>R(B.repo,A.role,B.quant||"Q4_K_M",B.caps.tools!=="no"),disabled:!!L,className:J("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",L?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[r.jsx(cn,{className:"h-3.5 w-3.5"}),L||"Optimales Modell einsetzen"]})})]}),$.length>0&&r.jsxs("div",{className:"border-t border-border/20 pt-3",children:[r.jsxs("button",{onClick:()=>b(H=>({...H,[A.role]:!z})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[z?r.jsx(k0,{className:"h-3 w-3"}):r.jsx(b0,{className:"h-3 w-3"}),r.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",$.length,")"]})]}),z&&r.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:$.map(H=>r.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:H.name,children:H.name}),r.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[r.jsxs("span",{children:["Quant: ",H.quant]}),r.jsx("span",{children:"•"}),r.jsx("span",{children:H.fit.text})]})]}),r.jsx("button",{onClick:()=>R(H.repo,A.role,H.quant||"Q4_K_M",H.caps.tools!=="no"),disabled:!!p[H.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:p[H.repo]||"Installieren"})]},H.repo))})]})]},A.role)})}),r.jsxs("div",{className:"border border-border/50 bg-card/20 rounded-2xl overflow-hidden shadow-md mt-4",children:[r.jsxs("button",{onClick:()=>P(!w),className:"w-full px-5 py-4 flex items-center justify-between text-xs font-bold uppercase tracking-wider text-muted-foreground hover:bg-card/30 transition-colors cursor-pointer",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(jc,{className:"h-4 w-4 text-primary"}),r.jsx("span",{children:"Eigenes Modell von Hugging Face laden (Erweiterte Ansicht)"})]}),r.jsx("span",{className:"text-[10px] text-primary hover:underline",children:w?"Ausblenden ▲":"Anzeigen ▼"})]}),w&&r.jsx("div",{className:"p-5 border-t border-border/20 bg-card/10",children:r.jsx(e1,{})})]})]})}function n1(){const[s,o]=g.useState("cockpit");return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.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"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),r.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(a=>r.jsx("button",{onClick:()=>o(a),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",s===a?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:a==="cockpit"?"Cockpit":"Modelle finden"},a))})]}),r.jsx(Yb,{}),r.jsx("div",{className:"transition-all duration-300",children:s==="cockpit"?r.jsx(Xb,{}):r.jsx(r1,{})})]})}function Ma({label:s,percent:o,detail:a,icon:d}){const u=o>90?"bg-red-500 shadow-md shadow-red-500/20":o>75?"bg-amber-500 shadow-md shadow-amber-500/20":"bg-primary shadow-md shadow-primary/20";return r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/30 transition-all duration-300",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(d,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-foreground",children:s})]}),r.jsxs("span",{className:"text-xs font-mono font-bold text-foreground",children:[Math.round(o),"%"]})]}),r.jsx("div",{className:"w-full h-2 bg-background/40 rounded-full overflow-hidden border border-border/20",children:r.jsx("div",{className:J("h-full transition-all duration-700 ease-out",u),style:{width:`${Math.min(o,100)}%`}})}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground/80",children:a})]})}function s1(){const{data:s,error:o}=Ba(3e3),{data:a}=eb(3e3),{showAlert:d,dialogElement:u}=Vn(),f=o?String(o):"",[h,p]=g.useState(""),[v,x]=g.useState({});async function b(){p("Backup snapshotted...");try{const P=await he("/api/system/backup",{method:"POST"});p(P.ok?`Snapshot erzeugt: ${P.snapshot} (${P.files.length} Dateien)`:"Keine Änderungen zu sichern.")}catch(P){p(`Fehler: ${P.message}`)}}async function w(P){x(R=>({...R,[P]:!0}));try{const R=await he("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:P})});R.ok?d("Erfolgreich",`Dienst ${P} wurde erfolgreich neu gestartet.`):d("Fehler beim Neustart",`Fehler beim Neustart: ${R.err||"Unbekannter Fehler"}`)}catch(R){d("Fehler",`Fehler: ${R.message}`)}finally{x(R=>({...R,[P]:!1}))}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.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:"System-Diagnose & Status"}),r.jsx("p",{className:"text-sm text-muted-foreground flex items-center gap-1",children:"Echtzeit-Ressourcen der Box, Dienst-Überwachung und Systempflege."})]}),f&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["System-Status nicht lesbar (",f,")."]}),s&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(Ma,{label:"CPU",percent:s.cpu.percent,detail:s.cpu.cores?`${s.cpu.cores} Cores`:void 0,icon:Lt}),r.jsx(Ma,{label:"RAM",percent:s.ram.percent,detail:`${Et(s.ram.used)} / ${Et(s.ram.total)} GB`,icon:Vo}),s.gpu&&s.gpu.busy_percent!=null&&r.jsx(Ma,{label:"GPU",percent:s.gpu.busy_percent,detail:s.gpu.gtt_used!=null&&s.gpu.gtt_total?`${Et(s.gpu.gtt_used)} / ${Et(s.gpu.gtt_total)} GB (GTT/unified)`:s.gpu.vram_used!=null&&s.gpu.vram_total?`${Et(s.gpu.vram_used)} / ${Et(s.gpu.vram_total)} GB VRAM`:void 0,icon:Lt}),s.disk&&r.jsx(Ma,{label:"Disk",percent:s.disk.percent,detail:`${Et(s.disk.used)} / ${Et(s.disk.total)} GB`,icon:Ra})]}),s.temp&&(s.temp.cpu||s.temp.gpu)&&r.jsxs("div",{className:"flex gap-3 text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-2.5 rounded-xl self-start w-fit",children:[s.temp.cpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["CPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.cpu," °C"]})]}),s.temp.cpu!=null&&s.temp.gpu!=null&&r.jsx("span",{children:"|"}),s.temp.gpu!=null&&r.jsxs("span",{className:"flex items-center gap-1",children:["GPU-Temperatur: ",r.jsxs("span",{className:"text-foreground font-bold",children:[s.temp.gpu," °C"]})]})]})]}),a&&r.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:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Homelab-Dienste"}),r.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"logs"}})),className:"h-7 px-3 rounded-lg border border-border/60 bg-background/25 text-[10px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",children:"System-Logs anzeigen"})]}),r.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:a.services.map(P=>r.jsxs("div",{className:"flex items-center justify-between p-3.5 rounded-xl bg-background/20 border border-border/30 hover:border-primary/20 transition-all group",children:[r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",P.ok?"bg-emerald-500":"bg-amber-500")}),r.jsxs("div",{className:"truncate",children:[r.jsx("div",{className:"text-xs font-bold text-foreground truncate",children:P.name}),r.jsx("div",{className:"text-[9px] text-muted-foreground/60 font-mono mt-0.5 truncate",children:P.url})]})]}),r.jsx("button",{onClick:()=>w(P.name),disabled:v[P.name],className:"h-7 w-7 rounded-lg border border-border/40 text-muted-foreground hover:text-primary hover:bg-primary/5 flex items-center justify-center transition-all opacity-0 group-hover:opacity-100",title:"Dienst neu starten",children:r.jsx(Un,{className:J("h-3.5 w-3.5",v[P.name]&&"animate-spin")})})]},P.name))}),r.jsxs("div",{className:"flex flex-wrap gap-4 border-t border-border/20 pt-4 text-[10px] font-semibold text-muted-foreground",children:[r.jsxs("a",{href:Jo(a.links.engine_ui),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(Ta,{className:"h-3 w-3"})," Engine Dashboard (llama-swap)"]}),r.jsxs("a",{href:Jo(a.links.gateway),target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:text-primary-foreground hover:bg-primary/10 px-2 py-1 rounded transition-colors",children:[r.jsx(Ta,{className:"h-3 w-3"})," OpenAI Gateway"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"System-Backup & Snapshot"}),r.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Erzeuge einen Git-Snapshot der aktuellen Konfigurationen und des System-Zustands."})]}),r.jsx("div",{className:"flex items-center gap-3 self-start sm:self-auto shrink-0",children:r.jsxs("button",{onClick:b,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(F0,{className:"h-4 w-4"})," Snapshot erstellen"]})})]}),h&&r.jsx("div",{className:"text-[10px] font-mono text-primary font-medium bg-primary/5 p-3 rounded-xl border border-primary/20",children:h}),u]})}function o1(){const[s,o]=g.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[a,d]=g.useState(localStorage.getItem("mc_mcp_path")||""),[u,f]=g.useState("cline"),[h,p]=g.useState(!1),v=new URLSearchParams({host:s});a&&v.set("mcp_path",a);const{data:x,error:b}=vh(v.toString()),w=b?String(b):"";function P(k){o(k),k&&localStorage.setItem("mc_host",k)}function R(k){d(k),localStorage.setItem("mc_mcp_path",k)}const A=x==null?void 0:x.tools[u];async function E(){A&&(await navigator.clipboard.writeText(A.snippet),p(!0),setTimeout(()=>p(!1),1500))}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.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"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Kopiere vorgefertigte Konfigurationsdateien für deinen lokalen PC (IDEs, Cline, Roo Code, Cursor), um direkt auf das geteilte Gedächtnis und den Auto-Swap-Gateway der Box zuzugreifen."})]}),r.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:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(P0,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),r.jsx("input",{value:s,onChange:k=>P(k.target.value),placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(M0,{className:"h-3.5 w-3.5 text-primary"})," Lokaler MCP-Scriptpfad"]}),r.jsx("input",{value:a,onChange:k=>R(k.target.value),placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]})]}),w&&r.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: ",w]}),x&&r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex flex-wrap gap-1 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:Object.entries(x.tools).map(([k,S])=>r.jsx("button",{onClick:()=>f(k),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",u===k?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:S.label},k))}),A&&r.jsxs("div",{className:"space-y-3",children:[A.note&&r.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-xs text-muted-foreground leading-relaxed",children:[r.jsx(R0,{className:"h-4.5 w-4.5 text-primary shrink-0 mt-0.5"}),r.jsx("span",{children:A.note})]}),r.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[r.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80 shadow-md shadow-red-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80 shadow-md shadow-amber-500/10"}),r.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80 shadow-md shadow-emerald-500/10"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:[r.jsx(La,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{children:u==="cline"||u==="cursor"?"config.json":"settings.json"})]}),r.jsxs("button",{onClick:E,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:[h?r.jsx(cr,{className:"h-3.5 w-3.5 text-emerald-400"}):r.jsx(Pm,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:h?"Kopiert":"Kopieren"})]})]}),r.jsx("pre",{className:"p-5 overflow-x-auto text-xs font-mono text-cyan-200/90 whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",children:r.jsx("code",{children:A.snippet})})]})]})]})]})}const tm=["user","instruction","stable","versioned","ephemeral"],Bd={user:{label:"User",icon:G0,color:"text-cyan-400",border:"border-cyan-500/30",bg:"bg-cyan-500/10",text:"text-cyan-400"},instruction:{label:"Regel",icon:I0,color:"text-violet-400",border:"border-violet-500/30",bg:"bg-violet-500/10",text:"text-violet-400"},stable:{label:"Fakt",icon:$s,color:"text-indigo-400",border:"border-indigo-500/30",bg:"bg-indigo-500/10",text:"text-indigo-400"},versioned:{label:"Version",icon:H0,color:"text-amber-400",border:"border-amber-500/30",bg:"bg-amber-500/10",text:"text-amber-400"},ephemeral:{label:"Temporär",icon:S0,color:"text-pink-400",border:"border-pink-500/30",bg:"bg-pink-500/10",text:"text-pink-400"}},rm={label:"Gedächtnis",icon:Mm,bg:"bg-muted/10",text:"text-muted-foreground"},l1={user:"border-l-cyan-500/80",instruction:"border-l-violet-500/80",stable:"border-l-indigo-500/80",versioned:"border-l-amber-500/80",ephemeral:"border-l-pink-500/80"};function a1(){const[s,o]=g.useState(""),[a,d]=g.useState(""),[u,f]=g.useState(""),[h,p]=g.useState("stable"),[v,x]=g.useState(!1),b=fn(),{showAlert:w,showConfirm:P,dialogElement:R}=Vn(),{data:A=[],error:E}=yh({q:a,category:s}),k=E?String(E):"",S=()=>b.invalidateQueries({queryKey:["memory"]});async function I(){u.trim()&&(await he("/api/memory",{method:"POST",body:JSON.stringify({content:u,category:h,source:"ui"})}),f(""),S())}async function B($){await he(`/api/memory/${$}`,{method:"DELETE"}),S()}async function L(){x(!0);try{const $=await he("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if($.duplicate_count===0){w("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}P("Deduplizierung bestätigen",`${$.duplicate_count} Dublette(n) in ${$.groups.length} Gruppe(n) gefunden. Entfernen?`,async()=>{try{await he("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),S()}catch(z){w("Fehler",`Fehler beim Löschen: ${z.message}`)}})}catch($){w("Fehler",`Fehler bei der Deduplizierung: ${$.message}`)}finally{x(!1)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool (Memory)"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Die geteilte Konstitution des Systems. Alle Instanzen (Hermes, IDEs, Gateway) lesen und schreiben hierauf per MCP-Protokoll."})]}),r.jsxs("button",{onClick:L,disabled:v,className:"flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-card hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50 shrink-0 self-start",children:[r.jsx(B0,{className:"h-4 w-4 text-primary animate-pulse"}),r.jsx("span",{children:"Deduplizieren"})]})]}),r.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:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Neuen Eintrag anlegen"}),r.jsx("textarea",{value:u,onChange:$=>f($.target.value),placeholder:"Füge eine neue Regel, eine Vorliebe oder einen stabilen Fakt über das Projekt oder dich hinzu...",rows:3,className:"w-full resize-none rounded-xl border border-border/60 bg-background/30 p-3.5 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground transition-all leading-relaxed"}),r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Kategorie"}),r.jsx("select",{value:h,onChange:$=>p($.target.value),className:"h-8 rounded-lg border border-border/60 bg-background/50 px-2 py-1 text-xs outline-none font-semibold text-foreground cursor-pointer",children:tm.map($=>{var z;return r.jsx("option",{value:$,className:"bg-popover text-foreground",children:((z=Bd[$])==null?void 0:z.label)||$},$)})})]}),r.jsxs("button",{onClick:I,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-primary/10",children:[r.jsx(Rm,{className:"h-4 w-4"})," Speichern"]})]})]}),r.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx("input",{value:a,onChange:$=>d($.target.value),placeholder:"Gedächtnis durchsuchen...",className:"w-full h-9 pl-9 pr-3 rounded-lg border border-border/60 bg-card/45 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),r.jsx(jc,{className:"absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-1 bg-card/30 border border-border/40 rounded-xl overflow-x-auto max-w-full",children:[r.jsx("button",{onClick:()=>o(""),className:J("h-7 px-3 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer whitespace-nowrap",s?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),tm.map($=>{const z=Bd[$]||rm,H=z.icon;return r.jsxs("button",{onClick:()=>o($),className:J("h-7 px-2.5 rounded-lg text-[10px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 whitespace-nowrap",s===$?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{children:z.label})]},$)})]})]}),k&&r.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Laden des Gedächtnisses: ",k]}),r.jsx("div",{className:"space-y-3",children:A.length===0?r.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."}):A.map($=>{const z=Bd[$.category]||rm,H=z.icon;return r.jsxs("div",{className:J("flex items-start justify-between gap-4 p-4 rounded-xl border border-l-4 bg-card/45 backdrop-blur-md border-border/60 shadow-md shadow-black/5 hover:border-primary/20 transition-all group",l1[$.category]||"border-l-muted"),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsxs("span",{className:J("flex items-center gap-1 px-2 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider font-mono shrink-0",z.bg,z.text),children:[r.jsx(H,{className:"h-3 w-3"}),r.jsx("span",{className:"hidden sm:inline",children:z.label})]}),r.jsx("span",{className:"text-xs text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1",children:$.content})]}),r.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[r.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-background/20 px-1.5 py-0.5 rounded uppercase tracking-wider",children:$.source}),r.jsx("button",{onClick:()=>B($.id),className:"h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",title:"Eintrag löschen",children:r.jsx(ac,{className:"h-3.5 w-3.5"})})]})]},$.id)})}),R]})}function Pa({label:s,ok:o,detail:a,icon:d,onClick:u}){return r.jsxs("div",{onClick:u,className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-3 hover:border-primary/40 transition-all duration-300",o?"border-border/60":"border-amber-500/30",u&&"cursor-pointer hover:bg-card/70"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:s}),r.jsx(d,{className:J("h-4.5 w-4.5",o?"text-primary":"text-amber-500")})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full ring-2 ring-black/40",o?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:o?"Bereit / Online":"Offline / Inaktiv"})]}),a&&r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground truncate max-w-[200px]",title:a,children:a})]}),u&&r.jsxs("button",{onClick:f=>{f.stopPropagation(),u()},className:"mt-2 flex items-center justify-center gap-1.5 w-full py-1.5 px-3 rounded-lg border border-primary/30 bg-primary/10 hover:bg-primary/20 text-primary text-[10px] font-bold uppercase tracking-wider transition-all cursor-pointer font-space",children:[r.jsx(Lt,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Gehirn wechseln"})]})]})}function i1(){const{data:s,error:o}=gh(5e3),{data:a}=Gn(),{showAlert:d,dialogElement:u}=Vn(),f=fn(),h=o?String(o):"",p=g.useMemo(()=>["auto","fast","heavy",...((a==null?void 0:a.models)??[]).map($=>{var z;return((z=$.name.split("/").pop())==null?void 0:z.replace(".gguf",""))||$.name})],[a]),[v,x]=g.useState(null),[b,w]=g.useState(!1),[P,R]=g.useState({width:800,height:360}),A=g.useRef(null),E=g.useCallback(L=>{if(A.current&&(A.current.disconnect(),A.current=null),L){const $=new ResizeObserver(z=>{if(!z||z.length===0)return;const H=z[0].contentRect;R({width:H.width,height:H.height})});$.observe(L),A.current=$}},[]),k=P.width,S=P.height,I=(L,$,z,H)=>{const ne=(L+z)/2;return`M ${L} ${$} C ${ne} ${$}, ${ne} ${H}, ${z} ${H}`};async function B(L){try{await he("/api/agent/brain",{method:"POST",body:JSON.stringify({model:L})}),d("Erfolgreich",`Hermes-Gehirn wurde auf '${L}' geändert. Der Gateway-Dienst wurde neu gestartet.`),f.invalidateQueries({queryKey:qe.agentStatus}),w(!1)}catch($){d("Fehler",`Fehler beim Wechseln des Gehirns: ${$.message}`)}}return r.jsxs("div",{className:"space-y-6",children:[r.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),r.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{children:[r.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"}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",r.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(s==null?void 0:s.webui_url)&&r.jsxs("a",{href:Jo(s.webui_url),target:"_blank",rel:"noopener",className:J("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",s.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[r.jsx(Ta,{className:"h-4 w-4"}),r.jsx("span",{children:"AnythingLLM öffnen"})]})]}),h&&r.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 (",h,")."]}),s&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(Pa,{label:"Agent Gateway",ok:s.gateway_reachable,detail:"Port :8642 (REST API)",icon:Is}),r.jsx(Pa,{label:"AnythingLLM",ok:s.webui_reachable,detail:"Chat-UI (AnythingLLM)",icon:Vo}),r.jsx(Pa,{label:"Aktives Gehirn",ok:s.gateway_reachable,detail:s.brain_model?`Model: ${s.brain_model}`:"Model: auto",icon:Lt,onClick:()=>w(!0)}),r.jsx(Pa,{label:"Verdrahtung",ok:s.has_config,detail:`Config: ${s.has_config?"✓":"—"} · Skills: ${s.has_skills?"✓":"—"} · Memory: ${s.has_memories?"✓":"—"}`,icon:qo})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Interactive Agent Flow Graph"}),r.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed",children:"Visualisiert das Zusammenspiel und die Verbindungspfade zwischen den Hermes-Systemkomponenten."})]}),r.jsxs("div",{ref:E,className:"relative w-full h-96 border border-border/30 rounded-xl bg-black/25 overflow-hidden flex",children:[r.jsxs("svg",{className:"absolute inset-0 pointer-events-none w-full h-full",children:[r.jsxs("defs",{children:[r.jsxs("linearGradient",{id:"cyan-to-teal",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#06b6d4",stopOpacity:"0.45"}),r.jsx("stop",{offset:"100%",stopColor:"#0d9488",stopOpacity:"0.45"})]}),r.jsxs("linearGradient",{id:"active-glow",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.8"}),r.jsx("stop",{offset:"100%",stopColor:"#10b981",stopOpacity:"0.8"})]})]}),r.jsx("path",{d:I(k*.15,S*.5,k*.5,S*.5),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="webui"||s.webui_reachable)&&r.jsx("path",{d:I(k*.15,S*.5,k*.5,S*.5),stroke:"#06b6d4",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:I(k*.5,S*.5,k*.85,S*.3),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="brain"||s.gateway_reachable)&&r.jsx("path",{d:I(k*.5,S*.5,k*.85,S*.3),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"}),r.jsx("path",{d:I(k*.5,S*.5,k*.85,S*.7),stroke:"url(#cyan-to-teal)",strokeWidth:"1.5",fill:"none"}),(v==="gateway"||v==="wiring"||s.gateway_reachable)&&r.jsx("path",{d:I(k*.5,S*.5,k*.85,S*.7),stroke:"url(#active-glow)",strokeWidth:"2.5",fill:"none",className:"svg-flow-path"})]}),r.jsxs("div",{className:"absolute cursor-pointer select-none z-10 w-36 h-9 -translate-y-1/2 -translate-x-1/2 rounded-xl border border-border/60 bg-card/75 backdrop-blur-md flex items-center justify-center gap-1.5 px-2.5 hover:border-primary transition-all text-[10px] font-semibold text-foreground shadow shadow-black/20",style:{left:"15%",top:"50%"},onMouseEnter:()=>x("webui"),onMouseLeave:()=>x(null),onClick:()=>s.webui_reachable&&window.open(Jo(s.webui_url),"_blank"),title:s.webui_reachable?"Klicken um AnythingLLM zu öffnen":"AnythingLLM offline",children:[r.jsx(Vo,{className:J("h-3.5 w-3.5",s.webui_reachable?"text-emerald-400":"text-amber-500")}),r.jsx("span",{children:"AnythingLLM"}),r.jsx("span",{className:J("w-1.5 h-1.5 rounded-full animate-pulse ml-auto",s.webui_reachable?"bg-emerald-500":"bg-amber-500")})]}),r.jsxs("div",{className:"absolute select-none z-10 w-40 py-2.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-2xl border border-primary/50 bg-card/90 backdrop-blur-md flex flex-col items-center justify-center text-center shadow-lg shadow-primary/5 cursor-pointer",style:{left:"50%",top:"50%"},onMouseEnter:()=>x("gateway"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(Is,{className:"h-3.5 w-3.5 text-primary"}),r.jsx("span",{className:"text-[10px] uppercase font-bold text-primary font-space tracking-wide",children:"Agent Gateway"})]}),r.jsx("div",{className:"text-[9px] font-mono text-muted-foreground mt-0.5",children:"Port :8642"}),r.jsx("div",{className:J("mt-1 px-1.5 py-0.5 rounded text-[8px] font-semibold uppercase font-mono border",s.gateway_reachable?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:s.gateway_reachable?"Online":"Offline"})]}),r.jsxs("div",{className:J("absolute z-20 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none cursor-pointer",s.gateway_reachable?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"30%"},onMouseEnter:()=>x("brain"),onMouseLeave:()=>x(null),onClick:()=>w(!0),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(Lt,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Aktives Gehirn"})]}),s.gateway_reachable&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsx("div",{className:"text-[10px] font-mono font-medium truncate mt-0.5 text-foreground font-space",title:s.brain_model,children:s.brain_model||"auto"})]}),r.jsxs("div",{className:J("absolute z-10 w-44 py-1.5 px-3 -translate-y-1/2 -translate-x-1/2 rounded-xl border flex flex-col justify-center hover:border-primary/50 transition-all text-left shadow select-none",s.has_config?"border-emerald-500/50 bg-emerald-500/5 shadow-emerald-500/5":"border-border/60 bg-card/75"),style:{left:"85%",top:"70%"},onMouseEnter:()=>x("wiring"),onMouseLeave:()=>x(null),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[r.jsx(qo,{className:"h-3 w-3 text-primary"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.has_config&&r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),r.jsxs("div",{className:"text-[9px] font-mono mt-0.5 text-muted-foreground flex gap-1 justify-between",children:[r.jsxs("span",{children:["Config: ",s.has_config?"✓":"—"]}),r.jsxs("span",{children:["Skills: ",s.has_skills?"✓":"—"]}),r.jsxs("span",{children:["Memory: ",s.has_memories?"✓":"—"]})]})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-3 text-[10px] text-muted-foreground border-t border-border/20 pt-3",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-cyan-400"}),r.jsx("span",{children:"Cyan-Fluss: Client-Anfrage an Agenten"})]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:"Grüner Puls: Verbindung hergestellt / Modul online"})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(D0,{className:"h-5 w-5 text-primary"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full",s.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r.jsx("span",{className:"text-xs font-semibold text-foreground",children:s.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("p",{children:["Der ",r.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",r.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."]}),r.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",r.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."]})]}),r.jsx("div",{className:"space-y-3",children:s.pc_executor_reachable?r.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[r.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),r.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder WebUI Befehle auf TobisNicerPC ausführen. Nutze ",r.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",r.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",r.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):r.jsxs("div",{className:"space-y-2",children:[r.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),r.jsxs("p",{children:["Starte ",r.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",r.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),r.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"})]})})]})]}),!s.gateway_reachable&&r.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:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx($s,{className:"h-5 w-5 text-amber-500"}),r.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[r.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),r.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",r.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),r.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[r.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),r.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-webui"})]}),r.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",r.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"}),"."]})]})]})]}),s&&b&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:r.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:[r.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[r.jsx(Lt,{className:"h-4 w-4"}),r.jsx("span",{children:"Hermes-Gehirn konfigurieren"})]}),r.jsx("button",{onClick:()=>w(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed",children:['Das „Gehirn" ist das primäre LLM für Hermes. Wähle ein Modell aus deiner Bibliothek oder nutze ein Gateway-Alias (',r.jsx("code",{className:"text-primary font-semibold",children:"auto"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"fast"})," / ",r.jsx("code",{className:"text-primary font-semibold",children:"heavy"}),"):"]}),r.jsx("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:p.map(L=>{const $=["auto","fast","heavy"].includes(L);return r.jsxs("button",{onClick:()=>B(L),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border border-border/30",s.brain_model===L||!s.brain_model&&L==="auto"?"text-primary font-bold bg-primary/10 border-primary/30":"text-foreground bg-background/20"),children:[r.jsxs("div",{className:"flex flex-col text-left",children:[r.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:L}),r.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:$?"Gateway Routing Alias":"Installiertes GGUF Modell"})]}),(s.brain_model===L||!s.brain_model&&L==="auto")&&r.jsx(cr,{className:"h-4 w-4 shrink-0 text-primary"})]},L)})})]})}),u]})}function d1(){const[s,o]=g.useState("connect"),[a,d]=g.useState("roocode"),[u,f]=g.useState(null),h="192.168.178.151",[p,v]=g.useState(!1),[x,b]=g.useState(null);function w(){v(!0),he("/api/health").then(P=>{f(P),b(P.engine_reachable?"success":"partial")}).catch(()=>{f(null),b("fail")}).finally(()=>v(!1))}return g.useEffect(()=>{w()},[]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Stack-Anleitung & Vibe-Coding-Guide"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Einsteigerfreundliche Erklärungen zu deinem Stack und Schritt-für-Schritt-Anleitungen zur Anbindung deiner Editoren."})]}),r.jsxs("div",{className:"flex gap-4 border-b border-border/40 pb-px",children:[r.jsx("button",{onClick:()=>o("connect"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="connect"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Editor-Anbindung"}),r.jsx("button",{onClick:()=>o("concepts"),className:J("pb-3 text-xs font-bold uppercase tracking-wider border-b-2 px-1 transition-all",s==="concepts"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"KI-Wissensdatenbank (Juni 2026)"})]}),s==="connect"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:J("h-3 w-3 rounded-full ring-2 ring-black/40",x==="success"&&"bg-emerald-500 animate-pulse",x==="partial"&&"bg-amber-500",x==="fail"&&"bg-red-500",!x&&"bg-muted")}),r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lokaler Verbindungs-Check"}),r.jsxs("div",{className:"text-[10px] text-muted-foreground mt-0.5 font-mono",children:[x==="success"&&`Erfolgreich! Dein PC hat Zugriff auf das Box-Gateway (v${(u==null?void 0:u.version)||""}).`,x==="partial"&&"Gateway erreichbar, aber die llama-cpp-Engine ist offline.",x==="fail"&&"Verbindung fehlgeschlagen. Ist die Box im selben LAN-Netzwerk?",!x&&"Verbindung wird geprüft..."]})]})]}),r.jsxs("button",{onClick:w,disabled:p,className:"h-8 px-3 flex items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50 cursor-pointer self-start sm:self-auto shrink-0",children:[r.jsx(Un,{className:J("h-3.5 w-3.5",p&&"animate-spin")}),r.jsx("span",{children:"Testen"})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(Mm,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie funktioniert mein Stack?"})]}),r.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Lt,{className:"h-4 w-4 text-cyan-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"1. Die Zentrale"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein Dashboard. Hier siehst du die CPU-/RAM- und GPU-Last der Box und siehst sofort, ob Updates anstehen."})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Ko,{className:"h-4 w-4 text-violet-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"2. Modell-Zentrale"})]}),r.jsxs("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:["Deine GGUF-Datenbank. Gesteuert von ",r.jsx("strong",{children:"llama-swap"}),". Lädt dein schnelles Alltags-Hirn (`fast`) oder dein schweres Logik-Hirn (`heavy`) vollautomatisch im VRAM."]})]}),r.jsxs("div",{className:"p-4 rounded-xl border border-border/60 bg-card/20 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Wo,{className:"h-4 w-4 text-indigo-400"}),r.jsx("h3",{className:"text-xs font-bold text-foreground",children:"3. Das Gedächtnis"})]}),r.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed",children:"Dein geteiltes Langzeitgedächtnis (Memory-Pool). Hier merkt sich dein Agent Regeln, Projekt-Details und Vorlieben."})]})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 px-1",children:[r.jsx(sc,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Vibe Coding auf dem PC einrichten"})]}),r.jsxs("div",{className:"flex gap-1.5 bg-card/20 p-1 border border-border/40 rounded-xl max-w-fit",children:[r.jsxs("button",{onClick:()=>d("roocode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer flex items-center gap-1.5",a==="roocode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:[r.jsx(Am,{className:"h-3.5 w-3.5 fill-amber-400/20"}),"Roo Code (VS Code)"]}),r.jsx("button",{onClick:()=>d("cursor"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="cursor"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"Cursor IDE"}),r.jsx("button",{onClick:()=>d("opencode"),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",a==="opencode"?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:"OpenCode Desktop"})]}),r.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:[a==="roocode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Roo Code Kopplung (Empfohlene Open-Source-Erweiterung)"}),r.jsx("p",{children:"Roo Code ist die beliebteste und flexibelste Vibe-Coding-Erweiterung für VS Code im Jahr 2026. Sie ermöglicht vollen Zugriff auf das Terminal und das MCP-Gedächtnis."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Roo Code installieren"]}),r.jsxs("p",{className:"pl-6",children:["Suche in VS Code nach der Erweiterung ",r.jsx("strong",{children:"Roo Code"})," und installiere sie."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"API-Anbindung konfigurieren"]}),r.jsx("p",{className:"pl-6",children:"Klicke auf das Roo-Code-Symbol in der Sidebar, öffne die Einstellungen (Zahnrad) und stelle folgendes ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Provider:"})," OpenAI Compatible"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model ID:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"MCP Gedächtnis verknüpfen (Optional, aber empfohlen)"]}),r.jsxs("p",{className:"pl-6",children:["Damit Roo Code auf deinen ",r.jsx("strong",{children:"Gedächtnis-Pool"})," zugreifen kann, kopiere die MCP-Konfiguration aus dem Reiter ",r.jsx("strong",{children:"Verbinden"})," und füge sie in deine lokale Roo-Code-Konfigurationsdatei ein."]})]})]})]}),a==="cursor"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Cursor IDE Kopplung (Proprietäre All-in-One IDE)"}),r.jsx("p",{children:"Cursor ist ein polierter, extrem schneller VS-Code-Fork mit hervorragenden, tief integrierten Autovervollständigungen (Tab-Completions)."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"Einstellungen öffnen"]}),r.jsxs("p",{className:"pl-6",children:["Öffne Cursor, klicke oben rechts auf das Zahnrad (Settings) und navigiere zu ",r.jsx("strong",{children:"Models"}),"."]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"OpenAI API überschreiben"]}),r.jsxs("p",{className:"pl-6",children:["Deaktiviere die Standard-Cloudmodelle, klappe den Bereich ",r.jsx("strong",{children:"OpenAI API"})," auf und konfiguriere:"]}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Override Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"API Key:"})," ",r.jsx("span",{className:"italic text-muted-foreground/50",children:'beliebig (z.B. "local")'})]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Modell hinzufügen"]}),r.jsxs("p",{className:"pl-6",children:["Trage in der Modell-Liste ein neues Modell mit dem Namen ",r.jsx("strong",{children:"auto"})," ein und wähle es als aktives Modell aus. Cursor leitet ab jetzt alle deine Anfragen an die Box weiter."]})]})]})]}),a==="opencode"&&r.jsxs("div",{className:"space-y-4 text-xs leading-relaxed text-muted-foreground",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-sm font-bold text-foreground",children:"OpenCode Desktop Kopplung (Open-Source Vibe-Coding-App)"}),r.jsx("p",{children:"OpenCode ist eine standalone Desktop-App für ein ablenkungsfreies Coden über natürliche Sprache. Es trennt den KI-Prozess von deinem Editor."})]}),r.jsxs("div",{className:"space-y-3.5 border-t border-border/20 pt-4",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"1"}),"OpenCode Desktop herunterladen"]}),r.jsx("p",{className:"pl-6",children:"Lade die Desktop-Anwendung von der offiziellen Website (opencode.ai) herunter und starte sie."})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"2"}),"Endpunkt auf Box-Gateway setzen"]}),r.jsx("p",{className:"pl-6",children:"Gehe in den Bereich Einstellungen ➔ Provider, deaktiviere die Cloud-Voreinstellungen und trage deinen lokalen Server ein:"}),r.jsx("div",{className:"pl-6 pt-1",children:r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1 text-foreground",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Base URL:"})," http://",h,":9001/v1"]}),r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground/60",children:"Model:"})," auto"]})]})})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-1.5",children:[r.jsx("span",{className:"h-4.5 w-4.5 rounded-full bg-primary/20 text-primary flex items-center justify-center font-mono text-[10px]",children:"3"}),"Erster Vibe-Coding Test"]}),r.jsx("p",{className:"pl-6",children:'Starte eine neue Session und teste die Verbindung mit einem einfachen Prompt, z. B. *"Erstelle ein einfaches Skript, das die Fibonaccizahlen berechnet"*. Das Box-Gateway tauscht das Modell im Hintergrund vollautomatisch aus.'})]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 space-y-3 shadow-lg shadow-black/10",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(La,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Was tun, wenn das Coden hakt?"})]}),r.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-2 list-disc pl-4 leading-relaxed",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Keine Verbindung?"})," Überprüfe im Live-Verbindungsprüfer oben, ob die Box-IP erreichbar ist. Stelle sicher, dass dein lokaler PC im selben WLAN/LAN-Netzwerk wie die Box eingeloggt ist."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Modell antwortet nicht?"})," Schaue unter ",r.jsx("strong",{children:"Diagnose"}),", ob der Dienst `llama-swap` aktiv (grün) is. Wenn nicht, klicke daneben auf ",r.jsx("strong",{children:"Restart"}),"."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Hermes Agent reagiert merkwürdig?"})," Starte in AnythingLLM einfach eine frische Session (neuen Chat). Ältere Chats sammeln Kontext-Müll an."]})]})]})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex items-start gap-4",children:[r.jsx(oc,{className:"h-8 w-8 text-primary shrink-0 mt-0.5"}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Entwickler-Guide: Modernes Agentic Coding (2026)"}),r.jsx("p",{className:"text-xs text-muted-foreground leading-normal",children:"Willkommen im Wissenszentrum für dein Mission Control 2 Setup. Hier erfährst du, wie die verschiedenen Technologien (MoE, MCP, Skills, Hermes) zusammenarbeiten und wie du das Maximum aus deinen AI-Prozessabläufen herausholst."})]})]}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Ko,{className:"h-5 w-5 text-cyan-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"1. Mixture of Experts (MoE)"}),r.jsx("span",{className:"text-[9px] text-cyan-400 font-mono",children:"Effizienz durch Spezialisierung"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Bei traditionellen LLMs wird für jedes Wort das gesamte neuronale Netz aktiviert. Bei MoE besteht das Modell aus mehreren spezialisierten Teilnetzwerken (den ",r.jsx("em",{children:"Experts"}),"). Ein intelligenter ",r.jsx("em",{children:"Router"})," entscheidet pro Token (Wortteil), welche Experten zur Berechnung herangezogen werden."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," So können extrem leistungsstarke Modelle (wie DeepSeek-V3, Mixtral oder Command R+) mit wesentlich geringeren Hardwarekosten ausgeführt werden. Es wird nur ein Bruchteil der Parameter geladen und aktiv berechnet, was Speicherplatz spart und die Inferenz beschleunigt."]}),r.jsxs("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] text-foreground",children:[r.jsx("span",{className:"text-cyan-400",children:"Vorteil:"})," GPT-4-Klasse Performance bei einem Bruchteil der aktiven VRAM-Last auf deinem Homelab!"]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(oc,{className:"h-5 w-5 text-violet-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"2. Model Context Protocol (MCP)"}),r.jsx("span",{className:"text-[9px] text-violet-400 font-mono",children:"Standardisierte Agenten-Tools"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," MCP ist ein offenes Protokoll (initiiert von Anthropic), das festlegt, wie ein KI-Client (z.B. Roo Code auf deinem PC) mit externen Datenquellen und Tools kommuniziert. Es funktioniert wie ein USB-Standard für KI."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Warum in MC2?"})," MCP trennt den AI-Kern von der Umgebung. Statt für jeden Editor eigene Tools zu schreiben, binden deine Agenten (Roo Code, Hermes) einfach MCP-Server an. Diese Server können Dateien lesen, Websuchen durchführen, Git bedienen oder mit deiner App interagieren."]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Gute Quellen für MCP Server:"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("a",{href:"https://smithery.ai/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Smithery Registry"})," — Ein Portal zum Suchen und automatischen Installieren von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://glama.ai/mcp/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Glama MCP Registry"})," — Eine kuratierte, umfangreiche Community-Datenbank von MCP Servern."]}),r.jsxs("li",{children:[r.jsx("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"Offizielles Anthropic Repo"})," — Das offizielle Repository mit Standards wie filesystem, postgres, sqlite, brave-search und puppeteer."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Wo,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"3. Agent Skills"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Modulbasierte Fähigkeiten"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Ein Skill ist ein Verzeichnis mit standardisierten Anweisungen, Scripten und Beispielen, das deine Agenten für spezifische Aufgaben trainiert (z.B. Test-Driven Development, Code-Vereinfachung, API-Design)."]}),r.jsxs("p",{children:[r.jsx("strong",{children:"Wie benutzt man sie?"})," Lege einen Skill-Ordner unter ",r.jsx("code",{children:".agents/skills/"})," in deinem Projekt an. Das Herzstück ist die Datei ",r.jsx("code",{children:"SKILL.md"})," mit folgendem Aufbau:"]}),r.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- -name: tdd-pro -description: Drive development with strict TDD practices ---- -# Instructions -...`}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/25 rounded-xl border border-border/30 text-[10px]",children:[r.jsx("div",{className:"font-bold text-foreground",children:"Wo gibt es Skills & wo liegen sie?"}),r.jsxs("ul",{className:"list-disc pl-4 space-y-2.5 text-muted-foreground",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"skills.sh Registry & CLI:"})," Das offizielle offene Portal für Agent-Skills (",r.jsx("a",{href:"https://skills.sh/",target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold",children:"skills.sh"}),"). Du kannst Skills direkt über das Terminal suchen und in deinem Projekt installieren:",r.jsxs("div",{className:"mt-1 font-mono text-[9px] bg-background/40 p-2 rounded border border-border/30 text-cyan-300",children:["# Nach Skills suchen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills find"}),r.jsx("br",{}),"# Skill zum aktuellen Projekt hinzufügen:",r.jsx("br",{}),r.jsx("span",{className:"text-foreground",children:"npx skills add [owner/repo]"})]})]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Globaler Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:"C:\\Users\\TobisPC\\.gemini\\config\\plugins\\agent-skills\\skills\\"}),". Hier sind deine vorinstallierten, global verfügbaren Skills (wie ",r.jsx("i",{children:"code-simplification"}),", ",r.jsx("i",{children:"api-and-interface-design"}),", etc.) abgelegt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Projekt-Pfad:"})," ",r.jsx("code",{className:"text-foreground select-all",children:".agents/skills/"}),". Lege diesen Ordner im Root eines beliebigen Projekts an. Dein lokaler Editor-Agent (z.B. Roo Code) liest ihn beim Starten automatisch ein."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Vorlagen / Beispiele:"})," Kopiere einfach bestehende Skills aus dem globalen Verzeichnis oder erstelle deine eigenen, indem du eine ",r.jsx("code",{children:"SKILL.md"})," mit YAML-Header (name, description) anlegst."]})]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(Lt,{className:"h-5 w-5 text-indigo-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"4. Arbeiten mit Hermes"}),r.jsx("span",{className:"text-[9px] text-indigo-400 font-mono",children:"Autonomer Box-Agent"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2 leading-normal",children:[r.jsxs("p",{children:[r.jsx("strong",{children:"Was ist das?"})," Hermes ist der auf der Box installierte, autonome Hintergrund-Agent. Er verwaltet das Dateisystem und kann über REST (Port 8642) oder eine interaktive ChatUI (Port 8787) gesteuert werden."]}),r.jsx("p",{children:r.jsx("strong",{children:"Best Practices für Hermes:"})}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Chat-Kontext sauber halten:"})," Starte regelmäßig neue Chats. Zu große Historien verlangsamen den Agenten und führen zu Halluzinationen."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gehirn festlegen:"})," Konfiguriere im Gateway die Modell-Rolle ",r.jsx("code",{children:"brain"})," für Hermes, damit er automatisch das passende Modell per Llama Swap lädt."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Sandbox umgehen:"})," Erweitere Hermes' System-Prompt (AnythingLLM-Einstellungen), um Befehle über SSH an deinen Windows-PC zu leiten."]})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx(qo,{className:"h-5 w-5 text-amber-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"5. Richtiges Arbeiten mit Tools (Dateien, Terminal, DevTools)"}),r.jsx("span",{className:"text-[9px] text-amber-400 font-mono",children:"Fehler vermeiden & Kosten senken"})]})]}),r.jsxs("div",{className:"grid md:grid-cols-3 gap-4 text-xs text-muted-foreground leading-normal",children:[r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(La,{className:"h-3.5 w-3.5 text-primary"})," Terminal"]}),r.jsxs("p",{className:"text-[11px]",children:["Verwende nur non-interaktive Befehle. Hänge bei langen Tasks (wie dev-Servern) ein ",r.jsx("code",{children:"&"})," an oder nutze die integrierte Job-Verwaltung. Verwende niemals interaktive Eingabeaufforderungen."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(sc,{className:"h-3.5 w-3.5 text-cyan-400"})," Dateimanager"]}),r.jsxs("p",{className:"text-[11px]",children:["Überschreibe keine ganzen Dateien, wenn du nur eine Zeile ändern willst. Verwende gezielte Ersetzungs-Tools (wie ",r.jsx("code",{children:"replace_file_content"}),"). Das spart massiv Token-Kosten und beugt Fehlern vor."]})]}),r.jsxs("div",{className:"space-y-1.5 p-3 bg-background/10 rounded-xl border border-border/30",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1",children:[r.jsx(qo,{className:"h-3.5 w-3.5 text-violet-400"})," Browser DevTools"]}),r.jsx("p",{className:"text-[11px]",children:"Koppele deine Debug-Dienste mit dem Chrome-DevTools-Plugin. So kann der Agent Fehler in der Konsole live analysieren und das DOM verifizieren, anstatt blind zu raten."})]})]})]}),r.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-6 shadow-lg shadow-black/10 space-y-4 md:col-span-2",children:[r.jsxs("div",{className:"flex items-center gap-2 border-b border-border/20 pb-3",children:[r.jsx($s,{className:"h-5 w-5 text-emerald-400"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Wie autonom ist Mission Control 2 wirklich?"}),r.jsx("span",{className:"text-[9px] text-emerald-400 font-mono",children:"Die Grenze zwischen Automatisierung und Kontrolle"})]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-normal",children:[r.jsxs("p",{children:["Mission Control 2 ist als ",r.jsx("strong",{children:"semi-autonomes Gateway"})," konzipiert. Es besitzt die Fähigkeit, komplexe Workflows komplett selbstständig durchzuführen, unterliegt jedoch strikten Sicherheitsplanken:"]}),r.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 pt-1",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(Pp,{className:"h-3 w-3 text-emerald-400"})," Was läuft vollautomatisch?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsx("li",{children:"Modellaustausch (Routing) per llama-swap je nach Anfragetyp (z.B. Code vs. Reasoning)."}),r.jsx("li",{children:"Hintergrund-Synchronisation und Speicherung von Gedächtniseinträgen (Memory)."}),r.jsx("li",{children:"Modell-Installation und API-Key-Injektionen in Gateway-Verbindungen."})]})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("h4",{className:"font-bold text-foreground flex items-center gap-1 text-[11px]",children:[r.jsx(Pp,{className:"h-3 w-3 text-amber-400"})," Wo ist menschliche Freigabe nötig?"]}),r.jsxs("ul",{className:"list-disc pl-4 space-y-1 text-[11px]",children:[r.jsxs("li",{children:[r.jsx("strong",{children:"Systembefehle:"})," Das Ausführen von Terminal-Kommandos auf deinem PC erfordert standardmäßig deine Bestätigung."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Kritische Systemeingriffe:"})," OS-Updates, Engine-Rebuilds und Host-Reboots müssen manuell über das Dashboard ausgelöst werden."]}),r.jsxs("li",{children:[r.jsx("strong",{children:"Gedächtnis-Löschung:"})," Permanentes Verwerfen von gesammelten Memorys wird von dir freigegeben."]})]})]})]}),r.jsxs("p",{className:"text-[11px] bg-background/25 p-3 rounded-xl border border-border/30 mt-2",children:[r.jsx("strong",{children:"Fazit:"})," Der Stack erledigt die Kärrnerarbeit (Modelle tauschen, API-Adapter bereitstellen, Sandbox-Verbindungen herstellen) komplett im Hintergrund. Er agiert als dein persönlicher, treuer Copilot, ohne jemals ungefragt schädliche Operationen auf deinem Hauptsystem auszuführen."]})]})]})]})]})]})}function c1({title:s,hint:o}){return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold",children:s}),r.jsx("p",{className:"text-sm text-muted-foreground",children:o})]}),r.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:[r.jsx(_0,{className:"h-8 w-8 text-muted-foreground"}),r.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const u1=[{id:"llama-swap",label:"Llama Swap",type:"system"},{id:"mission-control-2",label:"Mission Control 2",type:"user"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user"},{id:"hermes-dashboard",label:"Hermes Dashboard",type:"user"},{id:"hermes-webui",label:"Hermes WebUI",type:"user"}];function Hd(s){return s==null?"":s>1024**3?`${(s/1024**3).toFixed(2)} GB`:`${(s/1024**2).toFixed(1)} MB`}function f1({open:s,onClose:o,defaultTab:a="maintenance"}){const[d,u]=g.useState(null),[f,h]=g.useState([]),[p,v]=g.useState("llama-swap"),[x,b]=g.useState(""),[w,P]=g.useState(!1),[R,A]=g.useState(null),[E,k]=g.useState({}),[S,I]=g.useState("maintenance"),[B,L]=g.useState(!1),[$,z]=g.useState(null);function H(U,we,Mt){z({type:"alert",title:U,message:we,onConfirm:()=>{z(null),Mt&&Mt()}})}function ne(U,we,Mt){z({type:"confirm",title:U,message:we,onConfirm:()=>{z(null),Mt()},onCancel:()=>z(null)})}function le(U){return U?new Date(U*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}const[xe,je]=g.useState(""),[V,Ee]=g.useState(""),[me,Re]=g.useState(!1),[Te,_e]=g.useState(!1);g.useEffect(()=>{s&&(je(localStorage.getItem("mc_sudo_password")||""),Ee(localStorage.getItem("mc_hf_token")||""))},[s]),g.useEffect(()=>{s&&a&&I(a)},[s,a]);const Z=g.useRef(null);function ae(){he("/api/maintenance/updates").then(u).catch(U=>console.error("Error loading updates",U))}function X(){he("/api/jobs").then(U=>h(U.jobs||[])).catch(U=>console.error("Error loading jobs",U))}function M(U){P(!0),A(null),he(`/api/maintenance/logs?service=${U}&lines=150`).then(we=>{we.ok?b(we.text):(b(`Fehler beim Laden der Logs: ${we.err||"Unbekannter Fehler"}`),(we.status==="incorrect_password"||we.status==="password_required")&&A(we.status))}).catch(we=>b(`Fehler: ${we.message}`)).finally(()=>{P(!1),setTimeout(()=>{Z.current&&(Z.current.scrollTop=Z.current.scrollHeight)},50)})}g.useEffect(()=>{if(!s)return;ae(),X();const U=setInterval(()=>{X(),ae()},3e3);return()=>clearInterval(U)},[s]),g.useEffect(()=>{!s||S!=="logs"||M(p)},[s,S,p]);async function C(){try{await he("/api/maintenance/os-update",{method:"POST"}),X(),I("maintenance")}catch(U){H("Fehler",`Fehler beim Starten des OS-Updates: ${U.message}`)}}async function Y(){try{await he("/api/maintenance/engine-update",{method:"POST"}),X(),I("maintenance")}catch(U){H("Fehler",`Fehler beim Engine-Update: ${U.message}`)}}async function te(){L(!0);try{await he("/api/maintenance/check-updates",{method:"POST"}),X(),I("maintenance")}catch(U){H("Fehler",`Fehler bei der Update-Suche: ${U.message}`)}finally{L(!1)}}async function Q(U,we){try{await he("/api/models/install",{method:"POST",body:JSON.stringify({repo:U,role:we})}),H("Gestartet",`Modell-Upgrade für '${we}' (${U}) gestartet.`),X(),I("maintenance")}catch(Mt){H("Fehler",`Fehler beim Starten des Modell-Upgrades: ${Mt.message}`)}}async function re(){ne("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await he("/api/maintenance/reboot",{method:"POST"}),H("Reboot","Reboot ausgelöst. System startet neu...",()=>{o()})}catch(U){H("Fehler",`Fehler beim Reboot: ${U.message}`)}})}async function ce(U){k(we=>({...we,[U]:!0}));try{const we=await he("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:U})});we.ok?H("Dienst neu gestartet",`Dienst ${U} wurde erfolgreich neu gestartet.`,()=>{S==="logs"&&p===U&&M(U)}):H("Fehler",`Fehler beim Neustart: ${we.err||"Unbekannter Fehler"}`)}catch(we){H("Fehler",`Fehler beim Neustart: ${we.message}`)}finally{k(we=>({...we,[U]:!1}))}}async function ke(U){try{await he(`/api/jobs/${U}/cancel`,{method:"POST"}),X()}catch(we){H("Fehler",`Fehler beim Abbrechen: ${we.message}`)}}return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:J("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",s?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:o}),r.jsxs("div",{className:J("fixed inset-y-0 right-0 w-full sm:w-[500px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",s?"translate-x-0":"translate-x-full"),children:[r.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Lt,{className:"h-4.5 w-4.5 text-primary"}),r.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),r.jsx("button",{onClick:o,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:r.jsx(Sr,{className:"h-4 w-4"})})]}),r.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[r.jsx("button",{onClick:()=>I("maintenance"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",S==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),r.jsx("button",{onClick:()=>I("logs"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",S==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),r.jsx("button",{onClick:()=>I("settings"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",S==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[S==="maintenance"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Wartungsaktionen"}),r.jsxs("div",{className:"flex items-center gap-2",children:[(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Zuletzt gesucht: ",le(d.last_check)]}),r.jsxs("button",{onClick:te,disabled:B,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[r.jsx(Un,{className:J("h-3 w-3",B&&"animate-spin")}),"Nach Updates suchen"]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("button",{onClick:C,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx($s,{className:"h-5 w-5 text-cyan-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"OS Update (apt)"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:d!=null&&d.os?`${d.os} Updates verfügbar`:"Auf neuestem Stand"})]}),r.jsxs("button",{onClick:Y,className:"flex flex-col items-start gap-1 p-4 rounded-xl border border-border/60 bg-background/20 hover:border-primary/50 transition-all text-left group",children:[r.jsx($0,{className:"h-5 w-5 text-violet-400 mb-1 group-hover:scale-105 transition-transform"}),r.jsx("span",{className:"text-xs font-semibold",children:"Engine Update"}),r.jsx("span",{className:"text-[10px] text-muted-foreground",children:d!=null&&d.engine?"Update verfügbar":"Auf neuestem Stand"})]})]}),r.jsxs("button",{onClick:re,className:"flex w-full items-center gap-3 p-3 rounded-xl border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[r.jsx(Om,{className:"h-4.5 w-4.5"}),r.jsxs("div",{children:[r.jsx("div",{children:"Host-System neu starten (Reboot)"}),r.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet das gesamte Betriebssystem des Homelabs neu"})]})]})]}),(d==null?void 0:d.model_list)&&d.model_list.length>0&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Verfügbare Modell-Upgrades"}),(d==null?void 0:d.last_check)&&r.jsxs("span",{className:"text-[9px] text-muted-foreground",children:["Gesucht: ",le(d.last_check)]})]}),r.jsx("div",{className:"space-y-2",children:d.model_list.map(U=>r.jsx("div",{className:"p-3 rounded-xl border border-border/60 bg-background/20 flex flex-col gap-2",children:r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-xs font-semibold",children:U.title}),r.jsx("div",{className:"text-[10px] font-mono text-muted-foreground",children:U.repo}),r.jsxs("div",{className:"text-[10px] text-primary font-semibold uppercase mt-0.5",children:["Rolle: ",U.role]})]}),r.jsxs("button",{onClick:()=>Q(U.repo,U.role),className:"flex items-center gap-1.5 text-[10px] font-semibold text-emerald-400 hover:text-emerald-300 border border-emerald-500/20 bg-emerald-500/5 hover:bg-emerald-500/10 px-2 py-1 rounded-lg transition-colors shrink-0",children:[r.jsx(cn,{className:"h-3.5 w-3.5"}),"Upgrade"]})]})},U.role))})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),r.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[f.filter(U=>U.state==="running"||U.state==="queued").length," Aktiv"]})]}),r.jsx("div",{className:"space-y-3",children:f.length===0?r.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."}):f.map(U=>{const we=U.state==="running"||U.state==="queued";return r.jsxs("div",{className:J("p-3 rounded-xl border transition-all duration-300",we?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[we&&r.jsxs("span",{className:"flex h-2 w-2 relative",children:[r.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),r.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),U.label]}),r.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[r.jsxs("span",{children:["ID: ",U.id]}),r.jsx("span",{children:"•"}),r.jsx("span",{className:J(U.state==="done"&&"text-emerald-400",U.state==="failed"&&"text-red-400",U.state==="running"&&"text-primary",U.state==="queued"&&"text-amber-400",U.state==="canceled"&&"text-muted-foreground"),children:U.state})]})]}),we&&r.jsx("button",{onClick:()=>ke(U.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"})]}),U.state==="running"&&r.jsxs("div",{className:"mt-3 space-y-1",children:[r.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${U.progress??0}%`}})}),r.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[r.jsxs("span",{children:[U.progress??0,"%"]}),U.done_bytes!=null&&U.total_bytes!=null&&r.jsxs("span",{children:[Hd(U.done_bytes)," / ",Hd(U.total_bytes),U.rate_bps!=null&&` (${Hd(U.rate_bps)}/s)`]}),U.eta_s!=null&&r.jsxs("span",{children:["ETA: ",U.eta_s,"s"]})]})]})]},U.id)})})]})]}),S==="logs"&&r.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{value:p,onChange:U=>v(U.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:u1.map(U=>r.jsxs("option",{value:U.id,children:[U.label," (",U.type==="system"?"systemd-root":"user",")"]},U.id))}),r.jsxs("button",{onClick:()=>ce(p),disabled:E[p],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:[r.jsx(Un,{className:J("h-3.5 w-3.5",E[p]&&"animate-spin")}),"Restart"]})]}),r.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:[r.jsxs("div",{className:"flex h-9 items-center justify-between px-4 border-b border-border/40 bg-black/30 shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground",children:[r.jsx(La,{className:"h-3 w-3 text-primary"}),r.jsxs("span",{children:["stdout/stderr - ",p]})]}),r.jsx("button",{onClick:()=>M(p),disabled:w,className:"text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(Un,{className:J("h-3 w-3",w&&"animate-spin")})})]}),r.jsx("pre",{ref:Z,className:"flex-1 p-4 overflow-y-auto text-[10px] font-mono text-cyan-300/90 whitespace-pre-wrap select-text leading-relaxed scrollbar-thin",children:R==="password_required"||R==="incorrect_password"?r.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center h-full space-y-3",children:[r.jsx(Qo,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),r.jsx("div",{className:"text-xs font-semibold text-amber-300",children:R==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),r.jsxs("p",{className:"text-[10px] text-muted-foreground max-w-xs leading-normal",children:["Für das Auslesen der systemd-Logs von ",p," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),r.jsx("button",{onClick:()=>I("settings"),className:"px-3 py-1.5 text-[10px] font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-md transition-colors mt-2",children:"Sudo-Passwort eintragen"})]}):w&&!x?r.jsx("span",{className:"text-muted-foreground",children:"Lade Logs..."}):x||r.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."})})]})]}),S==="settings"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),r.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."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx($s,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:me?"text":"password",value:xe,onChange:U=>je(U.target.value),placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>Re(!me),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:me?r.jsx(Rp,{className:"h-4 w-4"}):r.jsx(lc,{className:"h-4 w-4"})})]}),r.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."})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[r.jsx(O0,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),r.jsxs("div",{className:"relative",children:[r.jsx("input",{type:Te?"text":"password",value:V,onChange:U=>Ee(U.target.value),placeholder:"hf_...",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),r.jsx("button",{type:"button",onClick:()=>_e(!Te),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:Te?r.jsx(Rp,{className:"h-4 w-4"}):r.jsx(lc,{className:"h-4 w-4"})})]}),r.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."})]}),r.jsxs("div",{className:"flex gap-3 pt-2",children:[r.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",xe),localStorage.setItem("mc_hf_token",V),H("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"}),r.jsx("button",{onClick:()=>{je(""),Ee(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),H("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"})]})]})]})]}),$&&r.jsx(Eh,{type:$.type,title:$.title,message:$.message,onConfirm:$.onConfirm,onCancel:$.onCancel})]})}function p1(){var w,P,R,A,E;const[s,o]=g.useState("dashboard"),[a,d]=g.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[u,f]=g.useState(!1),[h,p]=g.useState("maintenance"),{data:v}=Xy(),{data:x}=Ba(2e4);g.useEffect(()=>{document.documentElement.classList.add("dark")},[]),g.useEffect(()=>{const k=S=>{var B;p(((B=S.detail)==null?void 0:B.tab)||"maintenance"),f(!0)};return window.addEventListener("open-system-drawer",k),()=>window.removeEventListener("open-system-drawer",k)},[]);const b=ic.find(k=>k.id===s);return r.jsxs("div",{className:"flex h-full relative",children:[r.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[r.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]"}),r.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),r.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),r.jsx(Jy,{onNavigate:o}),r.jsx(f1,{open:u,onClose:()=>f(!1),defaultTab:h}),r.jsxs("aside",{className:J("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",a?"w-16":"w-60"),children:[r.jsxs("div",{className:J("flex items-center py-4 border-b border-border/40 shrink-0",a?"flex-col gap-3 px-2":"justify-between px-5"),children:[r.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[r.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!a&&r.jsxs("div",{className:"leading-tight",children:[r.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r.jsx("button",{onClick:()=>{d(k=>{const S=!k;return localStorage.setItem("mc_sidebar_collapsed",S.toString()),S})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:a?"Maximieren":"Minimieren",children:a?r.jsx(j0,{className:"h-4 w-4"}):r.jsx(w0,{className:"h-4 w-4"})})]}),r.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:ic.map(k=>r.jsxs("button",{onClick:()=>o(k.id),className:J("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",a?"justify-center p-2.5":"gap-3 px-3 py-2",s===k.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:a?k.label:void 0,children:[r.jsx(k.icon,{className:"h-4.5 w-4.5 shrink-0"}),!a&&r.jsx("span",{className:"truncate",children:k.label})]},k.id))}),r.jsx("div",{className:J("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",a?"px-2 text-center":"px-5"),children:a?r.jsx("div",{className:"flex justify-center",children:r.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",v?v.engine_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:v?`Engine ${v.engine_reachable?"online":"offline"}`:"Backend offline"})}):r.jsxs("div",{className:"space-y-2 text-left",children:[v?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:J("h-2 w-2 rounded-full animate-pulse",v.engine_reachable?"bg-emerald-500":"bg-amber-500")}),r.jsxs("span",{className:"truncate",children:["Engine ",v.engine_reachable?"online":"offline"]})]}):r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",r.jsx("span",{className:"truncate",children:"Backend offline"})]}),(x==null?void 0:x.versions)&&r.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[r.jsxs("div",{className:"truncate",title:x.versions.mc2?`${x.versions.mc2.branch}-${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""} (${x.versions.mc2.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"MC2:"})," ",x.versions.mc2?`${x.versions.mc2.hash}${x.versions.mc2.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:((w=x.versions.engine)==null?void 0:w.type)==="git"?`${x.versions.engine.branch}-${x.versions.engine.hash}${x.versions.engine.dirty?"*":""} (${x.versions.engine.date})`:((P=x.versions.engine)==null?void 0:P.version_text)||"unbekannt",children:[r.jsx("strong",{children:"Engine:"})," ",((R=x.versions.engine)==null?void 0:R.type)==="git"?`${x.versions.engine.hash}${x.versions.engine.dirty?"*":""}`:((E=(A=x.versions.engine)==null?void 0:A.version_text)==null?void 0:E.split(" ").pop())||"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_ui?`${x.versions.hermes_ui.branch}-${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""} (${x.versions.hermes_ui.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes UI:"})," ",x.versions.hermes_ui?`${x.versions.hermes_ui.hash}${x.versions.hermes_ui.dirty?"*":""}`:"—"]}),r.jsxs("div",{className:"truncate",title:x.versions.hermes_agent?`${x.versions.hermes_agent.branch}-${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""} (${x.versions.hermes_agent.date})`:"nicht gefunden",children:[r.jsx("strong",{children:"Hermes Agent:"})," ",x.versions.hermes_agent?`${x.versions.hermes_agent.hash}${x.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[r.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:[r.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.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"}),r.jsxs("button",{onClick:()=>{const k=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(k)},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:[r.jsx(E0,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Suchen"}),r.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),r.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[s==="dashboard"&&r.jsx(Zb,{}),s==="models"&&r.jsx(n1,{}),s==="system"&&r.jsx(s1,{}),s==="connect"&&r.jsx(o1,{}),s==="memory"&&r.jsx(a1,{}),s==="agent"&&r.jsx(i1,{}),s==="guide"&&r.jsx(d1,{}),!["dashboard","models","system","connect","memory","agent","guide"].includes(s)&&r.jsx(c1,{title:b.label,hint:b.hint})]})]})]})}const m1=new n0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});Rg.createRoot(document.getElementById("root")).render(r.jsx(mm.StrictMode,{children:r.jsx(s0,{client:m1,children:r.jsx(p1,{})})})); diff --git a/frontend/dist/assets/index-CWa0E1B9.css b/frontend/dist/assets/index-CWa0E1B9.css new file mode 100644 index 0000000..33955fc --- /dev/null +++ b/frontend/dist/assets/index-CWa0E1B9.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.right-0{right:0}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-\[-10\%\]{bottom:-10%}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-44{height:calc(var(--spacing) * 44)}.h-96{height:calc(var(--spacing) * 96)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-full{height:100%}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scrollbar-thin{scrollbar-width:thin}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/10{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/10{border-color:color-mix(in oklab,hsl(var(--border)) 10%,transparent)}}.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/70{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,hsl(var(--border)) 70%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-pink-500\/30{border-color:#f6339a4d}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/30{border-color:color-mix(in oklab,var(--color-pink-500) 30%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-pink-500\/80{border-left-color:#f6339acc}@supports (color:color-mix(in lab,red,red)){.border-l-pink-500\/80{border-left-color:color-mix(in oklab,var(--color-pink-500) 80%,transparent)}}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.bg-black\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/75{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/75{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-card\/90{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/90{background-color:color-mix(in oklab,hsl(var(--card)) 90%,transparent)}}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-muted,.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500) 10%,transparent)}}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover,.bg-popover\/95{background-color:hsl(var(--popover))}@supports (color:color-mix(in lab,red,red)){.bg-popover\/95{background-color:color-mix(in oklab,hsl(var(--popover)) 95%,transparent)}}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/20{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-amber-400\/20{fill:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.fill-amber-400\/20{fill:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.stroke-border\/40{stroke:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.stroke-border\/40{stroke:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-12{padding:calc(var(--spacing) * 12)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-px{padding-bottom:1px}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/90{color:#53eafde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/90{color:color-mix(in oklab,var(--color-cyan-300) 90%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-muted-foreground,.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-slate-300{color:var(--color-slate-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-400{color:var(--color-violet-400)}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/10{--tw-shadow-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/20{--tw-shadow-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[130px\]{--tw-blur:blur(130px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[140px\]{--tw-blur:blur(140px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[160px\]{--tw-blur:blur(160px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}@media(hover:hover){.hover\:border-primary:hover,.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/30:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/30:hover{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-primary:focus{border-color:hsl(var(--primary))}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-\[500px\]{width:500px}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:self-auto{align-self:auto}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media(min-width:64rem){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:all .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav button[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav button[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 8e40afc..6a0f3de 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,8 +7,8 @@ Mission Control 2.0 - - + +
diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5641660..0e34a25 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -14,6 +14,7 @@ "lucide-react": "^0.460.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "recharts": "^3.9.0", "tailwind-merge": "^2.5.5" }, "devDependencies": { @@ -1131,6 +1132,42 @@ } } }, + "node_modules/@reduxjs/toolkit": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.12.0.tgz", + "integrity": "sha512-KiT+RzZbp6mQET+Mg+h2c97+9j1sNflUxQkIHI7Yuzf6Peu+OYpmkn6nbHWmLLWj+1ZODUJFwGZ7gx3L9R9EOw==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@standard-schema/utils": "^0.3.0", + "immer": "^11.0.0", + "redux": "^5.0.1", + "redux-thunk": "^3.1.0", + "reselect": "^5.1.0" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18 || ^19", + "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-redux": { + "optional": true + } + } + }, + "node_modules/@reduxjs/toolkit/node_modules/immer": { + "version": "11.1.8", + "resolved": "https://registry.npmjs.org/immer/-/immer-11.1.8.tgz", + "integrity": "sha512-/tbkHMW7y10Lx6i1crLjD4/OhNkRG+Fo7byZHtah0547nIeXYcpIXaUh0IAQY6gO5459qpGGYapcEOHtFXkIuA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.27", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", @@ -1527,6 +1564,18 @@ "win32" ] }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@standard-schema/utils": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz", + "integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==", + "license": "MIT" + }, "node_modules/@tailwindcss/node": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.1.tgz", @@ -1882,6 +1931,69 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", @@ -1927,6 +2039,12 @@ "@types/react": "^18.0.0" } }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", + "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", + "license": "MIT" + }, "node_modules/@vitejs/plugin-react": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", @@ -2067,6 +2185,127 @@ "devOptional": true, "license": "MIT" }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -2085,6 +2324,12 @@ } } }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==", + "license": "MIT" + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -2122,6 +2367,16 @@ "node": ">=10.13.0" } }, + "node_modules/es-toolkit": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.49.0.tgz", + "integrity": "sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==", + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks" + ] + }, "node_modules/esbuild": { "version": "0.25.12", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", @@ -2174,6 +2429,12 @@ "node": ">=6" } }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -2233,6 +2494,25 @@ "dev": true, "license": "ISC" }, + "node_modules/immer": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz", + "integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/jiti": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", @@ -2699,6 +2979,36 @@ "react": "^18.3.1" } }, + "node_modules/react-is": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.7.tgz", + "integrity": "sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==", + "license": "MIT", + "peer": true + }, + "node_modules/react-redux": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.3.0.tgz", + "integrity": "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g==", + "license": "MIT", + "dependencies": { + "@types/use-sync-external-store": "^0.0.6", + "use-sync-external-store": "^1.4.0" + }, + "peerDependencies": { + "@types/react": "^18.2.25 || ^19", + "react": "^18.0 || ^19", + "redux": "^5.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, "node_modules/react-refresh": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", @@ -2778,6 +3088,57 @@ } } }, + "node_modules/recharts": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-3.9.0.tgz", + "integrity": "sha512-dCEcE9y20c8H2tkVeByrAXhhnBJk6/QLbxKmn+dJUptOfc5NMjwRh1jo0vZPRLD+5dMrHrP+hPEsfbGBMfnf5Q==", + "license": "MIT", + "workspaces": [ + "www" + ], + "dependencies": { + "@reduxjs/toolkit": "^1.9.0 || 2.x.x", + "clsx": "^2.1.1", + "decimal.js-light": "^2.5.1", + "es-toolkit": "^1.39.3", + "eventemitter3": "^5.0.1", + "immer": "^10.1.1", + "react-redux": "8.x.x || 9.x.x", + "reselect": "5.2.0", + "tiny-invariant": "^1.3.3", + "use-sync-external-store": "^1.2.2", + "victory-vendor": "^37.0.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT" + }, + "node_modules/redux-thunk": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", + "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", + "license": "MIT", + "peerDependencies": { + "redux": "^5.0.0" + } + }, + "node_modules/reselect": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.2.0.tgz", + "integrity": "sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw==", + "license": "MIT" + }, "node_modules/rollup": { "version": "4.62.2", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz", @@ -2883,6 +3244,12 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/tiny-invariant": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==", + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", @@ -3001,6 +3368,37 @@ } } }, + "node_modules/use-sync-external-store": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/victory-vendor": { + "version": "37.3.6", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz", + "integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==", + "license": "MIT AND ISC", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, "node_modules/vite": { "version": "6.4.3", "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.3.tgz", diff --git a/frontend/package.json b/frontend/package.json index 5587e53..c1d5208 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,6 +15,7 @@ "lucide-react": "^0.460.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "recharts": "^3.9.0", "tailwind-merge": "^2.5.5" }, "devDependencies": { diff --git a/frontend/src/components/dashboard/Sparkline.tsx b/frontend/src/components/dashboard/Sparkline.tsx deleted file mode 100644 index ee6831a..0000000 --- a/frontend/src/components/dashboard/Sparkline.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { cn } from "@/lib/utils" - -/** Schlanker Live-Verlaufsgraph (SVG Area+Linie) für 0..100-Prozentwerte. - * preserveAspectRatio=none streckt auf die Containerbreite; non-scaling-stroke - * hält die Linienstärke konstant. tone = Tailwind-Textfarbe (currentColor). */ -export function Sparkline({ data, tone, max = 100 }: { data: number[]; tone: string; max?: number }) { - const w = 100, h = 40 - const n = data.length - const clamp = (v: number) => Math.min(Math.max(v, 0), max) - const pts = data.map((v, i) => { - const x = n <= 1 ? 0 : (i / (n - 1)) * w - const y = h - (clamp(v) / max) * h - return [x, y] as const - }) - const line = pts.map((p, i) => `${i === 0 ? "M" : "L"}${p[0].toFixed(2)},${p[1].toFixed(2)}`).join(" ") - const area = n > 1 ? `${line} L${w},${h} L0,${h} Z` : "" - const last = pts[pts.length - 1] - - return ( - - {/* Baseline */} - - {n > 1 && } - {n > 1 && ( - - )} - {last && ( - - )} - - ) -} diff --git a/frontend/src/components/dashboard/SystemStatusCard.tsx b/frontend/src/components/dashboard/SystemStatusCard.tsx index d012f0b..9b1d944 100644 --- a/frontend/src/components/dashboard/SystemStatusCard.tsx +++ b/frontend/src/components/dashboard/SystemStatusCard.tsx @@ -1,87 +1,142 @@ import { useEffect, useState } from "react" import { Cpu } from "lucide-react" +import { Area, AreaChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts" import { useSystemStatus } from "@/lib/queries" import { gb } from "@/lib/format" -import { cn } from "@/lib/utils" -import { Sparkline } from "./Sparkline" -const MAX_POINTS = 40 // bei 3s-Poll ~2 Min Verlauf +const MAX_POINTS = 40 // bei 3s-Poll ~2 Min Live-Verlauf -function tone(value: number): string { - return value > 90 ? "text-red-500" : value > 75 ? "text-amber-500" : "text-primary" -} +type Sample = { t: number; cpu: number; ram: number; gpu: number | null; disk: number | null } -function MetricChart({ value, label, detail, data }: { - value: number; label: string; detail?: string; data: number[] -}) { - const t = tone(value) +const SERIES = [ + { key: "cpu", label: "CPU", color: "#2dd4bf" }, + { key: "ram", label: "RAM", color: "#38bdf8" }, + { key: "gpu", label: "GPU", color: "#a78bfa" }, + { key: "disk", label: "Disk", color: "#fbbf24" }, +] as const + +const GRID = "rgba(130,130,150,0.14)" +const AXIS = "rgba(130,130,150,0.85)" + +function ChartTooltip({ active, payload }: any) { + if (!active || !payload?.length) return null return ( -
-
- {label} - {Math.round(value)}% +
+
+ {payload.map((p: any) => ( +
+ + {p.name} + {Math.round(p.value)}% +
+ ))}
-
- -
- {detail && {detail}}
) } export function SystemStatusCard() { const { data: sys, dataUpdatedAt } = useSystemStatus(3_000) - const [hist, setHist] = useState<{ cpu: number[]; ram: number[]; gpu: number[]; disk: number[] }>( - { cpu: [], ram: [], gpu: [], disk: [] } - ) + const [hist, setHist] = useState([]) - // Bei jedem Poll (dataUpdatedAt ändert sich pro Fetch) einen Messpunkt anhängen. + // Bei jedem Poll (dataUpdatedAt ändert sich pro Fetch) einen Live-Messpunkt anhängen. useEffect(() => { if (!sys) return - const push = (arr: number[], v: number | null | undefined) => - v == null ? arr : [...arr, v].slice(-MAX_POINTS) - setHist((h) => ({ - cpu: push(h.cpu, sys.cpu?.percent), - ram: push(h.ram, sys.ram?.percent), - gpu: push(h.gpu, sys.gpu?.busy_percent), - disk: push(h.disk, sys.disk?.percent), - })) + setHist((h) => [ + ...h, + { + t: Date.now(), + cpu: sys.cpu?.percent ?? 0, + ram: sys.ram?.percent ?? 0, + gpu: sys.gpu?.busy_percent ?? null, + disk: sys.disk?.percent ?? null, + }, + ].slice(-MAX_POINTS)) // eslint-disable-next-line react-hooks/exhaustive-deps }, [dataUpdatedAt]) - const hasGpu = sys?.gpu && sys.gpu.busy_percent != null && sys.gpu.gtt_used != null && sys.gpu.gtt_total != null + const hasGpu = !!(sys?.gpu && sys.gpu.busy_percent != null && sys.gpu.gtt_used != null && sys.gpu.gtt_total != null) + const activeSeries = SERIES.filter((s) => s.key !== "gpu" || hasGpu) + + // Dynamische Y-Achse: skaliert auf den jüngsten Peak (in 25er-Schritten), damit die + // Linien auch bei idle-Box (<20%) den Chart ausfüllen statt unten zu kleben. + const peak = hist.reduce((m, s) => Math.max(m, s.cpu, s.ram, s.gpu ?? 0, s.disk ?? 0), 0) + const yMax = Math.min(100, Math.max(25, Math.ceil((peak * 1.2) / 25) * 25)) + + const current: Record = { + cpu: sys?.cpu?.percent, ram: sys?.ram?.percent, + gpu: hasGpu ? sys!.gpu!.busy_percent : null, disk: sys?.disk?.percent, + } + const detail: Record = { + cpu: sys?.cpu?.cores ? `${sys.cpu.cores} Cores` : "", + ram: sys ? `${gb(sys.ram.used)}/${gb(sys.ram.total)} GB` : "", + gpu: hasGpu ? `${gb(sys!.gpu!.gtt_used!)}/${gb(sys!.gpu!.gtt_total!)} GB` : "", + disk: sys?.disk ? `${gb(sys.disk.used)}/${gb(sys.disk.total)} GB` : "", + } return (
-
+
-

System-Status

+

System-Status

live
+ {sys ? ( -
- - - {hasGpu && ( - - )} - {sys.disk && ( - - )} -
+ <> + {/* Legende mit Live-Werten */} +
+ {activeSeries.map((s) => ( +
+ + {s.label} + {Math.round(current[s.key] ?? 0)}% + {detail[s.key] && {detail[s.key]}} +
+ ))} +
+ +
+ + + + {SERIES.map((s) => ( + + + + + ))} + + + + `${v}%`} + width={34} axisLine={false} tickLine={false} + tick={{ fontSize: 10, fill: AXIS }} + /> + } cursor={{ stroke: AXIS, strokeOpacity: 0.4, strokeDasharray: "3 3" }} /> + {activeSeries.map((s) => ( + + ))} + + +
+ ) : ( -
Lade Systemdaten…
+
Lade Systemdaten…
)}
+ {sys?.temp && (sys.temp.cpu || sys.temp.gpu) && ( -
+
{sys.temp.cpu != null && CPU Temp: {sys.temp.cpu} °C} {sys.temp.gpu != null && GPU Temp: {sys.temp.gpu} °C}