const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SystemDrawer-CpUj62ev.js","assets/refresh-cw-hAcZthO8.js","assets/file-text-BSQuFPZM.js","assets/search-D_8DnBvS.js","assets/shield-BtE9Fxv6.js","assets/arrow-right-CNrCtUoh.js","assets/clock-Bth-s5Y3.js","assets/external-link-DcJao8h4.js","assets/cloud-download-BGirmHxu.js","assets/power-DsvD9qMX.js","assets/CommandPalette-CUaikJDv.js","assets/index-CVfMhtws.js","assets/LiveAreaChartImpl-CUepOhWM.js","assets/string-DoZi9Vij.js","assets/ModelsView-dw81nBmA.js","assets/JobsBar-95gsUJZs.js","assets/code-xml-Bf-y5tB9.js","assets/zap-2yha4rs4.js","assets/chevron-down-1Vx9W9jM.js","assets/layers-CcL78b5Q.js","assets/ConnectView-CdvOrseN.js","assets/AgentView-Ddy3G6Cn.js","assets/SectionLabel-B7ySrBs7.js","assets/KonsoleView-CSxygCPx.js","assets/GuideView-CxJU6Qxs.js","assets/IdeenAnsicht-Cy8yw2ZX.js","assets/SkillsView-DqlZxdwQ.js","assets/ChronikView-79MqWZGv.js","assets/WissenView-BoYalgKN.js"])))=>i.map(i=>d[i]); var L1=Object.defineProperty;var Op=a=>{throw TypeError(a)};var B1=(a,l,s)=>l in a?L1(a,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[l]=s;var Ru=(a,l,s)=>B1(a,typeof l!="symbol"?l+"":l,s),bf=(a,l,s)=>l.has(a)||Op("Cannot "+s);var C=(a,l,s)=>(bf(a,l,"read from private field"),s?s.call(a):l.get(a)),ce=(a,l,s)=>l.has(a)?Op("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(a):l.set(a,s),le=(a,l,s,r)=>(bf(a,l,"write to private field"),r?r.call(a,s):l.set(a,s),s),Ee=(a,l,s)=>(bf(a,l,"access private method"),s);var zu=(a,l,s,r)=>({set _(o){le(a,l,o,s)},get _(){return C(a,l,r)}});function H1(a,l){for(var s=0;sr[o]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function s(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(o){if(o.ep)return;o.ep=!0;const f=s(o);fetch(o.href,f)}})();function Wy(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var xf={exports:{}},ks={};/** * @license React * react-jsx-runtime.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 kp;function q1(){if(kp)return ks;kp=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function s(r,o,f){var h=null;if(f!==void 0&&(h=""+f),o.key!==void 0&&(h=""+o.key),"key"in o){f={};for(var d in o)d!=="key"&&(f[d]=o[d])}else f=o;return o=f.ref,{$$typeof:a,type:r,key:h,ref:o!==void 0?o:null,props:f}}return ks.Fragment=l,ks.jsx=s,ks.jsxs=s,ks}var Up;function G1(){return Up||(Up=1,xf.exports=q1()),xf.exports}var v=G1(),Sf={exports:{}},he={};/** * @license React * react.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 Lp;function Q1(){if(Lp)return he;Lp=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),_=Symbol.iterator;function S(M){return M===null||typeof M!="object"?null:(M=_&&M[_]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,j={};function R(M,X,ne){this.props=M,this.context=X,this.refs=j,this.updater=ne||w}R.prototype.isReactComponent={},R.prototype.setState=function(M,X){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,X,"setState")},R.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function z(){}z.prototype=R.prototype;function L(M,X,ne){this.props=M,this.context=X,this.refs=j,this.updater=ne||w}var D=L.prototype=new z;D.constructor=L,E(D,R.prototype),D.isPureReactComponent=!0;var Z=Array.isArray;function G(){}var K={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function Q(M,X,ne){var se=ne.ref;return{$$typeof:a,type:M,key:X,ref:se!==void 0?se:null,props:ne}}function P(M,X){return Q(M.type,X,M.props)}function ee(M){return typeof M=="object"&&M!==null&&M.$$typeof===a}function I(M){var X={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ne){return X[ne]})}var fe=/\/+/g;function F(M,X){return typeof M=="object"&&M!==null&&M.key!=null?I(""+M.key):X.toString(36)}function ae(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(G,G):(M.status="pending",M.then(function(X){M.status==="pending"&&(M.status="fulfilled",M.value=X)},function(X){M.status==="pending"&&(M.status="rejected",M.reason=X)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function B(M,X,ne,se,de){var ge=typeof M;(ge==="undefined"||ge==="boolean")&&(M=null);var Ae=!1;if(M===null)Ae=!0;else switch(ge){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(M.$$typeof){case a:case l:Ae=!0;break;case b:return Ae=M._init,B(Ae(M._payload),X,ne,se,de)}}if(Ae)return de=de(M),Ae=se===""?"."+F(M,0):se,Z(de)?(ne="",Ae!=null&&(ne=Ae.replace(fe,"$&/")+"/"),B(de,X,ne,"",function(_n){return _n})):de!=null&&(ee(de)&&(de=P(de,ne+(de.key==null||M&&M.key===de.key?"":(""+de.key).replace(fe,"$&/")+"/")+Ae)),X.push(de)),1;Ae=0;var ot=se===""?".":se+":";if(Z(M))for(var Qe=0;Qe>>1,me=B[be];if(0>>1;beo(ne,te))seo(de,ne)?(B[be]=de,B[se]=te,be=se):(B[be]=ne,B[X]=te,be=X);else if(seo(de,te))B[be]=de,B[se]=te,be=se;else break e}}return W}function o(B,W){var te=B.sortIndex-W.sortIndex;return te!==0?te:B.id-W.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var h=Date,d=h.now();a.unstable_now=function(){return h.now()-d}}var p=[],g=[],b=1,y=null,_=3,S=!1,w=!1,E=!1,j=!1,R=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function D(B){for(var W=s(g);W!==null;){if(W.callback===null)r(g);else if(W.startTime<=B)r(g),W.sortIndex=W.expirationTime,l(p,W);else break;W=s(g)}}function Z(B){if(E=!1,D(B),!w)if(s(p)!==null)w=!0,G||(G=!0,I());else{var W=s(g);W!==null&&ae(Z,W.startTime-B)}}var G=!1,K=-1,J=5,Q=-1;function P(){return j?!0:!(a.unstable_now()-QB&&P());){var be=y.callback;if(typeof be=="function"){y.callback=null,_=y.priorityLevel;var me=be(y.expirationTime<=B);if(B=a.unstable_now(),typeof me=="function"){y.callback=me,D(B),W=!0;break t}y===s(p)&&r(p),D(B)}else r(p);y=s(p)}if(y!==null)W=!0;else{var M=s(g);M!==null&&ae(Z,M.startTime-B),W=!1}}break e}finally{y=null,_=te,S=!1}W=void 0}}finally{W?I():G=!1}}}var I;if(typeof L=="function")I=function(){L(ee)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,F=fe.port2;fe.port1.onmessage=ee,I=function(){F.postMessage(null)}}else I=function(){R(ee,0)};function ae(B,W){K=R(function(){B(a.unstable_now())},W)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(B){B.callback=null},a.unstable_forceFrameRate=function(B){0>B||125be?(B.sortIndex=te,l(g,B),s(p)===null&&B===s(g)&&(E?(z(K),K=-1):E=!0,ae(Z,te-be))):(B.sortIndex=me,l(p,B),w||S||(w=!0,G||(G=!0,I()))),B},a.unstable_shouldYield=P,a.unstable_wrapCallback=function(B){var W=_;return function(){var te=_;_=W;try{return B.apply(this,arguments)}finally{_=te}}}})(Ef)),Ef}var qp;function Y1(){return qp||(qp=1,wf.exports=V1()),wf.exports}var jf={exports:{}},yt={};/** * @license React * react-dom.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 Gp;function K1(){if(Gp)return yt;Gp=1;var a=rr();function l(p){var g="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),jf.exports=K1(),jf.exports}/** * @license React * react-dom-client.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 Vp;function Z1(){if(Vp)return Us;Vp=1;var a=Y1(),l=rr(),s=X1();function r(e){var t="https://react.dev/errors/"+e;if(1me||(e.current=be[me],be[me]=null,me--)}function ne(e,t){me++,be[me]=e.current,e.current=t}var se=M(null),de=M(null),ge=M(null),Ae=M(null);function ot(e,t){switch(ne(ge,t),ne(de,e),ne(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ap(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ap(t),e=lp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(se),ne(se,e)}function Qe(){X(se),X(de),X(ge)}function _n(e){e.memoizedState!==null&&ne(Ae,e);var t=se.current,n=lp(t,e.type);t!==n&&(ne(de,e),ne(se,n))}function wn(e){de.current===e&&(X(se),X(de)),Ae.current===e&&(X(Ae),zs._currentValue=te)}var Pn,Bi;function fn(e){if(Pn===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Pn=t&&t[1]||"",Bi=-1)":-1u||T[i]!==k[u]){var q=` `+T[i].replace(" at new "," at ");return e.displayName&&q.includes("")&&(q=q.replace("",e.displayName)),q}while(1<=i&&0<=u);break}}}finally{wl=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?fn(n):""}function Hi(e,t){switch(e.tag){case 26:case 27:case 5:return fn(e.type);case 16:return fn("Lazy");case 13:return e.child!==t&&t!==null?fn("Suspense Fallback"):fn("Suspense");case 19:return fn("SuspenseList");case 0:case 15:return an(e.type,!1);case 11:return an(e.type.render,!1);case 1:return an(e.type,!0);case 31:return fn("Activity");default:return""}}function En(e){try{var t="",n=null;do t+=Hi(e,n),n=e,e=e.return;while(e);return t}catch(i){return` Error generating stack: `+i.message+` `+i.stack}}var Ga=Object.prototype.hasOwnProperty,qi=a.unstable_scheduleCallback,Gi=a.unstable_cancelCallback,dr=a.unstable_shouldYield,it=a.unstable_requestPaint,Fe=a.unstable_now,jn=a.unstable_getCurrentPriorityLevel,Qi=a.unstable_ImmediatePriority,Ud=a.unstable_UserBlockingPriority,hr=a.unstable_NormalPriority,vv=a.unstable_LowPriority,Ld=a.unstable_IdlePriority,bv=a.log,xv=a.unstable_setDisableYieldValue,Vi=null,Nt=null;function In(e){if(typeof bv=="function"&&xv(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Vi,e)}catch{}}var Dt=Math.clz32?Math.clz32:wv,Sv=Math.log,_v=Math.LN2;function wv(e){return e>>>=0,e===0?32:31-(Sv(e)/_v|0)|0}var mr=256,gr=262144,pr=4194304;function Qa(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function yr(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var u=0,c=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var x=i&134217727;return x!==0?(i=x&~c,i!==0?u=Qa(i):(m&=x,m!==0?u=Qa(m):n||(n=x&~e,n!==0&&(u=Qa(n))))):(x=i&~c,x!==0?u=Qa(x):m!==0?u=Qa(m):n||(n=i&~e,n!==0&&(u=Qa(n)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:u}function Yi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ev(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bd(){var e=pr;return pr<<=1,(pr&62914560)===0&&(pr=4194304),e}function ic(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ki(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jv(e,t,n,i,u,c){var m=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var x=e.entanglements,T=e.expirationTimes,k=e.hiddenUpdates;for(n=m&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var zv=/[\n"\\]/g;function Xt(e){return e.replace(zv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function fc(e,t,n,i,u,c,m,x){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?dc(e,m,Kt(t)):n!=null?dc(e,m,Kt(n)):i!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Kt(x):e.removeAttribute("name")}function Wd(e,t,n,i,u,c,m,x){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){oc(e);return}n=n!=null?""+Kt(n):"",t=t!=null?""+Kt(t):n,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),oc(e)}function dc(e,t,n){t==="number"&&xr(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Cl(e,t,n,i){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yc=!1;if(An)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){yc=!0}}),window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{yc=!1}var ta=null,vc=null,_r=null;function lh(){if(_r)return _r;var e,t=vc,n=t.length,i,u="value"in ta?ta.value:ta.textContent,c=u.length;for(e=0;e=Pi),oh=" ",fh=!1;function dh(e,t){switch(e){case"keyup":return ib.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dl=!1;function rb(e,t){switch(e){case"compositionend":return hh(t);case"keypress":return t.which!==32?null:(fh=!0,oh);case"textInput":return e=t.data,e===oh&&fh?null:e;default:return null}}function ub(e,t){if(Dl)return e==="compositionend"||!wc&&dh(e,t)?(e=lh(),_r=vc=ta=null,Dl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sh(n)}}function wh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Eh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=xr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xr(e.document)}return t}function Tc(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")}var pb=An&&"documentMode"in document&&11>=document.documentMode,Ol=null,Mc=null,ns=null,Ac=!1;function jh(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ac||Ol==null||Ol!==xr(i)||(i=Ol,"selectionStart"in i&&Tc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ns&&ts(ns,i)||(ns=i,i=gu(Mc,"onSelect"),0>=m,u-=m,dn=1<<32-Dt(t)+u|n<ye?(we=re,re=null):we=re.sibling;var Re=U(N,re,O[ye],V);if(Re===null){re===null&&(re=we);break}e&&re&&Re.alternate===null&&t(N,re),A=c(Re,A,ye),Ce===null?ue=Re:Ce.sibling=Re,Ce=Re,re=we}if(ye===O.length)return n(N,re),je&&Rn(N,ye),ue;if(re===null){for(;yeye?(we=re,re=null):we=re.sibling;var wa=U(N,re,Re.value,V);if(wa===null){re===null&&(re=we);break}e&&re&&wa.alternate===null&&t(N,re),A=c(wa,A,ye),Ce===null?ue=wa:Ce.sibling=wa,Ce=wa,re=we}if(Re.done)return n(N,re),je&&Rn(N,ye),ue;if(re===null){for(;!Re.done;ye++,Re=O.next())Re=Y(N,Re.value,V),Re!==null&&(A=c(Re,A,ye),Ce===null?ue=Re:Ce.sibling=Re,Ce=Re);return je&&Rn(N,ye),ue}for(re=i(re);!Re.done;ye++,Re=O.next())Re=H(re,N,ye,Re.value,V),Re!==null&&(e&&Re.alternate!==null&&re.delete(Re.key===null?ye:Re.key),A=c(Re,A,ye),Ce===null?ue=Re:Ce.sibling=Re,Ce=Re);return e&&re.forEach(function(U1){return t(N,U1)}),je&&Rn(N,ye),ue}function Be(N,A,O,V){if(typeof O=="object"&&O!==null&&O.type===E&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case S:e:{for(var ue=O.key;A!==null;){if(A.key===ue){if(ue=O.type,ue===E){if(A.tag===7){n(N,A.sibling),V=u(A,O.props.children),V.return=N,N=V;break e}}else if(A.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===J&&Ia(ue)===A.type){n(N,A.sibling),V=u(A,O.props),us(V,O),V.return=N,N=V;break e}n(N,A);break}else t(N,A);A=A.sibling}O.type===E?(V=Ja(O.props.children,N.mode,V,O.key),V.return=N,N=V):(V=Nr(O.type,O.key,O.props,null,N.mode,V),us(V,O),V.return=N,N=V)}return m(N);case w:e:{for(ue=O.key;A!==null;){if(A.key===ue)if(A.tag===4&&A.stateNode.containerInfo===O.containerInfo&&A.stateNode.implementation===O.implementation){n(N,A.sibling),V=u(A,O.children||[]),V.return=N,N=V;break e}else{n(N,A);break}else t(N,A);A=A.sibling}V=kc(O,N.mode,V),V.return=N,N=V}return m(N);case J:return O=Ia(O),Be(N,A,O,V)}if(ae(O))return ie(N,A,O,V);if(I(O)){if(ue=I(O),typeof ue!="function")throw Error(r(150));return O=ue.call(O),oe(N,A,O,V)}if(typeof O.then=="function")return Be(N,A,Hr(O),V);if(O.$$typeof===L)return Be(N,A,kr(N,O),V);qr(N,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,A!==null&&A.tag===6?(n(N,A.sibling),V=u(A,O),V.return=N,N=V):(n(N,A),V=Oc(O,N.mode,V),V.return=N,N=V),m(N)):n(N,A)}return function(N,A,O,V){try{rs=0;var ue=Be(N,A,O,V);return Kl=null,ue}catch(re){if(re===Yl||re===Lr)throw re;var Ce=kt(29,re,null,N.mode);return Ce.lanes=V,Ce.return=N,Ce}finally{}}}var tl=Jh(!0),Fh=Jh(!1),sa=!1;function Zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ua(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ze&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=zr(e),Nh(e,null,n),t}return Rr(e,i,t,n),zr(e)}function cs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,qd(e,n)}}function Fc(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var u=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?u=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?u=c=t:c=c.next=t}else u=c=t;n={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var $c=!1;function os(){if($c){var e=Vl;if(e!==null)throw e}}function fs(e,t,n,i){$c=!1;var u=e.updateQueue;sa=!1;var c=u.firstBaseUpdate,m=u.lastBaseUpdate,x=u.shared.pending;if(x!==null){u.shared.pending=null;var T=x,k=T.next;T.next=null,m===null?c=k:m.next=k,m=T;var q=e.alternate;q!==null&&(q=q.updateQueue,x=q.lastBaseUpdate,x!==m&&(x===null?q.firstBaseUpdate=k:x.next=k,q.lastBaseUpdate=T))}if(c!==null){var Y=u.baseState;m=0,q=k=T=null,x=c;do{var U=x.lane&-536870913,H=U!==x.lane;if(H?(_e&U)===U:(i&U)===U){U!==0&&U===Ql&&($c=!0),q!==null&&(q=q.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ie=e,oe=x;U=t;var Be=n;switch(oe.tag){case 1:if(ie=oe.payload,typeof ie=="function"){Y=ie.call(Be,Y,U);break e}Y=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=oe.payload,U=typeof ie=="function"?ie.call(Be,Y,U):ie,U==null)break e;Y=y({},Y,U);break e;case 2:sa=!0}}U=x.callback,U!==null&&(e.flags|=64,H&&(e.flags|=8192),H=u.callbacks,H===null?u.callbacks=[U]:H.push(U))}else H={lane:U,tag:x.tag,payload:x.payload,callback:x.callback,next:null},q===null?(k=q=H,T=Y):q=q.next=H,m|=U;if(x=x.next,x===null){if(x=u.shared.pending,x===null)break;H=x,x=H.next,H.next=null,u.lastBaseUpdate=H,u.shared.pending=null}}while(!0);q===null&&(T=Y),u.baseState=T,u.firstBaseUpdate=k,u.lastBaseUpdate=q,c===null&&(u.shared.lanes=0),ha|=m,e.lanes=m,e.memoizedState=Y}}function $h(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Wh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ec?c:8;var m=B.T,x={};B.T=x,po(e,!1,t,n);try{var T=u(),k=B.S;if(k!==null&&k(x,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var q=jb(T,i);ms(e,t,q,qt(e))}else ms(e,t,i,qt(e))}catch(Y){ms(e,t,{then:function(){},status:"rejected",reason:Y},qt())}finally{W.p=c,m!==null&&x.types!==null&&(m.types=x.types),B.T=m}}function zb(){}function mo(e,t,n,i){if(e.tag!==5)throw Error(r(476));var u=Cm(e).queue;Am(e,u,t,te,n===null?zb:function(){return Rm(e),n(i)})}function Cm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Rm(e){var t=Cm(e);t.next===null&&(t=e.alternate.memoizedState),ms(e,t.next.queue,{},qt())}function go(){return ht(zs)}function zm(){return et().memoizedState}function Nm(){return et().memoizedState}function Nb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=qt();e=ra(n);var i=ua(t,e,n);i!==null&&(At(i,t,n),cs(i,t,n)),t={cache:Vc()},e.payload=t;return}t=t.return}}function Db(e,t,n){var i=qt();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},$r(e)?Om(t,n):(n=Nc(e,t,n,i),n!==null&&(At(n,e,i),km(n,t,i)))}function Dm(e,t,n){var i=qt();ms(e,t,n,i)}function ms(e,t,n,i){var u={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if($r(e))Om(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,x=c(m,n);if(u.hasEagerState=!0,u.eagerState=x,Ot(x,m))return Rr(e,t,u,0),He===null&&Cr(),!1}catch{}finally{}if(n=Nc(e,t,u,i),n!==null)return At(n,e,i),km(n,t,i),!0}return!1}function po(e,t,n,i){if(i={lane:2,revertLane:Jo(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},$r(e)){if(t)throw Error(r(479))}else t=Nc(e,n,i,2),t!==null&&At(t,e,2)}function $r(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Om(e,t){Zl=Vr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function km(e,t,n){if((n&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,qd(e,n)}}var gs={readContext:ht,use:Xr,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};gs.useEffectEvent=$e;var Um={readContext:ht,use:Xr,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:bm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Jr(4194308,4,wm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jr(4194308,4,e,t)},useInsertionEffect:function(e,t){Jr(4,2,e,t)},useMemo:function(e,t){var n=bt();t=t===void 0?null:t;var i=e();if(nl){In(!0);try{e()}finally{In(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=bt();if(n!==void 0){var u=n(t);if(nl){In(!0);try{n(t)}finally{In(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=Db.bind(null,pe,e),[i.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:function(e){e=uo(e);var t=e.queue,n=Dm.bind(null,pe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fo,useDeferredValue:function(e,t){var n=bt();return ho(n,e,t)},useTransition:function(){var e=uo(!1);return e=Am.bind(null,pe,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=pe,u=bt();if(je){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),He===null)throw Error(r(349));(_e&127)!==0||am(i,t,n)}u.memoizedState=n;var c={value:n,getSnapshot:t};return u.queue=c,bm(im.bind(null,i,c,e),[e]),i.flags|=2048,Fl(9,{destroy:void 0},lm.bind(null,i,c,n,t),null),n},useId:function(){var e=bt(),t=He.identifierPrefix;if(je){var n=hn,i=dn;n=(i&~(1<<32-Dt(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Yr++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof i.is=="string"?m.createElement("select",{is:i.is}):m.createElement("select"),i.multiple?c.multiple=!0:i.size&&(c.size=i.size);break;default:c=typeof i.is=="string"?m.createElement(u,{is:i.is}):m.createElement(u)}}c[ft]=t,c[_t]=i;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=c;e:switch(gt(c,u,i),u){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Un(t)}}return Ye(t),Ro(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Un(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(r(166));if(e=ge.current,ql(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,u=dt,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||tp(e.nodeValue,n)),e||la(t,!0)}else e=pu(e).createTextNode(i),e[ft]=t,t.stateNode=e}return Ye(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=ql(t),n!==null){if(e===null){if(!i)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ft]=t}else Fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else n=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Lt(t),t):(Lt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ye(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=ql(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[ft]=t}else Fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),u=!1}else u=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Lt(t),t):(Lt(t),null)}return Lt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==u&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),tu(t,t.updateQueue),Ye(t),null);case 4:return Qe(),e===null&&Po(t.stateNode.containerInfo),Ye(t),null;case 10:return Nn(t.type),Ye(t),null;case 19:if(X(Ie),i=t.memoizedState,i===null)return Ye(t),null;if(u=(t.flags&128)!==0,c=i.rendering,c===null)if(u)ys(i,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Qr(e),c!==null){for(t.flags|=128,ys(i,!1),e=c.updateQueue,t.updateQueue=e,tu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Dh(n,e),n=n.sibling;return ne(Ie,Ie.current&1|2),je&&Rn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Fe()>su&&(t.flags|=128,u=!0,ys(i,!1),t.lanes=4194304)}else{if(!u)if(e=Qr(c),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,tu(t,e),ys(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!je)return Ye(t),null}else 2*Fe()-i.renderingStartTime>su&&n!==536870912&&(t.flags|=128,u=!0,ys(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(e=i.last,e!==null?e.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Fe(),e.sibling=null,n=Ie.current,ne(Ie,u?n&1|2:n&1),je&&Rn(t,i.treeForkCount),e):(Ye(t),null);case 22:case 23:return Lt(t),Pc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),n=t.updateQueue,n!==null&&tu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&X(Pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Nn(tt),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Bb(e,t){switch(Lc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nn(tt),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return wn(t),null;case 31:if(t.memoizedState!==null){if(Lt(t),t.alternate===null)throw Error(r(340));Fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Lt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(Ie),null;case 4:return Qe(),null;case 10:return Nn(t.type),null;case 22:case 23:return Lt(t),Pc(),e!==null&&X(Pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Nn(tt),null;case 25:return null;default:return null}}function sg(e,t){switch(Lc(t),t.tag){case 3:Nn(tt),Qe();break;case 26:case 27:case 5:wn(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&Lt(t);break;case 13:Lt(t);break;case 19:X(Ie);break;case 10:Nn(t.type);break;case 22:case 23:Lt(t),Pc(),e!==null&&X(Pa);break;case 24:Nn(tt)}}function vs(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&e)===e){i=void 0;var c=n.create,m=n.inst;i=c(),m.destroy=i}n=n.next}while(n!==u)}}catch(x){Oe(t,t.return,x)}}function fa(e,t,n){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var c=u.next;i=c;do{if((i.tag&e)===e){var m=i.inst,x=m.destroy;if(x!==void 0){m.destroy=void 0,u=t;var T=n,k=x;try{k()}catch(q){Oe(u,T,q)}}}i=i.next}while(i!==c)}}catch(q){Oe(t,t.return,q)}}function rg(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wh(t,n)}catch(i){Oe(e,e.return,i)}}}function ug(e,t,n){n.props=al(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){Oe(e,t,i)}}function bs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(u){Oe(e,t,u)}}function mn(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(u){Oe(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){Oe(e,t,u)}else n.current=null}function cg(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(u){Oe(e,e.return,u)}}function zo(e,t,n){try{var i=e.stateNode;s1(i,e.type,n,t),i[_t]=t}catch(u){Oe(e,e.return,u)}}function og(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&va(e.type)||e.tag===4}function No(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||og(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.tag===27&&va(e.type)||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 Do(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Mn));else if(i!==4&&(i===27&&va(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Do(e,t,n),e=e.sibling;e!==null;)Do(e,t,n),e=e.sibling}function nu(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&va(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nu(e,t,n),e=e.sibling;e!==null;)nu(e,t,n),e=e.sibling}function fg(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);gt(t,i,n),t[ft]=e,t[_t]=n}catch(c){Oe(e,e.return,c)}}var Ln=!1,lt=!1,Oo=!1,dg=typeof WeakSet=="function"?WeakSet:Set,ut=null;function Hb(e,t){if(e=e.containerInfo,tf=wu,e=Eh(e),Tc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var u=i.anchorOffset,c=i.focusNode;i=i.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,x=-1,T=-1,k=0,q=0,Y=e,U=null;t:for(;;){for(var H;Y!==n||u!==0&&Y.nodeType!==3||(x=m+u),Y!==c||i!==0&&Y.nodeType!==3||(T=m+i),Y.nodeType===3&&(m+=Y.nodeValue.length),(H=Y.firstChild)!==null;)U=Y,Y=H;for(;;){if(Y===e)break t;if(U===n&&++k===u&&(x=m),U===c&&++q===i&&(T=m),(H=Y.nextSibling)!==null)break;Y=U,U=Y.parentNode}Y=H}n=x===-1||T===-1?null:{start:x,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(nf={focusedElem:e,selectionRange:n},wu=!1,ut=t;ut!==null;)if(t=ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ut=e;else for(;ut!==null;){switch(t=ut,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),gt(c,i,n),c[ft]=e,rt(c),i=c;break e;case"link":var m=vp("link","href",u).get(i+(n.href||""));if(m){for(var x=0;xBe&&(m=Be,Be=oe,oe=m);var N=_h(x,oe),A=_h(x,Be);if(N&&A&&(H.rangeCount!==1||H.anchorNode!==N.node||H.anchorOffset!==N.offset||H.focusNode!==A.node||H.focusOffset!==A.offset)){var O=Y.createRange();O.setStart(N.node,N.offset),H.removeAllRanges(),oe>Be?(H.addRange(O),H.extend(A.node,A.offset)):(O.setEnd(A.node,A.offset),H.addRange(O))}}}}for(Y=[],H=x;H=H.parentNode;)H.nodeType===1&&Y.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;xn?32:n,B.T=null,n=Go,Go=null;var c=ga,m=Qn;if(st=0,ei=ga=null,Qn=0,(ze&6)!==0)throw Error(r(331));var x=ze;if(ze|=4,wg(c.current),xg(c,c.current,m,n),ze=x,js(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Vi,c)}catch{}return!0}finally{W.p=u,B.T=i,Gg(e,t)}}function Vg(e,t,n){t=Jt(n,t),t=xo(e.stateNode,t,2),e=ua(e,t,2),e!==null&&(Ki(e,2),gn(e))}function Oe(e,t,n){if(e.tag===3)Vg(e,e,n);else for(;t!==null;){if(t.tag===3){Vg(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ma===null||!ma.has(i))){e=Jt(n,e),n=Ym(2),i=ua(t,n,2),i!==null&&(Km(n,i,t,e),Ki(i,2),gn(i));break}}t=t.return}}function Ko(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Qb;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(n)||(Lo=!0,u.add(n),e=Zb.bind(null,e,t,n),t.then(e,e))}function Zb(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,He===e&&(_e&n)===n&&(We===4||We===3&&(_e&62914560)===_e&&300>Fe()-iu?(ze&2)===0&&ti(e,0):Bo|=n,Il===_e&&(Il=0)),gn(e)}function Yg(e,t){t===0&&(t=Bd()),e=Za(e,t),e!==null&&(Ki(e,t),gn(e))}function Jb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yg(e,n)}function Fb(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(t),Yg(e,n)}function $b(e,t){return qi(e,t)}var du=null,ai=null,Xo=!1,hu=!1,Zo=!1,ya=0;function gn(e){e!==ai&&e.next===null&&(ai===null?du=ai=e:ai=ai.next=e),hu=!0,Xo||(Xo=!0,Pb())}function js(e,t){if(!Zo&&hu){Zo=!0;do for(var n=!1,i=du;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var c=0;else{var m=i.suspendedLanes,x=i.pingedLanes;c=(1<<31-Dt(42|e)+1)-1,c&=u&~(m&~x),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Jg(i,c))}else c=_e,c=yr(i,i===He?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(c&3)===0||Yi(i,c)||(n=!0,Jg(i,c));i=i.next}while(n);Zo=!1}}function Wb(){Kg()}function Kg(){hu=Xo=!1;var e=0;ya!==0&&u1()&&(e=ya);for(var t=Fe(),n=null,i=du;i!==null;){var u=i.next,c=Xg(i,t);c===0?(i.next=null,n===null?du=u:n.next=u,u===null&&(ai=n)):(n=i,(e!==0||(c&3)!==0)&&(hu=!0)),i=u}st!==0&&st!==5||js(e),ya!==0&&(ya=0)}function Xg(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0x)break;var q=T.transferSize,Y=T.initiatorType;q&&np(Y)&&(T=T.responseEnd,m+=q*(T"u"?null:document;function mp(e,t,n){var i=li;if(i&&typeof t=="string"&&t){var u=Xt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),hp.has(u)||(hp.add(u),e={rel:e,crossOrigin:n,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),gt(t,"link",e),rt(t),i.head.appendChild(t)))}}function y1(e){Vn.D(e),mp("dns-prefetch",e,null)}function v1(e,t){Vn.C(e,t),mp("preconnect",e,t)}function b1(e,t,n){Vn.L(e,t,n);var i=li;if(i&&e&&t){var u='link[rel="preload"][as="'+Xt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+Xt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+Xt(n.imageSizes)+'"]')):u+='[href="'+Xt(e)+'"]';var c=u;switch(t){case"style":c=ii(e);break;case"script":c=si(e)}en.has(c)||(e=y({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),en.set(c,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(Cs(c))||t==="script"&&i.querySelector(Rs(c))||(t=i.createElement("link"),gt(t,"link",e),rt(t),i.head.appendChild(t)))}}function x1(e,t){Vn.m(e,t);var n=li;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Xt(i)+'"][href="'+Xt(e)+'"]',c=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=si(e)}if(!en.has(c)&&(e=y({rel:"modulepreload",href:e},t),en.set(c,e),n.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Rs(c)))return}i=n.createElement("link"),gt(i,"link",e),rt(i),n.head.appendChild(i)}}}function S1(e,t,n){Vn.S(e,t,n);var i=li;if(i&&e){var u=Ml(i).hoistableStyles,c=ii(e);t=t||"default";var m=u.get(c);if(!m){var x={loading:0,preload:null};if(m=i.querySelector(Cs(c)))x.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},n),(n=en.get(c))&&of(e,n);var T=m=i.createElement("link");rt(T),gt(T,"link",e),T._p=new Promise(function(k,q){T.onload=k,T.onerror=q}),T.addEventListener("load",function(){x.loading|=1}),T.addEventListener("error",function(){x.loading|=2}),x.loading|=4,vu(m,t,i)}m={type:"stylesheet",instance:m,count:1,state:x},u.set(c,m)}}}function _1(e,t){Vn.X(e,t);var n=li;if(n&&e){var i=Ml(n).hoistableScripts,u=si(e),c=i.get(u);c||(c=n.querySelector(Rs(u)),c||(e=y({src:e,async:!0},t),(t=en.get(u))&&ff(e,t),c=n.createElement("script"),rt(c),gt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(u,c))}}function w1(e,t){Vn.M(e,t);var n=li;if(n&&e){var i=Ml(n).hoistableScripts,u=si(e),c=i.get(u);c||(c=n.querySelector(Rs(u)),c||(e=y({src:e,async:!0,type:"module"},t),(t=en.get(u))&&ff(e,t),c=n.createElement("script"),rt(c),gt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(u,c))}}function gp(e,t,n,i){var u=(u=ge.current)?yu(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ii(n.href),n=Ml(u).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ii(n.href);var c=Ml(u).hoistableStyles,m=c.get(e);if(m||(u=u.ownerDocument||u,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,m),(c=u.querySelector(Cs(e)))&&!c._p&&(m.instance=c,m.state.loading=5),en.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},en.set(e,n),c||E1(u,e,n,m.state))),t&&i===null)throw Error(r(528,""));return m}if(t&&i!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=si(n),n=Ml(u).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ii(e){return'href="'+Xt(e)+'"'}function Cs(e){return'link[rel="stylesheet"]['+e+"]"}function pp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function E1(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),gt(t,"link",n),rt(t),e.head.appendChild(t))}function si(e){return'[src="'+Xt(e)+'"]'}function Rs(e){return"script[async]"+e}function yp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Xt(n.href)+'"]');if(i)return t.instance=i,rt(i),i;var u=y({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),rt(i),gt(i,"style",u),vu(i,n.precedence,e),t.instance=i;case"stylesheet":u=ii(n.href);var c=e.querySelector(Cs(u));if(c)return t.state.loading|=4,t.instance=c,rt(c),c;i=pp(n),(u=en.get(u))&&of(i,u),c=(e.ownerDocument||e).createElement("link"),rt(c);var m=c;return m._p=new Promise(function(x,T){m.onload=x,m.onerror=T}),gt(c,"link",i),t.state.loading|=4,vu(c,n.precedence,e),t.instance=c;case"script":return c=si(n.src),(u=e.querySelector(Rs(c)))?(t.instance=u,rt(u),u):(i=n,(u=en.get(c))&&(i=y({},n),ff(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),rt(u),gt(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,vu(i,n.precedence,e));return t.instance}function vu(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,c=u,m=0;m title"):null)}function j1(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function xp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function T1(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=ii(i.href),c=t.querySelector(Cs(u));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=xu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,rt(c);return}c=t.ownerDocument||t,i=pp(i),(u=en.get(u))&&of(i,u),c=c.createElement("link"),rt(c);var m=c;m._p=new Promise(function(x,T){m.onload=x,m.onerror=T}),gt(c,"link",i),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=xu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var df=0;function M1(e,t){return e.stylesheets&&e.count===0&&_u(e,e.stylesheets),0df?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(u)}}:null}function xu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_u(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Su=null;function _u(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Su=new Map,t.forEach(A1,e),Su=null,xu.call(e))}function A1(e,t){if(!(t.state.loading&4)){var n=Su.get(e);if(n)var i=n.get(null);else{n=new Map,Su.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),_f.exports=Z1(),_f.exports}var F1=J1();const $1=Wy(F1);var ur=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(a){return this.listeners.add(a),this.onSubscribe(),()=>{this.listeners.delete(a),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},cl,Aa,vi,Gy,W1=(Gy=class extends ur{constructor(){super();ce(this,cl);ce(this,Aa);ce(this,vi);le(this,vi,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){C(this,Aa)||this.setEventListener(C(this,vi))}onUnsubscribe(){var l;this.hasListeners()||((l=C(this,Aa))==null||l.call(this),le(this,Aa,void 0))}setEventListener(l){var s;le(this,vi,l),(s=C(this,Aa))==null||s.call(this),le(this,Aa,l(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(l){C(this,cl)!==l&&(le(this,cl,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(s=>{s(l)})}isFocused(){var l;return typeof C(this,cl)=="boolean"?C(this,cl):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},cl=new WeakMap,Aa=new WeakMap,vi=new WeakMap,Gy),hd=new W1,P1={setTimeout:(a,l)=>setTimeout(a,l),clearTimeout:a=>clearTimeout(a),setInterval:(a,l)=>setInterval(a,l),clearInterval:a=>clearInterval(a)},Ca,dd,Qy,I1=(Qy=class{constructor(){ce(this,Ca,P1);ce(this,dd,!1)}setTimeoutProvider(a){le(this,Ca,a)}setTimeout(a,l){return C(this,Ca).setTimeout(a,l)}clearTimeout(a){C(this,Ca).clearTimeout(a)}setInterval(a,l){return C(this,Ca).setInterval(a,l)}clearInterval(a){C(this,Ca).clearInterval(a)}},Ca=new WeakMap,dd=new WeakMap,Qy),rl=new I1;function ex(a){setTimeout(a,0)}var tx=typeof window>"u"||"Deno"in globalThis;function Rt(){}function nx(a,l){return typeof a=="function"?a(l):a}function Hf(a){return typeof a=="number"&&a>=0&&a!==1/0}function Py(a,l){return Math.max(a+(l||0)-Date.now(),0)}function La(a,l){return typeof a=="function"?a(l):a}function Qt(a,l){return typeof a=="function"?a(l):a}function Kp(a,l){const{type:s="all",exact:r,fetchStatus:o,predicate:f,queryKey:h,stale:d}=a;if(h){if(r){if(l.queryHash!==md(h,l.options))return!1}else if(!Fs(l.queryKey,h))return!1}if(s!=="all"){const p=l.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&l.isStale()!==d||o&&o!==l.state.fetchStatus||f&&!f(l))}function Xp(a,l){const{exact:s,status:r,predicate:o,mutationKey:f}=a;if(f){if(!l.options.mutationKey)return!1;if(s){if(Js(l.options.mutationKey)!==Js(f))return!1}else if(!Fs(l.options.mutationKey,f))return!1}return!(r&&l.state.status!==r||o&&!o(l))}function md(a,l){return((l==null?void 0:l.queryKeyHashFn)||Js)(a)}function Js(a){return JSON.stringify(a,(l,s)=>Gf(s)?Object.keys(s).sort().reduce((r,o)=>(r[o]=s[o],r),{}):s)}function Fs(a,l){return a===l?!0:typeof a!=typeof l?!1:a&&l&&typeof a=="object"&&typeof l=="object"?Object.keys(l).every(s=>Fs(a[s],l[s])):!1}var ax=Object.prototype.hasOwnProperty;function Iy(a,l,s=0){if(a===l)return a;if(s>500)return l;const r=Zp(a)&&Zp(l);if(!r&&!(Gf(a)&&Gf(l)))return l;const f=(r?a:Object.keys(a)).length,h=r?l:Object.keys(l),d=h.length,p=r?new Array(d):{};let g=0;for(let b=0;b{rl.setTimeout(l,a)})}function Qf(a,l,s){return typeof s.structuralSharing=="function"?s.structuralSharing(a,l):s.structuralSharing!==!1?Iy(a,l):l}function ix(a,l,s=0){const r=[...a,l];return s&&r.length>s?r.slice(1):r}function sx(a,l,s=0){const r=[l,...a];return s&&r.length>s?r.slice(0,-1):r}var gd=Symbol();function e0(a,l){return!a.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!a.queryFn||a.queryFn===gd?()=>Promise.reject(new Error(`Missing queryFn: '${a.queryHash}'`)):a.queryFn}function t0(a,l){return typeof a=="function"?a(...l):!!a}function rx(a,l,s){let r=!1,o;return Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(o??(o=l()),r||(r=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),a}var $s=(()=>{let a=()=>tx;return{isServer(){return a()},setIsServer(l){a=l}}})();function Vf(){let a,l;const s=new Promise((o,f)=>{a=o,l=f});s.status="pending",s.catch(()=>{});function r(o){Object.assign(s,o),delete s.resolve,delete s.reject}return s.resolve=o=>{r({status:"fulfilled",value:o}),a(o)},s.reject=o=>{r({status:"rejected",reason:o}),l(o)},s}var ux=ex;function cx(){let a=[],l=0,s=d=>{d()},r=d=>{d()},o=ux;const f=d=>{l?a.push(d):o(()=>{s(d)})},h=()=>{const d=a;a=[],d.length&&o(()=>{r(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;l++;try{p=d()}finally{l--,l||h()}return p},batchCalls:d=>(...p)=>{f(()=>{d(...p)})},schedule:f,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{r=d},setScheduler:d=>{o=d}}}var pt=cx(),bi,Ra,xi,Vy,ox=(Vy=class extends ur{constructor(){super();ce(this,bi,!0);ce(this,Ra);ce(this,xi);le(this,xi,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l(!0),r=()=>l(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Ra)||this.setEventListener(C(this,xi))}onUnsubscribe(){var l;this.hasListeners()||((l=C(this,Ra))==null||l.call(this),le(this,Ra,void 0))}setEventListener(l){var s;le(this,xi,l),(s=C(this,Ra))==null||s.call(this),le(this,Ra,l(this.setOnline.bind(this)))}setOnline(l){C(this,bi)!==l&&(le(this,bi,l),this.listeners.forEach(r=>{r(l)}))}isOnline(){return C(this,bi)}},bi=new WeakMap,Ra=new WeakMap,xi=new WeakMap,Vy),Vu=new ox;function fx(a){return Math.min(1e3*2**a,3e4)}function n0(a){return(a??"online")==="online"?Vu.isOnline():!0}var Yf=class extends Error{constructor(a){super("CancelledError"),this.revert=a==null?void 0:a.revert,this.silent=a==null?void 0:a.silent}};function a0(a){let l=!1,s=0,r;const o=Vf(),f=()=>o.status!=="pending",h=E=>{var j;if(!f()){const R=new Yf(E);_(R),(j=a.onCancel)==null||j.call(a,R)}},d=()=>{l=!0},p=()=>{l=!1},g=()=>hd.isFocused()&&(a.networkMode==="always"||Vu.isOnline())&&a.canRun(),b=()=>n0(a.networkMode)&&a.canRun(),y=E=>{f()||(r==null||r(),o.resolve(E))},_=E=>{f()||(r==null||r(),o.reject(E))},S=()=>new Promise(E=>{var j;r=R=>{(f()||g())&&E(R)},(j=a.onPause)==null||j.call(a)}).then(()=>{var E;r=void 0,f()||(E=a.onContinue)==null||E.call(a)}),w=()=>{if(f())return;let E;const j=s===0?a.initialPromise:void 0;try{E=j??a.fn()}catch(R){E=Promise.reject(R)}Promise.resolve(E).then(y).catch(R=>{var G;if(f())return;const z=a.retry??($s.isServer()?0:3),L=a.retryDelay??fx,D=typeof L=="function"?L(s,R):L,Z=z===!0||typeof z=="number"&&sg()?void 0:S()).then(()=>{l?_(R):w()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(r==null||r(),o),cancelRetry:d,continueRetry:p,canStart:b,start:()=>(b()?w():S().then(w),o)}}var ol,Yy,l0=(Yy=class{constructor(){ce(this,ol)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hf(this.gcTime)&&le(this,ol,rl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(a){this.gcTime=Math.max(this.gcTime||0,a??($s.isServer()?1/0:300*1e3))}clearGcTimeout(){C(this,ol)!==void 0&&(rl.clearTimeout(C(this,ol)),le(this,ol,void 0))}},ol=new WeakMap,Yy);function dx(a){return{onFetch:(l,s)=>{var b,y,_,S,w;const r=l.options,o=(_=(y=(b=l.fetchOptions)==null?void 0:b.meta)==null?void 0:y.fetchMore)==null?void 0:_.direction,f=((S=l.state.data)==null?void 0:S.pages)||[],h=((w=l.state.data)==null?void 0:w.pageParams)||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let E=!1;const j=L=>{rx(L,()=>l.signal,()=>E=!0)},R=e0(l.options,l.fetchOptions),z=async(L,D,Z)=>{if(E)return Promise.reject(l.signal.reason);if(D==null&&L.pages.length)return Promise.resolve(L);const K=(()=>{const ee={client:l.client,queryKey:l.queryKey,pageParam:D,direction:Z?"backward":"forward",meta:l.options.meta};return j(ee),ee})(),J=await R(K),{maxPages:Q}=l.options,P=Z?sx:ix;return{pages:P(L.pages,J,Q),pageParams:P(L.pageParams,D,Q)}};if(o&&f.length){const L=o==="backward",D=L?hx:Fp,Z={pages:f,pageParams:h},G=D(r,Z);d=await z(Z,G,L)}else{const L=a??f.length;do{const D=p===0?h[0]??r.initialPageParam:Fp(r,d);if(p>0&&D==null)break;d=await z(d,D),p++}while(p{var E,j;return(j=(E=l.options).persister)==null?void 0:j.call(E,g,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},s)}:l.fetchFn=g}}}function Fp(a,{pages:l,pageParams:s}){const r=l.length-1;return l.length>0?a.getNextPageParam(l[r],l,s[r],s):void 0}function hx(a,{pages:l,pageParams:s}){var r;return l.length>0?(r=a.getPreviousPageParam)==null?void 0:r.call(a,l[0],l,s[0],s):void 0}var Si,fl,_i,tn,dl,ct,nr,hl,Gt,i0,Kn,Ky,mx=(Ky=class extends l0{constructor(l){super();ce(this,Gt);ce(this,Si);ce(this,fl);ce(this,_i);ce(this,tn);ce(this,dl);ce(this,ct);ce(this,nr);ce(this,hl);le(this,hl,!1),le(this,nr,l.defaultOptions),this.setOptions(l.options),this.observers=[],le(this,dl,l.client),le(this,tn,C(this,dl).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,le(this,fl,Wp(this.options)),this.state=l.state??C(this,fl),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return C(this,Si)}get promise(){var l;return(l=C(this,ct))==null?void 0:l.promise}setOptions(l){if(this.options={...C(this,nr),...l},l!=null&&l._type&&le(this,Si,l._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Wp(this.options);s.data!==void 0&&(this.setState($p(s.data,s.dataUpdatedAt)),le(this,fl,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,tn).remove(this)}setData(l,s){const r=Qf(this.state.data,l,this.options);return Ee(this,Gt,Kn).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(l){Ee(this,Gt,Kn).call(this,{type:"setState",state:l})}cancel(l){var r,o;const s=(r=C(this,ct))==null?void 0:r.promise;return(o=C(this,ct))==null||o.cancel(l),s?s.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return C(this,fl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>Qt(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===gd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>La(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!Py(this.state.dataUpdatedAt,l)}onFocus(){var s;const l=this.observers.find(r=>r.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(s=C(this,ct))==null||s.continue()}onOnline(){var s;const l=this.observers.find(r=>r.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(s=C(this,ct))==null||s.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),C(this,tn).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(s=>s!==l),this.observers.length||(C(this,ct)&&(C(this,hl)||Ee(this,Gt,i0).call(this)?C(this,ct).cancel({revert:!0}):C(this,ct).cancelRetry()),this.scheduleGc()),C(this,tn).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,Gt,Kn).call(this,{type:"invalidate"})}async fetch(l,s){var g,b,y,_,S,w,E,j,R,z,L;if(this.state.fetchStatus!=="idle"&&((g=C(this,ct))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(C(this,ct))return C(this,ct).continueRetry(),C(this,ct).promise}if(l&&this.setOptions(l),!this.options.queryFn){const D=this.observers.find(Z=>Z.options.queryFn);D&&this.setOptions(D.options)}const r=new AbortController,o=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(le(this,hl,!0),r.signal)})},f=()=>{const D=e0(this.options,s),G=(()=>{const K={client:C(this,dl),queryKey:this.queryKey,meta:this.meta};return o(K),K})();return le(this,hl,!1),this.options.persister?this.options.persister(D,G,this):D(G)},d=(()=>{const D={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:C(this,dl),state:this.state,fetchFn:f};return o(D),D})(),p=C(this,Si)==="infinite"?dx(this.options.pages):this.options.behavior;p==null||p.onFetch(d,this),le(this,_i,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=d.fetchOptions)==null?void 0:b.meta))&&Ee(this,Gt,Kn).call(this,{type:"fetch",meta:(y=d.fetchOptions)==null?void 0:y.meta}),le(this,ct,a0({initialPromise:s==null?void 0:s.initialPromise,fn:d.fetchFn,onCancel:D=>{D instanceof Yf&&D.revert&&this.setState({...C(this,_i),fetchStatus:"idle"}),r.abort()},onFail:(D,Z)=>{Ee(this,Gt,Kn).call(this,{type:"failed",failureCount:D,error:Z})},onPause:()=>{Ee(this,Gt,Kn).call(this,{type:"pause"})},onContinue:()=>{Ee(this,Gt,Kn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const D=await C(this,ct).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(S=(_=C(this,tn).config).onSuccess)==null||S.call(_,D,this),(E=(w=C(this,tn).config).onSettled)==null||E.call(w,D,this.state.error,this),D}catch(D){if(D instanceof Yf){if(D.silent)return C(this,ct).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw Ee(this,Gt,Kn).call(this,{type:"error",error:D}),(R=(j=C(this,tn).config).onError)==null||R.call(j,D,this),(L=(z=C(this,tn).config).onSettled)==null||L.call(z,this.state.data,D,this),D}finally{this.scheduleGc()}}},Si=new WeakMap,fl=new WeakMap,_i=new WeakMap,tn=new WeakMap,dl=new WeakMap,ct=new WeakMap,nr=new WeakMap,hl=new WeakMap,Gt=new WeakSet,i0=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Kn=function(l){const s=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...s0(r.data,this.options),fetchMeta:l.meta??null};case"success":const o={...r,...$p(l.data,l.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return le(this,_i,l.manual?o:void 0),o;case"error":const f=l.error;return{...r,error:f,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=s(this.state),pt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,tn).notify({query:this,type:"updated",action:l})})},Ky);function s0(a,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n0(l.networkMode)?"fetching":"paused",...a===void 0&&{error:null,status:"pending"}}}function $p(a,l){return{data:a,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Wp(a){const l=typeof a.initialData=="function"?a.initialData():a.initialData,s=l!==void 0,r=s?typeof a.initialDataUpdatedAt=="function"?a.initialDataUpdatedAt():a.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Ct,Te,ar,xt,ml,wi,Xn,za,lr,Ei,ji,gl,pl,Na,Ti,Ne,Vs,Kf,Xf,Zf,Jf,Ff,$f,Wf,r0,Xy,gx=(Xy=class extends ur{constructor(l,s){super();ce(this,Ne);ce(this,Ct);ce(this,Te);ce(this,ar);ce(this,xt);ce(this,ml);ce(this,wi);ce(this,Xn);ce(this,za);ce(this,lr);ce(this,Ei);ce(this,ji);ce(this,gl);ce(this,pl);ce(this,Na);ce(this,Ti,new Set);this.options=s,le(this,Ct,l),le(this,za,null),le(this,Xn,Vf()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,Te).addObserver(this),Pp(C(this,Te),this.options)?Ee(this,Ne,Vs).call(this):this.updateResult(),Ee(this,Ne,Jf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pf(C(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pf(C(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,Ne,Ff).call(this),Ee(this,Ne,$f).call(this),C(this,Te).removeObserver(this)}setOptions(l){const s=this.options,r=C(this,Te);if(this.options=C(this,Ct).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,C(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,Ne,Wf).call(this),C(this,Te).setOptions(this.options),s._defaulted&&!qf(this.options,s)&&C(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,Te),observer:this});const o=this.hasListeners();o&&Ip(C(this,Te),r,this.options,s)&&Ee(this,Ne,Vs).call(this),this.updateResult(),o&&(C(this,Te)!==r||Qt(this.options.enabled,C(this,Te))!==Qt(s.enabled,C(this,Te))||La(this.options.staleTime,C(this,Te))!==La(s.staleTime,C(this,Te)))&&Ee(this,Ne,Kf).call(this);const f=Ee(this,Ne,Xf).call(this);o&&(C(this,Te)!==r||Qt(this.options.enabled,C(this,Te))!==Qt(s.enabled,C(this,Te))||f!==C(this,Na))&&Ee(this,Ne,Zf).call(this,f)}getOptimisticResult(l){const s=C(this,Ct).getQueryCache().build(C(this,Ct),l),r=this.createResult(s,l);return yx(this,r)&&(le(this,xt,r),le(this,wi,this.options),le(this,ml,C(this,Te).state)),r}getCurrentResult(){return C(this,xt)}trackResult(l,s){return new Proxy(l,{get:(r,o)=>(this.trackProp(o),s==null||s(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,Xn).status==="pending"&&C(this,Xn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(l){C(this,Ti).add(l)}getCurrentQuery(){return C(this,Te)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const s=C(this,Ct).defaultQueryOptions(l),r=C(this,Ct).getQueryCache().build(C(this,Ct),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(l){return Ee(this,Ne,Vs).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,xt)))}createResult(l,s){var Q;const r=C(this,Te),o=this.options,f=C(this,xt),h=C(this,ml),d=C(this,wi),g=l!==r?l.state:C(this,ar),{state:b}=l;let y={...b},_=!1,S;if(s._optimisticResults){const P=this.hasListeners(),ee=!P&&Pp(l,s),I=P&&Ip(l,r,s,o);(ee||I)&&(y={...y,...s0(b.data,l.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:w,errorUpdatedAt:E,status:j}=y;S=y.data;let R=!1;if(s.placeholderData!==void 0&&S===void 0&&j==="pending"){let P;f!=null&&f.isPlaceholderData&&s.placeholderData===(d==null?void 0:d.placeholderData)?(P=f.data,R=!0):P=typeof s.placeholderData=="function"?s.placeholderData((Q=C(this,ji))==null?void 0:Q.state.data,C(this,ji)):s.placeholderData,P!==void 0&&(j="success",S=Qf(f==null?void 0:f.data,P,s),_=!0)}if(s.select&&S!==void 0&&!R)if(f&&S===(h==null?void 0:h.data)&&s.select===C(this,lr))S=C(this,Ei);else try{le(this,lr,s.select),S=s.select(S),S=Qf(f==null?void 0:f.data,S,s),le(this,Ei,S),le(this,za,null)}catch(P){le(this,za,P)}C(this,za)&&(w=C(this,za),S=C(this,Ei),E=Date.now(),j="error");const z=y.fetchStatus==="fetching",L=j==="pending",D=j==="error",Z=L&&z,G=S!==void 0,J={status:j,fetchStatus:y.fetchStatus,isPending:L,isSuccess:j==="success",isError:D,isInitialLoading:Z,isLoading:Z,data:S,dataUpdatedAt:y.dataUpdatedAt,error:w,errorUpdatedAt:E,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:y.dataUpdateCount>g.dataUpdateCount||y.errorUpdateCount>g.errorUpdateCount,isFetching:z,isRefetching:z&&!L,isLoadingError:D&&!G,isPaused:y.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:D&&G,isStale:pd(l,s),refetch:this.refetch,promise:C(this,Xn),isEnabled:Qt(s.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const P=J.data!==void 0,ee=J.status==="error"&&!P,I=ae=>{ee?ae.reject(J.error):P&&ae.resolve(J.data)},fe=()=>{const ae=le(this,Xn,J.promise=Vf());I(ae)},F=C(this,Xn);switch(F.status){case"pending":l.queryHash===r.queryHash&&I(F);break;case"fulfilled":(ee||J.data!==F.value)&&fe();break;case"rejected":(!ee||J.error!==F.reason)&&fe();break}}return J}updateResult(){const l=C(this,xt),s=this.createResult(C(this,Te),this.options);if(le(this,ml,C(this,Te).state),le(this,wi,this.options),C(this,ml).data!==void 0&&le(this,ji,C(this,Te)),qf(s,l))return;le(this,xt,s);const r=()=>{if(!l)return!0;const{notifyOnChangeProps:o}=this.options,f=typeof o=="function"?o():o;if(f==="all"||!f&&!C(this,Ti).size)return!0;const h=new Set(f??C(this,Ti));return this.options.throwOnError&&h.add("error"),Object.keys(C(this,xt)).some(d=>{const p=d;return C(this,xt)[p]!==l[p]&&h.has(p)})};Ee(this,Ne,r0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,Ne,Jf).call(this)}},Ct=new WeakMap,Te=new WeakMap,ar=new WeakMap,xt=new WeakMap,ml=new WeakMap,wi=new WeakMap,Xn=new WeakMap,za=new WeakMap,lr=new WeakMap,Ei=new WeakMap,ji=new WeakMap,gl=new WeakMap,pl=new WeakMap,Na=new WeakMap,Ti=new WeakMap,Ne=new WeakSet,Vs=function(l){Ee(this,Ne,Wf).call(this);let s=C(this,Te).fetch(this.options,l);return l!=null&&l.throwOnError||(s=s.catch(Rt)),s},Kf=function(){Ee(this,Ne,Ff).call(this);const l=La(this.options.staleTime,C(this,Te));if($s.isServer()||C(this,xt).isStale||!Hf(l))return;const r=Py(C(this,xt).dataUpdatedAt,l)+1;le(this,gl,rl.setTimeout(()=>{C(this,xt).isStale||this.updateResult()},r))},Xf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,Te)):this.options.refetchInterval)??!1},Zf=function(l){Ee(this,Ne,$f).call(this),le(this,Na,l),!($s.isServer()||Qt(this.options.enabled,C(this,Te))===!1||!Hf(C(this,Na))||C(this,Na)===0)&&le(this,pl,rl.setInterval(()=>{(this.options.refetchIntervalInBackground||hd.isFocused())&&Ee(this,Ne,Vs).call(this)},C(this,Na)))},Jf=function(){Ee(this,Ne,Kf).call(this),Ee(this,Ne,Zf).call(this,Ee(this,Ne,Xf).call(this))},Ff=function(){C(this,gl)!==void 0&&(rl.clearTimeout(C(this,gl)),le(this,gl,void 0))},$f=function(){C(this,pl)!==void 0&&(rl.clearInterval(C(this,pl)),le(this,pl,void 0))},Wf=function(){const l=C(this,Ct).getQueryCache().build(C(this,Ct),this.options);if(l===C(this,Te))return;const s=C(this,Te);le(this,Te,l),le(this,ar,l.state),this.hasListeners()&&(s==null||s.removeObserver(this),l.addObserver(this))},r0=function(l){pt.batch(()=>{l.listeners&&this.listeners.forEach(s=>{s(C(this,xt))}),C(this,Ct).getQueryCache().notify({query:C(this,Te),type:"observerResultsUpdated"})})},Xy);function px(a,l){return Qt(l.enabled,a)!==!1&&a.state.data===void 0&&!(a.state.status==="error"&&Qt(l.retryOnMount,a)===!1)}function Pp(a,l){return px(a,l)||a.state.data!==void 0&&Pf(a,l,l.refetchOnMount)}function Pf(a,l,s){if(Qt(l.enabled,a)!==!1&&La(l.staleTime,a)!=="static"){const r=typeof s=="function"?s(a):s;return r==="always"||r!==!1&&pd(a,l)}return!1}function Ip(a,l,s,r){return(a!==l||Qt(r.enabled,a)===!1)&&(!s.suspense||a.state.status!=="error")&&pd(a,s)}function pd(a,l){return Qt(l.enabled,a)!==!1&&a.isStaleByTime(La(l.staleTime,a))}function yx(a,l){return!qf(a.getCurrentResult(),l)}var ir,yn,vt,yl,vn,Ta,Zy,vx=(Zy=class extends l0{constructor(l){super();ce(this,vn);ce(this,ir);ce(this,yn);ce(this,vt);ce(this,yl);le(this,ir,l.client),this.mutationId=l.mutationId,le(this,vt,l.mutationCache),le(this,yn,[]),this.state=l.state||bx(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){C(this,yn).includes(l)||(C(this,yn).push(l),this.clearGcTimeout(),C(this,vt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){le(this,yn,C(this,yn).filter(s=>s!==l)),this.scheduleGc(),C(this,vt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){C(this,yn).length||(this.state.status==="pending"?this.scheduleGc():C(this,vt).remove(this))}continue(){var l;return((l=C(this,yl))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,d,p,g,b,y,_,S,w,E,j,R,z,L,D,Z,G,K;const s=()=>{Ee(this,vn,Ta).call(this,{type:"continue"})},r={client:C(this,ir),meta:this.options.meta,mutationKey:this.options.mutationKey};le(this,yl,a0({fn:()=>this.options.mutationFn?this.options.mutationFn(l,r):Promise.reject(new Error("No mutationFn found")),onFail:(J,Q)=>{Ee(this,vn,Ta).call(this,{type:"failed",failureCount:J,error:Q})},onPause:()=>{Ee(this,vn,Ta).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,vt).canRun(this)}));const o=this.state.status==="pending",f=!C(this,yl).canStart();try{if(o)s();else{Ee(this,vn,Ta).call(this,{type:"pending",variables:l,isPaused:f}),C(this,vt).config.onMutate&&await C(this,vt).config.onMutate(l,this,r);const Q=await((d=(h=this.options).onMutate)==null?void 0:d.call(h,l,r));Q!==this.state.context&&Ee(this,vn,Ta).call(this,{type:"pending",context:Q,variables:l,isPaused:f})}const J=await C(this,yl).start();return await((g=(p=C(this,vt).config).onSuccess)==null?void 0:g.call(p,J,l,this.state.context,this,r)),await((y=(b=this.options).onSuccess)==null?void 0:y.call(b,J,l,this.state.context,r)),await((S=(_=C(this,vt).config).onSettled)==null?void 0:S.call(_,J,null,this.state.variables,this.state.context,this,r)),await((E=(w=this.options).onSettled)==null?void 0:E.call(w,J,null,l,this.state.context,r)),Ee(this,vn,Ta).call(this,{type:"success",data:J}),J}catch(J){try{await((R=(j=C(this,vt).config).onError)==null?void 0:R.call(j,J,l,this.state.context,this,r))}catch(Q){Promise.reject(Q)}try{await((L=(z=this.options).onError)==null?void 0:L.call(z,J,l,this.state.context,r))}catch(Q){Promise.reject(Q)}try{await((Z=(D=C(this,vt).config).onSettled)==null?void 0:Z.call(D,void 0,J,this.state.variables,this.state.context,this,r))}catch(Q){Promise.reject(Q)}try{await((K=(G=this.options).onSettled)==null?void 0:K.call(G,void 0,J,l,this.state.context,r))}catch(Q){Promise.reject(Q)}throw Ee(this,vn,Ta).call(this,{type:"error",error:J}),J}finally{C(this,vt).runNext(this)}}},ir=new WeakMap,yn=new WeakMap,vt=new WeakMap,yl=new WeakMap,vn=new WeakSet,Ta=function(l){const s=r=>{switch(l.type){case"failed":return{...r,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...r,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:l.error,failureCount:r.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=s(this.state),pt.batch(()=>{C(this,yn).forEach(r=>{r.onMutationUpdate(l)}),C(this,vt).notify({mutation:this,type:"updated",action:l})})},Zy);function bx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Zn,un,sr,Jy,xx=(Jy=class extends ur{constructor(l={}){super();ce(this,Zn);ce(this,un);ce(this,sr);this.config=l,le(this,Zn,new Set),le(this,un,new Map),le(this,sr,0)}build(l,s,r){const o=new vx({client:l,mutationCache:this,mutationId:++zu(this,sr)._,options:l.defaultMutationOptions(s),state:r});return this.add(o),o}add(l){C(this,Zn).add(l);const s=Nu(l);if(typeof s=="string"){const r=C(this,un).get(s);r?r.push(l):C(this,un).set(s,[l])}this.notify({type:"added",mutation:l})}remove(l){if(C(this,Zn).delete(l)){const s=Nu(l);if(typeof s=="string"){const r=C(this,un).get(s);if(r)if(r.length>1){const o=r.indexOf(l);o!==-1&&r.splice(o,1)}else r[0]===l&&C(this,un).delete(s)}}this.notify({type:"removed",mutation:l})}canRun(l){const s=Nu(l);if(typeof s=="string"){const r=C(this,un).get(s),o=r==null?void 0:r.find(f=>f.state.status==="pending");return!o||o===l}else return!0}runNext(l){var r;const s=Nu(l);if(typeof s=="string"){const o=(r=C(this,un).get(s))==null?void 0:r.find(f=>f!==l&&f.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){pt.batch(()=>{C(this,Zn).forEach(l=>{this.notify({type:"removed",mutation:l})}),C(this,Zn).clear(),C(this,un).clear()})}getAll(){return Array.from(C(this,Zn))}find(l){const s={exact:!0,...l};return this.getAll().find(r=>Xp(s,r))}findAll(l={}){return this.getAll().filter(s=>Xp(l,s))}notify(l){pt.batch(()=>{this.listeners.forEach(s=>{s(l)})})}resumePausedMutations(){const l=this.getAll().filter(s=>s.state.isPaused);return pt.batch(()=>Promise.all(l.map(s=>s.continue().catch(Rt))))}},Zn=new WeakMap,un=new WeakMap,sr=new WeakMap,Jy);function Nu(a){var l;return(l=a.options.scope)==null?void 0:l.id}var bn,Fy,Sx=(Fy=class extends ur{constructor(l={}){super();ce(this,bn);this.config=l,le(this,bn,new Map)}build(l,s,r){const o=s.queryKey,f=s.queryHash??md(o,s);let h=this.get(f);return h||(h=new mx({client:l,queryKey:o,queryHash:f,options:l.defaultQueryOptions(s),state:r,defaultOptions:l.getQueryDefaults(o)}),this.add(h)),h}add(l){C(this,bn).has(l.queryHash)||(C(this,bn).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const s=C(this,bn).get(l.queryHash);s&&(l.destroy(),s===l&&C(this,bn).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){pt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return C(this,bn).get(l)}getAll(){return[...C(this,bn).values()]}find(l){const s={exact:!0,...l};return this.getAll().find(r=>Kp(s,r))}findAll(l={}){const s=this.getAll();return Object.keys(l).length>0?s.filter(r=>Kp(l,r)):s}notify(l){pt.batch(()=>{this.listeners.forEach(s=>{s(l)})})}onFocus(){pt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){pt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},bn=new WeakMap,Fy),Pe,Da,Oa,Mi,Ai,ka,Ci,Ri,$y,_x=($y=class{constructor(a={}){ce(this,Pe);ce(this,Da);ce(this,Oa);ce(this,Mi);ce(this,Ai);ce(this,ka);ce(this,Ci);ce(this,Ri);le(this,Pe,a.queryCache||new Sx),le(this,Da,a.mutationCache||new xx),le(this,Oa,a.defaultOptions||{}),le(this,Mi,new Map),le(this,Ai,new Map),le(this,ka,0)}mount(){zu(this,ka)._++,C(this,ka)===1&&(le(this,Ci,hd.subscribe(async a=>{a&&(await this.resumePausedMutations(),C(this,Pe).onFocus())})),le(this,Ri,Vu.subscribe(async a=>{a&&(await this.resumePausedMutations(),C(this,Pe).onOnline())})))}unmount(){var a,l;zu(this,ka)._--,C(this,ka)===0&&((a=C(this,Ci))==null||a.call(this),le(this,Ci,void 0),(l=C(this,Ri))==null||l.call(this),le(this,Ri,void 0))}isFetching(a){return C(this,Pe).findAll({...a,fetchStatus:"fetching"}).length}isMutating(a){return C(this,Da).findAll({...a,status:"pending"}).length}getQueryData(a){var s;const l=this.defaultQueryOptions({queryKey:a});return(s=C(this,Pe).get(l.queryHash))==null?void 0:s.state.data}ensureQueryData(a){const l=this.defaultQueryOptions(a),s=C(this,Pe).build(this,l),r=s.state.data;return r===void 0?this.fetchQuery(a):(a.revalidateIfStale&&s.isStaleByTime(La(l.staleTime,s))&&this.prefetchQuery(l),Promise.resolve(r))}getQueriesData(a){return C(this,Pe).findAll(a).map(({queryKey:l,state:s})=>{const r=s.data;return[l,r]})}setQueryData(a,l,s){const r=this.defaultQueryOptions({queryKey:a}),o=C(this,Pe).get(r.queryHash),f=o==null?void 0:o.state.data,h=nx(l,f);if(h!==void 0)return C(this,Pe).build(this,r).setData(h,{...s,manual:!0})}setQueriesData(a,l,s){return pt.batch(()=>C(this,Pe).findAll(a).map(({queryKey:r})=>[r,this.setQueryData(r,l,s)]))}getQueryState(a){var s;const l=this.defaultQueryOptions({queryKey:a});return(s=C(this,Pe).get(l.queryHash))==null?void 0:s.state}removeQueries(a){const l=C(this,Pe);pt.batch(()=>{l.findAll(a).forEach(s=>{l.remove(s)})})}resetQueries(a,l){const s=C(this,Pe);return pt.batch(()=>(s.findAll(a).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...a},l)))}cancelQueries(a,l={}){const s={revert:!0,...l},r=pt.batch(()=>C(this,Pe).findAll(a).map(o=>o.cancel(s)));return Promise.all(r).then(Rt).catch(Rt)}invalidateQueries(a,l={}){return pt.batch(()=>(C(this,Pe).findAll(a).forEach(s=>{s.invalidate()}),(a==null?void 0:a.refetchType)==="none"?Promise.resolve():this.refetchQueries({...a,type:(a==null?void 0:a.refetchType)??(a==null?void 0:a.type)??"active"},l)))}refetchQueries(a,l={}){const s={...l,cancelRefetch:l.cancelRefetch??!0},r=pt.batch(()=>C(this,Pe).findAll(a).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let f=o.fetch(void 0,s);return s.throwOnError||(f=f.catch(Rt)),o.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(r).then(Rt)}fetchQuery(a){const l=this.defaultQueryOptions(a);l.retry===void 0&&(l.retry=!1);const s=C(this,Pe).build(this,l);return s.isStaleByTime(La(l.staleTime,s))?s.fetch(l):Promise.resolve(s.state.data)}prefetchQuery(a){return this.fetchQuery(a).then(Rt).catch(Rt)}fetchInfiniteQuery(a){return a._type="infinite",this.fetchQuery(a)}prefetchInfiniteQuery(a){return this.fetchInfiniteQuery(a).then(Rt).catch(Rt)}ensureInfiniteQueryData(a){return a._type="infinite",this.ensureQueryData(a)}resumePausedMutations(){return Vu.isOnline()?C(this,Da).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Pe)}getMutationCache(){return C(this,Da)}getDefaultOptions(){return C(this,Oa)}setDefaultOptions(a){le(this,Oa,a)}setQueryDefaults(a,l){C(this,Mi).set(Js(a),{queryKey:a,defaultOptions:l})}getQueryDefaults(a){const l=[...C(this,Mi).values()],s={};return l.forEach(r=>{Fs(a,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(a,l){C(this,Ai).set(Js(a),{mutationKey:a,defaultOptions:l})}getMutationDefaults(a){const l=[...C(this,Ai).values()],s={};return l.forEach(r=>{Fs(a,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(a){if(a._defaulted)return a;const l={...C(this,Oa).queries,...this.getQueryDefaults(a.queryKey),...a,_defaulted:!0};return l.queryHash||(l.queryHash=md(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===gd&&(l.enabled=!1),l}defaultMutationOptions(a){return a!=null&&a._defaulted?a:{...C(this,Oa).mutations,...(a==null?void 0:a.mutationKey)&&this.getMutationDefaults(a.mutationKey),...a,_defaulted:!0}}clear(){C(this,Pe).clear(),C(this,Da).clear()}},Pe=new WeakMap,Da=new WeakMap,Oa=new WeakMap,Mi=new WeakMap,Ai=new WeakMap,ka=new WeakMap,Ci=new WeakMap,Ri=new WeakMap,$y),u0=$.createContext(void 0),yd=a=>{const l=$.useContext(u0);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},wx=({client:a,children:l})=>($.useEffect(()=>(a.mount(),()=>{a.unmount()}),[a]),v.jsx(u0.Provider,{value:a,children:l})),c0=$.createContext(!1),Ex=()=>$.useContext(c0);c0.Provider;function jx(){let a=!1;return{clearReset:()=>{a=!1},reset:()=>{a=!0},isReset:()=>a}}var Tx=$.createContext(jx()),Mx=()=>$.useContext(Tx),Ax=(a,l,s)=>{const r=s!=null&&s.state.error&&typeof a.throwOnError=="function"?t0(a.throwOnError,[s.state.error,s]):a.throwOnError;(a.suspense||a.experimental_prefetchInRender||r)&&(l.isReset()||(a.retryOnMount=!1))},Cx=a=>{$.useEffect(()=>{a.clearReset()},[a])},Rx=({result:a,errorResetBoundary:l,throwOnError:s,query:r,suspense:o})=>a.isError&&!l.isReset()&&!a.isFetching&&r&&(o&&a.data===void 0||t0(s,[a.error,r])),zx=a=>{if(a.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),r=a.staleTime;a.staleTime=typeof r=="function"?(...o)=>s(r(...o)):s(r),typeof a.gcTime=="number"&&(a.gcTime=Math.max(a.gcTime,1e3))}},Nx=(a,l)=>a.isLoading&&a.isFetching&&!l,Dx=(a,l)=>(a==null?void 0:a.suspense)&&l.isPending,ey=(a,l,s)=>l.fetchOptimistic(a).catch(()=>{s.clearReset()});function Ox(a,l,s){var S,w,E,j;const r=Ex(),o=Mx(),f=yd(),h=f.defaultQueryOptions(a);(w=(S=f.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||w.call(S,h);const d=f.getQueryCache().get(h.queryHash),p=a.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,zx(h),Ax(h,o,d),Cx(o);const g=!f.getQueryCache().get(h.queryHash),[b]=$.useState(()=>new l(f,h)),y=b.getOptimisticResult(h),_=!r&&p;if($.useSyncExternalStore($.useCallback(R=>{const z=_?b.subscribe(pt.batchCalls(R)):Rt;return b.updateResult(),z},[b,_]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),$.useEffect(()=>{b.setOptions(h)},[h,b]),Dx(h,y))throw ey(h,b,o);if(Rx({result:y,errorResetBoundary:o,throwOnError:h.throwOnError,query:d,suspense:h.suspense}))throw y.error;if((j=(E=f.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||j.call(E,h,y),h.experimental_prefetchInRender&&!$s.isServer()&&Nx(y,r)){const R=g?ey(h,b,o):d==null?void 0:d.promise;R==null||R.catch(Rt).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?y:b.trackResult(y)}function Xe(a,l){return Ox(a,gx)}const kx=!1;var o0=$.useLayoutEffect;function Ux(a,l,s){$.useEffect(()=>{if(!a.current||s||typeof IntersectionObserver!="function")return()=>l();const r=new IntersectionObserver(o=>{l(o.pop())},{rootMargin:"100px"});return r.observe(a.current),()=>{r.disconnect(),l()}},[l,s,a])}function Lx(a){const l=$.useRef(null);return $.useImperativeHandle(a,()=>l.current,[]),l}function Ws(a){return a[a.length-1]}function zi(a,l){return typeof a=="function"?a(l):a}const f0=Object.prototype.hasOwnProperty,Bx=Object.prototype.propertyIsEnumerable;function d0(a){for(const l in a)if(f0.call(a,l))return!0;return!1}const Hx=()=>Object.create(null),sl=(a,l)=>ul(a,l,Hx);function ul(a,l,s=()=>({}),r=0){if(a===l)return a;if(r>500)return l;const o=l,f=ay(a)&&ay(o);if(!f&&!(Yu(a)&&Yu(o)))return o;const h=f?a:ty(a);if(!h)return o;const d=f?o:ty(o);if(!d)return o;const p=h.length,g=d.length,b=f?new Array(g):s();let y=0;for(let _=0;_"u")return!0;const s=l.prototype;return!(!ny(s)||!s.hasOwnProperty("isPrototypeOf"))}function ny(a){return Object.prototype.toString.call(a)==="[object Object]"}function ay(a){return Array.isArray(a)&&a.length===Object.keys(a).length}function Ba(a,l,s){if(a===l)return!0;if(typeof a!=typeof l)return!1;if(Array.isArray(a)&&Array.isArray(l)){if(a.length!==l.length)return!1;for(let r=0,o=a.length;ro||!Ba(a[h],l[h],s)))return!1;return o===f}return!1}const qx=/[\x00-\x1f\x7f"<>`{}]/g;function Gx(a){return a.replace(qx,l=>"%"+l.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ly(a){let l;try{l=decodeURI(a)}catch{l=a.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return Gx(l)}const Qx=["http:","https:","mailto:","tel:"];function Ku(a,l){if(!a)return!1;try{const s=new URL(a);return!l.has(s.protocol)}catch{return!1}}function Ls(a){if(!a)return{path:a,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(a)&&!a.startsWith("//"))return{path:a,handledProtocolRelativeURL:!1};const l=/%25|%5C/gi;let s=0,r="",o;for(;(o=l.exec(a))!==null;)r+=ly(a.slice(s,o.index))+o[0],s=l.lastIndex;r=r+ly(s?a.slice(s):a);let f=!1;return r.startsWith("//")&&(f=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:f}}function Vx(a){return/\s|[^\u0000-\u007F]/.test(a)?a.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):a}function Yx(a,l){if(a===l)return!0;if(a.length!==l.length)return!1;for(let s=0;s{f.next&&(f.prev?(f.prev.next=f.next,f.next.prev=f.prev,f.next=void 0,r&&(r.next=f,f.prev=r)):(f.next.prev=void 0,s=f.next,f.next=void 0,r&&(f.prev=r,r.next=f)),r=f)};return{get(f){const h=l.get(f);if(h)return o(h),h.value},set(f,h){if(l.size>=a&&s){const p=s;l.delete(p.key),p.next&&(s=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const d=l.get(f);if(d)d.value=h,o(d);else{const p={key:f,value:h,prev:r};r&&(r.next=p),r=p,s||(s=p),l.set(f,p)}},clear(){l.clear(),s=void 0,r=void 0}}}const Ua=4,h0=5;function m0(a,l,s=new Uint16Array(6)){const r=a.indexOf("/",l),o=r===-1?a.length:r,f=a.substring(l,o);if(!f||!f.includes("$"))return s[0]=0,s[1]=l,s[2]=l,s[3]=o,s[4]=o,s[5]=o,s;if(f==="$"){const p=a.length;return s[0]=2,s[1]=l,s[2]=l,s[3]=p,s[4]=p,s[5]=p,s}if(f.charCodeAt(0)===36)return s[0]=1,s[1]=l,s[2]=l+1,s[3]=o,s[4]=o,s[5]=o,s;const h=f.indexOf("{");let d;if(h!==-1&&h+1!ee.parse&&ee.caseSensitive===J&&ee.prefix===G&&ee.suffix===K));if(P)z=P;else{const ee=Kx(Z,y,J,G,K);z=ee,ee.parent=o,ee.depth=f;let I;Z===1?I=o.dynamic??(o.dynamic=[]):Z===3?I=o.optional??(o.optional=[]):I=o.wildcard??(o.wildcard=[]),I.push(ee),I.length===2&&(h==null||h.push(I))}break}}o=z}if(E&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const R=fi(y);R.kind=h0,R.parent=o,f++,R.depth=f,o.pathless??(o.pathless=[]),o.pathless.push(R),o=R}const j=(s.path||!s.children)&&!s.isRoot;if(j&&y.endsWith("/")){const R=fi(y);R.kind=Ua,R.parent=o,f++,R.depth=f,o.index=R,o=R}o.parse=E??null,o.priority=((b=_==null?void 0:_.params)==null?void 0:b.priority)??0,j&&!o.route&&(o.route=s,o.fullPath=y)}if(s.children)for(const y of s.children)Iu(a,l,y,p,o,f,h,d)}function g0(a,l){if(a.parse&&!l.parse)return-1;if(!a.parse&&l.parse)return 1;if(a.parse&&l.parse&&(a.priority||l.priority))return l.priority-a.priority;if(a.prefix&&l.prefix&&a.prefix!==l.prefix){if(a.prefix.startsWith(l.prefix))return-1;if(l.prefix.startsWith(a.prefix))return 1}if(a.suffix&&l.suffix&&a.suffix!==l.suffix){if(a.suffix.endsWith(l.suffix))return-1;if(l.suffix.endsWith(a.suffix))return 1}return a.prefix&&!l.prefix?-1:!a.prefix&&l.prefix?1:a.suffix&&!l.suffix?-1:!a.suffix&&l.suffix?1:a.caseSensitive&&!l.caseSensitive?-1:!a.caseSensitive&&l.caseSensitive?1:0}function fi(a){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:a,parent:null,parse:null,priority:0}}function Kx(a,l,s,r,o){return{kind:a,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:l,parent:null,parse:null,priority:0,caseSensitive:s,prefix:r,suffix:o}}function Xx(a,l){const s=fi("/"),r=new Uint16Array(6),o=[];for(const f of a)Iu(!1,r,f,1,s,0,o);for(const f of o)f.sort(g0);l.masksTree=s,l.flatCache=Xu(1e3)}function Zx(a,l){a||(a="/");const s=l.flatCache.get(a);if(s!==void 0)return s;const r=bd(a,l.masksTree);return l.flatCache.set(a,r),r}function Jx(a,l,s,r,o){a||(a="/"),r||(r="/");const f=l?`case\0${a}`:a;let h=o.singleCache.get(f);return h||(h=fi("/"),Iu(l,new Uint16Array(6),{from:a},1,h,0),o.singleCache.set(f,h)),bd(r,h,s)}function Fx(a,l,s=!1){const r=s?a:`nofuzz\0${a}`,o=l.matchCache.get(r);if(o!==void 0)return o;a||(a="/");let f;try{f=bd(a,l.segmentTree,s)}catch(h){if(h instanceof URIError)f=null;else throw h}return f&&(f.branch=y0(f.route)),l.matchCache.set(r,f),f}function $x(a){return a==="/"?a:a.replace(/\/{1,}$/,"")}function Wx(a,l=!1,s){const r=fi(a.fullPath),o=new Uint16Array(6),f=[],h={},d={};let p=0;Iu(l,o,a,1,r,0,f,g=>{if(s==null||s(g,p),g.id in h&&vd(),h[g.id]=g,p!==0&&g.path){const b=$x(g.fullPath);(!d[b]||g.fullPath.endsWith("/"))&&(d[b]=g)}p++});for(const g of f)g.sort(g0);return{processedTree:{segmentTree:r,singleCache:Xu(1e3),matchCache:Xu(1e3),flatCache:null,masksTree:null},routesById:h,routesByPath:d}}function bd(a,l,s=!1){const r=a.split("/"),o=Ix(a,r,l,s);if(!o)return null;const[f]=p0(a,r,o);return{route:o.node.route,rawParams:f}}function p0(a,l,s){var b,y,_,S;const r=Px(s.node);let o=null;const f=Object.create(null);let h=((b=s.extract)==null?void 0:b.part)??0,d=((y=s.extract)==null?void 0:y.node)??0,p=((_=s.extract)==null?void 0:_.path)??0,g=((S=s.extract)==null?void 0:S.segment)??0;for(;d=0;G--){const K=y.wildcard[G],{prefix:J,suffix:Q}=K;if(!(J&&(L||!(K.caseSensitive?D:Z??(Z=D.toLowerCase())).startsWith(J)))){if(Q){if(L)continue;const P=l.slice(_).join("/"),ee=P.slice(-Q.length);if((K.caseSensitive?ee:ee.toLowerCase())!==Q||P.length-Q.length=0;K--){const J=y.optional[K];d.push({node:J,index:_,skipped:G,statics:w,dynamics:E,optionals:j,extract:R,rawParams:z})}if(!L)for(let K=y.optional.length-1;K>=0;K--){const J=y.optional[K],{prefix:Q,suffix:P}=J;if(Q||P){const ee=J.caseSensitive?D:Z??(Z=D.toLowerCase());if(Q&&!ee.startsWith(Q)||P&&ee.indexOf(P,ee.length-P.length)=0;G--){const K=y.dynamic[G],{prefix:J,suffix:Q}=K;if(J||Q){const P=K.caseSensitive?D:Z??(Z=D.toLowerCase());if(J&&!P.startsWith(J)||Q&&P.indexOf(Q,P.length-Q.length)=0;G--){const K=y.pathless[G];d.push({node:K,index:_,skipped:S,statics:w,dynamics:E,optionals:j,extract:R,rawParams:z})}}if(g)return g;if(r&&p){let b=p.index;for(let _=0;_a.statics||l.statics===a.statics&&(l.dynamics>a.dynamics||l.dynamics===a.dynamics&&(l.optionals>a.optionals||l.optionals===a.optionals&&((l.node.kind===Ua)>(a.node.kind===Ua)||l.node.kind===Ua==(a.node.kind===Ua)&&l.node.depth>a.node.depth))):!0}function Bu(a){return Hu(a.filter(l=>l!==void 0).join("/"))}function Hu(a){return a.replace(/\/{2,}/g,"/")}function v0(a){return a==="/"?a:a.replace(/^\/{1,}/,"")}function Jn(a){const l=a.length;return l>1&&a[l-1]==="/"?a.replace(/\/{1,}$/,""):a}function b0(a){return Jn(v0(a))}function Zu(a,l){return a!=null&&a.endsWith("/")&&a!=="/"&&a!==`${l}/`?a.slice(0,-1):a}function tS(a,l,s){return Zu(a,s)===Zu(l,s)}function nS({base:a,to:l,trailingSlash:s="never",cache:r}){if(l.includes("//")&&(l=Hu(l)),l.startsWith("/"))return l.length===1||s==="preserve"?l:s==="always"?l.endsWith("/")?l:`${l}/`:l.endsWith("/")?l.slice(0,-1):l;const o=l===".";let f;if(r){f=o?a:a+"\0"+l;const g=r.get(f);if(g)return g}let h;if(o)h=a.split("/");else{for(a.includes("//")&&(a=Hu(a)),h=a.split("/");h.length>1&&Ws(h)==="";)h.pop();const g=l.split("/");for(let b=0,y=g.length;b1?h.pop():h=[""]:_==="."||h.push(_)}}h.length>1&&(Ws(h)===""?s==="never"&&h.pop():s==="always"&&h.push(""));const d=h.join("/"),p=(o?Hu(d):d)||"/";return f&&r&&r.set(f,p),p}function aS(a){const l=new Map(a.map(o=>[encodeURIComponent(o),o])),s=Array.from(l.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(s,"g");return o=>o.replace(r,f=>l.get(f)??f)}function Tf(a,l,s){const r=l[a];return typeof r!="string"?r:a==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>ry(o,s)).join("/"):ry(r,s)}function sy({path:a,params:l,decoder:s,...r}){let o=!1;const f=Object.create(null);if(!a||a==="/")return{interpolatedPath:"/",usedParams:f,isMissingParams:o};if(!a.includes("$"))return{interpolatedPath:a,usedParams:f,isMissingParams:o};const h=a.length;let d=0,p,g="";for(;da.state.__TSR_key||a.href;function cS(a){const l=a.getAttribute(uy);if(l)return`[${uy}="${l}"]`;let s="",r=a,o;for(;o=r.parentNode;){let f=1,h=r;for(;h=h.previousElementSibling;)f++;const d=`${r.localName}:nth-child(${f})`;s=s?`${d} > ${s}`:d,r=o}return s}let ku=!1;const qu="window";function If(a){try{return typeof a=="function"?a():document.querySelector(a)}catch{}}function cy(a){const l=new Set;for(const s of a){if(s===qu)continue;const r=If(s);r&&l.add(r)}return l}function oS(a,l){const s=a.options.scrollRestoration,r=a._scroll;s&&(r.restoring=!0);const o=a.options.getScrollRestorationKey||uS,f=new Set,h=d=>{const p=Ma[d]||(Ma[d]={});for(const g of f)g===document?p[qu]={scrollX,scrollY}:g.isConnected&&(p[cS(g)]={scrollX:g.scrollLeft,scrollY:g.scrollTop})};s&&!r.restoration&&(r.restoration=!0,ku=!1,history.scrollRestoration="manual",document.addEventListener("scroll",d=>{ku||f.add(d.target)},!0),a.subscribe("onBeforeLoad",d=>{d.fromLocation&&h(o(d.fromLocation)),f.clear()}),addEventListener("pagehide",()=>{h(o(a.stores.resolvedLocation.get()??a.stores.location.get())),rS()})),!r.reset&&(r.reset=!0,a.subscribe("onRendered",d=>{var E;const p=a.options.scrollRestorationBehavior,g=a.options.scrollToTopSelectors,b=r.next,y=r.hash;let _;if(f.clear(),r.next=!0,r.hash=!1,typeof a.options.scrollRestoration=="function"&&!a.options.scrollRestoration({location:a.latestLocation}))return;const S=o(d.toLocation),w=d.fromLocation&&o(d.fromLocation);if(r.restoring&&w&&w!==S){const j=Ma[w];if(j){let R=Ma[S];for(const z in j){if(z===qu){if(b)continue}else{const L=If(z);if(!L||b&&g&&(_??(_=cy(g)),_.has(L)))continue}R||(R=Ma[S]={}),R[z]??(R[z]=j[z])}}}ku=!0;try{const j=d.toLocation.hash,R=d.toLocation.state.__hashScrollIntoViewOptions??!0;let z=!1;if(b){!j&&g&&(_??(_=cy(g)));const L=j&&R&&y,D=r.restoring?Ma[S]:void 0;if(D)for(const Z in D){const{scrollX:G,scrollY:K}=D[Z];if(Z===qu){if(L)continue;scrollTo({top:K,left:G,behavior:p}),z=!0}else{const J=If(Z);J&&(J.scrollLeft=G,J.scrollTop=K,_==null||_.delete(J))}}if(!j){const Z={top:0,left:0,behavior:p};if(z||scrollTo(Z),_)for(const G of _)G.scrollTo(Z)}}!z&&j&&R&&((E=document.getElementById(j))==null||E.scrollIntoView(R))}finally{ku=!1}}))}function fS(a,l=String){const s=new URLSearchParams;for(const r in a){const o=a[r];o!==void 0&&s.set(r,l(o))}return s.toString()}function Mf(a){return a?a==="false"?!1:a==="true"?!0:+a*0===0&&+a+""===a?+a:a:""}function dS(a){const l=new URLSearchParams(a),s=Object.create(null);for(const[r,o]of l.entries()){const f=s[r];f==null?s[r]=Mf(o):Array.isArray(f)?f.push(Mf(o)):s[r]=[f,Mf(o)]}return s}const hS=/^(?:\s|["[{\d-]|fa|nu|tr)/,mS=pS(JSON.parse),gS=yS(JSON.stringify,JSON.parse);function pS(a){return l=>{l[0]==="?"&&(l=l.substring(1));const s=dS(l);for(const r in s){const o=s[r];if(typeof o=="string")try{s[r]=a(o)}catch{}}return s}}function yS(a,l){const s=l===JSON.parse;function r(o){if(o&&typeof o=="object")try{return a(o)}catch{}else if(l&&typeof o=="string"){if(s&&!hS.test(o))return o;try{return l(o),a(o)}catch{}}return o}return o=>{const f=fS(o,r);return f?`?${f}`:""}}const hi="__root__";function x0(a){if(a.statusCode=a.statusCode||a.code||307,!a.reloadDocument&&typeof a.href=="string")try{new URL(a.href),a.reloadDocument=!0}catch{}const l=new Headers(a.headers);a.href&&l.get("Location")===null&&l.set("Location",a.href);const s=new Response(null,{status:a.statusCode,headers:l});if(s.options=a,a.throw)throw s;return s}function S0(a){return a instanceof Response&&!!a.options}function vS(a){return{input:({url:l})=>{for(const s of a)l=ed(s,l);return l},output:({url:l})=>{for(let s=a.length-1;s>=0;s--)l=_0(a[s],l);return l}}}function bS(a){const l=b0(a.basepath),s=`/${l}`,r=a.caseSensitive?s:s.toLowerCase(),o=`${r}/`;return{input:({url:f})=>{const h=a.caseSensitive?f.pathname:f.pathname.toLowerCase();return h===r?f.pathname="/":h.startsWith(o)&&(f.pathname=f.pathname.slice(s.length)),f},output:({url:f})=>(f.pathname=Bu(["/",l,f.pathname]),f)}}function ed(a,l){var r;const s=(r=a==null?void 0:a.input)==null?void 0:r.call(a,{url:l});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return l}function _0(a,l){var r;const s=(r=a==null?void 0:a.output)==null?void 0:r.call(a,{url:l});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return l}function xS(a,l){const{createMutableStore:s,createReadonlyStore:r,batch:o}=l,f=new Map,h=s("idle"),d=s(a),p=s(void 0),g=s([]),b=r(()=>g.get().map(E=>f.get(E).get())),y=r(()=>({status:h.get(),isLoading:h.get()==="pending",matches:b.get(),location:d.get(),resolvedLocation:p.get()}));function _(E){let j=f.get(E);return j||(j=s(void 0),f.set(E,j)),j}const S={status:h,location:d,resolvedLocation:p,ids:g,matches:b,byRoute:f,__store:y,getMatchStore:_,setMatches:w};function w(E){const j=g.get(),R=E.map(z=>z.routeId);o(()=>{Yx(j,R)||g.set(R);for(const z of j)R.includes(z)||f.get(z).set(()=>{});for(const z of E){const L=_(z.routeId);L.get()!==z&&L.set(z)}})}return S}var Ha="__TSR_index",oy="popstate",fy="beforeunload";function SS(a){let l=a.getLocation();const s=new Set,r=h=>{l=a.getLocation(),s.forEach(d=>d({location:l,action:h}))},o=h=>{a.notifyOnIndexChange??!0?r(h):l=a.getLocation()},f=async({task:h,navigateOpts:d,...p})=>{var y,_;if((d==null?void 0:d.ignoreBlocker)??!1){h();return}const g=((y=a.getBlockers)==null?void 0:y.call(a))??[],b=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&g.length&&b)for(const S of g){const w=Ju(p.path,p.state);if(await S.blockerFn({currentLocation:l,nextLocation:w,action:p.type})){(_=a.onBlocked)==null||_.call(a);return}}h()};return{get location(){return l},get length(){return a.getLength()},subscribers:s,subscribe:h=>(s.add(h),()=>{s.delete(h)}),push:(h,d,p)=>{const g=l.state[Ha];d=dy(g+1,d),f({task:()=>{a.pushState(h,d),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:d})},replace:(h,d,p)=>{const g=l.state[Ha];d=dy(g,d),f({task:()=>{a.replaceState(h,d),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:d})},go:(h,d)=>{f({task:()=>{a.go(h),o({type:"GO",index:h})},navigateOpts:d,type:"GO"})},back:h=>{f({task:()=>{a.back((h==null?void 0:h.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{f({task:()=>{a.forward((h==null?void 0:h.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>l.state[Ha]!==0,createHref:h=>a.createHref(h),block:h=>{var p;if(!a.setBlockers)return()=>{};const d=((p=a.getBlockers)==null?void 0:p.call(a))??[];return a.setBlockers([...d,h]),()=>{var b,y;const g=((b=a.getBlockers)==null?void 0:b.call(a))??[];(y=a.setBlockers)==null||y.call(a,g.filter(_=>_!==h))}},flush:()=>{var h;return(h=a.flush)==null?void 0:h.call(a)},destroy:()=>{var h;return(h=a.destroy)==null?void 0:h.call(a)},notify:r}}function dy(a,l){l||(l={});const s=xd();return{...l,key:s,__TSR_key:s,[Ha]:a}}function _S(a){var K,J;const l=typeof document<"u"?window:void 0,s=l.history.pushState,r=l.history.replaceState;let o=[];const f=()=>o,h=Q=>o=Q,d=(Q=>Q),p=(()=>Ju(`${l.location.pathname}${l.location.search}${l.location.hash}`,l.history.state));if(!((K=l.history.state)!=null&&K.__TSR_key)&&!((J=l.history.state)!=null&&J.key)){const Q=xd();l.history.replaceState({[Ha]:0,key:Q,__TSR_key:Q},"")}let g=p(),b,y=!1,_=!1,S=!1,w=!1;const E=()=>g;let j;const R=()=>{j&&(G._ignoreSubscribers=!0,(j[2]?l.history.pushState:l.history.replaceState)(j[1],"",j[0]),G._ignoreSubscribers=!1,j=void 0,b=void 0)},z=(Q,P,ee)=>{const I=d(P),fe=!!j;fe||(b=g),g=Ju(P,ee),j=[I,ee,(j==null?void 0:j[2])||Q],fe||queueMicrotask(()=>R())},L=Q=>{g=p(),G.notify({type:Q})},D=async()=>{if(_){_=!1;return}const Q=p(),P=Q.state[Ha]-g.state[Ha],ee=P===1,I=P===-1,fe=!ee&&!I||y;y=!1;const F=fe?"GO":I?"BACK":"FORWARD",ae=fe?{type:"GO",index:P}:{type:I?"BACK":"FORWARD"};if(S)S=!1;else{const B=f();if(typeof document<"u"&&B.length){for(const W of B)if(await W.blockerFn({currentLocation:g,nextLocation:Q,action:F})){_=!0,l.history.go(1),G.notify(ae);return}}}g=p(),G.notify(ae)},Z=Q=>{if(w){w=!1;return}let P=!1;const ee=f();if(typeof document<"u"&&ee.length)for(const I of ee){const fe=I.enableBeforeUnload??!0;if(fe===!0){P=!0;break}if(typeof fe=="function"&&fe()===!0){P=!0;break}}if(P)return Q.preventDefault(),Q.returnValue=""},G=SS({getLocation:E,getLength:()=>l.history.length,pushState:(Q,P)=>z(!0,Q,P),replaceState:(Q,P)=>z(!1,Q,P),back:Q=>(Q&&(S=!0),w=!0,l.history.back()),forward:Q=>{Q&&(S=!0),w=!0,l.history.forward()},go:Q=>{y=!0,l.history.go(Q)},createHref:Q=>d(Q),flush:R,destroy:()=>{l.history.pushState=s,l.history.replaceState=r,l.removeEventListener(fy,Z,{capture:!0}),l.removeEventListener(oy,D)},onBlocked:()=>{b&&g!==b&&(g=b)},getBlockers:f,setBlockers:h,notifyOnIndexChange:!1});return l.addEventListener(fy,Z,{capture:!0}),l.addEventListener(oy,D),l.history.pushState=function(...Q){const P=s.apply(l.history,Q);return G._ignoreSubscribers||L("PUSH"),P},l.history.replaceState=function(...Q){const P=r.apply(l.history,Q);return G._ignoreSubscribers||L("REPLACE"),P},G}function wS(a){let l=a.replace(/[\x00-\x1f\x7f]/g,"");return l.startsWith("//")&&(l="/"+l.replace(/^\/+/,"")),l}function Ju(a,l){const s=wS(a),r=s.indexOf("#"),o=s.indexOf("?"),f=xd();return{href:s,pathname:s.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:s.length),hash:r>-1?s.substring(r):"",search:o>-1?s.slice(o,r===-1?void 0:r):"",state:l||{[Ha]:0,key:f,__TSR_key:f}}}function xd(){return(Math.random()+1).toString(36).substring(7)}function hy(a){var l,s;return a.options.loader||a.options.beforeLoad||a.lazyFn||((l=a.options.component)==null?void 0:l.preload)||((s=a.options.pendingComponent)==null?void 0:s.preload)}function ec(a,l){return{fromLocation:l,toLocation:a,pathChanged:(l==null?void 0:l.pathname)!==a.pathname,hrefChanged:(l==null?void 0:l.href)!==a.href,hashChanged:(l==null?void 0:l.hash)!==a.hash}}function my({key:a,__TSR_key:l,__TSR_index:s,__hashScrollIntoViewOptions:r,...o}){return o}function ES(a,l,s,r){var o,f,h,d;for(const p of l){if(r&&a._tx!==r)return;s.some(g=>g.routeId===p.routeId)||(f=(o=a.routesById[p.routeId].options).onLeave)==null||f.call(o,p)}for(const p of s){if(r&&a._tx!==r)return;(d=(h=a.routesById[p.routeId].options)[l.some(g=>g.routeId===p.routeId)?"onStay":"onEnter"])==null||d.call(h,p)}}var jS=class{constructor(a,l){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 s=>(s(),!1),this.update=s=>{const r=this.options,o=this.basepath??(r==null?void 0:r.basepath)??"/",f=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...s},this.isServer=this.options.isServer??kx??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=aS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=_S()),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 g;this.resolvePathCache=Xu(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=xS(this.latestLocation,g),oS(this)}const d=this.options.basepath??"/",p=this.options.rewrite;if(f||o!==d||h!==p){this.basepath=d;const g=[],b=b0(d);b&&b!=="/"&&g.push(bS({basepath:d})),p&&g.push(p),this.rewrite=g.length===0?void 0:g.length===1?g[0]:vS(g),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 s=Wx(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Xx(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,r)=>{const o={eventType:s,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=s=>{for(const r of this.subscribers)if(r.eventType===s.type)try{r.fn(s)}catch(o){console.error(o)}},this.parseLocation=(s,r)=>{const o=({pathname:p,search:g,hash:b,href:y,state:_})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const R=this.options.parseSearch(g),z=this.options.stringifySearch(R);return{href:p+z+b,publicHref:p+z+b,pathname:Ls(p).path,external:!1,searchStr:z,search:sl(r==null?void 0:r.search,R),hash:Ls(b.slice(1)).path,state:ul(r==null?void 0:r.state,_)}}const S=new URL(y,this.origin),w=ed(this.rewrite,S),E=this.options.parseSearch(w.search),j=this.options.stringifySearch(E);return w.search=j,{href:w.href.replace(w.origin,""),publicHref:y,pathname:Ls(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:j,search:sl(r==null?void 0:r.search,E),hash:Ls(w.hash.slice(1)).path,state:ul(r==null?void 0:r.state,_)}},f=o(s),{__tempLocation:h,__tempKey:d}=f.state;if(h&&(!d||d===this.tempLocationKey)){const p=o(h);return p.state.key=f.state.key,p.state.__TSR_key=f.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:f}}return f},this.resolvePathWithBase=(s,r)=>nS({base:s,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,r,o)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:r},o):this.matchRoutesInternal(s,r),this.getMatchedRoutes=s=>{const r=Object.create(null),o=Fx(Jn(s),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[(o==null?void 0:o.branch)||[this.routesById.__root__],r,o==null?void 0:o.route]},this.buildLocation=s=>{const r=(f={})=>{var Q,P;if(f.href){const ee=Ju(f.href,{});f={...f,to:ed(this.rewrite,new URL(ee.pathname,this.origin)).pathname,search:this.options.parseSearch(ee.search),hash:ee.hash.slice(1)}}const h=f._fromLocation||this._pendingLocation||this.latestLocation,d=this.matchRoutesLightweight(h);f.from;const p=f.unsafeRelative==="path"?h.pathname:f.from??d[1],g=d[2],b=d[3],y=this.resolvePathWithBase(p,f.to?`${f.to}`:".");let _=gy(f.params,b);const S=this.routesByPath[Jn(y)];let w;if(S)w=this.getRouteBranch(S);else if(y.includes("$"))w=[];else{const[ee,I,fe]=this.getMatchedRoutes(y);w=ee,this.options.notFoundRoute&&(!fe||fe.path!=="/"&&I["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&d0(_))for(const ee of w){const I=((Q=ee.options.params)==null?void 0:Q.stringify)??ee.options.stringifyParams;if(I){_===b&&(_=Object.assign(Object.create(null),_));try{Object.assign(_,I(_))}catch{}}}const E=s.leaveParams?y:Ls(sy({path:y,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let j=g;if(s._includeValidateSearch&&((P=this.options.search)!=null&&P.strict)){const ee={};w.forEach(I=>{if(I.options.validateSearch)try{Object.assign(ee,Gu(I.options.validateSearch,{...ee,...j}))}catch{}}),j=ee}j=MS(j,f,w,s._includeValidateSearch),j=sl(g,j);const R=this.options.stringifySearch(j),z=f.hash===!0?h.hash:f.hash?zi(f.hash,h.hash):void 0,L=z?`#${z}`:"";let D=f.state===!0?h.state:f.state?zi(f.state,h.state):{};f.state&&(D=ul(h.state,D));const Z=`${E}${R}${L}`;let G,K,J=!1;if(this.rewrite){const ee=new URL(Z,this.origin),I=_0(this.rewrite,ee);G=ee.href.replace(ee.origin,""),I.origin!==this.origin?(K=I.href,J=!0):K=I.pathname+I.search+I.hash}else G=Vx(Z),K=G;return{publicHref:K,href:G,pathname:E,search:j,searchStr:R,state:D,hash:z??"",external:J,unmaskOnReload:f.unmaskOnReload}},o=r(s);if(s.mask)o.maskedLocation=r({from:s.from,...s.mask});else if(this.options.routeMasks){const f=Zx(o.pathname,this.processedTree);if(f){const h=Object.assign(Object.create(null),f.rawParams),{from:d,params:p,...g}=f.route,b=gy(p,h);o.maskedLocation=r({from:s.from,...g,params:b})}}return o},this.commitLocation=async({viewTransition:s,ignoreBlocker:r,...o})=>{let f;const h=Jn(this.latestLocation.href)===Jn(o.href)&&Ba(my(o.state),my(this.latestLocation.state)),d=this._commitPromise;let p;const g=new Promise(b=>{p=b});if(g.resolve=()=>{p(),d==null||d.resolve()},this._commitPromise=g,h)this.load();else{let{maskedLocation:b,hashScrollIntoView:y,..._}=o;b&&(_={...b,state:{...b.state,__tempKey:void 0,__tempLocation:{..._,search:_.searchStr,state:{..._.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(_.unmaskOnReload??this.options.unmaskOnReload??!1)&&(_.state.__tempKey=this.tempLocationKey)),_.state.__hashScrollIntoViewOptions=y??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,f=o.replace?"REPLACE":"PUSH",this.history[f==="REPLACE"?"replace":"push"](_.publicHref,_.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:f}})}return this._scroll.next=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:r,hashScrollIntoView:o,viewTransition:f,ignoreBlocker:h,...d}={})=>{const p=this.buildLocation({...d,_includeValidateSearch:!0});this._pendingLocation=p;const g=this.commitLocation({...p,viewTransition:f,replace:s,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:h});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),g},this.navigate=async({to:s,reloadDocument:r,href:o,publicHref:f,...h})=>{var p,g;let d=!1;if(o)try{new URL(`${o}`),d=!0}catch{}if(d&&!r&&(r=!0),r){if(s!==void 0||!o){const y=this.buildLocation({to:s,...h});o=o??y.publicHref,f=f??y.publicHref}const b=!d&&f?f:o;if(Ku(b,this.protocolAllowlist))return;if(!h.ignoreBlocker){const y=((g=(p=this.history).getBlockers)==null?void 0:g.call(p))??[];for(const _ of y)if(_!=null&&_.blockerFn&&await _.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}h.replace?window.location.replace(b):window.location.href=b;return}return this.buildAndCommitLocation({...h,href:o,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s!=null&&s.action&&(this._scroll.hash=s.action.type==="PUSH"||s.action.type==="REPLACE"),await US(this,s)},this.startViewTransition=s=>{var o,f;const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let h;if(typeof r=="object"&&((f=(o=window.CSS)==null?void 0:o.supports)!=null&&f.call(o,"selector(:active-view-transition-type(a))"))){const d=this.latestLocation,p=this.stores.resolvedLocation.get(),g=typeof r.types=="function"?r.types(ec(d,p)):r.types;if(g===!1)return s();h={update:s,types:g}}else h=s;return document.startViewTransition(h).updateCallbackDone}return s()},this.invalidate=s=>{var g,b;const r=this._committed,o=s==null?void 0:s.filter,f=this._preloads,h=new Set([...r,...this._cache.values(),...[...(f==null?void 0:f.values())??[]].flat(),...((g=this._tx)==null?void 0:g[3])??[]].filter(y=>!o||o(y)).map(y=>y.id)),d=[];for(const[y,_]of f??[])_.some(S=>h.has(S.id))&&(f.delete(y),d.push(y));const p=y=>{if(h.has(y.id)){const _=this.routesById[y.routeId],S={...y,invalid:!0,...(s!=null&&s.forcePending||y.status==="error"||y.status==="notFound")&&hy(_)?{status:"pending",error:void 0}:void 0};return y._flight=void 0,S}return y};this._committed=r.map(p);for(const[y,_]of this._cache)h.has(y)&&(_.invalid=!0,s!=null&&s.forcePending&&(_.status="pending"));for(const y of h)(b=this._flights)==null||b.delete(y);for(const y of d)y.abort();return this.shouldViewTransition=!1,this.load({sync:s==null?void 0:s.sync})},this.resolveRedirect=s=>{const r=s.headers.get("Location");if(s.options.href){if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const f=o.pathname+o.search+o.hash;s.options.href=f,s.headers.set("Location",f)}}catch{}}else{const o=this.buildLocation(s.options).publicHref||"/";s.options.href=o,s.headers.set("Location",o)}if(s.options.href&&Ku(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{var g;const r=this._cache,o=this._preloads,f=s==null?void 0:s.filter,h=[],d=[];for(const[b,y]of r)(!f||f(y))&&(d.push(b),h.push(y));const p=[];for(const[b,y]of o??[])(!f||y.some(f))&&(p.push(b),h.push(...y));for(const b of d)r.delete(b);for(const b of p)o.delete(b);for(const b of h){const y=b._flight;b._flight=void 0,y&&!--y[2]&&(((g=this._flights)==null?void 0:g.get(b.id))===y&&this._flights.delete(b.id),p.push(y[1]))}for(const b of p)b.abort()},this.loadRouteChunk=mi,this.preloadRoute=s=>LS(this,s),this.matchRoute=(s,r)=>{const o={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},f=this.buildLocation(o),h=this.stores.status.get()==="pending";if(r!=null&&r.pending&&!h)return!1;const d=(r==null?void 0:r.pending)??!h?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),p=Jx(f.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,d.pathname,this.processedTree);return!p||s.params&&!Ba(p.rawParams,s.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Ba(d.search,f.search,{partial:!0})?p.rawParams:!1:p.rawParams},this.getStoreConfig=l,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...a,caseSensitive:a.caseSensitive??!1,notFoundMode:a.notFoundMode??"fuzzy",stringifySearch:a.stringifySearch??gS,parseSearch:a.parseSearch??mS,protocolAllowlist:a.protocolAllowlist??Qx}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:a,routesByPath:l,processedTree:s}){this.routesById=a,this.routesByPath=l,this.processedTree=s;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(a){let l=this.routeBranchCache.get(a);return l||(l=y0(a),this.routeBranchCache.set(a,l)),l}matchRoutesInternal(a,l){var _,S;const[s,r,o]=this.getMatchedRoutes(a.pathname);let f=s,h=!1;(o?o.path!=="/"&&r["**"]:Jn(a.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:h=!0);const d=h?AS(this.options.notFoundMode,f):void 0,p=new Array(f.length),g=this._committed,b=(w,E)=>{const j=g[E];return(j==null?void 0:j.routeId)===w.id?j:w===this.options.notFoundRoute?g.find(R=>R.routeId===w.id):void 0};let y;for(let w=0;w{const S=_(p.preSearchFilters?p.preSearchFilters.reduce((w,E)=>E(w),y):y);return p.postSearchFilters?p.postSearchFilters.reduce((w,E)=>E(w),S):S};o.push(b)}const g=p.validateSearch;if(r&&g){const b=({search:y,next:_,meta:S})=>{const w=_(y);try{const E=Gu(g,w);if(S&&E)for(const j in E)j in w||(S.defaulted||(S.defaulted=new Map)).set(j,E[j]);return{...w,...E}}catch{}return w};o.push(b)}}const f=(d,p,g)=>{if(d>=o.length){if(!l.search)return{};if(l.search===!0)return p;const y=zi(l.search,p);return g&&(g.explicit=y),y}const b=(y,_)=>{if(_){const S=g||{};return{search:f(d+1,y,S),meta:S}}return f(d+1,y,g)};return o[d]({search:p,next:b,meta:g})};return f(0,a)}function AS(a,l){if(a!=="root"){let s;for(let r=l.length-1;r>=0;r--){const o=l[r];if(o.options.notFoundComponent)return o.id;s||(s=o.children&&o.id)}if(s)return s}return hi}function gy(a,l){if(a===!1||a===null)return Object.create(null);if((a??!0)===!0)return l;const s=Object.assign(Object.create(null),l);return Object.assign(s,zi(a,s))}function py(a,l){var r;const s=((r=a.options.params)==null?void 0:r.parse)??a.options.parseParams;s&&Object.assign(l,s(l))}function td(a,l){var s,r;return(r=(s=a.options[l])==null?void 0:s.preload)==null?void 0:r.call(s)}function CS(a,l){const s=td(a,"component");let r=td(a,"pendingComponent");return l&&(r?r=r.then(l):l()),s&&r?Promise.all([s,r]).then(()=>{}):s??r}function mi(a,l,s){const r=()=>l===!1?void 0:l?td(a,l):CS(a,s),o=a._lazy;if(o)return o===!0?r():o.then(r);if(!a.lazyFn)return r();const f=a.lazyFn().then(h=>{{const{id:d,...p}=h.options;Object.assign(a.options,p),a._lazy=!0}},h=>{throw a._lazy=void 0,h});return a._lazy=f,f.then(r)}function Sd(a){const l=a.findIndex(s=>s.status!=="success"||s._notFound)+1;return l&&l{const o=()=>r(l);l.addEventListener("abort",o,{once:!0}),Promise.resolve(a).then(s,r).finally(()=>l.removeEventListener("abort",o))})}function xl(a,l){return a.routesById[l.routeId]}function Is(a,l,s){return S0(a)?[Vt,a]:Ni(a)?(a.routeId||(a.routeId=s),[tc,a]):l?(typeof(a==null?void 0:a.then)=="function"&&(a=new Error("A Promise was thrown",{cause:a})),[$n,a]):[Sn,a]}function _d(a,l){var r,o;let s=Is(l,!0,a.id);if(s[0]!==$n)return s;try{(o=(r=a.options).onError)==null||o.call(r,s[1])}catch(f){s=Is(f,!0,a.id)}return s}function Ks(a,l,s,r,o){return o[0].signal.aborted?qa:jd(a,l,s,_d(s,r),o)}async function RS(a,l,s,r,o,f){var b,y;const[h,d]=l,p=s[0].signal,g=!!s[3];for(let _=s[6]??0;_a.navigate({...D,_fromLocation:h}),buildLocation:a.buildLocation,cause:g?"preload":S.cause,abortController:s[0],preload:g,matches:d,routeId:w.id};try{const D=S._ctx||(S._ctx=w.options.context?w.options.context({...j,deps:S.loaderDeps,context:E})||{}:void 0);S.context={...E,...D}}catch(D){return Fn(a,S),[_,Ks(a,l,w,D,s)]}if(p.aborted)return[_,qa];const R=S.paramsError??S.searchError;if(R!==void 0)return Fn(a,S),[_,Ks(a,l,w,R,s)];const z=w.options.beforeLoad;if(!z)continue;const L=S.status;_>=f&&(S.status="pending",(y=s[7])==null||y.call(s));try{er(a,S,"beforeLoad",s[0]);const D=await bl(z({...j,search:S.search,context:S.context,...a.options.additionalContext}),p);if(p.aborted)return[_,qa];const Z=jd(a,l,w,Is(D,!1,w.id),s);if(Z[0]!==Sn)return Fn(a,S),[_,Z];S.context={...S.context,...D}}catch(D){return Fn(a,S),[_,Ks(a,l,w,D,s)]}finally{S.status=L,er(a,S,!1,s[0])}}o()}function wd(a,l,s){var r;if(!(!s||--s[2])){if(((r=a._flights)==null?void 0:r.get(l.id))===s){const o=a._tx;if(o&&!o[0].signal.aborted&&!o[3].includes(l)&&o[3].some(f=>f.id===l.id)&&o[3].some(f=>f.isFetching==="beforeLoad"))return;a._flights.delete(l.id)}return s[1]}}function Fn(a,l){var r;const s=l._flight;l._flight=void 0,(r=wd(a,l,s))==null||r.abort()}function zt(a,l,s,r){var f;const o=[];for(const h of l)if(!(s!=null&&s.includes(h))){const d=h._flight;if(h._flight=void 0,r&&(d==null?void 0:d[2])===1&&((f=a._flights)==null?void 0:f.get(h.id))===d&&(s!=null&&s.some(p=>p.id===h.id)))d[2]=0;else{const p=wd(a,h,d);p&&o.push(p)}}for(const h of o)h.abort()}function Ed(a){for(const l of a){const s=l._flight;s&&s[2]++}}function er(a,l,s,r){var h;if(l.isFetching=s,r&&((h=a._tx)==null?void 0:h[0])!==r)return;const o=a.stores.byRoute.get(l.routeId),f=o==null?void 0:o.get();(f==null?void 0:f.id)===l.id&&o.set({...f,isFetching:s})}function w0(a,l,s,r,o,f,h){const d=l[0];return{params:s.params,location:d,navigate:p=>a.navigate({...p,_fromLocation:d}),cause:h?"preload":s.cause,abortController:o,preload:h,deps:s.loaderDeps,parentMatchPromise:f,context:s.context,route:r,...a.options.additionalContext}}async function yy(a,l,s,r,o,f,h){const d=h[0],p=d.signal;if(p.aborted)return qa;if(!o)return[Sn,void 0];let g=s._flight;er(a,s,"loader",d);try{if(!g){const b=new AbortController;g=[Promise.resolve().then(()=>o(w0(a,l,s,r,b,f,!!h[3]))).then(y=>Is(y,!1,r.id),y=>Is(y,!0,r.id)).then(y=>{var _;return y[0]!==Sn&&((_=a._flights)==null?void 0:_.get(s.id))===g&&(a._flights.delete(s.id),g[2]||b.abort()),y[0]===$n&&g[2]?_d(r,y[1]):y}),b,1],(a._flights??(a._flights=new Map)).set(s.id,g)}return s._flight=g,s.abortController=g[1],jd(a,l,r,await bl(g[0],p),h)}catch(b){if(b!==p||!p.aborted)throw b;return Fn(a,s),qa}finally{er(a,s,!1,d)}}function vy(a,l,s){l[0]!==Vt&&(a.status="success",a.error=void 0,l[0]===Sn?(a.loaderData=l[1],a.invalid=!1,a.updatedAt=Date.now(),a.preload=s):a.invalid=!0)}function zS(a,l,s){const r=a._cache.get(l.id);if(r!==s||a._committed.some(f=>f.id===l.id&&f._flight===l._flight))return;const o={...l,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,a._cache.set(l.id,o),r&&Fn(a,r)}function by(a,l){return l[0]===$n||l[0]===tc?{...a,status:l[0]===$n?"error":"notFound",error:l[1],_flight:void 0}:a}function NS(a,l,s,r,o,f,h){var I,fe;const d=l[1][s],p=xl(a,d),g=!!f[3],b=a._cache.get(d.id);let y,_=!1,S;try{if(d.status==="success"&&(y=p.options.shouldReload,typeof y=="function"&&(y=y(w0(a,l,d,p,f[0],o,g))),f[0].signal.aborted&&(S=qa)),!S)if(d.status!=="success")_=!0;else{const F=g||d.preload?p.options.preloadStaleTime??a.options.defaultPreloadStaleTime??3e4:p.options.staleTime??a.options.defaultStaleTime??0;_=!!(d.invalid||y||y===void 0&&Date.now()-d.updatedAt>=F&&(f[5]||d.cause==="enter"||f[2].some(ae=>ae.routeId===d.routeId&&ae.id!==d.id)))}}catch(F){d.invalid=!0,Fn(a,d),S=Ks(a,l,p,F,f)}const w=p.options.loader,E=typeof w=="function",j=E?w:w==null?void 0:w.handler,R=!g||p.options.preload!==!1;let z=R&&w?(I=a._flights)==null?void 0:I.get(d.id):void 0;z===d._flight||S?z=void 0:z&&!_&&!g&&y===void 0?_=!0:_||(z=void 0);const L=!!(w&&_&&d.status==="success"&&!g&&!f[4]&&((E?void 0:w.staleReloadMode)??a.options.defaultStaleReloadMode)!=="blocking"),D=_&&R,Z=D&&!L&&(d.status!=="success"||!!w),G=s>=h?f[7]:void 0,K=p.lazyFn&&p._lazy!==!0?G:void 0;if(D&&!w&&(d.invalid=!1,d.updatedAt=Date.now()),z&&z[2]++,Z){const F=d._flight;d._flight=z,(fe=wd(a,d,F))==null||fe.abort(),s>=h&&(d.status="pending"),G==null||G()}D||(d.isFetching=!1);const J=(S?Promise.resolve(S):Z?yy(a,l,d,p,j,o,f):Promise.resolve([Sn,d.loaderData])).then(F=>(Z&&(vy(d,F,g),F[0]===Sn&&(w&&!f[0].signal.aborted&&zS(a,d,b),s>=h&&(d.status="pending"))),F)),Q=bl(Promise.resolve().then(()=>mi(p,void 0,K)),f[0].signal).then(()=>{},F=>l[1].some((ae,B)=>B<=s&&(ae.status==="error"||ae.status==="notFound"||ae._notFound))?void 0:[s,Ks(a,l,p,F,f)]).then(F=>J.then(ae=>(Z&&!F&&ae[0]===Sn&&d.status==="pending"&&!f[0].signal.aborted&&(d.status="success",G==null||G()),F)));if(r.push([s,J,Q]),!L)return J.then(F=>by(d,F));const P={...d,status:"pending",preload:!1,_flight:z};d.invalid=!1,d.isFetching="loader";const ee=yy(a,l,P,p,j,o,f).then(F=>(d.isFetching=!1,vy(P,F,!1),F));return(l[2]??(l[2]=[])).push([s,ee,Q,P]),ee.then(F=>by(P,F))}async function nd(a,l,s,r,o=0){const f=s==null?void 0:s[1][1];let h=f!=null&&f.routeId?l.findIndex(d=>d.routeId===f.routeId):(s==null?void 0:s[0])??l.length-1;h<0&&(h=0);for(let d=h;d>=0;d--){const p=xl(a,l[d]);try{const g=mi(p,!1);g&&await bl(g,r)}catch(g){if(g===r&&r.aborted)throw g}if(p.options.notFoundComponent)return d}return f!=null&&f.routeId?h:o}function vl(a,l){l[2]&&(zt(a,l[2].map(s=>s[3])),l[2]=void 0)}async function xy(a,l,s,r){let o;try{await Promise.all(a.map(f=>f[1].then(async h=>{const d=f[0];if(!(r&&d>=await r)){if(h[0]>=Vt)throw[d,h];!o&&h[0]!==Sn&&(o=[d,h],await Promise.all((s??[]).map(p=>{if(!(p[0]<=d))return p[1].then(g=>{if(g[0]===Vt)throw[p[0],g]})})))}})))}catch(f){return f}return l??o}function jd(a,l,s,r,o,f){for(;r[0]===Vt;){const h=r[1],d=h.options;if(d.reloadDocument?o[3]:o[1]>=20)return r;try{return d.href&&d.reloadDocument?(a.resolveRedirect(h),r):[Vt,h,a.buildLocation({...d,_fromLocation:l[0],_includeValidateSearch:!0})]}catch(p){r=f?[$n,p]:_d(s,p),f=!0}}return r}async function E0(a,l,s,r,o,f){const h=l[1];let d=await o,p=!1;const g=h.findIndex(S=>S._notFound),b=S=>S[1][0]===tc?nd(a,h,S,r.signal):S[0];let y=g<0?h.length:g;if(((d==null?void 0:d[1][0])??0)>=Vt)y=0;else if(d){y=d[2]??(d[2]=await b(d));for(const S of s){if(S[0]>=y)break;const w=await S[1];if(w[0]!==Sn&&w[0]=y)break;const w=await S[2];if(w){d=w;break}}if(((d==null?void 0:d[1][0])??0)>=Vt){const S=d[1];if(S[0]!==Vt||S[1].options.reloadDocument||S[2])return vl(a,l),S;p=!0,d=[0,[$n,new Error("Too many redirects")]]}const _=d?d[2]??await b(d):g;if(_>=0){const S=d==null?void 0:d[1],w=S==null?void 0:S[0],E=h[_],j=S==null?void 0:S[1],R=()=>{S&&(E._notFound=void 0,w===$n?E.status="error":(j.routeId=E.routeId,E.routeId===a.routeTree.id?(E.status="success",E._notFound=!0):E.status="notFound"),E.error=j,E.isFetching=!1)};R(),S||f==null||f();const z=xl(a,E);try{await bl(S?Promise.resolve().then(()=>mi(z,w===$n?"errorComponent":"notFoundComponent")):Promise.all([mi(z),mi(z,"notFoundComponent")]),r.signal)}catch(L){if(L===r.signal&&r.signal.aborted)return vl(a,l),qa}S?p&&(r.abort(),await Promise.all([...s.map(L=>L[1]),...s.map(L=>L[2]),...(l[2]??[]).map(L=>L[1])]),vl(a,l),zt(a,h),R()):E.status="success"}return l}async function j0(a,l,s,r=0,o=l[1].length){var h,d;const f=l[1];for(let p=r;pz._notFound);if(a.options.notFoundMode!=="root"&&g>=0){const z=await nd(a,s,void 0,f,g);s[g]._notFound=void 0,s[z]._notFound=!0,g=z}let b=g<0?s.length:g+1,y=0;for(;y{for(let z=S;z=Vt&&(b=0);E()}if(!f.aborted&&!r[3]){const z=[];for(const[L,D]of a._flights??[])D[2]||(a._flights.delete(L),z.push(D[1]));for(const L of z)L.abort()}const R=E0(a,o,_,r[0],xy(_,j,o[2]),r[7]);(d=o[2])!=null&&d.length&&(o[3]=xy(o[2],void 0,void 0,R.then(z=>Ps(z)?0:Sd(s).length,()=>0))),h=await R}catch(p){if(vl(a,o),p===f&&f.aborted)return qa;throw p}return Ps(h)?h:j0(a,h,f,r[6]===s.length?r[6]:0)}function ad(a,l){var f,h;if(a._tx!==l)return;const s=l[3],r=a.stores.matches.get();let o=a._pending;for(let d=0;d0){o[3]=setTimeout(()=>ad(a,l),z);return}o[2]=0}const j=s.map(z=>({...z,_flight:void 0}));j[d].status="pending";const R=o[4]=a.startTransition(()=>a.stores.setMatches(j),j).then(z=>(z&&a._pending===o&&o[4]===R&&!o[2]&&(o[2]=Date.now()+w),z));return}}function Bs(a,l){var r;const s=a._pending;(a._tx===l||!((r=a._tx)!=null&&r[3].some(o=>o.id===(s==null?void 0:s[1]))))&&(clearTimeout(s==null?void 0:s[3]),a._pending=void 0)}async function Sy(a,l){const s=a._pending;if(!s)return;clearTimeout(s[3]);const r=s[2]-Date.now();if(!s[4]||r<=0||!Sd(l[3]).some(f=>f.id===s[1]))return;let o;try{await bl(new Promise(f=>{o=setTimeout(f,r)}),l[0].signal)}catch{}clearTimeout(o)}function M0(a,l){a._committed=l,a.stores.setMatches(l)}function DS(a,l,s,r){const o=a._committed,f=a._cache;for(const p of s)p.preload=!1,r&&(p._assetEnd=void 0);const h=Sd(s).length,d=new Map;{const p=Date.now();for(const g of[...o,...f.values()]){if(g.status!=="success"||s.some((y,_)=>y.id===g.id&&(_=(g.preload?b.options.preloadGcTime??a.options.defaultPreloadGcTime??3e5:b.options.gcTime??a.options.defaultGcTime??3e5)||d.set(g.id,f.get(g.id)===g?g:{...g,_flight:void 0,isFetching:!1,context:{}})}}l[3]=[],a._cache=d,M0(a,s),zt(a,[...f.values(),...o],[...s,...d.values()]),ES(a,o,s,l)}async function Uu(a,l){let s=a._tx;for(;s&&s!==l;){if(await s[5],a._tx===s)return;s=a._tx}}function A0(a,l,s){const r=s[1].options,o=s[2];if(!o)return a.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return a.navigate({href:o.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=l[1]+1,a._pendingLocation=o;const f=a.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{a._pendingLocation===o&&(a._pendingLocation=void 0)}),f}async function OS(a,l,s,r,o){const f=s.map(p=>({...p}));Ed(f);for(const p of r)Fn(a,f[p[0]]),f[p[0]]=p[3];const h=[l[2],f];let d;try{d=await E0(a,h,r,l[0],o)}catch(p){throw zt(a,f),p}if(Ps(d)){zt(a,f),d[0]===Vt&&a._tx===l&&a._committed===s&&await A0(a,l,d);return}if(await j0(a,d,l[0].signal),a._tx!==l||a._committed!==s){zt(a,f);return}for(const p of f){const g=a._cache.get(p.id);g!=null&&g._flight&&g._flight===p._flight&&(a._cache.delete(p.id),Fn(a,g))}M0(a,f),zt(a,s,f)}async function kS(a,l,s,r,o,f){const h=await T0(a,l[2],l[3],[l[0],l[1],a._committed,void 0,o,s,f,r]);if(Ps(h)){const y=h[0]===Vt&&a._tx===l;if((!y||h[1].options.reloadDocument)&&Bs(a,l),zt(a,l[3]),l[3]=[],!y)return;if(a._tx!==l){Bs(a,l);return}await A0(a,l,h);return}const d=h[1];if(a._tx===l&&await Sy(a,l),a._tx!==l){Bs(a,l),zt(a,d),vl(a,h);return}const p=l[2],g=ec(p,a.stores.resolvedLocation.get()),b=h[2];await a.startViewTransition(async()=>{var S;if(a._tx===l&&await Sy(a,l),a._tx!==l){Bs(a,l),zt(a,d),vl(a,h);return}const y=()=>{Bs(a,l),DS(a,l,d,f),a._tx===l&&(a.emit({type:"onLoad",...g}),a._tx===l&&a.emit({type:"onBeforeRouteMount",...g}))},_=await a.startTransition(y,d);if(a._tx!==l){vl(a,h);return}b!=null&&b.length&&OS(a,l,d,b,h[3]).catch(console.error),a.batch(()=>{a.stores.resolvedLocation.set(p),a.stores.status.set("idle"),a._tx===l&&a.emit({type:"onResolved",...g}),_&&a._tx===l&&a.emit({type:"onRendered",...g})}),a._tx===l&&((S=a._commitPromise)==null||S.resolve(),a._commitPromise=void 0)})}async function US(a,l){var D;const s=a._tx,r=a.stores.resolvedLocation.get(),o=r??a.stores.location.get(),f=a.latestLocation,h=a._pendingLocation,d=(h==null?void 0:h.href)===f.href?h._redirects??0:0,p=a._handoff,g=p==null?void 0:p[0](),b=new AbortController,y=a._preflight;if(a._preflight=b,g||p==null||p[1](),y==null||y.abort(),!b.signal.aborted){const Z=ec(f,r);a.emit({type:"onBeforeNavigate",...Z}),b.signal.aborted||a.emit({type:"onBeforeLoad",...Z})}if(b.signal.aborted){await Uu(a,s);return}const _=o.href===f.href;let S=b;const w=a.matchRoutes(f,{_controller:b});Ed(w);const E=g?p[1](w):void 0;if(E?S=g:g==null||g.abort(),b.signal.aborted){zt(a,w),await Uu(a,s);return}a._preflight=void 0;let j;const R=()=>kS(a,L,_,()=>ad(a,L),l==null?void 0:l.sync,E),z=l!=null&&l.sync?new Promise(Z=>j=Z):Promise.resolve().then(R).then(),L=[S,d,f,w,Date.now(),z];if(a._tx=L,s){for(const Z of a.stores.matches.get()){if(a._tx!==L)break;Z.isFetching&&er(a,Z,!1)}s[0].abort(),zt(a,s[3],L[3],!0)}if(a._tx!==L){zt(a,L[3]),L[3]=[],j==null||j(),await Uu(a,L);return}a.batch(()=>{a.stores.status.set("pending"),a.stores.location.set(f)}),(E||!a._committed.length&&((D=w[0])==null?void 0:D.status)!=="success"&&!w.some(Z=>Z._notFound))&&ad(a,L),j==null||j(R()),await z,await Uu(a,L)}async function LS(a,l){let s=a.buildLocation(l);for(let r=0;;r++){const o=a._committed,f=new AbortController;let h,d,p;try{try{h=a.matchRoutes(s,{_controller:f}),Ed(h),d=(a._preloads??(a._preloads=new Map)).set(f,h),p=await T0(a,s,h,[f,r,o,!0])}finally{d&&(d=d.delete(f),zt(a,h)),f.abort()}if(!Ps(p))return p[1];if(!d||p.length<3)return;s=p[2]}catch(g){Ni(g)||console.error(g);return}}}const BS="Error preloading route! ☝️";var C0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(a){if(this.init=l=>{var p,g;this.originalIndex=l.originalIndex;const s=this.options,r=!(s!=null&&s.path)&&!(s!=null&&s.id);this.parentRoute=(g=(p=this.options).getParentRoute)==null?void 0:g.call(p),r?this._path=hi:this.parentRoute||vd();let o=r?hi:s==null?void 0:s.path;o&&o!=="/"&&(o=v0(o));const f=(s==null?void 0:s.id)||o;let h=r?hi:Bu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,f]);o==="__root__"&&(o="/"),h!=="__root__"&&(h=Bu(["/",h]));const d=h==="__root__"?"/":Bu([this.parentRoute.fullPath,o]);this._path=o,this._id=h,this._fullPath=d,this._to=Jn(d)},this.addChildren=l=>this._addFileChildren(l),this._addFileChildren=l=>(Array.isArray(l)&&(this.children=l),typeof l=="object"&&l!==null&&(this.children=Object.values(l)),this),this._addFileTypes=()=>this,this.updateLoader=l=>(Object.assign(this.options,l),this),this.update=l=>(Object.assign(this.options,l),this),this.lazy=l=>(this.lazyFn=l,this),this.redirect=l=>x0({from:this.fullPath,...l}),this.options=a||{},this.isRoot=!(a!=null&&a.getParentRoute),a!=null&&a.id&&(a!=null&&a.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},HS=class extends C0{constructor(a){super(a)}},Td=class extends $.Component{constructor(...a){super(...a),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(a,l){const s=a.getResetKey();return l.error&&l.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(a){return{error:a}}componentDidCatch(a,l){var s,r;(r=(s=this.props).onCatch)==null||r.call(s,a,l)}render(){const a=this.state.error;return a?$.createElement(this.props.errorComponent??qS,{error:a,reset:this.reset}):this.props.children}};function qS({error:a}){const[l,s]=$.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:()=>s(r=>!r),children:l?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),l?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:a.message?v.jsx("code",{children:a.message}):null})}):null]})}function GS({children:a,fallback:l=null}){return v.jsx(cn.Fragment,{children:R0()?a:l})}function R0(){return cn.useSyncExternalStore(QS,()=>!0,()=>!1)}function QS(){return()=>{}}var z0=$.createContext(null);function on(a){return $.useContext(z0)}var nc=$.createContext(void 0),VS=$.createContext(void 0),Je=(a=>(a[a.None=0]="None",a[a.Mutable=1]="Mutable",a[a.Watching=2]="Watching",a[a.RecursedCheck=4]="RecursedCheck",a[a.Recursed=8]="Recursed",a[a.Dirty=16]="Dirty",a[a.Pending=32]="Pending",a))(Je||{});function YS({update:a,notify:l,unwatched:s}){return{link:r,unlink:o,propagate:f,checkDirty:h,shallowPropagate:d};function r(g,b,y){const _=b.depsTail;if(_!==void 0&&_.dep===g)return;const S=_!==void 0?_.nextDep:b.deps;if(S!==void 0&&S.dep===g){S.version=y,b.depsTail=S;return}const w=g.subsTail;if(w!==void 0&&w.version===y&&w.sub===b)return;const E=b.depsTail=g.subsTail={version:y,dep:g,sub:b,prevDep:_,nextDep:S,prevSub:w,nextSub:void 0};S!==void 0&&(S.prevDep=E),_!==void 0?_.nextDep=E:b.deps=E,w!==void 0?w.nextSub=E:g.subs=E}function o(g,b=g.sub){const y=g.dep,_=g.prevDep,S=g.nextDep,w=g.nextSub,E=g.prevSub;return S!==void 0?S.prevDep=_:b.depsTail=_,_!==void 0?_.nextDep=S:b.deps=S,w!==void 0?w.prevSub=E:y.subsTail=E,E!==void 0?E.nextSub=w:(y.subs=w)===void 0&&s(y),S}function f(g){let b=g.nextSub,y;e:do{const _=g.sub;let S=_.flags;if(S&60?S&12?S&4?!(S&48)&&p(g,_)?(_.flags=S|40,S&=1):S=0:_.flags=S&-9|32:S=0:_.flags=S|32,S&2&&l(_),S&1){const w=_.subs;if(w!==void 0){const E=(g=w).nextSub;E!==void 0&&(y={value:b,prev:y},b=E);continue}}if((g=b)!==void 0){b=g.nextSub;continue}for(;y!==void 0;)if(g=y.value,y=y.prev,g!==void 0){b=g.nextSub;continue e}break}while(!0)}function h(g,b){let y,_=0,S=!1;e:do{const w=g.dep,E=w.flags;if(b.flags&16)S=!0;else if((E&17)===17){if(a(w)){const j=w.subs;j.nextSub!==void 0&&d(j),S=!0}}else if((E&33)===33){(g.nextSub!==void 0||g.prevSub!==void 0)&&(y={value:g,prev:y}),g=w.deps,b=w,++_;continue}if(!S){const j=g.nextDep;if(j!==void 0){g=j;continue}}for(;_--;){const j=b.subs,R=j.nextSub!==void 0;if(R?(g=y.value,y=y.prev):g=j,S){if(a(b)){R&&d(j),b=g.sub;continue}S=!1}else b.flags&=-33;b=g.sub;const z=g.nextDep;if(z!==void 0){g=z;continue e}}return S}while(!0)}function d(g){do{const b=g.sub,y=b.flags;(y&48)===32&&(b.flags=y|16,(y&6)===2&&l(b))}while((g=g.nextSub)!==void 0)}function p(g,b){let y=b.depsTail;for(;y!==void 0;){if(y===g)return!0;y=y.prevDep}return!1}}function KS(a,l,s){var f,h,d;const r=typeof a=="object",o=r?a:void 0;return{next:(f=r?a.next:a)==null?void 0:f.bind(o),error:(h=r?a.error:l)==null?void 0:h.bind(o),complete:(d=r?a.complete:s)==null?void 0:d.bind(o)}}const ld=[];let Qu=0;const{link:_y,unlink:XS,propagate:ZS,checkDirty:N0,shallowPropagate:wy}=YS({update(a){return a._update()},notify(a){ld[id++]=a,a.flags&=~Je.Watching},unwatched(a){a.depsTail!==void 0&&(a.depsTail=void 0,a.flags=Je.Mutable|Je.Dirty,$u(a))}});let Lu=0,id=0,pn,sd=0;function JS(a){try{++sd,a()}finally{--sd||D0()}}function $u(a){const l=a.depsTail;let s=l!==void 0?l.nextDep:a.deps;for(;s!==void 0;)s=XS(s,a)}function D0(){if(!(sd>0)){for(;Lu{var g;o.get(),d.current?(g=h.next)==null||g.call(h,o._snapshot):d.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(f){const h=pn,d=(l==null?void 0:l.compare)??Object.is;if(s)pn=o,++Qu,o.depsTail=void 0;else if(f===void 0)return!1;s&&(o.flags=Je.Mutable|Je.RecursedCheck);try{const p=o._snapshot,g=typeof f=="function"?f(p):f===void 0&&s?r(p):f;return p===void 0||!d(p,g)?(o._snapshot=g,!0):!1}finally{pn=h,s&&(o.flags&=~Je.RecursedCheck),$u(o)}}};return s?(o.flags=Je.Mutable|Je.Dirty,o.get=function(){const f=o.flags;if(f&Je.Dirty||f&Je.Pending&&N0(o.deps,o)){if(o._update()){const h=o.subs;h!==void 0&&wy(h)}}else f&Je.Pending&&(o.flags=f&~Je.Pending);return pn!==void 0&&_y(o,pn,Qu),o._snapshot}):o.set=function(f){if(o._update(f)){const h=o.subs;h!==void 0&&(ZS(h),wy(h),D0())}},o}function FS(a){const l=()=>{const r=pn;pn=s,++Qu,s.depsTail=void 0,s.flags=Je.Watching|Je.RecursedCheck;try{return a()}finally{pn=r,s.flags&=~Je.RecursedCheck,$u(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Je.Watching|Je.RecursedCheck,notify(){const r=this.flags;r&Je.Dirty||r&Je.Pending&&N0(this.deps,this)?l():this.flags=Je.Watching},stop(){this.flags=Je.None,this.depsTail=void 0,$u(this)}};return l(),s}var Af={exports:{}},Cf={},Rf={exports:{}},zf={};/** * @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 jy;function $S(){if(jy)return zf;jy=1;var a=rr();function l(y,_){return y===_&&(y!==0||1/y===1/_)||y!==y&&_!==_}var s=typeof Object.is=="function"?Object.is:l,r=a.useState,o=a.useEffect,f=a.useLayoutEffect,h=a.useDebugValue;function d(y,_){var S=_(),w=r({inst:{value:S,getSnapshot:_}}),E=w[0].inst,j=w[1];return f(function(){E.value=S,E.getSnapshot=_,p(E)&&j({inst:E})},[y,S,_]),o(function(){return p(E)&&j({inst:E}),y(function(){p(E)&&j({inst:E})})},[y]),h(S),S}function p(y){var _=y.getSnapshot;y=y.value;try{var S=_();return!s(y,S)}catch{return!0}}function g(y,_){return _()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return zf.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:b,zf}var Ty;function WS(){return Ty||(Ty=1,Rf.exports=$S()),Rf.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 My;function PS(){if(My)return Cf;My=1;var a=rr(),l=WS();function s(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:s,o=l.useSyncExternalStore,f=a.useRef,h=a.useEffect,d=a.useMemo,p=a.useDebugValue;return Cf.useSyncExternalStoreWithSelector=function(g,b,y,_,S){var w=f(null);if(w.current===null){var E={hasValue:!1,value:null};w.current=E}else E=w.current;w=d(function(){function R(G){if(!z){if(z=!0,L=G,G=_(G),S!==void 0&&E.hasValue){var K=E.value;if(S(K,G))return D=K}return D=G}if(K=D,r(L,G))return K;var J=_(G);return S!==void 0&&S(K,J)?(L=G,K):(L=G,D=J)}var z=!1,L,D,Z=y===void 0?null:y;return[function(){return R(b())},Z===null?void 0:function(){return R(Z())}]},[b,y,_,S]);var j=o(g,w[0],w[1]);return h(function(){E.hasValue=!0,E.value=j},[j]),p(j),j},Cf}var Ay;function IS(){return Ay||(Ay=1,Af.exports=PS()),Af.exports}var e2=IS();function t2(a,l){return a===l}function Wn(a,l,s=t2){const r=$.useCallback(h=>{if(!a)return()=>{};const{unsubscribe:d}=a.subscribe(h);return d},[a]),o=$.useCallback(()=>a==null?void 0:a.get(),[a]);return e2.useSyncExternalStoreWithSelector(r,o,o,l,s)}var Cy={};function O0(a,l){const s=$.useRef();return r=>{const o=a!=null&&a.select?a.select(r):r;return(a==null?void 0:a.structuralSharing)??l.options.defaultStructuralSharing?s.current=ul(s.current,o):o}}function Sl(a){const l=on(),s=$.useContext(a.from?VS:nc),r=a.from??s,o=l.stores.getMatchStore(r),f=O0(a,l),h=Wn(o,d=>d?f(d):Cy);if(h!==Cy)return h;(a.shouldThrow??!0)&&vd()}function k0(a){return Sl({from:a.from,strict:a.strict,structuralSharing:a.structuralSharing,select:l=>a.select?a.select(l.loaderData):l.loaderData})}function U0(a){const{select:l,...s}=a;return Sl({...s,select:r=>l?l(r.loaderDeps):r.loaderDeps})}function L0(a){return Sl({from:a.from,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,strict:a.strict,select:l=>{const s=a.strict===!1?l.params:l._strictParams;return a.select?a.select(s):s}})}function B0(a){return Sl({from:a.from,strict:a.strict,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,select:l=>a.select?a.select(l.search):l.search})}function cr(a){const l=on();return $.useCallback(s=>l.navigate({...s,from:s.from??(a==null?void 0:a.from)}),[a==null?void 0:a.from,l])}function H0(a){return Sl({...a,select:l=>a.select?a.select(l.context):l.context})}function Nf(a){const l=$.useRef(a);return Ba(l.current,a,{ignoreUndefined:!1})||(l.current=a),l.current}function n2(a,l){return a[0]===l[0]&&a[1]===l[1]&&a[2]===l[2]}function a2(a,l,s){if(a!=null&&a.external)return Ku(a.href,s)?void 0:a.href;if(!o2(l)&&!(typeof l!="string"||l.indexOf(":")===-1))try{return new URL(l),Ku(l,s)?void 0:l}catch{}}function l2(a,l,s,r,o,f){if(f)return!1;if(s!=null&&s.exact){if(!tS(a.pathname,l.pathname,r))return!1}else{const h=Zu(a.pathname,r),d=Zu(l.pathname,r);if(!(h.startsWith(d)&&(h.length===d.length||h[d.length]==="/")))return!1}return((s==null?void 0:s.includeSearch)??!0)&&!Ba(a.search,l.search,{partial:!(s!=null&&s.exact),ignoreUndefined:!(s!=null&&s.explicitUndefined)})?!1:s!=null&&s.includeHash?o&&a.hash===l.hash:!0}function i2(a,l){const s=on(),r=Lx(l),{activeProps:o,inactiveProps:f,activeOptions:h,to:d,preload:p,preloadDelay:g,preloadIntentProximity:b,hashScrollIntoView:y,replace:_,startTransition:S,resetScroll:w,viewTransition:E,children:j,target:R,disabled:z,style:L,className:D,onClick:Z,onBlur:G,onFocus:K,onMouseEnter:J,onMouseLeave:Q,onTouchStart:P,ignoreBlocker:ee,params:I,search:fe,hash:F,state:ae,mask:B,reloadDocument:W,unsafeRelative:te,from:be,_fromLocation:me,...M}=a,X=R0(),ne=Nf(a.search),se=Nf(a.params),de=Nf(h),ge=$.useMemo(()=>a,[s,a.from,a._fromLocation,a.hash,a.to,ne,se,a.state,a.mask,a.unsafeRelative]),Ae=$.useCallback(it=>{const Fe=s.buildLocation({_fromLocation:it,...ge}),jn=c2(Fe.maskedLocation?Fe.maskedLocation.publicHref:Fe.publicHref,Fe.maskedLocation?Fe.maskedLocation.external:Fe.external,s.history,z),Qi=a2(jn,d,s.protocolAllowlist);return[jn==null?void 0:jn.href,Qi,l2(it,Fe,de,s.basepath,X,Qi!==void 0)]},[de,z,X,ge,s,d]),[ot,Qe,_n]=Wn(s.stores.location,Ae,n2),wn=_n?zi(o,{})??s2:Df,Pn=_n?Df:zi(f,{})??Df,Bi=[D,wn.className,Pn.className].filter(Boolean).join(" "),fn=(L||wn.style||Pn.style)&&{...L,...wn.style,...Pn.style},wl=$.useRef(!1),an=a.reloadDocument||Qe||z?!1:p??s.options.defaultPreload,Hi=g??s.options.defaultPreloadDelay??0,En=$.useCallback(()=>{s.preloadRoute(ge).catch(it=>{console.warn(it),console.warn(BS)})},[s,ge]),Ga=$.useCallback(it=>{if(!it){Of(r);return}if(!(it.isIntersecting??an==="intent")){it.isIntersecting===!1&&Of(r);return}if(!Hi){En();return}Xs.has(r)||Xs.set(r,setTimeout(()=>{Xs.delete(r),En()},Hi))},[En,r,an,Hi]);Ux(r,Ga,an!=="viewport"),$.useEffect(()=>{wl.current||an==="render"&&(En(),wl.current=!0)},[En,an]);const qi=it=>{const Fe=it.currentTarget.getAttribute("target"),jn=R!==void 0?R:Fe;!z&&!(it.metaKey||it.altKey||it.ctrlKey||it.shiftKey)&&!it.defaultPrevented&&(!jn||jn==="_self")&&it.button===0&&(it.preventDefault(),s.navigate({...ge,replace:_,resetScroll:w,hashScrollIntoView:y,startTransition:S,viewTransition:E,ignoreBlocker:ee}))};if(Qe)return{...M,ref:r,href:Qe,...j&&{children:j},...R&&{target:R},...z&&{disabled:z},...L&&{style:L},...D&&{className:D},...Z&&{onClick:Z},...G&&{onBlur:G},...K&&{onFocus:K},...J&&{onMouseEnter:J},...Q&&{onMouseLeave:Q},...P&&{onTouchStart:P}};const Gi=()=>{an==="intent"&&En()},dr=()=>{an==="intent"&&Of(r)};return{...M,...wn,...Pn,href:ot,ref:r,onClick:ui([Z,qi]),onBlur:ui([G,dr]),onFocus:ui([K,Ga]),onMouseEnter:ui([J,Ga]),onMouseLeave:ui([Q,dr]),onTouchStart:ui([P,Gi]),disabled:!!z,target:R,...fn&&{style:fn},...Bi&&{className:Bi},...z&&r2,..._n&&u2}}var Df={},s2={className:"active"},r2={role:"link","aria-disabled":!0},u2={"data-status":"active","aria-current":"page"},Xs=new WeakMap,Of=a=>{clearTimeout(Xs.get(a)),Xs.delete(a)},ui=a=>l=>{for(const s of a)if(s){if(l.defaultPrevented)return;s(l)}};function c2(a,l,s,r){if(!r)return l?{href:a,external:!0}:{href:s.createHref(a)||"/",external:!1}}function o2(a){if(typeof a!="string")return!1;const l=a.charCodeAt(0);return l===47?a.charCodeAt(1)!==47:l===46}var ac=$.forwardRef((a,l)=>{const{_asChild:s,...r}=a,{type:o,...f}=i2(r,l),h=typeof r.children=="function"?r.children({isActive:f["data-status"]==="active"}):r.children;if(!s){const{disabled:d,...p}=f;return $.createElement("a",p,h)}return $.createElement(s,f,h)}),f2=class extends C0{constructor(a){super(a),this.useMatch=l=>Sl({select:l==null?void 0:l.select,from:this.id,structuralSharing:l==null?void 0:l.structuralSharing}),this.useRouteContext=l=>H0({...l,from:this.id}),this.useSearch=l=>B0({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useParams=l=>L0({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useLoaderDeps=l=>U0({...l,from:this.id}),this.useLoaderData=l=>k0({...l,from:this.id}),this.useNavigate=()=>cr({from:this.fullPath}),this.Link=cn.forwardRef((l,s)=>v.jsx(ac,{ref:s,from:this.fullPath,...l}))}};function Oi(a){return new f2(a)}var d2=class extends HS{constructor(a){super(a),this.useMatch=l=>Sl({select:l==null?void 0:l.select,from:this.id,structuralSharing:l==null?void 0:l.structuralSharing}),this.useRouteContext=l=>H0({...l,from:this.id}),this.useSearch=l=>B0({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useParams=l=>L0({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useLoaderDeps=l=>U0({...l,from:this.id}),this.useLoaderData=l=>k0({...l,from:this.id}),this.useNavigate=()=>cr({from:this.fullPath}),this.Link=cn.forwardRef((l,s)=>v.jsx(ac,{ref:s,from:this.fullPath,...l}))}};function h2(a){return new d2(a)}function m2(a){const l=on(),s=`not-found-${Wn(l.stores.location,r=>r.pathname)}-${Wn(l.stores.status,r=>r)}`;return v.jsx(Td,{getResetKey:()=>s,onCatch:(r,o)=>{var f;if(Ni(r))(f=a.onCatch)==null||f.call(a,r,o);else throw r},errorComponent:({error:r})=>{var o;if(Ni(r))return(o=a.fallback)==null?void 0:o.call(a,r);throw r},children:a.children})}function g2(){return v.jsx("p",{children:"Not Found"})}function oi(a){return v.jsx(v.Fragment,{children:a.children})}function q0(a,l,s){return l.options.notFoundComponent?v.jsx(l.options.notFoundComponent,{...s}):a.options.defaultNotFoundComponent?v.jsx(a.options.defaultNotFoundComponent,{...s}):v.jsx(g2,{})}function lc(a,l){const s=(l==null?void 0:l.options.pendingComponent)??a.options.defaultPendingComponent;return s?v.jsx(s,{}):null}var p2=(a,l)=>a[0]===l[0]&&a[1]===l[1],G0=(a,l,s)=>!l.isRoot||l.options.shellComponent||l.options.wrapInSuspense||s===!1||s==="data-only"||!a.ssr,Q0=$.memo(function({routeId:l}){const s=on();return v.jsx(y2,{router:s,match:Wn(s.stores.getMatchStore(l),r=>r)})});function y2({router:a,match:l}){var y,_;const s=a.routesById[l.routeId],r=lc(a,s),o=s.options.errorComponent??a.options.defaultErrorComponent,f=s.options.onCatch??a.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??((y=a.options.notFoundRoute)==null?void 0:y.options.component):s.options.notFoundComponent,d=l.ssr===!1||l.ssr==="data-only",p=G0(a,s,l.ssr)&&(s.options.wrapInSuspense??r??(((_=s.options.errorComponent)==null?void 0:_.preload)||d))?$.Suspense:oi,g=o?Td:oi,b=h?m2:oi;return v.jsxs(s.isRoot?s.options.shellComponent??oi:oi,{children:[v.jsx(nc.Provider,{value:l.routeId,children:v.jsx(p,{fallback:r,children:v.jsx(g,{getResetKey:()=>l,errorComponent:o,onCatch:(S,w)=>{if(Ni(S))throw S.routeId??(S.routeId=l.routeId),S;f==null||f(S,w)},children:v.jsx(b,{fallback:S=>{if(S.routeId??(S.routeId=l.routeId),S.routeId!==l.routeId)throw S;return $.createElement(h,S)},children:d?v.jsx(GS,{fallback:r,children:v.jsx(Ry,{match:l})}):v.jsx(Ry,{match:l})})})})}),null]})}var Ry=$.memo(function({match:l}){const s=on(),r=l.routeId,o=s.routesById[r],f=$.useMemo(()=>{var p;const d=(p=o.options.remountDeps??s.options.defaultRemountDeps)==null?void 0:p({routeId:r,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch});return d?JSON.stringify(d):void 0},[r,l.loaderDeps,l._strictParams,l._strictSearch,o.options.remountDeps,s.options.defaultRemountDeps]),h=$.useMemo(()=>{const d=o.options.component??s.options.defaultComponent;return d?v.jsx(d,{},f):v.jsx(V0,{})},[f,o.options.component,s.options.defaultComponent]);if(l.status==="pending"){if(s.ssr&&!G0(s,o,l.ssr))return h;if(s._tx)throw s._tx[5];return lc(s,o)}if(l.status==="notFound")return q0(s,o,l.error);if(l.status==="error")throw l.error;return h}),V0=$.memo(function(){const l=on(),s=$.useContext(nc);let r,o,f;{const d=l.stores.getMatchStore(s);[r,o]=Wn(d,p=>[!!p._notFound,p.error],p2),f=Wn(l.stores.ids,p=>p[p.indexOf(s)+1])}if(r)return q0(l,l.routesById[s],o);if(!f)return null;const h=v.jsx(Q0,{routeId:f});return s===hi?v.jsx($.Suspense,{fallback:lc(l),children:h}):h});function Y0(a,l){const s=a[1];a.length=0,s==null||s(l)}function v2({t:a}){const l=on(),s=l._rendered??(l._rendered=[]);return l.startTransition=(r,o)=>new Promise(f=>{Y0(s,!1),s.push(o,f),a(l),$.startTransition(r)}),o0(()=>{const r=l.history.subscribe(l.load);l.updateLatestLocation();const o=l.latestLocation,f=l.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Jn(o.publicHref)!==Jn(f.publicHref))return l.commitLocation({...f,replace:!0,ignoreBlocker:!0}),r;const h=l.stores.resolvedLocation.get();return(h==null?void 0:h.href)===o.href&&h.state.__TSR_key===o.state.__TSR_key?s.push(l.stores.matches.get(),d=>{d&&l.emit({type:"onRendered",...ec(h,h)})}):l._tx||l.load({sync:!0}).catch(console.error),r},[l,l.history]),null}function b2(){const a=on(),l=a.routesById[hi],s=lc(a,l),r=a.ssr?oi:$.Suspense,o=v.jsxs(v.Fragment,{children:[v.jsx(v2,{t:$.useState()[1]}),v.jsx(r,{fallback:s,children:v.jsx(x2,{})})]});return a.options.InnerWrap?v.jsx(a.options.InnerWrap,{children:o}):o}function x2(){const a=on(),l=a._rendered,s=Wn(a.stores.matches,h=>l[0]??h),r=s[0],o=r==null?void 0:r.routeId;o0(()=>{l[0]===s&&Y0(l,!0)},[l,s]);const f=o?v.jsx(Q0,{routeId:o}):null;return v.jsx(nc.Provider,{value:o,children:a.options.disableGlobalCatchBoundary?f:v.jsx(Td,{getResetKey:()=>r,onCatch:void 0,children:f})})}var S2=a=>({createMutableStore:Ey,createReadonlyStore:Ey,batch:JS}),_2=a=>new w2(a),w2=class extends jS{constructor(a){super(a,S2)}};function E2({router:a,children:l,...s}){d0(s)&&a.update({...a.options,...s,context:{...a.options.context,...s.context}});const r=v.jsx(z0.Provider,{value:a,children:l});return a.options.Wrap?v.jsx(a.options.Wrap,{children:r}):r}function j2({router:a,...l}){return v.jsx(E2,{router:a,...l,children:v.jsx(b2,{})})}function zy(a){const l=on({warn:(a==null?void 0:a.router)===void 0}),s=(a==null?void 0:a.router)||l;return Wn(s.stores.__store,O0(a,s))}const T2="modulepreload",M2=function(a){return"/"+a},Ny={},nn=function(l,s,r){let o=Promise.resolve();if(s&&s.length>0){let h=function(g){return Promise.all(g.map(b=>Promise.resolve(b).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=h(s.map(g=>{if(g=M2(g),g in Ny)return;Ny[g]=!0;const b=g.endsWith(".css"),y=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${y}`))return;const _=document.createElement("link");if(_.rel=b?"stylesheet":T2,b||(_.as="script"),_.crossOrigin="",_.href=g,p&&_.setAttribute("nonce",p),document.head.appendChild(_),b)return new Promise((S,w)=>{_.addEventListener("load",S),_.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function f(h){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=h,window.dispatchEvent(d),!d.defaultPrevented)throw h}return o.then(h=>{for(const d of h||[])d.status==="rejected"&&f(d.reason);return l().catch(f)})};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A2=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),K0=(...a)=>a.filter((l,s,r)=>!!l&&l.trim()!==""&&r.indexOf(l)===s).join(" ").trim();/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var C2={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 R2=$.forwardRef(({color:a="currentColor",size:l=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:f,iconNode:h,...d},p)=>$.createElement("svg",{ref:p,...C2,width:l,height:l,stroke:a,strokeWidth:r?Number(s)*24/Number(l):s,className:K0("lucide",o),...d},[...h.map(([g,b])=>$.createElement(g,b)),...Array.isArray(f)?f:[f]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Me=(a,l)=>{const s=$.forwardRef(({className:r,...o},f)=>$.createElement(R2,{ref:f,iconNode:l,className:K0(`lucide-${A2(a)}`,r),...o}));return s.displayName=`${a}`,s};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const z2=Me("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 N2=Me("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 rd=Me("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 X0=Me("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 D2=Me("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 O2=Me("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 k2=Me("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 Wu=Me("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 U2=Me("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Z0=Me("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 L2=Me("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const B2=Me("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 H2=Me("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 q2=Me("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 G2=Me("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 Q2=Me("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 V2=Me("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 Y2=Me("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 K2=Me("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const X2=Me("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 Z2=Me("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 J0=Me("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 Md=Me("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 J2=Me("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 F2=Me("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 Ad=Me("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 $2=Me("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 F0=Me("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 Cd=Me("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 W2=Me("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 P2=Me("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 I2=Me("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 Pu=Me("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 e3=Me("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 Rd=Me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),tr=[{id:"dashboard",pfad:"/cockpit",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:X2,group:"Operativ"},{id:"ideen",pfad:"/ideen",label:"Ideen",hint:"Schreib hin, was entstehen soll",icon:J0,group:"Operativ"},{id:"skills",pfad:"/skills",label:"Skills & Jobs",hint:"Autonome Skills manuell auslösen",icon:rd,group:"Operativ"},{id:"chronik",pfad:"/chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:Y2,group:"Operativ"},{id:"wissen",pfad:"/wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:Z2,group:"Wissen"},{id:"connect",pfad:"/verbinden",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Ad,group:"Werkzeuge"},{id:"konsole",pfad:"/konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:I2,group:"Werkzeuge"},{id:"guide",pfad:"/anleitung",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:Z0,group:"Werkzeuge"},{id:"models",pfad:"/modelle",label:"Modelle",hint:"Speicher, laden & Rollen",icon:X0,group:"Wartung"},{id:"agent",pfad:"/agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:rd,group:"Wartung"}];function $0(a){return[...tr].sort((l,s)=>s.pfad.length-l.pfad.length).find(l=>a===l.pfad||a.startsWith(l.pfad+"/"))}const Dy=a=>{let l;const s=new Set,r=(g,b)=>{const y=typeof g=="function"?g(l):g;if(!Object.is(y,l)){const _=l;l=b??(typeof y!="object"||y===null)?y:Object.assign({},l,y),s.forEach(S=>S(l,_))}},o=()=>l,d={setState:r,getState:o,getInitialState:()=>p,subscribe:g=>(s.add(g),()=>s.delete(g))},p=l=a(r,o,d);return d},t3=(a=>a?Dy(a):Dy),n3=a=>a;function a3(a,l=n3){const s=cn.useSyncExternalStore(a.subscribe,cn.useCallback(()=>l(a.getState()),[a,l]),cn.useCallback(()=>l(a.getInitialState()),[a,l]));return cn.useDebugValue(s),s}const l3=a=>{const l=t3(a),s=r=>a3(l,r);return Object.assign(s,l),s},i3=(a=>l3);function s3(a,l){let s;try{s=a()}catch{return}return{getItem:o=>{var f;const h=p=>p===null?null:JSON.parse(p,void 0),d=(f=s.getItem(o))!=null?f:null;return d instanceof Promise?d.then(h):h(d)},setItem:(o,f)=>s.setItem(o,JSON.stringify(f,void 0)),removeItem:o=>s.removeItem(o)}}const ud=a=>l=>{try{const s=a(l);return s instanceof Promise?s:{then(r){return ud(r)(s)},catch(r){return this}}}catch(s){return{then(r){return this},catch(r){return ud(r)(s)}}}},r3=(a,l)=>(s,r,o)=>{let f={storage:s3(()=>window.localStorage),partialize:j=>j,version:0,merge:(j,R)=>({...R,...j}),...l},h=!1,d=0;const p=new Set,g=new Set;let b=f.storage;if(!b)return a((...j)=>{console.warn(`[zustand persist middleware] Unable to update item '${f.name}', the given storage is currently unavailable.`),s(...j)},r,o);const y=()=>{const j=f.partialize({...r()});return b.setItem(f.name,{state:j,version:f.version})},_=o.setState;o.setState=(j,R)=>(_(j,R),y());const S=a((...j)=>(s(...j),y()),r,o);o.getInitialState=()=>S;let w;const E=()=>{var j,R;if(!b)return;const z=++d;h=!1,p.forEach(D=>{var Z;return D((Z=r())!=null?Z:S)});const L=((R=f.onRehydrateStorage)==null?void 0:R.call(f,(j=r())!=null?j:S))||void 0;return ud(b.getItem.bind(b))(f.name).then(D=>{if(D)if(typeof D.version=="number"&&D.version!==f.version){if(f.migrate){const Z=f.migrate(D.state,D.version);return Z instanceof Promise?Z.then(G=>[!0,G]):[!0,Z]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,D.state];return[!1,void 0]}).then(D=>{var Z;if(z!==d)return;const[G,K]=D;if(w=f.merge(K,(Z=r())!=null?Z:S),s(w,!0),G)return y()}).then(()=>{z===d&&(L==null||L(r(),void 0),w=r(),h=!0,g.forEach(D=>D(w)))}).catch(D=>{z===d&&(L==null||L(void 0,D))})};return o.persist={setOptions:j=>{f={...f,...j},j.storage&&(b=j.storage)},clearStorage:()=>{++d,b==null||b.removeItem(f.name)},getOptions:()=>f,rehydrate:()=>E(),hasHydrated:()=>h,onHydrate:j=>(p.add(j),()=>{p.delete(j)}),onFinishHydration:j=>(g.add(j),()=>{g.delete(j)})},f.skipHydration||E(),w||S},u3=r3;let c3=0;const Yt=i3()(u3(a=>({ui:{schieneEingeklappt:!1,paletteOffen:!1,expertenmodus:!1},strom:{lage:"getrennt",letztesEreignis:null},meldungen:[],schieneUmschalten:()=>a(l=>({ui:{...l.ui,schieneEingeklappt:!l.ui.schieneEingeklappt}})),palette:l=>a(s=>({ui:{...s.ui,paletteOffen:l}})),expertenmodus:l=>a(s=>({ui:{...s.ui,expertenmodus:l}})),stromLage:l=>a(s=>({strom:{...s.strom,lage:l}})),stromEreignis:()=>a(l=>({strom:{...l.strom,letztesEreignis:Date.now()}})),melden:(l,s)=>a(r=>({meldungen:[...r.meldungen,{id:`m${++c3}`,art:l,text:s,seit:Date.now()}].slice(-6)})),meldungWeg:l=>a(s=>({meldungen:s.meldungen.filter(r=>r.id!==l)}))}),{name:"mc_ui",partialize:a=>({ui:{schieneEingeklappt:a.ui.schieneEingeklappt,expertenmodus:a.ui.expertenmodus}}),merge:(a,l)=>{const s=a;return{...l,ui:{...l.ui,...(s==null?void 0:s.ui)??{}}}}})),o3=()=>Yt(a=>a.ui.expertenmodus),f3=()=>Yt(a=>a.ui.schieneEingeklappt),d3=()=>Yt(a=>a.ui.paletteOffen),h3=()=>Yt(a=>a.strom.lage),m3=()=>Yt(a=>a.meldungen),Oy=(a,l)=>Yt.getState().melden(a,l),kf=a=>Yt.getState().stromLage(a),g3=()=>Yt.getState().stromEreignis();function W0(a){var l,s,r="";if(typeof a=="string"||typeof a=="number")r+=a;else if(typeof a=="object")if(Array.isArray(a)){var o=a.length;for(l=0;l{const l=b3(a),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=a;return{getClassGroupId:h=>{const d=h.split(zd);return d[0]===""&&d.length!==1&&d.shift(),P0(d,l)||v3(h)},getConflictingClassGroupIds:(h,d)=>{const p=s[h]||[];return d&&r[h]?[...p,...r[h]]:p}}},P0=(a,l)=>{var h;if(a.length===0)return l.classGroupId;const s=a[0],r=l.nextPart.get(s),o=r?P0(a.slice(1),r):void 0;if(o)return o;if(l.validators.length===0)return;const f=a.join(zd);return(h=l.validators.find(({validator:d})=>d(f)))==null?void 0:h.classGroupId},ky=/^\[(.+)\]$/,v3=a=>{if(ky.test(a)){const l=ky.exec(a)[1],s=l==null?void 0:l.substring(0,l.indexOf(":"));if(s)return"arbitrary.."+s}},b3=a=>{const{theme:l,prefix:s}=a,r={nextPart:new Map,validators:[]};return S3(Object.entries(a.classGroups),s).forEach(([f,h])=>{cd(h,r,f,l)}),r},cd=(a,l,s,r)=>{a.forEach(o=>{if(typeof o=="string"){const f=o===""?l:Uy(l,o);f.classGroupId=s;return}if(typeof o=="function"){if(x3(o)){cd(o(r),l,s,r);return}l.validators.push({validator:o,classGroupId:s});return}Object.entries(o).forEach(([f,h])=>{cd(h,Uy(l,f),s,r)})})},Uy=(a,l)=>{let s=a;return l.split(zd).forEach(r=>{s.nextPart.has(r)||s.nextPart.set(r,{nextPart:new Map,validators:[]}),s=s.nextPart.get(r)}),s},x3=a=>a.isThemeGetter,S3=(a,l)=>l?a.map(([s,r])=>{const o=r.map(f=>typeof f=="string"?l+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,d])=>[l+h,d])):f);return[s,o]}):a,_3=a=>{if(a<1)return{get:()=>{},set:()=>{}};let l=0,s=new Map,r=new Map;const o=(f,h)=>{s.set(f,h),l++,l>a&&(l=0,r=s,s=new Map)};return{get(f){let h=s.get(f);if(h!==void 0)return h;if((h=r.get(f))!==void 0)return o(f,h),h},set(f,h){s.has(f)?s.set(f,h):o(f,h)}}},I0="!",w3=a=>{const{separator:l,experimentalParseClassName:s}=a,r=l.length===1,o=l[0],f=l.length,h=d=>{const p=[];let g=0,b=0,y;for(let j=0;jb?y-b:void 0;return{modifiers:p,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:E}};return s?d=>s({className:d,parseClassName:h}):h},E3=a=>{if(a.length<=1)return a;const l=[];let s=[];return a.forEach(r=>{r[0]==="["?(l.push(...s.sort(),r),s=[]):s.push(r)}),l.push(...s.sort()),l},j3=a=>({cache:_3(a.cacheSize),parseClassName:w3(a),...y3(a)}),T3=/\s+/,M3=(a,l)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:o}=l,f=[],h=a.trim().split(T3);let d="";for(let p=h.length-1;p>=0;p-=1){const g=h[p],{modifiers:b,hasImportantModifier:y,baseClassName:_,maybePostfixModifierPosition:S}=s(g);let w=!!S,E=r(w?_.substring(0,S):_);if(!E){if(!w){d=g+(d.length>0?" "+d:d);continue}if(E=r(_),!E){d=g+(d.length>0?" "+d:d);continue}w=!1}const j=E3(b).join(":"),R=y?j+I0:j,z=R+E;if(f.includes(z))continue;f.push(z);const L=o(E,w);for(let D=0;D0?" "+d:d)}return d};function A3(){let a=0,l,s,r="";for(;a{if(typeof a=="string")return a;let l,s="";for(let r=0;ry(b),a());return s=j3(g),r=s.cache.get,o=s.cache.set,f=d,d(p)}function d(p){const g=r(p);if(g)return g;const b=M3(p,s);return o(p,b),b}return function(){return f(A3.apply(null,arguments))}}const Ke=a=>{const l=s=>s[a]||[];return l.isThemeGetter=!0,l},tv=/^\[(?:([a-z-]+):)?(.+)\]$/i,R3=/^\d+\/\d+$/,z3=new Set(["px","full","screen"]),N3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D3=/\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$/,O3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,k3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yn=a=>gi(a)||z3.has(a)||R3.test(a),Ea=a=>ki(a,"length",Y3),gi=a=>!!a&&!Number.isNaN(Number(a)),Uf=a=>ki(a,"number",gi),Hs=a=>!!a&&Number.isInteger(Number(a)),L3=a=>a.endsWith("%")&&gi(a.slice(0,-1)),ve=a=>tv.test(a),ja=a=>N3.test(a),B3=new Set(["length","size","percentage"]),H3=a=>ki(a,B3,nv),q3=a=>ki(a,"position",nv),G3=new Set(["image","url"]),Q3=a=>ki(a,G3,X3),V3=a=>ki(a,"",K3),qs=()=>!0,ki=(a,l,s)=>{const r=tv.exec(a);return r?r[1]?typeof l=="string"?r[1]===l:l.has(r[1]):s(r[2]):!1},Y3=a=>D3.test(a)&&!O3.test(a),nv=()=>!1,K3=a=>k3.test(a),X3=a=>U3.test(a),Z3=()=>{const a=Ke("colors"),l=Ke("spacing"),s=Ke("blur"),r=Ke("brightness"),o=Ke("borderColor"),f=Ke("borderRadius"),h=Ke("borderSpacing"),d=Ke("borderWidth"),p=Ke("contrast"),g=Ke("grayscale"),b=Ke("hueRotate"),y=Ke("invert"),_=Ke("gap"),S=Ke("gradientColorStops"),w=Ke("gradientColorStopPositions"),E=Ke("inset"),j=Ke("margin"),R=Ke("opacity"),z=Ke("padding"),L=Ke("saturate"),D=Ke("scale"),Z=Ke("sepia"),G=Ke("skew"),K=Ke("space"),J=Ke("translate"),Q=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto",ve,l],I=()=>[ve,l],fe=()=>["",Yn,Ea],F=()=>["auto",gi,ve],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>["start","end","center","between","around","evenly","stretch"],be=()=>["","0",ve],me=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[gi,ve];return{cacheSize:500,separator:":",theme:{colors:[qs],spacing:[Yn,Ea],blur:["none","",ja,ve],brightness:M(),borderColor:[a],borderRadius:["none","","full",ja,ve],borderSpacing:I(),borderWidth:fe(),contrast:M(),grayscale:be(),hueRotate:M(),invert:be(),gap:I(),gradientColorStops:[a],gradientColorStopPositions:[L3,Ea],inset:ee(),margin:ee(),opacity:M(),padding:I(),saturate:M(),scale:M(),sepia:be(),skew:M(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[ja]}],"break-after":[{"break-after":me()}],"break-before":[{"break-before":me()}],"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:[...ae(),ve]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Hs,ve]}],basis:[{basis:ee()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:be()}],shrink:[{shrink:be()}],order:[{order:["first","last","none",Hs,ve]}],"grid-cols":[{"grid-cols":[qs]}],"col-start-end":[{col:["auto",{span:["full",Hs,ve]},ve]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[qs]}],"row-start-end":[{row:["auto",{span:[Hs,ve]},ve]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[_]}],"gap-x":[{"gap-x":[_]}],"gap-y":[{"gap-y":[_]}],"justify-content":[{justify:["normal",...te()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...te(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...te(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],pe:[{pe:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[K]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[K]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,l]}],"min-w":[{"min-w":[ve,l,"min","max","fit"]}],"max-w":[{"max-w":[ve,l,"none","full","min","max","fit","prose",{screen:[ja]},ja]}],h:[{h:[ve,l,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,l,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,l,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,l,"auto","min","max","fit"]}],"font-size":[{text:["base",ja,Ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Uf]}],"font-family":[{font:[qs]}],"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",ve]}],"line-clamp":[{"line-clamp":["none",gi,Uf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yn,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[a]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[a]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yn,Ea]}],"underline-offset":[{"underline-offset":["auto",Yn,ve]}],"text-decoration-color":[{decoration:[a]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),q3]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",H3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Q3]}],"bg-color":[{bg:[a]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:B()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Yn,ve]}],"outline-w":[{outline:[Yn,Ea]}],"outline-color":[{outline:[a]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[a]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Yn,Ea]}],"ring-offset-color":[{"ring-offset":[a]}],shadow:[{shadow:["","inner","none",ja,V3]}],"shadow-color":[{shadow:[qs]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[r]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",ja,ve]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[y]}],saturate:[{saturate:[L]}],sepia:[{sepia:[Z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-x":[{"scale-x":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[Hs,ve]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[G]}],"skew-y":[{"skew-y":[G]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",a]}],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",ve]}],"caret-color":[{caret:[a]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",ve]}],fill:[{fill:[a,"none"]}],"stroke-w":[{stroke:[Yn,Ea,Uf]}],stroke:[{stroke:[a,"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"]}}},J3=C3(Z3);function qe(...a){return J3(p3(a))}function h5(a){return a?a.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function F3(){const a=o3(),l=Yt(s=>s.expertenmodus);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:()=>l(!1),"aria-pressed":!a,className:qe("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",a?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[v.jsx(P2,{className:"h-3.5 w-3.5"})," Einfach"]}),v.jsxs("button",{onClick:()=>l(!0),"aria-pressed":a,className:qe("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",a?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[v.jsx(W2,{className:"h-3.5 w-3.5"})," Experte"]})]})}let pi=[],yi=[];const od=new Set,av=()=>od.forEach(a=>a());function Nd(a){return od.add(a),()=>{od.delete(a)}}function lv(a){pi=[...pi,a].slice(-120),av()}function iv(a){yi=[...yi,a].slice(-120),av()}let sv=null;const rv=()=>$.useSyncExternalStore(Nd,()=>pi),uv=()=>$.useSyncExternalStore(Nd,()=>yi),cv=()=>$.useSyncExternalStore(Nd,()=>sv);let Gs=null;function $3(a){const l=Date.now();if(sv=a,lv({t:l,cpu:a.cpu??0,ram:a.ram??0,gpu:a.gpu,disk:a.disk}),Gs){const s=Math.max((l-Gs.t)/1e3,.001);iv({t:l,prompt:Math.max(0,(a.tok_p-Gs.p)/s),completion:Math.max(0,(a.tok_c-Gs.c)/s)})}Gs={p:a.tok_p,c:a.tok_c,t:l}}function W3(){const{data:a,dataUpdatedAt:l}=fr(),{data:s,dataUpdatedAt:r}=Od(),o=$.useRef(null);$.useEffect(()=>{var h,d,p,g;if(!a)return;const f=Date.now();pi.length&&f-pi[pi.length-1].t<1e3||lv({t:f,cpu:((h=a.cpu)==null?void 0:h.percent)??0,ram:((d=a.ram)==null?void 0:d.percent)??0,gpu:((p=a.gpu)==null?void 0:p.busy_percent)??null,disk:((g=a.disk)==null?void 0:g.percent)??null})},[l]),$.useEffect(()=>{if(!s)return;const f=Date.now(),h=s.prompt_tokens,d=s.completion_tokens;if(o.current){const p=Math.max((f-o.current.t)/1e3,.001);(!yi.length||f-yi[yi.length-1].t>=1e3)&&iv({t:f,prompt:Math.max(0,(h-o.current.p)/p),completion:Math.max(0,(d-o.current.c)/p)})}o.current={p:h,c:d,t:f}},[r])}let Ys=!1;const ov=()=>Ys;function P3(){const a=yd();$.useEffect(()=>{const l=new EventSource("/api/stream");let s=!1;return l.onopen=()=>{Ys=!0,kf("live"),s&&Oy("erfolg","Verbindung zur Zentrale ist wieder da."),s=!0,a.invalidateQueries()},l.onerror=()=>{Ys&&(Ys=!1,kf("nachlauf"),Oy("warnung","Verbindung zur Zentrale verloren — die Anzeigen laufen im Nachlauf."),a.invalidateQueries())},l.addEventListener("invalidate",r=>{var o;try{const f=((o=JSON.parse(r.data))==null?void 0:o.keys)??[];for(const h of f)a.invalidateQueries({queryKey:[h]});g3()}catch{}}),l.addEventListener("metrik",r=>{try{$3(JSON.parse(r.data))}catch{}}),()=>{Ys=!1,kf("getrennt"),l.close()}},[a])}class I3 extends Error{constructor(s,r,o){super(o||`${s} ${r}`);Ru(this,"status");Ru(this,"detail");this.name="ApiError",this.status=s,this.detail=o}}async function e_(a){try{const l=await a.text();if(!l)return null;try{const s=JSON.parse(l),r=(s==null?void 0:s.detail)??(s==null?void 0:s.err)??(s==null?void 0:s.message);return typeof r=="string"&&r.trim()?r.trim():Array.isArray(r)&&r.length&&r.map(o=>o==null?void 0:o.msg).filter(Boolean).join("; ")||null}catch{return l.slice(0,200).split(` `)[0].trim()||null}}catch{return null}}async function ke(a,l){const s=await fetch(a,{...l,headers:{"Content-Type":"application/json",...l==null?void 0:l.headers}});if(!s.ok)throw new I3(s.status,s.statusText,await e_(s));return s.json()}const m5=(a,l,s=!1,r=!0)=>ke("/api/groups",{method:"PUT",body:JSON.stringify({group:a,members:l,swap:s,persist:r})}),g5=a=>ke("/api/routing/policy",{method:"PUT",body:JSON.stringify(a)}),Ge={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],agentAktivitaet:["agent-aktivitaet"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:a=>["drafts",a??""],connect:a=>["connect",a??""],connectHealth:["connect-health"],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],ideen:["ideen"],chronik:["chronik"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},St={graph:3e3,schnell:8e3,normal:1e4,gemuetlich:3e4,traege:6e4},or=a=>()=>ov()?a*5:a,fv=a=>()=>ov()?6e4:a,t_=(a=St.gemuetlich)=>Xe({queryKey:Ge.ideen,queryFn:()=>ke("/api/ideen"),refetchInterval:or(a)}),p5=(a,l=!1)=>Xe({queryKey:["ideen-log",a],queryFn:()=>ke(`/api/ideen/${a}/log`),enabled:l,refetchInterval:4e3,staleTime:0}),y5=(a=150,l=St.gemuetlich)=>Xe({queryKey:[...Ge.chronik,a],queryFn:()=>ke(`/api/chronik?limit=${a}`),refetchInterval:or(l),select:s=>s.items??[]}),v5=()=>Xe({queryKey:Ge.wissen,queryFn:()=>ke("/api/wissen")}),b5=(a=St.traege,l=!0)=>Xe({queryKey:Ge.zeitmaschine,queryFn:()=>ke("/api/zeitmaschine"),refetchInterval:a,enabled:l}),n_=(a=12,l=St.schnell)=>Xe({queryKey:Ge.voiceTrace,queryFn:()=>ke(`/api/voice/trace?limit=${a}`),refetchInterval:l,select:s=>s.turns??[]}),x5=(a=!0)=>Xe({queryKey:Ge.memoryGraph,queryFn:()=>ke("/api/wissen/graph"),enabled:a,staleTime:60*1e3}),Dd=()=>Xe({queryKey:Ge.health,queryFn:()=>ke("/api/health"),refetchInterval:St.normal}),fr=(a=St.graph)=>Xe({queryKey:Ge.systemStatus,queryFn:()=>ke("/api/system/status"),refetchInterval:fv(a)}),dv=(a,l=!0)=>Xe({queryKey:["metrics-history",a],queryFn:()=>ke(`/api/system/history?minutes=${a}`),enabled:l,refetchInterval:6e4}),hv=(a=St.normal)=>Xe({queryKey:Ge.services,queryFn:()=>ke("/api/system/services"),refetchInterval:a}),mv=(a=St.schnell)=>Xe({queryKey:Ge.models,queryFn:()=>ke("/api/models"),refetchInterval:or(a)}),S5=(a=St.normal)=>Xe({queryKey:Ge.groups,queryFn:()=>ke("/api/groups"),refetchInterval:a}),a_=(a=St.normal)=>Xe({queryKey:Ge.routing,queryFn:()=>ke("/api/routing"),refetchInterval:a}),_5=()=>Xe({queryKey:Ge.routingPolicy,queryFn:()=>ke("/api/routing/policy")}),w5=(a=3e3,l=!0)=>Xe({queryKey:Ge.jobs,queryFn:()=>ke("/api/jobs"),refetchInterval:or(a),enabled:l,select:s=>s.jobs??[]}),Od=(a=St.graph)=>Xe({queryKey:Ge.tokenStats,queryFn:()=>ke("/api/system/token-stats"),refetchInterval:fv(a)}),l_=(a=St.normal)=>Xe({queryKey:Ge.agentStatus,queryFn:()=>ke("/api/agent/status"),refetchInterval:a}),E5=(a=St.gemuetlich)=>Xe({queryKey:Ge.agentAktivitaet,queryFn:()=>ke("/api/agent/aktivitaet?limit=80"),refetchInterval:or(a)}),j5=(a=St.traege)=>Xe({queryKey:Ge.hermesBrain,queryFn:()=>ke("/api/agent/brain"),refetchInterval:a}),i_=(a=St.traege)=>Xe({queryKey:Ge.updates,queryFn:()=>ke("/api/maintenance/updates"),refetchInterval:a}),T5=()=>Xe({queryKey:Ge.discover,queryFn:()=>ke("/api/discover")}),M5=a=>Xe({queryKey:Ge.drafts(a),queryFn:()=>ke(`/api/models/drafts?target=${encodeURIComponent(a??"")}`),enabled:!!a}),A5=a=>Xe({queryKey:Ge.connect(a),queryFn:()=>ke(a?`/api/connect?${a}`:"/api/connect")}),s_=()=>Xe({queryKey:Ge.connectHealth,queryFn:()=>ke("/api/connect/health"),refetchInterval:15e3});function C5(a,...l){for(const s of l)a.invalidateQueries({queryKey:s})}function xn(a){return(a/1024**3).toFixed(1)}function R5(a){return a?a>1024**3?`${(a/1024**3).toFixed(1)} GB`:`${(a/1024**2).toFixed(0)} MB`:""}function z5(a){if(!a)return"—";const l=a/1024**3;return l>=1?`${l.toFixed(1)} GB`:`${(a/1024**2).toFixed(0)} MB`}function N5(a){if(!a)return"";const l=Math.floor(a/60);return l>0?`${l} min`:`${a} s`}function D5(a){return a?`${Math.round(a/1024)}k`:"—"}function O5(a){return a?new Date(a*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function r_(a){if(a==null||a<0)return null;const l=Math.floor(a/86400),s=Math.floor(a%86400/3600),r=Math.floor(a%3600/60);return l>0?`${l} T ${s} Std`:s>0?`${s} Std ${r} min`:`${r} min`}function Ly({werte:a,farbe:l,breite:s=56,hoehe:r=14}){if(a.length<2)return v.jsx("div",{style:{width:s,height:r},"aria-hidden":"true"});const o=Math.max(...a,1),f=s/(a.length-1),h=a.map((d,p)=>`${p===0?"M":"L"}${(p*f).toFixed(1)},${(r-d/o*r).toFixed(1)}`).join(" ");return v.jsx("svg",{width:s,height:r,viewBox:`0 0 ${s} ${r}`,"aria-hidden":"true",className:"shrink-0",children:v.jsx("path",{d:h,fill:"none",stroke:l,strokeWidth:"1.25",strokeLinejoin:"round",strokeLinecap:"round"})})}function ci({children:a,titel:l,className:s}){return v.jsx("div",{title:l,className:qe("flex shrink-0 items-center gap-1.5 border-r border-border/30 px-3",s),children:a})}function u_(){var K,J,Q,P,ee,I,fe,F,ae,B;const{data:a,isError:l}=Dd(),{data:s}=fr(),{data:r}=a_(),{data:o}=Od(),f=rv(),h=uv(),d=h3(),p=!l&&!!(a!=null&&a.engine_reachable),g=p&&(a!=null&&a.brain?a.brain.ready:!0),b=((K=a==null?void 0:a.brain)==null?void 0:K.role)??((Q=(J=r==null?void 0:r.lanes)==null?void 0:J[0])==null?void 0:Q.name)??null,y=cv(),_=(y==null?void 0:y.cpu)??((P=s==null?void 0:s.cpu)==null?void 0:P.percent)??0,S=(y==null?void 0:y.gpu)??((ee=s==null?void 0:s.gpu)==null?void 0:ee.busy_percent)??null,w=(y==null?void 0:y.ram)??((I=s==null?void 0:s.ram)==null?void 0:I.percent)??0,E=(y==null?void 0:y.ram_used)??((fe=s==null?void 0:s.ram)==null?void 0:fe.used),j=(y==null?void 0:y.ram_total)??((F=s==null?void 0:s.ram)==null?void 0:F.total),R=Math.max((y==null?void 0:y.temp_cpu)??((ae=s==null?void 0:s.temp)==null?void 0:ae.cpu)??0,(y==null?void 0:y.temp_gpu)??((B=s==null?void 0:s.temp)==null?void 0:B.gpu)??0),z=h.length?h[h.length-1].completion:0,L=r_((y==null?void 0:y.uptime_s)??(s==null?void 0:s.uptime_s)),D=l?"getrennt":d==="live"?"live":"nachlauf",G={live:{punkt:"bg-emerald-500",text:"Live",titel:"Ereignisstrom steht — Änderungen erscheinen sofort."},nachlauf:{punkt:"bg-amber-500",text:"Nachlauf",titel:"Kein Ereignisstrom — die Zahlen stimmen, sie kommen im Takt statt sofort."},getrennt:{punkt:"bg-red-500",text:"Getrennt",titel:"Die Zentrale antwortet nicht — die Zahlen sind veraltet."}}[D];return v.jsxs("footer",{className:"flex h-11 shrink-0 items-stretch overflow-x-auto border-t border-border/40 bg-card/40 font-mono text-[11px] backdrop-blur-sm scrollbar-thin","aria-label":"Zustand der Box",children:[v.jsxs(ac,{to:"/agent",className:"flex shrink-0 items-center gap-2.5 border-r border-border/30 px-3 transition-colors hover:bg-accent/50",children:[v.jsxs("span",{className:"flex items-center gap-1.5",title:p?"Motor (Engine) läuft":"Motor (Engine) läuft nicht",children:[v.jsx("span",{className:qe("h-2 w-2 rounded-full",p?"bg-emerald-500":"bg-red-500"),"aria-hidden":"true"}),v.jsx("span",{className:p?"text-muted-foreground":"font-semibold text-red-400",children:"Motor"})]}),v.jsxs("span",{className:"flex items-center gap-1.5",title:g?"Lucys Hirn ist bereit":"Lucys Hirn ist nicht bereit",children:[v.jsx("span",{className:qe("h-2 w-2 rounded-full",g?"bg-emerald-500":"bg-amber-500"),"aria-hidden":"true"}),v.jsx("span",{className:g?"text-muted-foreground":"font-semibold text-amber-400",children:"Hirn"})]})]}),v.jsxs(ci,{titel:"Aktive Rolle und aktueller Ausgabe-Durchsatz",children:[v.jsx("span",{className:"font-semibold text-primary",children:b??"—"}),v.jsx("span",{className:"tabular-nums text-muted-foreground",children:z>0?`${z.toFixed(0)} t/s`:"leerlauf"}),v.jsx(Ly,{werte:h.map(W=>W.completion),farbe:"hsl(172 72% 50%)"})]}),v.jsxs(ci,{titel:E!=null&&j!=null?`Geteilter Speicher (Unified Memory): ${xn(E)} von ${xn(j)} GB belegt`:"Speicher",children:[v.jsx("span",{className:"text-muted-foreground",children:"Speicher"}),v.jsx("div",{className:"h-2 w-24 overflow-hidden rounded-sm border border-border/50 bg-background/60","aria-hidden":"true",children:v.jsx("div",{className:qe("h-full transition-[width] duration-500",w>90?"bg-red-500":w>75?"bg-amber-500":"bg-primary"),style:{width:`${Math.min(100,w)}%`}})}),v.jsx("span",{className:"tabular-nums text-foreground",children:E!=null&&j!=null?`${xn(E)}/${xn(j)} GB`:"—"})]}),v.jsxs(ci,{titel:"Auslastung von Prozessor und Grafikeinheit",children:[v.jsx("span",{className:"text-muted-foreground",children:"CPU"}),v.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(_)," %"]}),v.jsx(Ly,{werte:f.map(W=>W.cpu),farbe:"hsl(199 89% 58%)"}),S!=null&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"ml-1 text-muted-foreground",children:"GPU"}),v.jsxs("span",{className:"tabular-nums text-foreground",children:[Math.round(S)," %"]})]})]}),R>0&&v.jsxs(ci,{titel:"Höchste gemessene Temperatur (Prozessor oder Grafikeinheit)",children:[v.jsx("span",{className:"text-muted-foreground",children:"Temp"}),v.jsxs("span",{className:qe("tabular-nums",R>=85?"font-semibold text-amber-400":"text-foreground"),children:[Math.round(R)," °C"]})]}),L&&v.jsxs(ci,{titel:"Betriebszeit seit dem letzten Neustart der Box",children:[v.jsx("span",{className:"text-muted-foreground",children:"Läuft seit"}),v.jsx("span",{className:"tabular-nums text-foreground",children:L})]}),o&&v.jsx(ci,{titel:"Seit Beginn verarbeitete Token und die damit gesparten Cloud-Kosten",children:v.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[o.total_tokens.toLocaleString("de-DE")," Token · ",o.saved_eur.toFixed(0)," € gespart"]})}),v.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5 px-3",title:G.titel,children:[v.jsx("span",{className:qe("h-2 w-2 rounded-full",G.punkt,D==="live"&&"animate-pulse"),"aria-hidden":"true"}),v.jsx("span",{className:"text-muted-foreground",children:G.text})]})]})}const c_=6e3,o_={info:{rand:"border-sky-500/40",farbe:"text-sky-300",Icon:K2},erfolg:{rand:"border-emerald-500/40",farbe:"text-emerald-300",Icon:U2},warnung:{rand:"border-amber-500/40",farbe:"text-amber-300",Icon:Pu},fehler:{rand:"border-red-500/40",farbe:"text-red-300",Icon:L2}};function f_(){const a=m3(),l=Yt(s=>s.meldungWeg);return $.useEffect(()=>{const s=a.filter(r=>r.art!=="fehler").map(r=>window.setTimeout(()=>l(r.id),Math.max(1e3,c_-(Date.now()-r.seit))));return()=>s.forEach(window.clearTimeout)},[a,l]),v.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[70] flex w-full max-w-sm flex-col gap-2",role:"status","aria-live":"polite","aria-atomic":"false",children:a.map(s=>{const{rand:r,farbe:o,Icon:f}=o_[s.art];return v.jsxs("div",{className:qe("pointer-events-auto flex items-start gap-2.5 rounded-lg border bg-card/95 px-3.5 py-2.5 shadow-xl backdrop-blur",r),"aria-live":s.art==="fehler"?"assertive":"polite",children:[v.jsx(f,{className:qe("mt-0.5 h-4 w-4 shrink-0",o),"aria-hidden":"true"}),v.jsx("p",{className:"flex-1 text-xs leading-relaxed text-foreground",children:s.text}),v.jsx("button",{onClick:()=>l(s.id),"aria-label":"Meldung schließen",className:"shrink-0 cursor-pointer rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",children:v.jsx(Rd,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},s.id)})})}const d_=$.lazy(()=>nn(()=>import("./SystemDrawer-CpUj62ev.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(a=>({default:a.SystemDrawer}))),h_=$.lazy(()=>nn(()=>import("./CommandPalette-CUaikJDv.js"),__vite__mapDeps([10,11,8,1,3,2])).then(a=>({default:a.CommandPalette})));function m_(){return v.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:v.jsx(Md,{className:"h-5 w-5 animate-spin","aria-label":"Lädt …"})})}const g_=/Mac|iPhone|iPad/.test(navigator.platform);function p_(){W3(),P3();const a=cr(),l=zy({select:E=>E.location.pathname}),s=zy({select:E=>E.location.search.system}),r=f3(),o=Yt(E=>E.schieneUmschalten),f=d3(),h=Yt(E=>E.palette),[d,p]=$.useState(!1),[g,b]=$.useState(!1);$.useEffect(()=>{f&&b(!0)},[f]),$.useEffect(()=>{const E=j=>{(j.metaKey||j.ctrlKey)&&j.key.toLowerCase()==="k"&&(j.preventDefault(),h(!Yt.getState().ui.paletteOffen))};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[h]);const y=$.useCallback(E=>{a({to:".",search:j=>({...j,system:E}),replace:!0})},[a]),{data:_,isError:S}=Dd();$.useEffect(()=>{document.documentElement.classList.add("dark")},[]),$.useEffect(()=>{p(!1)},[l]);const w=$0(l);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.jsx(f_,{}),v.jsxs($.Suspense,{fallback:null,children:[g&&v.jsx(h_,{}),s&&v.jsx(d_,{open:!0,onClose:()=>y(void 0),defaultTab:s==="logs"?"logs":"maintenance"})]}),v.jsx("aside",{className:qe("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",r?"w-16":"w-60"),children:v.jsx(By,{collapsed:r,onToggleCollapse:o,pfad:l,health:_,backendDown:S})}),v.jsxs("div",{className:qe("md:hidden fixed inset-0 z-50 transition-opacity duration-200",d?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!d,children:[v.jsx("div",{className:"absolute inset-0 bg-black/60",onClick:()=>p(!1)}),v.jsx("aside",{className:qe("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",d?"translate-x-0":"-translate-x-full"),children:v.jsx(By,{collapsed:!1,onClose:()=>p(!1),pfad:l,health:_,backendDown:S})})]}),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:()=>p(!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(J2,{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:w==null?void 0:w.hint})]}),v.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[v.jsx(F3,{}),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:()=>h(!0),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(B2,{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:g_?"⌘K":"Strg+K"})]})]})]}),v.jsx("main",{className:"flex-1 overflow-y-auto scrollbar-thin",children:v.jsx("div",{className:"mx-auto w-full max-w-[1600px] p-4 md:p-6",children:v.jsx($.Suspense,{fallback:v.jsx(m_,{}),children:v.jsx(V0,{})})})}),v.jsx(u_,{})]})]})}function By({collapsed:a,onToggleCollapse:l,onClose:s,pfad:r,health:o,backendDown:f}){var p,g,b,y,_;const h=$0(r),{data:d}=fr();return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:qe("flex items-center py-4 border-b border-border/40 shrink-0",a?"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"}),!a&&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"})]})]}),l&&v.jsx("button",{onClick:l,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":a?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:a?"Maximieren":"Minimieren",children:a?v.jsx(Wu,{className:"h-4 w-4","aria-hidden":"true"}):v.jsx(k2,{className:"h-4 w-4","aria-hidden":"true"})}),s&&v.jsx("button",{onClick:s,className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":"Navigation schließen",children:v.jsx(Rd,{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 S=null;return tr.map(w=>{const E=w.group!==S;S=w.group;const j=(h==null?void 0:h.id)===w.id;return v.jsxs("div",{className:"space-y-1",children:[E&&(a?S!==tr[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:w.group})),v.jsxs(ac,{to:w.pfad,onClick:s,"aria-current":j?"page":void 0,className:qe("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",a?"justify-center p-2.5":"gap-3 px-3 py-2",j?a?"nav-active-collapsed":"nav-active":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:a?w.label:void 0,"aria-label":a?w.label:void 0,children:[v.jsx(w.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!a&&v.jsx("span",{className:"truncate",children:w.label})]})]},w.id)})})()}),v.jsx("div",{className:qe("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",a?"px-2 text-center":"px-5"),children:a?v.jsx("div",{className:"flex justify-center",children:v.jsx("span",{className:qe("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",f||!o?"bg-red-500":o.engine_reachable?o.brain&&!o.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500"),title:f?"Zentrale antwortet nicht — Anzeigen evtl. veraltet":o?o.engine_reachable?o.brain&&!o.brain.ready?`Hirn offline (${o.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):v.jsxs("div",{className:"space-y-2 text-left",children:[f?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"})]}):o?v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"flex items-center gap-2",children:[v.jsx("span",{className:qe("h-2 w-2 rounded-full animate-pulse",o.engine_reachable?"bg-emerald-500":"bg-amber-500")}),v.jsxs("span",{className:"truncate",children:["Engine ",o.engine_reachable?"online":"offline"]})]}),o.brain&&!o.brain.ready&&v.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${o.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",o.brain.model?` (${o.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"})]}),(d==null?void 0:d.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:d.versions.mc2?`${d.versions.mc2.branch}-${d.versions.mc2.hash}${d.versions.mc2.dirty?"*":""} (${d.versions.mc2.date})`:"nicht gefunden",children:[v.jsx("strong",{children:"MC2:"})," ",d.versions.mc2?`${d.versions.mc2.hash}${d.versions.mc2.dirty?"*":""}`:"—"]}),v.jsxs("div",{className:"truncate",title:((p=d.versions.engine)==null?void 0:p.type)==="git"?`${d.versions.engine.branch}-${d.versions.engine.hash}${d.versions.engine.dirty?"*":""} (${d.versions.engine.date})`:((g=d.versions.engine)==null?void 0:g.version_text)||"unbekannt",children:[v.jsx("strong",{children:"Engine:"})," ",((b=d.versions.engine)==null?void 0:b.type)==="git"?`${d.versions.engine.hash}${d.versions.engine.dirty?"*":""}`:((_=(y=d.versions.engine)==null?void 0:y.version_text)==null?void 0:_.split(" ").pop())||"—"]}),v.jsxs("div",{className:"truncate",title:d.versions.hermes_agent?`${d.versions.hermes_agent.branch}-${d.versions.hermes_agent.hash}${d.versions.hermes_agent.dirty?"*":""} (${d.versions.hermes_agent.date})`:"nicht gefunden",children:[v.jsx("strong",{children:"Hermes Agent:"})," ",d.versions.hermes_agent?`${d.versions.hermes_agent.hash}${d.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]})}function Ui({titel:a,text:l,fehler:s,onErneut:r}){const o=s instanceof Error?s.stack||s.message:s?String(s):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(Pu,{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:a})]}),v.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:l}),v.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[r&&v.jsxs("button",{onClick:r,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($2,{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"})]}),o&&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:o})]})]})})}function y_(){var J,Q,P,ee,I,fe;const{data:a,isError:l}=Dd(),{data:s,isError:r}=hv(),{data:o}=mv(),{data:f}=fr(),h=l||r,d=!!a&&!!s,p=F=>{var ae;return(ae=s==null?void 0:s.services.find(B=>B.unit===F))==null?void 0:ae.ok},g=F=>!!(s!=null&&s.services.some(ae=>ae.unit===F)),b=a==null?void 0:a.engine_reachable,y=(J=a==null?void 0:a.brain)==null?void 0:J.ready,_=((Q=a==null?void 0:a.brain)==null?void 0:Q.model)||((P=o==null?void 0:o.models.find(F=>F.role==="hermes"))==null?void 0:P.name)||"",S=[];h&&S.push({id:"mc2",label:"Steuerpult (MC2)",icon:F0,critical:!0,status:"down",detail:"Die Zentrale antwortet nicht — alle Anzeigen hier können veraltet sein. Läuft die Box? Deploy aktiv?"}),S.push((()=>{const F={id:"brain",label:"Lucys Hirn",icon:D2,critical:!0};return d?b===!1?{...F,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?{...F,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:_?{kind:"loadModel",model:_,label:"Hirn aufwecken"}:void 0}:{...F,status:"ok",detail:"Wach und ansprechbar."}:{...F,status:"loading",detail:"Wird geprüft …"}})()),S.push((()=>{const F={id:"vision",label:"Lucys Augen",icon:q2,critical:!1};if(!d||!o)return{...F,status:"loading",detail:"Wird geprüft …"};const ae=o.models.find(W=>W.role==="vision");return ae?(o.running??[]).includes(ae.name)?{...F,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...F,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:ae.name,label:"Augen wecken"}}:{...F,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),S.push((()=>{const F={id:"memory",label:"Lucys Gedächtnis",icon:N2,critical:!0},ae=p("hermes-gateway");return!d||ae===void 0?{...F,status:"loading",detail:"Wird geprüft …"}:ae?{...F,status:"ok",detail:"Hermes-Natives Gedächtnis aktiv (SQLite & Embeddings)."}:{...F,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gateway antwortet nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Gateway neu starten"}}})()),S.push((()=>{const F={id:"gateway",label:"Verbindung (Gateway)",icon:Ad,critical:!0},ae=a?a.gateway_reachable:p("mc2-gateway");if(!d||ae===void 0)return{...F,status:"loading",detail:"Wird geprüft …"};const B=g("mc2-gateway")?"mc2-gateway":"mission-control-2";return ae?{...F,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...F,status:"down",detail:"Der Modell-Gateway antwortet nicht — Lucy und die IDEs erreichen kein Modell.",repair:{kind:"restart",service:B,label:"Gateway neu starten"}}})()),S.push((()=>{const F={id:"steward",label:"Wächter (Steward)",icon:Cd,critical:!1};return d?g("mc2-steward")?p("mc2-steward")?{...F,status:"ok",detail:"Wacht über Warm-Set, Dienste und Gedächtnis."}:{...F,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"}}:{...F,status:"ok",detail:"Auf dieser Installation nicht eingerichtet."}:{...F,status:"loading",detail:"Wird geprüft …"}})()),S.push((()=>{const F={id:"agent",label:"Lucys Agent (Hermes)",icon:rd,critical:!0},ae=p("hermes-gateway");return!d||ae===void 0?{...F,status:"loading",detail:"Wird geprüft …"}:ae?{...F,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...F,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),S.push((()=>{const F={id:"voice",label:"Lucys Stimme",icon:F2,critical:!1},ae=p("voice-service");return!d||ae===void 0?{...F,status:"loading",detail:"Wird geprüft …"}:ae?{...F,status:"ok",detail:"Lucy kann hören und sprechen."}:{...F,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const w=((ee=f==null?void 0:f.ram)==null?void 0:ee.total)??0,E=((I=f==null?void 0:f.ram)==null?void 0:I.used)??0,j=((fe=f==null?void 0:f.ram)==null?void 0:fe.percent)??(w>0?Math.min(100,E/w*100):0),R=1024**3,z=w?j>=93?{status:"full",usedGb:E/R,totalGb:w/R,pct:j,text:"Speicher fast voll — Lucy könnte langsamer werden."}:j>=85?{status:"warn",usedGb:E/R,totalGb:w/R,pct:j,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:E/R,totalGb:w/R,pct:j,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},L=S.some(F=>F.status==="loading"),D=S.filter(F=>F.critical&&F.status==="down"),Z=S.filter(F=>F.status==="warn"||!F.critical&&F.status==="down"),G=z.status==="full";return{verdict:L&&!D.length?"loading":D.length?"problem":Z.length||G?"warn":"gut",checks:S,memory:z,problems:D,warns:Z,unreachable:h}}function v_({type:a,title:l,message:s,defaultValue:r,autoValue:o,autoLabel:f,onConfirm:h,onCancel:d}){const p=$.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":l,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:l}),v.jsx("button",{onClick:d||(()=>h()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:v.jsx(Rd,{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:s}),a==="prompt"&&v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{ref:p,type:"text",defaultValue:r,"aria-label":l,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:g=>{var b;g.key==="Enter"&&h((b=p.current)==null?void 0:b.value)}}),o!==void 0&&v.jsx("button",{type:"button",onClick:()=>{p.current&&(p.current.value=o)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:f||"Auto"})]}),v.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(a==="confirm"||a==="prompt")&&v.jsx("button",{onClick:d,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 b;const g=a==="prompt"?(b=p.current)==null?void 0:b.value:void 0;h(g)},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:a==="confirm"?"Ja, fortfahren":a==="prompt"?"Übernehmen":"OK"})]})]})})}function b_(){const[a,l]=$.useState(null),s=$.useCallback(()=>l(null),[]),r=$.useCallback((d,p,g)=>{l({type:"alert",title:d,message:p,onConfirm:()=>{l(null),g==null||g()}})},[]),o=$.useCallback((d,p,g,b)=>{l({type:"confirm",title:d,message:p,onConfirm:()=>{l(null),g()},onCancel:()=>{l(null),b==null||b()}})},[]),f=$.useCallback((d,p,g,b,y,_)=>{l({type:"prompt",title:d,message:p,defaultValue:g,autoValue:_==null?void 0:_.autoValue,autoLabel:_==null?void 0:_.autoLabel,onConfirm:S=>{l(null),b(S)},onCancel:()=>{l(null),y==null||y()}})},[]),h=a?v.jsx(v_,{...a}):null;return{showAlert:r,showConfirm:o,showPrompt:f,close:s,dialogElement:h}}const x_={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},S_={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 Qs({icon:a,title:l,value:s,unit:r,tone:o="muted",hint:f,onClick:h}){return v.jsxs("button",{onClick:h,className:qe("group relative flex flex-col items-start mc-card p-5 text-left cursor-pointer",S_[o]),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(a,{className:"h-5 w-5"})}),v.jsx("span",{className:qe("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",x_[o]),title:f})]}),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:s}),r&&v.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:r})]}),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:l}),v.jsx(Wu,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),f&&v.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:f})]})}function __(){const{data:a,error:l}=fr(),s=cv(),r=rv();return{sys:$.useMemo(()=>{var f,h;return!a||!s?a:{...a,cpu:{...a.cpu,percent:s.cpu??a.cpu.percent},ram:{...a.ram,percent:s.ram??a.ram.percent,used:s.ram_used??a.ram.used,total:s.ram_total??a.ram.total},gpu:a.gpu?{...a.gpu,busy_percent:s.gpu??a.gpu.busy_percent}:a.gpu,disk:a.disk?{...a.disk,percent:s.disk??a.disk.percent}:a.disk,temp:{cpu:s.temp_cpu??((f=a.temp)==null?void 0:f.cpu),gpu:s.temp_gpu??((h=a.temp)==null?void 0:h.gpu)},uptime_s:s.uptime_s??a.uptime_s}},[a,s]),hist:r,error:l}}const w_=$.lazy(()=>nn(()=>import("./LiveAreaChartImpl-CUepOhWM.js"),__vite__mapDeps([12,13,11])));function gv(a){return v.jsx($.Suspense,{fallback:v.jsx(E_,{height:a.height??176}),children:v.jsx(w_,{...a})})}function E_({height:a}){return v.jsx("div",{style:{height:a},className:"flex w-full items-end","aria-hidden":"true",children:v.jsx("div",{className:"h-px w-full bg-border/40"})})}const pv={"1h":60,"24h":1440},Hy={live:"Live","1h":"1 h","24h":"24 h"};function yv({value:a,onChange:l}){return v.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:Object.keys(Hy).map(s=>v.jsx("button",{onClick:()=>l(s),className:qe("rounded-md px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide transition-all cursor-pointer",a===s?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:Hy[s]},s))})}const j_=[{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 T_(){var b,y,_,S;const{sys:a,hist:l}=__(),[s,r]=$.useState("live"),o=dv(s==="live"?60:pv[s],s!=="live"),f=$.useMemo(()=>{var w;return s==="live"?l:(((w=o.data)==null?void 0:w.points)??[]).map(E=>({t:E.t*1e3,cpu:E.cpu,ram:E.ram,gpu:E.gpu,disk:E.disk}))},[s,l,o.data]),h=!!(a!=null&&a.gpu&&a.gpu.busy_percent!=null&&a.gpu.gtt_used!=null&&a.gpu.gtt_total!=null),d=j_.filter(w=>w.key!=="gpu"||h),p={cpu:(b=a==null?void 0:a.cpu)==null?void 0:b.percent,ram:(y=a==null?void 0:a.ram)==null?void 0:y.percent,gpu:h?a.gpu.busy_percent:null,disk:(_=a==null?void 0:a.disk)==null?void 0:_.percent},g={cpu:(S=a==null?void 0:a.cpu)!=null&&S.cores?`${a.cpu.cores} Cores`:"",ram:a?`${xn(a.ram.used)}/${xn(a.ram.total)} GB`:"",gpu:h?`${xn(a.gpu.gtt_used)}/${xn(a.gpu.gtt_total)} GB`:"",disk:a!=null&&a.disk?`${xn(a.disk.used)}/${xn(a.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(H2,{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"}),s==="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(yv,{value:s,onChange:r})})]}),a?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:d.map(w=>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:w.color}}),v.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:w.label}),v.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(p[w.key]??0),"%"]}),g[w.key]&&v.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:g[w.key]})]},w.key))}),s!=="live"&&f.length===0&&v.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:o.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}),(s==="live"||f.length>0)&&v.jsx(gv,{data:f,series:d,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…"})]}),(a==null?void 0:a.temp)&&(a.temp.cpu||a.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:[a.temp.cpu!=null&&v.jsxs("span",{children:["CPU Temp: ",a.temp.cpu," °C"]}),a.temp.gpu!=null&&v.jsxs("span",{children:["GPU Temp: ",a.temp.gpu," °C"]})]})]})}const Di=[{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"}],Zs=a=>a==null?"–":`${(a/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function M_(a){const l=Math.max(0,Date.now()/1e3-a);return l<60?`vor ${Math.round(l)} s`:l<3600?`vor ${Math.round(l/60)} min`:`vor ${Math.round(l/3600)} h`}function fd(a){return Di.reduce((l,s)=>l+(a[s.key]??0),0)}function A_(a){let l=null;for(const s of Di){const r=a[s.key];r!=null&&(l==null||r>l.ms)&&(l={label:s.label,color:s.color,ms:r})}return l}function C_({t:a,scale:l}){const s=Di.map(r=>`${r.label} ${Zs(a[r.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:M_(a.ts)}),v.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:s,children:[v.jsx("div",{className:"absolute inset-0 flex",children:Di.map(r=>{const o=a[r.key];return!o||o<=0?null:v.jsx("div",{style:{width:`${o/l*100}%`,background:r.color},className:"h-full first:rounded-l-sm"},r.key)})}),a.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:a.error?"–":Zs(fd(a))})]})}function R_(){const{data:a}=n_(12),l=a??[],s=Math.max(1,...l.map(f=>fd(f))),r=l[0],o=r?A_(r):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(G2,{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"]})]}),r?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 ${r.error?"text-rose-400":"text-foreground"}`,children:r.error?"Fehler":Zs(fd(r))}),v.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!r.error&&o&&v.jsxs(v.Fragment,{children:[" · Täter: ",v.jsx("span",{style:{color:o.color},className:"font-semibold",children:o.label})," ",Zs(o.ms)]})]})]}):v.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),r&&!r.error&&v.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:Di.filter(f=>r[f.key]!=null).map(f=>`${f.label} ${Zs(r[f.key])}`).join(" · ")})]}),v.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Di.map(f=>v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:f.color}}),v.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:f.label})]},f.key))})]}),l.length>0?v.jsx("div",{className:"space-y-1.5",children:l.map(f=>v.jsx(C_,{t:f,scale:s},f.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 qy=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function z_(){const{data:a}=Od(),l=uv(),[s,r]=$.useState("live"),o=dv(s==="live"?60:pv[s],s!=="live"),f=$.useMemo(()=>{var b;if(s==="live")return l;const p=((b=o.data)==null?void 0:b.points)??[],g=[];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((h==null?void 0:h[p.key])??0)})]},p.key))})]})]}),s!=="live"&&f.length===0?v.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:o.isLoading?"Verlauf wird geladen …":"Noch kein Verlauf — der Sammler baut die Historie gerade erst auf."}):a?v.jsx(gv,{data:f,series:qy,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."})]})}function kd(){const a=cr();return l=>a({to:".",search:s=>({...s,system:l})})}function N_({onNavigate:a}){var F,ae,B,W;const l=kd(),{data:s}=mv(),{data:r}=hv(),{data:o}=i_(),{data:f}=l_(),{data:h}=s_(),{data:d}=t_(),p=y_(),{showAlert:g,dialogElement:b}=b_(),y=yd(),[_,S]=$.useState({});async function w(te,be){S(me=>({...me,[te]:!0}));try{if(be.kind==="loadModel")await ke(`/api/models/${encodeURIComponent(be.model)}/load`,{method:"POST"});else{const me=await ke("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:be.service})});me.ok||g("Reparatur nicht ganz geklappt",(me.err||"Unbekannter Fehler")+(be.needsSudo?` Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}y.invalidateQueries({queryKey:Ge.health}),y.invalidateQueries({queryKey:Ge.services}),y.invalidateQueries({queryKey:Ge.models})}catch(me){g("Reparatur fehlgeschlagen",String((me==null?void 0:me.message)||me))}finally{S(me=>({...me,[te]:!1}))}}const E=((F=s==null?void 0:s.running)==null?void 0:F.length)??0,j=(r==null?void 0:r.services.filter(te=>te.ok).length)??0,R=(r==null?void 0:r.services.length)??0,z=R-j,L=(o?(o.os>0?1:0)+(o.engine>0?1:0)+(o.swap>0?1:0)+(o.models>0?1:0):0)+(((ae=o==null?void 0:o.components)==null?void 0:ae.filter(te=>te.update===!0).length)??0),D=d!=null&&d.available?d.items.filter(te=>te.status!=="done").length:0,Z=d!=null&&d.available?d.items.filter(te=>te.status==="blocked").length:0,G=h?[h.gateway,h.memory,h.desktop_gateway]:[],K=G.filter(te=>te==null?void 0:te.ok).length,J=h?h.gateway.ok?h.memory.ok?h.desktop_gateway.ok?"":"Desktop-Gateway":"Gedächtnis-Leitung":"Modell-Leitung":"",Q=(B=s==null?void 0:s.models)==null?void 0:B.find(te=>te.role==="hermes"),P=Q!=null&&Q.name?(W=Q.name.split("/").pop())==null?void 0:W.replace(/\.gguf$/i,""):"",ee=r==null?void 0:r.services.filter(te=>!te.ok).map(te=>te.name).join(", "),I=o?[o.os>0&&"OS",o.engine>0&&"Engine",o.swap>0&&"Swap",o.models>0&&"Modelle"].filter(Boolean):[],fe=I.length>0?I.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(D_,{verdict:p.verdict,memory:p.memory,warns:p.warns,problems:p.problems}),v.jsxs("section",{children:[v.jsx(Lf,{children:"Leistung"}),v.jsx("div",{className:"grid gap-4 md:grid-cols-1",children:v.jsx(T_,{})}),v.jsx("div",{className:"mt-4",children:v.jsx(R_,{})}),v.jsx("div",{className:"mt-4",children:v.jsx(z_,{})})]}),v.jsxs("section",{children:[v.jsx(Lf,{children:"Bereiche"}),v.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[v.jsx(Qs,{icon:J0,title:"Ideen",value:d!=null&&d.available?D:"—",unit:"offen",tone:d?Z>0?"warn":"ok":"loading",hint:Z>0?`${Z} Idee${Z===1?"":"n"} wartet auf deine Antwort`:D>0?`${D} in Arbeit oder wartend`:"Nichts offen",onClick:()=>a("ideen")}),v.jsx(Qs,{icon:X0,title:"Modelle",value:E,unit:"warm",tone:E>0?"ok":"muted",hint:P?`Hirn: ${P}`:"Kein Hermes-Modell geladen",onClick:()=>a("models")}),v.jsx(Qs,{icon:F0,title:"Dienste",value:r?`${j}/${R}`:"…",unit:"laufen",tone:r?z>0?"warn":"ok":"loading",hint:ee?`Ausfall: ${ee}`:"Alle Dienste online",onClick:()=>l("wartung")}),v.jsx(Qs,{icon:Cd,title:"Updates",value:o?L>0?L:"0":"…",unit:L>0?"bereit":"aktuell",tone:o?L>0?"warn":"ok":"loading",hint:L>0?`Verfügbar: ${fe}`:"Alles auf dem neuesten Stand",onClick:()=>l("wartung")}),v.jsx(Qs,{icon:Ad,title:"Verbinden",value:h?`${K}/${G.length}`:"…",unit:"Leitungen",tone:h?K===G.length?"ok":"warn":"loading",hint:J?`Gestört: ${J}`:"Hermes Desktop & IDEs bereit",onClick:()=>a("connect")})]})]})]}),v.jsxs("div",{className:"space-y-6",children:[v.jsx(O_,{problems:p.problems,pendingCount:L,blockedIdeen:Z,busy:_,onRepair:w,onNavigate:a}),v.jsxs("section",{children:[v.jsx(Lf,{children:"Werkzeuge & Diagnose"}),v.jsx(k_,{agent:f,svcErrors:z,onNavigate:a})]})]})]}),b]})}function Lf({children:a}){return v.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:a})}function D_({verdict:a,memory:l,warns:s,problems:r}){const o=s.length?`${s[0].label}: ${s[0].detail}${s.length>1?` (+${s.length-1} weitere)`:""}`:l.status==="full"?l.text:"Nichts Schlimmes — nur ein Hinweis.",f=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:"Ein wichtiger Dienst hakt.",h={loading:{ring:"border-border/60 bg-card/45",icon:Md,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:V2,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:Pu,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:o},problem:{ring:"border-red-500/50 bg-red-500/5",icon:Pu,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:f}}[a],d=h.icon,p={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[l.status],g={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[l.status];return v.jsxs("div",{className:qe("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",h.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(d,{className:qe("h-6 w-6",h.iconCls)})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:h.title}),v.jsx("p",{className:"text-xs text-muted-foreground",children:h.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(Q2,{className:"h-3.5 w-3.5"})," Speicher"]}),v.jsx("span",{className:qe("font-mono font-bold",p),children:l.status==="unknown"?"—":`${l.usedGb.toFixed(1)} / ${l.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:qe("h-full rounded-full transition-all duration-500",g),style:{width:`${l.pct}%`}})})]})]})}function O_({problems:a,pendingCount:l,blockedIdeen:s,busy:r,onRepair:o,onNavigate:f}){const h=kd(),d=l>0,p=s>0,g=a.length===0&&!d&&!p;return v.jsx("div",{className:"h-full flex flex-col justify-between",children:g?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(O2,{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:[a.map(b=>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(b.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:b.label}),v.jsx("p",{className:"truncate text-xs text-muted-foreground",children:b.detail})]})]}),b.repair&&v.jsxs("button",{onClick:()=>b.repair&&o(b.id,b.repair),disabled:!!r[b.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:[r[b.id]?v.jsx(Md,{className:"h-3.5 w-3.5 animate-spin"}):v.jsx(e3,{className:"h-3.5 w-3.5"}),b.repair.label]})]},b.id)),p&&v.jsxs("button",{onClick:()=>f("ideen"),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(Z0,{className:"h-4.5 w-4.5"})}),v.jsxs("div",{children:[v.jsxs("p",{className:"text-sm font-bold text-foreground",children:[s," Karte",s===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(Wu,{className:"h-4 w-4 shrink-0 text-red-300/70"})]}),d&&v.jsxs("button",{onClick:()=>h("wartung"),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(Cd,{className:"h-4.5 w-4.5"})}),v.jsxs("div",{children:[v.jsxs("p",{className:"text-sm font-bold text-foreground",children:[l," Update",l===1?"":"s"," bereit"]}),v.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),v.jsx(Wu,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function k_({agent:a,svcErrors:l,onNavigate:s}){const r=kd(),o=[{label:"Hermes Agent",status:a?a.gateway_reachable?"Bereit":"Offline":"…",tone:a?a.gateway_reachable?"ok":"alert":"loading",action:()=>s("agent")},{label:"Konsole (Box-Shell)",status:a?a.box_console_reachable?"Bereit":"Offline":"…",tone:a?a.box_console_reachable?"ok":"warn":"loading",action:()=>s("konsole")},{label:"Systemlogs & Diagnose",status:l>0?`${l} Fehler`:"Keine Fehler",tone:l>0?"alert":"ok",action:()=>r("logs")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>s("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>s("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:o.map((f,h)=>{const d={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"}[f.tone];return v.jsxs("button",{onClick:f.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:f.label}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:qe("text-[10px] font-semibold font-mono",f.tone==="ok"?"text-emerald-400":f.tone==="warn"?"text-amber-400":f.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:f.status}),v.jsx("span",{className:qe("h-1.5 w-1.5 rounded-full",d)})]})]},h)})})})}const U_=$.lazy(()=>nn(()=>import("./ModelsView-dw81nBmA.js"),__vite__mapDeps([14,15,16,17,3,9,18,19])).then(a=>({default:a.ModelsView}))),L_=$.lazy(()=>nn(()=>import("./ConnectView-CdvOrseN.js"),__vite__mapDeps([20,5,18])).then(a=>({default:a.ConnectView}))),B_=$.lazy(()=>nn(()=>import("./AgentView-Ddy3G6Cn.js"),__vite__mapDeps([21,22,6,7,4])).then(a=>({default:a.AgentView}))),H_=$.lazy(()=>nn(()=>import("./KonsoleView-CSxygCPx.js"),__vite__mapDeps([23,7,1])).then(a=>({default:a.KonsoleView}))),q_=$.lazy(()=>nn(()=>import("./GuideView-CxJU6Qxs.js"),__vite__mapDeps([24,17,19,4])).then(a=>({default:a.GuideView}))),G_=$.lazy(()=>nn(()=>import("./IdeenAnsicht-Cy8yw2ZX.js"),__vite__mapDeps([25,22,16,1,2,19,18,6])).then(a=>({default:a.IdeenView}))),Q_=$.lazy(()=>nn(()=>import("./SkillsView-DqlZxdwQ.js"),__vite__mapDeps([26,15])).then(a=>({default:a.SkillsView}))),V_=$.lazy(()=>nn(()=>import("./ChronikView-79MqWZGv.js"),__vite__mapDeps([27,3])).then(a=>({default:a.ChronikView}))),Y_=$.lazy(()=>nn(()=>import("./WissenView-BoYalgKN.js"),__vite__mapDeps([28,13,1,3,2])).then(a=>({default:a.WissenView}))),K_=a=>{const l=a.system;return l==="wartung"||l==="logs"?{system:l}:{}},_l=h2({component:p_,validateSearch:K_,notFoundComponent:()=>v.jsx(Ui,{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."})}),X_=Oi({getParentRoute:()=>_l,path:"/",beforeLoad:()=>{throw x0({to:"/cockpit"})}});function Li(a,l){return Oi({getParentRoute:()=>_l,path:a,component:l,errorComponent:({error:s,reset:r})=>v.jsx(Ui,{titel:"Diese Ansicht ist abgestürzt",text:"Der Rest von Mission Control läuft weiter. Erneut versuchen — oder in eine andere Ansicht wechseln.",fehler:s,onErneut:r})})}function Z_(){const a=cr();return v.jsx(N_,{onNavigate:l=>{const s=tr.find(r=>r.id===l);s&&a({to:s.pfad})}})}const J_=Li("/cockpit",()=>v.jsx(Z_,{})),F_=Li("/skills",()=>v.jsx(Q_,{})),$_=Oi({getParentRoute:()=>_l,path:"/chronik",validateSearch:a=>typeof a.q=="string"&&a.q?{q:a.q}:{},component:()=>v.jsx(V_,{}),errorComponent:({error:a,reset:l})=>v.jsx(Ui,{titel:"Die Chronik ist abgestürzt",text:"Der Rest läuft weiter.",fehler:a,onErneut:l})}),W_=Li("/verbinden",()=>v.jsx(L_,{})),P_=Li("/konsole",()=>v.jsx(H_,{})),I_=Li("/anleitung",()=>v.jsx(q_,{})),e5=Li("/agent",()=>v.jsx(B_,{})),t5=Oi({getParentRoute:()=>_l,path:"/ideen",validateSearch:a=>typeof a.offen=="string"&&a.offen?{offen:a.offen}:{},component:()=>v.jsx(G_,{}),errorComponent:({error:a,reset:l})=>v.jsx(Ui,{titel:"Die Ideen-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:a,onErneut:l})}),n5=Oi({getParentRoute:()=>_l,path:"/wissen",validateSearch:a=>({...typeof a.datei=="string"&&a.datei?{datei:a.datei}:{},...typeof a.suche=="string"&&a.suche?{suche:a.suche}:{}}),component:()=>v.jsx(Y_,{}),errorComponent:({error:a,reset:l})=>v.jsx(Ui,{titel:"Die Wissens-Ansicht ist abgestürzt",text:"Der Rest läuft weiter.",fehler:a,onErneut:l})}),a5=Oi({getParentRoute:()=>_l,path:"/modelle",validateSearch:a=>{const l=a.reiter;return l==="werkbank"||l==="routing"||l==="discover"?{reiter:l}:{}},component:()=>v.jsx(U_,{}),errorComponent:({error:a,reset:l})=>v.jsx(Ui,{titel:"Der Modell-Manager ist abgestürzt",text:"Der Rest läuft weiter.",fehler:a,onErneut:l})}),l5=_l.addChildren([X_,J_,t5,F_,$_,n5,W_,P_,I_,a5,e5]),i5=_2({routeTree:l5,scrollRestoration:!0,defaultPreload:!1});class s5 extends cn.Component{constructor(){super(...arguments);Ru(this,"state",{error:null})}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,r){console.error("Unbehandelter UI-Fehler:",s,r.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 r5=Object.fromEntries(tr.map(a=>[a.id,a.pfad]));function u5(){const a=window.location.hash.replace(/^#\/?/,"");if(!a)return;const l=r5[a];l&&window.history.replaceState(null,"",l+window.location.search)}const Bf="mc_neuladen_wegen_version";function c5(){window.addEventListener("vite:preloadError",a=>{sessionStorage.getItem(Bf)||(a.preventDefault(),sessionStorage.setItem(Bf,"1"),window.location.reload())}),window.addEventListener("load",()=>{window.setTimeout(()=>sessionStorage.removeItem(Bf),5e3)})}u5();c5();const o5=new _x({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});$1.createRoot(document.getElementById("root")).render(v.jsx(cn.StrictMode,{children:v.jsx(s5,{children:v.jsx(wx,{client:o5,children:v.jsx(j2,{router:i5})})})}));export{J0 as $,B0 as A,D2 as B,O2 as C,A5 as D,q2 as E,s_ as F,Wu as G,Q2 as H,K2 as I,U2 as J,L2 as K,Md as L,E5 as M,z2 as N,l_ as O,h5 as P,rd as Q,$2 as R,I2 as S,Pu as T,Oy as U,C5 as V,e3 as W,Rd as X,F0 as Y,X0 as Z,Ad as _,_5 as a,G2 as a0,P2 as a1,t_ as a2,p5 as a3,Z0 as a4,O5 as a5,ur as a6,qf as a7,Js as a8,bx as a9,pt as aa,Rt as ab,t0 as ac,Xe as ad,w5 as ae,N5 as af,y5 as ag,Y2 as ah,Cd as ai,V2 as aj,b5 as ak,cn as al,Wy as am,v5 as an,x5 as ao,Z2 as ap,hv as aq,d5 as ar,tr as as,d3 as at,Yt as au,p3 as av,e2 as aw,rr as ax,X1 as ay,qe as b,Me as c,g5 as d,N2 as e,mv as f,S5 as g,fr as h,j5 as i,v as j,b_ as k,z5 as l,M5 as m,ke as n,xn as o,o3 as p,Ge as q,$ as r,m5 as s,H2 as t,yd as u,D5 as v,T5 as w,i_ as x,R5 as y,cr as z};