function pm(o,u){for(var s=0;sa[d]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))a(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const g of p.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&a(g)}).observe(document,{childList:!0,subtree:!0});function s(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function a(d){if(d.ep)return;d.ep=!0;const p=s(d);fetch(d.href,p)}})();function Cd(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Es={exports:{}},Yr={},Cs={exports:{}},fe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Qc;function mm(){if(Qc)return fe;Qc=1;var o=Symbol.for("react.element"),u=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),g=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),b=Symbol.iterator;function M(S){return S===null||typeof S!="object"?null:(S=b&&S[b]||S["@@iterator"],typeof S=="function"?S:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,_={};function R(S,w,A){this.props=S,this.context=w,this.refs=_,this.updater=A||T}R.prototype.isReactComponent={},R.prototype.setState=function(S,w){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,w,"setState")},R.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function U(){}U.prototype=R.prototype;function H(S,w,A){this.props=S,this.context=w,this.refs=_,this.updater=A||T}var te=H.prototype=new U;te.constructor=H,$(te,R.prototype),te.isPureReactComponent=!0;var Z=Array.isArray,oe=Object.prototype.hasOwnProperty,ne={current:null},se={key:!0,ref:!0,__self:!0,__source:!0};function xe(S,w,A){var V,z={},Y=null,re=null;if(w!=null)for(V in w.ref!==void 0&&(re=w.ref),w.key!==void 0&&(Y=""+w.key),w)oe.call(w,V)&&!se.hasOwnProperty(V)&&(z[V]=w[V]);var ue=arguments.length-2;if(ue===1)z.children=A;else if(1>>1,w=F[S];if(0>>1;Sd(z,B))Yd(re,z)?(F[S]=re,F[Y]=B,S=Y):(F[S]=z,F[V]=B,S=V);else if(Yd(re,B))F[S]=re,F[Y]=B,S=Y;else break e}}return q}function d(F,q){var B=F.sortIndex-q.sortIndex;return B!==0?B:F.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;o.unstable_now=function(){return p.now()}}else{var g=Date,m=g.now();o.unstable_now=function(){return g.now()-m}}var C=[],E=[],k=1,b=null,M=3,T=!1,$=!1,_=!1,R=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function te(F){for(var q=s(E);q!==null;){if(q.callback===null)a(E);else if(q.startTime<=F)a(E),q.sortIndex=q.expirationTime,u(C,q);else break;q=s(E)}}function Z(F){if(_=!1,te(F),!$)if(s(C)!==null)$=!0,be(oe);else{var q=s(E);q!==null&&he(Z,q.startTime-F)}}function oe(F,q){$=!1,_&&(_=!1,U(xe),xe=-1),T=!0;var B=M;try{for(te(q),b=s(C);b!==null&&(!(b.expirationTime>q)||F&&!Ne());){var S=b.callback;if(typeof S=="function"){b.callback=null,M=b.priorityLevel;var w=S(b.expirationTime<=q);q=o.unstable_now(),typeof w=="function"?b.callback=w:b===s(C)&&a(C),te(q)}else a(C);b=s(C)}if(b!==null)var A=!0;else{var V=s(E);V!==null&&he(Z,V.startTime-q),A=!1}return A}finally{b=null,M=B,T=!1}}var ne=!1,se=null,xe=-1,de=5,we=-1;function Ne(){return!(o.unstable_now()-weF||125S?(F.sortIndex=B,u(E,F),s(C)===null&&F===s(E)&&(_?(U(xe),xe=-1):_=!0,he(Z,B-S))):(F.sortIndex=w,u(C,F),$||T||($=!0,be(oe))),F},o.unstable_shouldYield=Ne,o.unstable_wrapCallback=function(F){var q=M;return function(){var B=M;M=q;try{return F.apply(this,arguments)}finally{M=B}}}})(bs)),bs}var Zc;function ym(){return Zc||(Zc=1,js.exports=gm()),js.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 Jc;function xm(){if(Jc)return rt;Jc=1;var o=Gs(),u=ym();function s(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"),C=Object.prototype.hasOwnProperty,E=/^[: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]*$/,k={},b={};function M(e){return C.call(b,e)?!0:C.call(k,e)?!1:E.test(e)?b[e]=!0:(k[e]=!0,!1)}function T(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $(e,t,n,r){if(t===null||typeof t>"u"||T(e,t,n,r))return!0;if(r)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,t,n,r,l,i,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=c}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){R[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];R[t]=new _(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){R[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){R[e]=new _(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){R[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){R[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){R[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){R[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){R[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var U=/[\-:]([a-z])/g;function H(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(U,H);R[t]=new _(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(U,H);R[t]=new _(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(U,H);R[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){R[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),R.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){R[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function te(e,t,n,r){var l=R.hasOwnProperty(t)?R[t]:null;(l!==null?l.type!==0:r||!(2v||l[c]!==i[v]){var y=` `+l[c].replace(" at new "," at ");return e.displayName&&y.includes("")&&(y=y.replace("",e.displayName)),y}while(1<=c&&0<=v);break}}}finally{A=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function z(e){switch(e.tag){case 5:return w(e.type);case 16:return w("Lazy");case 13:return w("Suspense");case 19:return w("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1),e;case 11:return e=V(e.type.render,!1),e;case 1:return e=V(e.type,!0),e;default:return""}}function Y(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 se:return"Fragment";case ne:return"Portal";case de:return"Profiler";case xe:return"StrictMode";case Oe:return"Suspense";case je:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ne:return(e.displayName||"Context")+".Consumer";case we:return(e._context.displayName||"Context")+".Provider";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ie:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}function re(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 Y(t);case 8:return t===xe?"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 ue(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ce(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ae(e){var t=ce(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){r=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(c){r=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function no(e){e._valueTracker||(e._valueTracker=Ae(e))}function Js(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ce(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ro(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 Rl(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function eu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ue(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tu(e,t){t=t.checked,t!=null&&te(e,"checked",t,!1)}function Ml(e,t){tu(e,t);var n=ue(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tl(e,t.type,ue(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="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 Tl(e,t,n){(t!=="number"||ro(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function _n(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=oo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fr={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},gf=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){gf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function uu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fr.hasOwnProperty(e)&&fr[e]?(""+t).trim():t+"px"}function au(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=uu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var yf=B({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 Il(e,t){if(t){if(yf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Dl(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 zl=null;function Al(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fl=null,Pn=null,Rn=null;function cu(e){if(e=Or(e)){if(typeof Fl!="function")throw Error(s(280));var t=e.stateNode;t&&(t=_o(t),Fl(e.stateNode,e.type,t))}}function du(e){Pn?Rn?Rn.push(e):Rn=[e]:Pn=e}function fu(){if(Pn){var e=Pn,t=Rn;if(Rn=Pn=null,cu(e),t)for(e=0;e>>=0,e===0?32:31-(Pf(e)/Rf|0)|0}var ao=64,co=4194304;function vr(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 fo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,c=n&268435455;if(c!==0){var v=c&~l;v!==0?r=vr(v):(i&=c,i!==0&&(r=vr(i)))}else c=n&~l,c!==0?r=vr(c):i!==0&&(r=vr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function Of(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 r=e.eventTimes;for(e=e.expirationTimes;0=Nr),Uu=" ",$u=!1;function Bu(e,t){switch(e){case"keyup":return up.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ln=!1;function cp(e,t){switch(e){case"compositionend":return Vu(t);case"keypress":return t.which!==32?null:($u=!0,Uu);case"textInput":return e=t.data,e===Uu&&$u?null:e;default:return null}}function dp(e,t){if(Ln)return e==="compositionend"||!ri&&Bu(e,t)?(e=Ou(),go=ql=Wt=null,Ln=!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=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xu(n)}}function Zu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ju(){for(var e=window,t=ro();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ro(e.document)}return t}function ii(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 wp(e){var t=Ju(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Zu(n.ownerDocument.documentElement,n)){if(r!==null&&ii(n)){if(t=r.start,e=r.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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=qu(n,i);var c=qu(n,r);l&&c&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.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,On=null,si=null,Pr=null,ui=!1;function ea(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ui||On==null||On!==ro(r)||(r=On,"selectionStart"in r&&ii(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&_r(Pr,r)||(Pr=r,r=No(si,"onSelect"),0Fn||(e.current=wi[Fn],wi[Fn]=null,Fn--)}function ge(e,t){Fn++,wi[Fn]=e.current,e.current=t}var Kt={},Ge=Qt(Kt),Ze=Qt(!1),mn=Kt;function Un(e,t){var n=e.type.contextTypes;if(!n)return Kt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Je(e){return e=e.childContextTypes,e!=null}function Po(){Se(Ze),Se(Ge)}function ha(e,t,n){if(Ge.current!==Kt)throw Error(s(168));ge(Ge,t),ge(Ze,n)}function va(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(s(108,re(e)||"Unknown",l));return B({},n,r)}function Ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kt,mn=Ge.current,ge(Ge,e),ge(Ze,Ze.current),!0}function ga(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=va(e,t,mn),r.__reactInternalMemoizedMergedChildContext=e,Se(Ze),Se(Ge),ge(Ge,e)):Se(Ze),ge(Ze,n)}var Mt=null,Mo=!1,ki=!1;function ya(e){Mt===null?Mt=[e]:Mt.push(e)}function Tp(e){Mo=!0,ya(e)}function Yt(){if(!ki&&Mt!==null){ki=!0;var e=0,t=ve;try{var n=Mt;for(ve=1;e>=c,l-=c,Tt=1<<32-ht(t)+l|n<le?($e=ee,ee=null):$e=ee.sibling;var me=L(N,ee,j[le],D);if(me===null){ee===null&&(ee=$e);break}e&&ee&&me.alternate===null&&t(N,ee),x=i(me,x,le),J===null?X=me:J.sibling=me,J=me,ee=$e}if(le===j.length)return n(N,ee),Ce&&vn(N,le),X;if(ee===null){for(;lele?($e=ee,ee=null):$e=ee.sibling;var on=L(N,ee,me.value,D);if(on===null){ee===null&&(ee=$e);break}e&&ee&&on.alternate===null&&t(N,ee),x=i(on,x,le),J===null?X=on:J.sibling=on,J=on,ee=$e}if(me.done)return n(N,ee),Ce&&vn(N,le),X;if(ee===null){for(;!me.done;le++,me=j.next())me=I(N,me.value,D),me!==null&&(x=i(me,x,le),J===null?X=me:J.sibling=me,J=me);return Ce&&vn(N,le),X}for(ee=r(N,ee);!me.done;le++,me=j.next())me=W(ee,N,le,me.value,D),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?le:me.key),x=i(me,x,le),J===null?X=me:J.sibling=me,J=me);return e&&ee.forEach(function(fm){return t(N,fm)}),Ce&&vn(N,le),X}function Te(N,x,j,D){if(typeof j=="object"&&j!==null&&j.type===se&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case oe:e:{for(var X=j.key,J=x;J!==null;){if(J.key===X){if(X=j.type,X===se){if(J.tag===7){n(N,J.sibling),x=l(J,j.props.children),x.return=N,N=x;break e}}else if(J.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===be&&Ca(X)===J.type){n(N,J.sibling),x=l(J,j.props),x.ref=Ir(N,J,j),x.return=N,N=x;break e}n(N,J);break}else t(N,J);J=J.sibling}j.type===se?(x=Cn(j.props.children,N.mode,D,j.key),x.return=N,N=x):(D=ll(j.type,j.key,j.props,null,N.mode,D),D.ref=Ir(N,x,j),D.return=N,N=D)}return c(N);case ne:e:{for(J=j.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===j.containerInfo&&x.stateNode.implementation===j.implementation){n(N,x.sibling),x=l(x,j.children||[]),x.return=N,N=x;break e}else{n(N,x);break}else t(N,x);x=x.sibling}x=ys(j,N.mode,D),x.return=N,N=x}return c(N);case be:return J=j._init,Te(N,x,J(j._payload),D)}if(cr(j))return Q(N,x,j,D);if(q(j))return K(N,x,j,D);Io(N,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,x!==null&&x.tag===6?(n(N,x.sibling),x=l(x,j),x.return=N,N=x):(n(N,x),x=gs(j,N.mode,D),x.return=N,N=x),c(N)):n(N,x)}return Te}var Wn=Na(!0),ja=Na(!1),Do=Qt(null),zo=null,Hn=null,bi=null;function _i(){bi=Hn=zo=null}function Pi(e){var t=Do.current;Se(Do),e._currentValue=t}function Ri(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Gn(e,t){zo=e,bi=Hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(et=!0),e.firstContext=null)}function dt(e){var t=e._currentValue;if(bi!==e)if(e={context:e,memoizedValue:t,next:null},Hn===null){if(zo===null)throw Error(s(308));Hn=e,zo.dependencies={lanes:0,firstContext:e}}else Hn=Hn.next=e;return t}var gn=null;function Mi(e){gn===null?gn=[e]:gn.push(e)}function ba(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Mi(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ot(e,r)}function Ot(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 Xt=!1;function Ti(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _a(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 It(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(pe&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ot(e,n)}return l=r.interleaved,l===null?(t.next=t,Mi(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ot(e,n)}function Ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fo(e,t,n,r){var l=e.updateQueue;Xt=!1;var i=l.firstBaseUpdate,c=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var y=v,P=y.next;y.next=null,c===null?i=P:c.next=P,c=y;var O=e.alternate;O!==null&&(O=O.updateQueue,v=O.lastBaseUpdate,v!==c&&(v===null?O.firstBaseUpdate=P:v.next=P,O.lastBaseUpdate=y))}if(i!==null){var I=l.baseState;c=0,O=P=y=null,v=i;do{var L=v.lane,W=v.eventTime;if((r&L)===L){O!==null&&(O=O.next={eventTime:W,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var Q=e,K=v;switch(L=t,W=n,K.tag){case 1:if(Q=K.payload,typeof Q=="function"){I=Q.call(W,I,L);break e}I=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=K.payload,L=typeof Q=="function"?Q.call(W,I,L):Q,L==null)break e;I=B({},I,L);break e;case 2:Xt=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,L=l.effects,L===null?l.effects=[v]:L.push(v))}else W={eventTime:W,lane:L,tag:v.tag,payload:v.payload,callback:v.callback,next:null},O===null?(P=O=W,y=I):O=O.next=W,c|=L;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;L=v,v=L.next,L.next=null,l.lastBaseUpdate=L,l.shared.pending=null}}while(!0);if(O===null&&(y=I),l.baseState=y,l.firstBaseUpdate=P,l.lastBaseUpdate=O,t=l.shared.interleaved,t!==null){l=t;do c|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);wn|=c,e.lanes=c,e.memoizedState=I}}function Ra(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=zi.transition;zi.transition={};try{e(!1),t()}finally{ve=n,zi.transition=r}}function Ya(){return ft().memoizedState}function Dp(e,t,n){var r=tn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xa(e))qa(t,n);else if(n=ba(e,t,n,r),n!==null){var l=qe();kt(n,e,r,l),Za(n,t,r)}}function zp(e,t,n){var r=tn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))qa(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,v=i(c,n);if(l.hasEagerState=!0,l.eagerState=v,vt(v,c)){var y=t.interleaved;y===null?(l.next=l,Mi(t)):(l.next=y.next,y.next=l),t.interleaved=l;return}}catch{}finally{}n=ba(e,t,l,r),n!==null&&(l=qe(),kt(n,e,r,l),Za(n,t,r))}}function Xa(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function qa(e,t){Fr=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Za(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gl(e,n)}}var Ho={readContext:dt,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},Ap={readContext:dt,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:$a,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vo(4194308,4,Wa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vo(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Dp.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Fa,useDebugValue:Wi,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Ip.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,l=jt();if(Ce){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Ue===null)throw Error(s(349));(xn&30)!==0||Oa(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,$a(Da.bind(null,r,i,e),[e]),r.flags|=2048,Br(9,Ia.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=jt(),t=Ue.identifierPrefix;if(Ce){var n=Lt,r=Tt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ur++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),n==="select"&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Ct]=t,e[Lr]=r,yc(e,t,!1,!1),t.stateNode=e;e:{switch(c=Dl(n,r),n){case"dialog":ke("cancel",e),ke("close",e),l=r;break;case"iframe":case"object":case"embed":ke("load",e),l=r;break;case"video":case"audio":for(l=0;lqn&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Uo(c),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Ce)return Ke(t),null}else 2*Me()-i.renderingStartTime>qn&&n!==1073741824&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(n=i.last,n!==null?n.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=_e.current,ge(_e,r?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return ms(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ut&1073741824)!==0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Gp(e,t){switch(Ei(t),t.tag){case 1:return Je(t.type)&&Po(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(),Se(Ze),Se(Ge),Di(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Oi(t),null;case 13:if(Se(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(_e),null;case 4:return Qn(),null;case 10:return Pi(t.type._context),null;case 22:case 23:return ms(),null;case 24:return null;default:return null}}var Yo=!1,Ye=!1,Qp=typeof WeakSet=="function"?WeakSet:Set,G=null;function Yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function ns(e,t,n){try{n()}catch(r){Re(e,t,r)}}var kc=!1;function Kp(e,t){if(mi=ho,e=Ju(),ii(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,v=-1,y=-1,P=0,O=0,I=e,L=null;t:for(;;){for(var W;I!==n||l!==0&&I.nodeType!==3||(v=c+l),I!==i||r!==0&&I.nodeType!==3||(y=c+r),I.nodeType===3&&(c+=I.nodeValue.length),(W=I.firstChild)!==null;)L=I,I=W;for(;;){if(I===e)break t;if(L===n&&++P===l&&(v=c),L===i&&++O===r&&(y=c),(W=I.nextSibling)!==null)break;I=L,L=I.parentNode}I=W}n=v===-1||y===-1?null:{start:v,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(hi={focusedElem:e,selectionRange:n},ho=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var Q=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Q!==null){var K=Q.memoizedProps,Te=Q.memoizedState,N=t.stateNode,x=N.getSnapshotBeforeUpdate(t.elementType===t.type?K:yt(t.type,K),Te);N.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var j=t.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(D){Re(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return Q=kc,kc=!1,Q}function Wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ns(t,n,i)}l=l.next}while(l!==r)}}function Xo(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 r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rs(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 Sc(e){var t=e.alternate;t!==null&&(e.alternate=null,Sc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[Lr],delete t[xi],delete t[Rp],delete t[Mp])),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 Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(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 os(e,t,n){var r=e.tag;if(r===5||r===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=bo));else if(r!==4&&(e=e.child,e!==null))for(os(e,t,n),e=e.sibling;e!==null;)os(e,t,n),e=e.sibling}function ls(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ls(e,t,n),e=e.sibling;e!==null;)ls(e,t,n),e=e.sibling}var Ve=null,xt=!1;function Zt(e,t,n){for(n=n.child;n!==null;)Nc(e,t,n),n=n.sibling}function Nc(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(uo,n)}catch{}switch(n.tag){case 5:Ye||Yn(n,t);case 6:var r=Ve,l=xt;Ve=null,Zt(e,t,n),Ve=r,xt=l,Ve!==null&&(xt?(e=Ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ve.removeChild(n.stateNode));break;case 18:Ve!==null&&(xt?(e=Ve,n=n.stateNode,e.nodeType===8?yi(e.parentNode,n):e.nodeType===1&&yi(e,n),Sr(e)):yi(Ve,n.stateNode));break;case 4:r=Ve,l=xt,Ve=n.stateNode.containerInfo,xt=!0,Zt(e,t,n),Ve=r,xt=l;break;case 0:case 11:case 14:case 15:if(!Ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,c=i.destroy;i=i.tag,c!==void 0&&((i&2)!==0||(i&4)!==0)&&ns(n,t,c),l=l.next}while(l!==r)}Zt(e,t,n);break;case 1:if(!Ye&&(Yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(v){Re(n,t,v)}Zt(e,t,n);break;case 21:Zt(e,t,n);break;case 22:n.mode&1?(Ye=(r=Ye)||n.memoizedState!==null,Zt(e,t,n),Ye=r):Zt(e,t,n);break;default:Zt(e,t,n)}}function jc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qp),t.forEach(function(r){var l=rm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=c),r&=~i}if(r=l,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xp(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,tl=0,(pe&6)!==0)throw Error(s(331));var l=pe;for(pe|=4,G=e.current;G!==null;){var i=G,c=i.child;if((G.flags&16)!==0){var v=i.deletions;if(v!==null){for(var y=0;yMe()-us?Sn(e,0):ss|=n),nt(e,t)}function Fc(e,t){t===0&&((e.mode&1)===0?t=1:(t=co,co<<=1,(co&130023424)===0&&(co=4194304)));var n=qe();e=Ot(e,t),e!==null&&(gr(e,t,n),nt(e,n))}function nm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fc(e,n)}function rm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Fc(e,n)}var Uc;Uc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)et=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return et=!1,Wp(e,t,n);et=(e.flags&131072)!==0}else et=!1,Ce&&(t.flags&1048576)!==0&&xa(t,Lo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ko(e,t),e=t.pendingProps;var l=Un(t,Ge.current);Gn(t,n),l=Fi(null,t,r,e,l,n);var i=Ui();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Je(r)?(i=!0,Ro(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ti(t),l.updater=Go,t.stateNode=l,l._reactInternals=t,Gi(t,r,e,n),t=Xi(null,t,r,!0,i,n)):(t.tag=0,Ce&&i&&Si(t),Xe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ko(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=lm(r),e=yt(r,e),l){case 0:t=Yi(null,t,r,e,n);break e;case 1:t=fc(null,t,r,e,n);break e;case 11:t=sc(null,t,r,e,n);break e;case 14:t=uc(null,t,r,yt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Yi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),fc(e,t,r,l,n);case 3:e:{if(pc(t),e===null)throw Error(s(387));r=t.pendingProps,i=t.memoizedState,l=i.element,_a(e,t),Fo(t,r,null,n);var c=t.memoizedState;if(r=c.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Kn(Error(s(423)),t),t=mc(e,t,r,n,l);break e}else if(r!==l){l=Kn(Error(s(424)),t),t=mc(e,t,r,n,l);break e}else for(st=Gt(t.stateNode.containerInfo.firstChild),it=t,Ce=!0,gt=null,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===l){t=Dt(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return Ma(t),e===null&&Ni(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,c=l.children,vi(r,l)?c=null:i!==null&&vi(r,i)&&(t.flags|=32),dc(e,t),Xe(e,t,c,n),t.child;case 6:return e===null&&Ni(t),null;case 13:return hc(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wn(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),sc(e,t,r,l,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,c=l.value,ge(Do,r._currentValue),r._currentValue=c,i!==null)if(vt(i.value,c)){if(i.children===l.children&&!Ze.current){t=Dt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var v=i.dependencies;if(v!==null){c=i.child;for(var y=v.firstContext;y!==null;){if(y.context===r){if(i.tag===1){y=It(-1,n&-n),y.tag=2;var P=i.updateQueue;if(P!==null){P=P.shared;var O=P.pending;O===null?y.next=y:(y.next=O.next,O.next=y),P.pending=y}}i.lanes|=n,y=i.alternate,y!==null&&(y.lanes|=n),Ri(i.return,n,t),v.lanes|=n;break}y=y.next}}else if(i.tag===10)c=i.type===t.type?null:i.child;else if(i.tag===18){if(c=i.return,c===null)throw Error(s(341));c.lanes|=n,v=c.alternate,v!==null&&(v.lanes|=n),Ri(c,n,t),c=i.sibling}else c=i.child;if(c!==null)c.return=i;else for(c=i;c!==null;){if(c===t){c=null;break}if(i=c.sibling,i!==null){i.return=c.return,c=i;break}c=c.return}i=c}Xe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Gn(t,n),l=dt(l),r=r(l),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,l=yt(r,t.pendingProps),l=yt(r.type,l),uc(e,t,r,l,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Ko(e,t),t.tag=1,Je(r)?(e=!0,Ro(t)):e=!1,Gn(t,n),ec(t,r,l),Gi(t,r,l,n),Xi(null,t,r,!0,e,n);case 19:return gc(e,t,n);case 22:return cc(e,t,n)}throw Error(s(156,t.tag))};function $c(e,t){return wu(e,t)}function om(e,t,n,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mt(e,t,n,r){return new om(e,t,n,r)}function vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lm(e){if(typeof e=="function")return vs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===Ie)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=mt(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 ll(e,t,n,r,l,i){var c=2;if(r=e,typeof e=="function")vs(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case se:return Cn(n.children,l,i,t);case xe:c=8,l|=8;break;case de:return e=mt(12,n,t,l|2),e.elementType=de,e.lanes=i,e;case Oe:return e=mt(13,n,t,l),e.elementType=Oe,e.lanes=i,e;case je:return e=mt(19,n,t,l),e.elementType=je,e.lanes=i,e;case he:return il(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case we:c=10;break e;case Ne:c=9;break e;case ie:c=11;break e;case Ie:c=14;break e;case be:c=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=mt(c,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Cn(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function il(e,t,n,r){return e=mt(22,e,r,t),e.elementType=he,e.lanes=n,e.stateNode={isHidden:!1},e}function gs(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function ys(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function im(e,t,n,r,l){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=Hl(0),this.expirationTimes=Hl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function xs(e,t,n,r,l,i,c,v,y){return e=new im(e,t,n,v,y),t===1?(t=1,i===!0&&(t|=8)):t=0,i=mt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ti(i),e}function sm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(u){console.error(u)}}return o(),Ns.exports=xm(),Ns.exports}var td;function wm(){if(td)return pl;td=1;var o=jd();return pl.createRoot=o.createRoot,pl.hydrateRoot=o.hydrateRoot,pl}var km=wm();const Sm=Cd(km);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Em=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bd=(...o)=>o.filter((u,s,a)=>!!u&&u.trim()!==""&&a.indexOf(u)===s).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 Cm={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 Nm=h.forwardRef(({color:o="currentColor",size:u=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:d="",children:p,iconNode:g,...m},C)=>h.createElement("svg",{ref:C,...Cm,width:u,height:u,stroke:o,strokeWidth:a?Number(s)*24/Number(u):s,className:bd("lucide",d),...m},[...g.map(([E,k])=>h.createElement(E,k)),...Array.isArray(p)?p:[p]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Be=(o,u)=>{const s=h.forwardRef(({className:a,...d},p)=>h.createElement(Nm,{ref:p,iconNode:u,className:bd(`lucide-${Em(o)}`,a),...d}));return s.displayName=`${o}`,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 jm=Be("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 bm=Be("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 _m=Be("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 Pm=Be("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 Rm=Be("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 Mm=Be("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 Tm=Be("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 Lm=Be("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 Om=Be("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 Fs=Be("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 Im=Be("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 Dm=Be("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 zm=Be("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 Am=Be("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fm=Be("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 Um=Be("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 $m=Be("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.460.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=Be("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"}]]),Us=[{id:"models",label:"Modelle & Routing",hint:"Modelle kuratieren, Gruppen & Auto-Routing",icon:bm},{id:"routing",label:"Routing",hint:"Gateway-Regeln: schnell ↔ schwer",icon:Am},{id:"system",label:"System",hint:"Metriken, Dienste, Updates",icon:Lm},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:_m},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Dm},{id:"agent",label:"Hermes",hint:"Agent-Status & WebUI öffnen",icon:jm}];var nd=1,Vm=.9,Wm=.8,Hm=.17,_s=.1,Ps=.999,Gm=.9999,Qm=.99,Km=/[\\\/_+.#"@\[\(\{&]/,Ym=/[\\\/_+.#"@\[\(\{&]/g,Xm=/[\s-]/,_d=/[\s-]/g;function $s(o,u,s,a,d,p,g){if(p===u.length)return d===o.length?nd:Qm;var m=`${d},${p}`;if(g[m]!==void 0)return g[m];for(var C=a.charAt(p),E=s.indexOf(C,d),k=0,b,M,T,$;E>=0;)b=$s(o,u,s,a,E+1,p+1,g),b>k&&(E===d?b*=nd:Km.test(o.charAt(E-1))?(b*=Wm,T=o.slice(d,E-1).match(Ym),T&&d>0&&(b*=Math.pow(Ps,T.length))):Xm.test(o.charAt(E-1))?(b*=Vm,$=o.slice(d,E-1).match(_d),$&&d>0&&(b*=Math.pow(Ps,$.length))):(b*=Hm,d>0&&(b*=Math.pow(Ps,E-d))),o.charAt(E)!==u.charAt(p)&&(b*=Gm)),(b<_s&&s.charAt(E-1)===a.charAt(p+1)||a.charAt(p+1)===a.charAt(p)&&s.charAt(E-1)!==a.charAt(p))&&(M=$s(o,u,s,a,E+1,p+2,g),M*_s>b&&(b=M*_s)),b>k&&(k=b),E=s.indexOf(C,E+1);return g[m]=k,k}function rd(o){return o.toLowerCase().replace(_d," ")}function qm(o,u,s){return o=s&&s.length>0?`${o+" "+s.join(" ")}`:o,$s(o,u,rd(o),rd(u),0,0,{})}function cn(o,u,{checkForDefaultPrevented:s=!0}={}){return function(d){if(o==null||o(d),s===!1||!d.defaultPrevented)return u==null?void 0:u(d)}}function od(o,u){if(typeof o=="function")return o(u);o!=null&&(o.current=u)}function sr(...o){return u=>{let s=!1;const a=o.map(d=>{const p=od(d,u);return!s&&typeof p=="function"&&(s=!0),p});if(s)return()=>{for(let d=0;d{var U;const{scope:M,children:T,...$}=b,_=((U=M==null?void 0:M[o])==null?void 0:U[C])||m,R=h.useMemo(()=>$,Object.values($));return f.jsx(_.Provider,{value:R,children:T})};E.displayName=p+"Provider";function k(b,M){var _;const T=((_=M==null?void 0:M[o])==null?void 0:_[C])||m,$=h.useContext(T);if($)return $;if(g!==void 0)return g;throw new Error(`\`${b}\` must be used within \`${p}\``)}return[E,k]}const d=()=>{const p=s.map(g=>h.createContext(g));return function(m){const C=(m==null?void 0:m[o])||p;return h.useMemo(()=>({[`__scope${o}`]:{...m,[o]:C}}),[m,C])}};return d.scopeName=o,[a,Jm(d,...u)]}function Jm(...o){const u=o[0];if(o.length===1)return u;const s=()=>{const a=o.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(p){const g=a.reduce((m,{useScope:C,scopeName:E})=>{const b=C(p)[`__scope${E}`];return{...m,...b}},{});return h.useMemo(()=>({[`__scope${u.scopeName}`]:g}),[g])}};return s.scopeName=u.scopeName,s}var Jr=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},eh=Qs[" useId ".trim().toString()]||(()=>{}),th=0;function Ft(o){const[u,s]=h.useState(eh());return Jr(()=>{s(a=>a??String(th++))},[o]),u?`radix-${u}`:""}var nh=Qs[" useInsertionEffect ".trim().toString()]||Jr;function rh({prop:o,defaultProp:u,onChange:s=()=>{},caller:a}){const[d,p,g]=oh({defaultProp:u,onChange:s}),m=o!==void 0,C=m?o:d;{const k=h.useRef(o!==void 0);h.useEffect(()=>{const b=k.current;b!==m&&console.warn(`${a} is changing from ${b?"controlled":"uncontrolled"} to ${m?"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.`),k.current=m},[m,a])}const E=h.useCallback(k=>{var b;if(m){const M=lh(k)?k(o):k;M!==o&&((b=g.current)==null||b.call(g,M))}else p(k)},[m,o,p,g]);return[C,E]}function oh({defaultProp:o,onChange:u}){const[s,a]=h.useState(o),d=h.useRef(s),p=h.useRef(u);return nh(()=>{p.current=u},[u]),h.useEffect(()=>{var g;d.current!==s&&((g=p.current)==null||g.call(p,s),d.current=s)},[s,d]),[s,a,p]}function lh(o){return typeof o=="function"}var Pd=jd();function Rd(o){const u=h.forwardRef((s,a)=>{let{children:d,...p}=s,g=null,m=!1;const C=[];ld(d)&&typeof ml=="function"&&(d=ml(d._payload)),h.Children.forEach(d,M=>{var T;if(ch(M)){m=!0;const $=M;let _="child"in $.props?$.props.child:$.props.children;ld(_)&&typeof ml=="function"&&(_=ml(_._payload)),g=sh($,_),C.push((T=g==null?void 0:g.props)==null?void 0:T.children)}else C.push(M)}),g?g=h.cloneElement(g,void 0,C):!m&&h.Children.count(d)===1&&h.isValidElement(d)&&(g=d);const E=g?ah(g):void 0,k=bn(a,E);if(!g){if(d||d===0)throw new Error(m?mh(o):ph(o));return d}const b=uh(p,g.props??{});return g.type!==h.Fragment&&(b.ref=a?k:E),h.cloneElement(g,b)});return u.displayName=`${o}.Slot`,u}var ih=Symbol.for("radix.slottable"),sh=(o,u)=>{if("child"in o.props){const s=o.props.child;return h.isValidElement(s)?h.cloneElement(s,void 0,o.props.children(s.props.children)):null}return h.isValidElement(u)?u:null};function uh(o,u){const s={...u};for(const a in u){const d=o[a],p=u[a];/^on[A-Z]/.test(a)?d&&p?s[a]=(...m)=>{const C=p(...m);return d(...m),C}:d&&(s[a]=d):a==="style"?s[a]={...d,...p}:a==="className"&&(s[a]=[d,p].filter(Boolean).join(" "))}return{...o,...s}}function ah(o){var a,d;let u=(a=Object.getOwnPropertyDescriptor(o.props,"ref"))==null?void 0:a.get,s=u&&"isReactWarning"in u&&u.isReactWarning;return s?o.ref:(u=(d=Object.getOwnPropertyDescriptor(o,"ref"))==null?void 0:d.get,s=u&&"isReactWarning"in u&&u.isReactWarning,s?o.props.ref:o.props.ref||o.ref)}function ch(o){return h.isValidElement(o)&&typeof o.type=="function"&&"__radixId"in o.type&&o.type.__radixId===ih}var dh=Symbol.for("react.lazy");function ld(o){return o!=null&&typeof o=="object"&&"$$typeof"in o&&o.$$typeof===dh&&"_payload"in o&&fh(o._payload)}function fh(o){return typeof o=="object"&&o!==null&&"then"in o}var ph=o=>`${o} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mh=o=>`${o} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ml=Qs[" use ".trim().toString()],hh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=hh.reduce((o,u)=>{const s=Rd(`Primitive.${u}`),a=h.forwardRef((d,p)=>{const{asChild:g,...m}=d,C=g?s:u;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(C,{...m,ref:p})});return a.displayName=`Primitive.${u}`,{...o,[u]:a}},{});function vh(o,u){o&&Pd.flushSync(()=>o.dispatchEvent(u))}function eo(o){const u=h.useRef(o);return h.useEffect(()=>{u.current=o}),h.useMemo(()=>((...s)=>{var a;return(a=u.current)==null?void 0:a.call(u,...s)}),[])}function gh(o,u=globalThis==null?void 0:globalThis.document){const s=eo(o);h.useEffect(()=>{const a=d=>{d.key==="Escape"&&s(d)};return u.addEventListener("keydown",a,{capture:!0}),()=>u.removeEventListener("keydown",a,{capture:!0})},[s,u])}var yh="DismissableLayer",Bs="dismissableLayer.update",xh="dismissableLayer.pointerDownOutside",wh="dismissableLayer.focusOutside",id,Ks=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Md=h.forwardRef((o,u)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:m,onDismiss:C,...E}=o,k=h.useContext(Ks),[b,M]=h.useState(null),T=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,$]=h.useState({}),_=bn(u,de=>M(de)),R=Array.from(k.layers),[U]=[...k.layersWithOutsidePointerEventsDisabled].slice(-1),H=R.indexOf(U),te=b?R.indexOf(b):-1,Z=k.layersWithOutsidePointerEventsDisabled.size>0,oe=te>=H,ne=h.useRef(!1),se=Ch(de=>{const we=de.target;if(!(we instanceof Node))return;const Ne=[...k.branches].some(ie=>ie.contains(we));!oe||Ne||(p==null||p(de),m==null||m(de),de.defaultPrevented||C==null||C())},{ownerDocument:T,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:ne,dismissableSurfaces:k.dismissableSurfaces}),xe=Nh(de=>{if(a&&ne.current)return;const we=de.target;[...k.branches].some(ie=>ie.contains(we))||(g==null||g(de),m==null||m(de),de.defaultPrevented||C==null||C())},T);return gh(de=>{te===k.layers.size-1&&(d==null||d(de),!de.defaultPrevented&&C&&(de.preventDefault(),C()))},T),h.useEffect(()=>{if(b)return s&&(k.layersWithOutsidePointerEventsDisabled.size===0&&(id=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),k.layersWithOutsidePointerEventsDisabled.add(b)),k.layers.add(b),sd(),()=>{s&&(k.layersWithOutsidePointerEventsDisabled.delete(b),k.layersWithOutsidePointerEventsDisabled.size===0&&(T.body.style.pointerEvents=id))}},[b,T,s,k]),h.useEffect(()=>()=>{b&&(k.layers.delete(b),k.layersWithOutsidePointerEventsDisabled.delete(b),sd())},[b,k]),h.useEffect(()=>{const de=()=>$({});return document.addEventListener(Bs,de),()=>document.removeEventListener(Bs,de)},[]),f.jsx(He.div,{...E,ref:_,style:{pointerEvents:Z?oe?"auto":"none":void 0,...o.style},onFocusCapture:cn(o.onFocusCapture,xe.onFocusCapture),onBlurCapture:cn(o.onBlurCapture,xe.onBlurCapture),onPointerDownCapture:cn(o.onPointerDownCapture,se.onPointerDownCapture)})});Md.displayName=yh;var kh="DismissableLayerBranch",Sh=h.forwardRef((o,u)=>{const s=h.useContext(Ks),a=h.useRef(null),d=bn(u,a);return h.useEffect(()=>{const p=a.current;if(p)return s.branches.add(p),()=>{s.branches.delete(p)}},[s.branches]),f.jsx(He.div,{...o,ref:d})});Sh.displayName=kh;function Eh(){const o=h.useContext(Ks),[u,s]=h.useState(null);return h.useEffect(()=>{if(u)return o.dismissableSurfaces.add(u),()=>{o.dismissableSurfaces.delete(u)}},[u,o.dismissableSurfaces]),s}function Ch(o,u){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:a=!1,isDeferredPointerDownOutsideRef:d,dismissableSurfaces:p}=u,g=eo(o),m=h.useRef(!1),C=h.useRef(!1),E=h.useRef(new Map),k=h.useRef(()=>{});return h.useEffect(()=>{function b(){C.current=!1,d.current=!1,E.current.clear()}function M(){return Array.from(E.current.values()).some(Boolean)}function T(H){if(!C.current)return;const te=H.target;te instanceof Node&&[...p].some(oe=>oe.contains(te))||E.current.set(H.type,!0),H.type==="click"&&window.setTimeout(()=>{C.current&&k.current()},0)}function $(H){C.current&&E.current.set(H.type,!1)}const _=H=>{if(H.target&&!m.current){let te=function(){s.removeEventListener("click",k.current);const oe=M();b(),oe||Td(xh,g,Z,{discrete:!0})};const Z={originalEvent:H};C.current=!0,d.current=a&&H.button===0,E.current.clear(),!a||H.button!==0?te():(s.removeEventListener("click",k.current),k.current=te,s.addEventListener("click",k.current,{once:!0}))}else s.removeEventListener("click",k.current),b();m.current=!1},R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const H of R)s.addEventListener(H,T,!0),s.addEventListener(H,$);const U=window.setTimeout(()=>{s.addEventListener("pointerdown",_)},0);return()=>{window.clearTimeout(U),s.removeEventListener("pointerdown",_),s.removeEventListener("click",k.current);for(const H of R)s.removeEventListener(H,T,!0),s.removeEventListener(H,$)}},[s,g,a,d,p]),{onPointerDownCapture:()=>m.current=!0}}function Nh(o,u=globalThis==null?void 0:globalThis.document){const s=eo(o),a=h.useRef(!1);return h.useEffect(()=>{const d=p=>{p.target&&!a.current&&Td(wh,s,{originalEvent:p},{discrete:!1})};return u.addEventListener("focusin",d),()=>u.removeEventListener("focusin",d)},[u,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function sd(){const o=new CustomEvent(Bs);document.dispatchEvent(o)}function Td(o,u,s,{discrete:a}){const d=s.originalEvent.target,p=new CustomEvent(o,{bubbles:!1,cancelable:!0,detail:s});u&&d.addEventListener(o,u,{once:!0}),a?vh(d,p):d.dispatchEvent(p)}var Rs="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",ud={bubbles:!1,cancelable:!0},jh="FocusScope",Ld=h.forwardRef((o,u)=>{const{loop:s=!1,trapped:a=!1,onMountAutoFocus:d,onUnmountAutoFocus:p,...g}=o,[m,C]=h.useState(null),E=eo(d),k=eo(p),b=h.useRef(null),M=bn(u,_=>C(_)),T=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(a){let _=function(te){if(T.paused||!m)return;const Z=te.target;m.contains(Z)?b.current=Z:an(b.current,{select:!0})},R=function(te){if(T.paused||!m)return;const Z=te.relatedTarget;Z!==null&&(m.contains(Z)||an(b.current,{select:!0}))},U=function(te){if(document.activeElement===document.body)for(const oe of te)oe.removedNodes.length>0&&an(m)};document.addEventListener("focusin",_),document.addEventListener("focusout",R);const H=new MutationObserver(U);return m&&H.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",R),H.disconnect()}}},[a,m,T.paused]),h.useEffect(()=>{if(m){cd.add(T);const _=document.activeElement;if(!m.contains(_)){const U=new CustomEvent(Rs,ud);m.addEventListener(Rs,E),m.dispatchEvent(U),U.defaultPrevented||(bh(Th(Od(m)),{select:!0}),document.activeElement===_&&an(m))}return()=>{m.removeEventListener(Rs,E),setTimeout(()=>{const U=new CustomEvent(Ms,ud);m.addEventListener(Ms,k),m.dispatchEvent(U),U.defaultPrevented||an(_??document.body,{select:!0}),m.removeEventListener(Ms,k),cd.remove(T)},0)}}},[m,E,k,T]);const $=h.useCallback(_=>{if(!s&&!a||T.paused)return;const R=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,U=document.activeElement;if(R&&U){const H=_.currentTarget,[te,Z]=_h(H);te&&Z?!_.shiftKey&&U===Z?(_.preventDefault(),s&&an(te,{select:!0})):_.shiftKey&&U===te&&(_.preventDefault(),s&&an(Z,{select:!0})):U===H&&_.preventDefault()}},[s,a,T.paused]);return f.jsx(He.div,{tabIndex:-1,...g,ref:M,onKeyDown:$})});Ld.displayName=jh;function bh(o,{select:u=!1}={}){const s=document.activeElement;for(const a of o)if(an(a,{select:u}),document.activeElement!==s)return}function _h(o){const u=Od(o),s=ad(u,o),a=ad(u.reverse(),o);return[s,a]}function Od(o){const u=[],s=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const d=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||d?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)u.push(s.currentNode);return u}function ad(o,u){for(const s of o)if(!Ph(s,{upTo:u}))return s}function Ph(o,{upTo:u}){if(getComputedStyle(o).visibility==="hidden")return!0;for(;o;){if(u!==void 0&&o===u)return!1;if(getComputedStyle(o).display==="none")return!0;o=o.parentElement}return!1}function Rh(o){return o instanceof HTMLInputElement&&"select"in o}function an(o,{select:u=!1}={}){if(o&&o.focus){const s=document.activeElement;o.focus({preventScroll:!0}),o!==s&&Rh(o)&&u&&o.select()}}var cd=Mh();function Mh(){let o=[];return{add(u){const s=o[0];u!==s&&(s==null||s.pause()),o=dd(o,u),o.unshift(u)},remove(u){var s;o=dd(o,u),(s=o[0])==null||s.resume()}}}function dd(o,u){const s=[...o],a=s.indexOf(u);return a!==-1&&s.splice(a,1),s}function Th(o){return o.filter(u=>u.tagName!=="A")}var Lh="Portal",Id=h.forwardRef((o,u)=>{var m;const{container:s,...a}=o,[d,p]=h.useState(!1);Jr(()=>p(!0),[]);const g=s||d&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return g?Pd.createPortal(f.jsx(He.div,{...a,ref:u}),g):null});Id.displayName=Lh;function Oh(o,u){return h.useReducer((s,a)=>u[s][a]??s,o)}var jl=o=>{const{present:u,children:s}=o,a=Ih(u),d=typeof s=="function"?s({present:a.isPresent}):h.Children.only(s),p=Dh(a.ref,zh(d));return typeof s=="function"||a.isPresent?h.cloneElement(d,{ref:p}):null};jl.displayName="Presence";function Ih(o){const[u,s]=h.useState(),a=h.useRef(null),d=h.useRef(o),p=h.useRef("none"),g=o?"mounted":"unmounted",[m,C]=Oh(g,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const E=hl(a.current);p.current=m==="mounted"?E:"none"},[m]),Jr(()=>{const E=a.current,k=d.current;if(k!==o){const M=p.current,T=hl(E);o?C("MOUNT"):T==="none"||(E==null?void 0:E.display)==="none"?C("UNMOUNT"):C(k&&M!==T?"ANIMATION_OUT":"UNMOUNT"),d.current=o}},[o,C]),Jr(()=>{if(u){let E;const k=u.ownerDocument.defaultView??window,b=T=>{const _=hl(a.current).includes(CSS.escape(T.animationName));if(T.target===u&&_&&(C("ANIMATION_END"),!d.current)){const R=u.style.animationFillMode;u.style.animationFillMode="forwards",E=k.setTimeout(()=>{u.style.animationFillMode==="forwards"&&(u.style.animationFillMode=R)})}},M=T=>{T.target===u&&(p.current=hl(a.current))};return u.addEventListener("animationstart",M),u.addEventListener("animationcancel",b),u.addEventListener("animationend",b),()=>{k.clearTimeout(E),u.removeEventListener("animationstart",M),u.removeEventListener("animationcancel",b),u.removeEventListener("animationend",b)}}else C("ANIMATION_END")},[u,C]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:h.useCallback(E=>{a.current=E?getComputedStyle(E):null,s(E)},[])}}function fd(o,u){if(typeof o=="function")return o(u);o!=null&&(o.current=u)}function Dh(...o){const u=h.useRef(o);return u.current=o,h.useCallback(s=>{const a=u.current;let d=!1;const p=a.map(g=>{const m=fd(g,s);return!d&&typeof m=="function"&&(d=!0),m});if(d)return()=>{for(let g=0;g{_t||(_t={start:pd(),end:pd()});const{start:o,end:u}=_t;return document.body.firstElementChild!==o&&document.body.insertAdjacentElement("afterbegin",o),document.body.lastElementChild!==u&&document.body.insertAdjacentElement("beforeend",u),vl++,()=>{vl===1&&(_t==null||_t.start.remove(),_t==null||_t.end.remove(),_t=null),vl=Math.max(0,vl-1)}},[])}function pd(){const o=document.createElement("span");return o.setAttribute("data-radix-focus-guard",""),o.tabIndex=0,o.style.outline="none",o.style.opacity="0",o.style.position="fixed",o.style.pointerEvents="none",o}var Pt=function(){return Pt=Object.assign||function(u){for(var s,a=1,d=arguments.length;a"u")return tv;var u=nv(o),s=document.documentElement.clientWidth,a=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,a-s+u[2]-u[0])}},ov=Fd(),lr="data-scroll-locked",lv=function(o,u,s,a){var d=o.left,p=o.top,g=o.right,m=o.gap;return s===void 0&&(s="margin"),` .`.concat(Uh,` { overflow: hidden `).concat(a,`; padding-right: `).concat(m,"px ").concat(a,`; } body[`).concat(lr,`] { overflow: hidden `).concat(a,`; overscroll-behavior: contain; `).concat([u&&"position: relative ".concat(a,";"),s==="margin"&&` padding-left: `.concat(d,`px; padding-top: `).concat(p,`px; padding-right: `).concat(g,`px; margin-left:0; margin-top:0; margin-right: `).concat(m,"px ").concat(a,`; `),s==="padding"&&"padding-right: ".concat(m,"px ").concat(a,";")].filter(Boolean).join(""),` } .`).concat(El,` { right: `).concat(m,"px ").concat(a,`; } .`).concat(Cl,` { margin-right: `).concat(m,"px ").concat(a,`; } .`).concat(El," .").concat(El,` { right: 0 `).concat(a,`; } .`).concat(Cl," .").concat(Cl,` { margin-right: 0 `).concat(a,`; } body[`).concat(lr,`] { `).concat($h,": ").concat(m,`px; } `)},hd=function(){var o=parseInt(document.body.getAttribute(lr)||"0",10);return isFinite(o)?o:0},iv=function(){h.useEffect(function(){return document.body.setAttribute(lr,(hd()+1).toString()),function(){var o=hd()-1;o<=0?document.body.removeAttribute(lr):document.body.setAttribute(lr,o.toString())}},[])},sv=function(o){var u=o.noRelative,s=o.noImportant,a=o.gapMode,d=a===void 0?"margin":a;iv();var p=h.useMemo(function(){return rv(d)},[d]);return h.createElement(ov,{styles:lv(p,!u,d,s?"":"!important")})},Vs=!1;if(typeof window<"u")try{var gl=Object.defineProperty({},"passive",{get:function(){return Vs=!0,!0}});window.addEventListener("test",gl,gl),window.removeEventListener("test",gl,gl)}catch{Vs=!1}var Jn=Vs?{passive:!1}:!1,uv=function(o){return o.tagName==="TEXTAREA"},Ud=function(o,u){if(!(o instanceof Element))return!1;var s=window.getComputedStyle(o);return s[u]!=="hidden"&&!(s.overflowY===s.overflowX&&!uv(o)&&s[u]==="visible")},av=function(o){return Ud(o,"overflowY")},cv=function(o){return Ud(o,"overflowX")},vd=function(o,u){var s=u.ownerDocument,a=u;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var d=$d(o,a);if(d){var p=Bd(o,a),g=p[1],m=p[2];if(g>m)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},dv=function(o){var u=o.scrollTop,s=o.scrollHeight,a=o.clientHeight;return[u,s,a]},fv=function(o){var u=o.scrollLeft,s=o.scrollWidth,a=o.clientWidth;return[u,s,a]},$d=function(o,u){return o==="v"?av(u):cv(u)},Bd=function(o,u){return o==="v"?dv(u):fv(u)},pv=function(o,u){return o==="h"&&u==="rtl"?-1:1},mv=function(o,u,s,a,d){var p=pv(o,window.getComputedStyle(u).direction),g=p*a,m=s.target,C=u.contains(m),E=!1,k=g>0,b=0,M=0;do{if(!m)break;var T=Bd(o,m),$=T[0],_=T[1],R=T[2],U=_-R-p*$;($||U)&&$d(o,m)&&(b+=U,M+=$);var H=m.parentNode;m=H&&H.nodeType===Node.DOCUMENT_FRAGMENT_NODE?H.host:H}while(!C&&m!==document.body||C&&(u.contains(m)||u===m));return(k&&Math.abs(b)<1||!k&&Math.abs(M)<1)&&(E=!0),E},yl=function(o){return"changedTouches"in o?[o.changedTouches[0].clientX,o.changedTouches[0].clientY]:[0,0]},gd=function(o){return[o.deltaX,o.deltaY]},yd=function(o){return o&&"current"in o?o.current:o},hv=function(o,u){return o[0]===u[0]&&o[1]===u[1]},vv=function(o){return` .block-interactivity-`.concat(o,` {pointer-events: none;} .allow-interactivity-`).concat(o,` {pointer-events: all;} `)},gv=0,er=[];function yv(o){var u=h.useRef([]),s=h.useRef([0,0]),a=h.useRef(),d=h.useState(gv++)[0],p=h.useState(Fd)[0],g=h.useRef(o);h.useEffect(function(){g.current=o},[o]),h.useEffect(function(){if(o.inert){document.body.classList.add("block-interactivity-".concat(d));var _=Fh([o.lockRef.current],(o.shards||[]).map(yd),!0).filter(Boolean);return _.forEach(function(R){return R.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),_.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(d))})}}},[o.inert,o.lockRef.current,o.shards]);var m=h.useCallback(function(_,R){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!g.current.allowPinchZoom;var U=yl(_),H=s.current,te="deltaX"in _?_.deltaX:H[0]-U[0],Z="deltaY"in _?_.deltaY:H[1]-U[1],oe,ne=_.target,se=Math.abs(te)>Math.abs(Z)?"h":"v";if("touches"in _&&se==="h"&&ne.type==="range")return!1;var xe=window.getSelection(),de=xe&&xe.anchorNode,we=de?de===ne||de.contains(ne):!1;if(we)return!1;var Ne=vd(se,ne);if(!Ne)return!0;if(Ne?oe=se:(oe=se==="v"?"h":"v",Ne=vd(se,ne)),!Ne)return!1;if(!a.current&&"changedTouches"in _&&(te||Z)&&(a.current=oe),!oe)return!0;var ie=a.current||oe;return mv(ie,R,_,ie==="h"?te:Z)},[]),C=h.useCallback(function(_){var R=_;if(!(!er.length||er[er.length-1]!==p)){var U="deltaY"in R?gd(R):yl(R),H=u.current.filter(function(oe){return oe.name===R.type&&(oe.target===R.target||R.target===oe.shadowParent)&&hv(oe.delta,U)})[0];if(H&&H.should){R.cancelable&&R.preventDefault();return}if(!H){var te=(g.current.shards||[]).map(yd).filter(Boolean).filter(function(oe){return oe.contains(R.target)}),Z=te.length>0?m(R,te[0]):!g.current.noIsolation;Z&&R.cancelable&&R.preventDefault()}}},[]),E=h.useCallback(function(_,R,U,H){var te={name:_,delta:R,target:U,should:H,shadowParent:xv(U)};u.current.push(te),setTimeout(function(){u.current=u.current.filter(function(Z){return Z!==te})},1)},[]),k=h.useCallback(function(_){s.current=yl(_),a.current=void 0},[]),b=h.useCallback(function(_){E(_.type,gd(_),_.target,m(_,o.lockRef.current))},[]),M=h.useCallback(function(_){E(_.type,yl(_),_.target,m(_,o.lockRef.current))},[]);h.useEffect(function(){return er.push(p),o.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:M}),document.addEventListener("wheel",C,Jn),document.addEventListener("touchmove",C,Jn),document.addEventListener("touchstart",k,Jn),function(){er=er.filter(function(_){return _!==p}),document.removeEventListener("wheel",C,Jn),document.removeEventListener("touchmove",C,Jn),document.removeEventListener("touchstart",k,Jn)}},[]);var T=o.removeScrollBar,$=o.inert;return h.createElement(h.Fragment,null,$?h.createElement(p,{styles:vv(d)}):null,T?h.createElement(sv,{noRelative:o.noRelative,gapMode:o.gapMode}):null)}function xv(o){for(var u=null;o!==null;)o instanceof ShadowRoot&&(u=o.host,o=o.host),o=o.parentNode;return u}const wv=Kh(Ad,yv);var Vd=h.forwardRef(function(o,u){return h.createElement(bl,Pt({},o,{ref:u,sideCar:wv}))});Vd.classNames=bl.classNames;var kv=function(o){if(typeof document>"u")return null;var u=Array.isArray(o)?o[0]:o;return u.ownerDocument.body},tr=new WeakMap,xl=new WeakMap,wl={},Is=0,Wd=function(o){return o&&(o.host||Wd(o.parentNode))},Sv=function(o,u){return u.map(function(s){if(o.contains(s))return s;var a=Wd(s);return a&&o.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",o,". Doing nothing"),null)}).filter(function(s){return!!s})},Ev=function(o,u,s,a){var d=Sv(u,Array.isArray(o)?o:[o]);wl[s]||(wl[s]=new WeakMap);var p=wl[s],g=[],m=new Set,C=new Set(d),E=function(b){!b||m.has(b)||(m.add(b),E(b.parentNode))};d.forEach(E);var k=function(b){!b||C.has(b)||Array.prototype.forEach.call(b.children,function(M){if(m.has(M))k(M);else try{var T=M.getAttribute(a),$=T!==null&&T!=="false",_=(tr.get(M)||0)+1,R=(p.get(M)||0)+1;tr.set(M,_),p.set(M,R),g.push(M),_===1&&$&&xl.set(M,!0),R===1&&M.setAttribute(s,"true"),$||M.setAttribute(a,"true")}catch(U){console.error("aria-hidden: cannot operate on ",M,U)}})};return k(u),m.clear(),Is++,function(){g.forEach(function(b){var M=tr.get(b)-1,T=p.get(b)-1;tr.set(b,M),p.set(b,T),M||(xl.has(b)||b.removeAttribute(a),xl.delete(b)),T||b.removeAttribute(s)}),Is--,Is||(tr=new WeakMap,tr=new WeakMap,xl=new WeakMap,wl={})}},Cv=function(o,u,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(o)?o:[o]),d=kv(o);return d?(a.push.apply(a,Array.from(d.querySelectorAll("[aria-live], script"))),Ev(a,d,s,"aria-hidden")):function(){return null}},_l="Dialog",[Hd]=Zm(_l),[Nv,St]=Hd(_l),Gd=o=>{const{__scopeDialog:u,children:s,open:a,defaultOpen:d,onOpenChange:p,modal:g=!0}=o,m=h.useRef(null),C=h.useRef(null),[E,k]=rh({prop:a,defaultProp:d??!1,onChange:p,caller:_l});return f.jsx(Nv,{scope:u,triggerRef:m,contentRef:C,contentId:Ft(),titleId:Ft(),descriptionId:Ft(),open:E,onOpenChange:k,onOpenToggle:h.useCallback(()=>k(b=>!b),[k]),modal:g,children:s})};Gd.displayName=_l;var Qd="DialogTrigger",jv=h.forwardRef((o,u)=>{const{__scopeDialog:s,...a}=o,d=St(Qd,s),p=bn(u,d.triggerRef);return f.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":Xs(d.open),...a,ref:p,onClick:cn(o.onClick,d.onOpenToggle)})});jv.displayName=Qd;var Ys="DialogPortal",[bv,Kd]=Hd(Ys,{forceMount:void 0}),Yd=o=>{const{__scopeDialog:u,forceMount:s,children:a,container:d}=o,p=St(Ys,u);return f.jsx(bv,{scope:u,forceMount:s,children:h.Children.map(a,g=>f.jsx(jl,{present:s||p.open,children:f.jsx(Id,{asChild:!0,container:d,children:g})}))})};Yd.displayName=Ys;var Nl="DialogOverlay",Xd=h.forwardRef((o,u)=>{const s=Kd(Nl,o.__scopeDialog),{forceMount:a=s.forceMount,...d}=o,p=St(Nl,o.__scopeDialog);return p.modal?f.jsx(jl,{present:a||p.open,children:f.jsx(Pv,{...d,ref:u})}):null});Xd.displayName=Nl;var _v=Rd("DialogOverlay.RemoveScroll"),Pv=h.forwardRef((o,u)=>{const{__scopeDialog:s,...a}=o,d=St(Nl,s),p=Eh(),g=bn(u,p);return f.jsx(Vd,{as:_v,allowPinchZoom:!0,shards:[d.contentRef],children:f.jsx(He.div,{"data-state":Xs(d.open),...a,ref:g,style:{pointerEvents:"auto",...a.style}})})}),ur="DialogContent",qd=h.forwardRef((o,u)=>{const s=Kd(ur,o.__scopeDialog),{forceMount:a=s.forceMount,...d}=o,p=St(ur,o.__scopeDialog);return f.jsx(jl,{present:a||p.open,children:p.modal?f.jsx(Rv,{...d,ref:u}):f.jsx(Mv,{...d,ref:u})})});qd.displayName=ur;var Rv=h.forwardRef((o,u)=>{const s=St(ur,o.__scopeDialog),a=h.useRef(null),d=bn(u,s.contentRef,a);return h.useEffect(()=>{const p=a.current;if(p)return Cv(p)},[]),f.jsx(Zd,{...o,ref:d,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:cn(o.onCloseAutoFocus,p=>{var g;p.preventDefault(),(g=s.triggerRef.current)==null||g.focus()}),onPointerDownOutside:cn(o.onPointerDownOutside,p=>{const g=p.detail.originalEvent,m=g.button===0&&g.ctrlKey===!0;(g.button===2||m)&&p.preventDefault()}),onFocusOutside:cn(o.onFocusOutside,p=>p.preventDefault())})}),Mv=h.forwardRef((o,u)=>{const s=St(ur,o.__scopeDialog),a=h.useRef(!1),d=h.useRef(!1);return f.jsx(Zd,{...o,ref:u,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:p=>{var g,m;(g=o.onCloseAutoFocus)==null||g.call(o,p),p.defaultPrevented||(a.current||(m=s.triggerRef.current)==null||m.focus(),p.preventDefault()),a.current=!1,d.current=!1},onInteractOutside:p=>{var C,E;(C=o.onInteractOutside)==null||C.call(o,p),p.defaultPrevented||(a.current=!0,p.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const g=p.target;((E=s.triggerRef.current)==null?void 0:E.contains(g))&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&d.current&&p.preventDefault()}})}),Zd=h.forwardRef((o,u)=>{const{__scopeDialog:s,trapFocus:a,onOpenAutoFocus:d,onCloseAutoFocus:p,...g}=o,m=St(ur,s);return Ah(),f.jsx(f.Fragment,{children:f.jsx(Ld,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:d,onUnmountAutoFocus:p,children:f.jsx(Md,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Xs(m.open),...g,ref:u,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),Jd="DialogTitle",Tv=h.forwardRef((o,u)=>{const{__scopeDialog:s,...a}=o,d=St(Jd,s);return f.jsx(He.h2,{id:d.titleId,...a,ref:u})});Tv.displayName=Jd;var ef="DialogDescription",Lv=h.forwardRef((o,u)=>{const{__scopeDialog:s,...a}=o,d=St(ef,s);return f.jsx(He.p,{id:d.descriptionId,...a,ref:u})});Lv.displayName=ef;var tf="DialogClose",Ov=h.forwardRef((o,u)=>{const{__scopeDialog:s,...a}=o,d=St(tf,s);return f.jsx(He.button,{type:"button",...a,ref:u,onClick:cn(o.onClick,()=>d.onOpenChange(!1))})});Ov.displayName=tf;function Xs(o){return o?"open":"closed"}var Xr='[cmdk-group=""]',Ds='[cmdk-group-items=""]',Iv='[cmdk-group-heading=""]',nf='[cmdk-item=""]',xd=`${nf}:not([aria-disabled="true"])`,Ws="cmdk-item-select",rr="data-value",Dv=(o,u,s)=>qm(o,u,s),rf=h.createContext(void 0),to=()=>h.useContext(rf),of=h.createContext(void 0),qs=()=>h.useContext(of),lf=h.createContext(void 0),sf=h.forwardRef((o,u)=>{let s=or(()=>{var w,A;return{search:"",value:(A=(w=o.value)!=null?w:o.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),a=or(()=>new Set),d=or(()=>new Map),p=or(()=>new Map),g=or(()=>new Set),m=uf(o),{label:C,children:E,value:k,onValueChange:b,filter:M,shouldFilter:T,loop:$,disablePointerSelection:_=!1,vimBindings:R=!0,...U}=o,H=Ft(),te=Ft(),Z=Ft(),oe=h.useRef(null),ne=Qv();jn(()=>{if(k!==void 0){let w=k.trim();s.current.value=w,se.emit()}},[k]),jn(()=>{ne(6,Oe)},[]);let se=h.useMemo(()=>({subscribe:w=>(g.current.add(w),()=>g.current.delete(w)),snapshot:()=>s.current,setState:(w,A,V)=>{var z,Y,re,ue;if(!Object.is(s.current[w],A)){if(s.current[w]=A,w==="search")ie(),we(),ne(1,Ne);else if(w==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(Z);ce?ce.focus():(z=document.getElementById(H))==null||z.focus()}if(ne(7,()=>{var ce;s.current.selectedItemId=(ce=je())==null?void 0:ce.id,se.emit()}),V||ne(5,Oe),((Y=m.current)==null?void 0:Y.value)!==void 0){let ce=A??"";(ue=(re=m.current).onValueChange)==null||ue.call(re,ce);return}}se.emit()}},emit:()=>{g.current.forEach(w=>w())}}),[]),xe=h.useMemo(()=>({value:(w,A,V)=>{var z;A!==((z=p.current.get(w))==null?void 0:z.value)&&(p.current.set(w,{value:A,keywords:V}),s.current.filtered.items.set(w,de(A,V)),ne(2,()=>{we(),se.emit()}))},item:(w,A)=>(a.current.add(w),A&&(d.current.has(A)?d.current.get(A).add(w):d.current.set(A,new Set([w]))),ne(3,()=>{ie(),we(),s.current.value||Ne(),se.emit()}),()=>{p.current.delete(w),a.current.delete(w),s.current.filtered.items.delete(w);let V=je();ne(4,()=>{ie(),(V==null?void 0:V.getAttribute("id"))===w&&Ne(),se.emit()})}),group:w=>(d.current.has(w)||d.current.set(w,new Set),()=>{p.current.delete(w),d.current.delete(w)}),filter:()=>m.current.shouldFilter,label:C||o["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:H,inputId:Z,labelId:te,listInnerRef:oe}),[]);function de(w,A){var V,z;let Y=(z=(V=m.current)==null?void 0:V.filter)!=null?z:Dv;return w?Y(w,s.current.search,A):0}function we(){if(!s.current.search||m.current.shouldFilter===!1)return;let w=s.current.filtered.items,A=[];s.current.filtered.groups.forEach(z=>{let Y=d.current.get(z),re=0;Y.forEach(ue=>{let ce=w.get(ue);re=Math.max(ce,re)}),A.push([z,re])});let V=oe.current;Ie().sort((z,Y)=>{var re,ue;let ce=z.getAttribute("id"),Ae=Y.getAttribute("id");return((re=w.get(Ae))!=null?re:0)-((ue=w.get(ce))!=null?ue:0)}).forEach(z=>{let Y=z.closest(Ds);Y?Y.appendChild(z.parentElement===Y?z:z.closest(`${Ds} > *`)):V.appendChild(z.parentElement===V?z:z.closest(`${Ds} > *`))}),A.sort((z,Y)=>Y[1]-z[1]).forEach(z=>{var Y;let re=(Y=oe.current)==null?void 0:Y.querySelector(`${Xr}[${rr}="${encodeURIComponent(z[0])}"]`);re==null||re.parentElement.appendChild(re)})}function Ne(){let w=Ie().find(V=>V.getAttribute("aria-disabled")!=="true"),A=w==null?void 0:w.getAttribute(rr);se.setState("value",A||void 0)}function ie(){var w,A,V,z;if(!s.current.search||m.current.shouldFilter===!1){s.current.filtered.count=a.current.size;return}s.current.filtered.groups=new Set;let Y=0;for(let re of a.current){let ue=(A=(w=p.current.get(re))==null?void 0:w.value)!=null?A:"",ce=(z=(V=p.current.get(re))==null?void 0:V.keywords)!=null?z:[],Ae=de(ue,ce);s.current.filtered.items.set(re,Ae),Ae>0&&Y++}for(let[re,ue]of d.current)for(let ce of ue)if(s.current.filtered.items.get(ce)>0){s.current.filtered.groups.add(re);break}s.current.filtered.count=Y}function Oe(){var w,A,V;let z=je();z&&(((w=z.parentElement)==null?void 0:w.firstChild)===z&&((V=(A=z.closest(Xr))==null?void 0:A.querySelector(Iv))==null||V.scrollIntoView({block:"nearest"})),z.scrollIntoView({block:"nearest"}))}function je(){var w;return(w=oe.current)==null?void 0:w.querySelector(`${nf}[aria-selected="true"]`)}function Ie(){var w;return Array.from(((w=oe.current)==null?void 0:w.querySelectorAll(xd))||[])}function be(w){let A=Ie()[w];A&&se.setState("value",A.getAttribute(rr))}function he(w){var A;let V=je(),z=Ie(),Y=z.findIndex(ue=>ue===V),re=z[Y+w];(A=m.current)!=null&&A.loop&&(re=Y+w<0?z[z.length-1]:Y+w===z.length?z[0]:z[Y+w]),re&&se.setState("value",re.getAttribute(rr))}function F(w){let A=je(),V=A==null?void 0:A.closest(Xr),z;for(;V&&!z;)V=w>0?Hv(V,Xr):Gv(V,Xr),z=V==null?void 0:V.querySelector(xd);z?se.setState("value",z.getAttribute(rr)):he(w)}let q=()=>be(Ie().length-1),B=w=>{w.preventDefault(),w.metaKey?q():w.altKey?F(1):he(1)},S=w=>{w.preventDefault(),w.metaKey?be(0):w.altKey?F(-1):he(-1)};return h.createElement(He.div,{ref:u,tabIndex:-1,...U,"cmdk-root":"",onKeyDown:w=>{var A;(A=U.onKeyDown)==null||A.call(U,w);let V=w.nativeEvent.isComposing||w.keyCode===229;if(!(w.defaultPrevented||V))switch(w.key){case"n":case"j":{R&&w.ctrlKey&&B(w);break}case"ArrowDown":{B(w);break}case"p":case"k":{R&&w.ctrlKey&&S(w);break}case"ArrowUp":{S(w);break}case"Home":{w.preventDefault(),be(0);break}case"End":{w.preventDefault(),q();break}case"Enter":{w.preventDefault();let z=je();if(z){let Y=new Event(Ws);z.dispatchEvent(Y)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:xe.inputId,id:xe.labelId,style:Yv},C),Pl(o,w=>h.createElement(of.Provider,{value:se},h.createElement(rf.Provider,{value:xe},w))))}),zv=h.forwardRef((o,u)=>{var s,a;let d=Ft(),p=h.useRef(null),g=h.useContext(lf),m=to(),C=uf(o),E=(a=(s=C.current)==null?void 0:s.forceMount)!=null?a:g==null?void 0:g.forceMount;jn(()=>{if(!E)return m.item(d,g==null?void 0:g.id)},[E]);let k=af(d,p,[o.value,o.children,p],o.keywords),b=qs(),M=dn(ne=>ne.value&&ne.value===k.current),T=dn(ne=>E||m.filter()===!1?!0:ne.search?ne.filtered.items.get(d)>0:!0);h.useEffect(()=>{let ne=p.current;if(!(!ne||o.disabled))return ne.addEventListener(Ws,$),()=>ne.removeEventListener(Ws,$)},[T,o.onSelect,o.disabled]);function $(){var ne,se;_(),(se=(ne=C.current).onSelect)==null||se.call(ne,k.current)}function _(){b.setState("value",k.current,!0)}if(!T)return null;let{disabled:R,value:U,onSelect:H,forceMount:te,keywords:Z,...oe}=o;return h.createElement(He.div,{ref:sr(p,u),...oe,id:d,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!M,"data-disabled":!!R,"data-selected":!!M,onPointerMove:R||m.getDisablePointerSelection()?void 0:_,onClick:R?void 0:$},o.children)}),Av=h.forwardRef((o,u)=>{let{heading:s,children:a,forceMount:d,...p}=o,g=Ft(),m=h.useRef(null),C=h.useRef(null),E=Ft(),k=to(),b=dn(T=>d||k.filter()===!1?!0:T.search?T.filtered.groups.has(g):!0);jn(()=>k.group(g),[]),af(g,m,[o.value,o.heading,C]);let M=h.useMemo(()=>({id:g,forceMount:d}),[d]);return h.createElement(He.div,{ref:sr(m,u),...p,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},s&&h.createElement("div",{ref:C,"cmdk-group-heading":"","aria-hidden":!0,id:E},s),Pl(o,T=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?E:void 0},h.createElement(lf.Provider,{value:M},T))))}),Fv=h.forwardRef((o,u)=>{let{alwaysRender:s,...a}=o,d=h.useRef(null),p=dn(g=>!g.search);return!s&&!p?null:h.createElement(He.div,{ref:sr(d,u),...a,"cmdk-separator":"",role:"separator"})}),Uv=h.forwardRef((o,u)=>{let{onValueChange:s,...a}=o,d=o.value!=null,p=qs(),g=dn(E=>E.search),m=dn(E=>E.selectedItemId),C=to();return h.useEffect(()=>{o.value!=null&&p.setState("search",o.value)},[o.value]),h.createElement(He.input,{ref:u,...a,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":C.listId,"aria-labelledby":C.labelId,"aria-activedescendant":m,id:C.inputId,type:"text",value:d?o.value:g,onChange:E=>{d||p.setState("search",E.target.value),s==null||s(E.target.value)}})}),$v=h.forwardRef((o,u)=>{let{children:s,label:a="Suggestions",...d}=o,p=h.useRef(null),g=h.useRef(null),m=dn(E=>E.selectedItemId),C=to();return h.useEffect(()=>{if(g.current&&p.current){let E=g.current,k=p.current,b,M=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let T=E.offsetHeight;k.style.setProperty("--cmdk-list-height",T.toFixed(1)+"px")})});return M.observe(E),()=>{cancelAnimationFrame(b),M.unobserve(E)}}},[]),h.createElement(He.div,{ref:sr(p,u),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":a,id:C.listId},Pl(o,E=>h.createElement("div",{ref:sr(g,C.listInnerRef),"cmdk-list-sizer":""},E)))}),Bv=h.forwardRef((o,u)=>{let{open:s,onOpenChange:a,overlayClassName:d,contentClassName:p,container:g,...m}=o;return h.createElement(Gd,{open:s,onOpenChange:a},h.createElement(Yd,{container:g},h.createElement(Xd,{"cmdk-overlay":"",className:d}),h.createElement(qd,{"aria-label":o.label,"cmdk-dialog":"",className:p},h.createElement(sf,{ref:u,...m}))))}),Vv=h.forwardRef((o,u)=>dn(s=>s.filtered.count===0)?h.createElement(He.div,{ref:u,...o,"cmdk-empty":"",role:"presentation"}):null),Wv=h.forwardRef((o,u)=>{let{progress:s,children:a,label:d="Loading...",...p}=o;return h.createElement(He.div,{ref:u,...p,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},Pl(o,g=>h.createElement("div",{"aria-hidden":!0},g)))}),nr=Object.assign(sf,{List:$v,Item:zv,Input:Uv,Group:Av,Separator:Fv,Dialog:Bv,Empty:Vv,Loading:Wv});function Hv(o,u){let s=o.nextElementSibling;for(;s;){if(s.matches(u))return s;s=s.nextElementSibling}}function Gv(o,u){let s=o.previousElementSibling;for(;s;){if(s.matches(u))return s;s=s.previousElementSibling}}function uf(o){let u=h.useRef(o);return jn(()=>{u.current=o}),u}var jn=typeof window>"u"?h.useEffect:h.useLayoutEffect;function or(o){let u=h.useRef();return u.current===void 0&&(u.current=o()),u}function dn(o){let u=qs(),s=()=>o(u.snapshot());return h.useSyncExternalStore(u.subscribe,s,s)}function af(o,u,s,a=[]){let d=h.useRef(),p=to();return jn(()=>{var g;let m=(()=>{var E;for(let k of s){if(typeof k=="string")return k.trim();if(typeof k=="object"&&"current"in k)return k.current?(E=k.current.textContent)==null?void 0:E.trim():d.current}})(),C=a.map(E=>E.trim());p.value(o,m,C),(g=u.current)==null||g.setAttribute(rr,m),d.current=m}),d}var Qv=()=>{let[o,u]=h.useState(),s=or(()=>new Map);return jn(()=>{s.current.forEach(a=>a()),s.current=new Map},[o]),(a,d)=>{s.current.set(a,d),u({})}};function Kv(o){let u=o.type;return typeof u=="function"?u(o.props):"render"in u?u.render(o.props):o}function Pl({asChild:o,children:u},s){return o&&h.isValidElement(u)?h.cloneElement(Kv(u),{ref:u.ref},s(u.props.children)):s(u)}var Yv={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Xv({onNavigate:o}){const[u,s]=h.useState(!1);return h.useEffect(()=>{const a=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&(d.preventDefault(),s(p=>!p))};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[]),f.jsx(nr.Dialog,{open:u,onOpenChange:s,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh]",onClick:()=>s(!1),children:f.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:a=>a.stopPropagation(),children:[f.jsx(nr.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"}),f.jsxs(nr.List,{className:"max-h-80 overflow-y-auto p-2",children:[f.jsx(nr.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),f.jsx(nr.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:Us.map(a=>f.jsxs(nr.Item,{value:`${a.label} ${a.hint}`,onSelect:()=>{o(a.id),s(!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:[f.jsx(a.icon,{className:"h-4 w-4 text-primary"}),f.jsx("span",{children:a.label}),f.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:a.hint})]},a.id))})]})]})})}async function ye(o,u){const s=await fetch(o,{headers:{"Content-Type":"application/json"},...u});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.json()}function Nn({children:o,tone:u="muted"}){const s={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return f.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${s[u]}`,children:o})}function cf({caps:o}){return o?f.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[o.coder&&f.jsx(Nn,{children:"💻 Code"}),o.vision&&f.jsx(Nn,{children:"👁 Bild"}),o.reasoning&&f.jsx(Nn,{children:"🧠 Reason"}),o.moe&&f.jsxs(Nn,{tone:"primary",children:["🧩 MoE",o.active_b?`·${o.active_b}b`:""]}),o.tools==="yes"&&f.jsx(Nn,{tone:"primary",children:"🛠 Tools"}),o.tools==="likely"&&f.jsx(Nn,{tone:"warn",children:"🛠 Tools?"}),o.embedding&&f.jsx(Nn,{children:"🔢 Embed"})]}):null}function df(o){var u,s,a="";if(typeof o=="string"||typeof o=="number")a+=o;else if(typeof o=="object")if(Array.isArray(o)){var d=o.length;for(u=0;u{const u=eg(o),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=o;return{getClassGroupId:g=>{const m=g.split(Zs);return m[0]===""&&m.length!==1&&m.shift(),ff(m,u)||Jv(g)},getConflictingClassGroupIds:(g,m)=>{const C=s[g]||[];return m&&a[g]?[...C,...a[g]]:C}}},ff=(o,u)=>{var g;if(o.length===0)return u.classGroupId;const s=o[0],a=u.nextPart.get(s),d=a?ff(o.slice(1),a):void 0;if(d)return d;if(u.validators.length===0)return;const p=o.join(Zs);return(g=u.validators.find(({validator:m})=>m(p)))==null?void 0:g.classGroupId},wd=/^\[(.+)\]$/,Jv=o=>{if(wd.test(o)){const u=wd.exec(o)[1],s=u==null?void 0:u.substring(0,u.indexOf(":"));if(s)return"arbitrary.."+s}},eg=o=>{const{theme:u,prefix:s}=o,a={nextPart:new Map,validators:[]};return ng(Object.entries(o.classGroups),s).forEach(([p,g])=>{Hs(g,a,p,u)}),a},Hs=(o,u,s,a)=>{o.forEach(d=>{if(typeof d=="string"){const p=d===""?u:kd(u,d);p.classGroupId=s;return}if(typeof d=="function"){if(tg(d)){Hs(d(a),u,s,a);return}u.validators.push({validator:d,classGroupId:s});return}Object.entries(d).forEach(([p,g])=>{Hs(g,kd(u,p),s,a)})})},kd=(o,u)=>{let s=o;return u.split(Zs).forEach(a=>{s.nextPart.has(a)||s.nextPart.set(a,{nextPart:new Map,validators:[]}),s=s.nextPart.get(a)}),s},tg=o=>o.isThemeGetter,ng=(o,u)=>u?o.map(([s,a])=>{const d=a.map(p=>typeof p=="string"?u+p:typeof p=="object"?Object.fromEntries(Object.entries(p).map(([g,m])=>[u+g,m])):p);return[s,d]}):o,rg=o=>{if(o<1)return{get:()=>{},set:()=>{}};let u=0,s=new Map,a=new Map;const d=(p,g)=>{s.set(p,g),u++,u>o&&(u=0,a=s,s=new Map)};return{get(p){let g=s.get(p);if(g!==void 0)return g;if((g=a.get(p))!==void 0)return d(p,g),g},set(p,g){s.has(p)?s.set(p,g):d(p,g)}}},pf="!",og=o=>{const{separator:u,experimentalParseClassName:s}=o,a=u.length===1,d=u[0],p=u.length,g=m=>{const C=[];let E=0,k=0,b;for(let R=0;Rk?b-k:void 0;return{modifiers:C,hasImportantModifier:T,baseClassName:$,maybePostfixModifierPosition:_}};return s?m=>s({className:m,parseClassName:g}):g},lg=o=>{if(o.length<=1)return o;const u=[];let s=[];return o.forEach(a=>{a[0]==="["?(u.push(...s.sort(),a),s=[]):s.push(a)}),u.push(...s.sort()),u},ig=o=>({cache:rg(o.cacheSize),parseClassName:og(o),...Zv(o)}),sg=/\s+/,ug=(o,u)=>{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:d}=u,p=[],g=o.trim().split(sg);let m="";for(let C=g.length-1;C>=0;C-=1){const E=g[C],{modifiers:k,hasImportantModifier:b,baseClassName:M,maybePostfixModifierPosition:T}=s(E);let $=!!T,_=a($?M.substring(0,T):M);if(!_){if(!$){m=E+(m.length>0?" "+m:m);continue}if(_=a(M),!_){m=E+(m.length>0?" "+m:m);continue}$=!1}const R=lg(k).join(":"),U=b?R+pf:R,H=U+_;if(p.includes(H))continue;p.push(H);const te=d(_,$);for(let Z=0;Z0?" "+m:m)}return m};function ag(){let o=0,u,s,a="";for(;o{if(typeof o=="string")return o;let u,s="";for(let a=0;ab(k),o());return s=ig(E),a=s.cache.get,d=s.cache.set,p=m,m(C)}function m(C){const E=a(C);if(E)return E;const k=ug(C,s);return d(C,k),k}return function(){return p(ag.apply(null,arguments))}}const Ee=o=>{const u=s=>s[o]||[];return u.isThemeGetter=!0,u},hf=/^\[(?:([a-z-]+):)?(.+)\]$/i,dg=/^\d+\/\d+$/,fg=new Set(["px","full","screen"]),pg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mg=/\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$/,hg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,At=o=>ir(o)||fg.has(o)||dg.test(o),ln=o=>ar(o,"length",Ng),ir=o=>!!o&&!Number.isNaN(Number(o)),zs=o=>ar(o,"number",ir),qr=o=>!!o&&Number.isInteger(Number(o)),yg=o=>o.endsWith("%")&&ir(o.slice(0,-1)),ae=o=>hf.test(o),sn=o=>pg.test(o),xg=new Set(["length","size","percentage"]),wg=o=>ar(o,xg,vf),kg=o=>ar(o,"position",vf),Sg=new Set(["image","url"]),Eg=o=>ar(o,Sg,bg),Cg=o=>ar(o,"",jg),Zr=()=>!0,ar=(o,u,s)=>{const a=hf.exec(o);return a?a[1]?typeof u=="string"?a[1]===u:u.has(a[1]):s(a[2]):!1},Ng=o=>mg.test(o)&&!hg.test(o),vf=()=>!1,jg=o=>vg.test(o),bg=o=>gg.test(o),_g=()=>{const o=Ee("colors"),u=Ee("spacing"),s=Ee("blur"),a=Ee("brightness"),d=Ee("borderColor"),p=Ee("borderRadius"),g=Ee("borderSpacing"),m=Ee("borderWidth"),C=Ee("contrast"),E=Ee("grayscale"),k=Ee("hueRotate"),b=Ee("invert"),M=Ee("gap"),T=Ee("gradientColorStops"),$=Ee("gradientColorStopPositions"),_=Ee("inset"),R=Ee("margin"),U=Ee("opacity"),H=Ee("padding"),te=Ee("saturate"),Z=Ee("scale"),oe=Ee("sepia"),ne=Ee("skew"),se=Ee("space"),xe=Ee("translate"),de=()=>["auto","contain","none"],we=()=>["auto","hidden","clip","visible","scroll"],Ne=()=>["auto",ae,u],ie=()=>[ae,u],Oe=()=>["",At,ln],je=()=>["auto",ir,ae],Ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],be=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ae],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>[ir,ae];return{cacheSize:500,separator:":",theme:{colors:[Zr],spacing:[At,ln],blur:["none","",sn,ae],brightness:S(),borderColor:[o],borderRadius:["none","","full",sn,ae],borderSpacing:ie(),borderWidth:Oe(),contrast:S(),grayscale:q(),hueRotate:S(),invert:q(),gap:ie(),gradientColorStops:[o],gradientColorStopPositions:[yg,ln],inset:Ne(),margin:Ne(),opacity:S(),padding:ie(),saturate:S(),scale:S(),sepia:q(),skew:S(),space:ie(),translate:ie()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[sn]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:[...Ie(),ae]}],overflow:[{overflow:we()}],"overflow-x":[{"overflow-x":we()}],"overflow-y":[{"overflow-y":we()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qr,ae]}],basis:[{basis:Ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",qr,ae]}],"grid-cols":[{"grid-cols":[Zr]}],"col-start-end":[{col:["auto",{span:["full",qr,ae]},ae]}],"col-start":[{"col-start":je()}],"col-end":[{"col-end":je()}],"grid-rows":[{"grid-rows":[Zr]}],"row-start-end":[{row:["auto",{span:[qr,ae]},ae]}],"row-start":[{"row-start":je()}],"row-end":[{"row-end":je()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[H]}],px:[{px:[H]}],py:[{py:[H]}],ps:[{ps:[H]}],pe:[{pe:[H]}],pt:[{pt:[H]}],pr:[{pr:[H]}],pb:[{pb:[H]}],pl:[{pl:[H]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,u]}],"min-w":[{"min-w":[ae,u,"min","max","fit"]}],"max-w":[{"max-w":[ae,u,"none","full","min","max","fit","prose",{screen:[sn]},sn]}],h:[{h:[ae,u,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,u,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,u,"auto","min","max","fit"]}],"font-size":[{text:["base",sn,ln]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zs]}],"font-family":[{font:[Zr]}],"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",ae]}],"line-clamp":[{"line-clamp":["none",ir,zs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",At,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[o]}],"placeholder-opacity":[{"placeholder-opacity":[U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[o]}],"text-opacity":[{"text-opacity":[U]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",At,ln]}],"underline-offset":[{"underline-offset":["auto",At,ae]}],"text-decoration-color":[{decoration:[o]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ie()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],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",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[U]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ie(),kg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Eg]}],"bg-color":[{bg:[o]}],"gradient-from-pos":[{from:[$]}],"gradient-via-pos":[{via:[$]}],"gradient-to-pos":[{to:[$]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[p]}],"rounded-s":[{"rounded-s":[p]}],"rounded-e":[{"rounded-e":[p]}],"rounded-t":[{"rounded-t":[p]}],"rounded-r":[{"rounded-r":[p]}],"rounded-b":[{"rounded-b":[p]}],"rounded-l":[{"rounded-l":[p]}],"rounded-ss":[{"rounded-ss":[p]}],"rounded-se":[{"rounded-se":[p]}],"rounded-ee":[{"rounded-ee":[p]}],"rounded-es":[{"rounded-es":[p]}],"rounded-tl":[{"rounded-tl":[p]}],"rounded-tr":[{"rounded-tr":[p]}],"rounded-br":[{"rounded-br":[p]}],"rounded-bl":[{"rounded-bl":[p]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[U]}],"border-style":[{border:[...be(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[U]}],"divide-style":[{divide:be()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...be()]}],"outline-offset":[{"outline-offset":[At,ae]}],"outline-w":[{outline:[At,ln]}],"outline-color":[{outline:[o]}],"ring-w":[{ring:Oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[o]}],"ring-opacity":[{"ring-opacity":[U]}],"ring-offset-w":[{"ring-offset":[At,ln]}],"ring-offset-color":[{"ring-offset":[o]}],shadow:[{shadow:["","inner","none",sn,Cg]}],"shadow-color":[{shadow:[Zr]}],opacity:[{opacity:[U]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[a]}],contrast:[{contrast:[C]}],"drop-shadow":[{"drop-shadow":["","none",sn,ae]}],grayscale:[{grayscale:[E]}],"hue-rotate":[{"hue-rotate":[k]}],invert:[{invert:[b]}],saturate:[{saturate:[te]}],sepia:[{sepia:[oe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[C]}],"backdrop-grayscale":[{"backdrop-grayscale":[E]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[k]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[U]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[g]}],"border-spacing-x":[{"border-spacing-x":[g]}],"border-spacing-y":[{"border-spacing-y":[g]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:S()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:S()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Z]}],"scale-x":[{"scale-x":[Z]}],"scale-y":[{"scale-y":[Z]}],rotate:[{rotate:[qr,ae]}],"translate-x":[{"translate-x":[xe]}],"translate-y":[{"translate-y":[xe]}],"skew-x":[{"skew-x":[ne]}],"skew-y":[{"skew-y":[ne]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",o]}],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",ae]}],"caret-color":[{caret:[o]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ie()}],"scroll-mx":[{"scroll-mx":ie()}],"scroll-my":[{"scroll-my":ie()}],"scroll-ms":[{"scroll-ms":ie()}],"scroll-me":[{"scroll-me":ie()}],"scroll-mt":[{"scroll-mt":ie()}],"scroll-mr":[{"scroll-mr":ie()}],"scroll-mb":[{"scroll-mb":ie()}],"scroll-ml":[{"scroll-ml":ie()}],"scroll-p":[{"scroll-p":ie()}],"scroll-px":[{"scroll-px":ie()}],"scroll-py":[{"scroll-py":ie()}],"scroll-ps":[{"scroll-ps":ie()}],"scroll-pe":[{"scroll-pe":ie()}],"scroll-pt":[{"scroll-pt":ie()}],"scroll-pr":[{"scroll-pr":ie()}],"scroll-pb":[{"scroll-pb":ie()}],"scroll-pl":[{"scroll-pl":ie()}],"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",ae]}],fill:[{fill:[o,"none"]}],"stroke-w":[{stroke:[At,ln,zs]}],stroke:[{stroke:[o,"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"]}}},Pg=cg(_g);function ot(...o){return Pg(qv(o))}function Sd(o){return o?`${(o/1024**3).toFixed(1)} GB`:""}function Rg(o){if(!o)return"";const u=Math.floor(o/60);return u>0?`${u} min`:`${o} s`}function Mg(){const[o,u]=h.useState([]);h.useEffect(()=>{const d=()=>ye("/api/jobs").then(g=>u(g.jobs)).catch(()=>{});d();const p=setInterval(d,2e3);return()=>clearInterval(p)},[]);const s=o.filter(d=>d.state==="running"||d.state==="queued"),a=o.filter(d=>d.state!=="running"&&d.state!=="queued").slice(-3);return s.length===0&&a.length===0?null:f.jsxs("div",{className:"space-y-2 rounded-xl border border-border bg-card p-3",children:[f.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:"Downloads"}),s.map(d=>f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex justify-between text-xs",children:[f.jsx("span",{className:"truncate",children:d.label}),f.jsxs("span",{className:"text-muted-foreground",children:[d.progress??0,"% · ",Sd(d.done_bytes),"/",Sd(d.total_bytes),d.eta_s?` · ETA ${Rg(d.eta_s)}`:""]})]}),f.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:f.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${d.progress??0}%`}})})]},d.id)),a.map(d=>f.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[f.jsx("span",{className:"truncate",children:d.label}),f.jsx("span",{className:d.state==="done"?"text-emerald-500":"text-amber-500",children:d.state})]},d.id))]})}function Tg(o){if(!o)return"—";const u=o/1024**3;return u>=1?`${u.toFixed(1)} GB`:`${(o/1024**2).toFixed(0)} MB`}function Lg(o){return o?`${Math.round(o/1024)}k`:"—"}function Og({fit:o}){const u={perfect:"bg-emerald-500/15 text-emerald-500",marginal:"bg-amber-500/15 text-amber-500",too_tight:"bg-red-500/15 text-red-500"}[o.level];return f.jsxs("span",{className:ot("rounded px-1.5 py-0.5 text-[11px] font-medium",u),children:[o.text," · ~",o.req_gb," GB"]})}const Ig=["","fast","heavy","coder","reasoning","agent","vision","scout"];function Dg(){const[o,u]=h.useState([]),[s,a]=h.useState(""),[d,p]=h.useState(!0);function g(){ye("/api/models").then(k=>u(k.models)).catch(k=>a(String(k))).finally(()=>p(!1))}h.useEffect(g,[]);async function m(k,b){await ye(`/api/models/${encodeURIComponent(k)}/role`,{method:"POST",body:JSON.stringify({role:b||null})}),g()}async function C(k,b){const M=prompt("Kontextlänge (Tokens):",String(b||32768));M&&(await ye(`/api/models/${encodeURIComponent(k)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(M,10)})}),g())}async function E(k){confirm(`Modell '${k}' aus der Config entfernen? (GGUF-Datei bleibt)`)&&(await ye(`/api/models/${encodeURIComponent(k)}`,{method:"DELETE"}),g())}return d?f.jsx("div",{className:"text-sm text-muted-foreground",children:"Lade…"}):s?f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Engine nicht erreichbar oder keine Config gefunden (",s,")."]}):f.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[f.jsx("th",{className:"px-4 py-2 font-medium",children:"Modell"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Rolle"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Fähigkeiten"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Kontext"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Größe"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"Aktionen"})]})}),f.jsxs("tbody",{children:[o.length===0&&f.jsx("tr",{children:f.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-muted-foreground",children:"Keine Modelle konfiguriert."})}),o.map(k=>f.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[f.jsx("td",{className:"px-4 py-2.5 font-medium",children:k.name}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx("select",{value:k.role||"",onChange:b=>m(k.name,b.target.value),className:"rounded-md border border-border bg-background px-1.5 py-1 text-xs outline-none",title:"Rolle/Alias setzen (so tauschst du z.B. das fast-Hirn)",children:Ig.map(b=>f.jsx("option",{value:b,children:b||"—"},b))})}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx(cf,{caps:k.capabilities})}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsxs("button",{onClick:()=>C(k.name,k.ctx),className:"text-muted-foreground hover:text-foreground",title:"Kontext ändern",children:[Lg(k.ctx)," ✎"]})}),f.jsx("td",{className:"px-4 py-2.5 text-muted-foreground",children:Tg(k.size_bytes)}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx("button",{onClick:()=>E(k.name),className:"text-muted-foreground hover:text-red-500",title:"Aus Config entfernen",children:"🗑"})})]},k.name))]})]})})}function zg(){const[o,u]=h.useState(""),[s,a]=h.useState([]),[d,p]=h.useState("Q4_K_M"),[g,m]=h.useState(""),[C,E]=h.useState(""),[k,b]=h.useState([]);async function M(_){const R=_??o;if(R.trim()){m("Lade Quants…");try{const U=await ye(`/api/hf/quants?repo=${encodeURIComponent(R)}`);u(U.repo),a(U.quants),U.quants.length&&p(U.quants.includes("Q4_K_M")?"Q4_K_M":U.quants[0]),m(U.quants.length?"":"Keine GGUF-Quants gefunden")}catch(U){m(`Fehler: ${U}`)}}}async function T(){if(!C.trim())return;const _=await ye(`/api/hf/search?q=${encodeURIComponent(C)}`);b(_.results)}async function $(){if(o.trim()){m("Installiere…");try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:o,quant:d,jinja:!0})}),m(`Download gestartet: ${o} (${d}) — Fortschritt oben.`)}catch(_){m(`Fehler: ${_}`)}}}return f.jsxs("div",{className:"space-y-3 rounded-xl border border-border bg-card p-4",children:[f.jsx("div",{className:"text-sm font-medium",children:"Eigenes Modell laden (HuggingFace)"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("input",{value:o,onChange:_=>u(_.target.value),placeholder:"HF-URL oder org/repo (z.B. unsloth/Qwen3.6-35B-A3B-GGUF)",className:"min-w-[280px] flex-1 rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsx("button",{onClick:()=>M(),className:"rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:"Quants laden"}),s.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("select",{value:d,onChange:_=>p(_.target.value),className:"rounded-md border border-border bg-background px-2 py-1.5 text-sm",children:s.map(_=>f.jsx("option",{value:_,children:_},_))}),f.jsx("button",{onClick:$,className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Installieren"})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("input",{value:C,onChange:_=>E(_.target.value),onKeyDown:_=>_.key==="Enter"&&T(),placeholder:"HuggingFace durchsuchen (GGUF)…",className:"min-w-[240px] flex-1 rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsx("button",{onClick:T,className:"rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:"Suchen"})]}),k.length>0&&f.jsx("div",{className:"max-h-48 space-y-1 overflow-y-auto",children:k.map(_=>f.jsxs("button",{onClick:()=>{u(_.repo),b([]),E(""),M(_.repo)},className:"flex w-full items-center justify-between rounded-md px-2 py-1 text-left text-xs hover:bg-accent",children:[f.jsx("span",{className:"truncate",children:_.repo}),f.jsxs("span",{className:"text-muted-foreground",children:["↓",_.downloads.toLocaleString()]})]},_.repo))}),g&&f.jsx("div",{className:"text-xs text-muted-foreground",children:g})]})}function Ag(){const[o,u]=h.useState(null),[s,a]=h.useState(""),[d,p]=h.useState(!0),[g,m]=h.useState({});h.useEffect(()=>{ye("/api/discover").then(u).catch(E=>a(String(E))).finally(()=>p(!1))},[]);async function C(E,k,b,M){m(T=>({...T,[E]:"…"}));try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:E,role:k,quant:b,jinja:M})}),m(T=>({...T,[E]:"geladen"}))}catch{m($=>({...$,[E]:"Fehler"}))}}return d?f.jsx("div",{className:"text-sm text-muted-foreground",children:"Suche aktuelle Modelle…"}):s||!o?f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Modell-Quellen gerade nicht erreichbar (",s,")."]}):f.jsxs("div",{className:"space-y-6",children:[f.jsx(zg,{}),f.jsxs("div",{className:"text-xs text-muted-foreground",children:["Live von HuggingFace · Hardware-Fit für ~",o.sys_ram_gb," GB · ⭐ = beste Wahl je Kategorie"]}),o.categories.map(E=>f.jsxs("div",{className:"space-y-2",children:[f.jsx("h3",{className:"text-sm font-semibold",children:E.title}),f.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:E.models.map(k=>f.jsxs("div",{className:"rounded-lg border border-border bg-card p-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[E.recommended===k.repo&&f.jsx("span",{title:"beste Wahl",children:"⭐"}),f.jsx("span",{className:"truncate text-sm font-medium",children:k.name})]}),f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:k.author}),f.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1",children:[f.jsx(cf,{caps:k.caps}),f.jsx(Og,{fit:k.fit})]}),k.fit.level!=="too_tight"&&f.jsxs("button",{onClick:()=>C(k.repo,k.role,k.quant,k.caps.tools!=="no"),disabled:!!g[k.repo],className:"mt-2 flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1 text-xs hover:bg-accent disabled:opacity-60",children:[f.jsx(Om,{className:"h-3.5 w-3.5 text-primary"}),g[k.repo]||"Installieren"]})]},k.repo))})]},E.role))]})}function Fg(){const[o,u]=h.useState("installed");return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Modelle & Routing"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Installierte Modelle (mit Fähigkeiten) und aktuell beste Modelle für deine Hardware."})]}),f.jsx(Mg,{}),f.jsx("div",{className:"inline-flex rounded-lg border border-border bg-card p-0.5 text-sm",children:["installed","discover"].map(s=>f.jsx("button",{onClick:()=>u(s),className:ot("rounded-md px-3 py-1.5 transition-colors",o===s?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:s==="installed"?"Installiert":"Modelle finden"},s))}),o==="installed"?f.jsx(Dg,{}):f.jsx(Ag,{})]})}function Ug(){const[o,u]=h.useState(null),[s,a]=h.useState("");return h.useEffect(()=>{ye("/api/routing").then(u).catch(d=>a(String(d)))},[]),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Routing"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Eingebauter OpenAI-Gateway: ein Endpunkt für alle Tools. ",f.jsx("code",{children:"model: auto"})," = schnell im Alltag (",f.jsx("code",{children:"fast"}),"), wechselt bei komplexen/langen Anfragen auf ",f.jsx("code",{children:"heavy"}),". Gilt für Hermes ",f.jsx("em",{children:"und"})," Vibe Coding."]})]}),s&&f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Gateway-Config nicht lesbar (",s,")."]}),o&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("span",{className:ot("h-2 w-2 rounded-full",o.gateway_reachable?"bg-emerald-500":"bg-amber-500")}),"Gateway ",o.gateway_reachable?"online":"offline",o.endpoint&&f.jsxs("span",{className:"text-muted-foreground",children:["· ",o.endpoint]}),o.heavy_threshold_chars&&f.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:["auto→heavy ab ",o.heavy_threshold_chars," Zeichen"]})]}),f.jsx("div",{className:"overflow-hidden rounded-xl border border-border bg-card",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[f.jsx("th",{className:"px-4 py-2 font-medium",children:"Gateway-Modell"}),f.jsx("th",{className:"px-4 py-2 font-medium",children:"→ Backend (llama-swap)"})]})}),f.jsx("tbody",{children:o.routes.map(d=>f.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[f.jsx("td",{className:"px-4 py-2.5 font-medium",children:d.name}),f.jsx("td",{className:"px-4 py-2.5 font-mono text-xs text-muted-foreground",children:d.target})]},d.name))})]})}),o.fallbacks.length>0&&f.jsxs("div",{className:"rounded-xl border border-border bg-card p-4 text-sm",children:[f.jsx("div",{className:"mb-2 font-medium",children:"Eskalation (Fallbacks)"}),f.jsx("ul",{className:"space-y-1 text-muted-foreground",children:o.fallbacks.map((d,p)=>{const[g,m]=Object.entries(d)[0];return f.jsxs("li",{children:[f.jsx("code",{children:g})," → ",f.jsx("code",{children:m.join(", ")})]},p)})})]})]})]})}function un(o){return(o/1024**3).toFixed(1)}function $g(){const[o,u]=h.useState(null),[s,a]=h.useState("");function d(){ye("/api/maintenance/updates").then(u).catch(()=>{})}h.useEffect(d,[]);async function p(C,E){a(`${E}…`);try{const k=await ye(C,{method:"POST"});a(k.job_id?`${E} gestartet (Job ${k.job_id})`:k.ok?`${E} ✓`:`${E}: ${k.err||"?"}`)}catch(k){a(`${E}: ${k}`)}}async function g(C){a(`Restart ${C}…`);try{const E=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:C})});a(E.ok?`Restart ${C} ✓`:`Restart ${C}: ${E.err||"?"}`)}catch(E){a(`Restart ${C}: ${E}`)}}async function m(C,E){a(`Lade ${C}…`);try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:C,role:E,quant:"Q4_K_M",jinja:!0})}),a(`Upgrade ${C} gestartet`)}catch(k){a(`Fehler: ${k}`)}}return f.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[f.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-medium",children:"Wartung & Updates"}),o&&f.jsxs("span",{className:"flex gap-2 text-xs",children:[f.jsxs("span",{className:ot("rounded px-1.5 py-0.5",o.os?"bg-amber-500/15 text-amber-500":"bg-muted text-muted-foreground"),children:["OS: ",o.os]}),f.jsxs("span",{className:ot("rounded px-1.5 py-0.5",o.engine?"bg-amber-500/15 text-amber-500":"bg-muted text-muted-foreground"),children:["Engine: ",o.engine?"neu":"aktuell"]}),f.jsxs("span",{className:ot("rounded px-1.5 py-0.5",o.models?"bg-primary/15 text-primary":"bg-muted text-muted-foreground"),children:["Modelle: ",o.models]})]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2 text-sm",children:[f.jsx("button",{onClick:()=>p("/api/maintenance/os-update","OS-Update"),className:"rounded-md border border-border px-2.5 py-1.5 hover:bg-accent",children:"OS aktualisieren"}),f.jsx("button",{onClick:()=>p("/api/maintenance/engine-update","Engine-Update"),className:"rounded-md border border-border px-2.5 py-1.5 hover:bg-accent",children:"Engine aktualisieren"}),f.jsxs("button",{onClick:()=>g("llama-swap"),className:"flex items-center gap-1 rounded-md border border-border px-2.5 py-1.5 hover:bg-accent",children:[f.jsx(zm,{className:"h-3.5 w-3.5"})," Engine neu starten"]}),f.jsx("button",{onClick:()=>{confirm("Box wirklich neu starten?")&&p("/api/maintenance/reboot","Reboot")},className:"rounded-md border border-border px-2.5 py-1.5 text-amber-500 hover:bg-accent",children:"Reboot"})]}),o&&o.model_list.length>0&&f.jsxs("div",{className:"mt-3 space-y-1",children:[f.jsx("div",{className:"text-xs text-muted-foreground",children:"Modell-Upgrades verfügbar:"}),o.model_list.map(C=>f.jsxs("div",{className:"flex items-center justify-between text-xs",children:[f.jsxs("span",{className:"truncate",children:[f.jsx("span",{className:"text-primary",children:C.role})," · ",C.repo]}),f.jsx("button",{onClick:()=>m(C.repo,C.role),className:"rounded-md border border-border px-2 py-0.5 hover:bg-accent",children:"Upgrade"})]},C.repo))]}),s&&f.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:s}),f.jsx("div",{className:"mt-2 text-[11px] text-muted-foreground",children:"OS-Update/Reboot brauchen einmalig erweiterte NOPASSWD-sudoers (siehe BEDIENUNG/CUTOVER)."})]})}function kl({label:o,percent:u,detail:s}){return f.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[f.jsxs("div",{className:"flex items-baseline justify-between",children:[f.jsx("span",{className:"text-sm font-medium",children:o}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[Math.round(u),"%"]})]}),f.jsx("div",{className:"mt-2 h-2 overflow-hidden rounded-full bg-muted",children:f.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(u,100)}%`}})}),s&&f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Bg(){const[o,u]=h.useState(null),[s,a]=h.useState(null),[d,p]=h.useState(""),[g,m]=h.useState("");h.useEffect(()=>{const E=()=>{ye("/api/system/status").then(u).catch(b=>p(String(b))),ye("/api/system/services").then(a).catch(()=>{})};E();const k=setInterval(E,3e3);return()=>clearInterval(k)},[]);async function C(){m("…");try{const E=await ye("/api/system/backup",{method:"POST"});m(E.ok?`Snapshot ${E.snapshot} (${E.files.length} Dateien)`:"Nichts zu sichern")}catch(E){m(`Fehler: ${E}`)}}return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"System"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Live-Auslastung der Box, Dienste & Updates."})]}),d&&f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["System-Status nicht lesbar (",d,")."]}),o&&f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsx(kl,{label:"CPU",percent:o.cpu.percent,detail:o.cpu.cores?`${o.cpu.cores} Kerne`:void 0}),f.jsx(kl,{label:"RAM",percent:o.ram.percent,detail:`${un(o.ram.used)} / ${un(o.ram.total)} GB`}),o.gpu&&o.gpu.busy_percent!=null&&f.jsx(kl,{label:"GPU",percent:o.gpu.busy_percent,detail:o.gpu.gtt_used!=null&&o.gpu.gtt_total?`${un(o.gpu.gtt_used)} / ${un(o.gpu.gtt_total)} GB (GTT/unified)`:o.gpu.vram_used!=null&&o.gpu.vram_total?`${un(o.gpu.vram_used)} / ${un(o.gpu.vram_total)} GB VRAM`:void 0}),o.disk&&f.jsx(kl,{label:"Disk (Modelle)",percent:o.disk.percent,detail:`${un(o.disk.used)} / ${un(o.disk.total)} GB`})]}),(o==null?void 0:o.temp)&&(o.temp.cpu||o.temp.gpu)&&f.jsxs("div",{className:"flex gap-3 text-sm text-muted-foreground",children:[o.temp.cpu!=null&&f.jsxs("span",{children:["CPU ",o.temp.cpu," °C"]}),o.temp.gpu!=null&&f.jsxs("span",{children:["GPU ",o.temp.gpu," °C"]})]}),s&&f.jsxs("div",{className:"rounded-xl border border-border bg-card p-4",children:[f.jsx("div",{className:"mb-3 text-sm font-medium",children:"Dienste"}),f.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:s.services.map(E=>f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("span",{className:ot("h-2 w-2 rounded-full",E.ok?"bg-emerald-500":"bg-amber-500")}),f.jsx("span",{children:E.name}),f.jsx("span",{className:"ml-auto font-mono text-xs text-muted-foreground",children:E.url})]},E.name))}),f.jsxs("div",{className:"mt-3 flex flex-wrap gap-3 text-xs",children:[f.jsxs("a",{href:s.links.engine_ui,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[f.jsx(Fs,{className:"h-3 w-3"})," Engine-Logs (llama-swap /ui)"]}),f.jsxs("a",{href:s.links.gateway,target:"_blank",rel:"noopener",className:"flex items-center gap-1 text-primary hover:underline",children:[f.jsx(Fs,{className:"h-3 w-3"})," Gateway"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{onClick:C,className:"flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-sm hover:bg-accent",children:[f.jsx(Fm,{className:"h-3.5 w-3.5 text-primary"})," Backup jetzt"]}),g&&f.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),f.jsx($g,{})]})}function Vg(){const[o,u]=h.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[s,a]=h.useState(null),[d,p]=h.useState("cline"),[g,m]=h.useState(!1),[C,E]=h.useState("");h.useEffect(()=>{ye(`/api/connect?host=${encodeURIComponent(o)}`).then(a).catch(T=>E(String(T)))},[o]);function k(T){u(T),T&&localStorage.setItem("mc_host",T)}const b=s==null?void 0:s.tools[d];async function M(){b&&(await navigator.clipboard.writeText(b.snippet),m(!0),setTimeout(()=>m(!1),1500))}return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Verbinden"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Fertige Snippets für deine Tools auf dem lokalen PC — alle zeigen auf den Gateway der Box (",f.jsx("code",{children:"model: auto"}),") + das geteilte Gedächtnis."]})]}),f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx("label",{className:"text-muted-foreground",children:"Box-LAN-IP:"}),f.jsx("input",{value:o,onChange:T=>k(T.target.value),className:"rounded-md border border-border bg-card px-2 py-1 font-mono text-xs outline-none focus:ring-2 focus:ring-ring"}),s&&f.jsxs("span",{className:"text-xs text-muted-foreground",children:["→ ",s.gateway_url]})]}),C&&f.jsxs("div",{className:"rounded-md border border-border bg-card p-3 text-sm text-muted-foreground",children:["Snippets nicht ladbar (",C,")."]}),s&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex flex-wrap gap-1",children:Object.entries(s.tools).map(([T,$])=>f.jsx("button",{onClick:()=>p(T),className:ot("rounded-md px-3 py-1.5 text-sm transition-colors",d===T?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:$.label},T))}),b&&f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-xs text-muted-foreground",children:b.note}),f.jsxs("button",{onClick:M,className:"flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-accent",children:[g?f.jsx(Pm,{className:"h-3.5 w-3.5 text-emerald-500"}):f.jsx(Tm,{className:"h-3.5 w-3.5"}),g?"Kopiert":"Kopieren"]})]}),f.jsx("pre",{className:"overflow-x-auto rounded-xl border border-border bg-card p-4 text-xs leading-relaxed",children:f.jsx("code",{children:b.snippet})})]})]})]})}const Ed=["user","instruction","stable","versioned","ephemeral"],As={user:"👤 User",instruction:"📋 Regel",stable:"🔵 Fakt",versioned:"🟡 Version",ephemeral:"⏱ Temporär"};function Wg(){const[o,u]=h.useState([]),[s,a]=h.useState(""),[d,p]=h.useState(""),[g,m]=h.useState(""),[C,E]=h.useState("stable"),[k,b]=h.useState("");function M(){const R=new URLSearchParams;d&&R.set("q",d),s&&R.set("category",s),ye(`/api/memory?${R}`).then(u).catch(U=>b(String(U)))}h.useEffect(M,[d,s]);async function T(){g.trim()&&(await ye("/api/memory",{method:"POST",body:JSON.stringify({content:g,category:C,source:"ui"})}),m(""),M())}async function $(R){await ye(`/api/memory/${R}`,{method:"DELETE"}),M()}async function _(){const R=await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(R.duplicate_count===0){alert("Keine Dubletten gefunden — alles sauber.");return}confirm(`${R.duplicate_count} Dublette(n) in ${R.groups.length} Gruppe(n) gefunden. Entfernen?`)&&(await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),M())}return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Gedächtnis"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:'Die geteilte „Verfassung" — alle Tools (Hermes, IDEs) lesen/schreiben hier via MCP.'})]}),f.jsxs("button",{onClick:_,className:"flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-sm hover:bg-accent",children:[f.jsx(Um,{className:"h-3.5 w-3.5 text-primary"})," Aufräumen"]})]}),f.jsxs("div",{className:"rounded-xl border border-border bg-card p-3",children:[f.jsx("textarea",{value:g,onChange:R=>m(R.target.value),placeholder:"Neuen Fakt / Regel hinzufügen…",rows:2,className:"w-full resize-none rounded-md border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx("select",{value:C,onChange:R=>E(R.target.value),className:"rounded-md border border-border bg-background px-2 py-1.5 text-sm outline-none",children:Ed.map(R=>f.jsx("option",{value:R,children:As[R]},R))}),f.jsx("button",{onClick:T,className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:opacity-90",children:"Speichern"})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("input",{value:d,onChange:R=>p(R.target.value),placeholder:"Suchen…",className:"rounded-md border border-border bg-card px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring"}),f.jsx("button",{onClick:()=>a(""),className:ot("rounded-md px-2.5 py-1.5 text-xs",s?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary"),children:"Alle"}),Ed.map(R=>f.jsx("button",{onClick:()=>a(R),className:ot("rounded-md px-2.5 py-1.5 text-xs",s===R?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground"),children:As[R]},R))]}),k&&f.jsxs("div",{className:"text-sm text-muted-foreground",children:["Fehler: ",k]}),f.jsxs("div",{className:"space-y-2",children:[o.length===0&&f.jsx("div",{className:"text-sm text-muted-foreground",children:"Keine Einträge."}),o.map(R=>f.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-border bg-card p-3",children:[f.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground",children:As[R.category]||R.category}),f.jsx("span",{className:"flex-1 text-sm",children:R.content}),f.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:R.source}),f.jsx("button",{onClick:()=>$(R.id),className:"shrink-0 text-muted-foreground hover:text-red-500",children:f.jsx(Bm,{className:"h-4 w-4"})})]},R.id))]})]})}function Hg({ok:o}){return f.jsx("span",{className:ot("h-2 w-2 rounded-full",o?"bg-emerald-500":"bg-amber-500")})}function Sl({label:o,ok:u,detail:s}){return f.jsxs("div",{className:"rounded-lg border border-border bg-card p-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Hg,{ok:u}),f.jsx("span",{className:"text-sm font-medium",children:o})]}),s&&f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function Gg(){const[o,u]=h.useState(null),[s,a]=h.useState("");return h.useEffect(()=>{const d=()=>ye("/api/agent/status").then(u).catch(g=>a(String(g)));d();const p=setInterval(d,8e3);return()=>clearInterval(p)},[]),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:"Hermes"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Der autonome Agent läuft eigenständig (Gateway :8642) und hat seine eigene Oberfläche (hermes-webui :8787). Mission Control verlinkt nur — Chat & Steuerung leben dort."})]}),(o==null?void 0:o.webui_url)&&f.jsxs("a",{href:o.webui_url,target:"_blank",rel:"noopener",className:ot("flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium",o.webui_reachable?"bg-primary text-primary-foreground hover:opacity-90":"border border-border text-muted-foreground"),children:[f.jsx(Fs,{className:"h-4 w-4"})," Hermes öffnen"]})]}),s&&f.jsxs("div",{className:"text-sm text-muted-foreground",children:["Status nicht lesbar (",s,")."]}),o&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[f.jsx(Sl,{label:"Gateway (:8642)",ok:o.gateway_reachable,detail:o.gateway_reachable?"erreichbar":"offline"}),f.jsx(Sl,{label:"WebUI (:8787)",ok:o.webui_reachable,detail:o.webui_reachable?"erreichbar":"offline"}),f.jsx(Sl,{label:"Brain",ok:o.gateway_reachable,detail:"model: auto (über Gateway)"}),f.jsx(Sl,{label:"Verdrahtung",ok:o.has_config,detail:`config ${o.has_config?"✓":"—"} · skills ${o.has_skills?"✓":"—"} · memories ${o.has_memories?"✓":"—"}`})]}),!o.gateway_reachable&&f.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-card/50 p-5 text-sm",children:[f.jsx("div",{className:"mb-2 font-medium",children:"Hermes ist (hier) offline"}),f.jsxs("p",{className:"text-muted-foreground",children:["Der Agent + hermes-webui laufen auf der Box. Einrichtung & volle Verdrahtung (Brain = ",f.jsx("code",{children:"model: auto"}),", Tools/MCP inkl. ",f.jsx("code",{children:"mcp_mc"})," + ",f.jsx("code",{children:"mcp_memory"}),", SSH→Windows, lokale Browser-/Such-MCP) sind im Runbook beschrieben:",f.jsx("code",{className:"ml-1",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]})}function Qg({title:o,hint:u}){return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-xl font-semibold",children:o}),f.jsx("p",{className:"text-sm text-muted-foreground",children:u})]}),f.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:[f.jsx(Mm,{className:"h-8 w-8 text-muted-foreground"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}function Kg(){const[o,u]=h.useState("models"),[s,a]=h.useState(null),[d,p]=h.useState(()=>localStorage.getItem("mc_theme")!=="light");h.useEffect(()=>{const m=()=>ye("/api/health").then(a).catch(()=>a(null));m();const C=setInterval(m,1e4);return()=>clearInterval(C)},[]),h.useEffect(()=>{document.documentElement.classList.toggle("dark",d),localStorage.setItem("mc_theme",d?"dark":"light")},[d]);const g=Us.find(m=>m.id===o);return f.jsxs("div",{className:"flex h-full",children:[f.jsx(Xv,{onNavigate:u}),f.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-card/40",children:[f.jsxs("div",{className:"flex items-center gap-2 px-5 py-4",children:[f.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary"}),f.jsxs("div",{className:"leading-tight",children:[f.jsx("div",{className:"text-sm font-semibold",children:"Mission Control"}),f.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),f.jsx("nav",{className:"flex-1 space-y-1 px-3 py-2",children:Us.map(m=>f.jsxs("button",{onClick:()=>u(m.id),className:ot("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",o===m.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[f.jsx(m.icon,{className:"h-4 w-4"}),m.label]},m.id))}),f.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:s?f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx("span",{className:ot("h-2 w-2 rounded-full",s.engine_reachable?"bg-emerald-500":"bg-amber-500")}),"Engine ",s.engine_reachable?"online":"offline"," · v",s.version]}):f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," Backend offline"]})})]}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border px-6",children:[f.jsx("div",{className:"text-sm text-muted-foreground",children:g.hint}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.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 px-2 text-xs text-muted-foreground hover:bg-accent",title:"Bedien-Anleitung",children:"Hilfe"}),f.jsx("button",{onClick:()=>p(m=>!m),className:"flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-accent",title:"Hell/Dunkel",children:d?f.jsx($m,{className:"h-3.5 w-3.5"}):f.jsx(Im,{className:"h-3.5 w-3.5"})}),f.jsxs("button",{onClick:()=>{const m=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(m)},className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent",children:[f.jsx(Rm,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:"Springen"}),f.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:"⌘K"})]})]})]}),f.jsxs("main",{className:"flex-1 overflow-y-auto p-6",children:[o==="models"&&f.jsx(Fg,{}),o==="routing"&&f.jsx(Ug,{}),o==="system"&&f.jsx(Bg,{}),o==="connect"&&f.jsx(Vg,{}),o==="memory"&&f.jsx(Wg,{}),o==="agent"&&f.jsx(Gg,{}),!["models","routing","system","connect","memory","agent"].includes(o)&&f.jsx(Qg,{title:g.label,hint:g.hint})]})]})]})}Sm.createRoot(document.getElementById("root")).render(f.jsx(Nd.StrictMode,{children:f.jsx(Kg,{})}));