@alexberardi/jarvis-admin 0.1.65 → 0.1.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/assets/index-CAv1RM9y.css +1 -0
- package/public/assets/index-DBEZIFbZ.js +18 -0
- package/public/index.html +2 -2
- package/server/dist/app.d.ts.map +1 -1
- package/server/dist/app.js +24 -0
- package/server/dist/app.js.map +1 -1
- package/server/dist/data/image-digests.json +58 -0
- package/server/dist/data/service-registry.json +11 -5
- package/server/dist/middleware/auth.d.ts +14 -0
- package/server/dist/middleware/auth.d.ts.map +1 -1
- package/server/dist/middleware/auth.js +19 -0
- package/server/dist/middleware/auth.js.map +1 -1
- package/server/dist/routes/install.d.ts.map +1 -1
- package/server/dist/routes/install.js +29 -8
- package/server/dist/routes/install.js.map +1 -1
- package/server/dist/routes/setup.d.ts.map +1 -1
- package/server/dist/routes/setup.js +2 -1
- package/server/dist/routes/setup.js.map +1 -1
- package/server/dist/services/generators/compose-generator.d.ts +11 -0
- package/server/dist/services/generators/compose-generator.d.ts.map +1 -1
- package/server/dist/services/generators/compose-generator.js +137 -29
- package/server/dist/services/generators/compose-generator.js.map +1 -1
- package/server/dist/services/generators/env-generator.d.ts.map +1 -1
- package/server/dist/services/generators/env-generator.js +17 -2
- package/server/dist/services/generators/env-generator.js.map +1 -1
- package/server/dist/services/generators/secret-generator.d.ts +1 -1
- package/server/dist/services/generators/secret-generator.d.ts.map +1 -1
- package/server/dist/services/generators/secret-generator.js +15 -0
- package/server/dist/services/generators/secret-generator.js.map +1 -1
- package/server/dist/services/upgrade/compose-upgrader.d.ts +36 -0
- package/server/dist/services/upgrade/compose-upgrader.d.ts.map +1 -1
- package/server/dist/services/upgrade/compose-upgrader.js +90 -33
- package/server/dist/services/upgrade/compose-upgrader.js.map +1 -1
- package/server/dist/services/upgrade/minisign.d.ts +53 -0
- package/server/dist/services/upgrade/minisign.d.ts.map +1 -0
- package/server/dist/services/upgrade/minisign.js +126 -0
- package/server/dist/services/upgrade/minisign.js.map +1 -0
- package/server/dist/services/upgrade/self-updater.d.ts.map +1 -1
- package/server/dist/services/upgrade/self-updater.js +61 -1
- package/server/dist/services/upgrade/self-updater.js.map +1 -1
- package/server/dist/types/wizard.d.ts +8 -0
- package/server/dist/types/wizard.d.ts.map +1 -1
- package/server/src/data/service-registry.json +11 -5
- package/public/assets/index-DeByHCh9.css +0 -1
- package/public/assets/index-DeCnqmbD.js +0 -18
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))i(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function o(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function i(d){if(d.ep)return;d.ep=!0;const f=o(d);fetch(d.href,f)}})();function Kx(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ku={exports:{}},il={};var Bp;function Db(){if(Bp)return il;Bp=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(i,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var v in d)v!=="key"&&(f[v]=d[v])}else f=d;return d=f.ref,{$$typeof:a,type:i,key:m,ref:d!==void 0?d:null,props:f}}return il.Fragment=s,il.jsx=o,il.jsxs=o,il}var qp;function Lb(){return qp||(qp=1,ku.exports=Db()),ku.exports}var l=Lb(),Ou={exports:{}},Ce={};var Hp;function Ub(){if(Hp)return Ce;Hp=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),N=Symbol.iterator;function R(_){return _===null||typeof _!="object"?null:(_=N&&_[N]||_["@@iterator"],typeof _=="function"?_:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function k(_,X,K){this.props=_,this.context=X,this.refs=C,this.updater=K||j}k.prototype.isReactComponent={},k.prototype.setState=function(_,X){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,X,"setState")},k.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function A(){}A.prototype=k.prototype;function F(_,X,K){this.props=_,this.context=X,this.refs=C,this.updater=K||j}var H=F.prototype=new A;H.constructor=F,E(H,k.prototype),H.isPureReactComponent=!0;var ne=Array.isArray;function W(){}var z={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function ae(_,X,K){var I=K.ref;return{$$typeof:a,type:_,key:X,ref:I!==void 0?I:null,props:K}}function je(_,X){return ae(_.type,X,_.props)}function le(_){return typeof _=="object"&&_!==null&&_.$$typeof===a}function he(_){var X={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(K){return X[K]})}var Me=/\/+/g;function Te(_,X){return typeof _=="object"&&_!==null&&_.key!=null?he(""+_.key):X.toString(36)}function te(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(W,W):(_.status="pending",_.then(function(X){_.status==="pending"&&(_.status="fulfilled",_.value=X)},function(X){_.status==="pending"&&(_.status="rejected",_.reason=X)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function w(_,X,K,I,se){var me=typeof _;(me==="undefined"||me==="boolean")&&(_=null);var ue=!1;if(_===null)ue=!0;else switch(me){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(_.$$typeof){case a:case s:ue=!0;break;case y:return ue=_._init,w(ue(_._payload),X,K,I,se)}}if(ue)return se=se(_),ue=I===""?"."+Te(_,0):I,ne(se)?(K="",ue!=null&&(K=ue.replace(Me,"$&/")+"/"),w(se,X,K,"",function(D){return D})):se!=null&&(le(se)&&(se=je(se,K+(se.key==null||_&&_.key===se.key?"":(""+se.key).replace(Me,"$&/")+"/")+ue)),X.push(se)),1;ue=0;var we=I===""?".":I+":";if(ne(_))for(var G=0;G<_.length;G++)I=_[G],me=we+Te(I,G),ue+=w(I,X,K,me,se);else if(G=R(_),typeof G=="function")for(_=G.call(_),G=0;!(I=_.next()).done;)I=I.value,me=we+Te(I,G++),ue+=w(I,X,K,me,se);else if(me==="object"){if(typeof _.then=="function")return w(te(_),X,K,I,se);throw X=String(_),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ue}function Y(_,X,K){if(_==null)return _;var I=[],se=0;return w(_,I,"","",function(me){return X.call(K,me,se++)}),I}function Z(_){if(_._status===-1){var X=_._result;X=X(),X.then(function(K){(_._status===0||_._status===-1)&&(_._status=1,_._result=K)},function(K){(_._status===0||_._status===-1)&&(_._status=2,_._result=K)}),_._status===-1&&(_._status=0,_._result=X)}if(_._status===1)return _._result.default;throw _._result}var xe=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ve={map:Y,forEach:function(_,X,K){Y(_,function(){X.apply(this,arguments)},K)},count:function(_){var X=0;return Y(_,function(){X++}),X},toArray:function(_){return Y(_,function(X){return X})||[]},only:function(_){if(!le(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Ce.Activity=x,Ce.Children=ve,Ce.Component=k,Ce.Fragment=o,Ce.Profiler=d,Ce.PureComponent=F,Ce.StrictMode=i,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(_){return z.H.useMemoCache(_)}},Ce.cache=function(_){return function(){return _.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(_,X,K){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var I=E({},_.props),se=_.key;if(X!=null)for(me in X.key!==void 0&&(se=""+X.key),X)!q.call(X,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&X.ref===void 0||(I[me]=X[me]);var me=arguments.length-2;if(me===1)I.children=K;else if(1<me){for(var ue=Array(me),we=0;we<me;we++)ue[we]=arguments[we+2];I.children=ue}return ae(_.type,se,I)},Ce.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},Ce.createElement=function(_,X,K){var I,se={},me=null;if(X!=null)for(I in X.key!==void 0&&(me=""+X.key),X)q.call(X,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(se[I]=X[I]);var ue=arguments.length-2;if(ue===1)se.children=K;else if(1<ue){for(var we=Array(ue),G=0;G<ue;G++)we[G]=arguments[G+2];se.children=we}if(_&&_.defaultProps)for(I in ue=_.defaultProps,ue)se[I]===void 0&&(se[I]=ue[I]);return ae(_,me,se)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(_){return{$$typeof:v,render:_}},Ce.isValidElement=le,Ce.lazy=function(_){return{$$typeof:y,_payload:{_status:-1,_result:_},_init:Z}},Ce.memo=function(_,X){return{$$typeof:p,type:_,compare:X===void 0?null:X}},Ce.startTransition=function(_){var X=z.T,K={};z.T=K;try{var I=_(),se=z.S;se!==null&&se(K,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(W,xe)}catch(me){xe(me)}finally{X!==null&&K.types!==null&&(X.types=K.types),z.T=X}},Ce.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Ce.use=function(_){return z.H.use(_)},Ce.useActionState=function(_,X,K){return z.H.useActionState(_,X,K)},Ce.useCallback=function(_,X){return z.H.useCallback(_,X)},Ce.useContext=function(_){return z.H.useContext(_)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(_,X){return z.H.useDeferredValue(_,X)},Ce.useEffect=function(_,X){return z.H.useEffect(_,X)},Ce.useEffectEvent=function(_){return z.H.useEffectEvent(_)},Ce.useId=function(){return z.H.useId()},Ce.useImperativeHandle=function(_,X,K){return z.H.useImperativeHandle(_,X,K)},Ce.useInsertionEffect=function(_,X){return z.H.useInsertionEffect(_,X)},Ce.useLayoutEffect=function(_,X){return z.H.useLayoutEffect(_,X)},Ce.useMemo=function(_,X){return z.H.useMemo(_,X)},Ce.useOptimistic=function(_,X){return z.H.useOptimistic(_,X)},Ce.useReducer=function(_,X,K){return z.H.useReducer(_,X,K)},Ce.useRef=function(_){return z.H.useRef(_)},Ce.useState=function(_){return z.H.useState(_)},Ce.useSyncExternalStore=function(_,X,K){return z.H.useSyncExternalStore(_,X,K)},Ce.useTransition=function(){return z.H.useTransition()},Ce.version="19.2.4",Ce}var Gp;function vd(){return Gp||(Gp=1,Ou.exports=Ub()),Ou.exports}var S=vd();const re=Kx(S);var zu={exports:{}},cl={},Du={exports:{}},Lu={};var Qp;function Bb(){return Qp||(Qp=1,(function(a){function s(w,Y){var Z=w.length;w.push(Y);e:for(;0<Z;){var xe=Z-1>>>1,ve=w[xe];if(0<d(ve,Y))w[xe]=Y,w[Z]=ve,Z=xe;else break e}}function o(w){return w.length===0?null:w[0]}function i(w){if(w.length===0)return null;var Y=w[0],Z=w.pop();if(Z!==Y){w[0]=Z;e:for(var xe=0,ve=w.length,_=ve>>>1;xe<_;){var X=2*(xe+1)-1,K=w[X],I=X+1,se=w[I];if(0>d(K,Z))I<ve&&0>d(se,K)?(w[xe]=se,w[I]=Z,xe=I):(w[xe]=K,w[X]=Z,xe=X);else if(I<ve&&0>d(se,Z))w[xe]=se,w[I]=Z,xe=I;else break e}}return Y}function d(w,Y){var Z=w.sortIndex-Y.sortIndex;return Z!==0?Z:w.id-Y.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 m=Date,v=m.now();a.unstable_now=function(){return m.now()-v}}var g=[],p=[],y=1,x=null,N=3,R=!1,j=!1,E=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;function H(w){for(var Y=o(p);Y!==null;){if(Y.callback===null)i(p);else if(Y.startTime<=w)i(p),Y.sortIndex=Y.expirationTime,s(g,Y);else break;Y=o(p)}}function ne(w){if(E=!1,H(w),!j)if(o(g)!==null)j=!0,W||(W=!0,he());else{var Y=o(p);Y!==null&&te(ne,Y.startTime-w)}}var W=!1,z=-1,q=5,ae=-1;function je(){return C?!0:!(a.unstable_now()-ae<q)}function le(){if(C=!1,W){var w=a.unstable_now();ae=w;var Y=!0;try{e:{j=!1,E&&(E=!1,A(z),z=-1),R=!0;var Z=N;try{t:{for(H(w),x=o(g);x!==null&&!(x.expirationTime>w&&je());){var xe=x.callback;if(typeof xe=="function"){x.callback=null,N=x.priorityLevel;var ve=xe(x.expirationTime<=w);if(w=a.unstable_now(),typeof ve=="function"){x.callback=ve,H(w),Y=!0;break t}x===o(g)&&i(g),H(w)}else i(g);x=o(g)}if(x!==null)Y=!0;else{var _=o(p);_!==null&&te(ne,_.startTime-w),Y=!1}}break e}finally{x=null,N=Z,R=!1}Y=void 0}}finally{Y?he():W=!1}}}var he;if(typeof F=="function")he=function(){F(le)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,Te=Me.port2;Me.port1.onmessage=le,he=function(){Te.postMessage(null)}}else he=function(){k(le,0)};function te(w,Y){z=k(function(){w(a.unstable_now())},Y)}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(w){w.callback=null},a.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<w?Math.floor(1e3/w):5},a.unstable_getCurrentPriorityLevel=function(){return N},a.unstable_next=function(w){switch(N){case 1:case 2:case 3:var Y=3;break;default:Y=N}var Z=N;N=Y;try{return w()}finally{N=Z}},a.unstable_requestPaint=function(){C=!0},a.unstable_runWithPriority=function(w,Y){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var Z=N;N=w;try{return Y()}finally{N=Z}},a.unstable_scheduleCallback=function(w,Y,Z){var xe=a.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?xe+Z:xe):Z=xe,w){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=Z+ve,w={id:y++,callback:Y,priorityLevel:w,startTime:Z,expirationTime:ve,sortIndex:-1},Z>xe?(w.sortIndex=Z,s(p,w),o(g)===null&&w===o(p)&&(E?(A(z),z=-1):E=!0,te(ne,Z-xe))):(w.sortIndex=ve,s(g,w),j||R||(j=!0,W||(W=!0,he()))),w},a.unstable_shouldYield=je,a.unstable_wrapCallback=function(w){var Y=N;return function(){var Z=N;N=Y;try{return w.apply(this,arguments)}finally{N=Z}}}})(Lu)),Lu}var Vp;function qb(){return Vp||(Vp=1,Du.exports=Bb()),Du.exports}var Uu={exports:{}},_t={};var Fp;function Hb(){if(Fp)return _t;Fp=1;var a=vd();function s(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(s(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(g,p,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:x==null?null:""+x,children:g,containerInfo:p,implementation:y}}var m=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_t.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(s(299));return f(g,p,null,y)},_t.flushSync=function(g){var p=m.T,y=i.p;try{if(m.T=null,i.p=2,g)return g()}finally{m.T=p,i.p=y,i.d.f()}},_t.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(g,p))},_t.prefetchDNS=function(g){typeof g=="string"&&i.d.D(g)},_t.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,x=v(y,p.crossOrigin),N=typeof p.integrity=="string"?p.integrity:void 0,R=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?i.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:N,fetchPriority:R}):y==="script"&&i.d.X(g,{crossOrigin:x,integrity:N,fetchPriority:R,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},_t.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=v(p.as,p.crossOrigin);i.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(g)},_t.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,x=v(y,p.crossOrigin);i.d.L(g,y,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},_t.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=v(p.as,p.crossOrigin);i.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(g)},_t.requestFormReset=function(g){i.d.r(g)},_t.unstable_batchedUpdates=function(g,p){return g(p)},_t.useFormState=function(g,p,y){return m.H.useFormState(g,p,y)},_t.useFormStatus=function(){return m.H.useHostTransitionStatus()},_t.version="19.2.4",_t}var Yp;function Zx(){if(Yp)return Uu.exports;Yp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),Uu.exports=Hb(),Uu.exports}var Xp;function Gb(){if(Xp)return cl;Xp=1;var a=qb(),s=vd(),o=Zx();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var c=n.return;if(c===null)break;var u=c.alternate;if(u===null){if(r=c.return,r!==null){n=r;continue}break}if(c.child===u.child){for(u=c.child;u;){if(u===n)return g(c),e;if(u===r)return g(c),t;u=u.sibling}throw Error(i(188))}if(n.return!==r.return)n=c,r=u;else{for(var h=!1,b=c.child;b;){if(b===n){h=!0,n=c,r=u;break}if(b===r){h=!0,r=c,n=u;break}b=b.sibling}if(!h){for(b=u.child;b;){if(b===n){h=!0,n=u,r=c;break}if(b===r){h=!0,r=u,n=c;break}b=b.sibling}if(!h)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,N=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),F=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Symbol.for("react.client.reference");function Te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case k:return"Profiler";case C:return"StrictMode";case ne:return"Suspense";case W:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case F:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return t=e.displayName||null,t!==null?t:Te(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return Te(e(t))}catch{}}return null}var te=Array.isArray,w=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},xe=[],ve=-1;function _(e){return{current:e}}function X(e){0>ve||(e.current=xe[ve],xe[ve]=null,ve--)}function K(e,t){ve++,xe[ve]=e.current,e.current=t}var I=_(null),se=_(null),me=_(null),ue=_(null);function we(e,t){switch(K(me,t),K(se,e),K(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?op(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=op(t),e=ip(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(I),K(I,e)}function G(){X(I),X(se),X(me)}function D(e){e.memoizedState!==null&&K(ue,e);var t=I.current,n=ip(t,e.type);t!==n&&(K(se,e),K(I,n))}function Se(e){se.current===e&&(X(I),X(se)),ue.current===e&&(X(ue),rl._currentValue=Z)}var fe,Dt;function it(e){if(fe===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Dt=-1<n.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+fe+e+Dt}var zn=!1;function fr(e,t){if(!e||zn)return"";zn=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(Q){var B=Q}Reflect.construct(e,[],P)}else{try{P.call()}catch(Q){B=Q}e.call(P.prototype)}}else{try{throw Error()}catch(Q){B=Q}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(Q){if(Q&&B&&typeof Q.stack=="string")return[Q.stack,B.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=r.DetermineComponentFrameRoot(),h=u[0],b=u[1];if(h&&b){var T=h.split(`
|
|
4
|
-
`),U=b.split(`
|
|
5
|
-
`);for(c=r=0;r<T.length&&!T[r].includes("DetermineComponentFrameRoot");)r++;for(;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;if(r===T.length||c===U.length)for(r=T.length-1,c=U.length-1;1<=r&&0<=c&&T[r]!==U[c];)c--;for(;1<=r&&0<=c;r--,c--)if(T[r]!==U[c]){if(r!==1||c!==1)do if(r--,c--,0>c||T[r]!==U[c]){var $=`
|
|
6
|
-
`+T[r].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=r&&0<=c);break}}}finally{zn=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?it(n):""}function Dn(e,t){switch(e.tag){case 26:case 27:case 5:return it(e.type);case 16:return it("Lazy");case 13:return e.child!==t&&t!==null?it("Suspense Fallback"):it("Suspense");case 19:return it("SuspenseList");case 0:case 15:return fr(e.type,!1);case 11:return fr(e.type.render,!1);case 1:return fr(e.type,!0);case 31:return it("Activity");default:return""}}function hs(e){try{var t="",n=null;do t+=Dn(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
7
|
-
Error generating stack: `+r.message+`
|
|
8
|
-
`+r.stack}}var $t=Object.prototype.hasOwnProperty,ps=a.unstable_scheduleCallback,xs=a.unstable_cancelCallback,Mt=a.unstable_shouldYield,an=a.unstable_requestPaint,At=a.unstable_now,bi=a.unstable_getCurrentPriorityLevel,Ln=a.unstable_ImmediatePriority,Cl=a.unstable_UserBlockingPriority,Un=a.unstable_NormalPriority,vs=a.unstable_LowPriority,za=a.unstable_IdlePriority,Tl=a.log,nn=a.unstable_setDisableYieldValue,Bn=null,kt=null;function ga(e){if(typeof Tl=="function"&&nn(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(Bn,e)}catch{}}var Ct=Math.clz32?Math.clz32:Ca,Si=Math.log,gs=Math.LN2;function Ca(e){return e>>>=0,e===0?32:31-(Si(e)/gs|0)|0}var mr=256,hr=262144,qn=4194304;function Ta(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 Ee(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var c=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=r&134217727;return b!==0?(r=b&~u,r!==0?c=Ta(r):(h&=b,h!==0?c=Ta(h):n||(n=b&~e,n!==0&&(c=Ta(n))))):(b=r&~u,b!==0?c=Ta(b):h!==0?c=Ta(h):n||(n=r&~e,n!==0&&(c=Ta(n)))),c===0?0:t!==0&&t!==c&&(t&u)===0&&(u=c&-c,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:c}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pt(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 Tt(){var e=qn;return qn<<=1,(qn&62914560)===0&&(qn=4194304),e}function rn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ie(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Lt(e,t,n,r,c,u){var h=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 b=e.entanglements,T=e.expirationTimes,U=e.hiddenUpdates;for(n=h&~n;0<n;){var $=31-Ct(n),P=1<<$;b[$]=0,T[$]=-1;var B=U[$];if(B!==null)for(U[$]=null,$=0;$<B.length;$++){var Q=B[$];Q!==null&&(Q.lane&=-536870913)}n&=~P}r!==0&&Hn(e,r,0),u!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function Hn(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ct(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ut(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ct(n),c=1<<r;c&t|e[r]&t&&(e[r]|=t),n&=~c}}function Bt(e,t){var n=t&-t;return n=(n&42)!==0?1:pr(n),(n&(e.suspendedLanes|t))!==0?0:n}function pr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ya(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ni(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Ap(e.type))}function Xd(e,t){var n=Y.p;try{return Y.p=e,t()}finally{Y.p=n}}var sn=Math.random().toString(36).slice(2),St="__reactFiber$"+sn,qt="__reactProps$"+sn,xr="__reactContainer$"+sn,ji="__reactEvents$"+sn,wg="__reactListeners$"+sn,Eg="__reactHandles$"+sn,Kd="__reactResources$"+sn,ys="__reactMarker$"+sn;function wi(e){delete e[St],delete e[qt],delete e[ji],delete e[wg],delete e[Eg]}function vr(e){var t=e[St];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xr]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pp(e);e!==null;){if(n=e[St])return n;e=pp(e)}return t}e=n,n=e.parentNode}return null}function gr(e){if(e=e[St]||e[xr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yr(e){var t=e[Kd];return t||(t=e[Kd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xt(e){e[ys]=!0}var Zd=new Set,$d={};function Gn(e,t){br(e,t),br(e+"Capture",t)}function br(e,t){for($d[e]=t,e=0;e<t.length;e++)Zd.add(t[e])}var Cg=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jd={},Pd={};function Tg(e){return $t.call(Pd,e)?!0:$t.call(Jd,e)?!1:Cg.test(e)?Pd[e]=!0:(Jd[e]=!0,!1)}function _l(e,t,n){if(Tg(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Rl(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Da(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function la(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Id(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _g(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,u=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(h){n=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(h){n=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ei(e){if(!e._valueTracker){var t=Id(e)?"checked":"value";e._valueTracker=_g(e,t,""+e[t])}}function Wd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Id(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ml(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Rg=/[\n"\\]/g;function oa(e){return e.replace(Rg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ci(e,t,n,r,c,u,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+la(t)):e.value!==""+la(t)&&(e.value=""+la(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Ti(e,h,la(t)):n!=null?Ti(e,h,la(n)):r!=null&&e.removeAttribute("value"),c==null&&u!=null&&(e.defaultChecked=!!u),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+la(b):e.removeAttribute("name")}function ef(e,t,n,r,c,u,h,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Ei(e);return}n=n!=null?""+la(n):"",t=t!=null?""+la(t):n,b||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=b?e.checked:!!r,e.defaultChecked=!!r,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Ei(e)}function Ti(e,t,n){t==="number"&&Ml(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Sr(e,t,n,r){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&r&&(e[n].defaultSelected=!0)}else{for(n=""+la(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function tf(e,t,n){if(t!=null&&(t=""+la(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+la(n):""}function af(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=la(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Ei(e)}function Nr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mg=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function nf(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||Mg.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function rf(e,t,n){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&n[c]!==r&&nf(e,c,r)}else for(var u in t)t.hasOwnProperty(u)&&nf(e,u,t[u])}function _i(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ag=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),kg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Al(e){return kg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function La(){}var Ri=null;function Mi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jr=null,wr=null;function sf(e){var t=gr(e);if(t&&(e=t.stateNode)){var n=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ci(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+oa(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var c=r[qt]||null;if(!c)throw Error(i(90));Ci(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Wd(r)}break e;case"textarea":tf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Sr(e,!!n.multiple,t,!1)}}}var Ai=!1;function lf(e,t,n){if(Ai)return e(t,n);Ai=!0;try{var r=e(t);return r}finally{if(Ai=!1,(jr!==null||wr!==null)&&(yo(),jr&&(t=jr,e=wr,wr=jr=null,sf(t),e)))for(t=0;t<e.length;t++)sf(e[t])}}function Ss(e,t){var n=e.stateNode;if(n===null)return null;var r=n[qt]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(i(231,t,typeof n));return n}var Ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ki=!1;if(Ua)try{var Ns={};Object.defineProperty(Ns,"passive",{get:function(){ki=!0}}),window.addEventListener("test",Ns,Ns),window.removeEventListener("test",Ns,Ns)}catch{ki=!1}var ln=null,Oi=null,kl=null;function of(){if(kl)return kl;var e,t=Oi,n=t.length,r,c="value"in ln?ln.value:ln.textContent,u=c.length;for(e=0;e<n&&t[e]===c[e];e++);var h=n-e;for(r=1;r<=h&&t[n-r]===c[u-r];r++);return kl=c.slice(e,1<r?1-r:void 0)}function Ol(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zl(){return!0}function cf(){return!1}function Ht(e){function t(n,r,c,u,h){this._reactName=n,this._targetInst=c,this.type=r,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(n=e[b],this[b]=n?n(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?zl:cf,this.isPropagationStopped=cf,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zl)},persist:function(){},isPersistent:zl}),t}var Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dl=Ht(Qn),js=x({},Qn,{view:0,detail:0}),Og=Ht(js),zi,Di,ws,Ll=x({},js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ui,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ws&&(ws&&e.type==="mousemove"?(zi=e.screenX-ws.screenX,Di=e.screenY-ws.screenY):Di=zi=0,ws=e),zi)},movementY:function(e){return"movementY"in e?e.movementY:Di}}),uf=Ht(Ll),zg=x({},Ll,{dataTransfer:0}),Dg=Ht(zg),Lg=x({},js,{relatedTarget:0}),Li=Ht(Lg),Ug=x({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0}),Bg=Ht(Ug),qg=x({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hg=Ht(qg),Gg=x({},Qn,{data:0}),df=Ht(Gg),Qg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fg[e])?!!t[e]:!1}function Ui(){return Yg}var Xg=x({},js,{key:function(e){if(e.key){var t=Qg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ui,charCode:function(e){return e.type==="keypress"?Ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Kg=Ht(Xg),Zg=x({},Ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ff=Ht(Zg),$g=x({},js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ui}),Jg=Ht($g),Pg=x({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ig=Ht(Pg),Wg=x({},Ll,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ey=Ht(Wg),ty=x({},Qn,{newState:0,oldState:0}),ay=Ht(ty),ny=[9,13,27,32],Bi=Ua&&"CompositionEvent"in window,Es=null;Ua&&"documentMode"in document&&(Es=document.documentMode);var ry=Ua&&"TextEvent"in window&&!Es,mf=Ua&&(!Bi||Es&&8<Es&&11>=Es),hf=" ",pf=!1;function xf(e,t){switch(e){case"keyup":return ny.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Er=!1;function sy(e,t){switch(e){case"compositionend":return vf(t);case"keypress":return t.which!==32?null:(pf=!0,hf);case"textInput":return e=t.data,e===hf&&pf?null:e;default:return null}}function ly(e,t){if(Er)return e==="compositionend"||!Bi&&xf(e,t)?(e=of(),kl=Oi=ln=null,Er=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return mf&&t.locale!=="ko"?null:t.data;default:return null}}var oy={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!oy[e.type]:t==="textarea"}function yf(e,t,n,r){jr?wr?wr.push(r):wr=[r]:jr=r,t=Co(t,"onChange"),0<t.length&&(n=new Dl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cs=null,Ts=null;function iy(e){tp(e,0)}function Ul(e){var t=bs(e);if(Wd(t))return e}function bf(e,t){if(e==="change")return t}var Sf=!1;if(Ua){var qi;if(Ua){var Hi="oninput"in document;if(!Hi){var Nf=document.createElement("div");Nf.setAttribute("oninput","return;"),Hi=typeof Nf.oninput=="function"}qi=Hi}else qi=!1;Sf=qi&&(!document.documentMode||9<document.documentMode)}function jf(){Cs&&(Cs.detachEvent("onpropertychange",wf),Ts=Cs=null)}function wf(e){if(e.propertyName==="value"&&Ul(Ts)){var t=[];yf(t,Ts,e,Mi(e)),lf(iy,t)}}function cy(e,t,n){e==="focusin"?(jf(),Cs=t,Ts=n,Cs.attachEvent("onpropertychange",wf)):e==="focusout"&&jf()}function uy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ul(Ts)}function dy(e,t){if(e==="click")return Ul(t)}function fy(e,t){if(e==="input"||e==="change")return Ul(t)}function my(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:my;function _s(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var c=n[r];if(!$t.call(t,c)||!Jt(e[c],t[c]))return!1}return!0}function Ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cf(e,t){var n=Ef(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ef(n)}}function Tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _f(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ml(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=Ml(e.document)}return t}function Gi(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 hy=Ua&&"documentMode"in document&&11>=document.documentMode,Cr=null,Qi=null,Rs=null,Vi=!1;function Rf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vi||Cr==null||Cr!==Ml(r)||(r=Cr,"selectionStart"in r&&Gi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rs&&_s(Rs,r)||(Rs=r,r=Co(Qi,"onSelect"),0<r.length&&(t=new Dl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function Vn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Tr={animationend:Vn("Animation","AnimationEnd"),animationiteration:Vn("Animation","AnimationIteration"),animationstart:Vn("Animation","AnimationStart"),transitionrun:Vn("Transition","TransitionRun"),transitionstart:Vn("Transition","TransitionStart"),transitioncancel:Vn("Transition","TransitionCancel"),transitionend:Vn("Transition","TransitionEnd")},Fi={},Mf={};Ua&&(Mf=document.createElement("div").style,"AnimationEvent"in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),"TransitionEvent"in window||delete Tr.transitionend.transition);function Fn(e){if(Fi[e])return Fi[e];if(!Tr[e])return e;var t=Tr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Mf)return Fi[e]=t[n];return e}var Af=Fn("animationend"),kf=Fn("animationiteration"),Of=Fn("animationstart"),py=Fn("transitionrun"),xy=Fn("transitionstart"),vy=Fn("transitioncancel"),zf=Fn("transitionend"),Df=new Map,Yi="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Yi.push("scrollEnd");function ba(e,t){Df.set(e,t),Gn(t,[e])}var Bl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ia=[],_r=0,Xi=0;function ql(){for(var e=_r,t=Xi=_r=0;t<e;){var n=ia[t];ia[t++]=null;var r=ia[t];ia[t++]=null;var c=ia[t];ia[t++]=null;var u=ia[t];if(ia[t++]=null,r!==null&&c!==null){var h=r.pending;h===null?c.next=c:(c.next=h.next,h.next=c),r.pending=c}u!==0&&Lf(n,c,u)}}function Hl(e,t,n,r){ia[_r++]=e,ia[_r++]=t,ia[_r++]=n,ia[_r++]=r,Xi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ki(e,t,n,r){return Hl(e,t,n,r),Gl(e)}function Yn(e,t){return Hl(e,null,null,t),Gl(e)}function Lf(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var c=!1,u=e.return;u!==null;)u.childLanes|=n,r=u.alternate,r!==null&&(r.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(c=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,c&&t!==null&&(c=31-Ct(n),e=u.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=n|536870912),u):null}function Gl(e){if(50<Ps)throw Ps=0,au=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rr={};function gy(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,n,r){return new gy(e,t,n,r)}function Zi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ba(e,t){var n=e.alternate;return n===null?(n=Pt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Uf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ql(e,t,n,r,c,u){var h=0;if(r=e,typeof e=="function")Zi(e)&&(h=1);else if(typeof e=="string")h=jb(e,n,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=Pt(31,n,t,c),e.elementType=ae,e.lanes=u,e;case E:return Xn(n.children,c,u,t);case C:h=8,c|=24;break;case k:return e=Pt(12,n,t,c|2),e.elementType=k,e.lanes=u,e;case ne:return e=Pt(13,n,t,c),e.elementType=ne,e.lanes=u,e;case W:return e=Pt(19,n,t,c),e.elementType=W,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case F:h=10;break e;case A:h=9;break e;case H:h=11;break e;case z:h=14;break e;case q:h=16,r=null;break e}h=29,n=Error(i(130,e===null?"null":typeof e,"")),r=null}return t=Pt(h,n,t,c),t.elementType=e,t.type=r,t.lanes=u,t}function Xn(e,t,n,r){return e=Pt(7,e,r,t),e.lanes=n,e}function $i(e,t,n){return e=Pt(6,e,null,t),e.lanes=n,e}function Bf(e){var t=Pt(18,null,null,0);return t.stateNode=e,t}function Ji(e,t,n){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qf=new WeakMap;function ca(e,t){if(typeof e=="object"&&e!==null){var n=qf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:hs(t)},qf.set(e,t),t)}return{value:e,source:t,stack:hs(t)}}var Mr=[],Ar=0,Vl=null,Ms=0,ua=[],da=0,on=null,_a=1,Ra="";function qa(e,t){Mr[Ar++]=Ms,Mr[Ar++]=Vl,Vl=e,Ms=t}function Hf(e,t,n){ua[da++]=_a,ua[da++]=Ra,ua[da++]=on,on=e;var r=_a;e=Ra;var c=32-Ct(r)-1;r&=~(1<<c),n+=1;var u=32-Ct(t)+c;if(30<u){var h=c-c%5;u=(r&(1<<h)-1).toString(32),r>>=h,c-=h,_a=1<<32-Ct(t)+c|n<<c|r,Ra=u+e}else _a=1<<u|n<<c|r,Ra=e}function Pi(e){e.return!==null&&(qa(e,1),Hf(e,1,0))}function Ii(e){for(;e===Vl;)Vl=Mr[--Ar],Mr[Ar]=null,Ms=Mr[--Ar],Mr[Ar]=null;for(;e===on;)on=ua[--da],ua[da]=null,Ra=ua[--da],ua[da]=null,_a=ua[--da],ua[da]=null}function Gf(e,t){ua[da++]=_a,ua[da++]=Ra,ua[da++]=on,_a=t.id,Ra=t.overflow,on=e}var Nt=null,Ke=null,Ue=!1,cn=null,fa=!1,Wi=Error(i(519));function un(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw As(ca(t,e)),Wi}function Qf(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[qt]=r,n){case"dialog":ze("cancel",t),ze("close",t);break;case"iframe":case"object":case"embed":ze("load",t);break;case"video":case"audio":for(n=0;n<Ws.length;n++)ze(Ws[n],t);break;case"source":ze("error",t);break;case"img":case"image":case"link":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"input":ze("invalid",t),ef(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),af(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||sp(t.textContent,n)?(r.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),r.onScroll!=null&&ze("scroll",t),r.onScrollEnd!=null&&ze("scrollend",t),r.onClick!=null&&(t.onclick=La),t=!0):t=!1,t||un(e,!0)}function Vf(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:fa=!1;return;case 27:case 3:fa=!0;return;default:Nt=Nt.return}}function kr(e){if(e!==Nt)return!1;if(!Ue)return Vf(e),Ue=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||vu(e.type,e.memoizedProps)),n=!n),n&&Ke&&un(e),Vf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ke=hp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ke=hp(e)}else t===27?(t=Ke,wn(e.type)?(e=Nu,Nu=null,Ke=e):Ke=t):Ke=Nt?ha(e.stateNode.nextSibling):null;return!0}function Kn(){Ke=Nt=null,Ue=!1}function ec(){var e=cn;return e!==null&&(Ft===null?Ft=e:Ft.push.apply(Ft,e),cn=null),e}function As(e){cn===null?cn=[e]:cn.push(e)}var tc=_(null),Zn=null,Ha=null;function dn(e,t,n){K(tc,t._currentValue),t._currentValue=n}function Ga(e){e._currentValue=tc.current,X(tc)}function ac(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function nc(e,t,n,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var u=c.dependencies;if(u!==null){var h=c.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=c;for(var T=0;T<t.length;T++)if(b.context===t[T]){u.lanes|=n,b=u.alternate,b!==null&&(b.lanes|=n),ac(u.return,n,e),r||(h=null);break e}u=b.next}}else if(c.tag===18){if(h=c.return,h===null)throw Error(i(341));h.lanes|=n,u=h.alternate,u!==null&&(u.lanes|=n),ac(h,n,e),h=null}else h=c.child;if(h!==null)h.return=c;else for(h=c;h!==null;){if(h===e){h=null;break}if(c=h.sibling,c!==null){c.return=h.return,h=c;break}h=h.return}c=h}}function Or(e,t,n,r){e=null;for(var c=t,u=!1;c!==null;){if(!u){if((c.flags&524288)!==0)u=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var h=c.alternate;if(h===null)throw Error(i(387));if(h=h.memoizedProps,h!==null){var b=c.type;Jt(c.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(c===ue.current){if(h=c.alternate,h===null)throw Error(i(387));h.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(rl):e=[rl])}c=c.return}e!==null&&nc(t,e,n,r),t.flags|=262144}function Fl(e){for(e=e.firstContext;e!==null;){if(!Jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $n(e){Zn=e,Ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return Ff(Zn,e)}function Yl(e,t){return Zn===null&&$n(e),Ff(e,t)}function Ff(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ha===null){if(e===null)throw Error(i(308));Ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ha=Ha.next=t;return n}var yy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},by=a.unstable_scheduleCallback,Sy=a.unstable_NormalPriority,rt={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rc(){return{controller:new yy,data:new Map,refCount:0}}function ks(e){e.refCount--,e.refCount===0&&by(Sy,function(){e.controller.abort()})}var Os=null,sc=0,zr=0,Dr=null;function Ny(e,t){if(Os===null){var n=Os=[];sc=0,zr=iu(),Dr={status:"pending",value:void 0,then:function(r){n.push(r)}}}return sc++,t.then(Yf,Yf),t}function Yf(){if(--sc===0&&Os!==null){Dr!==null&&(Dr.status="fulfilled");var e=Os;Os=null,zr=0,Dr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jy(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(c){n.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<n.length;c++)(0,n[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<n.length;c++)(0,n[c])(void 0)}),r}var Xf=w.S;w.S=function(e,t){Rh=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ny(e,t),Xf!==null&&Xf(e,t)};var Jn=_(null);function lc(){var e=Jn.current;return e!==null?e:Xe.pooledCache}function Xl(e,t){t===null?K(Jn,Jn.current):K(Jn,t.pool)}function Kf(){var e=lc();return e===null?null:{parent:rt._currentValue,pool:e}}var Lr=Error(i(460)),oc=Error(i(474)),Kl=Error(i(542)),Zl={then:function(){}};function Zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $f(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(La,La),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pf(e),e;default:if(typeof t.status=="string")t.then(La,La);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pf(e),e}throw In=t,Lr}}function Pn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(In=n,Lr):n}}var In=null;function Jf(){if(In===null)throw Error(i(459));var e=In;return In=null,e}function Pf(e){if(e===Lr||e===Kl)throw Error(i(483))}var Ur=null,zs=0;function $l(e){var t=zs;return zs+=1,Ur===null&&(Ur=[]),$f(Ur,e,t)}function Ds(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Jl(e,t){throw t.$$typeof===N?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function If(e){function t(O,M){if(e){var L=O.deletions;L===null?(O.deletions=[M],O.flags|=16):L.push(M)}}function n(O,M){if(!e)return null;for(;M!==null;)t(O,M),M=M.sibling;return null}function r(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function c(O,M){return O=Ba(O,M),O.index=0,O.sibling=null,O}function u(O,M,L){return O.index=L,e?(L=O.alternate,L!==null?(L=L.index,L<M?(O.flags|=67108866,M):L):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function h(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function b(O,M,L,J){return M===null||M.tag!==6?(M=$i(L,O.mode,J),M.return=O,M):(M=c(M,L),M.return=O,M)}function T(O,M,L,J){var pe=L.type;return pe===E?$(O,M,L.props.children,J,L.key):M!==null&&(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===q&&Pn(pe)===M.type)?(M=c(M,L.props),Ds(M,L),M.return=O,M):(M=Ql(L.type,L.key,L.props,null,O.mode,J),Ds(M,L),M.return=O,M)}function U(O,M,L,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==L.containerInfo||M.stateNode.implementation!==L.implementation?(M=Ji(L,O.mode,J),M.return=O,M):(M=c(M,L.children||[]),M.return=O,M)}function $(O,M,L,J,pe){return M===null||M.tag!==7?(M=Xn(L,O.mode,J,pe),M.return=O,M):(M=c(M,L),M.return=O,M)}function P(O,M,L){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=$i(""+M,O.mode,L),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case R:return L=Ql(M.type,M.key,M.props,null,O.mode,L),Ds(L,M),L.return=O,L;case j:return M=Ji(M,O.mode,L),M.return=O,M;case q:return M=Pn(M),P(O,M,L)}if(te(M)||he(M))return M=Xn(M,O.mode,L,null),M.return=O,M;if(typeof M.then=="function")return P(O,$l(M),L);if(M.$$typeof===F)return P(O,Yl(O,M),L);Jl(O,M)}return null}function B(O,M,L,J){var pe=M!==null?M.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return pe!==null?null:b(O,M,""+L,J);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case R:return L.key===pe?T(O,M,L,J):null;case j:return L.key===pe?U(O,M,L,J):null;case q:return L=Pn(L),B(O,M,L,J)}if(te(L)||he(L))return pe!==null?null:$(O,M,L,J,null);if(typeof L.then=="function")return B(O,M,$l(L),J);if(L.$$typeof===F)return B(O,M,Yl(O,L),J);Jl(O,L)}return null}function Q(O,M,L,J,pe){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return O=O.get(L)||null,b(M,O,""+J,pe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case R:return O=O.get(J.key===null?L:J.key)||null,T(M,O,J,pe);case j:return O=O.get(J.key===null?L:J.key)||null,U(M,O,J,pe);case q:return J=Pn(J),Q(O,M,L,J,pe)}if(te(J)||he(J))return O=O.get(L)||null,$(M,O,J,pe,null);if(typeof J.then=="function")return Q(O,M,L,$l(J),pe);if(J.$$typeof===F)return Q(O,M,L,Yl(M,J),pe);Jl(M,J)}return null}function oe(O,M,L,J){for(var pe=null,Be=null,de=M,Re=M=0,Le=null;de!==null&&Re<L.length;Re++){de.index>Re?(Le=de,de=null):Le=de.sibling;var qe=B(O,de,L[Re],J);if(qe===null){de===null&&(de=Le);break}e&&de&&qe.alternate===null&&t(O,de),M=u(qe,M,Re),Be===null?pe=qe:Be.sibling=qe,Be=qe,de=Le}if(Re===L.length)return n(O,de),Ue&&qa(O,Re),pe;if(de===null){for(;Re<L.length;Re++)de=P(O,L[Re],J),de!==null&&(M=u(de,M,Re),Be===null?pe=de:Be.sibling=de,Be=de);return Ue&&qa(O,Re),pe}for(de=r(de);Re<L.length;Re++)Le=Q(de,O,Re,L[Re],J),Le!==null&&(e&&Le.alternate!==null&&de.delete(Le.key===null?Re:Le.key),M=u(Le,M,Re),Be===null?pe=Le:Be.sibling=Le,Be=Le);return e&&de.forEach(function(Rn){return t(O,Rn)}),Ue&&qa(O,Re),pe}function be(O,M,L,J){if(L==null)throw Error(i(151));for(var pe=null,Be=null,de=M,Re=M=0,Le=null,qe=L.next();de!==null&&!qe.done;Re++,qe=L.next()){de.index>Re?(Le=de,de=null):Le=de.sibling;var Rn=B(O,de,qe.value,J);if(Rn===null){de===null&&(de=Le);break}e&&de&&Rn.alternate===null&&t(O,de),M=u(Rn,M,Re),Be===null?pe=Rn:Be.sibling=Rn,Be=Rn,de=Le}if(qe.done)return n(O,de),Ue&&qa(O,Re),pe;if(de===null){for(;!qe.done;Re++,qe=L.next())qe=P(O,qe.value,J),qe!==null&&(M=u(qe,M,Re),Be===null?pe=qe:Be.sibling=qe,Be=qe);return Ue&&qa(O,Re),pe}for(de=r(de);!qe.done;Re++,qe=L.next())qe=Q(de,O,Re,qe.value,J),qe!==null&&(e&&qe.alternate!==null&&de.delete(qe.key===null?Re:qe.key),M=u(qe,M,Re),Be===null?pe=qe:Be.sibling=qe,Be=qe);return e&&de.forEach(function(zb){return t(O,zb)}),Ue&&qa(O,Re),pe}function Ye(O,M,L,J){if(typeof L=="object"&&L!==null&&L.type===E&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case R:e:{for(var pe=L.key;M!==null;){if(M.key===pe){if(pe=L.type,pe===E){if(M.tag===7){n(O,M.sibling),J=c(M,L.props.children),J.return=O,O=J;break e}}else if(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===q&&Pn(pe)===M.type){n(O,M.sibling),J=c(M,L.props),Ds(J,L),J.return=O,O=J;break e}n(O,M);break}else t(O,M);M=M.sibling}L.type===E?(J=Xn(L.props.children,O.mode,J,L.key),J.return=O,O=J):(J=Ql(L.type,L.key,L.props,null,O.mode,J),Ds(J,L),J.return=O,O=J)}return h(O);case j:e:{for(pe=L.key;M!==null;){if(M.key===pe)if(M.tag===4&&M.stateNode.containerInfo===L.containerInfo&&M.stateNode.implementation===L.implementation){n(O,M.sibling),J=c(M,L.children||[]),J.return=O,O=J;break e}else{n(O,M);break}else t(O,M);M=M.sibling}J=Ji(L,O.mode,J),J.return=O,O=J}return h(O);case q:return L=Pn(L),Ye(O,M,L,J)}if(te(L))return oe(O,M,L,J);if(he(L)){if(pe=he(L),typeof pe!="function")throw Error(i(150));return L=pe.call(L),be(O,M,L,J)}if(typeof L.then=="function")return Ye(O,M,$l(L),J);if(L.$$typeof===F)return Ye(O,M,Yl(O,L),J);Jl(O,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,M!==null&&M.tag===6?(n(O,M.sibling),J=c(M,L),J.return=O,O=J):(n(O,M),J=$i(L,O.mode,J),J.return=O,O=J),h(O)):n(O,M)}return function(O,M,L,J){try{zs=0;var pe=Ye(O,M,L,J);return Ur=null,pe}catch(de){if(de===Lr||de===Kl)throw de;var Be=Pt(29,de,null,O.mode);return Be.lanes=J,Be.return=O,Be}}}var Wn=If(!0),Wf=If(!1),fn=!1;function ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cc(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 mn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function hn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(He&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=Gl(e),Lf(e,null,n),t}return Hl(e,r,t,n),Gl(e)}function Ls(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ut(e,n)}}function uc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var c=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?c=u=h:u=u.next=h,n=n.next}while(n!==null);u===null?c=u=t:u=u.next=t}else c=u=t;n={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:u,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var dc=!1;function Us(){if(dc){var e=Dr;if(e!==null)throw e}}function Bs(e,t,n,r){dc=!1;var c=e.updateQueue;fn=!1;var u=c.firstBaseUpdate,h=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var T=b,U=T.next;T.next=null,h===null?u=U:h.next=U,h=T;var $=e.alternate;$!==null&&($=$.updateQueue,b=$.lastBaseUpdate,b!==h&&(b===null?$.firstBaseUpdate=U:b.next=U,$.lastBaseUpdate=T))}if(u!==null){var P=c.baseState;h=0,$=U=T=null,b=u;do{var B=b.lane&-536870913,Q=B!==b.lane;if(Q?(De&B)===B:(r&B)===B){B!==0&&B===zr&&(dc=!0),$!==null&&($=$.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var oe=e,be=b;B=t;var Ye=n;switch(be.tag){case 1:if(oe=be.payload,typeof oe=="function"){P=oe.call(Ye,P,B);break e}P=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=be.payload,B=typeof oe=="function"?oe.call(Ye,P,B):oe,B==null)break e;P=x({},P,B);break e;case 2:fn=!0}}B=b.callback,B!==null&&(e.flags|=64,Q&&(e.flags|=8192),Q=c.callbacks,Q===null?c.callbacks=[B]:Q.push(B))}else Q={lane:B,tag:b.tag,payload:b.payload,callback:b.callback,next:null},$===null?(U=$=Q,T=P):$=$.next=Q,h|=B;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;Q=b,b=Q.next,Q.next=null,c.lastBaseUpdate=Q,c.shared.pending=null}}while(!0);$===null&&(T=P),c.baseState=T,c.firstBaseUpdate=U,c.lastBaseUpdate=$,u===null&&(c.shared.lanes=0),yn|=h,e.lanes=h,e.memoizedState=P}}function em(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function tm(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)em(n[e],t)}var Br=_(null),Pl=_(0);function am(e,t){e=Ja,K(Pl,e),K(Br,t),Ja=e|t.baseLanes}function fc(){K(Pl,Ja),K(Br,Br.current)}function mc(){Ja=Pl.current,X(Br),X(Pl)}var It=_(null),ma=null;function pn(e){var t=e.alternate;K(tt,tt.current&1),K(It,e),ma===null&&(t===null||Br.current!==null||t.memoizedState!==null)&&(ma=e)}function hc(e){K(tt,tt.current),K(It,e),ma===null&&(ma=e)}function nm(e){e.tag===22?(K(tt,tt.current),K(It,e),ma===null&&(ma=e)):xn()}function xn(){K(tt,tt.current),K(It,It.current)}function Wt(e){X(It),ma===e&&(ma=null),X(tt)}var tt=_(0);function Il(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||bu(n)||Su(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Qa=0,_e=null,Ve=null,st=null,Wl=!1,qr=!1,er=!1,eo=0,qs=0,Hr=null,wy=0;function We(){throw Error(i(321))}function pc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jt(e[n],t[n]))return!1;return!0}function xc(e,t,n,r,c,u){return Qa=u,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?Hm:Ac,er=!1,u=n(r,c),er=!1,qr&&(u=sm(t,n,r,c)),rm(e),u}function rm(e){w.H=Qs;var t=Ve!==null&&Ve.next!==null;if(Qa=0,st=Ve=_e=null,Wl=!1,qs=0,Hr=null,t)throw Error(i(300));e===null||lt||(e=e.dependencies,e!==null&&Fl(e)&&(lt=!0))}function sm(e,t,n,r){_e=e;var c=0;do{if(qr&&(Hr=null),qs=0,qr=!1,25<=c)throw Error(i(301));if(c+=1,st=Ve=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}w.H=Gm,u=t(n,r)}while(qr);return u}function Ey(){var e=w.H,t=e.useState()[0];return t=typeof t.then=="function"?Hs(t):t,e=e.useState()[0],(Ve!==null?Ve.memoizedState:null)!==e&&(_e.flags|=1024),t}function vc(){var e=eo!==0;return eo=0,e}function gc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yc(e){if(Wl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wl=!1}Qa=0,st=Ve=_e=null,qr=!1,qs=eo=0,Hr=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?_e.memoizedState=st=e:st=st.next=e,st}function at(){if(Ve===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=st===null?_e.memoizedState:st.next;if(t!==null)st=t,Ve=e;else{if(e===null)throw _e.alternate===null?Error(i(467)):Error(i(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},st===null?_e.memoizedState=st=e:st=st.next=e}return st}function to(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hs(e){var t=qs;return qs+=1,Hr===null&&(Hr=[]),e=$f(Hr,e,t),t=_e,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?Hm:Ac),e}function ao(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hs(e);if(e.$$typeof===F)return jt(e)}throw Error(i(438,String(e)))}function bc(e){var t=null,n=_e.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=_e.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=to(),_e.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=je;return t.index++,n}function Va(e,t){return typeof t=="function"?t(e):t}function no(e){var t=at();return Sc(t,Ve,e)}function Sc(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var c=e.baseQueue,u=r.pending;if(u!==null){if(c!==null){var h=c.next;c.next=u.next,u.next=h}t.baseQueue=c=u,r.pending=null}if(u=e.baseState,c===null)e.memoizedState=u;else{t=c.next;var b=h=null,T=null,U=t,$=!1;do{var P=U.lane&-536870913;if(P!==U.lane?(De&P)===P:(Qa&P)===P){var B=U.revertLane;if(B===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),P===zr&&($=!0);else if((Qa&B)===B){U=U.next,B===zr&&($=!0);continue}else P={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},T===null?(b=T=P,h=u):T=T.next=P,_e.lanes|=B,yn|=B;P=U.action,er&&n(u,P),u=U.hasEagerState?U.eagerState:n(u,P)}else B={lane:P,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},T===null?(b=T=B,h=u):T=T.next=B,_e.lanes|=P,yn|=P;U=U.next}while(U!==null&&U!==t);if(T===null?h=u:T.next=b,!Jt(u,e.memoizedState)&&(lt=!0,$&&(n=Dr,n!==null)))throw n;e.memoizedState=u,e.baseState=h,e.baseQueue=T,r.lastRenderedState=u}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Nc(e){var t=at(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,c=n.pending,u=t.memoizedState;if(c!==null){n.pending=null;var h=c=c.next;do u=e(u,h.action),h=h.next;while(h!==c);Jt(u,t.memoizedState)||(lt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,r]}function lm(e,t,n){var r=_e,c=at(),u=Ue;if(u){if(n===void 0)throw Error(i(407));n=n()}else n=t();var h=!Jt((Ve||c).memoizedState,n);if(h&&(c.memoizedState=n,lt=!0),c=c.queue,Ec(cm.bind(null,r,c,e),[e]),c.getSnapshot!==t||h||st!==null&&st.memoizedState.tag&1){if(r.flags|=2048,Gr(9,{destroy:void 0},im.bind(null,r,c,n,t),null),Xe===null)throw Error(i(349));u||(Qa&127)!==0||om(r,t,n)}return n}function om(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=_e.updateQueue,t===null?(t=to(),_e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function im(e,t,n,r){t.value=n,t.getSnapshot=r,um(t)&&dm(e)}function cm(e,t,n){return n(function(){um(t)&&dm(e)})}function um(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jt(e,n)}catch{return!0}}function dm(e){var t=Yn(e,2);t!==null&&Yt(t,e,2)}function jc(e){var t=Ot();if(typeof e=="function"){var n=e;if(e=n(),er){ga(!0);try{n()}finally{ga(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:e},t}function fm(e,t,n,r){return e.baseState=n,Sc(e,Ve,typeof r=="function"?r:Va)}function Cy(e,t,n,r,c){if(lo(e))throw Error(i(485));if(e=t.action,e!==null){var u={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};w.T!==null?n(!0):u.isTransition=!1,r(u),n=t.pending,n===null?(u.next=t.pending=u,mm(t,u)):(u.next=n.next,t.pending=n.next=u)}}function mm(e,t){var n=t.action,r=t.payload,c=e.state;if(t.isTransition){var u=w.T,h={};w.T=h;try{var b=n(c,r),T=w.S;T!==null&&T(h,b),hm(e,t,b)}catch(U){wc(e,t,U)}finally{u!==null&&h.types!==null&&(u.types=h.types),w.T=u}}else try{u=n(c,r),hm(e,t,u)}catch(U){wc(e,t,U)}}function hm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){pm(e,t,r)},function(r){return wc(e,t,r)}):pm(e,t,n)}function pm(e,t,n){t.status="fulfilled",t.value=n,xm(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,mm(e,n)))}function wc(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,xm(t),t=t.next;while(t!==r)}e.action=null}function xm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function vm(e,t){return t}function gm(e,t){if(Ue){var n=Xe.formState;if(n!==null){e:{var r=_e;if(Ue){if(Ke){t:{for(var c=Ke,u=fa;c.nodeType!==8;){if(!u){c=null;break t}if(c=ha(c.nextSibling),c===null){c=null;break t}}u=c.data,c=u==="F!"||u==="F"?c:null}if(c){Ke=ha(c.nextSibling),r=c.data==="F!";break e}}un(r)}r=!1}r&&(t=n[0])}}return n=Ot(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vm,lastRenderedState:t},n.queue=r,n=Um.bind(null,_e,r),r.dispatch=n,r=jc(!1),u=Mc.bind(null,_e,!1,r.queue),r=Ot(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,n=Cy.bind(null,_e,c,u,n),c.dispatch=n,r.memoizedState=e,[t,n,!1]}function ym(e){var t=at();return bm(t,Ve,e)}function bm(e,t,n){if(t=Sc(e,t,vm)[0],e=no(Va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Hs(t)}catch(h){throw h===Lr?Kl:h}else r=t;t=at();var c=t.queue,u=c.dispatch;return n!==t.memoizedState&&(_e.flags|=2048,Gr(9,{destroy:void 0},Ty.bind(null,c,n),null)),[r,u,e]}function Ty(e,t){e.action=t}function Sm(e){var t=at(),n=Ve;if(n!==null)return bm(t,n,e);at(),t=t.memoizedState,n=at();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Gr(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=_e.updateQueue,t===null&&(t=to(),_e.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Nm(){return at().memoizedState}function ro(e,t,n,r){var c=Ot();_e.flags|=e,c.memoizedState=Gr(1|t,{destroy:void 0},n,r===void 0?null:r)}function so(e,t,n,r){var c=at();r=r===void 0?null:r;var u=c.memoizedState.inst;Ve!==null&&r!==null&&pc(r,Ve.memoizedState.deps)?c.memoizedState=Gr(t,u,n,r):(_e.flags|=e,c.memoizedState=Gr(1|t,u,n,r))}function jm(e,t){ro(8390656,8,e,t)}function Ec(e,t){so(2048,8,e,t)}function _y(e){_e.flags|=4;var t=_e.updateQueue;if(t===null)t=to(),_e.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function wm(e){var t=at().memoizedState;return _y({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Em(e,t){return so(4,2,e,t)}function Cm(e,t){return so(4,4,e,t)}function Tm(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _m(e,t,n){n=n!=null?n.concat([e]):null,so(4,4,Tm.bind(null,t,e),n)}function Cc(){}function Rm(e,t){var n=at();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&pc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mm(e,t){var n=at();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&pc(t,r[1]))return r[0];if(r=e(),er){ga(!0);try{e()}finally{ga(!1)}}return n.memoizedState=[r,t],r}function Tc(e,t,n){return n===void 0||(Qa&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ah(),_e.lanes|=e,yn|=e,n)}function Am(e,t,n,r){return Jt(n,t)?n:Br.current!==null?(e=Tc(e,n,r),Jt(e,t)||(lt=!0),e):(Qa&42)===0||(Qa&1073741824)!==0&&(De&261930)===0?(lt=!0,e.memoizedState=n):(e=Ah(),_e.lanes|=e,yn|=e,t)}function km(e,t,n,r,c){var u=Y.p;Y.p=u!==0&&8>u?u:8;var h=w.T,b={};w.T=b,Mc(e,!1,t,n);try{var T=c(),U=w.S;if(U!==null&&U(b,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var $=jy(T,r);Gs(e,t,$,aa(e))}else Gs(e,t,r,aa(e))}catch(P){Gs(e,t,{then:function(){},status:"rejected",reason:P},aa())}finally{Y.p=u,h!==null&&b.types!==null&&(h.types=b.types),w.T=h}}function Ry(){}function _c(e,t,n,r){if(e.tag!==5)throw Error(i(476));var c=Om(e).queue;km(e,c,t,Z,n===null?Ry:function(){return zm(e),n(r)})}function Om(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:Z},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function zm(e){var t=Om(e);t.next===null&&(t=e.alternate.memoizedState),Gs(e,t.next.queue,{},aa())}function Rc(){return jt(rl)}function Dm(){return at().memoizedState}function Lm(){return at().memoizedState}function My(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=aa();e=mn(n);var r=hn(t,e,n);r!==null&&(Yt(r,t,n),Ls(r,t,n)),t={cache:rc()},e.payload=t;return}t=t.return}}function Ay(e,t,n){var r=aa();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lo(e)?Bm(t,n):(n=Ki(e,t,n,r),n!==null&&(Yt(n,e,r),qm(n,t,r)))}function Um(e,t,n){var r=aa();Gs(e,t,n,r)}function Gs(e,t,n,r){var c={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lo(e))Bm(t,c);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,b=u(h,n);if(c.hasEagerState=!0,c.eagerState=b,Jt(b,h))return Hl(e,t,c,0),Xe===null&&ql(),!1}catch{}if(n=Ki(e,t,c,r),n!==null)return Yt(n,e,r),qm(n,t,r),!0}return!1}function Mc(e,t,n,r){if(r={lane:2,revertLane:iu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lo(e)){if(t)throw Error(i(479))}else t=Ki(e,n,r,2),t!==null&&Yt(t,e,2)}function lo(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function Bm(e,t){qr=Wl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qm(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ut(e,n)}}var Qs={readContext:jt,use:ao,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We};Qs.useEffectEvent=We;var Hm={readContext:jt,use:ao,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:jm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ro(4194308,4,Tm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ro(4194308,4,e,t)},useInsertionEffect:function(e,t){ro(4,2,e,t)},useMemo:function(e,t){var n=Ot();t=t===void 0?null:t;var r=e();if(er){ga(!0);try{e()}finally{ga(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ot();if(n!==void 0){var c=n(t);if(er){ga(!0);try{n(t)}finally{ga(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=Ay.bind(null,_e,e),[r.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=jc(e);var t=e.queue,n=Um.bind(null,_e,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cc,useDeferredValue:function(e,t){var n=Ot();return Tc(n,e,t)},useTransition:function(){var e=jc(!1);return e=km.bind(null,_e,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=_e,c=Ot();if(Ue){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xe===null)throw Error(i(349));(De&127)!==0||om(r,t,n)}c.memoizedState=n;var u={value:n,getSnapshot:t};return c.queue=u,jm(cm.bind(null,r,u,e),[e]),r.flags|=2048,Gr(9,{destroy:void 0},im.bind(null,r,u,n,t),null),n},useId:function(){var e=Ot(),t=Xe.identifierPrefix;if(Ue){var n=Ra,r=_a;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=eo++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=wy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Rc,useFormState:gm,useActionState:gm,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Mc.bind(null,_e,!0,n),n.dispatch=t,[e,t]},useMemoCache:bc,useCacheRefresh:function(){return Ot().memoizedState=My.bind(null,_e)},useEffectEvent:function(e){var t=Ot(),n={impl:e};return t.memoizedState=n,function(){if((He&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ac={readContext:jt,use:ao,useCallback:Rm,useContext:jt,useEffect:Ec,useImperativeHandle:_m,useInsertionEffect:Em,useLayoutEffect:Cm,useMemo:Mm,useReducer:no,useRef:Nm,useState:function(){return no(Va)},useDebugValue:Cc,useDeferredValue:function(e,t){var n=at();return Am(n,Ve.memoizedState,e,t)},useTransition:function(){var e=no(Va)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Hs(e),t]},useSyncExternalStore:lm,useId:Dm,useHostTransitionStatus:Rc,useFormState:ym,useActionState:ym,useOptimistic:function(e,t){var n=at();return fm(n,Ve,e,t)},useMemoCache:bc,useCacheRefresh:Lm};Ac.useEffectEvent=wm;var Gm={readContext:jt,use:ao,useCallback:Rm,useContext:jt,useEffect:Ec,useImperativeHandle:_m,useInsertionEffect:Em,useLayoutEffect:Cm,useMemo:Mm,useReducer:Nc,useRef:Nm,useState:function(){return Nc(Va)},useDebugValue:Cc,useDeferredValue:function(e,t){var n=at();return Ve===null?Tc(n,e,t):Am(n,Ve.memoizedState,e,t)},useTransition:function(){var e=Nc(Va)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Hs(e),t]},useSyncExternalStore:lm,useId:Dm,useHostTransitionStatus:Rc,useFormState:Sm,useActionState:Sm,useOptimistic:function(e,t){var n=at();return Ve!==null?fm(n,Ve,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:bc,useCacheRefresh:Lm};Gm.useEffectEvent=wm;function kc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:x({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Oc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=aa(),c=mn(r);c.payload=t,n!=null&&(c.callback=n),t=hn(e,c,r),t!==null&&(Yt(t,e,r),Ls(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=aa(),c=mn(r);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=hn(e,c,r),t!==null&&(Yt(t,e,r),Ls(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=aa(),r=mn(n);r.tag=2,t!=null&&(r.callback=t),t=hn(e,r,n),t!==null&&(Yt(t,e,n),Ls(t,e,n))}};function Qm(e,t,n,r,c,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,h):t.prototype&&t.prototype.isPureReactComponent?!_s(n,r)||!_s(c,u):!0}function Vm(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Oc.enqueueReplaceState(t,t.state,null)}function tr(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=x({},n));for(var c in e)n[c]===void 0&&(n[c]=e[c])}return n}function Fm(e){Bl(e)}function Ym(e){console.error(e)}function Xm(e){Bl(e)}function oo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Km(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function zc(e,t,n){return n=mn(n),n.tag=3,n.payload={element:null},n.callback=function(){oo(e,t)},n}function Zm(e){return e=mn(e),e.tag=3,e}function $m(e,t,n,r){var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var u=r.value;e.payload=function(){return c(u)},e.callback=function(){Km(t,n,r)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Km(t,n,r),typeof c!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var b=r.stack;this.componentDidCatch(r.value,{componentStack:b!==null?b:""})})}function ky(e,t,n,r,c){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Or(t,n,c,!0),n=It.current,n!==null){switch(n.tag){case 31:case 13:return ma===null?bo():n.alternate===null&&et===0&&(et=3),n.flags&=-257,n.flags|=65536,n.lanes=c,r===Zl?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),su(e,r,c)),!1;case 22:return n.flags|=65536,r===Zl?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),su(e,r,c)),!1}throw Error(i(435,n.tag))}return su(e,r,c),bo(),!1}if(Ue)return t=It.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==Wi&&(e=Error(i(422),{cause:r}),As(ca(e,n)))):(r!==Wi&&(t=Error(i(423),{cause:r}),As(ca(t,n))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=ca(r,n),c=zc(e.stateNode,r,c),uc(e,c),et!==4&&(et=2)),!1;var u=Error(i(520),{cause:r});if(u=ca(u,n),Js===null?Js=[u]:Js.push(u),et!==4&&(et=2),t===null)return!0;r=ca(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=c&-c,n.lanes|=e,e=zc(n.stateNode,r,e),uc(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(bn===null||!bn.has(u))))return n.flags|=65536,c&=-c,n.lanes|=c,c=Zm(c),$m(c,e,n,r),uc(n,c),!1}n=n.return}while(n!==null);return!1}var Dc=Error(i(461)),lt=!1;function wt(e,t,n,r){t.child=e===null?Wf(t,null,n,r):Wn(t,e.child,n,r)}function Jm(e,t,n,r,c){n=n.render;var u=t.ref;if("ref"in r){var h={};for(var b in r)b!=="ref"&&(h[b]=r[b])}else h=r;return $n(t),r=xc(e,t,n,h,u,c),b=vc(),e!==null&&!lt?(gc(e,t,c),Fa(e,t,c)):(Ue&&b&&Pi(t),t.flags|=1,wt(e,t,r,c),t.child)}function Pm(e,t,n,r,c){if(e===null){var u=n.type;return typeof u=="function"&&!Zi(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,Im(e,t,u,r,c)):(e=Ql(n.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Vc(e,c)){var h=u.memoizedProps;if(n=n.compare,n=n!==null?n:_s,n(h,r)&&e.ref===t.ref)return Fa(e,t,c)}return t.flags|=1,e=Ba(u,r),e.ref=t.ref,e.return=t,t.child=e}function Im(e,t,n,r,c){if(e!==null){var u=e.memoizedProps;if(_s(u,r)&&e.ref===t.ref)if(lt=!1,t.pendingProps=r=u,Vc(e,c))(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,Fa(e,t,c)}return Lc(e,t,n,r,c)}function Wm(e,t,n,r){var c=r.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~u}else r=0,t.child=null;return eh(e,t,u,n,r)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xl(t,u!==null?u.cachePool:null),u!==null?am(t,u):fc(),nm(t);else return r=t.lanes=536870912,eh(e,t,u!==null?u.baseLanes|n:n,n,r)}else u!==null?(Xl(t,u.cachePool),am(t,u),xn(),t.memoizedState=null):(e!==null&&Xl(t,null),fc(),xn());return wt(e,t,c,n),t.child}function Vs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function eh(e,t,n,r,c){var u=lc();return u=u===null?null:{parent:rt._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&Xl(t,null),fc(),nm(t),e!==null&&Or(e,t,r,!0),t.childLanes=c,null}function io(e,t){return t=uo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function th(e,t,n){return Wn(t,e.child,null,n),e=io(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function Oy(e,t,n){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ue){if(r.mode==="hidden")return e=io(t,r),t.lanes=536870912,Vs(null,e);if(hc(t),(e=Ke)?(e=mp(e,fa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:on!==null?{id:_a,overflow:Ra}:null,retryLane:536870912,hydrationErrors:null},n=Bf(e),n.return=t,t.child=n,Nt=t,Ke=null)):e=null,e===null)throw un(t);return t.lanes=536870912,null}return io(t,r)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(hc(t),c)if(t.flags&256)t.flags&=-257,t=th(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(lt||Or(e,t,n,!1),c=(n&e.childLanes)!==0,lt||c){if(r=Xe,r!==null&&(h=Bt(r,n),h!==0&&h!==u.retryLane))throw u.retryLane=h,Yn(e,h),Yt(r,e,h),Dc;bo(),t=th(e,t,n)}else e=u.treeContext,Ke=ha(h.nextSibling),Nt=t,Ue=!0,cn=null,fa=!1,e!==null&&Gf(t,e),t=io(t,r),t.flags|=4096;return t}return e=Ba(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function co(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Lc(e,t,n,r,c){return $n(t),n=xc(e,t,n,r,void 0,c),r=vc(),e!==null&&!lt?(gc(e,t,c),Fa(e,t,c)):(Ue&&r&&Pi(t),t.flags|=1,wt(e,t,n,c),t.child)}function ah(e,t,n,r,c,u){return $n(t),t.updateQueue=null,n=sm(t,r,n,c),rm(e),r=vc(),e!==null&&!lt?(gc(e,t,u),Fa(e,t,u)):(Ue&&r&&Pi(t),t.flags|=1,wt(e,t,n,u),t.child)}function nh(e,t,n,r,c){if($n(t),t.stateNode===null){var u=Rr,h=n.contextType;typeof h=="object"&&h!==null&&(u=jt(h)),u=new n(r,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Oc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=r,u.state=t.memoizedState,u.refs={},ic(t),h=n.contextType,u.context=typeof h=="object"&&h!==null?jt(h):Rr,u.state=t.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(kc(t,n,h,r),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&Oc.enqueueReplaceState(u,u.state,null),Bs(t,r,u,c),Us(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,T=tr(n,b);u.props=T;var U=u.context,$=n.contextType;h=Rr,typeof $=="object"&&$!==null&&(h=jt($));var P=n.getDerivedStateFromProps;$=typeof P=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,$||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||U!==h)&&Vm(t,u,r,h),fn=!1;var B=t.memoizedState;u.state=B,Bs(t,r,u,c),Us(),U=t.memoizedState,b||B!==U||fn?(typeof P=="function"&&(kc(t,n,P,r),U=t.memoizedState),(T=fn||Qm(t,n,T,r,B,U,h))?($||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=U),u.props=r,u.state=U,u.context=h,r=T):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,cc(e,t),h=t.memoizedProps,$=tr(n,h),u.props=$,P=t.pendingProps,B=u.context,U=n.contextType,T=Rr,typeof U=="object"&&U!==null&&(T=jt(U)),b=n.getDerivedStateFromProps,(U=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==P||B!==T)&&Vm(t,u,r,T),fn=!1,B=t.memoizedState,u.state=B,Bs(t,r,u,c),Us();var Q=t.memoizedState;h!==P||B!==Q||fn||e!==null&&e.dependencies!==null&&Fl(e.dependencies)?(typeof b=="function"&&(kc(t,n,b,r),Q=t.memoizedState),($=fn||Qm(t,n,$,r,B,Q,T)||e!==null&&e.dependencies!==null&&Fl(e.dependencies))?(U||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,Q,T),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,Q,T)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=Q),u.props=r,u.state=Q,u.context=T,r=$):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),r=!1)}return u=r,co(e,t),r=(t.flags&128)!==0,u||r?(u=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&r?(t.child=Wn(t,e.child,null,c),t.child=Wn(t,null,n,c)):wt(e,t,n,c),t.memoizedState=u.state,e=t.child):e=Fa(e,t,c),e}function rh(e,t,n,r){return Kn(),t.flags|=256,wt(e,t,n,r),t.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(e){return{baseLanes:e,cachePool:Kf()}}function qc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=ta),e}function sh(e,t,n){var r=t.pendingProps,c=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),h&&(c=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(c?pn(t):xn(),(e=Ke)?(e=mp(e,fa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:on!==null?{id:_a,overflow:Ra}:null,retryLane:536870912,hydrationErrors:null},n=Bf(e),n.return=t,t.child=n,Nt=t,Ke=null)):e=null,e===null)throw un(t);return Su(e)?t.lanes=32:t.lanes=536870912,null}var b=r.children;return r=r.fallback,c?(xn(),c=t.mode,b=uo({mode:"hidden",children:b},c),r=Xn(r,c,n,null),b.return=t,r.return=t,b.sibling=r,t.child=b,r=t.child,r.memoizedState=Bc(n),r.childLanes=qc(e,h,n),t.memoizedState=Uc,Vs(null,r)):(pn(t),Hc(t,b))}var T=e.memoizedState;if(T!==null&&(b=T.dehydrated,b!==null)){if(u)t.flags&256?(pn(t),t.flags&=-257,t=Gc(e,t,n)):t.memoizedState!==null?(xn(),t.child=e.child,t.flags|=128,t=null):(xn(),b=r.fallback,c=t.mode,r=uo({mode:"visible",children:r.children},c),b=Xn(b,c,n,null),b.flags|=2,r.return=t,b.return=t,r.sibling=b,t.child=r,Wn(t,e.child,null,n),r=t.child,r.memoizedState=Bc(n),r.childLanes=qc(e,h,n),t.memoizedState=Uc,t=Vs(null,r));else if(pn(t),Su(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var U=h.dgst;h=U,r=Error(i(419)),r.stack="",r.digest=h,As({value:r,source:null,stack:null}),t=Gc(e,t,n)}else if(lt||Or(e,t,n,!1),h=(n&e.childLanes)!==0,lt||h){if(h=Xe,h!==null&&(r=Bt(h,n),r!==0&&r!==T.retryLane))throw T.retryLane=r,Yn(e,r),Yt(h,e,r),Dc;bu(b)||bo(),t=Gc(e,t,n)}else bu(b)?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,Ke=ha(b.nextSibling),Nt=t,Ue=!0,cn=null,fa=!1,e!==null&&Gf(t,e),t=Hc(t,r.children),t.flags|=4096);return t}return c?(xn(),b=r.fallback,c=t.mode,T=e.child,U=T.sibling,r=Ba(T,{mode:"hidden",children:r.children}),r.subtreeFlags=T.subtreeFlags&65011712,U!==null?b=Ba(U,b):(b=Xn(b,c,n,null),b.flags|=2),b.return=t,r.return=t,r.sibling=b,t.child=r,Vs(null,r),r=t.child,b=e.child.memoizedState,b===null?b=Bc(n):(c=b.cachePool,c!==null?(T=rt._currentValue,c=c.parent!==T?{parent:T,pool:T}:c):c=Kf(),b={baseLanes:b.baseLanes|n,cachePool:c}),r.memoizedState=b,r.childLanes=qc(e,h,n),t.memoizedState=Uc,Vs(e.child,r)):(pn(t),n=e.child,e=n.sibling,n=Ba(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=n,t.memoizedState=null,n)}function Hc(e,t){return t=uo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function uo(e,t){return e=Pt(22,e,null,t),e.lanes=0,e}function Gc(e,t,n){return Wn(t,e.child,null,n),e=Hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ac(e.return,t,n)}function Qc(e,t,n,r,c,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:c,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=r,h.tail=n,h.tailMode=c,h.treeForkCount=u)}function oh(e,t,n){var r=t.pendingProps,c=r.revealOrder,u=r.tail;r=r.children;var h=tt.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,K(tt,h),wt(e,t,r,n),r=Ue?Ms:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lh(e,n,t);else if(e.tag===19)lh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&Il(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),Qc(t,!1,c,n,u,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Il(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}Qc(t,!0,n,null,u,r);break;case"together":Qc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Fa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Or(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ba(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ba(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Vc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fl(e)))}function zy(e,t,n){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),dn(t,rt,e.memoizedState.cache),Kn();break;case 27:case 5:D(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:dn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hc(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(pn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sh(e,t,n):(pn(t),e=Fa(e,t,n),e!==null?e.sibling:null);pn(t);break;case 19:var c=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Or(e,t,n,!1),r=(n&t.childLanes)!==0),c){if(r)return oh(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),K(tt,tt.current),r)break;return null;case 22:return t.lanes=0,Wm(e,t,n,t.pendingProps);case 24:dn(t,rt,e.memoizedState.cache)}return Fa(e,t,n)}function ih(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)lt=!0;else{if(!Vc(e,n)&&(t.flags&128)===0)return lt=!1,zy(e,t,n);lt=(e.flags&131072)!==0}else lt=!1,Ue&&(t.flags&1048576)!==0&&Hf(t,Ms,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Pn(t.elementType),t.type=e,typeof e=="function")Zi(e)?(r=tr(e,r),t.tag=1,t=nh(null,t,e,r,n)):(t.tag=0,t=Lc(null,t,e,r,n));else{if(e!=null){var c=e.$$typeof;if(c===H){t.tag=11,t=Jm(null,t,e,r,n);break e}else if(c===z){t.tag=14,t=Pm(null,t,e,r,n);break e}}throw t=Te(e)||e,Error(i(306,t,""))}}return t;case 0:return Lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,c=tr(r,t.pendingProps),nh(e,t,r,c,n);case 3:e:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var u=t.memoizedState;c=u.element,cc(e,t),Bs(t,r,null,n);var h=t.memoizedState;if(r=h.cache,dn(t,rt,r),r!==u.cache&&nc(t,[rt],n,!0),Us(),r=h.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=rh(e,t,r,n);break e}else if(r!==c){c=ca(Error(i(424)),t),As(c),t=rh(e,t,r,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=ha(e.firstChild),Nt=t,Ue=!0,cn=null,fa=!0,n=Wf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Kn(),r===c){t=Fa(e,t,n);break e}wt(e,t,r,n)}t=t.child}return t;case 26:return co(e,t),e===null?(n=yp(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ue||(n=t.type,e=t.pendingProps,r=To(me.current).createElement(n),r[St]=t,r[qt]=e,Et(r,n,e),xt(r),t.stateNode=r):t.memoizedState=yp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return D(t),e===null&&Ue&&(r=t.stateNode=xp(t.type,t.pendingProps,me.current),Nt=t,fa=!0,c=Ke,wn(t.type)?(Nu=c,Ke=ha(r.firstChild)):Ke=c),wt(e,t,t.pendingProps.children,n),co(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((c=r=Ke)&&(r=ub(r,t.type,t.pendingProps,fa),r!==null?(t.stateNode=r,Nt=t,Ke=ha(r.firstChild),fa=!1,c=!0):c=!1),c||un(t)),D(t),c=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,r=u.children,vu(c,u)?r=null:h!==null&&vu(c,h)&&(t.flags|=32),t.memoizedState!==null&&(c=xc(e,t,Ey,null,null,n),rl._currentValue=c),co(e,t),wt(e,t,r,n),t.child;case 6:return e===null&&Ue&&((e=n=Ke)&&(n=db(n,t.pendingProps,fa),n!==null?(t.stateNode=n,Nt=t,Ke=null,e=!0):e=!1),e||un(t)),null;case 13:return sh(e,t,n);case 4:return we(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wn(t,null,r,n):wt(e,t,r,n),t.child;case 11:return Jm(e,t,t.type,t.pendingProps,n);case 7:return wt(e,t,t.pendingProps,n),t.child;case 8:return wt(e,t,t.pendingProps.children,n),t.child;case 12:return wt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,dn(t,t.type,r.value),wt(e,t,r.children,n),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,$n(t),c=jt(c),r=r(c),t.flags|=1,wt(e,t,r,n),t.child;case 14:return Pm(e,t,t.type,t.pendingProps,n);case 15:return Im(e,t,t.type,t.pendingProps,n);case 19:return oh(e,t,n);case 31:return Oy(e,t,n);case 22:return Wm(e,t,n,t.pendingProps);case 24:return $n(t),r=jt(rt),e===null?(c=lc(),c===null&&(c=Xe,u=rc(),c.pooledCache=u,u.refCount++,u!==null&&(c.pooledCacheLanes|=n),c=u),t.memoizedState={parent:r,cache:c},ic(t),dn(t,rt,c)):((e.lanes&n)!==0&&(cc(e,t),Bs(t,null,null,n),Us()),c=e.memoizedState,u=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),dn(t,rt,r)):(r=u.cache,dn(t,rt,r),r!==c.cache&&nc(t,[rt],n,!0))),wt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ya(e){e.flags|=4}function Fc(e,t,n,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Dh())e.flags|=8192;else throw In=Zl,oc}else e.flags&=-16777217}function ch(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wp(t))if(Dh())e.flags|=8192;else throw In=Zl,oc}function fo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Tt():536870912,e.lanes|=t,Yr|=t)}function Fs(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Dy(e,t,n){var r=t.pendingProps;switch(Ii(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ga(rt),G(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(kr(t)?Ya(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ec())),Ze(t),null;case 26:var c=t.type,u=t.memoizedState;return e===null?(Ya(t),u!==null?(Ze(t),ch(t,u)):(Ze(t),Fc(t,c,null,r,n))):u?u!==e.memoizedState?(Ya(t),Ze(t),ch(t,u)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Ya(t),Ze(t),Fc(t,c,e,r,n)),null;case 27:if(Se(t),n=me.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ya(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ze(t),null}e=I.current,kr(t)?Qf(t):(e=xp(c,r,n),t.stateNode=e,Ya(t))}return Ze(t),null;case 5:if(Se(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ya(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ze(t),null}if(u=I.current,kr(t))Qf(t);else{var h=To(me.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof r.is=="string"?h.createElement("select",{is:r.is}):h.createElement("select"),r.multiple?u.multiple=!0:r.size&&(u.size=r.size);break;default:u=typeof r.is=="string"?h.createElement(c,{is:r.is}):h.createElement(c)}}u[St]=t,u[qt]=r;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(Et(u,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Ya(t)}}return Ze(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ya(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(e=me.current,kr(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,c=Nt,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||sp(e.nodeValue,n)),e||un(t,!0)}else e=To(e).createTextNode(r),e[St]=t,t.stateNode=e}return Ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=kr(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[St]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else n=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(i(558))}return Ze(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=kr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[St]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),c=!1}else c=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==c&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fo(t,t.updateQueue),Ze(t),null);case 4:return G(),e===null&&fu(t.stateNode.containerInfo),Ze(t),null;case 10:return Ga(t.type),Ze(t),null;case 19:if(X(tt),r=t.memoizedState,r===null)return Ze(t),null;if(c=(t.flags&128)!==0,u=r.rendering,u===null)if(c)Fs(r,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Il(e),u!==null){for(t.flags|=128,Fs(r,!1),e=u.updateQueue,t.updateQueue=e,fo(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Uf(n,e),n=n.sibling;return K(tt,tt.current&1|2),Ue&&qa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&At()>vo&&(t.flags|=128,c=!0,Fs(r,!1),t.lanes=4194304)}else{if(!c)if(e=Il(u),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,fo(t,e),Fs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!u.alternate&&!Ue)return Ze(t),null}else 2*At()-r.renderingStartTime>vo&&n!==536870912&&(t.flags|=128,c=!0,Fs(r,!1),t.lanes=4194304);r.isBackwards?(u.sibling=t.child,t.child=u):(e=r.last,e!==null?e.sibling=u:t.child=u,r.last=u)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=At(),e.sibling=null,n=tt.current,K(tt,c?n&1|2:n&1),Ue&&qa(t,r.treeForkCount),e):(Ze(t),null);case 22:case 23:return Wt(t),mc(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),n=t.updateQueue,n!==null&&fo(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&X(Jn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ga(rt),Ze(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ly(e,t){switch(Ii(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ga(rt),G(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(i(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(tt),null;case 4:return G(),null;case 10:return Ga(t.type),null;case 22:case 23:return Wt(t),mc(),e!==null&&X(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ga(rt),null;case 25:return null;default:return null}}function uh(e,t){switch(Ii(t),t.tag){case 3:Ga(rt),G();break;case 26:case 27:case 5:Se(t);break;case 4:G();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:X(tt);break;case 10:Ga(t.type);break;case 22:case 23:Wt(t),mc(),e!==null&&X(Jn);break;case 24:Ga(rt)}}function Ys(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var c=r.next;n=c;do{if((n.tag&e)===e){r=void 0;var u=n.create,h=n.inst;r=u(),h.destroy=r}n=n.next}while(n!==c)}}catch(b){Qe(t,t.return,b)}}function vn(e,t,n){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var u=c.next;r=u;do{if((r.tag&e)===e){var h=r.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,c=t;var T=n,U=b;try{U()}catch($){Qe(c,T,$)}}}r=r.next}while(r!==u)}}catch($){Qe(t,t.return,$)}}function dh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{tm(t,n)}catch(r){Qe(e,e.return,r)}}}function fh(e,t,n){n.props=tr(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Qe(e,t,r)}}function Xs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(c){Qe(e,t,c)}}function Ma(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(c){Qe(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){Qe(e,t,c)}else n.current=null}function mh(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(c){Qe(e,e.return,c)}}function Yc(e,t,n){try{var r=e.stateNode;rb(r,e.type,n,t),r[qt]=t}catch(c){Qe(e,e.return,c)}}function hh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wn(e.type)||e.tag===4}function Xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hh(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&&wn(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 Kc(e,t,n){var r=e.tag;if(r===5||r===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=La));else if(r!==4&&(r===27&&wn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function mo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&wn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(mo(e,t,n),e=e.sibling;e!==null;)mo(e,t,n),e=e.sibling}function ph(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Et(t,r,n),t[St]=e,t[qt]=n}catch(u){Qe(e,e.return,u)}}var Xa=!1,ot=!1,Zc=!1,xh=typeof WeakSet=="function"?WeakSet:Set,vt=null;function Uy(e,t){if(e=e.containerInfo,pu=zo,e=_f(e),Gi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var c=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var h=0,b=-1,T=-1,U=0,$=0,P=e,B=null;t:for(;;){for(var Q;P!==n||c!==0&&P.nodeType!==3||(b=h+c),P!==u||r!==0&&P.nodeType!==3||(T=h+r),P.nodeType===3&&(h+=P.nodeValue.length),(Q=P.firstChild)!==null;)B=P,P=Q;for(;;){if(P===e)break t;if(B===n&&++U===c&&(b=h),B===u&&++$===r&&(T=h),(Q=P.nextSibling)!==null)break;P=B,B=P.parentNode}P=Q}n=b===-1||T===-1?null:{start:b,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(xu={focusedElem:e,selectionRange:n},zo=!1,vt=t;vt!==null;)if(t=vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,vt=e;else for(;vt!==null;){switch(t=vt,u=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<e.length;n++)c=e[n],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,c=u.memoizedProps,u=u.memoizedState,r=n.stateNode;try{var oe=tr(n.type,c);e=r.getSnapshotBeforeUpdate(oe,u),r.__reactInternalSnapshotBeforeUpdate=e}catch(be){Qe(n,n.return,be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)yu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":yu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,vt=e;break}vt=t.return}}function vh(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Za(e,n),r&4&&Ys(5,n);break;case 1:if(Za(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(h){Qe(n,n.return,h)}else{var c=tr(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Qe(n,n.return,h)}}r&64&&dh(n),r&512&&Xs(n,n.return);break;case 3:if(Za(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{tm(e,t)}catch(h){Qe(n,n.return,h)}}break;case 27:t===null&&r&4&&ph(n);case 26:case 5:Za(e,n),t===null&&r&4&&mh(n),r&512&&Xs(n,n.return);break;case 12:Za(e,n);break;case 31:Za(e,n),r&4&&bh(e,n);break;case 13:Za(e,n),r&4&&Sh(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xy.bind(null,n),fb(e,n))));break;case 22:if(r=n.memoizedState!==null||Xa,!r){t=t!==null&&t.memoizedState!==null||ot,c=Xa;var u=ot;Xa=r,(ot=t)&&!u?$a(e,n,(n.subtreeFlags&8772)!==0):Za(e,n),Xa=c,ot=u}break;case 30:break;default:Za(e,n)}}function gh(e){var t=e.alternate;t!==null&&(e.alternate=null,gh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,Gt=!1;function Ka(e,t,n){for(n=n.child;n!==null;)yh(e,t,n),n=n.sibling}function yh(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Bn,n)}catch{}switch(n.tag){case 26:ot||Ma(n,t),Ka(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ot||Ma(n,t);var r=Je,c=Gt;wn(n.type)&&(Je=n.stateNode,Gt=!1),Ka(e,t,n),tl(n.stateNode),Je=r,Gt=c;break;case 5:ot||Ma(n,t);case 6:if(r=Je,c=Gt,Je=null,Ka(e,t,n),Je=r,Gt=c,Je!==null)if(Gt)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode)}catch(u){Qe(n,t,u)}else try{Je.removeChild(n.stateNode)}catch(u){Qe(n,t,u)}break;case 18:Je!==null&&(Gt?(e=Je,dp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Wr(e)):dp(Je,n.stateNode));break;case 4:r=Je,c=Gt,Je=n.stateNode.containerInfo,Gt=!0,Ka(e,t,n),Je=r,Gt=c;break;case 0:case 11:case 14:case 15:vn(2,n,t),ot||vn(4,n,t),Ka(e,t,n);break;case 1:ot||(Ma(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&fh(n,t,r)),Ka(e,t,n);break;case 21:Ka(e,t,n);break;case 22:ot=(r=ot)||n.memoizedState!==null,Ka(e,t,n),ot=r;break;default:Ka(e,t,n)}}function bh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wr(e)}catch(n){Qe(t,t.return,n)}}}function Sh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wr(e)}catch(n){Qe(t,t.return,n)}}function By(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xh),t;default:throw Error(i(435,e.tag))}}function ho(e,t){var n=By(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var c=Ky.bind(null,e,r);r.then(c,c)}})}function Qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var c=n[r],u=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(wn(b.type)){Je=b.stateNode,Gt=!1;break e}break;case 5:Je=b.stateNode,Gt=!1;break e;case 3:case 4:Je=b.stateNode.containerInfo,Gt=!0;break e}b=b.return}if(Je===null)throw Error(i(160));yh(u,h,c),Je=null,Gt=!1,u=c.alternate,u!==null&&(u.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nh(t,e),t=t.sibling}var Sa=null;function Nh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Vt(e),r&4&&(vn(3,e,e.return),Ys(3,e),vn(5,e,e.return));break;case 1:Qt(t,e),Vt(e),r&512&&(ot||n===null||Ma(n,n.return)),r&64&&Xa&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var c=Sa;if(Qt(t,e),Vt(e),r&512&&(ot||n===null||Ma(n,n.return)),r&4){var u=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":u=c.getElementsByTagName("title")[0],(!u||u[ys]||u[St]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=c.createElement(r),c.head.insertBefore(u,c.querySelector("head > title"))),Et(u,r,n),u[St]=e,xt(u),r=u;break e;case"link":var h=Np("link","href",c).get(r+(n.href||""));if(h){for(var b=0;b<h.length;b++)if(u=h[b],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){h.splice(b,1);break t}}u=c.createElement(r),Et(u,r,n),c.head.appendChild(u);break;case"meta":if(h=Np("meta","content",c).get(r+(n.content||""))){for(b=0;b<h.length;b++)if(u=h[b],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){h.splice(b,1);break t}}u=c.createElement(r),Et(u,r,n),c.head.appendChild(u);break;default:throw Error(i(468,r))}u[St]=e,xt(u),r=u}e.stateNode=r}else jp(c,e.type,e.stateNode);else e.stateNode=Sp(c,r,e.memoizedProps);else u!==r?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,r===null?jp(c,e.type,e.stateNode):Sp(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Qt(t,e),Vt(e),r&512&&(ot||n===null||Ma(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Qt(t,e),Vt(e),r&512&&(ot||n===null||Ma(n,n.return)),e.flags&32){c=e.stateNode;try{Nr(c,"")}catch(oe){Qe(e,e.return,oe)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,Yc(e,c,n!==null?n.memoizedProps:c)),r&1024&&(Zc=!0);break;case 6:if(Qt(t,e),Vt(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(oe){Qe(e,e.return,oe)}}break;case 3:if(Mo=null,c=Sa,Sa=_o(t.containerInfo),Qt(t,e),Sa=c,Vt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wr(t.containerInfo)}catch(oe){Qe(e,e.return,oe)}Zc&&(Zc=!1,jh(e));break;case 4:r=Sa,Sa=_o(e.stateNode.containerInfo),Qt(t,e),Vt(e),Sa=r;break;case 12:Qt(t,e),Vt(e);break;case 31:Qt(t,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ho(e,r)));break;case 13:Qt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(xo=At()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ho(e,r)));break;case 22:c=e.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,U=Xa,$=ot;if(Xa=U||c,ot=$||T,Qt(t,e),ot=$,Xa=U,Vt(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(n===null||T||Xa||ot||ar(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){T=n=t;try{if(u=T.stateNode,c)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=T.stateNode;var P=T.memoizedProps.style,B=P!=null&&P.hasOwnProperty("display")?P.display:null;b.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(oe){Qe(T,T.return,oe)}}}else if(t.tag===6){if(n===null){T=t;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(oe){Qe(T,T.return,oe)}}}else if(t.tag===18){if(n===null){T=t;try{var Q=T.stateNode;c?fp(Q,!0):fp(T.stateNode,!1)}catch(oe){Qe(T,T.return,oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ho(e,n))));break;case 19:Qt(t,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ho(e,r)));break;case 30:break;case 21:break;default:Qt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(hh(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode,u=Xc(e);mo(e,u,c);break;case 5:var h=n.stateNode;n.flags&32&&(Nr(h,""),n.flags&=-33);var b=Xc(e);mo(e,b,h);break;case 3:case 4:var T=n.stateNode.containerInfo,U=Xc(e);Kc(e,U,T);break;default:throw Error(i(161))}}catch($){Qe(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Za(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vh(e,t.alternate,t),t=t.sibling}function ar(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:vn(4,t,t.return),ar(t);break;case 1:Ma(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&fh(t,t.return,n),ar(t);break;case 27:tl(t.stateNode);case 26:case 5:Ma(t,t.return),ar(t);break;case 22:t.memoizedState===null&&ar(t);break;case 30:ar(t);break;default:ar(t)}e=e.sibling}}function $a(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:$a(c,u,n),Ys(4,u);break;case 1:if($a(c,u,n),r=u,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(U){Qe(r,r.return,U)}if(r=u,c=r.updateQueue,c!==null){var b=r.stateNode;try{var T=c.shared.hiddenCallbacks;if(T!==null)for(c.shared.hiddenCallbacks=null,c=0;c<T.length;c++)em(T[c],b)}catch(U){Qe(r,r.return,U)}}n&&h&64&&dh(u),Xs(u,u.return);break;case 27:ph(u);case 26:case 5:$a(c,u,n),n&&r===null&&h&4&&mh(u),Xs(u,u.return);break;case 12:$a(c,u,n);break;case 31:$a(c,u,n),n&&h&4&&bh(c,u);break;case 13:$a(c,u,n),n&&h&4&&Sh(c,u);break;case 22:u.memoizedState===null&&$a(c,u,n),Xs(u,u.return);break;case 30:break;default:$a(c,u,n)}t=t.sibling}}function $c(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ks(n))}function Jc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ks(e))}function Na(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wh(e,t,n,r),t=t.sibling}function wh(e,t,n,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Na(e,t,n,r),c&2048&&Ys(9,t);break;case 1:Na(e,t,n,r);break;case 3:Na(e,t,n,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ks(e)));break;case 12:if(c&2048){Na(e,t,n,r),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,b=u.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Qe(t,t.return,T)}}else Na(e,t,n,r);break;case 31:Na(e,t,n,r);break;case 13:Na(e,t,n,r);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?Na(e,t,n,r):Ks(e,t):u._visibility&2?Na(e,t,n,r):(u._visibility|=2,Qr(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&$c(h,t);break;case 24:Na(e,t,n,r),c&2048&&Jc(t.alternate,t);break;default:Na(e,t,n,r)}}function Qr(e,t,n,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,b=n,T=r,U=h.flags;switch(h.tag){case 0:case 11:case 15:Qr(u,h,b,T,c),Ys(8,h);break;case 23:break;case 22:var $=h.stateNode;h.memoizedState!==null?$._visibility&2?Qr(u,h,b,T,c):Ks(u,h):($._visibility|=2,Qr(u,h,b,T,c)),c&&U&2048&&$c(h.alternate,h);break;case 24:Qr(u,h,b,T,c),c&&U&2048&&Jc(h.alternate,h);break;default:Qr(u,h,b,T,c)}t=t.sibling}}function Ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,c=r.flags;switch(r.tag){case 22:Ks(n,r),c&2048&&$c(r.alternate,r);break;case 24:Ks(n,r),c&2048&&Jc(r.alternate,r);break;default:Ks(n,r)}t=t.sibling}}var Zs=8192;function Vr(e,t,n){if(e.subtreeFlags&Zs)for(e=e.child;e!==null;)Eh(e,t,n),e=e.sibling}function Eh(e,t,n){switch(e.tag){case 26:Vr(e,t,n),e.flags&Zs&&e.memoizedState!==null&&wb(n,Sa,e.memoizedState,e.memoizedProps);break;case 5:Vr(e,t,n);break;case 3:case 4:var r=Sa;Sa=_o(e.stateNode.containerInfo),Vr(e,t,n),Sa=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Zs,Zs=16777216,Vr(e,t,n),Zs=r):Vr(e,t,n));break;default:Vr(e,t,n)}}function Ch(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function $s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];vt=r,_h(r,e)}Ch(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Th(e),e=e.sibling}function Th(e){switch(e.tag){case 0:case 11:case 15:$s(e),e.flags&2048&&vn(9,e,e.return);break;case 3:$s(e);break;case 12:$s(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,po(e)):$s(e);break;default:$s(e)}}function po(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];vt=r,_h(r,e)}Ch(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:vn(8,t,t.return),po(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,po(t));break;default:po(t)}e=e.sibling}}function _h(e,t){for(;vt!==null;){var n=vt;switch(n.tag){case 0:case 11:case 15:vn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ks(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,vt=r;else e:for(n=e;vt!==null;){r=vt;var c=r.sibling,u=r.return;if(gh(r),r===n){vt=null;break e}if(c!==null){c.return=u,vt=c;break e}vt=u}}}var qy={getCacheForType:function(e){var t=jt(rt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return jt(rt).controller.signal}},Hy=typeof WeakMap=="function"?WeakMap:Map,He=0,Xe=null,Oe=null,De=0,Ge=0,ea=null,gn=!1,Fr=!1,Pc=!1,Ja=0,et=0,yn=0,nr=0,Ic=0,ta=0,Yr=0,Js=null,Ft=null,Wc=!1,xo=0,Rh=0,vo=1/0,go=null,bn=null,ct=0,Sn=null,Xr=null,Pa=0,eu=0,tu=null,Mh=null,Ps=0,au=null;function aa(){return(He&2)!==0&&De!==0?De&-De:w.T!==null?iu():Ni()}function Ah(){if(ta===0)if((De&536870912)===0||Ue){var e=hr;hr<<=1,(hr&3932160)===0&&(hr=262144),ta=e}else ta=536870912;return e=It.current,e!==null&&(e.flags|=32),ta}function Yt(e,t,n){(e===Xe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(Kr(e,0),Nn(e,De,ta,!1)),Ie(e,n),((He&2)===0||e!==Xe)&&(e===Xe&&((He&2)===0&&(nr|=n),et===4&&Nn(e,De,ta,!1)),Aa(e))}function kh(e,t,n){if((He&6)!==0)throw Error(i(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$e(e,t),c=r?Vy(e,t):ru(e,t,!0),u=r;do{if(c===0){Fr&&!r&&Nn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!Gy(n)){c=ru(e,t,!1),u=!1;continue}if(c===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var b=e;c=Js;var T=b.current.memoizedState.isDehydrated;if(T&&(Kr(b,h).flags|=256),h=ru(b,h,!1),h!==2){if(Pc&&!T){b.errorRecoveryDisabledLanes|=u,nr|=u,c=4;break e}u=Ft,Ft=c,u!==null&&(Ft===null?Ft=u:Ft.push.apply(Ft,u))}c=h}if(u=!1,c!==2)continue}}if(c===1){Kr(e,0),Nn(e,t,0,!0);break}e:{switch(r=e,u=c,u){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Nn(r,t,ta,!gn);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=xo+300-At(),10<c)){if(Nn(r,t,ta,!gn),Ee(r,0,!0)!==0)break e;Pa=t,r.timeoutHandle=cp(Oh.bind(null,r,n,Ft,go,Wc,t,ta,nr,Yr,gn,u,"Throttled",-0,0),c);break e}Oh(r,n,Ft,go,Wc,t,ta,nr,Yr,gn,u,null,-0,0)}}break}while(!0);Aa(e)}function Oh(e,t,n,r,c,u,h,b,T,U,$,P,B,Q){if(e.timeoutHandle=-1,P=t.subtreeFlags,P&8192||(P&16785408)===16785408){P={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:La},Eh(t,u,P);var oe=(u&62914560)===u?xo-At():(u&4194048)===u?Rh-At():0;if(oe=Eb(P,oe),oe!==null){Pa=u,e.cancelPendingCommit=oe(Gh.bind(null,e,t,u,n,r,c,h,b,T,$,P,null,B,Q)),Nn(e,u,h,!U);return}}Gh(e,t,u,n,r,c,h,b,T)}function Gy(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var c=n[r],u=c.getSnapshot;c=c.value;try{if(!Jt(u(),c))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nn(e,t,n,r){t&=~Ic,t&=~nr,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var u=31-Ct(c),h=1<<u;r[u]=-1,c&=~h}n!==0&&Hn(e,n,t)}function yo(){return(He&6)===0?(Is(0),!1):!0}function nu(){if(Oe!==null){if(Ge===0)var e=Oe.return;else e=Oe,Ha=Zn=null,yc(e),Ur=null,zs=0,e=Oe;for(;e!==null;)uh(e.alternate,e),e=e.return;Oe=null}}function Kr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ob(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Pa=0,nu(),Xe=e,Oe=n=Ba(e.current,null),De=t,Ge=0,ea=null,gn=!1,Fr=$e(e,t),Pc=!1,Yr=ta=Ic=nr=yn=et=0,Ft=Js=null,Wc=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-Ct(r),u=1<<c;t|=e[c],r&=~u}return Ja=t,ql(),n}function zh(e,t){_e=null,w.H=Qs,t===Lr||t===Kl?(t=Jf(),Ge=3):t===oc?(t=Jf(),Ge=4):Ge=t===Dc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ea=t,Oe===null&&(et=1,oo(e,ca(t,e.current)))}function Dh(){var e=It.current;return e===null?!0:(De&4194048)===De?ma===null:(De&62914560)===De||(De&536870912)!==0?e===ma:!1}function Lh(){var e=w.H;return w.H=Qs,e===null?Qs:e}function Uh(){var e=w.A;return w.A=qy,e}function bo(){et=4,gn||(De&4194048)!==De&&It.current!==null||(Fr=!0),(yn&134217727)===0&&(nr&134217727)===0||Xe===null||Nn(Xe,De,ta,!1)}function ru(e,t,n){var r=He;He|=2;var c=Lh(),u=Uh();(Xe!==e||De!==t)&&(go=null,Kr(e,t)),t=!1;var h=et;e:do try{if(Ge!==0&&Oe!==null){var b=Oe,T=ea;switch(Ge){case 8:nu(),h=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(t=!0);var U=Ge;if(Ge=0,ea=null,Zr(e,b,T,U),n&&Fr){h=0;break e}break;default:U=Ge,Ge=0,ea=null,Zr(e,b,T,U)}}Qy(),h=et;break}catch($){zh(e,$)}while(!0);return t&&e.shellSuspendCounter++,Ha=Zn=null,He=r,w.H=c,w.A=u,Oe===null&&(Xe=null,De=0,ql()),h}function Qy(){for(;Oe!==null;)Bh(Oe)}function Vy(e,t){var n=He;He|=2;var r=Lh(),c=Uh();Xe!==e||De!==t?(go=null,vo=At()+500,Kr(e,t)):Fr=$e(e,t);e:do try{if(Ge!==0&&Oe!==null){t=Oe;var u=ea;t:switch(Ge){case 1:Ge=0,ea=null,Zr(e,t,u,1);break;case 2:case 9:if(Zf(u)){Ge=0,ea=null,qh(t);break}t=function(){Ge!==2&&Ge!==9||Xe!==e||(Ge=7),Aa(e)},u.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Zf(u)?(Ge=0,ea=null,qh(t)):(Ge=0,ea=null,Zr(e,t,u,7));break;case 5:var h=null;switch(Oe.tag){case 26:h=Oe.memoizedState;case 5:case 27:var b=Oe;if(h?wp(h):b.stateNode.complete){Ge=0,ea=null;var T=b.sibling;if(T!==null)Oe=T;else{var U=b.return;U!==null?(Oe=U,So(U)):Oe=null}break t}}Ge=0,ea=null,Zr(e,t,u,5);break;case 6:Ge=0,ea=null,Zr(e,t,u,6);break;case 8:nu(),et=6;break e;default:throw Error(i(462))}}Fy();break}catch($){zh(e,$)}while(!0);return Ha=Zn=null,w.H=r,w.A=c,He=n,Oe!==null?0:(Xe=null,De=0,ql(),et)}function Fy(){for(;Oe!==null&&!Mt();)Bh(Oe)}function Bh(e){var t=ih(e.alternate,e,Ja);e.memoizedProps=e.pendingProps,t===null?So(e):Oe=t}function qh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=ah(n,t,t.pendingProps,t.type,void 0,De);break;case 11:t=ah(n,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:yc(t);default:uh(n,t),t=Oe=Uf(t,Ja),t=ih(n,t,Ja)}e.memoizedProps=e.pendingProps,t===null?So(e):Oe=t}function Zr(e,t,n,r){Ha=Zn=null,yc(t),Ur=null,zs=0;var c=t.return;try{if(ky(e,c,t,n,De)){et=1,oo(e,ca(n,e.current)),Oe=null;return}}catch(u){if(c!==null)throw Oe=c,u;et=1,oo(e,ca(n,e.current)),Oe=null;return}t.flags&32768?(Ue||r===1?e=!0:Fr||(De&536870912)!==0?e=!1:(gn=e=!0,(r===2||r===9||r===3||r===6)&&(r=It.current,r!==null&&r.tag===13&&(r.flags|=16384))),Hh(t,e)):So(t)}function So(e){var t=e;do{if((t.flags&32768)!==0){Hh(t,gn);return}e=t.return;var n=Dy(t.alternate,t,Ja);if(n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);et===0&&(et=5)}function Hh(e,t){do{var n=Ly(e.alternate,e);if(n!==null){n.flags&=32767,Oe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=n}while(e!==null);et=6,Oe=null}function Gh(e,t,n,r,c,u,h,b,T){e.cancelPendingCommit=null;do No();while(ct!==0);if((He&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(u=t.lanes|t.childLanes,u|=Xi,Lt(e,n,u,h,b,T),e===Xe&&(Oe=Xe=null,De=0),Xr=t,Sn=e,Pa=n,eu=u,tu=c,Mh=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zy(Un,function(){return Xh(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=w.T,w.T=null,c=Y.p,Y.p=2,h=He,He|=4;try{Uy(e,t,n)}finally{He=h,Y.p=c,w.T=r}}ct=1,Qh(),Vh(),Fh()}}function Qh(){if(ct===1){ct=0;var e=Sn,t=Xr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=w.T,w.T=null;var r=Y.p;Y.p=2;var c=He;He|=4;try{Nh(t,e);var u=xu,h=_f(e.containerInfo),b=u.focusedElem,T=u.selectionRange;if(h!==b&&b&&b.ownerDocument&&Tf(b.ownerDocument.documentElement,b)){if(T!==null&&Gi(b)){var U=T.start,$=T.end;if($===void 0&&($=U),"selectionStart"in b)b.selectionStart=U,b.selectionEnd=Math.min($,b.value.length);else{var P=b.ownerDocument||document,B=P&&P.defaultView||window;if(B.getSelection){var Q=B.getSelection(),oe=b.textContent.length,be=Math.min(T.start,oe),Ye=T.end===void 0?be:Math.min(T.end,oe);!Q.extend&&be>Ye&&(h=Ye,Ye=be,be=h);var O=Cf(b,be),M=Cf(b,Ye);if(O&&M&&(Q.rangeCount!==1||Q.anchorNode!==O.node||Q.anchorOffset!==O.offset||Q.focusNode!==M.node||Q.focusOffset!==M.offset)){var L=P.createRange();L.setStart(O.node,O.offset),Q.removeAllRanges(),be>Ye?(Q.addRange(L),Q.extend(M.node,M.offset)):(L.setEnd(M.node,M.offset),Q.addRange(L))}}}}for(P=[],Q=b;Q=Q.parentNode;)Q.nodeType===1&&P.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<P.length;b++){var J=P[b];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}zo=!!pu,xu=pu=null}finally{He=c,Y.p=r,w.T=n}}e.current=t,ct=2}}function Vh(){if(ct===2){ct=0;var e=Sn,t=Xr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=w.T,w.T=null;var r=Y.p;Y.p=2;var c=He;He|=4;try{vh(e,t.alternate,t)}finally{He=c,Y.p=r,w.T=n}}ct=3}}function Fh(){if(ct===4||ct===3){ct=0,an();var e=Sn,t=Xr,n=Pa,r=Mh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,Xr=Sn=null,Yh(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(bn=null),ya(n),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Bn,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=w.T,c=Y.p,Y.p=2,w.T=null;try{for(var u=e.onRecoverableError,h=0;h<r.length;h++){var b=r[h];u(b.value,{componentStack:b.stack})}}finally{w.T=t,Y.p=c}}(Pa&3)!==0&&No(),Aa(e),c=e.pendingLanes,(n&261930)!==0&&(c&42)!==0?e===au?Ps++:(Ps=0,au=e):Ps=0,Is(0)}}function Yh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ks(t)))}function No(){return Qh(),Vh(),Fh(),Xh()}function Xh(){if(ct!==5)return!1;var e=Sn,t=eu;eu=0;var n=ya(Pa),r=w.T,c=Y.p;try{Y.p=32>n?32:n,w.T=null,n=tu,tu=null;var u=Sn,h=Pa;if(ct=0,Xr=Sn=null,Pa=0,(He&6)!==0)throw Error(i(331));var b=He;if(He|=4,Th(u.current),wh(u,u.current,h,n),He=b,Is(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Bn,u)}catch{}return!0}finally{Y.p=c,w.T=r,Yh(e,t)}}function Kh(e,t,n){t=ca(n,t),t=zc(e.stateNode,t,2),e=hn(e,t,2),e!==null&&(Ie(e,2),Aa(e))}function Qe(e,t,n){if(e.tag===3)Kh(e,e,n);else for(;t!==null;){if(t.tag===3){Kh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=ca(n,e),n=Zm(2),r=hn(t,n,2),r!==null&&($m(n,r,t,e),Ie(r,2),Aa(r));break}}t=t.return}}function su(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hy;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(n)||(Pc=!0,c.add(n),e=Yy.bind(null,e,t,n),t.then(e,e))}function Yy(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xe===e&&(De&n)===n&&(et===4||et===3&&(De&62914560)===De&&300>At()-xo?(He&2)===0&&Kr(e,0):Ic|=n,Yr===De&&(Yr=0)),Aa(e)}function Zh(e,t){t===0&&(t=Tt()),e=Yn(e,t),e!==null&&(Ie(e,t),Aa(e))}function Xy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zh(e,n)}function Ky(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Zh(e,n)}function Zy(e,t){return ps(e,t)}var jo=null,$r=null,lu=!1,wo=!1,ou=!1,jn=0;function Aa(e){e!==$r&&e.next===null&&($r===null?jo=$r=e:$r=$r.next=e),wo=!0,lu||(lu=!0,Jy())}function Is(e,t){if(!ou&&wo){ou=!0;do for(var n=!1,r=jo;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var u=0;else{var h=r.suspendedLanes,b=r.pingedLanes;u=(1<<31-Ct(42|e)+1)-1,u&=c&~(h&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Ih(r,u))}else u=De,u=Ee(r,r===Xe?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(u&3)===0||$e(r,u)||(n=!0,Ih(r,u));r=r.next}while(n);ou=!1}}function $y(){$h()}function $h(){wo=lu=!1;var e=0;jn!==0&&lb()&&(e=jn);for(var t=At(),n=null,r=jo;r!==null;){var c=r.next,u=Jh(r,t);u===0?(r.next=null,n===null?jo=c:n.next=c,c===null&&($r=n)):(n=r,(e!==0||(u&3)!==0)&&(wo=!0)),r=c}ct!==0&&ct!==5||Is(e),jn!==0&&(jn=0)}function Jh(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-Ct(u),b=1<<h,T=c[h];T===-1?((b&n)===0||(b&r)!==0)&&(c[h]=pt(b,t)):T<=t&&(e.expiredLanes|=b),u&=~b}if(t=Xe,n=De,n=Ee(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xs(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||$e(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xs(r),ya(n)){case 2:case 8:n=Cl;break;case 32:n=Un;break;case 268435456:n=za;break;default:n=Un}return r=Ph.bind(null,e),n=ps(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xs(r),e.callbackPriority=2,e.callbackNode=null,2}function Ph(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(No()&&e.callbackNode!==n)return null;var r=De;return r=Ee(e,e===Xe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(kh(e,r,t),Jh(e,At()),e.callbackNode!=null&&e.callbackNode===n?Ph.bind(null,e):null)}function Ih(e,t){if(No())return null;kh(e,t,!0)}function Jy(){ib(function(){(He&6)!==0?ps(Ln,$y):$h()})}function iu(){if(jn===0){var e=zr;e===0&&(e=mr,mr<<=1,(mr&261888)===0&&(mr=256)),jn=e}return jn}function Wh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Al(""+e)}function ep(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Py(e,t,n,r,c){if(t==="submit"&&n&&n.stateNode===c){var u=Wh((c[qt]||null).action),h=r.submitter;h&&(t=(t=h[qt]||null)?Wh(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var b=new Dl("action","action",null,r,c);e.push({event:b,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(jn!==0){var T=h?ep(c,h):new FormData(c);_c(n,{pending:!0,data:T,method:c.method,action:u},null,T)}}else typeof u=="function"&&(b.preventDefault(),T=h?ep(c,h):new FormData(c),_c(n,{pending:!0,data:T,method:c.method,action:u},u,T))},currentTarget:c}]})}}for(var cu=0;cu<Yi.length;cu++){var uu=Yi[cu],Iy=uu.toLowerCase(),Wy=uu[0].toUpperCase()+uu.slice(1);ba(Iy,"on"+Wy)}ba(Af,"onAnimationEnd"),ba(kf,"onAnimationIteration"),ba(Of,"onAnimationStart"),ba("dblclick","onDoubleClick"),ba("focusin","onFocus"),ba("focusout","onBlur"),ba(py,"onTransitionRun"),ba(xy,"onTransitionStart"),ba(vy,"onTransitionCancel"),ba(zf,"onTransitionEnd"),br("onMouseEnter",["mouseout","mouseover"]),br("onMouseLeave",["mouseout","mouseover"]),br("onPointerEnter",["pointerout","pointerover"]),br("onPointerLeave",["pointerout","pointerover"]),Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ws="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ws));function tp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],c=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var h=r.length-1;0<=h;h--){var b=r[h],T=b.instance,U=b.currentTarget;if(b=b.listener,T!==u&&c.isPropagationStopped())break e;u=b,c.currentTarget=U;try{u(c)}catch($){Bl($)}c.currentTarget=null,u=T}else for(h=0;h<r.length;h++){if(b=r[h],T=b.instance,U=b.currentTarget,b=b.listener,T!==u&&c.isPropagationStopped())break e;u=b,c.currentTarget=U;try{u(c)}catch($){Bl($)}c.currentTarget=null,u=T}}}}function ze(e,t){var n=t[ji];n===void 0&&(n=t[ji]=new Set);var r=e+"__bubble";n.has(r)||(ap(t,e,2,!1),n.add(r))}function du(e,t,n){var r=0;t&&(r|=4),ap(n,e,r,t)}var Eo="_reactListening"+Math.random().toString(36).slice(2);function fu(e){if(!e[Eo]){e[Eo]=!0,Zd.forEach(function(n){n!=="selectionchange"&&(eb.has(n)||du(n,!1,e),du(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eo]||(t[Eo]=!0,du("selectionchange",!1,t))}}function ap(e,t,n,r){switch(Ap(t)){case 2:var c=_b;break;case 8:c=Rb;break;default:c=Tu}n=c.bind(null,t,n,e),c=void 0,!ki||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function mu(e,t,n,r,c){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var h=r.tag;if(h===3||h===4){var b=r.stateNode.containerInfo;if(b===c)break;if(h===4)for(h=r.return;h!==null;){var T=h.tag;if((T===3||T===4)&&h.stateNode.containerInfo===c)return;h=h.return}for(;b!==null;){if(h=vr(b),h===null)return;if(T=h.tag,T===5||T===6||T===26||T===27){r=u=h;continue e}b=b.parentNode}}r=r.return}lf(function(){var U=u,$=Mi(n),P=[];e:{var B=Df.get(e);if(B!==void 0){var Q=Dl,oe=e;switch(e){case"keypress":if(Ol(n)===0)break e;case"keydown":case"keyup":Q=Kg;break;case"focusin":oe="focus",Q=Li;break;case"focusout":oe="blur",Q=Li;break;case"beforeblur":case"afterblur":Q=Li;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=uf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=Dg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=Jg;break;case Af:case kf:case Of:Q=Bg;break;case zf:Q=Ig;break;case"scroll":case"scrollend":Q=Og;break;case"wheel":Q=ey;break;case"copy":case"cut":case"paste":Q=Hg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=ff;break;case"toggle":case"beforetoggle":Q=ay}var be=(t&4)!==0,Ye=!be&&(e==="scroll"||e==="scrollend"),O=be?B!==null?B+"Capture":null:B;be=[];for(var M=U,L;M!==null;){var J=M;if(L=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||L===null||O===null||(J=Ss(M,O),J!=null&&be.push(el(M,J,L))),Ye)break;M=M.return}0<be.length&&(B=new Q(B,oe,null,n,$),P.push({event:B,listeners:be}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",B&&n!==Ri&&(oe=n.relatedTarget||n.fromElement)&&(vr(oe)||oe[xr]))break e;if((Q||B)&&(B=$.window===$?$:(B=$.ownerDocument)?B.defaultView||B.parentWindow:window,Q?(oe=n.relatedTarget||n.toElement,Q=U,oe=oe?vr(oe):null,oe!==null&&(Ye=f(oe),be=oe.tag,oe!==Ye||be!==5&&be!==27&&be!==6)&&(oe=null)):(Q=null,oe=U),Q!==oe)){if(be=uf,J="onMouseLeave",O="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(be=ff,J="onPointerLeave",O="onPointerEnter",M="pointer"),Ye=Q==null?B:bs(Q),L=oe==null?B:bs(oe),B=new be(J,M+"leave",Q,n,$),B.target=Ye,B.relatedTarget=L,J=null,vr($)===U&&(be=new be(O,M+"enter",oe,n,$),be.target=L,be.relatedTarget=Ye,J=be),Ye=J,Q&&oe)t:{for(be=tb,O=Q,M=oe,L=0,J=O;J;J=be(J))L++;J=0;for(var pe=M;pe;pe=be(pe))J++;for(;0<L-J;)O=be(O),L--;for(;0<J-L;)M=be(M),J--;for(;L--;){if(O===M||M!==null&&O===M.alternate){be=O;break t}O=be(O),M=be(M)}be=null}else be=null;Q!==null&&np(P,B,Q,be,!1),oe!==null&&Ye!==null&&np(P,Ye,oe,be,!0)}}e:{if(B=U?bs(U):window,Q=B.nodeName&&B.nodeName.toLowerCase(),Q==="select"||Q==="input"&&B.type==="file")var Be=bf;else if(gf(B))if(Sf)Be=fy;else{Be=uy;var de=cy}else Q=B.nodeName,!Q||Q.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?U&&_i(U.elementType)&&(Be=bf):Be=dy;if(Be&&(Be=Be(e,U))){yf(P,Be,n,$);break e}de&&de(e,B,U),e==="focusout"&&U&&B.type==="number"&&U.memoizedProps.value!=null&&Ti(B,"number",B.value)}switch(de=U?bs(U):window,e){case"focusin":(gf(de)||de.contentEditable==="true")&&(Cr=de,Qi=U,Rs=null);break;case"focusout":Rs=Qi=Cr=null;break;case"mousedown":Vi=!0;break;case"contextmenu":case"mouseup":case"dragend":Vi=!1,Rf(P,n,$);break;case"selectionchange":if(hy)break;case"keydown":case"keyup":Rf(P,n,$)}var Re;if(Bi)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Er?xf(e,n)&&(Le="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Le="onCompositionStart");Le&&(mf&&n.locale!=="ko"&&(Er||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Er&&(Re=of()):(ln=$,Oi="value"in ln?ln.value:ln.textContent,Er=!0)),de=Co(U,Le),0<de.length&&(Le=new df(Le,e,null,n,$),P.push({event:Le,listeners:de}),Re?Le.data=Re:(Re=vf(n),Re!==null&&(Le.data=Re)))),(Re=ry?sy(e,n):ly(e,n))&&(Le=Co(U,"onBeforeInput"),0<Le.length&&(de=new df("onBeforeInput","beforeinput",null,n,$),P.push({event:de,listeners:Le}),de.data=Re)),Py(P,e,U,n,$)}tp(P,t)})}function el(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Co(e,t){for(var n=t+"Capture",r=[];e!==null;){var c=e,u=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||u===null||(c=Ss(e,n),c!=null&&r.unshift(el(e,c,u)),c=Ss(e,t),c!=null&&r.push(el(e,c,u))),e.tag===3)return r;e=e.return}return[]}function tb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function np(e,t,n,r,c){for(var u=t._reactName,h=[];n!==null&&n!==r;){var b=n,T=b.alternate,U=b.stateNode;if(b=b.tag,T!==null&&T===r)break;b!==5&&b!==26&&b!==27||U===null||(T=U,c?(U=Ss(n,u),U!=null&&h.unshift(el(n,U,T))):c||(U=Ss(n,u),U!=null&&h.push(el(n,U,T)))),n=n.return}h.length!==0&&e.push({event:t,listeners:h})}var ab=/\r\n?/g,nb=/\u0000|\uFFFD/g;function rp(e){return(typeof e=="string"?e:""+e).replace(ab,`
|
|
9
|
-
`).replace(nb,"")}function sp(e,t){return t=rp(t),rp(e)===t}function Fe(e,t,n,r,c,u){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Nr(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Nr(e,""+r);break;case"className":Rl(e,"class",r);break;case"tabIndex":Rl(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Rl(e,n,r);break;case"style":rf(e,r,u);break;case"data":if(t!=="object"){Rl(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Al(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(t!=="input"&&Fe(e,t,"name",c.name,c,null),Fe(e,t,"formEncType",c.formEncType,c,null),Fe(e,t,"formMethod",c.formMethod,c,null),Fe(e,t,"formTarget",c.formTarget,c,null)):(Fe(e,t,"encType",c.encType,c,null),Fe(e,t,"method",c.method,c,null),Fe(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Al(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=La);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(n=r.__html,n!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=Al(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":ze("beforetoggle",e),ze("toggle",e),_l(e,"popover",r);break;case"xlinkActuate":Da(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Da(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Da(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Da(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Da(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Da(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Da(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Da(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Da(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":_l(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Ag.get(n)||n,_l(e,n,r))}}function hu(e,t,n,r,c,u){switch(n){case"style":rf(e,r,u);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(n=r.__html,n!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Nr(e,r):(typeof r=="number"||typeof r=="bigint")&&Nr(e,""+r);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"onClick":r!=null&&(e.onclick=La);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$d.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(c=n.endsWith("Capture"),t=n.slice(2,c?n.length-7:void 0),u=e[qt]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,c),typeof r=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,c);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):_l(e,n,r)}}}function Et(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var r=!1,c=!1,u;for(u in n)if(n.hasOwnProperty(u)){var h=n[u];if(h!=null)switch(u){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Fe(e,t,u,h,n,null)}}c&&Fe(e,t,"srcSet",n.srcSet,n,null),r&&Fe(e,t,"src",n.src,n,null);return;case"input":ze("invalid",e);var b=u=h=c=null,T=null,U=null;for(r in n)if(n.hasOwnProperty(r)){var $=n[r];if($!=null)switch(r){case"name":c=$;break;case"type":h=$;break;case"checked":T=$;break;case"defaultChecked":U=$;break;case"value":u=$;break;case"defaultValue":b=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(i(137,t));break;default:Fe(e,t,r,$,n,null)}}ef(e,u,b,T,U,h,c,!1);return;case"select":ze("invalid",e),r=h=u=null;for(c in n)if(n.hasOwnProperty(c)&&(b=n[c],b!=null))switch(c){case"value":u=b;break;case"defaultValue":h=b;break;case"multiple":r=b;default:Fe(e,t,c,b,n,null)}t=u,n=h,e.multiple=!!r,t!=null?Sr(e,!!r,t,!1):n!=null&&Sr(e,!!r,n,!0);return;case"textarea":ze("invalid",e),u=c=r=null;for(h in n)if(n.hasOwnProperty(h)&&(b=n[h],b!=null))switch(h){case"value":r=b;break;case"defaultValue":c=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(i(91));break;default:Fe(e,t,h,b,n,null)}af(e,r,c,u);return;case"option":for(T in n)n.hasOwnProperty(T)&&(r=n[T],r!=null)&&(T==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":Fe(e,t,T,r,n,null));return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(r=0;r<Ws.length;r++)ze(Ws[r],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in n)if(n.hasOwnProperty(U)&&(r=n[U],r!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Fe(e,t,U,r,n,null)}return;default:if(_i(t)){for($ in n)n.hasOwnProperty($)&&(r=n[$],r!==void 0&&hu(e,t,$,r,n,void 0));return}}for(b in n)n.hasOwnProperty(b)&&(r=n[b],r!=null&&Fe(e,t,b,r,n,null))}function rb(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,u=null,h=null,b=null,T=null,U=null,$=null;for(Q in n){var P=n[Q];if(n.hasOwnProperty(Q)&&P!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":T=P;default:r.hasOwnProperty(Q)||Fe(e,t,Q,null,r,P)}}for(var B in r){var Q=r[B];if(P=n[B],r.hasOwnProperty(B)&&(Q!=null||P!=null))switch(B){case"type":u=Q;break;case"name":c=Q;break;case"checked":U=Q;break;case"defaultChecked":$=Q;break;case"value":h=Q;break;case"defaultValue":b=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,t));break;default:Q!==P&&Fe(e,t,B,Q,r,P)}}Ci(e,h,b,T,U,$,u,c);return;case"select":Q=h=b=B=null;for(u in n)if(T=n[u],n.hasOwnProperty(u)&&T!=null)switch(u){case"value":break;case"multiple":Q=T;default:r.hasOwnProperty(u)||Fe(e,t,u,null,r,T)}for(c in r)if(u=r[c],T=n[c],r.hasOwnProperty(c)&&(u!=null||T!=null))switch(c){case"value":B=u;break;case"defaultValue":b=u;break;case"multiple":h=u;default:u!==T&&Fe(e,t,c,u,r,T)}t=b,n=h,r=Q,B!=null?Sr(e,!!n,B,!1):!!r!=!!n&&(t!=null?Sr(e,!!n,t,!0):Sr(e,!!n,n?[]:"",!1));return;case"textarea":Q=B=null;for(b in n)if(c=n[b],n.hasOwnProperty(b)&&c!=null&&!r.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Fe(e,t,b,null,r,c)}for(h in r)if(c=r[h],u=n[h],r.hasOwnProperty(h)&&(c!=null||u!=null))switch(h){case"value":B=c;break;case"defaultValue":Q=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==u&&Fe(e,t,h,c,r,u)}tf(e,B,Q);return;case"option":for(var oe in n)B=n[oe],n.hasOwnProperty(oe)&&B!=null&&!r.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:Fe(e,t,oe,null,r,B));for(T in r)B=r[T],Q=n[T],r.hasOwnProperty(T)&&B!==Q&&(B!=null||Q!=null)&&(T==="selected"?e.selected=B&&typeof B!="function"&&typeof B!="symbol":Fe(e,t,T,B,r,Q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in n)B=n[be],n.hasOwnProperty(be)&&B!=null&&!r.hasOwnProperty(be)&&Fe(e,t,be,null,r,B);for(U in r)if(B=r[U],Q=n[U],r.hasOwnProperty(U)&&B!==Q&&(B!=null||Q!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(i(137,t));break;default:Fe(e,t,U,B,r,Q)}return;default:if(_i(t)){for(var Ye in n)B=n[Ye],n.hasOwnProperty(Ye)&&B!==void 0&&!r.hasOwnProperty(Ye)&&hu(e,t,Ye,void 0,r,B);for($ in r)B=r[$],Q=n[$],!r.hasOwnProperty($)||B===Q||B===void 0&&Q===void 0||hu(e,t,$,B,r,Q);return}}for(var O in n)B=n[O],n.hasOwnProperty(O)&&B!=null&&!r.hasOwnProperty(O)&&Fe(e,t,O,null,r,B);for(P in r)B=r[P],Q=n[P],!r.hasOwnProperty(P)||B===Q||B==null&&Q==null||Fe(e,t,P,B,r,Q)}function lp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var c=n[r],u=c.transferSize,h=c.initiatorType,b=c.duration;if(u&&b&&lp(h)){for(h=0,b=c.responseEnd,r+=1;r<n.length;r++){var T=n[r],U=T.startTime;if(U>b)break;var $=T.transferSize,P=T.initiatorType;$&&lp(P)&&(T=T.responseEnd,h+=$*(T<b?1:(b-U)/(T-U)))}if(--r,t+=8*(u+h)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var pu=null,xu=null;function To(e){return e.nodeType===9?e:e.ownerDocument}function op(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ip(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function vu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gu=null;function lb(){var e=window.event;return e&&e.type==="popstate"?e===gu?!1:(gu=e,!0):(gu=null,!1)}var cp=typeof setTimeout=="function"?setTimeout:void 0,ob=typeof clearTimeout=="function"?clearTimeout:void 0,up=typeof Promise=="function"?Promise:void 0,ib=typeof queueMicrotask=="function"?queueMicrotask:typeof up<"u"?function(e){return up.resolve(null).then(e).catch(cb)}:cp;function cb(e){setTimeout(function(){throw e})}function wn(e){return e==="head"}function dp(e,t){var n=t,r=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(c),Wr(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")tl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,tl(n);for(var u=n.firstChild;u;){var h=u.nextSibling,b=u.nodeName;u[ys]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=h}}else n==="body"&&tl(e.ownerDocument.body);n=c}while(n);Wr(t)}function fp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function yu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":yu(n),wi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function ub(e,t,n,r){for(;e.nodeType===1;){var c=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ys])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=ha(e.nextSibling),e===null)break}return null}function db(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ha(e.nextSibling),e===null))return null;return e}function mp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ha(e.nextSibling),e===null))return null;return e}function bu(e){return e.data==="$?"||e.data==="$~"}function Su(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function fb(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function ha(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Nu=null;function hp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ha(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function pp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function xp(e,t,n){switch(t=To(n),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function tl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wi(e)}var pa=new Map,vp=new Set;function _o(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ia=Y.d;Y.d={f:mb,r:hb,D:pb,C:xb,L:vb,m:gb,X:bb,S:yb,M:Sb};function mb(){var e=Ia.f(),t=yo();return e||t}function hb(e){var t=gr(e);t!==null&&t.tag===5&&t.type==="form"?zm(t):Ia.r(e)}var Jr=typeof document>"u"?null:document;function gp(e,t,n){var r=Jr;if(r&&typeof t=="string"&&t){var c=oa(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),vp.has(c)||(vp.add(c),e={rel:e,crossOrigin:n,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),Et(t,"link",e),xt(t),r.head.appendChild(t)))}}function pb(e){Ia.D(e),gp("dns-prefetch",e,null)}function xb(e,t){Ia.C(e,t),gp("preconnect",e,t)}function vb(e,t,n){Ia.L(e,t,n);var r=Jr;if(r&&e&&t){var c='link[rel="preload"][as="'+oa(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+oa(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+oa(n.imageSizes)+'"]')):c+='[href="'+oa(e)+'"]';var u=c;switch(t){case"style":u=Pr(e);break;case"script":u=Ir(e)}pa.has(u)||(e=x({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),pa.set(u,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(al(u))||t==="script"&&r.querySelector(nl(u))||(t=r.createElement("link"),Et(t,"link",e),xt(t),r.head.appendChild(t)))}}function gb(e,t){Ia.m(e,t);var n=Jr;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+oa(r)+'"][href="'+oa(e)+'"]',u=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ir(e)}if(!pa.has(u)&&(e=x({rel:"modulepreload",href:e},t),pa.set(u,e),n.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(nl(u)))return}r=n.createElement("link"),Et(r,"link",e),xt(r),n.head.appendChild(r)}}}function yb(e,t,n){Ia.S(e,t,n);var r=Jr;if(r&&e){var c=yr(r).hoistableStyles,u=Pr(e);t=t||"default";var h=c.get(u);if(!h){var b={loading:0,preload:null};if(h=r.querySelector(al(u)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},n),(n=pa.get(u))&&ju(e,n);var T=h=r.createElement("link");xt(T),Et(T,"link",e),T._p=new Promise(function(U,$){T.onload=U,T.onerror=$}),T.addEventListener("load",function(){b.loading|=1}),T.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Ro(h,t,r)}h={type:"stylesheet",instance:h,count:1,state:b},c.set(u,h)}}}function bb(e,t){Ia.X(e,t);var n=Jr;if(n&&e){var r=yr(n).hoistableScripts,c=Ir(e),u=r.get(c);u||(u=n.querySelector(nl(c)),u||(e=x({src:e,async:!0},t),(t=pa.get(c))&&wu(e,t),u=n.createElement("script"),xt(u),Et(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(c,u))}}function Sb(e,t){Ia.M(e,t);var n=Jr;if(n&&e){var r=yr(n).hoistableScripts,c=Ir(e),u=r.get(c);u||(u=n.querySelector(nl(c)),u||(e=x({src:e,async:!0,type:"module"},t),(t=pa.get(c))&&wu(e,t),u=n.createElement("script"),xt(u),Et(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(c,u))}}function yp(e,t,n,r){var c=(c=me.current)?_o(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Pr(n.href),n=yr(c).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Pr(n.href);var u=yr(c).hoistableStyles,h=u.get(e);if(h||(c=c.ownerDocument||c,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=c.querySelector(al(e)))&&!u._p&&(h.instance=u,h.state.loading=5),pa.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},pa.set(e,n),u||Nb(c,e,n,h.state))),t&&r===null)throw Error(i(528,""));return h}if(t&&r!==null)throw Error(i(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ir(n),n=yr(c).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pr(e){return'href="'+oa(e)+'"'}function al(e){return'link[rel="stylesheet"]['+e+"]"}function bp(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Nb(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Et(t,"link",n),xt(t),e.head.appendChild(t))}function Ir(e){return'[src="'+oa(e)+'"]'}function nl(e){return"script[async]"+e}function Sp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+oa(n.href)+'"]');if(r)return t.instance=r,xt(r),r;var c=x({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),xt(r),Et(r,"style",c),Ro(r,n.precedence,e),t.instance=r;case"stylesheet":c=Pr(n.href);var u=e.querySelector(al(c));if(u)return t.state.loading|=4,t.instance=u,xt(u),u;r=bp(n),(c=pa.get(c))&&ju(r,c),u=(e.ownerDocument||e).createElement("link"),xt(u);var h=u;return h._p=new Promise(function(b,T){h.onload=b,h.onerror=T}),Et(u,"link",r),t.state.loading|=4,Ro(u,n.precedence,e),t.instance=u;case"script":return u=Ir(n.src),(c=e.querySelector(nl(u)))?(t.instance=c,xt(c),c):(r=n,(c=pa.get(u))&&(r=x({},n),wu(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),xt(c),Et(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Ro(r,n.precedence,e));return t.instance}function Ro(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,u=c,h=0;h<r.length;h++){var b=r[h];if(b.dataset.precedence===t)u=b;else if(u!==c)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Mo=null;function Np(e,t,n){if(Mo===null){var r=new Map,c=Mo=new Map;c.set(n,r)}else c=Mo,r=c.get(n),r||(r=new Map,c.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),c=0;c<n.length;c++){var u=n[c];if(!(u[ys]||u[St]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var b=r.get(h);b?b.push(u):r.set(h,[u])}}return r}function jp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function jb(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function wb(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var c=Pr(r.href),u=t.querySelector(al(c));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ao.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,xt(u);return}u=t.ownerDocument||t,r=bp(r),(c=pa.get(c))&&ju(r,c),u=u.createElement("link"),xt(u);var h=u;h._p=new Promise(function(b,T){h.onload=b,h.onerror=T}),Et(u,"link",r),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ao.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Eu=0;function Eb(e,t){return e.stylesheets&&e.count===0&&Oo(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Oo(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Eu===0&&(Eu=62500*sb());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oo(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Eu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function Ao(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ko=null;function Oo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ko=new Map,t.forEach(Cb,e),ko=null,Ao.call(e))}function Cb(e,t){if(!(t.state.loading&4)){var n=ko.get(e);if(n)var r=n.get(null);else{n=new Map,ko.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<c.length;u++){var h=c[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),r=h)}r&&n.set(null,r)}c=t.instance,h=c.getAttribute("data-precedence"),u=n.get(h)||r,u===r&&n.set(null,c),n.set(h,c),this.count++,r=Ao.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),u?u.parentNode.insertBefore(c,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var rl={$$typeof:F,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function Tb(e,t,n,r,c,u,h,b,T){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rn(0),this.hiddenUpdates=rn(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Ep(e,t,n,r,c,u,h,b,T,U,$,P){return e=new Tb(e,t,n,h,T,U,$,P,b),t=1,u===!0&&(t|=24),u=Pt(3,null,null,t),e.current=u,u.stateNode=e,t=rc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:r,isDehydrated:n,cache:t},ic(u),e}function Cp(e){return e?(e=Rr,e):Rr}function Tp(e,t,n,r,c,u){c=Cp(c),r.context===null?r.context=c:r.pendingContext=c,r=mn(t),r.payload={element:n},u=u===void 0?null:u,u!==null&&(r.callback=u),n=hn(e,r,t),n!==null&&(Yt(n,e,t),Ls(n,e,t))}function _p(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Cu(e,t){_p(e,t),(e=e.alternate)&&_p(e,t)}function Rp(e){if(e.tag===13||e.tag===31){var t=Yn(e,67108864);t!==null&&Yt(t,e,67108864),Cu(e,67108864)}}function Mp(e){if(e.tag===13||e.tag===31){var t=aa();t=pr(t);var n=Yn(e,t);n!==null&&Yt(n,e,t),Cu(e,t)}}var zo=!0;function _b(e,t,n,r){var c=w.T;w.T=null;var u=Y.p;try{Y.p=2,Tu(e,t,n,r)}finally{Y.p=u,w.T=c}}function Rb(e,t,n,r){var c=w.T;w.T=null;var u=Y.p;try{Y.p=8,Tu(e,t,n,r)}finally{Y.p=u,w.T=c}}function Tu(e,t,n,r){if(zo){var c=_u(r);if(c===null)mu(e,t,r,Do,n),kp(e,r);else if(Ab(c,e,t,n,r))r.stopPropagation();else if(kp(e,r),t&4&&-1<Mb.indexOf(e)){for(;c!==null;){var u=gr(c);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=Ta(u.pendingLanes);if(h!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var T=1<<31-Ct(h);b.entanglements[1]|=T,h&=~T}Aa(u),(He&6)===0&&(vo=At()+500,Is(0))}}break;case 31:case 13:b=Yn(u,2),b!==null&&Yt(b,u,2),yo(),Cu(u,2)}if(u=_u(r),u===null&&mu(e,t,r,Do,n),u===c)break;c=u}c!==null&&r.stopPropagation()}else mu(e,t,r,null,n)}}function _u(e){return e=Mi(e),Ru(e)}var Do=null;function Ru(e){if(Do=null,e=vr(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=v(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Do=e,null}function Ap(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(bi()){case Ln:return 2;case Cl:return 8;case Un:case vs:return 32;case za:return 268435456;default:return 32}default:return 32}}var Mu=!1,En=null,Cn=null,Tn=null,sl=new Map,ll=new Map,_n=[],Mb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function kp(e,t){switch(e){case"focusin":case"focusout":En=null;break;case"dragenter":case"dragleave":Cn=null;break;case"mouseover":case"mouseout":Tn=null;break;case"pointerover":case"pointerout":sl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ll.delete(t.pointerId)}}function ol(e,t,n,r,c,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:u,targetContainers:[c]},t!==null&&(t=gr(t),t!==null&&Rp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Ab(e,t,n,r,c){switch(t){case"focusin":return En=ol(En,e,t,n,r,c),!0;case"dragenter":return Cn=ol(Cn,e,t,n,r,c),!0;case"mouseover":return Tn=ol(Tn,e,t,n,r,c),!0;case"pointerover":var u=c.pointerId;return sl.set(u,ol(sl.get(u)||null,e,t,n,r,c)),!0;case"gotpointercapture":return u=c.pointerId,ll.set(u,ol(ll.get(u)||null,e,t,n,r,c)),!0}return!1}function Op(e){var t=vr(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,Xd(e.priority,function(){Mp(n)});return}}else if(t===31){if(t=v(n),t!==null){e.blockedOn=t,Xd(e.priority,function(){Mp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_u(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ri=r,n.target.dispatchEvent(r),Ri=null}else return t=gr(n),t!==null&&Rp(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){Lo(e)&&n.delete(t)}function kb(){Mu=!1,En!==null&&Lo(En)&&(En=null),Cn!==null&&Lo(Cn)&&(Cn=null),Tn!==null&&Lo(Tn)&&(Tn=null),sl.forEach(zp),ll.forEach(zp)}function Uo(e,t){e.blockedOn===t&&(e.blockedOn=null,Mu||(Mu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,kb)))}var Bo=null;function Dp(e){Bo!==e&&(Bo=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Bo===e&&(Bo=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(Ru(r||n)===null)continue;break}var u=gr(n);u!==null&&(e.splice(t,3),t-=3,_c(u,{pending:!0,data:c,method:n.method,action:r},r,c))}}))}function Wr(e){function t(T){return Uo(T,e)}En!==null&&Uo(En,e),Cn!==null&&Uo(Cn,e),Tn!==null&&Uo(Tn,e),sl.forEach(t),ll.forEach(t);for(var n=0;n<_n.length;n++){var r=_n[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<_n.length&&(n=_n[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&_n.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var c=n[r],u=n[r+1],h=c[qt]||null;if(typeof u=="function")h||Dp(n);else if(h){var b=null;if(u&&u.hasAttribute("formAction")){if(c=u,h=u[qt]||null)b=h.formAction;else if(Ru(c)!==null)continue}else b=h.action;typeof b=="function"?n[r+1]=b:(n.splice(r,3),r-=3),Dp(n)}}}function Lp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return c=h})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Au(e){this._internalRoot=e}qo.prototype.render=Au.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current,r=aa();Tp(n,r,e,t,null,null)},qo.prototype.unmount=Au.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tp(e.current,2,null,e,null,null),yo(),t[xr]=null}};function qo(e){this._internalRoot=e}qo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ni();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_n.length&&t!==0&&t<_n[n].priority;n++);_n.splice(n,0,e),n===0&&Op(e)}};var Up=s.version;if(Up!=="19.2.4")throw Error(i(527,Up,"19.2.4"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Ob={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ho=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ho.isDisabled&&Ho.supportsFiber)try{Bn=Ho.inject(Ob),kt=Ho}catch{}}return cl.createRoot=function(e,t){if(!d(e))throw Error(i(299));var n=!1,r="",c=Fm,u=Ym,h=Xm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Ep(e,1,!1,null,null,n,r,null,c,u,h,Lp),e[xr]=t.current,fu(e),new Au(t)},cl.hydrateRoot=function(e,t,n){if(!d(e))throw Error(i(299));var r=!1,c="",u=Fm,h=Ym,b=Xm,T=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),t=Ep(e,1,!0,t,n??null,r,c,T,u,h,b,Lp),t.context=Cp(null),n=t.current,r=aa(),r=pr(r),c=mn(r),c.callback=null,hn(n,c,r),n=r,t.current.lanes=n,Ie(t,n),Aa(t),e[xr]=t.current,fu(e),new qo(t)},cl.version="19.2.4",cl}var Kp;function Qb(){if(Kp)return zu.exports;Kp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),zu.exports=Gb(),zu.exports}var Vb=Qb();var Zp="popstate";function Fb(a={}){function s(i,d){let{pathname:f,search:m,hash:v}=i.location;return ed("",{pathname:f,search:m,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function o(i,d){return typeof d=="string"?d:vl(d)}return Xb(s,o,null,a)}function Pe(a,s){if(a===!1||a===null||typeof a>"u")throw new Error(s)}function ja(a,s){if(!a){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function Yb(){return Math.random().toString(36).substring(2,10)}function $p(a,s){return{usr:a.state,key:a.key,idx:s}}function ed(a,s,o=null,i){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof s=="string"?os(s):s,state:o,key:s&&s.key||i||Yb()}}function vl({pathname:a="/",search:s="",hash:o=""}){return s&&s!=="?"&&(a+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(a+=o.charAt(0)==="#"?o:"#"+o),a}function os(a){let s={};if(a){let o=a.indexOf("#");o>=0&&(s.hash=a.substring(o),a=a.substring(0,o));let i=a.indexOf("?");i>=0&&(s.search=a.substring(i),a=a.substring(0,i)),a&&(s.pathname=a)}return s}function Xb(a,s,o,i={}){let{window:d=document.defaultView,v5Compat:f=!1}=i,m=d.history,v="POP",g=null,p=y();p==null&&(p=0,m.replaceState({...m.state,idx:p},""));function y(){return(m.state||{idx:null}).idx}function x(){v="POP";let C=y(),k=C==null?null:C-p;p=C,g&&g({action:v,location:E.location,delta:k})}function N(C,k){v="PUSH";let A=ed(E.location,C,k);p=y()+1;let F=$p(A,p),H=E.createHref(A);try{m.pushState(F,"",H)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;d.location.assign(H)}f&&g&&g({action:v,location:E.location,delta:1})}function R(C,k){v="REPLACE";let A=ed(E.location,C,k);p=y();let F=$p(A,p),H=E.createHref(A);m.replaceState(F,"",H),f&&g&&g({action:v,location:E.location,delta:0})}function j(C){return Kb(C)}let E={get action(){return v},get location(){return a(d,m)},listen(C){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(Zp,x),g=C,()=>{d.removeEventListener(Zp,x),g=null}},createHref(C){return s(d,C)},createURL:j,encodeLocation(C){let k=j(C);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:N,replace:R,go(C){return m.go(C)}};return E}function Kb(a,s=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(o,"No window.location.(origin|href) available to create URL");let i=typeof a=="string"?a:vl(a);return i=i.replace(/ $/,"%20"),!s&&i.startsWith("//")&&(i=o+i),new URL(i,o)}function $x(a,s,o="/"){return Zb(a,s,o,!1)}function Zb(a,s,o,i){let d=typeof s=="string"?os(s):s,f=tn(d.pathname||"/",o);if(f==null)return null;let m=Jx(a);$b(m);let v=null;for(let g=0;v==null&&g<m.length;++g){let p=l0(f);v=r0(m[g],p,i)}return v}function Jx(a,s=[],o=[],i="",d=!1){let f=(m,v,g=d,p)=>{let y={relativePath:p===void 0?m.path||"":p,caseSensitive:m.caseSensitive===!0,childrenIndex:v,route:m};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&g)return;Pe(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let x=en([i,y.relativePath]),N=o.concat(y);m.children&&m.children.length>0&&(Pe(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Jx(m.children,s,N,x,g)),!(m.path==null&&!m.index)&&s.push({path:x,score:a0(x,m.index),routesMeta:N})};return a.forEach((m,v)=>{if(m.path===""||!m.path?.includes("?"))f(m,v);else for(let g of Px(m.path))f(m,v,!0,g)}),s}function Px(a){let s=a.split("/");if(s.length===0)return[];let[o,...i]=s,d=o.endsWith("?"),f=o.replace(/\?$/,"");if(i.length===0)return d?[f,""]:[f];let m=Px(i.join("/")),v=[];return v.push(...m.map(g=>g===""?f:[f,g].join("/"))),d&&v.push(...m),v.map(g=>a.startsWith("/")&&g===""?"/":g)}function $b(a){a.sort((s,o)=>s.score!==o.score?o.score-s.score:n0(s.routesMeta.map(i=>i.childrenIndex),o.routesMeta.map(i=>i.childrenIndex)))}var Jb=/^:[\w-]+$/,Pb=3,Ib=2,Wb=1,e0=10,t0=-2,Jp=a=>a==="*";function a0(a,s){let o=a.split("/"),i=o.length;return o.some(Jp)&&(i+=t0),s&&(i+=Ib),o.filter(d=>!Jp(d)).reduce((d,f)=>d+(Jb.test(f)?Pb:f===""?Wb:e0),i)}function n0(a,s){return a.length===s.length&&a.slice(0,-1).every((i,d)=>i===s[d])?a[a.length-1]-s[s.length-1]:0}function r0(a,s,o=!1){let{routesMeta:i}=a,d={},f="/",m=[];for(let v=0;v<i.length;++v){let g=i[v],p=v===i.length-1,y=f==="/"?s:s.slice(f.length)||"/",x=ai({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},y),N=g.route;if(!x&&p&&o&&!i[i.length-1].route.index&&(x=ai({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!x)return null;Object.assign(d,x.params),m.push({params:d,pathname:en([f,x.pathname]),pathnameBase:u0(en([f,x.pathnameBase])),route:N}),x.pathnameBase!=="/"&&(f=en([f,x.pathnameBase]))}return m}function ai(a,s){typeof a=="string"&&(a={path:a,caseSensitive:!1,end:!0});let[o,i]=s0(a.path,a.caseSensitive,a.end),d=s.match(o);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),v=d.slice(1);return{params:i.reduce((p,{paramName:y,isOptional:x},N)=>{if(y==="*"){let j=v[N]||"";m=f.slice(0,f.length-j.length).replace(/(.)\/+$/,"$1")}const R=v[N];return x&&!R?p[y]=void 0:p[y]=(R||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:m,pattern:a}}function s0(a,s=!1,o=!0){ja(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let i=[],d="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,v,g)=>(i.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(i.push({paramName:"*"}),d+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?d+="\\/*$":a!==""&&a!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,s?void 0:"i"),i]}function l0(a){try{return a.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return ja(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),a}}function tn(a,s){if(s==="/")return a;if(!a.toLowerCase().startsWith(s.toLowerCase()))return null;let o=s.endsWith("/")?s.length-1:s.length,i=a.charAt(o);return i&&i!=="/"?null:a.slice(o)||"/"}var o0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function i0(a,s="/"){let{pathname:o,search:i="",hash:d=""}=typeof a=="string"?os(a):a,f;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?f=Pp(o.substring(1),"/"):f=Pp(o,s)):f=s,{pathname:f,search:d0(i),hash:f0(d)}}function Pp(a,s){let o=s.replace(/\/+$/,"").split("/");return a.split("/").forEach(d=>{d===".."?o.length>1&&o.pop():d!=="."&&o.push(d)}),o.length>1?o.join("/"):"/"}function Bu(a,s,o,i){return`Cannot include a '${a}' character in a manually specified \`to.${s}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function c0(a){return a.filter((s,o)=>o===0||s.route.path&&s.route.path.length>0)}function gd(a){let s=c0(a);return s.map((o,i)=>i===s.length-1?o.pathname:o.pathnameBase)}function yd(a,s,o,i=!1){let d;typeof a=="string"?d=os(a):(d={...a},Pe(!d.pathname||!d.pathname.includes("?"),Bu("?","pathname","search",d)),Pe(!d.pathname||!d.pathname.includes("#"),Bu("#","pathname","hash",d)),Pe(!d.search||!d.search.includes("#"),Bu("#","search","hash",d)));let f=a===""||d.pathname==="",m=f?"/":d.pathname,v;if(m==null)v=o;else{let x=s.length-1;if(!i&&m.startsWith("..")){let N=m.split("/");for(;N[0]==="..";)N.shift(),x-=1;d.pathname=N.join("/")}v=x>=0?s[x]:"/"}let g=i0(d,v),p=m&&m!=="/"&&m.endsWith("/"),y=(f||m===".")&&o.endsWith("/");return!g.pathname.endsWith("/")&&(p||y)&&(g.pathname+="/"),g}var en=a=>a.join("/").replace(/\/\/+/g,"/"),u0=a=>a.replace(/\/+$/,"").replace(/^\/*/,"/"),d0=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,f0=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a,m0=class{constructor(a,s,o,i=!1){this.status=a,this.statusText=s||"",this.internal=i,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function h0(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}function p0(a){return a.map(s=>s.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ix=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wx(a,s){let o=a;if(typeof o!="string"||!o0.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let i=o,d=!1;if(Ix)try{let f=new URL(window.location.href),m=o.startsWith("//")?new URL(f.protocol+o):new URL(o),v=tn(m.pathname,s);m.origin===f.origin&&v!=null?o=v+m.search+m.hash:d=!0}catch{ja(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:d,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ev=["POST","PUT","PATCH","DELETE"];new Set(ev);var x0=["GET",...ev];new Set(x0);var is=S.createContext(null);is.displayName="DataRouter";var ci=S.createContext(null);ci.displayName="DataRouterState";var v0=S.createContext(!1),tv=S.createContext({isTransitioning:!1});tv.displayName="ViewTransition";var g0=S.createContext(new Map);g0.displayName="Fetchers";var y0=S.createContext(null);y0.displayName="Await";var sa=S.createContext(null);sa.displayName="Navigation";var yl=S.createContext(null);yl.displayName="Location";var va=S.createContext({outlet:null,matches:[],isDataRoute:!1});va.displayName="Route";var bd=S.createContext(null);bd.displayName="RouteError";var av="REACT_ROUTER_ERROR",b0="REDIRECT",S0="ROUTE_ERROR_RESPONSE";function N0(a){if(a.startsWith(`${av}:${b0}:{`))try{let s=JSON.parse(a.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function j0(a){if(a.startsWith(`${av}:${S0}:{`))try{let s=JSON.parse(a.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new m0(s.status,s.statusText,s.data)}catch{}}function w0(a,{relative:s}={}){Pe(cs(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:i}=S.useContext(sa),{hash:d,pathname:f,search:m}=bl(a,{relative:s}),v=f;return o!=="/"&&(v=f==="/"?o:en([o,f])),i.createHref({pathname:v,search:m,hash:d})}function cs(){return S.useContext(yl)!=null}function On(){return Pe(cs(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(yl).location}var nv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rv(a){S.useContext(sa).static||S.useLayoutEffect(a)}function wa(){let{isDataRoute:a}=S.useContext(va);return a?H0():E0()}function E0(){Pe(cs(),"useNavigate() may be used only in the context of a <Router> component.");let a=S.useContext(is),{basename:s,navigator:o}=S.useContext(sa),{matches:i}=S.useContext(va),{pathname:d}=On(),f=JSON.stringify(gd(i)),m=S.useRef(!1);return rv(()=>{m.current=!0}),S.useCallback((g,p={})=>{if(ja(m.current,nv),!m.current)return;if(typeof g=="number"){o.go(g);return}let y=yd(g,JSON.parse(f),d,p.relative==="path");a==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:en([s,y.pathname])),(p.replace?o.replace:o.push)(y,p.state,p)},[s,o,f,d,a])}var C0=S.createContext(null);function T0(a){let s=S.useContext(va).outlet;return S.useMemo(()=>s&&S.createElement(C0.Provider,{value:a},s),[s,a])}function _0(){let{matches:a}=S.useContext(va),s=a[a.length-1];return s?s.params:{}}function bl(a,{relative:s}={}){let{matches:o}=S.useContext(va),{pathname:i}=On(),d=JSON.stringify(gd(o));return S.useMemo(()=>yd(a,JSON.parse(d),i,s==="path"),[a,d,i,s])}function R0(a,s){return sv(a,s)}function sv(a,s,o,i,d){Pe(cs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=S.useContext(sa),{matches:m}=S.useContext(va),v=m[m.length-1],g=v?v.params:{},p=v?v.pathname:"/",y=v?v.pathnameBase:"/",x=v&&v.route;{let A=x&&x.path||"";ov(p,!x||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
-
|
|
11
|
-
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let N=On(),R;if(s){let A=typeof s=="string"?os(s):s;Pe(y==="/"||A.pathname?.startsWith(y),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${A.pathname}" was given in the \`location\` prop.`),R=A}else R=N;let j=R.pathname||"/",E=j;if(y!=="/"){let A=y.replace(/^\//,"").split("/");E="/"+j.replace(/^\//,"").split("/").slice(A.length).join("/")}let C=$x(a,{pathname:E});ja(x||C!=null,`No routes matched location "${R.pathname}${R.search}${R.hash}" `),ja(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${R.pathname}${R.search}${R.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=z0(C&&C.map(A=>Object.assign({},A,{params:Object.assign({},g,A.params),pathname:en([y,f.encodeLocation?f.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?y:en([y,f.encodeLocation?f.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),m,o,i,d);return s&&k?S.createElement(yl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...R},navigationType:"POP"}},k):k}function M0(){let a=q0(),s=h0(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),o=a instanceof Error?a.stack:null,i="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:i},f={padding:"2px 4px",backgroundColor:i},m=null;return console.error("Error handled by React Router default ErrorBoundary:",a),m=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},s),o?S.createElement("pre",{style:d},o):null,m)}var A0=S.createElement(M0,null),lv=class extends S.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,s){return s.location!==a.location||s.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:s.error,location:s.location,revalidation:a.revalidation||s.revalidation}}componentDidCatch(a,s){this.props.onError?this.props.onError(a,s):console.error("React Router caught the following error during render",a)}render(){let a=this.state.error;if(this.context&&typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){const o=j0(a.digest);o&&(a=o)}let s=a!==void 0?S.createElement(va.Provider,{value:this.props.routeContext},S.createElement(bd.Provider,{value:a,children:this.props.component})):this.props.children;return this.context?S.createElement(k0,{error:a},s):s}};lv.contextType=v0;var qu=new WeakMap;function k0({children:a,error:s}){let{basename:o}=S.useContext(sa);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let i=N0(s.digest);if(i){let d=qu.get(s);if(d)throw d;let f=Wx(i.location,o);if(Ix&&!qu.get(s))if(f.isExternal||i.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:i.replace}));throw qu.set(s,m),m}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return a}function O0({routeContext:a,match:s,children:o}){let i=S.useContext(is);return i&&i.static&&i.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(va.Provider,{value:a},o)}function z0(a,s=[],o=null,i=null,d=null){if(a==null){if(!o)return null;if(o.errors)a=o.matches;else if(s.length===0&&!o.initialized&&o.matches.length>0)a=o.matches;else return null}let f=a,m=o?.errors;if(m!=null){let y=f.findIndex(x=>x.route.id&&m?.[x.route.id]!==void 0);Pe(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,y+1))}let v=!1,g=-1;if(o)for(let y=0;y<f.length;y++){let x=f[y];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=y),x.route.id){let{loaderData:N,errors:R}=o,j=x.route.loader&&!N.hasOwnProperty(x.route.id)&&(!R||R[x.route.id]===void 0);if(x.route.lazy||j){v=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=o&&i?(y,x)=>{i(y,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:p0(o.matches),errorInfo:x})}:void 0;return f.reduceRight((y,x,N)=>{let R,j=!1,E=null,C=null;o&&(R=m&&x.route.id?m[x.route.id]:void 0,E=x.route.errorElement||A0,v&&(g<0&&N===0?(ov("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,C=null):g===N&&(j=!0,C=x.route.hydrateFallbackElement||null)));let k=s.concat(f.slice(0,N+1)),A=()=>{let F;return R?F=E:j?F=C:x.route.Component?F=S.createElement(x.route.Component,null):x.route.element?F=x.route.element:F=y,S.createElement(O0,{match:x,routeContext:{outlet:y,matches:k,isDataRoute:o!=null},children:F})};return o&&(x.route.ErrorBoundary||x.route.errorElement||N===0)?S.createElement(lv,{location:o.location,revalidation:o.revalidation,component:E,error:R,children:A(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:p}):A()},null)}function Sd(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function D0(a){let s=S.useContext(is);return Pe(s,Sd(a)),s}function L0(a){let s=S.useContext(ci);return Pe(s,Sd(a)),s}function U0(a){let s=S.useContext(va);return Pe(s,Sd(a)),s}function Nd(a){let s=U0(a),o=s.matches[s.matches.length-1];return Pe(o.route.id,`${a} can only be used on routes that contain a unique "id"`),o.route.id}function B0(){return Nd("useRouteId")}function q0(){let a=S.useContext(bd),s=L0("useRouteError"),o=Nd("useRouteError");return a!==void 0?a:s.errors?.[o]}function H0(){let{router:a}=D0("useNavigate"),s=Nd("useNavigate"),o=S.useRef(!1);return rv(()=>{o.current=!0}),S.useCallback(async(d,f={})=>{ja(o.current,nv),o.current&&(typeof d=="number"?await a.navigate(d):await a.navigate(d,{fromRouteId:s,...f}))},[a,s])}var Ip={};function ov(a,s,o){!s&&!Ip[a]&&(Ip[a]=!0,ja(!1,o))}S.memo(G0);function G0({routes:a,future:s,state:o,onError:i}){return sv(a,void 0,o,i,s)}function ni({to:a,replace:s,state:o,relative:i}){Pe(cs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=S.useContext(sa);ja(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=S.useContext(va),{pathname:m}=On(),v=wa(),g=yd(a,gd(f),m,i==="path"),p=JSON.stringify(g);return S.useEffect(()=>{v(JSON.parse(p),{replace:s,state:o,relative:i})},[v,p,i,s,o]),null}function Q0(a){return T0(a.context)}function dt(a){Pe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function V0({basename:a="/",children:s=null,location:o,navigationType:i="POP",navigator:d,static:f=!1,unstable_useTransitions:m}){Pe(!cs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=a.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:v,navigator:d,static:f,unstable_useTransitions:m,future:{}}),[v,d,f,m]);typeof o=="string"&&(o=os(o));let{pathname:p="/",search:y="",hash:x="",state:N=null,key:R="default"}=o,j=S.useMemo(()=>{let E=tn(p,v);return E==null?null:{location:{pathname:E,search:y,hash:x,state:N,key:R},navigationType:i}},[v,p,y,x,N,R,i]);return ja(j!=null,`<Router basename="${v}"> is not able to match the URL "${p}${y}${x}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:S.createElement(sa.Provider,{value:g},S.createElement(yl.Provider,{children:s,value:j}))}function F0({children:a,location:s}){return R0(td(a),s)}function td(a,s=[]){let o=[];return S.Children.forEach(a,(i,d)=>{if(!S.isValidElement(i))return;let f=[...s,d];if(i.type===S.Fragment){o.push.apply(o,td(i.props.children,f));return}Pe(i.type===dt,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pe(!i.props.index||!i.props.children,"An index route cannot have child routes.");let m={id:i.props.id||f.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(m.children=td(i.props.children,f)),o.push(m)}),o}var Jo="get",Po="application/x-www-form-urlencoded";function ui(a){return typeof HTMLElement<"u"&&a instanceof HTMLElement}function Y0(a){return ui(a)&&a.tagName.toLowerCase()==="button"}function X0(a){return ui(a)&&a.tagName.toLowerCase()==="form"}function K0(a){return ui(a)&&a.tagName.toLowerCase()==="input"}function Z0(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function $0(a,s){return a.button===0&&(!s||s==="_self")&&!Z0(a)}var Go=null;function J0(){if(Go===null)try{new FormData(document.createElement("form"),0),Go=!1}catch{Go=!0}return Go}var P0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Hu(a){return a!=null&&!P0.has(a)?(ja(!1,`"${a}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Po}"`),null):a}function I0(a,s){let o,i,d,f,m;if(X0(a)){let v=a.getAttribute("action");i=v?tn(v,s):null,o=a.getAttribute("method")||Jo,d=Hu(a.getAttribute("enctype"))||Po,f=new FormData(a)}else if(Y0(a)||K0(a)&&(a.type==="submit"||a.type==="image")){let v=a.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=a.getAttribute("formaction")||v.getAttribute("action");if(i=g?tn(g,s):null,o=a.getAttribute("formmethod")||v.getAttribute("method")||Jo,d=Hu(a.getAttribute("formenctype"))||Hu(v.getAttribute("enctype"))||Po,f=new FormData(v,a),!J0()){let{name:p,type:y,value:x}=a;if(y==="image"){let N=p?`${p}.`:"";f.append(`${N}x`,"0"),f.append(`${N}y`,"0")}else p&&f.append(p,x)}}else{if(ui(a))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Jo,i=null,d=Po,m=a}return f&&d==="text/plain"&&(m=f,f=void 0),{action:i,method:o.toLowerCase(),encType:d,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function jd(a,s){if(a===!1||a===null||typeof a>"u")throw new Error(s)}function W0(a,s,o,i){let d=typeof a=="string"?new URL(a,typeof window>"u"?"server://singlefetch/":window.location.origin):a;return o?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${i}`:d.pathname=`${d.pathname}.${i}`:d.pathname==="/"?d.pathname=`_root.${i}`:s&&tn(d.pathname,s)==="/"?d.pathname=`${s.replace(/\/$/,"")}/_root.${i}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${i}`,d}async function e1(a,s){if(a.id in s)return s[a.id];try{let o=await import(a.module);return s[a.id]=o,o}catch(o){return console.error(`Error loading route module \`${a.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function t1(a){return a==null?!1:a.href==null?a.rel==="preload"&&typeof a.imageSrcSet=="string"&&typeof a.imageSizes=="string":typeof a.rel=="string"&&typeof a.href=="string"}async function a1(a,s,o){let i=await Promise.all(a.map(async d=>{let f=s.routes[d.route.id];if(f){let m=await e1(f,o);return m.links?m.links():[]}return[]}));return l1(i.flat(1).filter(t1).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wp(a,s,o,i,d,f){let m=(g,p)=>o[p]?g.route.id!==o[p].route.id:!0,v=(g,p)=>o[p].pathname!==g.pathname||o[p].route.path?.endsWith("*")&&o[p].params["*"]!==g.params["*"];return f==="assets"?s.filter((g,p)=>m(g,p)||v(g,p)):f==="data"?s.filter((g,p)=>{let y=i.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(m(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(a,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function n1(a,s,{includeHydrateFallback:o}={}){return r1(a.map(i=>{let d=s.routes[i.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),o&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function r1(a){return[...new Set(a)]}function s1(a){let s={},o=Object.keys(a).sort();for(let i of o)s[i]=a[i];return s}function l1(a,s){let o=new Set;return new Set(s),a.reduce((i,d)=>{let f=JSON.stringify(s1(d));return o.has(f)||(o.add(f),i.push({key:f,link:d})),i},[])}function iv(){let a=S.useContext(is);return jd(a,"You must render this element inside a <DataRouterContext.Provider> element"),a}function o1(){let a=S.useContext(ci);return jd(a,"You must render this element inside a <DataRouterStateContext.Provider> element"),a}var wd=S.createContext(void 0);wd.displayName="FrameworkContext";function cv(){let a=S.useContext(wd);return jd(a,"You must render this element inside a <HydratedRouter> element"),a}function i1(a,s){let o=S.useContext(wd),[i,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:y,onTouchStart:x}=s,N=S.useRef(null);S.useEffect(()=>{if(a==="render"&&m(!0),a==="viewport"){let E=k=>{k.forEach(A=>{m(A.isIntersecting)})},C=new IntersectionObserver(E,{threshold:.5});return N.current&&C.observe(N.current),()=>{C.disconnect()}}},[a]),S.useEffect(()=>{if(i){let E=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(E)}}},[i]);let R=()=>{d(!0)},j=()=>{d(!1),m(!1)};return o?a!=="intent"?[f,N,{}]:[f,N,{onFocus:ul(v,R),onBlur:ul(g,j),onMouseEnter:ul(p,R),onMouseLeave:ul(y,j),onTouchStart:ul(x,R)}]:[!1,N,{}]}function ul(a,s){return o=>{a&&a(o),o.defaultPrevented||s(o)}}function c1({page:a,...s}){let{router:o}=iv(),i=S.useMemo(()=>$x(o.routes,a,o.basename),[o.routes,a,o.basename]);return i?S.createElement(d1,{page:a,matches:i,...s}):null}function u1(a){let{manifest:s,routeModules:o}=cv(),[i,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return a1(a,s,o).then(m=>{f||d(m)}),()=>{f=!0}},[a,s,o]),i}function d1({page:a,matches:s,...o}){let i=On(),{future:d,manifest:f,routeModules:m}=cv(),{basename:v}=iv(),{loaderData:g,matches:p}=o1(),y=S.useMemo(()=>Wp(a,s,p,f,i,"data"),[a,s,p,f,i]),x=S.useMemo(()=>Wp(a,s,p,f,i,"assets"),[a,s,p,f,i]),N=S.useMemo(()=>{if(a===i.pathname+i.search+i.hash)return[];let E=new Set,C=!1;if(s.forEach(A=>{let F=f.routes[A.route.id];!F||!F.hasLoader||(!y.some(H=>H.route.id===A.route.id)&&A.route.id in g&&m[A.route.id]?.shouldRevalidate||F.hasClientLoader?C=!0:E.add(A.route.id))}),E.size===0)return[];let k=W0(a,v,d.unstable_trailingSlashAwareDataRequests,"data");return C&&E.size>0&&k.searchParams.set("_routes",s.filter(A=>E.has(A.route.id)).map(A=>A.route.id).join(",")),[k.pathname+k.search]},[v,d.unstable_trailingSlashAwareDataRequests,g,i,f,y,s,a,m]),R=S.useMemo(()=>n1(x,f),[x,f]),j=u1(x);return S.createElement(S.Fragment,null,N.map(E=>S.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...o})),R.map(E=>S.createElement("link",{key:E,rel:"modulepreload",href:E,...o})),j.map(({key:E,link:C})=>S.createElement("link",{key:E,nonce:o.nonce,...C,crossOrigin:C.crossOrigin??o.crossOrigin})))}function f1(...a){return s=>{a.forEach(o=>{typeof o=="function"?o(s):o!=null&&(o.current=s)})}}var m1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{m1&&(window.__reactRouterVersion="7.13.0")}catch{}function h1({basename:a,children:s,unstable_useTransitions:o,window:i}){let d=S.useRef();d.current==null&&(d.current=Fb({window:i,v5Compat:!0}));let f=d.current,[m,v]=S.useState({action:f.action,location:f.location}),g=S.useCallback(p=>{o===!1?v(p):S.startTransition(()=>v(p))},[o]);return S.useLayoutEffect(()=>f.listen(g),[f,g]),S.createElement(V0,{basename:a,children:s,location:m.location,navigationType:m.action,navigator:f,unstable_useTransitions:o})}var uv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ed=S.forwardRef(function({onClick:s,discover:o="render",prefetch:i="none",relative:d,reloadDocument:f,replace:m,state:v,target:g,to:p,preventScrollReset:y,viewTransition:x,unstable_defaultShouldRevalidate:N,...R},j){let{basename:E,unstable_useTransitions:C}=S.useContext(sa),k=typeof p=="string"&&uv.test(p),A=Wx(p,E);p=A.to;let F=w0(p,{relative:d}),[H,ne,W]=i1(i,R),z=v1(p,{replace:m,state:v,target:g,preventScrollReset:y,relative:d,viewTransition:x,unstable_defaultShouldRevalidate:N,unstable_useTransitions:C});function q(je){s&&s(je),je.defaultPrevented||z(je)}let ae=S.createElement("a",{...R,...W,href:A.absoluteURL||F,onClick:A.isExternal||f?s:q,ref:f1(j,ne),target:g,"data-discover":!k&&o==="render"?"true":void 0});return H&&!k?S.createElement(S.Fragment,null,ae,S.createElement(c1,{page:F})):ae});Ed.displayName="Link";var dv=S.forwardRef(function({"aria-current":s="page",caseSensitive:o=!1,className:i="",end:d=!1,style:f,to:m,viewTransition:v,children:g,...p},y){let x=bl(m,{relative:p.relative}),N=On(),R=S.useContext(ci),{navigator:j,basename:E}=S.useContext(sa),C=R!=null&&N1(x)&&v===!0,k=j.encodeLocation?j.encodeLocation(x).pathname:x.pathname,A=N.pathname,F=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;o||(A=A.toLowerCase(),F=F?F.toLowerCase():null,k=k.toLowerCase()),F&&E&&(F=tn(F,E)||F);const H=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let ne=A===k||!d&&A.startsWith(k)&&A.charAt(H)==="/",W=F!=null&&(F===k||!d&&F.startsWith(k)&&F.charAt(k.length)==="/"),z={isActive:ne,isPending:W,isTransitioning:C},q=ne?s:void 0,ae;typeof i=="function"?ae=i(z):ae=[i,ne?"active":null,W?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let je=typeof f=="function"?f(z):f;return S.createElement(Ed,{...p,"aria-current":q,className:ae,ref:y,style:je,to:m,viewTransition:v},typeof g=="function"?g(z):g)});dv.displayName="NavLink";var p1=S.forwardRef(({discover:a="render",fetcherKey:s,navigate:o,reloadDocument:i,replace:d,state:f,method:m=Jo,action:v,onSubmit:g,relative:p,preventScrollReset:y,viewTransition:x,unstable_defaultShouldRevalidate:N,...R},j)=>{let{unstable_useTransitions:E}=S.useContext(sa),C=b1(),k=S1(v,{relative:p}),A=m.toLowerCase()==="get"?"get":"post",F=typeof v=="string"&&uv.test(v),H=ne=>{if(g&&g(ne),ne.defaultPrevented)return;ne.preventDefault();let W=ne.nativeEvent.submitter,z=W?.getAttribute("formmethod")||m,q=()=>C(W||ne.currentTarget,{fetcherKey:s,method:z,navigate:o,replace:d,state:f,relative:p,preventScrollReset:y,viewTransition:x,unstable_defaultShouldRevalidate:N});E&&o!==!1?S.startTransition(()=>q()):q()};return S.createElement("form",{ref:j,method:A,action:k,onSubmit:i?g:H,...R,"data-discover":!F&&a==="render"?"true":void 0})});p1.displayName="Form";function x1(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fv(a){let s=S.useContext(is);return Pe(s,x1(a)),s}function v1(a,{target:s,replace:o,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let p=wa(),y=On(),x=bl(a,{relative:f});return S.useCallback(N=>{if($0(N,s)){N.preventDefault();let R=o!==void 0?o:vl(y)===vl(x),j=()=>p(a,{replace:R,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:v});g?S.startTransition(()=>j()):j()}},[y,p,x,o,i,s,a,d,f,m,v,g])}var g1=0,y1=()=>`__${String(++g1)}__`;function b1(){let{router:a}=fv("useSubmit"),{basename:s}=S.useContext(sa),o=B0(),i=a.fetch,d=a.navigate;return S.useCallback(async(f,m={})=>{let{action:v,method:g,encType:p,formData:y,body:x}=I0(f,s);if(m.navigate===!1){let N=m.fetcherKey||y1();await i(N,o,m.action||v,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:x,formMethod:m.method||g,formEncType:m.encType||p,flushSync:m.flushSync})}else await d(m.action||v,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:x,formMethod:m.method||g,formEncType:m.encType||p,replace:m.replace,state:m.state,fromRouteId:o,flushSync:m.flushSync,viewTransition:m.viewTransition})},[i,d,s,o])}function S1(a,{relative:s}={}){let{basename:o}=S.useContext(sa),i=S.useContext(va);Pe(i,"useFormAction must be used inside a RouteContext");let[d]=i.matches.slice(-1),f={...bl(a||".",{relative:s})},m=On();if(a==null){f.search=m.search;let v=new URLSearchParams(f.search),g=v.getAll("index");if(g.some(y=>y==="")){v.delete("index"),g.filter(x=>x).forEach(x=>v.append("index",x));let y=v.toString();f.search=y?`?${y}`:""}}return(!a||a===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(f.pathname=f.pathname==="/"?o:en([o,f.pathname])),vl(f)}function N1(a,{relative:s}={}){let o=S.useContext(tv);Pe(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=fv("useViewTransitionState"),d=bl(a,{relative:s});if(!o.isTransitioning)return!1;let f=tn(o.currentLocation.pathname,i)||o.currentLocation.pathname,m=tn(o.nextLocation.pathname,i)||o.nextLocation.pathname;return ai(d.pathname,m)!=null||ai(d.pathname,f)!=null}var j1=Zx();const w1=Kx(j1);var us=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(){}},E1={setTimeout:(a,s)=>setTimeout(a,s),clearTimeout:a=>clearTimeout(a),setInterval:(a,s)=>setInterval(a,s),clearInterval:a=>clearInterval(a)},C1=class{#e=E1;#t=!1;setTimeoutProvider(a){this.#e=a}setTimeout(a,s){return this.#e.setTimeout(a,s)}clearTimeout(a){this.#e.clearTimeout(a)}setInterval(a,s){return this.#e.setInterval(a,s)}clearInterval(a){this.#e.clearInterval(a)}},sr=new C1;function T1(a){setTimeout(a,0)}var ir=typeof window>"u"||"Deno"in globalThis;function zt(){}function _1(a,s){return typeof a=="function"?a(s):a}function ad(a){return typeof a=="number"&&a>=0&&a!==1/0}function mv(a,s){return Math.max(a+(s||0)-Date.now(),0)}function An(a,s){return typeof a=="function"?a(s):a}function xa(a,s){return typeof a=="function"?a(s):a}function ex(a,s){const{type:o="all",exact:i,fetchStatus:d,predicate:f,queryKey:m,stale:v}=a;if(m){if(i){if(s.queryHash!==Cd(m,s.options))return!1}else if(!gl(s.queryKey,m))return!1}if(o!=="all"){const g=s.isActive();if(o==="active"&&!g||o==="inactive"&&g)return!1}return!(typeof v=="boolean"&&s.isStale()!==v||d&&d!==s.state.fetchStatus||f&&!f(s))}function tx(a,s){const{exact:o,status:i,predicate:d,mutationKey:f}=a;if(f){if(!s.options.mutationKey)return!1;if(o){if(cr(s.options.mutationKey)!==cr(f))return!1}else if(!gl(s.options.mutationKey,f))return!1}return!(i&&s.state.status!==i||d&&!d(s))}function Cd(a,s){return(s?.queryKeyHashFn||cr)(a)}function cr(a){return JSON.stringify(a,(s,o)=>nd(o)?Object.keys(o).sort().reduce((i,d)=>(i[d]=o[d],i),{}):o)}function gl(a,s){return a===s?!0:typeof a!=typeof s?!1:a&&s&&typeof a=="object"&&typeof s=="object"?Object.keys(s).every(o=>gl(a[o],s[o])):!1}var R1=Object.prototype.hasOwnProperty;function hv(a,s,o=0){if(a===s)return a;if(o>500)return s;const i=ax(a)&&ax(s);if(!i&&!(nd(a)&&nd(s)))return s;const f=(i?a:Object.keys(a)).length,m=i?s:Object.keys(s),v=m.length,g=i?new Array(v):{};let p=0;for(let y=0;y<v;y++){const x=i?y:m[y],N=a[x],R=s[x];if(N===R){g[x]=N,(i?y<f:R1.call(a,x))&&p++;continue}if(N===null||R===null||typeof N!="object"||typeof R!="object"){g[x]=R;continue}const j=hv(N,R,o+1);g[x]=j,j===N&&p++}return f===v&&p===f?a:g}function ri(a,s){if(!s||Object.keys(a).length!==Object.keys(s).length)return!1;for(const o in a)if(a[o]!==s[o])return!1;return!0}function ax(a){return Array.isArray(a)&&a.length===Object.keys(a).length}function nd(a){if(!nx(a))return!1;const s=a.constructor;if(s===void 0)return!0;const o=s.prototype;return!(!nx(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(a)!==Object.prototype)}function nx(a){return Object.prototype.toString.call(a)==="[object Object]"}function M1(a){return new Promise(s=>{sr.setTimeout(s,a)})}function rd(a,s,o){return typeof o.structuralSharing=="function"?o.structuralSharing(a,s):o.structuralSharing!==!1?hv(a,s):s}function A1(a,s,o=0){const i=[...a,s];return o&&i.length>o?i.slice(1):i}function k1(a,s,o=0){const i=[s,...a];return o&&i.length>o?i.slice(0,-1):i}var Td=Symbol();function pv(a,s){return!a.queryFn&&s?.initialPromise?()=>s.initialPromise:!a.queryFn||a.queryFn===Td?()=>Promise.reject(new Error(`Missing queryFn: '${a.queryHash}'`)):a.queryFn}function _d(a,s){return typeof a=="function"?a(...s):!!a}function O1(a,s,o){let i=!1,d;return Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(d??=s(),i||(i=!0,d.aborted?o():d.addEventListener("abort",o,{once:!0})),d)}),a}var z1=class extends us{#e;#t;#a;constructor(){super(),this.#a=a=>{if(!ir&&window.addEventListener){const s=()=>a();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(a){this.#a=a,this.#t?.(),this.#t=a(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()})}setFocused(a){this.#e!==a&&(this.#e=a,this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(s=>{s(a)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Rd=new z1;function sd(){let a,s;const o=new Promise((d,f)=>{a=d,s=f});o.status="pending",o.catch(()=>{});function i(d){Object.assign(o,d),delete o.resolve,delete o.reject}return o.resolve=d=>{i({status:"fulfilled",value:d}),a(d)},o.reject=d=>{i({status:"rejected",reason:d}),s(d)},o}var D1=T1;function L1(){let a=[],s=0,o=v=>{v()},i=v=>{v()},d=D1;const f=v=>{s?a.push(v):d(()=>{o(v)})},m=()=>{const v=a;a=[],v.length&&d(()=>{i(()=>{v.forEach(g=>{o(g)})})})};return{batch:v=>{let g;s++;try{g=v()}finally{s--,s||m()}return g},batchCalls:v=>(...g)=>{f(()=>{v(...g)})},schedule:f,setNotifyFunction:v=>{o=v},setBatchNotifyFunction:v=>{i=v},setScheduler:v=>{d=v}}}var ft=L1(),U1=class extends us{#e=!0;#t;#a;constructor(){super(),this.#a=a=>{if(!ir&&window.addEventListener){const s=()=>a(!0),o=()=>a(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(a){this.#a=a,this.#t?.(),this.#t=a(this.setOnline.bind(this))}setOnline(a){this.#e!==a&&(this.#e=a,this.listeners.forEach(o=>{o(a)}))}isOnline(){return this.#e}},si=new U1;function B1(a){return Math.min(1e3*2**a,3e4)}function xv(a){return(a??"online")==="online"?si.isOnline():!0}var ld=class extends Error{constructor(a){super("CancelledError"),this.revert=a?.revert,this.silent=a?.silent}};function vv(a){let s=!1,o=0,i;const d=sd(),f=()=>d.status!=="pending",m=E=>{if(!f()){const C=new ld(E);N(C),a.onCancel?.(C)}},v=()=>{s=!0},g=()=>{s=!1},p=()=>Rd.isFocused()&&(a.networkMode==="always"||si.isOnline())&&a.canRun(),y=()=>xv(a.networkMode)&&a.canRun(),x=E=>{f()||(i?.(),d.resolve(E))},N=E=>{f()||(i?.(),d.reject(E))},R=()=>new Promise(E=>{i=C=>{(f()||p())&&E(C)},a.onPause?.()}).then(()=>{i=void 0,f()||a.onContinue?.()}),j=()=>{if(f())return;let E;const C=o===0?a.initialPromise:void 0;try{E=C??a.fn()}catch(k){E=Promise.reject(k)}Promise.resolve(E).then(x).catch(k=>{if(f())return;const A=a.retry??(ir?0:3),F=a.retryDelay??B1,H=typeof F=="function"?F(o,k):F,ne=A===!0||typeof A=="number"&&o<A||typeof A=="function"&&A(o,k);if(s||!ne){N(k);return}o++,a.onFail?.(o,k),M1(H).then(()=>p()?void 0:R()).then(()=>{s?N(k):j()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(i?.(),d),cancelRetry:v,continueRetry:g,canStart:y,start:()=>(y()?j():R().then(j),d)}}var gv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ad(this.gcTime)&&(this.#e=sr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(a){this.gcTime=Math.max(this.gcTime||0,a??(ir?1/0:300*1e3))}clearGcTimeout(){this.#e&&(sr.clearTimeout(this.#e),this.#e=void 0)}},q1=class extends gv{#e;#t;#a;#r;#n;#l;#o;constructor(a){super(),this.#o=!1,this.#l=a.defaultOptions,this.setOptions(a.options),this.observers=[],this.#r=a.client,this.#a=this.#r.getQueryCache(),this.queryKey=a.queryKey,this.queryHash=a.queryHash,this.#e=sx(this.options),this.state=a.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(a){if(this.options={...this.#l,...a},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=sx(this.options);s.data!==void 0&&(this.setState(rx(s.data,s.dataUpdatedAt)),this.#e=s)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(a,s){const o=rd(this.state.data,a,this.options);return this.#s({data:o,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),o}setState(a,s){this.#s({type:"setState",state:a,setStateOptions:s})}cancel(a){const s=this.#n?.promise;return this.#n?.cancel(a),s?s.then(zt).catch(zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(a=>xa(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Td||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>An(a.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(a=>a.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(a=0){return this.state.data===void 0?!0:a==="static"?!1:this.state.isInvalidated?!0:!mv(this.state.dataUpdatedAt,a)}onFocus(){this.observers.find(s=>s.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(s=>s.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:a}))}removeObserver(a){this.observers.includes(a)&&(this.observers=this.observers.filter(s=>s!==a),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(a,s){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&s?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(a&&this.setOptions(a),!this.options.queryFn){const v=this.observers.find(g=>g.options.queryFn);v&&this.setOptions(v.options)}const o=new AbortController,i=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(this.#o=!0,o.signal)})},d=()=>{const v=pv(this.options,s),p=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#o=!1,this.options.persister?this.options.persister(v,p,this):v(p)},m=(()=>{const v={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:d};return i(v),v})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#s({type:"fetch",meta:m.fetchOptions?.meta}),this.#n=vv({initialPromise:s?.initialPromise,fn:m.fetchFn,onCancel:v=>{v instanceof ld&&v.revert&&this.setState({...this.#t,fetchStatus:"idle"}),o.abort()},onFail:(v,g)=>{this.#s({type:"failed",failureCount:v,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const v=await this.#n.start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),this.#a.config.onSuccess?.(v,this),this.#a.config.onSettled?.(v,this.state.error,this),v}catch(v){if(v instanceof ld){if(v.silent)return this.#n.promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw this.#s({type:"error",error:v}),this.#a.config.onError?.(v,this),this.#a.config.onSettled?.(this.state.data,v,this),v}finally{this.scheduleGc()}}#s(a){const s=o=>{switch(a.type){case"failed":return{...o,fetchFailureCount:a.failureCount,fetchFailureReason:a.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...yv(o.data,this.options),fetchMeta:a.meta??null};case"success":const i={...o,...rx(a.data,a.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!a.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=a.manual?i:void 0,i;case"error":const d=a.error;return{...o,error:d,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...a.state}}};this.state=s(this.state),ft.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:a})})}};function yv(a,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xv(s.networkMode)?"fetching":"paused",...a===void 0&&{error:null,status:"pending"}}}function rx(a,s){return{data:a,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function sx(a){const s=typeof a.initialData=="function"?a.initialData():a.initialData,o=s!==void 0,i=o?typeof a.initialDataUpdatedAt=="function"?a.initialDataUpdatedAt():a.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:o?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var H1=class extends us{constructor(a,s){super(),this.options=s,this.#e=a,this.#s=null,this.#o=sd(),this.bindMethods(),this.setOptions(s)}#e;#t=void 0;#a=void 0;#r=void 0;#n;#l;#o;#s;#p;#f;#m;#c;#u;#i;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),lx(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return od(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return od(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(a){const s=this.options,o=this.#t;if(this.options=this.#e.defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xa(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#t.setOptions(this.options),s._defaulted&&!ri(this.options,s)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&ox(this.#t,o,this.options,s)&&this.#d(),this.updateResult(),i&&(this.#t!==o||xa(this.options.enabled,this.#t)!==xa(s.enabled,this.#t)||An(this.options.staleTime,this.#t)!==An(s.staleTime,this.#t))&&this.#x();const d=this.#v();i&&(this.#t!==o||xa(this.options.enabled,this.#t)!==xa(s.enabled,this.#t)||d!==this.#i)&&this.#g(d)}getOptimisticResult(a){const s=this.#e.getQueryCache().build(this.#e,a),o=this.createResult(s,a);return Q1(this,o)&&(this.#r=o,this.#l=this.options,this.#n=this.#t.state),o}getCurrentResult(){return this.#r}trackResult(a,s){return new Proxy(a,{get:(o,i)=>(this.trackProp(i),s?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,i))})}trackProp(a){this.#h.add(a)}getCurrentQuery(){return this.#t}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const s=this.#e.defaultQueryOptions(a),o=this.#e.getQueryCache().build(this.#e,s);return o.fetch().then(()=>this.createResult(o,s))}fetch(a){return this.#d({...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(a){this.#N();let s=this.#t.fetch(this.options,a);return a?.throwOnError||(s=s.catch(zt)),s}#x(){this.#b();const a=An(this.options.staleTime,this.#t);if(ir||this.#r.isStale||!ad(a))return;const o=mv(this.#r.dataUpdatedAt,a)+1;this.#c=sr.setTimeout(()=>{this.#r.isStale||this.updateResult()},o)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(a){this.#S(),this.#i=a,!(ir||xa(this.options.enabled,this.#t)===!1||!ad(this.#i)||this.#i===0)&&(this.#u=sr.setInterval(()=>{(this.options.refetchIntervalInBackground||Rd.isFocused())&&this.#d()},this.#i))}#y(){this.#x(),this.#g(this.#v())}#b(){this.#c&&(sr.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(sr.clearInterval(this.#u),this.#u=void 0)}createResult(a,s){const o=this.#t,i=this.options,d=this.#r,f=this.#n,m=this.#l,g=a!==o?a.state:this.#a,{state:p}=a;let y={...p},x=!1,N;if(s._optimisticResults){const q=this.hasListeners(),ae=!q&&lx(a,s),je=q&&ox(a,o,s,i);(ae||je)&&(y={...y,...yv(p.data,a.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:R,errorUpdatedAt:j,status:E}=y;N=y.data;let C=!1;if(s.placeholderData!==void 0&&N===void 0&&E==="pending"){let q;d?.isPlaceholderData&&s.placeholderData===m?.placeholderData?(q=d.data,C=!0):q=typeof s.placeholderData=="function"?s.placeholderData(this.#m?.state.data,this.#m):s.placeholderData,q!==void 0&&(E="success",N=rd(d?.data,q,s),x=!0)}if(s.select&&N!==void 0&&!C)if(d&&N===f?.data&&s.select===this.#p)N=this.#f;else try{this.#p=s.select,N=s.select(N),N=rd(d?.data,N,s),this.#f=N,this.#s=null}catch(q){this.#s=q}this.#s&&(R=this.#s,N=this.#f,j=Date.now(),E="error");const k=y.fetchStatus==="fetching",A=E==="pending",F=E==="error",H=A&&k,ne=N!==void 0,z={status:E,fetchStatus:y.fetchStatus,isPending:A,isSuccess:E==="success",isError:F,isInitialLoading:H,isLoading:H,data:N,dataUpdatedAt:y.dataUpdatedAt,error:R,errorUpdatedAt:j,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>g.dataUpdateCount||y.errorUpdateCount>g.errorUpdateCount,isFetching:k,isRefetching:k&&!A,isLoadingError:F&&!ne,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:F&&ne,isStale:Md(a,s),refetch:this.refetch,promise:this.#o,isEnabled:xa(s.enabled,a)!==!1};if(this.options.experimental_prefetchInRender){const q=z.data!==void 0,ae=z.status==="error"&&!q,je=Me=>{ae?Me.reject(z.error):q&&Me.resolve(z.data)},le=()=>{const Me=this.#o=z.promise=sd();je(Me)},he=this.#o;switch(he.status){case"pending":a.queryHash===o.queryHash&&je(he);break;case"fulfilled":(ae||z.data!==he.value)&&le();break;case"rejected":(!ae||z.error!==he.reason)&&le();break}}return z}updateResult(){const a=this.#r,s=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#l=this.options,this.#n.data!==void 0&&(this.#m=this.#t),ri(s,a))return;this.#r=s;const o=()=>{if(!a)return!0;const{notifyOnChangeProps:i}=this.options,d=typeof i=="function"?i():i;if(d==="all"||!d&&!this.#h.size)return!0;const f=new Set(d??this.#h);return this.options.throwOnError&&f.add("error"),Object.keys(this.#r).some(m=>{const v=m;return this.#r[v]!==a[v]&&f.has(v)})};this.#j({listeners:o()})}#N(){const a=this.#e.getQueryCache().build(this.#e,this.options);if(a===this.#t)return;const s=this.#t;this.#t=a,this.#a=a.state,this.hasListeners()&&(s?.removeObserver(this),a.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#j(a){ft.batch(()=>{a.listeners&&this.listeners.forEach(s=>{s(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function G1(a,s){return xa(s.enabled,a)!==!1&&a.state.data===void 0&&!(a.state.status==="error"&&s.retryOnMount===!1)}function lx(a,s){return G1(a,s)||a.state.data!==void 0&&od(a,s,s.refetchOnMount)}function od(a,s,o){if(xa(s.enabled,a)!==!1&&An(s.staleTime,a)!=="static"){const i=typeof o=="function"?o(a):o;return i==="always"||i!==!1&&Md(a,s)}return!1}function ox(a,s,o,i){return(a!==s||xa(i.enabled,a)===!1)&&(!o.suspense||a.state.status!=="error")&&Md(a,o)}function Md(a,s){return xa(s.enabled,a)!==!1&&a.isStaleByTime(An(s.staleTime,a))}function Q1(a,s){return!ri(a.getCurrentResult(),s)}function ix(a){return{onFetch:(s,o)=>{const i=s.options,d=s.fetchOptions?.meta?.fetchMore?.direction,f=s.state.data?.pages||[],m=s.state.data?.pageParams||[];let v={pages:[],pageParams:[]},g=0;const p=async()=>{let y=!1;const x=j=>{O1(j,()=>s.signal,()=>y=!0)},N=pv(s.options,s.fetchOptions),R=async(j,E,C)=>{if(y)return Promise.reject();if(E==null&&j.pages.length)return Promise.resolve(j);const A=(()=>{const W={client:s.client,queryKey:s.queryKey,pageParam:E,direction:C?"backward":"forward",meta:s.options.meta};return x(W),W})(),F=await N(A),{maxPages:H}=s.options,ne=C?k1:A1;return{pages:ne(j.pages,F,H),pageParams:ne(j.pageParams,E,H)}};if(d&&f.length){const j=d==="backward",E=j?V1:cx,C={pages:f,pageParams:m},k=E(i,C);v=await R(C,k,j)}else{const j=a??f.length;do{const E=g===0?m[0]??i.initialPageParam:cx(i,v);if(g>0&&E==null)break;v=await R(v,E),g++}while(g<j)}return v};s.options.persister?s.fetchFn=()=>s.options.persister?.(p,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},o):s.fetchFn=p}}}function cx(a,{pages:s,pageParams:o}){const i=s.length-1;return s.length>0?a.getNextPageParam(s[i],s,o[i],o):void 0}function V1(a,{pages:s,pageParams:o}){return s.length>0?a.getPreviousPageParam?.(s[0],s,o[0],o):void 0}var F1=class extends gv{#e;#t;#a;#r;constructor(a){super(),this.#e=a.client,this.mutationId=a.mutationId,this.#a=a.mutationCache,this.#t=[],this.state=a.state||bv(),this.setOptions(a.options),this.scheduleGc()}setOptions(a){this.options=a,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(a){this.#t.includes(a)||(this.#t.push(a),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){this.#t=this.#t.filter(s=>s!==a),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(a){const s=()=>{this.#n({type:"continue"})},o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=vv({fn:()=>this.options.mutationFn?this.options.mutationFn(a,o):Promise.reject(new Error("No mutationFn found")),onFail:(f,m)=>{this.#n({type:"failed",failureCount:f,error:m})},onPause:()=>{this.#n({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const i=this.state.status==="pending",d=!this.#r.canStart();try{if(i)s();else{this.#n({type:"pending",variables:a,isPaused:d}),this.#a.config.onMutate&&await this.#a.config.onMutate(a,this,o);const m=await this.options.onMutate?.(a,o);m!==this.state.context&&this.#n({type:"pending",context:m,variables:a,isPaused:d})}const f=await this.#r.start();return await this.#a.config.onSuccess?.(f,a,this.state.context,this,o),await this.options.onSuccess?.(f,a,this.state.context,o),await this.#a.config.onSettled?.(f,null,this.state.variables,this.state.context,this,o),await this.options.onSettled?.(f,null,a,this.state.context,o),this.#n({type:"success",data:f}),f}catch(f){try{await this.#a.config.onError?.(f,a,this.state.context,this,o)}catch(m){Promise.reject(m)}try{await this.options.onError?.(f,a,this.state.context,o)}catch(m){Promise.reject(m)}try{await this.#a.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,o)}catch(m){Promise.reject(m)}try{await this.options.onSettled?.(void 0,f,a,this.state.context,o)}catch(m){Promise.reject(m)}throw this.#n({type:"error",error:f}),f}finally{this.#a.runNext(this)}}#n(a){const s=o=>{switch(a.type){case"failed":return{...o,failureCount:a.failureCount,failureReason:a.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:a.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:a.isPaused,status:"pending",variables:a.variables,submittedAt:Date.now()};case"success":return{...o,data:a.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:a.error,failureCount:o.failureCount+1,failureReason:a.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ft.batch(()=>{this.#t.forEach(o=>{o.onMutationUpdate(a)}),this.#a.notify({mutation:this,type:"updated",action:a})})}};function bv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Y1=class extends us{constructor(a={}){super(),this.config=a,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(a,s,o){const i=new F1({client:a,mutationCache:this,mutationId:++this.#a,options:a.defaultMutationOptions(s),state:o});return this.add(i),i}add(a){this.#e.add(a);const s=Qo(a);if(typeof s=="string"){const o=this.#t.get(s);o?o.push(a):this.#t.set(s,[a])}this.notify({type:"added",mutation:a})}remove(a){if(this.#e.delete(a)){const s=Qo(a);if(typeof s=="string"){const o=this.#t.get(s);if(o)if(o.length>1){const i=o.indexOf(a);i!==-1&&o.splice(i,1)}else o[0]===a&&this.#t.delete(s)}}this.notify({type:"removed",mutation:a})}canRun(a){const s=Qo(a);if(typeof s=="string"){const i=this.#t.get(s)?.find(d=>d.state.status==="pending");return!i||i===a}else return!0}runNext(a){const s=Qo(a);return typeof s=="string"?this.#t.get(s)?.find(i=>i!==a&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ft.batch(()=>{this.#e.forEach(a=>{this.notify({type:"removed",mutation:a})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(a){const s={exact:!0,...a};return this.getAll().find(o=>tx(s,o))}findAll(a={}){return this.getAll().filter(s=>tx(a,s))}notify(a){ft.batch(()=>{this.listeners.forEach(s=>{s(a)})})}resumePausedMutations(){const a=this.getAll().filter(s=>s.state.isPaused);return ft.batch(()=>Promise.all(a.map(s=>s.continue().catch(zt))))}};function Qo(a){return a.options.scope?.id}var X1=class extends us{#e;#t=void 0;#a;#r;constructor(s,o){super(),this.#e=s,this.setOptions(o),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){const o=this.options;this.options=this.#e.defaultMutationOptions(s),ri(this.options,o)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),o?.mutationKey&&this.options.mutationKey&&cr(o.mutationKey)!==cr(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(s){this.#n(),this.#l(s)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#n(),this.#l()}mutate(s,o){return this.#r=o,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(s)}#n(){const s=this.#a?.state??bv();this.#t={...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset}}#l(s){ft.batch(()=>{if(this.#r&&this.hasListeners()){const o=this.#t.variables,i=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(s?.type==="success"){try{this.#r.onSuccess?.(s.data,o,i,d)}catch(f){Promise.reject(f)}try{this.#r.onSettled?.(s.data,null,o,i,d)}catch(f){Promise.reject(f)}}else if(s?.type==="error"){try{this.#r.onError?.(s.error,o,i,d)}catch(f){Promise.reject(f)}try{this.#r.onSettled?.(void 0,s.error,o,i,d)}catch(f){Promise.reject(f)}}}this.listeners.forEach(o=>{o(this.#t)})})}},K1=class extends us{constructor(a={}){super(),this.config=a,this.#e=new Map}#e;build(a,s,o){const i=s.queryKey,d=s.queryHash??Cd(i,s);let f=this.get(d);return f||(f=new q1({client:a,queryKey:i,queryHash:d,options:a.defaultQueryOptions(s),state:o,defaultOptions:a.getQueryDefaults(i)}),this.add(f)),f}add(a){this.#e.has(a.queryHash)||(this.#e.set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const s=this.#e.get(a.queryHash);s&&(a.destroy(),s===a&&this.#e.delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){ft.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return this.#e.get(a)}getAll(){return[...this.#e.values()]}find(a){const s={exact:!0,...a};return this.getAll().find(o=>ex(s,o))}findAll(a={}){const s=this.getAll();return Object.keys(a).length>0?s.filter(o=>ex(a,o)):s}notify(a){ft.batch(()=>{this.listeners.forEach(s=>{s(a)})})}onFocus(){ft.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){ft.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Z1=class{#e;#t;#a;#r;#n;#l;#o;#s;constructor(a={}){this.#e=a.queryCache||new K1,this.#t=a.mutationCache||new Y1,this.#a=a.defaultOptions||{},this.#r=new Map,this.#n=new Map,this.#l=0}mount(){this.#l++,this.#l===1&&(this.#o=Rd.subscribe(async a=>{a&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=si.subscribe(async a=>{a&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#l--,this.#l===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(a){return this.#e.findAll({...a,fetchStatus:"fetching"}).length}isMutating(a){return this.#t.findAll({...a,status:"pending"}).length}getQueryData(a){const s=this.defaultQueryOptions({queryKey:a});return this.#e.get(s.queryHash)?.state.data}ensureQueryData(a){const s=this.defaultQueryOptions(a),o=this.#e.build(this,s),i=o.state.data;return i===void 0?this.fetchQuery(a):(a.revalidateIfStale&&o.isStaleByTime(An(s.staleTime,o))&&this.prefetchQuery(s),Promise.resolve(i))}getQueriesData(a){return this.#e.findAll(a).map(({queryKey:s,state:o})=>{const i=o.data;return[s,i]})}setQueryData(a,s,o){const i=this.defaultQueryOptions({queryKey:a}),f=this.#e.get(i.queryHash)?.state.data,m=_1(s,f);if(m!==void 0)return this.#e.build(this,i).setData(m,{...o,manual:!0})}setQueriesData(a,s,o){return ft.batch(()=>this.#e.findAll(a).map(({queryKey:i})=>[i,this.setQueryData(i,s,o)]))}getQueryState(a){const s=this.defaultQueryOptions({queryKey:a});return this.#e.get(s.queryHash)?.state}removeQueries(a){const s=this.#e;ft.batch(()=>{s.findAll(a).forEach(o=>{s.remove(o)})})}resetQueries(a,s){const o=this.#e;return ft.batch(()=>(o.findAll(a).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...a},s)))}cancelQueries(a,s={}){const o={revert:!0,...s},i=ft.batch(()=>this.#e.findAll(a).map(d=>d.cancel(o)));return Promise.all(i).then(zt).catch(zt)}invalidateQueries(a,s={}){return ft.batch(()=>(this.#e.findAll(a).forEach(o=>{o.invalidate()}),a?.refetchType==="none"?Promise.resolve():this.refetchQueries({...a,type:a?.refetchType??a?.type??"active"},s)))}refetchQueries(a,s={}){const o={...s,cancelRefetch:s.cancelRefetch??!0},i=ft.batch(()=>this.#e.findAll(a).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let f=d.fetch(void 0,o);return o.throwOnError||(f=f.catch(zt)),d.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(i).then(zt)}fetchQuery(a){const s=this.defaultQueryOptions(a);s.retry===void 0&&(s.retry=!1);const o=this.#e.build(this,s);return o.isStaleByTime(An(s.staleTime,o))?o.fetch(s):Promise.resolve(o.state.data)}prefetchQuery(a){return this.fetchQuery(a).then(zt).catch(zt)}fetchInfiniteQuery(a){return a.behavior=ix(a.pages),this.fetchQuery(a)}prefetchInfiniteQuery(a){return this.fetchInfiniteQuery(a).then(zt).catch(zt)}ensureInfiniteQueryData(a){return a.behavior=ix(a.pages),this.ensureQueryData(a)}resumePausedMutations(){return si.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(a){this.#a=a}setQueryDefaults(a,s){this.#r.set(cr(a),{queryKey:a,defaultOptions:s})}getQueryDefaults(a){const s=[...this.#r.values()],o={};return s.forEach(i=>{gl(a,i.queryKey)&&Object.assign(o,i.defaultOptions)}),o}setMutationDefaults(a,s){this.#n.set(cr(a),{mutationKey:a,defaultOptions:s})}getMutationDefaults(a){const s=[...this.#n.values()],o={};return s.forEach(i=>{gl(a,i.mutationKey)&&Object.assign(o,i.defaultOptions)}),o}defaultQueryOptions(a){if(a._defaulted)return a;const s={...this.#a.queries,...this.getQueryDefaults(a.queryKey),...a,_defaulted:!0};return s.queryHash||(s.queryHash=Cd(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Td&&(s.enabled=!1),s}defaultMutationOptions(a){return a?._defaulted?a:{...this.#a.mutations,...a?.mutationKey&&this.getMutationDefaults(a.mutationKey),...a,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Sv=S.createContext(void 0),ht=a=>{const s=S.useContext(Sv);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},$1=({client:a,children:s})=>(S.useEffect(()=>(a.mount(),()=>{a.unmount()}),[a]),l.jsx(Sv.Provider,{value:a,children:s})),Nv=S.createContext(!1),J1=()=>S.useContext(Nv);Nv.Provider;function P1(){let a=!1;return{clearReset:()=>{a=!1},reset:()=>{a=!0},isReset:()=>a}}var I1=S.createContext(P1()),W1=()=>S.useContext(I1),e2=(a,s,o)=>{const i=o?.state.error&&typeof a.throwOnError=="function"?_d(a.throwOnError,[o.state.error,o]):a.throwOnError;(a.suspense||a.experimental_prefetchInRender||i)&&(s.isReset()||(a.retryOnMount=!1))},t2=a=>{S.useEffect(()=>{a.clearReset()},[a])},a2=({result:a,errorResetBoundary:s,throwOnError:o,query:i,suspense:d})=>a.isError&&!s.isReset()&&!a.isFetching&&i&&(d&&a.data===void 0||_d(o,[a.error,i])),n2=a=>{if(a.suspense){const o=d=>d==="static"?d:Math.max(d??1e3,1e3),i=a.staleTime;a.staleTime=typeof i=="function"?(...d)=>o(i(...d)):o(i),typeof a.gcTime=="number"&&(a.gcTime=Math.max(a.gcTime,1e3))}},r2=(a,s)=>a.isLoading&&a.isFetching&&!s,s2=(a,s)=>a?.suspense&&s.isPending,ux=(a,s,o)=>s.fetchOptimistic(a).catch(()=>{o.clearReset()});function l2(a,s,o){const i=J1(),d=W1(),f=ht(),m=f.defaultQueryOptions(a);f.getDefaultOptions().queries?._experimental_beforeQuery?.(m);const v=f.getQueryCache().get(m.queryHash);m._optimisticResults=i?"isRestoring":"optimistic",n2(m),e2(m,d,v),t2(d);const g=!f.getQueryCache().get(m.queryHash),[p]=S.useState(()=>new s(f,m)),y=p.getOptimisticResult(m),x=!i&&a.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const R=x?p.subscribe(ft.batchCalls(N)):zt;return p.updateResult(),R},[p,x]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),S.useEffect(()=>{p.setOptions(m)},[m,p]),s2(m,y))throw ux(m,p,d);if(a2({result:y,errorResetBoundary:d,throwOnError:m.throwOnError,query:v,suspense:m.suspense}))throw y.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(m,y),m.experimental_prefetchInRender&&!ir&&r2(y,i)&&(g?ux(m,p,d):v?.promise)?.catch(zt).finally(()=>{p.updateResult()}),m.notifyOnChangeProps?y:p.trackResult(y)}function yt(a,s){return l2(a,H1)}function bt(a,s){const o=ht(),[i]=S.useState(()=>new X1(o,a));S.useEffect(()=>{i.setOptions(a)},[i,a]);const d=S.useSyncExternalStore(S.useCallback(m=>i.subscribe(ft.batchCalls(m)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),f=S.useCallback((m,v)=>{i.mutate(m,v).catch(zt)},[i]);if(d.error&&_d(i.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:f,mutateAsync:d.mutate}}function o2(a){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",s.appendChild(o),o.styleSheet?o.styleSheet.cssText=a:o.appendChild(document.createTextNode(a))}const i2=a=>{switch(a){case"success":return d2;case"info":return m2;case"warning":return f2;case"error":return h2;default:return null}},c2=Array(12).fill(0),u2=({visible:a,className:s})=>re.createElement("div",{className:["sonner-loading-wrapper",s].filter(Boolean).join(" "),"data-visible":a},re.createElement("div",{className:"sonner-spinner"},c2.map((o,i)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),d2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),f2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),m2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),h2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),p2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),x2=()=>{const[a,s]=re.useState(document.hidden);return re.useEffect(()=>{const o=()=>{s(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),a};let id=1;class v2{constructor(){this.subscribe=s=>(this.subscribers.push(s),()=>{const o=this.subscribers.indexOf(s);this.subscribers.splice(o,1)}),this.publish=s=>{this.subscribers.forEach(o=>o(s))},this.addToast=s=>{this.publish(s),this.toasts=[...this.toasts,s]},this.create=s=>{var o;const{message:i,...d}=s,f=typeof s?.id=="number"||((o=s.id)==null?void 0:o.length)>0?s.id:id++,m=this.toasts.find(g=>g.id===f),v=s.dismissible===void 0?!0:s.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),m?this.toasts=this.toasts.map(g=>g.id===f?(this.publish({...g,...s,id:f,title:i}),{...g,...s,id:f,dismissible:v,title:i}):g):this.addToast({title:i,...d,dismissible:v,id:f}),f},this.dismiss=s=>(s?(this.dismissedToasts.add(s),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:s,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(i=>i({id:o.id,dismiss:!0}))}),s),this.message=(s,o)=>this.create({...o,message:s}),this.error=(s,o)=>this.create({...o,message:s,type:"error"}),this.success=(s,o)=>this.create({...o,type:"success",message:s}),this.info=(s,o)=>this.create({...o,type:"info",message:s}),this.warning=(s,o)=>this.create({...o,type:"warning",message:s}),this.loading=(s,o)=>this.create({...o,type:"loading",message:s}),this.promise=(s,o)=>{if(!o)return;let i;o.loading!==void 0&&(i=this.create({...o,promise:s,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const d=Promise.resolve(s instanceof Function?s():s);let f=i!==void 0,m;const v=d.then(async p=>{if(m=["resolve",p],re.isValidElement(p))f=!1,this.create({id:i,type:"default",message:p});else if(y2(p)&&!p.ok){f=!1;const x=typeof o.error=="function"?await o.error(`HTTP error! status: ${p.status}`):o.error,N=typeof o.description=="function"?await o.description(`HTTP error! status: ${p.status}`):o.description,j=typeof x=="object"&&!re.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:N,...j})}else if(p instanceof Error){f=!1;const x=typeof o.error=="function"?await o.error(p):o.error,N=typeof o.description=="function"?await o.description(p):o.description,j=typeof x=="object"&&!re.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:N,...j})}else if(o.success!==void 0){f=!1;const x=typeof o.success=="function"?await o.success(p):o.success,N=typeof o.description=="function"?await o.description(p):o.description,j=typeof x=="object"&&!re.isValidElement(x)?x:{message:x};this.create({id:i,type:"success",description:N,...j})}}).catch(async p=>{if(m=["reject",p],o.error!==void 0){f=!1;const y=typeof o.error=="function"?await o.error(p):o.error,x=typeof o.description=="function"?await o.description(p):o.description,R=typeof y=="object"&&!re.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:x,...R})}}).finally(()=>{f&&(this.dismiss(i),i=void 0),o.finally==null||o.finally.call(o)}),g=()=>new Promise((p,y)=>v.then(()=>m[0]==="reject"?y(m[1]):p(m[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:g}:Object.assign(i,{unwrap:g})},this.custom=(s,o)=>{const i=o?.id||id++;return this.create({jsx:s(i),id:i,...o}),i},this.getActiveToasts=()=>this.toasts.filter(s=>!this.dismissedToasts.has(s.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Xt=new v2,g2=(a,s)=>{const o=s?.id||id++;return Xt.addToast({title:a,...s,id:o}),o},y2=a=>a&&typeof a=="object"&&"ok"in a&&typeof a.ok=="boolean"&&"status"in a&&typeof a.status=="number",b2=g2,S2=()=>Xt.toasts,N2=()=>Xt.getActiveToasts(),Ae=Object.assign(b2,{success:Xt.success,info:Xt.info,warning:Xt.warning,error:Xt.error,custom:Xt.custom,message:Xt.message,promise:Xt.promise,dismiss:Xt.dismiss,loading:Xt.loading},{getHistory:S2,getToasts:N2});o2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Vo(a){return a.label!==void 0}const j2=3,w2="24px",E2="16px",dx=4e3,C2=356,T2=14,_2=45,R2=200;function ka(...a){return a.filter(Boolean).join(" ")}function M2(a){const[s,o]=a.split("-"),i=[];return s&&i.push(s),o&&i.push(o),i}const A2=a=>{var s,o,i,d,f,m,v,g,p;const{invert:y,toast:x,unstyled:N,interacting:R,setHeights:j,visibleToasts:E,heights:C,index:k,toasts:A,expanded:F,removeToast:H,defaultRichColors:ne,closeButton:W,style:z,cancelButtonStyle:q,actionButtonStyle:ae,className:je="",descriptionClassName:le="",duration:he,position:Me,gap:Te,expandByDefault:te,classNames:w,icons:Y,closeButtonAriaLabel:Z="Close toast"}=a,[xe,ve]=re.useState(null),[_,X]=re.useState(null),[K,I]=re.useState(!1),[se,me]=re.useState(!1),[ue,we]=re.useState(!1),[G,D]=re.useState(!1),[Se,fe]=re.useState(!1),[Dt,it]=re.useState(0),[zn,fr]=re.useState(0),Dn=re.useRef(x.duration||he||dx),hs=re.useRef(null),$t=re.useRef(null),ps=k===0,xs=k+1<=E,Mt=x.type,an=x.dismissible!==!1,At=x.className||"",bi=x.descriptionClassName||"",Ln=re.useMemo(()=>C.findIndex(Ee=>Ee.toastId===x.id)||0,[C,x.id]),Cl=re.useMemo(()=>{var Ee;return(Ee=x.closeButton)!=null?Ee:W},[x.closeButton,W]),Un=re.useMemo(()=>x.duration||he||dx,[x.duration,he]),vs=re.useRef(0),za=re.useRef(0),Tl=re.useRef(0),nn=re.useRef(null),[Bn,kt]=Me.split("-"),ga=re.useMemo(()=>C.reduce((Ee,$e,pt)=>pt>=Ln?Ee:Ee+$e.height,0),[C,Ln]),Ct=x2(),Si=x.invert||y,gs=Mt==="loading";za.current=re.useMemo(()=>Ln*Te+ga,[Ln,ga]),re.useEffect(()=>{Dn.current=Un},[Un]),re.useEffect(()=>{I(!0)},[]),re.useEffect(()=>{const Ee=$t.current;if(Ee){const $e=Ee.getBoundingClientRect().height;return fr($e),j(pt=>[{toastId:x.id,height:$e,position:x.position},...pt]),()=>j(pt=>pt.filter(Tt=>Tt.toastId!==x.id))}},[j,x.id]),re.useLayoutEffect(()=>{if(!K)return;const Ee=$t.current,$e=Ee.style.height;Ee.style.height="auto";const pt=Ee.getBoundingClientRect().height;Ee.style.height=$e,fr(pt),j(Tt=>Tt.find(Ie=>Ie.toastId===x.id)?Tt.map(Ie=>Ie.toastId===x.id?{...Ie,height:pt}:Ie):[{toastId:x.id,height:pt,position:x.position},...Tt])},[K,x.title,x.description,j,x.id,x.jsx,x.action,x.cancel]);const Ca=re.useCallback(()=>{me(!0),it(za.current),j(Ee=>Ee.filter($e=>$e.toastId!==x.id)),setTimeout(()=>{H(x)},R2)},[x,H,j,za]);re.useEffect(()=>{if(x.promise&&Mt==="loading"||x.duration===1/0||x.type==="loading")return;let Ee;return F||R||Ct?(()=>{if(Tl.current<vs.current){const Tt=new Date().getTime()-vs.current;Dn.current=Dn.current-Tt}Tl.current=new Date().getTime()})():Dn.current!==1/0&&(vs.current=new Date().getTime(),Ee=setTimeout(()=>{x.onAutoClose==null||x.onAutoClose.call(x,x),Ca()},Dn.current)),()=>clearTimeout(Ee)},[F,R,x,Mt,Ct,Ca]),re.useEffect(()=>{x.delete&&(Ca(),x.onDismiss==null||x.onDismiss.call(x,x))},[Ca,x.delete]);function mr(){var Ee;if(Y?.loading){var $e;return re.createElement("div",{className:ka(w?.loader,x==null||($e=x.classNames)==null?void 0:$e.loader,"sonner-loader"),"data-visible":Mt==="loading"},Y.loading)}return re.createElement(u2,{className:ka(w?.loader,x==null||(Ee=x.classNames)==null?void 0:Ee.loader),visible:Mt==="loading"})}const hr=x.icon||Y?.[Mt]||i2(Mt);var qn,Ta;return re.createElement("li",{tabIndex:0,ref:$t,className:ka(je,At,w?.toast,x==null||(s=x.classNames)==null?void 0:s.toast,w?.default,w?.[Mt],x==null||(o=x.classNames)==null?void 0:o[Mt]),"data-sonner-toast":"","data-rich-colors":(qn=x.richColors)!=null?qn:ne,"data-styled":!(x.jsx||x.unstyled||N),"data-mounted":K,"data-promise":!!x.promise,"data-swiped":Se,"data-removed":se,"data-visible":xs,"data-y-position":Bn,"data-x-position":kt,"data-index":k,"data-front":ps,"data-swiping":ue,"data-dismissible":an,"data-type":Mt,"data-invert":Si,"data-swipe-out":G,"data-swipe-direction":_,"data-expanded":!!(F||te&&K),"data-testid":x.testId,style:{"--index":k,"--toasts-before":k,"--z-index":A.length-k,"--offset":`${se?Dt:za.current}px`,"--initial-height":te?"auto":`${zn}px`,...z,...x.style},onDragEnd:()=>{we(!1),ve(null),nn.current=null},onPointerDown:Ee=>{Ee.button!==2&&(gs||!an||(hs.current=new Date,it(za.current),Ee.target.setPointerCapture(Ee.pointerId),Ee.target.tagName!=="BUTTON"&&(we(!0),nn.current={x:Ee.clientX,y:Ee.clientY})))},onPointerUp:()=>{var Ee,$e,pt;if(G||!an)return;nn.current=null;const Tt=Number(((Ee=$t.current)==null?void 0:Ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),rn=Number((($e=$t.current)==null?void 0:$e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ie=new Date().getTime()-((pt=hs.current)==null?void 0:pt.getTime()),Lt=xe==="x"?Tt:rn,Hn=Math.abs(Lt)/Ie;if(Math.abs(Lt)>=_2||Hn>.11){it(za.current),x.onDismiss==null||x.onDismiss.call(x,x),X(xe==="x"?Tt>0?"right":"left":rn>0?"down":"up"),Ca(),D(!0);return}else{var Ut,Bt;(Ut=$t.current)==null||Ut.style.setProperty("--swipe-amount-x","0px"),(Bt=$t.current)==null||Bt.style.setProperty("--swipe-amount-y","0px")}fe(!1),we(!1),ve(null)},onPointerMove:Ee=>{var $e,pt,Tt;if(!nn.current||!an||(($e=window.getSelection())==null?void 0:$e.toString().length)>0)return;const Ie=Ee.clientY-nn.current.y,Lt=Ee.clientX-nn.current.x;var Hn;const Ut=(Hn=a.swipeDirections)!=null?Hn:M2(Me);!xe&&(Math.abs(Lt)>1||Math.abs(Ie)>1)&&ve(Math.abs(Lt)>Math.abs(Ie)?"x":"y");let Bt={x:0,y:0};const pr=ya=>1/(1.5+Math.abs(ya)/20);if(xe==="y"){if(Ut.includes("top")||Ut.includes("bottom"))if(Ut.includes("top")&&Ie<0||Ut.includes("bottom")&&Ie>0)Bt.y=Ie;else{const ya=Ie*pr(Ie);Bt.y=Math.abs(ya)<Math.abs(Ie)?ya:Ie}}else if(xe==="x"&&(Ut.includes("left")||Ut.includes("right")))if(Ut.includes("left")&&Lt<0||Ut.includes("right")&&Lt>0)Bt.x=Lt;else{const ya=Lt*pr(Lt);Bt.x=Math.abs(ya)<Math.abs(Lt)?ya:Lt}(Math.abs(Bt.x)>0||Math.abs(Bt.y)>0)&&fe(!0),(pt=$t.current)==null||pt.style.setProperty("--swipe-amount-x",`${Bt.x}px`),(Tt=$t.current)==null||Tt.style.setProperty("--swipe-amount-y",`${Bt.y}px`)}},Cl&&!x.jsx&&Mt!=="loading"?re.createElement("button",{"aria-label":Z,"data-disabled":gs,"data-close-button":!0,onClick:gs||!an?()=>{}:()=>{Ca(),x.onDismiss==null||x.onDismiss.call(x,x)},className:ka(w?.closeButton,x==null||(i=x.classNames)==null?void 0:i.closeButton)},(Ta=Y?.close)!=null?Ta:p2):null,(Mt||x.icon||x.promise)&&x.icon!==null&&(Y?.[Mt]!==null||x.icon)?re.createElement("div",{"data-icon":"",className:ka(w?.icon,x==null||(d=x.classNames)==null?void 0:d.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||mr():null,x.type!=="loading"?hr:null):null,re.createElement("div",{"data-content":"",className:ka(w?.content,x==null||(f=x.classNames)==null?void 0:f.content)},re.createElement("div",{"data-title":"",className:ka(w?.title,x==null||(m=x.classNames)==null?void 0:m.title)},x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title),x.description?re.createElement("div",{"data-description":"",className:ka(le,bi,w?.description,x==null||(v=x.classNames)==null?void 0:v.description)},typeof x.description=="function"?x.description():x.description):null),re.isValidElement(x.cancel)?x.cancel:x.cancel&&Vo(x.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||q,onClick:Ee=>{Vo(x.cancel)&&an&&(x.cancel.onClick==null||x.cancel.onClick.call(x.cancel,Ee),Ca())},className:ka(w?.cancelButton,x==null||(g=x.classNames)==null?void 0:g.cancelButton)},x.cancel.label):null,re.isValidElement(x.action)?x.action:x.action&&Vo(x.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||ae,onClick:Ee=>{Vo(x.action)&&(x.action.onClick==null||x.action.onClick.call(x.action,Ee),!Ee.defaultPrevented&&Ca())},className:ka(w?.actionButton,x==null||(p=x.classNames)==null?void 0:p.actionButton)},x.action.label):null)};function fx(){if(typeof window>"u"||typeof document>"u")return"ltr";const a=document.documentElement.getAttribute("dir");return a==="auto"||!a?window.getComputedStyle(document.documentElement).direction:a}function k2(a,s){const o={};return[a,s].forEach((i,d)=>{const f=d===1,m=f?"--mobile-offset":"--offset",v=f?E2:w2;function g(p){["top","right","bottom","left"].forEach(y=>{o[`${m}-${y}`]=typeof p=="number"?`${p}px`:p})}typeof i=="number"||typeof i=="string"?g(i):typeof i=="object"?["top","right","bottom","left"].forEach(p=>{i[p]===void 0?o[`${m}-${p}`]=v:o[`${m}-${p}`]=typeof i[p]=="number"?`${i[p]}px`:i[p]}):g(v)}),o}const O2=re.forwardRef(function(s,o){const{id:i,invert:d,position:f="bottom-right",hotkey:m=["altKey","KeyT"],expand:v,closeButton:g,className:p,offset:y,mobileOffset:x,theme:N="light",richColors:R,duration:j,style:E,visibleToasts:C=j2,toastOptions:k,dir:A=fx(),gap:F=T2,icons:H,containerAriaLabel:ne="Notifications"}=s,[W,z]=re.useState([]),q=re.useMemo(()=>i?W.filter(K=>K.toasterId===i):W.filter(K=>!K.toasterId),[W,i]),ae=re.useMemo(()=>Array.from(new Set([f].concat(q.filter(K=>K.position).map(K=>K.position)))),[q,f]),[je,le]=re.useState([]),[he,Me]=re.useState(!1),[Te,te]=re.useState(!1),[w,Y]=re.useState(N!=="system"?N:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=re.useRef(null),xe=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=re.useRef(null),_=re.useRef(!1),X=re.useCallback(K=>{z(I=>{var se;return(se=I.find(me=>me.id===K.id))!=null&&se.delete||Xt.dismiss(K.id),I.filter(({id:me})=>me!==K.id)})},[]);return re.useEffect(()=>Xt.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{z(I=>I.map(se=>se.id===K.id?{...se,delete:!0}:se))});return}setTimeout(()=>{w1.flushSync(()=>{z(I=>{const se=I.findIndex(me=>me.id===K.id);return se!==-1?[...I.slice(0,se),{...I[se],...K},...I.slice(se+1)]:[K,...I]})})})}),[W]),re.useEffect(()=>{if(N!=="system"){Y(N);return}if(N==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:I})=>{Y(I?"dark":"light")})}catch{K.addListener(({matches:se})=>{try{Y(se?"dark":"light")}catch(me){console.error(me)}})}},[N]),re.useEffect(()=>{W.length<=1&&Me(!1)},[W]),re.useEffect(()=>{const K=I=>{var se;if(m.every(we=>I[we]||I.code===we)){var ue;Me(!0),(ue=Z.current)==null||ue.focus()}I.code==="Escape"&&(document.activeElement===Z.current||(se=Z.current)!=null&&se.contains(document.activeElement))&&Me(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[m]),re.useEffect(()=>{if(Z.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,_.current=!1)}},[Z.current]),re.createElement("section",{ref:o,"aria-label":`${ne} ${xe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ae.map((K,I)=>{var se;const[me,ue]=K.split("-");return q.length?re.createElement("ol",{key:K,dir:A==="auto"?fx():A,tabIndex:-1,ref:Z,className:p,"data-sonner-toaster":!0,"data-sonner-theme":w,"data-y-position":me,"data-x-position":ue,style:{"--front-toast-height":`${((se=je[0])==null?void 0:se.height)||0}px`,"--width":`${C2}px`,"--gap":`${F}px`,...E,...k2(y,x)},onBlur:we=>{_.current&&!we.currentTarget.contains(we.relatedTarget)&&(_.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||_.current||(_.current=!0,ve.current=we.relatedTarget)},onMouseEnter:()=>Me(!0),onMouseMove:()=>Me(!0),onMouseLeave:()=>{Te||Me(!1)},onDragEnd:()=>Me(!1),onPointerDown:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},q.filter(we=>!we.position&&I===0||we.position===K).map((we,G)=>{var D,Se;return re.createElement(A2,{key:we.id,icons:H,index:G,toast:we,defaultRichColors:R,duration:(D=k?.duration)!=null?D:j,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:d,visibleToasts:C,closeButton:(Se=k?.closeButton)!=null?Se:g,interacting:Te,position:K,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:X,toasts:q.filter(fe=>fe.position==we.position),heights:je.filter(fe=>fe.position==we.position),setHeights:le,expandByDefault:v,gap:F,expanded:he,swipeDirections:s.swipeDirections})})):null}))}),jv=S.createContext(void 0),wv="jarvis-admin-theme";function z2(){const a=localStorage.getItem(wv);return a==="light"||a==="dark"?a:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function D2({children:a}){const[s,o]=S.useState(z2);S.useEffect(()=>{document.documentElement.classList.toggle("dark",s==="dark"),localStorage.setItem(wv,s)},[s]);const i=S.useCallback(()=>{o(d=>d==="dark"?"light":"dark")},[]);return l.jsx(jv.Provider,{value:{theme:s,toggleTheme:i},children:a})}function L2(){const a=S.useContext(jv);if(!a)throw new Error("useTheme must be used within ThemeProvider");return a}function Ev(a,s){return function(){return a.apply(s,arguments)}}const{toString:U2}=Object.prototype,{getPrototypeOf:Ad}=Object,{iterator:di,toStringTag:Cv}=Symbol,fi=(a=>s=>{const o=U2.call(s);return a[o]||(a[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Ea=a=>(a=a.toLowerCase(),s=>fi(s)===a),mi=a=>s=>typeof s===a,{isArray:ds}=Array,ss=mi("undefined");function Sl(a){return a!==null&&!ss(a)&&a.constructor!==null&&!ss(a.constructor)&&Kt(a.constructor.isBuffer)&&a.constructor.isBuffer(a)}const Tv=Ea("ArrayBuffer");function B2(a){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(a):s=a&&a.buffer&&Tv(a.buffer),s}const q2=mi("string"),Kt=mi("function"),_v=mi("number"),Nl=a=>a!==null&&typeof a=="object",H2=a=>a===!0||a===!1,Io=a=>{if(fi(a)!=="object")return!1;const s=Ad(a);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Cv in a)&&!(di in a)},G2=a=>{if(!Nl(a)||Sl(a))return!1;try{return Object.keys(a).length===0&&Object.getPrototypeOf(a)===Object.prototype}catch{return!1}},Q2=Ea("Date"),V2=Ea("File"),F2=Ea("Blob"),Y2=Ea("FileList"),X2=a=>Nl(a)&&Kt(a.pipe),K2=a=>{let s;return a&&(typeof FormData=="function"&&a instanceof FormData||Kt(a.append)&&((s=fi(a))==="formdata"||s==="object"&&Kt(a.toString)&&a.toString()==="[object FormData]"))},Z2=Ea("URLSearchParams"),[$2,J2,P2,I2]=["ReadableStream","Request","Response","Headers"].map(Ea),W2=a=>a.trim?a.trim():a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jl(a,s,{allOwnKeys:o=!1}={}){if(a===null||typeof a>"u")return;let i,d;if(typeof a!="object"&&(a=[a]),ds(a))for(i=0,d=a.length;i<d;i++)s.call(null,a[i],i,a);else{if(Sl(a))return;const f=o?Object.getOwnPropertyNames(a):Object.keys(a),m=f.length;let v;for(i=0;i<m;i++)v=f[i],s.call(null,a[v],v,a)}}function Rv(a,s){if(Sl(a))return null;s=s.toLowerCase();const o=Object.keys(a);let i=o.length,d;for(;i-- >0;)if(d=o[i],s===d.toLowerCase())return d;return null}const lr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mv=a=>!ss(a)&&a!==lr;function cd(){const{caseless:a,skipUndefined:s}=Mv(this)&&this||{},o={},i=(d,f)=>{const m=a&&Rv(o,f)||f;Io(o[m])&&Io(d)?o[m]=cd(o[m],d):Io(d)?o[m]=cd({},d):ds(d)?o[m]=d.slice():(!s||!ss(d))&&(o[m]=d)};for(let d=0,f=arguments.length;d<f;d++)arguments[d]&&jl(arguments[d],i);return o}const eS=(a,s,o,{allOwnKeys:i}={})=>(jl(s,(d,f)=>{o&&Kt(d)?Object.defineProperty(a,f,{value:Ev(d,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(a,f,{value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),a),tS=a=>(a.charCodeAt(0)===65279&&(a=a.slice(1)),a),aS=(a,s,o,i)=>{a.prototype=Object.create(s.prototype,i),Object.defineProperty(a.prototype,"constructor",{value:a,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(a,"super",{value:s.prototype}),o&&Object.assign(a.prototype,o)},nS=(a,s,o,i)=>{let d,f,m;const v={};if(s=s||{},a==null)return s;do{for(d=Object.getOwnPropertyNames(a),f=d.length;f-- >0;)m=d[f],(!i||i(m,a,s))&&!v[m]&&(s[m]=a[m],v[m]=!0);a=o!==!1&&Ad(a)}while(a&&(!o||o(a,s))&&a!==Object.prototype);return s},rS=(a,s,o)=>{a=String(a),(o===void 0||o>a.length)&&(o=a.length),o-=s.length;const i=a.indexOf(s,o);return i!==-1&&i===o},sS=a=>{if(!a)return null;if(ds(a))return a;let s=a.length;if(!_v(s))return null;const o=new Array(s);for(;s-- >0;)o[s]=a[s];return o},lS=(a=>s=>a&&s instanceof a)(typeof Uint8Array<"u"&&Ad(Uint8Array)),oS=(a,s)=>{const i=(a&&a[di]).call(a);let d;for(;(d=i.next())&&!d.done;){const f=d.value;s.call(a,f[0],f[1])}},iS=(a,s)=>{let o;const i=[];for(;(o=a.exec(s))!==null;)i.push(o);return i},cS=Ea("HTMLFormElement"),uS=a=>a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,d){return i.toUpperCase()+d}),mx=(({hasOwnProperty:a})=>(s,o)=>a.call(s,o))(Object.prototype),dS=Ea("RegExp"),Av=(a,s)=>{const o=Object.getOwnPropertyDescriptors(a),i={};jl(o,(d,f)=>{let m;(m=s(d,f,a))!==!1&&(i[f]=m||d)}),Object.defineProperties(a,i)},fS=a=>{Av(a,(s,o)=>{if(Kt(a)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const i=a[o];if(Kt(i)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},mS=(a,s)=>{const o={},i=d=>{d.forEach(f=>{o[f]=!0})};return ds(a)?i(a):i(String(a).split(s)),o},hS=()=>{},pS=(a,s)=>a!=null&&Number.isFinite(a=+a)?a:s;function xS(a){return!!(a&&Kt(a.append)&&a[Cv]==="FormData"&&a[di])}const vS=a=>{const s=new Array(10),o=(i,d)=>{if(Nl(i)){if(s.indexOf(i)>=0)return;if(Sl(i))return i;if(!("toJSON"in i)){s[d]=i;const f=ds(i)?[]:{};return jl(i,(m,v)=>{const g=o(m,d+1);!ss(g)&&(f[v]=g)}),s[d]=void 0,f}}return i};return o(a,0)},gS=Ea("AsyncFunction"),yS=a=>a&&(Nl(a)||Kt(a))&&Kt(a.then)&&Kt(a.catch),kv=((a,s)=>a?setImmediate:s?((o,i)=>(lr.addEventListener("message",({source:d,data:f})=>{d===lr&&f===o&&i.length&&i.shift()()},!1),d=>{i.push(d),lr.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",Kt(lr.postMessage)),bS=typeof queueMicrotask<"u"?queueMicrotask.bind(lr):typeof process<"u"&&process.nextTick||kv,SS=a=>a!=null&&Kt(a[di]),V={isArray:ds,isArrayBuffer:Tv,isBuffer:Sl,isFormData:K2,isArrayBufferView:B2,isString:q2,isNumber:_v,isBoolean:H2,isObject:Nl,isPlainObject:Io,isEmptyObject:G2,isReadableStream:$2,isRequest:J2,isResponse:P2,isHeaders:I2,isUndefined:ss,isDate:Q2,isFile:V2,isBlob:F2,isRegExp:dS,isFunction:Kt,isStream:X2,isURLSearchParams:Z2,isTypedArray:lS,isFileList:Y2,forEach:jl,merge:cd,extend:eS,trim:W2,stripBOM:tS,inherits:aS,toFlatObject:nS,kindOf:fi,kindOfTest:Ea,endsWith:rS,toArray:sS,forEachEntry:oS,matchAll:iS,isHTMLForm:cS,hasOwnProperty:mx,hasOwnProp:mx,reduceDescriptors:Av,freezeMethods:fS,toObjectSet:mS,toCamelCase:uS,noop:hS,toFiniteNumber:pS,findKey:Rv,global:lr,isContextDefined:Mv,isSpecCompliantForm:xS,toJSONObject:vS,isAsyncFn:gS,isThenable:yS,setImmediate:kv,asap:bS,isIterable:SS};let Ne=class Ov extends Error{static from(s,o,i,d,f,m){const v=new Ov(s.message,o||s.code,i,d,f);return v.cause=s,v.name=s.name,m&&Object.assign(v,m),v}constructor(s,o,i,d,f){super(s),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),d&&(this.request=d),f&&(this.response=f,this.status=f.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.status}}};Ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ne.ERR_BAD_OPTION="ERR_BAD_OPTION";Ne.ECONNABORTED="ECONNABORTED";Ne.ETIMEDOUT="ETIMEDOUT";Ne.ERR_NETWORK="ERR_NETWORK";Ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ne.ERR_DEPRECATED="ERR_DEPRECATED";Ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ne.ERR_CANCELED="ERR_CANCELED";Ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ne.ERR_INVALID_URL="ERR_INVALID_URL";const NS=null;function ud(a){return V.isPlainObject(a)||V.isArray(a)}function zv(a){return V.endsWith(a,"[]")?a.slice(0,-2):a}function hx(a,s,o){return a?a.concat(s).map(function(d,f){return d=zv(d),!o&&f?"["+d+"]":d}).join(o?".":""):s}function jS(a){return V.isArray(a)&&!a.some(ud)}const wS=V.toFlatObject(V,{},null,function(s){return/^is[A-Z]/.test(s)});function hi(a,s,o){if(!V.isObject(a))throw new TypeError("target must be an object");s=s||new FormData,o=V.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,C){return!V.isUndefined(C[E])});const i=o.metaTokens,d=o.visitor||y,f=o.dots,m=o.indexes,g=(o.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(s);if(!V.isFunction(d))throw new TypeError("visitor must be a function");function p(j){if(j===null)return"";if(V.isDate(j))return j.toISOString();if(V.isBoolean(j))return j.toString();if(!g&&V.isBlob(j))throw new Ne("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(j)||V.isTypedArray(j)?g&&typeof Blob=="function"?new Blob([j]):Buffer.from(j):j}function y(j,E,C){let k=j;if(j&&!C&&typeof j=="object"){if(V.endsWith(E,"{}"))E=i?E:E.slice(0,-2),j=JSON.stringify(j);else if(V.isArray(j)&&jS(j)||(V.isFileList(j)||V.endsWith(E,"[]"))&&(k=V.toArray(j)))return E=zv(E),k.forEach(function(F,H){!(V.isUndefined(F)||F===null)&&s.append(m===!0?hx([E],H,f):m===null?E:E+"[]",p(F))}),!1}return ud(j)?!0:(s.append(hx(C,E,f),p(j)),!1)}const x=[],N=Object.assign(wS,{defaultVisitor:y,convertValue:p,isVisitable:ud});function R(j,E){if(!V.isUndefined(j)){if(x.indexOf(j)!==-1)throw Error("Circular reference detected in "+E.join("."));x.push(j),V.forEach(j,function(k,A){(!(V.isUndefined(k)||k===null)&&d.call(s,k,V.isString(A)?A.trim():A,E,N))===!0&&R(k,E?E.concat(A):[A])}),x.pop()}}if(!V.isObject(a))throw new TypeError("data must be an object");return R(a),s}function px(a){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g,function(i){return s[i]})}function kd(a,s){this._pairs=[],a&&hi(a,this,s)}const Dv=kd.prototype;Dv.append=function(s,o){this._pairs.push([s,o])};Dv.toString=function(s){const o=s?function(i){return s.call(this,i,px)}:px;return this._pairs.map(function(d){return o(d[0])+"="+o(d[1])},"").join("&")};function ES(a){return encodeURIComponent(a).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lv(a,s,o){if(!s)return a;const i=o&&o.encode||ES,d=V.isFunction(o)?{serialize:o}:o,f=d&&d.serialize;let m;if(f?m=f(s,d):m=V.isURLSearchParams(s)?s.toString():new kd(s,d).toString(i),m){const v=a.indexOf("#");v!==-1&&(a=a.slice(0,v)),a+=(a.indexOf("?")===-1?"?":"&")+m}return a}class xx{constructor(){this.handlers=[]}use(s,o,i){return this.handlers.push({fulfilled:s,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){V.forEach(this.handlers,function(i){i!==null&&s(i)})}}const Uv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},CS=typeof URLSearchParams<"u"?URLSearchParams:kd,TS=typeof FormData<"u"?FormData:null,_S=typeof Blob<"u"?Blob:null,RS={isBrowser:!0,classes:{URLSearchParams:CS,FormData:TS,Blob:_S},protocols:["http","https","file","blob","url","data"]},Od=typeof window<"u"&&typeof document<"u",dd=typeof navigator=="object"&&navigator||void 0,MS=Od&&(!dd||["ReactNative","NativeScript","NS"].indexOf(dd.product)<0),AS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kS=Od&&window.location.href||"http://localhost",OS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Od,hasStandardBrowserEnv:MS,hasStandardBrowserWebWorkerEnv:AS,navigator:dd,origin:kS},Symbol.toStringTag,{value:"Module"})),Rt={...OS,...RS};function zS(a,s){return hi(a,new Rt.classes.URLSearchParams,{visitor:function(o,i,d,f){return Rt.isNode&&V.isBuffer(o)?(this.append(i,o.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...s})}function DS(a){return V.matchAll(/\w+|\[(\w*)]/g,a).map(s=>s[0]==="[]"?"":s[1]||s[0])}function LS(a){const s={},o=Object.keys(a);let i;const d=o.length;let f;for(i=0;i<d;i++)f=o[i],s[f]=a[f];return s}function Bv(a){function s(o,i,d,f){let m=o[f++];if(m==="__proto__")return!0;const v=Number.isFinite(+m),g=f>=o.length;return m=!m&&V.isArray(d)?d.length:m,g?(V.hasOwnProp(d,m)?d[m]=[d[m],i]:d[m]=i,!v):((!d[m]||!V.isObject(d[m]))&&(d[m]=[]),s(o,i,d[m],f)&&V.isArray(d[m])&&(d[m]=LS(d[m])),!v)}if(V.isFormData(a)&&V.isFunction(a.entries)){const o={};return V.forEachEntry(a,(i,d)=>{s(DS(i),d,o,0)}),o}return null}function US(a,s,o){if(V.isString(a))try{return(s||JSON.parse)(a),V.trim(a)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(a)}const wl={transitional:Uv,adapter:["xhr","http","fetch"],transformRequest:[function(s,o){const i=o.getContentType()||"",d=i.indexOf("application/json")>-1,f=V.isObject(s);if(f&&V.isHTMLForm(s)&&(s=new FormData(s)),V.isFormData(s))return d?JSON.stringify(Bv(s)):s;if(V.isArrayBuffer(s)||V.isBuffer(s)||V.isStream(s)||V.isFile(s)||V.isBlob(s)||V.isReadableStream(s))return s;if(V.isArrayBufferView(s))return s.buffer;if(V.isURLSearchParams(s))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let v;if(f){if(i.indexOf("application/x-www-form-urlencoded")>-1)return zS(s,this.formSerializer).toString();if((v=V.isFileList(s))||i.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return hi(v?{"files[]":s}:s,g&&new g,this.formSerializer)}}return f||d?(o.setContentType("application/json",!1),US(s)):s}],transformResponse:[function(s){const o=this.transitional||wl.transitional,i=o&&o.forcedJSONParsing,d=this.responseType==="json";if(V.isResponse(s)||V.isReadableStream(s))return s;if(s&&V.isString(s)&&(i&&!this.responseType||d)){const m=!(o&&o.silentJSONParsing)&&d;try{return JSON.parse(s,this.parseReviver)}catch(v){if(m)throw v.name==="SyntaxError"?Ne.from(v,Ne.ERR_BAD_RESPONSE,this,null,this.response):v}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],a=>{wl.headers[a]={}});const BS=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qS=a=>{const s={};let o,i,d;return a&&a.split(`
|
|
12
|
-
`).forEach(function(m){d=m.indexOf(":"),o=m.substring(0,d).trim().toLowerCase(),i=m.substring(d+1).trim(),!(!o||s[o]&&BS[o])&&(o==="set-cookie"?s[o]?s[o].push(i):s[o]=[i]:s[o]=s[o]?s[o]+", "+i:i)}),s},vx=Symbol("internals");function dl(a){return a&&String(a).trim().toLowerCase()}function Wo(a){return a===!1||a==null?a:V.isArray(a)?a.map(Wo):String(a)}function HS(a){const s=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=o.exec(a);)s[i[1]]=i[2];return s}const GS=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function Gu(a,s,o,i,d){if(V.isFunction(i))return i.call(this,s,o);if(d&&(s=o),!!V.isString(s)){if(V.isString(i))return s.indexOf(i)!==-1;if(V.isRegExp(i))return i.test(s)}}function QS(a){return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,o,i)=>o.toUpperCase()+i)}function VS(a,s){const o=V.toCamelCase(" "+s);["get","set","has"].forEach(i=>{Object.defineProperty(a,i+o,{value:function(d,f,m){return this[i].call(this,s,d,f,m)},configurable:!0})})}let Zt=class{constructor(s){s&&this.set(s)}set(s,o,i){const d=this;function f(v,g,p){const y=dl(g);if(!y)throw new Error("header name must be a non-empty string");const x=V.findKey(d,y);(!x||d[x]===void 0||p===!0||p===void 0&&d[x]!==!1)&&(d[x||g]=Wo(v))}const m=(v,g)=>V.forEach(v,(p,y)=>f(p,y,g));if(V.isPlainObject(s)||s instanceof this.constructor)m(s,o);else if(V.isString(s)&&(s=s.trim())&&!GS(s))m(qS(s),o);else if(V.isObject(s)&&V.isIterable(s)){let v={},g,p;for(const y of s){if(!V.isArray(y))throw TypeError("Object iterator must return a key-value pair");v[p=y[0]]=(g=v[p])?V.isArray(g)?[...g,y[1]]:[g,y[1]]:y[1]}m(v,o)}else s!=null&&f(o,s,i);return this}get(s,o){if(s=dl(s),s){const i=V.findKey(this,s);if(i){const d=this[i];if(!o)return d;if(o===!0)return HS(d);if(V.isFunction(o))return o.call(this,d,i);if(V.isRegExp(o))return o.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,o){if(s=dl(s),s){const i=V.findKey(this,s);return!!(i&&this[i]!==void 0&&(!o||Gu(this,this[i],i,o)))}return!1}delete(s,o){const i=this;let d=!1;function f(m){if(m=dl(m),m){const v=V.findKey(i,m);v&&(!o||Gu(i,i[v],v,o))&&(delete i[v],d=!0)}}return V.isArray(s)?s.forEach(f):f(s),d}clear(s){const o=Object.keys(this);let i=o.length,d=!1;for(;i--;){const f=o[i];(!s||Gu(this,this[f],f,s,!0))&&(delete this[f],d=!0)}return d}normalize(s){const o=this,i={};return V.forEach(this,(d,f)=>{const m=V.findKey(i,f);if(m){o[m]=Wo(d),delete o[f];return}const v=s?QS(f):String(f).trim();v!==f&&delete o[f],o[v]=Wo(d),i[v]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const o=Object.create(null);return V.forEach(this,(i,d)=>{i!=null&&i!==!1&&(o[d]=s&&V.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,o])=>s+": "+o).join(`
|
|
13
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...o){const i=new this(s);return o.forEach(d=>i.set(d)),i}static accessor(s){const i=(this[vx]=this[vx]={accessors:{}}).accessors,d=this.prototype;function f(m){const v=dl(m);i[v]||(VS(d,m),i[v]=!0)}return V.isArray(s)?s.forEach(f):f(s),this}};Zt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(Zt.prototype,({value:a},s)=>{let o=s[0].toUpperCase()+s.slice(1);return{get:()=>a,set(i){this[o]=i}}});V.freezeMethods(Zt);function Qu(a,s){const o=this||wl,i=s||o,d=Zt.from(i.headers);let f=i.data;return V.forEach(a,function(v){f=v.call(o,f,d.normalize(),s?s.status:void 0)}),d.normalize(),f}function qv(a){return!!(a&&a.__CANCEL__)}let El=class extends Ne{constructor(s,o,i){super(s??"canceled",Ne.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Hv(a,s,o){const i=o.config.validateStatus;!o.status||!i||i(o.status)?a(o):s(new Ne("Request failed with status code "+o.status,[Ne.ERR_BAD_REQUEST,Ne.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function FS(a){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return s&&s[1]||""}function YS(a,s){a=a||10;const o=new Array(a),i=new Array(a);let d=0,f=0,m;return s=s!==void 0?s:1e3,function(g){const p=Date.now(),y=i[f];m||(m=p),o[d]=g,i[d]=p;let x=f,N=0;for(;x!==d;)N+=o[x++],x=x%a;if(d=(d+1)%a,d===f&&(f=(f+1)%a),p-m<s)return;const R=y&&p-y;return R?Math.round(N*1e3/R):void 0}}function XS(a,s){let o=0,i=1e3/s,d,f;const m=(p,y=Date.now())=>{o=y,d=null,f&&(clearTimeout(f),f=null),a(...p)};return[(...p)=>{const y=Date.now(),x=y-o;x>=i?m(p,y):(d=p,f||(f=setTimeout(()=>{f=null,m(d)},i-x)))},()=>d&&m(d)]}const li=(a,s,o=3)=>{let i=0;const d=YS(50,250);return XS(f=>{const m=f.loaded,v=f.lengthComputable?f.total:void 0,g=m-i,p=d(g),y=m<=v;i=m;const x={loaded:m,total:v,progress:v?m/v:void 0,bytes:g,rate:p||void 0,estimated:p&&v&&y?(v-m)/p:void 0,event:f,lengthComputable:v!=null,[s?"download":"upload"]:!0};a(x)},o)},gx=(a,s)=>{const o=a!=null;return[i=>s[0]({lengthComputable:o,total:a,loaded:i}),s[1]]},yx=a=>(...s)=>V.asap(()=>a(...s)),KS=Rt.hasStandardBrowserEnv?((a,s)=>o=>(o=new URL(o,Rt.origin),a.protocol===o.protocol&&a.host===o.host&&(s||a.port===o.port)))(new URL(Rt.origin),Rt.navigator&&/(msie|trident)/i.test(Rt.navigator.userAgent)):()=>!0,ZS=Rt.hasStandardBrowserEnv?{write(a,s,o,i,d,f,m){if(typeof document>"u")return;const v=[`${a}=${encodeURIComponent(s)}`];V.isNumber(o)&&v.push(`expires=${new Date(o).toUTCString()}`),V.isString(i)&&v.push(`path=${i}`),V.isString(d)&&v.push(`domain=${d}`),f===!0&&v.push("secure"),V.isString(m)&&v.push(`SameSite=${m}`),document.cookie=v.join("; ")},read(a){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+a+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(a){this.write(a,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function $S(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function JS(a,s){return s?a.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):a}function Gv(a,s,o){let i=!$S(s);return a&&(i||o==!1)?JS(a,s):s}const bx=a=>a instanceof Zt?{...a}:a;function ur(a,s){s=s||{};const o={};function i(p,y,x,N){return V.isPlainObject(p)&&V.isPlainObject(y)?V.merge.call({caseless:N},p,y):V.isPlainObject(y)?V.merge({},y):V.isArray(y)?y.slice():y}function d(p,y,x,N){if(V.isUndefined(y)){if(!V.isUndefined(p))return i(void 0,p,x,N)}else return i(p,y,x,N)}function f(p,y){if(!V.isUndefined(y))return i(void 0,y)}function m(p,y){if(V.isUndefined(y)){if(!V.isUndefined(p))return i(void 0,p)}else return i(void 0,y)}function v(p,y,x){if(x in s)return i(p,y);if(x in a)return i(void 0,p)}const g={url:f,method:f,data:f,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:v,headers:(p,y,x)=>d(bx(p),bx(y),x,!0)};return V.forEach(Object.keys({...a,...s}),function(y){const x=g[y]||d,N=x(a[y],s[y],y);V.isUndefined(N)&&x!==v||(o[y]=N)}),o}const Qv=a=>{const s=ur({},a);let{data:o,withXSRFToken:i,xsrfHeaderName:d,xsrfCookieName:f,headers:m,auth:v}=s;if(s.headers=m=Zt.from(m),s.url=Lv(Gv(s.baseURL,s.url,s.allowAbsoluteUrls),a.params,a.paramsSerializer),v&&m.set("Authorization","Basic "+btoa((v.username||"")+":"+(v.password?unescape(encodeURIComponent(v.password)):""))),V.isFormData(o)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(V.isFunction(o.getHeaders)){const g=o.getHeaders(),p=["content-type","content-length"];Object.entries(g).forEach(([y,x])=>{p.includes(y.toLowerCase())&&m.set(y,x)})}}if(Rt.hasStandardBrowserEnv&&(i&&V.isFunction(i)&&(i=i(s)),i||i!==!1&&KS(s.url))){const g=d&&f&&ZS.read(f);g&&m.set(d,g)}return s},PS=typeof XMLHttpRequest<"u",IS=PS&&function(a){return new Promise(function(o,i){const d=Qv(a);let f=d.data;const m=Zt.from(d.headers).normalize();let{responseType:v,onUploadProgress:g,onDownloadProgress:p}=d,y,x,N,R,j;function E(){R&&R(),j&&j(),d.cancelToken&&d.cancelToken.unsubscribe(y),d.signal&&d.signal.removeEventListener("abort",y)}let C=new XMLHttpRequest;C.open(d.method.toUpperCase(),d.url,!0),C.timeout=d.timeout;function k(){if(!C)return;const F=Zt.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),ne={data:!v||v==="text"||v==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:F,config:a,request:C};Hv(function(z){o(z),E()},function(z){i(z),E()},ne),C=null}"onloadend"in C?C.onloadend=k:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(k)},C.onabort=function(){C&&(i(new Ne("Request aborted",Ne.ECONNABORTED,a,C)),C=null)},C.onerror=function(H){const ne=H&&H.message?H.message:"Network Error",W=new Ne(ne,Ne.ERR_NETWORK,a,C);W.event=H||null,i(W),C=null},C.ontimeout=function(){let H=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const ne=d.transitional||Uv;d.timeoutErrorMessage&&(H=d.timeoutErrorMessage),i(new Ne(H,ne.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,a,C)),C=null},f===void 0&&m.setContentType(null),"setRequestHeader"in C&&V.forEach(m.toJSON(),function(H,ne){C.setRequestHeader(ne,H)}),V.isUndefined(d.withCredentials)||(C.withCredentials=!!d.withCredentials),v&&v!=="json"&&(C.responseType=d.responseType),p&&([N,j]=li(p,!0),C.addEventListener("progress",N)),g&&C.upload&&([x,R]=li(g),C.upload.addEventListener("progress",x),C.upload.addEventListener("loadend",R)),(d.cancelToken||d.signal)&&(y=F=>{C&&(i(!F||F.type?new El(null,a,C):F),C.abort(),C=null)},d.cancelToken&&d.cancelToken.subscribe(y),d.signal&&(d.signal.aborted?y():d.signal.addEventListener("abort",y)));const A=FS(d.url);if(A&&Rt.protocols.indexOf(A)===-1){i(new Ne("Unsupported protocol "+A+":",Ne.ERR_BAD_REQUEST,a));return}C.send(f||null)})},WS=(a,s)=>{const{length:o}=a=a?a.filter(Boolean):[];if(s||o){let i=new AbortController,d;const f=function(p){if(!d){d=!0,v();const y=p instanceof Error?p:this.reason;i.abort(y instanceof Ne?y:new El(y instanceof Error?y.message:y))}};let m=s&&setTimeout(()=>{m=null,f(new Ne(`timeout of ${s}ms exceeded`,Ne.ETIMEDOUT))},s);const v=()=>{a&&(m&&clearTimeout(m),m=null,a.forEach(p=>{p.unsubscribe?p.unsubscribe(f):p.removeEventListener("abort",f)}),a=null)};a.forEach(p=>p.addEventListener("abort",f));const{signal:g}=i;return g.unsubscribe=()=>V.asap(v),g}},eN=function*(a,s){let o=a.byteLength;if(o<s){yield a;return}let i=0,d;for(;i<o;)d=i+s,yield a.slice(i,d),i=d},tN=async function*(a,s){for await(const o of aN(a))yield*eN(o,s)},aN=async function*(a){if(a[Symbol.asyncIterator]){yield*a;return}const s=a.getReader();try{for(;;){const{done:o,value:i}=await s.read();if(o)break;yield i}}finally{await s.cancel()}},Sx=(a,s,o,i)=>{const d=tN(a,s);let f=0,m,v=g=>{m||(m=!0,i&&i(g))};return new ReadableStream({async pull(g){try{const{done:p,value:y}=await d.next();if(p){v(),g.close();return}let x=y.byteLength;if(o){let N=f+=x;o(N)}g.enqueue(new Uint8Array(y))}catch(p){throw v(p),p}},cancel(g){return v(g),d.return()}},{highWaterMark:2})},Nx=64*1024,{isFunction:Fo}=V,nN=(({Request:a,Response:s})=>({Request:a,Response:s}))(V.global),{ReadableStream:jx,TextEncoder:wx}=V.global,Ex=(a,...s)=>{try{return!!a(...s)}catch{return!1}},rN=a=>{a=V.merge.call({skipUndefined:!0},nN,a);const{fetch:s,Request:o,Response:i}=a,d=s?Fo(s):typeof fetch=="function",f=Fo(o),m=Fo(i);if(!d)return!1;const v=d&&Fo(jx),g=d&&(typeof wx=="function"?(j=>E=>j.encode(E))(new wx):async j=>new Uint8Array(await new o(j).arrayBuffer())),p=f&&v&&Ex(()=>{let j=!1;const E=new o(Rt.origin,{body:new jx,method:"POST",get duplex(){return j=!0,"half"}}).headers.has("Content-Type");return j&&!E}),y=m&&v&&Ex(()=>V.isReadableStream(new i("").body)),x={stream:y&&(j=>j.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(j=>{!x[j]&&(x[j]=(E,C)=>{let k=E&&E[j];if(k)return k.call(E);throw new Ne(`Response type '${j}' is not supported`,Ne.ERR_NOT_SUPPORT,C)})});const N=async j=>{if(j==null)return 0;if(V.isBlob(j))return j.size;if(V.isSpecCompliantForm(j))return(await new o(Rt.origin,{method:"POST",body:j}).arrayBuffer()).byteLength;if(V.isArrayBufferView(j)||V.isArrayBuffer(j))return j.byteLength;if(V.isURLSearchParams(j)&&(j=j+""),V.isString(j))return(await g(j)).byteLength},R=async(j,E)=>{const C=V.toFiniteNumber(j.getContentLength());return C??N(E)};return async j=>{let{url:E,method:C,data:k,signal:A,cancelToken:F,timeout:H,onDownloadProgress:ne,onUploadProgress:W,responseType:z,headers:q,withCredentials:ae="same-origin",fetchOptions:je}=Qv(j),le=s||fetch;z=z?(z+"").toLowerCase():"text";let he=WS([A,F&&F.toAbortSignal()],H),Me=null;const Te=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let te;try{if(W&&p&&C!=="get"&&C!=="head"&&(te=await R(q,k))!==0){let _=new o(E,{method:"POST",body:k,duplex:"half"}),X;if(V.isFormData(k)&&(X=_.headers.get("content-type"))&&q.setContentType(X),_.body){const[K,I]=gx(te,li(yx(W)));k=Sx(_.body,Nx,K,I)}}V.isString(ae)||(ae=ae?"include":"omit");const w=f&&"credentials"in o.prototype,Y={...je,signal:he,method:C.toUpperCase(),headers:q.normalize().toJSON(),body:k,duplex:"half",credentials:w?ae:void 0};Me=f&&new o(E,Y);let Z=await(f?le(Me,je):le(E,Y));const xe=y&&(z==="stream"||z==="response");if(y&&(ne||xe&&Te)){const _={};["status","statusText","headers"].forEach(se=>{_[se]=Z[se]});const X=V.toFiniteNumber(Z.headers.get("content-length")),[K,I]=ne&&gx(X,li(yx(ne),!0))||[];Z=new i(Sx(Z.body,Nx,K,()=>{I&&I(),Te&&Te()}),_)}z=z||"text";let ve=await x[V.findKey(x,z)||"text"](Z,j);return!xe&&Te&&Te(),await new Promise((_,X)=>{Hv(_,X,{data:ve,headers:Zt.from(Z.headers),status:Z.status,statusText:Z.statusText,config:j,request:Me})})}catch(w){throw Te&&Te(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,j,Me),{cause:w.cause||w}):Ne.from(w,w&&w.code,j,Me)}}},sN=new Map,Vv=a=>{let s=a&&a.env||{};const{fetch:o,Request:i,Response:d}=s,f=[i,d,o];let m=f.length,v=m,g,p,y=sN;for(;v--;)g=f[v],p=y.get(g),p===void 0&&y.set(g,p=v?new Map:rN(s)),y=p;return p};Vv();const zd={http:NS,xhr:IS,fetch:{get:Vv}};V.forEach(zd,(a,s)=>{if(a){try{Object.defineProperty(a,"name",{value:s})}catch{}Object.defineProperty(a,"adapterName",{value:s})}});const Cx=a=>`- ${a}`,lN=a=>V.isFunction(a)||a===null||a===!1;function oN(a,s){a=V.isArray(a)?a:[a];const{length:o}=a;let i,d;const f={};for(let m=0;m<o;m++){i=a[m];let v;if(d=i,!lN(i)&&(d=zd[(v=String(i)).toLowerCase()],d===void 0))throw new Ne(`Unknown adapter '${v}'`);if(d&&(V.isFunction(d)||(d=d.get(s))))break;f[v||"#"+m]=d}if(!d){const m=Object.entries(f).map(([g,p])=>`adapter ${g} `+(p===!1?"is not supported by the environment":"is not available in the build"));let v=o?m.length>1?`since :
|
|
14
|
-
`+m.map(Cx).join(`
|
|
15
|
-
`):" "+Cx(m[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return d}const Fv={getAdapter:oN,adapters:zd};function Vu(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new El(null,a)}function Tx(a){return Vu(a),a.headers=Zt.from(a.headers),a.data=Qu.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),Fv.getAdapter(a.adapter||wl.adapter,a)(a).then(function(i){return Vu(a),i.data=Qu.call(a,a.transformResponse,i),i.headers=Zt.from(i.headers),i},function(i){return qv(i)||(Vu(a),i&&i.response&&(i.response.data=Qu.call(a,a.transformResponse,i.response),i.response.headers=Zt.from(i.response.headers))),Promise.reject(i)})}const Yv="1.13.4",pi={};["object","boolean","number","function","string","symbol"].forEach((a,s)=>{pi[a]=function(i){return typeof i===a||"a"+(s<1?"n ":" ")+a}});const _x={};pi.transitional=function(s,o,i){function d(f,m){return"[Axios v"+Yv+"] Transitional option '"+f+"'"+m+(i?". "+i:"")}return(f,m,v)=>{if(s===!1)throw new Ne(d(m," has been removed"+(o?" in "+o:"")),Ne.ERR_DEPRECATED);return o&&!_x[m]&&(_x[m]=!0,console.warn(d(m," has been deprecated since v"+o+" and will be removed in the near future"))),s?s(f,m,v):!0}};pi.spelling=function(s){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${s}`),!0)};function iN(a,s,o){if(typeof a!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const i=Object.keys(a);let d=i.length;for(;d-- >0;){const f=i[d],m=s[f];if(m){const v=a[f],g=v===void 0||m(v,f,a);if(g!==!0)throw new Ne("option "+f+" must be "+g,Ne.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Ne("Unknown option "+f,Ne.ERR_BAD_OPTION)}}const ei={assertOptions:iN,validators:pi},Oa=ei.validators;let or=class{constructor(s){this.defaults=s||{},this.interceptors={request:new xx,response:new xx}}async request(s,o){try{return await this._request(s,o)}catch(i){if(i instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const f=d.stack?d.stack.replace(/^.+\n/,""):"";try{i.stack?f&&!String(i.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
16
|
-
`+f):i.stack=f}catch{}}throw i}}_request(s,o){typeof s=="string"?(o=o||{},o.url=s):o=s||{},o=ur(this.defaults,o);const{transitional:i,paramsSerializer:d,headers:f}=o;i!==void 0&&ei.assertOptions(i,{silentJSONParsing:Oa.transitional(Oa.boolean),forcedJSONParsing:Oa.transitional(Oa.boolean),clarifyTimeoutError:Oa.transitional(Oa.boolean)},!1),d!=null&&(V.isFunction(d)?o.paramsSerializer={serialize:d}:ei.assertOptions(d,{encode:Oa.function,serialize:Oa.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),ei.assertOptions(o,{baseUrl:Oa.spelling("baseURL"),withXsrfToken:Oa.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let m=f&&V.merge(f.common,f[o.method]);f&&V.forEach(["delete","get","head","post","put","patch","common"],j=>{delete f[j]}),o.headers=Zt.concat(m,f);const v=[];let g=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(o)===!1||(g=g&&E.synchronous,v.unshift(E.fulfilled,E.rejected))});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let y,x=0,N;if(!g){const j=[Tx.bind(this),void 0];for(j.unshift(...v),j.push(...p),N=j.length,y=Promise.resolve(o);x<N;)y=y.then(j[x++],j[x++]);return y}N=v.length;let R=o;for(;x<N;){const j=v[x++],E=v[x++];try{R=j(R)}catch(C){E.call(this,C);break}}try{y=Tx.call(this,R)}catch(j){return Promise.reject(j)}for(x=0,N=p.length;x<N;)y=y.then(p[x++],p[x++]);return y}getUri(s){s=ur(this.defaults,s);const o=Gv(s.baseURL,s.url,s.allowAbsoluteUrls);return Lv(o,s.params,s.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(s){or.prototype[s]=function(o,i){return this.request(ur(i||{},{method:s,url:o,data:(i||{}).data}))}});V.forEach(["post","put","patch"],function(s){function o(i){return function(f,m,v){return this.request(ur(v||{},{method:s,headers:i?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}or.prototype[s]=o(),or.prototype[s+"Form"]=o(!0)});let cN=class Xv{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(f){o=f});const i=this;this.promise.then(d=>{if(!i._listeners)return;let f=i._listeners.length;for(;f-- >0;)i._listeners[f](d);i._listeners=null}),this.promise.then=d=>{let f;const m=new Promise(v=>{i.subscribe(v),f=v}).then(d);return m.cancel=function(){i.unsubscribe(f)},m},s(function(f,m,v){i.reason||(i.reason=new El(f,m,v),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const o=this._listeners.indexOf(s);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const s=new AbortController,o=i=>{s.abort(i)};return this.subscribe(o),s.signal.unsubscribe=()=>this.unsubscribe(o),s.signal}static source(){let s;return{token:new Xv(function(d){s=d}),cancel:s}}};function uN(a){return function(o){return a.apply(null,o)}}function dN(a){return V.isObject(a)&&a.isAxiosError===!0}const fd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(fd).forEach(([a,s])=>{fd[s]=a});function Kv(a){const s=new or(a),o=Ev(or.prototype.request,s);return V.extend(o,or.prototype,s,{allOwnKeys:!0}),V.extend(o,s,null,{allOwnKeys:!0}),o.create=function(d){return Kv(ur(a,d))},o}const nt=Kv(wl);nt.Axios=or;nt.CanceledError=El;nt.CancelToken=cN;nt.isCancel=qv;nt.VERSION=Yv;nt.toFormData=hi;nt.AxiosError=Ne;nt.Cancel=nt.CanceledError;nt.all=function(s){return Promise.all(s)};nt.spread=uN;nt.isAxiosError=dN;nt.mergeConfig=ur;nt.AxiosHeaders=Zt;nt.formToJSON=a=>Bv(V.isHTMLForm(a)?new FormData(a):a);nt.getAdapter=Fv.getAdapter;nt.HttpStatusCode=fd;nt.default=nt;const{Axios:s3,AxiosError:l3,CanceledError:o3,isCancel:i3,CancelToken:c3,VERSION:u3,all:d3,Cancel:f3,isAxiosError:m3,spread:h3,toFormData:p3,AxiosHeaders:x3,HttpStatusCode:v3,formToJSON:g3,getAdapter:y3,mergeConfig:b3}=nt,ge=nt.create({baseURL:""});function ns(a){a?ge.defaults.headers.common.Authorization=`Bearer ${a}`:delete ge.defaults.headers.common.Authorization}let md=null;function fN(a){md=a}let Zv=null;function mN(a){Zv=a}ge.interceptors.request.use(a=>{if(!a.headers.Authorization){const s=localStorage.getItem("jarvis-admin:access_token")??localStorage.getItem("access_token");s&&(a.headers.Authorization=`Bearer ${s}`)}return a});ge.interceptors.response.use(a=>a,async a=>{const s=a.config;if(s.url?.startsWith("/api/auth/"))return Promise.reject(a);if(a.response?.status===401&&!s._retry&&md){s._retry=!0;const o=await md();if(o)return s.headers.Authorization=`Bearer ${o}`,ge(s);Zv?.()}return Promise.reject(a)});async function hN(){const{data:a}=await ge.get("/api/auth/setup-status");return a}async function $v(a,s,o){const{data:i}=await ge.post("/api/auth/setup",{email:a,password:s,username:o});return i}async function pN(a,s){const{data:o}=await ge.post("/api/auth/login",{email:a,password:s});return o}async function xN(a){const{data:s}=await ge.post("/api/auth/refresh",{refresh_token:a});return s}const Jv=S.createContext(void 0),fl="jarvis-admin:access_token",es="jarvis-admin:refresh_token",Yo="jarvis-admin:user",vN=600*1e3;function gN({children:a}){const[s,o]=S.useState(()=>{const g=localStorage.getItem(fl),p=localStorage.getItem(es),y=localStorage.getItem(Yo);if(g&&p&&y)try{const x=JSON.parse(y);return ns(g),{user:x,accessToken:g,refreshToken:p,isAuthenticated:!0,isLoading:!1,error:null}}catch{}return{user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null}}),i=S.useCallback(()=>{localStorage.removeItem(fl),localStorage.removeItem(es),localStorage.removeItem(Yo),ns(null),o({user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null})},[]),d=S.useCallback(async()=>{const g=localStorage.getItem(es);if(!g)return null;try{const p=await xN(g),y=p.access_token,x=p.refresh_token??g;return localStorage.setItem(fl,y),localStorage.setItem(es,x),ns(y),o(N=>({...N,accessToken:y,refreshToken:x})),y}catch{return i(),null}},[i]);S.useEffect(()=>{fN(d),mN(i)},[d,i]),S.useEffect(()=>{if(!s.isAuthenticated)return;const g=setInterval(()=>{d()},vN);return()=>clearInterval(g)},[s.isAuthenticated,d]);const f=S.useCallback(async(g,p)=>{o(y=>({...y,error:null,isLoading:!0}));try{const y=await pN(g,p);if(!y.user.is_superuser){o(x=>({...x,isLoading:!1,error:"Admin access required. This account is not a superuser."}));return}localStorage.setItem(fl,y.access_token),localStorage.setItem(es,y.refresh_token),localStorage.setItem(Yo,JSON.stringify(y.user)),ns(y.access_token),o({user:y.user,accessToken:y.access_token,refreshToken:y.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(y){const x=y?.response?.data?.detail??"Login failed";o(N=>({...N,isLoading:!1,error:x}))}},[]),m=S.useCallback(async(g,p,y)=>{o(x=>({...x,error:null,isLoading:!0}));try{const x=await $v(g,p,y);localStorage.setItem(fl,x.access_token),localStorage.setItem(es,x.refresh_token),localStorage.setItem(Yo,JSON.stringify(x.user)),ns(x.access_token),o({user:x.user,accessToken:x.access_token,refreshToken:x.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(x){const N=x?.response?.data?.detail??"Setup failed";o(R=>({...R,isLoading:!1,error:N}))}},[]),v=S.useMemo(()=>({state:s,login:f,setup:m,logout:i}),[s,f,m,i]);return l.jsx(Jv.Provider,{value:v,children:a})}function Dd(){const a=S.useContext(Jv);if(!a)throw new Error("useAuth must be used within AuthProvider");return a}const Pv=(...a)=>a.filter((s,o,i)=>!!s&&s.trim()!==""&&i.indexOf(s)===o).join(" ").trim();const yN=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const bN=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,o,i)=>i?i.toUpperCase():o.toLowerCase());const Rx=a=>{const s=bN(a);return s.charAt(0).toUpperCase()+s.slice(1)};var SN={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"};const NN=a=>{for(const s in a)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1};const jN=S.forwardRef(({color:a="currentColor",size:s=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:d="",children:f,iconNode:m,...v},g)=>S.createElement("svg",{ref:g,...SN,width:s,height:s,stroke:a,strokeWidth:i?Number(o)*24/Number(s):o,className:Pv("lucide",d),...!f&&!NN(v)&&{"aria-hidden":"true"},...v},[...m.map(([p,y])=>S.createElement(p,y)),...Array.isArray(f)?f:[f]]));const ye=(a,s)=>{const o=S.forwardRef(({className:i,...d},f)=>S.createElement(jN,{ref:f,iconNode:s,className:Pv(`lucide-${yN(Rx(a))}`,`lucide-${a}`,i),...d}));return o.displayName=Rx(a),o};const wN=[["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"}]],EN=ye("activity",wN);const CN=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],TN=ye("box",CN);const _N=[["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"}]],RN=ye("boxes",_N);const MN=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],hd=ye("brain",MN);const AN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],xi=ye("check",AN);const kN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ld=ye("chevron-down",kN);const ON=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Iv=ye("chevron-right",ON);const zN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ud=ye("circle-alert",zN);const DN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],Wv=ye("circle-arrow-up",DN);const LN=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],UN=ye("circle-check-big",LN);const BN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gt=ye("circle-check",BN);const qN=[["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"}]],pl=ye("circle-x",qN);const HN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ls=ye("circle",HN);const GN=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],QN=ye("clock",GN);const VN=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Bd=ye("copy",VN);const FN=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],kn=ye("cpu",FN);const YN=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],XN=ye("database",YN);const KN=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],xl=ye("download",KN);const ZN=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],$N=ye("external-link",ZN);const JN=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],eg=ye("file-text",JN);const PN=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],pd=ye("git-merge",PN);const IN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],WN=ye("globe",IN);const ej=[["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"}]],qd=ye("hard-drive",ej);const tj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],aj=ye("info",tj);const nj=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],rj=ye("key-round",nj);const sj=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],lj=ye("key",sj);const oj=[["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"}]],ij=ye("layout-dashboard",oj);const cj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],na=ye("loader-circle",cj);const uj=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Hd=ye("lock",uj);const dj=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],fj=ye("log-out",dj);const mj=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],hj=ye("monitor",mj);const pj=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],xj=ye("moon",pj);const vj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],gj=ye("pencil",vj);const yj=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],tg=ye("play",yj);const bj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ti=ye("plus",bj);const Sj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],mt=ye("refresh-cw",Sj);const Nj=[["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"}]],vi=ye("rotate-ccw",Nj);const jj=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Gd=ye("rotate-cw",jj);const wj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ej=ye("search",wj);const Cj=[["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"}]],Qd=ye("server",Cj);const Tj=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ag=ye("settings",Tj);const _j=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Rj=ye("shield-check",_j);const Mj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Aj=ye("sparkles",Mj);const kj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Oj=ye("square",kj);const zj=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Dj=ye("sun",zj);const Lj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],gi=ye("trash-2",Lj);const Uj=[["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"}]],ra=ye("triangle-alert",Uj);const Bj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]],qj=ye("user-x",Bj);const Hj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Gj=ye("users",Hj);const Qj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vd=ye("x",Qj);const Vj=[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Fj=ye("zap-off",Vj);const Yj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],oi=ye("zap",Yj);function ng(a){var s,o,i="";if(typeof a=="string"||typeof a=="number")i+=a;else if(typeof a=="object")if(Array.isArray(a)){var d=a.length;for(s=0;s<d;s++)a[s]&&(o=ng(a[s]))&&(i&&(i+=" "),i+=o)}else for(o in a)a[o]&&(i&&(i+=" "),i+=o);return i}function Xj(){for(var a,s,o=0,i="",d=arguments.length;o<d;o++)(a=arguments[o])&&(s=ng(a))&&(i&&(i+=" "),i+=s);return i}const Kj=(a,s)=>{const o=new Array(a.length+s.length);for(let i=0;i<a.length;i++)o[i]=a[i];for(let i=0;i<s.length;i++)o[a.length+i]=s[i];return o},Zj=(a,s)=>({classGroupId:a,validator:s}),rg=(a=new Map,s=null,o)=>({nextPart:a,validators:s,classGroupId:o}),ii="-",Mx=[],$j="arbitrary..",Jj=a=>{const s=Ij(a),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=a;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return Pj(m);const v=m.split(ii),g=v[0]===""&&v.length>1?1:0;return sg(v,g,s)},getConflictingClassGroupIds:(m,v)=>{if(v){const g=i[m],p=o[m];return g?p?Kj(p,g):g:p||Mx}return o[m]||Mx}}},sg=(a,s,o)=>{if(a.length-s===0)return o.classGroupId;const d=a[s],f=o.nextPart.get(d);if(f){const p=sg(a,s+1,f);if(p)return p}const m=o.validators;if(m===null)return;const v=s===0?a.join(ii):a.slice(s).join(ii),g=m.length;for(let p=0;p<g;p++){const y=m[p];if(y.validator(v))return y.classGroupId}},Pj=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=a.slice(1,-1),o=s.indexOf(":"),i=s.slice(0,o);return i?$j+i:void 0})(),Ij=a=>{const{theme:s,classGroups:o}=a;return Wj(o,s)},Wj=(a,s)=>{const o=rg();for(const i in a){const d=a[i];Fd(d,o,i,s)}return o},Fd=(a,s,o,i)=>{const d=a.length;for(let f=0;f<d;f++){const m=a[f];ew(m,s,o,i)}},ew=(a,s,o,i)=>{if(typeof a=="string"){tw(a,s,o);return}if(typeof a=="function"){aw(a,s,o,i);return}nw(a,s,o,i)},tw=(a,s,o)=>{const i=a===""?s:lg(s,a);i.classGroupId=o},aw=(a,s,o,i)=>{if(rw(a)){Fd(a(i),s,o,i);return}s.validators===null&&(s.validators=[]),s.validators.push(Zj(o,a))},nw=(a,s,o,i)=>{const d=Object.entries(a),f=d.length;for(let m=0;m<f;m++){const[v,g]=d[m];Fd(g,lg(s,v),o,i)}},lg=(a,s)=>{let o=a;const i=s.split(ii),d=i.length;for(let f=0;f<d;f++){const m=i[f];let v=o.nextPart.get(m);v||(v=rg(),o.nextPart.set(m,v)),o=v}return o},rw=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,sw=a=>{if(a<1)return{get:()=>{},set:()=>{}};let s=0,o=Object.create(null),i=Object.create(null);const d=(f,m)=>{o[f]=m,s++,s>a&&(s=0,i=o,o=Object.create(null))};return{get(f){let m=o[f];if(m!==void 0)return m;if((m=i[f])!==void 0)return d(f,m),m},set(f,m){f in o?o[f]=m:d(f,m)}}},xd="!",Ax=":",lw=[],kx=(a,s,o,i,d)=>({modifiers:a,hasImportantModifier:s,baseClassName:o,maybePostfixModifierPosition:i,isExternal:d}),ow=a=>{const{prefix:s,experimentalParseClassName:o}=a;let i=d=>{const f=[];let m=0,v=0,g=0,p;const y=d.length;for(let E=0;E<y;E++){const C=d[E];if(m===0&&v===0){if(C===Ax){f.push(d.slice(g,E)),g=E+1;continue}if(C==="/"){p=E;continue}}C==="["?m++:C==="]"?m--:C==="("?v++:C===")"&&v--}const x=f.length===0?d:d.slice(g);let N=x,R=!1;x.endsWith(xd)?(N=x.slice(0,-1),R=!0):x.startsWith(xd)&&(N=x.slice(1),R=!0);const j=p&&p>g?p-g:void 0;return kx(f,R,N,j)};if(s){const d=s+Ax,f=i;i=m=>m.startsWith(d)?f(m.slice(d.length)):kx(lw,!1,m,void 0,!0)}if(o){const d=i;i=f=>o({className:f,parseClassName:d})}return i},iw=a=>{const s=new Map;return a.orderSensitiveModifiers.forEach((o,i)=>{s.set(o,1e6+i)}),o=>{const i=[];let d=[];for(let f=0;f<o.length;f++){const m=o[f],v=m[0]==="[",g=s.has(m);v||g?(d.length>0&&(d.sort(),i.push(...d),d=[]),i.push(m)):d.push(m)}return d.length>0&&(d.sort(),i.push(...d)),i}},cw=a=>({cache:sw(a.cacheSize),parseClassName:ow(a),sortModifiers:iw(a),...Jj(a)}),uw=/\s+/,dw=(a,s)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:d,sortModifiers:f}=s,m=[],v=a.trim().split(uw);let g="";for(let p=v.length-1;p>=0;p-=1){const y=v[p],{isExternal:x,modifiers:N,hasImportantModifier:R,baseClassName:j,maybePostfixModifierPosition:E}=o(y);if(x){g=y+(g.length>0?" "+g:g);continue}let C=!!E,k=i(C?j.substring(0,E):j);if(!k){if(!C){g=y+(g.length>0?" "+g:g);continue}if(k=i(j),!k){g=y+(g.length>0?" "+g:g);continue}C=!1}const A=N.length===0?"":N.length===1?N[0]:f(N).join(":"),F=R?A+xd:A,H=F+k;if(m.indexOf(H)>-1)continue;m.push(H);const ne=d(k,C);for(let W=0;W<ne.length;++W){const z=ne[W];m.push(F+z)}g=y+(g.length>0?" "+g:g)}return g},fw=(...a)=>{let s=0,o,i,d="";for(;s<a.length;)(o=a[s++])&&(i=og(o))&&(d&&(d+=" "),d+=i);return d},og=a=>{if(typeof a=="string")return a;let s,o="";for(let i=0;i<a.length;i++)a[i]&&(s=og(a[i]))&&(o&&(o+=" "),o+=s);return o},mw=(a,...s)=>{let o,i,d,f;const m=g=>{const p=s.reduce((y,x)=>x(y),a());return o=cw(p),i=o.cache.get,d=o.cache.set,f=v,v(g)},v=g=>{const p=i(g);if(p)return p;const y=dw(g,o);return d(g,y),y};return f=m,(...g)=>f(fw(...g))},hw=[],ut=a=>{const s=o=>o[a]||hw;return s.isThemeGetter=!0,s},ig=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pw=/^\d+\/\d+$/,xw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vw=/\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$/,gw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ts=a=>pw.test(a),ke=a=>!!a&&!Number.isNaN(Number(a)),Mn=a=>!!a&&Number.isInteger(Number(a)),Fu=a=>a.endsWith("%")&&ke(a.slice(0,-1)),Wa=a=>xw.test(a),Sw=()=>!0,Nw=a=>vw.test(a)&&!gw.test(a),ug=()=>!1,jw=a=>yw.test(a),ww=a=>bw.test(a),Ew=a=>!ie(a)&&!ce(a),Cw=a=>fs(a,mg,ug),ie=a=>ig.test(a),rr=a=>fs(a,hg,Nw),Yu=a=>fs(a,Aw,ke),Ox=a=>fs(a,dg,ug),Tw=a=>fs(a,fg,ww),Xo=a=>fs(a,pg,jw),ce=a=>cg.test(a),ml=a=>ms(a,hg),_w=a=>ms(a,kw),zx=a=>ms(a,dg),Rw=a=>ms(a,mg),Mw=a=>ms(a,fg),Ko=a=>ms(a,pg,!0),fs=(a,s,o)=>{const i=ig.exec(a);return i?i[1]?s(i[1]):o(i[2]):!1},ms=(a,s,o=!1)=>{const i=cg.exec(a);return i?i[1]?s(i[1]):o:!1},dg=a=>a==="position"||a==="percentage",fg=a=>a==="image"||a==="url",mg=a=>a==="length"||a==="size"||a==="bg-size",hg=a=>a==="length",Aw=a=>a==="number",kw=a=>a==="family-name",pg=a=>a==="shadow",Ow=()=>{const a=ut("color"),s=ut("font"),o=ut("text"),i=ut("font-weight"),d=ut("tracking"),f=ut("leading"),m=ut("breakpoint"),v=ut("container"),g=ut("spacing"),p=ut("radius"),y=ut("shadow"),x=ut("inset-shadow"),N=ut("text-shadow"),R=ut("drop-shadow"),j=ut("blur"),E=ut("perspective"),C=ut("aspect"),k=ut("ease"),A=ut("animate"),F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ne=()=>[...H(),ce,ie],W=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],q=()=>[ce,ie,g],ae=()=>[ts,"full","auto",...q()],je=()=>[Mn,"none","subgrid",ce,ie],le=()=>["auto",{span:["full",Mn,ce,ie]},Mn,ce,ie],he=()=>[Mn,"auto",ce,ie],Me=()=>["auto","min","max","fr",ce,ie],Te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],w=()=>["auto",...q()],Y=()=>[ts,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...q()],Z=()=>[a,ce,ie],xe=()=>[...H(),zx,Ox,{position:[ce,ie]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",Rw,Cw,{size:[ce,ie]}],X=()=>[Fu,ml,rr],K=()=>["","none","full",p,ce,ie],I=()=>["",ke,ml,rr],se=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[ke,Fu,zx,Ox],we=()=>["","none",j,ce,ie],G=()=>["none",ke,ce,ie],D=()=>["none",ke,ce,ie],Se=()=>[ke,ce,ie],fe=()=>[ts,"full",...q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wa],breakpoint:[Wa],color:[Sw],container:[Wa],"drop-shadow":[Wa],ease:["in","out","in-out"],font:[Ew],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wa],shadow:[Wa],spacing:["px",ke],text:[Wa],"text-shadow":[Wa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ts,ie,ce,C]}],container:["container"],columns:[{columns:[ke,ie,ce,v]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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"],sr:["sr-only","not-sr-only"],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:ne()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ae()}],"inset-x":[{"inset-x":ae()}],"inset-y":[{"inset-y":ae()}],start:[{start:ae()}],end:[{end:ae()}],top:[{top:ae()}],right:[{right:ae()}],bottom:[{bottom:ae()}],left:[{left:ae()}],visibility:["visible","invisible","collapse"],z:[{z:[Mn,"auto",ce,ie]}],basis:[{basis:[ts,"full","auto",v,...q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,ts,"auto","initial","none",ie]}],grow:[{grow:["",ke,ce,ie]}],shrink:[{shrink:["",ke,ce,ie]}],order:[{order:[Mn,"first","last","none",ce,ie]}],"grid-cols":[{"grid-cols":je()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":je()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:q()}],"gap-x":[{"gap-x":q()}],"gap-y":[{"gap-y":q()}],"justify-content":[{justify:[...Te(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...Te()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":Te()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:q()}],px:[{px:q()}],py:[{py:q()}],ps:[{ps:q()}],pe:[{pe:q()}],pt:[{pt:q()}],pr:[{pr:q()}],pb:[{pb:q()}],pl:[{pl:q()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":q()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[v,"screen",...Y()]}],"min-w":[{"min-w":[v,"screen","none",...Y()]}],"max-w":[{"max-w":[v,"screen","none","prose",{screen:[m]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",o,ml,rr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ce,Yu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fu,ie]}],"font-family":[{font:[_w,ie,s]}],"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:[d,ce,ie]}],"line-clamp":[{"line-clamp":[ke,"none",ce,Yu]}],leading:[{leading:[f,...q()]}],"list-image":[{"list-image":["none",ce,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ce,rr]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[ke,"auto",ce,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:xe()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mn,ce,ie],radial:["",ce,ie],conic:[Mn,ce,ie]},Mw,Tw]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ce,ie]}],"outline-w":[{outline:["",ke,ml,rr]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",y,Ko,Xo]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",x,Ko,Xo]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[ke,rr]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",N,Ko,Xo]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[ke,ce,ie]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[ce,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":H()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:xe()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ie]}],filter:[{filter:["","none",ce,ie]}],blur:[{blur:we()}],brightness:[{brightness:[ke,ce,ie]}],contrast:[{contrast:[ke,ce,ie]}],"drop-shadow":[{"drop-shadow":["","none",R,Ko,Xo]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",ke,ce,ie]}],"hue-rotate":[{"hue-rotate":[ke,ce,ie]}],invert:[{invert:["",ke,ce,ie]}],saturate:[{saturate:[ke,ce,ie]}],sepia:[{sepia:["",ke,ce,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ie]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ce,ie]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ce,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ce,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ce,ie]}],"backdrop-invert":[{"backdrop-invert":["",ke,ce,ie]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ce,ie]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ce,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ce,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":q()}],"border-spacing-x":[{"border-spacing-x":q()}],"border-spacing-y":[{"border-spacing-y":q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ce,ie]}],ease:[{ease:["linear","initial",k,ce,ie]}],delay:[{delay:[ke,ce,ie]}],animate:[{animate:["none",A,ce,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ce,ie]}],"perspective-origin":[{"perspective-origin":ne()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:D()}],"scale-x":[{"scale-x":D()}],"scale-y":[{"scale-y":D()}],"scale-z":[{"scale-z":D()}],"scale-3d":["scale-3d"],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[ce,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:ne()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ce,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"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",ce,ie]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[ke,ml,rr,Yu]}],stroke:[{stroke:["none",...Z()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zw=mw(Ow);function ee(...a){return zw(Xj(a))}async function Dw(){const{data:a}=await ge.get("/api/system/info");return a}function Lw(){return yt({queryKey:["system-info"],queryFn:Dw,staleTime:6e4})}function Uw(a){const s=Math.floor(a/86400),o=Math.floor(a%86400/3600);if(s>0)return`${s}d ${o}h`;const i=Math.floor(a%3600/60);return o>0?`${o}h ${i}m`:`${i}m`}function Bw(){const{data:a}=Lw();return a?l.jsxs("div",{className:"border-t border-[var(--color-border)] px-3 py-2 text-[10px] text-[var(--color-text-muted)]",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(kn,{size:10}),l.jsxs("span",{children:[a.cpuCount," cores"]}),l.jsx("span",{className:"mx-0.5",children:"|"}),l.jsx(qd,{size:10}),l.jsxs("span",{children:[Math.round(a.totalMemoryMb/1024),"GB"]})]}),l.jsxs("div",{className:"mt-0.5",children:[a.hostname," · up ",Uw(a.uptime)," · v",a.version]})]}):null}const qw=[{label:"Dashboard",icon:ij,path:"/dashboard"},{label:"Settings",icon:ag,path:"/settings"},{label:"Services",icon:Qd,path:"/services"},{label:"Models",icon:TN,path:"/models"},{label:"Quick Sets",icon:oi,path:"/quick-sets"},{label:"Traces",icon:EN,path:"/traces"},{label:"Nodes",icon:kn,path:"/nodes"},{label:"Users",icon:Gj,path:"/users"},{label:"Native",icon:RN,path:"/native-services"}];function Hw(){return l.jsxs("aside",{className:"flex w-56 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface)]",children:[l.jsx("div",{className:"flex h-14 items-center border-b border-[var(--color-border)] px-4",children:l.jsx("span",{className:"text-lg font-bold text-[var(--color-primary)]",children:"Jarvis"})}),l.jsx("nav",{className:"flex-1 space-y-1 p-2",children:qw.map(a=>l.jsxs(dv,{to:a.path,className:({isActive:s})=>ee("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",s?"bg-[var(--color-primary)]/10 text-[var(--color-primary)]":"text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-[var(--color-text)]"),children:[l.jsx(a.icon,{size:18}),a.label]},a.path))}),l.jsx(Bw,{})]})}function Gw(){const{state:a,logout:s}=Dd(),{theme:o,toggleTheme:i}=L2();return l.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-surface)] px-6",children:[l.jsx("h2",{className:"text-sm font-medium text-[var(--color-text-muted)]",children:"Admin Dashboard"}),l.jsxs("div",{className:"flex items-center gap-3",children:[a.user&&l.jsx("span",{className:"text-sm text-[var(--color-text-muted)]",children:a.user.email}),l.jsx("button",{onClick:i,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",title:`Switch to ${o==="dark"?"light":"dark"} mode`,children:o==="dark"?l.jsx(Dj,{size:18}):l.jsx(xj,{size:18})}),l.jsx("button",{onClick:s,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-red-500",title:"Logout",children:l.jsx(fj,{size:18})})]})]})}function Qw(){const{state:a}=Dd();return a.isLoading?l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:l.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading..."})}):a.isAuthenticated?l.jsxs("div",{className:"flex h-screen bg-[var(--color-background)]",children:[l.jsx(Hw,{}),l.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[l.jsx(Gw,{}),l.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:l.jsx(Q0,{})})]})]}):l.jsx(ni,{to:"/login",replace:!0})}function Vw(){const{state:a,login:s,setup:o}=Dd(),i=wa(),[d,f]=S.useState("loading"),[m,v]=S.useState(""),[g,p]=S.useState(""),[y,x]=S.useState(""),[N,R]=S.useState(""),[j,E]=S.useState(null);if(S.useEffect(()=>{let H=!1;async function ne(){try{const{data:W}=await ge.get("/api/setup/status");if(!H&&!W.configured){i("/setup",{replace:!0});return}}catch{if(!H){i("/setup",{replace:!0});return}}try{const W=await hN();H||f(W.needs_setup?"setup":"login")}catch{H||f("login")}}return ne(),()=>{H=!0}},[i]),a.isAuthenticated)return l.jsx(ni,{to:"/settings",replace:!0});const C=H=>{H.preventDefault(),s(m,y)},k=H=>{if(H.preventDefault(),E(null),y!==N){E("Passwords do not match");return}if(y.length<8){E("Password must be at least 8 characters");return}o(m,y,g||void 0)},A=ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]"),F=j??a.error;return d==="loading"?l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:l.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:l.jsx("div",{className:"flex justify-center",children:l.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-border)] border-t-[var(--color-primary)]"})})})}):l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:l.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:d==="setup"?l.jsxs(l.Fragment,{children:[l.jsx("h1",{className:"mb-1 text-center text-2xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),l.jsx("p",{className:"mb-6 text-center text-sm text-[var(--color-text-muted)]",children:"Set up your first administrator account to get started."}),l.jsxs("form",{onSubmit:k,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),l.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:H=>v(H.target.value),className:A,placeholder:"admin@example.com"})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"username",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Username"}),l.jsx("input",{id:"username",type:"text",required:!0,autoComplete:"username",value:g,onChange:H=>p(H.target.value),className:A,placeholder:"admin"})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),l.jsx("input",{id:"password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:y,onChange:H=>x(H.target.value),className:A})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),l.jsx("input",{id:"confirm-password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:N,onChange:H=>R(H.target.value),className:A})]}),F&&l.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:F}),l.jsx("button",{type:"submit",disabled:a.isLoading,className:ee("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50","transition-opacity"),children:a.isLoading?"Creating account...":"Create Admin Account"})]})]}):l.jsxs(l.Fragment,{children:[l.jsx("h1",{className:"mb-6 text-center text-2xl font-bold text-[var(--color-text)]",children:"Jarvis Admin"}),l.jsxs("form",{onSubmit:C,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),l.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:H=>v(H.target.value),className:A,placeholder:"admin@example.com"})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),l.jsx("input",{id:"password",type:"password",required:!0,autoComplete:"current-password",value:y,onChange:H=>x(H.target.value),className:A})]}),F&&l.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:F}),l.jsx("button",{type:"submit",disabled:a.isLoading,className:ee("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50","transition-opacity"),children:a.isLoading?"Signing in...":"Sign in"})]})]})})})}async function Fw(){const{data:a}=await ge.get("/api/settings/");return a}async function Yw(a,s,o){const{data:i}=await ge.put(`/api/settings/${encodeURIComponent(a)}/${s}`,{value:o});return i}function Xw(){return yt({queryKey:["settings"],queryFn:Fw,staleTime:3e4})}function Kw(){const a=ht();return bt({mutationFn:({serviceName:s,key:o,value:i})=>Yw(s,o,i),onSuccess:()=>{a.invalidateQueries({queryKey:["settings"]})}})}function Zw({setting:a,onSave:s,onCancel:o,isSaving:i}){const[d,f]=S.useState(()=>a.value_type==="json"?JSON.stringify(a.value,null,2):a.value_type==="bool"?"":String(a.value??"")),[m,v]=S.useState(()=>!!a.value),[g,p]=S.useState(null),y=!!a.options?.length,x=y&&!a.options.includes(d),[N,R]=S.useState(x),j=C=>{C.preventDefault();let k;switch(a.value_type){case"bool":k=m;break;case"int":if(k=parseInt(d,10),isNaN(k)){p("Must be a whole number");return}p(null);break;case"float":if(k=parseFloat(d),isNaN(k)){p("Must be a number");return}p(null);break;case"json":try{k=JSON.parse(d),p(null)}catch{p("Invalid JSON");return}break;default:k=d}s(k)},E=ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-2 focus:ring-[var(--color-primary)]");return l.jsxs("form",{onSubmit:j,className:"flex items-center gap-2",children:[y?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("select",{value:N?"__other__":d,onChange:C=>{C.target.value==="__other__"?(R(!0),f("")):(R(!1),f(C.target.value))},className:ee(E,"max-w-xs"),children:[a.options.map(C=>l.jsx("option",{value:String(C),children:String(C)},String(C))),l.jsx("option",{value:"__other__",children:"Other..."})]}),N&&l.jsx("input",{type:"text",value:d,onChange:C=>f(C.target.value),placeholder:"Custom value",className:ee(E,"max-w-xs"),autoFocus:!0})]}):a.value_type==="bool"?l.jsx("button",{type:"button",onClick:()=>v(C=>!C),className:ee("relative h-6 w-11 rounded-full transition-colors",m?"bg-[var(--color-primary)]":"bg-[var(--color-border)]"),children:l.jsx("span",{className:ee("absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition-transform",m&&"translate-x-5")})}):a.value_type==="json"?l.jsxs("div",{className:"flex-1",children:[l.jsx("textarea",{value:d,onChange:C=>{f(C.target.value),p(null)},rows:4,className:ee(E,"font-mono text-xs")}),g&&l.jsx("p",{className:"mt-1 text-xs text-red-500",children:g})]}):l.jsxs("div",{children:[l.jsx("input",{type:a.value_type==="int"||a.value_type==="float"?"number":a.is_secret?"password":"text",step:a.value_type==="float"?"any":void 0,value:d,onChange:C=>{f(C.target.value),p(null)},className:ee(E,"max-w-xs")}),g&&l.jsx("p",{className:"mt-1 text-xs text-red-500",children:g})]}),l.jsx("button",{type:"submit",disabled:i,className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:i?"Saving...":"Save"}),l.jsx("button",{type:"button",onClick:o,className:"rounded-lg border border-[var(--color-border)] px-3 py-1.5 text-xs text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",children:"Cancel"})]})}function $w(a){return a.is_secret?"********":a.value===null||a.value===void 0?"(not set)":a.value_type==="json"?JSON.stringify(a.value):String(a.value)}const Jw={string:"bg-blue-500/10 text-blue-500",int:"bg-emerald-500/10 text-emerald-500",float:"bg-emerald-500/10 text-emerald-500",bool:"bg-amber-500/10 text-amber-500",json:"bg-purple-500/10 text-purple-500"};function Pw({setting:a,serviceName:s,onRestartService:o}){const[i,d]=S.useState(!1),f=Kw(),m=v=>{f.mutate({serviceName:s,key:a.key,value:v},{onSuccess:g=>{d(!1),g.requires_reload?Ae.warning(`Setting updated. ${s} requires a restart to apply.`,o?{action:{label:"Restart",onClick:o}}:void 0):Ae.success("Setting updated")},onError:g=>{Ae.error(`Failed to update: ${g.message}`)}})};return l.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-lg px-3 py-2 hover:bg-[var(--color-surface-alt)]",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"text-sm font-medium text-[var(--color-text)]",children:a.key}),l.jsx("span",{className:ee("rounded px-1.5 py-0.5 text-[10px] font-medium",Jw[a.value_type]??"bg-gray-500/10 text-gray-500"),children:a.value_type}),a.from_db&&l.jsx("span",{title:"Stored in database",children:l.jsx(XN,{size:12,className:"text-[var(--color-tertiary)]"})}),a.requires_reload&&l.jsx("span",{title:"Requires service restart",children:l.jsx(ra,{size:12,className:"text-amber-500"})})]}),a.description&&l.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:a.description}),i?l.jsx("div",{className:"mt-2",children:l.jsx(Zw,{setting:a,onSave:m,onCancel:()=>d(!1),isSaving:f.isPending})}):l.jsx("p",{className:"mt-1 font-mono text-xs text-[var(--color-text-muted)]",children:$w(a)})]}),!i&&l.jsx("button",{onClick:()=>d(!0),className:"shrink-0 rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-[var(--color-primary)]",title:"Edit",children:l.jsx(gj,{size:14})})]})}function Iw({category:a,settings:s,serviceName:o,onRestartService:i}){const[d,f]=S.useState(!0);return l.jsxs("div",{children:[l.jsxs("button",{onClick:()=>f(m=>!m),className:"flex w-full items-center gap-2 px-3 py-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[d?l.jsx(Ld,{size:14}):l.jsx(Iv,{size:14}),a,l.jsxs("span",{className:"font-normal",children:["(",s.length,")"]})]}),d&&l.jsx("div",{className:"space-y-0.5",children:s.map(m=>l.jsx(Pw,{setting:m,serviceName:o,onRestartService:i},m.key))})]})}async function Ww(){const{data:a}=await ge.get("/api/containers");return a}async function eE(a){const{data:s}=await ge.post(`/api/containers/${a}/restart`);return s}function xg(){return yt({queryKey:["containers"],queryFn:Ww,staleTime:1e4,refetchInterval:1e4})}function vg(){const a=ht();return bt({mutationFn:s=>eE(s),onSuccess:()=>{a.invalidateQueries({queryKey:["containers"]})}})}function tE({result:a,defaultExpanded:s=!1}){const[o,i]=S.useState(s),{data:d}=xg(),f=vg(),m=S.useCallback(()=>{const g=d?.containers.find(p=>p.name.includes(a.service_name)||p.name.includes(a.service_name.replace("jarvis-","")));g?f.mutate(g.id,{onSuccess:()=>Ae.success(`${a.service_name} is restarting...`),onError:p=>Ae.error(`Restart failed: ${p.message}`)}):Ae.error(`Could not find container for ${a.service_name}`)},[d,a.service_name,f]),v=S.useMemo(()=>{const g=new Map;for(const p of a.settings){const y=g.get(p.category)??[];g.set(p.category,[...y,p])}return g},[a]);return l.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[l.jsxs("button",{onClick:()=>i(g=>!g),className:"flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-[var(--color-surface-alt)]",children:[o?l.jsx(Ld,{size:18,className:"text-[var(--color-text-muted)]"}):l.jsx(Iv,{size:18,className:"text-[var(--color-text-muted)]"}),l.jsx("span",{className:"font-medium text-[var(--color-text)]",children:a.service_name}),a.success?l.jsx(gt,{size:16,className:"text-[var(--color-secondary)]"}):l.jsx(pl,{size:16,className:"text-red-500"}),l.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a.success?`${a.settings.length} settings`:a.error??"Error"}),a.latency_ms!=null&&l.jsxs("span",{className:ee("ml-auto text-xs",a.latency_ms>500?"text-amber-500":"text-[var(--color-text-muted)]"),children:[Math.round(a.latency_ms),"ms"]})]}),o&&a.success&&l.jsx("div",{className:"space-y-2 border-t border-[var(--color-border)] px-2 py-3",children:[...v.entries()].map(([g,p])=>l.jsx(Iw,{category:g,settings:p,serviceName:a.service_name,onRestartService:m},g))}),o&&!a.success&&l.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-3",children:l.jsx("p",{className:"text-sm text-red-500",children:a.error??"Failed to fetch settings"})})]})}function aE(){const{data:a,isLoading:s,isError:o,error:i,refetch:d,isFetching:f}=Xw(),[m,v]=S.useState(""),g=S.useMemo(()=>{if(!a)return[];if(!m.trim())return a.services;const p=m.toLowerCase();return a.services.map(y=>({...y,settings:y.settings.filter(x=>x.key.toLowerCase().includes(p)||x.category.toLowerCase().includes(p)||(x.description?.toLowerCase().includes(p)??!1))})).filter(y=>y.settings.length>0||y.service_name.toLowerCase().includes(p))},[a,m]);return s?l.jsx("div",{className:"flex items-center justify-center py-20",children:l.jsx(mt,{className:"animate-spin text-[var(--color-primary)]",size:24})}):o?l.jsxs("div",{className:"py-20 text-center",children:[l.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load settings"}),l.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),l.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):l.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Settings"}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[a&&l.jsxs("span",{children:[a.successful_services,"/",a.total_services," services"]}),l.jsx("button",{onClick:()=>d(),disabled:f,className:ee("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:l.jsx(mt,{size:14})})]})]}),l.jsxs("div",{className:"relative",children:[l.jsx(Ej,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"}),l.jsx("input",{type:"text",value:m,onChange:p=>v(p.target.value),placeholder:"Search settings...",className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] py-2 pl-9 pr-3","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),l.jsxs("div",{className:"space-y-3",children:[g.map((p,y)=>l.jsx(tE,{result:p,defaultExpanded:y===0},p.service_name)),g.length===0&&l.jsx("p",{className:"py-8 text-center text-sm text-[var(--color-text-muted)]",children:m?"No settings match your search":"No services found"})]})]})}async function nE(){const{data:a}=await ge.get("/api/services/registry");return a}async function rE(a){const{data:s}=await ge.post("/api/services/register",a);return s}async function sE(a){const{data:s}=await ge.post("/api/services/rotate-key",a);return s}async function lE(a){const{data:s}=await ge.post("/api/services/probe",a);return s}async function oE(a){const{data:s}=await ge.post("/api/services/register",{services:[{name:a.name,host:a.host,port:a.port,scheme:a.scheme,health_path:a.health_path,description:a.description}]});return s}async function iE(a){await ge.delete(`/api/services/${encodeURIComponent(a)}`)}async function cE(){const{data:a}=await ge.get("/api/services/suggestions");return a}function uE(){return yt({queryKey:["service-registry"],queryFn:nE,staleTime:3e4})}function dE(){const a=ht();return bt({mutationFn:rE,onSuccess:()=>{a.invalidateQueries({queryKey:["service-registry"]})}})}function fE(){const a=ht();return bt({mutationFn:sE,onSuccess:()=>{a.invalidateQueries({queryKey:["service-registry"]})}})}function mE(){const a=ht();return bt({mutationFn:oE,onSuccess:()=>{a.invalidateQueries({queryKey:["service-registry"]})}})}function hE(){const a=ht();return bt({mutationFn:iE,onSuccess:()=>{a.invalidateQueries({queryKey:["service-registry"]})}})}function pE(){return yt({queryKey:["service-suggestions"],queryFn:cE,staleTime:6e4})}function Dx({ok:a,label:s}){return l.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",a?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:[a?l.jsx(xi,{size:12}):l.jsx(Vd,{size:12}),s]})}function xE({status:a,error:s,latency:o}){return a==="idle"?null:a==="probing"?l.jsx("span",{className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)]",children:l.jsx(na,{size:12,className:"animate-spin"})}):a==="healthy"?l.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[l.jsx(ls,{size:8,fill:"currentColor"}),o!=null&&`${o}ms`]}):l.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-500",title:s,children:[l.jsx(ls,{size:8,fill:"currentColor"}),s||"Unreachable"]})}function vE({entry:a,checked:s,host:o,port:i,scheme:d,onToggle:f,onHostChange:m,onPortChange:v,onSchemeChange:g,onHostBlur:p,onPortBlur:y,onRotateKey:x,onDelete:N,disabled:R,rotating:j,deleting:E,healthStatus:C,healthError:k,healthLatency:A}){return l.jsxs("div",{className:ee("flex flex-wrap items-center gap-3 rounded-lg border border-[var(--color-border)] p-3","bg-[var(--color-surface)] transition-colors",s&&"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5"),children:[l.jsx("input",{type:"checkbox",checked:s,onChange:f,disabled:R,className:"h-4 w-4 rounded border-[var(--color-border)] accent-[var(--color-primary)]"}),l.jsxs("div",{className:"min-w-[180px] flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-[var(--color-text)]",children:[a.name,a.custom&&l.jsx("span",{className:"rounded-full bg-blue-500/10 px-1.5 py-0.5 text-[10px] font-medium text-blue-600 dark:text-blue-400",children:"custom"})]}),l.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:a.description})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Dx,{ok:a.config_registered,label:"Config"}),l.jsx(Dx,{ok:a.auth_registered,label:"Auth"}),a.custom&&N&&l.jsxs("button",{onClick:N,disabled:R||E,className:ee("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium","bg-red-500/10 text-red-600 dark:text-red-400","hover:bg-red-500/20","disabled:opacity-50"),title:"Remove custom service",children:[l.jsx(gi,{size:12,className:E?"animate-spin":""}),"Remove"]}),a.auth_registered&&l.jsxs("button",{onClick:x,disabled:R||j,className:ee("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium","bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]","hover:bg-[var(--color-primary)]/10 hover:text-[var(--color-primary)]","disabled:opacity-50"),title:"Rotate app key",children:[l.jsx(Gd,{size:12,className:j?"animate-spin":""}),"Rotate Key"]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("select",{value:d,onChange:F=>g(F.target.value),disabled:R,className:ee("rounded border px-1.5 py-1 text-xs font-mono",d==="https"?"border-green-500/40 bg-green-500/10 text-green-600 dark:text-green-400":d==="mqtt"||d==="mqtts"?"border-purple-500/40 bg-purple-500/10 text-purple-600 dark:text-purple-400":d==="ws"||d==="wss"?"border-blue-500/40 bg-blue-500/10 text-blue-600 dark:text-blue-400":"border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-text-muted)]","disabled:opacity-50"),title:"Scheme",children:[l.jsx("option",{value:"http",children:"http"}),l.jsx("option",{value:"https",children:"https"}),l.jsx("option",{value:"mqtt",children:"mqtt"}),l.jsx("option",{value:"mqtts",children:"mqtts"}),l.jsx("option",{value:"ws",children:"ws"}),l.jsx("option",{value:"wss",children:"wss"})]}),l.jsx("input",{type:"text",value:o,onChange:F=>m(F.target.value),onBlur:p,disabled:R,placeholder:"host",className:ee("w-36 rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1","text-xs text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]","disabled:opacity-50")}),l.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:":"}),l.jsx("input",{type:"number",value:i,onChange:F=>v(Number(F.target.value)),onBlur:y,disabled:R,className:ee("w-20 rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1","text-xs text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]","disabled:opacity-50")}),l.jsx(xE,{status:C,error:k,latency:A})]})]})}const Lx={name:"",host:"localhost",port:"",scheme:"http",health_path:"/health",description:""};function gE(){const{data:a,isLoading:s,isError:o,error:i,refetch:d,isFetching:f}=uE(),m=dE(),v=fE(),g=mE(),p=hE(),{data:y}=pE(),[x,N]=S.useState({}),[R,j]=S.useState(null),[E,C]=S.useState(null),[k,A]=S.useState(null),[F,H]=S.useState(null),[ne,W]=S.useState(null),[z,q]=S.useState({}),[ae,je]=S.useState(!1),[le,he]=S.useState(Lx),[Me,Te]=S.useState(!1),te=S.useRef(null),w=S.useMemo(()=>new Set(a?.services.map(G=>G.name)??[]),[a]),Y=S.useMemo(()=>{const D=(y?.suggestions??[]).filter(fe=>!w.has(fe.id));if(!le.name.trim())return D;const Se=le.name.toLowerCase();return D.filter(fe=>fe.id.toLowerCase().includes(Se)||fe.name.toLowerCase().includes(Se)||fe.description.toLowerCase().includes(Se))},[y,w,le.name]),Z=S.useCallback(G=>{he({name:G.id,description:G.description,host:"localhost",port:String(G.port),scheme:"http",health_path:G.healthCheck}),Te(!1)},[]);S.useEffect(()=>{const G=D=>{te.current&&!te.current.contains(D.target)&&Te(!1)};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[]);const xe=S.useCallback(G=>{if(x[G])return x[G];const D=a?.services.find(Se=>Se.name===G);return D?{checked:D.config_registered,host:D.current_host??"localhost",port:D.current_port??D.default_port,scheme:D.current_scheme??"http"}:{checked:!1,host:"localhost",port:0,scheme:"http"}},[x,a]),ve=S.useCallback((G,D)=>{N(Se=>{const fe=Se[G]??{checked:!1,host:"localhost",port:0};return{...Se,[G]:{...fe,...D}}})},[]),_=S.useCallback(async(G,D,Se,fe,Dt="http")=>{if(!(!D||!Se)){q(it=>({...it,[G]:{status:"probing"}}));try{const it=await lE({host:D,port:Se,health_path:fe,scheme:Dt});q(zn=>({...zn,[G]:{status:it.healthy?"healthy":"unhealthy",error:it.error??void 0,latency:it.latency_ms??void 0}}))}catch{q(it=>({...it,[G]:{status:"unhealthy",error:"Request failed"}}))}}},[]),X=S.useCallback(()=>{if(!a)return;const G=a.services.filter(D=>xe(D.name).checked).map(D=>{const Se=xe(D.name);return{name:D.name,host:Se.host,port:Se.port,scheme:Se.scheme}});if(G.length===0){Ae.error("No services selected");return}j(null),C(null),m.mutate({services:G},{onSuccess:D=>{j(D.results);const Se=D.results.filter(Dt=>Dt.config_ok&&Dt.auth_ok).length,fe=D.results.length;Se===fe?Ae.success(`All ${fe} services registered`):Ae.warning(`${Se}/${fe} services registered successfully`)},onError:D=>{Ae.error(`Registration failed: ${D.message}`)}})},[a,xe,m]),K=S.useCallback(G=>{A(G),C(null),v.mutate({service_name:G},{onSuccess:D=>{C(D),A(null),Ae.success(`Key rotated for ${G}`)},onError:D=>{A(null),Ae.error(`Key rotation failed: ${D.message}`)}})},[v]),I=S.useCallback(G=>{H(G),p.mutate(G,{onSuccess:()=>{H(null),Ae.success(`Removed ${G}`)},onError:D=>{H(null),Ae.error(`Failed to remove: ${D.message}`)}})},[p]),se=S.useCallback(()=>{const G=parseInt(le.port,10);if(!le.name.trim()){Ae.error("Service name is required");return}if(!G||G<1||G>65535){Ae.error("Port must be between 1 and 65535");return}g.mutate({name:le.name.trim(),host:le.host.trim()||"localhost",port:G,scheme:le.scheme,health_path:le.health_path.trim()||"/health",description:le.description.trim()},{onSuccess:D=>{const Se=D.results[0];Se?.config_ok?(Ae.success(`Added ${le.name.trim()}`),he(Lx),je(!1)):Ae.error(`Failed to add: ${Se?.error??"Unknown error"}`)},onError:D=>{Ae.error(`Failed to add service: ${D.message}`)}})},[le,g]),me=S.useCallback(G=>{navigator.clipboard.writeText(G).then(()=>{W(G),setTimeout(()=>W(null),2e3)})},[]),ue=a?.services.filter(G=>xe(G.name).checked).length??0,we=R?.some(G=>G.env_written)||E?.env_written===!0;return s?l.jsx("div",{className:"flex items-center justify-center py-20",children:l.jsx(mt,{className:"animate-spin text-[var(--color-primary)]",size:24})}):o?l.jsxs("div",{className:"py-20 text-center",children:[l.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load service registry"}),l.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),l.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):l.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Services"}),l.jsx("span",{className:"rounded-full bg-[var(--color-surface-alt)] px-2.5 py-0.5 text-xs font-medium text-[var(--color-text-muted)]",children:a?.services.length??0})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>je(G=>!G),className:ee("flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium",ae?"bg-[var(--color-surface-alt)] text-[var(--color-text)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:[ae?l.jsx(Vd,{size:14}):l.jsx(ti,{size:14}),ae?"Cancel":"Add Service"]}),l.jsx("button",{onClick:()=>d(),disabled:f,className:ee("rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:l.jsx(mt,{size:14})})]})]}),ae&&l.jsxs("div",{className:"rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Add Service"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{ref:te,className:"relative",children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Service"}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:"text",value:le.name,onChange:G=>{he(D=>({...D,name:G.target.value})),Te(!0)},onFocus:()=>Te(!0),placeholder:"Select or type a service name...",className:ee("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5 pr-8","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")}),l.jsx("button",{type:"button",onClick:()=>Te(G=>!G),className:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:l.jsx(Ld,{size:14})})]}),Me&&Y.length>0&&l.jsx("div",{className:"absolute z-10 mt-1 max-h-48 w-full overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] shadow-lg",children:Y.map(G=>l.jsxs("button",{type:"button",onClick:()=>Z(G),className:"flex w-full flex-col px-3 py-2 text-left hover:bg-[var(--color-surface-alt)]",children:[l.jsxs("span",{className:"text-sm font-medium text-[var(--color-text)]",children:[G.name,l.jsxs("span",{className:"ml-2 font-normal text-[var(--color-text-muted)]",children:[":",G.port]})]}),l.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:G.description})]},G.id))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Description"}),l.jsx("input",{type:"text",value:le.description,onChange:G=>he(D=>({...D,description:G.target.value})),placeholder:"e.g. Camera streaming via WebRTC",className:ee("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Host"}),l.jsx("input",{type:"text",value:le.host,onChange:G=>he(D=>({...D,host:G.target.value})),placeholder:"localhost",className:ee("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]}),l.jsxs("div",{className:"flex gap-3",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Port"}),l.jsx("input",{type:"number",value:le.port,onChange:G=>he(D=>({...D,port:G.target.value})),placeholder:"e.g. 1984",className:ee("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]}),l.jsxs("div",{className:"w-20",children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Scheme"}),l.jsxs("select",{value:le.scheme,onChange:G=>he(D=>({...D,scheme:G.target.value})),className:ee("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]"),children:[l.jsx("option",{value:"http",children:"http"}),l.jsx("option",{value:"https",children:"https"}),l.jsx("option",{value:"mqtt",children:"mqtt"}),l.jsx("option",{value:"mqtts",children:"mqtts"}),l.jsx("option",{value:"ws",children:"ws"}),l.jsx("option",{value:"wss",children:"wss"})]})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Health Path"}),l.jsx("input",{type:"text",value:le.health_path,onChange:G=>he(D=>({...D,health_path:G.target.value})),placeholder:"/health",className:ee("w-full rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2.5 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]")})]})]}),l.jsx("div",{className:"mt-3 flex justify-end",children:l.jsx("button",{onClick:se,disabled:g.isPending||!le.name.trim()||!le.port,className:ee("rounded-lg bg-[var(--color-primary)] px-4 py-1.5 text-sm font-medium text-white","hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50"),children:g.isPending?"Adding...":"Add Service"})})]}),l.jsx("div",{className:"space-y-2",children:a?.services.map(G=>{const D=xe(G.name),Se=z[G.name]??{status:"idle"};return l.jsx(vE,{entry:G,checked:D.checked,host:D.host,port:D.port,scheme:D.scheme,onToggle:()=>{const fe=!D.checked;ve(G.name,{...D,checked:fe}),fe?_(G.name,D.host,D.port,G.health_path,D.scheme):q(Dt=>({...Dt,[G.name]:{status:"idle"}}))},onHostChange:fe=>ve(G.name,{...D,host:fe}),onPortChange:fe=>ve(G.name,{...D,port:fe}),onSchemeChange:fe=>ve(G.name,{...D,scheme:fe}),onHostBlur:()=>{D.checked&&_(G.name,D.host,D.port,G.health_path,D.scheme)},onPortBlur:()=>{D.checked&&_(G.name,D.host,D.port,G.health_path,D.scheme)},onRotateKey:()=>K(G.name),onDelete:()=>I(G.name),disabled:m.isPending,rotating:k===G.name,deleting:F===G.name,healthStatus:Se.status,healthError:Se.error,healthLatency:Se.latency},G.name)})}),l.jsx("button",{onClick:X,disabled:m.isPending||ue===0,className:ee("rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white","hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50"),children:m.isPending?"Registering...":`Register Selected (${ue})`}),E&&l.jsx(yE,{serviceName:E.service_name,appKey:E.app_key,envWritten:E.env_written,copiedKey:ne,onCopy:me,label:"Rotated Key"}),R&&l.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Registration Results"}),R.map(G=>l.jsxs("div",{className:ee("flex flex-wrap items-center gap-3 rounded-lg border p-3 text-sm",G.config_ok&&G.auth_ok?"border-green-500/20 bg-green-500/5":"border-yellow-500/20 bg-yellow-500/5"),children:[l.jsx("span",{className:"min-w-[180px] font-medium text-[var(--color-text)]",children:G.name}),l.jsxs("span",{className:ee("text-xs",G.config_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Config: ",G.config_ok?"OK":"Failed"]}),l.jsxs("span",{className:ee("text-xs",G.auth_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Auth: ",G.auth_ok?G.auth_created?"Created":"Exists":"Failed"]}),G.env_written!==null&&l.jsxs("span",{className:ee("text-xs",G.env_written?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",G.env_written?"Written":"Failed"]}),G.error&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-600 dark:text-yellow-400",children:[l.jsx(ra,{size:12}),G.error]}),G.auth_created&&G.app_key&&l.jsxs("div",{className:"mt-1 w-full",children:[l.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[l.jsx(ra,{size:12}),"App key (shown once only):"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"flex-1 overflow-x-auto rounded bg-[var(--color-background)] px-2 py-1 font-mono text-xs text-[var(--color-text)]",children:G.app_key}),l.jsx("button",{onClick:()=>me(G.app_key),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:ne===G.app_key?l.jsx(xi,{size:14,className:"text-green-500"}):l.jsx(Bd,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]},G.name))]}),we&&l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",children:[l.jsx(aj,{size:16,className:"mt-0.5 shrink-0 text-blue-500"}),l.jsx("p",{className:"text-sm text-[var(--color-text)]",children:"Services whose .env files were updated need to be restarted to pick up the new credentials. Restart each affected service's container or process."})]})]})}function yE({serviceName:a,appKey:s,envWritten:o,copiedKey:i,onCopy:d,label:f}){return l.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:[f,": ",a]}),l.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-500/5 p-3",children:[o!==null&&l.jsxs("span",{className:ee("mb-2 inline-block text-xs",o?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",o?"Written":"Failed"]}),l.jsxs("div",{children:[l.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[l.jsx(ra,{size:12}),"New app key (shown once only):"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"flex-1 overflow-x-auto rounded bg-[var(--color-background)] px-2 py-1 font-mono text-xs text-[var(--color-text)]",children:s}),l.jsx("button",{onClick:()=>d(s),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:i===s?l.jsx(xi,{size:14,className:"text-green-500"}):l.jsx(Bd,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]})]})}async function bE(){const{data:a}=await ge.get("/api/llm-setup/status");return a}async function SE(a){const{data:s}=await ge.post("/api/llm-setup/configure",{settings:a});return s}async function NE(a,s,o){const{data:i}=await ge.post("/api/llm-setup/download",{repo:a,filename:s,token:o});return i}function jE(){return yt({queryKey:["llm-status"],queryFn:bE,staleTime:3e4,retry:1})}function gg(){const a=ht();return bt({mutationFn:s=>SE(s),onSuccess:()=>{a.invalidateQueries({queryKey:["llm-status"]}),a.invalidateQueries({queryKey:["containers"]})}})}function wE(){return bt({mutationFn:({repo:a,filename:s,token:o})=>NE(a,s,o)})}async function Yd(){const{data:a}=await ge.get("/api/install/status");return a}async function EE(a){const s=a?.length?{services:a.join(",")}:{},{data:o}=await ge.get("/api/install/preflight",{params:s});return o}async function CE(){const{data:a}=await ge.get("/api/install/hardware");return a}async function Ux(a){const{data:s}=await ge.post("/api/install/generate",a);return s}async function yg(){const{data:a}=await ge.get("/api/install/registry");return a}async function TE(){const{data:a}=await ge.get("/api/install/defaults");return a}const _E={running:"bg-emerald-500",exited:"bg-red-500",restarting:"bg-amber-500",paused:"bg-amber-500",created:"bg-gray-400",dead:"bg-red-700"};function RE(a){return a.match(/^Up (.+)$/)?.[1]??null}function Bx({container:a,onRestart:s,isRestarting:o}){const i=RE(a.status),d=a.ports.find(f=>f.public)?.public;return l.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[l.jsx("div",{className:ee("h-2.5 w-2.5 rounded-full",_E[a.state]??"bg-gray-400")}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate text-sm font-medium text-[var(--color-text)]",children:a.displayName??a.name}),a.description&&l.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:a.description})]}),l.jsx("span",{className:ee("rounded-full px-2 py-0.5 text-xs font-medium",a.state==="running"?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-red-500/10 text-red-600 dark:text-red-400"),children:a.state})]}),l.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-2",children:l.jsxs("div",{className:"flex items-center justify-between text-xs text-[var(--color-text-muted)]",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[i&&l.jsxs("span",{children:["Up ",i]}),d&&l.jsxs("span",{children:[":",d]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[d&&l.jsx("a",{href:`http://localhost:${d}/health`,target:"_blank",rel:"noopener noreferrer",className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Open health endpoint",children:l.jsx($N,{size:13})}),l.jsx("button",{onClick:()=>s(a.id),disabled:o,className:ee("rounded p-1 hover:bg-[var(--color-surface-alt)]",o&&"animate-spin"),title:"Restart",children:l.jsx(Gd,{size:13})})]})]})})]})}async function ME(){const{data:a}=await ge.get("/api/update/check");return a}function bg(){return yt({queryKey:["update-check"],queryFn:ME,staleTime:300*1e3,retry:1,refetchOnWindowFocus:!1})}const qx="jarvis-update-dismissed-version";function Hx(){const a=wa(),{data:s}=bg(),[o,i]=S.useState(()=>s?.latestVersion?localStorage.getItem(qx)===s.latestVersion:!1);return!s?.updateAvailable||o?null:l.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Wv,{size:20,className:"text-green-500"}),l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Jarvis v",s.latestVersion," available"]}),l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["You have v",s.currentVersion]})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[s.releaseUrl&&l.jsx("a",{href:s.releaseUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Release notes"}),l.jsx("button",{onClick:()=>{localStorage.setItem(qx,s.latestVersion),i(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),l.jsx("button",{onClick:()=>a("/update"),className:"rounded-lg bg-green-600 px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Update"})]})]})}const Xu="jarvis-admin:llm-setup-dismissed";function AE(){const a=wa(),[s,o]=S.useState(!1),{data:i,isLoading:d,isError:f,error:m,refetch:v,isFetching:g}=xg(),p=vg(),y=jE(),[x,N]=S.useState(()=>!!localStorage.getItem(Xu));S.useEffect(()=>{Yd().then(A=>{A.deployMode==="compose-export"&&o(!0)}).catch(()=>{})},[]);const R=!!y.data&&!y.data.configured&&!x,j=A=>{p.mutate(A,{onSuccess:()=>Ae.success("Container restart initiated"),onError:F=>Ae.error(`Restart failed: ${F.message}`)})};if(s)return l.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[l.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),l.jsx(Hx,{}),R&&l.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(hd,{size:20,className:"text-[var(--color-primary)]"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem(Xu,"true"),N(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),l.jsx("button",{onClick:()=>a("/llm-setup"),className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Set up LLM"})]})]}),l.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(pd,{size:20,className:"text-[var(--color-text-muted)]"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Sync compose to latest registry"}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Regenerate docker-compose.yml, apply changes, and re-register services with config-service"})]})]}),l.jsx("button",{onClick:()=>a("/reconcile"),className:"rounded-lg border border-[var(--color-border)] px-3 py-1.5 text-xs text-[var(--color-text)] hover:bg-[var(--color-surface-alt)]",children:"Sync now"})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-8 text-center",children:[l.jsx(Qd,{size:32,className:"mx-auto mb-3 text-[var(--color-text-muted)]"}),l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Running in Docker Compose mode"}),l.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:"Container management is handled by your Docker environment (TrueNAS, Portainer, etc.). Use your platform's tools to view container status, logs, and restarts."})]})]});if(d)return l.jsx("div",{className:"flex items-center justify-center py-20",children:l.jsx(mt,{className:"animate-spin text-[var(--color-primary)]",size:24})});if(f)return l.jsxs("div",{className:"py-20 text-center",children:[l.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load containers"}),l.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:m?.message??"Unknown error"}),l.jsx("button",{onClick:()=>v(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]});const E=i?.containers??[],C=E.filter(A=>A.state==="running"),k=E.filter(A=>A.state!=="running");return l.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[l.jsxs("span",{children:[C.length,"/",E.length," running"]}),l.jsx("button",{onClick:()=>v(),disabled:g,className:ee("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",g&&"animate-spin"),title:"Refresh",children:l.jsx(mt,{size:14})})]})]}),l.jsx(Hx,{}),R&&l.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(hd,{size:20,className:"text-[var(--color-primary)]"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>{localStorage.setItem(Xu,"true"),N(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),l.jsx("button",{onClick:()=>a("/llm-setup"),className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Set up LLM"})]})]}),l.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(pd,{size:20,className:"text-[var(--color-text-muted)]"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Sync compose to latest registry"}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Regenerate docker-compose.yml and apply changes — adds new background workers and services without recreating unchanged containers"})]})]}),l.jsx("button",{onClick:()=>a("/reconcile"),className:"rounded-lg border border-[var(--color-border)] px-3 py-1.5 text-xs text-[var(--color-text)] hover:bg-[var(--color-surface-alt)]",children:"Sync now"})]}),E.length===0&&l.jsx("div",{className:"py-12 text-center",children:l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:i?.error?i.error:"No Jarvis containers found. Is Docker running?"})}),C.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Running"}),l.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:C.map(A=>l.jsx(Bx,{container:A,onRestart:j,isRestarting:p.isPending&&p.variables===A.id},A.id))})]}),k.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Stopped"}),l.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:k.map(A=>l.jsx(Bx,{container:A,onRestart:j,isRestarting:p.isPending&&p.variables===A.id},A.id))})]})]})}async function kE(){const{data:a}=await ge.get("/api/nodes");return a}async function OE(a){const{data:s}=await ge.get(`/api/nodes/${a}/nodes`);return s}async function zE(a){const{data:s}=await ge.post(`/api/nodes/${a}/train-adapter`);return s}function DE(){return yt({queryKey:["households"],queryFn:kE,staleTime:3e4})}function LE(a){return yt({queryKey:["household-nodes",a],queryFn:()=>OE(a),enabled:!!a,staleTime:3e4})}function UE(){const a=ht();return bt({mutationFn:zE,onSuccess:()=>{a.invalidateQueries({queryKey:["household-nodes"]})}})}function BE({node:a,onTrain:s,isTraining:o}){return l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(kn,{size:16,className:"text-[var(--color-text-muted)]"}),l.jsx("span",{className:"font-medium text-[var(--color-text)]",children:a.name})]}),l.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",a.is_active?"bg-green-500/10 text-green-500":"bg-red-500/10 text-red-500"),children:[a.is_active?l.jsx(oi,{size:10}):l.jsx(Fj,{size:10}),a.is_active?"Active":"Inactive"]})]}),l.jsxs("div",{className:"mt-3 space-y-1 text-xs text-[var(--color-text-muted)]",children:[l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:"ID:"})," ",a.node_id]}),a.services.length>0&&l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:"Services:"})," ",a.services.join(", ")]})]}),l.jsx("div",{className:"mt-4",children:l.jsx("button",{onClick:()=>s(a.node_id),disabled:o||!a.is_active,className:ee("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",o||!a.is_active?"cursor-not-allowed bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:o?l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(mt,{size:12,className:"animate-spin"}),"Training..."]}):"Train Adapter"})})]})}function qE({householdId:a,householdName:s}){const{data:o,isLoading:i,isError:d}=LE(a),f=UE(),m=v=>{f.mutate(v,{onSuccess:g=>Ae.success(`Training triggered for ${v} (request: ${g.request_id.slice(0,8)}...)`),onError:g=>Ae.error(`Training failed: ${g.message}`)})};return l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:s}),i&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx(mt,{className:"animate-spin text-[var(--color-primary)]",size:18})}),d&&l.jsx("p",{className:"py-4 text-center text-sm text-red-500",children:"Failed to load nodes"}),o&&o.length===0&&l.jsx("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:"No nodes registered in this household"}),o&&o.length>0&&l.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:o.map(v=>l.jsx(BE,{node:v,onTrain:m,isTraining:f.isPending&&f.variables===v.node_id},v.node_id))})]})}function HE(){const{data:a,isLoading:s,isError:o,error:i,refetch:d,isFetching:f}=DE();return s?l.jsx("div",{className:"flex items-center justify-center py-20",children:l.jsx(mt,{className:"animate-spin text-[var(--color-primary)]",size:24})}):o?l.jsxs("div",{className:"py-20 text-center",children:[l.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load households"}),l.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),l.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):l.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Nodes"}),l.jsx("button",{onClick:()=>d(),disabled:f,className:ee("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:l.jsx(mt,{size:14,className:"text-[var(--color-text-muted)]"})})]}),(!a||a.length===0)&&l.jsx("div",{className:"py-12 text-center",children:l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No households found. Register a household in jarvis-auth first."})}),a?.map(m=>l.jsx(qE,{householdId:m.id,householdName:m.name},m.id))]})}async function GE(){const{data:a}=await ge.get("/api/admin/households");return a}async function QE(){const{data:a}=await ge.get("/api/admin/nodes");return a}async function VE(){const{data:a}=await ge.get("/api/admin/users");return a}async function FE(a,s={}){const{data:o}=await ge.post(`/api/admin/users/${a}/temp-password`,s);return o}function YE(){return yt({queryKey:["admin-users"],queryFn:VE,staleTime:3e4})}function XE(){const a=ht();return bt({mutationFn:({userId:s,options:o})=>FE(s,o),onSuccess:()=>{a.invalidateQueries({queryKey:["admin-users"]})}})}function Ku({tone:a,children:s}){const o={green:"bg-green-500/10 text-green-500",red:"bg-red-500/10 text-red-500",amber:"bg-amber-500/10 text-amber-500",blue:"bg-blue-500/10 text-blue-500"};return l.jsx("span",{className:ee("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",o[a]),children:s})}function KE({result:a,email:s,onDismiss:o}){const i=async()=>{try{await navigator.clipboard.writeText(a.temp_password),Ae.success("Temporary password copied")}catch{Ae.error("Copy failed — select it manually")}};return l.jsxs("div",{className:"rounded-lg border border-amber-500/40 bg-amber-500/5 p-4",children:[l.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Temporary password for ",s]}),l.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[l.jsx("code",{className:"rounded bg-[var(--color-surface-alt)] px-3 py-1.5 font-mono text-base tracking-wide text-[var(--color-text)]",children:a.temp_password}),l.jsx("button",{onClick:i,className:"rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:l.jsx(Bd,{size:14,className:"text-[var(--color-text-muted)]"})})]}),l.jsxs("p",{className:"mt-2 text-xs text-[var(--color-text-muted)]",children:["Shown once — it is not stored anywhere. Valid until"," ",new Date(a.expires_at).toLocaleString(),". All of the user's sessions were signed out; on their next login they'll be asked to set a new password."]}),l.jsx("button",{onClick:o,className:"mt-3 rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs font-medium text-white hover:opacity-90",children:"Done"})]})}function ZE({user:a,onCancel:s,onConfirm:o,isPending:i}){const[d,f]=S.useState(""),m=d.length>0&&d.length<8;return l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[l.jsxs("p",{className:"text-sm text-[var(--color-text)]",children:["Reset the password for ",l.jsx("span",{className:"font-medium",children:a.email}),"? This signs the user out everywhere and replaces their password with a temporary one they must change at next login."]}),l.jsxs("div",{className:"mt-3",children:[l.jsx("input",{type:"text",value:d,onChange:v=>f(v.target.value),placeholder:"Custom temp password (optional — leave blank to generate)",className:"w-full max-w-md rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-1.5 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"}),m&&l.jsx("p",{className:"mt-1 text-xs text-red-500",children:"Must be at least 8 characters"})]}),l.jsxs("div",{className:"mt-3 flex gap-2",children:[l.jsx("button",{onClick:()=>o(d||null),disabled:i||m,className:ee("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",i||m?"cursor-not-allowed bg-[var(--color-surface)] text-[var(--color-text-muted)]":"bg-red-500 text-white hover:opacity-90"),children:i?l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(mt,{size:12,className:"animate-spin"}),"Resetting..."]}):"Reset password"}),l.jsx("button",{onClick:s,disabled:i,className:"rounded-lg px-3 py-1.5 text-xs font-medium text-[var(--color-text-muted)] hover:bg-[var(--color-surface)]",children:"Cancel"})]})]})}function $E({user:a}){const[s,o]=S.useState("idle"),[i,d]=S.useState(null),f=XE(),m=v=>{f.mutate({userId:a.id,options:v?{temp_password:v}:{}},{onSuccess:g=>{o("idle"),d(g)},onError:g=>Ae.error(`Reset failed: ${g.message}`)})};return l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-medium text-[var(--color-text)]",children:a.email}),a.is_superuser&&l.jsxs(Ku,{tone:"blue",children:[l.jsx(Rj,{size:10}),"Superuser"]}),!a.is_active&&l.jsxs(Ku,{tone:"red",children:[l.jsx(qj,{size:10}),"Deactivated"]}),a.must_change_password&&l.jsxs(Ku,{tone:"amber",children:[l.jsx(QN,{size:10}),"Temp password"]})]}),l.jsxs("div",{className:"mt-1 space-y-0.5 text-xs text-[var(--color-text-muted)]",children:[l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:"Username:"})," ",a.username]}),a.households.length>0&&l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:"Households:"})," ",a.households.map(v=>`${v.household_name} (${v.role})`).join(", ")]}),l.jsxs("p",{children:[l.jsx("span",{className:"font-medium",children:"Created:"})," ",new Date(a.created_at).toLocaleDateString()]})]})]}),s==="idle"&&!i&&l.jsxs("button",{onClick:()=>o("confirm"),disabled:!a.is_active,title:a.is_active?void 0:"Reactivate the account first",className:ee("flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",a.is_active?"bg-[var(--color-surface-alt)] text-[var(--color-text)] hover:bg-[var(--color-primary)]/10 hover:text-[var(--color-primary)]":"cursor-not-allowed bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:[l.jsx(rj,{size:12}),"Reset password"]})]}),s==="confirm"&&l.jsx("div",{className:"mt-3",children:l.jsx(ZE,{user:a,onCancel:()=>o("idle"),onConfirm:m,isPending:f.isPending})}),i&&l.jsx("div",{className:"mt-3",children:l.jsx(KE,{result:i,email:a.email,onDismiss:()=>d(null)})})]})}function JE(){const{data:a,isLoading:s,isError:o,error:i,refetch:d,isFetching:f}=YE();return s?l.jsx("div",{className:"flex items-center justify-center py-20",children:l.jsx(mt,{className:"animate-spin text-[var(--color-primary)]",size:24})}):o?l.jsxs("div",{className:"py-20 text-center",children:[l.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load users"}),l.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),l.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):l.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Users"}),l.jsx("button",{onClick:()=>d(),disabled:f,className:ee("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:l.jsx(mt,{size:14,className:"text-[var(--color-text-muted)]"})})]}),a&&a.length===0&&l.jsx("div",{className:"py-12 text-center",children:l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No users found."})}),l.jsx("div",{className:"space-y-3",children:a?.map(m=>l.jsx($E,{user:m},m.id))})]})}async function PE(){const{data:a}=await ge.get("/api/native-services");return a}async function IE(a){const{data:s}=await ge.post(`/api/native-services/${a}/restart`);return s}async function WE(a){const{data:s}=await ge.post(`/api/native-services/${a}/stop`);return s}async function e4(a){const{data:s}=await ge.post(`/api/native-services/${a}/uninstall`);return s}async function t4(a,s="stderr",o=200){const{data:i}=await ge.get(`/api/native-services/${a}/logs`,{params:{stream:s,lines:o}});return i}const yi=["native-services"];function a4(){return yt({queryKey:yi,queryFn:PE,staleTime:5e3,refetchInterval:5e3})}function n4(){const a=ht();return bt({mutationFn:s=>IE(s),onSuccess:()=>a.invalidateQueries({queryKey:yi})})}function r4(){const a=ht();return bt({mutationFn:s=>WE(s),onSuccess:()=>a.invalidateQueries({queryKey:yi})})}function s4(){const a=ht();return bt({mutationFn:s=>e4(s),onSuccess:()=>a.invalidateQueries({queryKey:yi})})}function l4(a,s,o){return yt({queryKey:["native-services-logs",a,s],queryFn:()=>t4(a,s,200),enabled:o,staleTime:3e3,refetchInterval:o?3e3:!1})}function o4(){const{data:a,isLoading:s,isError:o,error:i,refetch:d,isFetching:f}=a4();return s?l.jsx("div",{className:"p-6",children:l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Loading native services…"})}):o?l.jsx("div",{className:"p-6",children:l.jsx(c4,{message:i instanceof Error?i.message:String(i)})}):a?a.supported?l.jsxs("div",{className:"p-6",children:[l.jsxs("header",{className:"mb-4 flex items-start justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Native Services"}),l.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:["macOS LaunchAgents — these services run outside Docker so they can use the Apple GPU (MLX / Metal / MPS). Status reflects ",l.jsx("code",{children:"launchctl print"}),"."]})]}),l.jsxs("button",{type:"button",onClick:()=>d(),disabled:f,className:ee("flex items-center gap-2 rounded-lg border border-[var(--color-border)] px-3 py-1.5 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors",f&&"opacity-50"),children:[l.jsx(mt,{size:14,className:f?"animate-spin":""}),"Refresh"]})]}),a.services.length===0?l.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No native-capable services are registered. Re-run the install wizard to add them."})}):l.jsx("div",{className:"space-y-3",children:a.services.map(m=>l.jsx(i4,{service:m},m.id))})]}):l.jsxs("div",{className:"p-6",children:[l.jsxs("header",{className:"mb-4",children:[l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Native Services"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Manage Jarvis services running as macOS LaunchAgents."})]}),l.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Native services are only available on macOS. On Linux all services run in Docker."})})]}):null}function i4({service:a}){const s=n4(),o=r4(),i=s4(),[d,f]=S.useState(!1),[m,v]=S.useState("stderr"),g=l4(a.id,m,d),{status:p}=a;async function y(j,E){try{await j,Ae.success(E)}catch(C){Ae.error(C instanceof Error?C.message:String(C))}}async function x(){confirm(`Uninstall ${a.id}? The LaunchAgent will be removed; source files at ${p.sourceDir??"~/.jarvis/native"} stay on disk.`)&&await y(i.mutateAsync(a.id),`${a.id} uninstalled`)}const N=p.installed?p.running?`Running (pid ${p.pid??"?"})`:"Installed, stopped":"Not installed",R=p.installed?p.running?"bg-green-500":"bg-amber-500":"bg-[var(--color-text-muted)]/30";return l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:ee("h-2.5 w-2.5 shrink-0 rounded-full",R)}),l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:a.name}),l.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",p.port??a.port]}),l.jsx("code",{className:"text-xs text-[var(--color-text-muted)]",children:p.label})]}),l.jsxs("p",{className:"ml-5 mt-0.5 text-xs text-[var(--color-text-muted)]",children:[N,p.sourceDir&&l.jsxs("span",{className:"ml-2 opacity-60",children:["· ",p.sourceDir]})]})]}),l.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[p.installed&&l.jsxs(l.Fragment,{children:[p.running?l.jsx(hl,{icon:Oj,label:"Stop",onClick:()=>y(o.mutateAsync(a.id),`${a.id} stopped`),disabled:o.isPending}):l.jsx(hl,{icon:tg,label:"Start",onClick:()=>y(s.mutateAsync(a.id),`${a.id} started`),disabled:s.isPending}),p.running&&l.jsx(hl,{icon:Gd,label:"Restart",onClick:()=>y(s.mutateAsync(a.id),`${a.id} restarted`),disabled:s.isPending}),l.jsx(hl,{icon:eg,label:d?"Hide logs":"Logs",onClick:()=>f(j=>!j)}),l.jsx(hl,{icon:gi,label:"Uninstall",onClick:x,disabled:i.isPending,danger:!0})]}),!p.installed&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)]",children:[l.jsx(kn,{size:12})," Re-run install wizard to enable"]})]})]}),d&&p.installed&&l.jsxs("div",{className:"border-t border-[var(--color-border)] bg-[var(--color-background)] p-3",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Gx,{active:m==="stderr",onClick:()=>v("stderr"),children:"stderr"}),l.jsx(Gx,{active:m==="stdout",onClick:()=>v("stdout"),children:"stdout"}),l.jsx("code",{className:"ml-2 text-xs text-[var(--color-text-muted)] opacity-60",children:g.data?.file})]}),l.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap rounded bg-[var(--color-surface-alt)] p-2 text-xs font-mono text-[var(--color-text)]",children:g.isLoading?"Loading…":g.isError?`Failed to load logs: ${g.error instanceof Error?g.error.message:String(g.error)}`:g.data?.content||"(empty)"})]})]})}function hl({icon:a,label:s,onClick:o,disabled:i,danger:d}){return l.jsxs("button",{type:"button",onClick:o,disabled:i,className:ee("flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs","transition-colors disabled:cursor-not-allowed disabled:opacity-50",d?"border-red-500/30 text-red-500 hover:bg-red-500/10":"border-[var(--color-border)] text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-[var(--color-text)]"),children:[l.jsx(a,{size:12}),s]})}function Gx({active:a,onClick:s,children:o}){return l.jsx("button",{type:"button",onClick:s,className:ee("rounded px-2 py-0.5 text-xs",a?"bg-[var(--color-primary)] text-white":"border border-[var(--color-border)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:o})}function c4({message:a}){return l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-500",children:[l.jsx(Ud,{size:14}),a]})}async function u4(){const{data:a}=await ge.get("/api/models/installed");return a.models}async function d4(a){const{data:s}=await ge.post("/api/models/download",a);return s}async function f4(a){await ge.delete(`/api/models/${encodeURIComponent(a)}`)}function Sg(){return yt({queryKey:["models","installed"],queryFn:u4,staleTime:1e4})}function Ng(){const a=ht();return bt({mutationFn:s=>d4(s),onSuccess:()=>{a.invalidateQueries({queryKey:["models","installed"]})}})}function m4(){const a=ht();return bt({mutationFn:s=>f4(s),onSuccess:()=>{a.invalidateQueries({queryKey:["models","installed"]})}})}const rs=[{id:"qwen3-4b",displayName:"Qwen 3 4B",hfRepoVllm:"Qwen/Qwen3-4B-AWQ",hfRepoGguf:"Qwen/Qwen3-4B-GGUF",ggufFilename:"Qwen3-4B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"2.5GB",sizeGguf:"2.5GB",vramMb:4096,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"qwen3-8b",displayName:"Qwen 3 8B",hfRepoVllm:"Qwen/Qwen3-8B-AWQ",hfRepoGguf:"Qwen/Qwen3-8B-GGUF",ggufFilename:"Qwen3-8B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"5.7GB",sizeGguf:"5GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"qwen3-14b",displayName:"Qwen 3 14B",hfRepoVllm:"Qwen/Qwen3-14B-AWQ",hfRepoGguf:"Qwen/Qwen3-14B-GGUF",ggufFilename:"Qwen3-14B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"9.4GB",sizeGguf:"9GB",vramMb:12288,gated:!1,quantization:"awq",promptProvider:"Qwen3LargeUntrained"},{id:"qwen25-7b",displayName:"Qwen 2.5 7B Instruct",hfRepoVllm:"Qwen/Qwen2.5-7B-Instruct-AWQ",hfRepoGguf:"Qwen/Qwen2.5-7B-Instruct-GGUF",ggufFilename:"qwen2.5-7b-instruct-q4_k_m.gguf",chatFormat:"chatml",contextWindow:32768,sizeVllm:"4.7GB",sizeGguf:"4.7GB",vramMb:6144,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"llama-3.1-8b",displayName:"Llama 3.1 8B Instruct",hfRepoVllm:"hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4",hfRepoGguf:"lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF",ggufFilename:"Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf",chatFormat:"llama-3",contextWindow:131072,sizeVllm:"5.4GB",sizeGguf:"5GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"Llama31MediumUntrained"},{id:"hermes-3-8b",displayName:"Hermes 3 Llama 3.1 8B",hfRepoVllm:"solidrust/Hermes-3-Llama-3.1-8B-AWQ",hfRepoGguf:"NousResearch/Hermes-3-Llama-3.1-8B-GGUF",ggufFilename:"Hermes-3-Llama-3.1-8B.Q4_K_M.gguf",chatFormat:"chatml",contextWindow:131072,sizeVllm:"5.4GB",sizeGguf:"4.9GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"HermesMediumUntrained"}];function h4(){const[a,s]=S.useState(""),[o,i]=S.useState(""),[d,f]=S.useState(""),[m,v]=S.useState(null),{data:g,isLoading:p}=Sg(),y=Ng(),x=m4();function N(E,C){const k=`${E}/${C??""}`;v(k),y.mutate({repo:E,filename:C||void 0,token:a||void 0},{onSuccess:A=>{Ae.success(A.message),v(null)},onError:A=>{Ae.error(A instanceof Error?A.message:"Download failed"),v(null)}})}function R(E){confirm(`Delete ${E}?`)&&x.mutate(E,{onSuccess:()=>Ae.success(`Deleted ${E}`),onError:()=>Ae.error("Failed to delete")})}function j(){o&&N(o,d)}return l.jsxs("div",{className:"mx-auto max-w-4xl space-y-8 p-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Models"}),l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Manage LLM models on the inference server"})]}),l.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(lj,{size:16,className:"text-[var(--color-text-muted)]"}),l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Token"}),l.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(optional, for gated models)"})]}),l.jsx("input",{type:"password",value:a,onChange:E=>s(E.target.value),placeholder:"hf_...",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(qd,{size:16,className:"text-[var(--color-text-muted)]"}),l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Installed Models"})]}),p?l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Loading..."}):g?.length?l.jsx("div",{className:"space-y-2",children:g.map(E=>l.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-3 py-2",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:E.name}),l.jsx("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:E.sizeFormatted})]}),l.jsx("button",{onClick:()=>R(E.name),disabled:x.isPending,className:"rounded p-1 text-[var(--color-text-muted)] hover:bg-red-500/10 hover:text-red-500",children:l.jsx(gi,{size:14})})]},E.name))}):l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No models installed yet"})]}),l.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(Aj,{size:16,className:"text-[var(--color-text-muted)]"}),l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Suggested Models"})]}),l.jsx("div",{className:"space-y-3",children:rs.map(E=>{const C=g?.some(k=>k.name===E.ggufFilename||k.name.includes(E.ggufFilename));return l.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-4 py-3",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:E.displayName}),l.jsxs("span",{className:"rounded bg-[var(--color-surface-alt)] px-1.5 py-0.5 text-xs text-[var(--color-text-muted)]",children:["~",E.sizeGguf]}),C&&l.jsx("span",{className:"rounded bg-green-500/10 px-1.5 py-0.5 text-xs text-green-500",children:"installed"})]}),l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[E.hfRepoGguf," / ",E.ggufFilename]}),l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Prompt provider: ",l.jsx("code",{className:"text-[var(--color-primary)]",children:E.promptProvider})]})]}),l.jsxs("button",{onClick:()=>N(E.hfRepoGguf,E.ggufFilename),disabled:m!==null,className:ee("ml-4 flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",C?"border border-[var(--color-border)] text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:[l.jsx(xl,{size:14}),m===`${E.hfRepoGguf}/${E.ggufFilename}`?"Downloading...":C?"Re-download":"Download"]})]},E.id)})})]}),l.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(xl,{size:16,className:"text-[var(--color-text-muted)]"}),l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Download from HuggingFace"})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Repository (e.g. Qwen/Qwen3-14B-GGUF)"}),l.jsx("input",{value:o,onChange:E=>i(E.target.value),placeholder:"owner/repo-name",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Filename (optional — downloads specific file instead of full repo)"}),l.jsx("input",{value:d,onChange:E=>f(E.target.value),placeholder:"model-name.gguf",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("button",{onClick:j,disabled:!o||m!==null,className:"flex items-center gap-2 rounded-md bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:opacity-50",children:[l.jsx(xl,{size:14}),m===`${o}/${d}`?"Downloading...":"Download"]})]})]})]})}async function p4(){const{data:a}=await ge.get("/api/quick-sets");return a}async function x4(a){const{data:s}=await ge.post("/api/quick-sets/apply",a);return s}async function v4(a){const{data:s}=await ge.post("/api/quick-sets/custom",a);return s}async function g4(a){const{data:s}=await ge.delete(`/api/quick-sets/custom/${a}`);return s}function y4(){return yt({queryKey:["quick-sets"],queryFn:p4,staleTime:6e4})}function b4(){const a=ht();return bt({mutationFn:s=>x4(s),onSuccess:()=>{a.invalidateQueries({queryKey:["quick-sets"]}),a.invalidateQueries({queryKey:["settings"]}),a.invalidateQueries({queryKey:["llm-status"]}),a.invalidateQueries({queryKey:["containers"]})}})}function S4(){const a=ht();return bt({mutationFn:s=>v4(s),onSuccess:()=>{a.invalidateQueries({queryKey:["quick-sets"]})}})}function N4(){const a=ht();return bt({mutationFn:s=>g4(s),onSuccess:()=>{a.invalidateQueries({queryKey:["quick-sets"]})}})}const Qx=["GGUF","MLX","VLLM","TRANSFORMERS","REST"];function j4(){const{data:a,isLoading:s,error:o}=y4(),i=b4(),d=S4(),f=N4(),{data:m}=Sg(),v=S.useMemo(()=>(m??[]).map(D=>`.models/${D.name}`),[m]),[g,p]=S.useState(null),[y,x]=S.useState(""),[N,R]=S.useState(!1),[j,E]=S.useState(""),[C,k]=S.useState(""),[A,F]=S.useState(""),[H,ne]=S.useState(""),[W,z]=S.useState(new Set(["live"])),[q,ae]=S.useState(!1),[je,le]=S.useState(""),[he,Me]=S.useState(""),[Te,te]=S.useState(""),[w,Y]=S.useState(""),[Z,xe]=S.useState("GGUF"),[ve,_]=S.useState(8192),X=a?.presets,K=S.useMemo(()=>{if(!X)return new Map;const D=new Map;for(const Se of X){const fe=Se.family||"Custom",Dt=D.get(fe)??[];Dt.push(Se),D.set(fe,Dt)}return D},[X]);function I(D){if(g===D.id){p(null);return}p(D.id),x(a?.currentValues.modelName??""),R(!1),k(D.defaultBackend),F(D.chatFormat),ne(D.promptProvider);const Se=a?.currentValues.contextWindow;E(Se&&Se>0?Se:D.defaultContextWindow)}function se(D){z(Se=>{const fe=new Set(Se);return fe.has(D)?fe.size>1&&fe.delete(D):fe.add(D),fe})}function me(){!g||!y.trim()||i.mutate({presetId:g,modelName:y.trim(),contextWindow:j?Number(j):void 0,backend:C,chatFormat:A,promptProvider:H,targets:Array.from(W)},{onSuccess:D=>{D.success?Ae.success(D.message):Ae.warning(D.message),p(null)},onError:D=>{Ae.error(D.message||"Failed to apply preset")}})}function ue(){!je.trim()||!Te.trim()||!w.trim()||d.mutate({name:je.trim(),family:he.trim()||"Custom",chatFormat:Te.trim(),promptProvider:w.trim(),defaultBackend:Z,defaultContextWindow:ve?Number(ve):8192},{onSuccess:()=>{Ae.success(`Created preset "${je.trim()}"`),ae(!1),le(""),Me(""),te(""),Y(""),xe("GGUF"),_(8192)},onError:D=>{Ae.error(D.message||"Failed to create preset")}})}function we(D){f.mutate(D.id,{onSuccess:()=>{Ae.success(`Deleted "${D.name}"`),g===D.id&&p(null)},onError:()=>Ae.error("Failed to delete preset")})}const G=a?.presets.find(D=>D.id===g);return l.jsxs("div",{className:"mx-auto max-w-4xl space-y-8 p-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Quick Sets"}),l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Select a model preset to auto-configure chat format, prompt provider, and backend"})]}),a?.currentValues.modelName&&l.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3",children:[l.jsx(kn,{size:16,className:"text-[var(--color-primary)]"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Current model"}),l.jsx("p",{className:"truncate text-sm font-medium text-[var(--color-text)]",children:a.currentValues.modelName})]}),a.currentValues.contextWindow>0&&l.jsxs("span",{className:"rounded bg-[var(--color-surface-alt)] px-2 py-0.5 text-xs text-[var(--color-text-muted)]",children:[a.currentValues.contextWindow.toLocaleString()," ctx"]})]}),s&&l.jsx("div",{className:"flex items-center justify-center py-12",children:l.jsx(mt,{size:20,className:"animate-spin text-[var(--color-text-muted)]"})}),o&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/5 px-4 py-3",children:[l.jsx(ra,{size:16,className:"text-red-500"}),l.jsx("span",{className:"text-sm text-red-500",children:"Failed to load presets"})]}),!s&&Array.from(K.entries()).map(([D,Se])=>l.jsxs("section",{children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text-muted)]",children:D}),l.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:Se.map(fe=>l.jsxs("div",{className:ee("relative rounded-lg border px-4 py-3 transition-colors",g===fe.id?"border-[var(--color-primary)] bg-[var(--color-primary)]/5":"border-[var(--color-border)] bg-[var(--color-surface)] hover:bg-[var(--color-surface-alt)]"),children:[l.jsxs("button",{onClick:()=>I(fe),className:"w-full text-left",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:fe.name}),g===fe.id&&l.jsx(xi,{size:16,className:"text-[var(--color-primary)]"})]}),fe.description&&l.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:fe.description}),l.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[l.jsx("span",{className:"rounded bg-[var(--color-surface-alt)] px-1.5 py-0.5 text-xs text-[var(--color-text-muted)]",children:fe.chatFormat}),l.jsx("span",{className:"rounded bg-[var(--color-surface-alt)] px-1.5 py-0.5 text-xs text-[var(--color-text-muted)]",children:fe.defaultBackend})]})]}),fe.isCustom&&l.jsx("button",{onClick:()=>we(fe),disabled:f.isPending,className:"absolute right-2 top-2 rounded p-1 text-[var(--color-text-muted)] hover:bg-red-500/10 hover:text-red-500",title:"Delete custom preset",children:l.jsx(gi,{size:14})})]},fe.id))})]},D)),!s&&!q&&l.jsxs("button",{onClick:()=>ae(!0),className:"flex items-center gap-2 rounded-lg border border-dashed border-[var(--color-border)] px-4 py-3 text-sm text-[var(--color-text-muted)] transition-colors hover:border-[var(--color-primary)] hover:text-[var(--color-primary)]",children:[l.jsx(ti,{size:16}),"Create custom preset"]}),q&&l.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ti,{size:16,className:"text-[var(--color-primary)]"}),l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"New Custom Preset"})]}),l.jsx("button",{onClick:()=>ae(!1),className:"rounded p-1 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",children:l.jsx(Vd,{size:16})})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Name *"}),l.jsx("input",{type:"text",value:je,onChange:D=>le(D.target.value),placeholder:"My Custom Model",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Family"}),l.jsx("input",{type:"text",value:he,onChange:D=>Me(D.target.value),placeholder:"Custom",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Chat format *"}),l.jsx("input",{type:"text",value:Te,onChange:D=>te(D.target.value),placeholder:"chatml",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Prompt provider *"}),l.jsx("input",{type:"text",value:w,onChange:D=>Y(D.target.value),placeholder:"Qwen25MediumUntrained",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Default backend"}),l.jsx("select",{value:Z,onChange:D=>xe(D.target.value),className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)]",children:Qx.map(D=>l.jsx("option",{value:D,children:D},D))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Default context window"}),l.jsx("input",{type:"number",value:ve,onChange:D=>_(D.target.value?parseInt(D.target.value,10):""),placeholder:"8192",min:1,className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]})]}),l.jsxs("div",{className:"flex items-center gap-3 pt-1",children:[l.jsxs("button",{onClick:ue,disabled:!je.trim()||!Te.trim()||!w.trim()||d.isPending,className:"flex items-center gap-2 rounded-md bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:opacity-50",children:[d.isPending?l.jsx(mt,{size:14,className:"animate-spin"}):l.jsx(ti,{size:14}),d.isPending?"Creating...":"Create Preset"]}),l.jsx("button",{onClick:()=>ae(!1),className:"rounded-md px-3 py-2 text-sm text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",children:"Cancel"})]})]})]}),G&&l.jsxs("section",{className:"rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[l.jsx(oi,{size:16,className:"text-[var(--color-primary)]"}),l.jsxs("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:["Apply: ",G.name]})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("span",{className:"mb-2 block text-xs font-medium text-[var(--color-text-muted)]",children:"Apply to"}),l.jsx("div",{className:"flex items-center gap-4",children:["live","background"].map(D=>l.jsxs("label",{className:"flex items-center gap-2 text-sm text-[var(--color-text)]",children:[l.jsx("input",{type:"checkbox",checked:W.has(D),onChange:()=>se(D),className:"rounded border-[var(--color-border)] accent-[var(--color-primary)]"}),l.jsx("span",{className:"capitalize",children:D})]},D))})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Model file path"}),v.length>0&&l.jsxs("select",{value:N||y!==""&&!v.includes(y)?"__other__":y,onChange:D=>{D.target.value==="__other__"?R(!0):(R(!1),x(D.target.value))},className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)]",children:[l.jsx("option",{value:"",disabled:!0,children:"Select a model…"}),v.map(D=>l.jsx("option",{value:D,children:D.replace(/^\.models\//,"")},D)),l.jsx("option",{value:"__other__",children:"Other (custom path / HF ID)…"})]}),(v.length===0||N||y!==""&&!v.includes(y))&&l.jsx("input",{type:"text",value:y,onChange:D=>x(D.target.value),placeholder:".models/model-name.gguf",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Chat format"}),l.jsx("input",{type:"text",value:A,onChange:D=>F(D.target.value),placeholder:"chatml",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Prompt provider"}),l.jsx("input",{type:"text",value:H,onChange:D=>ne(D.target.value),placeholder:"Qwen25MediumUntrained",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Context window (tokens)"}),l.jsx("input",{type:"number",value:j,onChange:D=>E(D.target.value?parseInt(D.target.value,10):""),placeholder:String(G.defaultContextWindow),min:1,className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Backend"}),l.jsx("select",{value:C,onChange:D=>k(D.target.value),className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)]",children:Qx.map(D=>l.jsx("option",{value:D,children:D},D))})]})]})]}),l.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[l.jsxs("button",{onClick:me,disabled:!y.trim()||i.isPending,className:"flex items-center gap-2 rounded-md bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:opacity-50",children:[i.isPending?l.jsx(mt,{size:14,className:"animate-spin"}):l.jsx(oi,{size:14}),i.isPending?"Applying...":"Apply Settings"]}),l.jsx("button",{onClick:()=>p(null),className:"rounded-md px-3 py-2 text-sm text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",children:"Cancel"})]})]})]})}const Zu={preflight:"Checking prerequisites",download:"Downloading update",binary:"Updating binary",restarting:"Restarting admin server",compose:"Updating configuration",pull:"Pulling images",restart:"Restarting services",verify:"Verifying health",done:"Complete"};function w4(){const a=wa(),{data:s,isLoading:o}=bg(),[i,d]=S.useState("idle"),[f,m]=S.useState([]),[v,g]=S.useState(null),p=S.useRef(null),y=S.useCallback(R=>{m(j=>[...j,R])},[]);S.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[f]);async function x(){d("preflight"),m([]),g(null);try{const R=localStorage.getItem("jarvis-admin:access_token")??localStorage.getItem("access_token"),j=await fetch("/api/update/apply",{method:"POST",headers:{Authorization:`Bearer ${R}`}});if(!j.ok||!j.body){const A=await j.text();throw new Error(A||`HTTP ${j.status}`)}const E=j.body.getReader(),C=new TextDecoder;let k="";for(;;){const{done:A,value:F}=await E.read();if(A)break;k+=C.decode(F,{stream:!0});const H=k.split(`
|
|
17
|
-
`);k=H.pop()??"";for(const ne of H)if(ne.startsWith("data: "))try{const W=JSON.parse(ne.slice(6));if(W.phase&&d(W.phase),W.message&&y({text:W.message,phase:W.phase}),W.stream&&W.text&&y({text:W.text.trim()}),W.restart){d("restarting"),y({text:"Admin server restarting with new version..."}),await E4(s?.latestVersion??""),d("done"),y({text:"Upgrade complete!"});return}if(W.done&&W.code!==0)throw new Error(W.error??"Upgrade failed");W.done&&W.code===0&&d("done")}catch(W){if(W instanceof SyntaxError)continue;throw W}}}catch(R){const j=R instanceof Error?R.message:String(R);g(j),d("error"),y({text:`Error: ${j}`})}}if(o)return l.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:l.jsx(na,{size:24,className:"animate-spin text-[var(--color-primary)]"})});const N=Object.keys(Zu).filter(R=>{const j=Object.keys(Zu),E=j.indexOf(i);return j.indexOf(R)<E});return l.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Update Jarvis"}),s?.updateAvailable?l.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["v",s.currentVersion," → v",s.latestVersion]}):l.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["You're running the latest version (v",s?.currentVersion??"?",")"]})]}),i!=="idle"&&l.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries(Zu).map(([R,j])=>{const E=R===i,C=N.includes(R),k=R===i&&i==="error";return l.jsxs("div",{className:"flex items-center gap-2",children:[C?l.jsx(gt,{size:16,className:"text-green-500"}):k?l.jsx(ra,{size:16,className:"text-red-500"}):E?l.jsx(na,{size:16,className:"animate-spin text-[var(--color-primary)]"}):l.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),l.jsx("span",{className:ee("text-sm",E?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",C&&"text-green-500"),children:j})]},R)})}),f.length>0&&l.jsx("div",{ref:p,className:"max-h-64 overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[#0d1117] p-3 font-mono text-xs text-gray-300",children:f.map((R,j)=>l.jsx("div",{children:R.text},j))}),v&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[l.jsx(ra,{size:14,className:"text-red-500"}),l.jsx("span",{className:"text-sm text-red-500",children:v})]}),l.jsxs("div",{className:"flex gap-3",children:[i==="idle"&&s?.updateAvailable&&l.jsxs("button",{onClick:x,className:"flex items-center gap-2 rounded-lg bg-green-600 px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[l.jsx(Wv,{size:16}),"Update to v",s.latestVersion]}),i==="done"&&l.jsxs("button",{onClick:()=>a("/dashboard"),className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[l.jsx(gt,{size:16}),"Go to Dashboard"]}),i==="error"&&l.jsxs("button",{onClick:x,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[l.jsx(mt,{size:16}),"Retry"]})]})]})}async function E4(a,s=6e4){const o=Date.now()+s;for(;Date.now()<o;){await new Promise(i=>setTimeout(i,2e3));try{const i=await fetch("/health");if(i.ok){const d=await i.json();if(d.version&&d.version!=="0.0.0-dev")return}}catch{}}throw new Error("Admin server did not restart within 60 seconds")}const $u={regenerate:"Regenerating compose from registry",pull:"Pulling images for new release track",apply:"Applying changes (docker compose up)",done:"Complete"};function C4(){const a=wa(),s=localStorage.getItem("jarvis-admin:access_token")??localStorage.getItem("access_token"),[o,i]=S.useState("loading_options"),[d,f]=S.useState([]),[m,v]=S.useState(null),g=S.useRef(null),[p,y]=S.useState([]),[x,N]=S.useState(!1),[R,j]=S.useState("https://relay.jarvisautomation.io"),[E,C]=S.useState("/whisper-models/ggml-base.en.bin"),[k,A]=S.useState("stable"),F=S.useCallback(z=>{f(q=>[...q,z])},[]);S.useEffect(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[d]),S.useEffect(()=>{async function z(){try{const q=await fetch("/api/install/reconcile/options",{headers:{Authorization:`Bearer ${s}`}});if(!q.ok)throw new Error(`HTTP ${q.status}`);const ae=await q.json();y(ae.services),N(ae.relayEnabled),j(ae.relayUrl||"https://relay.jarvisautomation.io"),C(ae.whisperModelPath||"/whisper-models/ggml-base.en.bin"),A(ae.releaseTrack??"stable"),i("options")}catch(q){v(q instanceof Error?q.message:"Failed to load options"),i("error")}}z()},[s]);function H(z){y(q=>q.map(ae=>ae.id===z?{...ae,enabled:!ae.enabled}:ae))}async function ne(){i("regenerate"),f([]),v(null);const z=p.filter(q=>q.enabled).map(q=>q.id);try{const q=await fetch("/api/install/reconcile",{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify({enabledModules:z,relayEnabled:x,relayUrl:R,whisperModelPath:E,releaseTrack:k})});if(!q.ok||!q.body){const he=await q.text();throw new Error(he||`HTTP ${q.status}`)}const ae=q.body.getReader(),je=new TextDecoder;let le="";for(;;){const{done:he,value:Me}=await ae.read();if(he)break;le+=je.decode(Me,{stream:!0});const Te=le.split(`
|
|
18
|
-
`);le=Te.pop()??"";for(const te of Te)if(te.startsWith("data: "))try{const w=JSON.parse(te.slice(6));if(w.phase&&i(w.phase),w.message&&F({text:w.message,phase:w.phase}),w.stream&&w.text&&F({text:w.text.trim()}),w.done&&w.code!==0)throw new Error(w.message??"Reconcile failed")}catch(w){if(w instanceof SyntaxError)continue;throw w}}}catch(q){const ae=q instanceof Error?q.message:String(q);v(ae),i("error"),F({text:`Error: ${ae}`})}}const W=Object.keys($u).filter(z=>{const q=Object.keys($u),ae=q.indexOf(o);return q.indexOf(z)<ae||o==="done"&&z==="done"});return l.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Sync Compose"}),l.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:["Regenerate ",l.jsx("code",{className:"rounded bg-[var(--color-surface)] px-1.5 py-0.5 text-xs",children:"docker-compose.yml"})," from the latest service registry and apply changes to the running stack."]})]}),o==="loading_options"&&l.jsx("div",{className:"flex items-center justify-center py-12",children:l.jsx(na,{size:32,className:"animate-spin text-[var(--color-primary)]"})}),o==="options"&&l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Services"}),l.jsx("div",{className:"space-y-2",children:p.map(z=>l.jsxs("button",{onClick:()=>H(z.id),className:"flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left hover:bg-[var(--color-bg-secondary)] transition-colors",children:[z.enabled?l.jsx(gt,{size:18,className:"shrink-0 text-[var(--color-primary)]"}):l.jsx(ls,{size:18,className:"shrink-0 text-[var(--color-text-muted)]"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:z.name}),l.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:z.description})]})]},z.id))})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Release Track"}),l.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:k==="dev"?"Dev":"Stable"}),l.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:k==="dev"?"Using latest main branch builds (may be unstable)":"Using tagged releases"})]}),l.jsx("button",{type:"button",role:"switch","aria-checked":k==="dev",onClick:()=>A(k==="dev"?"stable":"dev"),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${k==="dev"?"bg-amber-500":"bg-[var(--color-surface-alt)]"}`,children:l.jsx("span",{className:`absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition-transform ${k==="dev"?"translate-x-5":"translate-x-0"}`})})]}),k==="dev"&&l.jsx("div",{className:"mx-3 mt-1 rounded-lg border border-amber-300 bg-amber-500/10 px-3 py-2 text-xs text-amber-400",children:"Switching tracks will pull all images and force-recreate containers."})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Integrations"}),l.jsxs("button",{onClick:()=>N(!x),className:"flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left hover:bg-[var(--color-bg-secondary)] transition-colors",children:[x?l.jsx(gt,{size:18,className:"shrink-0 text-[var(--color-primary)]"}):l.jsx(ls,{size:18,className:"shrink-0 text-[var(--color-text-muted)]"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:"Jarvis Relay"}),l.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:"Routes OAuth callbacks through a cloud relay for external providers (Google, Spotify, etc.)"})]})]}),x&&l.jsxs("div",{className:"mt-2 px-3",children:[l.jsx("label",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Relay URL"}),l.jsx("input",{type:"url",value:R,onChange:z=>j(z.target.value),placeholder:"https://relay.jarvisautomation.io",className:"mt-1 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-1.5 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]})]}),p.some(z=>z.id==="jarvis-whisper-api"&&z.enabled)&&l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Whisper"}),l.jsxs("div",{className:"px-3",children:[l.jsx("label",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Model path"}),l.jsx("input",{type:"text",value:E,onChange:z=>C(z.target.value),placeholder:"/whisper-models/ggml-base.en.bin",className:"mt-1 w-full rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-1.5 text-sm font-mono text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"}),l.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Path inside the container. Place model files in ",l.jsx("code",{className:"rounded bg-[var(--color-bg)] px-1",children:"./whisper-models/"})," next to your compose file."]})]})]})]}),o!=="loading_options"&&o!=="options"&&l.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries($u).map(([z,q])=>{const ae=z===o,je=W.includes(z),le=z===o&&o==="error";return l.jsxs("div",{className:"flex items-center gap-2",children:[je?l.jsx(gt,{size:16,className:"text-green-500"}):le?l.jsx(ra,{size:16,className:"text-red-500"}):ae?l.jsx(na,{size:16,className:"animate-spin text-[var(--color-primary)]"}):l.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),l.jsx("span",{className:ee("text-sm",ae?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",je&&"text-green-500"),children:q})]},z)})}),d.length>0&&l.jsx("div",{ref:g,className:"max-h-64 overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[#0d1117] p-3 font-mono text-xs text-gray-300",children:d.map((z,q)=>l.jsx("div",{children:z.text},q))}),m&&l.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[l.jsx(ra,{size:14,className:"text-red-500"}),l.jsx("span",{className:"text-sm text-red-500",children:m})]}),l.jsxs("div",{className:"flex gap-3",children:[o==="options"&&l.jsxs("button",{onClick:ne,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[l.jsx(pd,{size:16}),"Sync now"]}),(o==="options"||o==="regenerate"||o==="apply"||o==="done")&&l.jsxs("button",{onClick:()=>a("/dashboard"),disabled:o==="regenerate"||o==="apply",className:"flex items-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-alt)] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",children:[l.jsx(gt,{size:16}),"Back to dashboard"]}),o==="error"&&l.jsxs("button",{onClick:ne,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[l.jsx(mt,{size:16}),"Retry"]})]})]})}async function T4(a={}){const{data:s}=await ge.get("/api/traces",{params:a});return s}async function _4(a){const{data:s}=await ge.get(`/api/traces/${a}`);return s}function Vx(a){return a<1e3?`${Math.round(a)}ms`:`${(a/1e3).toFixed(1)}s`}function Fx(a){return new Date(a).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function R4(a){const s=new Map;for(const o of a){const i=s.get(o.conversation_id);if(!i){s.set(o.conversation_id,{conversation_id:o.conversation_id,traces:[o],newest_at:o.created_at,user_command:o.user_command,assistant_message:o.assistant_message,source:o.source,node_id:o.node_id,household_id:o.household_id,total_duration_ms:o.total_duration_ms,status:o.status});continue}i.traces.push(o),i.total_duration_ms+=o.total_duration_ms,o.created_at>i.newest_at&&(i.newest_at=o.created_at),!i.user_command&&o.user_command&&(i.user_command=o.user_command),!i.assistant_message&&o.assistant_message&&(i.assistant_message=o.assistant_message),o.status!=="ok"&&(i.status=o.status)}return Array.from(s.values()).sort((o,i)=>o.newest_at<i.newest_at?1:-1)}function M4(a){return a==="mobile"?"📱":"🔊"}function A4(){const a=wa(),[s,o]=S.useState(""),[i,d]=S.useState(""),[f,m]=S.useState(""),[v,g]=S.useState(""),[p,y]=S.useState(new Set),x=yt({queryKey:["admin","households"],queryFn:GE,staleTime:6e4}),N=yt({queryKey:["admin","nodes"],queryFn:QE,staleTime:6e4}),{data:R,isLoading:j,error:E}=yt({queryKey:["traces",s,i,f,v],queryFn:()=>T4({limit:100,...s?{status:s}:{},...i?{source:i}:{},...f?{household_id:f}:{},...v?{node_id:v}:{}}),refetchInterval:1e4}),C=S.useMemo(()=>{const z=N.data??[];return f?z.filter(q=>q.household_id===f):z},[N.data,f]),k=S.useMemo(()=>{const z=new Map;for(const q of N.data??[])z.set(q.node_id,q.name);return z},[N.data]),A=S.useMemo(()=>{const z=new Map;for(const q of x.data??[])z.set(q.id,q.name);return z},[x.data]),F=S.useMemo(()=>R?R4(R.traces):[],[R]);function H(z){y(q=>{const ae=new Set(q);return ae.has(z)?ae.delete(z):ae.add(z),ae})}function ne(z){if(m(z),z&&v){const q=(N.data??[]).find(ae=>ae.node_id===v);q&&q.household_id!==z&&g("")}}const W="rounded border border-[var(--color-border)] bg-[var(--color-surface)] px-2 py-1 text-sm text-[var(--color-text)]";return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Request Traces"}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("select",{className:W,value:f,onChange:z=>ne(z.target.value),disabled:x.isLoading,children:[l.jsx("option",{value:"",children:"All households"}),(x.data??[]).map(z=>l.jsx("option",{value:z.id,children:z.name},z.id))]}),l.jsxs("select",{className:W,value:v,onChange:z=>g(z.target.value),disabled:N.isLoading,children:[l.jsx("option",{value:"",children:"All nodes"}),C.map(z=>l.jsx("option",{value:z.node_id,children:z.name},z.node_id))]}),l.jsxs("select",{className:W,value:s,onChange:z=>o(z.target.value),children:[l.jsx("option",{value:"",children:"All statuses"}),l.jsx("option",{value:"ok",children:"OK"}),l.jsx("option",{value:"error",children:"Error"})]}),l.jsxs("select",{className:W,value:i,onChange:z=>d(z.target.value),children:[l.jsx("option",{value:"",children:"All sources"}),l.jsx("option",{value:"node",children:"Node"}),l.jsx("option",{value:"mobile",children:"Mobile"})]})]})]}),j&&l.jsx("div",{className:"flex justify-center py-12",children:l.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-[var(--color-primary)] border-t-transparent"})}),E&&l.jsx("div",{className:"rounded-lg border border-red-300 bg-red-50 p-4 text-red-700 dark:border-red-700 dark:bg-red-900/20 dark:text-red-400",children:"Failed to load traces"}),R&&l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[R.total," traces in ",F.length," conversation",F.length===1?"":"s"]}),l.jsx("div",{className:"overflow-x-auto rounded-lg border border-[var(--color-border)]",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)]",children:[l.jsx("th",{className:"w-8 px-2 py-2"}),l.jsx("th",{className:"px-3 py-2 text-left font-medium text-[var(--color-text-muted)]",children:"Time"}),l.jsx("th",{className:"px-3 py-2 text-left font-medium text-[var(--color-text-muted)]",children:"Source"}),l.jsx("th",{className:"px-3 py-2 text-left font-medium text-[var(--color-text-muted)]",children:"Node"}),l.jsx("th",{className:"px-3 py-2 text-left font-medium text-[var(--color-text-muted)]",children:"User said"}),l.jsx("th",{className:"px-3 py-2 text-left font-medium text-[var(--color-text-muted)]",children:"Jarvis said"}),l.jsx("th",{className:"px-3 py-2 text-right font-medium text-[var(--color-text-muted)]",children:"Duration"}),l.jsx("th",{className:"px-3 py-2 text-center font-medium text-[var(--color-text-muted)]",children:"Status"}),l.jsx("th",{className:"px-3 py-2 text-right font-medium text-[var(--color-text-muted)]",children:"Traces"})]})}),l.jsxs("tbody",{children:[F.map(z=>{const q=p.has(z.conversation_id),ae=z.traces.length,je=z.node_id?k.get(z.node_id)??z.node_id.slice(0,8):"-";return l.jsxs(S.Fragment,{children:[l.jsxs("tr",{className:"border-b border-[var(--color-border)] cursor-pointer transition-colors hover:bg-[var(--color-surface-alt)]",onClick:()=>H(z.conversation_id),children:[l.jsx("td",{className:"px-2 py-2 text-center text-[var(--color-text-muted)]",children:ae>1?q?"▼":"▶":""}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text)] whitespace-nowrap",children:Fx(z.newest_at)}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text-muted)]",children:l.jsxs("span",{className:"inline-flex items-center gap-1",children:[M4(z.source),z.source]})}),l.jsxs("td",{className:"px-3 py-2 text-[var(--color-text-muted)] whitespace-nowrap",children:[je,z.household_id&&l.jsxs("span",{className:"ml-1 text-xs opacity-60",children:["· ",A.get(z.household_id)??""]})]}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text)] max-w-xs truncate",children:z.user_command??"-"}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text-muted)] max-w-xs truncate",children:z.assistant_message??"-"}),l.jsx("td",{className:"px-3 py-2 text-right text-[var(--color-text)] tabular-nums",children:Vx(z.total_duration_ms)}),l.jsx("td",{className:"px-3 py-2 text-center",children:l.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${z.status==="ok"?"bg-green-500":"bg-red-500"}`})}),l.jsx("td",{className:"px-3 py-2 text-right text-[var(--color-text-muted)] tabular-nums",children:ae})]}),q&&z.traces.slice().sort((le,he)=>le.created_at<he.created_at?-1:1).map(le=>l.jsxs("tr",{className:"border-b border-[var(--color-border)] cursor-pointer bg-[var(--color-surface-alt)]/40 transition-colors hover:bg-[var(--color-surface-alt)]",onClick:()=>a(`/traces/${le.id}`),children:[l.jsx("td",{className:"px-2 py-2"}),l.jsxs("td",{className:"px-3 py-2 text-[var(--color-text-muted)] whitespace-nowrap",children:[l.jsx("span",{className:"inline-block w-3"}),Fx(le.created_at)]}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text-muted)] text-xs",children:le.request_type}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text-muted)] whitespace-nowrap text-xs",children:le.node_id?k.get(le.node_id)??le.node_id.slice(0,8):"-"}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text)] max-w-xs truncate",children:le.user_command??"-"}),l.jsx("td",{className:"px-3 py-2 text-[var(--color-text-muted)] max-w-xs truncate",children:le.assistant_message??"-"}),l.jsx("td",{className:"px-3 py-2 text-right text-[var(--color-text)] tabular-nums",children:Vx(le.total_duration_ms)}),l.jsx("td",{className:"px-3 py-2 text-center",children:l.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${le.status==="ok"?"bg-green-500":"bg-red-500"}`})}),l.jsx("td",{className:"px-3 py-2 text-right text-[var(--color-text-muted)] tabular-nums",children:le.span_count})]},le.id))]},z.conversation_id)}),F.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:9,className:"px-3 py-8 text-center text-[var(--color-text-muted)]",children:"No traces yet"})})]})]})})]})]})}function as(a){return a<1e3?`${Math.round(a)}ms`:`${(a/1e3).toFixed(1)}s`}const Yx={cc:"#9e9e9e",llm_proxy:"#42a5f5",node:"#66bb6a",tts:"#ffa726",whisper:"#ab47bc"},Xx={cc:"Command Center",llm_proxy:"LLM Proxy",node:"Node",tts:"TTS",whisper:"Whisper"};function k4(a){const s=a.filter(d=>d.duration_ms>0),o=s.filter(d=>!s.some(f=>f!==d&&d.start_ms<=f.start_ms&&d.end_ms>=f.end_ms&&f.duration_ms>0));o.sort((d,f)=>d.start_ms-f.start_ms);const i=[];for(const d of o){const f=i[i.length-1];f&&f.service===d.service?(f.duration_ms=Math.round((f.duration_ms+d.duration_ms)*10)/10,f.steps.push(d.name),d.status==="error"&&(f.status="error")):i.push({service:d.service,duration_ms:d.duration_ms,status:d.status,steps:[d.name]})}return i}function O4(){const{id:a}=_0(),s=wa(),[o,i]=S.useState(!1),[d,f]=S.useState(null),{data:m,isLoading:v,error:g}=yt({queryKey:["trace",a],queryFn:()=>_4(a),enabled:!!a}),p=S.useMemo(()=>m?k4(m.spans):[],[m]);return v?l.jsx("div",{className:"flex justify-center py-12",children:l.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-[var(--color-primary)] border-t-transparent"})}):g||!m?l.jsxs("div",{className:"space-y-4",children:[l.jsx("button",{className:"text-sm text-[var(--color-primary)] hover:underline",onClick:()=>s("/traces"),children:"Back to traces"}),l.jsx("div",{className:"rounded-lg border border-red-300 bg-red-50 p-4 text-red-700 dark:border-red-700 dark:bg-red-900/20 dark:text-red-400",children:"Trace not found"})]}):l.jsxs("div",{className:"space-y-6",children:[l.jsx("button",{className:"text-sm text-[var(--color-primary)] hover:underline",onClick:()=>s("/traces"),children:"Back to traces"}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-lg font-bold text-[var(--color-text)]",children:m.user_command??"Request Trace"}),l.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[m.source==="mobile"?"📱 Mobile":"🔊 Node",m.node_id&&` (${m.node_id})`," · ",m.request_type," · ",m.created_at?new Date(m.created_at).toLocaleString():""]})]}),l.jsxs("div",{className:"text-right",children:[l.jsx("div",{className:"text-2xl font-bold tabular-nums text-[var(--color-text)]",children:as(m.total_duration_ms)}),l.jsxs("div",{className:"flex items-center justify-end gap-1 mt-1",children:[l.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${m.status==="ok"?"bg-green-500":"bg-red-500"}`}),l.jsx("span",{className:"text-sm text-[var(--color-text-muted)]",children:m.status})]})]})]}),m.error_message&&l.jsx("div",{className:"mt-3 rounded border border-red-300 bg-red-50 p-2 text-sm text-red-700 dark:border-red-700 dark:bg-red-900/20 dark:text-red-400",children:m.error_message}),l.jsx("p",{className:"mt-2 text-xs text-[var(--color-text-muted)] font-mono",children:m.conversation_id})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsx("h2",{className:"mb-3 text-sm font-medium text-[var(--color-text-muted)]",children:"Service Flow"}),l.jsx("p",{className:"mb-4 text-xs text-[var(--color-text-muted)] opacity-60",children:p.map(y=>Xx[y.service]??y.service).join(" → ")}),l.jsx("div",{className:"space-y-2",children:p.map((y,x)=>{const N=Math.min(y.duration_ms/m.total_duration_ms*100,100),R=y.status==="error"?"#ef4444":Yx[y.service]??"#9e9e9e",j=Xx[y.service]??y.service;return l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full shrink-0",style:{backgroundColor:R}}),l.jsx("span",{className:"w-32 text-sm text-[var(--color-text)] shrink-0",children:j}),l.jsxs("div",{className:"flex-1 h-6 rounded bg-[var(--color-surface-alt)] relative",children:[l.jsx("div",{className:"absolute top-0 left-0 h-full rounded",style:{width:`${Math.max(N,1)}%`,backgroundColor:R,opacity:.7}}),l.jsx("span",{className:"absolute inset-0 flex items-center px-2 text-xs text-[var(--color-text)] opacity-70",children:y.steps.join(", ")})]}),l.jsx("span",{className:"w-16 text-sm text-[var(--color-text)] text-right tabular-nums shrink-0",children:as(y.duration_ms)})]},`${y.service}-${x}`)})})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[l.jsxs("button",{className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",onClick:()=>{i(y=>!y),f(null)},children:[o?"Hide":"Show"," raw spans (",m.spans.length,")"]}),o&&l.jsx("div",{className:"mt-3 space-y-1",children:m.spans.map((y,x)=>{const N=Math.min(y.duration_ms/m.total_duration_ms*100,100),R=y.start_ms/m.total_duration_ms*100,j=y.status==="error"?"#ef4444":Yx[y.service]??"#9e9e9e",E=d===y;return l.jsxs("div",{className:`flex items-center gap-2 cursor-pointer rounded px-1 py-0.5 ${E?"bg-[var(--color-surface-alt)]":""}`,onClick:()=>f(E?null:y),children:[l.jsx("span",{className:"w-36 truncate text-xs text-[var(--color-text-muted)] text-right shrink-0",children:y.name}),l.jsx("div",{className:"flex-1 relative h-4 rounded bg-[var(--color-surface-alt)]",children:l.jsx("div",{className:"absolute top-0 h-full rounded",style:{left:`${R}%`,width:`${Math.max(N,.5)}%`,backgroundColor:j,minWidth:"2px"}})}),l.jsx("span",{className:"w-14 text-xs text-[var(--color-text-muted)] text-right shrink-0 tabular-nums",children:as(y.duration_ms)}),l.jsx("span",{className:"w-16 text-xs text-[var(--color-text-muted)] opacity-60 shrink-0",children:y.service})]},`${y.name}-${x}`)})}),d&&o&&l.jsx("div",{className:"mt-3 border-t border-[var(--color-border)] pt-3",children:l.jsxs("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-sm max-w-md",children:[l.jsx("dt",{className:"text-[var(--color-text-muted)]",children:"Service"}),l.jsx("dd",{className:"text-[var(--color-text)]",children:d.service}),l.jsx("dt",{className:"text-[var(--color-text-muted)]",children:"Duration"}),l.jsx("dd",{className:"text-[var(--color-text)] tabular-nums",children:as(d.duration_ms)}),l.jsx("dt",{className:"text-[var(--color-text-muted)]",children:"Start"}),l.jsx("dd",{className:"text-[var(--color-text)] tabular-nums",children:as(d.start_ms)}),l.jsx("dt",{className:"text-[var(--color-text-muted)]",children:"End"}),l.jsx("dd",{className:"text-[var(--color-text)] tabular-nums",children:as(d.end_ms)}),l.jsx("dt",{className:"text-[var(--color-text-muted)]",children:"Status"}),l.jsx("dd",{className:d.status==="ok"?"text-green-600":"text-red-600",children:d.status}),Object.entries(d.metadata||{}).map(([y,x])=>l.jsxs("div",{className:"contents",children:[l.jsx("dt",{className:"text-[var(--color-text-muted)]",children:y}),l.jsx("dd",{className:"text-[var(--color-text)] tabular-nums",children:String(x)})]},y))]})})]})]})}function z4(){return l.jsxs("div",{className:"flex min-h-[60vh] flex-col items-center justify-center",children:[l.jsx("h1",{className:"mb-2 text-4xl font-bold text-[var(--color-text)]",children:"404"}),l.jsx("p",{className:"mb-4 text-[var(--color-text-muted)]",children:"Page not found"}),l.jsx(Ed,{to:"/settings",className:"text-[var(--color-primary)] underline hover:opacity-80",children:"Go to Settings"})]})}const D4=7,L4={currentStep:0,totalSteps:D4,enabledModules:[],portOverrides:{},infraPortOverrides:{},secrets:{},dbUser:"jarvis",whisperModel:"base.en",whisperModelPath:"/whisper-models/ggml-base.en.bin",llmInterface:"Qwen25MediumUntrained",deploymentMode:"local",deploymentTarget:"standard",remoteLlmUrl:"",remoteWhisperUrl:"",platform:"linux",hardware:null,relayEnabled:!1,installRunning:!1,installComplete:!1,nativeServices:[]};function U4(a,s,o){return Math.max(s,Math.min(o,a))}function B4(a,s){switch(s.type){case"SET_STEP":return{...a,currentStep:U4(s.step,0,a.totalSteps-1)};case"NEXT_STEP":return{...a,currentStep:Math.min(a.currentStep+1,a.totalSteps-1)};case"PREV_STEP":return{...a,currentStep:Math.max(a.currentStep-1,0)};case"SET_ENABLED_MODULES":return{...a,enabledModules:s.modules};case"TOGGLE_MODULE":{if(s.enabled){const o=a.enabledModules.includes(s.serviceId)?a.enabledModules:[...a.enabledModules,s.serviceId];return{...a,enabledModules:o}}return{...a,enabledModules:a.enabledModules.filter(o=>o!==s.serviceId)}}case"SET_PORT_OVERRIDE":return{...a,portOverrides:{...a.portOverrides,[s.serviceId]:s.port}};case"SET_INFRA_PORT_OVERRIDE":return{...a,infraPortOverrides:{...a.infraPortOverrides,[s.infraId]:s.port}};case"SET_SECRET":return{...a,secrets:{...a.secrets,[s.name]:s.value}};case"SET_SECRETS":return{...a,secrets:s.secrets};case"SET_DB_USER":return{...a,dbUser:s.user};case"SET_WHISPER_MODEL":return{...a,whisperModel:s.model};case"SET_LLM_INTERFACE":return{...a,llmInterface:s.interfaceId};case"SET_DEPLOYMENT_MODE":return{...a,deploymentMode:s.mode};case"SET_DEPLOYMENT_TARGET":return{...a,deploymentTarget:s.target};case"SET_REMOTE_LLM_URL":return{...a,remoteLlmUrl:s.url};case"SET_REMOTE_WHISPER_URL":return{...a,remoteWhisperUrl:s.url};case"SET_PLATFORM":return{...a,platform:s.platform};case"SET_HARDWARE":return{...a,hardware:s.hardware,platform:s.hardware.platform};case"SET_RELAY_ENABLED":return{...a,relayEnabled:s.enabled};case"SET_INSTALL_RUNNING":return{...a,installRunning:s.running};case"SET_INSTALL_COMPLETE":return{...a,installRunning:!1,installComplete:!0};case"SET_NATIVE_SERVICES":return{...a,nativeServices:s.services};case"TOGGLE_NATIVE_SERVICE":{if(s.enabled){const o=a.nativeServices.includes(s.serviceId)?a.nativeServices:[...a.nativeServices,s.serviceId];return{...a,nativeServices:o}}return{...a,nativeServices:a.nativeServices.filter(o=>o!==s.serviceId)}}default:return a}}const jg=S.createContext(null);function q4({children:a}){const[s,o]=S.useReducer(B4,L4);return l.jsx(jg.Provider,{value:{state:s,dispatch:o},children:a})}function dr(){const a=S.useContext(jg);if(!a)throw new Error("useWizard must be used within a WizardProvider");return a}function H4(){const{state:a,dispatch:s}=dr(),[o,i]=S.useState(null),[d,f]=S.useState(!0),[m,v]=S.useState(!1);function g(){f(!0),v(!1),Yd().then(y=>{i(y);const x=y.reason==="docker_not_found";v(x),s(x?{type:"SET_INSTALL_RUNNING",running:!0}:{type:"SET_INSTALL_RUNNING",running:!1})}).catch(()=>{i({configured:!1,reason:"error"}),v(!0),s({type:"SET_INSTALL_RUNNING",running:!0})}).finally(()=>f(!1))}S.useEffect(()=>{g()},[]);const p=o&&o.reason!=="docker_not_found";return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Let's get your personal voice assistant up and running. This wizard will guide you through selecting services, configuring hardware, and starting everything up."})]}),l.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:l.jsxs("div",{className:"flex items-center gap-3",children:[d?l.jsx(na,{size:20,className:"animate-spin text-[var(--color-primary)]"}):p?l.jsx(gt,{size:20,className:"text-green-500"}):l.jsx(Ud,{size:20,className:"text-red-500"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:d?"Checking Docker...":p?"Docker is running":"Docker not found"}),!d&&!p&&l.jsxs("div",{className:"mt-1 space-y-1",children:[l.jsx("p",{className:"text-xs text-red-400",children:"Docker is required to run Jarvis services."}),l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Install"," ",l.jsx("a",{href:"https://www.docker.com/products/docker-desktop/",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary)] underline hover:no-underline",children:"Docker Desktop"})," ","for your platform, start it, then click Retry."]})]})]}),m&&!d&&l.jsxs("button",{type:"button",onClick:g,className:"flex items-center gap-1 rounded-md border border-[var(--color-border)] px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[l.jsx(vi,{size:12}),"Retry"]})]})}),l.jsxs("div",{children:[l.jsx("label",{className:"mb-2 block text-sm font-medium text-[var(--color-text)]",children:"Deployment Mode"}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("button",{type:"button",onClick:()=>s({type:"SET_DEPLOYMENT_MODE",mode:"local"}),className:ee("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",a.deploymentMode==="local"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[l.jsx(hj,{size:24,className:"text-[var(--color-primary)]"}),l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Local"}),l.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"Everything on this machine"})]}),l.jsxs("button",{type:"button",onClick:()=>s({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"}),className:ee("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",a.deploymentMode==="remote-llm"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[l.jsx(Qd,{size:24,className:"text-[var(--color-primary)]"}),l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM"}),l.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"LLM on separate GPU machine"})]})]})]})]})}const Zo=[{label:"None / CPU only",gpu:null,gpuType:"none",vramMb:null,backends:["gguf"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4090 (24 GB)",gpu:"NVIDIA RTX 4090",gpuType:"nvidia",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4080 (16 GB)",gpu:"NVIDIA RTX 4080",gpuType:"nvidia",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4070 Ti (12 GB)",gpu:"NVIDIA RTX 4070 Ti",gpuType:"nvidia",vramMb:12288,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3090 (24 GB)",gpu:"NVIDIA RTX 3090",gpuType:"nvidia",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3080 (10 GB)",gpu:"NVIDIA RTX 3080",gpuType:"nvidia",vramMb:10240,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3070 (8 GB)",gpu:"NVIDIA RTX 3070",gpuType:"nvidia",vramMb:8192,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA A100 (80 GB)",gpu:"NVIDIA A100",gpuType:"nvidia",vramMb:81920,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA A100 (40 GB)",gpu:"NVIDIA A100",gpuType:"nvidia",vramMb:40960,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA Tesla T4 (16 GB)",gpu:"NVIDIA Tesla T4",gpuType:"nvidia",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"AMD RX 9070 XT — Vulkan (16 GB)",gpu:"AMD RX 9070 XT",gpuType:"amd",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 — Vulkan (12 GB)",gpu:"AMD RX 9070",gpuType:"amd",vramMb:12288,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX — Vulkan (24 GB)",gpu:"AMD RX 7900 XTX",gpuType:"amd",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT — Vulkan (20 GB)",gpu:"AMD RX 7900 XT",gpuType:"amd",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT — Vulkan (16 GB)",gpu:"AMD RX 7800 XT",gpuType:"amd",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7600 — Vulkan (8 GB)",gpu:"AMD RX 7600",gpuType:"amd",vramMb:8192,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 XT — ROCm (16 GB)",gpu:"AMD RX 9070 XT",gpuType:"amd-rocm",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 9070 — ROCm (12 GB)",gpu:"AMD RX 9070",gpuType:"amd-rocm",vramMb:12288,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX — ROCm (24 GB)",gpu:"AMD RX 7900 XTX",gpuType:"amd-rocm",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT — ROCm (20 GB)",gpu:"AMD RX 7900 XT",gpuType:"amd-rocm",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT — ROCm (16 GB)",gpu:"AMD RX 7800 XT",gpuType:"amd-rocm",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"Apple M4 Max (128 GB unified)",gpu:"Apple M4 Max",gpuType:"apple",vramMb:131072,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Max (64 GB unified)",gpu:"Apple M4 Max",gpuType:"apple",vramMb:65536,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (48 GB unified)",gpu:"Apple M4 Pro",gpuType:"apple",vramMb:49152,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (24 GB unified)",gpu:"Apple M4 Pro",gpuType:"apple",vramMb:24576,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Max (32 GB unified)",gpu:"Apple M2 Max",gpuType:"apple",vramMb:32768,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Pro (16 GB unified)",gpu:"Apple M2 Pro",gpuType:"apple",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (16 GB unified)",gpu:"Apple M1",gpuType:"apple",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (8 GB unified)",gpu:"Apple M1",gpuType:"apple",vramMb:8192,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Other (enter VRAM manually)",gpu:"Other",gpuType:"none",vramMb:null,backends:["gguf"],defaultBackend:"gguf"}];function G4(){const{state:a,dispatch:s}=dr(),[o,i]=S.useState(!a.hardware),[d,f]=S.useState(!1),[m,v]=S.useState(0),[g,p]=S.useState("");S.useEffect(()=>{a.hardware||CE().then(N=>{s({type:"SET_HARDWARE",hardware:N}),N.recommendedBackend==="remote"&&a.deploymentMode==="local"&&s({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"})}).catch(()=>{}).finally(()=>i(!1))},[]);function y(N,R){const j=Zo[N];if(!a.hardware)return;const E=j.gpu==="Other"?(parseInt(R??g,10)||0)*1024:j.vramMb,C={...a.hardware,gpuName:j.gpu,gpuVramMb:E||null,gpuType:j.gpuType,recommendedBackends:[...j.backends],recommendedBackend:j.defaultBackend};s({type:"SET_HARDWARE",hardware:C})}const x=a.hardware;return o?l.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[l.jsx(na,{size:32,className:"animate-spin text-[var(--color-primary)]"}),l.jsx("p",{className:"mt-3 text-sm text-[var(--color-text-muted)]",children:"Detecting hardware..."})]}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Hardware Detection"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"We detected the following hardware. This determines which LLM backend to use."})]}),x&&l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[l.jsx(kn,{size:16}),l.jsx("span",{className:"text-xs font-medium uppercase",children:"Platform"})]}),l.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[x.platform==="darwin"?"macOS":"Linux"," (",x.arch,")"]})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[l.jsx(qd,{size:16}),l.jsx("span",{className:"text-xs font-medium uppercase",children:"Memory"})]}),l.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[x.totalMemoryGb," GB RAM"]})]}),l.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[l.jsx(kn,{size:16}),l.jsx("span",{className:"text-xs font-medium uppercase",children:"GPU"})]}),l.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:x.gpuName??"No GPU detected"}),x.gpuVramMb!=null&&x.gpuVramMb>0&&l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[Math.round(x.gpuVramMb/1024)," GB VRAM"]})]}),l.jsx("button",{type:"button",onClick:()=>f(!d),className:"text-xs font-medium text-[var(--color-primary)] hover:underline",children:d?"Cancel":"Override"})]}),d&&l.jsxs("div",{className:"mt-3 space-y-3 border-t border-[var(--color-border)] pt-3",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"gpu-select",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Select GPU"}),l.jsx("select",{id:"gpu-select",value:m,onChange:N=>{const R=parseInt(N.target.value,10);v(R),Zo[R].gpu!=="Other"&&(y(R),f(!1))},className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]"),children:Zo.map((N,R)=>l.jsx("option",{value:R,children:N.label},`${N.label}-${R}`))})]}),Zo[m].gpu==="Other"&&l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("label",{htmlFor:"custom-vram",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"VRAM (GB)"}),l.jsx("input",{id:"custom-vram",type:"number",min:1,max:512,value:g,onChange:N=>p(N.target.value),placeholder:"e.g. 24",className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),l.jsx("button",{type:"button",disabled:!g||parseInt(g,10)<=0,onClick:()=>{y(m,g),f(!1)},className:ee("rounded-lg px-4 py-2 text-sm font-medium","bg-[var(--color-primary)] text-white","disabled:cursor-not-allowed disabled:opacity-50"),children:"Apply"})]})]})]}),l.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[l.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Recommended: ",l.jsx("span",{className:"text-[var(--color-primary)]",children:x.recommendedBackend.toUpperCase()})]}),x.recommendedBackends.length>1&&l.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["Available backends: ",x.recommendedBackends.join(", ")]})]})]}),a.deploymentMode==="remote-llm"&&l.jsxs("div",{className:"space-y-3",children:[l.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote Service URLs"}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"remote-llm",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"LLM Proxy URL"}),l.jsx("input",{id:"remote-llm",type:"url",value:a.remoteLlmUrl,onChange:N=>s({type:"SET_REMOTE_LLM_URL",url:N.target.value}),placeholder:"http://192.168.1.100:7704",className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"remote-whisper",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Whisper URL (optional)"}),l.jsx("input",{id:"remote-whisper",type:"url",value:a.remoteWhisperUrl,onChange:N=>s({type:"SET_REMOTE_WHISPER_URL",url:N.target.value}),placeholder:"http://192.168.1.100:7706",className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]})]})]})}function Q4(){const{state:a,dispatch:s}=dr(),[o,i]=S.useState(null),[d,f]=S.useState(!0);if(S.useEffect(()=>{Promise.all([yg(),TE()]).then(([p,y])=>{if(i(p),a.enabledModules.length===0&&s({type:"SET_ENABLED_MODULES",modules:y.enabledModules}),a.platform==="darwin"&&a.nativeServices.length===0){const x=p.services.filter(N=>N.nativeCapable).map(N=>N.id);x.length>0&&s({type:"SET_NATIVE_SERVICES",services:x})}}).catch(()=>{}).finally(()=>f(!1))},[]),d||!o)return l.jsx("div",{className:"flex items-center justify-center py-12",children:l.jsx(na,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const{core:m,recommended:v,optional:g}=V4(o.services);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Select Services"}),l.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:["Core services are always included. Toggle recommended and optional services.",a.platform==="darwin"&&l.jsxs(l.Fragment,{children:[" Services marked ",l.jsx("em",{children:"Native"})," can run as macOS LaunchAgents to use the Apple GPU."]})]})]}),l.jsx(Ju,{title:"Core",subtitle:"Always included",services:m,enabled:m.map(p=>p.id),nativeServices:a.nativeServices,platform:a.platform,locked:!0}),l.jsx(Ju,{title:"Recommended",subtitle:"Enabled by default",services:v,enabled:a.enabledModules,nativeServices:a.nativeServices,platform:a.platform,onToggle:(p,y)=>s({type:"TOGGLE_MODULE",serviceId:p,enabled:y}),onToggleNative:(p,y)=>s({type:"TOGGLE_NATIVE_SERVICE",serviceId:p,enabled:y})}),g.length>0&&l.jsx(Ju,{title:"Optional",subtitle:"Off by default",services:g,enabled:a.enabledModules,nativeServices:a.nativeServices,platform:a.platform,onToggle:(p,y)=>s({type:"TOGGLE_MODULE",serviceId:p,enabled:y}),onToggleNative:(p,y)=>s({type:"TOGGLE_NATIVE_SERVICE",serviceId:p,enabled:y})}),l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[l.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Integrations"}),l.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"Cloud services"})]}),l.jsxs("button",{type:"button",onClick:()=>s({type:"SET_RELAY_ENABLED",enabled:!a.relayEnabled}),className:ee("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",a.relayEnabled?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30"),children:[a.relayEnabled?l.jsx(gt,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):l.jsx(ls,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Jarvis Relay"}),l.jsx(WN,{size:12,className:"text-[var(--color-text-muted)]"})]}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Routes OAuth callbacks through a cloud relay for external providers (Google, Spotify, etc.)"})]})]})]})]})}function V4(a){return{core:a.filter(s=>s.category==="core"),recommended:a.filter(s=>s.category==="recommended"),optional:a.filter(s=>s.category==="optional")}}function Ju({title:a,subtitle:s,services:o,enabled:i,nativeServices:d,locked:f,onToggle:m,onToggleNative:v,platform:g}){return l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[l.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:a}),l.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s})]}),l.jsx("div",{className:"space-y-1",children:o.map(p=>{const y=i.includes(p.id),x=p.nativeCapable&&g==="darwin"&&y,N=d.includes(p.id);return l.jsxs("div",{className:ee("rounded-lg border transition-colors",y?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)]",!f&&!y&&"hover:border-[var(--color-primary)]/30"),children:[l.jsxs("button",{type:"button",disabled:f,onClick:()=>m?.(p.id,!y),className:ee("flex w-full items-center gap-3 px-3 py-2.5 text-left",f&&"cursor-default"),children:[f?l.jsx(Hd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}):y?l.jsx(gt,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):l.jsx(ls,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:p.name}),l.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",p.port]}),p.nativeCapable&&g==="darwin"&&l.jsx("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-500",children:"Native"})]}),l.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:p.description})]})]}),x&&l.jsxs("button",{type:"button",onClick:()=>v?.(p.id,!N),className:ee("flex w-full items-center gap-2 border-t border-[var(--color-border)]/50 px-3 py-2 text-left text-xs","hover:bg-[var(--color-surface-alt)] transition-colors"),children:[l.jsx(kn,{size:12,className:N?"text-amber-500":"text-[var(--color-text-muted)]"}),l.jsx("span",{className:N?"text-[var(--color-text)]":"text-[var(--color-text-muted)]",children:"Run natively via LaunchAgent"}),l.jsx("span",{className:"ml-auto text-[var(--color-text-muted)]",children:N?"On (uses Apple GPU)":"Off (runs in Docker)"})]})]},p.id)})})]})}function F4(){const{state:a}=dr(),[s,o]=S.useState(null);if(S.useEffect(()=>{yg().then(o).catch(()=>{})},[]),!s)return l.jsx("div",{className:"flex items-center justify-center py-12",children:l.jsx(na,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const i=s.services.filter(x=>x.category==="core"),d=s.services.filter(x=>x.category!=="core"&&a.enabledModules.includes(x.id)),f=[...i,...d],m=new Map;for(const x of f){const N=a.portOverrides[x.id]??x.port,R=m.get(N)??[];m.set(N,[...R,x.name])}const v=[...m.entries()].filter(([,x])=>x.length>1),g=f.filter(x=>x.database).length,p=f.filter(x=>a.nativeServices.includes(x.id)),y=f.filter(x=>!a.nativeServices.includes(x.id));return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Review Configuration"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Review your selections before installing."})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsx(Pu,{label:"Docker Services",value:y.length}),l.jsx(Pu,{label:"Native Services",value:p.length}),l.jsx(Pu,{label:"Databases",value:g})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[l.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Deployment Mode"}),l.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:a.deploymentMode==="local"?"Local (all services on this machine)":"Remote LLM"}),a.deploymentMode==="remote-llm"&&a.remoteLlmUrl&&l.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["LLM: ",a.remoteLlmUrl]})]}),l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[l.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:l.jsxs("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:["Services (",f.length,")"]})}),l.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:f.map(x=>l.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(gt,{size:14,className:"text-green-500"}),l.jsx("span",{className:"text-sm text-[var(--color-text)]",children:x.name})]}),l.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",a.portOverrides[x.id]??x.port]})]},x.id))})]}),a.relayEnabled&&l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[l.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Jarvis Relay"}),l.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:"Enabled"}),l.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:"https://relay.jarvisautomation.io"})]}),v.length>0&&l.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ra,{size:16,className:"text-amber-500"}),l.jsx("span",{className:"text-sm font-medium text-amber-500",children:"Port Conflicts"})]}),v.map(([x,N])=>l.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Port ",x,": ",N.join(", ")]},x))]})]})}function Pu({label:a,value:s}){return l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-3 text-center",children:[l.jsx("p",{className:"text-2xl font-bold text-[var(--color-primary)]",children:s}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a})]})}function Iu(){const[a,s]=S.useState({lines:[],running:!1,done:!1,exitCode:null,error:null,redirect:null}),o=S.useRef(null),i=S.useCallback((f,m)=>(o.current?.close(),s({lines:[],running:!0,done:!1,exitCode:null,error:null,redirect:null}),new Promise((v,g)=>{const p=new EventSource(f);o.current=p,p.onmessage=y=>{try{const x=JSON.parse(y.data);if(m&&m(x),"done"in x){if(s(N=>({...N,running:!1,done:!0,exitCode:x.code,redirect:x.redirect??null})),p.close(),x.code===0)v(x.code);else{const N=x.error?String(x.error):`Process exited with code ${x.code}`;g(new Error(N))}return}if("stream"in x&&"text"in x){const N={stream:x.stream,text:x.text,timestamp:Date.now()};s(R=>({...R,lines:[...R.lines,N]}))}}catch{}},p.onerror=()=>{const y=o.current===null;s(x=>({...x,running:!1,error:x.done?null:"Connection lost"})),p.close(),y||g(new Error("Connection lost"))}})),[]),d=S.useCallback(()=>{o.current?.close(),o.current=null,s(f=>({...f,running:!1}))},[]);return{...a,run:i,stop:d}}function Wu({lines:a,running:s,title:o,className:i}){const d=S.useRef(null),f=S.useRef(!0);S.useEffect(()=>{const v=d.current;!v||!f.current||(v.scrollTop=v.scrollHeight)},[a]);function m(){const v=d.current;if(!v)return;const g=v.scrollHeight-v.scrollTop-v.clientHeight;f.current=g<50}return l.jsxs("div",{className:ee("flex flex-col rounded-lg border border-[var(--color-border)] overflow-hidden",i),children:[o&&l.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2",children:[l.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:o}),s&&l.jsx("span",{className:"h-2 w-2 animate-pulse rounded-full bg-green-500"})]}),l.jsxs("div",{ref:d,onScroll:m,className:"h-64 overflow-y-auto bg-[#0d1117] p-3 font-mono text-xs leading-5",children:[a.length===0&&!s&&l.jsx("span",{className:"text-gray-500",children:"Waiting for output..."}),a.map((v,g)=>l.jsx("div",{className:ee("whitespace-pre-wrap break-all",v.stream==="stderr"?"text-yellow-400":"text-gray-300"),children:v.text},g)),s&&l.jsx("span",{className:"inline-block h-4 w-1.5 animate-pulse bg-gray-400"})]})]})}function Y4(){const{state:a,dispatch:s}=dr(),o=Iu(),i=Iu(),d=Iu(),[f,m]=S.useState("idle"),[v,g]=S.useState(null),[p,y]=S.useState(null),[x,N]=S.useState({}),[R,j]=S.useState({}),[E,C]=S.useState(null),[k,A]=S.useState(null),[F,H]=S.useState(null),[ne,W]=S.useState({});S.useEffect(()=>{const te=i.redirect;if(f!=="done"||!te)return;A(5);const w=setInterval(()=>{A(Y=>Y===null||Y<=1?(clearInterval(w),window.location.href=te,0):Y-1)},1e3);return()=>clearInterval(w)},[f,i.redirect]);const z=S.useCallback(async()=>{m("preflight"),y(null),g(null);try{const te=await EE(a.enabledModules);return y(te),te.canProceed?!0:(g("Pre-flight checks failed. Fix the issues above and retry."),m("error"),C("preflight"),!1)}catch(te){return g(`Pre-flight check failed: ${te instanceof Error?te.message:String(te)}`),m("error"),C("preflight"),!1}},[a.enabledModules]);async function q(){if(a.nativeServices.length!==0){m("native");for(const te of a.nativeServices){H(te);try{await d.run(`/api/native-services/${te}/install`),W(w=>({...w,[te]:{ok:!0}}))}catch(w){const Y=w instanceof Error?w.message:String(w);W(Z=>({...Z,[te]:{ok:!1,error:Y}}))}}H(null)}}async function ae(){g(null),N({}),C(null),W({}),s({type:"SET_INSTALL_RUNNING",running:!0});try{if(!await z()){s({type:"SET_INSTALL_RUNNING",running:!1});return}m("generating"),await Ux(a),m("pulling"),await o.run("/api/install/pull"),m("starting"),await i.run("/api/install/start",w=>{if(w.phase==="health"&&typeof w.service=="string"&&N(Y=>({...Y,[w.service]:{healthy:w.healthy,error:w.error}})),w.serviceHealth&&typeof w.serviceHealth=="object"){const Y=w.serviceHealth;N(Z=>({...Z,...Y}))}}),await q(),m("done"),s({type:"SET_INSTALL_COMPLETE"})}catch(te){g(te instanceof Error?te.message:String(te)),m("error"),C(f),s({type:"SET_INSTALL_RUNNING",running:!1})}}async function je(){if(E==="preflight"){if(g(null),s({type:"SET_INSTALL_RUNNING",running:!0}),!await z()){s({type:"SET_INSTALL_RUNNING",running:!1});return}try{m("generating"),await Ux(a),m("pulling"),await o.run("/api/install/pull"),m("starting"),await i.run("/api/install/start",w=>{if(w.phase==="health"&&typeof w.service=="string"&&N(Y=>({...Y,[w.service]:{healthy:w.healthy,error:w.error}})),w.serviceHealth&&typeof w.serviceHealth=="object"){const Y=w.serviceHealth;N(Z=>({...Z,...Y}))}}),await q(),m("done"),s({type:"SET_INSTALL_COMPLETE"})}catch(w){g(w instanceof Error?w.message:String(w)),m("error"),s({type:"SET_INSTALL_RUNNING",running:!1})}}else ae()}async function le(te){try{const w=await fetch(`/api/containers/${te}/logs`);if(w.ok){const Y=await w.text();j(Z=>({...Z,[te]:Y}))}else j(Y=>({...Y,[te]:`Failed to fetch logs: HTTP ${w.status}`}))}catch(w){j(Y=>({...Y,[te]:`Failed to fetch logs: ${w instanceof Error?w.message:String(w)}`}))}}const he=[{key:"preflight",label:"Pre-flight checks"},{key:"generating",label:"Generate configuration"},{key:"pulling",label:"Pull Docker images"},{key:"starting",label:"Start services"},...a.nativeServices.length>0?[{key:"native",label:`Install ${a.nativeServices.length} native service${a.nativeServices.length===1?"":"s"}`}]:[]],Te=he.map(te=>te.key).indexOf(f);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Install"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:f==="idle"?"Ready to install. This will pull Docker images and start all services.":f==="done"?i.redirect?`Installation complete! Redirecting to your admin dashboard in ${k??"..."}s...`:"Installation complete! All services are running.":f==="error"?"Installation encountered an error.":"Installing..."})]}),p&&l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[l.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:l.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Pre-flight Checks"})}),l.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:p.checks.map(te=>l.jsx("div",{className:"flex items-center justify-between px-3 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[te.status==="pass"?l.jsx(gt,{size:14,className:"text-green-500"}):te.status==="warn"?l.jsx(ra,{size:14,className:"text-amber-500"}):l.jsx(pl,{size:14,className:"text-red-500"}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm text-[var(--color-text)]",children:te.name}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:te.message}),te.details&&te.status!=="pass"&&l.jsx("p",{className:"text-xs text-[var(--color-text-muted)] opacity-60",children:te.details})]})]})},te.name))})]}),l.jsx("div",{className:"space-y-2",children:he.map((te,w)=>{const Y=te.key===f,Z=Te>w||f==="done",xe=f==="error"&&te.key===E;return l.jsxs("div",{className:"flex items-center gap-3",children:[Z?l.jsx(gt,{size:18,className:"text-green-500"}):xe?l.jsx(pl,{size:18,className:"text-red-500"}):Y?l.jsx(na,{size:18,className:"animate-spin text-[var(--color-primary)]"}):l.jsx("div",{className:"h-[18px] w-[18px] rounded-full border-2 border-[var(--color-border)]"}),l.jsx("span",{className:ee("text-sm",Z?"text-green-500":Y?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:te.label})]},te.key)})}),(f==="starting"||f==="done"||f==="error")&&Object.keys(x).length>0&&l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[l.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:l.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Service Status"})}),l.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:Object.entries(x).map(([te,w])=>l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[l.jsx("span",{className:"text-sm text-[var(--color-text)]",children:te}),l.jsxs("div",{className:"flex items-center gap-2",children:[!w.healthy&&l.jsxs("button",{type:"button",onClick:()=>le(te),className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[l.jsx(eg,{size:12}),"Logs"]}),w.healthy?l.jsx(gt,{size:14,className:"text-green-500"}):l.jsx(pl,{size:14,className:"text-red-500"})]})]}),w.error&&l.jsx("p",{className:"px-3 pb-2 text-xs text-red-400",children:w.error}),R[te]&&l.jsx("div",{className:"mx-3 mb-2 max-h-32 overflow-auto rounded bg-[var(--color-background)] p-2 text-xs font-mono text-[var(--color-text-muted)]",children:l.jsx("pre",{className:"whitespace-pre-wrap",children:R[te]})})]},te))})]}),(o.lines.length>0||o.running)&&l.jsx(Wu,{lines:o.lines,running:o.running,title:"docker compose pull"}),(i.lines.length>0||i.running)&&l.jsx(Wu,{lines:i.lines,running:i.running,title:"docker compose up -d"}),(f==="native"||Object.keys(ne).length>0)&&l.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[l.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:l.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Native Services (LaunchAgents)"})}),l.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:a.nativeServices.map(te=>{const w=ne[te],Y=F===te&&f==="native";return l.jsxs("div",{className:"px-3 py-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-[var(--color-text)]",children:te}),w?.ok?l.jsx(gt,{size:14,className:"text-green-500"}):w?l.jsx(pl,{size:14,className:"text-red-500"}):Y?l.jsx(na,{size:14,className:"animate-spin text-[var(--color-primary)]"}):l.jsx("div",{className:"h-3 w-3 rounded-full border border-[var(--color-border)]"})]}),w?.error&&l.jsx("p",{className:"mt-1 text-xs text-red-400",children:w.error})]},te)})})]}),(d.lines.length>0||d.running)&&l.jsx(Wu,{lines:d.lines,running:d.running,title:F?`deploy-launchd.sh (${F})`:"deploy-launchd.sh"}),v&&l.jsx("div",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:v}),(f==="idle"||f==="error")&&l.jsxs("button",{type:"button",onClick:f==="error"?je:ae,className:ee("flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-3 font-medium text-white","hover:opacity-90 transition-opacity"),children:[f==="error"?l.jsx(vi,{size:18}):l.jsx(tg,{size:18}),f==="error"?"Retry Installation":"Start Installation"]})]})}function X4(){const{state:a,dispatch:s}=dr(),o=gg(),i=Ng(),[d,f]=S.useState("select"),[m,v]=S.useState(null),[g,p]=S.useState("GGUF"),[y,x]=S.useState(""),[N,R]=S.useState(null);if(a.deploymentMode==="remote-llm")return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Your LLM is configured to use a remote server."})]}),l.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[l.jsx(gt,{size:20,className:"text-green-500"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM configured"}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a.remoteLlmUrl})]})]})]});if(a.platform==="darwin")return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"On macOS, the LLM proxy runs natively to access Metal/MLX. Configure it from the dashboard after setup, or run it directly from the jarvis-llm-proxy-api directory."})]}),l.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4 text-sm text-amber-500",children:"macOS native LLM proxy is not yet available as a pip package. Model download through this wizard requires the LLM proxy running in Docker."})]});const j=H=>{v(H),R(null),H.gated&&!y.trim()?f("token"):C(H,y.trim())},E=()=>{if(!y.trim()){R("HuggingFace token is required for gated models");return}m&&C(m,y)},C=async(H,ne)=>{f("downloading"),R(null);const W=g==="GGUF"?H.hfRepoGguf:H.hfRepoVllm,z=g==="GGUF"?H.ggufFilename:void 0;try{await i.mutateAsync({repo:W,filename:z,token:ne||void 0}),await k(H)}catch(q){R(`Download failed: ${q.message}`),f("select")}},k=async H=>{f("configuring");const W={"model.main.name":g==="GGUF"?`.models/${H.ggufFilename}`:`.models/${H.hfRepoVllm.split("/").pop()}`,"model.main.backend":g,"model.main.chat_format":H.chatFormat,"model.main.context_window":H.contextWindow,"llm.interface":H.promptProvider};g==="GGUF"&&(W["inference.gguf.n_gpu_layers"]=-1),g==="VLLM"&&H.quantization&&(W["inference.vllm.quantization"]=H.quantization);try{await o.mutateAsync(W),s({type:"SET_LLM_INTERFACE",interfaceId:H.promptProvider}),f("done")}catch(z){R(`Configuration failed: ${z.message}`),f("select")}},A=a.hardware?.gpuVramMb,F=A?rs.filter(H=>H.vramMb<=A):rs;return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="done"?"Model configured. The LLM proxy is restarting with the new model.":"Select and download a language model for Jarvis."})]}),N&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[l.jsx(ra,{size:16,className:"mt-0.5 shrink-0"}),N]}),m&&l.jsxs("button",{type:"button",onClick:()=>C(m,y),className:ee("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors"),children:[l.jsx(vi,{size:14}),"Retry Download"]})]}),d==="select"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Backend"}),l.jsx("div",{className:"flex gap-2",children:["GGUF","VLLM"].map(H=>l.jsx("button",{type:"button",onClick:()=>p(H),className:ee("rounded-md px-3 py-1 text-xs font-medium transition-colors",g===H?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:H==="VLLM"?"vLLM":H},H))})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"hf-token",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"HuggingFace Token (optional — speeds up downloads, required for gated models)"}),l.jsx("input",{id:"hf-token",type:"password",value:y,onChange:H=>x(H.target.value),placeholder:"hf_...",className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),l.jsxs("div",{className:"space-y-2",children:[F.map(H=>l.jsxs("button",{type:"button",onClick:()=>j(H),className:ee("flex w-full items-center justify-between rounded-lg border border-[var(--color-border)] p-3 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:H.displayName}),H.gated&&l.jsxs("span",{className:"flex items-center gap-0.5 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[l.jsx(Hd,{size:10}),"Gated"]})]}),l.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[H.promptProvider," · ",H.contextWindow.toLocaleString()," ctx"]})]}),l.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["~",g==="GGUF"?H.sizeGguf:H.sizeVllm]})]},H.id)),F.length===0&&l.jsxs("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:["No models fit your available VRAM (",A?Math.round(A/1024)+" GB":"unknown","). Consider using Remote LLM mode."]}),A&&F.length<rs.length&&l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Showing ",F.length," of ",rs.length," models that fit your ",Math.round(A/1024)," GB VRAM."]})]})]}),d==="token"&&m&&l.jsxs("div",{className:"space-y-4",children:[l.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[l.jsx("strong",{children:m.displayName})," is a gated model. Accept the license on HuggingFace and paste your access token below."]}),l.jsx("input",{type:"password",value:y,onChange:H=>x(H.target.value),placeholder:"hf_...",className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("button",{type:"button",onClick:()=>{f("select"),R(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),l.jsx("button",{type:"button",onClick:E,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Download"})]})]}),d==="downloading"&&l.jsxs("div",{className:"flex flex-col items-center py-8",children:[l.jsx(xl,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),l.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Downloading ",m?.displayName,"..."]}),l.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["~",g==="GGUF"?m?.sizeGguf:m?.sizeVllm," · This may take several minutes"]})]}),d==="configuring"&&l.jsxs("div",{className:"flex flex-col items-center py-8",children:[l.jsx(na,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Configuring model and prompt provider..."})]}),d==="done"&&m&&l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[l.jsx(gt,{size:20,className:"text-green-500"}),l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:[m.displayName," configured"]}),l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Backend: ",g," · Prompt provider: ",m.promptProvider]})]})]}),l.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["The LLM proxy is restarting with the new model. It may take a minute to load. Command Center will automatically use the ",l.jsx("strong",{children:m.promptProvider})," prompt provider for optimized command parsing."]})]})]})}function K4(){const[a,s]=S.useState(""),[o,i]=S.useState(""),[d,f]=S.useState(""),[m,v]=S.useState(""),[g,p]=S.useState(!1),[y,x]=S.useState(!1),[N,R]=S.useState(null),j=o===d,E=a&&o&&d&&m&&j&&!g;async function C(){if(E){p(!0),R(null);try{const A=await $v(a,o,m);ns(A.access_token),localStorage.setItem("access_token",A.access_token),localStorage.setItem("refresh_token",A.refresh_token),x(!0)}catch(A){const F=A?.response?.data?.error??(A instanceof Error?A.message:"Failed to create account");R(F)}finally{p(!1)}}}if(y)return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{children:l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Account Created"})}),l.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[l.jsx(gt,{size:20,className:"text-green-500"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Superuser account created"}),l.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a})]})]}),l.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:`You're logged in. Click "Next" to configure your LLM model.`})]});const k=ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]");return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Create Account"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Create your superuser account. This will be the admin for your Jarvis instance."})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"display-name",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Display Name"}),l.jsx("input",{id:"display-name",type:"text",value:m,onChange:A=>v(A.target.value),className:k,placeholder:"Alex"})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),l.jsx("input",{id:"email",type:"email",value:a,onChange:A=>s(A.target.value),className:k,placeholder:"admin@example.com"})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),l.jsx("input",{id:"password",type:"password",value:o,onChange:A=>i(A.target.value),className:k,placeholder:"Choose a strong password"})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),l.jsx("input",{id:"confirm-password",type:"password",value:d,onChange:A=>f(A.target.value),className:ee(k,d&&!j&&"ring-2 ring-red-500"),placeholder:"Confirm password"}),d&&!j&&l.jsx("p",{className:"mt-1 text-xs text-red-500",children:"Passwords don't match"})]})]}),N&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[l.jsx(Ud,{size:14,className:"text-red-500 shrink-0"}),l.jsx("span",{className:"text-sm text-red-500",children:N})]}),l.jsxs("button",{type:"button",onClick:C,disabled:!E,className:ee("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:opacity-50"),children:[l.jsx(vi,{size:14}),"Retry"]})]}),!N&&l.jsx("button",{type:"button",onClick:C,disabled:!E,className:ee("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50 transition-opacity"),children:g?"Creating...":"Create Superuser Account"})]})}const $o=[{label:"Welcome",component:H4},{label:"Hardware",component:G4},{label:"Services",component:Q4},{label:"Review",component:F4},{label:"Install",component:Y4},{label:"Account",component:K4},{label:"LLM",component:X4}],Z4=5;function $4({skipToAccount:a}){const{state:s,dispatch:o}=dr();S.useEffect(()=>{a&&o({type:"SET_STEP",step:Z4})},[a,o]);const i=wa(),d=$o[s.currentStep].component,f=s.currentStep===0,m=s.currentStep===$o.length-1,p=s.currentStep===4&&!s.installComplete,y=s.installRunning||p;function x(){m?i("/login"):o({type:"NEXT_STEP"})}function N(){o({type:"PREV_STEP"})}return l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)] p-4",children:l.jsxs("div",{className:"w-full max-w-2xl",children:[l.jsx("div",{className:"mb-6 flex items-center justify-center gap-1",children:$o.map((R,j)=>l.jsxs("button",{type:"button",onClick:()=>!y&&o({type:"SET_STEP",step:j}),disabled:y,className:ee("flex items-center gap-1",y&&"cursor-not-allowed"),children:[l.jsx("div",{className:ee("flex h-7 w-7 items-center justify-center rounded-full text-xs font-medium transition-colors",j===s.currentStep?"bg-[var(--color-primary)] text-white":j<s.currentStep?"bg-[var(--color-primary)]/20 text-[var(--color-primary)]":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:j+1}),l.jsx("span",{className:ee("hidden text-xs sm:inline",j===s.currentStep?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:R.label}),j<$o.length-1&&l.jsx("div",{className:ee("mx-1 h-px w-4 sm:w-6",j<s.currentStep?"bg-[var(--color-primary)]/30":"bg-[var(--color-border)]")})]},R.label))}),l.jsx("div",{className:"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-6 shadow-lg",children:l.jsx(d,{})}),l.jsxs("div",{className:"mt-4 flex justify-between",children:[l.jsx("button",{type:"button",onClick:N,disabled:f||y,className:ee("rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:invisible"),children:"Back"}),l.jsx("button",{type:"button",onClick:x,disabled:y,className:ee("rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm font-medium text-white","hover:opacity-90 transition-opacity","disabled:opacity-50 disabled:cursor-not-allowed"),children:m?"Finish":"Next"})]})]})})}function J4({skipToAccount:a}){return l.jsx(q4,{children:l.jsx($4,{skipToAccount:a})})}function P4(){const a=wa(),s=gg(),o=wE(),[i,d]=S.useState("select"),[f,m]=S.useState(null),[v,g]=S.useState("GGUF"),[p,y]=S.useState(""),[x,N]=S.useState(null),R=A=>{m(A),A.gated?d("token"):E(A,"")},j=()=>{if(!p.trim()){N("HuggingFace token is required for gated models");return}N(null),f&&E(f,p)},E=async(A,F)=>{d("download"),N(null);const H=v==="GGUF"?A.hfRepoGguf:A.hfRepoVllm,ne=v==="GGUF"?A.ggufFilename:void 0;try{await o.mutateAsync({repo:H,filename:ne,token:F||void 0}),C(A)}catch(W){N(`Download failed: ${W.message}`),d("select")}},C=async A=>{d("configure"),N(null);const H={"model.main.name":v==="GGUF"?`.models/${A.ggufFilename}`:`.models/${A.hfRepoVllm.split("/").pop()}`,"model.main.backend":v,"model.main.chat_format":A.chatFormat,"model.main.context_window":A.contextWindow};v==="GGUF"&&(H["inference.gguf.n_gpu_layers"]=-1),v==="VLLM"&&A.quantization&&(H["inference.vllm.quantization"]=A.quantization);try{await s.mutateAsync(H),d("done"),Ae.success("LLM configured successfully")}catch(ne){N(`Configuration failed: ${ne.message}`),d("select")}},k=()=>{a("/dashboard")};return l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-bg)] p-4",children:l.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:[l.jsxs("div",{className:"mb-8 text-center",children:[l.jsx(hd,{className:"mx-auto mb-3 text-[var(--color-primary)]",size:40}),l.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Configure a local language model for Jarvis"})]}),l.jsx("div",{className:"mb-8 flex items-center justify-center gap-2",children:["select","download","configure","done"].map((A,F)=>{const H=i==="token"?"select":i,ne=["select","download","configure","done"];return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:ee("h-2 w-2 rounded-full",H===A?"bg-[var(--color-primary)]":ne.indexOf(H)>F?"bg-green-500":"bg-[var(--color-border)]")}),F<3&&l.jsx("div",{className:"h-px w-8 bg-[var(--color-border)]"})]},A)})}),x&&l.jsxs("div",{className:"mb-6 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[l.jsx(ra,{size:16,className:"mt-0.5 shrink-0"}),x]}),i==="select"&&l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Select a model"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:()=>g("GGUF"),className:ee("rounded-md px-3 py-1 text-xs font-medium transition-colors",v==="GGUF"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"GGUF"}),l.jsx("button",{onClick:()=>g("VLLM"),className:ee("rounded-md px-3 py-1 text-xs font-medium transition-colors",v==="VLLM"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"vLLM"})]})]}),l.jsx("div",{className:"grid gap-3",children:rs.map(A=>l.jsxs("button",{onClick:()=>R(A),className:ee("flex items-center justify-between rounded-lg border border-[var(--color-border)] p-4 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-medium text-[var(--color-text)]",children:A.displayName}),A.gated&&l.jsxs("span",{className:"flex items-center gap-1 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[l.jsx(Hd,{size:10}),"Gated"]})]}),l.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[A.quantization?`${A.quantization.toUpperCase()} 4-bit`:A.chatFormat," · ",A.contextWindow.toLocaleString()," ctx"]})]}),l.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["~",v==="GGUF"?A.sizeGguf:A.sizeVllm]})]},A.id))}),l.jsx("div",{className:"flex justify-end pt-2",children:l.jsx("button",{onClick:k,className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Skip for now"})})]}),i==="token"&&f&&l.jsxs("div",{className:"space-y-4",children:[l.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Access Required"}),l.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[l.jsx("strong",{children:f.displayName})," is a gated model. You need to:"]}),l.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-sm text-[var(--color-text-muted)]",children:[l.jsx("li",{children:"Visit the model page on huggingface.co and accept the license agreement"}),l.jsx("li",{children:"Create an access token at huggingface.co/settings/tokens"}),l.jsx("li",{children:"Paste your token below"})]}),l.jsx("input",{type:"password",value:p,onChange:A=>y(A.target.value),placeholder:"hf_...",className:ee("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("button",{onClick:()=>{d("select"),N(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),l.jsx("button",{onClick:j,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Continue"})]})]}),i==="download"&&l.jsxs("div",{className:"flex flex-col items-center py-8",children:[l.jsx(xl,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),l.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Downloading model..."}),l.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," ","(~",v==="GGUF"?f?.sizeGguf:f?.sizeVllm,")"]}),l.jsx("p",{className:"mt-4 text-xs text-[var(--color-text-muted)]",children:"This may take several minutes depending on your connection"})]}),i==="configure"&&l.jsxs("div",{className:"flex flex-col items-center py-8",children:[l.jsx(ag,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),l.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Configuring..."}),l.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Writing settings and restarting LLM proxy"})]}),i==="done"&&l.jsxs("div",{className:"flex flex-col items-center py-8",children:[l.jsx(UN,{className:"mb-4 text-green-500",size:40}),l.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"LLM Ready"}),l.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," configured on ",v]}),l.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:"The model service is restarting. It may take a minute to load the model."}),l.jsx("button",{onClick:()=>a("/dashboard"),className:"mt-6 rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm text-white hover:opacity-90",children:"Go to Dashboard"})]}),(o.isPending||s.isPending)&&i!=="download"&&i!=="configure"&&l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:l.jsx(na,{className:"animate-spin text-white",size:32})})]})})}const I4=new Z1;function W4(){const[a,s]=S.useState(!0),[o,i]=S.useState(!1),[d,f]=S.useState(!1);return S.useEffect(()=>{Yd().then(m=>{m.state==="deployed-needs-account"?(f(!0),i(!0)):i(!m.configured)}).catch(()=>{i(!1)}).finally(()=>s(!1))},[]),a?l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:l.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-primary)] border-t-transparent"})}):l.jsxs(F0,{children:[l.jsx(dt,{path:"/setup",element:l.jsx(J4,{skipToAccount:d})}),l.jsx(dt,{path:"/login",element:l.jsx(Vw,{})}),l.jsx(dt,{path:"/llm-setup",element:l.jsx(P4,{})}),l.jsxs(dt,{element:l.jsx(Qw,{}),children:[l.jsx(dt,{path:"/dashboard",element:l.jsx(AE,{})}),l.jsx(dt,{path:"/settings",element:l.jsx(aE,{})}),l.jsx(dt,{path:"/services",element:l.jsx(gE,{})}),l.jsx(dt,{path:"/models",element:l.jsx(h4,{})}),l.jsx(dt,{path:"/quick-sets",element:l.jsx(j4,{})}),l.jsx(dt,{path:"/traces",element:l.jsx(A4,{})}),l.jsx(dt,{path:"/traces/:id",element:l.jsx(O4,{})}),l.jsx(dt,{path:"/update",element:l.jsx(w4,{})}),l.jsx(dt,{path:"/reconcile",element:l.jsx(C4,{})}),l.jsx(dt,{path:"/nodes",element:l.jsx(HE,{})}),l.jsx(dt,{path:"/users",element:l.jsx(JE,{})}),l.jsx(dt,{path:"/native-services",element:l.jsx(o4,{})}),l.jsx(dt,{path:"/",element:o?l.jsx(ni,{to:"/setup",replace:!0}):l.jsx(ni,{to:"/dashboard",replace:!0})}),l.jsx(dt,{path:"*",element:l.jsx(z4,{})})]})]})}function e3(){return l.jsx(D2,{children:l.jsx($1,{client:I4,children:l.jsxs(gN,{children:[l.jsx(h1,{children:l.jsx(W4,{})}),l.jsx(O2,{position:"bottom-right",richColors:!0})]})})})}Vb.createRoot(document.getElementById("root")).render(l.jsx(S.StrictMode,{children:l.jsx(e3,{})}));
|