const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemDrawer-TPlJzWjm.js","assets/refresh-cw-C3saW9zg.js","assets/file-text-Bdam-Njc.js","assets/search-CKPXZNvI.js","assets/shield-DNyHWe3b.js","assets/circle-check-Crmfz00W.js","assets/arrow-right-D09OliuI.js","assets/clock-uyqKk7Jn.js","assets/external-link-P1_1JELD.js","assets/power-BF5yiJ4i.js","assets/CommandPalette-Bzgk4pnl.js","assets/index-wthGkuS_.js","assets/LiveAreaChartImpl-CGtRHSfm.js","assets/string-DoZi9Vij.js","assets/ModelsView-BM7QJHLl.js","assets/JobsBar-D2vfhT2b.js","assets/code-xml-D7ACEH7O.js","assets/zap-CsukfbMs.js","assets/chevron-down-BGRm8kVZ.js","assets/layers-y2iqT_Gl.js","assets/ConnectView-1pPeysE2.js","assets/AgentView-B0wsg8uQ.js","assets/KonsoleView-50ZTmnVb.js","assets/GuideView-DYdOo_ra.js","assets/AuftragsbuchView-Ca4tUml_.js","assets/SectionLabel-CS0KgrzT.js","assets/IdeenView-C8BKiJHT.js","assets/SkillsView-BPaqT2zI.js","assets/WissenView-zIpzRZKj.js"])))=>i.map(i=>d[i]); var lv=Object.defineProperty;var Ih=n=>{throw TypeError(n)};var av=(n,r,i)=>r in n?lv(n,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[r]=i;var dl=(n,r,i)=>av(n,typeof r!="symbol"?r+"":r,i),Mu=(n,r,i)=>r.has(n)||Ih("Cannot "+i);var P=(n,r,i)=>(Mu(n,r,"read from private field"),i?i.call(n):r.get(n)),ce=(n,r,i)=>r.has(n)?Ih("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,i),ne=(n,r,i,l)=>(Mu(n,r,"write to private field"),l?l.call(n,i):r.set(n,i),i),xe=(n,r,i)=>(Mu(n,r,"access private method"),i);var fl=(n,r,i,l)=>({set _(a){ne(n,r,a,i)},get _(){return P(n,r,l)}});function uv(n,r){for(var i=0;il[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const c of a)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function i(a){const c={};return a.integrity&&(c.integrity=a.integrity),a.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?c.credentials="include":a.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(a){if(a.ep)return;a.ep=!0;const c=i(a);fetch(a.href,c)}})();function qp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tu={exports:{}},Ri={},Iu={exports:{}},ve={};/** * @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 Dh;function cv(){if(Dh)return ve;Dh=1;var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=y&&R[y]||R["@@iterator"],typeof R=="function"?R:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function C(R,A,pe){this.props=R,this.context=A,this.refs=b,this.updater=pe||k}C.prototype.isReactComponent={},C.prototype.setState=function(R,A){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,A,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function L(){}L.prototype=C.prototype;function N(R,A,pe){this.props=R,this.context=A,this.refs=b,this.updater=pe||k}var F=N.prototype=new L;F.constructor=N,S(F,C.prototype),F.isPureReactComponent=!0;var I=Array.isArray,U=Object.prototype.hasOwnProperty,O={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function Q(R,A,pe){var ge,ke={},ye=null,Re=null;if(A!=null)for(ge in A.ref!==void 0&&(Re=A.ref),A.key!==void 0&&(ye=""+A.key),A)U.call(A,ge)&&!Y.hasOwnProperty(ge)&&(ke[ge]=A[ge]);var Ee=arguments.length-2;if(Ee===1)ke.children=pe;else if(1>>1,A=V[R];if(0>>1;Ra(ke,X))yea(Re,ke)?(V[R]=Re,V[ye]=X,R=ye):(V[R]=ke,V[ge]=X,R=ge);else if(yea(Re,X))V[R]=Re,V[ye]=X,R=ye;else break e}}return oe}function a(V,oe){var X=V.sortIndex-oe.sortIndex;return X!==0?X:V.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],x=1,y=null,w=3,k=!1,S=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(V){for(var oe=i(m);oe!==null;){if(oe.callback===null)l(m);else if(oe.startTime<=V)l(m),oe.sortIndex=oe.expirationTime,r(p,oe);else break;oe=i(m)}}function I(V){if(b=!1,F(V),!S)if(i(p)!==null)S=!0,we(U);else{var oe=i(m);oe!==null&&he(I,oe.startTime-V)}}function U(V,oe){S=!1,b&&(b=!1,L(Q),Q=-1),k=!0;var X=w;try{for(F(oe),y=i(p);y!==null&&(!(y.expirationTime>oe)||V&&!J());){var R=y.callback;if(typeof R=="function"){y.callback=null,w=y.priorityLevel;var A=R(y.expirationTime<=oe);oe=n.unstable_now(),typeof A=="function"?y.callback=A:y===i(p)&&l(p),F(oe)}else l(p);y=i(p)}if(y!==null)var pe=!0;else{var ge=i(m);ge!==null&&he(I,ge.startTime-oe),pe=!1}return pe}finally{y=null,w=X,k=!1}}var O=!1,Y=null,Q=-1,z=5,q=-1;function J(){return!(n.unstable_now()-qV||125R?(V.sortIndex=X,r(m,V),i(p)===null&&V===i(m)&&(b?(L(Q),Q=-1):b=!0,he(I,X-R))):(V.sortIndex=A,r(p,V),S||k||(S=!0,we(U))),V},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(V){var oe=w;return function(){var X=w;w=oe;try{return V.apply(this,arguments)}finally{w=X}}}})(zu)),zu}var Uh;function pv(){return Uh||(Uh=1,Fu.exports=hv()),Fu.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 Bh;function mv(){if(Bh)return vt;Bh=1;var n=Xi(),r=pv();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,x={},y={};function w(e){return p.call(y,e)?!0:p.call(x,e)?!1:m.test(e)?y[e]=!0:(x[e]=!0,!1)}function k(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S(e,t,s,o){if(t===null||typeof t>"u"||k(e,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.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 b(e,t,s,o,u,d,g){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=g}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];C[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new b(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){C[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function N(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(L,N);C[t]=new b(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(L,N);C[t]=new b(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(L,N);C[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,s,o){var u=C.hasOwnProperty(t)?C[t]:null;(u!==null?u.type!==0:o||!(2_||u[g]!==d[_]){var E=` `+u[g].replace(" at new "," at ");return e.displayName&&E.includes("")&&(E=E.replace("",e.displayName)),E}while(1<=g&&0<=_);break}}}finally{pe=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?A(e):""}function ke(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=ge(e.type,!1),e;case 11:return e=ge(e.type.render,!1),e;case 1:return e=ge(e.type,!0),e;default:return""}}function ye(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 Y:return"Fragment";case O:return"Portal";case z:return"Profiler";case Q:return"StrictMode";case de:return"Suspense";case W:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case J:return(e.displayName||"Context")+".Consumer";case q:return(e._context.displayName||"Context")+".Provider";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case we:t=e._payload,e=e._init;try{return ye(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 ye(t);case 8:return t===Q?"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 Ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ne(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tt(e){var t=Ne(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,d=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(g){o=""+g,d.call(this,g)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(g){o=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ln(e){e._valueTracker||(e._valueTracker=tt(e))}function ur(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=Ne(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function cr(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 Hr(e,t){var s=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Vs(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=Ee(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qt(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function dr(e,t){qt(e,t);var s=Ee(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fr(e,t.type,s):t.hasOwnProperty("defaultValue")&&fr(e,t.type,Ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function an(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function fr(e,t,s){(t!=="number"||cr(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var hr=Array.isArray;function Cn(e,t,s,o){if(e=e.options,t){t={};for(var u=0;u"+t.valueOf().toString()+"",t=no.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ws(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var Qs={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},dg=["Webkit","ms","Moz","O"];Object.keys(Qs).forEach(function(e){dg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qs[t]=Qs[e]})});function qc(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||Qs.hasOwnProperty(e)&&Qs[e]?(""+t).trim():t+"px"}function Gc(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,u=qc(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,u):e[s]=u}}var fg=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hl(e,t){if(t){if(fg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function Wl(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 Ql=null;function Kl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ql=null,Qr=null,Kr=null;function Yc(e){if(e=pi(e)){if(typeof ql!="function")throw Error(i(280));var t=e.stateNode;t&&(t=Eo(t),ql(e.stateNode,e.type,t))}}function Zc(e){Qr?Kr?Kr.push(e):Kr=[e]:Qr=e}function Xc(){if(Qr){var e=Qr,t=Kr;if(Kr=Qr=null,Yc(e),t)for(e=0;e>>=0,e===0?32:31-(bg(e)/_g|0)|0}var lo=64,ao=4194304;function Ys(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 uo(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,d=e.pingedLanes,g=s&268435455;if(g!==0){var _=g&~u;_!==0?o=Ys(_):(d&=g,d!==0&&(o=Ys(d)))}else g=s&~u,g!==0?o=Ys(g):d!==0&&(o=Ys(d));if(o===0)return 0;if(t!==0&&t!==o&&(t&u)===0&&(u=o&-o,d=t&-t,u>=d||u===16&&(d&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0s;s++)t.push(e);return t}function Zs(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-At(t),e[t]=s}function jg(e,t){var s=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 o=e.eventTimes;for(e=e.expirationTimes;0=ii),Ed=" ",Pd=!1;function jd(e,t){switch(e){case"keyup":return ny.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function sy(e,t){switch(e){case"compositionend":return Rd(t);case"keypress":return t.which!==32?null:(Pd=!0,Ed);case"textInput":return e=t.data,e===Ed&&Pd?null:e;default:return null}}function iy(e,t){if(Yr)return e==="compositionend"||!fa&&jd(e,t)?(e=wd(),mo=oa=Nn=null,Yr=!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:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Fd(s)}}function Od(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Od(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ad(){for(var e=window,t=cr();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=cr(e.document)}return t}function ma(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 py(e){var t=Ad(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&Od(s.ownerDocument.documentElement,s)){if(o!==null&&ma(s)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=s.textContent.length,d=Math.min(o.start,u);o=o.end===void 0?d:Math.min(o.end,u),!e.extend&&d>o&&(u=o,o=d,d=u),u=zd(s,d);var g=zd(s,o);u&&g&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),d>o?(e.addRange(t),e.extend(g.node,g.offset)):(t.setEnd(g.node,g.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,Zr=null,ga=null,ui=null,ya=!1;function Ud(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ya||Zr==null||Zr!==cr(o)||(o=Zr,"selectionStart"in o&&ma(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ui&&ai(ui,o)||(ui=o,o=bo(ga,"onSelect"),0ns||(e.current=Ra[ns],Ra[ns]=null,ns--)}function Me(e,t){ns++,Ra[ns]=e.current,e.current=t}var In={},it=Tn(In),ht=Tn(!1),gr=In;function rs(e,t){var s=e.type.contextTypes;if(!s)return In;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var u={},d;for(d in s)u[d]=t[d];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function pt(e){return e=e.childContextTypes,e!=null}function Po(){Ie(ht),Ie(it)}function tf(e,t,s){if(it.current!==In)throw Error(i(168));Me(it,t),Me(ht,s)}function nf(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var u in o)if(!(u in t))throw Error(i(108,Re(e)||"Unknown",u));return X({},s,o)}function jo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||In,gr=it.current,Me(it,e),Me(ht,ht.current),!0}function rf(e,t,s){var o=e.stateNode;if(!o)throw Error(i(169));s?(e=nf(e,t,gr),o.__reactInternalMemoizedMergedChildContext=e,Ie(ht),Ie(it),Me(it,e)):Ie(ht),Me(ht,s)}var cn=null,Ro=!1,Na=!1;function sf(e){cn===null?cn=[e]:cn.push(e)}function Ey(e){Ro=!0,sf(e)}function Dn(){if(!Na&&cn!==null){Na=!0;var e=0,t=je;try{var s=cn;for(je=1;e>=g,u-=g,dn=1<<32-At(t)+u|s<fe?(Je=ue,ue=null):Je=ue.sibling;var Ce=B(M,ue,T[fe],G);if(Ce===null){ue===null&&(ue=Je);break}e&&ue&&Ce.alternate===null&&t(M,ue),j=d(Ce,j,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce,ue=Je}if(fe===T.length)return s(M,ue),ze&&vr(M,fe),le;if(ue===null){for(;fefe?(Je=ue,ue=null):Je=ue.sibling;var Hn=B(M,ue,Ce.value,G);if(Hn===null){ue===null&&(ue=Je);break}e&&ue&&Hn.alternate===null&&t(M,ue),j=d(Hn,j,fe),ae===null?le=Hn:ae.sibling=Hn,ae=Hn,ue=Je}if(Ce.done)return s(M,ue),ze&&vr(M,fe),le;if(ue===null){for(;!Ce.done;fe++,Ce=T.next())Ce=K(M,Ce.value,G),Ce!==null&&(j=d(Ce,j,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce);return ze&&vr(M,fe),le}for(ue=o(M,ue);!Ce.done;fe++,Ce=T.next())Ce=te(ue,M,fe,Ce.value,G),Ce!==null&&(e&&Ce.alternate!==null&&ue.delete(Ce.key===null?fe:Ce.key),j=d(Ce,j,fe),ae===null?le=Ce:ae.sibling=Ce,ae=Ce);return e&&ue.forEach(function(ov){return t(M,ov)}),ze&&vr(M,fe),le}function We(M,j,T,G){if(typeof T=="object"&&T!==null&&T.type===Y&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case U:e:{for(var le=T.key,ae=j;ae!==null;){if(ae.key===le){if(le=T.type,le===Y){if(ae.tag===7){s(M,ae.sibling),j=u(ae,T.props.children),j.return=M,M=j;break e}}else if(ae.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===we&&df(le)===ae.type){s(M,ae.sibling),j=u(ae,T.props),j.ref=mi(M,ae,T),j.return=M,M=j;break e}s(M,ae);break}else t(M,ae);ae=ae.sibling}T.type===Y?(j=Er(T.props.children,M.mode,G,T.key),j.return=M,M=j):(G=rl(T.type,T.key,T.props,null,M.mode,G),G.ref=mi(M,j,T),G.return=M,M=G)}return g(M);case O:e:{for(ae=T.key;j!==null;){if(j.key===ae)if(j.tag===4&&j.stateNode.containerInfo===T.containerInfo&&j.stateNode.implementation===T.implementation){s(M,j.sibling),j=u(j,T.children||[]),j.return=M,M=j;break e}else{s(M,j);break}else t(M,j);j=j.sibling}j=Pu(T,M.mode,G),j.return=M,M=j}return g(M);case we:return ae=T._init,We(M,j,ae(T._payload),G)}if(hr(T))return se(M,j,T,G);if(oe(T))return ie(M,j,T,G);To(M,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,j!==null&&j.tag===6?(s(M,j.sibling),j=u(j,T),j.return=M,M=j):(s(M,j),j=Eu(T,M.mode,G),j.return=M,M=j),g(M)):s(M,j)}return We}var ls=ff(!0),hf=ff(!1),Io=Tn(null),Do=null,as=null,Fa=null;function za(){Fa=as=Do=null}function Oa(e){var t=Io.current;Ie(Io),e._currentValue=t}function Aa(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function us(e,t){Do=e,Fa=as=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(mt=!0),e.firstContext=null)}function It(e){var t=e._currentValue;if(Fa!==e)if(e={context:e,memoizedValue:t,next:null},as===null){if(Do===null)throw Error(i(308));as=e,Do.dependencies={lanes:0,firstContext:e}}else as=as.next=e;return t}var xr=null;function Ua(e){xr===null?xr=[e]:xr.push(e)}function pf(e,t,s,o){var u=t.interleaved;return u===null?(s.next=s,Ua(t)):(s.next=u.next,u.next=s),t.interleaved=s,hn(e,o)}function hn(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Fn=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mf(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 pn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zn(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(be&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,hn(e,s)}return u=o.interleaved,u===null?(t.next=t,Ua(o)):(t.next=u.next,u.next=t),o.interleaved=t,hn(e,s)}function Fo(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,ta(e,s)}}function gf(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,d=null;if(s=s.firstBaseUpdate,s!==null){do{var g={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};d===null?u=d=g:d=d.next=g,s=s.next}while(s!==null);d===null?u=d=t:d=d.next=t}else u=d=t;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function zo(e,t,s,o){var u=e.updateQueue;Fn=!1;var d=u.firstBaseUpdate,g=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var E=_,D=E.next;E.next=null,g===null?d=D:g.next=D,g=E;var $=e.alternate;$!==null&&($=$.updateQueue,_=$.lastBaseUpdate,_!==g&&(_===null?$.firstBaseUpdate=D:_.next=D,$.lastBaseUpdate=E))}if(d!==null){var K=u.baseState;g=0,$=D=E=null,_=d;do{var B=_.lane,te=_.eventTime;if((o&B)===B){$!==null&&($=$.next={eventTime:te,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var se=e,ie=_;switch(B=t,te=s,ie.tag){case 1:if(se=ie.payload,typeof se=="function"){K=se.call(te,K,B);break e}K=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ie.payload,B=typeof se=="function"?se.call(te,K,B):se,B==null)break e;K=X({},K,B);break e;case 2:Fn=!0}}_.callback!==null&&_.lane!==0&&(e.flags|=64,B=u.effects,B===null?u.effects=[_]:B.push(_))}else te={eventTime:te,lane:B,tag:_.tag,payload:_.payload,callback:_.callback,next:null},$===null?(D=$=te,E=K):$=$.next=te,g|=B;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;B=_,_=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);if($===null&&(E=K),u.baseState=E,u.firstBaseUpdate=D,u.lastBaseUpdate=$,t=u.shared.interleaved,t!==null){u=t;do g|=u.lane,u=u.next;while(u!==t)}else d===null&&(u.shared.lanes=0);Sr|=g,e.lanes=g,e.memoizedState=K}}function yf(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;ts?s:4,e(!0);var o=Qa.transition;Qa.transition={};try{e(!1),t()}finally{je=s,Qa.transition=o}}function Ff(){return Dt().memoizedState}function Ny(e,t,s){var o=Bn(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},zf(e))Of(t,s);else if(s=pf(e,t,s,o),s!==null){var u=dt();Wt(s,e,o,u),Af(s,t,o)}}function Ly(e,t,s){var o=Bn(e),u={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(zf(e))Of(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var g=t.lastRenderedState,_=d(g,s);if(u.hasEagerState=!0,u.eagerState=_,Ut(_,g)){var E=t.interleaved;E===null?(u.next=u,Ua(t)):(u.next=E.next,E.next=u),t.interleaved=u;return}}catch{}finally{}s=pf(e,t,u,o),s!==null&&(u=dt(),Wt(s,e,o,u),Af(s,t,o))}}function zf(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function Of(e,t){xi=Uo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Af(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,ta(e,s)}}var Vo={readContext:It,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},My={readContext:It,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:jf,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,Bo(4194308,4,Lf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Bo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bo(4,2,e,t)},useMemo:function(e,t){var s=Jt();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=Jt();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Ny.bind(null,Be,e),[o.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:Ef,useDebugValue:Ja,useDeferredValue:function(e){return Jt().memoizedState=e},useTransition:function(){var e=Ef(!1),t=e[0];return e=Ry.bind(null,e[1]),Jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=Be,u=Jt();if(ze){if(s===void 0)throw Error(i(407));s=s()}else{if(s=t(),Xe===null)throw Error(i(349));(kr&30)!==0||kf(o,t,s)}u.memoizedState=s;var d={value:s,getSnapshot:t};return u.queue=d,jf(bf.bind(null,o,d,e),[e]),o.flags|=2048,Si(9,Sf.bind(null,o,d,s,t),void 0,null),s},useId:function(){var e=Jt(),t=Xe.identifierPrefix;if(ze){var s=fn,o=dn;s=(o&~(1<<32-At(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=wi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=g.createElement(s,{is:o.is}):(e=g.createElement(s),s==="select"&&(g=e,o.multiple?g.multiple=!0:o.size&&(g.size=o.size))):e=g.createElementNS(e,s),e[Zt]=t,e[hi]=o,ih(e,t,!1,!1),t.stateNode=e;e:{switch(g=Wl(s,o),s){case"dialog":Te("cancel",e),Te("close",e),u=o;break;case"iframe":case"object":case"embed":Te("load",e),u=o;break;case"video":case"audio":for(u=0;ups&&(t.flags|=128,o=!0,bi(d,!1),t.lanes=4194304)}else{if(!o)if(e=Oo(g),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),bi(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!ze)return lt(t),null}else 2*He()-d.renderingStartTime>ps&&s!==1073741824&&(t.flags|=128,o=!0,bi(d,!1),t.lanes=4194304);d.isBackwards?(g.sibling=t.child,t.child=g):(s=d.last,s!==null?s.sibling=g:t.child=g,d.last=g)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=He(),t.sibling=null,s=Ue.current,Me(Ue,o?s&1|2:s&1),t):(lt(t),null);case 22:case 23:return bu(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Et&1073741824)!==0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Uy(e,t){switch(Ma(t),t.tag){case 1:return pt(t.type)&&Po(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cs(),Ie(ht),Ie(it),Wa(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Va(t),null;case 13:if(Ie(Ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));os()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ie(Ue),null;case 4:return cs(),null;case 10:return Oa(t.type._context),null;case 22:case 23:return bu(),null;case 24:return null;default:return null}}var Ko=!1,at=!1,By=typeof WeakSet=="function"?WeakSet:Set,re=null;function fs(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){$e(e,t,o)}else s.current=null}function du(e,t,s){try{s()}catch(o){$e(e,t,o)}}var ah=!1;function $y(e,t){if(ba=ho,e=Ad(),ma(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var u=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{s.nodeType,d.nodeType}catch{s=null;break e}var g=0,_=-1,E=-1,D=0,$=0,K=e,B=null;t:for(;;){for(var te;K!==s||u!==0&&K.nodeType!==3||(_=g+u),K!==d||o!==0&&K.nodeType!==3||(E=g+o),K.nodeType===3&&(g+=K.nodeValue.length),(te=K.firstChild)!==null;)B=K,K=te;for(;;){if(K===e)break t;if(B===s&&++D===u&&(_=g),B===d&&++$===o&&(E=g),(te=K.nextSibling)!==null)break;K=B,B=K.parentNode}K=te}s=_===-1||E===-1?null:{start:_,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(_a={focusedElem:e,selectionRange:s},ho=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var se=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var ie=se.memoizedProps,We=se.memoizedState,M=t.stateNode,j=M.getSnapshotBeforeUpdate(t.elementType===t.type?ie:$t(t.type,ie),We);M.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(G){$e(t,t.return,G)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return se=ah,ah=!1,se}function _i(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var d=u.destroy;u.destroy=void 0,d!==void 0&&du(t,s,d)}u=u.next}while(u!==o)}}function qo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function fu(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function uh(e){var t=e.alternate;t!==null&&(e.alternate=null,uh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zt],delete t[hi],delete t[ja],delete t[_y],delete t[Cy])),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 ch(e){return e.tag===5||e.tag===3||e.tag===4}function dh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ch(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 hu(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=Co));else if(o!==4&&(e=e.child,e!==null))for(hu(e,t,s),e=e.sibling;e!==null;)hu(e,t,s),e=e.sibling}function pu(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(pu(e,t,s),e=e.sibling;e!==null;)pu(e,t,s),e=e.sibling}var nt=null,Vt=!1;function On(e,t,s){for(s=s.child;s!==null;)fh(e,t,s),s=s.sibling}function fh(e,t,s){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(oo,s)}catch{}switch(s.tag){case 5:at||fs(s,t);case 6:var o=nt,u=Vt;nt=null,On(e,t,s),nt=o,Vt=u,nt!==null&&(Vt?(e=nt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):nt.removeChild(s.stateNode));break;case 18:nt!==null&&(Vt?(e=nt,s=s.stateNode,e.nodeType===8?Pa(e.parentNode,s):e.nodeType===1&&Pa(e,s),ni(e)):Pa(nt,s.stateNode));break;case 4:o=nt,u=Vt,nt=s.stateNode.containerInfo,Vt=!0,On(e,t,s),nt=o,Vt=u;break;case 0:case 11:case 14:case 15:if(!at&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var d=u,g=d.destroy;d=d.tag,g!==void 0&&((d&2)!==0||(d&4)!==0)&&du(s,t,g),u=u.next}while(u!==o)}On(e,t,s);break;case 1:if(!at&&(fs(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(_){$e(s,t,_)}On(e,t,s);break;case 21:On(e,t,s);break;case 22:s.mode&1?(at=(o=at)||s.memoizedState!==null,On(e,t,s),at=o):On(e,t,s);break;default:On(e,t,s)}}function hh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new By),t.forEach(function(o){var u=Zy.bind(null,e,o);s.has(o)||(s.add(o),o.then(u,u))})}}function Ht(e,t){var s=t.deletions;if(s!==null)for(var o=0;ou&&(u=g),o&=~d}if(o=u,o=He()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Hy(o/1960))-o,10e?16:e,Un===null)var o=!1;else{if(e=Un,Un=null,Jo=0,(be&6)!==0)throw Error(i(331));var u=be;for(be|=4,re=e.current;re!==null;){var d=re,g=d.child;if((re.flags&16)!==0){var _=d.deletions;if(_!==null){for(var E=0;E<_.length;E++){var D=_[E];for(re=D;re!==null;){var $=re;switch($.tag){case 0:case 11:case 15:_i(8,$,d)}var K=$.child;if(K!==null)K.return=$,re=K;else for(;re!==null;){$=re;var B=$.sibling,te=$.return;if(uh($),$===D){re=null;break}if(B!==null){B.return=te,re=B;break}re=te}}}var se=d.alternate;if(se!==null){var ie=se.child;if(ie!==null){se.child=null;do{var We=ie.sibling;ie.sibling=null,ie=We}while(ie!==null)}}re=d}}if((d.subtreeFlags&2064)!==0&&g!==null)g.return=d,re=g;else e:for(;re!==null;){if(d=re,(d.flags&2048)!==0)switch(d.tag){case 0:case 11:case 15:_i(9,d,d.return)}var M=d.sibling;if(M!==null){M.return=d.return,re=M;break e}re=d.return}}var j=e.current;for(re=j;re!==null;){g=re;var T=g.child;if((g.subtreeFlags&2064)!==0&&T!==null)T.return=g,re=T;else e:for(g=j;re!==null;){if(_=re,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:qo(9,_)}}catch(le){$e(_,_.return,le)}if(_===g){re=null;break e}var G=_.sibling;if(G!==null){G.return=_.return,re=G;break e}re=_.return}}if(be=u,Dn(),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(oo,e)}catch{}o=!0}return o}finally{je=s,Ft.transition=t}}return!1}function Ch(e,t,s){t=ds(s,t),t=Vf(e,t,1),e=zn(e,t,1),t=dt(),e!==null&&(Zs(e,1,t),yt(e,t))}function $e(e,t,s){if(e.tag===3)Ch(e,e,s);else for(;t!==null;){if(t.tag===3){Ch(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(An===null||!An.has(o))){e=ds(s,e),e=Hf(t,e,1),t=zn(t,e,1),e=dt(),t!==null&&(Zs(t,1,e),yt(t,e));break}}t=t.return}}function Gy(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=dt(),e.pingedLanes|=e.suspendedLanes&s,Xe===e&&(rt&s)===s&&(Ge===4||Ge===3&&(rt&130023424)===rt&&500>He()-yu?_r(e,0):gu|=s),yt(e,t)}function Eh(e,t){t===0&&((e.mode&1)===0?t=1:(t=ao,ao<<=1,(ao&130023424)===0&&(ao=4194304)));var s=dt();e=hn(e,t),e!==null&&(Zs(e,t,s),yt(e,s))}function Yy(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Eh(e,s)}function Zy(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(s=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(i(314))}o!==null&&o.delete(t),Eh(e,s)}var Ph;Ph=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)mt=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return mt=!1,Oy(e,t,s);mt=(e.flags&131072)!==0}else mt=!1,ze&&(t.flags&1048576)!==0&&of(t,Lo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Qo(e,t),e=t.pendingProps;var u=rs(t,it.current);us(t,s),u=qa(null,t,o,e,u,s);var d=Ga();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(o)?(d=!0,jo(t)):d=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Ba(t),u.updater=Ho,t.stateNode=u,u._reactInternals=t,tu(t,o,e,s),t=iu(null,t,o,!0,d,s)):(t.tag=0,ze&&d&&La(t),ct(null,t,u,s),t=t.child),t;case 16:o=t.elementType;e:{switch(Qo(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=Jy(o),e=$t(o,e),u){case 0:t=su(null,t,o,e,s);break e;case 1:t=Jf(null,t,o,e,s);break e;case 11:t=qf(null,t,o,e,s);break e;case 14:t=Gf(null,t,o,$t(o.type,e),s);break e}throw Error(i(306,o,""))}return t;case 0:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:$t(o,u),su(e,t,o,u,s);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:$t(o,u),Jf(e,t,o,u,s);case 3:e:{if(eh(t),e===null)throw Error(i(387));o=t.pendingProps,d=t.memoizedState,u=d.element,mf(e,t),zo(t,o,null,s);var g=t.memoizedState;if(o=g.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){u=ds(Error(i(423)),t),t=th(e,t,o,s,u);break e}else if(o!==u){u=ds(Error(i(424)),t),t=th(e,t,o,s,u);break e}else for(Ct=Mn(t.stateNode.containerInfo.firstChild),_t=t,ze=!0,Bt=null,s=hf(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(os(),o===u){t=mn(e,t,s);break e}ct(e,t,o,s)}t=t.child}return t;case 5:return vf(t),e===null&&Ia(t),o=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,g=u.children,Ca(o,u)?g=null:d!==null&&Ca(o,d)&&(t.flags|=32),Xf(e,t),ct(e,t,g,s),t.child;case 6:return e===null&&Ia(t),null;case 13:return nh(e,t,s);case 4:return $a(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ls(t,null,o,s):ct(e,t,o,s),t.child;case 11:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:$t(o,u),qf(e,t,o,u,s);case 7:return ct(e,t,t.pendingProps,s),t.child;case 8:return ct(e,t,t.pendingProps.children,s),t.child;case 12:return ct(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,u=t.pendingProps,d=t.memoizedProps,g=u.value,Me(Io,o._currentValue),o._currentValue=g,d!==null)if(Ut(d.value,g)){if(d.children===u.children&&!ht.current){t=mn(e,t,s);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var _=d.dependencies;if(_!==null){g=d.child;for(var E=_.firstContext;E!==null;){if(E.context===o){if(d.tag===1){E=pn(-1,s&-s),E.tag=2;var D=d.updateQueue;if(D!==null){D=D.shared;var $=D.pending;$===null?E.next=E:(E.next=$.next,$.next=E),D.pending=E}}d.lanes|=s,E=d.alternate,E!==null&&(E.lanes|=s),Aa(d.return,s,t),_.lanes|=s;break}E=E.next}}else if(d.tag===10)g=d.type===t.type?null:d.child;else if(d.tag===18){if(g=d.return,g===null)throw Error(i(341));g.lanes|=s,_=g.alternate,_!==null&&(_.lanes|=s),Aa(g,s,t),g=d.sibling}else g=d.child;if(g!==null)g.return=d;else for(g=d;g!==null;){if(g===t){g=null;break}if(d=g.sibling,d!==null){d.return=g.return,g=d;break}g=g.return}d=g}ct(e,t,u.children,s),t=t.child}return t;case 9:return u=t.type,o=t.pendingProps.children,us(t,s),u=It(u),o=o(u),t.flags|=1,ct(e,t,o,s),t.child;case 14:return o=t.type,u=$t(o,t.pendingProps),u=$t(o.type,u),Gf(e,t,o,u,s);case 15:return Yf(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:$t(o,u),Qo(e,t),t.tag=1,pt(o)?(e=!0,jo(t)):e=!1,us(t,s),Bf(t,o,u),tu(t,o,u,s),iu(null,t,o,!0,e,s);case 19:return sh(e,t,s);case 22:return Zf(e,t,s)}throw Error(i(156,t.tag))};function jh(e,t){return od(e,t)}function Xy(e,t,s,o){this.tag=e,this.key=s,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,s,o){return new Xy(e,t,s,o)}function Cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jy(e){if(typeof e=="function")return Cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z)return 11;if(e===ee)return 14}return 2}function Vn(e,t){var s=e.alternate;return s===null?(s=zt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function rl(e,t,s,o,u,d){var g=2;if(o=e,typeof e=="function")Cu(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case Y:return Er(s.children,u,d,t);case Q:g=8,u|=8;break;case z:return e=zt(12,s,t,u|2),e.elementType=z,e.lanes=d,e;case de:return e=zt(13,s,t,u),e.elementType=de,e.lanes=d,e;case W:return e=zt(19,s,t,u),e.elementType=W,e.lanes=d,e;case he:return sl(s,u,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:g=10;break e;case J:g=9;break e;case Z:g=11;break e;case ee:g=14;break e;case we:g=16,o=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=zt(g,s,t,u),t.elementType=e,t.type=o,t.lanes=d,t}function Er(e,t,s,o){return e=zt(7,e,o,t),e.lanes=s,e}function sl(e,t,s,o){return e=zt(22,e,o,t),e.elementType=he,e.lanes=s,e.stateNode={isHidden:!1},e}function Eu(e,t,s){return e=zt(6,e,null,t),e.lanes=s,e}function Pu(e,t,s){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ev(e,t,s,o,u){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=ea(0),this.expirationTimes=ea(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ea(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function ju(e,t,s,o,u,d,g,_,E){return e=new ev(e,t,s,_,E),t===1?(t=1,d===!0&&(t|=8)):t=0,d=zt(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ba(d),e}function tv(e,t,s){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Du.exports=mv(),Du.exports}var Vh;function yv(){if(Vh)return hl;Vh=1;var n=gv();return hl.createRoot=n.createRoot,hl.hydrateRoot=n.hydrateRoot,hl}var vv=yv();const xv=qp(vv);var Ji=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Nr,Gn,_s,Op,wv=(Op=class extends Ji{constructor(){super();ce(this,Nr);ce(this,Gn);ce(this,_s);ne(this,_s,r=>{if(typeof window<"u"&&window.addEventListener){const i=()=>r();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){P(this,Gn)||this.setEventListener(P(this,_s))}onUnsubscribe(){var r;this.hasListeners()||((r=P(this,Gn))==null||r.call(this),ne(this,Gn,void 0))}setEventListener(r){var i;ne(this,_s,r),(i=P(this,Gn))==null||i.call(this),ne(this,Gn,r(l=>{typeof l=="boolean"?this.setFocused(l):this.onFocus()}))}setFocused(r){P(this,Nr)!==r&&(ne(this,Nr,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(i=>{i(r)})}isFocused(){var r;return typeof P(this,Nr)=="boolean"?P(this,Nr):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Nr=new WeakMap,Gn=new WeakMap,_s=new WeakMap,Op),Pc=new wv,kv={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},Yn,Ec,Ap,Sv=(Ap=class{constructor(){ce(this,Yn,kv);ce(this,Ec,!1)}setTimeoutProvider(n){ne(this,Yn,n)}setTimeout(n,r){return P(this,Yn).setTimeout(n,r)}clearTimeout(n){P(this,Yn).clearTimeout(n)}setInterval(n,r){return P(this,Yn).setInterval(n,r)}clearInterval(n){P(this,Yn).clearInterval(n)}},Yn=new WeakMap,Ec=new WeakMap,Ap),jr=new Sv;function bv(n){setTimeout(n,0)}var _v=typeof window>"u"||"Deno"in globalThis;function wt(){}function Cv(n,r){return typeof n=="function"?n(r):n}function Yu(n){return typeof n=="number"&&n>=0&&n!==1/0}function Gp(n,r){return Math.max(n+(r||0)-Date.now(),0)}function sr(n,r){return typeof n=="function"?n(r):n}function jt(n,r){return typeof n=="function"?n(r):n}function Hh(n,r){const{type:i="all",exact:l,fetchStatus:a,predicate:c,queryKey:f,stale:h}=n;if(f){if(l){if(r.queryHash!==jc(f,r.options))return!1}else if(!Bi(r.queryKey,f))return!1}if(i!=="all"){const p=r.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof h=="boolean"&&r.isStale()!==h||a&&a!==r.state.fetchStatus||c&&!c(r))}function Wh(n,r){const{exact:i,status:l,predicate:a,mutationKey:c}=n;if(c){if(!r.options.mutationKey)return!1;if(i){if(Ui(r.options.mutationKey)!==Ui(c))return!1}else if(!Bi(r.options.mutationKey,c))return!1}return!(l&&r.state.status!==l||a&&!a(r))}function jc(n,r){return((r==null?void 0:r.queryKeyHashFn)||Ui)(n)}function Ui(n){return JSON.stringify(n,(r,i)=>Xu(i)?Object.keys(i).sort().reduce((l,a)=>(l[a]=i[a],l),{}):i)}function Bi(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(i=>Bi(n[i],r[i])):!1}var Ev=Object.prototype.hasOwnProperty;function Yp(n,r,i=0){if(n===r)return n;if(i>500)return r;const l=Qh(n)&&Qh(r);if(!l&&!(Xu(n)&&Xu(r)))return r;const c=(l?n:Object.keys(n)).length,f=l?r:Object.keys(r),h=f.length,p=l?new Array(h):{};let m=0;for(let x=0;x{jr.setTimeout(r,n)})}function Ju(n,r,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,r):i.structuralSharing!==!1?Yp(n,r):r}function jv(n,r,i=0){const l=[...n,r];return i&&l.length>i?l.slice(1):l}function Rv(n,r,i=0){const l=[r,...n];return i&&l.length>i?l.slice(0,-1):l}var Rc=Symbol();function Zp(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===Rc?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Xp(n,r){return typeof n=="function"?n(...r):!!n}function Nv(n,r,i){let l=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=r()),l||(l=!0,a.aborted?i():a.addEventListener("abort",i,{once:!0})),a)}),n}var $i=(()=>{let n=()=>_v;return{isServer(){return n()},setIsServer(r){n=r}}})();function ec(){let n,r;const i=new Promise((a,c)=>{n=a,r=c});i.status="pending",i.catch(()=>{});function l(a){Object.assign(i,a),delete i.resolve,delete i.reject}return i.resolve=a=>{l({status:"fulfilled",value:a}),n(a)},i.reject=a=>{l({status:"rejected",reason:a}),r(a)},i}var Lv=bv;function Mv(){let n=[],r=0,i=h=>{h()},l=h=>{h()},a=Lv;const c=h=>{r?n.push(h):a(()=>{i(h)})},f=()=>{const h=n;n=[],h.length&&a(()=>{l(()=>{h.forEach(p=>{i(p)})})})};return{batch:h=>{let p;r++;try{p=h()}finally{r--,r||f()}return p},batchCalls:h=>(...p)=>{c(()=>{h(...p)})},schedule:c,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{l=h},setScheduler:h=>{a=h}}}var st=Mv(),Cs,Zn,Es,Up,Tv=(Up=class extends Ji{constructor(){super();ce(this,Cs,!0);ce(this,Zn);ce(this,Es);ne(this,Es,r=>{if(typeof window<"u"&&window.addEventListener){const i=()=>r(!0),l=()=>r(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",l,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",l)}}})}onSubscribe(){P(this,Zn)||this.setEventListener(P(this,Es))}onUnsubscribe(){var r;this.hasListeners()||((r=P(this,Zn))==null||r.call(this),ne(this,Zn,void 0))}setEventListener(r){var i;ne(this,Es,r),(i=P(this,Zn))==null||i.call(this),ne(this,Zn,r(this.setOnline.bind(this)))}setOnline(r){P(this,Cs)!==r&&(ne(this,Cs,r),this.listeners.forEach(l=>{l(r)}))}isOnline(){return P(this,Cs)}},Cs=new WeakMap,Zn=new WeakMap,Es=new WeakMap,Up),El=new Tv;function Iv(n){return Math.min(1e3*2**n,3e4)}function Jp(n){return(n??"online")==="online"?El.isOnline():!0}var tc=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function em(n){let r=!1,i=0,l;const a=ec(),c=()=>a.status!=="pending",f=b=>{var C;if(!c()){const L=new tc(b);w(L),(C=n.onCancel)==null||C.call(n,L)}},h=()=>{r=!0},p=()=>{r=!1},m=()=>Pc.isFocused()&&(n.networkMode==="always"||El.isOnline())&&n.canRun(),x=()=>Jp(n.networkMode)&&n.canRun(),y=b=>{c()||(l==null||l(),a.resolve(b))},w=b=>{c()||(l==null||l(),a.reject(b))},k=()=>new Promise(b=>{var C;l=L=>{(c()||m())&&b(L)},(C=n.onPause)==null||C.call(n)}).then(()=>{var b;l=void 0,c()||(b=n.onContinue)==null||b.call(n)}),S=()=>{if(c())return;let b;const C=i===0?n.initialPromise:void 0;try{b=C??n.fn()}catch(L){b=Promise.reject(L)}Promise.resolve(b).then(y).catch(L=>{var O;if(c())return;const N=n.retry??($i.isServer()?0:3),F=n.retryDelay??Iv,I=typeof F=="function"?F(i,L):F,U=N===!0||typeof N=="number"&&im()?void 0:k()).then(()=>{r?w(L):S()})})};return{promise:a,status:()=>a.status,cancel:f,continue:()=>(l==null||l(),a),cancelRetry:h,continueRetry:p,canStart:x,start:()=>(x()?S():k().then(S),a)}}var Lr,Bp,tm=(Bp=class{constructor(){ce(this,Lr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yu(this.gcTime)&&ne(this,Lr,jr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??($i.isServer()?1/0:300*1e3))}clearGcTimeout(){P(this,Lr)!==void 0&&(jr.clearTimeout(P(this,Lr)),ne(this,Lr,void 0))}},Lr=new WeakMap,Bp);function Dv(n){return{onFetch:(r,i)=>{var x,y,w,k,S;const l=r.options,a=(w=(y=(x=r.fetchOptions)==null?void 0:x.meta)==null?void 0:y.fetchMore)==null?void 0:w.direction,c=((k=r.state.data)==null?void 0:k.pages)||[],f=((S=r.state.data)==null?void 0:S.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let b=!1;const C=F=>{Nv(F,()=>r.signal,()=>b=!0)},L=Zp(r.options,r.fetchOptions),N=async(F,I,U)=>{if(b)return Promise.reject(r.signal.reason);if(I==null&&F.pages.length)return Promise.resolve(F);const Y=(()=>{const J={client:r.client,queryKey:r.queryKey,pageParam:I,direction:U?"backward":"forward",meta:r.options.meta};return C(J),J})(),Q=await L(Y),{maxPages:z}=r.options,q=U?Rv:jv;return{pages:q(F.pages,Q,z),pageParams:q(F.pageParams,I,z)}};if(a&&c.length){const F=a==="backward",I=F?Fv:qh,U={pages:c,pageParams:f},O=I(l,U);h=await N(U,O,F)}else{const F=n??c.length;do{const I=p===0?f[0]??l.initialPageParam:qh(l,h);if(p>0&&I==null)break;h=await N(h,I),p++}while(p{var b,C;return(C=(b=r.options).persister)==null?void 0:C.call(b,m,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},i)}:r.fetchFn=m}}}function qh(n,{pages:r,pageParams:i}){const l=r.length-1;return r.length>0?n.getNextPageParam(r[l],r,i[l],i):void 0}function Fv(n,{pages:r,pageParams:i}){var l;return r.length>0?(l=n.getPreviousPageParam)==null?void 0:l.call(n,r[0],r,i[0],i):void 0}var Ps,Mr,js,Ot,Tr,et,Ki,Ir,Pt,nm,vn,$p,zv=($p=class extends tm{constructor(r){super();ce(this,Pt);ce(this,Ps);ce(this,Mr);ce(this,js);ce(this,Ot);ce(this,Tr);ce(this,et);ce(this,Ki);ce(this,Ir);ne(this,Ir,!1),ne(this,Ki,r.defaultOptions),this.setOptions(r.options),this.observers=[],ne(this,Tr,r.client),ne(this,Ot,P(this,Tr).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,ne(this,Mr,Yh(this.options)),this.state=r.state??P(this,Mr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return P(this,Ps)}get promise(){var r;return(r=P(this,et))==null?void 0:r.promise}setOptions(r){if(this.options={...P(this,Ki),...r},r!=null&&r._type&&ne(this,Ps,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Yh(this.options);i.data!==void 0&&(this.setState(Gh(i.data,i.dataUpdatedAt)),ne(this,Mr,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Ot).remove(this)}setData(r,i){const l=Ju(this.state.data,r,this.options);return xe(this,Pt,vn).call(this,{data:l,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),l}setState(r){xe(this,Pt,vn).call(this,{type:"setState",state:r})}cancel(r){var l,a;const i=(l=P(this,et))==null?void 0:l.promise;return(a=P(this,et))==null||a.cancel(r),i?i.then(wt).catch(wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return P(this,Mr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>jt(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>sr(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!Gp(this.state.dataUpdatedAt,r)}onFocus(){var i;const r=this.observers.find(l=>l.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(i=P(this,et))==null||i.continue()}onOnline(){var i;const r=this.observers.find(l=>l.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(i=P(this,et))==null||i.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),P(this,Ot).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(i=>i!==r),this.observers.length||(P(this,et)&&(P(this,Ir)||xe(this,Pt,nm).call(this)?P(this,et).cancel({revert:!0}):P(this,et).cancelRetry()),this.scheduleGc()),P(this,Ot).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,Pt,vn).call(this,{type:"invalidate"})}async fetch(r,i){var m,x,y,w,k,S,b,C,L,N,F;if(this.state.fetchStatus!=="idle"&&((m=P(this,et))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(P(this,et))return P(this,et).continueRetry(),P(this,et).promise}if(r&&this.setOptions(r),!this.options.queryFn){const I=this.observers.find(U=>U.options.queryFn);I&&this.setOptions(I.options)}const l=new AbortController,a=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(ne(this,Ir,!0),l.signal)})},c=()=>{const I=Zp(this.options,i),O=(()=>{const Y={client:P(this,Tr),queryKey:this.queryKey,meta:this.meta};return a(Y),Y})();return ne(this,Ir,!1),this.options.persister?this.options.persister(I,O,this):I(O)},h=(()=>{const I={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:P(this,Tr),state:this.state,fetchFn:c};return a(I),I})(),p=P(this,Ps)==="infinite"?Dv(this.options.pages):this.options.behavior;p==null||p.onFetch(h,this),ne(this,js,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=h.fetchOptions)==null?void 0:x.meta))&&xe(this,Pt,vn).call(this,{type:"fetch",meta:(y=h.fetchOptions)==null?void 0:y.meta}),ne(this,et,em({initialPromise:i==null?void 0:i.initialPromise,fn:h.fetchFn,onCancel:I=>{I instanceof tc&&I.revert&&this.setState({...P(this,js),fetchStatus:"idle"}),l.abort()},onFail:(I,U)=>{xe(this,Pt,vn).call(this,{type:"failed",failureCount:I,error:U})},onPause:()=>{xe(this,Pt,vn).call(this,{type:"pause"})},onContinue:()=>{xe(this,Pt,vn).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const I=await P(this,et).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(k=(w=P(this,Ot).config).onSuccess)==null||k.call(w,I,this),(b=(S=P(this,Ot).config).onSettled)==null||b.call(S,I,this.state.error,this),I}catch(I){if(I instanceof tc){if(I.silent)return P(this,et).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw xe(this,Pt,vn).call(this,{type:"error",error:I}),(L=(C=P(this,Ot).config).onError)==null||L.call(C,I,this),(F=(N=P(this,Ot).config).onSettled)==null||F.call(N,this.state.data,I,this),I}finally{this.scheduleGc()}}},Ps=new WeakMap,Mr=new WeakMap,js=new WeakMap,Ot=new WeakMap,Tr=new WeakMap,et=new WeakMap,Ki=new WeakMap,Ir=new WeakMap,Pt=new WeakSet,nm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},vn=function(r){const i=l=>{switch(r.type){case"failed":return{...l,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...l,fetchStatus:"paused"};case"continue":return{...l,fetchStatus:"fetching"};case"fetch":return{...l,...rm(l.data,this.options),fetchMeta:r.meta??null};case"success":const a={...l,...Gh(r.data,r.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,js,r.manual?a:void 0),a;case"error":const c=r.error;return{...l,error:c,errorUpdateCount:l.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:l.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...l,isInvalidated:!0};case"setState":return{...l,...r.state}}};this.state=i(this.state),st.batch(()=>{this.observers.forEach(l=>{l.onQueryUpdate()}),P(this,Ot).notify({query:this,type:"updated",action:r})})},$p);function rm(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jp(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Gh(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Yh(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,i=r!==void 0,l=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:i?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var xt,Se,qi,ft,Dr,Rs,xn,Xn,Gi,Ns,Ls,Fr,zr,Jn,Ms,Pe,Di,nc,rc,sc,ic,oc,lc,ac,sm,Vp,Ov=(Vp=class extends Ji{constructor(r,i){super();ce(this,Pe);ce(this,xt);ce(this,Se);ce(this,qi);ce(this,ft);ce(this,Dr);ce(this,Rs);ce(this,xn);ce(this,Xn);ce(this,Gi);ce(this,Ns);ce(this,Ls);ce(this,Fr);ce(this,zr);ce(this,Jn);ce(this,Ms,new Set);this.options=i,ne(this,xt,r),ne(this,Xn,null),ne(this,xn,ec()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,Se).addObserver(this),Zh(P(this,Se),this.options)?xe(this,Pe,Di).call(this):this.updateResult(),xe(this,Pe,ic).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return uc(P(this,Se),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return uc(P(this,Se),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,Pe,oc).call(this),xe(this,Pe,lc).call(this),P(this,Se).removeObserver(this)}setOptions(r){const i=this.options,l=P(this,Se);if(this.options=P(this,xt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof jt(this.options.enabled,P(this,Se))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,Pe,ac).call(this),P(this,Se).setOptions(this.options),i._defaulted&&!Zu(this.options,i)&&P(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Se),observer:this});const a=this.hasListeners();a&&Xh(P(this,Se),l,this.options,i)&&xe(this,Pe,Di).call(this),this.updateResult(),a&&(P(this,Se)!==l||jt(this.options.enabled,P(this,Se))!==jt(i.enabled,P(this,Se))||sr(this.options.staleTime,P(this,Se))!==sr(i.staleTime,P(this,Se)))&&xe(this,Pe,nc).call(this);const c=xe(this,Pe,rc).call(this);a&&(P(this,Se)!==l||jt(this.options.enabled,P(this,Se))!==jt(i.enabled,P(this,Se))||c!==P(this,Jn))&&xe(this,Pe,sc).call(this,c)}getOptimisticResult(r){const i=P(this,xt).getQueryCache().build(P(this,xt),r),l=this.createResult(i,r);return Uv(this,l)&&(ne(this,ft,l),ne(this,Rs,this.options),ne(this,Dr,P(this,Se).state)),l}getCurrentResult(){return P(this,ft)}trackResult(r,i){return new Proxy(r,{get:(l,a)=>(this.trackProp(a),i==null||i(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&P(this,xn).status==="pending"&&P(this,xn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(l,a))})}trackProp(r){P(this,Ms).add(r)}getCurrentQuery(){return P(this,Se)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const i=P(this,xt).defaultQueryOptions(r),l=P(this,xt).getQueryCache().build(P(this,xt),i);return l.fetch().then(()=>this.createResult(l,i))}fetch(r){return xe(this,Pe,Di).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,ft)))}createResult(r,i){var z;const l=P(this,Se),a=this.options,c=P(this,ft),f=P(this,Dr),h=P(this,Rs),m=r!==l?r.state:P(this,qi),{state:x}=r;let y={...x},w=!1,k;if(i._optimisticResults){const q=this.hasListeners(),J=!q&&Zh(r,i),Z=q&&Xh(r,l,i,a);(J||Z)&&(y={...y,...rm(x.data,r.options)}),i._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:S,errorUpdatedAt:b,status:C}=y;k=y.data;let L=!1;if(i.placeholderData!==void 0&&k===void 0&&C==="pending"){let q;c!=null&&c.isPlaceholderData&&i.placeholderData===(h==null?void 0:h.placeholderData)?(q=c.data,L=!0):q=typeof i.placeholderData=="function"?i.placeholderData((z=P(this,Ls))==null?void 0:z.state.data,P(this,Ls)):i.placeholderData,q!==void 0&&(C="success",k=Ju(c==null?void 0:c.data,q,i),w=!0)}if(i.select&&k!==void 0&&!L)if(c&&k===(f==null?void 0:f.data)&&i.select===P(this,Gi))k=P(this,Ns);else try{ne(this,Gi,i.select),k=i.select(k),k=Ju(c==null?void 0:c.data,k,i),ne(this,Ns,k),ne(this,Xn,null)}catch(q){ne(this,Xn,q)}P(this,Xn)&&(S=P(this,Xn),k=P(this,Ns),b=Date.now(),C="error");const N=y.fetchStatus==="fetching",F=C==="pending",I=C==="error",U=F&&N,O=k!==void 0,Q={status:C,fetchStatus:y.fetchStatus,isPending:F,isSuccess:C==="success",isError:I,isInitialLoading:U,isLoading:U,data:k,dataUpdatedAt:y.dataUpdatedAt,error:S,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:N,isRefetching:N&&!F,isLoadingError:I&&!O,isPaused:y.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:I&&O,isStale:Nc(r,i),refetch:this.refetch,promise:P(this,xn),isEnabled:jt(i.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const q=Q.data!==void 0,J=Q.status==="error"&&!q,Z=ee=>{J?ee.reject(Q.error):q&&ee.resolve(Q.data)},de=()=>{const ee=ne(this,xn,Q.promise=ec());Z(ee)},W=P(this,xn);switch(W.status){case"pending":r.queryHash===l.queryHash&&Z(W);break;case"fulfilled":(J||Q.data!==W.value)&&de();break;case"rejected":(!J||Q.error!==W.reason)&&de();break}}return Q}updateResult(){const r=P(this,ft),i=this.createResult(P(this,Se),this.options);if(ne(this,Dr,P(this,Se).state),ne(this,Rs,this.options),P(this,Dr).data!==void 0&&ne(this,Ls,P(this,Se)),Zu(i,r))return;ne(this,ft,i);const l=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,c=typeof a=="function"?a():a;if(c==="all"||!c&&!P(this,Ms).size)return!0;const f=new Set(c??P(this,Ms));return this.options.throwOnError&&f.add("error"),Object.keys(P(this,ft)).some(h=>{const p=h;return P(this,ft)[p]!==r[p]&&f.has(p)})};xe(this,Pe,sm).call(this,{listeners:l()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,Pe,ic).call(this)}},xt=new WeakMap,Se=new WeakMap,qi=new WeakMap,ft=new WeakMap,Dr=new WeakMap,Rs=new WeakMap,xn=new WeakMap,Xn=new WeakMap,Gi=new WeakMap,Ns=new WeakMap,Ls=new WeakMap,Fr=new WeakMap,zr=new WeakMap,Jn=new WeakMap,Ms=new WeakMap,Pe=new WeakSet,Di=function(r){xe(this,Pe,ac).call(this);let i=P(this,Se).fetch(this.options,r);return r!=null&&r.throwOnError||(i=i.catch(wt)),i},nc=function(){xe(this,Pe,oc).call(this);const r=sr(this.options.staleTime,P(this,Se));if($i.isServer()||P(this,ft).isStale||!Yu(r))return;const l=Gp(P(this,ft).dataUpdatedAt,r)+1;ne(this,Fr,jr.setTimeout(()=>{P(this,ft).isStale||this.updateResult()},l))},rc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Se)):this.options.refetchInterval)??!1},sc=function(r){xe(this,Pe,lc).call(this),ne(this,Jn,r),!($i.isServer()||jt(this.options.enabled,P(this,Se))===!1||!Yu(P(this,Jn))||P(this,Jn)===0)&&ne(this,zr,jr.setInterval(()=>{(this.options.refetchIntervalInBackground||Pc.isFocused())&&xe(this,Pe,Di).call(this)},P(this,Jn)))},ic=function(){xe(this,Pe,nc).call(this),xe(this,Pe,sc).call(this,xe(this,Pe,rc).call(this))},oc=function(){P(this,Fr)!==void 0&&(jr.clearTimeout(P(this,Fr)),ne(this,Fr,void 0))},lc=function(){P(this,zr)!==void 0&&(jr.clearInterval(P(this,zr)),ne(this,zr,void 0))},ac=function(){const r=P(this,xt).getQueryCache().build(P(this,xt),this.options);if(r===P(this,Se))return;const i=P(this,Se);ne(this,Se,r),ne(this,qi,r.state),this.hasListeners()&&(i==null||i.removeObserver(this),r.addObserver(this))},sm=function(r){st.batch(()=>{r.listeners&&this.listeners.forEach(i=>{i(P(this,ft))}),P(this,xt).getQueryCache().notify({query:P(this,Se),type:"observerResultsUpdated"})})},Vp);function Av(n,r){return jt(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&jt(r.retryOnMount,n)===!1)}function Zh(n,r){return Av(n,r)||n.state.data!==void 0&&uc(n,r,r.refetchOnMount)}function uc(n,r,i){if(jt(r.enabled,n)!==!1&&sr(r.staleTime,n)!=="static"){const l=typeof i=="function"?i(n):i;return l==="always"||l!==!1&&Nc(n,r)}return!1}function Xh(n,r,i,l){return(n!==r||jt(l.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Nc(n,i)}function Nc(n,r){return jt(r.enabled,n)!==!1&&n.isStaleByTime(sr(r.staleTime,n))}function Uv(n,r){return!Zu(n.getCurrentResult(),r)}var Yi,nn,ut,Or,rn,Kn,Hp,Bv=(Hp=class extends tm{constructor(r){super();ce(this,rn);ce(this,Yi);ce(this,nn);ce(this,ut);ce(this,Or);ne(this,Yi,r.client),this.mutationId=r.mutationId,ne(this,ut,r.mutationCache),ne(this,nn,[]),this.state=r.state||$v(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){P(this,nn).includes(r)||(P(this,nn).push(r),this.clearGcTimeout(),P(this,ut).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){ne(this,nn,P(this,nn).filter(i=>i!==r)),this.scheduleGc(),P(this,ut).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){P(this,nn).length||(this.state.status==="pending"?this.scheduleGc():P(this,ut).remove(this))}continue(){var r;return((r=P(this,Or))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var f,h,p,m,x,y,w,k,S,b,C,L,N,F,I,U,O,Y;const i=()=>{xe(this,rn,Kn).call(this,{type:"continue"})},l={client:P(this,Yi),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,Or,em({fn:()=>this.options.mutationFn?this.options.mutationFn(r,l):Promise.reject(new Error("No mutationFn found")),onFail:(Q,z)=>{xe(this,rn,Kn).call(this,{type:"failed",failureCount:Q,error:z})},onPause:()=>{xe(this,rn,Kn).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,ut).canRun(this)}));const a=this.state.status==="pending",c=!P(this,Or).canStart();try{if(a)i();else{xe(this,rn,Kn).call(this,{type:"pending",variables:r,isPaused:c}),P(this,ut).config.onMutate&&await P(this,ut).config.onMutate(r,this,l);const z=await((h=(f=this.options).onMutate)==null?void 0:h.call(f,r,l));z!==this.state.context&&xe(this,rn,Kn).call(this,{type:"pending",context:z,variables:r,isPaused:c})}const Q=await P(this,Or).start();return await((m=(p=P(this,ut).config).onSuccess)==null?void 0:m.call(p,Q,r,this.state.context,this,l)),await((y=(x=this.options).onSuccess)==null?void 0:y.call(x,Q,r,this.state.context,l)),await((k=(w=P(this,ut).config).onSettled)==null?void 0:k.call(w,Q,null,this.state.variables,this.state.context,this,l)),await((b=(S=this.options).onSettled)==null?void 0:b.call(S,Q,null,r,this.state.context,l)),xe(this,rn,Kn).call(this,{type:"success",data:Q}),Q}catch(Q){try{await((L=(C=P(this,ut).config).onError)==null?void 0:L.call(C,Q,r,this.state.context,this,l))}catch(z){Promise.reject(z)}try{await((F=(N=this.options).onError)==null?void 0:F.call(N,Q,r,this.state.context,l))}catch(z){Promise.reject(z)}try{await((U=(I=P(this,ut).config).onSettled)==null?void 0:U.call(I,void 0,Q,this.state.variables,this.state.context,this,l))}catch(z){Promise.reject(z)}try{await((Y=(O=this.options).onSettled)==null?void 0:Y.call(O,void 0,Q,r,this.state.context,l))}catch(z){Promise.reject(z)}throw xe(this,rn,Kn).call(this,{type:"error",error:Q}),Q}finally{P(this,ut).runNext(this)}}},Yi=new WeakMap,nn=new WeakMap,ut=new WeakMap,Or=new WeakMap,rn=new WeakSet,Kn=function(r){const i=l=>{switch(r.type){case"failed":return{...l,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...l,isPaused:!0};case"continue":return{...l,isPaused:!1};case"pending":return{...l,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...l,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...l,data:void 0,error:r.error,failureCount:l.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=i(this.state),st.batch(()=>{P(this,nn).forEach(l=>{l.onMutationUpdate(r)}),P(this,ut).notify({mutation:this,type:"updated",action:r})})},Hp);function $v(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wn,Qt,Zi,Wp,Vv=(Wp=class extends Ji{constructor(r={}){super();ce(this,wn);ce(this,Qt);ce(this,Zi);this.config=r,ne(this,wn,new Set),ne(this,Qt,new Map),ne(this,Zi,0)}build(r,i,l){const a=new Bv({client:r,mutationCache:this,mutationId:++fl(this,Zi)._,options:r.defaultMutationOptions(i),state:l});return this.add(a),a}add(r){P(this,wn).add(r);const i=pl(r);if(typeof i=="string"){const l=P(this,Qt).get(i);l?l.push(r):P(this,Qt).set(i,[r])}this.notify({type:"added",mutation:r})}remove(r){if(P(this,wn).delete(r)){const i=pl(r);if(typeof i=="string"){const l=P(this,Qt).get(i);if(l)if(l.length>1){const a=l.indexOf(r);a!==-1&&l.splice(a,1)}else l[0]===r&&P(this,Qt).delete(i)}}this.notify({type:"removed",mutation:r})}canRun(r){const i=pl(r);if(typeof i=="string"){const l=P(this,Qt).get(i),a=l==null?void 0:l.find(c=>c.state.status==="pending");return!a||a===r}else return!0}runNext(r){var l;const i=pl(r);if(typeof i=="string"){const a=(l=P(this,Qt).get(i))==null?void 0:l.find(c=>c!==r&&c.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){st.batch(()=>{P(this,wn).forEach(r=>{this.notify({type:"removed",mutation:r})}),P(this,wn).clear(),P(this,Qt).clear()})}getAll(){return Array.from(P(this,wn))}find(r){const i={exact:!0,...r};return this.getAll().find(l=>Wh(i,l))}findAll(r={}){return this.getAll().filter(i=>Wh(r,i))}notify(r){st.batch(()=>{this.listeners.forEach(i=>{i(r)})})}resumePausedMutations(){const r=this.getAll().filter(i=>i.state.isPaused);return st.batch(()=>Promise.all(r.map(i=>i.continue().catch(wt))))}},wn=new WeakMap,Qt=new WeakMap,Zi=new WeakMap,Wp);function pl(n){var r;return(r=n.options.scope)==null?void 0:r.id}var sn,Qp,Hv=(Qp=class extends Ji{constructor(r={}){super();ce(this,sn);this.config=r,ne(this,sn,new Map)}build(r,i,l){const a=i.queryKey,c=i.queryHash??jc(a,i);let f=this.get(c);return f||(f=new zv({client:r,queryKey:a,queryHash:c,options:r.defaultQueryOptions(i),state:l,defaultOptions:r.getQueryDefaults(a)}),this.add(f)),f}add(r){P(this,sn).has(r.queryHash)||(P(this,sn).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const i=P(this,sn).get(r.queryHash);i&&(r.destroy(),i===r&&P(this,sn).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){st.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return P(this,sn).get(r)}getAll(){return[...P(this,sn).values()]}find(r){const i={exact:!0,...r};return this.getAll().find(l=>Hh(i,l))}findAll(r={}){const i=this.getAll();return Object.keys(r).length>0?i.filter(l=>Hh(r,l)):i}notify(r){st.batch(()=>{this.listeners.forEach(i=>{i(r)})})}onFocus(){st.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){st.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},sn=new WeakMap,Qp),Ve,er,tr,Ts,Is,nr,Ds,Fs,Kp,Wv=(Kp=class{constructor(n={}){ce(this,Ve);ce(this,er);ce(this,tr);ce(this,Ts);ce(this,Is);ce(this,nr);ce(this,Ds);ce(this,Fs);ne(this,Ve,n.queryCache||new Hv),ne(this,er,n.mutationCache||new Vv),ne(this,tr,n.defaultOptions||{}),ne(this,Ts,new Map),ne(this,Is,new Map),ne(this,nr,0)}mount(){fl(this,nr)._++,P(this,nr)===1&&(ne(this,Ds,Pc.subscribe(async n=>{n&&(await this.resumePausedMutations(),P(this,Ve).onFocus())})),ne(this,Fs,El.subscribe(async n=>{n&&(await this.resumePausedMutations(),P(this,Ve).onOnline())})))}unmount(){var n,r;fl(this,nr)._--,P(this,nr)===0&&((n=P(this,Ds))==null||n.call(this),ne(this,Ds,void 0),(r=P(this,Fs))==null||r.call(this),ne(this,Fs,void 0))}isFetching(n){return P(this,Ve).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return P(this,er).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const r=this.defaultQueryOptions({queryKey:n});return(i=P(this,Ve).get(r.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),i=P(this,Ve).build(this,r),l=i.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(sr(r.staleTime,i))&&this.prefetchQuery(r),Promise.resolve(l))}getQueriesData(n){return P(this,Ve).findAll(n).map(({queryKey:r,state:i})=>{const l=i.data;return[r,l]})}setQueryData(n,r,i){const l=this.defaultQueryOptions({queryKey:n}),a=P(this,Ve).get(l.queryHash),c=a==null?void 0:a.state.data,f=Cv(r,c);if(f!==void 0)return P(this,Ve).build(this,l).setData(f,{...i,manual:!0})}setQueriesData(n,r,i){return st.batch(()=>P(this,Ve).findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,r,i)]))}getQueryState(n){var i;const r=this.defaultQueryOptions({queryKey:n});return(i=P(this,Ve).get(r.queryHash))==null?void 0:i.state}removeQueries(n){const r=P(this,Ve);st.batch(()=>{r.findAll(n).forEach(i=>{r.remove(i)})})}resetQueries(n,r){const i=P(this,Ve);return st.batch(()=>(i.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const i={revert:!0,...r},l=st.batch(()=>P(this,Ve).findAll(n).map(a=>a.cancel(i)));return Promise.all(l).then(wt).catch(wt)}invalidateQueries(n,r={}){return st.batch(()=>(P(this,Ve).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},r)))}refetchQueries(n,r={}){const i={...r,cancelRefetch:r.cancelRefetch??!0},l=st.batch(()=>P(this,Ve).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let c=a.fetch(void 0,i);return i.throwOnError||(c=c.catch(wt)),a.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(l).then(wt)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const i=P(this,Ve).build(this,r);return i.isStaleByTime(sr(r.staleTime,i))?i.fetch(r):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(wt).catch(wt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(wt).catch(wt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return El.isOnline()?P(this,er).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,Ve)}getMutationCache(){return P(this,er)}getDefaultOptions(){return P(this,tr)}setDefaultOptions(n){ne(this,tr,n)}setQueryDefaults(n,r){P(this,Ts).set(Ui(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...P(this,Ts).values()],i={};return r.forEach(l=>{Bi(n,l.queryKey)&&Object.assign(i,l.defaultOptions)}),i}setMutationDefaults(n,r){P(this,Is).set(Ui(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...P(this,Is).values()],i={};return r.forEach(l=>{Bi(n,l.mutationKey)&&Object.assign(i,l.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const r={...P(this,tr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=jc(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Rc&&(r.enabled=!1),r}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...P(this,tr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){P(this,Ve).clear(),P(this,er).clear()}},Ve=new WeakMap,er=new WeakMap,tr=new WeakMap,Ts=new WeakMap,Is=new WeakMap,nr=new WeakMap,Ds=new WeakMap,Fs=new WeakMap,Kp),im=H.createContext(void 0),Lc=n=>{const r=H.useContext(im);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},Qv=({client:n,children:r})=>(H.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),v.jsx(im.Provider,{value:n,children:r})),om=H.createContext(!1),Kv=()=>H.useContext(om);om.Provider;function qv(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Gv=H.createContext(qv()),Yv=()=>H.useContext(Gv),Zv=(n,r,i)=>{const l=i!=null&&i.state.error&&typeof n.throwOnError=="function"?Xp(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(r.isReset()||(n.retryOnMount=!1))},Xv=n=>{H.useEffect(()=>{n.clearReset()},[n])},Jv=({result:n,errorResetBoundary:r,throwOnError:i,query:l,suspense:a})=>n.isError&&!r.isReset()&&!n.isFetching&&l&&(a&&n.data===void 0||Xp(i,[n.error,l])),e0=n=>{if(n.suspense){const i=a=>a==="static"?a:Math.max(a??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...a)=>i(l(...a)):i(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},t0=(n,r)=>n.isLoading&&n.isFetching&&!r,n0=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,Jh=(n,r,i)=>r.fetchOptimistic(n).catch(()=>{i.clearReset()});function r0(n,r,i){var k,S,b,C;const l=Kv(),a=Yv(),c=Lc(),f=c.defaultQueryOptions(n);(S=(k=c.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||S.call(k,f);const h=c.getQueryCache().get(f.queryHash),p=n.subscribed!==!1;f._optimisticResults=l?"isRestoring":p?"optimistic":void 0,e0(f),Zv(f,a,h),Xv(a);const m=!c.getQueryCache().get(f.queryHash),[x]=H.useState(()=>new r(c,f)),y=x.getOptimisticResult(f),w=!l&&p;if(H.useSyncExternalStore(H.useCallback(L=>{const N=w?x.subscribe(st.batchCalls(L)):wt;return x.updateResult(),N},[x,w]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),H.useEffect(()=>{x.setOptions(f)},[f,x]),n0(f,y))throw Jh(f,x,a);if(Jv({result:y,errorResetBoundary:a,throwOnError:f.throwOnError,query:h,suspense:f.suspense}))throw y.error;if((C=(b=c.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||C.call(b,f,y),f.experimental_prefetchInRender&&!$i.isServer()&&t0(y,l)){const L=m?Jh(f,x,a):h==null?void 0:h.promise;L==null||L.catch(wt).finally(()=>{x.updateResult()})}return f.notifyOnChangeProps?y:x.trackResult(y)}function Ae(n,r){return r0(n,Ov)}const s0=!1;var lm=H.useLayoutEffect;function i0(n,r,i){H.useEffect(()=>{if(!n.current||i||typeof IntersectionObserver!="function")return()=>r();const l=new IntersectionObserver(a=>{r(a.pop())},{rootMargin:"100px"});return l.observe(n.current),()=>{l.disconnect(),r()}},[r,i,n])}function o0(n){const r=H.useRef(null);return H.useImperativeHandle(n,()=>r.current,[]),r}function Vi(n){return n[n.length-1]}function zs(n,r){return typeof n=="function"?n(r):n}const am=Object.prototype.hasOwnProperty,l0=Object.prototype.propertyIsEnumerable;function um(n){for(const r in n)if(am.call(n,r))return!0;return!1}const a0=()=>Object.create(null),Pr=(n,r)=>Rr(n,r,a0);function Rr(n,r,i=()=>({}),l=0){if(n===r)return n;if(l>500)return r;const a=r,c=np(n)&&np(a);if(!c&&!(Pl(n)&&Pl(a)))return a;const f=c?n:ep(n);if(!f)return a;const h=c?a:ep(a);if(!h)return a;const p=f.length,m=h.length,x=c?new Array(m):i();let y=0;for(let w=0;w"u")return!0;const i=r.prototype;return!(!tp(i)||!i.hasOwnProperty("isPrototypeOf"))}function tp(n){return Object.prototype.toString.call(n)==="[object Object]"}function np(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ir(n,r,i){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return!1;for(let l=0,a=n.length;la||!ir(n[f],r[f],i)))return!1;return a===c}return!1}const u0=/[\x00-\x1f\x7f"<>`{}]/g;function c0(n){return n.replace(u0,r=>"%"+r.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function rp(n){let r;try{r=decodeURI(n)}catch{r=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return c0(r)}const d0=["http:","https:","mailto:","tel:"];function jl(n,r){if(!n)return!1;try{const i=new URL(n);return!r.has(i.protocol)}catch{return!1}}function Ni(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const r=/%25|%5C/gi;let i=0,l="",a;for(;(a=r.exec(n))!==null;)l+=rp(n.slice(i,a.index))+a[0],i=r.lastIndex;l=l+rp(i?n.slice(i):n);let c=!1;return l.startsWith("//")&&(c=!0,l="/"+l.replace(/^\/+/,"")),{path:l,handledProtocolRelativeURL:c}}function f0(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function h0(n,r){if(n===r)return!0;if(n.length!==r.length)return!1;for(let i=0;i{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,l&&(l.next=c,c.prev=l)):(c.next.prev=void 0,i=c.next,c.next=void 0,l&&(c.prev=l,l.next=c)),l=c)};return{get(c){const f=r.get(c);if(f)return a(f),f.value},set(c,f){if(r.size>=n&&i){const p=i;r.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===l&&(l=void 0)}const h=r.get(c);if(h)h.value=f,a(h);else{const p={key:c,value:f,prev:l};l&&(l.next=p),l=p,i||(i=p),r.set(c,p)}},clear(){r.clear(),i=void 0,l=void 0}}}const rr=4,cm=5;function dm(n,r,i=new Uint16Array(6)){const l=n.indexOf("/",r),a=l===-1?n.length:l,c=n.substring(r,a);if(!c||!c.includes("$"))return i[0]=0,i[1]=r,i[2]=r,i[3]=a,i[4]=a,i[5]=a,i;if(c==="$"){const p=n.length;return i[0]=2,i[1]=r,i[2]=r,i[3]=p,i[4]=p,i[5]=p,i}if(c.charCodeAt(0)===36)return i[0]=1,i[1]=r,i[2]=r+1,i[3]=a,i[4]=a,i[5]=a,i;const f=c.indexOf("{");let h;if(f!==-1&&f+1!J.parse&&J.caseSensitive===Q&&J.prefix===O&&J.suffix===Y));if(q)N=q;else{const J=p0(U,y,Q,O,Y);N=J,J.parent=a,J.depth=c;let Z;U===1?Z=a.dynamic??(a.dynamic=[]):U===3?Z=a.optional??(a.optional=[]):Z=a.wildcard??(a.wildcard=[]),Z.push(J),Z.length===2&&(f==null||f.push(Z))}break}}a=N}if(b&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const L=xs(y);L.kind=cm,L.parent=a,c++,L.depth=c,a.pathless??(a.pathless=[]),a.pathless.push(L),a=L}const C=(i.path||!i.children)&&!i.isRoot;if(C&&y.endsWith("/")){const L=xs(y);L.kind=rr,L.parent=a,c++,L.depth=c,a.index=L,a=L}a.parse=b??null,a.priority=((x=w==null?void 0:w.params)==null?void 0:x.priority)??0,C&&!a.route&&(a.route=i,a.fullPath=y)}if(i.children)for(const y of i.children)Dl(n,r,y,p,a,c,f,h)}function fm(n,r){if(n.parse&&!r.parse)return-1;if(!n.parse&&r.parse)return 1;if(n.parse&&r.parse&&(n.priority||r.priority))return r.priority-n.priority;if(n.prefix&&r.prefix&&n.prefix!==r.prefix){if(n.prefix.startsWith(r.prefix))return-1;if(r.prefix.startsWith(n.prefix))return 1}if(n.suffix&&r.suffix&&n.suffix!==r.suffix){if(n.suffix.endsWith(r.suffix))return-1;if(r.suffix.endsWith(n.suffix))return 1}return n.prefix&&!r.prefix?-1:!n.prefix&&r.prefix?1:n.suffix&&!r.suffix?-1:!n.suffix&&r.suffix?1:n.caseSensitive&&!r.caseSensitive?-1:!n.caseSensitive&&r.caseSensitive?1:0}function xs(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0}}function p0(n,r,i,l,a){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:r,parent:null,parse:null,priority:0,caseSensitive:i,prefix:l,suffix:a}}function m0(n,r){const i=xs("/"),l=new Uint16Array(6),a=[];for(const c of n)Dl(!1,l,c,1,i,0,a);for(const c of a)c.sort(fm);r.masksTree=i,r.flatCache=Rl(1e3)}function g0(n,r){n||(n="/");const i=r.flatCache.get(n);if(i!==void 0)return i;const l=Tc(n,r.masksTree);return r.flatCache.set(n,l),l}function y0(n,r,i,l,a){n||(n="/"),l||(l="/");const c=r?`case\0${n}`:n;let f=a.singleCache.get(c);return f||(f=xs("/"),Dl(r,new Uint16Array(6),{from:n},1,f,0),a.singleCache.set(c,f)),Tc(l,f,i)}function v0(n,r,i=!1){const l=i?n:`nofuzz\0${n}`,a=r.matchCache.get(l);if(a!==void 0)return a;n||(n="/");let c;try{c=Tc(n,r.segmentTree,i)}catch(f){if(f instanceof URIError)c=null;else throw f}return c&&(c.branch=pm(c.route)),r.matchCache.set(l,c),c}function x0(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function w0(n,r=!1,i){const l=xs(n.fullPath),a=new Uint16Array(6),c=[],f={},h={};let p=0;Dl(r,a,n,1,l,0,c,m=>{if(i==null||i(m,p),m.id in f&&Mc(),f[m.id]=m,p!==0&&m.path){const x=x0(m.fullPath);(!h[x]||m.fullPath.endsWith("/"))&&(h[x]=m)}p++});for(const m of c)m.sort(fm);return{processedTree:{segmentTree:l,singleCache:Rl(1e3),matchCache:Rl(1e3),flatCache:null,masksTree:null},routesById:f,routesByPath:h}}function Tc(n,r,i=!1){const l=n.split("/"),a=S0(n,l,r,i);if(!a)return null;const[c]=hm(n,l,a);return{route:a.node.route,rawParams:c}}function hm(n,r,i){var x,y,w,k;const l=k0(i.node);let a=null;const c=Object.create(null);let f=((x=i.extract)==null?void 0:x.part)??0,h=((y=i.extract)==null?void 0:y.node)??0,p=((w=i.extract)==null?void 0:w.path)??0,m=((k=i.extract)==null?void 0:k.segment)??0;for(;h=0;O--){const Y=y.wildcard[O],{prefix:Q,suffix:z}=Y;if(!(Q&&(F||!(Y.caseSensitive?I:U??(U=I.toLowerCase())).startsWith(Q)))){if(z){if(F)continue;const q=r.slice(w).join("/"),J=q.slice(-z.length);if((Y.caseSensitive?J:J.toLowerCase())!==z||q.length-z.length=0;Y--){const Q=y.optional[Y];h.push({node:Q,index:w,skipped:O,statics:S,dynamics:b,optionals:C,extract:L,rawParams:N})}if(!F)for(let Y=y.optional.length-1;Y>=0;Y--){const Q=y.optional[Y],{prefix:z,suffix:q}=Q;if(z||q){const J=Q.caseSensitive?I:U??(U=I.toLowerCase());if(z&&!J.startsWith(z)||q&&J.indexOf(q,J.length-q.length)=0;O--){const Y=y.dynamic[O],{prefix:Q,suffix:z}=Y;if(Q||z){const q=Y.caseSensitive?I:U??(U=I.toLowerCase());if(Q&&!q.startsWith(Q)||z&&q.indexOf(z,q.length-z.length)=0;O--){const Y=y.pathless[O];h.push({node:Y,index:w,skipped:k,statics:S,dynamics:b,optionals:C,extract:L,rawParams:N})}}if(m)return m;if(l&&p){let x=p.index;for(let w=0;wn.statics||r.statics===n.statics&&(r.dynamics>n.dynamics||r.dynamics===n.dynamics&&(r.optionals>n.optionals||r.optionals===n.optionals&&((r.node.kind===rr)>(n.node.kind===rr)||r.node.kind===rr==(n.node.kind===rr)&&r.node.depth>n.node.depth))):!0}function wl(n){return kl(n.filter(r=>r!==void 0).join("/"))}function kl(n){return n.replace(/\/{2,}/g,"/")}function mm(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function kn(n){const r=n.length;return r>1&&n[r-1]==="/"?n.replace(/\/{1,}$/,""):n}function gm(n){return kn(mm(n))}function Nl(n,r){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${r}/`?n.slice(0,-1):n}function _0(n,r,i){return Nl(n,i)===Nl(r,i)}function C0({base:n,to:r,trailingSlash:i="never",cache:l}){if(r.includes("//")&&(r=kl(r)),r.startsWith("/"))return r.length===1||i==="preserve"?r:i==="always"?r.endsWith("/")?r:`${r}/`:r.endsWith("/")?r.slice(0,-1):r;const a=r===".";let c;if(l){c=a?n:n+"\0"+r;const m=l.get(c);if(m)return m}let f;if(a)f=n.split("/");else{for(n.includes("//")&&(n=kl(n)),f=n.split("/");f.length>1&&Vi(f)==="";)f.pop();const m=r.split("/");for(let x=0,y=m.length;x1?f.pop():f=[""]:w==="."||f.push(w)}}f.length>1&&(Vi(f)===""?i==="never"&&f.pop():i==="always"&&f.push(""));const h=f.join("/"),p=(a?kl(h):h)||"/";return c&&l&&l.set(c,p),p}function E0(n){const r=new Map(n.map(a=>[encodeURIComponent(a),a])),i=Array.from(r.keys()).map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),l=new RegExp(i,"g");return a=>a.replace(l,c=>r.get(c)??c)}function Ou(n,r,i){const l=r[n];return typeof l!="string"?l:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(l)?l:l.split("/").map(a=>op(a,i)).join("/"):op(l,i)}function ip({path:n,params:r,decoder:i,...l}){let a=!1;const c=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:a};if(!n.includes("$"))return{interpolatedPath:n,usedParams:c,isMissingParams:a};const f=n.length;let h=0,p,m="";for(;hn.state.__TSR_key||n.href;function M0(n){const r=n.getAttribute(lp);if(r)return`[${lp}="${r}"]`;let i="",l=n,a;for(;a=l.parentNode;){let c=1,f=l;for(;f=f.previousElementSibling;)c++;const h=`${l.localName}:nth-child(${c})`;i=i?`${h} > ${i}`:h,l=a}return i}let yl=!1;const Sl="window";function cc(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function ap(n){const r=new Set;for(const i of n){if(i===Sl)continue;const l=cc(i);l&&r.add(l)}return r}function T0(n,r){const i=n.options.scrollRestoration,l=n._scroll;i&&(l.restoring=!0);const a=n.options.getScrollRestorationKey||L0,c=new Set,f=h=>{const p=qn[h]||(qn[h]={});for(const m of c)m===document?p[Sl]={scrollX,scrollY}:m.isConnected&&(p[M0(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};i&&!l.restoration&&(l.restoration=!0,yl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{yl||c.add(h.target)},!0),n.subscribe("onBeforeLoad",h=>{h.fromLocation&&f(a(h.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{f(a(n.stores.resolvedLocation.get()??n.stores.location.get())),N0()})),!l.reset&&(l.reset=!0,n.subscribe("onRendered",h=>{var b;const p=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,x=l.next,y=l.hash;let w;if(c.clear(),l.next=!0,l.hash=!1,typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const k=a(h.toLocation),S=h.fromLocation&&a(h.fromLocation);if(l.restoring&&S&&S!==k){const C=qn[S];if(C){let L=qn[k];for(const N in C){if(N===Sl){if(x)continue}else{const F=cc(N);if(!F||x&&m&&(w??(w=ap(m)),w.has(F)))continue}L||(L=qn[k]={}),L[N]??(L[N]=C[N])}}}yl=!0;try{const C=h.toLocation.hash,L=h.toLocation.state.__hashScrollIntoViewOptions??!0;let N=!1;if(x){!C&&m&&(w??(w=ap(m)));const F=C&&L&&y,I=l.restoring?qn[k]:void 0;if(I)for(const U in I){const{scrollX:O,scrollY:Y}=I[U];if(U===Sl){if(F)continue;scrollTo({top:Y,left:O,behavior:p}),N=!0}else{const Q=cc(U);Q&&(Q.scrollLeft=O,Q.scrollTop=Y,w==null||w.delete(Q))}}if(!C){const U={top:0,left:0,behavior:p};if(N||scrollTo(U),w)for(const O of w)O.scrollTo(U)}}!N&&C&&L&&((b=document.getElementById(C))==null||b.scrollIntoView(L))}finally{yl=!1}}))}function I0(n,r=String){const i=new URLSearchParams;for(const l in n){const a=n[l];a!==void 0&&i.set(l,r(a))}return i.toString()}function Au(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function D0(n){const r=new URLSearchParams(n),i=Object.create(null);for(const[l,a]of r.entries()){const c=i[l];c==null?i[l]=Au(a):Array.isArray(c)?c.push(Au(a)):i[l]=[c,Au(a)]}return i}const F0=/^(?:\s|["[{\d-]|fa|nu|tr)/,z0=A0(JSON.parse),O0=U0(JSON.stringify,JSON.parse);function A0(n){return r=>{r[0]==="?"&&(r=r.substring(1));const i=D0(r);for(const l in i){const a=i[l];if(typeof a=="string")try{i[l]=n(a)}catch{}}return i}}function U0(n,r){const i=r===JSON.parse;function l(a){if(a&&typeof a=="object")try{return n(a)}catch{}else if(r&&typeof a=="string"){if(i&&!F0.test(a))return a;try{return r(a),n(a)}catch{}}return a}return a=>{const c=I0(a,l);return c?`?${c}`:""}}const ks="__root__";function ym(n){if(n.statusCode=n.statusCode||n.code||307,!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const r=new Headers(n.headers);n.href&&r.get("Location")===null&&r.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:r});if(i.options=n,n.throw)throw i;return i}function vm(n){return n instanceof Response&&!!n.options}function B0(n){return{input:({url:r})=>{for(const i of n)r=dc(i,r);return r},output:({url:r})=>{for(let i=n.length-1;i>=0;i--)r=xm(n[i],r);return r}}}function $0(n){const r=gm(n.basepath),i=`/${r}`,l=n.caseSensitive?i:i.toLowerCase(),a=`${l}/`;return{input:({url:c})=>{const f=n.caseSensitive?c.pathname:c.pathname.toLowerCase();return f===l?c.pathname="/":f.startsWith(a)&&(c.pathname=c.pathname.slice(i.length)),c},output:({url:c})=>(c.pathname=wl(["/",r,c.pathname]),c)}}function dc(n,r){var l;const i=(l=n==null?void 0:n.input)==null?void 0:l.call(n,{url:r});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return r}function xm(n,r){var l;const i=(l=n==null?void 0:n.output)==null?void 0:l.call(n,{url:r});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return r}function V0(n,r){const{createMutableStore:i,createReadonlyStore:l,batch:a}=r,c=new Map,f=i("idle"),h=i(n),p=i(void 0),m=i([]),x=l(()=>m.get().map(b=>c.get(b).get())),y=l(()=>({status:f.get(),isLoading:f.get()==="pending",matches:x.get(),location:h.get(),resolvedLocation:p.get()}));function w(b){let C=c.get(b);return C||(C=i(void 0),c.set(b,C)),C}const k={status:f,location:h,resolvedLocation:p,ids:m,matches:x,byRoute:c,__store:y,getMatchStore:w,setMatches:S};function S(b){const C=m.get(),L=b.map(N=>N.routeId);a(()=>{h0(C,L)||m.set(L);for(const N of C)L.includes(N)||c.get(N).set(()=>{});for(const N of b){const F=w(N.routeId);F.get()!==N&&F.set(N)}})}return k}var or="__TSR_index",up="popstate",cp="beforeunload";function H0(n){let r=n.getLocation();const i=new Set,l=f=>{r=n.getLocation(),i.forEach(h=>h({location:r,action:f}))},a=f=>{n.notifyOnIndexChange??!0?l(f):r=n.getLocation()},c=async({task:f,navigateOpts:h,...p})=>{var y,w;if((h==null?void 0:h.ignoreBlocker)??!1){f();return}const m=((y=n.getBlockers)==null?void 0:y.call(n))??[],x=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&x)for(const k of m){const S=Ll(p.path,p.state);if(await k.blockerFn({currentLocation:r,nextLocation:S,action:p.type})){(w=n.onBlocked)==null||w.call(n);return}}f()};return{get location(){return r},get length(){return n.getLength()},subscribers:i,subscribe:f=>(i.add(f),()=>{i.delete(f)}),push:(f,h,p)=>{const m=r.state[or];h=dp(m+1,h),c({task:()=>{n.pushState(f,h),l({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:f,state:h})},replace:(f,h,p)=>{const m=r.state[or];h=dp(m,h),c({task:()=>{n.replaceState(f,h),l({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:f,state:h})},go:(f,h)=>{c({task:()=>{n.go(f),a({type:"GO",index:f})},navigateOpts:h,type:"GO"})},back:f=>{c({task:()=>{n.back((f==null?void 0:f.ignoreBlocker)??!1),a({type:"BACK"})},navigateOpts:f,type:"BACK"})},forward:f=>{c({task:()=>{n.forward((f==null?void 0:f.ignoreBlocker)??!1),a({type:"FORWARD"})},navigateOpts:f,type:"FORWARD"})},canGoBack:()=>r.state[or]!==0,createHref:f=>n.createHref(f),block:f=>{var p;if(!n.setBlockers)return()=>{};const h=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...h,f]),()=>{var x,y;const m=((x=n.getBlockers)==null?void 0:x.call(n))??[];(y=n.setBlockers)==null||y.call(n,m.filter(w=>w!==f))}},flush:()=>{var f;return(f=n.flush)==null?void 0:f.call(n)},destroy:()=>{var f;return(f=n.destroy)==null?void 0:f.call(n)},notify:l}}function dp(n,r){r||(r={});const i=Ic();return{...r,key:i,__TSR_key:i,[or]:n}}function W0(n){var Y,Q;const r=typeof document<"u"?window:void 0,i=r.history.pushState,l=r.history.replaceState;let a=[];const c=()=>a,f=z=>a=z,h=(z=>z),p=(()=>Ll(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((Y=r.history.state)!=null&&Y.__TSR_key)&&!((Q=r.history.state)!=null&&Q.key)){const z=Ic();r.history.replaceState({[or]:0,key:z,__TSR_key:z},"")}let m=p(),x,y=!1,w=!1,k=!1,S=!1;const b=()=>m;let C;const L=()=>{C&&(O._ignoreSubscribers=!0,(C[2]?r.history.pushState:r.history.replaceState)(C[1],"",C[0]),O._ignoreSubscribers=!1,C=void 0,x=void 0)},N=(z,q,J)=>{const Z=h(q),de=!!C;de||(x=m),m=Ll(q,J),C=[Z,J,(C==null?void 0:C[2])||z],de||queueMicrotask(()=>L())},F=z=>{m=p(),O.notify({type:z})},I=async()=>{if(w){w=!1;return}const z=p(),q=z.state[or]-m.state[or],J=q===1,Z=q===-1,de=!J&&!Z||y;y=!1;const W=de?"GO":Z?"BACK":"FORWARD",ee=de?{type:"GO",index:q}:{type:Z?"BACK":"FORWARD"};if(k)k=!1;else{const we=c();if(typeof document<"u"&&we.length){for(const he of we)if(await he.blockerFn({currentLocation:m,nextLocation:z,action:W})){w=!0,r.history.go(1),O.notify(ee);return}}}m=p(),O.notify(ee)},U=z=>{if(S){S=!1;return}let q=!1;const J=c();if(typeof document<"u"&&J.length)for(const Z of J){const de=Z.enableBeforeUnload??!0;if(de===!0){q=!0;break}if(typeof de=="function"&&de()===!0){q=!0;break}}if(q)return z.preventDefault(),z.returnValue=""},O=H0({getLocation:b,getLength:()=>r.history.length,pushState:(z,q)=>N(!0,z,q),replaceState:(z,q)=>N(!1,z,q),back:z=>(z&&(k=!0),S=!0,r.history.back()),forward:z=>{z&&(k=!0),S=!0,r.history.forward()},go:z=>{y=!0,r.history.go(z)},createHref:z=>h(z),flush:L,destroy:()=>{r.history.pushState=i,r.history.replaceState=l,r.removeEventListener(cp,U,{capture:!0}),r.removeEventListener(up,I)},onBlocked:()=>{x&&m!==x&&(m=x)},getBlockers:c,setBlockers:f,notifyOnIndexChange:!1});return r.addEventListener(cp,U,{capture:!0}),r.addEventListener(up,I),r.history.pushState=function(...z){const q=i.apply(r.history,z);return O._ignoreSubscribers||F("PUSH"),q},r.history.replaceState=function(...z){const q=l.apply(r.history,z);return O._ignoreSubscribers||F("REPLACE"),q},O}function Q0(n){let r=n.replace(/[\x00-\x1f\x7f]/g,"");return r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function Ll(n,r){const i=Q0(n),l=i.indexOf("#"),a=i.indexOf("?"),c=Ic();return{href:i,pathname:i.substring(0,l>0?a>0?Math.min(l,a):l:a>0?a:i.length),hash:l>-1?i.substring(l):"",search:a>-1?i.slice(a,l===-1?void 0:l):"",state:r||{[or]:0,key:c,__TSR_key:c}}}function Ic(){return(Math.random()+1).toString(36).substring(7)}function fp(n){var r,i;return n.options.loader||n.options.beforeLoad||n.lazyFn||((r=n.options.component)==null?void 0:r.preload)||((i=n.options.pendingComponent)==null?void 0:i.preload)}function Fl(n,r){return{fromLocation:r,toLocation:n,pathChanged:(r==null?void 0:r.pathname)!==n.pathname,hrefChanged:(r==null?void 0:r.href)!==n.href,hashChanged:(r==null?void 0:r.hash)!==n.hash}}function hp({key:n,__TSR_key:r,__TSR_index:i,__hashScrollIntoViewOptions:l,...a}){return a}function K0(n,r,i,l){var a,c,f,h;for(const p of r){if(l&&n._tx!==l)return;i.some(m=>m.routeId===p.routeId)||(c=(a=n.routesById[p.routeId].options).onLeave)==null||c.call(a,p)}for(const p of i){if(l&&n._tx!==l)return;(h=(f=n.routesById[p.routeId].options)[r.some(m=>m.routeId===p.routeId)?"onStay":"onEnter"])==null||h.call(f,p)}}var q0=class{constructor(n,r){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async i=>(i(),!1),this.update=i=>{const l=this.options,a=this.basepath??(l==null?void 0:l.basepath)??"/",c=this.basepath===void 0,f=l==null?void 0:l.rewrite;if(this.options={...l,...i},this.isServer=this.options.isServer??s0??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=E0(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=W0()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=Rl(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=V0(this.latestLocation,m),T0(this)}const h=this.options.basepath??"/",p=this.options.rewrite;if(c||a!==h||f!==p){this.basepath=h;const m=[],x=gm(h);x&&x!=="/"&&m.push($0({basepath:h})),p&&m.push(p),this.rewrite=m.length===0?void 0:m.length===1?m[0]:B0(m),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=w0(this.routeTree,this.options.caseSensitive,(l,a)=>{l.init({originalIndex:a})});return this.options.routeMasks&&m0(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,l)=>{const a={eventType:i,fn:l};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=i=>{for(const l of this.subscribers)if(l.eventType===i.type)try{l.fn(i)}catch(a){console.error(a)}},this.parseLocation=(i,l)=>{const a=({pathname:p,search:m,hash:x,href:y,state:w})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const L=this.options.parseSearch(m),N=this.options.stringifySearch(L);return{href:p+N+x,publicHref:p+N+x,pathname:Ni(p).path,external:!1,searchStr:N,search:Pr(l==null?void 0:l.search,L),hash:Ni(x.slice(1)).path,state:Rr(l==null?void 0:l.state,w)}}const k=new URL(y,this.origin),S=dc(this.rewrite,k),b=this.options.parseSearch(S.search),C=this.options.stringifySearch(b);return S.search=C,{href:S.href.replace(S.origin,""),publicHref:y,pathname:Ni(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:Pr(l==null?void 0:l.search,b),hash:Ni(S.hash.slice(1)).path,state:Rr(l==null?void 0:l.state,w)}},c=a(i),{__tempLocation:f,__tempKey:h}=c.state;if(f&&(!h||h===this.tempLocationKey)){const p=a(f);return p.state.key=c.state.key,p.state.__TSR_key=c.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:c}}return c},this.resolvePathWithBase=(i,l)=>C0({base:i,to:l,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,l,a)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:l},a):this.matchRoutesInternal(i,l),this.getMatchedRoutes=i=>{const l=Object.create(null),a=v0(kn(i),this.processedTree,!0);return a&&Object.assign(l,a.rawParams),[(a==null?void 0:a.branch)||[this.routesById.__root__],l,a==null?void 0:a.route]},this.buildLocation=i=>{const l=(c={})=>{var z,q;if(c.href){const J=Ll(c.href,{});c={...c,to:dc(this.rewrite,new URL(J.pathname,this.origin)).pathname,search:this.options.parseSearch(J.search),hash:J.hash.slice(1)}}const f=c._fromLocation||this._pendingLocation||this.latestLocation,h=this.matchRoutesLightweight(f);c.from;const p=c.unsafeRelative==="path"?f.pathname:c.from??h[1],m=h[2],x=h[3],y=this.resolvePathWithBase(p,c.to?`${c.to}`:".");let w=pp(c.params,x);const k=this.routesByPath[kn(y)];let S;if(k)S=this.getRouteBranch(k);else if(y.includes("$"))S=[];else{const[J,Z,de]=this.getMatchedRoutes(y);S=J,this.options.notFoundRoute&&(!de||de.path!=="/"&&Z["**"])&&(S=[...S,this.options.notFoundRoute])}if(S.length&&um(w))for(const J of S){const Z=((z=J.options.params)==null?void 0:z.stringify)??J.options.stringifyParams;if(Z){w===x&&(w=Object.assign(Object.create(null),w));try{Object.assign(w,Z(w))}catch{}}}const b=i.leaveParams?y:Ni(ip({path:y,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let C=m;if(i._includeValidateSearch&&((q=this.options.search)!=null&&q.strict)){const J={};S.forEach(Z=>{if(Z.options.validateSearch)try{Object.assign(J,bl(Z.options.validateSearch,{...J,...C}))}catch{}}),C=J}C=Y0(C,c,S,i._includeValidateSearch),C=Pr(m,C);const L=this.options.stringifySearch(C),N=c.hash===!0?f.hash:c.hash?zs(c.hash,f.hash):void 0,F=N?`#${N}`:"";let I=c.state===!0?f.state:c.state?zs(c.state,f.state):{};c.state&&(I=Rr(f.state,I));const U=`${b}${L}${F}`;let O,Y,Q=!1;if(this.rewrite){const J=new URL(U,this.origin),Z=xm(this.rewrite,J);O=J.href.replace(J.origin,""),Z.origin!==this.origin?(Y=Z.href,Q=!0):Y=Z.pathname+Z.search+Z.hash}else O=f0(U),Y=O;return{publicHref:Y,href:O,pathname:b,search:C,searchStr:L,state:I,hash:N??"",external:Q,unmaskOnReload:c.unmaskOnReload}},a=l(i);if(i.mask)a.maskedLocation=l({from:i.from,...i.mask});else if(this.options.routeMasks){const c=g0(a.pathname,this.processedTree);if(c){const f=Object.assign(Object.create(null),c.rawParams),{from:h,params:p,...m}=c.route,x=pp(p,f);a.maskedLocation=l({from:i.from,...m,params:x})}}return a},this.commitLocation=async({viewTransition:i,ignoreBlocker:l,...a})=>{let c;const f=kn(this.latestLocation.href)===kn(a.href)&&ir(hp(a.state),hp(this.latestLocation.state)),h=this._commitPromise;let p;const m=new Promise(x=>{p=x});if(m.resolve=()=>{p(),h==null||h.resolve()},this._commitPromise=m,f)this.load();else{let{maskedLocation:x,hashScrollIntoView:y,...w}=a;x&&(w={...x,state:{...x.state,__tempKey:void 0,__tempLocation:{...w,search:w.searchStr,state:{...w.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(w.unmaskOnReload??this.options.unmaskOnReload??!1)&&(w.state.__tempKey=this.tempLocationKey)),w.state.__hashScrollIntoViewOptions=y??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,c=a.replace?"REPLACE":"PUSH",this.history[c==="REPLACE"?"replace":"push"](w.publicHref,w.state,{ignoreBlocker:l}),this.history.subscribers.size||this.load({action:{type:c}})}return this._scroll.next=a.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:i,resetScroll:l,hashScrollIntoView:a,viewTransition:c,ignoreBlocker:f,...h}={})=>{const p=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=p;const m=this.commitLocation({...p,viewTransition:c,replace:i,resetScroll:l,hashScrollIntoView:a,ignoreBlocker:f});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),m},this.navigate=async({to:i,reloadDocument:l,href:a,publicHref:c,...f})=>{var p,m;let h=!1;if(a)try{new URL(`${a}`),h=!0}catch{}if(h&&!l&&(l=!0),l){if(i!==void 0||!a){const y=this.buildLocation({to:i,...f});a=a??y.publicHref,c=c??y.publicHref}const x=!h&&c?c:a;if(jl(x,this.protocolAllowlist))return;if(!f.ignoreBlocker){const y=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const w of y)if(w!=null&&w.blockerFn&&await w.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}f.replace?window.location.replace(x):window.location.href=x;return}return this.buildAndCommitLocation({...f,href:a,to:i,_isNavigate:!0})},this.load=async i=>{this.updateLatestLocation(),i!=null&&i.action&&(this._scroll.hash=i.action.type==="PUSH"||i.action.type==="REPLACE"),await ix(this,i)},this.startViewTransition=i=>{var a,c;const l=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,l&&typeof document.startViewTransition=="function"){let f;if(typeof l=="object"&&((c=(a=window.CSS)==null?void 0:a.supports)!=null&&c.call(a,"selector(:active-view-transition-type(a))"))){const h=this.latestLocation,p=this.stores.resolvedLocation.get(),m=typeof l.types=="function"?l.types(Fl(h,p)):l.types;if(m===!1)return i();f={update:i,types:m}}else f=i;return document.startViewTransition(f).updateCallbackDone}return i()},this.invalidate=i=>{var m,x;const l=this._committed,a=i==null?void 0:i.filter,c=this._preloads,f=new Set([...l,...this._cache.values(),...[...(c==null?void 0:c.values())??[]].flat(),...((m=this._tx)==null?void 0:m[3])??[]].filter(y=>!a||a(y)).map(y=>y.id)),h=[];for(const[y,w]of c??[])w.some(k=>f.has(k.id))&&(c.delete(y),h.push(y));const p=y=>{if(f.has(y.id)){const w=this.routesById[y.routeId],k={...y,invalid:!0,...(i!=null&&i.forcePending||y.status==="error"||y.status==="notFound")&&fp(w)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,k}return y};this._committed=l.map(p);for(const[y,w]of this._cache)f.has(y)&&(w.invalid=!0,i!=null&&i.forcePending&&(w.status="pending"));for(const y of f)(x=this._flights)==null||x.delete(y);for(const y of h)y.abort();return this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.resolveRedirect=i=>{const l=i.headers.get("Location");if(i.options.href){if(l)try{const a=new URL(l);if(this.origin&&a.origin===this.origin){const c=a.pathname+a.search+a.hash;i.options.href=c,i.headers.set("Location",c)}}catch{}}else{const a=this.buildLocation(i.options).publicHref||"/";i.options.href=a,i.headers.set("Location",a)}if(i.options.href&&jl(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{var m;const l=this._cache,a=this._preloads,c=i==null?void 0:i.filter,f=[],h=[];for(const[x,y]of l)(!c||c(y))&&(h.push(x),f.push(y));const p=[];for(const[x,y]of a??[])(!c||y.some(c))&&(p.push(x),f.push(...y));for(const x of h)l.delete(x);for(const x of p)a.delete(x);for(const x of f){const y=x._flight;x._flight=void 0,y&&!--y[2]&&(((m=this._flights)==null?void 0:m.get(x.id))===y&&this._flights.delete(x.id),p.push(y[1]))}for(const x of p)x.abort()},this.loadRouteChunk=Ss,this.preloadRoute=i=>ox(this,i),this.matchRoute=(i,l)=>{const a={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},c=this.buildLocation(a),f=this.stores.status.get()==="pending";if(l!=null&&l.pending&&!f)return!1;const h=(l==null?void 0:l.pending)??!f?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=y0(c.pathname,(l==null?void 0:l.caseSensitive)??!1,(l==null?void 0:l.fuzzy)??!1,h.pathname,this.processedTree);return!p||i.params&&!ir(p.rawParams,i.params,{partial:!0})?!1:(l==null?void 0:l.includeSearch)??!0?ir(h.search,c.search,{partial:!0})?p.rawParams:!1:p.rawParams},this.getStoreConfig=r,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??O0,parseSearch:n.parseSearch??z0,protocolAllowlist:n.protocolAllowlist??d0}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:r,processedTree:i}){this.routesById=n,this.routesByPath=r,this.processedTree=i;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)}getRouteBranch(n){let r=this.routeBranchCache.get(n);return r||(r=pm(n),this.routeBranchCache.set(n,r)),r}matchRoutesInternal(n,r){var w,k;const[i,l,a]=this.getMatchedRoutes(n.pathname);let c=i,f=!1;(a?a.path!=="/"&&l["**"]:kn(n.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:f=!0);const h=f?Z0(this.options.notFoundMode,c):void 0,p=new Array(c.length),m=this._committed,x=(S,b)=>{const C=m[b];return(C==null?void 0:C.routeId)===S.id?C:S===this.options.notFoundRoute?m.find(L=>L.routeId===S.id):void 0};let y;for(let S=0;S{const k=w(p.preSearchFilters?p.preSearchFilters.reduce((S,b)=>b(S),y):y);return p.postSearchFilters?p.postSearchFilters.reduce((S,b)=>b(S),k):k};a.push(x)}const m=p.validateSearch;if(l&&m){const x=({search:y,next:w,meta:k})=>{const S=w(y);try{const b=bl(m,S);if(k&&b)for(const C in b)C in S||(k.defaulted||(k.defaulted=new Map)).set(C,b[C]);return{...S,...b}}catch{}return S};a.push(x)}}const c=(h,p,m)=>{if(h>=a.length){if(!r.search)return{};if(r.search===!0)return p;const y=zs(r.search,p);return m&&(m.explicit=y),y}const x=(y,w)=>{if(w){const k=m||{};return{search:c(h+1,y,k),meta:k}}return c(h+1,y,m)};return a[h]({search:p,next:x,meta:m})};return c(0,n)}function Z0(n,r){if(n!=="root"){let i;for(let l=r.length-1;l>=0;l--){const a=r[l];if(a.options.notFoundComponent)return a.id;i||(i=a.children&&a.id)}if(i)return i}return ks}function pp(n,r){if(n===!1||n===null)return Object.create(null);if((n??!0)===!0)return r;const i=Object.assign(Object.create(null),r);return Object.assign(i,zs(n,i))}function mp(n,r){var l;const i=((l=n.options.params)==null?void 0:l.parse)??n.options.parseParams;i&&Object.assign(r,i(r))}function fc(n,r){var i,l;return(l=(i=n.options[r])==null?void 0:i.preload)==null?void 0:l.call(i)}function X0(n,r){const i=fc(n,"component");let l=fc(n,"pendingComponent");return r&&(l?l=l.then(r):r()),i&&l?Promise.all([i,l]).then(()=>{}):i??l}function Ss(n,r,i){const l=()=>r===!1?void 0:r?fc(n,r):X0(n,i),a=n._lazy;if(a)return a===!0?l():a.then(l);if(!n.lazyFn)return l();const c=n.lazyFn().then(f=>{{const{id:h,...p}=f.options;Object.assign(n.options,p),n._lazy=!0}},f=>{throw n._lazy=void 0,f});return n._lazy=c,c.then(l)}function Dc(n){const r=n.findIndex(i=>i.status!=="success"||i._notFound)+1;return r&&r{const a=()=>l(r);r.addEventListener("abort",a,{once:!0}),Promise.resolve(n).then(i,l).finally(()=>r.removeEventListener("abort",a))})}function $r(n,r){return n.routesById[r.routeId]}function Wi(n,r,i){return vm(n)?[Rt,n]:Os(n)?(n.routeId||(n.routeId=i),[zl,n]):r?(typeof(n==null?void 0:n.then)=="function"&&(n=new Error("A Promise was thrown",{cause:n})),[bn,n]):[on,n]}function Fc(n,r){var l,a;let i=Wi(r,!0,n.id);if(i[0]!==bn)return i;try{(a=(l=n.options).onError)==null||a.call(l,i[1])}catch(c){i=Wi(c,!0,n.id)}return i}function Fi(n,r,i,l,a){return a[0].signal.aborted?lr:Ac(n,r,i,Fc(i,l),a)}async function J0(n,r,i,l,a,c){var x,y;const[f,h]=r,p=i[0].signal,m=!!i[3];for(let w=i[6]??0;wn.navigate({...I,_fromLocation:f}),buildLocation:n.buildLocation,cause:m?"preload":k.cause,abortController:i[0],preload:m,matches:h,routeId:S.id};try{const I=k._ctx||(k._ctx=S.options.context?S.options.context({...C,deps:k.loaderDeps,context:b})||{}:void 0);k.context={...b,...I}}catch(I){return Sn(n,k),[w,Fi(n,r,S,I,i)]}if(p.aborted)return[w,lr];const L=k.paramsError??k.searchError;if(L!==void 0)return Sn(n,k),[w,Fi(n,r,S,L,i)];const N=S.options.beforeLoad;if(!N)continue;const F=k.status;w>=c&&(k.status="pending",(y=i[7])==null||y.call(i));try{Qi(n,k,"beforeLoad",i[0]);const I=await Br(N({...C,search:k.search,context:k.context,...n.options.additionalContext}),p);if(p.aborted)return[w,lr];const U=Ac(n,r,S,Wi(I,!1,S.id),i);if(U[0]!==on)return Sn(n,k),[w,U];k.context={...k.context,...I}}catch(I){return Sn(n,k),[w,Fi(n,r,S,I,i)]}finally{k.status=F,Qi(n,k,!1,i[0])}}a()}function zc(n,r,i){var l;if(!(!i||--i[2])){if(((l=n._flights)==null?void 0:l.get(r.id))===i){const a=n._tx;if(a&&!a[0].signal.aborted&&!a[3].includes(r)&&a[3].some(c=>c.id===r.id)&&a[3].some(c=>c.isFetching==="beforeLoad"))return;n._flights.delete(r.id)}return i[1]}}function Sn(n,r){var l;const i=r._flight;r._flight=void 0,(l=zc(n,r,i))==null||l.abort()}function kt(n,r,i,l){var c;const a=[];for(const f of r)if(!(i!=null&&i.includes(f))){const h=f._flight;if(f._flight=void 0,l&&(h==null?void 0:h[2])===1&&((c=n._flights)==null?void 0:c.get(f.id))===h&&(i!=null&&i.some(p=>p.id===f.id)))h[2]=0;else{const p=zc(n,f,h);p&&a.push(p)}}for(const f of a)f.abort()}function Oc(n){for(const r of n){const i=r._flight;i&&i[2]++}}function Qi(n,r,i,l){var f;if(r.isFetching=i,l&&((f=n._tx)==null?void 0:f[0])!==l)return;const a=n.stores.byRoute.get(r.routeId),c=a==null?void 0:a.get();(c==null?void 0:c.id)===r.id&&a.set({...c,isFetching:i})}function wm(n,r,i,l,a,c,f){const h=r[0];return{params:i.params,location:h,navigate:p=>n.navigate({...p,_fromLocation:h}),cause:f?"preload":i.cause,abortController:a,preload:f,deps:i.loaderDeps,parentMatchPromise:c,context:i.context,route:l,...n.options.additionalContext}}async function gp(n,r,i,l,a,c,f){const h=f[0],p=h.signal;if(p.aborted)return lr;if(!a)return[on,void 0];let m=i._flight;Qi(n,i,"loader",h);try{if(!m){const x=new AbortController;m=[Promise.resolve().then(()=>a(wm(n,r,i,l,x,c,!!f[3]))).then(y=>Wi(y,!1,l.id),y=>Wi(y,!0,l.id)).then(y=>{var w;return y[0]!==on&&((w=n._flights)==null?void 0:w.get(i.id))===m&&(n._flights.delete(i.id),m[2]||x.abort()),y[0]===bn&&m[2]?Fc(l,y[1]):y}),x,1],(n._flights??(n._flights=new Map)).set(i.id,m)}return i._flight=m,i.abortController=m[1],Ac(n,r,l,await Br(m[0],p),f)}catch(x){if(x!==p||!p.aborted)throw x;return Sn(n,i),lr}finally{Qi(n,i,!1,h)}}function yp(n,r,i){r[0]!==Rt&&(n.status="success",n.error=void 0,r[0]===on?(n.loaderData=r[1],n.invalid=!1,n.updatedAt=Date.now(),n.preload=i):n.invalid=!0)}function ex(n,r,i){const l=n._cache.get(r.id);if(l!==i||n._committed.some(c=>c.id===r.id&&c._flight===r._flight))return;const a={...r,_notFound:void 0,context:{}};a._flight&&a._flight[2]++,n._cache.set(r.id,a),l&&Sn(n,l)}function vp(n,r){return r[0]===bn||r[0]===zl?{...n,status:r[0]===bn?"error":"notFound",error:r[1],_flight:void 0}:n}function tx(n,r,i,l,a,c,f){var Z,de;const h=r[1][i],p=$r(n,h),m=!!c[3],x=n._cache.get(h.id);let y,w=!1,k;try{if(h.status==="success"&&(y=p.options.shouldReload,typeof y=="function"&&(y=y(wm(n,r,h,p,c[0],a,m))),c[0].signal.aborted&&(k=lr)),!k)if(h.status!=="success")w=!0;else{const W=m||h.preload?p.options.preloadStaleTime??n.options.defaultPreloadStaleTime??3e4:p.options.staleTime??n.options.defaultStaleTime??0;w=!!(h.invalid||y||y===void 0&&Date.now()-h.updatedAt>=W&&(c[5]||h.cause==="enter"||c[2].some(ee=>ee.routeId===h.routeId&&ee.id!==h.id)))}}catch(W){h.invalid=!0,Sn(n,h),k=Fi(n,r,p,W,c)}const S=p.options.loader,b=typeof S=="function",C=b?S:S==null?void 0:S.handler,L=!m||p.options.preload!==!1;let N=L&&S?(Z=n._flights)==null?void 0:Z.get(h.id):void 0;N===h._flight||k?N=void 0:N&&!w&&!m&&y===void 0?w=!0:w||(N=void 0);const F=!!(S&&w&&h.status==="success"&&!m&&!c[4]&&((b?void 0:S.staleReloadMode)??n.options.defaultStaleReloadMode)!=="blocking"),I=w&&L,U=I&&!F&&(h.status!=="success"||!!S),O=i>=f?c[7]:void 0,Y=p.lazyFn&&p._lazy!==!0?O:void 0;if(I&&!S&&(h.invalid=!1,h.updatedAt=Date.now()),N&&N[2]++,U){const W=h._flight;h._flight=N,(de=zc(n,h,W))==null||de.abort(),i>=f&&(h.status="pending"),O==null||O()}I||(h.isFetching=!1);const Q=(k?Promise.resolve(k):U?gp(n,r,h,p,C,a,c):Promise.resolve([on,h.loaderData])).then(W=>(U&&(yp(h,W,m),W[0]===on&&(S&&!c[0].signal.aborted&&ex(n,h,x),i>=f&&(h.status="pending"))),W)),z=Br(Promise.resolve().then(()=>Ss(p,void 0,Y)),c[0].signal).then(()=>{},W=>r[1].some((ee,we)=>we<=i&&(ee.status==="error"||ee.status==="notFound"||ee._notFound))?void 0:[i,Fi(n,r,p,W,c)]).then(W=>Q.then(ee=>(U&&!W&&ee[0]===on&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",O==null||O()),W)));if(l.push([i,Q,z]),!F)return Q.then(W=>vp(h,W));const q={...h,status:"pending",preload:!1,_flight:N};h.invalid=!1,h.isFetching="loader";const J=gp(n,r,q,p,C,a,c).then(W=>(h.isFetching=!1,yp(q,W,!1),W));return(r[2]??(r[2]=[])).push([i,J,z,q]),J.then(W=>vp(q,W))}async function hc(n,r,i,l,a=0){const c=i==null?void 0:i[1][1];let f=c!=null&&c.routeId?r.findIndex(h=>h.routeId===c.routeId):(i==null?void 0:i[0])??r.length-1;f<0&&(f=0);for(let h=f;h>=0;h--){const p=$r(n,r[h]);try{const m=Ss(p,!1);m&&await Br(m,l)}catch(m){if(m===l&&l.aborted)throw m}if(p.options.notFoundComponent)return h}return c!=null&&c.routeId?f:a}function Ar(n,r){r[2]&&(kt(n,r[2].map(i=>i[3])),r[2]=void 0)}async function xp(n,r,i,l){let a;try{await Promise.all(n.map(c=>c[1].then(async f=>{const h=c[0];if(!(l&&h>=await l)){if(f[0]>=Rt)throw[h,f];!a&&f[0]!==on&&(a=[h,f],await Promise.all((i??[]).map(p=>{if(!(p[0]<=h))return p[1].then(m=>{if(m[0]===Rt)throw[p[0],m]})})))}})))}catch(c){return c}return r??a}function Ac(n,r,i,l,a,c){for(;l[0]===Rt;){const f=l[1],h=f.options;if(h.reloadDocument?a[3]:a[1]>=20)return l;try{return h.href&&h.reloadDocument?(n.resolveRedirect(f),l):[Rt,f,n.buildLocation({...h,_fromLocation:r[0],_includeValidateSearch:!0})]}catch(p){l=c?[bn,p]:Fc(i,p),c=!0}}return l}async function km(n,r,i,l,a,c){const f=r[1];let h=await a,p=!1;const m=f.findIndex(k=>k._notFound),x=k=>k[1][0]===zl?hc(n,f,k,l.signal):k[0];let y=m<0?f.length:m;if(((h==null?void 0:h[1][0])??0)>=Rt)y=0;else if(h){y=h[2]??(h[2]=await x(h));for(const k of i){if(k[0]>=y)break;const S=await k[1];if(S[0]!==on&&S[0]=y)break;const S=await k[2];if(S){h=S;break}}if(((h==null?void 0:h[1][0])??0)>=Rt){const k=h[1];if(k[0]!==Rt||k[1].options.reloadDocument||k[2])return Ar(n,r),k;p=!0,h=[0,[bn,new Error("Too many redirects")]]}const w=h?h[2]??await x(h):m;if(w>=0){const k=h==null?void 0:h[1],S=k==null?void 0:k[0],b=f[w],C=k==null?void 0:k[1],L=()=>{k&&(b._notFound=void 0,S===bn?b.status="error":(C.routeId=b.routeId,b.routeId===n.routeTree.id?(b.status="success",b._notFound=!0):b.status="notFound"),b.error=C,b.isFetching=!1)};L(),k||c==null||c();const N=$r(n,b);try{await Br(k?Promise.resolve().then(()=>Ss(N,S===bn?"errorComponent":"notFoundComponent")):Promise.all([Ss(N),Ss(N,"notFoundComponent")]),l.signal)}catch(F){if(F===l.signal&&l.signal.aborted)return Ar(n,r),lr}k?p&&(l.abort(),await Promise.all([...i.map(F=>F[1]),...i.map(F=>F[2]),...(r[2]??[]).map(F=>F[1])]),Ar(n,r),kt(n,f),L()):b.status="success"}return r}async function Sm(n,r,i,l=0,a=r[1].length){var f,h;const c=r[1];for(let p=l;pN._notFound);if(n.options.notFoundMode!=="root"&&m>=0){const N=await hc(n,i,void 0,c,m);i[m]._notFound=void 0,i[N]._notFound=!0,m=N}let x=m<0?i.length:m+1,y=0;for(;y{for(let N=k;N=Rt&&(x=0);b()}if(!c.aborted&&!l[3]){const N=[];for(const[F,I]of n._flights??[])I[2]||(n._flights.delete(F),N.push(I[1]));for(const F of N)F.abort()}const L=km(n,a,w,l[0],xp(w,C,a[2]),l[7]);(h=a[2])!=null&&h.length&&(a[3]=xp(a[2],void 0,void 0,L.then(N=>Hi(N)?0:Dc(i).length,()=>0))),f=await L}catch(p){if(Ar(n,a),p===c&&c.aborted)return lr;throw p}return Hi(f)?f:Sm(n,f,c,l[6]===i.length?l[6]:0)}function pc(n,r){var c,f;if(n._tx!==r)return;const i=r[3],l=n.stores.matches.get();let a=n._pending;for(let h=0;h0){a[3]=setTimeout(()=>pc(n,r),N);return}a[2]=0}const C=i.map(N=>({...N,_flight:void 0}));C[h].status="pending";const L=a[4]=n.startTransition(()=>n.stores.setMatches(C),C).then(N=>(N&&n._pending===a&&a[4]===L&&!a[2]&&(a[2]=Date.now()+S),N));return}}function Li(n,r){var l;const i=n._pending;(n._tx===r||!((l=n._tx)!=null&&l[3].some(a=>a.id===(i==null?void 0:i[1]))))&&(clearTimeout(i==null?void 0:i[3]),n._pending=void 0)}async function wp(n,r){const i=n._pending;if(!i)return;clearTimeout(i[3]);const l=i[2]-Date.now();if(!i[4]||l<=0||!Dc(r[3]).some(c=>c.id===i[1]))return;let a;try{await Br(new Promise(c=>{a=setTimeout(c,l)}),r[0].signal)}catch{}clearTimeout(a)}function _m(n,r){n._committed=r,n.stores.setMatches(r)}function nx(n,r,i,l){const a=n._committed,c=n._cache;for(const p of i)p.preload=!1,l&&(p._assetEnd=void 0);const f=Dc(i).length,h=new Map;{const p=Date.now();for(const m of[...a,...c.values()]){if(m.status!=="success"||i.some((y,w)=>y.id===m.id&&(w=(m.preload?x.options.preloadGcTime??n.options.defaultPreloadGcTime??3e5:x.options.gcTime??n.options.defaultGcTime??3e5)||h.set(m.id,c.get(m.id)===m?m:{...m,_flight:void 0,isFetching:!1,context:{}})}}r[3]=[],n._cache=h,_m(n,i),kt(n,[...c.values(),...a],[...i,...h.values()]),K0(n,a,i,r)}async function vl(n,r){let i=n._tx;for(;i&&i!==r;){if(await i[5],n._tx===i)return;i=n._tx}}function Cm(n,r,i){const l=i[1].options,a=i[2];if(!a)return n.navigate({...l,replace:!0,ignoreBlocker:!0});if(l.reloadDocument)return n.navigate({href:a.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});a._redirects=r[1]+1,n._pendingLocation=a;const c=n.commitLocation({...a,viewTransition:l.viewTransition,replace:!0,resetScroll:l.resetScroll,hashScrollIntoView:l.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{n._pendingLocation===a&&(n._pendingLocation=void 0)}),c}async function rx(n,r,i,l,a){const c=i.map(p=>({...p}));Oc(c);for(const p of l)Sn(n,c[p[0]]),c[p[0]]=p[3];const f=[r[2],c];let h;try{h=await km(n,f,l,r[0],a)}catch(p){throw kt(n,c),p}if(Hi(h)){kt(n,c),h[0]===Rt&&n._tx===r&&n._committed===i&&await Cm(n,r,h);return}if(await Sm(n,h,r[0].signal),n._tx!==r||n._committed!==i){kt(n,c);return}for(const p of c){const m=n._cache.get(p.id);m!=null&&m._flight&&m._flight===p._flight&&(n._cache.delete(p.id),Sn(n,m))}_m(n,c),kt(n,i,c)}async function sx(n,r,i,l,a,c){const f=await bm(n,r[2],r[3],[r[0],r[1],n._committed,void 0,a,i,c,l]);if(Hi(f)){const y=f[0]===Rt&&n._tx===r;if((!y||f[1].options.reloadDocument)&&Li(n,r),kt(n,r[3]),r[3]=[],!y)return;if(n._tx!==r){Li(n,r);return}await Cm(n,r,f);return}const h=f[1];if(n._tx===r&&await wp(n,r),n._tx!==r){Li(n,r),kt(n,h),Ar(n,f);return}const p=r[2],m=Fl(p,n.stores.resolvedLocation.get()),x=f[2];await n.startViewTransition(async()=>{var k;if(n._tx===r&&await wp(n,r),n._tx!==r){Li(n,r),kt(n,h),Ar(n,f);return}const y=()=>{Li(n,r),nx(n,r,h,c),n._tx===r&&(n.emit({type:"onLoad",...m}),n._tx===r&&n.emit({type:"onBeforeRouteMount",...m}))},w=await n.startTransition(y,h);if(n._tx!==r){Ar(n,f);return}x!=null&&x.length&&rx(n,r,h,x,f[3]).catch(console.error),n.batch(()=>{n.stores.resolvedLocation.set(p),n.stores.status.set("idle"),n._tx===r&&n.emit({type:"onResolved",...m}),w&&n._tx===r&&n.emit({type:"onRendered",...m})}),n._tx===r&&((k=n._commitPromise)==null||k.resolve(),n._commitPromise=void 0)})}async function ix(n,r){var I;const i=n._tx,l=n.stores.resolvedLocation.get(),a=l??n.stores.location.get(),c=n.latestLocation,f=n._pendingLocation,h=(f==null?void 0:f.href)===c.href?f._redirects??0:0,p=n._handoff,m=p==null?void 0:p[0](),x=new AbortController,y=n._preflight;if(n._preflight=x,m||p==null||p[1](),y==null||y.abort(),!x.signal.aborted){const U=Fl(c,l);n.emit({type:"onBeforeNavigate",...U}),x.signal.aborted||n.emit({type:"onBeforeLoad",...U})}if(x.signal.aborted){await vl(n,i);return}const w=a.href===c.href;let k=x;const S=n.matchRoutes(c,{_controller:x});Oc(S);const b=m?p[1](S):void 0;if(b?k=m:m==null||m.abort(),x.signal.aborted){kt(n,S),await vl(n,i);return}n._preflight=void 0;let C;const L=()=>sx(n,F,w,()=>pc(n,F),r==null?void 0:r.sync,b),N=r!=null&&r.sync?new Promise(U=>C=U):Promise.resolve().then(L).then(),F=[k,h,c,S,Date.now(),N];if(n._tx=F,i){for(const U of n.stores.matches.get()){if(n._tx!==F)break;U.isFetching&&Qi(n,U,!1)}i[0].abort(),kt(n,i[3],F[3],!0)}if(n._tx!==F){kt(n,F[3]),F[3]=[],C==null||C(),await vl(n,F);return}n.batch(()=>{n.stores.status.set("pending"),n.stores.location.set(c)}),(b||!n._committed.length&&((I=S[0])==null?void 0:I.status)!=="success"&&!S.some(U=>U._notFound))&&pc(n,F),C==null||C(L()),await N,await vl(n,F)}async function ox(n,r){let i=n.buildLocation(r);for(let l=0;;l++){const a=n._committed,c=new AbortController;let f,h,p;try{try{f=n.matchRoutes(i,{_controller:c}),Oc(f),h=(n._preloads??(n._preloads=new Map)).set(c,f),p=await bm(n,i,f,[c,l,a,!0])}finally{h&&(h=h.delete(c),kt(n,f)),c.abort()}if(!Hi(p))return p[1];if(!h||p.length<3)return;i=p[2]}catch(m){Os(m)||console.error(m);return}}}const lx="Error preloading route! ☝️";var Em=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=r=>{var p,m;this.originalIndex=r.originalIndex;const i=this.options,l=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),l?this._path=ks:this.parentRoute||Mc();let a=l?ks:i==null?void 0:i.path;a&&a!=="/"&&(a=mm(a));const c=(i==null?void 0:i.id)||a;let f=l?ks:wl([this.parentRoute.id==="__root__"?"":this.parentRoute.id,c]);a==="__root__"&&(a="/"),f!=="__root__"&&(f=wl(["/",f]));const h=f==="__root__"?"/":wl([this.parentRoute.fullPath,a]);this._path=a,this._id=f,this._fullPath=h,this._to=kn(h)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>ym({from:this.fullPath,...r}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},ax=class extends Em{constructor(n){super(n)}},Uc=class extends H.Component{constructor(...n){super(...n),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(n,r){const i=n.getResetKey();return r.error&&r.resetKey!==i?{resetKey:i,error:null}:{resetKey:i}}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var i,l;(l=(i=this.props).onCatch)==null||l.call(i,n,r)}render(){const n=this.state.error;return n?H.createElement(this.props.errorComponent??ux,{error:n,reset:this.reset}):this.props.children}};function ux({error:n}){const[r,i]=H.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(l=>!l),children:r?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),r?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?v.jsx("code",{children:n.message}):null})}):null]})}function cx({children:n,fallback:r=null}){return v.jsx(Ur.Fragment,{children:Pm()?n:r})}function Pm(){return Ur.useSyncExternalStore(dx,()=>!0,()=>!1)}function dx(){return()=>{}}var jm=H.createContext(null);function Kt(n){return H.useContext(jm)}var Ol=H.createContext(void 0),fx=H.createContext(void 0),Oe=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(Oe||{});function hx({update:n,notify:r,unwatched:i}){return{link:l,unlink:a,propagate:c,checkDirty:f,shallowPropagate:h};function l(m,x,y){const w=x.depsTail;if(w!==void 0&&w.dep===m)return;const k=w!==void 0?w.nextDep:x.deps;if(k!==void 0&&k.dep===m){k.version=y,x.depsTail=k;return}const S=m.subsTail;if(S!==void 0&&S.version===y&&S.sub===x)return;const b=x.depsTail=m.subsTail={version:y,dep:m,sub:x,prevDep:w,nextDep:k,prevSub:S,nextSub:void 0};k!==void 0&&(k.prevDep=b),w!==void 0?w.nextDep=b:x.deps=b,S!==void 0?S.nextSub=b:m.subs=b}function a(m,x=m.sub){const y=m.dep,w=m.prevDep,k=m.nextDep,S=m.nextSub,b=m.prevSub;return k!==void 0?k.prevDep=w:x.depsTail=w,w!==void 0?w.nextDep=k:x.deps=k,S!==void 0?S.prevSub=b:y.subsTail=b,b!==void 0?b.nextSub=S:(y.subs=S)===void 0&&i(y),k}function c(m){let x=m.nextSub,y;e:do{const w=m.sub;let k=w.flags;if(k&60?k&12?k&4?!(k&48)&&p(m,w)?(w.flags=k|40,k&=1):k=0:w.flags=k&-9|32:k=0:w.flags=k|32,k&2&&r(w),k&1){const S=w.subs;if(S!==void 0){const b=(m=S).nextSub;b!==void 0&&(y={value:x,prev:y},x=b);continue}}if((m=x)!==void 0){x=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){x=m.nextSub;continue e}break}while(!0)}function f(m,x){let y,w=0,k=!1;e:do{const S=m.dep,b=S.flags;if(x.flags&16)k=!0;else if((b&17)===17){if(n(S)){const C=S.subs;C.nextSub!==void 0&&h(C),k=!0}}else if((b&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=S.deps,x=S,++w;continue}if(!k){const C=m.nextDep;if(C!==void 0){m=C;continue}}for(;w--;){const C=x.subs,L=C.nextSub!==void 0;if(L?(m=y.value,y=y.prev):m=C,k){if(n(x)){L&&h(C),x=m.sub;continue}k=!1}else x.flags&=-33;x=m.sub;const N=m.nextDep;if(N!==void 0){m=N;continue e}}return k}while(!0)}function h(m){do{const x=m.sub,y=x.flags;(y&48)===32&&(x.flags=y|16,(y&6)===2&&r(x))}while((m=m.nextSub)!==void 0)}function p(m,x){let y=x.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function px(n,r,i){var c,f,h;const l=typeof n=="object",a=l?n:void 0;return{next:(c=l?n.next:n)==null?void 0:c.bind(a),error:(f=l?n.error:r)==null?void 0:f.bind(a),complete:(h=l?n.complete:i)==null?void 0:h.bind(a)}}const mc=[];let _l=0;const{link:kp,unlink:mx,propagate:gx,checkDirty:Rm,shallowPropagate:Sp}=hx({update(n){return n._update()},notify(n){mc[gc++]=n,n.flags&=~Oe.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Oe.Mutable|Oe.Dirty,Tl(n))}});let xl=0,gc=0,tn,yc=0;function yx(n){try{++yc,n()}finally{--yc||Nm()}}function Tl(n){const r=n.depsTail;let i=r!==void 0?r.nextDep:n.deps;for(;i!==void 0;)i=mx(i,n)}function Nm(){if(!(yc>0)){for(;xl{var m;a.get(),h.current?(m=f.next)==null||m.call(f,a._snapshot):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const f=tn,h=(r==null?void 0:r.compare)??Object.is;if(i)tn=a,++_l,a.depsTail=void 0;else if(c===void 0)return!1;i&&(a.flags=Oe.Mutable|Oe.RecursedCheck);try{const p=a._snapshot,m=typeof c=="function"?c(p):c===void 0&&i?l(p):c;return p===void 0||!h(p,m)?(a._snapshot=m,!0):!1}finally{tn=f,i&&(a.flags&=~Oe.RecursedCheck),Tl(a)}}};return i?(a.flags=Oe.Mutable|Oe.Dirty,a.get=function(){const c=a.flags;if(c&Oe.Dirty||c&Oe.Pending&&Rm(a.deps,a)){if(a._update()){const f=a.subs;f!==void 0&&Sp(f)}}else c&Oe.Pending&&(a.flags=c&~Oe.Pending);return tn!==void 0&&kp(a,tn,_l),a._snapshot}):a.set=function(c){if(a._update(c)){const f=a.subs;f!==void 0&&(gx(f),Sp(f),Nm())}},a}function vx(n){const r=()=>{const l=tn;tn=i,++_l,i.depsTail=void 0,i.flags=Oe.Watching|Oe.RecursedCheck;try{return n()}finally{tn=l,i.flags&=~Oe.RecursedCheck,Tl(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Oe.Watching|Oe.RecursedCheck,notify(){const l=this.flags;l&Oe.Dirty||l&Oe.Pending&&Rm(this.deps,this)?r():this.flags=Oe.Watching},stop(){this.flags=Oe.None,this.depsTail=void 0,Tl(this)}};return r(),i}var Uu={exports:{}},Bu={},$u={exports:{}},Vu={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _p;function xx(){if(_p)return Vu;_p=1;var n=Xi();function r(y,w){return y===w&&(y!==0||1/y===1/w)||y!==y&&w!==w}var i=typeof Object.is=="function"?Object.is:r,l=n.useState,a=n.useEffect,c=n.useLayoutEffect,f=n.useDebugValue;function h(y,w){var k=w(),S=l({inst:{value:k,getSnapshot:w}}),b=S[0].inst,C=S[1];return c(function(){b.value=k,b.getSnapshot=w,p(b)&&C({inst:b})},[y,k,w]),a(function(){return p(b)&&C({inst:b}),y(function(){p(b)&&C({inst:b})})},[y]),f(k),k}function p(y){var w=y.getSnapshot;y=y.value;try{var k=w();return!i(y,k)}catch{return!0}}function m(y,w){return w()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Vu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,Vu}var Cp;function wx(){return Cp||(Cp=1,$u.exports=xx()),$u.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ep;function kx(){if(Ep)return Bu;Ep=1;var n=Xi(),r=wx();function i(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var l=typeof Object.is=="function"?Object.is:i,a=r.useSyncExternalStore,c=n.useRef,f=n.useEffect,h=n.useMemo,p=n.useDebugValue;return Bu.useSyncExternalStoreWithSelector=function(m,x,y,w,k){var S=c(null);if(S.current===null){var b={hasValue:!1,value:null};S.current=b}else b=S.current;S=h(function(){function L(O){if(!N){if(N=!0,F=O,O=w(O),k!==void 0&&b.hasValue){var Y=b.value;if(k(Y,O))return I=Y}return I=O}if(Y=I,l(F,O))return Y;var Q=w(O);return k!==void 0&&k(Y,Q)?(F=O,Y):(F=O,I=Q)}var N=!1,F,I,U=y===void 0?null:y;return[function(){return L(x())},U===null?void 0:function(){return L(U())}]},[x,y,w,k]);var C=a(m,S[0],S[1]);return f(function(){b.hasValue=!0,b.value=C},[C]),p(C),C},Bu}var Pp;function Sx(){return Pp||(Pp=1,Uu.exports=kx()),Uu.exports}var bx=Sx();function _x(n,r){return n===r}function _n(n,r,i=_x){const l=H.useCallback(f=>{if(!n)return()=>{};const{unsubscribe:h}=n.subscribe(f);return h},[n]),a=H.useCallback(()=>n==null?void 0:n.get(),[n]);return bx.useSyncExternalStoreWithSelector(l,a,a,r,i)}var jp={};function Lm(n,r){const i=H.useRef();return l=>{const a=n!=null&&n.select?n.select(l):l;return(n==null?void 0:n.structuralSharing)??r.options.defaultStructuralSharing?i.current=Rr(i.current,a):a}}function Vr(n){const r=Kt(),i=H.useContext(n.from?fx:Ol),l=n.from??i,a=r.stores.getMatchStore(l),c=Lm(n,r),f=_n(a,h=>h?c(h):jp);if(f!==jp)return f;(n.shouldThrow??!0)&&Mc()}function Mm(n){return Vr({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.loaderData):r.loaderData})}function Tm(n){const{select:r,...i}=n;return Vr({...i,select:l=>r?r(l.loaderDeps):l.loaderDeps})}function Im(n){return Vr({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:r=>{const i=n.strict===!1?r.params:r._strictParams;return n.select?n.select(i):i}})}function Dm(n){return Vr({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:r=>n.select?n.select(r.search):r.search})}function Al(n){const r=Kt();return H.useCallback(i=>r.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,r])}function Fm(n){return Vr({...n,select:r=>n.select?n.select(r.context):r.context})}function Hu(n){const r=H.useRef(n);return ir(r.current,n,{ignoreUndefined:!1})||(r.current=n),r.current}function Cx(n,r){return n[0]===r[0]&&n[1]===r[1]&&n[2]===r[2]}function Ex(n,r,i){if(n!=null&&n.external)return jl(n.href,i)?void 0:n.href;if(!Tx(r)&&!(typeof r!="string"||r.indexOf(":")===-1))try{return new URL(r),jl(r,i)?void 0:r}catch{}}function Px(n,r,i,l,a,c){if(c)return!1;if(i!=null&&i.exact){if(!_0(n.pathname,r.pathname,l))return!1}else{const f=Nl(n.pathname,l),h=Nl(r.pathname,l);if(!(f.startsWith(h)&&(f.length===h.length||f[h.length]==="/")))return!1}return((i==null?void 0:i.includeSearch)??!0)&&!ir(n.search,r.search,{partial:!(i!=null&&i.exact),ignoreUndefined:!(i!=null&&i.explicitUndefined)})?!1:i!=null&&i.includeHash?a&&n.hash===r.hash:!0}function jx(n,r){const i=Kt(),l=o0(r),{activeProps:a,inactiveProps:c,activeOptions:f,to:h,preload:p,preloadDelay:m,preloadIntentProximity:x,hashScrollIntoView:y,replace:w,startTransition:k,resetScroll:S,viewTransition:b,children:C,target:L,disabled:N,style:F,className:I,onClick:U,onBlur:O,onFocus:Y,onMouseEnter:Q,onMouseLeave:z,onTouchStart:q,ignoreBlocker:J,params:Z,search:de,hash:W,state:ee,mask:we,reloadDocument:he,unsafeRelative:V,from:oe,_fromLocation:X,...R}=n,A=Pm(),pe=Hu(n.search),ge=Hu(n.params),ke=Hu(f),ye=H.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,pe,ge,n.state,n.mask,n.unsafeRelative]),Re=H.useCallback(Qe=>{const Lt=i.buildLocation({_fromLocation:Qe,...ye}),Gt=Mx(Lt.maskedLocation?Lt.maskedLocation.publicHref:Lt.publicHref,Lt.maskedLocation?Lt.maskedLocation.external:Lt.external,i.history,N),Hs=Ex(Gt,h,i.protocolAllowlist);return[Gt==null?void 0:Gt.href,Hs,Px(Qe,Lt,ke,i.basepath,A,Hs!==void 0)]},[ke,N,A,ye,i,h]),[Ee,Ne,tt]=_n(i.stores.location,Re,Cx),ln=tt?zs(a,{})??Rx:Wu,ur=tt?Wu:zs(c,{})??Wu,cr=[I,ln.className,ur.className].filter(Boolean).join(" "),Hr=(F||ln.style||ur.style)&&{...F,...ln.style,...ur.style},Vs=H.useRef(!1),qt=n.reloadDocument||Ne||N?!1:p??i.options.defaultPreload,dr=m??i.options.defaultPreloadDelay??0,an=H.useCallback(()=>{i.preloadRoute(ye).catch(Qe=>{console.warn(Qe),console.warn(lx)})},[i,ye]),fr=H.useCallback(Qe=>{if(!Qe){Qu(l);return}if(!(Qe.isIntersecting??qt==="intent")){Qe.isIntersecting===!1&&Qu(l);return}if(!dr){an();return}zi.has(l)||zi.set(l,setTimeout(()=>{zi.delete(l),an()},dr))},[an,l,qt,dr]);i0(l,fr,qt!=="viewport"),H.useEffect(()=>{Vs.current||qt==="render"&&(an(),Vs.current=!0)},[an,qt]);const hr=Qe=>{const Lt=Qe.currentTarget.getAttribute("target"),Gt=L!==void 0?L:Lt;!N&&!(Qe.metaKey||Qe.altKey||Qe.ctrlKey||Qe.shiftKey)&&!Qe.defaultPrevented&&(!Gt||Gt==="_self")&&Qe.button===0&&(Qe.preventDefault(),i.navigate({...ye,replace:w,resetScroll:S,hashScrollIntoView:y,startTransition:k,viewTransition:b,ignoreBlocker:J}))};if(Ne)return{...R,ref:l,href:Ne,...C&&{children:C},...L&&{target:L},...N&&{disabled:N},...F&&{style:F},...I&&{className:I},...U&&{onClick:U},...O&&{onBlur:O},...Y&&{onFocus:Y},...Q&&{onMouseEnter:Q},...z&&{onMouseLeave:z},...q&&{onTouchStart:q}};const Cn=()=>{qt==="intent"&&an()},Wr=()=>{qt==="intent"&&Qu(l)};return{...R,...ln,...ur,href:Ee,ref:l,onClick:gs([U,hr]),onBlur:gs([O,Wr]),onFocus:gs([Y,fr]),onMouseEnter:gs([Q,fr]),onMouseLeave:gs([z,Wr]),onTouchStart:gs([q,Cn]),disabled:!!N,target:L,...Hr&&{style:Hr},...cr&&{className:cr},...N&&Nx,...tt&&Lx}}var Wu={},Rx={className:"active"},Nx={role:"link","aria-disabled":!0},Lx={"data-status":"active","aria-current":"page"},zi=new WeakMap,Qu=n=>{clearTimeout(zi.get(n)),zi.delete(n)},gs=n=>r=>{for(const i of n)if(i){if(r.defaultPrevented)return;i(r)}};function Mx(n,r,i,l){if(!l)return r?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function Tx(n){if(typeof n!="string")return!1;const r=n.charCodeAt(0);return r===47?n.charCodeAt(1)!==47:r===46}var Bc=H.forwardRef((n,r)=>{const{_asChild:i,...l}=n,{type:a,...c}=jx(l,r),f=typeof l.children=="function"?l.children({isActive:c["data-status"]==="active"}):l.children;if(!i){const{disabled:h,...p}=c;return H.createElement("a",p,f)}return H.createElement(i,c,f)}),Ix=class extends Em{constructor(n){super(n),this.useMatch=r=>Vr({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Fm({...r,from:this.id}),this.useSearch=r=>Dm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Tm({...r,from:this.id}),this.useLoaderData=r=>Mm({...r,from:this.id}),this.useNavigate=()=>Al({from:this.fullPath}),this.Link=Ur.forwardRef((r,i)=>v.jsx(Bc,{ref:i,from:this.fullPath,...r}))}};function eo(n){return new Ix(n)}var Dx=class extends ax{constructor(n){super(n),this.useMatch=r=>Vr({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Fm({...r,from:this.id}),this.useSearch=r=>Dm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>Im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Tm({...r,from:this.id}),this.useLoaderData=r=>Mm({...r,from:this.id}),this.useNavigate=()=>Al({from:this.fullPath}),this.Link=Ur.forwardRef((r,i)=>v.jsx(Bc,{ref:i,from:this.fullPath,...r}))}};function Fx(n){return new Dx(n)}function zx(n){const r=Kt(),i=`not-found-${_n(r.stores.location,l=>l.pathname)}-${_n(r.stores.status,l=>l)}`;return v.jsx(Uc,{getResetKey:()=>i,onCatch:(l,a)=>{var c;if(Os(l))(c=n.onCatch)==null||c.call(n,l,a);else throw l},errorComponent:({error:l})=>{var a;if(Os(l))return(a=n.fallback)==null?void 0:a.call(n,l);throw l},children:n.children})}function Ox(){return v.jsx("p",{children:"Not Found"})}function vs(n){return v.jsx(v.Fragment,{children:n.children})}function zm(n,r,i){return r.options.notFoundComponent?v.jsx(r.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?v.jsx(n.options.defaultNotFoundComponent,{...i}):v.jsx(Ox,{})}function Ul(n,r){const i=(r==null?void 0:r.options.pendingComponent)??n.options.defaultPendingComponent;return i?v.jsx(i,{}):null}var Ax=(n,r)=>n[0]===r[0]&&n[1]===r[1],Om=(n,r,i)=>!r.isRoot||r.options.shellComponent||r.options.wrapInSuspense||i===!1||i==="data-only"||!n.ssr,Am=H.memo(function({routeId:r}){const i=Kt();return v.jsx(Ux,{router:i,match:_n(i.stores.getMatchStore(r),l=>l)})});function Ux({router:n,match:r}){var y,w;const i=n.routesById[r.routeId],l=Ul(n,i),a=i.options.errorComponent??n.options.defaultErrorComponent,c=i.options.onCatch??n.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((y=n.options.notFoundRoute)==null?void 0:y.options.component):i.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",p=Om(n,i,r.ssr)&&(i.options.wrapInSuspense??l??(((w=i.options.errorComponent)==null?void 0:w.preload)||h))?H.Suspense:vs,m=a?Uc:vs,x=f?zx:vs;return v.jsxs(i.isRoot?i.options.shellComponent??vs:vs,{children:[v.jsx(Ol.Provider,{value:r.routeId,children:v.jsx(p,{fallback:l,children:v.jsx(m,{getResetKey:()=>r,errorComponent:a,onCatch:(k,S)=>{if(Os(k))throw k.routeId??(k.routeId=r.routeId),k;c==null||c(k,S)},children:v.jsx(x,{fallback:k=>{if(k.routeId??(k.routeId=r.routeId),k.routeId!==r.routeId)throw k;return H.createElement(f,k)},children:h?v.jsx(cx,{fallback:l,children:v.jsx(Rp,{match:r})}):v.jsx(Rp,{match:r})})})})}),null]})}var Rp=H.memo(function({match:r}){const i=Kt(),l=r.routeId,a=i.routesById[l],c=H.useMemo(()=>{var p;const h=(p=a.options.remountDeps??i.options.defaultRemountDeps)==null?void 0:p({routeId:l,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return h?JSON.stringify(h):void 0},[l,r.loaderDeps,r._strictParams,r._strictSearch,a.options.remountDeps,i.options.defaultRemountDeps]),f=H.useMemo(()=>{const h=a.options.component??i.options.defaultComponent;return h?v.jsx(h,{},c):v.jsx(Um,{})},[c,a.options.component,i.options.defaultComponent]);if(r.status==="pending"){if(i.ssr&&!Om(i,a,r.ssr))return f;if(i._tx)throw i._tx[5];return Ul(i,a)}if(r.status==="notFound")return zm(i,a,r.error);if(r.status==="error")throw r.error;return f}),Um=H.memo(function(){const r=Kt(),i=H.useContext(Ol);let l,a,c;{const h=r.stores.getMatchStore(i);[l,a]=_n(h,p=>[!!p._notFound,p.error],Ax),c=_n(r.stores.ids,p=>p[p.indexOf(i)+1])}if(l)return zm(r,r.routesById[i],a);if(!c)return null;const f=v.jsx(Am,{routeId:c});return i===ks?v.jsx(H.Suspense,{fallback:Ul(r),children:f}):f});function Bm(n,r){const i=n[1];n.length=0,i==null||i(r)}function Bx({t:n}){const r=Kt(),i=r._rendered??(r._rendered=[]);return r.startTransition=(l,a)=>new Promise(c=>{Bm(i,!1),i.push(a,c),n(r),H.startTransition(l)}),lm(()=>{const l=r.history.subscribe(r.load);r.updateLatestLocation();const a=r.latestLocation,c=r.buildLocation({to:a.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(kn(a.publicHref)!==kn(c.publicHref))return r.commitLocation({...c,replace:!0,ignoreBlocker:!0}),l;const f=r.stores.resolvedLocation.get();return(f==null?void 0:f.href)===a.href&&f.state.__TSR_key===a.state.__TSR_key?i.push(r.stores.matches.get(),h=>{h&&r.emit({type:"onRendered",...Fl(f,f)})}):r._tx||r.load({sync:!0}).catch(console.error),l},[r,r.history]),null}function $x(){const n=Kt(),r=n.routesById[ks],i=Ul(n,r),l=n.ssr?vs:H.Suspense,a=v.jsxs(v.Fragment,{children:[v.jsx(Bx,{t:H.useState()[1]}),v.jsx(l,{fallback:i,children:v.jsx(Vx,{})})]});return n.options.InnerWrap?v.jsx(n.options.InnerWrap,{children:a}):a}function Vx(){const n=Kt(),r=n._rendered,i=_n(n.stores.matches,f=>r[0]??f),l=i[0],a=l==null?void 0:l.routeId;lm(()=>{r[0]===i&&Bm(r,!0)},[r,i]);const c=a?v.jsx(Am,{routeId:a}):null;return v.jsx(Ol.Provider,{value:a,children:n.options.disableGlobalCatchBoundary?c:v.jsx(Uc,{getResetKey:()=>l,onCatch:void 0,children:c})})}var Hx=n=>({createMutableStore:bp,createReadonlyStore:bp,batch:yx}),Wx=n=>new Qx(n),Qx=class extends q0{constructor(n){super(n,Hx)}};function Kx({router:n,children:r,...i}){um(i)&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const l=v.jsx(jm.Provider,{value:n,children:r});return n.options.Wrap?v.jsx(n.options.Wrap,{children:l}):l}function qx({router:n,...r}){return v.jsx(Kx,{router:n,...r,children:v.jsx($x,{})})}function Np(n){const r=Kt({warn:(n==null?void 0:n.router)===void 0}),i=(n==null?void 0:n.router)||r;return _n(i.stores.__store,Lm(n,i))}const Gx="modulepreload",Yx=function(n){return"/"+n},Lp={},Nt=function(r,i,l){let a=Promise.resolve();if(i&&i.length>0){let f=function(m){return Promise.all(m.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),p=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=f(i.map(m=>{if(m=Yx(m),m in Lp)return;Lp[m]=!0;const x=m.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const w=document.createElement("link");if(w.rel=x?"stylesheet":Gx,x||(w.as="script"),w.crossOrigin="",w.href=m,p&&w.setAttribute("nonce",p),document.head.appendChild(w),x)return new Promise((k,S)=>{w.addEventListener("load",k),w.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${m}`)))})}))}function c(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return a.then(f=>{for(const h of f||[])h.status==="rejected"&&c(h.reason);return r().catch(c)})};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zx=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$m=(...n)=>n.filter((r,i,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===i).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 Xx={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 Jx=H.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:a="",children:c,iconNode:f,...h},p)=>H.createElement("svg",{ref:p,...Xx,width:r,height:r,stroke:n,strokeWidth:l?Number(i)*24/Number(r):i,className:$m("lucide",a),...h},[...f.map(([m,x])=>H.createElement(m,x)),...Array.isArray(c)?c:[c]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _e=(n,r)=>{const i=H.forwardRef(({className:l,...a},c)=>H.createElement(Jx,{ref:c,iconNode:r,className:$m(`lucide-${Zx(n)}`,l),...a}));return i.displayName=`${n}`,i};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const e1=_e("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const t1=_e("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vc=_e("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 Vm=_e("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 n1=_e("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 r1=_e("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 s1=_e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Oi=_e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Hm=_e("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const i1=_e("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 o1=_e("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 l1=_e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const a1=_e("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const u1=_e("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const c1=_e("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const d1=_e("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $c=_e("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const f1=_e("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const h1=_e("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const p1=_e("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vc=_e("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const m1=_e("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const g1=_e("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Hc=_e("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 y1=_e("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wm=_e("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wc=_e("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const v1=_e("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const x1=_e("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 w1=_e("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xc=_e("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const k1=_e("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qm=_e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),As=[{id:"dashboard",pfad:"/cockpit",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:f1,group:"Operativ"},{id:"ideen",pfad:"/ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:p1,group:"Operativ"},{id:"auftraege",pfad:"/auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:$c,group:"Operativ"},{id:"skills",pfad:"/skills",label:"Skills & Jobs",hint:"Autonome Skills manuell auslösen",icon:vc,group:"Operativ"},{id:"chronik",pfad:"/chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:d1,group:"Operativ"},{id:"wissen",pfad:"/wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:h1,group:"Wissen"},{id:"connect",pfad:"/verbinden",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Hc,group:"Werkzeuge"},{id:"konsole",pfad:"/konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:w1,group:"Werkzeuge"},{id:"guide",pfad:"/anleitung",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:Hm,group:"Werkzeuge"},{id:"models",pfad:"/modelle",label:"Modelle",hint:"Speicher, laden & Rollen",icon:Vm,group:"Wartung"},{id:"agent",pfad:"/agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:vc,group:"Wartung"}];function Km(n){return[...As].sort((r,i)=>i.pfad.length-r.pfad.length).find(r=>n===r.pfad||n.startsWith(r.pfad+"/"))}const qm="mc_expert_mode",wc="mc-expert-mode-change",S1=()=>{try{return localStorage.getItem(qm)==="true"}catch{return!1}};function b1(n){return window.addEventListener(wc,n),window.addEventListener("storage",n),()=>{window.removeEventListener(wc,n),window.removeEventListener("storage",n)}}function Mp(n){localStorage.setItem(qm,String(n)),window.dispatchEvent(new Event(wc))}function _1(){return H.useSyncExternalStore(b1,S1,()=>!1)}function Gm(n){var r,i,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(r=0;r{const r=j1(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:f=>{const h=f.split(Qc);return h[0]===""&&h.length!==1&&h.shift(),Ym(h,r)||P1(f)},getConflictingClassGroupIds:(f,h)=>{const p=i[f]||[];return h&&l[f]?[...p,...l[f]]:p}}},Ym=(n,r)=>{var f;if(n.length===0)return r.classGroupId;const i=n[0],l=r.nextPart.get(i),a=l?Ym(n.slice(1),l):void 0;if(a)return a;if(r.validators.length===0)return;const c=n.join(Qc);return(f=r.validators.find(({validator:h})=>h(c)))==null?void 0:f.classGroupId},Tp=/^\[(.+)\]$/,P1=n=>{if(Tp.test(n)){const r=Tp.exec(n)[1],i=r==null?void 0:r.substring(0,r.indexOf(":"));if(i)return"arbitrary.."+i}},j1=n=>{const{theme:r,prefix:i}=n,l={nextPart:new Map,validators:[]};return N1(Object.entries(n.classGroups),i).forEach(([c,f])=>{kc(f,l,c,r)}),l},kc=(n,r,i,l)=>{n.forEach(a=>{if(typeof a=="string"){const c=a===""?r:Ip(r,a);c.classGroupId=i;return}if(typeof a=="function"){if(R1(a)){kc(a(l),r,i,l);return}r.validators.push({validator:a,classGroupId:i});return}Object.entries(a).forEach(([c,f])=>{kc(f,Ip(r,c),i,l)})})},Ip=(n,r)=>{let i=n;return r.split(Qc).forEach(l=>{i.nextPart.has(l)||i.nextPart.set(l,{nextPart:new Map,validators:[]}),i=i.nextPart.get(l)}),i},R1=n=>n.isThemeGetter,N1=(n,r)=>r?n.map(([i,l])=>{const a=l.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([f,h])=>[r+f,h])):c);return[i,a]}):n,L1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,i=new Map,l=new Map;const a=(c,f)=>{i.set(c,f),r++,r>n&&(r=0,l=i,i=new Map)};return{get(c){let f=i.get(c);if(f!==void 0)return f;if((f=l.get(c))!==void 0)return a(c,f),f},set(c,f){i.has(c)?i.set(c,f):a(c,f)}}},Zm="!",M1=n=>{const{separator:r,experimentalParseClassName:i}=n,l=r.length===1,a=r[0],c=r.length,f=h=>{const p=[];let m=0,x=0,y;for(let C=0;Cx?y-x:void 0;return{modifiers:p,hasImportantModifier:k,baseClassName:S,maybePostfixModifierPosition:b}};return i?h=>i({className:h,parseClassName:f}):f},T1=n=>{if(n.length<=1)return n;const r=[];let i=[];return n.forEach(l=>{l[0]==="["?(r.push(...i.sort(),l),i=[]):i.push(l)}),r.push(...i.sort()),r},I1=n=>({cache:L1(n.cacheSize),parseClassName:M1(n),...E1(n)}),D1=/\s+/,F1=(n,r)=>{const{parseClassName:i,getClassGroupId:l,getConflictingClassGroupIds:a}=r,c=[],f=n.trim().split(D1);let h="";for(let p=f.length-1;p>=0;p-=1){const m=f[p],{modifiers:x,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:k}=i(m);let S=!!k,b=l(S?w.substring(0,k):w);if(!b){if(!S){h=m+(h.length>0?" "+h:h);continue}if(b=l(w),!b){h=m+(h.length>0?" "+h:h);continue}S=!1}const C=T1(x).join(":"),L=y?C+Zm:C,N=L+b;if(c.includes(N))continue;c.push(N);const F=a(b,S);for(let I=0;I0?" "+h:h)}return h};function z1(){let n=0,r,i,l="";for(;n{if(typeof n=="string")return n;let r,i="";for(let l=0;ly(x),n());return i=I1(m),l=i.cache.get,a=i.cache.set,c=h,h(p)}function h(p){const m=l(p);if(m)return m;const x=F1(p,i);return a(p,x),x}return function(){return c(z1.apply(null,arguments))}}const De=n=>{const r=i=>i[n]||[];return r.isThemeGetter=!0,r},Jm=/^\[(?:([a-z-]+):)?(.+)\]$/i,A1=/^\d+\/\d+$/,U1=new Set(["px","full","screen"]),B1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$1=/\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$/,V1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,H1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,W1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yn=n=>bs(n)||U1.has(n)||A1.test(n),Wn=n=>Bs(n,"length",J1),bs=n=>!!n&&!Number.isNaN(Number(n)),Ku=n=>Bs(n,"number",bs),Mi=n=>!!n&&Number.isInteger(Number(n)),Q1=n=>n.endsWith("%")&&bs(n.slice(0,-1)),me=n=>Jm.test(n),Qn=n=>B1.test(n),K1=new Set(["length","size","percentage"]),q1=n=>Bs(n,K1,eg),G1=n=>Bs(n,"position",eg),Y1=new Set(["image","url"]),Z1=n=>Bs(n,Y1,tw),X1=n=>Bs(n,"",ew),Ti=()=>!0,Bs=(n,r,i)=>{const l=Jm.exec(n);return l?l[1]?typeof r=="string"?l[1]===r:r.has(l[1]):i(l[2]):!1},J1=n=>$1.test(n)&&!V1.test(n),eg=()=>!1,ew=n=>H1.test(n),tw=n=>W1.test(n),nw=()=>{const n=De("colors"),r=De("spacing"),i=De("blur"),l=De("brightness"),a=De("borderColor"),c=De("borderRadius"),f=De("borderSpacing"),h=De("borderWidth"),p=De("contrast"),m=De("grayscale"),x=De("hueRotate"),y=De("invert"),w=De("gap"),k=De("gradientColorStops"),S=De("gradientColorStopPositions"),b=De("inset"),C=De("margin"),L=De("opacity"),N=De("padding"),F=De("saturate"),I=De("scale"),U=De("sepia"),O=De("skew"),Y=De("space"),Q=De("translate"),z=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto",me,r],Z=()=>[me,r],de=()=>["",yn,Wn],W=()=>["auto",bs,me],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],we=()=>["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"],V=()=>["start","end","center","between","around","evenly","stretch"],oe=()=>["","0",me],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[bs,me];return{cacheSize:500,separator:":",theme:{colors:[Ti],spacing:[yn,Wn],blur:["none","",Qn,me],brightness:R(),borderColor:[n],borderRadius:["none","","full",Qn,me],borderSpacing:Z(),borderWidth:de(),contrast:R(),grayscale:oe(),hueRotate:R(),invert:oe(),gap:Z(),gradientColorStops:[n],gradientColorStopPositions:[Q1,Wn],inset:J(),margin:J(),opacity:R(),padding:Z(),saturate:R(),scale:R(),sepia:oe(),skew:R(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ee(),me]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mi,me]}],basis:[{basis:J()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:oe()}],shrink:[{shrink:oe()}],order:[{order:["first","last","none",Mi,me]}],"grid-cols":[{"grid-cols":[Ti]}],"col-start-end":[{col:["auto",{span:["full",Mi,me]},me]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Ti]}],"row-start-end":[{row:["auto",{span:[Mi,me]},me]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[Y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,r]}],"min-w":[{"min-w":[me,r,"min","max","fit"]}],"max-w":[{"max-w":[me,r,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[me,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ku]}],"font-family":[{font:[Ti]}],"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",me]}],"line-clamp":[{"line-clamp":["none",bs,Ku]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yn,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[L]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yn,Wn]}],"underline-offset":[{"underline-offset":["auto",yn,me]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],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",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[L]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),G1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",q1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Z1]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[L]}],"border-style":[{border:[...we(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[L]}],"divide-style":[{divide:we()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...we()]}],"outline-offset":[{"outline-offset":[yn,me]}],"outline-w":[{outline:[yn,Wn]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[L]}],"ring-offset-w":[{"ring-offset":[yn,Wn]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Qn,X1]}],"shadow-color":[{shadow:[Ti]}],opacity:[{opacity:[L]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[l]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Qn,me]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[y]}],saturate:[{saturate:[F]}],sepia:[{sepia:[U]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[L]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Mi,me]}],"translate-x":[{"translate-x":[Q]}],"translate-y":[{"translate-y":[Q]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],accent:[{accent:["auto",n]}],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",me]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",me]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[yn,Wn,Ku]}],stroke:[{stroke:[n,"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"]}}},rw=O1(nw);function Ye(...n){return rw(C1(n))}function bk(n){return n?n.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function sw(){const n=_1();return v.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[v.jsxs("button",{onClick:()=>Mp(!1),"aria-pressed":!n,className:Ye("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",n?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[v.jsx(x1,{className:"h-3.5 w-3.5"})," Einfach"]}),v.jsxs("button",{onClick:()=>Mp(!0),"aria-pressed":n,className:Ye("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",n?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[v.jsx(v1,{className:"h-3.5 w-3.5"})," Experte"]})]})}let Cl=!1;const iw=()=>Cl;function ow(){const n=Lc();H.useEffect(()=>{const r=new EventSource("/api/events");return r.onopen=()=>{Cl=!0},r.onerror=()=>{Cl=!1},r.addEventListener("invalidate",i=>{var l;try{const a=((l=JSON.parse(i.data))==null?void 0:l.keys)??[];for(const c of a)n.invalidateQueries({queryKey:[c]})}catch{}}),()=>{Cl=!1,r.close()}},[n])}class lw extends Error{constructor(i,l,a){super(a||`${i} ${l}`);dl(this,"status");dl(this,"detail");this.name="ApiError",this.status=i,this.detail=a}}async function aw(n){try{const r=await n.text();if(!r)return null;try{const i=JSON.parse(r),l=(i==null?void 0:i.detail)??(i==null?void 0:i.err)??(i==null?void 0:i.message);return typeof l=="string"&&l.trim()?l.trim():Array.isArray(l)&&l.length&&l.map(a=>a==null?void 0:a.msg).filter(Boolean).join("; ")||null}catch{return r.slice(0,200).split(` `)[0].trim()||null}}catch{return null}}async function Le(n,r){const i=await fetch(n,{...r,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers}});if(!i.ok)throw new lw(i.status,i.statusText,await aw(i));return i.json()}const _k=(n,r,i=!1,l=!0)=>Le("/api/groups",{method:"PUT",body:JSON.stringify({group:n,members:r,swap:i,persist:l})}),Ck=n=>Le("/api/routing/policy",{method:"PUT",body:JSON.stringify(n)}),Fe={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:n=>["drafts",n??""],connect:n=>["connect",n??""],connectHealth:["connect-health"],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],ideen:["ideen"],chronik:["chronik"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},St={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},Bl=n=>()=>iw()?n*5:n,uw=(n=St.schnell)=>Ae({queryKey:Fe.auftragsbuch,queryFn:()=>Le("/api/auftragsbuch"),refetchInterval:Bl(n)}),cw=(n=St.gemuetlich)=>Ae({queryKey:Fe.ideen,queryFn:()=>Le("/api/ideen"),refetchInterval:Bl(n)}),Ek=(n,r=!1)=>Ae({queryKey:["ideen-log",n],queryFn:()=>Le(`/api/ideen/${n}/log`),enabled:r,refetchInterval:4e3,staleTime:0}),Pk=(n=150,r=St.gemuetlich)=>Ae({queryKey:[...Fe.chronik,n],queryFn:()=>Le(`/api/chronik?limit=${n}`),refetchInterval:Bl(r),select:i=>i.items??[]}),jk=()=>Ae({queryKey:Fe.wissen,queryFn:()=>Le("/api/wissen")}),Rk=(n=St.traege,r=!0)=>Ae({queryKey:Fe.zeitmaschine,queryFn:()=>Le("/api/zeitmaschine"),refetchInterval:n,enabled:r}),dw=(n=12,r=St.schnell)=>Ae({queryKey:Fe.voiceTrace,queryFn:()=>Le(`/api/voice/trace?limit=${n}`),refetchInterval:r,select:i=>i.turns??[]}),Nk=(n=!0)=>Ae({queryKey:Fe.memoryGraph,queryFn:()=>Le("/api/wissen/graph"),enabled:n,staleTime:60*1e3}),tg=()=>Ae({queryKey:Fe.health,queryFn:()=>Le("/api/health"),refetchInterval:St.normal}),$l=(n=St.graph)=>Ae({queryKey:Fe.systemStatus,queryFn:()=>Le("/api/system/status"),refetchInterval:n}),ng=(n,r=!0)=>Ae({queryKey:["metrics-history",n],queryFn:()=>Le(`/api/system/history?minutes=${n}`),enabled:r,refetchInterval:6e4}),rg=(n=St.normal)=>Ae({queryKey:Fe.services,queryFn:()=>Le("/api/system/services"),refetchInterval:n}),sg=(n=St.schnell)=>Ae({queryKey:Fe.models,queryFn:()=>Le("/api/models"),refetchInterval:Bl(n)}),Lk=(n=St.normal)=>Ae({queryKey:Fe.groups,queryFn:()=>Le("/api/groups"),refetchInterval:n}),Mk=()=>Ae({queryKey:Fe.routingPolicy,queryFn:()=>Le("/api/routing/policy")}),Tk=(n=3e3,r=!0)=>Ae({queryKey:Fe.jobs,queryFn:()=>Le("/api/jobs"),refetchInterval:n,enabled:r,select:i=>i.jobs??[]}),ig=(n=St.graph)=>Ae({queryKey:Fe.tokenStats,queryFn:()=>Le("/api/system/token-stats"),refetchInterval:n}),fw=(n=St.normal)=>Ae({queryKey:Fe.agentStatus,queryFn:()=>Le("/api/agent/status"),refetchInterval:n}),Ik=(n=St.traege)=>Ae({queryKey:Fe.hermesBrain,queryFn:()=>Le("/api/agent/brain"),refetchInterval:n}),hw=(n=St.traege)=>Ae({queryKey:Fe.updates,queryFn:()=>Le("/api/maintenance/updates"),refetchInterval:n}),Dk=()=>Ae({queryKey:Fe.discover,queryFn:()=>Le("/api/discover")}),Fk=n=>Ae({queryKey:Fe.drafts(n),queryFn:()=>Le(`/api/models/drafts?target=${encodeURIComponent(n??"")}`),enabled:!!n}),zk=n=>Ae({queryKey:Fe.connect(n),queryFn:()=>Le(n?`/api/connect?${n}`:"/api/connect")}),pw=()=>Ae({queryKey:Fe.connectHealth,queryFn:()=>Le("/api/connect/health"),refetchInterval:15e3});function Ok(n,...r){for(const i of r)n.invalidateQueries({queryKey:i})}let Sc=[],bc=[];const _c=new Set,og=()=>_c.forEach(n=>n());function lg(n){return _c.add(n),()=>{_c.delete(n)}}function mw(n){Sc=[...Sc,n].slice(-40),og()}function gw(n){bc=[...bc,n].slice(-40),og()}const yw=()=>H.useSyncExternalStore(lg,()=>Sc),vw=()=>H.useSyncExternalStore(lg,()=>bc);function xw(){const{data:n,dataUpdatedAt:r}=$l(),{data:i,dataUpdatedAt:l}=ig(),a=H.useRef(null);H.useEffect(()=>{var c,f,h,p;n&&mw({t:Date.now(),cpu:((c=n.cpu)==null?void 0:c.percent)??0,ram:((f=n.ram)==null?void 0:f.percent)??0,gpu:((h=n.gpu)==null?void 0:h.busy_percent)??null,disk:((p=n.disk)==null?void 0:p.percent)??null})},[r]),H.useEffect(()=>{if(!i)return;const c=Date.now(),f=i.prompt_tokens,h=i.completion_tokens;if(a.current){const p=Math.max((c-a.current.t)/1e3,.001);gw({t:c,prompt:Math.max(0,(f-a.current.p)/p),completion:Math.max(0,(h-a.current.c)/p)})}a.current={p:f,c:h,t:c}},[l])}const ww=H.lazy(()=>Nt(()=>import("./SystemDrawer-TPlJzWjm.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(n=>({default:n.SystemDrawer}))),kw=H.lazy(()=>Nt(()=>import("./CommandPalette-Bzgk4pnl.js"),__vite__mapDeps([10,11])).then(n=>({default:n.CommandPalette})));function Sw(){return v.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:v.jsx(Vc,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const bw=/Mac|iPhone|iPad/.test(navigator.platform);function _w(){xw(),ow();const n=Al(),r=Np({select:S=>S.location.pathname}),i=Np({select:S=>S.location.search.system}),[l,a]=H.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[c,f]=H.useState(!1),[h,p]=H.useState(!1);H.useEffect(()=>{const S=C=>{(C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="k"&&p(!0)},b=()=>p(!0);return document.addEventListener("keydown",S),window.addEventListener("mc-palette-open",b),()=>{document.removeEventListener("keydown",S),window.removeEventListener("mc-palette-open",b)}},[]);const m=H.useCallback(S=>{n({to:".",search:b=>({...b,system:S}),replace:!0})},[n]),{data:x,isError:y}=tg(),{data:w}=$l();H.useEffect(()=>{document.documentElement.classList.add("dark")},[]),H.useEffect(()=>{const S=b=>{var L;const C=(L=b.detail)==null?void 0:L.tab;m(C==="logs"?"logs":"wartung")};return window.addEventListener("open-system-drawer",S),()=>window.removeEventListener("open-system-drawer",S)},[m]),H.useEffect(()=>{const S=b=>{var N;const C=(N=b.detail)==null?void 0:N.view,L=As.find(F=>F.id===C);L&&n({to:L.pfad})};return window.addEventListener("mc-navigate",S),()=>window.removeEventListener("mc-navigate",S)},[n]),H.useEffect(()=>{f(!1)},[r]);const k=Km(r);return v.jsxs("div",{className:"flex h-full relative",children:[v.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none",style:{backgroundColor:"hsl(224,30%,6%)",backgroundImage:["radial-gradient(45% 40% at 12% 8%, hsl(172 72% 50% / 0.10), transparent 70%)","radial-gradient(50% 45% at 88% 92%, hsl(270 70% 60% / 0.10), transparent 70%)","radial-gradient(40% 35% at 75% 30%, hsl(239 70% 62% / 0.07), transparent 70%)"].join(", ")}}),v.jsxs(H.Suspense,{fallback:null,children:[h&&v.jsx(kw,{}),i&&v.jsx(ww,{open:!0,onClose:()=>m(void 0),defaultTab:i==="logs"?"logs":"maintenance"})]}),v.jsx("aside",{className:Ye("hidden md:flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",l?"w-16":"w-60"),children:v.jsx(Dp,{collapsed:l,onToggleCollapse:()=>{a(S=>{const b=!S;return localStorage.setItem("mc_sidebar_collapsed",b.toString()),b})},pfad:r,health:x,backendDown:y,sysStatus:w})}),v.jsxs("div",{className:Ye("md:hidden fixed inset-0 z-50 transition-opacity duration-200",c?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!c,children:[v.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>f(!1)}),v.jsx("aside",{className:Ye("absolute inset-y-0 left-0 flex w-72 max-w-[85vw] flex-col border-r border-border/40 bg-[hsl(224,28%,8%)] transition-transform duration-300 ease-in-out",c?"translate-x-0":"-translate-x-full"),children:v.jsx(Dp,{collapsed:!1,onClose:()=>f(!1),pfad:r,health:x,backendDown:y,sysStatus:w})})]}),v.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[v.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-3 border-b border-border/40 px-4 md:px-6 bg-card/20 backdrop-blur-sm",children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[v.jsx("button",{onClick:()=>f(!0),className:"md:hidden p-1.5 -ml-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation öffnen",children:v.jsx(m1,{className:"h-5 w-5","aria-hidden":"true"})}),v.jsx("div",{className:"truncate text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:k==null?void 0:k.hint})]}),v.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[v.jsx(sw,{}),v.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"hidden sm:flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),v.jsxs("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-palette-open")),className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[v.jsx(i1,{className:"h-3.5 w-3.5"}),v.jsx("span",{className:"hidden sm:inline",children:"Suchen"}),v.jsx("kbd",{className:"hidden sm:inline rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:bw?"⌘K":"Strg+K"})]})]})]}),v.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 scrollbar-thin",children:v.jsx(H.Suspense,{fallback:v.jsx(Sw,{}),children:v.jsx(Um,{})})})]})]})}function Dp({collapsed:n,onToggleCollapse:r,onClose:i,pfad:l,health:a,backendDown:c,sysStatus:f}){var p,m,x,y,w;const h=Km(l);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:Ye("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[v.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[v.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&v.jsxs("div",{className:"leading-tight",children:[v.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),v.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),r&&v.jsx("button",{onClick:r,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?v.jsx(Oi,{className:"h-4 w-4","aria-hidden":"true"}):v.jsx(s1,{className:"h-4 w-4","aria-hidden":"true"})}),i&&v.jsx("button",{onClick:i,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:v.jsx(Qm,{className:"h-4 w-4","aria-hidden":"true"})})]}),v.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let k=null;return As.map(S=>{const b=S.group!==k;k=S.group;const C=(h==null?void 0:h.id)===S.id;return v.jsxs("div",{className:"space-y-1",children:[b&&(n?k!==As[0].group&&v.jsx("div",{className:"my-3 border-t border-border/30"}):v.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:S.group})),v.jsxs(Bc,{to:S.pfad,onClick:i,"aria-current":C?"page":void 0,className:Ye("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",C?n?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?S.label:void 0,"aria-label":n?S.label:void 0,children:[v.jsx(S.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&v.jsx("span",{className:"truncate",children:S.label})]})]},S.id)})})()}),v.jsx("div",{className:Ye("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?v.jsx("div",{className:"flex justify-center",children:v.jsx("span",{className:Ye("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",c||!a?"bg-red-500":a.engine_reachable?a.brain&&!a.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:c?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":a?a.engine_reachable?a.brain&&!a.brain.ready?`Hirn offline (${a.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):v.jsxs("div",{className:"space-y-2 text-left",children:[c?v.jsxs("span",{className:"flex items-center gap-2 text-red-400",children:[v.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 animate-pulse"}),v.jsx("span",{className:"truncate",children:"Zentrale antwortet nicht"})]}):a?v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"flex items-center gap-2",children:[v.jsx("span",{className:Ye("h-2 w-2 rounded-full animate-pulse",a.engine_reachable?"bg-emerald-500":"bg-amber-500")}),v.jsxs("span",{className:"truncate",children:["Engine ",a.engine_reachable?"online":"offline"]})]}),a.brain&&!a.brain.ready&&v.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${a.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[v.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),v.jsxs("span",{className:"truncate",children:["Hirn offline",a.brain.model?` (${a.brain.model})`:""]})]})]}):v.jsxs("span",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",v.jsx("span",{className:"truncate",children:"Backend offline"})]}),(f==null?void 0:f.versions)&&v.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[v.jsxs("div",{className:"truncate",title:f.versions.mc2?`${f.versions.mc2.branch}-${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""} (${f.versions.mc2.date})`:"nicht gefunden",children:[v.jsx("strong",{children:"MC2:"})," ",f.versions.mc2?`${f.versions.mc2.hash}${f.versions.mc2.dirty?"*":""}`:"—"]}),v.jsxs("div",{className:"truncate",title:((p=f.versions.engine)==null?void 0:p.type)==="git"?`${f.versions.engine.branch}-${f.versions.engine.hash}${f.versions.engine.dirty?"*":""} (${f.versions.engine.date})`:((m=f.versions.engine)==null?void 0:m.version_text)||"unbekannt",children:[v.jsx("strong",{children:"Engine:"})," ",((x=f.versions.engine)==null?void 0:x.type)==="git"?`${f.versions.engine.hash}${f.versions.engine.dirty?"*":""}`:((w=(y=f.versions.engine)==null?void 0:y.version_text)==null?void 0:w.split(" ").pop())||"—"]}),v.jsxs("div",{className:"truncate",title:f.versions.hermes_agent?`${f.versions.hermes_agent.branch}-${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""} (${f.versions.hermes_agent.date})`:"nicht gefunden",children:[v.jsx("strong",{children:"Hermes Agent:"})," ",f.versions.hermes_agent?`${f.versions.hermes_agent.hash}${f.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}function to({titel:n,text:r,fehler:i,onErneut:l}){const a=i instanceof Error?i.stack||i.message:i?String(i):null;return v.jsx("div",{className:"flex min-h-[50vh] items-center justify-center p-6",children:v.jsxs("div",{className:"mc-card max-w-lg space-y-4 p-6",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[v.jsx(xc,{className:"h-5 w-5 shrink-0 text-amber-400","aria-hidden":"true"}),v.jsx("h1",{className:"font-space text-lg font-bold tracking-tight",children:n})]}),v.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:r}),v.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[l&&v.jsxs("button",{onClick:l,className:"flex h-9 cursor-pointer items-center gap-1.5 rounded-lg bg-primary px-4 text-xs font-semibold text-primary-foreground transition-colors hover:bg-primary/90",children:[v.jsx(y1,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Erneut versuchen"]}),v.jsx("a",{href:"/cockpit",className:"flex h-9 items-center rounded-lg border border-border/60 bg-background/20 px-4 text-xs font-semibold text-muted-foreground transition-colors hover:bg-accent",children:"Zum Cockpit"})]}),a&&v.jsxs("details",{className:"pt-1",children:[v.jsx("summary",{className:"cursor-pointer text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/70 hover:text-foreground",children:"Technische Einzelheiten"}),v.jsx("pre",{className:"scrollbar-thin mt-2 max-h-52 overflow-auto rounded-lg border border-border/40 bg-background/40 p-3 font-mono text-[10px] leading-relaxed text-muted-foreground",children:a})]})]})})}function Cw(){var Q,z,q,J,Z,de;const{data:n,isError:r}=tg(),{data:i,isError:l}=rg(),{data:a}=sg(),{data:c}=$l(),f=r||l,h=!!n&&!!i,p=W=>{var ee;return(ee=i==null?void 0:i.services.find(we=>we.unit===W))==null?void 0:ee.ok},m=W=>!!(i!=null&&i.services.some(ee=>ee.unit===W)),x=n==null?void 0:n.engine_reachable,y=(Q=n==null?void 0:n.brain)==null?void 0:Q.ready,w=((z=n==null?void 0:n.brain)==null?void 0:z.model)||((q=a==null?void 0:a.models.find(W=>W.role==="hermes"))==null?void 0:q.name)||"",k=[];f&&k.push({id:"mc2",label:"Steuerpult (MC2)",icon:Wm,critical:!0,status:"down",detail:"Die Zentrale antwortet nicht — alle Anzeigen hier können veraltet sein. Läuft die Box? Deploy aktiv?"}),k.push((()=>{const W={id:"brain",label:"Lucys Hirn",icon:n1,critical:!0};return h?x===!1?{...W,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:y===!1?{...W,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:w?{kind:"loadModel",model:w,label:"Hirn aufwecken"}:void 0}:{...W,status:"ok",detail:"Wach und ansprechbar."}:{...W,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const W={id:"vision",label:"Lucys Augen",icon:l1,critical:!1};if(!h||!a)return{...W,status:"loading",detail:"Wird geprüft …"};const ee=a.models.find(he=>he.role==="vision");return ee?(a.running??[]).includes(ee.name)?{...W,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...W,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:ee.name,label:"Augen wecken"}}:{...W,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),k.push((()=>{const W={id:"memory",label:"Lucys Gedächtnis",icon:t1,critical:!0},ee=p("hermes-gateway");return!h||ee===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:ee?{...W,status:"ok",detail:"Hermes-Natives Gedächtnis aktiv (SQLite & Embeddings)."}:{...W,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gateway antwortet nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Gateway neu starten"}}})()),k.push((()=>{const W={id:"gateway",label:"Verbindung (Gateway)",icon:Hc,critical:!0},ee=n?n.gateway_reachable:p("mc2-gateway");if(!h||ee===void 0)return{...W,status:"loading",detail:"Wird geprüft …"};const we=m("mc2-gateway")?"mc2-gateway":"mission-control-2";return ee?{...W,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...W,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:we,label:"Gateway neu starten"}}})()),k.push((()=>{const W={id:"steward",label:"Wächter (Steward)",icon:Wc,critical:!1};return h?m("mc2-steward")?p("mc2-steward")?{...W,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...W,status:"warn",detail:"Der Wächter schläft — niemand meldet gerade Ausfälle oder wärmt Modelle nach.",repair:{kind:"restart",service:"mc2-steward",label:"Wächter neu starten"}}:{...W,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...W,status:"loading",detail:"Wird geprüft …"}})()),k.push((()=>{const W={id:"agent",label:"Lucys Agent (Hermes)",icon:vc,critical:!0},ee=p("hermes-gateway");return!h||ee===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:ee?{...W,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...W,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),k.push((()=>{const W={id:"voice",label:"Lucys Stimme",icon:g1,critical:!1},ee=p("voice-service");return!h||ee===void 0?{...W,status:"loading",detail:"Wird geprüft …"}:ee?{...W,status:"ok",detail:"Lucy kann hören und sprechen."}:{...W,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const S=((J=c==null?void 0:c.ram)==null?void 0:J.total)??0,b=((Z=c==null?void 0:c.ram)==null?void 0:Z.used)??0,C=((de=c==null?void 0:c.ram)==null?void 0:de.percent)??(S>0?Math.min(100,b/S*100):0),L=1024**3,N=S?C>=93?{status:"full",usedGb:b/L,totalGb:S/L,pct:C,text:"Speicher fast voll — Lucy könnte langsamer werden."}:C>=85?{status:"warn",usedGb:b/L,totalGb:S/L,pct:C,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:b/L,totalGb:S/L,pct:C,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},F=k.some(W=>W.status==="loading"),I=k.filter(W=>W.critical&&W.status==="down"),U=k.filter(W=>W.status==="warn"||!W.critical&&W.status==="down"),O=N.status==="full";return{verdict:F&&!I.length?"loading":I.length?"problem":U.length||O?"warn":"gut",checks:k,memory:N,problems:I,warns:U,unreachable:f}}function Ew({type:n,title:r,message:i,defaultValue:l,autoValue:a,autoLabel:c,onConfirm:f,onCancel:h}){const p=H.useRef(null);return v.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":r,children:v.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[v.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[v.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:r}),v.jsx("button",{onClick:h||(()=>f()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:v.jsx(Qm,{className:"h-4 w-4","aria-hidden":"true"})})]}),v.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:i}),n==="prompt"&&v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{ref:p,type:"text",defaultValue:l,"aria-label":r,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:m=>{var x;m.key==="Enter"&&f((x=p.current)==null?void 0:x.value)}}),a!==void 0&&v.jsx("button",{type:"button",onClick:()=>{p.current&&(p.current.value=a)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:c||"Auto"})]}),v.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(n==="confirm"||n==="prompt")&&v.jsx("button",{onClick:h,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),v.jsx("button",{onClick:()=>{var x;const m=n==="prompt"?(x=p.current)==null?void 0:x.value:void 0;f(m)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:n==="confirm"?"Ja, fortfahren":n==="prompt"?"Übernehmen":"OK"})]})]})})}function Pw(){const[n,r]=H.useState(null),i=H.useCallback(()=>r(null),[]),l=H.useCallback((h,p,m)=>{r({type:"alert",title:h,message:p,onConfirm:()=>{r(null),m==null||m()}})},[]),a=H.useCallback((h,p,m,x)=>{r({type:"confirm",title:h,message:p,onConfirm:()=>{r(null),m()},onCancel:()=>{r(null),x==null||x()}})},[]),c=H.useCallback((h,p,m,x,y,w)=>{r({type:"prompt",title:h,message:p,defaultValue:m,autoValue:w==null?void 0:w.autoValue,autoLabel:w==null?void 0:w.autoLabel,onConfirm:k=>{r(null),x(k)},onCancel:()=>{r(null),y==null||y()}})},[]),f=n?v.jsx(Ew,{...n}):null;return{showAlert:l,showConfirm:a,showPrompt:c,close:i,dialogElement:f}}const jw={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},Rw={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function Ii({icon:n,title:r,value:i,unit:l,tone:a="muted",hint:c,onClick:f}){return v.jsxs("button",{onClick:f,className:Ye("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",Rw[a]),children:[v.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[v.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:v.jsx(n,{className:"h-5 w-5"})}),v.jsx("span",{className:Ye("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",jw[a]),title:c})]}),v.jsxs("div",{className:"flex items-baseline gap-1.5",children:[v.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:i}),l&&v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:l})]}),v.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[v.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:r}),v.jsx(Oi,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),c&&v.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:c})]})}function Nw(){const{data:n,error:r}=$l(),i=yw();return{sys:n,hist:i,error:r}}function ys(n){return(n/1024**3).toFixed(1)}function Ak(n){return n?n>1024**3?`${(n/1024**3).toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`:""}function Uk(n){if(!n)return"—";const r=n/1024**3;return r>=1?`${r.toFixed(1)} GB`:`${(n/1024**2).toFixed(0)} MB`}function Bk(n){if(!n)return"";const r=Math.floor(n/60);return r>0?`${r} min`:`${n} s`}function $k(n){return n?`${Math.round(n/1024)}k`:"—"}function Vk(n){return n?new Date(n*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}const Lw=H.lazy(()=>Nt(()=>import("./LiveAreaChartImpl-CGtRHSfm.js"),__vite__mapDeps([12,13,11])));function ag(n){return v.jsx(H.Suspense,{fallback:v.jsx(Mw,{height:n.height??176}),children:v.jsx(Lw,{...n})})}function Mw({height:n}){return v.jsx("div",{style:{height:n},className:"flex w-full items-end","aria-hidden":"true",children:v.jsx("div",{className:"h-px w-full bg-border/40"})})}const ug={"1h":60,"24h":1440},Fp={live:"Live","1h":"1 h","24h":"24 h"};function cg({value:n,onChange:r}){return v.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(Fp).map(i=>v.jsx("button",{onClick:()=>r(i),className:Ye("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",n===i?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:Fp[i]},i))})}const Tw=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function Iw(){var x,y,w,k;const{sys:n,hist:r}=Nw(),[i,l]=H.useState("live"),a=ng(i==="live"?60:ug[i],i!=="live"),c=H.useMemo(()=>{var S;return i==="live"?r:(((S=a.data)==null?void 0:S.points)??[]).map(b=>({t:b.t*1e3,cpu:b.cpu,ram:b.ram,gpu:b.gpu,disk:b.disk}))},[i,r,a.data]),f=!!(n!=null&&n.gpu&&n.gpu.busy_percent!=null&&n.gpu.gtt_used!=null&&n.gpu.gtt_total!=null),h=Tw.filter(S=>S.key!=="gpu"||f),p={cpu:(x=n==null?void 0:n.cpu)==null?void 0:x.percent,ram:(y=n==null?void 0:n.ram)==null?void 0:y.percent,gpu:f?n.gpu.busy_percent:null,disk:(w=n==null?void 0:n.disk)==null?void 0:w.percent},m={cpu:(k=n==null?void 0:n.cpu)!=null&&k.cores?`${n.cpu.cores} Cores`:"",ram:n?`${ys(n.ram.used)}/${ys(n.ram.total)} GB`:"",gpu:f?`${ys(n.gpu.gtt_used)}/${ys(n.gpu.gtt_total)} GB`:"",disk:n!=null&&n.disk?`${ys(n.disk.used)}/${ys(n.disk.total)} GB`:""};return v.jsxs("div",{className:"flex flex-col justify-between mc-card p-5",children:[v.jsxs("div",{children:[v.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[v.jsx(o1,{className:"h-4.5 w-4.5 text-primary"}),v.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),i==="live"&&v.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[v.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]}),v.jsx("div",{className:"ml-auto",children:v.jsx(cg,{value:i,onChange:l})})]}),n?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:h.map(S=>v.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[v.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:S.color}}),v.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:S.label}),v.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(p[S.key]??0),"%"]}),m[S.key]&&v.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:m[S.key]})]},S.key))}),i!=="live"&&c.length===0&&v.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:a.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(i==="live"||c.length>0)&&v.jsx(ag,{data:c,series:h,unit:"%",yMode:"percent",height:176,showTime:!0})]}):v.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(n==null?void 0:n.temp)&&(n.temp.cpu||n.temp.gpu)&&v.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[n.temp.cpu!=null&&v.jsxs("span",{children:["CPU Temp: ",n.temp.cpu," °C"]}),n.temp.gpu!=null&&v.jsxs("span",{children:["GPU Temp: ",n.temp.gpu," °C"]})]})]})}const Us=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],Ai=n=>n==null?"–":`${(n/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function Dw(n){const r=Math.max(0,Date.now()/1e3-n);return r<60?`vor ${Math.round(r)} s`:r<3600?`vor ${Math.round(r/60)} min`:`vor ${Math.round(r/3600)} h`}function Cc(n){return Us.reduce((r,i)=>r+(n[i.key]??0),0)}function Fw(n){let r=null;for(const i of Us){const l=n[i.key];l!=null&&(r==null||l>r.ms)&&(r={label:i.label,color:i.color,ms:l})}return r}function zw({t:n,scale:r}){const i=Us.map(l=>`${l.label} ${Ai(n[l.key])}`).join(" · ");return v.jsxs("div",{className:"flex items-center gap-2.5",children:[v.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:Dw(n.ts)}),v.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:i,children:[v.jsx("div",{className:"absolute inset-0 flex",children:Us.map(l=>{const a=n[l.key];return!a||a<=0?null:v.jsx("div",{style:{width:`${a/r*100}%`,background:l.color},className:"h-full first:rounded-l-sm"},l.key)})}),n.error&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),v.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:n.error?"–":Ai(Cc(n))})]})}function Ow(){const{data:n}=dw(12),r=n??[],i=Math.max(1,...r.map(c=>Cc(c))),l=r[0],a=l?Fw(l):null;return v.jsxs("div",{className:"mc-card p-5",children:[v.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(a1,{className:"h-4.5 w-4.5 text-primary"}),v.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),v.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[v.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),l?v.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[v.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${l.error?"text-rose-400":"text-foreground"}`,children:l.error?"Fehler":Ai(Cc(l))}),v.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!l.error&&a&&v.jsxs(v.Fragment,{children:[" · Täter: ",v.jsx("span",{style:{color:a.color},className:"font-semibold",children:a.label})," ",Ai(a.ms)]})]})]}):v.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),l&&!l.error&&v.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:Us.filter(c=>l[c.key]!=null).map(c=>`${c.label} ${Ai(l[c.key])}`).join(" · ")})]}),v.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Us.map(c=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:c.color}}),v.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:c.label})]},c.key))})]}),r.length>0?v.jsx("div",{className:"space-y-1.5",children:r.map(c=>v.jsx(zw,{t:c,scale:i},c.id))}):v.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),v.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Gedächtnis-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const zp=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function Aw(){const{data:n}=ig(),r=vw(),[i,l]=H.useState("live"),a=ng(i==="live"?60:ug[i],i!=="live"),c=H.useMemo(()=>{var x;if(i==="live")return r;const p=((x=a.data)==null?void 0:x.points)??[],m=[];for(let y=1;yv.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:p.color}}),v.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:p.label}),v.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((f==null?void 0:f[p.key])??0)})]},p.key))})]})]}),i!=="live"&&c.length===0?v.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:a.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}):n?v.jsx(ag,{data:c,series:zp,unit:" tok/s",yMode:"auto",height:150,showTime:!0}):v.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),v.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}const Il=n=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:n}}));function Uw({onNavigate:n}){var W,ee,we,he;const{data:r}=sg(),{data:i}=rg(),{data:l}=hw(),{data:a}=fw(),{data:c}=pw(),{data:f}=uw(),{data:h}=cw(),p=Cw(),{showAlert:m,dialogElement:x}=Pw(),y=Lc(),[w,k]=H.useState({});async function S(V,oe){k(X=>({...X,[V]:!0}));try{if(oe.kind==="loadModel")await Le(`/api/models/${encodeURIComponent(oe.model)}/load`,{method:"POST"});else{const X=await Le("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:oe.service})});X.ok||m("Reparatur nicht ganz geklappt",(X.err||"Unbekannter Fehler")+(oe.needsSudo?` Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}y.invalidateQueries({queryKey:Fe.health}),y.invalidateQueries({queryKey:Fe.services}),y.invalidateQueries({queryKey:Fe.models})}catch(X){m("Reparatur fehlgeschlagen",String((X==null?void 0:X.message)||X))}finally{k(X=>({...X,[V]:!1}))}}const b=((W=r==null?void 0:r.running)==null?void 0:W.length)??0,C=(i==null?void 0:i.services.filter(V=>V.ok).length)??0,L=(i==null?void 0:i.services.length)??0,N=L-C,F=(l?(l.os>0?1:0)+(l.engine>0?1:0)+(l.swap>0?1:0)+(l.models>0?1:0):0)+(((ee=l==null?void 0:l.components)==null?void 0:ee.filter(V=>V.update===!0).length)??0),I=f!=null&&f.available?f.open_count:0,U=h!=null&&h.available?h.items.filter(V=>V.status==="blocked").length:0,O=c?[c.gateway,c.memory,c.desktop_gateway]:[],Y=O.filter(V=>V==null?void 0:V.ok).length,Q=c?c.gateway.ok?c.memory.ok?c.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",z=(we=r==null?void 0:r.models)==null?void 0:we.find(V=>V.role==="hermes"),q=z!=null&&z.name?(he=z.name.split("/").pop())==null?void 0:he.replace(/\.gguf$/i,""):"",J=i==null?void 0:i.services.filter(V=>!V.ok).map(V=>V.name).join(", "),Z=l?[l.os>0&&"OS",l.engine>0&&"Engine",l.swap>0&&"Swap",l.models>0&&"Modelle"].filter(Boolean):[],de=Z.length>0?Z.join(" + "):"";return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[v.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[v.jsx(Bw,{verdict:p.verdict,memory:p.memory,warns:p.warns,problems:p.problems}),v.jsxs("section",{children:[v.jsx(qu,{children:"Leistung"}),v.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:v.jsx(Iw,{})}),v.jsx("div",{className:"mt-4",children:v.jsx(Ow,{})}),v.jsx("div",{className:"mt-4",children:v.jsx(Aw,{})})]}),v.jsxs("section",{children:[v.jsx(qu,{children:"Bereiche"}),v.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[v.jsx(Ii,{icon:$c,title:"Auftragsbuch",value:f!=null&&f.available?I:"—",unit:I===1?"Vorschlag":"Vorschläge",tone:f?U>0||I>0?"warn":"ok":"loading",hint:U>0?`${U} Karte${U===1?"":"n"} wartet auf deine Antwort`:I>0?`${I} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>n("auftraege")}),v.jsx(Ii,{icon:Vm,title:"Modelle",value:b,unit:"warm",tone:b>0?"ok":"muted",hint:q?`Hirn: ${q}`:"Kein Hermes-Modell geladen",onClick:()=>n("models")}),v.jsx(Ii,{icon:Wm,title:"Dienste",value:i?`${C}/${L}`:"…",unit:"laufen",tone:i?N>0?"warn":"ok":"loading",hint:J?`Ausfall: ${J}`:"Alle Dienste online",onClick:()=>Il("maintenance")}),v.jsx(Ii,{icon:Wc,title:"Updates",value:l?F>0?F:"0":"…",unit:F>0?"bereit":"aktuell",tone:l?F>0?"warn":"ok":"loading",hint:F>0?`Verfügbar: ${de}`:"Alles auf dem neuesten Stand",onClick:()=>Il("maintenance")}),v.jsx(Ii,{icon:Hc,title:"Verbinden",value:c?`${Y}/${O.length}`:"…",unit:"Leitungen",tone:c?Y===O.length?"ok":"warn":"loading",hint:Q?`Gestört: ${Q}`:"Hermes Desktop & IDEs bereit",onClick:()=>n("connect")})]})]})]}),v.jsxs("div",{className:"space-y-6",children:[v.jsx($w,{problems:p.problems,pendingCount:F,openAuftraege:I,blockedIdeen:U,busy:w,onRepair:S,onNavigate:n}),v.jsxs("section",{children:[v.jsx(qu,{children:"Werkzeuge & Diagnose"}),v.jsx(Vw,{agent:a,svcErrors:N,onNavigate:n})]})]})]}),x]})}function qu({children:n}){return v.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:n})}function Bw({verdict:n,memory:r,warns:i,problems:l}){const a=i.length?`${i[0].label}: ${i[0].detail}${i.length>1?` (+${i.length-1} weitere)`:""}`:r.status==="full"?r.text:"Nichts Schlimmes — nur ein Hinweis.",c=l.length?`${l[0].label}: ${l[0].detail}${l.length>1?` (+${l.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",f={loading:{ring:"border-border/60 bg-card/45",icon:Vc,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:c1,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:xc,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:a},problem:{ring:"border-red-500/50 bg-red-500/5",icon:xc,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:c}}[n],h=f.icon,p={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[r.status],m={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[r.status];return v.jsxs("div",{className:Ye("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",f.ring),children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:v.jsx(h,{className:Ye("h-6 w-6",f.iconCls)})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:f.title}),v.jsx("p",{className:"text-xs text-muted-foreground",children:f.sub})]})]}),v.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[v.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[v.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[v.jsx(u1,{className:"h-3.5 w-3.5"})," Speicher"]}),v.jsx("span",{className:Ye("font-mono font-bold",p),children:r.status==="unknown"?"—":`${r.usedGb.toFixed(1)} / ${r.totalGb.toFixed(1)} GB`})]}),v.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:v.jsx("div",{className:Ye("h-full rounded-full transition-all duration-500",m),style:{width:`${r.pct}%`}})})]})]})}function $w({problems:n,pendingCount:r,openAuftraege:i,blockedIdeen:l,busy:a,onRepair:c,onNavigate:f}){const h=r>0,p=i>0,m=l>0,x=n.length===0&&!h&&!p&&!m;return v.jsx("div",{className:"h-full flex flex-col justify-between",children:x?v.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[v.jsx(r1,{className:"h-5 w-5 shrink-0 text-emerald-400"}),v.jsxs("div",{children:[v.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),v.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):v.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[n.map(y=>v.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[v.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:v.jsx(y.icon,{className:"h-4.5 w-4.5"})}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("p",{className:"text-sm font-bold text-foreground",children:y.label}),v.jsx("p",{className:"truncate text-xs text-muted-foreground",children:y.detail})]})]}),y.repair&&v.jsxs("button",{onClick:()=>y.repair&&c(y.id,y.repair),disabled:!!a[y.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[a[y.id]?v.jsx(Vc,{className:"h-3.5 w-3.5 animate-spin"}):v.jsx(k1,{className:"h-3.5 w-3.5"}),y.repair.label]})]},y.id)),m&&v.jsxs("button",{onClick:()=>f("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-red-500/30 bg-red-500/5 p-4 text-left transition-all hover:bg-red-500/10 cursor-pointer",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:v.jsx(Hm,{className:"h-4.5 w-4.5"})}),v.jsxs("div",{children:[v.jsxs("p",{className:"text-sm font-bold text-foreground",children:[l," Karte",l===1?"":"n"," braucht deine Antwort"]}),v.jsx("p",{className:"text-xs text-muted-foreground",children:"Die Box hängt an einer Frage und wartet auf dich."})]})]}),v.jsx(Oi,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),p&&v.jsxs("button",{onClick:()=>f("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:v.jsx($c,{className:"h-4.5 w-4.5"})}),v.jsxs("div",{children:[v.jsxs("p",{className:"text-sm font-bold text-foreground",children:[i," Vorschl",i===1?"ag":"äge"," im Auftragsbuch"]}),v.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),v.jsx(Oi,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),h&&v.jsxs("button",{onClick:()=>Il("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:v.jsx(Wc,{className:"h-4.5 w-4.5"})}),v.jsxs("div",{children:[v.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Update",r===1?"":"s"," bereit"]}),v.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),v.jsx(Oi,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function Vw({agent:n,svcErrors:r,onNavigate:i}){const l=[{label:"Hermes Agent",status:n?n.gateway_reachable?"Bereit":"Offline":"…",tone:n?n.gateway_reachable?"ok":"alert":"loading",action:()=>i("agent")},{label:"Konsole (Box-Shell)",status:n?n.box_console_reachable?"Bereit":"Offline":"…",tone:n?n.box_console_reachable?"ok":"warn":"loading",action:()=>i("konsole")},{label:"Systemlogs & Diagnose",status:r>0?`${r} Fehler`:"Keine Fehler",tone:r>0?"alert":"ok",action:()=>Il("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>i("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>i("chronik")}];return v.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:v.jsx("div",{className:"divide-y divide-border/20",children:l.map((a,c)=>{const f={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[a.tone];return v.jsxs("button",{onClick:a.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[v.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:a.label}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:Ye("text-[10px] font-semibold font-mono",a.tone==="ok"?"text-emerald-400":a.tone==="warn"?"text-amber-400":a.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:a.status}),v.jsx("span",{className:Ye("h-1.5 w-1.5 rounded-full",f)})]})]},c)})})})}const Hw=H.lazy(()=>Nt(()=>import("./ModelsView-BM7QJHLl.js"),__vite__mapDeps([14,15,16,17,3,9,18,19])).then(n=>({default:n.ModelsView}))),Ww=H.lazy(()=>Nt(()=>import("./ConnectView-1pPeysE2.js"),__vite__mapDeps([20,6,18,5])).then(n=>({default:n.ConnectView}))),Qw=H.lazy(()=>Nt(()=>import("./AgentView-B0wsg8uQ.js"),__vite__mapDeps([21,8,4])).then(n=>({default:n.AgentView}))),Kw=H.lazy(()=>Nt(()=>import("./KonsoleView-50ZTmnVb.js"),__vite__mapDeps([22,8,1])).then(n=>({default:n.KonsoleView}))),qw=H.lazy(()=>Nt(()=>import("./GuideView-DYdOo_ra.js"),__vite__mapDeps([23,17,19,4])).then(n=>({default:n.GuideView}))),Gw=H.lazy(()=>Nt(()=>import("./AuftragsbuchView-Ca4tUml_.js"),__vite__mapDeps([24,25,1,6,7,18])).then(n=>({default:n.AuftragsbuchView}))),Yw=H.lazy(()=>Nt(()=>import("./IdeenView-C8BKiJHT.js"),__vite__mapDeps([26,25,16,7,19,18,2,1])).then(n=>({default:n.IdeenView}))),Zw=H.lazy(()=>Nt(()=>import("./SkillsView-BPaqT2zI.js"),__vite__mapDeps([27,15,5])).then(n=>({default:n.SkillsView}))),Xw=H.lazy(()=>Nt(()=>import("./ChronikView-CBBlq8pa.js"),[]).then(n=>({default:n.ChronikView}))),Jw=H.lazy(()=>Nt(()=>import("./WissenView-zIpzRZKj.js"),__vite__mapDeps([28,13,1,3,2])).then(n=>({default:n.WissenView}))),ek=n=>{const r=n.system;return r==="wartung"||r==="logs"?{system:r}:{}},$s=Fx({component:_w,validateSearch:ek,notFoundComponent:()=>v.jsx(to,{titel:"Diese Seite gibt es nicht",text:"Der Link zeigt auf eine Ansicht, die Mission Control nicht kennt. Vielleicht stammt er aus einer älteren Fassung."})}),tk=eo({getParentRoute:()=>$s,path:"/",beforeLoad:()=>{throw ym({to:"/cockpit"})}});function ar(n,r){return eo({getParentRoute:()=>$s,path:n,component:r,errorComponent:({error:i,reset:l})=>v.jsx(to,{titel:"Diese Ansicht ist abgestürzt",text:"Der Rest von Mission Control läuft weiter. Erneut versuchen — oder in eine andere Ansicht wechseln.",fehler:i,onErneut:l})})}function nk(){const n=Al();return v.jsx(Uw,{onNavigate:r=>{const i=As.find(l=>l.id===r);i&&n({to:i.pfad})}})}const rk=ar("/cockpit",()=>v.jsx(nk,{})),sk=ar("/auftraege",()=>v.jsx(Gw,{})),ik=ar("/skills",()=>v.jsx(Zw,{})),ok=ar("/chronik",()=>v.jsx(Xw,{})),lk=ar("/verbinden",()=>v.jsx(Ww,{})),ak=ar("/konsole",()=>v.jsx(Kw,{})),uk=ar("/anleitung",()=>v.jsx(qw,{})),ck=ar("/agent",()=>v.jsx(Qw,{})),dk=eo({getParentRoute:()=>$s,path:"/ideen",validateSearch:n=>typeof n.offen=="string"&&n.offen?{offen:n.offen}:{},component:()=>v.jsx(Yw,{}),errorComponent:({error:n,reset:r})=>v.jsx(to,{titel:"Die Ideen-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),fk=eo({getParentRoute:()=>$s,path:"/wissen",validateSearch:n=>typeof n.datei=="string"&&n.datei?{datei:n.datei}:{},component:()=>v.jsx(Jw,{}),errorComponent:({error:n,reset:r})=>v.jsx(to,{titel:"Die Wissens-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),hk=eo({getParentRoute:()=>$s,path:"/modelle",validateSearch:n=>{const r=n.reiter;return r==="werkbank"||r==="routing"||r==="discover"?{reiter:r}:{}},component:()=>v.jsx(Hw,{}),errorComponent:({error:n,reset:r})=>v.jsx(to,{titel:"Der Modell-Manager ist abgestürzt",text:"Der Rest läuft weiter.",fehler:n,onErneut:r})}),pk=$s.addChildren([tk,rk,dk,sk,ik,ok,fk,lk,ak,uk,hk,ck]),mk=Wx({routeTree:pk,scrollRestoration:!0,defaultPreload:!1});class gk extends Ur.Component{constructor(){super(...arguments);dl(this,"state",{error:null})}static getDerivedStateFromError(i){return{error:i}}componentDidCatch(i,l){console.error("Unbehandelter UI-Fehler:",i,l.componentStack)}render(){return this.state.error?v.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:v.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[v.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),v.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),v.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const yk=Object.fromEntries(As.map(n=>[n.id,n.pfad]));function vk(){const n=window.location.hash.replace(/^#\/?/,"");if(!n)return;const r=yk[n];r&&window.history.replaceState(null,"",r+window.location.search)}const Gu="mc_neuladen_wegen_version";function xk(){window.addEventListener("vite:preloadError",n=>{sessionStorage.getItem(Gu)||(n.preventDefault(),sessionStorage.setItem(Gu,"1"),window.location.reload())}),window.addEventListener("load",()=>{window.setTimeout(()=>sessionStorage.removeItem(Gu),5e3)})}vk();xk();const wk=new Wv({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});xv.createRoot(document.getElementById("root")).render(v.jsx(Ur.StrictMode,{children:v.jsx(gk,{children:v.jsx(Qv,{client:wk,children:v.jsx(qx,{router:mk})})})}));export{Vk as $,Dm as A,n1 as B,r1 as C,zk as D,l1 as E,pw as F,Oi as G,u1 as H,fw as I,bk as J,vc as K,Vc as L,e1 as M,Ok as N,Wm as O,Vm as P,Hc as Q,y1 as R,w1 as S,xc as T,p1 as U,a1 as V,k1 as W,Qm as X,x1 as Y,uw as Z,cw as _,Mk as a,$c as a0,Ek as a1,Hm as a2,Ji as a3,Zu as a4,Ui as a5,$v as a6,st as a7,wt as a8,Xp as a9,Ae as aa,Tk as ab,Bk as ac,Pk as ad,d1 as ae,Wc as af,c1 as ag,Rk as ah,Ur as ai,qp as aj,jk as ak,Nk as al,h1 as am,rg as an,Sk as ao,As as ap,C1 as aq,bx as ar,Xi as as,gv as at,Ye as b,_e as c,Ck as d,t1 as e,sg as f,Lk as g,$l as h,Ik as i,v as j,Pw as k,Uk as l,Fk as m,Le as n,ys as o,_1 as p,Fe as q,H as r,_k as s,o1 as t,Lc as u,$k as v,Dk as w,hw as x,Ak as y,Al as z};