@alexberardi/jarvis-admin 0.1.25 → 0.1.27

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.
@@ -1,17 +1,17 @@
1
- (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.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 s(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=s(d);fetch(d.href,f)}})();function Cg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ju={exports:{}},rs={};var Np;function v0(){if(Np)return rs;Np=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(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 x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:n,type:i,key:m,ref:d!==void 0?d:null,props:f}}return rs.Fragment=r,rs.jsx=s,rs.jsxs=s,rs}var jp;function y0(){return jp||(jp=1,ju.exports=v0()),ju.exports}var u=y0(),Eu={exports:{}},Se={};var Ep;function b0(){if(Ep)return Se;Ep=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=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"),x=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),N=Symbol.iterator;function M(R){return R===null||typeof R!="object"?null:(R=N&&R[N]||R["@@iterator"],typeof R=="function"?R:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,T={};function z(R,G,Q){this.props=R,this.context=G,this.refs=T,this.updater=Q||w}z.prototype.isReactComponent={},z.prototype.setState=function(R,G){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,G,"setState")},z.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=z.prototype;function V(R,G,Q){this.props=R,this.context=G,this.refs=T,this.updater=Q||w}var L=V.prototype=new _;L.constructor=V,j(L,z.prototype),L.isPureReactComponent=!0;var ne=Array.isArray;function I(){}var ee={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function P(R,G,Q){var J=Q.ref;return{$$typeof:n,type:R,key:G,ref:J!==void 0?J:null,props:Q}}function re(R,G){return P(R.type,G,R.props)}function se(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function he(R){var G={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(Q){return G[Q]})}var Ae=/\/+/g;function De(R,G){return typeof R=="object"&&R!==null&&R.key!=null?he(""+R.key):G.toString(36)}function Be(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(I,I):(R.status="pending",R.then(function(G){R.status==="pending"&&(R.status="fulfilled",R.value=G)},function(G){R.status==="pending"&&(R.status="rejected",R.reason=G)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function O(R,G,Q,J,le){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var de=!1;if(R===null)de=!0;else switch(fe){case"bigint":case"string":case"number":de=!0;break;case"object":switch(R.$$typeof){case n:case r:de=!0;break;case y:return de=R._init,O(de(R._payload),G,Q,J,le)}}if(de)return le=le(R),de=J===""?"."+De(R,0):J,ne(le)?(Q="",de!=null&&(Q=de.replace(Ae,"$&/")+"/"),O(le,G,Q,"",function(W){return W})):le!=null&&(se(le)&&(le=re(le,Q+(le.key==null||R&&R.key===le.key?"":(""+le.key).replace(Ae,"$&/")+"/")+de)),G.push(le)),1;de=0;var be=J===""?".":J+":";if(ne(R))for(var B=0;B<R.length;B++)J=R[B],fe=be+De(J,B),de+=O(J,G,Q,fe,le);else if(B=M(R),typeof B=="function")for(R=B.call(R),B=0;!(J=R.next()).done;)J=J.value,fe=be+De(J,B++),de+=O(J,G,Q,fe,le);else if(fe==="object"){if(typeof R.then=="function")return O(Be(R),G,Q,J,le);throw G=String(R),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return de}function Z(R,G,Q){if(R==null)return R;var J=[],le=0;return O(R,J,"","",function(fe){return G.call(Q,fe,le++)}),J}function X(R){if(R._status===-1){var G=R._result;G=G(),G.then(function(Q){(R._status===0||R._status===-1)&&(R._status=1,R._result=Q)},function(Q){(R._status===0||R._status===-1)&&(R._status=2,R._result=Q)}),R._status===-1&&(R._status=0,R._result=G)}if(R._status===1)return R._result.default;throw R._result}var xe=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},ge={map:Z,forEach:function(R,G,Q){Z(R,function(){G.apply(this,arguments)},Q)},count:function(R){var G=0;return Z(R,function(){G++}),G},toArray:function(R){return Z(R,function(G){return G})||[]},only:function(R){if(!se(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Se.Activity=p,Se.Children=ge,Se.Component=z,Se.Fragment=s,Se.Profiler=d,Se.PureComponent=V,Se.StrictMode=i,Se.Suspense=v,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee,Se.__COMPILER_RUNTIME={__proto__:null,c:function(R){return ee.H.useMemoCache(R)}},Se.cache=function(R){return function(){return R.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(R,G,Q){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var J=j({},R.props),le=R.key;if(G!=null)for(fe in G.key!==void 0&&(le=""+G.key),G)!$.call(G,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&G.ref===void 0||(J[fe]=G[fe]);var fe=arguments.length-2;if(fe===1)J.children=Q;else if(1<fe){for(var de=Array(fe),be=0;be<fe;be++)de[be]=arguments[be+2];J.children=de}return P(R.type,le,J)},Se.createContext=function(R){return R={$$typeof:m,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:f,_context:R},R},Se.createElement=function(R,G,Q){var J,le={},fe=null;if(G!=null)for(J in G.key!==void 0&&(fe=""+G.key),G)$.call(G,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(le[J]=G[J]);var de=arguments.length-2;if(de===1)le.children=Q;else if(1<de){for(var be=Array(de),B=0;B<de;B++)be[B]=arguments[B+2];le.children=be}if(R&&R.defaultProps)for(J in de=R.defaultProps,de)le[J]===void 0&&(le[J]=de[J]);return P(R,fe,le)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(R){return{$$typeof:x,render:R}},Se.isValidElement=se,Se.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:X}},Se.memo=function(R,G){return{$$typeof:g,type:R,compare:G===void 0?null:G}},Se.startTransition=function(R){var G=ee.T,Q={};ee.T=Q;try{var J=R(),le=ee.S;le!==null&&le(Q,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(I,xe)}catch(fe){xe(fe)}finally{G!==null&&Q.types!==null&&(G.types=Q.types),ee.T=G}},Se.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()},Se.use=function(R){return ee.H.use(R)},Se.useActionState=function(R,G,Q){return ee.H.useActionState(R,G,Q)},Se.useCallback=function(R,G){return ee.H.useCallback(R,G)},Se.useContext=function(R){return ee.H.useContext(R)},Se.useDebugValue=function(){},Se.useDeferredValue=function(R,G){return ee.H.useDeferredValue(R,G)},Se.useEffect=function(R,G){return ee.H.useEffect(R,G)},Se.useEffectEvent=function(R){return ee.H.useEffectEvent(R)},Se.useId=function(){return ee.H.useId()},Se.useImperativeHandle=function(R,G,Q){return ee.H.useImperativeHandle(R,G,Q)},Se.useInsertionEffect=function(R,G){return ee.H.useInsertionEffect(R,G)},Se.useLayoutEffect=function(R,G){return ee.H.useLayoutEffect(R,G)},Se.useMemo=function(R,G){return ee.H.useMemo(R,G)},Se.useOptimistic=function(R,G){return ee.H.useOptimistic(R,G)},Se.useReducer=function(R,G,Q){return ee.H.useReducer(R,G,Q)},Se.useRef=function(R){return ee.H.useRef(R)},Se.useState=function(R){return ee.H.useState(R)},Se.useSyncExternalStore=function(R,G,Q){return ee.H.useSyncExternalStore(R,G,Q)},Se.useTransition=function(){return ee.H.useTransition()},Se.version="19.2.4",Se}var Rp;function rd(){return Rp||(Rp=1,Eu.exports=b0()),Eu.exports}var S=rd();const te=Cg(S);var Ru={exports:{}},ss={},Tu={exports:{}},Cu={};var Tp;function S0(){return Tp||(Tp=1,(function(n){function r(O,Z){var X=O.length;O.push(Z);e:for(;0<X;){var xe=X-1>>>1,ge=O[xe];if(0<d(ge,Z))O[xe]=Z,O[X]=ge,X=xe;else break e}}function s(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var Z=O[0],X=O.pop();if(X!==Z){O[0]=X;e:for(var xe=0,ge=O.length,R=ge>>>1;xe<R;){var G=2*(xe+1)-1,Q=O[G],J=G+1,le=O[J];if(0>d(Q,X))J<ge&&0>d(le,Q)?(O[xe]=le,O[J]=X,xe=J):(O[xe]=Q,O[G]=X,xe=G);else if(J<ge&&0>d(le,X))O[xe]=le,O[J]=X,xe=J;else break e}}return Z}function d(O,Z){var X=O.sortIndex-Z.sortIndex;return X!==0?X:O.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,x=m.now();n.unstable_now=function(){return m.now()-x}}var v=[],g=[],y=1,p=null,N=3,M=!1,w=!1,j=!1,T=!1,z=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function L(O){for(var Z=s(g);Z!==null;){if(Z.callback===null)i(g);else if(Z.startTime<=O)i(g),Z.sortIndex=Z.expirationTime,r(v,Z);else break;Z=s(g)}}function ne(O){if(j=!1,L(O),!w)if(s(v)!==null)w=!0,I||(I=!0,he());else{var Z=s(g);Z!==null&&Be(ne,Z.startTime-O)}}var I=!1,ee=-1,$=5,P=-1;function re(){return T?!0:!(n.unstable_now()-P<$)}function se(){if(T=!1,I){var O=n.unstable_now();P=O;var Z=!0;try{e:{w=!1,j&&(j=!1,_(ee),ee=-1),M=!0;var X=N;try{t:{for(L(O),p=s(v);p!==null&&!(p.expirationTime>O&&re());){var xe=p.callback;if(typeof xe=="function"){p.callback=null,N=p.priorityLevel;var ge=xe(p.expirationTime<=O);if(O=n.unstable_now(),typeof ge=="function"){p.callback=ge,L(O),Z=!0;break t}p===s(v)&&i(v),L(O)}else i(v);p=s(v)}if(p!==null)Z=!0;else{var R=s(g);R!==null&&Be(ne,R.startTime-O),Z=!1}}break e}finally{p=null,N=X,M=!1}Z=void 0}}finally{Z?he():I=!1}}}var he;if(typeof V=="function")he=function(){V(se)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,De=Ae.port2;Ae.port1.onmessage=se,he=function(){De.postMessage(null)}}else he=function(){z(se,0)};function Be(O,Z){ee=z(function(){O(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return N},n.unstable_next=function(O){switch(N){case 1:case 2:case 3:var Z=3;break;default:Z=N}var X=N;N=Z;try{return O()}finally{N=X}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(O,Z){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var X=N;N=O;try{return Z()}finally{N=X}},n.unstable_scheduleCallback=function(O,Z,X){var xe=n.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?xe+X:xe):X=xe,O){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=X+ge,O={id:y++,callback:Z,priorityLevel:O,startTime:X,expirationTime:ge,sortIndex:-1},X>xe?(O.sortIndex=X,r(g,O),s(v)===null&&O===s(g)&&(j?(_(ee),ee=-1):j=!0,Be(ne,X-xe))):(O.sortIndex=ge,r(v,O),w||M||(w=!0,I||(I=!0,he()))),O},n.unstable_shouldYield=re,n.unstable_wrapCallback=function(O){var Z=N;return function(){var X=N;N=Z;try{return O.apply(this,arguments)}finally{N=X}}}})(Cu)),Cu}var Cp;function w0(){return Cp||(Cp=1,Tu.exports=S0()),Tu.exports}var _u={exports:{}},wt={};var _p;function N0(){if(_p)return wt;_p=1;var n=rd();function r(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(v,g,y){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:p==null?null:""+p,children:v,containerInfo:g,implementation:y}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,wt.createPortal=function(v,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return f(v,g,null,y)},wt.flushSync=function(v){var g=m.T,y=i.p;try{if(m.T=null,i.p=2,v)return v()}finally{m.T=g,i.p=y,i.d.f()}},wt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(v,g))},wt.prefetchDNS=function(v){typeof v=="string"&&i.d.D(v)},wt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var y=g.as,p=x(y,g.crossOrigin),N=typeof g.integrity=="string"?g.integrity:void 0,M=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?i.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:N,fetchPriority:M}):y==="script"&&i.d.X(v,{crossOrigin:p,integrity:N,fetchPriority:M,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},wt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=x(g.as,g.crossOrigin);i.d.M(v,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(v)},wt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,p=x(y,g.crossOrigin);i.d.L(v,y,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},wt.preloadModule=function(v,g){if(typeof v=="string")if(g){var y=x(g.as,g.crossOrigin);i.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(v)},wt.requestFormReset=function(v){i.d.r(v)},wt.unstable_batchedUpdates=function(v,g){return v(g)},wt.useFormState=function(v,g,y){return m.H.useFormState(v,g,y)},wt.useFormStatus=function(){return m.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var Mp;function _g(){if(Mp)return _u.exports;Mp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),_u.exports=N0(),_u.exports}var Ap;function j0(){if(Ap)return ss;Ap=1;var n=w0(),r=rd(),s=_g();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a: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 x(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 v(e){if(f(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var c=o.alternate;if(c===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===a)return v(o),e;if(c===l)return v(o),t;c=c.sibling}throw Error(i(188))}if(a.return!==l.return)a=o,l=c;else{for(var h=!1,b=o.child;b;){if(b===a){h=!0,a=o,l=c;break}if(b===l){h=!0,l=o,a=c;break}b=b.sibling}if(!h){for(b=c.child;b;){if(b===a){h=!0,a=c,l=o;break}if(b===l){h=!0,l=c,a=o;break}b=b.sibling}if(!h)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?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 p=Object.assign,N=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),V=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var Ae=Symbol.for("react.client.reference");function De(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case z:return"Profiler";case T:return"StrictMode";case ne:return"Suspense";case I:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case V:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case L:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:De(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return De(e(t))}catch{}}return null}var Be=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},xe=[],ge=-1;function R(e){return{current:e}}function G(e){0>ge||(e.current=xe[ge],xe[ge]=null,ge--)}function Q(e,t){ge++,xe[ge]=e.current,e.current=t}var J=R(null),le=R(null),fe=R(null),de=R(null);function be(e,t){switch(Q(fe,t),Q(le,e),Q(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xh(t),e=Kh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(J),Q(J,e)}function B(){G(J),G(le),G(fe)}function W(e){e.memoizedState!==null&&Q(de,e);var t=J.current,a=Kh(t,e.type);t!==a&&(Q(le,e),Q(J,a))}function Ee(e){le.current===e&&(G(J),G(le)),de.current===e&&(G(de),ts._currentValue=X)}var Te,da;function ot(e){if(Te===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||"",da=-1<a.stack.indexOf(`
1
+ (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.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 s(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=s(d);fetch(d.href,f)}})();function Cg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ju={exports:{}},rs={};var Np;function v0(){if(Np)return rs;Np=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(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 x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:n,type:i,key:m,ref:d!==void 0?d:null,props:f}}return rs.Fragment=r,rs.jsx=s,rs.jsxs=s,rs}var jp;function y0(){return jp||(jp=1,ju.exports=v0()),ju.exports}var u=y0(),Eu={exports:{}},Se={};var Ep;function b0(){if(Ep)return Se;Ep=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=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"),x=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),N=Symbol.iterator;function M(T){return T===null||typeof T!="object"?null:(T=N&&T[N]||T["@@iterator"],typeof T=="function"?T:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,R={};function z(T,G,Q){this.props=T,this.context=G,this.refs=R,this.updater=Q||w}z.prototype.isReactComponent={},z.prototype.setState=function(T,G){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,G,"setState")},z.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function _(){}_.prototype=z.prototype;function V(T,G,Q){this.props=T,this.context=G,this.refs=R,this.updater=Q||w}var L=V.prototype=new _;L.constructor=V,j(L,z.prototype),L.isPureReactComponent=!0;var ne=Array.isArray;function I(){}var ee={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function P(T,G,Q){var J=Q.ref;return{$$typeof:n,type:T,key:G,ref:J!==void 0?J:null,props:Q}}function re(T,G){return P(T.type,G,T.props)}function se(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function he(T){var G={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(Q){return G[Q]})}var Ae=/\/+/g;function De(T,G){return typeof T=="object"&&T!==null&&T.key!=null?he(""+T.key):G.toString(36)}function Be(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(I,I):(T.status="pending",T.then(function(G){T.status==="pending"&&(T.status="fulfilled",T.value=G)},function(G){T.status==="pending"&&(T.status="rejected",T.reason=G)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function O(T,G,Q,J,le){var fe=typeof T;(fe==="undefined"||fe==="boolean")&&(T=null);var de=!1;if(T===null)de=!0;else switch(fe){case"bigint":case"string":case"number":de=!0;break;case"object":switch(T.$$typeof){case n:case r:de=!0;break;case y:return de=T._init,O(de(T._payload),G,Q,J,le)}}if(de)return le=le(T),de=J===""?"."+De(T,0):J,ne(le)?(Q="",de!=null&&(Q=de.replace(Ae,"$&/")+"/"),O(le,G,Q,"",function(W){return W})):le!=null&&(se(le)&&(le=re(le,Q+(le.key==null||T&&T.key===le.key?"":(""+le.key).replace(Ae,"$&/")+"/")+de)),G.push(le)),1;de=0;var be=J===""?".":J+":";if(ne(T))for(var B=0;B<T.length;B++)J=T[B],fe=be+De(J,B),de+=O(J,G,Q,fe,le);else if(B=M(T),typeof B=="function")for(T=B.call(T),B=0;!(J=T.next()).done;)J=J.value,fe=be+De(J,B++),de+=O(J,G,Q,fe,le);else if(fe==="object"){if(typeof T.then=="function")return O(Be(T),G,Q,J,le);throw G=String(T),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return de}function Z(T,G,Q){if(T==null)return T;var J=[],le=0;return O(T,J,"","",function(fe){return G.call(Q,fe,le++)}),J}function F(T){if(T._status===-1){var G=T._result;G=G(),G.then(function(Q){(T._status===0||T._status===-1)&&(T._status=1,T._result=Q)},function(Q){(T._status===0||T._status===-1)&&(T._status=2,T._result=Q)}),T._status===-1&&(T._status=0,T._result=G)}if(T._status===1)return T._result.default;throw T._result}var xe=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ge={map:Z,forEach:function(T,G,Q){Z(T,function(){G.apply(this,arguments)},Q)},count:function(T){var G=0;return Z(T,function(){G++}),G},toArray:function(T){return Z(T,function(G){return G})||[]},only:function(T){if(!se(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Se.Activity=p,Se.Children=ge,Se.Component=z,Se.Fragment=s,Se.Profiler=d,Se.PureComponent=V,Se.StrictMode=i,Se.Suspense=v,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee,Se.__COMPILER_RUNTIME={__proto__:null,c:function(T){return ee.H.useMemoCache(T)}},Se.cache=function(T){return function(){return T.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(T,G,Q){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var J=j({},T.props),le=T.key;if(G!=null)for(fe in G.key!==void 0&&(le=""+G.key),G)!$.call(G,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&G.ref===void 0||(J[fe]=G[fe]);var fe=arguments.length-2;if(fe===1)J.children=Q;else if(1<fe){for(var de=Array(fe),be=0;be<fe;be++)de[be]=arguments[be+2];J.children=de}return P(T.type,le,J)},Se.createContext=function(T){return T={$$typeof:m,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},Se.createElement=function(T,G,Q){var J,le={},fe=null;if(G!=null)for(J in G.key!==void 0&&(fe=""+G.key),G)$.call(G,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(le[J]=G[J]);var de=arguments.length-2;if(de===1)le.children=Q;else if(1<de){for(var be=Array(de),B=0;B<de;B++)be[B]=arguments[B+2];le.children=be}if(T&&T.defaultProps)for(J in de=T.defaultProps,de)le[J]===void 0&&(le[J]=de[J]);return P(T,fe,le)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(T){return{$$typeof:x,render:T}},Se.isValidElement=se,Se.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:F}},Se.memo=function(T,G){return{$$typeof:g,type:T,compare:G===void 0?null:G}},Se.startTransition=function(T){var G=ee.T,Q={};ee.T=Q;try{var J=T(),le=ee.S;le!==null&&le(Q,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(I,xe)}catch(fe){xe(fe)}finally{G!==null&&Q.types!==null&&(G.types=Q.types),ee.T=G}},Se.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()},Se.use=function(T){return ee.H.use(T)},Se.useActionState=function(T,G,Q){return ee.H.useActionState(T,G,Q)},Se.useCallback=function(T,G){return ee.H.useCallback(T,G)},Se.useContext=function(T){return ee.H.useContext(T)},Se.useDebugValue=function(){},Se.useDeferredValue=function(T,G){return ee.H.useDeferredValue(T,G)},Se.useEffect=function(T,G){return ee.H.useEffect(T,G)},Se.useEffectEvent=function(T){return ee.H.useEffectEvent(T)},Se.useId=function(){return ee.H.useId()},Se.useImperativeHandle=function(T,G,Q){return ee.H.useImperativeHandle(T,G,Q)},Se.useInsertionEffect=function(T,G){return ee.H.useInsertionEffect(T,G)},Se.useLayoutEffect=function(T,G){return ee.H.useLayoutEffect(T,G)},Se.useMemo=function(T,G){return ee.H.useMemo(T,G)},Se.useOptimistic=function(T,G){return ee.H.useOptimistic(T,G)},Se.useReducer=function(T,G,Q){return ee.H.useReducer(T,G,Q)},Se.useRef=function(T){return ee.H.useRef(T)},Se.useState=function(T){return ee.H.useState(T)},Se.useSyncExternalStore=function(T,G,Q){return ee.H.useSyncExternalStore(T,G,Q)},Se.useTransition=function(){return ee.H.useTransition()},Se.version="19.2.4",Se}var Tp;function rd(){return Tp||(Tp=1,Eu.exports=b0()),Eu.exports}var S=rd();const te=Cg(S);var Tu={exports:{}},ss={},Ru={exports:{}},Cu={};var Rp;function S0(){return Rp||(Rp=1,(function(n){function r(O,Z){var F=O.length;O.push(Z);e:for(;0<F;){var xe=F-1>>>1,ge=O[xe];if(0<d(ge,Z))O[xe]=Z,O[F]=ge,F=xe;else break e}}function s(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var Z=O[0],F=O.pop();if(F!==Z){O[0]=F;e:for(var xe=0,ge=O.length,T=ge>>>1;xe<T;){var G=2*(xe+1)-1,Q=O[G],J=G+1,le=O[J];if(0>d(Q,F))J<ge&&0>d(le,Q)?(O[xe]=le,O[J]=F,xe=J):(O[xe]=Q,O[G]=F,xe=G);else if(J<ge&&0>d(le,F))O[xe]=le,O[J]=F,xe=J;else break e}}return Z}function d(O,Z){var F=O.sortIndex-Z.sortIndex;return F!==0?F:O.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,x=m.now();n.unstable_now=function(){return m.now()-x}}var v=[],g=[],y=1,p=null,N=3,M=!1,w=!1,j=!1,R=!1,z=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function L(O){for(var Z=s(g);Z!==null;){if(Z.callback===null)i(g);else if(Z.startTime<=O)i(g),Z.sortIndex=Z.expirationTime,r(v,Z);else break;Z=s(g)}}function ne(O){if(j=!1,L(O),!w)if(s(v)!==null)w=!0,I||(I=!0,he());else{var Z=s(g);Z!==null&&Be(ne,Z.startTime-O)}}var I=!1,ee=-1,$=5,P=-1;function re(){return R?!0:!(n.unstable_now()-P<$)}function se(){if(R=!1,I){var O=n.unstable_now();P=O;var Z=!0;try{e:{w=!1,j&&(j=!1,_(ee),ee=-1),M=!0;var F=N;try{t:{for(L(O),p=s(v);p!==null&&!(p.expirationTime>O&&re());){var xe=p.callback;if(typeof xe=="function"){p.callback=null,N=p.priorityLevel;var ge=xe(p.expirationTime<=O);if(O=n.unstable_now(),typeof ge=="function"){p.callback=ge,L(O),Z=!0;break t}p===s(v)&&i(v),L(O)}else i(v);p=s(v)}if(p!==null)Z=!0;else{var T=s(g);T!==null&&Be(ne,T.startTime-O),Z=!1}}break e}finally{p=null,N=F,M=!1}Z=void 0}}finally{Z?he():I=!1}}}var he;if(typeof V=="function")he=function(){V(se)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,De=Ae.port2;Ae.port1.onmessage=se,he=function(){De.postMessage(null)}}else he=function(){z(se,0)};function Be(O,Z){ee=z(function(){O(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return N},n.unstable_next=function(O){switch(N){case 1:case 2:case 3:var Z=3;break;default:Z=N}var F=N;N=Z;try{return O()}finally{N=F}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(O,Z){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var F=N;N=O;try{return Z()}finally{N=F}},n.unstable_scheduleCallback=function(O,Z,F){var xe=n.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?xe+F:xe):F=xe,O){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=F+ge,O={id:y++,callback:Z,priorityLevel:O,startTime:F,expirationTime:ge,sortIndex:-1},F>xe?(O.sortIndex=F,r(g,O),s(v)===null&&O===s(g)&&(j?(_(ee),ee=-1):j=!0,Be(ne,F-xe))):(O.sortIndex=ge,r(v,O),w||M||(w=!0,I||(I=!0,he()))),O},n.unstable_shouldYield=re,n.unstable_wrapCallback=function(O){var Z=N;return function(){var F=N;N=Z;try{return O.apply(this,arguments)}finally{N=F}}}})(Cu)),Cu}var Cp;function w0(){return Cp||(Cp=1,Ru.exports=S0()),Ru.exports}var _u={exports:{}},wt={};var _p;function N0(){if(_p)return wt;_p=1;var n=rd();function r(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(v,g,y){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:p==null?null:""+p,children:v,containerInfo:g,implementation:y}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,wt.createPortal=function(v,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return f(v,g,null,y)},wt.flushSync=function(v){var g=m.T,y=i.p;try{if(m.T=null,i.p=2,v)return v()}finally{m.T=g,i.p=y,i.d.f()}},wt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(v,g))},wt.prefetchDNS=function(v){typeof v=="string"&&i.d.D(v)},wt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var y=g.as,p=x(y,g.crossOrigin),N=typeof g.integrity=="string"?g.integrity:void 0,M=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?i.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:N,fetchPriority:M}):y==="script"&&i.d.X(v,{crossOrigin:p,integrity:N,fetchPriority:M,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},wt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=x(g.as,g.crossOrigin);i.d.M(v,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(v)},wt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,p=x(y,g.crossOrigin);i.d.L(v,y,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},wt.preloadModule=function(v,g){if(typeof v=="string")if(g){var y=x(g.as,g.crossOrigin);i.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(v)},wt.requestFormReset=function(v){i.d.r(v)},wt.unstable_batchedUpdates=function(v,g){return v(g)},wt.useFormState=function(v,g,y){return m.H.useFormState(v,g,y)},wt.useFormStatus=function(){return m.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var Mp;function _g(){if(Mp)return _u.exports;Mp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),_u.exports=N0(),_u.exports}var Ap;function j0(){if(Ap)return ss;Ap=1;var n=w0(),r=rd(),s=_g();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a: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 x(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 v(e){if(f(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var c=o.alternate;if(c===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===a)return v(o),e;if(c===l)return v(o),t;c=c.sibling}throw Error(i(188))}if(a.return!==l.return)a=o,l=c;else{for(var h=!1,b=o.child;b;){if(b===a){h=!0,a=o,l=c;break}if(b===l){h=!0,l=o,a=c;break}b=b.sibling}if(!h){for(b=c.child;b;){if(b===a){h=!0,a=c,l=o;break}if(b===l){h=!0,l=c,a=o;break}b=b.sibling}if(!h)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?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 p=Object.assign,N=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),V=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var Ae=Symbol.for("react.client.reference");function De(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case z:return"Profiler";case R:return"StrictMode";case ne:return"Suspense";case I:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case V:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case L:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:De(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return De(e(t))}catch{}}return null}var Be=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},xe=[],ge=-1;function T(e){return{current:e}}function G(e){0>ge||(e.current=xe[ge],xe[ge]=null,ge--)}function Q(e,t){ge++,xe[ge]=e.current,e.current=t}var J=T(null),le=T(null),fe=T(null),de=T(null);function be(e,t){switch(Q(fe,t),Q(le,e),Q(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Fh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Fh(t),e=Kh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(J),Q(J,e)}function B(){G(J),G(le),G(fe)}function W(e){e.memoizedState!==null&&Q(de,e);var t=J.current,a=Kh(t,e.type);t!==a&&(Q(le,e),Q(J,a))}function Ee(e){le.current===e&&(G(J),G(le)),de.current===e&&(G(de),ts._currentValue=F)}var Re,da;function ot(e){if(Re===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Re=t&&t[1]||"",da=-1<a.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Te+e+da}var zn=!1;function dl(e,t){if(!e||zn)return"";zn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(H){var U=H}Reflect.construct(e,[],K)}else{try{K.call()}catch(H){U=H}e.call(K.prototype)}}else{try{throw Error()}catch(H){U=H}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(H){if(H&&U&&typeof H.stack=="string")return[H.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),h=c[0],b=c[1];if(h&&b){var E=h.split(`
3
+ `+Re+e+da}var zn=!1;function dl(e,t){if(!e||zn)return"";zn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(H){var U=H}Reflect.construct(e,[],K)}else{try{K.call()}catch(H){U=H}e.call(K.prototype)}}else{try{throw Error()}catch(H){U=H}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(H){if(H&&U&&typeof H.stack=="string")return[H.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),h=c[0],b=c[1];if(h&&b){var E=h.split(`
4
4
  `),D=b.split(`
5
5
  `);for(o=l=0;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;for(;o<D.length&&!D[o].includes("DetermineComponentFrameRoot");)o++;if(l===E.length||o===D.length)for(l=E.length-1,o=D.length-1;1<=l&&0<=o&&E[l]!==D[o];)o--;for(;1<=l&&0<=o;l--,o--)if(E[l]!==D[o]){if(l!==1||o!==1)do if(l--,o--,0>o||E[l]!==D[o]){var Y=`
6
6
  `+E[l].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=l&&0<=o);break}}}finally{zn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ot(a):""}function kn(e,t){switch(e.tag){case 26:case 27:case 5:return ot(e.type);case 16:return ot("Lazy");case 13:return e.child!==t&&t!==null?ot("Suspense Fallback"):ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return dl(e.type,!1);case 11:return dl(e.type.render,!1);case 1:return dl(e.type,!0);case 31:return ot("Activity");default:return""}}function dr(e){try{var t="",a=null;do t+=kn(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
7
  Error generating stack: `+l.message+`
8
- `+l.stack}}var Qt=Object.prototype.hasOwnProperty,fr=n.unstable_scheduleCallback,mr=n.unstable_cancelCallback,jt=n.unstable_shouldYield,tn=n.unstable_requestPaint,Et=n.unstable_now,fo=n.unstable_getCurrentPriorityLevel,Dn=n.unstable_ImmediatePriority,ws=n.unstable_UserBlockingPriority,Un=n.unstable_NormalPriority,hr=n.unstable_LowPriority,za=n.unstable_IdlePriority,Ns=n.log,an=n.unstable_setDisableYieldValue,Ln=null,Rt=null;function fa(e){if(typeof Ns=="function"&&an(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(Ln,e)}catch{}}var bt=Math.clz32?Math.clz32:wa,mo=Math.log,pr=Math.LN2;function wa(e){return e>>>=0,e===0?32:31-(mo(e)/pr|0)|0}var fl=256,ml=262144,Bn=4194304;function Na(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 ye(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,c=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?o=Na(l):(h&=b,h!==0?o=Na(h):a||(a=b&~e,a!==0&&(o=Na(a))))):(b=l&~c,b!==0?o=Na(b):h!==0?o=Na(h):a||(a=l&~e,a!==0&&(o=Na(a)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:o}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(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 St(){var e=Bn;return Bn<<=1,(Bn&62914560)===0&&(Bn=4194304),e}function nn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ie(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(e,t,a,l,o,c){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,E=e.expirationTimes,D=e.hiddenUpdates;for(a=h&~a;0<a;){var Y=31-bt(a),K=1<<Y;b[Y]=0,E[Y]=-1;var U=D[Y];if(U!==null)for(D[Y]=null,Y=0;Y<U.length;Y++){var H=U[Y];H!==null&&(H.lane&=-536870913)}a&=~K}l!==0&&Hn(e,l,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(h&~t))}function Hn(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-bt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Mt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-bt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function At(e,t){var a=t&-t;return a=(a&42)!==0?1:hl(a),(a&(e.suspendedLanes|t))!==0?0:a}function hl(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 ma(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ho(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:gp(e.type))}function Ad(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var ln=Math.random().toString(36).slice(2),pt="__reactFiber$"+ln,Ot="__reactProps$"+ln,pl="__reactContainer$"+ln,po="__reactEvents$"+ln,iv="__reactListeners$"+ln,ov="__reactHandles$"+ln,Od="__reactResources$"+ln,gr="__reactMarker$"+ln;function go(e){delete e[pt],delete e[Ot],delete e[po],delete e[iv],delete e[ov]}function gl(e){var t=e[pt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pl]||a[pt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=ep(e);e!==null;){if(a=e[pt])return a;e=ep(e)}return t}e=a,a=e.parentNode}return null}function xl(e){if(e=e[pt]||e[pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vl(e){var t=e[Od];return t||(t=e[Od]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[gr]=!0}var zd=new Set,kd={};function qn(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(kd[e]=t,e=0;e<t.length;e++)zd.add(t[e])}var cv=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]*$"),Dd={},Ud={};function uv(e){return Qt.call(Ud,e)?!0:Qt.call(Dd,e)?!1:cv.test(e)?Ud[e]=!0:(Dd[e]=!0,!1)}function js(e,t,a){if(uv(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Es(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ka(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function It(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ld(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dv(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){a=""+h,c.call(this,h)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xo(e){if(!e._valueTracker){var t=Ld(e)?"checked":"value";e._valueTracker=dv(e,t,""+e[t])}}function Bd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Ld(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Rs(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 fv=/[\n"\\]/g;function Wt(e){return e.replace(fv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vo(e,t,a,l,o,c,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=""+It(t)):e.value!==""+It(t)&&(e.value=""+It(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?yo(e,h,It(t)):a!=null?yo(e,h,It(a)):l!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+It(b):e.removeAttribute("name")}function Hd(e,t,a,l,o,c,h,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){xo(e);return}a=a!=null?""+It(a):"",t=t!=null?""+It(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),xo(e)}function yo(e,t,a){t==="number"&&Rs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function bl(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+It(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function qd(e,t,a){if(t!=null&&(t=""+It(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+It(a):""}function Gd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(i(92));if(Be(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=It(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),xo(e)}function Sl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var mv=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 Qd(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||mv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Vd(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Qd(e,o,l)}else for(var c in t)t.hasOwnProperty(c)&&Qd(e,c,t[c])}function bo(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 hv=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"]]),pv=/^[\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 Ts(e){return pv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var So=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wl=null,Nl=null;function Yd(e){var t=xl(e);if(t&&(e=t.stateNode)){var a=e[Ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(vo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Ot]||null;if(!o)throw Error(i(90));vo(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Bd(l)}break e;case"textarea":qd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&bl(e,!!a.multiple,t,!1)}}}var No=!1;function Fd(e,t,a){if(No)return e(t,a);No=!0;try{var l=e(t);return l}finally{if(No=!1,(wl!==null||Nl!==null)&&(hi(),wl&&(t=wl,e=Nl,Nl=wl=null,Yd(t),e)))for(t=0;t<e.length;t++)Yd(e[t])}}function vr(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Ot]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var Ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jo=!1;if(Ua)try{var yr={};Object.defineProperty(yr,"passive",{get:function(){jo=!0}}),window.addEventListener("test",yr,yr),window.removeEventListener("test",yr,yr)}catch{jo=!1}var rn=null,Eo=null,Cs=null;function Xd(){if(Cs)return Cs;var e,t=Eo,a=t.length,l,o="value"in rn?rn.value:rn.textContent,c=o.length;for(e=0;e<a&&t[e]===o[e];e++);var h=a-e;for(l=1;l<=h&&t[a-l]===o[c-l];l++);return Cs=o.slice(e,1<l?1-l:void 0)}function _s(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 Ms(){return!0}function Kd(){return!1}function zt(e){function t(a,l,o,c,h){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ms:Kd,this.isPropagationStopped=Kd,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ms)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},As=zt(Gn),br=p({},Gn,{view:0,detail:0}),gv=zt(br),Ro,To,Sr,Os=p({},br,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_o,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!==Sr&&(Sr&&e.type==="mousemove"?(Ro=e.screenX-Sr.screenX,To=e.screenY-Sr.screenY):To=Ro=0,Sr=e),Ro)},movementY:function(e){return"movementY"in e?e.movementY:To}}),Zd=zt(Os),xv=p({},Os,{dataTransfer:0}),vv=zt(xv),yv=p({},br,{relatedTarget:0}),Co=zt(yv),bv=p({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0}),Sv=zt(bv),wv=p({},Gn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nv=zt(wv),jv=p({},Gn,{data:0}),Jd=zt(jv),Ev={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rv={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"},Tv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tv[e])?!!t[e]:!1}function _o(){return Cv}var _v=p({},br,{key:function(e){if(e.key){var t=Ev[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Rv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_o,charCode:function(e){return e.type==="keypress"?_s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mv=zt(_v),Av=p({},Os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$d=zt(Av),Ov=p({},br,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_o}),zv=zt(Ov),kv=p({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dv=zt(kv),Uv=p({},Os,{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}),Lv=zt(Uv),Bv=p({},Gn,{newState:0,oldState:0}),Hv=zt(Bv),qv=[9,13,27,32],Mo=Ua&&"CompositionEvent"in window,wr=null;Ua&&"documentMode"in document&&(wr=document.documentMode);var Gv=Ua&&"TextEvent"in window&&!wr,Pd=Ua&&(!Mo||wr&&8<wr&&11>=wr),Id=" ",Wd=!1;function ef(e,t){switch(e){case"keyup":return qv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jl=!1;function Qv(e,t){switch(e){case"compositionend":return tf(t);case"keypress":return t.which!==32?null:(Wd=!0,Id);case"textInput":return e=t.data,e===Id&&Wd?null:e;default:return null}}function Vv(e,t){if(jl)return e==="compositionend"||!Mo&&ef(e,t)?(e=Xd(),Cs=Eo=rn=null,jl=!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 Pd&&t.locale!=="ko"?null:t.data;default:return null}}var Yv={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 af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yv[e.type]:t==="textarea"}function nf(e,t,a,l){wl?Nl?Nl.push(l):Nl=[l]:wl=l,t=Si(t,"onChange"),0<t.length&&(a=new As("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Nr=null,jr=null;function Fv(e){qh(e,0)}function zs(e){var t=xr(e);if(Bd(t))return e}function lf(e,t){if(e==="change")return t}var rf=!1;if(Ua){var Ao;if(Ua){var Oo="oninput"in document;if(!Oo){var sf=document.createElement("div");sf.setAttribute("oninput","return;"),Oo=typeof sf.oninput=="function"}Ao=Oo}else Ao=!1;rf=Ao&&(!document.documentMode||9<document.documentMode)}function of(){Nr&&(Nr.detachEvent("onpropertychange",cf),jr=Nr=null)}function cf(e){if(e.propertyName==="value"&&zs(jr)){var t=[];nf(t,jr,e,wo(e)),Fd(Fv,t)}}function Xv(e,t,a){e==="focusin"?(of(),Nr=t,jr=a,Nr.attachEvent("onpropertychange",cf)):e==="focusout"&&of()}function Kv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zs(jr)}function Zv(e,t){if(e==="click")return zs(t)}function Jv(e,t){if(e==="input"||e==="change")return zs(t)}function $v(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:$v;function Er(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!Qt.call(t,o)||!Vt(e[o],t[o]))return!1}return!0}function uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function df(e,t){var a=uf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=uf(a)}}function ff(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ff(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Rs(e.document)}return t}function zo(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 Pv=Ua&&"documentMode"in document&&11>=document.documentMode,El=null,ko=null,Rr=null,Do=!1;function hf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Do||El==null||El!==Rs(l)||(l=El,"selectionStart"in l&&zo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Rr&&Er(Rr,l)||(Rr=l,l=Si(ko,"onSelect"),0<l.length&&(t=new As("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=El)))}function Qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Rl={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},Uo={},pf={};Ua&&(pf=document.createElement("div").style,"AnimationEvent"in window||(delete Rl.animationend.animation,delete Rl.animationiteration.animation,delete Rl.animationstart.animation),"TransitionEvent"in window||delete Rl.transitionend.transition);function Vn(e){if(Uo[e])return Uo[e];if(!Rl[e])return e;var t=Rl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in pf)return Uo[e]=t[a];return e}var gf=Vn("animationend"),xf=Vn("animationiteration"),vf=Vn("animationstart"),Iv=Vn("transitionrun"),Wv=Vn("transitionstart"),ey=Vn("transitioncancel"),yf=Vn("transitionend"),bf=new Map,Lo="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(" ");Lo.push("scrollEnd");function ha(e,t){bf.set(e,t),qn(t,[e])}var ks=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)},ea=[],Tl=0,Bo=0;function Ds(){for(var e=Tl,t=Bo=Tl=0;t<e;){var a=ea[t];ea[t++]=null;var l=ea[t];ea[t++]=null;var o=ea[t];ea[t++]=null;var c=ea[t];if(ea[t++]=null,l!==null&&o!==null){var h=l.pending;h===null?o.next=o:(o.next=h.next,h.next=o),l.pending=o}c!==0&&Sf(a,o,c)}}function Us(e,t,a,l){ea[Tl++]=e,ea[Tl++]=t,ea[Tl++]=a,ea[Tl++]=l,Bo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ho(e,t,a,l){return Us(e,t,a,l),Ls(e)}function Yn(e,t){return Us(e,null,null,t),Ls(e)}function Sf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,c=e.return;c!==null;)c.childLanes|=a,l=c.alternate,l!==null&&(l.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-bt(a),e=c.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),c):null}function Ls(e){if(50<Zr)throw Zr=0,Zc=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Cl={};function ty(e,t,a,l){this.tag=e,this.key=a,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,a,l){return new ty(e,t,a,l)}function qo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function La(e,t){var a=e.alternate;return a===null?(a=Yt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function wf(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Bs(e,t,a,l,o,c){var h=0;if(l=e,typeof e=="function")qo(e)&&(h=1);else if(typeof e=="string")h=s0(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=Yt(31,a,t,o),e.elementType=P,e.lanes=c,e;case j:return Fn(a.children,o,c,t);case T:h=8,o|=24;break;case z:return e=Yt(12,a,t,o|2),e.elementType=z,e.lanes=c,e;case ne:return e=Yt(13,a,t,o),e.elementType=ne,e.lanes=c,e;case I:return e=Yt(19,a,t,o),e.elementType=I,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:h=10;break e;case _:h=9;break e;case L:h=11;break e;case ee:h=14;break e;case $:h=16,l=null;break e}h=29,a=Error(i(130,e===null?"null":typeof e,"")),l=null}return t=Yt(h,a,t,o),t.elementType=e,t.type=l,t.lanes=c,t}function Fn(e,t,a,l){return e=Yt(7,e,l,t),e.lanes=a,e}function Go(e,t,a){return e=Yt(6,e,null,t),e.lanes=a,e}function Nf(e){var t=Yt(18,null,null,0);return t.stateNode=e,t}function Qo(e,t,a){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var jf=new WeakMap;function ta(e,t){if(typeof e=="object"&&e!==null){var a=jf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:dr(t)},jf.set(e,t),t)}return{value:e,source:t,stack:dr(t)}}var _l=[],Ml=0,Hs=null,Tr=0,aa=[],na=0,sn=null,ja=1,Ea="";function Ba(e,t){_l[Ml++]=Tr,_l[Ml++]=Hs,Hs=e,Tr=t}function Ef(e,t,a){aa[na++]=ja,aa[na++]=Ea,aa[na++]=sn,sn=e;var l=ja;e=Ea;var o=32-bt(l)-1;l&=~(1<<o),a+=1;var c=32-bt(t)+o;if(30<c){var h=o-o%5;c=(l&(1<<h)-1).toString(32),l>>=h,o-=h,ja=1<<32-bt(t)+o|a<<o|l,Ea=c+e}else ja=1<<c|a<<o|l,Ea=e}function Vo(e){e.return!==null&&(Ba(e,1),Ef(e,1,0))}function Yo(e){for(;e===Hs;)Hs=_l[--Ml],_l[Ml]=null,Tr=_l[--Ml],_l[Ml]=null;for(;e===sn;)sn=aa[--na],aa[na]=null,Ea=aa[--na],aa[na]=null,ja=aa[--na],aa[na]=null}function Rf(e,t){aa[na++]=ja,aa[na++]=Ea,aa[na++]=sn,ja=t.id,Ea=t.overflow,sn=e}var gt=null,Ke=null,ke=!1,on=null,la=!1,Fo=Error(i(519));function cn(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Cr(ta(t,e)),Fo}function Tf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[pt]=e,t[Ot]=l,a){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(a=0;a<$r.length;a++)Me($r[a],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),Hd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),Gd(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Yh(t.textContent,a)?(l.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),l.onScroll!=null&&Me("scroll",t),l.onScrollEnd!=null&&Me("scrollend",t),l.onClick!=null&&(t.onclick=Da),t=!0):t=!1,t||cn(e,!0)}function Cf(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:gt=gt.return}}function Al(e){if(e!==gt)return!1;if(!ke)return Cf(e),ke=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||cu(e.type,e.memoizedProps)),a=!a),a&&Ke&&cn(e),Cf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ke=Wh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ke=Wh(e)}else t===27?(t=Ke,Nn(e.type)?(e=hu,hu=null,Ke=e):Ke=t):Ke=gt?sa(e.stateNode.nextSibling):null;return!0}function Xn(){Ke=gt=null,ke=!1}function Xo(){var e=on;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),on=null),e}function Cr(e){on===null?on=[e]:on.push(e)}var Ko=R(null),Kn=null,Ha=null;function un(e,t,a){Q(Ko,t._currentValue),t._currentValue=a}function qa(e){e._currentValue=Ko.current,G(Ko)}function Zo(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Jo(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var h=o.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=o;for(var E=0;E<t.length;E++)if(b.context===t[E]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),Zo(c.return,a,e),l||(h=null);break e}c=b.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(i(341));h.lanes|=a,c=h.alternate,c!==null&&(c.lanes|=a),Zo(h,a,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function Ol(e,t,a,l){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(i(387));if(h=h.memoizedProps,h!==null){var b=o.type;Vt(o.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(o===de.current){if(h=o.alternate,h===null)throw Error(i(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ts):e=[ts])}o=o.return}e!==null&&Jo(t,e,a,l),t.flags|=262144}function qs(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zn(e){Kn=e,Ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return _f(Kn,e)}function Gs(e,t){return Kn===null&&Zn(e),_f(e,t)}function _f(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,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 a}var ay=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},ny=n.unstable_scheduleCallback,ly=n.unstable_NormalPriority,lt={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $o(){return{controller:new ay,data:new Map,refCount:0}}function _r(e){e.refCount--,e.refCount===0&&ny(ly,function(){e.controller.abort()})}var Mr=null,Po=0,zl=0,kl=null;function ry(e,t){if(Mr===null){var a=Mr=[];Po=0,zl=eu(),kl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Po++,t.then(Mf,Mf),t}function Mf(){if(--Po===0&&Mr!==null){kl!==null&&(kl.status="fulfilled");var e=Mr;Mr=null,zl=0,kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sy(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var Af=O.S;O.S=function(e,t){hh=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ry(e,t),Af!==null&&Af(e,t)};var Jn=R(null);function Io(){var e=Jn.current;return e!==null?e:Xe.pooledCache}function Qs(e,t){t===null?Q(Jn,Jn.current):Q(Jn,t.pool)}function Of(){var e=Io();return e===null?null:{parent:lt._currentValue,pool:e}}var Dl=Error(i(460)),Wo=Error(i(474)),Vs=Error(i(542)),Ys={then:function(){}};function zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function kf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Da,Da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uf(e),e;default:if(typeof t.status=="string")t.then(Da,Da);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uf(e),e}throw Pn=t,Dl}}function $n(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Pn=a,Dl):a}}var Pn=null;function Df(){if(Pn===null)throw Error(i(459));var e=Pn;return Pn=null,e}function Uf(e){if(e===Dl||e===Vs)throw Error(i(483))}var Ul=null,Ar=0;function Fs(e){var t=Ar;return Ar+=1,Ul===null&&(Ul=[]),kf(Ul,e,t)}function Or(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xs(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 Lf(e){function t(A,C){if(e){var k=A.deletions;k===null?(A.deletions=[C],A.flags|=16):k.push(C)}}function a(A,C){if(!e)return null;for(;C!==null;)t(A,C),C=C.sibling;return null}function l(A){for(var C=new Map;A!==null;)A.key!==null?C.set(A.key,A):C.set(A.index,A),A=A.sibling;return C}function o(A,C){return A=La(A,C),A.index=0,A.sibling=null,A}function c(A,C,k){return A.index=k,e?(k=A.alternate,k!==null?(k=k.index,k<C?(A.flags|=67108866,C):k):(A.flags|=67108866,C)):(A.flags|=1048576,C)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function b(A,C,k,F){return C===null||C.tag!==6?(C=Go(k,A.mode,F),C.return=A,C):(C=o(C,k),C.return=A,C)}function E(A,C,k,F){var me=k.type;return me===j?Y(A,C,k.props.children,F,k.key):C!==null&&(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===$&&$n(me)===C.type)?(C=o(C,k.props),Or(C,k),C.return=A,C):(C=Bs(k.type,k.key,k.props,null,A.mode,F),Or(C,k),C.return=A,C)}function D(A,C,k,F){return C===null||C.tag!==4||C.stateNode.containerInfo!==k.containerInfo||C.stateNode.implementation!==k.implementation?(C=Qo(k,A.mode,F),C.return=A,C):(C=o(C,k.children||[]),C.return=A,C)}function Y(A,C,k,F,me){return C===null||C.tag!==7?(C=Fn(k,A.mode,F,me),C.return=A,C):(C=o(C,k),C.return=A,C)}function K(A,C,k){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Go(""+C,A.mode,k),C.return=A,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case M:return k=Bs(C.type,C.key,C.props,null,A.mode,k),Or(k,C),k.return=A,k;case w:return C=Qo(C,A.mode,k),C.return=A,C;case $:return C=$n(C),K(A,C,k)}if(Be(C)||he(C))return C=Fn(C,A.mode,k,null),C.return=A,C;if(typeof C.then=="function")return K(A,Fs(C),k);if(C.$$typeof===V)return K(A,Gs(A,C),k);Xs(A,C)}return null}function U(A,C,k,F){var me=C!==null?C.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return me!==null?null:b(A,C,""+k,F);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case M:return k.key===me?E(A,C,k,F):null;case w:return k.key===me?D(A,C,k,F):null;case $:return k=$n(k),U(A,C,k,F)}if(Be(k)||he(k))return me!==null?null:Y(A,C,k,F,null);if(typeof k.then=="function")return U(A,C,Fs(k),F);if(k.$$typeof===V)return U(A,C,Gs(A,k),F);Xs(A,k)}return null}function H(A,C,k,F,me){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return A=A.get(k)||null,b(C,A,""+F,me);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case M:return A=A.get(F.key===null?k:F.key)||null,E(C,A,F,me);case w:return A=A.get(F.key===null?k:F.key)||null,D(C,A,F,me);case $:return F=$n(F),H(A,C,k,F,me)}if(Be(F)||he(F))return A=A.get(k)||null,Y(C,A,F,me,null);if(typeof F.then=="function")return H(A,C,k,Fs(F),me);if(F.$$typeof===V)return H(A,C,k,Gs(C,F),me);Xs(C,F)}return null}function ie(A,C,k,F){for(var me=null,Ue=null,ue=C,je=C=0,ze=null;ue!==null&&je<k.length;je++){ue.index>je?(ze=ue,ue=null):ze=ue.sibling;var Le=U(A,ue,k[je],F);if(Le===null){ue===null&&(ue=ze);break}e&&ue&&Le.alternate===null&&t(A,ue),C=c(Le,C,je),Ue===null?me=Le:Ue.sibling=Le,Ue=Le,ue=ze}if(je===k.length)return a(A,ue),ke&&Ba(A,je),me;if(ue===null){for(;je<k.length;je++)ue=K(A,k[je],F),ue!==null&&(C=c(ue,C,je),Ue===null?me=ue:Ue.sibling=ue,Ue=ue);return ke&&Ba(A,je),me}for(ue=l(ue);je<k.length;je++)ze=H(ue,A,je,k[je],F),ze!==null&&(e&&ze.alternate!==null&&ue.delete(ze.key===null?je:ze.key),C=c(ze,C,je),Ue===null?me=ze:Ue.sibling=ze,Ue=ze);return e&&ue.forEach(function(Cn){return t(A,Cn)}),ke&&Ba(A,je),me}function pe(A,C,k,F){if(k==null)throw Error(i(151));for(var me=null,Ue=null,ue=C,je=C=0,ze=null,Le=k.next();ue!==null&&!Le.done;je++,Le=k.next()){ue.index>je?(ze=ue,ue=null):ze=ue.sibling;var Cn=U(A,ue,Le.value,F);if(Cn===null){ue===null&&(ue=ze);break}e&&ue&&Cn.alternate===null&&t(A,ue),C=c(Cn,C,je),Ue===null?me=Cn:Ue.sibling=Cn,Ue=Cn,ue=ze}if(Le.done)return a(A,ue),ke&&Ba(A,je),me;if(ue===null){for(;!Le.done;je++,Le=k.next())Le=K(A,Le.value,F),Le!==null&&(C=c(Le,C,je),Ue===null?me=Le:Ue.sibling=Le,Ue=Le);return ke&&Ba(A,je),me}for(ue=l(ue);!Le.done;je++,Le=k.next())Le=H(ue,A,je,Le.value,F),Le!==null&&(e&&Le.alternate!==null&&ue.delete(Le.key===null?je:Le.key),C=c(Le,C,je),Ue===null?me=Le:Ue.sibling=Le,Ue=Le);return e&&ue.forEach(function(x0){return t(A,x0)}),ke&&Ba(A,je),me}function Ye(A,C,k,F){if(typeof k=="object"&&k!==null&&k.type===j&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case M:e:{for(var me=k.key;C!==null;){if(C.key===me){if(me=k.type,me===j){if(C.tag===7){a(A,C.sibling),F=o(C,k.props.children),F.return=A,A=F;break e}}else if(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===$&&$n(me)===C.type){a(A,C.sibling),F=o(C,k.props),Or(F,k),F.return=A,A=F;break e}a(A,C);break}else t(A,C);C=C.sibling}k.type===j?(F=Fn(k.props.children,A.mode,F,k.key),F.return=A,A=F):(F=Bs(k.type,k.key,k.props,null,A.mode,F),Or(F,k),F.return=A,A=F)}return h(A);case w:e:{for(me=k.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===k.containerInfo&&C.stateNode.implementation===k.implementation){a(A,C.sibling),F=o(C,k.children||[]),F.return=A,A=F;break e}else{a(A,C);break}else t(A,C);C=C.sibling}F=Qo(k,A.mode,F),F.return=A,A=F}return h(A);case $:return k=$n(k),Ye(A,C,k,F)}if(Be(k))return ie(A,C,k,F);if(he(k)){if(me=he(k),typeof me!="function")throw Error(i(150));return k=me.call(k),pe(A,C,k,F)}if(typeof k.then=="function")return Ye(A,C,Fs(k),F);if(k.$$typeof===V)return Ye(A,C,Gs(A,k),F);Xs(A,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,C!==null&&C.tag===6?(a(A,C.sibling),F=o(C,k),F.return=A,A=F):(a(A,C),F=Go(k,A.mode,F),F.return=A,A=F),h(A)):a(A,C)}return function(A,C,k,F){try{Ar=0;var me=Ye(A,C,k,F);return Ul=null,me}catch(ue){if(ue===Dl||ue===Vs)throw ue;var Ue=Yt(29,ue,null,A.mode);return Ue.lanes=F,Ue.return=A,Ue}}}var In=Lf(!0),Bf=Lf(!1),dn=!1;function ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tc(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 fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mn(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Ls(e),Sf(e,null,a),t}return Us(e,l,t,a),Ls(e)}function zr(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Mt(e,a)}}function ac(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?o=c=h:c=c.next=h,a=a.next}while(a!==null);c===null?o=c=t:c=c.next=t}else o=c=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var nc=!1;function kr(){if(nc){var e=kl;if(e!==null)throw e}}function Dr(e,t,a,l){nc=!1;var o=e.updateQueue;dn=!1;var c=o.firstBaseUpdate,h=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var E=b,D=E.next;E.next=null,h===null?c=D:h.next=D,h=E;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,b=Y.lastBaseUpdate,b!==h&&(b===null?Y.firstBaseUpdate=D:b.next=D,Y.lastBaseUpdate=E))}if(c!==null){var K=o.baseState;h=0,Y=D=E=null,b=c;do{var U=b.lane&-536870913,H=U!==b.lane;if(H?(Oe&U)===U:(l&U)===U){U!==0&&U===zl&&(nc=!0),Y!==null&&(Y=Y.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,pe=b;U=t;var Ye=a;switch(pe.tag){case 1:if(ie=pe.payload,typeof ie=="function"){K=ie.call(Ye,K,U);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=pe.payload,U=typeof ie=="function"?ie.call(Ye,K,U):ie,U==null)break e;K=p({},K,U);break e;case 2:dn=!0}}U=b.callback,U!==null&&(e.flags|=64,H&&(e.flags|=8192),H=o.callbacks,H===null?o.callbacks=[U]:H.push(U))}else H={lane:U,tag:b.tag,payload:b.payload,callback:b.callback,next:null},Y===null?(D=Y=H,E=K):Y=Y.next=H,h|=U;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;H=b,b=H.next,H.next=null,o.lastBaseUpdate=H,o.shared.pending=null}}while(!0);Y===null&&(E=K),o.baseState=E,o.firstBaseUpdate=D,o.lastBaseUpdate=Y,c===null&&(o.shared.lanes=0),vn|=h,e.lanes=h,e.memoizedState=K}}function Hf(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function qf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Hf(a[e],t)}var Ll=R(null),Ks=R(0);function Gf(e,t){e=Ja,Q(Ks,e),Q(Ll,t),Ja=e|t.baseLanes}function lc(){Q(Ks,Ja),Q(Ll,Ll.current)}function rc(){Ja=Ks.current,G(Ll),G(Ks)}var Ft=R(null),ra=null;function hn(e){var t=e.alternate;Q(tt,tt.current&1),Q(Ft,e),ra===null&&(t===null||Ll.current!==null||t.memoizedState!==null)&&(ra=e)}function sc(e){Q(tt,tt.current),Q(Ft,e),ra===null&&(ra=e)}function Qf(e){e.tag===22?(Q(tt,tt.current),Q(Ft,e),ra===null&&(ra=e)):pn()}function pn(){Q(tt,tt.current),Q(Ft,Ft.current)}function Xt(e){G(Ft),ra===e&&(ra=null),G(tt)}var tt=R(0);function Zs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||fu(a)||mu(a)))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 Ga=0,we=null,Qe=null,rt=null,Js=!1,Bl=!1,Wn=!1,$s=0,Ur=0,Hl=null,iy=0;function We(){throw Error(i(321))}function ic(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Vt(e[a],t[a]))return!1;return!0}function oc(e,t,a,l,o,c){return Ga=c,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Em:Nc,Wn=!1,c=a(l,o),Wn=!1,Bl&&(c=Yf(t,a,l,o)),Vf(e),c}function Vf(e){O.H=Hr;var t=Qe!==null&&Qe.next!==null;if(Ga=0,rt=Qe=we=null,Js=!1,Ur=0,Hl=null,t)throw Error(i(300));e===null||st||(e=e.dependencies,e!==null&&qs(e)&&(st=!0))}function Yf(e,t,a,l){we=e;var o=0;do{if(Bl&&(Hl=null),Ur=0,Bl=!1,25<=o)throw Error(i(301));if(o+=1,rt=Qe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}O.H=Rm,c=t(a,l)}while(Bl);return c}function oy(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?Lr(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(we.flags|=1024),t}function cc(){var e=$s!==0;return $s=0,e}function uc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function dc(e){if(Js){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Js=!1}Ga=0,rt=Qe=we=null,Bl=!1,Ur=$s=0,Hl=null}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?we.memoizedState=rt=e:rt=rt.next=e,rt}function at(){if(Qe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=rt===null?we.memoizedState:rt.next;if(t!==null)rt=t,Qe=e;else{if(e===null)throw we.alternate===null?Error(i(467)):Error(i(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},rt===null?we.memoizedState=rt=e:rt=rt.next=e}return rt}function Ps(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lr(e){var t=Ur;return Ur+=1,Hl===null&&(Hl=[]),e=kf(Hl,e,t),t=we,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Em:Nc),e}function Is(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Lr(e);if(e.$$typeof===V)return xt(e)}throw Error(i(438,String(e)))}function fc(e){var t=null,a=we.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=we.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ps(),we.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=re;return t.index++,a}function Qa(e,t){return typeof t=="function"?t(e):t}function Ws(e){var t=at();return mc(t,Qe,e)}function mc(e,t,a){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var o=e.baseQueue,c=l.pending;if(c!==null){if(o!==null){var h=o.next;o.next=c.next,c.next=h}t.baseQueue=o=c,l.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var b=h=null,E=null,D=t,Y=!1;do{var K=D.lane&-536870913;if(K!==D.lane?(Oe&K)===K:(Ga&K)===K){var U=D.revertLane;if(U===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),K===zl&&(Y=!0);else if((Ga&U)===U){D=D.next,U===zl&&(Y=!0);continue}else K={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=K,h=c):E=E.next=K,we.lanes|=U,vn|=U;K=D.action,Wn&&a(c,K),c=D.hasEagerState?D.eagerState:a(c,K)}else U={lane:K,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=U,h=c):E=E.next=U,we.lanes|=K,vn|=K;D=D.next}while(D!==null&&D!==t);if(E===null?h=c:E.next=b,!Vt(c,e.memoizedState)&&(st=!0,Y&&(a=kl,a!==null)))throw a;e.memoizedState=c,e.baseState=h,e.baseQueue=E,l.lastRenderedState=c}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function hc(e){var t=at(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,c=t.memoizedState;if(o!==null){a.pending=null;var h=o=o.next;do c=e(c,h.action),h=h.next;while(h!==o);Vt(c,t.memoizedState)||(st=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,l]}function Ff(e,t,a){var l=we,o=at(),c=ke;if(c){if(a===void 0)throw Error(i(407));a=a()}else a=t();var h=!Vt((Qe||o).memoizedState,a);if(h&&(o.memoizedState=a,st=!0),o=o.queue,xc(Zf.bind(null,l,o,e),[e]),o.getSnapshot!==t||h||rt!==null&&rt.memoizedState.tag&1){if(l.flags|=2048,ql(9,{destroy:void 0},Kf.bind(null,l,o,a,t),null),Xe===null)throw Error(i(349));c||(Ga&127)!==0||Xf(l,t,a)}return a}function Xf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=we.updateQueue,t===null?(t=Ps(),we.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Kf(e,t,a,l){t.value=a,t.getSnapshot=l,Jf(t)&&$f(e)}function Zf(e,t,a){return a(function(){Jf(t)&&$f(e)})}function Jf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Vt(e,a)}catch{return!0}}function $f(e){var t=Yn(e,2);t!==null&&Bt(t,e,2)}function pc(e){var t=Tt();if(typeof e=="function"){var a=e;if(e=a(),Wn){fa(!0);try{a()}finally{fa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:e},t}function Pf(e,t,a,l){return e.baseState=a,mc(e,Qe,typeof l=="function"?l:Qa)}function cy(e,t,a,l,o){if(ai(e))throw Error(i(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){c.listeners.push(h)}};O.T!==null?a(!0):c.isTransition=!1,l(c),a=t.pending,a===null?(c.next=t.pending=c,If(t,c)):(c.next=a.next,t.pending=a.next=c)}}function If(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var c=O.T,h={};O.T=h;try{var b=a(o,l),E=O.S;E!==null&&E(h,b),Wf(e,t,b)}catch(D){gc(e,t,D)}finally{c!==null&&h.types!==null&&(c.types=h.types),O.T=c}}else try{c=a(o,l),Wf(e,t,c)}catch(D){gc(e,t,D)}}function Wf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){em(e,t,l)},function(l){return gc(e,t,l)}):em(e,t,a)}function em(e,t,a){t.status="fulfilled",t.value=a,tm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,If(e,a)))}function gc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,tm(t),t=t.next;while(t!==l)}e.action=null}function tm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function am(e,t){return t}function nm(e,t){if(ke){var a=Xe.formState;if(a!==null){e:{var l=we;if(ke){if(Ke){t:{for(var o=Ke,c=la;o.nodeType!==8;){if(!c){o=null;break t}if(o=sa(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Ke=sa(o.nextSibling),l=o.data==="F!";break e}}cn(l)}l=!1}l&&(t=a[0])}}return a=Tt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:am,lastRenderedState:t},a.queue=l,a=wm.bind(null,we,l),l.dispatch=a,l=pc(!1),c=wc.bind(null,we,!1,l.queue),l=Tt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=cy.bind(null,we,o,c,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function lm(e){var t=at();return rm(t,Qe,e)}function rm(e,t,a){if(t=mc(e,t,am)[0],e=Ws(Qa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Lr(t)}catch(h){throw h===Dl?Vs:h}else l=t;t=at();var o=t.queue,c=o.dispatch;return a!==t.memoizedState&&(we.flags|=2048,ql(9,{destroy:void 0},uy.bind(null,o,a),null)),[l,c,e]}function uy(e,t){e.action=t}function sm(e){var t=at(),a=Qe;if(a!==null)return rm(t,a,e);at(),t=t.memoizedState,a=at();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function ql(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=we.updateQueue,t===null&&(t=Ps(),we.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function im(){return at().memoizedState}function ei(e,t,a,l){var o=Tt();we.flags|=e,o.memoizedState=ql(1|t,{destroy:void 0},a,l===void 0?null:l)}function ti(e,t,a,l){var o=at();l=l===void 0?null:l;var c=o.memoizedState.inst;Qe!==null&&l!==null&&ic(l,Qe.memoizedState.deps)?o.memoizedState=ql(t,c,a,l):(we.flags|=e,o.memoizedState=ql(1|t,c,a,l))}function om(e,t){ei(8390656,8,e,t)}function xc(e,t){ti(2048,8,e,t)}function dy(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Ps(),we.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function cm(e){var t=at().memoizedState;return dy({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function um(e,t){return ti(4,2,e,t)}function dm(e,t){return ti(4,4,e,t)}function fm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mm(e,t,a){a=a!=null?a.concat([e]):null,ti(4,4,fm.bind(null,t,e),a)}function vc(){}function hm(e,t){var a=at();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&ic(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function pm(e,t){var a=at();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&ic(t,l[1]))return l[0];if(l=e(),Wn){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[l,t],l}function yc(e,t,a){return a===void 0||(Ga&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=gh(),we.lanes|=e,vn|=e,a)}function gm(e,t,a,l){return Vt(a,t)?a:Ll.current!==null?(e=yc(e,a,l),Vt(e,t)||(st=!0),e):(Ga&42)===0||(Ga&1073741824)!==0&&(Oe&261930)===0?(st=!0,e.memoizedState=a):(e=gh(),we.lanes|=e,vn|=e,t)}function xm(e,t,a,l,o){var c=Z.p;Z.p=c!==0&&8>c?c:8;var h=O.T,b={};O.T=b,wc(e,!1,t,a);try{var E=o(),D=O.S;if(D!==null&&D(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var Y=sy(E,l);Br(e,t,Y,Jt(e))}else Br(e,t,l,Jt(e))}catch(K){Br(e,t,{then:function(){},status:"rejected",reason:K},Jt())}finally{Z.p=c,h!==null&&b.types!==null&&(h.types=b.types),O.T=h}}function fy(){}function bc(e,t,a,l){if(e.tag!==5)throw Error(i(476));var o=vm(e).queue;xm(e,o,t,X,a===null?fy:function(){return ym(e),a(l)})}function vm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:X},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ym(e){var t=vm(e);t.next===null&&(t=e.alternate.memoizedState),Br(e,t.next.queue,{},Jt())}function Sc(){return xt(ts)}function bm(){return at().memoizedState}function Sm(){return at().memoizedState}function my(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Jt();e=fn(a);var l=mn(t,e,a);l!==null&&(Bt(l,t,a),zr(l,t,a)),t={cache:$o()},e.payload=t;return}t=t.return}}function hy(e,t,a){var l=Jt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ai(e)?Nm(t,a):(a=Ho(e,t,a,l),a!==null&&(Bt(a,e,l),jm(a,t,l)))}function wm(e,t,a){var l=Jt();Br(e,t,a,l)}function Br(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ai(e))Nm(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var h=t.lastRenderedState,b=c(h,a);if(o.hasEagerState=!0,o.eagerState=b,Vt(b,h))return Us(e,t,o,0),Xe===null&&Ds(),!1}catch{}if(a=Ho(e,t,o,l),a!==null)return Bt(a,e,l),jm(a,t,l),!0}return!1}function wc(e,t,a,l){if(l={lane:2,revertLane:eu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ai(e)){if(t)throw Error(i(479))}else t=Ho(e,a,l,2),t!==null&&Bt(t,e,2)}function ai(e){var t=e.alternate;return e===we||t!==null&&t===we}function Nm(e,t){Bl=Js=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function jm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Mt(e,a)}}var Hr={readContext:xt,use:Is,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};Hr.useEffectEvent=We;var Em={readContext:xt,use:Is,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:om,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ei(4194308,4,fm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ei(4194308,4,e,t)},useInsertionEffect:function(e,t){ei(4,2,e,t)},useMemo:function(e,t){var a=Tt();t=t===void 0?null:t;var l=e();if(Wn){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Tt();if(a!==void 0){var o=a(t);if(Wn){fa(!0);try{a(t)}finally{fa(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=hy.bind(null,we,e),[l.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:function(e){e=pc(e);var t=e.queue,a=wm.bind(null,we,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:vc,useDeferredValue:function(e,t){var a=Tt();return yc(a,e,t)},useTransition:function(){var e=pc(!1);return e=xm.bind(null,we,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=we,o=Tt();if(ke){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Xe===null)throw Error(i(349));(Oe&127)!==0||Xf(l,t,a)}o.memoizedState=a;var c={value:a,getSnapshot:t};return o.queue=c,om(Zf.bind(null,l,c,e),[e]),l.flags|=2048,ql(9,{destroy:void 0},Kf.bind(null,l,c,a,t),null),a},useId:function(){var e=Tt(),t=Xe.identifierPrefix;if(ke){var a=Ea,l=ja;a=(l&~(1<<32-bt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=$s++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=iy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Sc,useFormState:nm,useActionState:nm,useOptimistic:function(e){var t=Tt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wc.bind(null,we,!0,a),a.dispatch=t,[e,t]},useMemoCache:fc,useCacheRefresh:function(){return Tt().memoizedState=my.bind(null,we)},useEffectEvent:function(e){var t=Tt(),a={impl:e};return t.memoizedState=a,function(){if((He&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Nc={readContext:xt,use:Is,useCallback:hm,useContext:xt,useEffect:xc,useImperativeHandle:mm,useInsertionEffect:um,useLayoutEffect:dm,useMemo:pm,useReducer:Ws,useRef:im,useState:function(){return Ws(Qa)},useDebugValue:vc,useDeferredValue:function(e,t){var a=at();return gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=Ws(Qa)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Lr(e),t]},useSyncExternalStore:Ff,useId:bm,useHostTransitionStatus:Sc,useFormState:lm,useActionState:lm,useOptimistic:function(e,t){var a=at();return Pf(a,Qe,e,t)},useMemoCache:fc,useCacheRefresh:Sm};Nc.useEffectEvent=cm;var Rm={readContext:xt,use:Is,useCallback:hm,useContext:xt,useEffect:xc,useImperativeHandle:mm,useInsertionEffect:um,useLayoutEffect:dm,useMemo:pm,useReducer:hc,useRef:im,useState:function(){return hc(Qa)},useDebugValue:vc,useDeferredValue:function(e,t){var a=at();return Qe===null?yc(a,e,t):gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=hc(Qa)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Lr(e),t]},useSyncExternalStore:Ff,useId:bm,useHostTransitionStatus:Sc,useFormState:sm,useActionState:sm,useOptimistic:function(e,t){var a=at();return Qe!==null?Pf(a,Qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:fc,useCacheRefresh:Sm};Rm.useEffectEvent=cm;function jc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ec={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Jt(),o=fn(l);o.payload=t,a!=null&&(o.callback=a),t=mn(e,o,l),t!==null&&(Bt(t,e,l),zr(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Jt(),o=fn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=mn(e,o,l),t!==null&&(Bt(t,e,l),zr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Jt(),l=fn(a);l.tag=2,t!=null&&(l.callback=t),t=mn(e,l,a),t!==null&&(Bt(t,e,a),zr(t,e,a))}};function Tm(e,t,a,l,o,c,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,h):t.prototype&&t.prototype.isPureReactComponent?!Er(a,l)||!Er(o,c):!0}function Cm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function el(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function _m(e){ks(e)}function Mm(e){console.error(e)}function Am(e){ks(e)}function ni(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Om(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Rc(e,t,a){return a=fn(a),a.tag=3,a.payload={element:null},a.callback=function(){ni(e,t)},a}function zm(e){return e=fn(e),e.tag=3,e}function km(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var c=l.value;e.payload=function(){return o(c)},e.callback=function(){Om(t,a,l)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Om(t,a,l),typeof o!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function py(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Ol(t,a,o,!0),a=Ft.current,a!==null){switch(a.tag){case 31:case 13:return ra===null?pi():a.alternate===null&&et===0&&(et=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===Ys?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Pc(e,l,o)),!1;case 22:return a.flags|=65536,l===Ys?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Pc(e,l,o)),!1}throw Error(i(435,a.tag))}return Pc(e,l,o),pi(),!1}if(ke)return t=Ft.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Fo&&(e=Error(i(422),{cause:l}),Cr(ta(e,a)))):(l!==Fo&&(t=Error(i(423),{cause:l}),Cr(ta(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=ta(l,a),o=Rc(e.stateNode,l,o),ac(e,o),et!==4&&(et=2)),!1;var c=Error(i(520),{cause:l});if(c=ta(c,a),Kr===null?Kr=[c]:Kr.push(c),et!==4&&(et=2),t===null)return!0;l=ta(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Rc(a.stateNode,l,e),ac(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(yn===null||!yn.has(c))))return a.flags|=65536,o&=-o,a.lanes|=o,o=zm(o),km(o,e,a,l),ac(a,o),!1}a=a.return}while(a!==null);return!1}var Tc=Error(i(461)),st=!1;function vt(e,t,a,l){t.child=e===null?Bf(t,null,a,l):In(t,e.child,a,l)}function Dm(e,t,a,l,o){a=a.render;var c=t.ref;if("ref"in l){var h={};for(var b in l)b!=="ref"&&(h[b]=l[b])}else h=l;return Zn(t),l=oc(e,t,a,h,c,o),b=cc(),e!==null&&!st?(uc(e,t,o),Va(e,t,o)):(ke&&b&&Vo(t),t.flags|=1,vt(e,t,l,o),t.child)}function Um(e,t,a,l,o){if(e===null){var c=a.type;return typeof c=="function"&&!qo(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,Lm(e,t,c,l,o)):(e=Bs(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Dc(e,o)){var h=c.memoizedProps;if(a=a.compare,a=a!==null?a:Er,a(h,l)&&e.ref===t.ref)return Va(e,t,o)}return t.flags|=1,e=La(c,l),e.ref=t.ref,e.return=t,t.child=e}function Lm(e,t,a,l,o){if(e!==null){var c=e.memoizedProps;if(Er(c,l)&&e.ref===t.ref)if(st=!1,t.pendingProps=l=c,Dc(e,o))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,Va(e,t,o)}return Cc(e,t,a,l,o)}function Bm(e,t,a,l){var o=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~c}else l=0,t.child=null;return Hm(e,t,c,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qs(t,c!==null?c.cachePool:null),c!==null?Gf(t,c):lc(),Qf(t);else return l=t.lanes=536870912,Hm(e,t,c!==null?c.baseLanes|a:a,a,l)}else c!==null?(Qs(t,c.cachePool),Gf(t,c),pn(),t.memoizedState=null):(e!==null&&Qs(t,null),lc(),pn());return vt(e,t,o,a),t.child}function qr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Hm(e,t,a,l,o){var c=Io();return c=c===null?null:{parent:lt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Qs(t,null),lc(),Qf(t),e!==null&&Ol(e,t,l,!0),t.childLanes=o,null}function li(e,t){return t=si({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qm(e,t,a){return In(t,e.child,null,a),e=li(t,t.pendingProps),e.flags|=2,Xt(t),t.memoizedState=null,e}function gy(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(l.mode==="hidden")return e=li(t,l),t.lanes=536870912,qr(null,e);if(sc(t),(e=Ke)?(e=Ih(e,la),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sn!==null?{id:ja,overflow:Ea}:null,retryLane:536870912,hydrationErrors:null},a=Nf(e),a.return=t,t.child=a,gt=t,Ke=null)):e=null,e===null)throw cn(t);return t.lanes=536870912,null}return li(t,l)}var c=e.memoizedState;if(c!==null){var h=c.dehydrated;if(sc(t),o)if(t.flags&256)t.flags&=-257,t=qm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(st||Ol(e,t,a,!1),o=(a&e.childLanes)!==0,st||o){if(l=Xe,l!==null&&(h=At(l,a),h!==0&&h!==c.retryLane))throw c.retryLane=h,Yn(e,h),Bt(l,e,h),Tc;pi(),t=qm(e,t,a)}else e=c.treeContext,Ke=sa(h.nextSibling),gt=t,ke=!0,on=null,la=!1,e!==null&&Rf(t,e),t=li(t,l),t.flags|=4096;return t}return e=La(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ri(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Cc(e,t,a,l,o){return Zn(t),a=oc(e,t,a,l,void 0,o),l=cc(),e!==null&&!st?(uc(e,t,o),Va(e,t,o)):(ke&&l&&Vo(t),t.flags|=1,vt(e,t,a,o),t.child)}function Gm(e,t,a,l,o,c){return Zn(t),t.updateQueue=null,a=Yf(t,l,a,o),Vf(e),l=cc(),e!==null&&!st?(uc(e,t,c),Va(e,t,c)):(ke&&l&&Vo(t),t.flags|=1,vt(e,t,a,c),t.child)}function Qm(e,t,a,l,o){if(Zn(t),t.stateNode===null){var c=Cl,h=a.contextType;typeof h=="object"&&h!==null&&(c=xt(h)),c=new a(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Ec,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},ec(t),h=a.contextType,c.context=typeof h=="object"&&h!==null?xt(h):Cl,c.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(jc(t,a,h,l),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(h=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),h!==c.state&&Ec.enqueueReplaceState(c,c.state,null),Dr(t,l,c,o),kr(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,E=el(a,b);c.props=E;var D=c.context,Y=a.contextType;h=Cl,typeof Y=="object"&&Y!==null&&(h=xt(Y));var K=a.getDerivedStateFromProps;Y=typeof K=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,Y||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||D!==h)&&Cm(t,c,l,h),dn=!1;var U=t.memoizedState;c.state=U,Dr(t,l,c,o),kr(),D=t.memoizedState,b||U!==D||dn?(typeof K=="function"&&(jc(t,a,K,l),D=t.memoizedState),(E=dn||Tm(t,a,E,l,U,D,h))?(Y||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=D),c.props=l,c.state=D,c.context=h,l=E):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,tc(e,t),h=t.memoizedProps,Y=el(a,h),c.props=Y,K=t.pendingProps,U=c.context,D=a.contextType,E=Cl,typeof D=="object"&&D!==null&&(E=xt(D)),b=a.getDerivedStateFromProps,(D=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==K||U!==E)&&Cm(t,c,l,E),dn=!1,U=t.memoizedState,c.state=U,Dr(t,l,c,o),kr();var H=t.memoizedState;h!==K||U!==H||dn||e!==null&&e.dependencies!==null&&qs(e.dependencies)?(typeof b=="function"&&(jc(t,a,b,l),H=t.memoizedState),(Y=dn||Tm(t,a,Y,l,U,H,E)||e!==null&&e.dependencies!==null&&qs(e.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,H,E),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,H,E)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),c.props=l,c.state=H,c.context=E,l=Y):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,ri(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=In(t,e.child,null,o),t.child=In(t,null,a,o)):vt(e,t,a,o),t.memoizedState=c.state,e=t.child):e=Va(e,t,o),e}function Vm(e,t,a,l){return Xn(),t.flags|=256,vt(e,t,a,l),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mc(e){return{baseLanes:e,cachePool:Of()}}function Ac(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Zt),e}function Ym(e,t,a){var l=t.pendingProps,o=!1,c=(t.flags&128)!==0,h;if((h=c)||(h=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(o?hn(t):pn(),(e=Ke)?(e=Ih(e,la),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sn!==null?{id:ja,overflow:Ea}:null,retryLane:536870912,hydrationErrors:null},a=Nf(e),a.return=t,t.child=a,gt=t,Ke=null)):e=null,e===null)throw cn(t);return mu(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,o?(pn(),o=t.mode,b=si({mode:"hidden",children:b},o),l=Fn(l,o,a,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=Mc(a),l.childLanes=Ac(e,h,a),t.memoizedState=_c,qr(null,l)):(hn(t),Oc(t,b))}var E=e.memoizedState;if(E!==null&&(b=E.dehydrated,b!==null)){if(c)t.flags&256?(hn(t),t.flags&=-257,t=zc(e,t,a)):t.memoizedState!==null?(pn(),t.child=e.child,t.flags|=128,t=null):(pn(),b=l.fallback,o=t.mode,l=si({mode:"visible",children:l.children},o),b=Fn(b,o,a,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,In(t,e.child,null,a),l=t.child,l.memoizedState=Mc(a),l.childLanes=Ac(e,h,a),t.memoizedState=_c,t=qr(null,l));else if(hn(t),mu(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var D=h.dgst;h=D,l=Error(i(419)),l.stack="",l.digest=h,Cr({value:l,source:null,stack:null}),t=zc(e,t,a)}else if(st||Ol(e,t,a,!1),h=(a&e.childLanes)!==0,st||h){if(h=Xe,h!==null&&(l=At(h,a),l!==0&&l!==E.retryLane))throw E.retryLane=l,Yn(e,l),Bt(h,e,l),Tc;fu(b)||pi(),t=zc(e,t,a)}else fu(b)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Ke=sa(b.nextSibling),gt=t,ke=!0,on=null,la=!1,e!==null&&Rf(t,e),t=Oc(t,l.children),t.flags|=4096);return t}return o?(pn(),b=l.fallback,o=t.mode,E=e.child,D=E.sibling,l=La(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,D!==null?b=La(D,b):(b=Fn(b,o,a,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,qr(null,l),l=t.child,b=e.child.memoizedState,b===null?b=Mc(a):(o=b.cachePool,o!==null?(E=lt._currentValue,o=o.parent!==E?{parent:E,pool:E}:o):o=Of(),b={baseLanes:b.baseLanes|a,cachePool:o}),l.memoizedState=b,l.childLanes=Ac(e,h,a),t.memoizedState=_c,qr(e.child,l)):(hn(t),a=e.child,e=a.sibling,a=La(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Oc(e,t){return t=si({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function si(e,t){return e=Yt(22,e,null,t),e.lanes=0,e}function zc(e,t,a){return In(t,e.child,null,a),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Zo(e.return,t,a)}function kc(e,t,a,l,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:c}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=a,h.tailMode=o,h.treeForkCount=c)}function Xm(e,t,a){var l=t.pendingProps,o=l.revealOrder,c=l.tail;l=l.children;var h=tt.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,Q(tt,h),vt(e,t,l,a),l=ke?Tr:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fm(e,a,t);else if(e.tag===19)Fm(e,a,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(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Zs(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),kc(t,!1,o,a,c,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Zs(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}kc(t,!0,a,null,c,l);break;case"together":kc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Va(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ol(e,t,a,!1),(a&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,a=La(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=La(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&qs(e)))}function xy(e,t,a){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),un(t,lt,e.memoizedState.cache),Xn();break;case 27:case 5:W(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:un(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,sc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(hn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Ym(e,t,a):(hn(t),e=Va(e,t,a),e!==null?e.sibling:null);hn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Ol(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Xm(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Q(tt,tt.current),l)break;return null;case 22:return t.lanes=0,Bm(e,t,a,t.pendingProps);case 24:un(t,lt,e.memoizedState.cache)}return Va(e,t,a)}function Km(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!Dc(e,a)&&(t.flags&128)===0)return st=!1,xy(e,t,a);st=(e.flags&131072)!==0}else st=!1,ke&&(t.flags&1048576)!==0&&Ef(t,Tr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")qo(e)?(l=el(e,l),t.tag=1,t=Qm(null,t,e,l,a)):(t.tag=0,t=Cc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===L){t.tag=11,t=Dm(null,t,e,l,a);break e}else if(o===ee){t.tag=14,t=Um(null,t,e,l,a);break e}}throw t=De(e)||e,Error(i(306,t,""))}}return t;case 0:return Cc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=el(l,t.pendingProps),Qm(e,t,l,o,a);case 3:e:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(i(387));l=t.pendingProps;var c=t.memoizedState;o=c.element,tc(e,t),Dr(t,l,null,a);var h=t.memoizedState;if(l=h.cache,un(t,lt,l),l!==c.cache&&Jo(t,[lt],a,!0),kr(),l=h.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Vm(e,t,l,a);break e}else if(l!==o){o=ta(Error(i(424)),t),Cr(o),t=Vm(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=sa(e.firstChild),gt=t,ke=!0,on=null,la=!0,a=Bf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Xn(),l===o){t=Va(e,t,a);break e}vt(e,t,l,a)}t=t.child}return t;case 26:return ri(e,t),e===null?(a=lp(t.type,null,t.pendingProps,null))?t.memoizedState=a:ke||(a=t.type,e=t.pendingProps,l=wi(fe.current).createElement(a),l[pt]=t,l[Ot]=e,yt(l,a,e),mt(l),t.stateNode=l):t.memoizedState=lp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return W(t),e===null&&ke&&(l=t.stateNode=tp(t.type,t.pendingProps,fe.current),gt=t,la=!0,o=Ke,Nn(t.type)?(hu=o,Ke=sa(l.firstChild)):Ke=o),vt(e,t,t.pendingProps.children,a),ri(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((o=l=Ke)&&(l=Ky(l,t.type,t.pendingProps,la),l!==null?(t.stateNode=l,gt=t,Ke=sa(l.firstChild),la=!1,o=!0):o=!1),o||cn(t)),W(t),o=t.type,c=t.pendingProps,h=e!==null?e.memoizedProps:null,l=c.children,cu(o,c)?l=null:h!==null&&cu(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=oc(e,t,oy,null,null,a),ts._currentValue=o),ri(e,t),vt(e,t,l,a),t.child;case 6:return e===null&&ke&&((e=a=Ke)&&(a=Zy(a,t.pendingProps,la),a!==null?(t.stateNode=a,gt=t,Ke=null,e=!0):e=!1),e||cn(t)),null;case 13:return Ym(e,t,a);case 4:return be(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=In(t,null,l,a):vt(e,t,l,a),t.child;case 11:return Dm(e,t,t.type,t.pendingProps,a);case 7:return vt(e,t,t.pendingProps,a),t.child;case 8:return vt(e,t,t.pendingProps.children,a),t.child;case 12:return vt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,un(t,t.type,l.value),vt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Zn(t),o=xt(o),l=l(o),t.flags|=1,vt(e,t,l,a),t.child;case 14:return Um(e,t,t.type,t.pendingProps,a);case 15:return Lm(e,t,t.type,t.pendingProps,a);case 19:return Xm(e,t,a);case 31:return gy(e,t,a);case 22:return Bm(e,t,a,t.pendingProps);case 24:return Zn(t),l=xt(lt),e===null?(o=Io(),o===null&&(o=Xe,c=$o(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=a),o=c),t.memoizedState={parent:l,cache:o},ec(t),un(t,lt,o)):((e.lanes&a)!==0&&(tc(e,t),Dr(t,null,null,a),kr()),o=e.memoizedState,c=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),un(t,lt,l)):(l=c.cache,un(t,lt,l),l!==o.cache&&Jo(t,[lt],a,!0))),vt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ya(e){e.flags|=4}function Uc(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(bh())e.flags|=8192;else throw Pn=Ys,Wo}else e.flags&=-16777217}function Zm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!cp(t))if(bh())e.flags|=8192;else throw Pn=Ys,Wo}function ii(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?St():536870912,e.lanes|=t,Yl|=t)}function Gr(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function vy(e,t,a){var l=t.pendingProps;switch(Yo(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 a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),qa(lt),B(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Al(t)?Ya(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xo())),Ze(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(Ya(t),c!==null?(Ze(t),Zm(t,c)):(Ze(t),Uc(t,o,null,l,a))):c?c!==e.memoizedState?(Ya(t),Ze(t),Zm(t,c)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ya(t),Ze(t),Uc(t,o,e,l,a)),null;case 27:if(Ee(t),a=fe.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return Ze(t),null}e=J.current,Al(t)?Tf(t):(e=tp(o,l,a),t.stateNode=e,Ya(t))}return Ze(t),null;case 5:if(Ee(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return Ze(t),null}if(c=J.current,Al(t))Tf(t);else{var h=wi(fe.current);switch(c){case 1:c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=h.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?h.createElement(o,{is:l.is}):h.createElement(o)}}c[pt]=t,c[Ot]=l;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)c.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=c;e:switch(yt(c,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ya(t)}}return Ze(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Al(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=gt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[pt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Yh(e.nodeValue,a)),e||cn(t,!0)}else e=wi(e).createTextNode(l),e[pt]=t,t.stateNode=e}return Ze(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Al(t),a!==null){if(e===null){if(!l)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[pt]=t}else Xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else a=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Xt(t),t):(Xt(t),null);if((t.flags&128)!==0)throw Error(i(558))}return Ze(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Al(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(i(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));o[pt]=t}else Xn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),o=!1}else o=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Xt(t),t):(Xt(t),null)}return Xt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ii(t,t.updateQueue),Ze(t),null);case 4:return B(),e===null&&lu(t.stateNode.containerInfo),Ze(t),null;case 10:return qa(t.type),Ze(t),null;case 19:if(G(tt),l=t.memoizedState,l===null)return Ze(t),null;if(o=(t.flags&128)!==0,c=l.rendering,c===null)if(o)Gr(l,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Zs(e),c!==null){for(t.flags|=128,Gr(l,!1),e=c.updateQueue,t.updateQueue=e,ii(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)wf(a,e),a=a.sibling;return Q(tt,tt.current&1|2),ke&&Ba(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Et()>fi&&(t.flags|=128,o=!0,Gr(l,!1),t.lanes=4194304)}else{if(!o)if(e=Zs(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ii(t,e),Gr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!ke)return Ze(t),null}else 2*Et()-l.renderingStartTime>fi&&a!==536870912&&(t.flags|=128,o=!0,Gr(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Et(),e.sibling=null,a=tt.current,Q(tt,o?a&1|2:a&1),ke&&Ba(t,l.treeForkCount),e):(Ze(t),null);case 22:case 23:return Xt(t),rc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),a=t.updateQueue,a!==null&&ii(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&G(Jn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),qa(lt),Ze(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function yy(e,t){switch(Yo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qa(lt),B(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Xt(t),t.alternate===null)throw Error(i(340));Xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(tt),null;case 4:return B(),null;case 10:return qa(t.type),null;case 22:case 23:return Xt(t),rc(),e!==null&&G(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qa(lt),null;case 25:return null;default:return null}}function Jm(e,t){switch(Yo(t),t.tag){case 3:qa(lt),B();break;case 26:case 27:case 5:Ee(t);break;case 4:B();break;case 31:t.memoizedState!==null&&Xt(t);break;case 13:Xt(t);break;case 19:G(tt);break;case 10:qa(t.type);break;case 22:case 23:Xt(t),rc(),e!==null&&G(Jn);break;case 24:qa(lt)}}function Qr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var c=a.create,h=a.inst;l=c(),h.destroy=l}a=a.next}while(a!==o)}}catch(b){Ge(t,t.return,b)}}function gn(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){var h=l.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,o=t;var E=a,D=b;try{D()}catch(Y){Ge(o,E,Y)}}}l=l.next}while(l!==c)}}catch(Y){Ge(t,t.return,Y)}}function $m(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{qf(t,a)}catch(l){Ge(e,e.return,l)}}}function Pm(e,t,a){a.props=el(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ge(e,t,l)}}function Vr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Ge(e,t,o)}}function Ra(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Ge(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ge(e,t,o)}else a.current=null}function Im(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Ge(e,e.return,o)}}function Lc(e,t,a){try{var l=e.stateNode;Gy(l,e.type,a,t),l[Ot]=t}catch(o){Ge(e,e.return,o)}}function Wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Nn(e.type)||e.tag===4}function Bc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wm(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&&Nn(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 Hc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Da));else if(l!==4&&(l===27&&Nn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,a),e=e.sibling;e!==null;)Hc(e,t,a),e=e.sibling}function oi(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Nn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(oi(e,t,a),e=e.sibling;e!==null;)oi(e,t,a),e=e.sibling}function eh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);yt(t,l,a),t[pt]=e,t[Ot]=a}catch(c){Ge(e,e.return,c)}}var Fa=!1,it=!1,qc=!1,th=typeof WeakSet=="function"?WeakSet:Set,ht=null;function by(e,t){if(e=e.containerInfo,iu=_i,e=mf(e),zo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var h=0,b=-1,E=-1,D=0,Y=0,K=e,U=null;t:for(;;){for(var H;K!==a||o!==0&&K.nodeType!==3||(b=h+o),K!==c||l!==0&&K.nodeType!==3||(E=h+l),K.nodeType===3&&(h+=K.nodeValue.length),(H=K.firstChild)!==null;)U=K,K=H;for(;;){if(K===e)break t;if(U===a&&++D===o&&(b=h),U===c&&++Y===l&&(E=h),(H=K.nextSibling)!==null)break;K=U,U=K.parentNode}K=H}a=b===-1||E===-1?null:{start:b,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(ou={focusedElem:e,selectionRange:a},_i=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,o=c.memoizedProps,c=c.memoizedState,l=a.stateNode;try{var ie=el(a.type,o);e=l.getSnapshotBeforeUpdate(ie,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Ge(a,a.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)du(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":du(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,ht=e;break}ht=t.return}}function ah(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ka(e,a),l&4&&Qr(5,a);break;case 1:if(Ka(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ge(a,a.return,h)}else{var o=el(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ge(a,a.return,h)}}l&64&&$m(a),l&512&&Vr(a,a.return);break;case 3:if(Ka(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{qf(e,t)}catch(h){Ge(a,a.return,h)}}break;case 27:t===null&&l&4&&eh(a);case 26:case 5:Ka(e,a),t===null&&l&4&&Im(a),l&512&&Vr(a,a.return);break;case 12:Ka(e,a);break;case 31:Ka(e,a),l&4&&rh(e,a);break;case 13:Ka(e,a),l&4&&sh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=_y.bind(null,a),Jy(e,a))));break;case 22:if(l=a.memoizedState!==null||Fa,!l){t=t!==null&&t.memoizedState!==null||it,o=Fa;var c=it;Fa=l,(it=t)&&!c?Za(e,a,(a.subtreeFlags&8772)!==0):Ka(e,a),Fa=o,it=c}break;case 30:break;default:Ka(e,a)}}function nh(e){var t=e.alternate;t!==null&&(e.alternate=null,nh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&go(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 $e=null,kt=!1;function Xa(e,t,a){for(a=a.child;a!==null;)lh(e,t,a),a=a.sibling}function lh(e,t,a){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Ln,a)}catch{}switch(a.tag){case 26:it||Ra(a,t),Xa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:it||Ra(a,t);var l=$e,o=kt;Nn(a.type)&&($e=a.stateNode,kt=!1),Xa(e,t,a),Ir(a.stateNode),$e=l,kt=o;break;case 5:it||Ra(a,t);case 6:if(l=$e,o=kt,$e=null,Xa(e,t,a),$e=l,kt=o,$e!==null)if(kt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(c){Ge(a,t,c)}else try{$e.removeChild(a.stateNode)}catch(c){Ge(a,t,c)}break;case 18:$e!==null&&(kt?(e=$e,$h(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Il(e)):$h($e,a.stateNode));break;case 4:l=$e,o=kt,$e=a.stateNode.containerInfo,kt=!0,Xa(e,t,a),$e=l,kt=o;break;case 0:case 11:case 14:case 15:gn(2,a,t),it||gn(4,a,t),Xa(e,t,a);break;case 1:it||(Ra(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Pm(a,t,l)),Xa(e,t,a);break;case 21:Xa(e,t,a);break;case 22:it=(l=it)||a.memoizedState!==null,Xa(e,t,a),it=l;break;default:Xa(e,t,a)}}function rh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Il(e)}catch(a){Ge(t,t.return,a)}}}function sh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Il(e)}catch(a){Ge(t,t.return,a)}}function Sy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new th),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new th),t;default:throw Error(i(435,e.tag))}}function ci(e,t){var a=Sy(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=My.bind(null,e,l);l.then(o,o)}})}function Dt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],c=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(Nn(b.type)){$e=b.stateNode,kt=!1;break e}break;case 5:$e=b.stateNode,kt=!1;break e;case 3:case 4:$e=b.stateNode.containerInfo,kt=!0;break e}b=b.return}if($e===null)throw Error(i(160));lh(c,h,o),$e=null,kt=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ih(t,e),t=t.sibling}var pa=null;function ih(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(t,e),Ut(e),l&4&&(gn(3,e,e.return),Qr(3,e),gn(5,e,e.return));break;case 1:Dt(t,e),Ut(e),l&512&&(it||a===null||Ra(a,a.return)),l&64&&Fa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=pa;if(Dt(t,e),Ut(e),l&512&&(it||a===null||Ra(a,a.return)),l&4){var c=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":c=o.getElementsByTagName("title")[0],(!c||c[gr]||c[pt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(l),o.head.insertBefore(c,o.querySelector("head > title"))),yt(c,l,a),c[pt]=e,mt(c),l=c;break e;case"link":var h=ip("link","href",o).get(l+(a.href||""));if(h){for(var b=0;b<h.length;b++)if(c=h[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(b,1);break t}}c=o.createElement(l),yt(c,l,a),o.head.appendChild(c);break;case"meta":if(h=ip("meta","content",o).get(l+(a.content||""))){for(b=0;b<h.length;b++)if(c=h[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(b,1);break t}}c=o.createElement(l),yt(c,l,a),o.head.appendChild(c);break;default:throw Error(i(468,l))}c[pt]=e,mt(c),l=c}e.stateNode=l}else op(o,e.type,e.stateNode);else e.stateNode=sp(o,l,e.memoizedProps);else c!==l?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,l===null?op(o,e.type,e.stateNode):sp(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Lc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Dt(t,e),Ut(e),l&512&&(it||a===null||Ra(a,a.return)),a!==null&&l&4&&Lc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Dt(t,e),Ut(e),l&512&&(it||a===null||Ra(a,a.return)),e.flags&32){o=e.stateNode;try{Sl(o,"")}catch(ie){Ge(e,e.return,ie)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Lc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(qc=!0);break;case 6:if(Dt(t,e),Ut(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ie){Ge(e,e.return,ie)}}break;case 3:if(Ei=null,o=pa,pa=Ni(t.containerInfo),Dt(t,e),pa=o,Ut(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Il(t.containerInfo)}catch(ie){Ge(e,e.return,ie)}qc&&(qc=!1,oh(e));break;case 4:l=pa,pa=Ni(e.stateNode.containerInfo),Dt(t,e),Ut(e),pa=l;break;case 12:Dt(t,e),Ut(e);break;case 31:Dt(t,e),Ut(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 13:Dt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(di=Et()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 22:o=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,D=Fa,Y=it;if(Fa=D||o,it=Y||E,Dt(t,e),it=Y,Fa=D,Ut(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||E||Fa||it||tl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(c=E.stateNode,o)h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=E.stateNode;var K=E.memoizedProps.style,U=K!=null&&K.hasOwnProperty("display")?K.display:null;b.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){Ge(E,E.return,ie)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(ie){Ge(E,E.return,ie)}}}else if(t.tag===18){if(a===null){E=t;try{var H=E.stateNode;o?Ph(H,!0):Ph(E.stateNode,!1)}catch(ie){Ge(E,E.return,ie)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,ci(e,a))));break;case 19:Dt(t,e),Ut(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 30:break;case 21:break;default:Dt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Wm(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var o=a.stateNode,c=Bc(e);oi(e,c,o);break;case 5:var h=a.stateNode;a.flags&32&&(Sl(h,""),a.flags&=-33);var b=Bc(e);oi(e,b,h);break;case 3:case 4:var E=a.stateNode.containerInfo,D=Bc(e);Hc(e,D,E);break;default:throw Error(i(161))}}catch(Y){Ge(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function oh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;oh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ah(e,t.alternate,t),t=t.sibling}function tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:gn(4,t,t.return),tl(t);break;case 1:Ra(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Pm(t,t.return,a),tl(t);break;case 27:Ir(t.stateNode);case 26:case 5:Ra(t,t.return),tl(t);break;case 22:t.memoizedState===null&&tl(t);break;case 30:tl(t);break;default:tl(t)}e=e.sibling}}function Za(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,c=t,h=c.flags;switch(c.tag){case 0:case 11:case 15:Za(o,c,a),Qr(4,c);break;case 1:if(Za(o,c,a),l=c,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){Ge(l,l.return,D)}if(l=c,o=l.updateQueue,o!==null){var b=l.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)Hf(E[o],b)}catch(D){Ge(l,l.return,D)}}a&&h&64&&$m(c),Vr(c,c.return);break;case 27:eh(c);case 26:case 5:Za(o,c,a),a&&l===null&&h&4&&Im(c),Vr(c,c.return);break;case 12:Za(o,c,a);break;case 31:Za(o,c,a),a&&h&4&&rh(o,c);break;case 13:Za(o,c,a),a&&h&4&&sh(o,c);break;case 22:c.memoizedState===null&&Za(o,c,a),Vr(c,c.return);break;case 30:break;default:Za(o,c,a)}t=t.sibling}}function Gc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&_r(a))}function Qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e))}function ga(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ch(e,t,a,l),t=t.sibling}function ch(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ga(e,t,a,l),o&2048&&Qr(9,t);break;case 1:ga(e,t,a,l);break;case 3:ga(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e)));break;case 12:if(o&2048){ga(e,t,a,l),e=t.stateNode;try{var c=t.memoizedProps,h=c.id,b=c.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Ge(t,t.return,E)}}else ga(e,t,a,l);break;case 31:ga(e,t,a,l);break;case 13:ga(e,t,a,l);break;case 23:break;case 22:c=t.stateNode,h=t.alternate,t.memoizedState!==null?c._visibility&2?ga(e,t,a,l):Yr(e,t):c._visibility&2?ga(e,t,a,l):(c._visibility|=2,Gl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Gc(h,t);break;case 24:ga(e,t,a,l),o&2048&&Qc(t.alternate,t);break;default:ga(e,t,a,l)}}function Gl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,h=t,b=a,E=l,D=h.flags;switch(h.tag){case 0:case 11:case 15:Gl(c,h,b,E,o),Qr(8,h);break;case 23:break;case 22:var Y=h.stateNode;h.memoizedState!==null?Y._visibility&2?Gl(c,h,b,E,o):Yr(c,h):(Y._visibility|=2,Gl(c,h,b,E,o)),o&&D&2048&&Gc(h.alternate,h);break;case 24:Gl(c,h,b,E,o),o&&D&2048&&Qc(h.alternate,h);break;default:Gl(c,h,b,E,o)}t=t.sibling}}function Yr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Yr(a,l),o&2048&&Gc(l.alternate,l);break;case 24:Yr(a,l),o&2048&&Qc(l.alternate,l);break;default:Yr(a,l)}t=t.sibling}}var Fr=8192;function Ql(e,t,a){if(e.subtreeFlags&Fr)for(e=e.child;e!==null;)uh(e,t,a),e=e.sibling}function uh(e,t,a){switch(e.tag){case 26:Ql(e,t,a),e.flags&Fr&&e.memoizedState!==null&&i0(a,pa,e.memoizedState,e.memoizedProps);break;case 5:Ql(e,t,a);break;case 3:case 4:var l=pa;pa=Ni(e.stateNode.containerInfo),Ql(e,t,a),pa=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Fr,Fr=16777216,Ql(e,t,a),Fr=l):Ql(e,t,a));break;default:Ql(e,t,a)}}function dh(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 Xr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,mh(l,e)}dh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fh(e),e=e.sibling}function fh(e){switch(e.tag){case 0:case 11:case 15:Xr(e),e.flags&2048&&gn(9,e,e.return);break;case 3:Xr(e);break;case 12:Xr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ui(e)):Xr(e);break;default:Xr(e)}}function ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,mh(l,e)}dh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gn(8,t,t.return),ui(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ui(t));break;default:ui(t)}e=e.sibling}}function mh(e,t){for(;ht!==null;){var a=ht;switch(a.tag){case 0:case 11:case 15:gn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:_r(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ht=l;else e:for(a=e;ht!==null;){l=ht;var o=l.sibling,c=l.return;if(nh(l),l===a){ht=null;break e}if(o!==null){o.return=c,ht=o;break e}ht=c}}}var wy={getCacheForType:function(e){var t=xt(lt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return xt(lt).controller.signal}},Ny=typeof WeakMap=="function"?WeakMap:Map,He=0,Xe=null,_e=null,Oe=0,qe=0,Kt=null,xn=!1,Vl=!1,Vc=!1,Ja=0,et=0,vn=0,al=0,Yc=0,Zt=0,Yl=0,Kr=null,Lt=null,Fc=!1,di=0,hh=0,fi=1/0,mi=null,yn=null,ct=0,bn=null,Fl=null,$a=0,Xc=0,Kc=null,ph=null,Zr=0,Zc=null;function Jt(){return(He&2)!==0&&Oe!==0?Oe&-Oe:O.T!==null?eu():ho()}function gh(){if(Zt===0)if((Oe&536870912)===0||ke){var e=ml;ml<<=1,(ml&3932160)===0&&(ml=262144),Zt=e}else Zt=536870912;return e=Ft.current,e!==null&&(e.flags|=32),Zt}function Bt(e,t,a){(e===Xe&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(Xl(e,0),Sn(e,Oe,Zt,!1)),Ie(e,a),((He&2)===0||e!==Xe)&&(e===Xe&&((He&2)===0&&(al|=a),et===4&&Sn(e,Oe,Zt,!1)),Ta(e))}function xh(e,t,a){if((He&6)!==0)throw Error(i(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Je(e,t),o=l?Ry(e,t):$c(e,t,!0),c=l;do{if(o===0){Vl&&!l&&Sn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!jy(a)){o=$c(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)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;o=Kr;var E=b.current.memoizedState.isDehydrated;if(E&&(Xl(b,h).flags|=256),h=$c(b,h,!1),h!==2){if(Vc&&!E){b.errorRecoveryDisabledLanes|=c,al|=c,o=4;break e}c=Lt,Lt=o,c!==null&&(Lt===null?Lt=c:Lt.push.apply(Lt,c))}o=h}if(c=!1,o!==2)continue}}if(o===1){Xl(e,0),Sn(e,t,0,!0);break}e:{switch(l=e,c=o,c){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Sn(l,t,Zt,!xn);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(o=di+300-Et(),10<o)){if(Sn(l,t,Zt,!xn),ye(l,0,!0)!==0)break e;$a=t,l.timeoutHandle=Zh(vh.bind(null,l,a,Lt,mi,Fc,t,Zt,al,Yl,xn,c,"Throttled",-0,0),o);break e}vh(l,a,Lt,mi,Fc,t,Zt,al,Yl,xn,c,null,-0,0)}}break}while(!0);Ta(e)}function vh(e,t,a,l,o,c,h,b,E,D,Y,K,U,H){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Da},uh(t,c,K);var ie=(c&62914560)===c?di-Et():(c&4194048)===c?hh-Et():0;if(ie=o0(K,ie),ie!==null){$a=c,e.cancelPendingCommit=ie(Rh.bind(null,e,t,c,a,l,o,h,b,E,Y,K,null,U,H)),Sn(e,c,h,!D);return}}Rh(e,t,c,a,l,o,h,b,E)}function jy(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],c=o.getSnapshot;o=o.value;try{if(!Vt(c(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Sn(e,t,a,l){t&=~Yc,t&=~al,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var c=31-bt(o),h=1<<c;l[c]=-1,o&=~h}a!==0&&Hn(e,a,t)}function hi(){return(He&6)===0?(Jr(0),!1):!0}function Jc(){if(_e!==null){if(qe===0)var e=_e.return;else e=_e,Ha=Kn=null,dc(e),Ul=null,Ar=0,e=_e;for(;e!==null;)Jm(e.alternate,e),e=e.return;_e=null}}function Xl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Yy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),$a=0,Jc(),Xe=e,_e=a=La(e.current,null),Oe=t,qe=0,Kt=null,xn=!1,Vl=Je(e,t),Vc=!1,Yl=Zt=Yc=al=vn=et=0,Lt=Kr=null,Fc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-bt(l),c=1<<o;t|=e[o],l&=~c}return Ja=t,Ds(),a}function yh(e,t){we=null,O.H=Hr,t===Dl||t===Vs?(t=Df(),qe=3):t===Wo?(t=Df(),qe=4):qe=t===Tc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,_e===null&&(et=1,ni(e,ta(t,e.current)))}function bh(){var e=Ft.current;return e===null?!0:(Oe&4194048)===Oe?ra===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===ra:!1}function Sh(){var e=O.H;return O.H=Hr,e===null?Hr:e}function wh(){var e=O.A;return O.A=wy,e}function pi(){et=4,xn||(Oe&4194048)!==Oe&&Ft.current!==null||(Vl=!0),(vn&134217727)===0&&(al&134217727)===0||Xe===null||Sn(Xe,Oe,Zt,!1)}function $c(e,t,a){var l=He;He|=2;var o=Sh(),c=wh();(Xe!==e||Oe!==t)&&(mi=null,Xl(e,t)),t=!1;var h=et;e:do try{if(qe!==0&&_e!==null){var b=_e,E=Kt;switch(qe){case 8:Jc(),h=6;break e;case 3:case 2:case 9:case 6:Ft.current===null&&(t=!0);var D=qe;if(qe=0,Kt=null,Kl(e,b,E,D),a&&Vl){h=0;break e}break;default:D=qe,qe=0,Kt=null,Kl(e,b,E,D)}}Ey(),h=et;break}catch(Y){yh(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Ha=Kn=null,He=l,O.H=o,O.A=c,_e===null&&(Xe=null,Oe=0,Ds()),h}function Ey(){for(;_e!==null;)Nh(_e)}function Ry(e,t){var a=He;He|=2;var l=Sh(),o=wh();Xe!==e||Oe!==t?(mi=null,fi=Et()+500,Xl(e,t)):Vl=Je(e,t);e:do try{if(qe!==0&&_e!==null){t=_e;var c=Kt;t:switch(qe){case 1:qe=0,Kt=null,Kl(e,t,c,1);break;case 2:case 9:if(zf(c)){qe=0,Kt=null,jh(t);break}t=function(){qe!==2&&qe!==9||Xe!==e||(qe=7),Ta(e)},c.then(t,t);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:zf(c)?(qe=0,Kt=null,jh(t)):(qe=0,Kt=null,Kl(e,t,c,7));break;case 5:var h=null;switch(_e.tag){case 26:h=_e.memoizedState;case 5:case 27:var b=_e;if(h?cp(h):b.stateNode.complete){qe=0,Kt=null;var E=b.sibling;if(E!==null)_e=E;else{var D=b.return;D!==null?(_e=D,gi(D)):_e=null}break t}}qe=0,Kt=null,Kl(e,t,c,5);break;case 6:qe=0,Kt=null,Kl(e,t,c,6);break;case 8:Jc(),et=6;break e;default:throw Error(i(462))}}Ty();break}catch(Y){yh(e,Y)}while(!0);return Ha=Kn=null,O.H=l,O.A=o,He=a,_e!==null?0:(Xe=null,Oe=0,Ds(),et)}function Ty(){for(;_e!==null&&!jt();)Nh(_e)}function Nh(e){var t=Km(e.alternate,e,Ja);e.memoizedProps=e.pendingProps,t===null?gi(e):_e=t}function jh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Gm(a,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Gm(a,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:dc(t);default:Jm(a,t),t=_e=wf(t,Ja),t=Km(a,t,Ja)}e.memoizedProps=e.pendingProps,t===null?gi(e):_e=t}function Kl(e,t,a,l){Ha=Kn=null,dc(t),Ul=null,Ar=0;var o=t.return;try{if(py(e,o,t,a,Oe)){et=1,ni(e,ta(a,e.current)),_e=null;return}}catch(c){if(o!==null)throw _e=o,c;et=1,ni(e,ta(a,e.current)),_e=null;return}t.flags&32768?(ke||l===1?e=!0:Vl||(Oe&536870912)!==0?e=!1:(xn=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ft.current,l!==null&&l.tag===13&&(l.flags|=16384))),Eh(t,e)):gi(t)}function gi(e){var t=e;do{if((t.flags&32768)!==0){Eh(t,xn);return}e=t.return;var a=vy(t.alternate,t,Ja);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);et===0&&(et=5)}function Eh(e,t){do{var a=yy(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);et=6,_e=null}function Rh(e,t,a,l,o,c,h,b,E){e.cancelPendingCommit=null;do xi();while(ct!==0);if((He&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(c=t.lanes|t.childLanes,c|=Bo,_t(e,a,c,h,b,E),e===Xe&&(_e=Xe=null,Oe=0),Fl=t,bn=e,$a=a,Xc=c,Kc=o,ph=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ay(Un,function(){return Ah(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,o=Z.p,Z.p=2,h=He,He|=4;try{by(e,t,a)}finally{He=h,Z.p=o,O.T=l}}ct=1,Th(),Ch(),_h()}}function Th(){if(ct===1){ct=0;var e=bn,t=Fl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var l=Z.p;Z.p=2;var o=He;He|=4;try{ih(t,e);var c=ou,h=mf(e.containerInfo),b=c.focusedElem,E=c.selectionRange;if(h!==b&&b&&b.ownerDocument&&ff(b.ownerDocument.documentElement,b)){if(E!==null&&zo(b)){var D=E.start,Y=E.end;if(Y===void 0&&(Y=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(Y,b.value.length);else{var K=b.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var H=U.getSelection(),ie=b.textContent.length,pe=Math.min(E.start,ie),Ye=E.end===void 0?pe:Math.min(E.end,ie);!H.extend&&pe>Ye&&(h=Ye,Ye=pe,pe=h);var A=df(b,pe),C=df(b,Ye);if(A&&C&&(H.rangeCount!==1||H.anchorNode!==A.node||H.anchorOffset!==A.offset||H.focusNode!==C.node||H.focusOffset!==C.offset)){var k=K.createRange();k.setStart(A.node,A.offset),H.removeAllRanges(),pe>Ye?(H.addRange(k),H.extend(C.node,C.offset)):(k.setEnd(C.node,C.offset),H.addRange(k))}}}}for(K=[],H=b;H=H.parentNode;)H.nodeType===1&&K.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<K.length;b++){var F=K[b];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}_i=!!iu,ou=iu=null}finally{He=o,Z.p=l,O.T=a}}e.current=t,ct=2}}function Ch(){if(ct===2){ct=0;var e=bn,t=Fl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var l=Z.p;Z.p=2;var o=He;He|=4;try{ah(e,t.alternate,t)}finally{He=o,Z.p=l,O.T=a}}ct=3}}function _h(){if(ct===4||ct===3){ct=0,tn();var e=bn,t=Fl,a=$a,l=ph;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,Fl=bn=null,Mh(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(yn=null),ma(a),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Ln,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=O.T,o=Z.p,Z.p=2,O.T=null;try{for(var c=e.onRecoverableError,h=0;h<l.length;h++){var b=l[h];c(b.value,{componentStack:b.stack})}}finally{O.T=t,Z.p=o}}($a&3)!==0&&xi(),Ta(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Zc?Zr++:(Zr=0,Zc=e):Zr=0,Jr(0)}}function Mh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_r(t)))}function xi(){return Th(),Ch(),_h(),Ah()}function Ah(){if(ct!==5)return!1;var e=bn,t=Xc;Xc=0;var a=ma($a),l=O.T,o=Z.p;try{Z.p=32>a?32:a,O.T=null,a=Kc,Kc=null;var c=bn,h=$a;if(ct=0,Fl=bn=null,$a=0,(He&6)!==0)throw Error(i(331));var b=He;if(He|=4,fh(c.current),ch(c,c.current,h,a),He=b,Jr(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Ln,c)}catch{}return!0}finally{Z.p=o,O.T=l,Mh(e,t)}}function Oh(e,t,a){t=ta(a,t),t=Rc(e.stateNode,t,2),e=mn(e,t,2),e!==null&&(Ie(e,2),Ta(e))}function Ge(e,t,a){if(e.tag===3)Oh(e,e,a);else for(;t!==null;){if(t.tag===3){Oh(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(yn===null||!yn.has(l))){e=ta(a,e),a=zm(2),l=mn(t,a,2),l!==null&&(km(a,l,t,e),Ie(l,2),Ta(l));break}}t=t.return}}function Pc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ny;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Vc=!0,o.add(a),e=Cy.bind(null,e,t,a),t.then(e,e))}function Cy(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(Oe&a)===a&&(et===4||et===3&&(Oe&62914560)===Oe&&300>Et()-di?(He&2)===0&&Xl(e,0):Yc|=a,Yl===Oe&&(Yl=0)),Ta(e)}function zh(e,t){t===0&&(t=St()),e=Yn(e,t),e!==null&&(Ie(e,t),Ta(e))}function _y(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),zh(e,a)}function My(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(t),zh(e,a)}function Ay(e,t){return fr(e,t)}var vi=null,Zl=null,Ic=!1,yi=!1,Wc=!1,wn=0;function Ta(e){e!==Zl&&e.next===null&&(Zl===null?vi=Zl=e:Zl=Zl.next=e),yi=!0,Ic||(Ic=!0,zy())}function Jr(e,t){if(!Wc&&yi){Wc=!0;do for(var a=!1,l=vi;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var c=0;else{var h=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-bt(42|e)+1)-1,c&=o&~(h&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Lh(l,c))}else c=Oe,c=ye(l,l===Xe?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Je(l,c)||(a=!0,Lh(l,c));l=l.next}while(a);Wc=!1}}function Oy(){kh()}function kh(){yi=Ic=!1;var e=0;wn!==0&&Vy()&&(e=wn);for(var t=Et(),a=null,l=vi;l!==null;){var o=l.next,c=Dh(l,t);c===0?(l.next=null,a===null?vi=o:a.next=o,o===null&&(Zl=a)):(a=l,(e!==0||(c&3)!==0)&&(yi=!0)),l=o}ct!==0&&ct!==5||Jr(e),wn!==0&&(wn=0)}function Dh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var h=31-bt(c),b=1<<h,E=o[h];E===-1?((b&a)===0||(b&l)!==0)&&(o[h]=ft(b,t)):E<=t&&(e.expiredLanes|=b),c&=~b}if(t=Xe,a=Oe,a=ye(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&mr(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Je(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&mr(l),ma(a)){case 2:case 8:a=ws;break;case 32:a=Un;break;case 268435456:a=za;break;default:a=Un}return l=Uh.bind(null,e),a=fr(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&mr(l),e.callbackPriority=2,e.callbackNode=null,2}function Uh(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xi()&&e.callbackNode!==a)return null;var l=Oe;return l=ye(e,e===Xe?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(xh(e,l,t),Dh(e,Et()),e.callbackNode!=null&&e.callbackNode===a?Uh.bind(null,e):null)}function Lh(e,t){if(xi())return null;xh(e,t,!0)}function zy(){Fy(function(){(He&6)!==0?fr(Dn,Oy):kh()})}function eu(){if(wn===0){var e=zl;e===0&&(e=fl,fl<<=1,(fl&261888)===0&&(fl=256)),wn=e}return wn}function Bh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ts(""+e)}function Hh(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function ky(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var c=Bh((o[Ot]||null).action),h=l.submitter;h&&(t=(t=h[Ot]||null)?Bh(t.formAction):h.getAttribute("formAction"),t!==null&&(c=t,h=null));var b=new As("action","action",null,l,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(wn!==0){var E=h?Hh(o,h):new FormData(o);bc(a,{pending:!0,data:E,method:o.method,action:c},null,E)}}else typeof c=="function"&&(b.preventDefault(),E=h?Hh(o,h):new FormData(o),bc(a,{pending:!0,data:E,method:o.method,action:c},c,E))},currentTarget:o}]})}}for(var tu=0;tu<Lo.length;tu++){var au=Lo[tu],Dy=au.toLowerCase(),Uy=au[0].toUpperCase()+au.slice(1);ha(Dy,"on"+Uy)}ha(gf,"onAnimationEnd"),ha(xf,"onAnimationIteration"),ha(vf,"onAnimationStart"),ha("dblclick","onDoubleClick"),ha("focusin","onFocus"),ha("focusout","onBlur"),ha(Iv,"onTransitionRun"),ha(Wv,"onTransitionStart"),ha(ey,"onTransitionCancel"),ha(yf,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $r="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(" "),Ly=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($r));function qh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var h=l.length-1;0<=h;h--){var b=l[h],E=b.instance,D=b.currentTarget;if(b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=D;try{c(o)}catch(Y){ks(Y)}o.currentTarget=null,c=E}else for(h=0;h<l.length;h++){if(b=l[h],E=b.instance,D=b.currentTarget,b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=D;try{c(o)}catch(Y){ks(Y)}o.currentTarget=null,c=E}}}}function Me(e,t){var a=t[po];a===void 0&&(a=t[po]=new Set);var l=e+"__bubble";a.has(l)||(Gh(t,e,2,!1),a.add(l))}function nu(e,t,a){var l=0;t&&(l|=4),Gh(a,e,l,t)}var bi="_reactListening"+Math.random().toString(36).slice(2);function lu(e){if(!e[bi]){e[bi]=!0,zd.forEach(function(a){a!=="selectionchange"&&(Ly.has(a)||nu(a,!1,e),nu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bi]||(t[bi]=!0,nu("selectionchange",!1,t))}}function Gh(e,t,a,l){switch(gp(t)){case 2:var o=d0;break;case 8:o=f0;break;default:o=yu}a=o.bind(null,t,a,e),o=void 0,!jo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function ru(e,t,a,l,o){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var b=l.stateNode.containerInfo;if(b===o)break;if(h===4)for(h=l.return;h!==null;){var E=h.tag;if((E===3||E===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;b!==null;){if(h=gl(b),h===null)return;if(E=h.tag,E===5||E===6||E===26||E===27){l=c=h;continue e}b=b.parentNode}}l=l.return}Fd(function(){var D=c,Y=wo(a),K=[];e:{var U=bf.get(e);if(U!==void 0){var H=As,ie=e;switch(e){case"keypress":if(_s(a)===0)break e;case"keydown":case"keyup":H=Mv;break;case"focusin":ie="focus",H=Co;break;case"focusout":ie="blur",H=Co;break;case"beforeblur":case"afterblur":H=Co;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Zd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=vv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=zv;break;case gf:case xf:case vf:H=Sv;break;case yf:H=Dv;break;case"scroll":case"scrollend":H=gv;break;case"wheel":H=Lv;break;case"copy":case"cut":case"paste":H=Nv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=$d;break;case"toggle":case"beforetoggle":H=Hv}var pe=(t&4)!==0,Ye=!pe&&(e==="scroll"||e==="scrollend"),A=pe?U!==null?U+"Capture":null:U;pe=[];for(var C=D,k;C!==null;){var F=C;if(k=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||k===null||A===null||(F=vr(C,A),F!=null&&pe.push(Pr(C,F,k))),Ye)break;C=C.return}0<pe.length&&(U=new H(U,ie,null,a,Y),K.push({event:U,listeners:pe}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",U&&a!==So&&(ie=a.relatedTarget||a.fromElement)&&(gl(ie)||ie[pl]))break e;if((H||U)&&(U=Y.window===Y?Y:(U=Y.ownerDocument)?U.defaultView||U.parentWindow:window,H?(ie=a.relatedTarget||a.toElement,H=D,ie=ie?gl(ie):null,ie!==null&&(Ye=f(ie),pe=ie.tag,ie!==Ye||pe!==5&&pe!==27&&pe!==6)&&(ie=null)):(H=null,ie=D),H!==ie)){if(pe=Zd,F="onMouseLeave",A="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(pe=$d,F="onPointerLeave",A="onPointerEnter",C="pointer"),Ye=H==null?U:xr(H),k=ie==null?U:xr(ie),U=new pe(F,C+"leave",H,a,Y),U.target=Ye,U.relatedTarget=k,F=null,gl(Y)===D&&(pe=new pe(A,C+"enter",ie,a,Y),pe.target=k,pe.relatedTarget=Ye,F=pe),Ye=F,H&&ie)t:{for(pe=By,A=H,C=ie,k=0,F=A;F;F=pe(F))k++;F=0;for(var me=C;me;me=pe(me))F++;for(;0<k-F;)A=pe(A),k--;for(;0<F-k;)C=pe(C),F--;for(;k--;){if(A===C||C!==null&&A===C.alternate){pe=A;break t}A=pe(A),C=pe(C)}pe=null}else pe=null;H!==null&&Qh(K,U,H,pe,!1),ie!==null&&Ye!==null&&Qh(K,Ye,ie,pe,!0)}}e:{if(U=D?xr(D):window,H=U.nodeName&&U.nodeName.toLowerCase(),H==="select"||H==="input"&&U.type==="file")var Ue=lf;else if(af(U))if(rf)Ue=Jv;else{Ue=Kv;var ue=Xv}else H=U.nodeName,!H||H.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&bo(D.elementType)&&(Ue=lf):Ue=Zv;if(Ue&&(Ue=Ue(e,D))){nf(K,Ue,a,Y);break e}ue&&ue(e,U,D),e==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&yo(U,"number",U.value)}switch(ue=D?xr(D):window,e){case"focusin":(af(ue)||ue.contentEditable==="true")&&(El=ue,ko=D,Rr=null);break;case"focusout":Rr=ko=El=null;break;case"mousedown":Do=!0;break;case"contextmenu":case"mouseup":case"dragend":Do=!1,hf(K,a,Y);break;case"selectionchange":if(Pv)break;case"keydown":case"keyup":hf(K,a,Y)}var je;if(Mo)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else jl?ef(e,a)&&(ze="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ze="onCompositionStart");ze&&(Pd&&a.locale!=="ko"&&(jl||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&jl&&(je=Xd()):(rn=Y,Eo="value"in rn?rn.value:rn.textContent,jl=!0)),ue=Si(D,ze),0<ue.length&&(ze=new Jd(ze,e,null,a,Y),K.push({event:ze,listeners:ue}),je?ze.data=je:(je=tf(a),je!==null&&(ze.data=je)))),(je=Gv?Qv(e,a):Vv(e,a))&&(ze=Si(D,"onBeforeInput"),0<ze.length&&(ue=new Jd("onBeforeInput","beforeinput",null,a,Y),K.push({event:ue,listeners:ze}),ue.data=je)),ky(K,e,D,a,Y)}qh(K,t)})}function Pr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Si(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=vr(e,a),o!=null&&l.unshift(Pr(e,o,c)),o=vr(e,t),o!=null&&l.push(Pr(e,o,c))),e.tag===3)return l;e=e.return}return[]}function By(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qh(e,t,a,l,o){for(var c=t._reactName,h=[];a!==null&&a!==l;){var b=a,E=b.alternate,D=b.stateNode;if(b=b.tag,E!==null&&E===l)break;b!==5&&b!==26&&b!==27||D===null||(E=D,o?(D=vr(a,c),D!=null&&h.unshift(Pr(a,D,E))):o||(D=vr(a,c),D!=null&&h.push(Pr(a,D,E)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Hy=/\r\n?/g,qy=/\u0000|\uFFFD/g;function Vh(e){return(typeof e=="string"?e:""+e).replace(Hy,`
9
- `).replace(qy,"")}function Yh(e,t){return t=Vh(t),Vh(e)===t}function Ve(e,t,a,l,o,c){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Sl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Sl(e,""+l);break;case"className":Es(e,"class",l);break;case"tabIndex":Es(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Es(e,a,l);break;case"style":Vd(e,l,c);break;case"data":if(t!=="object"){Es(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Ts(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 c=="function"&&(a==="formAction"?(t!=="input"&&Ve(e,t,"name",o.name,o,null),Ve(e,t,"formEncType",o.formEncType,o,null),Ve(e,t,"formMethod",o.formMethod,o,null),Ve(e,t,"formTarget",o.formTarget,o,null)):(Ve(e,t,"encType",o.encType,o,null),Ve(e,t,"method",o.method,o,null),Ve(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Ts(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Da);break;case"onScroll":l!=null&&Me("scroll",e);break;case"onScrollEnd":l!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Ts(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Me("beforetoggle",e),Me("toggle",e),js(e,"popover",l);break;case"xlinkActuate":ka(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ka(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ka(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ka(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ka(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ka(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ka(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ka(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ka(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":js(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hv.get(a)||a,js(e,a,l))}}function su(e,t,a,l,o,c){switch(a){case"style":Vd(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Sl(e,l):(typeof l=="number"||typeof l=="bigint")&&Sl(e,""+l);break;case"onScroll":l!=null&&Me("scroll",e);break;case"onScrollEnd":l!=null&&Me("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),c=e[Ot]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof l=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):js(e,a,l)}}}function yt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var l=!1,o=!1,c;for(c in a)if(a.hasOwnProperty(c)){var h=a[c];if(h!=null)switch(c){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Ve(e,t,c,h,a,null)}}o&&Ve(e,t,"srcSet",a.srcSet,a,null),l&&Ve(e,t,"src",a.src,a,null);return;case"input":Me("invalid",e);var b=c=h=o=null,E=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var Y=a[l];if(Y!=null)switch(l){case"name":o=Y;break;case"type":h=Y;break;case"checked":E=Y;break;case"defaultChecked":D=Y;break;case"value":c=Y;break;case"defaultValue":b=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,t));break;default:Ve(e,t,l,Y,a,null)}}Hd(e,c,b,E,D,h,o,!1);return;case"select":Me("invalid",e),l=h=c=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":c=b;break;case"defaultValue":h=b;break;case"multiple":l=b;default:Ve(e,t,o,b,a,null)}t=c,a=h,e.multiple=!!l,t!=null?bl(e,!!l,t,!1):a!=null&&bl(e,!!l,a,!0);return;case"textarea":Me("invalid",e),c=o=l=null;for(h in a)if(a.hasOwnProperty(h)&&(b=a[h],b!=null))switch(h){case"value":l=b;break;case"defaultValue":o=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(i(91));break;default:Ve(e,t,h,b,a,null)}Gd(e,l,o,c);return;case"option":for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ve(e,t,E,l,a,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(l=0;l<$r.length;l++)Me($r[l],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(D in a)if(a.hasOwnProperty(D)&&(l=a[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Ve(e,t,D,l,a,null)}return;default:if(bo(t)){for(Y in a)a.hasOwnProperty(Y)&&(l=a[Y],l!==void 0&&su(e,t,Y,l,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null&&Ve(e,t,b,l,a,null))}function Gy(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,h=null,b=null,E=null,D=null,Y=null;for(H in a){var K=a[H];if(a.hasOwnProperty(H)&&K!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":E=K;default:l.hasOwnProperty(H)||Ve(e,t,H,null,l,K)}}for(var U in l){var H=l[U];if(K=a[U],l.hasOwnProperty(U)&&(H!=null||K!=null))switch(U){case"type":c=H;break;case"name":o=H;break;case"checked":D=H;break;case"defaultChecked":Y=H;break;case"value":h=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,t));break;default:H!==K&&Ve(e,t,U,H,l,K)}}vo(e,h,b,E,D,Y,c,o);return;case"select":H=h=b=U=null;for(c in a)if(E=a[c],a.hasOwnProperty(c)&&E!=null)switch(c){case"value":break;case"multiple":H=E;default:l.hasOwnProperty(c)||Ve(e,t,c,null,l,E)}for(o in l)if(c=l[o],E=a[o],l.hasOwnProperty(o)&&(c!=null||E!=null))switch(o){case"value":U=c;break;case"defaultValue":b=c;break;case"multiple":h=c;default:c!==E&&Ve(e,t,o,c,l,E)}t=b,a=h,l=H,U!=null?bl(e,!!a,U,!1):!!l!=!!a&&(t!=null?bl(e,!!a,t,!0):bl(e,!!a,a?[]:"",!1));return;case"textarea":H=U=null;for(b in a)if(o=a[b],a.hasOwnProperty(b)&&o!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ve(e,t,b,null,l,o)}for(h in l)if(o=l[h],c=a[h],l.hasOwnProperty(h)&&(o!=null||c!=null))switch(h){case"value":U=o;break;case"defaultValue":H=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(i(91));break;default:o!==c&&Ve(e,t,h,o,l,c)}qd(e,U,H);return;case"option":for(var ie in a)U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!l.hasOwnProperty(ie)&&(ie==="selected"?e.selected=!1:Ve(e,t,ie,null,l,U));for(E in l)U=l[E],H=a[E],l.hasOwnProperty(E)&&U!==H&&(U!=null||H!=null)&&(E==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":Ve(e,t,E,U,l,H));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 pe in a)U=a[pe],a.hasOwnProperty(pe)&&U!=null&&!l.hasOwnProperty(pe)&&Ve(e,t,pe,null,l,U);for(D in l)if(U=l[D],H=a[D],l.hasOwnProperty(D)&&U!==H&&(U!=null||H!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(i(137,t));break;default:Ve(e,t,D,U,l,H)}return;default:if(bo(t)){for(var Ye in a)U=a[Ye],a.hasOwnProperty(Ye)&&U!==void 0&&!l.hasOwnProperty(Ye)&&su(e,t,Ye,void 0,l,U);for(Y in l)U=l[Y],H=a[Y],!l.hasOwnProperty(Y)||U===H||U===void 0&&H===void 0||su(e,t,Y,U,l,H);return}}for(var A in a)U=a[A],a.hasOwnProperty(A)&&U!=null&&!l.hasOwnProperty(A)&&Ve(e,t,A,null,l,U);for(K in l)U=l[K],H=a[K],!l.hasOwnProperty(K)||U===H||U==null&&H==null||Ve(e,t,K,U,l,H)}function Fh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Qy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],c=o.transferSize,h=o.initiatorType,b=o.duration;if(c&&b&&Fh(h)){for(h=0,b=o.responseEnd,l+=1;l<a.length;l++){var E=a[l],D=E.startTime;if(D>b)break;var Y=E.transferSize,K=E.initiatorType;Y&&Fh(K)&&(E=E.responseEnd,h+=Y*(E<b?1:(b-D)/(E-D)))}if(--l,t+=8*(c+h)/(o.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 iu=null,ou=null;function wi(e){return e.nodeType===9?e:e.ownerDocument}function Xh(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 Kh(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 cu(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 uu=null;function Vy(){var e=window.event;return e&&e.type==="popstate"?e===uu?!1:(uu=e,!0):(uu=null,!1)}var Zh=typeof setTimeout=="function"?setTimeout:void 0,Yy=typeof clearTimeout=="function"?clearTimeout:void 0,Jh=typeof Promise=="function"?Promise:void 0,Fy=typeof queueMicrotask=="function"?queueMicrotask:typeof Jh<"u"?function(e){return Jh.resolve(null).then(e).catch(Xy)}:Zh;function Xy(e){setTimeout(function(){throw e})}function Nn(e){return e==="head"}function $h(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),Il(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ir(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ir(a);for(var c=a.firstChild;c;){var h=c.nextSibling,b=c.nodeName;c[gr]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=h}}else a==="body"&&Ir(e.ownerDocument.body);a=o}while(a);Il(t)}function Ph(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function du(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":du(a),go(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ky(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[gr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=sa(e.nextSibling),e===null)break}return null}function Zy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=sa(e.nextSibling),e===null))return null;return e}function Ih(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=sa(e.nextSibling),e===null))return null;return e}function fu(e){return e.data==="$?"||e.data==="$~"}function mu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Jy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function sa(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 hu=null;function Wh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return sa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function ep(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function tp(e,t,a){switch(t=wi(a),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 Ir(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);go(e)}var ia=new Map,ap=new Set;function Ni(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pa=Z.d;Z.d={f:$y,r:Py,D:Iy,C:Wy,L:e0,m:t0,X:n0,S:a0,M:l0};function $y(){var e=Pa.f(),t=hi();return e||t}function Py(e){var t=xl(e);t!==null&&t.tag===5&&t.type==="form"?ym(t):Pa.r(e)}var Jl=typeof document>"u"?null:document;function np(e,t,a){var l=Jl;if(l&&typeof t=="string"&&t){var o=Wt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),ap.has(o)||(ap.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),yt(t,"link",e),mt(t),l.head.appendChild(t)))}}function Iy(e){Pa.D(e),np("dns-prefetch",e,null)}function Wy(e,t){Pa.C(e,t),np("preconnect",e,t)}function e0(e,t,a){Pa.L(e,t,a);var l=Jl;if(l&&e&&t){var o='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Wt(a.imageSizes)+'"]')):o+='[href="'+Wt(e)+'"]';var c=o;switch(t){case"style":c=$l(e);break;case"script":c=Pl(e)}ia.has(c)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ia.set(c,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Wr(c))||t==="script"&&l.querySelector(es(c))||(t=l.createElement("link"),yt(t,"link",e),mt(t),l.head.appendChild(t)))}}function t0(e,t){Pa.m(e,t);var a=Jl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Wt(l)+'"][href="'+Wt(e)+'"]',c=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Pl(e)}if(!ia.has(c)&&(e=p({rel:"modulepreload",href:e},t),ia.set(c,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(es(c)))return}l=a.createElement("link"),yt(l,"link",e),mt(l),a.head.appendChild(l)}}}function a0(e,t,a){Pa.S(e,t,a);var l=Jl;if(l&&e){var o=vl(l).hoistableStyles,c=$l(e);t=t||"default";var h=o.get(c);if(!h){var b={loading:0,preload:null};if(h=l.querySelector(Wr(c)))b.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ia.get(c))&&pu(e,a);var E=h=l.createElement("link");mt(E),yt(E,"link",e),E._p=new Promise(function(D,Y){E.onload=D,E.onerror=Y}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,ji(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:b},o.set(c,h)}}}function n0(e,t){Pa.X(e,t);var a=Jl;if(a&&e){var l=vl(a).hoistableScripts,o=Pl(e),c=l.get(o);c||(c=a.querySelector(es(o)),c||(e=p({src:e,async:!0},t),(t=ia.get(o))&&gu(e,t),c=a.createElement("script"),mt(c),yt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function l0(e,t){Pa.M(e,t);var a=Jl;if(a&&e){var l=vl(a).hoistableScripts,o=Pl(e),c=l.get(o);c||(c=a.querySelector(es(o)),c||(e=p({src:e,async:!0,type:"module"},t),(t=ia.get(o))&&gu(e,t),c=a.createElement("script"),mt(c),yt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function lp(e,t,a,l){var o=(o=fe.current)?Ni(o):null;if(!o)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=$l(a.href),a=vl(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=$l(a.href);var c=vl(o).hoistableStyles,h=c.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,h),(c=o.querySelector(Wr(e)))&&!c._p&&(h.instance=c,h.state.loading=5),ia.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ia.set(e,a),c||r0(o,e,a,h.state))),t&&l===null)throw Error(i(528,""));return h}if(t&&l!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pl(a),a=vl(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function $l(e){return'href="'+Wt(e)+'"'}function Wr(e){return'link[rel="stylesheet"]['+e+"]"}function rp(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function r0(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),yt(t,"link",a),mt(t),e.head.appendChild(t))}function Pl(e){return'[src="'+Wt(e)+'"]'}function es(e){return"script[async]"+e}function sp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(l)return t.instance=l,mt(l),l;var o=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),mt(l),yt(l,"style",o),ji(l,a.precedence,e),t.instance=l;case"stylesheet":o=$l(a.href);var c=e.querySelector(Wr(o));if(c)return t.state.loading|=4,t.instance=c,mt(c),c;l=rp(a),(o=ia.get(o))&&pu(l,o),c=(e.ownerDocument||e).createElement("link"),mt(c);var h=c;return h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),yt(c,"link",l),t.state.loading|=4,ji(c,a.precedence,e),t.instance=c;case"script":return c=Pl(a.src),(o=e.querySelector(es(c)))?(t.instance=o,mt(o),o):(l=a,(o=ia.get(c))&&(l=p({},a),gu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),mt(o),yt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ji(l,a.precedence,e));return t.instance}function ji(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,c=o,h=0;h<l.length;h++){var b=l[h];if(b.dataset.precedence===t)c=b;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function pu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ei=null;function ip(e,t,a){if(Ei===null){var l=new Map,o=Ei=new Map;o.set(a,l)}else o=Ei,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var c=a[o];if(!(c[gr]||c[pt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var h=c.getAttribute(t)||"";h=e+h;var b=l.get(h);b?b.push(c):l.set(h,[c])}}return l}function op(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function s0(e,t,a){if(a===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 cp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function i0(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=$l(l.href),c=t.querySelector(Wr(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ri.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,mt(c);return}c=t.ownerDocument||t,l=rp(l),(o=ia.get(o))&&pu(l,o),c=c.createElement("link"),mt(c);var h=c;h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),yt(c,"link",l),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ri.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var xu=0;function o0(e,t){return e.stylesheets&&e.count===0&&Ci(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ci(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&xu===0&&(xu=62500*Qy());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ci(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>xu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Ri(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ci(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ti=null;function Ci(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ti=new Map,t.forEach(c0,e),Ti=null,Ri.call(e))}function c0(e,t){if(!(t.state.loading&4)){var a=Ti.get(e);if(a)var l=a.get(null);else{a=new Map,Ti.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var h=o[c];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),l=h)}l&&a.set(null,l)}o=t.instance,h=o.getAttribute("data-precedence"),c=a.get(h)||l,c===l&&a.set(null,o),a.set(h,o),this.count++,l=Ri.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ts={$$typeof:V,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function u0(e,t,a,l,o,c,h,b,E){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=nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.hiddenUpdates=nn(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function up(e,t,a,l,o,c,h,b,E,D,Y,K){return e=new u0(e,t,a,h,E,D,Y,K,b),t=1,c===!0&&(t|=24),c=Yt(3,null,null,t),e.current=c,c.stateNode=e,t=$o(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:a,cache:t},ec(c),e}function dp(e){return e?(e=Cl,e):Cl}function fp(e,t,a,l,o,c){o=dp(o),l.context===null?l.context=o:l.pendingContext=o,l=fn(t),l.payload={element:a},c=c===void 0?null:c,c!==null&&(l.callback=c),a=mn(e,l,t),a!==null&&(Bt(a,e,t),zr(a,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function vu(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function hp(e){if(e.tag===13||e.tag===31){var t=Yn(e,67108864);t!==null&&Bt(t,e,67108864),vu(e,67108864)}}function pp(e){if(e.tag===13||e.tag===31){var t=Jt();t=hl(t);var a=Yn(e,t);a!==null&&Bt(a,e,t),vu(e,t)}}var _i=!0;function d0(e,t,a,l){var o=O.T;O.T=null;var c=Z.p;try{Z.p=2,yu(e,t,a,l)}finally{Z.p=c,O.T=o}}function f0(e,t,a,l){var o=O.T;O.T=null;var c=Z.p;try{Z.p=8,yu(e,t,a,l)}finally{Z.p=c,O.T=o}}function yu(e,t,a,l){if(_i){var o=bu(l);if(o===null)ru(e,t,l,Mi,a),xp(e,l);else if(h0(o,e,t,a,l))l.stopPropagation();else if(xp(e,l),t&4&&-1<m0.indexOf(e)){for(;o!==null;){var c=xl(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var h=Na(c.pendingLanes);if(h!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var E=1<<31-bt(h);b.entanglements[1]|=E,h&=~E}Ta(c),(He&6)===0&&(fi=Et()+500,Jr(0))}}break;case 31:case 13:b=Yn(c,2),b!==null&&Bt(b,c,2),hi(),vu(c,2)}if(c=bu(l),c===null&&ru(e,t,l,Mi,a),c===o)break;o=c}o!==null&&l.stopPropagation()}else ru(e,t,l,null,a)}}function bu(e){return e=wo(e),Su(e)}var Mi=null;function Su(e){if(Mi=null,e=gl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=x(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Mi=e,null}function gp(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(fo()){case Dn:return 2;case ws:return 8;case Un:case hr:return 32;case za:return 268435456;default:return 32}default:return 32}}var wu=!1,jn=null,En=null,Rn=null,as=new Map,ns=new Map,Tn=[],m0="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 xp(e,t){switch(e){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":En=null;break;case"mouseover":case"mouseout":Rn=null;break;case"pointerover":case"pointerout":as.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ns.delete(t.pointerId)}}function ls(e,t,a,l,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:c,targetContainers:[o]},t!==null&&(t=xl(t),t!==null&&hp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function h0(e,t,a,l,o){switch(t){case"focusin":return jn=ls(jn,e,t,a,l,o),!0;case"dragenter":return En=ls(En,e,t,a,l,o),!0;case"mouseover":return Rn=ls(Rn,e,t,a,l,o),!0;case"pointerover":var c=o.pointerId;return as.set(c,ls(as.get(c)||null,e,t,a,l,o)),!0;case"gotpointercapture":return c=o.pointerId,ns.set(c,ls(ns.get(c)||null,e,t,a,l,o)),!0}return!1}function vp(e){var t=gl(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Ad(e.priority,function(){pp(a)});return}}else if(t===31){if(t=x(a),t!==null){e.blockedOn=t,Ad(e.priority,function(){pp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ai(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);So=l,a.target.dispatchEvent(l),So=null}else return t=xl(a),t!==null&&hp(t),e.blockedOn=a,!1;t.shift()}return!0}function yp(e,t,a){Ai(e)&&a.delete(t)}function p0(){wu=!1,jn!==null&&Ai(jn)&&(jn=null),En!==null&&Ai(En)&&(En=null),Rn!==null&&Ai(Rn)&&(Rn=null),as.forEach(yp),ns.forEach(yp)}function Oi(e,t){e.blockedOn===t&&(e.blockedOn=null,wu||(wu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,p0)))}var zi=null;function bp(e){zi!==e&&(zi=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){zi===e&&(zi=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Su(l||a)===null)continue;break}var c=xl(a);c!==null&&(e.splice(t,3),t-=3,bc(c,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function Il(e){function t(E){return Oi(E,e)}jn!==null&&Oi(jn,e),En!==null&&Oi(En,e),Rn!==null&&Oi(Rn,e),as.forEach(t),ns.forEach(t);for(var a=0;a<Tn.length;a++){var l=Tn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Tn.length&&(a=Tn[0],a.blockedOn===null);)vp(a),a.blockedOn===null&&Tn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],c=a[l+1],h=o[Ot]||null;if(typeof c=="function")h||bp(a);else if(h){var b=null;if(c&&c.hasAttribute("formAction")){if(o=c,h=c[Ot]||null)b=h.formAction;else if(Su(o)!==null)continue}else b=h.action;typeof b=="function"?a[l+1]=b:(a.splice(l,3),l-=3),bp(a)}}}function Sp(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Nu(e){this._internalRoot=e}ki.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,l=Jt();fp(a,l,e,t,null,null)},ki.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fp(e.current,2,null,e,null,null),hi(),t[pl]=null}};function ki(e){this._internalRoot=e}ki.prototype.unstable_scheduleHydration=function(e){if(e){var t=ho();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Tn.length&&t!==0&&t<Tn[a].priority;a++);Tn.splice(a,0,e),a===0&&vp(e)}};var wp=r.version;if(wp!=="19.2.4")throw Error(i(527,wp,"19.2.4"));Z.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=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var g0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Di.isDisabled&&Di.supportsFiber)try{Ln=Di.inject(g0),Rt=Di}catch{}}return ss.createRoot=function(e,t){if(!d(e))throw Error(i(299));var a=!1,l="",o=_m,c=Mm,h=Am;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=up(e,1,!1,null,null,a,l,null,o,c,h,Sp),e[pl]=t.current,lu(e),new Nu(t)},ss.hydrateRoot=function(e,t,a){if(!d(e))throw Error(i(299));var l=!1,o="",c=_m,h=Mm,b=Am,E=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=up(e,1,!0,t,a??null,l,o,E,c,h,b,Sp),t.context=dp(null),a=t.current,l=Jt(),l=hl(l),o=fn(l),o.callback=null,mn(a,o,l),a=l,t.current.lanes=a,Ie(t,a),Ta(t),e[pl]=t.current,lu(e),new ki(t)},ss.version="19.2.4",ss}var Op;function E0(){if(Op)return Ru.exports;Op=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Ru.exports=j0(),Ru.exports}var R0=E0();var zp="popstate";function T0(n={}){function r(i,d){let{pathname:f,search:m,hash:x}=i.location;return Qu("",{pathname:f,search:m,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function s(i,d){return typeof d=="string"?d:fs(d)}return _0(r,s,null,n)}function Pe(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function xa(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function C0(){return Math.random().toString(36).substring(2,10)}function kp(n,r){return{usr:n.state,key:n.key,idx:r}}function Qu(n,r,s=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?lr(r):r,state:s,key:r&&r.key||i||C0()}}function fs({pathname:n="/",search:r="",hash:s=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function lr(n){let r={};if(n){let s=n.indexOf("#");s>=0&&(r.hash=n.substring(s),n=n.substring(0,s));let i=n.indexOf("?");i>=0&&(r.search=n.substring(i),n=n.substring(0,i)),n&&(r.pathname=n)}return r}function _0(n,r,s,i={}){let{window:d=document.defaultView,v5Compat:f=!1}=i,m=d.history,x="POP",v=null,g=y();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function y(){return(m.state||{idx:null}).idx}function p(){x="POP";let T=y(),z=T==null?null:T-g;g=T,v&&v({action:x,location:j.location,delta:z})}function N(T,z){x="PUSH";let _=Qu(j.location,T,z);g=y()+1;let V=kp(_,g),L=j.createHref(_);try{m.pushState(V,"",L)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;d.location.assign(L)}f&&v&&v({action:x,location:j.location,delta:1})}function M(T,z){x="REPLACE";let _=Qu(j.location,T,z);g=y();let V=kp(_,g),L=j.createHref(_);m.replaceState(V,"",L),f&&v&&v({action:x,location:j.location,delta:0})}function w(T){return M0(T)}let j={get action(){return x},get location(){return n(d,m)},listen(T){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(zp,p),v=T,()=>{d.removeEventListener(zp,p),v=null}},createHref(T){return r(d,T)},createURL:w,encodeLocation(T){let z=w(T);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:N,replace:M,go(T){return m.go(T)}};return j}function M0(n,r=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(s,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:fs(n);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=s+i),new URL(i,s)}function Mg(n,r,s="/"){return A0(n,r,s,!1)}function A0(n,r,s,i){let d=typeof r=="string"?lr(r):r,f=en(d.pathname||"/",s);if(f==null)return null;let m=Ag(n);O0(m);let x=null;for(let v=0;x==null&&v<m.length;++v){let g=V0(f);x=G0(m[v],g,i)}return x}function Ag(n,r=[],s=[],i="",d=!1){let f=(m,x,v=d,g)=>{let y={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:x,route:m};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&v)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 p=Wa([i,y.relativePath]),N=s.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 "${p}".`),Ag(m.children,r,N,p,v)),!(m.path==null&&!m.index)&&r.push({path:p,score:H0(p,m.index),routesMeta:N})};return n.forEach((m,x)=>{if(m.path===""||!m.path?.includes("?"))f(m,x);else for(let v of Og(m.path))f(m,x,!0,v)}),r}function Og(n){let r=n.split("/");if(r.length===0)return[];let[s,...i]=r,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(i.length===0)return d?[f,""]:[f];let m=Og(i.join("/")),x=[];return x.push(...m.map(v=>v===""?f:[f,v].join("/"))),d&&x.push(...m),x.map(v=>n.startsWith("/")&&v===""?"/":v)}function O0(n){n.sort((r,s)=>r.score!==s.score?s.score-r.score:q0(r.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var z0=/^:[\w-]+$/,k0=3,D0=2,U0=1,L0=10,B0=-2,Dp=n=>n==="*";function H0(n,r){let s=n.split("/"),i=s.length;return s.some(Dp)&&(i+=B0),r&&(i+=D0),s.filter(d=>!Dp(d)).reduce((d,f)=>d+(z0.test(f)?k0:f===""?U0:L0),i)}function q0(n,r){return n.length===r.length&&n.slice(0,-1).every((i,d)=>i===r[d])?n[n.length-1]-r[r.length-1]:0}function G0(n,r,s=!1){let{routesMeta:i}=n,d={},f="/",m=[];for(let x=0;x<i.length;++x){let v=i[x],g=x===i.length-1,y=f==="/"?r:r.slice(f.length)||"/",p=Pi({path:v.relativePath,caseSensitive:v.caseSensitive,end:g},y),N=v.route;if(!p&&g&&s&&!i[i.length-1].route.index&&(p=Pi({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},y)),!p)return null;Object.assign(d,p.params),m.push({params:d,pathname:Wa([f,p.pathname]),pathnameBase:K0(Wa([f,p.pathnameBase])),route:N}),p.pathnameBase!=="/"&&(f=Wa([f,p.pathnameBase]))}return m}function Pi(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,i]=Q0(n.path,n.caseSensitive,n.end),d=r.match(s);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:i.reduce((g,{paramName:y,isOptional:p},N)=>{if(y==="*"){let w=x[N]||"";m=f.slice(0,f.length-w.length).replace(/(.)\/+$/,"$1")}const M=x[N];return p&&!M?g[y]=void 0:g[y]=(M||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:n}}function Q0(n,r=!1,s=!0){xa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,x,v)=>(i.push({paramName:x,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,r?void 0:"i"),i]}function V0(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return xa(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function en(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}var Y0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function F0(n,r="/"){let{pathname:s,search:i="",hash:d=""}=typeof n=="string"?lr(n):n,f;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?f=Up(s.substring(1),"/"):f=Up(s,r)):f=r,{pathname:f,search:Z0(i),hash:J0(d)}}function Up(n,r){let s=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Mu(n,r,s,i){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function X0(n){return n.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function sd(n){let r=X0(n);return r.map((s,i)=>i===r.length-1?s.pathname:s.pathnameBase)}function id(n,r,s,i=!1){let d;typeof n=="string"?d=lr(n):(d={...n},Pe(!d.pathname||!d.pathname.includes("?"),Mu("?","pathname","search",d)),Pe(!d.pathname||!d.pathname.includes("#"),Mu("#","pathname","hash",d)),Pe(!d.search||!d.search.includes("#"),Mu("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,x;if(m==null)x=s;else{let p=r.length-1;if(!i&&m.startsWith("..")){let N=m.split("/");for(;N[0]==="..";)N.shift(),p-=1;d.pathname=N.join("/")}x=p>=0?r[p]:"/"}let v=F0(d,x),g=m&&m!=="/"&&m.endsWith("/"),y=(f||m===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(g||y)&&(v.pathname+="/"),v}var Wa=n=>n.join("/").replace(/\/\/+/g,"/"),K0=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Z0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,J0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,$0=class{constructor(n,r,s,i=!1){this.status=n,this.statusText=r||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function P0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function I0(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var zg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function kg(n,r){let s=n;if(typeof s!="string"||!Y0.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,d=!1;if(zg)try{let f=new URL(window.location.href),m=s.startsWith("//")?new URL(f.protocol+s):new URL(s),x=en(m.pathname,r);m.origin===f.origin&&x!=null?s=x+m.search+m.hash:d=!0}catch{xa(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Dg=["POST","PUT","PATCH","DELETE"];new Set(Dg);var W0=["GET",...Dg];new Set(W0);var rr=S.createContext(null);rr.displayName="DataRouter";var no=S.createContext(null);no.displayName="DataRouterState";var eb=S.createContext(!1),Ug=S.createContext({isTransitioning:!1});Ug.displayName="ViewTransition";var tb=S.createContext(new Map);tb.displayName="Fetchers";var ab=S.createContext(null);ab.displayName="Await";var Pt=S.createContext(null);Pt.displayName="Navigation";var ps=S.createContext(null);ps.displayName="Location";var ya=S.createContext({outlet:null,matches:[],isDataRoute:!1});ya.displayName="Route";var od=S.createContext(null);od.displayName="RouteError";var Lg="REACT_ROUTER_ERROR",nb="REDIRECT",lb="ROUTE_ERROR_RESPONSE";function rb(n){if(n.startsWith(`${Lg}:${nb}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function sb(n){if(n.startsWith(`${Lg}:${lb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new $0(r.status,r.statusText,r.data)}catch{}}function ib(n,{relative:r}={}){Pe(sr(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=S.useContext(Pt),{hash:d,pathname:f,search:m}=gs(n,{relative:r}),x=f;return s!=="/"&&(x=f==="/"?s:Wa([s,f])),i.createHref({pathname:x,search:m,hash:d})}function sr(){return S.useContext(ps)!=null}function An(){return Pe(sr(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(ps).location}var Bg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Hg(n){S.useContext(Pt).static||S.useLayoutEffect(n)}function On(){let{isDataRoute:n}=S.useContext(ya);return n?wb():ob()}function ob(){Pe(sr(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(rr),{basename:r,navigator:s}=S.useContext(Pt),{matches:i}=S.useContext(ya),{pathname:d}=An(),f=JSON.stringify(sd(i)),m=S.useRef(!1);return Hg(()=>{m.current=!0}),S.useCallback((v,g={})=>{if(xa(m.current,Bg),!m.current)return;if(typeof v=="number"){s.go(v);return}let y=id(v,JSON.parse(f),d,g.relative==="path");n==null&&r!=="/"&&(y.pathname=y.pathname==="/"?r:Wa([r,y.pathname])),(g.replace?s.replace:s.push)(y,g.state,g)},[r,s,f,d,n])}var cb=S.createContext(null);function ub(n){let r=S.useContext(ya).outlet;return S.useMemo(()=>r&&S.createElement(cb.Provider,{value:n},r),[r,n])}function gs(n,{relative:r}={}){let{matches:s}=S.useContext(ya),{pathname:i}=An(),d=JSON.stringify(sd(s));return S.useMemo(()=>id(n,JSON.parse(d),i,r==="path"),[n,d,i,r])}function db(n,r){return qg(n,r)}function qg(n,r,s,i,d){Pe(sr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=S.useContext(Pt),{matches:m}=S.useContext(ya),x=m[m.length-1],v=x?x.params:{},g=x?x.pathname:"/",y=x?x.pathnameBase:"/",p=x&&x.route;{let _=p&&p.path||"";Qg(g,!p||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${_}">) 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.
8
+ `+l.stack}}var Qt=Object.prototype.hasOwnProperty,fr=n.unstable_scheduleCallback,mr=n.unstable_cancelCallback,jt=n.unstable_shouldYield,tn=n.unstable_requestPaint,Et=n.unstable_now,fo=n.unstable_getCurrentPriorityLevel,Dn=n.unstable_ImmediatePriority,ws=n.unstable_UserBlockingPriority,Un=n.unstable_NormalPriority,hr=n.unstable_LowPriority,za=n.unstable_IdlePriority,Ns=n.log,an=n.unstable_setDisableYieldValue,Ln=null,Tt=null;function fa(e){if(typeof Ns=="function"&&an(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(Ln,e)}catch{}}var bt=Math.clz32?Math.clz32:wa,mo=Math.log,pr=Math.LN2;function wa(e){return e>>>=0,e===0?32:31-(mo(e)/pr|0)|0}var fl=256,ml=262144,Bn=4194304;function Na(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 ye(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,c=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?o=Na(l):(h&=b,h!==0?o=Na(h):a||(a=b&~e,a!==0&&(o=Na(a))))):(b=l&~c,b!==0?o=Na(b):h!==0?o=Na(h):a||(a=l&~e,a!==0&&(o=Na(a)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:o}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(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 St(){var e=Bn;return Bn<<=1,(Bn&62914560)===0&&(Bn=4194304),e}function nn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ie(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(e,t,a,l,o,c){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,E=e.expirationTimes,D=e.hiddenUpdates;for(a=h&~a;0<a;){var Y=31-bt(a),K=1<<Y;b[Y]=0,E[Y]=-1;var U=D[Y];if(U!==null)for(D[Y]=null,Y=0;Y<U.length;Y++){var H=U[Y];H!==null&&(H.lane&=-536870913)}a&=~K}l!==0&&Hn(e,l,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(h&~t))}function Hn(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-bt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Mt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-bt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function At(e,t){var a=t&-t;return a=(a&42)!==0?1:hl(a),(a&(e.suspendedLanes|t))!==0?0:a}function hl(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 ma(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ho(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:gp(e.type))}function Ad(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var ln=Math.random().toString(36).slice(2),pt="__reactFiber$"+ln,Ot="__reactProps$"+ln,pl="__reactContainer$"+ln,po="__reactEvents$"+ln,iv="__reactListeners$"+ln,ov="__reactHandles$"+ln,Od="__reactResources$"+ln,gr="__reactMarker$"+ln;function go(e){delete e[pt],delete e[Ot],delete e[po],delete e[iv],delete e[ov]}function gl(e){var t=e[pt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pl]||a[pt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=ep(e);e!==null;){if(a=e[pt])return a;e=ep(e)}return t}e=a,a=e.parentNode}return null}function xl(e){if(e=e[pt]||e[pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vl(e){var t=e[Od];return t||(t=e[Od]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[gr]=!0}var zd=new Set,kd={};function qn(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(kd[e]=t,e=0;e<t.length;e++)zd.add(t[e])}var cv=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]*$"),Dd={},Ud={};function uv(e){return Qt.call(Ud,e)?!0:Qt.call(Dd,e)?!1:cv.test(e)?Ud[e]=!0:(Dd[e]=!0,!1)}function js(e,t,a){if(uv(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Es(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ka(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function It(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ld(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dv(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){a=""+h,c.call(this,h)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xo(e){if(!e._valueTracker){var t=Ld(e)?"checked":"value";e._valueTracker=dv(e,t,""+e[t])}}function Bd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Ld(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Ts(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 fv=/[\n"\\]/g;function Wt(e){return e.replace(fv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vo(e,t,a,l,o,c,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=""+It(t)):e.value!==""+It(t)&&(e.value=""+It(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?yo(e,h,It(t)):a!=null?yo(e,h,It(a)):l!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+It(b):e.removeAttribute("name")}function Hd(e,t,a,l,o,c,h,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){xo(e);return}a=a!=null?""+It(a):"",t=t!=null?""+It(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),xo(e)}function yo(e,t,a){t==="number"&&Ts(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function bl(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+It(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function qd(e,t,a){if(t!=null&&(t=""+It(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+It(a):""}function Gd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(i(92));if(Be(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=It(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),xo(e)}function Sl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var mv=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 Qd(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||mv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Vd(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Qd(e,o,l)}else for(var c in t)t.hasOwnProperty(c)&&Qd(e,c,t[c])}function bo(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 hv=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"]]),pv=/^[\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 Rs(e){return pv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var So=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wl=null,Nl=null;function Yd(e){var t=xl(e);if(t&&(e=t.stateNode)){var a=e[Ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(vo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Ot]||null;if(!o)throw Error(i(90));vo(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Bd(l)}break e;case"textarea":qd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&bl(e,!!a.multiple,t,!1)}}}var No=!1;function Xd(e,t,a){if(No)return e(t,a);No=!0;try{var l=e(t);return l}finally{if(No=!1,(wl!==null||Nl!==null)&&(hi(),wl&&(t=wl,e=Nl,Nl=wl=null,Yd(t),e)))for(t=0;t<e.length;t++)Yd(e[t])}}function vr(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Ot]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var Ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jo=!1;if(Ua)try{var yr={};Object.defineProperty(yr,"passive",{get:function(){jo=!0}}),window.addEventListener("test",yr,yr),window.removeEventListener("test",yr,yr)}catch{jo=!1}var rn=null,Eo=null,Cs=null;function Fd(){if(Cs)return Cs;var e,t=Eo,a=t.length,l,o="value"in rn?rn.value:rn.textContent,c=o.length;for(e=0;e<a&&t[e]===o[e];e++);var h=a-e;for(l=1;l<=h&&t[a-l]===o[c-l];l++);return Cs=o.slice(e,1<l?1-l:void 0)}function _s(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 Ms(){return!0}function Kd(){return!1}function zt(e){function t(a,l,o,c,h){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ms:Kd,this.isPropagationStopped=Kd,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ms)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},As=zt(Gn),br=p({},Gn,{view:0,detail:0}),gv=zt(br),To,Ro,Sr,Os=p({},br,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_o,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!==Sr&&(Sr&&e.type==="mousemove"?(To=e.screenX-Sr.screenX,Ro=e.screenY-Sr.screenY):Ro=To=0,Sr=e),To)},movementY:function(e){return"movementY"in e?e.movementY:Ro}}),Zd=zt(Os),xv=p({},Os,{dataTransfer:0}),vv=zt(xv),yv=p({},br,{relatedTarget:0}),Co=zt(yv),bv=p({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0}),Sv=zt(bv),wv=p({},Gn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nv=zt(wv),jv=p({},Gn,{data:0}),Jd=zt(jv),Ev={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tv={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"},Rv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rv[e])?!!t[e]:!1}function _o(){return Cv}var _v=p({},br,{key:function(e){if(e.key){var t=Ev[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_o,charCode:function(e){return e.type==="keypress"?_s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mv=zt(_v),Av=p({},Os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$d=zt(Av),Ov=p({},br,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_o}),zv=zt(Ov),kv=p({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dv=zt(kv),Uv=p({},Os,{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}),Lv=zt(Uv),Bv=p({},Gn,{newState:0,oldState:0}),Hv=zt(Bv),qv=[9,13,27,32],Mo=Ua&&"CompositionEvent"in window,wr=null;Ua&&"documentMode"in document&&(wr=document.documentMode);var Gv=Ua&&"TextEvent"in window&&!wr,Pd=Ua&&(!Mo||wr&&8<wr&&11>=wr),Id=" ",Wd=!1;function ef(e,t){switch(e){case"keyup":return qv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jl=!1;function Qv(e,t){switch(e){case"compositionend":return tf(t);case"keypress":return t.which!==32?null:(Wd=!0,Id);case"textInput":return e=t.data,e===Id&&Wd?null:e;default:return null}}function Vv(e,t){if(jl)return e==="compositionend"||!Mo&&ef(e,t)?(e=Fd(),Cs=Eo=rn=null,jl=!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 Pd&&t.locale!=="ko"?null:t.data;default:return null}}var Yv={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 af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yv[e.type]:t==="textarea"}function nf(e,t,a,l){wl?Nl?Nl.push(l):Nl=[l]:wl=l,t=Si(t,"onChange"),0<t.length&&(a=new As("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Nr=null,jr=null;function Xv(e){qh(e,0)}function zs(e){var t=xr(e);if(Bd(t))return e}function lf(e,t){if(e==="change")return t}var rf=!1;if(Ua){var Ao;if(Ua){var Oo="oninput"in document;if(!Oo){var sf=document.createElement("div");sf.setAttribute("oninput","return;"),Oo=typeof sf.oninput=="function"}Ao=Oo}else Ao=!1;rf=Ao&&(!document.documentMode||9<document.documentMode)}function of(){Nr&&(Nr.detachEvent("onpropertychange",cf),jr=Nr=null)}function cf(e){if(e.propertyName==="value"&&zs(jr)){var t=[];nf(t,jr,e,wo(e)),Xd(Xv,t)}}function Fv(e,t,a){e==="focusin"?(of(),Nr=t,jr=a,Nr.attachEvent("onpropertychange",cf)):e==="focusout"&&of()}function Kv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zs(jr)}function Zv(e,t){if(e==="click")return zs(t)}function Jv(e,t){if(e==="input"||e==="change")return zs(t)}function $v(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:$v;function Er(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!Qt.call(t,o)||!Vt(e[o],t[o]))return!1}return!0}function uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function df(e,t){var a=uf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=uf(a)}}function ff(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ff(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ts(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Ts(e.document)}return t}function zo(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 Pv=Ua&&"documentMode"in document&&11>=document.documentMode,El=null,ko=null,Tr=null,Do=!1;function hf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Do||El==null||El!==Ts(l)||(l=El,"selectionStart"in l&&zo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Tr&&Er(Tr,l)||(Tr=l,l=Si(ko,"onSelect"),0<l.length&&(t=new As("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=El)))}function Qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Tl={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},Uo={},pf={};Ua&&(pf=document.createElement("div").style,"AnimationEvent"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),"TransitionEvent"in window||delete Tl.transitionend.transition);function Vn(e){if(Uo[e])return Uo[e];if(!Tl[e])return e;var t=Tl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in pf)return Uo[e]=t[a];return e}var gf=Vn("animationend"),xf=Vn("animationiteration"),vf=Vn("animationstart"),Iv=Vn("transitionrun"),Wv=Vn("transitionstart"),ey=Vn("transitioncancel"),yf=Vn("transitionend"),bf=new Map,Lo="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(" ");Lo.push("scrollEnd");function ha(e,t){bf.set(e,t),qn(t,[e])}var ks=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)},ea=[],Rl=0,Bo=0;function Ds(){for(var e=Rl,t=Bo=Rl=0;t<e;){var a=ea[t];ea[t++]=null;var l=ea[t];ea[t++]=null;var o=ea[t];ea[t++]=null;var c=ea[t];if(ea[t++]=null,l!==null&&o!==null){var h=l.pending;h===null?o.next=o:(o.next=h.next,h.next=o),l.pending=o}c!==0&&Sf(a,o,c)}}function Us(e,t,a,l){ea[Rl++]=e,ea[Rl++]=t,ea[Rl++]=a,ea[Rl++]=l,Bo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ho(e,t,a,l){return Us(e,t,a,l),Ls(e)}function Yn(e,t){return Us(e,null,null,t),Ls(e)}function Sf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,c=e.return;c!==null;)c.childLanes|=a,l=c.alternate,l!==null&&(l.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-bt(a),e=c.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),c):null}function Ls(e){if(50<Zr)throw Zr=0,Zc=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Cl={};function ty(e,t,a,l){this.tag=e,this.key=a,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,a,l){return new ty(e,t,a,l)}function qo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function La(e,t){var a=e.alternate;return a===null?(a=Yt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function wf(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Bs(e,t,a,l,o,c){var h=0;if(l=e,typeof e=="function")qo(e)&&(h=1);else if(typeof e=="string")h=s0(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=Yt(31,a,t,o),e.elementType=P,e.lanes=c,e;case j:return Xn(a.children,o,c,t);case R:h=8,o|=24;break;case z:return e=Yt(12,a,t,o|2),e.elementType=z,e.lanes=c,e;case ne:return e=Yt(13,a,t,o),e.elementType=ne,e.lanes=c,e;case I:return e=Yt(19,a,t,o),e.elementType=I,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:h=10;break e;case _:h=9;break e;case L:h=11;break e;case ee:h=14;break e;case $:h=16,l=null;break e}h=29,a=Error(i(130,e===null?"null":typeof e,"")),l=null}return t=Yt(h,a,t,o),t.elementType=e,t.type=l,t.lanes=c,t}function Xn(e,t,a,l){return e=Yt(7,e,l,t),e.lanes=a,e}function Go(e,t,a){return e=Yt(6,e,null,t),e.lanes=a,e}function Nf(e){var t=Yt(18,null,null,0);return t.stateNode=e,t}function Qo(e,t,a){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var jf=new WeakMap;function ta(e,t){if(typeof e=="object"&&e!==null){var a=jf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:dr(t)},jf.set(e,t),t)}return{value:e,source:t,stack:dr(t)}}var _l=[],Ml=0,Hs=null,Rr=0,aa=[],na=0,sn=null,ja=1,Ea="";function Ba(e,t){_l[Ml++]=Rr,_l[Ml++]=Hs,Hs=e,Rr=t}function Ef(e,t,a){aa[na++]=ja,aa[na++]=Ea,aa[na++]=sn,sn=e;var l=ja;e=Ea;var o=32-bt(l)-1;l&=~(1<<o),a+=1;var c=32-bt(t)+o;if(30<c){var h=o-o%5;c=(l&(1<<h)-1).toString(32),l>>=h,o-=h,ja=1<<32-bt(t)+o|a<<o|l,Ea=c+e}else ja=1<<c|a<<o|l,Ea=e}function Vo(e){e.return!==null&&(Ba(e,1),Ef(e,1,0))}function Yo(e){for(;e===Hs;)Hs=_l[--Ml],_l[Ml]=null,Rr=_l[--Ml],_l[Ml]=null;for(;e===sn;)sn=aa[--na],aa[na]=null,Ea=aa[--na],aa[na]=null,ja=aa[--na],aa[na]=null}function Tf(e,t){aa[na++]=ja,aa[na++]=Ea,aa[na++]=sn,ja=t.id,Ea=t.overflow,sn=e}var gt=null,Ke=null,ke=!1,on=null,la=!1,Xo=Error(i(519));function cn(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Cr(ta(t,e)),Xo}function Rf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[pt]=e,t[Ot]=l,a){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(a=0;a<$r.length;a++)Me($r[a],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),Hd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),Gd(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Yh(t.textContent,a)?(l.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),l.onScroll!=null&&Me("scroll",t),l.onScrollEnd!=null&&Me("scrollend",t),l.onClick!=null&&(t.onclick=Da),t=!0):t=!1,t||cn(e,!0)}function Cf(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:gt=gt.return}}function Al(e){if(e!==gt)return!1;if(!ke)return Cf(e),ke=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||cu(e.type,e.memoizedProps)),a=!a),a&&Ke&&cn(e),Cf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ke=Wh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ke=Wh(e)}else t===27?(t=Ke,Nn(e.type)?(e=hu,hu=null,Ke=e):Ke=t):Ke=gt?sa(e.stateNode.nextSibling):null;return!0}function Fn(){Ke=gt=null,ke=!1}function Fo(){var e=on;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),on=null),e}function Cr(e){on===null?on=[e]:on.push(e)}var Ko=T(null),Kn=null,Ha=null;function un(e,t,a){Q(Ko,t._currentValue),t._currentValue=a}function qa(e){e._currentValue=Ko.current,G(Ko)}function Zo(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Jo(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var h=o.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=o;for(var E=0;E<t.length;E++)if(b.context===t[E]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),Zo(c.return,a,e),l||(h=null);break e}c=b.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(i(341));h.lanes|=a,c=h.alternate,c!==null&&(c.lanes|=a),Zo(h,a,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function Ol(e,t,a,l){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(i(387));if(h=h.memoizedProps,h!==null){var b=o.type;Vt(o.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(o===de.current){if(h=o.alternate,h===null)throw Error(i(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ts):e=[ts])}o=o.return}e!==null&&Jo(t,e,a,l),t.flags|=262144}function qs(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zn(e){Kn=e,Ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return _f(Kn,e)}function Gs(e,t){return Kn===null&&Zn(e),_f(e,t)}function _f(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,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 a}var ay=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},ny=n.unstable_scheduleCallback,ly=n.unstable_NormalPriority,lt={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $o(){return{controller:new ay,data:new Map,refCount:0}}function _r(e){e.refCount--,e.refCount===0&&ny(ly,function(){e.controller.abort()})}var Mr=null,Po=0,zl=0,kl=null;function ry(e,t){if(Mr===null){var a=Mr=[];Po=0,zl=eu(),kl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Po++,t.then(Mf,Mf),t}function Mf(){if(--Po===0&&Mr!==null){kl!==null&&(kl.status="fulfilled");var e=Mr;Mr=null,zl=0,kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sy(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var Af=O.S;O.S=function(e,t){hh=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ry(e,t),Af!==null&&Af(e,t)};var Jn=T(null);function Io(){var e=Jn.current;return e!==null?e:Fe.pooledCache}function Qs(e,t){t===null?Q(Jn,Jn.current):Q(Jn,t.pool)}function Of(){var e=Io();return e===null?null:{parent:lt._currentValue,pool:e}}var Dl=Error(i(460)),Wo=Error(i(474)),Vs=Error(i(542)),Ys={then:function(){}};function zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function kf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Da,Da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uf(e),e;default:if(typeof t.status=="string")t.then(Da,Da);else{if(e=Fe,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uf(e),e}throw Pn=t,Dl}}function $n(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Pn=a,Dl):a}}var Pn=null;function Df(){if(Pn===null)throw Error(i(459));var e=Pn;return Pn=null,e}function Uf(e){if(e===Dl||e===Vs)throw Error(i(483))}var Ul=null,Ar=0;function Xs(e){var t=Ar;return Ar+=1,Ul===null&&(Ul=[]),kf(Ul,e,t)}function Or(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fs(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 Lf(e){function t(A,C){if(e){var k=A.deletions;k===null?(A.deletions=[C],A.flags|=16):k.push(C)}}function a(A,C){if(!e)return null;for(;C!==null;)t(A,C),C=C.sibling;return null}function l(A){for(var C=new Map;A!==null;)A.key!==null?C.set(A.key,A):C.set(A.index,A),A=A.sibling;return C}function o(A,C){return A=La(A,C),A.index=0,A.sibling=null,A}function c(A,C,k){return A.index=k,e?(k=A.alternate,k!==null?(k=k.index,k<C?(A.flags|=67108866,C):k):(A.flags|=67108866,C)):(A.flags|=1048576,C)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function b(A,C,k,X){return C===null||C.tag!==6?(C=Go(k,A.mode,X),C.return=A,C):(C=o(C,k),C.return=A,C)}function E(A,C,k,X){var me=k.type;return me===j?Y(A,C,k.props.children,X,k.key):C!==null&&(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===$&&$n(me)===C.type)?(C=o(C,k.props),Or(C,k),C.return=A,C):(C=Bs(k.type,k.key,k.props,null,A.mode,X),Or(C,k),C.return=A,C)}function D(A,C,k,X){return C===null||C.tag!==4||C.stateNode.containerInfo!==k.containerInfo||C.stateNode.implementation!==k.implementation?(C=Qo(k,A.mode,X),C.return=A,C):(C=o(C,k.children||[]),C.return=A,C)}function Y(A,C,k,X,me){return C===null||C.tag!==7?(C=Xn(k,A.mode,X,me),C.return=A,C):(C=o(C,k),C.return=A,C)}function K(A,C,k){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Go(""+C,A.mode,k),C.return=A,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case M:return k=Bs(C.type,C.key,C.props,null,A.mode,k),Or(k,C),k.return=A,k;case w:return C=Qo(C,A.mode,k),C.return=A,C;case $:return C=$n(C),K(A,C,k)}if(Be(C)||he(C))return C=Xn(C,A.mode,k,null),C.return=A,C;if(typeof C.then=="function")return K(A,Xs(C),k);if(C.$$typeof===V)return K(A,Gs(A,C),k);Fs(A,C)}return null}function U(A,C,k,X){var me=C!==null?C.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return me!==null?null:b(A,C,""+k,X);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case M:return k.key===me?E(A,C,k,X):null;case w:return k.key===me?D(A,C,k,X):null;case $:return k=$n(k),U(A,C,k,X)}if(Be(k)||he(k))return me!==null?null:Y(A,C,k,X,null);if(typeof k.then=="function")return U(A,C,Xs(k),X);if(k.$$typeof===V)return U(A,C,Gs(A,k),X);Fs(A,k)}return null}function H(A,C,k,X,me){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return A=A.get(k)||null,b(C,A,""+X,me);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case M:return A=A.get(X.key===null?k:X.key)||null,E(C,A,X,me);case w:return A=A.get(X.key===null?k:X.key)||null,D(C,A,X,me);case $:return X=$n(X),H(A,C,k,X,me)}if(Be(X)||he(X))return A=A.get(k)||null,Y(C,A,X,me,null);if(typeof X.then=="function")return H(A,C,k,Xs(X),me);if(X.$$typeof===V)return H(A,C,k,Gs(C,X),me);Fs(C,X)}return null}function ie(A,C,k,X){for(var me=null,Ue=null,ue=C,je=C=0,ze=null;ue!==null&&je<k.length;je++){ue.index>je?(ze=ue,ue=null):ze=ue.sibling;var Le=U(A,ue,k[je],X);if(Le===null){ue===null&&(ue=ze);break}e&&ue&&Le.alternate===null&&t(A,ue),C=c(Le,C,je),Ue===null?me=Le:Ue.sibling=Le,Ue=Le,ue=ze}if(je===k.length)return a(A,ue),ke&&Ba(A,je),me;if(ue===null){for(;je<k.length;je++)ue=K(A,k[je],X),ue!==null&&(C=c(ue,C,je),Ue===null?me=ue:Ue.sibling=ue,Ue=ue);return ke&&Ba(A,je),me}for(ue=l(ue);je<k.length;je++)ze=H(ue,A,je,k[je],X),ze!==null&&(e&&ze.alternate!==null&&ue.delete(ze.key===null?je:ze.key),C=c(ze,C,je),Ue===null?me=ze:Ue.sibling=ze,Ue=ze);return e&&ue.forEach(function(Cn){return t(A,Cn)}),ke&&Ba(A,je),me}function pe(A,C,k,X){if(k==null)throw Error(i(151));for(var me=null,Ue=null,ue=C,je=C=0,ze=null,Le=k.next();ue!==null&&!Le.done;je++,Le=k.next()){ue.index>je?(ze=ue,ue=null):ze=ue.sibling;var Cn=U(A,ue,Le.value,X);if(Cn===null){ue===null&&(ue=ze);break}e&&ue&&Cn.alternate===null&&t(A,ue),C=c(Cn,C,je),Ue===null?me=Cn:Ue.sibling=Cn,Ue=Cn,ue=ze}if(Le.done)return a(A,ue),ke&&Ba(A,je),me;if(ue===null){for(;!Le.done;je++,Le=k.next())Le=K(A,Le.value,X),Le!==null&&(C=c(Le,C,je),Ue===null?me=Le:Ue.sibling=Le,Ue=Le);return ke&&Ba(A,je),me}for(ue=l(ue);!Le.done;je++,Le=k.next())Le=H(ue,A,je,Le.value,X),Le!==null&&(e&&Le.alternate!==null&&ue.delete(Le.key===null?je:Le.key),C=c(Le,C,je),Ue===null?me=Le:Ue.sibling=Le,Ue=Le);return e&&ue.forEach(function(x0){return t(A,x0)}),ke&&Ba(A,je),me}function Ye(A,C,k,X){if(typeof k=="object"&&k!==null&&k.type===j&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case M:e:{for(var me=k.key;C!==null;){if(C.key===me){if(me=k.type,me===j){if(C.tag===7){a(A,C.sibling),X=o(C,k.props.children),X.return=A,A=X;break e}}else if(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===$&&$n(me)===C.type){a(A,C.sibling),X=o(C,k.props),Or(X,k),X.return=A,A=X;break e}a(A,C);break}else t(A,C);C=C.sibling}k.type===j?(X=Xn(k.props.children,A.mode,X,k.key),X.return=A,A=X):(X=Bs(k.type,k.key,k.props,null,A.mode,X),Or(X,k),X.return=A,A=X)}return h(A);case w:e:{for(me=k.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===k.containerInfo&&C.stateNode.implementation===k.implementation){a(A,C.sibling),X=o(C,k.children||[]),X.return=A,A=X;break e}else{a(A,C);break}else t(A,C);C=C.sibling}X=Qo(k,A.mode,X),X.return=A,A=X}return h(A);case $:return k=$n(k),Ye(A,C,k,X)}if(Be(k))return ie(A,C,k,X);if(he(k)){if(me=he(k),typeof me!="function")throw Error(i(150));return k=me.call(k),pe(A,C,k,X)}if(typeof k.then=="function")return Ye(A,C,Xs(k),X);if(k.$$typeof===V)return Ye(A,C,Gs(A,k),X);Fs(A,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,C!==null&&C.tag===6?(a(A,C.sibling),X=o(C,k),X.return=A,A=X):(a(A,C),X=Go(k,A.mode,X),X.return=A,A=X),h(A)):a(A,C)}return function(A,C,k,X){try{Ar=0;var me=Ye(A,C,k,X);return Ul=null,me}catch(ue){if(ue===Dl||ue===Vs)throw ue;var Ue=Yt(29,ue,null,A.mode);return Ue.lanes=X,Ue.return=A,Ue}}}var In=Lf(!0),Bf=Lf(!1),dn=!1;function ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tc(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 fn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mn(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Ls(e),Sf(e,null,a),t}return Us(e,l,t,a),Ls(e)}function zr(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Mt(e,a)}}function ac(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?o=c=h:c=c.next=h,a=a.next}while(a!==null);c===null?o=c=t:c=c.next=t}else o=c=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var nc=!1;function kr(){if(nc){var e=kl;if(e!==null)throw e}}function Dr(e,t,a,l){nc=!1;var o=e.updateQueue;dn=!1;var c=o.firstBaseUpdate,h=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var E=b,D=E.next;E.next=null,h===null?c=D:h.next=D,h=E;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,b=Y.lastBaseUpdate,b!==h&&(b===null?Y.firstBaseUpdate=D:b.next=D,Y.lastBaseUpdate=E))}if(c!==null){var K=o.baseState;h=0,Y=D=E=null,b=c;do{var U=b.lane&-536870913,H=U!==b.lane;if(H?(Oe&U)===U:(l&U)===U){U!==0&&U===zl&&(nc=!0),Y!==null&&(Y=Y.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,pe=b;U=t;var Ye=a;switch(pe.tag){case 1:if(ie=pe.payload,typeof ie=="function"){K=ie.call(Ye,K,U);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=pe.payload,U=typeof ie=="function"?ie.call(Ye,K,U):ie,U==null)break e;K=p({},K,U);break e;case 2:dn=!0}}U=b.callback,U!==null&&(e.flags|=64,H&&(e.flags|=8192),H=o.callbacks,H===null?o.callbacks=[U]:H.push(U))}else H={lane:U,tag:b.tag,payload:b.payload,callback:b.callback,next:null},Y===null?(D=Y=H,E=K):Y=Y.next=H,h|=U;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;H=b,b=H.next,H.next=null,o.lastBaseUpdate=H,o.shared.pending=null}}while(!0);Y===null&&(E=K),o.baseState=E,o.firstBaseUpdate=D,o.lastBaseUpdate=Y,c===null&&(o.shared.lanes=0),vn|=h,e.lanes=h,e.memoizedState=K}}function Hf(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function qf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Hf(a[e],t)}var Ll=T(null),Ks=T(0);function Gf(e,t){e=Ja,Q(Ks,e),Q(Ll,t),Ja=e|t.baseLanes}function lc(){Q(Ks,Ja),Q(Ll,Ll.current)}function rc(){Ja=Ks.current,G(Ll),G(Ks)}var Xt=T(null),ra=null;function hn(e){var t=e.alternate;Q(tt,tt.current&1),Q(Xt,e),ra===null&&(t===null||Ll.current!==null||t.memoizedState!==null)&&(ra=e)}function sc(e){Q(tt,tt.current),Q(Xt,e),ra===null&&(ra=e)}function Qf(e){e.tag===22?(Q(tt,tt.current),Q(Xt,e),ra===null&&(ra=e)):pn()}function pn(){Q(tt,tt.current),Q(Xt,Xt.current)}function Ft(e){G(Xt),ra===e&&(ra=null),G(tt)}var tt=T(0);function Zs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||fu(a)||mu(a)))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 Ga=0,we=null,Qe=null,rt=null,Js=!1,Bl=!1,Wn=!1,$s=0,Ur=0,Hl=null,iy=0;function We(){throw Error(i(321))}function ic(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Vt(e[a],t[a]))return!1;return!0}function oc(e,t,a,l,o,c){return Ga=c,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Em:Nc,Wn=!1,c=a(l,o),Wn=!1,Bl&&(c=Yf(t,a,l,o)),Vf(e),c}function Vf(e){O.H=Hr;var t=Qe!==null&&Qe.next!==null;if(Ga=0,rt=Qe=we=null,Js=!1,Ur=0,Hl=null,t)throw Error(i(300));e===null||st||(e=e.dependencies,e!==null&&qs(e)&&(st=!0))}function Yf(e,t,a,l){we=e;var o=0;do{if(Bl&&(Hl=null),Ur=0,Bl=!1,25<=o)throw Error(i(301));if(o+=1,rt=Qe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}O.H=Tm,c=t(a,l)}while(Bl);return c}function oy(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?Lr(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(we.flags|=1024),t}function cc(){var e=$s!==0;return $s=0,e}function uc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function dc(e){if(Js){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Js=!1}Ga=0,rt=Qe=we=null,Bl=!1,Ur=$s=0,Hl=null}function Rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?we.memoizedState=rt=e:rt=rt.next=e,rt}function at(){if(Qe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=rt===null?we.memoizedState:rt.next;if(t!==null)rt=t,Qe=e;else{if(e===null)throw we.alternate===null?Error(i(467)):Error(i(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},rt===null?we.memoizedState=rt=e:rt=rt.next=e}return rt}function Ps(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lr(e){var t=Ur;return Ur+=1,Hl===null&&(Hl=[]),e=kf(Hl,e,t),t=we,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Em:Nc),e}function Is(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Lr(e);if(e.$$typeof===V)return xt(e)}throw Error(i(438,String(e)))}function fc(e){var t=null,a=we.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=we.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ps(),we.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=re;return t.index++,a}function Qa(e,t){return typeof t=="function"?t(e):t}function Ws(e){var t=at();return mc(t,Qe,e)}function mc(e,t,a){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var o=e.baseQueue,c=l.pending;if(c!==null){if(o!==null){var h=o.next;o.next=c.next,c.next=h}t.baseQueue=o=c,l.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var b=h=null,E=null,D=t,Y=!1;do{var K=D.lane&-536870913;if(K!==D.lane?(Oe&K)===K:(Ga&K)===K){var U=D.revertLane;if(U===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),K===zl&&(Y=!0);else if((Ga&U)===U){D=D.next,U===zl&&(Y=!0);continue}else K={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=K,h=c):E=E.next=K,we.lanes|=U,vn|=U;K=D.action,Wn&&a(c,K),c=D.hasEagerState?D.eagerState:a(c,K)}else U={lane:K,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=U,h=c):E=E.next=U,we.lanes|=K,vn|=K;D=D.next}while(D!==null&&D!==t);if(E===null?h=c:E.next=b,!Vt(c,e.memoizedState)&&(st=!0,Y&&(a=kl,a!==null)))throw a;e.memoizedState=c,e.baseState=h,e.baseQueue=E,l.lastRenderedState=c}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function hc(e){var t=at(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,c=t.memoizedState;if(o!==null){a.pending=null;var h=o=o.next;do c=e(c,h.action),h=h.next;while(h!==o);Vt(c,t.memoizedState)||(st=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,l]}function Xf(e,t,a){var l=we,o=at(),c=ke;if(c){if(a===void 0)throw Error(i(407));a=a()}else a=t();var h=!Vt((Qe||o).memoizedState,a);if(h&&(o.memoizedState=a,st=!0),o=o.queue,xc(Zf.bind(null,l,o,e),[e]),o.getSnapshot!==t||h||rt!==null&&rt.memoizedState.tag&1){if(l.flags|=2048,ql(9,{destroy:void 0},Kf.bind(null,l,o,a,t),null),Fe===null)throw Error(i(349));c||(Ga&127)!==0||Ff(l,t,a)}return a}function Ff(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=we.updateQueue,t===null?(t=Ps(),we.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Kf(e,t,a,l){t.value=a,t.getSnapshot=l,Jf(t)&&$f(e)}function Zf(e,t,a){return a(function(){Jf(t)&&$f(e)})}function Jf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Vt(e,a)}catch{return!0}}function $f(e){var t=Yn(e,2);t!==null&&Bt(t,e,2)}function pc(e){var t=Rt();if(typeof e=="function"){var a=e;if(e=a(),Wn){fa(!0);try{a()}finally{fa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:e},t}function Pf(e,t,a,l){return e.baseState=a,mc(e,Qe,typeof l=="function"?l:Qa)}function cy(e,t,a,l,o){if(ai(e))throw Error(i(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){c.listeners.push(h)}};O.T!==null?a(!0):c.isTransition=!1,l(c),a=t.pending,a===null?(c.next=t.pending=c,If(t,c)):(c.next=a.next,t.pending=a.next=c)}}function If(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var c=O.T,h={};O.T=h;try{var b=a(o,l),E=O.S;E!==null&&E(h,b),Wf(e,t,b)}catch(D){gc(e,t,D)}finally{c!==null&&h.types!==null&&(c.types=h.types),O.T=c}}else try{c=a(o,l),Wf(e,t,c)}catch(D){gc(e,t,D)}}function Wf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){em(e,t,l)},function(l){return gc(e,t,l)}):em(e,t,a)}function em(e,t,a){t.status="fulfilled",t.value=a,tm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,If(e,a)))}function gc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,tm(t),t=t.next;while(t!==l)}e.action=null}function tm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function am(e,t){return t}function nm(e,t){if(ke){var a=Fe.formState;if(a!==null){e:{var l=we;if(ke){if(Ke){t:{for(var o=Ke,c=la;o.nodeType!==8;){if(!c){o=null;break t}if(o=sa(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Ke=sa(o.nextSibling),l=o.data==="F!";break e}}cn(l)}l=!1}l&&(t=a[0])}}return a=Rt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:am,lastRenderedState:t},a.queue=l,a=wm.bind(null,we,l),l.dispatch=a,l=pc(!1),c=wc.bind(null,we,!1,l.queue),l=Rt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=cy.bind(null,we,o,c,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function lm(e){var t=at();return rm(t,Qe,e)}function rm(e,t,a){if(t=mc(e,t,am)[0],e=Ws(Qa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Lr(t)}catch(h){throw h===Dl?Vs:h}else l=t;t=at();var o=t.queue,c=o.dispatch;return a!==t.memoizedState&&(we.flags|=2048,ql(9,{destroy:void 0},uy.bind(null,o,a),null)),[l,c,e]}function uy(e,t){e.action=t}function sm(e){var t=at(),a=Qe;if(a!==null)return rm(t,a,e);at(),t=t.memoizedState,a=at();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function ql(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=we.updateQueue,t===null&&(t=Ps(),we.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function im(){return at().memoizedState}function ei(e,t,a,l){var o=Rt();we.flags|=e,o.memoizedState=ql(1|t,{destroy:void 0},a,l===void 0?null:l)}function ti(e,t,a,l){var o=at();l=l===void 0?null:l;var c=o.memoizedState.inst;Qe!==null&&l!==null&&ic(l,Qe.memoizedState.deps)?o.memoizedState=ql(t,c,a,l):(we.flags|=e,o.memoizedState=ql(1|t,c,a,l))}function om(e,t){ei(8390656,8,e,t)}function xc(e,t){ti(2048,8,e,t)}function dy(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Ps(),we.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function cm(e){var t=at().memoizedState;return dy({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function um(e,t){return ti(4,2,e,t)}function dm(e,t){return ti(4,4,e,t)}function fm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mm(e,t,a){a=a!=null?a.concat([e]):null,ti(4,4,fm.bind(null,t,e),a)}function vc(){}function hm(e,t){var a=at();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&ic(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function pm(e,t){var a=at();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&ic(t,l[1]))return l[0];if(l=e(),Wn){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[l,t],l}function yc(e,t,a){return a===void 0||(Ga&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=gh(),we.lanes|=e,vn|=e,a)}function gm(e,t,a,l){return Vt(a,t)?a:Ll.current!==null?(e=yc(e,a,l),Vt(e,t)||(st=!0),e):(Ga&42)===0||(Ga&1073741824)!==0&&(Oe&261930)===0?(st=!0,e.memoizedState=a):(e=gh(),we.lanes|=e,vn|=e,t)}function xm(e,t,a,l,o){var c=Z.p;Z.p=c!==0&&8>c?c:8;var h=O.T,b={};O.T=b,wc(e,!1,t,a);try{var E=o(),D=O.S;if(D!==null&&D(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var Y=sy(E,l);Br(e,t,Y,Jt(e))}else Br(e,t,l,Jt(e))}catch(K){Br(e,t,{then:function(){},status:"rejected",reason:K},Jt())}finally{Z.p=c,h!==null&&b.types!==null&&(h.types=b.types),O.T=h}}function fy(){}function bc(e,t,a,l){if(e.tag!==5)throw Error(i(476));var o=vm(e).queue;xm(e,o,t,F,a===null?fy:function(){return ym(e),a(l)})}function vm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:F},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ym(e){var t=vm(e);t.next===null&&(t=e.alternate.memoizedState),Br(e,t.next.queue,{},Jt())}function Sc(){return xt(ts)}function bm(){return at().memoizedState}function Sm(){return at().memoizedState}function my(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Jt();e=fn(a);var l=mn(t,e,a);l!==null&&(Bt(l,t,a),zr(l,t,a)),t={cache:$o()},e.payload=t;return}t=t.return}}function hy(e,t,a){var l=Jt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ai(e)?Nm(t,a):(a=Ho(e,t,a,l),a!==null&&(Bt(a,e,l),jm(a,t,l)))}function wm(e,t,a){var l=Jt();Br(e,t,a,l)}function Br(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ai(e))Nm(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var h=t.lastRenderedState,b=c(h,a);if(o.hasEagerState=!0,o.eagerState=b,Vt(b,h))return Us(e,t,o,0),Fe===null&&Ds(),!1}catch{}if(a=Ho(e,t,o,l),a!==null)return Bt(a,e,l),jm(a,t,l),!0}return!1}function wc(e,t,a,l){if(l={lane:2,revertLane:eu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ai(e)){if(t)throw Error(i(479))}else t=Ho(e,a,l,2),t!==null&&Bt(t,e,2)}function ai(e){var t=e.alternate;return e===we||t!==null&&t===we}function Nm(e,t){Bl=Js=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function jm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Mt(e,a)}}var Hr={readContext:xt,use:Is,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};Hr.useEffectEvent=We;var Em={readContext:xt,use:Is,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:om,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ei(4194308,4,fm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ei(4194308,4,e,t)},useInsertionEffect:function(e,t){ei(4,2,e,t)},useMemo:function(e,t){var a=Rt();t=t===void 0?null:t;var l=e();if(Wn){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Rt();if(a!==void 0){var o=a(t);if(Wn){fa(!0);try{a(t)}finally{fa(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=hy.bind(null,we,e),[l.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:function(e){e=pc(e);var t=e.queue,a=wm.bind(null,we,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:vc,useDeferredValue:function(e,t){var a=Rt();return yc(a,e,t)},useTransition:function(){var e=pc(!1);return e=xm.bind(null,we,e.queue,!0,!1),Rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=we,o=Rt();if(ke){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Fe===null)throw Error(i(349));(Oe&127)!==0||Ff(l,t,a)}o.memoizedState=a;var c={value:a,getSnapshot:t};return o.queue=c,om(Zf.bind(null,l,c,e),[e]),l.flags|=2048,ql(9,{destroy:void 0},Kf.bind(null,l,c,a,t),null),a},useId:function(){var e=Rt(),t=Fe.identifierPrefix;if(ke){var a=Ea,l=ja;a=(l&~(1<<32-bt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=$s++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=iy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Sc,useFormState:nm,useActionState:nm,useOptimistic:function(e){var t=Rt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wc.bind(null,we,!0,a),a.dispatch=t,[e,t]},useMemoCache:fc,useCacheRefresh:function(){return Rt().memoizedState=my.bind(null,we)},useEffectEvent:function(e){var t=Rt(),a={impl:e};return t.memoizedState=a,function(){if((He&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Nc={readContext:xt,use:Is,useCallback:hm,useContext:xt,useEffect:xc,useImperativeHandle:mm,useInsertionEffect:um,useLayoutEffect:dm,useMemo:pm,useReducer:Ws,useRef:im,useState:function(){return Ws(Qa)},useDebugValue:vc,useDeferredValue:function(e,t){var a=at();return gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=Ws(Qa)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Lr(e),t]},useSyncExternalStore:Xf,useId:bm,useHostTransitionStatus:Sc,useFormState:lm,useActionState:lm,useOptimistic:function(e,t){var a=at();return Pf(a,Qe,e,t)},useMemoCache:fc,useCacheRefresh:Sm};Nc.useEffectEvent=cm;var Tm={readContext:xt,use:Is,useCallback:hm,useContext:xt,useEffect:xc,useImperativeHandle:mm,useInsertionEffect:um,useLayoutEffect:dm,useMemo:pm,useReducer:hc,useRef:im,useState:function(){return hc(Qa)},useDebugValue:vc,useDeferredValue:function(e,t){var a=at();return Qe===null?yc(a,e,t):gm(a,Qe.memoizedState,e,t)},useTransition:function(){var e=hc(Qa)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Lr(e),t]},useSyncExternalStore:Xf,useId:bm,useHostTransitionStatus:Sc,useFormState:sm,useActionState:sm,useOptimistic:function(e,t){var a=at();return Qe!==null?Pf(a,Qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:fc,useCacheRefresh:Sm};Tm.useEffectEvent=cm;function jc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ec={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Jt(),o=fn(l);o.payload=t,a!=null&&(o.callback=a),t=mn(e,o,l),t!==null&&(Bt(t,e,l),zr(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Jt(),o=fn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=mn(e,o,l),t!==null&&(Bt(t,e,l),zr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Jt(),l=fn(a);l.tag=2,t!=null&&(l.callback=t),t=mn(e,l,a),t!==null&&(Bt(t,e,a),zr(t,e,a))}};function Rm(e,t,a,l,o,c,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,h):t.prototype&&t.prototype.isPureReactComponent?!Er(a,l)||!Er(o,c):!0}function Cm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function el(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function _m(e){ks(e)}function Mm(e){console.error(e)}function Am(e){ks(e)}function ni(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Om(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Tc(e,t,a){return a=fn(a),a.tag=3,a.payload={element:null},a.callback=function(){ni(e,t)},a}function zm(e){return e=fn(e),e.tag=3,e}function km(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var c=l.value;e.payload=function(){return o(c)},e.callback=function(){Om(t,a,l)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Om(t,a,l),typeof o!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function py(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Ol(t,a,o,!0),a=Xt.current,a!==null){switch(a.tag){case 31:case 13:return ra===null?pi():a.alternate===null&&et===0&&(et=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===Ys?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Pc(e,l,o)),!1;case 22:return a.flags|=65536,l===Ys?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Pc(e,l,o)),!1}throw Error(i(435,a.tag))}return Pc(e,l,o),pi(),!1}if(ke)return t=Xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Xo&&(e=Error(i(422),{cause:l}),Cr(ta(e,a)))):(l!==Xo&&(t=Error(i(423),{cause:l}),Cr(ta(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=ta(l,a),o=Tc(e.stateNode,l,o),ac(e,o),et!==4&&(et=2)),!1;var c=Error(i(520),{cause:l});if(c=ta(c,a),Kr===null?Kr=[c]:Kr.push(c),et!==4&&(et=2),t===null)return!0;l=ta(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Tc(a.stateNode,l,e),ac(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(yn===null||!yn.has(c))))return a.flags|=65536,o&=-o,a.lanes|=o,o=zm(o),km(o,e,a,l),ac(a,o),!1}a=a.return}while(a!==null);return!1}var Rc=Error(i(461)),st=!1;function vt(e,t,a,l){t.child=e===null?Bf(t,null,a,l):In(t,e.child,a,l)}function Dm(e,t,a,l,o){a=a.render;var c=t.ref;if("ref"in l){var h={};for(var b in l)b!=="ref"&&(h[b]=l[b])}else h=l;return Zn(t),l=oc(e,t,a,h,c,o),b=cc(),e!==null&&!st?(uc(e,t,o),Va(e,t,o)):(ke&&b&&Vo(t),t.flags|=1,vt(e,t,l,o),t.child)}function Um(e,t,a,l,o){if(e===null){var c=a.type;return typeof c=="function"&&!qo(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,Lm(e,t,c,l,o)):(e=Bs(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Dc(e,o)){var h=c.memoizedProps;if(a=a.compare,a=a!==null?a:Er,a(h,l)&&e.ref===t.ref)return Va(e,t,o)}return t.flags|=1,e=La(c,l),e.ref=t.ref,e.return=t,t.child=e}function Lm(e,t,a,l,o){if(e!==null){var c=e.memoizedProps;if(Er(c,l)&&e.ref===t.ref)if(st=!1,t.pendingProps=l=c,Dc(e,o))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,Va(e,t,o)}return Cc(e,t,a,l,o)}function Bm(e,t,a,l){var o=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~c}else l=0,t.child=null;return Hm(e,t,c,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qs(t,c!==null?c.cachePool:null),c!==null?Gf(t,c):lc(),Qf(t);else return l=t.lanes=536870912,Hm(e,t,c!==null?c.baseLanes|a:a,a,l)}else c!==null?(Qs(t,c.cachePool),Gf(t,c),pn(),t.memoizedState=null):(e!==null&&Qs(t,null),lc(),pn());return vt(e,t,o,a),t.child}function qr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Hm(e,t,a,l,o){var c=Io();return c=c===null?null:{parent:lt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Qs(t,null),lc(),Qf(t),e!==null&&Ol(e,t,l,!0),t.childLanes=o,null}function li(e,t){return t=si({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qm(e,t,a){return In(t,e.child,null,a),e=li(t,t.pendingProps),e.flags|=2,Ft(t),t.memoizedState=null,e}function gy(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(l.mode==="hidden")return e=li(t,l),t.lanes=536870912,qr(null,e);if(sc(t),(e=Ke)?(e=Ih(e,la),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sn!==null?{id:ja,overflow:Ea}:null,retryLane:536870912,hydrationErrors:null},a=Nf(e),a.return=t,t.child=a,gt=t,Ke=null)):e=null,e===null)throw cn(t);return t.lanes=536870912,null}return li(t,l)}var c=e.memoizedState;if(c!==null){var h=c.dehydrated;if(sc(t),o)if(t.flags&256)t.flags&=-257,t=qm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(st||Ol(e,t,a,!1),o=(a&e.childLanes)!==0,st||o){if(l=Fe,l!==null&&(h=At(l,a),h!==0&&h!==c.retryLane))throw c.retryLane=h,Yn(e,h),Bt(l,e,h),Rc;pi(),t=qm(e,t,a)}else e=c.treeContext,Ke=sa(h.nextSibling),gt=t,ke=!0,on=null,la=!1,e!==null&&Tf(t,e),t=li(t,l),t.flags|=4096;return t}return e=La(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ri(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Cc(e,t,a,l,o){return Zn(t),a=oc(e,t,a,l,void 0,o),l=cc(),e!==null&&!st?(uc(e,t,o),Va(e,t,o)):(ke&&l&&Vo(t),t.flags|=1,vt(e,t,a,o),t.child)}function Gm(e,t,a,l,o,c){return Zn(t),t.updateQueue=null,a=Yf(t,l,a,o),Vf(e),l=cc(),e!==null&&!st?(uc(e,t,c),Va(e,t,c)):(ke&&l&&Vo(t),t.flags|=1,vt(e,t,a,c),t.child)}function Qm(e,t,a,l,o){if(Zn(t),t.stateNode===null){var c=Cl,h=a.contextType;typeof h=="object"&&h!==null&&(c=xt(h)),c=new a(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Ec,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},ec(t),h=a.contextType,c.context=typeof h=="object"&&h!==null?xt(h):Cl,c.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(jc(t,a,h,l),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(h=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),h!==c.state&&Ec.enqueueReplaceState(c,c.state,null),Dr(t,l,c,o),kr(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,E=el(a,b);c.props=E;var D=c.context,Y=a.contextType;h=Cl,typeof Y=="object"&&Y!==null&&(h=xt(Y));var K=a.getDerivedStateFromProps;Y=typeof K=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,Y||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||D!==h)&&Cm(t,c,l,h),dn=!1;var U=t.memoizedState;c.state=U,Dr(t,l,c,o),kr(),D=t.memoizedState,b||U!==D||dn?(typeof K=="function"&&(jc(t,a,K,l),D=t.memoizedState),(E=dn||Rm(t,a,E,l,U,D,h))?(Y||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=D),c.props=l,c.state=D,c.context=h,l=E):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,tc(e,t),h=t.memoizedProps,Y=el(a,h),c.props=Y,K=t.pendingProps,U=c.context,D=a.contextType,E=Cl,typeof D=="object"&&D!==null&&(E=xt(D)),b=a.getDerivedStateFromProps,(D=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==K||U!==E)&&Cm(t,c,l,E),dn=!1,U=t.memoizedState,c.state=U,Dr(t,l,c,o),kr();var H=t.memoizedState;h!==K||U!==H||dn||e!==null&&e.dependencies!==null&&qs(e.dependencies)?(typeof b=="function"&&(jc(t,a,b,l),H=t.memoizedState),(Y=dn||Rm(t,a,Y,l,U,H,E)||e!==null&&e.dependencies!==null&&qs(e.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,H,E),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,H,E)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),c.props=l,c.state=H,c.context=E,l=Y):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,ri(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=In(t,e.child,null,o),t.child=In(t,null,a,o)):vt(e,t,a,o),t.memoizedState=c.state,e=t.child):e=Va(e,t,o),e}function Vm(e,t,a,l){return Fn(),t.flags|=256,vt(e,t,a,l),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mc(e){return{baseLanes:e,cachePool:Of()}}function Ac(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Zt),e}function Ym(e,t,a){var l=t.pendingProps,o=!1,c=(t.flags&128)!==0,h;if((h=c)||(h=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(o?hn(t):pn(),(e=Ke)?(e=Ih(e,la),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sn!==null?{id:ja,overflow:Ea}:null,retryLane:536870912,hydrationErrors:null},a=Nf(e),a.return=t,t.child=a,gt=t,Ke=null)):e=null,e===null)throw cn(t);return mu(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,o?(pn(),o=t.mode,b=si({mode:"hidden",children:b},o),l=Xn(l,o,a,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=Mc(a),l.childLanes=Ac(e,h,a),t.memoizedState=_c,qr(null,l)):(hn(t),Oc(t,b))}var E=e.memoizedState;if(E!==null&&(b=E.dehydrated,b!==null)){if(c)t.flags&256?(hn(t),t.flags&=-257,t=zc(e,t,a)):t.memoizedState!==null?(pn(),t.child=e.child,t.flags|=128,t=null):(pn(),b=l.fallback,o=t.mode,l=si({mode:"visible",children:l.children},o),b=Xn(b,o,a,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,In(t,e.child,null,a),l=t.child,l.memoizedState=Mc(a),l.childLanes=Ac(e,h,a),t.memoizedState=_c,t=qr(null,l));else if(hn(t),mu(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var D=h.dgst;h=D,l=Error(i(419)),l.stack="",l.digest=h,Cr({value:l,source:null,stack:null}),t=zc(e,t,a)}else if(st||Ol(e,t,a,!1),h=(a&e.childLanes)!==0,st||h){if(h=Fe,h!==null&&(l=At(h,a),l!==0&&l!==E.retryLane))throw E.retryLane=l,Yn(e,l),Bt(h,e,l),Rc;fu(b)||pi(),t=zc(e,t,a)}else fu(b)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Ke=sa(b.nextSibling),gt=t,ke=!0,on=null,la=!1,e!==null&&Tf(t,e),t=Oc(t,l.children),t.flags|=4096);return t}return o?(pn(),b=l.fallback,o=t.mode,E=e.child,D=E.sibling,l=La(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,D!==null?b=La(D,b):(b=Xn(b,o,a,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,qr(null,l),l=t.child,b=e.child.memoizedState,b===null?b=Mc(a):(o=b.cachePool,o!==null?(E=lt._currentValue,o=o.parent!==E?{parent:E,pool:E}:o):o=Of(),b={baseLanes:b.baseLanes|a,cachePool:o}),l.memoizedState=b,l.childLanes=Ac(e,h,a),t.memoizedState=_c,qr(e.child,l)):(hn(t),a=e.child,e=a.sibling,a=La(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Oc(e,t){return t=si({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function si(e,t){return e=Yt(22,e,null,t),e.lanes=0,e}function zc(e,t,a){return In(t,e.child,null,a),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Zo(e.return,t,a)}function kc(e,t,a,l,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:c}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=a,h.tailMode=o,h.treeForkCount=c)}function Fm(e,t,a){var l=t.pendingProps,o=l.revealOrder,c=l.tail;l=l.children;var h=tt.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,Q(tt,h),vt(e,t,l,a),l=ke?Rr:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xm(e,a,t);else if(e.tag===19)Xm(e,a,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(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Zs(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),kc(t,!1,o,a,c,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Zs(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}kc(t,!0,a,null,c,l);break;case"together":kc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Va(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ol(e,t,a,!1),(a&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,a=La(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=La(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&qs(e)))}function xy(e,t,a){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),un(t,lt,e.memoizedState.cache),Fn();break;case 27:case 5:W(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:un(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,sc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(hn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Ym(e,t,a):(hn(t),e=Va(e,t,a),e!==null?e.sibling:null);hn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Ol(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Fm(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Q(tt,tt.current),l)break;return null;case 22:return t.lanes=0,Bm(e,t,a,t.pendingProps);case 24:un(t,lt,e.memoizedState.cache)}return Va(e,t,a)}function Km(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!Dc(e,a)&&(t.flags&128)===0)return st=!1,xy(e,t,a);st=(e.flags&131072)!==0}else st=!1,ke&&(t.flags&1048576)!==0&&Ef(t,Rr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")qo(e)?(l=el(e,l),t.tag=1,t=Qm(null,t,e,l,a)):(t.tag=0,t=Cc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===L){t.tag=11,t=Dm(null,t,e,l,a);break e}else if(o===ee){t.tag=14,t=Um(null,t,e,l,a);break e}}throw t=De(e)||e,Error(i(306,t,""))}}return t;case 0:return Cc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=el(l,t.pendingProps),Qm(e,t,l,o,a);case 3:e:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(i(387));l=t.pendingProps;var c=t.memoizedState;o=c.element,tc(e,t),Dr(t,l,null,a);var h=t.memoizedState;if(l=h.cache,un(t,lt,l),l!==c.cache&&Jo(t,[lt],a,!0),kr(),l=h.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Vm(e,t,l,a);break e}else if(l!==o){o=ta(Error(i(424)),t),Cr(o),t=Vm(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=sa(e.firstChild),gt=t,ke=!0,on=null,la=!0,a=Bf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Fn(),l===o){t=Va(e,t,a);break e}vt(e,t,l,a)}t=t.child}return t;case 26:return ri(e,t),e===null?(a=lp(t.type,null,t.pendingProps,null))?t.memoizedState=a:ke||(a=t.type,e=t.pendingProps,l=wi(fe.current).createElement(a),l[pt]=t,l[Ot]=e,yt(l,a,e),mt(l),t.stateNode=l):t.memoizedState=lp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return W(t),e===null&&ke&&(l=t.stateNode=tp(t.type,t.pendingProps,fe.current),gt=t,la=!0,o=Ke,Nn(t.type)?(hu=o,Ke=sa(l.firstChild)):Ke=o),vt(e,t,t.pendingProps.children,a),ri(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((o=l=Ke)&&(l=Ky(l,t.type,t.pendingProps,la),l!==null?(t.stateNode=l,gt=t,Ke=sa(l.firstChild),la=!1,o=!0):o=!1),o||cn(t)),W(t),o=t.type,c=t.pendingProps,h=e!==null?e.memoizedProps:null,l=c.children,cu(o,c)?l=null:h!==null&&cu(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=oc(e,t,oy,null,null,a),ts._currentValue=o),ri(e,t),vt(e,t,l,a),t.child;case 6:return e===null&&ke&&((e=a=Ke)&&(a=Zy(a,t.pendingProps,la),a!==null?(t.stateNode=a,gt=t,Ke=null,e=!0):e=!1),e||cn(t)),null;case 13:return Ym(e,t,a);case 4:return be(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=In(t,null,l,a):vt(e,t,l,a),t.child;case 11:return Dm(e,t,t.type,t.pendingProps,a);case 7:return vt(e,t,t.pendingProps,a),t.child;case 8:return vt(e,t,t.pendingProps.children,a),t.child;case 12:return vt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,un(t,t.type,l.value),vt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Zn(t),o=xt(o),l=l(o),t.flags|=1,vt(e,t,l,a),t.child;case 14:return Um(e,t,t.type,t.pendingProps,a);case 15:return Lm(e,t,t.type,t.pendingProps,a);case 19:return Fm(e,t,a);case 31:return gy(e,t,a);case 22:return Bm(e,t,a,t.pendingProps);case 24:return Zn(t),l=xt(lt),e===null?(o=Io(),o===null&&(o=Fe,c=$o(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=a),o=c),t.memoizedState={parent:l,cache:o},ec(t),un(t,lt,o)):((e.lanes&a)!==0&&(tc(e,t),Dr(t,null,null,a),kr()),o=e.memoizedState,c=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),un(t,lt,l)):(l=c.cache,un(t,lt,l),l!==o.cache&&Jo(t,[lt],a,!0))),vt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ya(e){e.flags|=4}function Uc(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(bh())e.flags|=8192;else throw Pn=Ys,Wo}else e.flags&=-16777217}function Zm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!cp(t))if(bh())e.flags|=8192;else throw Pn=Ys,Wo}function ii(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?St():536870912,e.lanes|=t,Yl|=t)}function Gr(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function vy(e,t,a){var l=t.pendingProps;switch(Yo(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 a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),qa(lt),B(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Al(t)?Ya(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fo())),Ze(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(Ya(t),c!==null?(Ze(t),Zm(t,c)):(Ze(t),Uc(t,o,null,l,a))):c?c!==e.memoizedState?(Ya(t),Ze(t),Zm(t,c)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ya(t),Ze(t),Uc(t,o,e,l,a)),null;case 27:if(Ee(t),a=fe.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return Ze(t),null}e=J.current,Al(t)?Rf(t):(e=tp(o,l,a),t.stateNode=e,Ya(t))}return Ze(t),null;case 5:if(Ee(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return Ze(t),null}if(c=J.current,Al(t))Rf(t);else{var h=wi(fe.current);switch(c){case 1:c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=h.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?h.createElement(o,{is:l.is}):h.createElement(o)}}c[pt]=t,c[Ot]=l;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)c.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=c;e:switch(yt(c,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ya(t)}}return Ze(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Al(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=gt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[pt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Yh(e.nodeValue,a)),e||cn(t,!0)}else e=wi(e).createTextNode(l),e[pt]=t,t.stateNode=e}return Ze(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Al(t),a!==null){if(e===null){if(!l)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[pt]=t}else Fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else a=Fo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ft(t),t):(Ft(t),null);if((t.flags&128)!==0)throw Error(i(558))}return Ze(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Al(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(i(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));o[pt]=t}else Fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),o=!1}else o=Fo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Ft(t),t):(Ft(t),null)}return Ft(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ii(t,t.updateQueue),Ze(t),null);case 4:return B(),e===null&&lu(t.stateNode.containerInfo),Ze(t),null;case 10:return qa(t.type),Ze(t),null;case 19:if(G(tt),l=t.memoizedState,l===null)return Ze(t),null;if(o=(t.flags&128)!==0,c=l.rendering,c===null)if(o)Gr(l,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Zs(e),c!==null){for(t.flags|=128,Gr(l,!1),e=c.updateQueue,t.updateQueue=e,ii(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)wf(a,e),a=a.sibling;return Q(tt,tt.current&1|2),ke&&Ba(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Et()>fi&&(t.flags|=128,o=!0,Gr(l,!1),t.lanes=4194304)}else{if(!o)if(e=Zs(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ii(t,e),Gr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!ke)return Ze(t),null}else 2*Et()-l.renderingStartTime>fi&&a!==536870912&&(t.flags|=128,o=!0,Gr(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Et(),e.sibling=null,a=tt.current,Q(tt,o?a&1|2:a&1),ke&&Ba(t,l.treeForkCount),e):(Ze(t),null);case 22:case 23:return Ft(t),rc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),a=t.updateQueue,a!==null&&ii(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&G(Jn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),qa(lt),Ze(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function yy(e,t){switch(Yo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qa(lt),B(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Ft(t),t.alternate===null)throw Error(i(340));Fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ft(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(tt),null;case 4:return B(),null;case 10:return qa(t.type),null;case 22:case 23:return Ft(t),rc(),e!==null&&G(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qa(lt),null;case 25:return null;default:return null}}function Jm(e,t){switch(Yo(t),t.tag){case 3:qa(lt),B();break;case 26:case 27:case 5:Ee(t);break;case 4:B();break;case 31:t.memoizedState!==null&&Ft(t);break;case 13:Ft(t);break;case 19:G(tt);break;case 10:qa(t.type);break;case 22:case 23:Ft(t),rc(),e!==null&&G(Jn);break;case 24:qa(lt)}}function Qr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var c=a.create,h=a.inst;l=c(),h.destroy=l}a=a.next}while(a!==o)}}catch(b){Ge(t,t.return,b)}}function gn(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){var h=l.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,o=t;var E=a,D=b;try{D()}catch(Y){Ge(o,E,Y)}}}l=l.next}while(l!==c)}}catch(Y){Ge(t,t.return,Y)}}function $m(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{qf(t,a)}catch(l){Ge(e,e.return,l)}}}function Pm(e,t,a){a.props=el(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ge(e,t,l)}}function Vr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Ge(e,t,o)}}function Ta(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Ge(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ge(e,t,o)}else a.current=null}function Im(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Ge(e,e.return,o)}}function Lc(e,t,a){try{var l=e.stateNode;Gy(l,e.type,a,t),l[Ot]=t}catch(o){Ge(e,e.return,o)}}function Wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Nn(e.type)||e.tag===4}function Bc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wm(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&&Nn(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 Hc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Da));else if(l!==4&&(l===27&&Nn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,a),e=e.sibling;e!==null;)Hc(e,t,a),e=e.sibling}function oi(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Nn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(oi(e,t,a),e=e.sibling;e!==null;)oi(e,t,a),e=e.sibling}function eh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);yt(t,l,a),t[pt]=e,t[Ot]=a}catch(c){Ge(e,e.return,c)}}var Xa=!1,it=!1,qc=!1,th=typeof WeakSet=="function"?WeakSet:Set,ht=null;function by(e,t){if(e=e.containerInfo,iu=_i,e=mf(e),zo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var h=0,b=-1,E=-1,D=0,Y=0,K=e,U=null;t:for(;;){for(var H;K!==a||o!==0&&K.nodeType!==3||(b=h+o),K!==c||l!==0&&K.nodeType!==3||(E=h+l),K.nodeType===3&&(h+=K.nodeValue.length),(H=K.firstChild)!==null;)U=K,K=H;for(;;){if(K===e)break t;if(U===a&&++D===o&&(b=h),U===c&&++Y===l&&(E=h),(H=K.nextSibling)!==null)break;K=U,U=K.parentNode}K=H}a=b===-1||E===-1?null:{start:b,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(ou={focusedElem:e,selectionRange:a},_i=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,o=c.memoizedProps,c=c.memoizedState,l=a.stateNode;try{var ie=el(a.type,o);e=l.getSnapshotBeforeUpdate(ie,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Ge(a,a.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)du(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":du(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,ht=e;break}ht=t.return}}function ah(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ka(e,a),l&4&&Qr(5,a);break;case 1:if(Ka(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ge(a,a.return,h)}else{var o=el(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ge(a,a.return,h)}}l&64&&$m(a),l&512&&Vr(a,a.return);break;case 3:if(Ka(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{qf(e,t)}catch(h){Ge(a,a.return,h)}}break;case 27:t===null&&l&4&&eh(a);case 26:case 5:Ka(e,a),t===null&&l&4&&Im(a),l&512&&Vr(a,a.return);break;case 12:Ka(e,a);break;case 31:Ka(e,a),l&4&&rh(e,a);break;case 13:Ka(e,a),l&4&&sh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=_y.bind(null,a),Jy(e,a))));break;case 22:if(l=a.memoizedState!==null||Xa,!l){t=t!==null&&t.memoizedState!==null||it,o=Xa;var c=it;Xa=l,(it=t)&&!c?Za(e,a,(a.subtreeFlags&8772)!==0):Ka(e,a),Xa=o,it=c}break;case 30:break;default:Ka(e,a)}}function nh(e){var t=e.alternate;t!==null&&(e.alternate=null,nh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&go(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 $e=null,kt=!1;function Fa(e,t,a){for(a=a.child;a!==null;)lh(e,t,a),a=a.sibling}function lh(e,t,a){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(Ln,a)}catch{}switch(a.tag){case 26:it||Ta(a,t),Fa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:it||Ta(a,t);var l=$e,o=kt;Nn(a.type)&&($e=a.stateNode,kt=!1),Fa(e,t,a),Ir(a.stateNode),$e=l,kt=o;break;case 5:it||Ta(a,t);case 6:if(l=$e,o=kt,$e=null,Fa(e,t,a),$e=l,kt=o,$e!==null)if(kt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(c){Ge(a,t,c)}else try{$e.removeChild(a.stateNode)}catch(c){Ge(a,t,c)}break;case 18:$e!==null&&(kt?(e=$e,$h(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Il(e)):$h($e,a.stateNode));break;case 4:l=$e,o=kt,$e=a.stateNode.containerInfo,kt=!0,Fa(e,t,a),$e=l,kt=o;break;case 0:case 11:case 14:case 15:gn(2,a,t),it||gn(4,a,t),Fa(e,t,a);break;case 1:it||(Ta(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Pm(a,t,l)),Fa(e,t,a);break;case 21:Fa(e,t,a);break;case 22:it=(l=it)||a.memoizedState!==null,Fa(e,t,a),it=l;break;default:Fa(e,t,a)}}function rh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Il(e)}catch(a){Ge(t,t.return,a)}}}function sh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Il(e)}catch(a){Ge(t,t.return,a)}}function Sy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new th),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new th),t;default:throw Error(i(435,e.tag))}}function ci(e,t){var a=Sy(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=My.bind(null,e,l);l.then(o,o)}})}function Dt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],c=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(Nn(b.type)){$e=b.stateNode,kt=!1;break e}break;case 5:$e=b.stateNode,kt=!1;break e;case 3:case 4:$e=b.stateNode.containerInfo,kt=!0;break e}b=b.return}if($e===null)throw Error(i(160));lh(c,h,o),$e=null,kt=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ih(t,e),t=t.sibling}var pa=null;function ih(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(t,e),Ut(e),l&4&&(gn(3,e,e.return),Qr(3,e),gn(5,e,e.return));break;case 1:Dt(t,e),Ut(e),l&512&&(it||a===null||Ta(a,a.return)),l&64&&Xa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=pa;if(Dt(t,e),Ut(e),l&512&&(it||a===null||Ta(a,a.return)),l&4){var c=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":c=o.getElementsByTagName("title")[0],(!c||c[gr]||c[pt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(l),o.head.insertBefore(c,o.querySelector("head > title"))),yt(c,l,a),c[pt]=e,mt(c),l=c;break e;case"link":var h=ip("link","href",o).get(l+(a.href||""));if(h){for(var b=0;b<h.length;b++)if(c=h[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(b,1);break t}}c=o.createElement(l),yt(c,l,a),o.head.appendChild(c);break;case"meta":if(h=ip("meta","content",o).get(l+(a.content||""))){for(b=0;b<h.length;b++)if(c=h[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(b,1);break t}}c=o.createElement(l),yt(c,l,a),o.head.appendChild(c);break;default:throw Error(i(468,l))}c[pt]=e,mt(c),l=c}e.stateNode=l}else op(o,e.type,e.stateNode);else e.stateNode=sp(o,l,e.memoizedProps);else c!==l?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,l===null?op(o,e.type,e.stateNode):sp(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Lc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Dt(t,e),Ut(e),l&512&&(it||a===null||Ta(a,a.return)),a!==null&&l&4&&Lc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Dt(t,e),Ut(e),l&512&&(it||a===null||Ta(a,a.return)),e.flags&32){o=e.stateNode;try{Sl(o,"")}catch(ie){Ge(e,e.return,ie)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Lc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(qc=!0);break;case 6:if(Dt(t,e),Ut(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ie){Ge(e,e.return,ie)}}break;case 3:if(Ei=null,o=pa,pa=Ni(t.containerInfo),Dt(t,e),pa=o,Ut(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Il(t.containerInfo)}catch(ie){Ge(e,e.return,ie)}qc&&(qc=!1,oh(e));break;case 4:l=pa,pa=Ni(e.stateNode.containerInfo),Dt(t,e),Ut(e),pa=l;break;case 12:Dt(t,e),Ut(e);break;case 31:Dt(t,e),Ut(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 13:Dt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(di=Et()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 22:o=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,D=Xa,Y=it;if(Xa=D||o,it=Y||E,Dt(t,e),it=Y,Xa=D,Ut(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||E||Xa||it||tl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(c=E.stateNode,o)h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=E.stateNode;var K=E.memoizedProps.style,U=K!=null&&K.hasOwnProperty("display")?K.display:null;b.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){Ge(E,E.return,ie)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(ie){Ge(E,E.return,ie)}}}else if(t.tag===18){if(a===null){E=t;try{var H=E.stateNode;o?Ph(H,!0):Ph(E.stateNode,!1)}catch(ie){Ge(E,E.return,ie)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,ci(e,a))));break;case 19:Dt(t,e),Ut(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 30:break;case 21:break;default:Dt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Wm(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var o=a.stateNode,c=Bc(e);oi(e,c,o);break;case 5:var h=a.stateNode;a.flags&32&&(Sl(h,""),a.flags&=-33);var b=Bc(e);oi(e,b,h);break;case 3:case 4:var E=a.stateNode.containerInfo,D=Bc(e);Hc(e,D,E);break;default:throw Error(i(161))}}catch(Y){Ge(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function oh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;oh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ah(e,t.alternate,t),t=t.sibling}function tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:gn(4,t,t.return),tl(t);break;case 1:Ta(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Pm(t,t.return,a),tl(t);break;case 27:Ir(t.stateNode);case 26:case 5:Ta(t,t.return),tl(t);break;case 22:t.memoizedState===null&&tl(t);break;case 30:tl(t);break;default:tl(t)}e=e.sibling}}function Za(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,c=t,h=c.flags;switch(c.tag){case 0:case 11:case 15:Za(o,c,a),Qr(4,c);break;case 1:if(Za(o,c,a),l=c,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){Ge(l,l.return,D)}if(l=c,o=l.updateQueue,o!==null){var b=l.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)Hf(E[o],b)}catch(D){Ge(l,l.return,D)}}a&&h&64&&$m(c),Vr(c,c.return);break;case 27:eh(c);case 26:case 5:Za(o,c,a),a&&l===null&&h&4&&Im(c),Vr(c,c.return);break;case 12:Za(o,c,a);break;case 31:Za(o,c,a),a&&h&4&&rh(o,c);break;case 13:Za(o,c,a),a&&h&4&&sh(o,c);break;case 22:c.memoizedState===null&&Za(o,c,a),Vr(c,c.return);break;case 30:break;default:Za(o,c,a)}t=t.sibling}}function Gc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&_r(a))}function Qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e))}function ga(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ch(e,t,a,l),t=t.sibling}function ch(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ga(e,t,a,l),o&2048&&Qr(9,t);break;case 1:ga(e,t,a,l);break;case 3:ga(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e)));break;case 12:if(o&2048){ga(e,t,a,l),e=t.stateNode;try{var c=t.memoizedProps,h=c.id,b=c.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Ge(t,t.return,E)}}else ga(e,t,a,l);break;case 31:ga(e,t,a,l);break;case 13:ga(e,t,a,l);break;case 23:break;case 22:c=t.stateNode,h=t.alternate,t.memoizedState!==null?c._visibility&2?ga(e,t,a,l):Yr(e,t):c._visibility&2?ga(e,t,a,l):(c._visibility|=2,Gl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Gc(h,t);break;case 24:ga(e,t,a,l),o&2048&&Qc(t.alternate,t);break;default:ga(e,t,a,l)}}function Gl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,h=t,b=a,E=l,D=h.flags;switch(h.tag){case 0:case 11:case 15:Gl(c,h,b,E,o),Qr(8,h);break;case 23:break;case 22:var Y=h.stateNode;h.memoizedState!==null?Y._visibility&2?Gl(c,h,b,E,o):Yr(c,h):(Y._visibility|=2,Gl(c,h,b,E,o)),o&&D&2048&&Gc(h.alternate,h);break;case 24:Gl(c,h,b,E,o),o&&D&2048&&Qc(h.alternate,h);break;default:Gl(c,h,b,E,o)}t=t.sibling}}function Yr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Yr(a,l),o&2048&&Gc(l.alternate,l);break;case 24:Yr(a,l),o&2048&&Qc(l.alternate,l);break;default:Yr(a,l)}t=t.sibling}}var Xr=8192;function Ql(e,t,a){if(e.subtreeFlags&Xr)for(e=e.child;e!==null;)uh(e,t,a),e=e.sibling}function uh(e,t,a){switch(e.tag){case 26:Ql(e,t,a),e.flags&Xr&&e.memoizedState!==null&&i0(a,pa,e.memoizedState,e.memoizedProps);break;case 5:Ql(e,t,a);break;case 3:case 4:var l=pa;pa=Ni(e.stateNode.containerInfo),Ql(e,t,a),pa=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Xr,Xr=16777216,Ql(e,t,a),Xr=l):Ql(e,t,a));break;default:Ql(e,t,a)}}function dh(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 Fr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,mh(l,e)}dh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fh(e),e=e.sibling}function fh(e){switch(e.tag){case 0:case 11:case 15:Fr(e),e.flags&2048&&gn(9,e,e.return);break;case 3:Fr(e);break;case 12:Fr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ui(e)):Fr(e);break;default:Fr(e)}}function ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,mh(l,e)}dh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gn(8,t,t.return),ui(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ui(t));break;default:ui(t)}e=e.sibling}}function mh(e,t){for(;ht!==null;){var a=ht;switch(a.tag){case 0:case 11:case 15:gn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:_r(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ht=l;else e:for(a=e;ht!==null;){l=ht;var o=l.sibling,c=l.return;if(nh(l),l===a){ht=null;break e}if(o!==null){o.return=c,ht=o;break e}ht=c}}}var wy={getCacheForType:function(e){var t=xt(lt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return xt(lt).controller.signal}},Ny=typeof WeakMap=="function"?WeakMap:Map,He=0,Fe=null,_e=null,Oe=0,qe=0,Kt=null,xn=!1,Vl=!1,Vc=!1,Ja=0,et=0,vn=0,al=0,Yc=0,Zt=0,Yl=0,Kr=null,Lt=null,Xc=!1,di=0,hh=0,fi=1/0,mi=null,yn=null,ct=0,bn=null,Xl=null,$a=0,Fc=0,Kc=null,ph=null,Zr=0,Zc=null;function Jt(){return(He&2)!==0&&Oe!==0?Oe&-Oe:O.T!==null?eu():ho()}function gh(){if(Zt===0)if((Oe&536870912)===0||ke){var e=ml;ml<<=1,(ml&3932160)===0&&(ml=262144),Zt=e}else Zt=536870912;return e=Xt.current,e!==null&&(e.flags|=32),Zt}function Bt(e,t,a){(e===Fe&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(Fl(e,0),Sn(e,Oe,Zt,!1)),Ie(e,a),((He&2)===0||e!==Fe)&&(e===Fe&&((He&2)===0&&(al|=a),et===4&&Sn(e,Oe,Zt,!1)),Ra(e))}function xh(e,t,a){if((He&6)!==0)throw Error(i(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Je(e,t),o=l?Ty(e,t):$c(e,t,!0),c=l;do{if(o===0){Vl&&!l&&Sn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!jy(a)){o=$c(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)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;o=Kr;var E=b.current.memoizedState.isDehydrated;if(E&&(Fl(b,h).flags|=256),h=$c(b,h,!1),h!==2){if(Vc&&!E){b.errorRecoveryDisabledLanes|=c,al|=c,o=4;break e}c=Lt,Lt=o,c!==null&&(Lt===null?Lt=c:Lt.push.apply(Lt,c))}o=h}if(c=!1,o!==2)continue}}if(o===1){Fl(e,0),Sn(e,t,0,!0);break}e:{switch(l=e,c=o,c){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Sn(l,t,Zt,!xn);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(o=di+300-Et(),10<o)){if(Sn(l,t,Zt,!xn),ye(l,0,!0)!==0)break e;$a=t,l.timeoutHandle=Zh(vh.bind(null,l,a,Lt,mi,Xc,t,Zt,al,Yl,xn,c,"Throttled",-0,0),o);break e}vh(l,a,Lt,mi,Xc,t,Zt,al,Yl,xn,c,null,-0,0)}}break}while(!0);Ra(e)}function vh(e,t,a,l,o,c,h,b,E,D,Y,K,U,H){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Da},uh(t,c,K);var ie=(c&62914560)===c?di-Et():(c&4194048)===c?hh-Et():0;if(ie=o0(K,ie),ie!==null){$a=c,e.cancelPendingCommit=ie(Th.bind(null,e,t,c,a,l,o,h,b,E,Y,K,null,U,H)),Sn(e,c,h,!D);return}}Th(e,t,c,a,l,o,h,b,E)}function jy(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],c=o.getSnapshot;o=o.value;try{if(!Vt(c(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Sn(e,t,a,l){t&=~Yc,t&=~al,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var c=31-bt(o),h=1<<c;l[c]=-1,o&=~h}a!==0&&Hn(e,a,t)}function hi(){return(He&6)===0?(Jr(0),!1):!0}function Jc(){if(_e!==null){if(qe===0)var e=_e.return;else e=_e,Ha=Kn=null,dc(e),Ul=null,Ar=0,e=_e;for(;e!==null;)Jm(e.alternate,e),e=e.return;_e=null}}function Fl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Yy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),$a=0,Jc(),Fe=e,_e=a=La(e.current,null),Oe=t,qe=0,Kt=null,xn=!1,Vl=Je(e,t),Vc=!1,Yl=Zt=Yc=al=vn=et=0,Lt=Kr=null,Xc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-bt(l),c=1<<o;t|=e[o],l&=~c}return Ja=t,Ds(),a}function yh(e,t){we=null,O.H=Hr,t===Dl||t===Vs?(t=Df(),qe=3):t===Wo?(t=Df(),qe=4):qe=t===Rc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,_e===null&&(et=1,ni(e,ta(t,e.current)))}function bh(){var e=Xt.current;return e===null?!0:(Oe&4194048)===Oe?ra===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===ra:!1}function Sh(){var e=O.H;return O.H=Hr,e===null?Hr:e}function wh(){var e=O.A;return O.A=wy,e}function pi(){et=4,xn||(Oe&4194048)!==Oe&&Xt.current!==null||(Vl=!0),(vn&134217727)===0&&(al&134217727)===0||Fe===null||Sn(Fe,Oe,Zt,!1)}function $c(e,t,a){var l=He;He|=2;var o=Sh(),c=wh();(Fe!==e||Oe!==t)&&(mi=null,Fl(e,t)),t=!1;var h=et;e:do try{if(qe!==0&&_e!==null){var b=_e,E=Kt;switch(qe){case 8:Jc(),h=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(t=!0);var D=qe;if(qe=0,Kt=null,Kl(e,b,E,D),a&&Vl){h=0;break e}break;default:D=qe,qe=0,Kt=null,Kl(e,b,E,D)}}Ey(),h=et;break}catch(Y){yh(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Ha=Kn=null,He=l,O.H=o,O.A=c,_e===null&&(Fe=null,Oe=0,Ds()),h}function Ey(){for(;_e!==null;)Nh(_e)}function Ty(e,t){var a=He;He|=2;var l=Sh(),o=wh();Fe!==e||Oe!==t?(mi=null,fi=Et()+500,Fl(e,t)):Vl=Je(e,t);e:do try{if(qe!==0&&_e!==null){t=_e;var c=Kt;t:switch(qe){case 1:qe=0,Kt=null,Kl(e,t,c,1);break;case 2:case 9:if(zf(c)){qe=0,Kt=null,jh(t);break}t=function(){qe!==2&&qe!==9||Fe!==e||(qe=7),Ra(e)},c.then(t,t);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:zf(c)?(qe=0,Kt=null,jh(t)):(qe=0,Kt=null,Kl(e,t,c,7));break;case 5:var h=null;switch(_e.tag){case 26:h=_e.memoizedState;case 5:case 27:var b=_e;if(h?cp(h):b.stateNode.complete){qe=0,Kt=null;var E=b.sibling;if(E!==null)_e=E;else{var D=b.return;D!==null?(_e=D,gi(D)):_e=null}break t}}qe=0,Kt=null,Kl(e,t,c,5);break;case 6:qe=0,Kt=null,Kl(e,t,c,6);break;case 8:Jc(),et=6;break e;default:throw Error(i(462))}}Ry();break}catch(Y){yh(e,Y)}while(!0);return Ha=Kn=null,O.H=l,O.A=o,He=a,_e!==null?0:(Fe=null,Oe=0,Ds(),et)}function Ry(){for(;_e!==null&&!jt();)Nh(_e)}function Nh(e){var t=Km(e.alternate,e,Ja);e.memoizedProps=e.pendingProps,t===null?gi(e):_e=t}function jh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Gm(a,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Gm(a,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:dc(t);default:Jm(a,t),t=_e=wf(t,Ja),t=Km(a,t,Ja)}e.memoizedProps=e.pendingProps,t===null?gi(e):_e=t}function Kl(e,t,a,l){Ha=Kn=null,dc(t),Ul=null,Ar=0;var o=t.return;try{if(py(e,o,t,a,Oe)){et=1,ni(e,ta(a,e.current)),_e=null;return}}catch(c){if(o!==null)throw _e=o,c;et=1,ni(e,ta(a,e.current)),_e=null;return}t.flags&32768?(ke||l===1?e=!0:Vl||(Oe&536870912)!==0?e=!1:(xn=e=!0,(l===2||l===9||l===3||l===6)&&(l=Xt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Eh(t,e)):gi(t)}function gi(e){var t=e;do{if((t.flags&32768)!==0){Eh(t,xn);return}e=t.return;var a=vy(t.alternate,t,Ja);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);et===0&&(et=5)}function Eh(e,t){do{var a=yy(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);et=6,_e=null}function Th(e,t,a,l,o,c,h,b,E){e.cancelPendingCommit=null;do xi();while(ct!==0);if((He&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(c=t.lanes|t.childLanes,c|=Bo,_t(e,a,c,h,b,E),e===Fe&&(_e=Fe=null,Oe=0),Xl=t,bn=e,$a=a,Fc=c,Kc=o,ph=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ay(Un,function(){return Ah(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,o=Z.p,Z.p=2,h=He,He|=4;try{by(e,t,a)}finally{He=h,Z.p=o,O.T=l}}ct=1,Rh(),Ch(),_h()}}function Rh(){if(ct===1){ct=0;var e=bn,t=Xl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var l=Z.p;Z.p=2;var o=He;He|=4;try{ih(t,e);var c=ou,h=mf(e.containerInfo),b=c.focusedElem,E=c.selectionRange;if(h!==b&&b&&b.ownerDocument&&ff(b.ownerDocument.documentElement,b)){if(E!==null&&zo(b)){var D=E.start,Y=E.end;if(Y===void 0&&(Y=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(Y,b.value.length);else{var K=b.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var H=U.getSelection(),ie=b.textContent.length,pe=Math.min(E.start,ie),Ye=E.end===void 0?pe:Math.min(E.end,ie);!H.extend&&pe>Ye&&(h=Ye,Ye=pe,pe=h);var A=df(b,pe),C=df(b,Ye);if(A&&C&&(H.rangeCount!==1||H.anchorNode!==A.node||H.anchorOffset!==A.offset||H.focusNode!==C.node||H.focusOffset!==C.offset)){var k=K.createRange();k.setStart(A.node,A.offset),H.removeAllRanges(),pe>Ye?(H.addRange(k),H.extend(C.node,C.offset)):(k.setEnd(C.node,C.offset),H.addRange(k))}}}}for(K=[],H=b;H=H.parentNode;)H.nodeType===1&&K.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<K.length;b++){var X=K[b];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}_i=!!iu,ou=iu=null}finally{He=o,Z.p=l,O.T=a}}e.current=t,ct=2}}function Ch(){if(ct===2){ct=0;var e=bn,t=Xl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var l=Z.p;Z.p=2;var o=He;He|=4;try{ah(e,t.alternate,t)}finally{He=o,Z.p=l,O.T=a}}ct=3}}function _h(){if(ct===4||ct===3){ct=0,tn();var e=bn,t=Xl,a=$a,l=ph;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,Xl=bn=null,Mh(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(yn=null),ma(a),t=t.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(Ln,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=O.T,o=Z.p,Z.p=2,O.T=null;try{for(var c=e.onRecoverableError,h=0;h<l.length;h++){var b=l[h];c(b.value,{componentStack:b.stack})}}finally{O.T=t,Z.p=o}}($a&3)!==0&&xi(),Ra(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Zc?Zr++:(Zr=0,Zc=e):Zr=0,Jr(0)}}function Mh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_r(t)))}function xi(){return Rh(),Ch(),_h(),Ah()}function Ah(){if(ct!==5)return!1;var e=bn,t=Fc;Fc=0;var a=ma($a),l=O.T,o=Z.p;try{Z.p=32>a?32:a,O.T=null,a=Kc,Kc=null;var c=bn,h=$a;if(ct=0,Xl=bn=null,$a=0,(He&6)!==0)throw Error(i(331));var b=He;if(He|=4,fh(c.current),ch(c,c.current,h,a),He=b,Jr(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(Ln,c)}catch{}return!0}finally{Z.p=o,O.T=l,Mh(e,t)}}function Oh(e,t,a){t=ta(a,t),t=Tc(e.stateNode,t,2),e=mn(e,t,2),e!==null&&(Ie(e,2),Ra(e))}function Ge(e,t,a){if(e.tag===3)Oh(e,e,a);else for(;t!==null;){if(t.tag===3){Oh(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(yn===null||!yn.has(l))){e=ta(a,e),a=zm(2),l=mn(t,a,2),l!==null&&(km(a,l,t,e),Ie(l,2),Ra(l));break}}t=t.return}}function Pc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ny;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Vc=!0,o.add(a),e=Cy.bind(null,e,t,a),t.then(e,e))}function Cy(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Fe===e&&(Oe&a)===a&&(et===4||et===3&&(Oe&62914560)===Oe&&300>Et()-di?(He&2)===0&&Fl(e,0):Yc|=a,Yl===Oe&&(Yl=0)),Ra(e)}function zh(e,t){t===0&&(t=St()),e=Yn(e,t),e!==null&&(Ie(e,t),Ra(e))}function _y(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),zh(e,a)}function My(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(t),zh(e,a)}function Ay(e,t){return fr(e,t)}var vi=null,Zl=null,Ic=!1,yi=!1,Wc=!1,wn=0;function Ra(e){e!==Zl&&e.next===null&&(Zl===null?vi=Zl=e:Zl=Zl.next=e),yi=!0,Ic||(Ic=!0,zy())}function Jr(e,t){if(!Wc&&yi){Wc=!0;do for(var a=!1,l=vi;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var c=0;else{var h=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-bt(42|e)+1)-1,c&=o&~(h&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Lh(l,c))}else c=Oe,c=ye(l,l===Fe?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Je(l,c)||(a=!0,Lh(l,c));l=l.next}while(a);Wc=!1}}function Oy(){kh()}function kh(){yi=Ic=!1;var e=0;wn!==0&&Vy()&&(e=wn);for(var t=Et(),a=null,l=vi;l!==null;){var o=l.next,c=Dh(l,t);c===0?(l.next=null,a===null?vi=o:a.next=o,o===null&&(Zl=a)):(a=l,(e!==0||(c&3)!==0)&&(yi=!0)),l=o}ct!==0&&ct!==5||Jr(e),wn!==0&&(wn=0)}function Dh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var h=31-bt(c),b=1<<h,E=o[h];E===-1?((b&a)===0||(b&l)!==0)&&(o[h]=ft(b,t)):E<=t&&(e.expiredLanes|=b),c&=~b}if(t=Fe,a=Oe,a=ye(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&mr(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Je(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&mr(l),ma(a)){case 2:case 8:a=ws;break;case 32:a=Un;break;case 268435456:a=za;break;default:a=Un}return l=Uh.bind(null,e),a=fr(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&mr(l),e.callbackPriority=2,e.callbackNode=null,2}function Uh(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xi()&&e.callbackNode!==a)return null;var l=Oe;return l=ye(e,e===Fe?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(xh(e,l,t),Dh(e,Et()),e.callbackNode!=null&&e.callbackNode===a?Uh.bind(null,e):null)}function Lh(e,t){if(xi())return null;xh(e,t,!0)}function zy(){Xy(function(){(He&6)!==0?fr(Dn,Oy):kh()})}function eu(){if(wn===0){var e=zl;e===0&&(e=fl,fl<<=1,(fl&261888)===0&&(fl=256)),wn=e}return wn}function Bh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function Hh(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function ky(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var c=Bh((o[Ot]||null).action),h=l.submitter;h&&(t=(t=h[Ot]||null)?Bh(t.formAction):h.getAttribute("formAction"),t!==null&&(c=t,h=null));var b=new As("action","action",null,l,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(wn!==0){var E=h?Hh(o,h):new FormData(o);bc(a,{pending:!0,data:E,method:o.method,action:c},null,E)}}else typeof c=="function"&&(b.preventDefault(),E=h?Hh(o,h):new FormData(o),bc(a,{pending:!0,data:E,method:o.method,action:c},c,E))},currentTarget:o}]})}}for(var tu=0;tu<Lo.length;tu++){var au=Lo[tu],Dy=au.toLowerCase(),Uy=au[0].toUpperCase()+au.slice(1);ha(Dy,"on"+Uy)}ha(gf,"onAnimationEnd"),ha(xf,"onAnimationIteration"),ha(vf,"onAnimationStart"),ha("dblclick","onDoubleClick"),ha("focusin","onFocus"),ha("focusout","onBlur"),ha(Iv,"onTransitionRun"),ha(Wv,"onTransitionStart"),ha(ey,"onTransitionCancel"),ha(yf,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $r="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(" "),Ly=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($r));function qh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var h=l.length-1;0<=h;h--){var b=l[h],E=b.instance,D=b.currentTarget;if(b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=D;try{c(o)}catch(Y){ks(Y)}o.currentTarget=null,c=E}else for(h=0;h<l.length;h++){if(b=l[h],E=b.instance,D=b.currentTarget,b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=D;try{c(o)}catch(Y){ks(Y)}o.currentTarget=null,c=E}}}}function Me(e,t){var a=t[po];a===void 0&&(a=t[po]=new Set);var l=e+"__bubble";a.has(l)||(Gh(t,e,2,!1),a.add(l))}function nu(e,t,a){var l=0;t&&(l|=4),Gh(a,e,l,t)}var bi="_reactListening"+Math.random().toString(36).slice(2);function lu(e){if(!e[bi]){e[bi]=!0,zd.forEach(function(a){a!=="selectionchange"&&(Ly.has(a)||nu(a,!1,e),nu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bi]||(t[bi]=!0,nu("selectionchange",!1,t))}}function Gh(e,t,a,l){switch(gp(t)){case 2:var o=d0;break;case 8:o=f0;break;default:o=yu}a=o.bind(null,t,a,e),o=void 0,!jo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function ru(e,t,a,l,o){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var b=l.stateNode.containerInfo;if(b===o)break;if(h===4)for(h=l.return;h!==null;){var E=h.tag;if((E===3||E===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;b!==null;){if(h=gl(b),h===null)return;if(E=h.tag,E===5||E===6||E===26||E===27){l=c=h;continue e}b=b.parentNode}}l=l.return}Xd(function(){var D=c,Y=wo(a),K=[];e:{var U=bf.get(e);if(U!==void 0){var H=As,ie=e;switch(e){case"keypress":if(_s(a)===0)break e;case"keydown":case"keyup":H=Mv;break;case"focusin":ie="focus",H=Co;break;case"focusout":ie="blur",H=Co;break;case"beforeblur":case"afterblur":H=Co;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Zd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=vv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=zv;break;case gf:case xf:case vf:H=Sv;break;case yf:H=Dv;break;case"scroll":case"scrollend":H=gv;break;case"wheel":H=Lv;break;case"copy":case"cut":case"paste":H=Nv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=$d;break;case"toggle":case"beforetoggle":H=Hv}var pe=(t&4)!==0,Ye=!pe&&(e==="scroll"||e==="scrollend"),A=pe?U!==null?U+"Capture":null:U;pe=[];for(var C=D,k;C!==null;){var X=C;if(k=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||k===null||A===null||(X=vr(C,A),X!=null&&pe.push(Pr(C,X,k))),Ye)break;C=C.return}0<pe.length&&(U=new H(U,ie,null,a,Y),K.push({event:U,listeners:pe}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",U&&a!==So&&(ie=a.relatedTarget||a.fromElement)&&(gl(ie)||ie[pl]))break e;if((H||U)&&(U=Y.window===Y?Y:(U=Y.ownerDocument)?U.defaultView||U.parentWindow:window,H?(ie=a.relatedTarget||a.toElement,H=D,ie=ie?gl(ie):null,ie!==null&&(Ye=f(ie),pe=ie.tag,ie!==Ye||pe!==5&&pe!==27&&pe!==6)&&(ie=null)):(H=null,ie=D),H!==ie)){if(pe=Zd,X="onMouseLeave",A="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(pe=$d,X="onPointerLeave",A="onPointerEnter",C="pointer"),Ye=H==null?U:xr(H),k=ie==null?U:xr(ie),U=new pe(X,C+"leave",H,a,Y),U.target=Ye,U.relatedTarget=k,X=null,gl(Y)===D&&(pe=new pe(A,C+"enter",ie,a,Y),pe.target=k,pe.relatedTarget=Ye,X=pe),Ye=X,H&&ie)t:{for(pe=By,A=H,C=ie,k=0,X=A;X;X=pe(X))k++;X=0;for(var me=C;me;me=pe(me))X++;for(;0<k-X;)A=pe(A),k--;for(;0<X-k;)C=pe(C),X--;for(;k--;){if(A===C||C!==null&&A===C.alternate){pe=A;break t}A=pe(A),C=pe(C)}pe=null}else pe=null;H!==null&&Qh(K,U,H,pe,!1),ie!==null&&Ye!==null&&Qh(K,Ye,ie,pe,!0)}}e:{if(U=D?xr(D):window,H=U.nodeName&&U.nodeName.toLowerCase(),H==="select"||H==="input"&&U.type==="file")var Ue=lf;else if(af(U))if(rf)Ue=Jv;else{Ue=Kv;var ue=Fv}else H=U.nodeName,!H||H.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&bo(D.elementType)&&(Ue=lf):Ue=Zv;if(Ue&&(Ue=Ue(e,D))){nf(K,Ue,a,Y);break e}ue&&ue(e,U,D),e==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&yo(U,"number",U.value)}switch(ue=D?xr(D):window,e){case"focusin":(af(ue)||ue.contentEditable==="true")&&(El=ue,ko=D,Tr=null);break;case"focusout":Tr=ko=El=null;break;case"mousedown":Do=!0;break;case"contextmenu":case"mouseup":case"dragend":Do=!1,hf(K,a,Y);break;case"selectionchange":if(Pv)break;case"keydown":case"keyup":hf(K,a,Y)}var je;if(Mo)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else jl?ef(e,a)&&(ze="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ze="onCompositionStart");ze&&(Pd&&a.locale!=="ko"&&(jl||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&jl&&(je=Fd()):(rn=Y,Eo="value"in rn?rn.value:rn.textContent,jl=!0)),ue=Si(D,ze),0<ue.length&&(ze=new Jd(ze,e,null,a,Y),K.push({event:ze,listeners:ue}),je?ze.data=je:(je=tf(a),je!==null&&(ze.data=je)))),(je=Gv?Qv(e,a):Vv(e,a))&&(ze=Si(D,"onBeforeInput"),0<ze.length&&(ue=new Jd("onBeforeInput","beforeinput",null,a,Y),K.push({event:ue,listeners:ze}),ue.data=je)),ky(K,e,D,a,Y)}qh(K,t)})}function Pr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Si(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=vr(e,a),o!=null&&l.unshift(Pr(e,o,c)),o=vr(e,t),o!=null&&l.push(Pr(e,o,c))),e.tag===3)return l;e=e.return}return[]}function By(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qh(e,t,a,l,o){for(var c=t._reactName,h=[];a!==null&&a!==l;){var b=a,E=b.alternate,D=b.stateNode;if(b=b.tag,E!==null&&E===l)break;b!==5&&b!==26&&b!==27||D===null||(E=D,o?(D=vr(a,c),D!=null&&h.unshift(Pr(a,D,E))):o||(D=vr(a,c),D!=null&&h.push(Pr(a,D,E)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Hy=/\r\n?/g,qy=/\u0000|\uFFFD/g;function Vh(e){return(typeof e=="string"?e:""+e).replace(Hy,`
9
+ `).replace(qy,"")}function Yh(e,t){return t=Vh(t),Vh(e)===t}function Ve(e,t,a,l,o,c){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Sl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Sl(e,""+l);break;case"className":Es(e,"class",l);break;case"tabIndex":Es(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Es(e,a,l);break;case"style":Vd(e,l,c);break;case"data":if(t!=="object"){Es(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 c=="function"&&(a==="formAction"?(t!=="input"&&Ve(e,t,"name",o.name,o,null),Ve(e,t,"formEncType",o.formEncType,o,null),Ve(e,t,"formMethod",o.formMethod,o,null),Ve(e,t,"formTarget",o.formTarget,o,null)):(Ve(e,t,"encType",o.encType,o,null),Ve(e,t,"method",o.method,o,null),Ve(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Da);break;case"onScroll":l!=null&&Me("scroll",e);break;case"onScrollEnd":l!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Rs(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Me("beforetoggle",e),Me("toggle",e),js(e,"popover",l);break;case"xlinkActuate":ka(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ka(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ka(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ka(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ka(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ka(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ka(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ka(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ka(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":js(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hv.get(a)||a,js(e,a,l))}}function su(e,t,a,l,o,c){switch(a){case"style":Vd(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Sl(e,l):(typeof l=="number"||typeof l=="bigint")&&Sl(e,""+l);break;case"onScroll":l!=null&&Me("scroll",e);break;case"onScrollEnd":l!=null&&Me("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),c=e[Ot]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof l=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):js(e,a,l)}}}function yt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var l=!1,o=!1,c;for(c in a)if(a.hasOwnProperty(c)){var h=a[c];if(h!=null)switch(c){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Ve(e,t,c,h,a,null)}}o&&Ve(e,t,"srcSet",a.srcSet,a,null),l&&Ve(e,t,"src",a.src,a,null);return;case"input":Me("invalid",e);var b=c=h=o=null,E=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var Y=a[l];if(Y!=null)switch(l){case"name":o=Y;break;case"type":h=Y;break;case"checked":E=Y;break;case"defaultChecked":D=Y;break;case"value":c=Y;break;case"defaultValue":b=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,t));break;default:Ve(e,t,l,Y,a,null)}}Hd(e,c,b,E,D,h,o,!1);return;case"select":Me("invalid",e),l=h=c=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":c=b;break;case"defaultValue":h=b;break;case"multiple":l=b;default:Ve(e,t,o,b,a,null)}t=c,a=h,e.multiple=!!l,t!=null?bl(e,!!l,t,!1):a!=null&&bl(e,!!l,a,!0);return;case"textarea":Me("invalid",e),c=o=l=null;for(h in a)if(a.hasOwnProperty(h)&&(b=a[h],b!=null))switch(h){case"value":l=b;break;case"defaultValue":o=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(i(91));break;default:Ve(e,t,h,b,a,null)}Gd(e,l,o,c);return;case"option":for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ve(e,t,E,l,a,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(l=0;l<$r.length;l++)Me($r[l],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(D in a)if(a.hasOwnProperty(D)&&(l=a[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Ve(e,t,D,l,a,null)}return;default:if(bo(t)){for(Y in a)a.hasOwnProperty(Y)&&(l=a[Y],l!==void 0&&su(e,t,Y,l,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null&&Ve(e,t,b,l,a,null))}function Gy(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,h=null,b=null,E=null,D=null,Y=null;for(H in a){var K=a[H];if(a.hasOwnProperty(H)&&K!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":E=K;default:l.hasOwnProperty(H)||Ve(e,t,H,null,l,K)}}for(var U in l){var H=l[U];if(K=a[U],l.hasOwnProperty(U)&&(H!=null||K!=null))switch(U){case"type":c=H;break;case"name":o=H;break;case"checked":D=H;break;case"defaultChecked":Y=H;break;case"value":h=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,t));break;default:H!==K&&Ve(e,t,U,H,l,K)}}vo(e,h,b,E,D,Y,c,o);return;case"select":H=h=b=U=null;for(c in a)if(E=a[c],a.hasOwnProperty(c)&&E!=null)switch(c){case"value":break;case"multiple":H=E;default:l.hasOwnProperty(c)||Ve(e,t,c,null,l,E)}for(o in l)if(c=l[o],E=a[o],l.hasOwnProperty(o)&&(c!=null||E!=null))switch(o){case"value":U=c;break;case"defaultValue":b=c;break;case"multiple":h=c;default:c!==E&&Ve(e,t,o,c,l,E)}t=b,a=h,l=H,U!=null?bl(e,!!a,U,!1):!!l!=!!a&&(t!=null?bl(e,!!a,t,!0):bl(e,!!a,a?[]:"",!1));return;case"textarea":H=U=null;for(b in a)if(o=a[b],a.hasOwnProperty(b)&&o!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ve(e,t,b,null,l,o)}for(h in l)if(o=l[h],c=a[h],l.hasOwnProperty(h)&&(o!=null||c!=null))switch(h){case"value":U=o;break;case"defaultValue":H=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(i(91));break;default:o!==c&&Ve(e,t,h,o,l,c)}qd(e,U,H);return;case"option":for(var ie in a)U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!l.hasOwnProperty(ie)&&(ie==="selected"?e.selected=!1:Ve(e,t,ie,null,l,U));for(E in l)U=l[E],H=a[E],l.hasOwnProperty(E)&&U!==H&&(U!=null||H!=null)&&(E==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":Ve(e,t,E,U,l,H));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 pe in a)U=a[pe],a.hasOwnProperty(pe)&&U!=null&&!l.hasOwnProperty(pe)&&Ve(e,t,pe,null,l,U);for(D in l)if(U=l[D],H=a[D],l.hasOwnProperty(D)&&U!==H&&(U!=null||H!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(i(137,t));break;default:Ve(e,t,D,U,l,H)}return;default:if(bo(t)){for(var Ye in a)U=a[Ye],a.hasOwnProperty(Ye)&&U!==void 0&&!l.hasOwnProperty(Ye)&&su(e,t,Ye,void 0,l,U);for(Y in l)U=l[Y],H=a[Y],!l.hasOwnProperty(Y)||U===H||U===void 0&&H===void 0||su(e,t,Y,U,l,H);return}}for(var A in a)U=a[A],a.hasOwnProperty(A)&&U!=null&&!l.hasOwnProperty(A)&&Ve(e,t,A,null,l,U);for(K in l)U=l[K],H=a[K],!l.hasOwnProperty(K)||U===H||U==null&&H==null||Ve(e,t,K,U,l,H)}function Xh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Qy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],c=o.transferSize,h=o.initiatorType,b=o.duration;if(c&&b&&Xh(h)){for(h=0,b=o.responseEnd,l+=1;l<a.length;l++){var E=a[l],D=E.startTime;if(D>b)break;var Y=E.transferSize,K=E.initiatorType;Y&&Xh(K)&&(E=E.responseEnd,h+=Y*(E<b?1:(b-D)/(E-D)))}if(--l,t+=8*(c+h)/(o.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 iu=null,ou=null;function wi(e){return e.nodeType===9?e:e.ownerDocument}function Fh(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 Kh(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 cu(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 uu=null;function Vy(){var e=window.event;return e&&e.type==="popstate"?e===uu?!1:(uu=e,!0):(uu=null,!1)}var Zh=typeof setTimeout=="function"?setTimeout:void 0,Yy=typeof clearTimeout=="function"?clearTimeout:void 0,Jh=typeof Promise=="function"?Promise:void 0,Xy=typeof queueMicrotask=="function"?queueMicrotask:typeof Jh<"u"?function(e){return Jh.resolve(null).then(e).catch(Fy)}:Zh;function Fy(e){setTimeout(function(){throw e})}function Nn(e){return e==="head"}function $h(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),Il(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ir(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ir(a);for(var c=a.firstChild;c;){var h=c.nextSibling,b=c.nodeName;c[gr]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=h}}else a==="body"&&Ir(e.ownerDocument.body);a=o}while(a);Il(t)}function Ph(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function du(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":du(a),go(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ky(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[gr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=sa(e.nextSibling),e===null)break}return null}function Zy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=sa(e.nextSibling),e===null))return null;return e}function Ih(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=sa(e.nextSibling),e===null))return null;return e}function fu(e){return e.data==="$?"||e.data==="$~"}function mu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Jy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function sa(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 hu=null;function Wh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return sa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function ep(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function tp(e,t,a){switch(t=wi(a),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 Ir(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);go(e)}var ia=new Map,ap=new Set;function Ni(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pa=Z.d;Z.d={f:$y,r:Py,D:Iy,C:Wy,L:e0,m:t0,X:n0,S:a0,M:l0};function $y(){var e=Pa.f(),t=hi();return e||t}function Py(e){var t=xl(e);t!==null&&t.tag===5&&t.type==="form"?ym(t):Pa.r(e)}var Jl=typeof document>"u"?null:document;function np(e,t,a){var l=Jl;if(l&&typeof t=="string"&&t){var o=Wt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),ap.has(o)||(ap.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),yt(t,"link",e),mt(t),l.head.appendChild(t)))}}function Iy(e){Pa.D(e),np("dns-prefetch",e,null)}function Wy(e,t){Pa.C(e,t),np("preconnect",e,t)}function e0(e,t,a){Pa.L(e,t,a);var l=Jl;if(l&&e&&t){var o='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Wt(a.imageSizes)+'"]')):o+='[href="'+Wt(e)+'"]';var c=o;switch(t){case"style":c=$l(e);break;case"script":c=Pl(e)}ia.has(c)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ia.set(c,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Wr(c))||t==="script"&&l.querySelector(es(c))||(t=l.createElement("link"),yt(t,"link",e),mt(t),l.head.appendChild(t)))}}function t0(e,t){Pa.m(e,t);var a=Jl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Wt(l)+'"][href="'+Wt(e)+'"]',c=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Pl(e)}if(!ia.has(c)&&(e=p({rel:"modulepreload",href:e},t),ia.set(c,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(es(c)))return}l=a.createElement("link"),yt(l,"link",e),mt(l),a.head.appendChild(l)}}}function a0(e,t,a){Pa.S(e,t,a);var l=Jl;if(l&&e){var o=vl(l).hoistableStyles,c=$l(e);t=t||"default";var h=o.get(c);if(!h){var b={loading:0,preload:null};if(h=l.querySelector(Wr(c)))b.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ia.get(c))&&pu(e,a);var E=h=l.createElement("link");mt(E),yt(E,"link",e),E._p=new Promise(function(D,Y){E.onload=D,E.onerror=Y}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,ji(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:b},o.set(c,h)}}}function n0(e,t){Pa.X(e,t);var a=Jl;if(a&&e){var l=vl(a).hoistableScripts,o=Pl(e),c=l.get(o);c||(c=a.querySelector(es(o)),c||(e=p({src:e,async:!0},t),(t=ia.get(o))&&gu(e,t),c=a.createElement("script"),mt(c),yt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function l0(e,t){Pa.M(e,t);var a=Jl;if(a&&e){var l=vl(a).hoistableScripts,o=Pl(e),c=l.get(o);c||(c=a.querySelector(es(o)),c||(e=p({src:e,async:!0,type:"module"},t),(t=ia.get(o))&&gu(e,t),c=a.createElement("script"),mt(c),yt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function lp(e,t,a,l){var o=(o=fe.current)?Ni(o):null;if(!o)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=$l(a.href),a=vl(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=$l(a.href);var c=vl(o).hoistableStyles,h=c.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,h),(c=o.querySelector(Wr(e)))&&!c._p&&(h.instance=c,h.state.loading=5),ia.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ia.set(e,a),c||r0(o,e,a,h.state))),t&&l===null)throw Error(i(528,""));return h}if(t&&l!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pl(a),a=vl(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function $l(e){return'href="'+Wt(e)+'"'}function Wr(e){return'link[rel="stylesheet"]['+e+"]"}function rp(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function r0(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),yt(t,"link",a),mt(t),e.head.appendChild(t))}function Pl(e){return'[src="'+Wt(e)+'"]'}function es(e){return"script[async]"+e}function sp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(l)return t.instance=l,mt(l),l;var o=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),mt(l),yt(l,"style",o),ji(l,a.precedence,e),t.instance=l;case"stylesheet":o=$l(a.href);var c=e.querySelector(Wr(o));if(c)return t.state.loading|=4,t.instance=c,mt(c),c;l=rp(a),(o=ia.get(o))&&pu(l,o),c=(e.ownerDocument||e).createElement("link"),mt(c);var h=c;return h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),yt(c,"link",l),t.state.loading|=4,ji(c,a.precedence,e),t.instance=c;case"script":return c=Pl(a.src),(o=e.querySelector(es(c)))?(t.instance=o,mt(o),o):(l=a,(o=ia.get(c))&&(l=p({},a),gu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),mt(o),yt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ji(l,a.precedence,e));return t.instance}function ji(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,c=o,h=0;h<l.length;h++){var b=l[h];if(b.dataset.precedence===t)c=b;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function pu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ei=null;function ip(e,t,a){if(Ei===null){var l=new Map,o=Ei=new Map;o.set(a,l)}else o=Ei,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var c=a[o];if(!(c[gr]||c[pt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var h=c.getAttribute(t)||"";h=e+h;var b=l.get(h);b?b.push(c):l.set(h,[c])}}return l}function op(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function s0(e,t,a){if(a===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 cp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function i0(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=$l(l.href),c=t.querySelector(Wr(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ti.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,mt(c);return}c=t.ownerDocument||t,l=rp(l),(o=ia.get(o))&&pu(l,o),c=c.createElement("link"),mt(c);var h=c;h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),yt(c,"link",l),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ti.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var xu=0;function o0(e,t){return e.stylesheets&&e.count===0&&Ci(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ci(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&xu===0&&(xu=62500*Qy());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ci(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>xu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Ti(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ci(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ri=null;function Ci(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ri=new Map,t.forEach(c0,e),Ri=null,Ti.call(e))}function c0(e,t){if(!(t.state.loading&4)){var a=Ri.get(e);if(a)var l=a.get(null);else{a=new Map,Ri.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var h=o[c];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),l=h)}l&&a.set(null,l)}o=t.instance,h=o.getAttribute("data-precedence"),c=a.get(h)||l,c===l&&a.set(null,o),a.set(h,o),this.count++,l=Ti.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ts={$$typeof:V,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function u0(e,t,a,l,o,c,h,b,E){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=nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.hiddenUpdates=nn(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function up(e,t,a,l,o,c,h,b,E,D,Y,K){return e=new u0(e,t,a,h,E,D,Y,K,b),t=1,c===!0&&(t|=24),c=Yt(3,null,null,t),e.current=c,c.stateNode=e,t=$o(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:a,cache:t},ec(c),e}function dp(e){return e?(e=Cl,e):Cl}function fp(e,t,a,l,o,c){o=dp(o),l.context===null?l.context=o:l.pendingContext=o,l=fn(t),l.payload={element:a},c=c===void 0?null:c,c!==null&&(l.callback=c),a=mn(e,l,t),a!==null&&(Bt(a,e,t),zr(a,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function vu(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function hp(e){if(e.tag===13||e.tag===31){var t=Yn(e,67108864);t!==null&&Bt(t,e,67108864),vu(e,67108864)}}function pp(e){if(e.tag===13||e.tag===31){var t=Jt();t=hl(t);var a=Yn(e,t);a!==null&&Bt(a,e,t),vu(e,t)}}var _i=!0;function d0(e,t,a,l){var o=O.T;O.T=null;var c=Z.p;try{Z.p=2,yu(e,t,a,l)}finally{Z.p=c,O.T=o}}function f0(e,t,a,l){var o=O.T;O.T=null;var c=Z.p;try{Z.p=8,yu(e,t,a,l)}finally{Z.p=c,O.T=o}}function yu(e,t,a,l){if(_i){var o=bu(l);if(o===null)ru(e,t,l,Mi,a),xp(e,l);else if(h0(o,e,t,a,l))l.stopPropagation();else if(xp(e,l),t&4&&-1<m0.indexOf(e)){for(;o!==null;){var c=xl(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var h=Na(c.pendingLanes);if(h!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var E=1<<31-bt(h);b.entanglements[1]|=E,h&=~E}Ra(c),(He&6)===0&&(fi=Et()+500,Jr(0))}}break;case 31:case 13:b=Yn(c,2),b!==null&&Bt(b,c,2),hi(),vu(c,2)}if(c=bu(l),c===null&&ru(e,t,l,Mi,a),c===o)break;o=c}o!==null&&l.stopPropagation()}else ru(e,t,l,null,a)}}function bu(e){return e=wo(e),Su(e)}var Mi=null;function Su(e){if(Mi=null,e=gl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=x(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Mi=e,null}function gp(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(fo()){case Dn:return 2;case ws:return 8;case Un:case hr:return 32;case za:return 268435456;default:return 32}default:return 32}}var wu=!1,jn=null,En=null,Tn=null,as=new Map,ns=new Map,Rn=[],m0="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 xp(e,t){switch(e){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":En=null;break;case"mouseover":case"mouseout":Tn=null;break;case"pointerover":case"pointerout":as.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ns.delete(t.pointerId)}}function ls(e,t,a,l,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:c,targetContainers:[o]},t!==null&&(t=xl(t),t!==null&&hp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function h0(e,t,a,l,o){switch(t){case"focusin":return jn=ls(jn,e,t,a,l,o),!0;case"dragenter":return En=ls(En,e,t,a,l,o),!0;case"mouseover":return Tn=ls(Tn,e,t,a,l,o),!0;case"pointerover":var c=o.pointerId;return as.set(c,ls(as.get(c)||null,e,t,a,l,o)),!0;case"gotpointercapture":return c=o.pointerId,ns.set(c,ls(ns.get(c)||null,e,t,a,l,o)),!0}return!1}function vp(e){var t=gl(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Ad(e.priority,function(){pp(a)});return}}else if(t===31){if(t=x(a),t!==null){e.blockedOn=t,Ad(e.priority,function(){pp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ai(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);So=l,a.target.dispatchEvent(l),So=null}else return t=xl(a),t!==null&&hp(t),e.blockedOn=a,!1;t.shift()}return!0}function yp(e,t,a){Ai(e)&&a.delete(t)}function p0(){wu=!1,jn!==null&&Ai(jn)&&(jn=null),En!==null&&Ai(En)&&(En=null),Tn!==null&&Ai(Tn)&&(Tn=null),as.forEach(yp),ns.forEach(yp)}function Oi(e,t){e.blockedOn===t&&(e.blockedOn=null,wu||(wu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,p0)))}var zi=null;function bp(e){zi!==e&&(zi=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){zi===e&&(zi=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Su(l||a)===null)continue;break}var c=xl(a);c!==null&&(e.splice(t,3),t-=3,bc(c,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function Il(e){function t(E){return Oi(E,e)}jn!==null&&Oi(jn,e),En!==null&&Oi(En,e),Tn!==null&&Oi(Tn,e),as.forEach(t),ns.forEach(t);for(var a=0;a<Rn.length;a++){var l=Rn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Rn.length&&(a=Rn[0],a.blockedOn===null);)vp(a),a.blockedOn===null&&Rn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],c=a[l+1],h=o[Ot]||null;if(typeof c=="function")h||bp(a);else if(h){var b=null;if(c&&c.hasAttribute("formAction")){if(o=c,h=c[Ot]||null)b=h.formAction;else if(Su(o)!==null)continue}else b=h.action;typeof b=="function"?a[l+1]=b:(a.splice(l,3),l-=3),bp(a)}}}function Sp(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Nu(e){this._internalRoot=e}ki.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,l=Jt();fp(a,l,e,t,null,null)},ki.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fp(e.current,2,null,e,null,null),hi(),t[pl]=null}};function ki(e){this._internalRoot=e}ki.prototype.unstable_scheduleHydration=function(e){if(e){var t=ho();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Rn.length&&t!==0&&t<Rn[a].priority;a++);Rn.splice(a,0,e),a===0&&vp(e)}};var wp=r.version;if(wp!=="19.2.4")throw Error(i(527,wp,"19.2.4"));Z.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=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var g0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Di.isDisabled&&Di.supportsFiber)try{Ln=Di.inject(g0),Tt=Di}catch{}}return ss.createRoot=function(e,t){if(!d(e))throw Error(i(299));var a=!1,l="",o=_m,c=Mm,h=Am;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=up(e,1,!1,null,null,a,l,null,o,c,h,Sp),e[pl]=t.current,lu(e),new Nu(t)},ss.hydrateRoot=function(e,t,a){if(!d(e))throw Error(i(299));var l=!1,o="",c=_m,h=Mm,b=Am,E=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=up(e,1,!0,t,a??null,l,o,E,c,h,b,Sp),t.context=dp(null),a=t.current,l=Jt(),l=hl(l),o=fn(l),o.callback=null,mn(a,o,l),a=l,t.current.lanes=a,Ie(t,a),Ra(t),e[pl]=t.current,lu(e),new ki(t)},ss.version="19.2.4",ss}var Op;function E0(){if(Op)return Tu.exports;Op=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Tu.exports=j0(),Tu.exports}var T0=E0();var zp="popstate";function R0(n={}){function r(i,d){let{pathname:f,search:m,hash:x}=i.location;return Qu("",{pathname:f,search:m,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function s(i,d){return typeof d=="string"?d:fs(d)}return _0(r,s,null,n)}function Pe(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function xa(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function C0(){return Math.random().toString(36).substring(2,10)}function kp(n,r){return{usr:n.state,key:n.key,idx:r}}function Qu(n,r,s=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?lr(r):r,state:s,key:r&&r.key||i||C0()}}function fs({pathname:n="/",search:r="",hash:s=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function lr(n){let r={};if(n){let s=n.indexOf("#");s>=0&&(r.hash=n.substring(s),n=n.substring(0,s));let i=n.indexOf("?");i>=0&&(r.search=n.substring(i),n=n.substring(0,i)),n&&(r.pathname=n)}return r}function _0(n,r,s,i={}){let{window:d=document.defaultView,v5Compat:f=!1}=i,m=d.history,x="POP",v=null,g=y();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function y(){return(m.state||{idx:null}).idx}function p(){x="POP";let R=y(),z=R==null?null:R-g;g=R,v&&v({action:x,location:j.location,delta:z})}function N(R,z){x="PUSH";let _=Qu(j.location,R,z);g=y()+1;let V=kp(_,g),L=j.createHref(_);try{m.pushState(V,"",L)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;d.location.assign(L)}f&&v&&v({action:x,location:j.location,delta:1})}function M(R,z){x="REPLACE";let _=Qu(j.location,R,z);g=y();let V=kp(_,g),L=j.createHref(_);m.replaceState(V,"",L),f&&v&&v({action:x,location:j.location,delta:0})}function w(R){return M0(R)}let j={get action(){return x},get location(){return n(d,m)},listen(R){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(zp,p),v=R,()=>{d.removeEventListener(zp,p),v=null}},createHref(R){return r(d,R)},createURL:w,encodeLocation(R){let z=w(R);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:N,replace:M,go(R){return m.go(R)}};return j}function M0(n,r=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(s,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:fs(n);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=s+i),new URL(i,s)}function Mg(n,r,s="/"){return A0(n,r,s,!1)}function A0(n,r,s,i){let d=typeof r=="string"?lr(r):r,f=en(d.pathname||"/",s);if(f==null)return null;let m=Ag(n);O0(m);let x=null;for(let v=0;x==null&&v<m.length;++v){let g=V0(f);x=G0(m[v],g,i)}return x}function Ag(n,r=[],s=[],i="",d=!1){let f=(m,x,v=d,g)=>{let y={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:x,route:m};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&v)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 p=Wa([i,y.relativePath]),N=s.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 "${p}".`),Ag(m.children,r,N,p,v)),!(m.path==null&&!m.index)&&r.push({path:p,score:H0(p,m.index),routesMeta:N})};return n.forEach((m,x)=>{if(m.path===""||!m.path?.includes("?"))f(m,x);else for(let v of Og(m.path))f(m,x,!0,v)}),r}function Og(n){let r=n.split("/");if(r.length===0)return[];let[s,...i]=r,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(i.length===0)return d?[f,""]:[f];let m=Og(i.join("/")),x=[];return x.push(...m.map(v=>v===""?f:[f,v].join("/"))),d&&x.push(...m),x.map(v=>n.startsWith("/")&&v===""?"/":v)}function O0(n){n.sort((r,s)=>r.score!==s.score?s.score-r.score:q0(r.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var z0=/^:[\w-]+$/,k0=3,D0=2,U0=1,L0=10,B0=-2,Dp=n=>n==="*";function H0(n,r){let s=n.split("/"),i=s.length;return s.some(Dp)&&(i+=B0),r&&(i+=D0),s.filter(d=>!Dp(d)).reduce((d,f)=>d+(z0.test(f)?k0:f===""?U0:L0),i)}function q0(n,r){return n.length===r.length&&n.slice(0,-1).every((i,d)=>i===r[d])?n[n.length-1]-r[r.length-1]:0}function G0(n,r,s=!1){let{routesMeta:i}=n,d={},f="/",m=[];for(let x=0;x<i.length;++x){let v=i[x],g=x===i.length-1,y=f==="/"?r:r.slice(f.length)||"/",p=Pi({path:v.relativePath,caseSensitive:v.caseSensitive,end:g},y),N=v.route;if(!p&&g&&s&&!i[i.length-1].route.index&&(p=Pi({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},y)),!p)return null;Object.assign(d,p.params),m.push({params:d,pathname:Wa([f,p.pathname]),pathnameBase:K0(Wa([f,p.pathnameBase])),route:N}),p.pathnameBase!=="/"&&(f=Wa([f,p.pathnameBase]))}return m}function Pi(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,i]=Q0(n.path,n.caseSensitive,n.end),d=r.match(s);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:i.reduce((g,{paramName:y,isOptional:p},N)=>{if(y==="*"){let w=x[N]||"";m=f.slice(0,f.length-w.length).replace(/(.)\/+$/,"$1")}const M=x[N];return p&&!M?g[y]=void 0:g[y]=(M||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:n}}function Q0(n,r=!1,s=!0){xa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,x,v)=>(i.push({paramName:x,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,r?void 0:"i"),i]}function V0(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return xa(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function en(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}var Y0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function X0(n,r="/"){let{pathname:s,search:i="",hash:d=""}=typeof n=="string"?lr(n):n,f;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?f=Up(s.substring(1),"/"):f=Up(s,r)):f=r,{pathname:f,search:Z0(i),hash:J0(d)}}function Up(n,r){let s=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Mu(n,r,s,i){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function F0(n){return n.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function sd(n){let r=F0(n);return r.map((s,i)=>i===r.length-1?s.pathname:s.pathnameBase)}function id(n,r,s,i=!1){let d;typeof n=="string"?d=lr(n):(d={...n},Pe(!d.pathname||!d.pathname.includes("?"),Mu("?","pathname","search",d)),Pe(!d.pathname||!d.pathname.includes("#"),Mu("#","pathname","hash",d)),Pe(!d.search||!d.search.includes("#"),Mu("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,x;if(m==null)x=s;else{let p=r.length-1;if(!i&&m.startsWith("..")){let N=m.split("/");for(;N[0]==="..";)N.shift(),p-=1;d.pathname=N.join("/")}x=p>=0?r[p]:"/"}let v=X0(d,x),g=m&&m!=="/"&&m.endsWith("/"),y=(f||m===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(g||y)&&(v.pathname+="/"),v}var Wa=n=>n.join("/").replace(/\/\/+/g,"/"),K0=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Z0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,J0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,$0=class{constructor(n,r,s,i=!1){this.status=n,this.statusText=r||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function P0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function I0(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var zg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function kg(n,r){let s=n;if(typeof s!="string"||!Y0.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,d=!1;if(zg)try{let f=new URL(window.location.href),m=s.startsWith("//")?new URL(f.protocol+s):new URL(s),x=en(m.pathname,r);m.origin===f.origin&&x!=null?s=x+m.search+m.hash:d=!0}catch{xa(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Dg=["POST","PUT","PATCH","DELETE"];new Set(Dg);var W0=["GET",...Dg];new Set(W0);var rr=S.createContext(null);rr.displayName="DataRouter";var no=S.createContext(null);no.displayName="DataRouterState";var eb=S.createContext(!1),Ug=S.createContext({isTransitioning:!1});Ug.displayName="ViewTransition";var tb=S.createContext(new Map);tb.displayName="Fetchers";var ab=S.createContext(null);ab.displayName="Await";var Pt=S.createContext(null);Pt.displayName="Navigation";var ps=S.createContext(null);ps.displayName="Location";var ya=S.createContext({outlet:null,matches:[],isDataRoute:!1});ya.displayName="Route";var od=S.createContext(null);od.displayName="RouteError";var Lg="REACT_ROUTER_ERROR",nb="REDIRECT",lb="ROUTE_ERROR_RESPONSE";function rb(n){if(n.startsWith(`${Lg}:${nb}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function sb(n){if(n.startsWith(`${Lg}:${lb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new $0(r.status,r.statusText,r.data)}catch{}}function ib(n,{relative:r}={}){Pe(sr(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=S.useContext(Pt),{hash:d,pathname:f,search:m}=gs(n,{relative:r}),x=f;return s!=="/"&&(x=f==="/"?s:Wa([s,f])),i.createHref({pathname:x,search:m,hash:d})}function sr(){return S.useContext(ps)!=null}function An(){return Pe(sr(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(ps).location}var Bg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Hg(n){S.useContext(Pt).static||S.useLayoutEffect(n)}function On(){let{isDataRoute:n}=S.useContext(ya);return n?wb():ob()}function ob(){Pe(sr(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(rr),{basename:r,navigator:s}=S.useContext(Pt),{matches:i}=S.useContext(ya),{pathname:d}=An(),f=JSON.stringify(sd(i)),m=S.useRef(!1);return Hg(()=>{m.current=!0}),S.useCallback((v,g={})=>{if(xa(m.current,Bg),!m.current)return;if(typeof v=="number"){s.go(v);return}let y=id(v,JSON.parse(f),d,g.relative==="path");n==null&&r!=="/"&&(y.pathname=y.pathname==="/"?r:Wa([r,y.pathname])),(g.replace?s.replace:s.push)(y,g.state,g)},[r,s,f,d,n])}var cb=S.createContext(null);function ub(n){let r=S.useContext(ya).outlet;return S.useMemo(()=>r&&S.createElement(cb.Provider,{value:n},r),[r,n])}function gs(n,{relative:r}={}){let{matches:s}=S.useContext(ya),{pathname:i}=An(),d=JSON.stringify(sd(s));return S.useMemo(()=>id(n,JSON.parse(d),i,r==="path"),[n,d,i,r])}function db(n,r){return qg(n,r)}function qg(n,r,s,i,d){Pe(sr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=S.useContext(Pt),{matches:m}=S.useContext(ya),x=m[m.length-1],v=x?x.params:{},g=x?x.pathname:"/",y=x?x.pathnameBase:"/",p=x&&x.route;{let _=p&&p.path||"";Qg(g,!p||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${_}">) 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
10
 
11
- Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let N=An(),M;if(r){let _=typeof r=="string"?lr(r):r;Pe(y==="/"||_.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 "${_.pathname}" was given in the \`location\` prop.`),M=_}else M=N;let w=M.pathname||"/",j=w;if(y!=="/"){let _=y.replace(/^\//,"").split("/");j="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let T=Mg(n,{pathname:j});xa(p||T!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),xa(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.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 z=gb(T&&T.map(_=>Object.assign({},_,{params:Object.assign({},v,_.params),pathname:Wa([y,f.encodeLocation?f.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?y:Wa([y,f.encodeLocation?f.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),m,s,i,d);return r&&z?S.createElement(ps.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...M},navigationType:"POP"}},z):z}function fb(){let n=Sb(),r=P0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.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:",n),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"}},r),s?S.createElement("pre",{style:d},s):null,m)}var mb=S.createElement(fb,null),Gg=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=sb(n.digest);s&&(n=s)}let r=n!==void 0?S.createElement(ya.Provider,{value:this.props.routeContext},S.createElement(od.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(hb,{error:n},r):r}};Gg.contextType=eb;var Au=new WeakMap;function hb({children:n,error:r}){let{basename:s}=S.useContext(Pt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let i=rb(r.digest);if(i){let d=Au.get(r);if(d)throw d;let f=kg(i.location,s);if(zg&&!Au.get(r))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 Au.set(r,m),m}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function pb({routeContext:n,match:r,children:s}){let i=S.useContext(rr);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),S.createElement(ya.Provider,{value:n},s)}function gb(n,r=[],s=null,i=null,d=null){if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let f=n,m=s?.errors;if(m!=null){let y=f.findIndex(p=>p.route.id&&m?.[p.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 x=!1,v=-1;if(s)for(let y=0;y<f.length;y++){let p=f[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(v=y),p.route.id){let{loaderData:N,errors:M}=s,w=p.route.loader&&!N.hasOwnProperty(p.route.id)&&(!M||M[p.route.id]===void 0);if(p.route.lazy||w){x=!0,v>=0?f=f.slice(0,v+1):f=[f[0]];break}}}let g=s&&i?(y,p)=>{i(y,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:I0(s.matches),errorInfo:p})}:void 0;return f.reduceRight((y,p,N)=>{let M,w=!1,j=null,T=null;s&&(M=m&&p.route.id?m[p.route.id]:void 0,j=p.route.errorElement||mb,x&&(v<0&&N===0?(Qg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,T=null):v===N&&(w=!0,T=p.route.hydrateFallbackElement||null)));let z=r.concat(f.slice(0,N+1)),_=()=>{let V;return M?V=j:w?V=T:p.route.Component?V=S.createElement(p.route.Component,null):p.route.element?V=p.route.element:V=y,S.createElement(pb,{match:p,routeContext:{outlet:y,matches:z,isDataRoute:s!=null},children:V})};return s&&(p.route.ErrorBoundary||p.route.errorElement||N===0)?S.createElement(Gg,{location:s.location,revalidation:s.revalidation,component:j,error:M,children:_(),routeContext:{outlet:null,matches:z,isDataRoute:!0},onError:g}):_()},null)}function cd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xb(n){let r=S.useContext(rr);return Pe(r,cd(n)),r}function vb(n){let r=S.useContext(no);return Pe(r,cd(n)),r}function yb(n){let r=S.useContext(ya);return Pe(r,cd(n)),r}function ud(n){let r=yb(n),s=r.matches[r.matches.length-1];return Pe(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function bb(){return ud("useRouteId")}function Sb(){let n=S.useContext(od),r=vb("useRouteError"),s=ud("useRouteError");return n!==void 0?n:r.errors?.[s]}function wb(){let{router:n}=xb("useNavigate"),r=ud("useNavigate"),s=S.useRef(!1);return Hg(()=>{s.current=!0}),S.useCallback(async(d,f={})=>{xa(s.current,Bg),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:r,...f}))},[n,r])}var Lp={};function Qg(n,r,s){!r&&!Lp[n]&&(Lp[n]=!0,xa(!1,s))}S.memo(Nb);function Nb({routes:n,future:r,state:s,onError:i}){return qg(n,void 0,s,i,r)}function Ii({to:n,replace:r,state:s,relative:i}){Pe(sr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=S.useContext(Pt);xa(!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(ya),{pathname:m}=An(),x=On(),v=id(n,sd(f),m,i==="path"),g=JSON.stringify(v);return S.useEffect(()=>{x(JSON.parse(g),{replace:r,state:s,relative:i})},[x,g,i,r,s]),null}function jb(n){return ub(n.context)}function $t(n){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 Eb({basename:n="/",children:r=null,location:s,navigationType:i="POP",navigator:d,static:f=!1,unstable_useTransitions:m}){Pe(!sr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),v=S.useMemo(()=>({basename:x,navigator:d,static:f,unstable_useTransitions:m,future:{}}),[x,d,f,m]);typeof s=="string"&&(s=lr(s));let{pathname:g="/",search:y="",hash:p="",state:N=null,key:M="default"}=s,w=S.useMemo(()=>{let j=en(g,x);return j==null?null:{location:{pathname:j,search:y,hash:p,state:N,key:M},navigationType:i}},[x,g,y,p,N,M,i]);return xa(w!=null,`<Router basename="${x}"> is not able to match the URL "${g}${y}${p}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:S.createElement(Pt.Provider,{value:v},S.createElement(ps.Provider,{children:r,value:w}))}function Rb({children:n,location:r}){return db(Vu(n),r)}function Vu(n,r=[]){let s=[];return S.Children.forEach(n,(i,d)=>{if(!S.isValidElement(i))return;let f=[...r,d];if(i.type===S.Fragment){s.push.apply(s,Vu(i.props.children,f));return}Pe(i.type===$t,`[${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=Vu(i.props.children,f)),s.push(m)}),s}var Fi="get",Xi="application/x-www-form-urlencoded";function lo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Tb(n){return lo(n)&&n.tagName.toLowerCase()==="button"}function Cb(n){return lo(n)&&n.tagName.toLowerCase()==="form"}function _b(n){return lo(n)&&n.tagName.toLowerCase()==="input"}function Mb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Ab(n,r){return n.button===0&&(!r||r==="_self")&&!Mb(n)}var Ui=null;function Ob(){if(Ui===null)try{new FormData(document.createElement("form"),0),Ui=!1}catch{Ui=!0}return Ui}var zb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ou(n){return n!=null&&!zb.has(n)?(xa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Xi}"`),null):n}function kb(n,r){let s,i,d,f,m;if(Cb(n)){let x=n.getAttribute("action");i=x?en(x,r):null,s=n.getAttribute("method")||Fi,d=Ou(n.getAttribute("enctype"))||Xi,f=new FormData(n)}else if(Tb(n)||_b(n)&&(n.type==="submit"||n.type==="image")){let x=n.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||x.getAttribute("action");if(i=v?en(v,r):null,s=n.getAttribute("formmethod")||x.getAttribute("method")||Fi,d=Ou(n.getAttribute("formenctype"))||Ou(x.getAttribute("enctype"))||Xi,f=new FormData(x,n),!Ob()){let{name:g,type:y,value:p}=n;if(y==="image"){let N=g?`${g}.`:"";f.append(`${N}x`,"0"),f.append(`${N}y`,"0")}else g&&f.append(g,p)}}else{if(lo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Fi,i=null,d=Xi,m=n}return f&&d==="text/plain"&&(m=f,f=void 0),{action:i,method:s.toLowerCase(),encType:d,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dd(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Db(n,r,s,i){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${i}`:d.pathname=`${d.pathname}.${i}`:d.pathname==="/"?d.pathname=`_root.${i}`:r&&en(d.pathname,r)==="/"?d.pathname=`${r.replace(/\/$/,"")}/_root.${i}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${i}`,d}async function Ub(n,r){if(n.id in r)return r[n.id];try{let s=await import(n.module);return r[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Lb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Bb(n,r,s){let i=await Promise.all(n.map(async d=>{let f=r.routes[d.route.id];if(f){let m=await Ub(f,s);return m.links?m.links():[]}return[]}));return Qb(i.flat(1).filter(Lb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Bp(n,r,s,i,d,f){let m=(v,g)=>s[g]?v.route.id!==s[g].route.id:!0,x=(v,g)=>s[g].pathname!==v.pathname||s[g].route.path?.endsWith("*")&&s[g].params["*"]!==v.params["*"];return f==="assets"?r.filter((v,g)=>m(v,g)||x(v,g)):f==="data"?r.filter((v,g)=>{let y=i.routes[v.route.id];if(!y||!y.hasLoader)return!1;if(m(v,g)||x(v,g))return!0;if(v.route.shouldRevalidate){let p=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Hb(n,r,{includeHydrateFallback:s}={}){return qb(n.map(i=>{let d=r.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)),s&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function qb(n){return[...new Set(n)]}function Gb(n){let r={},s=Object.keys(n).sort();for(let i of s)r[i]=n[i];return r}function Qb(n,r){let s=new Set;return new Set(r),n.reduce((i,d)=>{let f=JSON.stringify(Gb(d));return s.has(f)||(s.add(f),i.push({key:f,link:d})),i},[])}function Vg(){let n=S.useContext(rr);return dd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Vb(){let n=S.useContext(no);return dd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var fd=S.createContext(void 0);fd.displayName="FrameworkContext";function Yg(){let n=S.useContext(fd);return dd(n,"You must render this element inside a <HydratedRouter> element"),n}function Yb(n,r){let s=S.useContext(fd),[i,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:x,onBlur:v,onMouseEnter:g,onMouseLeave:y,onTouchStart:p}=r,N=S.useRef(null);S.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let j=z=>{z.forEach(_=>{m(_.isIntersecting)})},T=new IntersectionObserver(j,{threshold:.5});return N.current&&T.observe(N.current),()=>{T.disconnect()}}},[n]),S.useEffect(()=>{if(i){let j=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(j)}}},[i]);let M=()=>{d(!0)},w=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,N,{}]:[f,N,{onFocus:is(x,M),onBlur:is(v,w),onMouseEnter:is(g,M),onMouseLeave:is(y,w),onTouchStart:is(p,M)}]:[!1,N,{}]}function is(n,r){return s=>{n&&n(s),s.defaultPrevented||r(s)}}function Fb({page:n,...r}){let{router:s}=Vg(),i=S.useMemo(()=>Mg(s.routes,n,s.basename),[s.routes,n,s.basename]);return i?S.createElement(Kb,{page:n,matches:i,...r}):null}function Xb(n){let{manifest:r,routeModules:s}=Yg(),[i,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return Bb(n,r,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,r,s]),i}function Kb({page:n,matches:r,...s}){let i=An(),{future:d,manifest:f,routeModules:m}=Yg(),{basename:x}=Vg(),{loaderData:v,matches:g}=Vb(),y=S.useMemo(()=>Bp(n,r,g,f,i,"data"),[n,r,g,f,i]),p=S.useMemo(()=>Bp(n,r,g,f,i,"assets"),[n,r,g,f,i]),N=S.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let j=new Set,T=!1;if(r.forEach(_=>{let V=f.routes[_.route.id];!V||!V.hasLoader||(!y.some(L=>L.route.id===_.route.id)&&_.route.id in v&&m[_.route.id]?.shouldRevalidate||V.hasClientLoader?T=!0:j.add(_.route.id))}),j.size===0)return[];let z=Db(n,x,d.unstable_trailingSlashAwareDataRequests,"data");return T&&j.size>0&&z.searchParams.set("_routes",r.filter(_=>j.has(_.route.id)).map(_=>_.route.id).join(",")),[z.pathname+z.search]},[x,d.unstable_trailingSlashAwareDataRequests,v,i,f,y,r,n,m]),M=S.useMemo(()=>Hb(p,f),[p,f]),w=Xb(p);return S.createElement(S.Fragment,null,N.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...s})),M.map(j=>S.createElement("link",{key:j,rel:"modulepreload",href:j,...s})),w.map(({key:j,link:T})=>S.createElement("link",{key:j,nonce:s.nonce,...T,crossOrigin:T.crossOrigin??s.crossOrigin})))}function Zb(...n){return r=>{n.forEach(s=>{typeof s=="function"?s(r):s!=null&&(s.current=r)})}}var Jb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Jb&&(window.__reactRouterVersion="7.13.0")}catch{}function $b({basename:n,children:r,unstable_useTransitions:s,window:i}){let d=S.useRef();d.current==null&&(d.current=T0({window:i,v5Compat:!0}));let f=d.current,[m,x]=S.useState({action:f.action,location:f.location}),v=S.useCallback(g=>{s===!1?x(g):S.startTransition(()=>x(g))},[s]);return S.useLayoutEffect(()=>f.listen(v),[f,v]),S.createElement(Eb,{basename:n,children:r,location:m.location,navigationType:m.action,navigator:f,unstable_useTransitions:s})}var Fg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,md=S.forwardRef(function({onClick:r,discover:s="render",prefetch:i="none",relative:d,reloadDocument:f,replace:m,state:x,target:v,to:g,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:N,...M},w){let{basename:j,unstable_useTransitions:T}=S.useContext(Pt),z=typeof g=="string"&&Fg.test(g),_=kg(g,j);g=_.to;let V=ib(g,{relative:d}),[L,ne,I]=Yb(i,M),ee=Wb(g,{replace:m,state:x,target:v,preventScrollReset:y,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:N,unstable_useTransitions:T});function $(re){r&&r(re),re.defaultPrevented||ee(re)}let P=S.createElement("a",{...M,...I,href:_.absoluteURL||V,onClick:_.isExternal||f?r:$,ref:Zb(w,ne),target:v,"data-discover":!z&&s==="render"?"true":void 0});return L&&!z?S.createElement(S.Fragment,null,P,S.createElement(Fb,{page:V})):P});md.displayName="Link";var Xg=S.forwardRef(function({"aria-current":r="page",caseSensitive:s=!1,className:i="",end:d=!1,style:f,to:m,viewTransition:x,children:v,...g},y){let p=gs(m,{relative:g.relative}),N=An(),M=S.useContext(no),{navigator:w,basename:j}=S.useContext(Pt),T=M!=null&&l1(p)&&x===!0,z=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,_=N.pathname,V=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;s||(_=_.toLowerCase(),V=V?V.toLowerCase():null,z=z.toLowerCase()),V&&j&&(V=en(V,j)||V);const L=z!=="/"&&z.endsWith("/")?z.length-1:z.length;let ne=_===z||!d&&_.startsWith(z)&&_.charAt(L)==="/",I=V!=null&&(V===z||!d&&V.startsWith(z)&&V.charAt(z.length)==="/"),ee={isActive:ne,isPending:I,isTransitioning:T},$=ne?r:void 0,P;typeof i=="function"?P=i(ee):P=[i,ne?"active":null,I?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let re=typeof f=="function"?f(ee):f;return S.createElement(md,{...g,"aria-current":$,className:P,ref:y,style:re,to:m,viewTransition:x},typeof v=="function"?v(ee):v)});Xg.displayName="NavLink";var Pb=S.forwardRef(({discover:n="render",fetcherKey:r,navigate:s,reloadDocument:i,replace:d,state:f,method:m=Fi,action:x,onSubmit:v,relative:g,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:N,...M},w)=>{let{unstable_useTransitions:j}=S.useContext(Pt),T=a1(),z=n1(x,{relative:g}),_=m.toLowerCase()==="get"?"get":"post",V=typeof x=="string"&&Fg.test(x),L=ne=>{if(v&&v(ne),ne.defaultPrevented)return;ne.preventDefault();let I=ne.nativeEvent.submitter,ee=I?.getAttribute("formmethod")||m,$=()=>T(I||ne.currentTarget,{fetcherKey:r,method:ee,navigate:s,replace:d,state:f,relative:g,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:N});j&&s!==!1?S.startTransition(()=>$()):$()};return S.createElement("form",{ref:w,method:_,action:z,onSubmit:i?v:L,...M,"data-discover":!V&&n==="render"?"true":void 0})});Pb.displayName="Form";function Ib(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kg(n){let r=S.useContext(rr);return Pe(r,Ib(n)),r}function Wb(n,{target:r,replace:s,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:x,unstable_useTransitions:v}={}){let g=On(),y=An(),p=gs(n,{relative:f});return S.useCallback(N=>{if(Ab(N,r)){N.preventDefault();let M=s!==void 0?s:fs(y)===fs(p),w=()=>g(n,{replace:M,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:x});v?S.startTransition(()=>w()):w()}},[y,g,p,s,i,r,n,d,f,m,x,v])}var e1=0,t1=()=>`__${String(++e1)}__`;function a1(){let{router:n}=Kg("useSubmit"),{basename:r}=S.useContext(Pt),s=bb(),i=n.fetch,d=n.navigate;return S.useCallback(async(f,m={})=>{let{action:x,method:v,encType:g,formData:y,body:p}=kb(f,r);if(m.navigate===!1){let N=m.fetcherKey||t1();await i(N,s,m.action||x,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:p,formMethod:m.method||v,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||x,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:p,formMethod:m.method||v,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[i,d,r,s])}function n1(n,{relative:r}={}){let{basename:s}=S.useContext(Pt),i=S.useContext(ya);Pe(i,"useFormAction must be used inside a RouteContext");let[d]=i.matches.slice(-1),f={...gs(n||".",{relative:r})},m=An();if(n==null){f.search=m.search;let x=new URLSearchParams(f.search),v=x.getAll("index");if(v.some(y=>y==="")){x.delete("index"),v.filter(p=>p).forEach(p=>x.append("index",p));let y=x.toString();f.search=y?`?${y}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:Wa([s,f.pathname])),fs(f)}function l1(n,{relative:r}={}){let s=S.useContext(Ug);Pe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Kg("useViewTransitionState"),d=gs(n,{relative:r});if(!s.isTransitioning)return!1;let f=en(s.currentLocation.pathname,i)||s.currentLocation.pathname,m=en(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Pi(d.pathname,m)!=null||Pi(d.pathname,f)!=null}var r1=_g();const s1=Cg(r1);var ir=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},i1={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},o1=class{#e=i1;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,r){return this.#e.setTimeout(n,r)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,r){return this.#e.setInterval(n,r)}clearInterval(n){this.#e.clearInterval(n)}},ll=new o1;function c1(n){setTimeout(n,0)}var il=typeof window>"u"||"Deno"in globalThis;function Ct(){}function u1(n,r){return typeof n=="function"?n(r):n}function Yu(n){return typeof n=="number"&&n>=0&&n!==1/0}function Zg(n,r){return Math.max(n+(r||0)-Date.now(),0)}function Mn(n,r){return typeof n=="function"?n(r):n}function oa(n,r){return typeof n=="function"?n(r):n}function Hp(n,r){const{type:s="all",exact:i,fetchStatus:d,predicate:f,queryKey:m,stale:x}=n;if(m){if(i){if(r.queryHash!==hd(m,r.options))return!1}else if(!ms(r.queryKey,m))return!1}if(s!=="all"){const v=r.isActive();if(s==="active"&&!v||s==="inactive"&&v)return!1}return!(typeof x=="boolean"&&r.isStale()!==x||d&&d!==r.state.fetchStatus||f&&!f(r))}function qp(n,r){const{exact:s,status:i,predicate:d,mutationKey:f}=n;if(f){if(!r.options.mutationKey)return!1;if(s){if(ol(r.options.mutationKey)!==ol(f))return!1}else if(!ms(r.options.mutationKey,f))return!1}return!(i&&r.state.status!==i||d&&!d(r))}function hd(n,r){return(r?.queryKeyHashFn||ol)(n)}function ol(n){return JSON.stringify(n,(r,s)=>Fu(s)?Object.keys(s).sort().reduce((i,d)=>(i[d]=s[d],i),{}):s)}function ms(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>ms(n[s],r[s])):!1}var d1=Object.prototype.hasOwnProperty;function Jg(n,r,s=0){if(n===r)return n;if(s>500)return r;const i=Gp(n)&&Gp(r);if(!i&&!(Fu(n)&&Fu(r)))return r;const f=(i?n:Object.keys(n)).length,m=i?r:Object.keys(r),x=m.length,v=i?new Array(x):{};let g=0;for(let y=0;y<x;y++){const p=i?y:m[y],N=n[p],M=r[p];if(N===M){v[p]=N,(i?y<f:d1.call(n,p))&&g++;continue}if(N===null||M===null||typeof N!="object"||typeof M!="object"){v[p]=M;continue}const w=Jg(N,M,s+1);v[p]=w,w===N&&g++}return f===x&&g===f?n:v}function Wi(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const s in n)if(n[s]!==r[s])return!1;return!0}function Gp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Fu(n){if(!Qp(n))return!1;const r=n.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!Qp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Qp(n){return Object.prototype.toString.call(n)==="[object Object]"}function f1(n){return new Promise(r=>{ll.setTimeout(r,n)})}function Xu(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?Jg(n,r):r}function m1(n,r,s=0){const i=[...n,r];return s&&i.length>s?i.slice(1):i}function h1(n,r,s=0){const i=[r,...n];return s&&i.length>s?i.slice(0,-1):i}var pd=Symbol();function $g(n,r){return!n.queryFn&&r?.initialPromise?()=>r.initialPromise:!n.queryFn||n.queryFn===pd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function gd(n,r){return typeof n=="function"?n(...r):!!n}function p1(n,r,s){let i=!1,d;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(d??=r(),i||(i=!0,d.aborted?s():d.addEventListener("abort",s,{once:!0})),d)}),n}var g1=class extends ir{#e;#t;#a;constructor(){super(),this.#a=n=>{if(!il&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},xd=new g1;function Ku(){let n,r;const s=new Promise((d,f)=>{n=d,r=f});s.status="pending",s.catch(()=>{});function i(d){Object.assign(s,d),delete s.resolve,delete s.reject}return s.resolve=d=>{i({status:"fulfilled",value:d}),n(d)},s.reject=d=>{i({status:"rejected",reason:d}),r(d)},s}var x1=c1;function v1(){let n=[],r=0,s=x=>{x()},i=x=>{x()},d=x1;const f=x=>{r?n.push(x):d(()=>{s(x)})},m=()=>{const x=n;n=[],x.length&&d(()=>{i(()=>{x.forEach(v=>{s(v)})})})};return{batch:x=>{let v;r++;try{v=x()}finally{r--,r||m()}return v},batchCalls:x=>(...v)=>{f(()=>{x(...v)})},schedule:f,setNotifyFunction:x=>{s=x},setBatchNotifyFunction:x=>{i=x},setScheduler:x=>{d=x}}}var dt=v1(),y1=class extends ir{#e=!0;#t;#a;constructor(){super(),this.#a=n=>{if(!il&&window.addEventListener){const r=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(s=>{s(n)}))}isOnline(){return this.#e}},eo=new y1;function b1(n){return Math.min(1e3*2**n,3e4)}function Pg(n){return(n??"online")==="online"?eo.isOnline():!0}var Zu=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Ig(n){let r=!1,s=0,i;const d=Ku(),f=()=>d.status!=="pending",m=j=>{if(!f()){const T=new Zu(j);N(T),n.onCancel?.(T)}},x=()=>{r=!0},v=()=>{r=!1},g=()=>xd.isFocused()&&(n.networkMode==="always"||eo.isOnline())&&n.canRun(),y=()=>Pg(n.networkMode)&&n.canRun(),p=j=>{f()||(i?.(),d.resolve(j))},N=j=>{f()||(i?.(),d.reject(j))},M=()=>new Promise(j=>{i=T=>{(f()||g())&&j(T)},n.onPause?.()}).then(()=>{i=void 0,f()||n.onContinue?.()}),w=()=>{if(f())return;let j;const T=s===0?n.initialPromise:void 0;try{j=T??n.fn()}catch(z){j=Promise.reject(z)}Promise.resolve(j).then(p).catch(z=>{if(f())return;const _=n.retry??(il?0:3),V=n.retryDelay??b1,L=typeof V=="function"?V(s,z):V,ne=_===!0||typeof _=="number"&&s<_||typeof _=="function"&&_(s,z);if(r||!ne){N(z);return}s++,n.onFail?.(s,z),f1(L).then(()=>g()?void 0:M()).then(()=>{r?N(z):w()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(i?.(),d),cancelRetry:x,continueRetry:v,canStart:y,start:()=>(y()?w():M().then(w),d)}}var Wg=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yu(this.gcTime)&&(this.#e=ll.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(il?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ll.clearTimeout(this.#e),this.#e=void 0)}},S1=class extends Wg{#e;#t;#a;#l;#n;#s;#i;constructor(n){super(),this.#i=!1,this.#s=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#l=n.client,this.#a=this.#l.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=Yp(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(n){if(this.options={...this.#s,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Yp(this.options);r.data!==void 0&&(this.setState(Vp(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(n,r){const s=Xu(this.state.data,n,this.options);return this.#r({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(n,r){this.#r({type:"setState",state:n,setStateOptions:r})}cancel(n){const r=this.#n?.promise;return this.#n?.cancel(n),r?r.then(Ct).catch(Ct):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>oa(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Mn(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!Zg(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(this.#n&&(this.#i?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(n,r){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(n&&this.setOptions(n),!this.options.queryFn){const x=this.observers.find(v=>v.options.queryFn);x&&this.setOptions(x.options)}const s=new AbortController,i=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(this.#i=!0,s.signal)})},d=()=>{const x=$g(this.options,r),g=(()=>{const y={client:this.#l,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#i=!1,this.options.persister?this.options.persister(x,g,this):x(g)},m=(()=>{const x={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:d};return i(x),x})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#r({type:"fetch",meta:m.fetchOptions?.meta}),this.#n=Ig({initialPromise:r?.initialPromise,fn:m.fetchFn,onCancel:x=>{x instanceof Zu&&x.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(x,v)=>{this.#r({type:"failed",failureCount:x,error:v})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const x=await this.#n.start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),this.#a.config.onSuccess?.(x,this),this.#a.config.onSettled?.(x,this.state.error,this),x}catch(x){if(x instanceof Zu){if(x.silent)return this.#n.promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw this.#r({type:"error",error:x}),this.#a.config.onError?.(x,this),this.#a.config.onSettled?.(this.state.data,x,this),x}finally{this.scheduleGc()}}#r(n){const r=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ex(s.data,this.options),fetchMeta:n.meta??null};case"success":const i={...s,...Vp(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?i:void 0,i;case"error":const d=n.error;return{...s,error:d,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=r(this.state),dt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:n})})}};function ex(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pg(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Vp(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Yp(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,s=r!==void 0,i=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var w1=class extends ir{constructor(n,r){super(),this.options=r,this.#e=n,this.#r=null,this.#i=Ku(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#a=void 0;#l=void 0;#n;#s;#i;#r;#p;#f;#m;#c;#u;#o;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Fp(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ju(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ju(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const r=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof oa(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),r._defaulted&&!Wi(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Xp(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),i&&(this.#t!==s||oa(this.options.enabled,this.#t)!==oa(r.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(r.staleTime,this.#t))&&this.#g();const d=this.#x();i&&(this.#t!==s||oa(this.options.enabled,this.#t)!==oa(r.enabled,this.#t)||d!==this.#o)&&this.#v(d)}getOptimisticResult(n){const r=this.#e.getQueryCache().build(this.#e,n),s=this.createResult(r,n);return j1(this,s)&&(this.#l=s,this.#s=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#l}trackResult(n,r){return new Proxy(n,{get:(s,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(n){this.#h.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=this.#e.defaultQueryOptions(n),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(n){return this.#d({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#l))}#d(n){this.#w();let r=this.#t.fetch(this.options,n);return n?.throwOnError||(r=r.catch(Ct)),r}#g(){this.#b();const n=Mn(this.options.staleTime,this.#t);if(il||this.#l.isStale||!Yu(n))return;const s=Zg(this.#l.dataUpdatedAt,n)+1;this.#c=ll.setTimeout(()=>{this.#l.isStale||this.updateResult()},s)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#o=n,!(il||oa(this.options.enabled,this.#t)===!1||!Yu(this.#o)||this.#o===0)&&(this.#u=ll.setInterval(()=>{(this.options.refetchIntervalInBackground||xd.isFocused())&&this.#d()},this.#o))}#y(){this.#g(),this.#v(this.#x())}#b(){this.#c&&(ll.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(ll.clearInterval(this.#u),this.#u=void 0)}createResult(n,r){const s=this.#t,i=this.options,d=this.#l,f=this.#n,m=this.#s,v=n!==s?n.state:this.#a,{state:g}=n;let y={...g},p=!1,N;if(r._optimisticResults){const $=this.hasListeners(),P=!$&&Fp(n,r),re=$&&Xp(n,s,r,i);(P||re)&&(y={...y,...ex(g.data,n.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:M,errorUpdatedAt:w,status:j}=y;N=y.data;let T=!1;if(r.placeholderData!==void 0&&N===void 0&&j==="pending"){let $;d?.isPlaceholderData&&r.placeholderData===m?.placeholderData?($=d.data,T=!0):$=typeof r.placeholderData=="function"?r.placeholderData(this.#m?.state.data,this.#m):r.placeholderData,$!==void 0&&(j="success",N=Xu(d?.data,$,r),p=!0)}if(r.select&&N!==void 0&&!T)if(d&&N===f?.data&&r.select===this.#p)N=this.#f;else try{this.#p=r.select,N=r.select(N),N=Xu(d?.data,N,r),this.#f=N,this.#r=null}catch($){this.#r=$}this.#r&&(M=this.#r,N=this.#f,w=Date.now(),j="error");const z=y.fetchStatus==="fetching",_=j==="pending",V=j==="error",L=_&&z,ne=N!==void 0,ee={status:j,fetchStatus:y.fetchStatus,isPending:_,isSuccess:j==="success",isError:V,isInitialLoading:L,isLoading:L,data:N,dataUpdatedAt:y.dataUpdatedAt,error:M,errorUpdatedAt:w,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>v.dataUpdateCount||y.errorUpdateCount>v.errorUpdateCount,isFetching:z,isRefetching:z&&!_,isLoadingError:V&&!ne,isPaused:y.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:V&&ne,isStale:vd(n,r),refetch:this.refetch,promise:this.#i,isEnabled:oa(r.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const $=ee.data!==void 0,P=ee.status==="error"&&!$,re=Ae=>{P?Ae.reject(ee.error):$&&Ae.resolve(ee.data)},se=()=>{const Ae=this.#i=ee.promise=Ku();re(Ae)},he=this.#i;switch(he.status){case"pending":n.queryHash===s.queryHash&&re(he);break;case"fulfilled":(P||ee.data!==he.value)&&se();break;case"rejected":(!P||ee.error!==he.reason)&&se();break}}return ee}updateResult(){const n=this.#l,r=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#s=this.options,this.#n.data!==void 0&&(this.#m=this.#t),Wi(r,n))return;this.#l=r;const s=()=>{if(!n)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.#l).some(m=>{const x=m;return this.#l[x]!==n[x]&&f.has(x)})};this.#N({listeners:s()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const r=this.#t;this.#t=n,this.#a=n.state,this.hasListeners()&&(r?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#N(n){dt.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(this.#l)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function N1(n,r){return oa(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function Fp(n,r){return N1(n,r)||n.state.data!==void 0&&Ju(n,r,r.refetchOnMount)}function Ju(n,r,s){if(oa(r.enabled,n)!==!1&&Mn(r.staleTime,n)!=="static"){const i=typeof s=="function"?s(n):s;return i==="always"||i!==!1&&vd(n,r)}return!1}function Xp(n,r,s,i){return(n!==r||oa(i.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&vd(n,s)}function vd(n,r){return oa(r.enabled,n)!==!1&&n.isStaleByTime(Mn(r.staleTime,n))}function j1(n,r){return!Wi(n.getCurrentResult(),r)}function Kp(n){return{onFetch:(r,s)=>{const i=r.options,d=r.fetchOptions?.meta?.fetchMore?.direction,f=r.state.data?.pages||[],m=r.state.data?.pageParams||[];let x={pages:[],pageParams:[]},v=0;const g=async()=>{let y=!1;const p=w=>{p1(w,()=>r.signal,()=>y=!0)},N=$g(r.options,r.fetchOptions),M=async(w,j,T)=>{if(y)return Promise.reject();if(j==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const I={client:r.client,queryKey:r.queryKey,pageParam:j,direction:T?"backward":"forward",meta:r.options.meta};return p(I),I})(),V=await N(_),{maxPages:L}=r.options,ne=T?h1:m1;return{pages:ne(w.pages,V,L),pageParams:ne(w.pageParams,j,L)}};if(d&&f.length){const w=d==="backward",j=w?E1:Zp,T={pages:f,pageParams:m},z=j(i,T);x=await M(T,z,w)}else{const w=n??f.length;do{const j=v===0?m[0]??i.initialPageParam:Zp(i,x);if(v>0&&j==null)break;x=await M(x,j),v++}while(v<w)}return x};r.options.persister?r.fetchFn=()=>r.options.persister?.(g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=g}}}function Zp(n,{pages:r,pageParams:s}){const i=r.length-1;return r.length>0?n.getNextPageParam(r[i],r,s[i],s):void 0}function E1(n,{pages:r,pageParams:s}){return r.length>0?n.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var R1=class extends Wg{#e;#t;#a;#l;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#a=n.mutationCache,this.#t=[],this.state=n.state||tx(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(r=>r!==n),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(n){const r=()=>{this.#n({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=Ig({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(f,m)=>{this.#n({type:"failed",failureCount:f,error:m})},onPause:()=>{this.#n({type:"pause"})},onContinue:r,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.#l.canStart();try{if(i)r();else{this.#n({type:"pending",variables:n,isPaused:d}),this.#a.config.onMutate&&await this.#a.config.onMutate(n,this,s);const m=await this.options.onMutate?.(n,s);m!==this.state.context&&this.#n({type:"pending",context:m,variables:n,isPaused:d})}const f=await this.#l.start();return await this.#a.config.onSuccess?.(f,n,this.state.context,this,s),await this.options.onSuccess?.(f,n,this.state.context,s),await this.#a.config.onSettled?.(f,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(f,null,n,this.state.context,s),this.#n({type:"success",data:f}),f}catch(f){try{await this.#a.config.onError?.(f,n,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onError?.(f,n,this.state.context,s)}catch(m){Promise.reject(m)}try{await this.#a.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,s)}catch(m){Promise.reject(m)}throw this.#n({type:"error",error:f}),f}finally{this.#a.runNext(this)}}#n(n){const r=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=r(this.state),dt.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(n)}),this.#a.notify({mutation:this,type:"updated",action:n})})}};function tx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var T1=class extends ir{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(n,r,s){const i=new R1({client:n,mutationCache:this,mutationId:++this.#a,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){this.#e.add(n);const r=Li(n);if(typeof r=="string"){const s=this.#t.get(r);s?s.push(n):this.#t.set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const r=Li(n);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const i=s.indexOf(n);i!==-1&&s.splice(i,1)}else s[0]===n&&this.#t.delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=Li(n);if(typeof r=="string"){const i=this.#t.get(r)?.find(d=>d.state.status==="pending");return!i||i===n}else return!0}runNext(n){const r=Li(n);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==n&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){dt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const r={exact:!0,...n};return this.getAll().find(s=>qp(r,s))}findAll(n={}){return this.getAll().filter(r=>qp(n,r))}notify(n){dt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return dt.batch(()=>Promise.all(n.map(r=>r.continue().catch(Ct))))}};function Li(n){return n.options.scope?.id}var C1=class extends ir{#e;#t=void 0;#a;#l;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),Wi(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),s?.mutationKey&&this.options.mutationKey&&ol(s.mutationKey)!==ol(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(r){this.#n(),this.#s(r)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#n(),this.#s()}mutate(r,s){return this.#l=s,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(r)}#n(){const r=this.#a?.state??tx();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#s(r){dt.batch(()=>{if(this.#l&&this.hasListeners()){const s=this.#t.variables,i=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#l.onSuccess?.(r.data,s,i,d)}catch(f){Promise.reject(f)}try{this.#l.onSettled?.(r.data,null,s,i,d)}catch(f){Promise.reject(f)}}else if(r?.type==="error"){try{this.#l.onError?.(r.error,s,i,d)}catch(f){Promise.reject(f)}try{this.#l.onSettled?.(void 0,r.error,s,i,d)}catch(f){Promise.reject(f)}}}this.listeners.forEach(s=>{s(this.#t)})})}},_1=class extends ir{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,r,s){const i=r.queryKey,d=r.queryHash??hd(i,r);let f=this.get(d);return f||(f=new S1({client:n,queryKey:i,queryHash:d,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=this.#e.get(n.queryHash);r&&(n.destroy(),r===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){dt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Hp(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>Hp(n,s)):r}notify(n){dt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},M1=class{#e;#t;#a;#l;#n;#s;#i;#r;constructor(n={}){this.#e=n.queryCache||new _1,this.#t=n.mutationCache||new T1,this.#a=n.defaultOptions||{},this.#l=new Map,this.#n=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=xd.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=eo.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#i?.(),this.#i=void 0,this.#r?.(),this.#r=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),s=this.#e.build(this,r),i=s.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(Mn(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:r,state:s})=>{const i=s.data;return[r,i]})}setQueryData(n,r,s){const i=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(i.queryHash)?.state.data,m=u1(r,f);if(m!==void 0)return this.#e.build(this,i).setData(m,{...s,manual:!0})}setQueriesData(n,r,s){return dt.batch(()=>this.#e.findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,r,s)]))}getQueryState(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state}removeQueries(n){const r=this.#e;dt.batch(()=>{r.findAll(n).forEach(s=>{r.remove(s)})})}resetQueries(n,r){const s=this.#e;return dt.batch(()=>(s.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const s={revert:!0,...r},i=dt.batch(()=>this.#e.findAll(n).map(d=>d.cancel(s)));return Promise.all(i).then(Ct).catch(Ct)}invalidateQueries(n,r={}){return dt.batch(()=>(this.#e.findAll(n).forEach(s=>{s.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},r)))}refetchQueries(n,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},i=dt.batch(()=>this.#e.findAll(n).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let f=d.fetch(void 0,s);return s.throwOnError||(f=f.catch(Ct)),d.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(i).then(Ct)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const s=this.#e.build(this,r);return s.isStaleByTime(Mn(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ct).catch(Ct)}fetchInfiniteQuery(n){return n.behavior=Kp(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ct).catch(Ct)}ensureInfiniteQueryData(n){return n.behavior=Kp(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return eo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(n){this.#a=n}setQueryDefaults(n,r){this.#l.set(ol(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...this.#l.values()],s={};return r.forEach(i=>{ms(n,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(n,r){this.#n.set(ol(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...this.#n.values()],s={};return r.forEach(i=>{ms(n,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const r={...this.#a.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=hd(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===pd&&(r.enabled=!1),r}defaultMutationOptions(n){return n?._defaulted?n:{...this.#a.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ax=S.createContext(void 0),ua=n=>{const r=S.useContext(ax);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},A1=({client:n,children:r})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(ax.Provider,{value:n,children:r})),nx=S.createContext(!1),O1=()=>S.useContext(nx);nx.Provider;function z1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var k1=S.createContext(z1()),D1=()=>S.useContext(k1),U1=(n,r,s)=>{const i=s?.state.error&&typeof n.throwOnError=="function"?gd(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||i)&&(r.isReset()||(n.retryOnMount=!1))},L1=n=>{S.useEffect(()=>{n.clearReset()},[n])},B1=({result:n,errorResetBoundary:r,throwOnError:s,query:i,suspense:d})=>n.isError&&!r.isReset()&&!n.isFetching&&i&&(d&&n.data===void 0||gd(s,[n.error,i])),H1=n=>{if(n.suspense){const s=d=>d==="static"?d:Math.max(d??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...d)=>s(i(...d)):s(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},q1=(n,r)=>n.isLoading&&n.isFetching&&!r,G1=(n,r)=>n?.suspense&&r.isPending,Jp=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function Q1(n,r,s){const i=O1(),d=D1(),f=ua(),m=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(m);const x=f.getQueryCache().get(m.queryHash);m._optimisticResults=i?"isRestoring":"optimistic",H1(m),U1(m,d,x),L1(d);const v=!f.getQueryCache().get(m.queryHash),[g]=S.useState(()=>new r(f,m)),y=g.getOptimisticResult(m),p=!i&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const M=p?g.subscribe(dt.batchCalls(N)):Ct;return g.updateResult(),M},[g,p]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),S.useEffect(()=>{g.setOptions(m)},[m,g]),G1(m,y))throw Jp(m,g,d);if(B1({result:y,errorResetBoundary:d,throwOnError:m.throwOnError,query:x,suspense:m.suspense}))throw y.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(m,y),m.experimental_prefetchInRender&&!il&&q1(y,i)&&(v?Jp(m,g,d):x?.promise)?.catch(Ct).finally(()=>{g.updateResult()}),m.notifyOnChangeProps?y:g.trackResult(y)}function Oa(n,r){return Q1(n,w1)}function ba(n,r){const s=ua(),[i]=S.useState(()=>new C1(s,n));S.useEffect(()=>{i.setOptions(n)},[i,n]);const d=S.useSyncExternalStore(S.useCallback(m=>i.subscribe(dt.batchCalls(m)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),f=S.useCallback((m,x)=>{i.mutate(m,x).catch(Ct)},[i]);if(d.error&&gd(i.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:f,mutateAsync:d.mutate}}function V1(n){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r.appendChild(s),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n))}const Y1=n=>{switch(n){case"success":return K1;case"info":return J1;case"warning":return Z1;case"error":return $1;default:return null}},F1=Array(12).fill(0),X1=({visible:n,className:r})=>te.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},te.createElement("div",{className:"sonner-spinner"},F1.map((s,i)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),K1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),Z1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.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"})),J1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),$1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),P1=te.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"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),I1=()=>{const[n,r]=te.useState(document.hidden);return te.useEffect(()=>{const s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n};let $u=1;class W1{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const s=this.subscribers.indexOf(r);this.subscribers.splice(s,1)}),this.publish=r=>{this.subscribers.forEach(s=>s(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var s;const{message:i,...d}=r,f=typeof r?.id=="number"||((s=r.id)==null?void 0:s.length)>0?r.id:$u++,m=this.toasts.find(v=>v.id===f),x=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),m?this.toasts=this.toasts.map(v=>v.id===f?(this.publish({...v,...r,id:f,title:i}),{...v,...r,id:f,dismissible:x,title:i}):v):this.addToast({title:i,...d,dismissible:x,id:f}),f},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:r,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(i=>i({id:s.id,dismiss:!0}))}),r),this.message=(r,s)=>this.create({...s,message:r}),this.error=(r,s)=>this.create({...s,message:r,type:"error"}),this.success=(r,s)=>this.create({...s,type:"success",message:r}),this.info=(r,s)=>this.create({...s,type:"info",message:r}),this.warning=(r,s)=>this.create({...s,type:"warning",message:r}),this.loading=(r,s)=>this.create({...s,type:"loading",message:r}),this.promise=(r,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:r,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const d=Promise.resolve(r instanceof Function?r():r);let f=i!==void 0,m;const x=d.then(async g=>{if(m=["resolve",g],te.isValidElement(g))f=!1,this.create({id:i,type:"default",message:g});else if(tS(g)&&!g.ok){f=!1;const p=typeof s.error=="function"?await s.error(`HTTP error! status: ${g.status}`):s.error,N=typeof s.description=="function"?await s.description(`HTTP error! status: ${g.status}`):s.description,w=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:N,...w})}else if(g instanceof Error){f=!1;const p=typeof s.error=="function"?await s.error(g):s.error,N=typeof s.description=="function"?await s.description(g):s.description,w=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:N,...w})}else if(s.success!==void 0){f=!1;const p=typeof s.success=="function"?await s.success(g):s.success,N=typeof s.description=="function"?await s.description(g):s.description,w=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:N,...w})}}).catch(async g=>{if(m=["reject",g],s.error!==void 0){f=!1;const y=typeof s.error=="function"?await s.error(g):s.error,p=typeof s.description=="function"?await s.description(g):s.description,M=typeof y=="object"&&!te.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:p,...M})}}).finally(()=>{f&&(this.dismiss(i),i=void 0),s.finally==null||s.finally.call(s)}),v=()=>new Promise((g,y)=>x.then(()=>m[0]==="reject"?y(m[1]):g(m[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:v}:Object.assign(i,{unwrap:v})},this.custom=(r,s)=>{const i=s?.id||$u++;return this.create({jsx:r(i),id:i,...s}),i},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ht=new W1,eS=(n,r)=>{const s=r?.id||$u++;return Ht.addToast({title:n,...r,id:s}),s},tS=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",aS=eS,nS=()=>Ht.toasts,lS=()=>Ht.getActiveToasts(),Fe=Object.assign(aS,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading},{getHistory:nS,getToasts:lS});V1("[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 Bi(n){return n.label!==void 0}const rS=3,sS="24px",iS="16px",$p=4e3,oS=356,cS=14,uS=45,dS=200;function Ca(...n){return n.filter(Boolean).join(" ")}function fS(n){const[r,s]=n.split("-"),i=[];return r&&i.push(r),s&&i.push(s),i}const mS=n=>{var r,s,i,d,f,m,x,v,g;const{invert:y,toast:p,unstyled:N,interacting:M,setHeights:w,visibleToasts:j,heights:T,index:z,toasts:_,expanded:V,removeToast:L,defaultRichColors:ne,closeButton:I,style:ee,cancelButtonStyle:$,actionButtonStyle:P,className:re="",descriptionClassName:se="",duration:he,position:Ae,gap:De,expandByDefault:Be,classNames:O,icons:Z,closeButtonAriaLabel:X="Close toast"}=n,[xe,ge]=te.useState(null),[R,G]=te.useState(null),[Q,J]=te.useState(!1),[le,fe]=te.useState(!1),[de,be]=te.useState(!1),[B,W]=te.useState(!1),[Ee,Te]=te.useState(!1),[da,ot]=te.useState(0),[zn,dl]=te.useState(0),kn=te.useRef(p.duration||he||$p),dr=te.useRef(null),Qt=te.useRef(null),fr=z===0,mr=z+1<=j,jt=p.type,tn=p.dismissible!==!1,Et=p.className||"",fo=p.descriptionClassName||"",Dn=te.useMemo(()=>T.findIndex(ye=>ye.toastId===p.id)||0,[T,p.id]),ws=te.useMemo(()=>{var ye;return(ye=p.closeButton)!=null?ye:I},[p.closeButton,I]),Un=te.useMemo(()=>p.duration||he||$p,[p.duration,he]),hr=te.useRef(0),za=te.useRef(0),Ns=te.useRef(0),an=te.useRef(null),[Ln,Rt]=Ae.split("-"),fa=te.useMemo(()=>T.reduce((ye,Je,ft)=>ft>=Dn?ye:ye+Je.height,0),[T,Dn]),bt=I1(),mo=p.invert||y,pr=jt==="loading";za.current=te.useMemo(()=>Dn*De+fa,[Dn,fa]),te.useEffect(()=>{kn.current=Un},[Un]),te.useEffect(()=>{J(!0)},[]),te.useEffect(()=>{const ye=Qt.current;if(ye){const Je=ye.getBoundingClientRect().height;return dl(Je),w(ft=>[{toastId:p.id,height:Je,position:p.position},...ft]),()=>w(ft=>ft.filter(St=>St.toastId!==p.id))}},[w,p.id]),te.useLayoutEffect(()=>{if(!Q)return;const ye=Qt.current,Je=ye.style.height;ye.style.height="auto";const ft=ye.getBoundingClientRect().height;ye.style.height=Je,dl(ft),w(St=>St.find(Ie=>Ie.toastId===p.id)?St.map(Ie=>Ie.toastId===p.id?{...Ie,height:ft}:Ie):[{toastId:p.id,height:ft,position:p.position},...St])},[Q,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const wa=te.useCallback(()=>{fe(!0),ot(za.current),w(ye=>ye.filter(Je=>Je.toastId!==p.id)),setTimeout(()=>{L(p)},dS)},[p,L,w,za]);te.useEffect(()=>{if(p.promise&&jt==="loading"||p.duration===1/0||p.type==="loading")return;let ye;return V||M||bt?(()=>{if(Ns.current<hr.current){const St=new Date().getTime()-hr.current;kn.current=kn.current-St}Ns.current=new Date().getTime()})():kn.current!==1/0&&(hr.current=new Date().getTime(),ye=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),wa()},kn.current)),()=>clearTimeout(ye)},[V,M,p,jt,bt,wa]),te.useEffect(()=>{p.delete&&(wa(),p.onDismiss==null||p.onDismiss.call(p,p))},[wa,p.delete]);function fl(){var ye;if(Z?.loading){var Je;return te.createElement("div",{className:Ca(O?.loader,p==null||(Je=p.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":jt==="loading"},Z.loading)}return te.createElement(X1,{className:Ca(O?.loader,p==null||(ye=p.classNames)==null?void 0:ye.loader),visible:jt==="loading"})}const ml=p.icon||Z?.[jt]||Y1(jt);var Bn,Na;return te.createElement("li",{tabIndex:0,ref:Qt,className:Ca(re,Et,O?.toast,p==null||(r=p.classNames)==null?void 0:r.toast,O?.default,O?.[jt],p==null||(s=p.classNames)==null?void 0:s[jt]),"data-sonner-toast":"","data-rich-colors":(Bn=p.richColors)!=null?Bn:ne,"data-styled":!(p.jsx||p.unstyled||N),"data-mounted":Q,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":le,"data-visible":mr,"data-y-position":Ln,"data-x-position":Rt,"data-index":z,"data-front":fr,"data-swiping":de,"data-dismissible":tn,"data-type":jt,"data-invert":mo,"data-swipe-out":B,"data-swipe-direction":R,"data-expanded":!!(V||Be&&Q),"data-testid":p.testId,style:{"--index":z,"--toasts-before":z,"--z-index":_.length-z,"--offset":`${le?da:za.current}px`,"--initial-height":Be?"auto":`${zn}px`,...ee,...p.style},onDragEnd:()=>{be(!1),ge(null),an.current=null},onPointerDown:ye=>{ye.button!==2&&(pr||!tn||(dr.current=new Date,ot(za.current),ye.target.setPointerCapture(ye.pointerId),ye.target.tagName!=="BUTTON"&&(be(!0),an.current={x:ye.clientX,y:ye.clientY})))},onPointerUp:()=>{var ye,Je,ft;if(B||!tn)return;an.current=null;const St=Number(((ye=Qt.current)==null?void 0:ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),nn=Number(((Je=Qt.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ie=new Date().getTime()-((ft=dr.current)==null?void 0:ft.getTime()),_t=xe==="x"?St:nn,Hn=Math.abs(_t)/Ie;if(Math.abs(_t)>=uS||Hn>.11){ot(za.current),p.onDismiss==null||p.onDismiss.call(p,p),G(xe==="x"?St>0?"right":"left":nn>0?"down":"up"),wa(),W(!0);return}else{var Mt,At;(Mt=Qt.current)==null||Mt.style.setProperty("--swipe-amount-x","0px"),(At=Qt.current)==null||At.style.setProperty("--swipe-amount-y","0px")}Te(!1),be(!1),ge(null)},onPointerMove:ye=>{var Je,ft,St;if(!an.current||!tn||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const Ie=ye.clientY-an.current.y,_t=ye.clientX-an.current.x;var Hn;const Mt=(Hn=n.swipeDirections)!=null?Hn:fS(Ae);!xe&&(Math.abs(_t)>1||Math.abs(Ie)>1)&&ge(Math.abs(_t)>Math.abs(Ie)?"x":"y");let At={x:0,y:0};const hl=ma=>1/(1.5+Math.abs(ma)/20);if(xe==="y"){if(Mt.includes("top")||Mt.includes("bottom"))if(Mt.includes("top")&&Ie<0||Mt.includes("bottom")&&Ie>0)At.y=Ie;else{const ma=Ie*hl(Ie);At.y=Math.abs(ma)<Math.abs(Ie)?ma:Ie}}else if(xe==="x"&&(Mt.includes("left")||Mt.includes("right")))if(Mt.includes("left")&&_t<0||Mt.includes("right")&&_t>0)At.x=_t;else{const ma=_t*hl(_t);At.x=Math.abs(ma)<Math.abs(_t)?ma:_t}(Math.abs(At.x)>0||Math.abs(At.y)>0)&&Te(!0),(ft=Qt.current)==null||ft.style.setProperty("--swipe-amount-x",`${At.x}px`),(St=Qt.current)==null||St.style.setProperty("--swipe-amount-y",`${At.y}px`)}},ws&&!p.jsx&&jt!=="loading"?te.createElement("button",{"aria-label":X,"data-disabled":pr,"data-close-button":!0,onClick:pr||!tn?()=>{}:()=>{wa(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Ca(O?.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(Na=Z?.close)!=null?Na:P1):null,(jt||p.icon||p.promise)&&p.icon!==null&&(Z?.[jt]!==null||p.icon)?te.createElement("div",{"data-icon":"",className:Ca(O?.icon,p==null||(d=p.classNames)==null?void 0:d.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||fl():null,p.type!=="loading"?ml:null):null,te.createElement("div",{"data-content":"",className:Ca(O?.content,p==null||(f=p.classNames)==null?void 0:f.content)},te.createElement("div",{"data-title":"",className:Ca(O?.title,p==null||(m=p.classNames)==null?void 0:m.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?te.createElement("div",{"data-description":"",className:Ca(se,fo,O?.description,p==null||(x=p.classNames)==null?void 0:x.description)},typeof p.description=="function"?p.description():p.description):null),te.isValidElement(p.cancel)?p.cancel:p.cancel&&Bi(p.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||$,onClick:ye=>{Bi(p.cancel)&&tn&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,ye),wa())},className:Ca(O?.cancelButton,p==null||(v=p.classNames)==null?void 0:v.cancelButton)},p.cancel.label):null,te.isValidElement(p.action)?p.action:p.action&&Bi(p.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:ye=>{Bi(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,ye),!ye.defaultPrevented&&wa())},className:Ca(O?.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function Pp(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function hS(n,r){const s={};return[n,r].forEach((i,d)=>{const f=d===1,m=f?"--mobile-offset":"--offset",x=f?iS:sS;function v(g){["top","right","bottom","left"].forEach(y=>{s[`${m}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?s[`${m}-${g}`]=x:s[`${m}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):v(x)}),s}const pS=te.forwardRef(function(r,s){const{id:i,invert:d,position:f="bottom-right",hotkey:m=["altKey","KeyT"],expand:x,closeButton:v,className:g,offset:y,mobileOffset:p,theme:N="light",richColors:M,duration:w,style:j,visibleToasts:T=rS,toastOptions:z,dir:_=Pp(),gap:V=cS,icons:L,containerAriaLabel:ne="Notifications"}=r,[I,ee]=te.useState([]),$=te.useMemo(()=>i?I.filter(Q=>Q.toasterId===i):I.filter(Q=>!Q.toasterId),[I,i]),P=te.useMemo(()=>Array.from(new Set([f].concat($.filter(Q=>Q.position).map(Q=>Q.position)))),[$,f]),[re,se]=te.useState([]),[he,Ae]=te.useState(!1),[De,Be]=te.useState(!1),[O,Z]=te.useState(N!=="system"?N:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=te.useRef(null),xe=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),ge=te.useRef(null),R=te.useRef(!1),G=te.useCallback(Q=>{ee(J=>{var le;return(le=J.find(fe=>fe.id===Q.id))!=null&&le.delete||Ht.dismiss(Q.id),J.filter(({id:fe})=>fe!==Q.id)})},[]);return te.useEffect(()=>Ht.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{ee(J=>J.map(le=>le.id===Q.id?{...le,delete:!0}:le))});return}setTimeout(()=>{s1.flushSync(()=>{ee(J=>{const le=J.findIndex(fe=>fe.id===Q.id);return le!==-1?[...J.slice(0,le),{...J[le],...Q},...J.slice(le+1)]:[Q,...J]})})})}),[I]),te.useEffect(()=>{if(N!=="system"){Z(N);return}if(N==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{Z(J?"dark":"light")})}catch{Q.addListener(({matches:le})=>{try{Z(le?"dark":"light")}catch(fe){console.error(fe)}})}},[N]),te.useEffect(()=>{I.length<=1&&Ae(!1)},[I]),te.useEffect(()=>{const Q=J=>{var le;if(m.every(be=>J[be]||J.code===be)){var de;Ae(!0),(de=X.current)==null||de.focus()}J.code==="Escape"&&(document.activeElement===X.current||(le=X.current)!=null&&le.contains(document.activeElement))&&Ae(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[m]),te.useEffect(()=>{if(X.current)return()=>{ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null,R.current=!1)}},[X.current]),te.createElement("section",{ref:s,"aria-label":`${ne} ${xe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((Q,J)=>{var le;const[fe,de]=Q.split("-");return $.length?te.createElement("ol",{key:Q,dir:_==="auto"?Pp():_,tabIndex:-1,ref:X,className:g,"data-sonner-toaster":!0,"data-sonner-theme":O,"data-y-position":fe,"data-x-position":de,style:{"--front-toast-height":`${((le=re[0])==null?void 0:le.height)||0}px`,"--width":`${oS}px`,"--gap":`${V}px`,...j,...hS(y,p)},onBlur:be=>{R.current&&!be.currentTarget.contains(be.relatedTarget)&&(R.current=!1,ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null))},onFocus:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||R.current||(R.current=!0,ge.current=be.relatedTarget)},onMouseEnter:()=>Ae(!0),onMouseMove:()=>Ae(!0),onMouseLeave:()=>{De||Ae(!1)},onDragEnd:()=>Ae(!1),onPointerDown:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||Be(!0)},onPointerUp:()=>Be(!1)},$.filter(be=>!be.position&&J===0||be.position===Q).map((be,B)=>{var W,Ee;return te.createElement(mS,{key:be.id,icons:L,index:B,toast:be,defaultRichColors:M,duration:(W=z?.duration)!=null?W:w,className:z?.className,descriptionClassName:z?.descriptionClassName,invert:d,visibleToasts:T,closeButton:(Ee=z?.closeButton)!=null?Ee:v,interacting:De,position:Q,style:z?.style,unstyled:z?.unstyled,classNames:z?.classNames,cancelButtonStyle:z?.cancelButtonStyle,actionButtonStyle:z?.actionButtonStyle,closeButtonAriaLabel:z?.closeButtonAriaLabel,removeToast:G,toasts:$.filter(Te=>Te.position==be.position),heights:re.filter(Te=>Te.position==be.position),setHeights:se,expandByDefault:x,gap:V,expanded:he,swipeDirections:r.swipeDirections})})):null}))}),lx=S.createContext(void 0),rx="jarvis-admin-theme";function gS(){const n=localStorage.getItem(rx);return n==="light"||n==="dark"?n:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function xS({children:n}){const[r,s]=S.useState(gS);S.useEffect(()=>{document.documentElement.classList.toggle("dark",r==="dark"),localStorage.setItem(rx,r)},[r]);const i=S.useCallback(()=>{s(d=>d==="dark"?"light":"dark")},[]);return u.jsx(lx.Provider,{value:{theme:r,toggleTheme:i},children:n})}function vS(){const n=S.useContext(lx);if(!n)throw new Error("useTheme must be used within ThemeProvider");return n}function sx(n,r){return function(){return n.apply(r,arguments)}}const{toString:yS}=Object.prototype,{getPrototypeOf:yd}=Object,{iterator:ro,toStringTag:ix}=Symbol,so=(n=>r=>{const s=yS.call(r);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Sa=n=>(n=n.toLowerCase(),r=>so(r)===n),io=n=>r=>typeof r===n,{isArray:or}=Array,nr=io("undefined");function xs(n){return n!==null&&!nr(n)&&n.constructor!==null&&!nr(n.constructor)&&qt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const ox=Sa("ArrayBuffer");function bS(n){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&ox(n.buffer),r}const SS=io("string"),qt=io("function"),cx=io("number"),vs=n=>n!==null&&typeof n=="object",wS=n=>n===!0||n===!1,Ki=n=>{if(so(n)!=="object")return!1;const r=yd(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(ix in n)&&!(ro in n)},NS=n=>{if(!vs(n)||xs(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},jS=Sa("Date"),ES=Sa("File"),RS=Sa("Blob"),TS=Sa("FileList"),CS=n=>vs(n)&&qt(n.pipe),_S=n=>{let r;return n&&(typeof FormData=="function"&&n instanceof FormData||qt(n.append)&&((r=so(n))==="formdata"||r==="object"&&qt(n.toString)&&n.toString()==="[object FormData]"))},MS=Sa("URLSearchParams"),[AS,OS,zS,kS]=["ReadableStream","Request","Response","Headers"].map(Sa),DS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ys(n,r,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let i,d;if(typeof n!="object"&&(n=[n]),or(n))for(i=0,d=n.length;i<d;i++)r.call(null,n[i],i,n);else{if(xs(n))return;const f=s?Object.getOwnPropertyNames(n):Object.keys(n),m=f.length;let x;for(i=0;i<m;i++)x=f[i],r.call(null,n[x],x,n)}}function ux(n,r){if(xs(n))return null;r=r.toLowerCase();const s=Object.keys(n);let i=s.length,d;for(;i-- >0;)if(d=s[i],r===d.toLowerCase())return d;return null}const rl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dx=n=>!nr(n)&&n!==rl;function Pu(){const{caseless:n,skipUndefined:r}=dx(this)&&this||{},s={},i=(d,f)=>{const m=n&&ux(s,f)||f;Ki(s[m])&&Ki(d)?s[m]=Pu(s[m],d):Ki(d)?s[m]=Pu({},d):or(d)?s[m]=d.slice():(!r||!nr(d))&&(s[m]=d)};for(let d=0,f=arguments.length;d<f;d++)arguments[d]&&ys(arguments[d],i);return s}const US=(n,r,s,{allOwnKeys:i}={})=>(ys(r,(d,f)=>{s&&qt(d)?Object.defineProperty(n,f,{value:sx(d,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,f,{value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),LS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),BS=(n,r,s,i)=>{n.prototype=Object.create(r.prototype,i),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:r.prototype}),s&&Object.assign(n.prototype,s)},HS=(n,r,s,i)=>{let d,f,m;const x={};if(r=r||{},n==null)return r;do{for(d=Object.getOwnPropertyNames(n),f=d.length;f-- >0;)m=d[f],(!i||i(m,n,r))&&!x[m]&&(r[m]=n[m],x[m]=!0);n=s!==!1&&yd(n)}while(n&&(!s||s(n,r))&&n!==Object.prototype);return r},qS=(n,r,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=r.length;const i=n.indexOf(r,s);return i!==-1&&i===s},GS=n=>{if(!n)return null;if(or(n))return n;let r=n.length;if(!cx(r))return null;const s=new Array(r);for(;r-- >0;)s[r]=n[r];return s},QS=(n=>r=>n&&r instanceof n)(typeof Uint8Array<"u"&&yd(Uint8Array)),VS=(n,r)=>{const i=(n&&n[ro]).call(n);let d;for(;(d=i.next())&&!d.done;){const f=d.value;r.call(n,f[0],f[1])}},YS=(n,r)=>{let s;const i=[];for(;(s=n.exec(r))!==null;)i.push(s);return i},FS=Sa("HTMLFormElement"),XS=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,i,d){return i.toUpperCase()+d}),Ip=(({hasOwnProperty:n})=>(r,s)=>n.call(r,s))(Object.prototype),KS=Sa("RegExp"),fx=(n,r)=>{const s=Object.getOwnPropertyDescriptors(n),i={};ys(s,(d,f)=>{let m;(m=r(d,f,n))!==!1&&(i[f]=m||d)}),Object.defineProperties(n,i)},ZS=n=>{fx(n,(r,s)=>{if(qt(n)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const i=n[s];if(qt(i)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},JS=(n,r)=>{const s={},i=d=>{d.forEach(f=>{s[f]=!0})};return or(n)?i(n):i(String(n).split(r)),s},$S=()=>{},PS=(n,r)=>n!=null&&Number.isFinite(n=+n)?n:r;function IS(n){return!!(n&&qt(n.append)&&n[ix]==="FormData"&&n[ro])}const WS=n=>{const r=new Array(10),s=(i,d)=>{if(vs(i)){if(r.indexOf(i)>=0)return;if(xs(i))return i;if(!("toJSON"in i)){r[d]=i;const f=or(i)?[]:{};return ys(i,(m,x)=>{const v=s(m,d+1);!nr(v)&&(f[x]=v)}),r[d]=void 0,f}}return i};return s(n,0)},e2=Sa("AsyncFunction"),t2=n=>n&&(vs(n)||qt(n))&&qt(n.then)&&qt(n.catch),mx=((n,r)=>n?setImmediate:r?((s,i)=>(rl.addEventListener("message",({source:d,data:f})=>{d===rl&&f===s&&i.length&&i.shift()()},!1),d=>{i.push(d),rl.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",qt(rl.postMessage)),a2=typeof queueMicrotask<"u"?queueMicrotask.bind(rl):typeof process<"u"&&process.nextTick||mx,n2=n=>n!=null&&qt(n[ro]),q={isArray:or,isArrayBuffer:ox,isBuffer:xs,isFormData:_S,isArrayBufferView:bS,isString:SS,isNumber:cx,isBoolean:wS,isObject:vs,isPlainObject:Ki,isEmptyObject:NS,isReadableStream:AS,isRequest:OS,isResponse:zS,isHeaders:kS,isUndefined:nr,isDate:jS,isFile:ES,isBlob:RS,isRegExp:KS,isFunction:qt,isStream:CS,isURLSearchParams:MS,isTypedArray:QS,isFileList:TS,forEach:ys,merge:Pu,extend:US,trim:DS,stripBOM:LS,inherits:BS,toFlatObject:HS,kindOf:so,kindOfTest:Sa,endsWith:qS,toArray:GS,forEachEntry:VS,matchAll:YS,isHTMLForm:FS,hasOwnProperty:Ip,hasOwnProp:Ip,reduceDescriptors:fx,freezeMethods:ZS,toObjectSet:JS,toCamelCase:XS,noop:$S,toFiniteNumber:PS,findKey:ux,global:rl,isContextDefined:dx,isSpecCompliantForm:IS,toJSONObject:WS,isAsyncFn:e2,isThenable:t2,setImmediate:mx,asap:a2,isIterable:n2};let ve=class hx extends Error{static from(r,s,i,d,f,m){const x=new hx(r.message,s||r.code,i,d,f);return x.cause=r,x.name=r.name,m&&Object.assign(x,m),x}constructor(r,s,i,d,f){super(r),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),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:q.toJSONObject(this.config),code:this.code,status:this.status}}};ve.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ve.ERR_BAD_OPTION="ERR_BAD_OPTION";ve.ECONNABORTED="ECONNABORTED";ve.ETIMEDOUT="ETIMEDOUT";ve.ERR_NETWORK="ERR_NETWORK";ve.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ve.ERR_DEPRECATED="ERR_DEPRECATED";ve.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ve.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ve.ERR_CANCELED="ERR_CANCELED";ve.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ve.ERR_INVALID_URL="ERR_INVALID_URL";const l2=null;function Iu(n){return q.isPlainObject(n)||q.isArray(n)}function px(n){return q.endsWith(n,"[]")?n.slice(0,-2):n}function Wp(n,r,s){return n?n.concat(r).map(function(d,f){return d=px(d),!s&&f?"["+d+"]":d}).join(s?".":""):r}function r2(n){return q.isArray(n)&&!n.some(Iu)}const s2=q.toFlatObject(q,{},null,function(r){return/^is[A-Z]/.test(r)});function oo(n,r,s){if(!q.isObject(n))throw new TypeError("target must be an object");r=r||new FormData,s=q.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,T){return!q.isUndefined(T[j])});const i=s.metaTokens,d=s.visitor||y,f=s.dots,m=s.indexes,v=(s.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(r);if(!q.isFunction(d))throw new TypeError("visitor must be a function");function g(w){if(w===null)return"";if(q.isDate(w))return w.toISOString();if(q.isBoolean(w))return w.toString();if(!v&&q.isBlob(w))throw new ve("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(w)||q.isTypedArray(w)?v&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function y(w,j,T){let z=w;if(w&&!T&&typeof w=="object"){if(q.endsWith(j,"{}"))j=i?j:j.slice(0,-2),w=JSON.stringify(w);else if(q.isArray(w)&&r2(w)||(q.isFileList(w)||q.endsWith(j,"[]"))&&(z=q.toArray(w)))return j=px(j),z.forEach(function(V,L){!(q.isUndefined(V)||V===null)&&r.append(m===!0?Wp([j],L,f):m===null?j:j+"[]",g(V))}),!1}return Iu(w)?!0:(r.append(Wp(T,j,f),g(w)),!1)}const p=[],N=Object.assign(s2,{defaultVisitor:y,convertValue:g,isVisitable:Iu});function M(w,j){if(!q.isUndefined(w)){if(p.indexOf(w)!==-1)throw Error("Circular reference detected in "+j.join("."));p.push(w),q.forEach(w,function(z,_){(!(q.isUndefined(z)||z===null)&&d.call(r,z,q.isString(_)?_.trim():_,j,N))===!0&&M(z,j?j.concat(_):[_])}),p.pop()}}if(!q.isObject(n))throw new TypeError("data must be an object");return M(n),r}function eg(n){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return r[i]})}function bd(n,r){this._pairs=[],n&&oo(n,this,r)}const gx=bd.prototype;gx.append=function(r,s){this._pairs.push([r,s])};gx.toString=function(r){const s=r?function(i){return r.call(this,i,eg)}:eg;return this._pairs.map(function(d){return s(d[0])+"="+s(d[1])},"").join("&")};function i2(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xx(n,r,s){if(!r)return n;const i=s&&s.encode||i2,d=q.isFunction(s)?{serialize:s}:s,f=d&&d.serialize;let m;if(f?m=f(r,d):m=q.isURLSearchParams(r)?r.toString():new bd(r,d).toString(i),m){const x=n.indexOf("#");x!==-1&&(n=n.slice(0,x)),n+=(n.indexOf("?")===-1?"?":"&")+m}return n}class tg{constructor(){this.handlers=[]}use(r,s,i){return this.handlers.push({fulfilled:r,rejected:s,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){q.forEach(this.handlers,function(i){i!==null&&r(i)})}}const vx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},o2=typeof URLSearchParams<"u"?URLSearchParams:bd,c2=typeof FormData<"u"?FormData:null,u2=typeof Blob<"u"?Blob:null,d2={isBrowser:!0,classes:{URLSearchParams:o2,FormData:c2,Blob:u2},protocols:["http","https","file","blob","url","data"]},Sd=typeof window<"u"&&typeof document<"u",Wu=typeof navigator=="object"&&navigator||void 0,f2=Sd&&(!Wu||["ReactNative","NativeScript","NS"].indexOf(Wu.product)<0),m2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",h2=Sd&&window.location.href||"http://localhost",p2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sd,hasStandardBrowserEnv:f2,hasStandardBrowserWebWorkerEnv:m2,navigator:Wu,origin:h2},Symbol.toStringTag,{value:"Module"})),Nt={...p2,...d2};function g2(n,r){return oo(n,new Nt.classes.URLSearchParams,{visitor:function(s,i,d,f){return Nt.isNode&&q.isBuffer(s)?(this.append(i,s.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...r})}function x2(n){return q.matchAll(/\w+|\[(\w*)]/g,n).map(r=>r[0]==="[]"?"":r[1]||r[0])}function v2(n){const r={},s=Object.keys(n);let i;const d=s.length;let f;for(i=0;i<d;i++)f=s[i],r[f]=n[f];return r}function yx(n){function r(s,i,d,f){let m=s[f++];if(m==="__proto__")return!0;const x=Number.isFinite(+m),v=f>=s.length;return m=!m&&q.isArray(d)?d.length:m,v?(q.hasOwnProp(d,m)?d[m]=[d[m],i]:d[m]=i,!x):((!d[m]||!q.isObject(d[m]))&&(d[m]=[]),r(s,i,d[m],f)&&q.isArray(d[m])&&(d[m]=v2(d[m])),!x)}if(q.isFormData(n)&&q.isFunction(n.entries)){const s={};return q.forEachEntry(n,(i,d)=>{r(x2(i),d,s,0)}),s}return null}function y2(n,r,s){if(q.isString(n))try{return(r||JSON.parse)(n),q.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(s||JSON.stringify)(n)}const bs={transitional:vx,adapter:["xhr","http","fetch"],transformRequest:[function(r,s){const i=s.getContentType()||"",d=i.indexOf("application/json")>-1,f=q.isObject(r);if(f&&q.isHTMLForm(r)&&(r=new FormData(r)),q.isFormData(r))return d?JSON.stringify(yx(r)):r;if(q.isArrayBuffer(r)||q.isBuffer(r)||q.isStream(r)||q.isFile(r)||q.isBlob(r)||q.isReadableStream(r))return r;if(q.isArrayBufferView(r))return r.buffer;if(q.isURLSearchParams(r))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let x;if(f){if(i.indexOf("application/x-www-form-urlencoded")>-1)return g2(r,this.formSerializer).toString();if((x=q.isFileList(r))||i.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return oo(x?{"files[]":r}:r,v&&new v,this.formSerializer)}}return f||d?(s.setContentType("application/json",!1),y2(r)):r}],transformResponse:[function(r){const s=this.transitional||bs.transitional,i=s&&s.forcedJSONParsing,d=this.responseType==="json";if(q.isResponse(r)||q.isReadableStream(r))return r;if(r&&q.isString(r)&&(i&&!this.responseType||d)){const m=!(s&&s.silentJSONParsing)&&d;try{return JSON.parse(r,this.parseReviver)}catch(x){if(m)throw x.name==="SyntaxError"?ve.from(x,ve.ERR_BAD_RESPONSE,this,null,this.response):x}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],n=>{bs.headers[n]={}});const b2=q.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"]),S2=n=>{const r={};let s,i,d;return n&&n.split(`
12
- `).forEach(function(m){d=m.indexOf(":"),s=m.substring(0,d).trim().toLowerCase(),i=m.substring(d+1).trim(),!(!s||r[s]&&b2[s])&&(s==="set-cookie"?r[s]?r[s].push(i):r[s]=[i]:r[s]=r[s]?r[s]+", "+i:i)}),r},ag=Symbol("internals");function os(n){return n&&String(n).trim().toLowerCase()}function Zi(n){return n===!1||n==null?n:q.isArray(n)?n.map(Zi):String(n)}function w2(n){const r=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=s.exec(n);)r[i[1]]=i[2];return r}const N2=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function zu(n,r,s,i,d){if(q.isFunction(i))return i.call(this,r,s);if(d&&(r=s),!!q.isString(r)){if(q.isString(i))return r.indexOf(i)!==-1;if(q.isRegExp(i))return i.test(r)}}function j2(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,s,i)=>s.toUpperCase()+i)}function E2(n,r){const s=q.toCamelCase(" "+r);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+s,{value:function(d,f,m){return this[i].call(this,r,d,f,m)},configurable:!0})})}let Gt=class{constructor(r){r&&this.set(r)}set(r,s,i){const d=this;function f(x,v,g){const y=os(v);if(!y)throw new Error("header name must be a non-empty string");const p=q.findKey(d,y);(!p||d[p]===void 0||g===!0||g===void 0&&d[p]!==!1)&&(d[p||v]=Zi(x))}const m=(x,v)=>q.forEach(x,(g,y)=>f(g,y,v));if(q.isPlainObject(r)||r instanceof this.constructor)m(r,s);else if(q.isString(r)&&(r=r.trim())&&!N2(r))m(S2(r),s);else if(q.isObject(r)&&q.isIterable(r)){let x={},v,g;for(const y of r){if(!q.isArray(y))throw TypeError("Object iterator must return a key-value pair");x[g=y[0]]=(v=x[g])?q.isArray(v)?[...v,y[1]]:[v,y[1]]:y[1]}m(x,s)}else r!=null&&f(s,r,i);return this}get(r,s){if(r=os(r),r){const i=q.findKey(this,r);if(i){const d=this[i];if(!s)return d;if(s===!0)return w2(d);if(q.isFunction(s))return s.call(this,d,i);if(q.isRegExp(s))return s.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,s){if(r=os(r),r){const i=q.findKey(this,r);return!!(i&&this[i]!==void 0&&(!s||zu(this,this[i],i,s)))}return!1}delete(r,s){const i=this;let d=!1;function f(m){if(m=os(m),m){const x=q.findKey(i,m);x&&(!s||zu(i,i[x],x,s))&&(delete i[x],d=!0)}}return q.isArray(r)?r.forEach(f):f(r),d}clear(r){const s=Object.keys(this);let i=s.length,d=!1;for(;i--;){const f=s[i];(!r||zu(this,this[f],f,r,!0))&&(delete this[f],d=!0)}return d}normalize(r){const s=this,i={};return q.forEach(this,(d,f)=>{const m=q.findKey(i,f);if(m){s[m]=Zi(d),delete s[f];return}const x=r?j2(f):String(f).trim();x!==f&&delete s[f],s[x]=Zi(d),i[x]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const s=Object.create(null);return q.forEach(this,(i,d)=>{i!=null&&i!==!1&&(s[d]=r&&q.isArray(i)?i.join(", "):i)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,s])=>r+": "+s).join(`
13
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...s){const i=new this(r);return s.forEach(d=>i.set(d)),i}static accessor(r){const i=(this[ag]=this[ag]={accessors:{}}).accessors,d=this.prototype;function f(m){const x=os(m);i[x]||(E2(d,m),i[x]=!0)}return q.isArray(r)?r.forEach(f):f(r),this}};Gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Gt.prototype,({value:n},r)=>{let s=r[0].toUpperCase()+r.slice(1);return{get:()=>n,set(i){this[s]=i}}});q.freezeMethods(Gt);function ku(n,r){const s=this||bs,i=r||s,d=Gt.from(i.headers);let f=i.data;return q.forEach(n,function(x){f=x.call(s,f,d.normalize(),r?r.status:void 0)}),d.normalize(),f}function bx(n){return!!(n&&n.__CANCEL__)}let Ss=class extends ve{constructor(r,s,i){super(r??"canceled",ve.ERR_CANCELED,s,i),this.name="CanceledError",this.__CANCEL__=!0}};function Sx(n,r,s){const i=s.config.validateStatus;!s.status||!i||i(s.status)?n(s):r(new ve("Request failed with status code "+s.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function R2(n){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return r&&r[1]||""}function T2(n,r){n=n||10;const s=new Array(n),i=new Array(n);let d=0,f=0,m;return r=r!==void 0?r:1e3,function(v){const g=Date.now(),y=i[f];m||(m=g),s[d]=v,i[d]=g;let p=f,N=0;for(;p!==d;)N+=s[p++],p=p%n;if(d=(d+1)%n,d===f&&(f=(f+1)%n),g-m<r)return;const M=y&&g-y;return M?Math.round(N*1e3/M):void 0}}function C2(n,r){let s=0,i=1e3/r,d,f;const m=(g,y=Date.now())=>{s=y,d=null,f&&(clearTimeout(f),f=null),n(...g)};return[(...g)=>{const y=Date.now(),p=y-s;p>=i?m(g,y):(d=g,f||(f=setTimeout(()=>{f=null,m(d)},i-p)))},()=>d&&m(d)]}const to=(n,r,s=3)=>{let i=0;const d=T2(50,250);return C2(f=>{const m=f.loaded,x=f.lengthComputable?f.total:void 0,v=m-i,g=d(v),y=m<=x;i=m;const p={loaded:m,total:x,progress:x?m/x:void 0,bytes:v,rate:g||void 0,estimated:g&&x&&y?(x-m)/g:void 0,event:f,lengthComputable:x!=null,[r?"download":"upload"]:!0};n(p)},s)},ng=(n,r)=>{const s=n!=null;return[i=>r[0]({lengthComputable:s,total:n,loaded:i}),r[1]]},lg=n=>(...r)=>q.asap(()=>n(...r)),_2=Nt.hasStandardBrowserEnv?((n,r)=>s=>(s=new URL(s,Nt.origin),n.protocol===s.protocol&&n.host===s.host&&(r||n.port===s.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,M2=Nt.hasStandardBrowserEnv?{write(n,r,s,i,d,f,m){if(typeof document>"u")return;const x=[`${n}=${encodeURIComponent(r)}`];q.isNumber(s)&&x.push(`expires=${new Date(s).toUTCString()}`),q.isString(i)&&x.push(`path=${i}`),q.isString(d)&&x.push(`domain=${d}`),f===!0&&x.push("secure"),q.isString(m)&&x.push(`SameSite=${m}`),document.cookie=x.join("; ")},read(n){if(typeof document>"u")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function A2(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function O2(n,r){return r?n.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):n}function wx(n,r,s){let i=!A2(r);return n&&(i||s==!1)?O2(n,r):r}const rg=n=>n instanceof Gt?{...n}:n;function cl(n,r){r=r||{};const s={};function i(g,y,p,N){return q.isPlainObject(g)&&q.isPlainObject(y)?q.merge.call({caseless:N},g,y):q.isPlainObject(y)?q.merge({},y):q.isArray(y)?y.slice():y}function d(g,y,p,N){if(q.isUndefined(y)){if(!q.isUndefined(g))return i(void 0,g,p,N)}else return i(g,y,p,N)}function f(g,y){if(!q.isUndefined(y))return i(void 0,y)}function m(g,y){if(q.isUndefined(y)){if(!q.isUndefined(g))return i(void 0,g)}else return i(void 0,y)}function x(g,y,p){if(p in r)return i(g,y);if(p in n)return i(void 0,g)}const v={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:x,headers:(g,y,p)=>d(rg(g),rg(y),p,!0)};return q.forEach(Object.keys({...n,...r}),function(y){const p=v[y]||d,N=p(n[y],r[y],y);q.isUndefined(N)&&p!==x||(s[y]=N)}),s}const Nx=n=>{const r=cl({},n);let{data:s,withXSRFToken:i,xsrfHeaderName:d,xsrfCookieName:f,headers:m,auth:x}=r;if(r.headers=m=Gt.from(m),r.url=xx(wx(r.baseURL,r.url,r.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&m.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),q.isFormData(s)){if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(q.isFunction(s.getHeaders)){const v=s.getHeaders(),g=["content-type","content-length"];Object.entries(v).forEach(([y,p])=>{g.includes(y.toLowerCase())&&m.set(y,p)})}}if(Nt.hasStandardBrowserEnv&&(i&&q.isFunction(i)&&(i=i(r)),i||i!==!1&&_2(r.url))){const v=d&&f&&M2.read(f);v&&m.set(d,v)}return r},z2=typeof XMLHttpRequest<"u",k2=z2&&function(n){return new Promise(function(s,i){const d=Nx(n);let f=d.data;const m=Gt.from(d.headers).normalize();let{responseType:x,onUploadProgress:v,onDownloadProgress:g}=d,y,p,N,M,w;function j(){M&&M(),w&&w(),d.cancelToken&&d.cancelToken.unsubscribe(y),d.signal&&d.signal.removeEventListener("abort",y)}let T=new XMLHttpRequest;T.open(d.method.toUpperCase(),d.url,!0),T.timeout=d.timeout;function z(){if(!T)return;const V=Gt.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),ne={data:!x||x==="text"||x==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:V,config:n,request:T};Sx(function(ee){s(ee),j()},function(ee){i(ee),j()},ne),T=null}"onloadend"in T?T.onloadend=z:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(z)},T.onabort=function(){T&&(i(new ve("Request aborted",ve.ECONNABORTED,n,T)),T=null)},T.onerror=function(L){const ne=L&&L.message?L.message:"Network Error",I=new ve(ne,ve.ERR_NETWORK,n,T);I.event=L||null,i(I),T=null},T.ontimeout=function(){let L=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const ne=d.transitional||vx;d.timeoutErrorMessage&&(L=d.timeoutErrorMessage),i(new ve(L,ne.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,n,T)),T=null},f===void 0&&m.setContentType(null),"setRequestHeader"in T&&q.forEach(m.toJSON(),function(L,ne){T.setRequestHeader(ne,L)}),q.isUndefined(d.withCredentials)||(T.withCredentials=!!d.withCredentials),x&&x!=="json"&&(T.responseType=d.responseType),g&&([N,w]=to(g,!0),T.addEventListener("progress",N)),v&&T.upload&&([p,M]=to(v),T.upload.addEventListener("progress",p),T.upload.addEventListener("loadend",M)),(d.cancelToken||d.signal)&&(y=V=>{T&&(i(!V||V.type?new Ss(null,n,T):V),T.abort(),T=null)},d.cancelToken&&d.cancelToken.subscribe(y),d.signal&&(d.signal.aborted?y():d.signal.addEventListener("abort",y)));const _=R2(d.url);if(_&&Nt.protocols.indexOf(_)===-1){i(new ve("Unsupported protocol "+_+":",ve.ERR_BAD_REQUEST,n));return}T.send(f||null)})},D2=(n,r)=>{const{length:s}=n=n?n.filter(Boolean):[];if(r||s){let i=new AbortController,d;const f=function(g){if(!d){d=!0,x();const y=g instanceof Error?g:this.reason;i.abort(y instanceof ve?y:new Ss(y instanceof Error?y.message:y))}};let m=r&&setTimeout(()=>{m=null,f(new ve(`timeout of ${r}ms exceeded`,ve.ETIMEDOUT))},r);const x=()=>{n&&(m&&clearTimeout(m),m=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(f):g.removeEventListener("abort",f)}),n=null)};n.forEach(g=>g.addEventListener("abort",f));const{signal:v}=i;return v.unsubscribe=()=>q.asap(x),v}},U2=function*(n,r){let s=n.byteLength;if(s<r){yield n;return}let i=0,d;for(;i<s;)d=i+r,yield n.slice(i,d),i=d},L2=async function*(n,r){for await(const s of B2(n))yield*U2(s,r)},B2=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const r=n.getReader();try{for(;;){const{done:s,value:i}=await r.read();if(s)break;yield i}}finally{await r.cancel()}},sg=(n,r,s,i)=>{const d=L2(n,r);let f=0,m,x=v=>{m||(m=!0,i&&i(v))};return new ReadableStream({async pull(v){try{const{done:g,value:y}=await d.next();if(g){x(),v.close();return}let p=y.byteLength;if(s){let N=f+=p;s(N)}v.enqueue(new Uint8Array(y))}catch(g){throw x(g),g}},cancel(v){return x(v),d.return()}},{highWaterMark:2})},ig=64*1024,{isFunction:Hi}=q,H2=(({Request:n,Response:r})=>({Request:n,Response:r}))(q.global),{ReadableStream:og,TextEncoder:cg}=q.global,ug=(n,...r)=>{try{return!!n(...r)}catch{return!1}},q2=n=>{n=q.merge.call({skipUndefined:!0},H2,n);const{fetch:r,Request:s,Response:i}=n,d=r?Hi(r):typeof fetch=="function",f=Hi(s),m=Hi(i);if(!d)return!1;const x=d&&Hi(og),v=d&&(typeof cg=="function"?(w=>j=>w.encode(j))(new cg):async w=>new Uint8Array(await new s(w).arrayBuffer())),g=f&&x&&ug(()=>{let w=!1;const j=new s(Nt.origin,{body:new og,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!j}),y=m&&x&&ug(()=>q.isReadableStream(new i("").body)),p={stream:y&&(w=>w.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!p[w]&&(p[w]=(j,T)=>{let z=j&&j[w];if(z)return z.call(j);throw new ve(`Response type '${w}' is not supported`,ve.ERR_NOT_SUPPORT,T)})});const N=async w=>{if(w==null)return 0;if(q.isBlob(w))return w.size;if(q.isSpecCompliantForm(w))return(await new s(Nt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(q.isArrayBufferView(w)||q.isArrayBuffer(w))return w.byteLength;if(q.isURLSearchParams(w)&&(w=w+""),q.isString(w))return(await v(w)).byteLength},M=async(w,j)=>{const T=q.toFiniteNumber(w.getContentLength());return T??N(j)};return async w=>{let{url:j,method:T,data:z,signal:_,cancelToken:V,timeout:L,onDownloadProgress:ne,onUploadProgress:I,responseType:ee,headers:$,withCredentials:P="same-origin",fetchOptions:re}=Nx(w),se=r||fetch;ee=ee?(ee+"").toLowerCase():"text";let he=D2([_,V&&V.toAbortSignal()],L),Ae=null;const De=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let Be;try{if(I&&g&&T!=="get"&&T!=="head"&&(Be=await M($,z))!==0){let R=new s(j,{method:"POST",body:z,duplex:"half"}),G;if(q.isFormData(z)&&(G=R.headers.get("content-type"))&&$.setContentType(G),R.body){const[Q,J]=ng(Be,to(lg(I)));z=sg(R.body,ig,Q,J)}}q.isString(P)||(P=P?"include":"omit");const O=f&&"credentials"in s.prototype,Z={...re,signal:he,method:T.toUpperCase(),headers:$.normalize().toJSON(),body:z,duplex:"half",credentials:O?P:void 0};Ae=f&&new s(j,Z);let X=await(f?se(Ae,re):se(j,Z));const xe=y&&(ee==="stream"||ee==="response");if(y&&(ne||xe&&De)){const R={};["status","statusText","headers"].forEach(le=>{R[le]=X[le]});const G=q.toFiniteNumber(X.headers.get("content-length")),[Q,J]=ne&&ng(G,to(lg(ne),!0))||[];X=new i(sg(X.body,ig,Q,()=>{J&&J(),De&&De()}),R)}ee=ee||"text";let ge=await p[q.findKey(p,ee)||"text"](X,w);return!xe&&De&&De(),await new Promise((R,G)=>{Sx(R,G,{data:ge,headers:Gt.from(X.headers),status:X.status,statusText:X.statusText,config:w,request:Ae})})}catch(O){throw De&&De(),O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,w,Ae),{cause:O.cause||O}):ve.from(O,O&&O.code,w,Ae)}}},G2=new Map,jx=n=>{let r=n&&n.env||{};const{fetch:s,Request:i,Response:d}=r,f=[i,d,s];let m=f.length,x=m,v,g,y=G2;for(;x--;)v=f[x],g=y.get(v),g===void 0&&y.set(v,g=x?new Map:q2(r)),y=g;return g};jx();const wd={http:l2,xhr:k2,fetch:{get:jx}};q.forEach(wd,(n,r)=>{if(n){try{Object.defineProperty(n,"name",{value:r})}catch{}Object.defineProperty(n,"adapterName",{value:r})}});const dg=n=>`- ${n}`,Q2=n=>q.isFunction(n)||n===null||n===!1;function V2(n,r){n=q.isArray(n)?n:[n];const{length:s}=n;let i,d;const f={};for(let m=0;m<s;m++){i=n[m];let x;if(d=i,!Q2(i)&&(d=wd[(x=String(i)).toLowerCase()],d===void 0))throw new ve(`Unknown adapter '${x}'`);if(d&&(q.isFunction(d)||(d=d.get(r))))break;f[x||"#"+m]=d}if(!d){const m=Object.entries(f).map(([v,g])=>`adapter ${v} `+(g===!1?"is not supported by the environment":"is not available in the build"));let x=s?m.length>1?`since :
11
+ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let N=An(),M;if(r){let _=typeof r=="string"?lr(r):r;Pe(y==="/"||_.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 "${_.pathname}" was given in the \`location\` prop.`),M=_}else M=N;let w=M.pathname||"/",j=w;if(y!=="/"){let _=y.replace(/^\//,"").split("/");j="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let R=Mg(n,{pathname:j});xa(p||R!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),xa(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.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 z=gb(R&&R.map(_=>Object.assign({},_,{params:Object.assign({},v,_.params),pathname:Wa([y,f.encodeLocation?f.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?y:Wa([y,f.encodeLocation?f.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),m,s,i,d);return r&&z?S.createElement(ps.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...M},navigationType:"POP"}},z):z}function fb(){let n=Sb(),r=P0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.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:",n),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"}},r),s?S.createElement("pre",{style:d},s):null,m)}var mb=S.createElement(fb,null),Gg=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=sb(n.digest);s&&(n=s)}let r=n!==void 0?S.createElement(ya.Provider,{value:this.props.routeContext},S.createElement(od.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(hb,{error:n},r):r}};Gg.contextType=eb;var Au=new WeakMap;function hb({children:n,error:r}){let{basename:s}=S.useContext(Pt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let i=rb(r.digest);if(i){let d=Au.get(r);if(d)throw d;let f=kg(i.location,s);if(zg&&!Au.get(r))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 Au.set(r,m),m}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function pb({routeContext:n,match:r,children:s}){let i=S.useContext(rr);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),S.createElement(ya.Provider,{value:n},s)}function gb(n,r=[],s=null,i=null,d=null){if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let f=n,m=s?.errors;if(m!=null){let y=f.findIndex(p=>p.route.id&&m?.[p.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 x=!1,v=-1;if(s)for(let y=0;y<f.length;y++){let p=f[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(v=y),p.route.id){let{loaderData:N,errors:M}=s,w=p.route.loader&&!N.hasOwnProperty(p.route.id)&&(!M||M[p.route.id]===void 0);if(p.route.lazy||w){x=!0,v>=0?f=f.slice(0,v+1):f=[f[0]];break}}}let g=s&&i?(y,p)=>{i(y,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:I0(s.matches),errorInfo:p})}:void 0;return f.reduceRight((y,p,N)=>{let M,w=!1,j=null,R=null;s&&(M=m&&p.route.id?m[p.route.id]:void 0,j=p.route.errorElement||mb,x&&(v<0&&N===0?(Qg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,R=null):v===N&&(w=!0,R=p.route.hydrateFallbackElement||null)));let z=r.concat(f.slice(0,N+1)),_=()=>{let V;return M?V=j:w?V=R:p.route.Component?V=S.createElement(p.route.Component,null):p.route.element?V=p.route.element:V=y,S.createElement(pb,{match:p,routeContext:{outlet:y,matches:z,isDataRoute:s!=null},children:V})};return s&&(p.route.ErrorBoundary||p.route.errorElement||N===0)?S.createElement(Gg,{location:s.location,revalidation:s.revalidation,component:j,error:M,children:_(),routeContext:{outlet:null,matches:z,isDataRoute:!0},onError:g}):_()},null)}function cd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xb(n){let r=S.useContext(rr);return Pe(r,cd(n)),r}function vb(n){let r=S.useContext(no);return Pe(r,cd(n)),r}function yb(n){let r=S.useContext(ya);return Pe(r,cd(n)),r}function ud(n){let r=yb(n),s=r.matches[r.matches.length-1];return Pe(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function bb(){return ud("useRouteId")}function Sb(){let n=S.useContext(od),r=vb("useRouteError"),s=ud("useRouteError");return n!==void 0?n:r.errors?.[s]}function wb(){let{router:n}=xb("useNavigate"),r=ud("useNavigate"),s=S.useRef(!1);return Hg(()=>{s.current=!0}),S.useCallback(async(d,f={})=>{xa(s.current,Bg),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:r,...f}))},[n,r])}var Lp={};function Qg(n,r,s){!r&&!Lp[n]&&(Lp[n]=!0,xa(!1,s))}S.memo(Nb);function Nb({routes:n,future:r,state:s,onError:i}){return qg(n,void 0,s,i,r)}function Ii({to:n,replace:r,state:s,relative:i}){Pe(sr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=S.useContext(Pt);xa(!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(ya),{pathname:m}=An(),x=On(),v=id(n,sd(f),m,i==="path"),g=JSON.stringify(v);return S.useEffect(()=>{x(JSON.parse(g),{replace:r,state:s,relative:i})},[x,g,i,r,s]),null}function jb(n){return ub(n.context)}function $t(n){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 Eb({basename:n="/",children:r=null,location:s,navigationType:i="POP",navigator:d,static:f=!1,unstable_useTransitions:m}){Pe(!sr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),v=S.useMemo(()=>({basename:x,navigator:d,static:f,unstable_useTransitions:m,future:{}}),[x,d,f,m]);typeof s=="string"&&(s=lr(s));let{pathname:g="/",search:y="",hash:p="",state:N=null,key:M="default"}=s,w=S.useMemo(()=>{let j=en(g,x);return j==null?null:{location:{pathname:j,search:y,hash:p,state:N,key:M},navigationType:i}},[x,g,y,p,N,M,i]);return xa(w!=null,`<Router basename="${x}"> is not able to match the URL "${g}${y}${p}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:S.createElement(Pt.Provider,{value:v},S.createElement(ps.Provider,{children:r,value:w}))}function Tb({children:n,location:r}){return db(Vu(n),r)}function Vu(n,r=[]){let s=[];return S.Children.forEach(n,(i,d)=>{if(!S.isValidElement(i))return;let f=[...r,d];if(i.type===S.Fragment){s.push.apply(s,Vu(i.props.children,f));return}Pe(i.type===$t,`[${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=Vu(i.props.children,f)),s.push(m)}),s}var Xi="get",Fi="application/x-www-form-urlencoded";function lo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Rb(n){return lo(n)&&n.tagName.toLowerCase()==="button"}function Cb(n){return lo(n)&&n.tagName.toLowerCase()==="form"}function _b(n){return lo(n)&&n.tagName.toLowerCase()==="input"}function Mb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Ab(n,r){return n.button===0&&(!r||r==="_self")&&!Mb(n)}var Ui=null;function Ob(){if(Ui===null)try{new FormData(document.createElement("form"),0),Ui=!1}catch{Ui=!0}return Ui}var zb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ou(n){return n!=null&&!zb.has(n)?(xa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fi}"`),null):n}function kb(n,r){let s,i,d,f,m;if(Cb(n)){let x=n.getAttribute("action");i=x?en(x,r):null,s=n.getAttribute("method")||Xi,d=Ou(n.getAttribute("enctype"))||Fi,f=new FormData(n)}else if(Rb(n)||_b(n)&&(n.type==="submit"||n.type==="image")){let x=n.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||x.getAttribute("action");if(i=v?en(v,r):null,s=n.getAttribute("formmethod")||x.getAttribute("method")||Xi,d=Ou(n.getAttribute("formenctype"))||Ou(x.getAttribute("enctype"))||Fi,f=new FormData(x,n),!Ob()){let{name:g,type:y,value:p}=n;if(y==="image"){let N=g?`${g}.`:"";f.append(`${N}x`,"0"),f.append(`${N}y`,"0")}else g&&f.append(g,p)}}else{if(lo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Xi,i=null,d=Fi,m=n}return f&&d==="text/plain"&&(m=f,f=void 0),{action:i,method:s.toLowerCase(),encType:d,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dd(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Db(n,r,s,i){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${i}`:d.pathname=`${d.pathname}.${i}`:d.pathname==="/"?d.pathname=`_root.${i}`:r&&en(d.pathname,r)==="/"?d.pathname=`${r.replace(/\/$/,"")}/_root.${i}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${i}`,d}async function Ub(n,r){if(n.id in r)return r[n.id];try{let s=await import(n.module);return r[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Lb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Bb(n,r,s){let i=await Promise.all(n.map(async d=>{let f=r.routes[d.route.id];if(f){let m=await Ub(f,s);return m.links?m.links():[]}return[]}));return Qb(i.flat(1).filter(Lb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Bp(n,r,s,i,d,f){let m=(v,g)=>s[g]?v.route.id!==s[g].route.id:!0,x=(v,g)=>s[g].pathname!==v.pathname||s[g].route.path?.endsWith("*")&&s[g].params["*"]!==v.params["*"];return f==="assets"?r.filter((v,g)=>m(v,g)||x(v,g)):f==="data"?r.filter((v,g)=>{let y=i.routes[v.route.id];if(!y||!y.hasLoader)return!1;if(m(v,g)||x(v,g))return!0;if(v.route.shouldRevalidate){let p=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Hb(n,r,{includeHydrateFallback:s}={}){return qb(n.map(i=>{let d=r.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)),s&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function qb(n){return[...new Set(n)]}function Gb(n){let r={},s=Object.keys(n).sort();for(let i of s)r[i]=n[i];return r}function Qb(n,r){let s=new Set;return new Set(r),n.reduce((i,d)=>{let f=JSON.stringify(Gb(d));return s.has(f)||(s.add(f),i.push({key:f,link:d})),i},[])}function Vg(){let n=S.useContext(rr);return dd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Vb(){let n=S.useContext(no);return dd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var fd=S.createContext(void 0);fd.displayName="FrameworkContext";function Yg(){let n=S.useContext(fd);return dd(n,"You must render this element inside a <HydratedRouter> element"),n}function Yb(n,r){let s=S.useContext(fd),[i,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:x,onBlur:v,onMouseEnter:g,onMouseLeave:y,onTouchStart:p}=r,N=S.useRef(null);S.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let j=z=>{z.forEach(_=>{m(_.isIntersecting)})},R=new IntersectionObserver(j,{threshold:.5});return N.current&&R.observe(N.current),()=>{R.disconnect()}}},[n]),S.useEffect(()=>{if(i){let j=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(j)}}},[i]);let M=()=>{d(!0)},w=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,N,{}]:[f,N,{onFocus:is(x,M),onBlur:is(v,w),onMouseEnter:is(g,M),onMouseLeave:is(y,w),onTouchStart:is(p,M)}]:[!1,N,{}]}function is(n,r){return s=>{n&&n(s),s.defaultPrevented||r(s)}}function Xb({page:n,...r}){let{router:s}=Vg(),i=S.useMemo(()=>Mg(s.routes,n,s.basename),[s.routes,n,s.basename]);return i?S.createElement(Kb,{page:n,matches:i,...r}):null}function Fb(n){let{manifest:r,routeModules:s}=Yg(),[i,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return Bb(n,r,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,r,s]),i}function Kb({page:n,matches:r,...s}){let i=An(),{future:d,manifest:f,routeModules:m}=Yg(),{basename:x}=Vg(),{loaderData:v,matches:g}=Vb(),y=S.useMemo(()=>Bp(n,r,g,f,i,"data"),[n,r,g,f,i]),p=S.useMemo(()=>Bp(n,r,g,f,i,"assets"),[n,r,g,f,i]),N=S.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let j=new Set,R=!1;if(r.forEach(_=>{let V=f.routes[_.route.id];!V||!V.hasLoader||(!y.some(L=>L.route.id===_.route.id)&&_.route.id in v&&m[_.route.id]?.shouldRevalidate||V.hasClientLoader?R=!0:j.add(_.route.id))}),j.size===0)return[];let z=Db(n,x,d.unstable_trailingSlashAwareDataRequests,"data");return R&&j.size>0&&z.searchParams.set("_routes",r.filter(_=>j.has(_.route.id)).map(_=>_.route.id).join(",")),[z.pathname+z.search]},[x,d.unstable_trailingSlashAwareDataRequests,v,i,f,y,r,n,m]),M=S.useMemo(()=>Hb(p,f),[p,f]),w=Fb(p);return S.createElement(S.Fragment,null,N.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...s})),M.map(j=>S.createElement("link",{key:j,rel:"modulepreload",href:j,...s})),w.map(({key:j,link:R})=>S.createElement("link",{key:j,nonce:s.nonce,...R,crossOrigin:R.crossOrigin??s.crossOrigin})))}function Zb(...n){return r=>{n.forEach(s=>{typeof s=="function"?s(r):s!=null&&(s.current=r)})}}var Jb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Jb&&(window.__reactRouterVersion="7.13.0")}catch{}function $b({basename:n,children:r,unstable_useTransitions:s,window:i}){let d=S.useRef();d.current==null&&(d.current=R0({window:i,v5Compat:!0}));let f=d.current,[m,x]=S.useState({action:f.action,location:f.location}),v=S.useCallback(g=>{s===!1?x(g):S.startTransition(()=>x(g))},[s]);return S.useLayoutEffect(()=>f.listen(v),[f,v]),S.createElement(Eb,{basename:n,children:r,location:m.location,navigationType:m.action,navigator:f,unstable_useTransitions:s})}var Xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,md=S.forwardRef(function({onClick:r,discover:s="render",prefetch:i="none",relative:d,reloadDocument:f,replace:m,state:x,target:v,to:g,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:N,...M},w){let{basename:j,unstable_useTransitions:R}=S.useContext(Pt),z=typeof g=="string"&&Xg.test(g),_=kg(g,j);g=_.to;let V=ib(g,{relative:d}),[L,ne,I]=Yb(i,M),ee=Wb(g,{replace:m,state:x,target:v,preventScrollReset:y,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:N,unstable_useTransitions:R});function $(re){r&&r(re),re.defaultPrevented||ee(re)}let P=S.createElement("a",{...M,...I,href:_.absoluteURL||V,onClick:_.isExternal||f?r:$,ref:Zb(w,ne),target:v,"data-discover":!z&&s==="render"?"true":void 0});return L&&!z?S.createElement(S.Fragment,null,P,S.createElement(Xb,{page:V})):P});md.displayName="Link";var Fg=S.forwardRef(function({"aria-current":r="page",caseSensitive:s=!1,className:i="",end:d=!1,style:f,to:m,viewTransition:x,children:v,...g},y){let p=gs(m,{relative:g.relative}),N=An(),M=S.useContext(no),{navigator:w,basename:j}=S.useContext(Pt),R=M!=null&&l1(p)&&x===!0,z=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,_=N.pathname,V=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;s||(_=_.toLowerCase(),V=V?V.toLowerCase():null,z=z.toLowerCase()),V&&j&&(V=en(V,j)||V);const L=z!=="/"&&z.endsWith("/")?z.length-1:z.length;let ne=_===z||!d&&_.startsWith(z)&&_.charAt(L)==="/",I=V!=null&&(V===z||!d&&V.startsWith(z)&&V.charAt(z.length)==="/"),ee={isActive:ne,isPending:I,isTransitioning:R},$=ne?r:void 0,P;typeof i=="function"?P=i(ee):P=[i,ne?"active":null,I?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let re=typeof f=="function"?f(ee):f;return S.createElement(md,{...g,"aria-current":$,className:P,ref:y,style:re,to:m,viewTransition:x},typeof v=="function"?v(ee):v)});Fg.displayName="NavLink";var Pb=S.forwardRef(({discover:n="render",fetcherKey:r,navigate:s,reloadDocument:i,replace:d,state:f,method:m=Xi,action:x,onSubmit:v,relative:g,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:N,...M},w)=>{let{unstable_useTransitions:j}=S.useContext(Pt),R=a1(),z=n1(x,{relative:g}),_=m.toLowerCase()==="get"?"get":"post",V=typeof x=="string"&&Xg.test(x),L=ne=>{if(v&&v(ne),ne.defaultPrevented)return;ne.preventDefault();let I=ne.nativeEvent.submitter,ee=I?.getAttribute("formmethod")||m,$=()=>R(I||ne.currentTarget,{fetcherKey:r,method:ee,navigate:s,replace:d,state:f,relative:g,preventScrollReset:y,viewTransition:p,unstable_defaultShouldRevalidate:N});j&&s!==!1?S.startTransition(()=>$()):$()};return S.createElement("form",{ref:w,method:_,action:z,onSubmit:i?v:L,...M,"data-discover":!V&&n==="render"?"true":void 0})});Pb.displayName="Form";function Ib(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kg(n){let r=S.useContext(rr);return Pe(r,Ib(n)),r}function Wb(n,{target:r,replace:s,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:x,unstable_useTransitions:v}={}){let g=On(),y=An(),p=gs(n,{relative:f});return S.useCallback(N=>{if(Ab(N,r)){N.preventDefault();let M=s!==void 0?s:fs(y)===fs(p),w=()=>g(n,{replace:M,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:x});v?S.startTransition(()=>w()):w()}},[y,g,p,s,i,r,n,d,f,m,x,v])}var e1=0,t1=()=>`__${String(++e1)}__`;function a1(){let{router:n}=Kg("useSubmit"),{basename:r}=S.useContext(Pt),s=bb(),i=n.fetch,d=n.navigate;return S.useCallback(async(f,m={})=>{let{action:x,method:v,encType:g,formData:y,body:p}=kb(f,r);if(m.navigate===!1){let N=m.fetcherKey||t1();await i(N,s,m.action||x,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:p,formMethod:m.method||v,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||x,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:p,formMethod:m.method||v,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[i,d,r,s])}function n1(n,{relative:r}={}){let{basename:s}=S.useContext(Pt),i=S.useContext(ya);Pe(i,"useFormAction must be used inside a RouteContext");let[d]=i.matches.slice(-1),f={...gs(n||".",{relative:r})},m=An();if(n==null){f.search=m.search;let x=new URLSearchParams(f.search),v=x.getAll("index");if(v.some(y=>y==="")){x.delete("index"),v.filter(p=>p).forEach(p=>x.append("index",p));let y=x.toString();f.search=y?`?${y}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:Wa([s,f.pathname])),fs(f)}function l1(n,{relative:r}={}){let s=S.useContext(Ug);Pe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Kg("useViewTransitionState"),d=gs(n,{relative:r});if(!s.isTransitioning)return!1;let f=en(s.currentLocation.pathname,i)||s.currentLocation.pathname,m=en(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Pi(d.pathname,m)!=null||Pi(d.pathname,f)!=null}var r1=_g();const s1=Cg(r1);var ir=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},i1={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},o1=class{#e=i1;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,r){return this.#e.setTimeout(n,r)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,r){return this.#e.setInterval(n,r)}clearInterval(n){this.#e.clearInterval(n)}},ll=new o1;function c1(n){setTimeout(n,0)}var il=typeof window>"u"||"Deno"in globalThis;function Ct(){}function u1(n,r){return typeof n=="function"?n(r):n}function Yu(n){return typeof n=="number"&&n>=0&&n!==1/0}function Zg(n,r){return Math.max(n+(r||0)-Date.now(),0)}function Mn(n,r){return typeof n=="function"?n(r):n}function oa(n,r){return typeof n=="function"?n(r):n}function Hp(n,r){const{type:s="all",exact:i,fetchStatus:d,predicate:f,queryKey:m,stale:x}=n;if(m){if(i){if(r.queryHash!==hd(m,r.options))return!1}else if(!ms(r.queryKey,m))return!1}if(s!=="all"){const v=r.isActive();if(s==="active"&&!v||s==="inactive"&&v)return!1}return!(typeof x=="boolean"&&r.isStale()!==x||d&&d!==r.state.fetchStatus||f&&!f(r))}function qp(n,r){const{exact:s,status:i,predicate:d,mutationKey:f}=n;if(f){if(!r.options.mutationKey)return!1;if(s){if(ol(r.options.mutationKey)!==ol(f))return!1}else if(!ms(r.options.mutationKey,f))return!1}return!(i&&r.state.status!==i||d&&!d(r))}function hd(n,r){return(r?.queryKeyHashFn||ol)(n)}function ol(n){return JSON.stringify(n,(r,s)=>Xu(s)?Object.keys(s).sort().reduce((i,d)=>(i[d]=s[d],i),{}):s)}function ms(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>ms(n[s],r[s])):!1}var d1=Object.prototype.hasOwnProperty;function Jg(n,r,s=0){if(n===r)return n;if(s>500)return r;const i=Gp(n)&&Gp(r);if(!i&&!(Xu(n)&&Xu(r)))return r;const f=(i?n:Object.keys(n)).length,m=i?r:Object.keys(r),x=m.length,v=i?new Array(x):{};let g=0;for(let y=0;y<x;y++){const p=i?y:m[y],N=n[p],M=r[p];if(N===M){v[p]=N,(i?y<f:d1.call(n,p))&&g++;continue}if(N===null||M===null||typeof N!="object"||typeof M!="object"){v[p]=M;continue}const w=Jg(N,M,s+1);v[p]=w,w===N&&g++}return f===x&&g===f?n:v}function Wi(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const s in n)if(n[s]!==r[s])return!1;return!0}function Gp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Xu(n){if(!Qp(n))return!1;const r=n.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!Qp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Qp(n){return Object.prototype.toString.call(n)==="[object Object]"}function f1(n){return new Promise(r=>{ll.setTimeout(r,n)})}function Fu(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?Jg(n,r):r}function m1(n,r,s=0){const i=[...n,r];return s&&i.length>s?i.slice(1):i}function h1(n,r,s=0){const i=[r,...n];return s&&i.length>s?i.slice(0,-1):i}var pd=Symbol();function $g(n,r){return!n.queryFn&&r?.initialPromise?()=>r.initialPromise:!n.queryFn||n.queryFn===pd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function gd(n,r){return typeof n=="function"?n(...r):!!n}function p1(n,r,s){let i=!1,d;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(d??=r(),i||(i=!0,d.aborted?s():d.addEventListener("abort",s,{once:!0})),d)}),n}var g1=class extends ir{#e;#t;#a;constructor(){super(),this.#a=n=>{if(!il&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},xd=new g1;function Ku(){let n,r;const s=new Promise((d,f)=>{n=d,r=f});s.status="pending",s.catch(()=>{});function i(d){Object.assign(s,d),delete s.resolve,delete s.reject}return s.resolve=d=>{i({status:"fulfilled",value:d}),n(d)},s.reject=d=>{i({status:"rejected",reason:d}),r(d)},s}var x1=c1;function v1(){let n=[],r=0,s=x=>{x()},i=x=>{x()},d=x1;const f=x=>{r?n.push(x):d(()=>{s(x)})},m=()=>{const x=n;n=[],x.length&&d(()=>{i(()=>{x.forEach(v=>{s(v)})})})};return{batch:x=>{let v;r++;try{v=x()}finally{r--,r||m()}return v},batchCalls:x=>(...v)=>{f(()=>{x(...v)})},schedule:f,setNotifyFunction:x=>{s=x},setBatchNotifyFunction:x=>{i=x},setScheduler:x=>{d=x}}}var dt=v1(),y1=class extends ir{#e=!0;#t;#a;constructor(){super(),this.#a=n=>{if(!il&&window.addEventListener){const r=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(s=>{s(n)}))}isOnline(){return this.#e}},eo=new y1;function b1(n){return Math.min(1e3*2**n,3e4)}function Pg(n){return(n??"online")==="online"?eo.isOnline():!0}var Zu=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Ig(n){let r=!1,s=0,i;const d=Ku(),f=()=>d.status!=="pending",m=j=>{if(!f()){const R=new Zu(j);N(R),n.onCancel?.(R)}},x=()=>{r=!0},v=()=>{r=!1},g=()=>xd.isFocused()&&(n.networkMode==="always"||eo.isOnline())&&n.canRun(),y=()=>Pg(n.networkMode)&&n.canRun(),p=j=>{f()||(i?.(),d.resolve(j))},N=j=>{f()||(i?.(),d.reject(j))},M=()=>new Promise(j=>{i=R=>{(f()||g())&&j(R)},n.onPause?.()}).then(()=>{i=void 0,f()||n.onContinue?.()}),w=()=>{if(f())return;let j;const R=s===0?n.initialPromise:void 0;try{j=R??n.fn()}catch(z){j=Promise.reject(z)}Promise.resolve(j).then(p).catch(z=>{if(f())return;const _=n.retry??(il?0:3),V=n.retryDelay??b1,L=typeof V=="function"?V(s,z):V,ne=_===!0||typeof _=="number"&&s<_||typeof _=="function"&&_(s,z);if(r||!ne){N(z);return}s++,n.onFail?.(s,z),f1(L).then(()=>g()?void 0:M()).then(()=>{r?N(z):w()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(i?.(),d),cancelRetry:x,continueRetry:v,canStart:y,start:()=>(y()?w():M().then(w),d)}}var Wg=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yu(this.gcTime)&&(this.#e=ll.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(il?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ll.clearTimeout(this.#e),this.#e=void 0)}},S1=class extends Wg{#e;#t;#a;#l;#n;#s;#i;constructor(n){super(),this.#i=!1,this.#s=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#l=n.client,this.#a=this.#l.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=Yp(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(n){if(this.options={...this.#s,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Yp(this.options);r.data!==void 0&&(this.setState(Vp(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(n,r){const s=Fu(this.state.data,n,this.options);return this.#r({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(n,r){this.#r({type:"setState",state:n,setStateOptions:r})}cancel(n){const r=this.#n?.promise;return this.#n?.cancel(n),r?r.then(Ct).catch(Ct):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>oa(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Mn(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!Zg(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(this.#n&&(this.#i?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(n,r){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(n&&this.setOptions(n),!this.options.queryFn){const x=this.observers.find(v=>v.options.queryFn);x&&this.setOptions(x.options)}const s=new AbortController,i=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(this.#i=!0,s.signal)})},d=()=>{const x=$g(this.options,r),g=(()=>{const y={client:this.#l,queryKey:this.queryKey,meta:this.meta};return i(y),y})();return this.#i=!1,this.options.persister?this.options.persister(x,g,this):x(g)},m=(()=>{const x={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:d};return i(x),x})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#r({type:"fetch",meta:m.fetchOptions?.meta}),this.#n=Ig({initialPromise:r?.initialPromise,fn:m.fetchFn,onCancel:x=>{x instanceof Zu&&x.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(x,v)=>{this.#r({type:"failed",failureCount:x,error:v})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const x=await this.#n.start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),this.#a.config.onSuccess?.(x,this),this.#a.config.onSettled?.(x,this.state.error,this),x}catch(x){if(x instanceof Zu){if(x.silent)return this.#n.promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw this.#r({type:"error",error:x}),this.#a.config.onError?.(x,this),this.#a.config.onSettled?.(this.state.data,x,this),x}finally{this.scheduleGc()}}#r(n){const r=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ex(s.data,this.options),fetchMeta:n.meta??null};case"success":const i={...s,...Vp(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?i:void 0,i;case"error":const d=n.error;return{...s,error:d,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=r(this.state),dt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:n})})}};function ex(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pg(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Vp(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Yp(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,s=r!==void 0,i=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var w1=class extends ir{constructor(n,r){super(),this.options=r,this.#e=n,this.#r=null,this.#i=Ku(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#a=void 0;#l=void 0;#n;#s;#i;#r;#p;#f;#m;#c;#u;#o;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Xp(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ju(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ju(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const r=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof oa(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),r._defaulted&&!Wi(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Fp(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),i&&(this.#t!==s||oa(this.options.enabled,this.#t)!==oa(r.enabled,this.#t)||Mn(this.options.staleTime,this.#t)!==Mn(r.staleTime,this.#t))&&this.#g();const d=this.#x();i&&(this.#t!==s||oa(this.options.enabled,this.#t)!==oa(r.enabled,this.#t)||d!==this.#o)&&this.#v(d)}getOptimisticResult(n){const r=this.#e.getQueryCache().build(this.#e,n),s=this.createResult(r,n);return j1(this,s)&&(this.#l=s,this.#s=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#l}trackResult(n,r){return new Proxy(n,{get:(s,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(n){this.#h.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=this.#e.defaultQueryOptions(n),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(n){return this.#d({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#l))}#d(n){this.#w();let r=this.#t.fetch(this.options,n);return n?.throwOnError||(r=r.catch(Ct)),r}#g(){this.#b();const n=Mn(this.options.staleTime,this.#t);if(il||this.#l.isStale||!Yu(n))return;const s=Zg(this.#l.dataUpdatedAt,n)+1;this.#c=ll.setTimeout(()=>{this.#l.isStale||this.updateResult()},s)}#x(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#o=n,!(il||oa(this.options.enabled,this.#t)===!1||!Yu(this.#o)||this.#o===0)&&(this.#u=ll.setInterval(()=>{(this.options.refetchIntervalInBackground||xd.isFocused())&&this.#d()},this.#o))}#y(){this.#g(),this.#v(this.#x())}#b(){this.#c&&(ll.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(ll.clearInterval(this.#u),this.#u=void 0)}createResult(n,r){const s=this.#t,i=this.options,d=this.#l,f=this.#n,m=this.#s,v=n!==s?n.state:this.#a,{state:g}=n;let y={...g},p=!1,N;if(r._optimisticResults){const $=this.hasListeners(),P=!$&&Xp(n,r),re=$&&Fp(n,s,r,i);(P||re)&&(y={...y,...ex(g.data,n.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:M,errorUpdatedAt:w,status:j}=y;N=y.data;let R=!1;if(r.placeholderData!==void 0&&N===void 0&&j==="pending"){let $;d?.isPlaceholderData&&r.placeholderData===m?.placeholderData?($=d.data,R=!0):$=typeof r.placeholderData=="function"?r.placeholderData(this.#m?.state.data,this.#m):r.placeholderData,$!==void 0&&(j="success",N=Fu(d?.data,$,r),p=!0)}if(r.select&&N!==void 0&&!R)if(d&&N===f?.data&&r.select===this.#p)N=this.#f;else try{this.#p=r.select,N=r.select(N),N=Fu(d?.data,N,r),this.#f=N,this.#r=null}catch($){this.#r=$}this.#r&&(M=this.#r,N=this.#f,w=Date.now(),j="error");const z=y.fetchStatus==="fetching",_=j==="pending",V=j==="error",L=_&&z,ne=N!==void 0,ee={status:j,fetchStatus:y.fetchStatus,isPending:_,isSuccess:j==="success",isError:V,isInitialLoading:L,isLoading:L,data:N,dataUpdatedAt:y.dataUpdatedAt,error:M,errorUpdatedAt:w,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>v.dataUpdateCount||y.errorUpdateCount>v.errorUpdateCount,isFetching:z,isRefetching:z&&!_,isLoadingError:V&&!ne,isPaused:y.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:V&&ne,isStale:vd(n,r),refetch:this.refetch,promise:this.#i,isEnabled:oa(r.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const $=ee.data!==void 0,P=ee.status==="error"&&!$,re=Ae=>{P?Ae.reject(ee.error):$&&Ae.resolve(ee.data)},se=()=>{const Ae=this.#i=ee.promise=Ku();re(Ae)},he=this.#i;switch(he.status){case"pending":n.queryHash===s.queryHash&&re(he);break;case"fulfilled":(P||ee.data!==he.value)&&se();break;case"rejected":(!P||ee.error!==he.reason)&&se();break}}return ee}updateResult(){const n=this.#l,r=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#s=this.options,this.#n.data!==void 0&&(this.#m=this.#t),Wi(r,n))return;this.#l=r;const s=()=>{if(!n)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.#l).some(m=>{const x=m;return this.#l[x]!==n[x]&&f.has(x)})};this.#N({listeners:s()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const r=this.#t;this.#t=n,this.#a=n.state,this.hasListeners()&&(r?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#N(n){dt.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(this.#l)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function N1(n,r){return oa(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function Xp(n,r){return N1(n,r)||n.state.data!==void 0&&Ju(n,r,r.refetchOnMount)}function Ju(n,r,s){if(oa(r.enabled,n)!==!1&&Mn(r.staleTime,n)!=="static"){const i=typeof s=="function"?s(n):s;return i==="always"||i!==!1&&vd(n,r)}return!1}function Fp(n,r,s,i){return(n!==r||oa(i.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&vd(n,s)}function vd(n,r){return oa(r.enabled,n)!==!1&&n.isStaleByTime(Mn(r.staleTime,n))}function j1(n,r){return!Wi(n.getCurrentResult(),r)}function Kp(n){return{onFetch:(r,s)=>{const i=r.options,d=r.fetchOptions?.meta?.fetchMore?.direction,f=r.state.data?.pages||[],m=r.state.data?.pageParams||[];let x={pages:[],pageParams:[]},v=0;const g=async()=>{let y=!1;const p=w=>{p1(w,()=>r.signal,()=>y=!0)},N=$g(r.options,r.fetchOptions),M=async(w,j,R)=>{if(y)return Promise.reject();if(j==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const I={client:r.client,queryKey:r.queryKey,pageParam:j,direction:R?"backward":"forward",meta:r.options.meta};return p(I),I})(),V=await N(_),{maxPages:L}=r.options,ne=R?h1:m1;return{pages:ne(w.pages,V,L),pageParams:ne(w.pageParams,j,L)}};if(d&&f.length){const w=d==="backward",j=w?E1:Zp,R={pages:f,pageParams:m},z=j(i,R);x=await M(R,z,w)}else{const w=n??f.length;do{const j=v===0?m[0]??i.initialPageParam:Zp(i,x);if(v>0&&j==null)break;x=await M(x,j),v++}while(v<w)}return x};r.options.persister?r.fetchFn=()=>r.options.persister?.(g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=g}}}function Zp(n,{pages:r,pageParams:s}){const i=r.length-1;return r.length>0?n.getNextPageParam(r[i],r,s[i],s):void 0}function E1(n,{pages:r,pageParams:s}){return r.length>0?n.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var T1=class extends Wg{#e;#t;#a;#l;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#a=n.mutationCache,this.#t=[],this.state=n.state||tx(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(r=>r!==n),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(n){const r=()=>{this.#n({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=Ig({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(f,m)=>{this.#n({type:"failed",failureCount:f,error:m})},onPause:()=>{this.#n({type:"pause"})},onContinue:r,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.#l.canStart();try{if(i)r();else{this.#n({type:"pending",variables:n,isPaused:d}),this.#a.config.onMutate&&await this.#a.config.onMutate(n,this,s);const m=await this.options.onMutate?.(n,s);m!==this.state.context&&this.#n({type:"pending",context:m,variables:n,isPaused:d})}const f=await this.#l.start();return await this.#a.config.onSuccess?.(f,n,this.state.context,this,s),await this.options.onSuccess?.(f,n,this.state.context,s),await this.#a.config.onSettled?.(f,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(f,null,n,this.state.context,s),this.#n({type:"success",data:f}),f}catch(f){try{await this.#a.config.onError?.(f,n,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onError?.(f,n,this.state.context,s)}catch(m){Promise.reject(m)}try{await this.#a.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,s)}catch(m){Promise.reject(m)}throw this.#n({type:"error",error:f}),f}finally{this.#a.runNext(this)}}#n(n){const r=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=r(this.state),dt.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(n)}),this.#a.notify({mutation:this,type:"updated",action:n})})}};function tx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var R1=class extends ir{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(n,r,s){const i=new T1({client:n,mutationCache:this,mutationId:++this.#a,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){this.#e.add(n);const r=Li(n);if(typeof r=="string"){const s=this.#t.get(r);s?s.push(n):this.#t.set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const r=Li(n);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const i=s.indexOf(n);i!==-1&&s.splice(i,1)}else s[0]===n&&this.#t.delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=Li(n);if(typeof r=="string"){const i=this.#t.get(r)?.find(d=>d.state.status==="pending");return!i||i===n}else return!0}runNext(n){const r=Li(n);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==n&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){dt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const r={exact:!0,...n};return this.getAll().find(s=>qp(r,s))}findAll(n={}){return this.getAll().filter(r=>qp(n,r))}notify(n){dt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return dt.batch(()=>Promise.all(n.map(r=>r.continue().catch(Ct))))}};function Li(n){return n.options.scope?.id}var C1=class extends ir{#e;#t=void 0;#a;#l;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),Wi(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),s?.mutationKey&&this.options.mutationKey&&ol(s.mutationKey)!==ol(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(r){this.#n(),this.#s(r)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#n(),this.#s()}mutate(r,s){return this.#l=s,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(r)}#n(){const r=this.#a?.state??tx();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#s(r){dt.batch(()=>{if(this.#l&&this.hasListeners()){const s=this.#t.variables,i=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#l.onSuccess?.(r.data,s,i,d)}catch(f){Promise.reject(f)}try{this.#l.onSettled?.(r.data,null,s,i,d)}catch(f){Promise.reject(f)}}else if(r?.type==="error"){try{this.#l.onError?.(r.error,s,i,d)}catch(f){Promise.reject(f)}try{this.#l.onSettled?.(void 0,r.error,s,i,d)}catch(f){Promise.reject(f)}}}this.listeners.forEach(s=>{s(this.#t)})})}},_1=class extends ir{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,r,s){const i=r.queryKey,d=r.queryHash??hd(i,r);let f=this.get(d);return f||(f=new S1({client:n,queryKey:i,queryHash:d,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=this.#e.get(n.queryHash);r&&(n.destroy(),r===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){dt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Hp(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>Hp(n,s)):r}notify(n){dt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},M1=class{#e;#t;#a;#l;#n;#s;#i;#r;constructor(n={}){this.#e=n.queryCache||new _1,this.#t=n.mutationCache||new R1,this.#a=n.defaultOptions||{},this.#l=new Map,this.#n=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=xd.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=eo.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#i?.(),this.#i=void 0,this.#r?.(),this.#r=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),s=this.#e.build(this,r),i=s.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(Mn(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:r,state:s})=>{const i=s.data;return[r,i]})}setQueryData(n,r,s){const i=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(i.queryHash)?.state.data,m=u1(r,f);if(m!==void 0)return this.#e.build(this,i).setData(m,{...s,manual:!0})}setQueriesData(n,r,s){return dt.batch(()=>this.#e.findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,r,s)]))}getQueryState(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state}removeQueries(n){const r=this.#e;dt.batch(()=>{r.findAll(n).forEach(s=>{r.remove(s)})})}resetQueries(n,r){const s=this.#e;return dt.batch(()=>(s.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const s={revert:!0,...r},i=dt.batch(()=>this.#e.findAll(n).map(d=>d.cancel(s)));return Promise.all(i).then(Ct).catch(Ct)}invalidateQueries(n,r={}){return dt.batch(()=>(this.#e.findAll(n).forEach(s=>{s.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},r)))}refetchQueries(n,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},i=dt.batch(()=>this.#e.findAll(n).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let f=d.fetch(void 0,s);return s.throwOnError||(f=f.catch(Ct)),d.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(i).then(Ct)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const s=this.#e.build(this,r);return s.isStaleByTime(Mn(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ct).catch(Ct)}fetchInfiniteQuery(n){return n.behavior=Kp(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ct).catch(Ct)}ensureInfiniteQueryData(n){return n.behavior=Kp(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return eo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(n){this.#a=n}setQueryDefaults(n,r){this.#l.set(ol(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...this.#l.values()],s={};return r.forEach(i=>{ms(n,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(n,r){this.#n.set(ol(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...this.#n.values()],s={};return r.forEach(i=>{ms(n,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const r={...this.#a.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=hd(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===pd&&(r.enabled=!1),r}defaultMutationOptions(n){return n?._defaulted?n:{...this.#a.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ax=S.createContext(void 0),ua=n=>{const r=S.useContext(ax);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},A1=({client:n,children:r})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(ax.Provider,{value:n,children:r})),nx=S.createContext(!1),O1=()=>S.useContext(nx);nx.Provider;function z1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var k1=S.createContext(z1()),D1=()=>S.useContext(k1),U1=(n,r,s)=>{const i=s?.state.error&&typeof n.throwOnError=="function"?gd(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||i)&&(r.isReset()||(n.retryOnMount=!1))},L1=n=>{S.useEffect(()=>{n.clearReset()},[n])},B1=({result:n,errorResetBoundary:r,throwOnError:s,query:i,suspense:d})=>n.isError&&!r.isReset()&&!n.isFetching&&i&&(d&&n.data===void 0||gd(s,[n.error,i])),H1=n=>{if(n.suspense){const s=d=>d==="static"?d:Math.max(d??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...d)=>s(i(...d)):s(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},q1=(n,r)=>n.isLoading&&n.isFetching&&!r,G1=(n,r)=>n?.suspense&&r.isPending,Jp=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function Q1(n,r,s){const i=O1(),d=D1(),f=ua(),m=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(m);const x=f.getQueryCache().get(m.queryHash);m._optimisticResults=i?"isRestoring":"optimistic",H1(m),U1(m,d,x),L1(d);const v=!f.getQueryCache().get(m.queryHash),[g]=S.useState(()=>new r(f,m)),y=g.getOptimisticResult(m),p=!i&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const M=p?g.subscribe(dt.batchCalls(N)):Ct;return g.updateResult(),M},[g,p]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),S.useEffect(()=>{g.setOptions(m)},[m,g]),G1(m,y))throw Jp(m,g,d);if(B1({result:y,errorResetBoundary:d,throwOnError:m.throwOnError,query:x,suspense:m.suspense}))throw y.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(m,y),m.experimental_prefetchInRender&&!il&&q1(y,i)&&(v?Jp(m,g,d):x?.promise)?.catch(Ct).finally(()=>{g.updateResult()}),m.notifyOnChangeProps?y:g.trackResult(y)}function Oa(n,r){return Q1(n,w1)}function ba(n,r){const s=ua(),[i]=S.useState(()=>new C1(s,n));S.useEffect(()=>{i.setOptions(n)},[i,n]);const d=S.useSyncExternalStore(S.useCallback(m=>i.subscribe(dt.batchCalls(m)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),f=S.useCallback((m,x)=>{i.mutate(m,x).catch(Ct)},[i]);if(d.error&&gd(i.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:f,mutateAsync:d.mutate}}function V1(n){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r.appendChild(s),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n))}const Y1=n=>{switch(n){case"success":return K1;case"info":return J1;case"warning":return Z1;case"error":return $1;default:return null}},X1=Array(12).fill(0),F1=({visible:n,className:r})=>te.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},te.createElement("div",{className:"sonner-spinner"},X1.map((s,i)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),K1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),Z1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.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"})),J1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),$1=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.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"})),P1=te.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"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),I1=()=>{const[n,r]=te.useState(document.hidden);return te.useEffect(()=>{const s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n};let $u=1;class W1{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const s=this.subscribers.indexOf(r);this.subscribers.splice(s,1)}),this.publish=r=>{this.subscribers.forEach(s=>s(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var s;const{message:i,...d}=r,f=typeof r?.id=="number"||((s=r.id)==null?void 0:s.length)>0?r.id:$u++,m=this.toasts.find(v=>v.id===f),x=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),m?this.toasts=this.toasts.map(v=>v.id===f?(this.publish({...v,...r,id:f,title:i}),{...v,...r,id:f,dismissible:x,title:i}):v):this.addToast({title:i,...d,dismissible:x,id:f}),f},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:r,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(i=>i({id:s.id,dismiss:!0}))}),r),this.message=(r,s)=>this.create({...s,message:r}),this.error=(r,s)=>this.create({...s,message:r,type:"error"}),this.success=(r,s)=>this.create({...s,type:"success",message:r}),this.info=(r,s)=>this.create({...s,type:"info",message:r}),this.warning=(r,s)=>this.create({...s,type:"warning",message:r}),this.loading=(r,s)=>this.create({...s,type:"loading",message:r}),this.promise=(r,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:r,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const d=Promise.resolve(r instanceof Function?r():r);let f=i!==void 0,m;const x=d.then(async g=>{if(m=["resolve",g],te.isValidElement(g))f=!1,this.create({id:i,type:"default",message:g});else if(t2(g)&&!g.ok){f=!1;const p=typeof s.error=="function"?await s.error(`HTTP error! status: ${g.status}`):s.error,N=typeof s.description=="function"?await s.description(`HTTP error! status: ${g.status}`):s.description,w=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:N,...w})}else if(g instanceof Error){f=!1;const p=typeof s.error=="function"?await s.error(g):s.error,N=typeof s.description=="function"?await s.description(g):s.description,w=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:N,...w})}else if(s.success!==void 0){f=!1;const p=typeof s.success=="function"?await s.success(g):s.success,N=typeof s.description=="function"?await s.description(g):s.description,w=typeof p=="object"&&!te.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:N,...w})}}).catch(async g=>{if(m=["reject",g],s.error!==void 0){f=!1;const y=typeof s.error=="function"?await s.error(g):s.error,p=typeof s.description=="function"?await s.description(g):s.description,M=typeof y=="object"&&!te.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:p,...M})}}).finally(()=>{f&&(this.dismiss(i),i=void 0),s.finally==null||s.finally.call(s)}),v=()=>new Promise((g,y)=>x.then(()=>m[0]==="reject"?y(m[1]):g(m[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:v}:Object.assign(i,{unwrap:v})},this.custom=(r,s)=>{const i=s?.id||$u++;return this.create({jsx:r(i),id:i,...s}),i},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ht=new W1,e2=(n,r)=>{const s=r?.id||$u++;return Ht.addToast({title:n,...r,id:s}),s},t2=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",a2=e2,n2=()=>Ht.toasts,l2=()=>Ht.getActiveToasts(),Xe=Object.assign(a2,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading},{getHistory:n2,getToasts:l2});V1("[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 Bi(n){return n.label!==void 0}const r2=3,s2="24px",i2="16px",$p=4e3,o2=356,c2=14,u2=45,d2=200;function Ca(...n){return n.filter(Boolean).join(" ")}function f2(n){const[r,s]=n.split("-"),i=[];return r&&i.push(r),s&&i.push(s),i}const m2=n=>{var r,s,i,d,f,m,x,v,g;const{invert:y,toast:p,unstyled:N,interacting:M,setHeights:w,visibleToasts:j,heights:R,index:z,toasts:_,expanded:V,removeToast:L,defaultRichColors:ne,closeButton:I,style:ee,cancelButtonStyle:$,actionButtonStyle:P,className:re="",descriptionClassName:se="",duration:he,position:Ae,gap:De,expandByDefault:Be,classNames:O,icons:Z,closeButtonAriaLabel:F="Close toast"}=n,[xe,ge]=te.useState(null),[T,G]=te.useState(null),[Q,J]=te.useState(!1),[le,fe]=te.useState(!1),[de,be]=te.useState(!1),[B,W]=te.useState(!1),[Ee,Re]=te.useState(!1),[da,ot]=te.useState(0),[zn,dl]=te.useState(0),kn=te.useRef(p.duration||he||$p),dr=te.useRef(null),Qt=te.useRef(null),fr=z===0,mr=z+1<=j,jt=p.type,tn=p.dismissible!==!1,Et=p.className||"",fo=p.descriptionClassName||"",Dn=te.useMemo(()=>R.findIndex(ye=>ye.toastId===p.id)||0,[R,p.id]),ws=te.useMemo(()=>{var ye;return(ye=p.closeButton)!=null?ye:I},[p.closeButton,I]),Un=te.useMemo(()=>p.duration||he||$p,[p.duration,he]),hr=te.useRef(0),za=te.useRef(0),Ns=te.useRef(0),an=te.useRef(null),[Ln,Tt]=Ae.split("-"),fa=te.useMemo(()=>R.reduce((ye,Je,ft)=>ft>=Dn?ye:ye+Je.height,0),[R,Dn]),bt=I1(),mo=p.invert||y,pr=jt==="loading";za.current=te.useMemo(()=>Dn*De+fa,[Dn,fa]),te.useEffect(()=>{kn.current=Un},[Un]),te.useEffect(()=>{J(!0)},[]),te.useEffect(()=>{const ye=Qt.current;if(ye){const Je=ye.getBoundingClientRect().height;return dl(Je),w(ft=>[{toastId:p.id,height:Je,position:p.position},...ft]),()=>w(ft=>ft.filter(St=>St.toastId!==p.id))}},[w,p.id]),te.useLayoutEffect(()=>{if(!Q)return;const ye=Qt.current,Je=ye.style.height;ye.style.height="auto";const ft=ye.getBoundingClientRect().height;ye.style.height=Je,dl(ft),w(St=>St.find(Ie=>Ie.toastId===p.id)?St.map(Ie=>Ie.toastId===p.id?{...Ie,height:ft}:Ie):[{toastId:p.id,height:ft,position:p.position},...St])},[Q,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const wa=te.useCallback(()=>{fe(!0),ot(za.current),w(ye=>ye.filter(Je=>Je.toastId!==p.id)),setTimeout(()=>{L(p)},d2)},[p,L,w,za]);te.useEffect(()=>{if(p.promise&&jt==="loading"||p.duration===1/0||p.type==="loading")return;let ye;return V||M||bt?(()=>{if(Ns.current<hr.current){const St=new Date().getTime()-hr.current;kn.current=kn.current-St}Ns.current=new Date().getTime()})():kn.current!==1/0&&(hr.current=new Date().getTime(),ye=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),wa()},kn.current)),()=>clearTimeout(ye)},[V,M,p,jt,bt,wa]),te.useEffect(()=>{p.delete&&(wa(),p.onDismiss==null||p.onDismiss.call(p,p))},[wa,p.delete]);function fl(){var ye;if(Z?.loading){var Je;return te.createElement("div",{className:Ca(O?.loader,p==null||(Je=p.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":jt==="loading"},Z.loading)}return te.createElement(F1,{className:Ca(O?.loader,p==null||(ye=p.classNames)==null?void 0:ye.loader),visible:jt==="loading"})}const ml=p.icon||Z?.[jt]||Y1(jt);var Bn,Na;return te.createElement("li",{tabIndex:0,ref:Qt,className:Ca(re,Et,O?.toast,p==null||(r=p.classNames)==null?void 0:r.toast,O?.default,O?.[jt],p==null||(s=p.classNames)==null?void 0:s[jt]),"data-sonner-toast":"","data-rich-colors":(Bn=p.richColors)!=null?Bn:ne,"data-styled":!(p.jsx||p.unstyled||N),"data-mounted":Q,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":le,"data-visible":mr,"data-y-position":Ln,"data-x-position":Tt,"data-index":z,"data-front":fr,"data-swiping":de,"data-dismissible":tn,"data-type":jt,"data-invert":mo,"data-swipe-out":B,"data-swipe-direction":T,"data-expanded":!!(V||Be&&Q),"data-testid":p.testId,style:{"--index":z,"--toasts-before":z,"--z-index":_.length-z,"--offset":`${le?da:za.current}px`,"--initial-height":Be?"auto":`${zn}px`,...ee,...p.style},onDragEnd:()=>{be(!1),ge(null),an.current=null},onPointerDown:ye=>{ye.button!==2&&(pr||!tn||(dr.current=new Date,ot(za.current),ye.target.setPointerCapture(ye.pointerId),ye.target.tagName!=="BUTTON"&&(be(!0),an.current={x:ye.clientX,y:ye.clientY})))},onPointerUp:()=>{var ye,Je,ft;if(B||!tn)return;an.current=null;const St=Number(((ye=Qt.current)==null?void 0:ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),nn=Number(((Je=Qt.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ie=new Date().getTime()-((ft=dr.current)==null?void 0:ft.getTime()),_t=xe==="x"?St:nn,Hn=Math.abs(_t)/Ie;if(Math.abs(_t)>=u2||Hn>.11){ot(za.current),p.onDismiss==null||p.onDismiss.call(p,p),G(xe==="x"?St>0?"right":"left":nn>0?"down":"up"),wa(),W(!0);return}else{var Mt,At;(Mt=Qt.current)==null||Mt.style.setProperty("--swipe-amount-x","0px"),(At=Qt.current)==null||At.style.setProperty("--swipe-amount-y","0px")}Re(!1),be(!1),ge(null)},onPointerMove:ye=>{var Je,ft,St;if(!an.current||!tn||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const Ie=ye.clientY-an.current.y,_t=ye.clientX-an.current.x;var Hn;const Mt=(Hn=n.swipeDirections)!=null?Hn:f2(Ae);!xe&&(Math.abs(_t)>1||Math.abs(Ie)>1)&&ge(Math.abs(_t)>Math.abs(Ie)?"x":"y");let At={x:0,y:0};const hl=ma=>1/(1.5+Math.abs(ma)/20);if(xe==="y"){if(Mt.includes("top")||Mt.includes("bottom"))if(Mt.includes("top")&&Ie<0||Mt.includes("bottom")&&Ie>0)At.y=Ie;else{const ma=Ie*hl(Ie);At.y=Math.abs(ma)<Math.abs(Ie)?ma:Ie}}else if(xe==="x"&&(Mt.includes("left")||Mt.includes("right")))if(Mt.includes("left")&&_t<0||Mt.includes("right")&&_t>0)At.x=_t;else{const ma=_t*hl(_t);At.x=Math.abs(ma)<Math.abs(_t)?ma:_t}(Math.abs(At.x)>0||Math.abs(At.y)>0)&&Re(!0),(ft=Qt.current)==null||ft.style.setProperty("--swipe-amount-x",`${At.x}px`),(St=Qt.current)==null||St.style.setProperty("--swipe-amount-y",`${At.y}px`)}},ws&&!p.jsx&&jt!=="loading"?te.createElement("button",{"aria-label":F,"data-disabled":pr,"data-close-button":!0,onClick:pr||!tn?()=>{}:()=>{wa(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Ca(O?.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(Na=Z?.close)!=null?Na:P1):null,(jt||p.icon||p.promise)&&p.icon!==null&&(Z?.[jt]!==null||p.icon)?te.createElement("div",{"data-icon":"",className:Ca(O?.icon,p==null||(d=p.classNames)==null?void 0:d.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||fl():null,p.type!=="loading"?ml:null):null,te.createElement("div",{"data-content":"",className:Ca(O?.content,p==null||(f=p.classNames)==null?void 0:f.content)},te.createElement("div",{"data-title":"",className:Ca(O?.title,p==null||(m=p.classNames)==null?void 0:m.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?te.createElement("div",{"data-description":"",className:Ca(se,fo,O?.description,p==null||(x=p.classNames)==null?void 0:x.description)},typeof p.description=="function"?p.description():p.description):null),te.isValidElement(p.cancel)?p.cancel:p.cancel&&Bi(p.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||$,onClick:ye=>{Bi(p.cancel)&&tn&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,ye),wa())},className:Ca(O?.cancelButton,p==null||(v=p.classNames)==null?void 0:v.cancelButton)},p.cancel.label):null,te.isValidElement(p.action)?p.action:p.action&&Bi(p.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:ye=>{Bi(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,ye),!ye.defaultPrevented&&wa())},className:Ca(O?.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function Pp(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function h2(n,r){const s={};return[n,r].forEach((i,d)=>{const f=d===1,m=f?"--mobile-offset":"--offset",x=f?i2:s2;function v(g){["top","right","bottom","left"].forEach(y=>{s[`${m}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?s[`${m}-${g}`]=x:s[`${m}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):v(x)}),s}const p2=te.forwardRef(function(r,s){const{id:i,invert:d,position:f="bottom-right",hotkey:m=["altKey","KeyT"],expand:x,closeButton:v,className:g,offset:y,mobileOffset:p,theme:N="light",richColors:M,duration:w,style:j,visibleToasts:R=r2,toastOptions:z,dir:_=Pp(),gap:V=c2,icons:L,containerAriaLabel:ne="Notifications"}=r,[I,ee]=te.useState([]),$=te.useMemo(()=>i?I.filter(Q=>Q.toasterId===i):I.filter(Q=>!Q.toasterId),[I,i]),P=te.useMemo(()=>Array.from(new Set([f].concat($.filter(Q=>Q.position).map(Q=>Q.position)))),[$,f]),[re,se]=te.useState([]),[he,Ae]=te.useState(!1),[De,Be]=te.useState(!1),[O,Z]=te.useState(N!=="system"?N:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=te.useRef(null),xe=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),ge=te.useRef(null),T=te.useRef(!1),G=te.useCallback(Q=>{ee(J=>{var le;return(le=J.find(fe=>fe.id===Q.id))!=null&&le.delete||Ht.dismiss(Q.id),J.filter(({id:fe})=>fe!==Q.id)})},[]);return te.useEffect(()=>Ht.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{ee(J=>J.map(le=>le.id===Q.id?{...le,delete:!0}:le))});return}setTimeout(()=>{s1.flushSync(()=>{ee(J=>{const le=J.findIndex(fe=>fe.id===Q.id);return le!==-1?[...J.slice(0,le),{...J[le],...Q},...J.slice(le+1)]:[Q,...J]})})})}),[I]),te.useEffect(()=>{if(N!=="system"){Z(N);return}if(N==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{Z(J?"dark":"light")})}catch{Q.addListener(({matches:le})=>{try{Z(le?"dark":"light")}catch(fe){console.error(fe)}})}},[N]),te.useEffect(()=>{I.length<=1&&Ae(!1)},[I]),te.useEffect(()=>{const Q=J=>{var le;if(m.every(be=>J[be]||J.code===be)){var de;Ae(!0),(de=F.current)==null||de.focus()}J.code==="Escape"&&(document.activeElement===F.current||(le=F.current)!=null&&le.contains(document.activeElement))&&Ae(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[m]),te.useEffect(()=>{if(F.current)return()=>{ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null,T.current=!1)}},[F.current]),te.createElement("section",{ref:s,"aria-label":`${ne} ${xe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((Q,J)=>{var le;const[fe,de]=Q.split("-");return $.length?te.createElement("ol",{key:Q,dir:_==="auto"?Pp():_,tabIndex:-1,ref:F,className:g,"data-sonner-toaster":!0,"data-sonner-theme":O,"data-y-position":fe,"data-x-position":de,style:{"--front-toast-height":`${((le=re[0])==null?void 0:le.height)||0}px`,"--width":`${o2}px`,"--gap":`${V}px`,...j,...h2(y,p)},onBlur:be=>{T.current&&!be.currentTarget.contains(be.relatedTarget)&&(T.current=!1,ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null))},onFocus:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||T.current||(T.current=!0,ge.current=be.relatedTarget)},onMouseEnter:()=>Ae(!0),onMouseMove:()=>Ae(!0),onMouseLeave:()=>{De||Ae(!1)},onDragEnd:()=>Ae(!1),onPointerDown:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||Be(!0)},onPointerUp:()=>Be(!1)},$.filter(be=>!be.position&&J===0||be.position===Q).map((be,B)=>{var W,Ee;return te.createElement(m2,{key:be.id,icons:L,index:B,toast:be,defaultRichColors:M,duration:(W=z?.duration)!=null?W:w,className:z?.className,descriptionClassName:z?.descriptionClassName,invert:d,visibleToasts:R,closeButton:(Ee=z?.closeButton)!=null?Ee:v,interacting:De,position:Q,style:z?.style,unstyled:z?.unstyled,classNames:z?.classNames,cancelButtonStyle:z?.cancelButtonStyle,actionButtonStyle:z?.actionButtonStyle,closeButtonAriaLabel:z?.closeButtonAriaLabel,removeToast:G,toasts:$.filter(Re=>Re.position==be.position),heights:re.filter(Re=>Re.position==be.position),setHeights:se,expandByDefault:x,gap:V,expanded:he,swipeDirections:r.swipeDirections})})):null}))}),lx=S.createContext(void 0),rx="jarvis-admin-theme";function g2(){const n=localStorage.getItem(rx);return n==="light"||n==="dark"?n:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function x2({children:n}){const[r,s]=S.useState(g2);S.useEffect(()=>{document.documentElement.classList.toggle("dark",r==="dark"),localStorage.setItem(rx,r)},[r]);const i=S.useCallback(()=>{s(d=>d==="dark"?"light":"dark")},[]);return u.jsx(lx.Provider,{value:{theme:r,toggleTheme:i},children:n})}function v2(){const n=S.useContext(lx);if(!n)throw new Error("useTheme must be used within ThemeProvider");return n}function sx(n,r){return function(){return n.apply(r,arguments)}}const{toString:y2}=Object.prototype,{getPrototypeOf:yd}=Object,{iterator:ro,toStringTag:ix}=Symbol,so=(n=>r=>{const s=y2.call(r);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Sa=n=>(n=n.toLowerCase(),r=>so(r)===n),io=n=>r=>typeof r===n,{isArray:or}=Array,nr=io("undefined");function xs(n){return n!==null&&!nr(n)&&n.constructor!==null&&!nr(n.constructor)&&qt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const ox=Sa("ArrayBuffer");function b2(n){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&ox(n.buffer),r}const S2=io("string"),qt=io("function"),cx=io("number"),vs=n=>n!==null&&typeof n=="object",w2=n=>n===!0||n===!1,Ki=n=>{if(so(n)!=="object")return!1;const r=yd(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(ix in n)&&!(ro in n)},N2=n=>{if(!vs(n)||xs(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},j2=Sa("Date"),E2=Sa("File"),T2=Sa("Blob"),R2=Sa("FileList"),C2=n=>vs(n)&&qt(n.pipe),_2=n=>{let r;return n&&(typeof FormData=="function"&&n instanceof FormData||qt(n.append)&&((r=so(n))==="formdata"||r==="object"&&qt(n.toString)&&n.toString()==="[object FormData]"))},M2=Sa("URLSearchParams"),[A2,O2,z2,k2]=["ReadableStream","Request","Response","Headers"].map(Sa),D2=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ys(n,r,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let i,d;if(typeof n!="object"&&(n=[n]),or(n))for(i=0,d=n.length;i<d;i++)r.call(null,n[i],i,n);else{if(xs(n))return;const f=s?Object.getOwnPropertyNames(n):Object.keys(n),m=f.length;let x;for(i=0;i<m;i++)x=f[i],r.call(null,n[x],x,n)}}function ux(n,r){if(xs(n))return null;r=r.toLowerCase();const s=Object.keys(n);let i=s.length,d;for(;i-- >0;)if(d=s[i],r===d.toLowerCase())return d;return null}const rl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dx=n=>!nr(n)&&n!==rl;function Pu(){const{caseless:n,skipUndefined:r}=dx(this)&&this||{},s={},i=(d,f)=>{const m=n&&ux(s,f)||f;Ki(s[m])&&Ki(d)?s[m]=Pu(s[m],d):Ki(d)?s[m]=Pu({},d):or(d)?s[m]=d.slice():(!r||!nr(d))&&(s[m]=d)};for(let d=0,f=arguments.length;d<f;d++)arguments[d]&&ys(arguments[d],i);return s}const U2=(n,r,s,{allOwnKeys:i}={})=>(ys(r,(d,f)=>{s&&qt(d)?Object.defineProperty(n,f,{value:sx(d,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,f,{value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),L2=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),B2=(n,r,s,i)=>{n.prototype=Object.create(r.prototype,i),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:r.prototype}),s&&Object.assign(n.prototype,s)},H2=(n,r,s,i)=>{let d,f,m;const x={};if(r=r||{},n==null)return r;do{for(d=Object.getOwnPropertyNames(n),f=d.length;f-- >0;)m=d[f],(!i||i(m,n,r))&&!x[m]&&(r[m]=n[m],x[m]=!0);n=s!==!1&&yd(n)}while(n&&(!s||s(n,r))&&n!==Object.prototype);return r},q2=(n,r,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=r.length;const i=n.indexOf(r,s);return i!==-1&&i===s},G2=n=>{if(!n)return null;if(or(n))return n;let r=n.length;if(!cx(r))return null;const s=new Array(r);for(;r-- >0;)s[r]=n[r];return s},Q2=(n=>r=>n&&r instanceof n)(typeof Uint8Array<"u"&&yd(Uint8Array)),V2=(n,r)=>{const i=(n&&n[ro]).call(n);let d;for(;(d=i.next())&&!d.done;){const f=d.value;r.call(n,f[0],f[1])}},Y2=(n,r)=>{let s;const i=[];for(;(s=n.exec(r))!==null;)i.push(s);return i},X2=Sa("HTMLFormElement"),F2=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,i,d){return i.toUpperCase()+d}),Ip=(({hasOwnProperty:n})=>(r,s)=>n.call(r,s))(Object.prototype),K2=Sa("RegExp"),fx=(n,r)=>{const s=Object.getOwnPropertyDescriptors(n),i={};ys(s,(d,f)=>{let m;(m=r(d,f,n))!==!1&&(i[f]=m||d)}),Object.defineProperties(n,i)},Z2=n=>{fx(n,(r,s)=>{if(qt(n)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const i=n[s];if(qt(i)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},J2=(n,r)=>{const s={},i=d=>{d.forEach(f=>{s[f]=!0})};return or(n)?i(n):i(String(n).split(r)),s},$2=()=>{},P2=(n,r)=>n!=null&&Number.isFinite(n=+n)?n:r;function I2(n){return!!(n&&qt(n.append)&&n[ix]==="FormData"&&n[ro])}const W2=n=>{const r=new Array(10),s=(i,d)=>{if(vs(i)){if(r.indexOf(i)>=0)return;if(xs(i))return i;if(!("toJSON"in i)){r[d]=i;const f=or(i)?[]:{};return ys(i,(m,x)=>{const v=s(m,d+1);!nr(v)&&(f[x]=v)}),r[d]=void 0,f}}return i};return s(n,0)},eS=Sa("AsyncFunction"),tS=n=>n&&(vs(n)||qt(n))&&qt(n.then)&&qt(n.catch),mx=((n,r)=>n?setImmediate:r?((s,i)=>(rl.addEventListener("message",({source:d,data:f})=>{d===rl&&f===s&&i.length&&i.shift()()},!1),d=>{i.push(d),rl.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",qt(rl.postMessage)),aS=typeof queueMicrotask<"u"?queueMicrotask.bind(rl):typeof process<"u"&&process.nextTick||mx,nS=n=>n!=null&&qt(n[ro]),q={isArray:or,isArrayBuffer:ox,isBuffer:xs,isFormData:_2,isArrayBufferView:b2,isString:S2,isNumber:cx,isBoolean:w2,isObject:vs,isPlainObject:Ki,isEmptyObject:N2,isReadableStream:A2,isRequest:O2,isResponse:z2,isHeaders:k2,isUndefined:nr,isDate:j2,isFile:E2,isBlob:T2,isRegExp:K2,isFunction:qt,isStream:C2,isURLSearchParams:M2,isTypedArray:Q2,isFileList:R2,forEach:ys,merge:Pu,extend:U2,trim:D2,stripBOM:L2,inherits:B2,toFlatObject:H2,kindOf:so,kindOfTest:Sa,endsWith:q2,toArray:G2,forEachEntry:V2,matchAll:Y2,isHTMLForm:X2,hasOwnProperty:Ip,hasOwnProp:Ip,reduceDescriptors:fx,freezeMethods:Z2,toObjectSet:J2,toCamelCase:F2,noop:$2,toFiniteNumber:P2,findKey:ux,global:rl,isContextDefined:dx,isSpecCompliantForm:I2,toJSONObject:W2,isAsyncFn:eS,isThenable:tS,setImmediate:mx,asap:aS,isIterable:nS};let ve=class hx extends Error{static from(r,s,i,d,f,m){const x=new hx(r.message,s||r.code,i,d,f);return x.cause=r,x.name=r.name,m&&Object.assign(x,m),x}constructor(r,s,i,d,f){super(r),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),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:q.toJSONObject(this.config),code:this.code,status:this.status}}};ve.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ve.ERR_BAD_OPTION="ERR_BAD_OPTION";ve.ECONNABORTED="ECONNABORTED";ve.ETIMEDOUT="ETIMEDOUT";ve.ERR_NETWORK="ERR_NETWORK";ve.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ve.ERR_DEPRECATED="ERR_DEPRECATED";ve.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ve.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ve.ERR_CANCELED="ERR_CANCELED";ve.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ve.ERR_INVALID_URL="ERR_INVALID_URL";const lS=null;function Iu(n){return q.isPlainObject(n)||q.isArray(n)}function px(n){return q.endsWith(n,"[]")?n.slice(0,-2):n}function Wp(n,r,s){return n?n.concat(r).map(function(d,f){return d=px(d),!s&&f?"["+d+"]":d}).join(s?".":""):r}function rS(n){return q.isArray(n)&&!n.some(Iu)}const sS=q.toFlatObject(q,{},null,function(r){return/^is[A-Z]/.test(r)});function oo(n,r,s){if(!q.isObject(n))throw new TypeError("target must be an object");r=r||new FormData,s=q.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,R){return!q.isUndefined(R[j])});const i=s.metaTokens,d=s.visitor||y,f=s.dots,m=s.indexes,v=(s.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(r);if(!q.isFunction(d))throw new TypeError("visitor must be a function");function g(w){if(w===null)return"";if(q.isDate(w))return w.toISOString();if(q.isBoolean(w))return w.toString();if(!v&&q.isBlob(w))throw new ve("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(w)||q.isTypedArray(w)?v&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function y(w,j,R){let z=w;if(w&&!R&&typeof w=="object"){if(q.endsWith(j,"{}"))j=i?j:j.slice(0,-2),w=JSON.stringify(w);else if(q.isArray(w)&&rS(w)||(q.isFileList(w)||q.endsWith(j,"[]"))&&(z=q.toArray(w)))return j=px(j),z.forEach(function(V,L){!(q.isUndefined(V)||V===null)&&r.append(m===!0?Wp([j],L,f):m===null?j:j+"[]",g(V))}),!1}return Iu(w)?!0:(r.append(Wp(R,j,f),g(w)),!1)}const p=[],N=Object.assign(sS,{defaultVisitor:y,convertValue:g,isVisitable:Iu});function M(w,j){if(!q.isUndefined(w)){if(p.indexOf(w)!==-1)throw Error("Circular reference detected in "+j.join("."));p.push(w),q.forEach(w,function(z,_){(!(q.isUndefined(z)||z===null)&&d.call(r,z,q.isString(_)?_.trim():_,j,N))===!0&&M(z,j?j.concat(_):[_])}),p.pop()}}if(!q.isObject(n))throw new TypeError("data must be an object");return M(n),r}function eg(n){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return r[i]})}function bd(n,r){this._pairs=[],n&&oo(n,this,r)}const gx=bd.prototype;gx.append=function(r,s){this._pairs.push([r,s])};gx.toString=function(r){const s=r?function(i){return r.call(this,i,eg)}:eg;return this._pairs.map(function(d){return s(d[0])+"="+s(d[1])},"").join("&")};function iS(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xx(n,r,s){if(!r)return n;const i=s&&s.encode||iS,d=q.isFunction(s)?{serialize:s}:s,f=d&&d.serialize;let m;if(f?m=f(r,d):m=q.isURLSearchParams(r)?r.toString():new bd(r,d).toString(i),m){const x=n.indexOf("#");x!==-1&&(n=n.slice(0,x)),n+=(n.indexOf("?")===-1?"?":"&")+m}return n}class tg{constructor(){this.handlers=[]}use(r,s,i){return this.handlers.push({fulfilled:r,rejected:s,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){q.forEach(this.handlers,function(i){i!==null&&r(i)})}}const vx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oS=typeof URLSearchParams<"u"?URLSearchParams:bd,cS=typeof FormData<"u"?FormData:null,uS=typeof Blob<"u"?Blob:null,dS={isBrowser:!0,classes:{URLSearchParams:oS,FormData:cS,Blob:uS},protocols:["http","https","file","blob","url","data"]},Sd=typeof window<"u"&&typeof document<"u",Wu=typeof navigator=="object"&&navigator||void 0,fS=Sd&&(!Wu||["ReactNative","NativeScript","NS"].indexOf(Wu.product)<0),mS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hS=Sd&&window.location.href||"http://localhost",pS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sd,hasStandardBrowserEnv:fS,hasStandardBrowserWebWorkerEnv:mS,navigator:Wu,origin:hS},Symbol.toStringTag,{value:"Module"})),Nt={...pS,...dS};function gS(n,r){return oo(n,new Nt.classes.URLSearchParams,{visitor:function(s,i,d,f){return Nt.isNode&&q.isBuffer(s)?(this.append(i,s.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...r})}function xS(n){return q.matchAll(/\w+|\[(\w*)]/g,n).map(r=>r[0]==="[]"?"":r[1]||r[0])}function vS(n){const r={},s=Object.keys(n);let i;const d=s.length;let f;for(i=0;i<d;i++)f=s[i],r[f]=n[f];return r}function yx(n){function r(s,i,d,f){let m=s[f++];if(m==="__proto__")return!0;const x=Number.isFinite(+m),v=f>=s.length;return m=!m&&q.isArray(d)?d.length:m,v?(q.hasOwnProp(d,m)?d[m]=[d[m],i]:d[m]=i,!x):((!d[m]||!q.isObject(d[m]))&&(d[m]=[]),r(s,i,d[m],f)&&q.isArray(d[m])&&(d[m]=vS(d[m])),!x)}if(q.isFormData(n)&&q.isFunction(n.entries)){const s={};return q.forEachEntry(n,(i,d)=>{r(xS(i),d,s,0)}),s}return null}function yS(n,r,s){if(q.isString(n))try{return(r||JSON.parse)(n),q.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(s||JSON.stringify)(n)}const bs={transitional:vx,adapter:["xhr","http","fetch"],transformRequest:[function(r,s){const i=s.getContentType()||"",d=i.indexOf("application/json")>-1,f=q.isObject(r);if(f&&q.isHTMLForm(r)&&(r=new FormData(r)),q.isFormData(r))return d?JSON.stringify(yx(r)):r;if(q.isArrayBuffer(r)||q.isBuffer(r)||q.isStream(r)||q.isFile(r)||q.isBlob(r)||q.isReadableStream(r))return r;if(q.isArrayBufferView(r))return r.buffer;if(q.isURLSearchParams(r))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let x;if(f){if(i.indexOf("application/x-www-form-urlencoded")>-1)return gS(r,this.formSerializer).toString();if((x=q.isFileList(r))||i.indexOf("multipart/form-data")>-1){const v=this.env&&this.env.FormData;return oo(x?{"files[]":r}:r,v&&new v,this.formSerializer)}}return f||d?(s.setContentType("application/json",!1),yS(r)):r}],transformResponse:[function(r){const s=this.transitional||bs.transitional,i=s&&s.forcedJSONParsing,d=this.responseType==="json";if(q.isResponse(r)||q.isReadableStream(r))return r;if(r&&q.isString(r)&&(i&&!this.responseType||d)){const m=!(s&&s.silentJSONParsing)&&d;try{return JSON.parse(r,this.parseReviver)}catch(x){if(m)throw x.name==="SyntaxError"?ve.from(x,ve.ERR_BAD_RESPONSE,this,null,this.response):x}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],n=>{bs.headers[n]={}});const bS=q.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"]),SS=n=>{const r={};let s,i,d;return n&&n.split(`
12
+ `).forEach(function(m){d=m.indexOf(":"),s=m.substring(0,d).trim().toLowerCase(),i=m.substring(d+1).trim(),!(!s||r[s]&&bS[s])&&(s==="set-cookie"?r[s]?r[s].push(i):r[s]=[i]:r[s]=r[s]?r[s]+", "+i:i)}),r},ag=Symbol("internals");function os(n){return n&&String(n).trim().toLowerCase()}function Zi(n){return n===!1||n==null?n:q.isArray(n)?n.map(Zi):String(n)}function wS(n){const r=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=s.exec(n);)r[i[1]]=i[2];return r}const NS=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function zu(n,r,s,i,d){if(q.isFunction(i))return i.call(this,r,s);if(d&&(r=s),!!q.isString(r)){if(q.isString(i))return r.indexOf(i)!==-1;if(q.isRegExp(i))return i.test(r)}}function jS(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,s,i)=>s.toUpperCase()+i)}function ES(n,r){const s=q.toCamelCase(" "+r);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+s,{value:function(d,f,m){return this[i].call(this,r,d,f,m)},configurable:!0})})}let Gt=class{constructor(r){r&&this.set(r)}set(r,s,i){const d=this;function f(x,v,g){const y=os(v);if(!y)throw new Error("header name must be a non-empty string");const p=q.findKey(d,y);(!p||d[p]===void 0||g===!0||g===void 0&&d[p]!==!1)&&(d[p||v]=Zi(x))}const m=(x,v)=>q.forEach(x,(g,y)=>f(g,y,v));if(q.isPlainObject(r)||r instanceof this.constructor)m(r,s);else if(q.isString(r)&&(r=r.trim())&&!NS(r))m(SS(r),s);else if(q.isObject(r)&&q.isIterable(r)){let x={},v,g;for(const y of r){if(!q.isArray(y))throw TypeError("Object iterator must return a key-value pair");x[g=y[0]]=(v=x[g])?q.isArray(v)?[...v,y[1]]:[v,y[1]]:y[1]}m(x,s)}else r!=null&&f(s,r,i);return this}get(r,s){if(r=os(r),r){const i=q.findKey(this,r);if(i){const d=this[i];if(!s)return d;if(s===!0)return wS(d);if(q.isFunction(s))return s.call(this,d,i);if(q.isRegExp(s))return s.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,s){if(r=os(r),r){const i=q.findKey(this,r);return!!(i&&this[i]!==void 0&&(!s||zu(this,this[i],i,s)))}return!1}delete(r,s){const i=this;let d=!1;function f(m){if(m=os(m),m){const x=q.findKey(i,m);x&&(!s||zu(i,i[x],x,s))&&(delete i[x],d=!0)}}return q.isArray(r)?r.forEach(f):f(r),d}clear(r){const s=Object.keys(this);let i=s.length,d=!1;for(;i--;){const f=s[i];(!r||zu(this,this[f],f,r,!0))&&(delete this[f],d=!0)}return d}normalize(r){const s=this,i={};return q.forEach(this,(d,f)=>{const m=q.findKey(i,f);if(m){s[m]=Zi(d),delete s[f];return}const x=r?jS(f):String(f).trim();x!==f&&delete s[f],s[x]=Zi(d),i[x]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const s=Object.create(null);return q.forEach(this,(i,d)=>{i!=null&&i!==!1&&(s[d]=r&&q.isArray(i)?i.join(", "):i)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,s])=>r+": "+s).join(`
13
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...s){const i=new this(r);return s.forEach(d=>i.set(d)),i}static accessor(r){const i=(this[ag]=this[ag]={accessors:{}}).accessors,d=this.prototype;function f(m){const x=os(m);i[x]||(ES(d,m),i[x]=!0)}return q.isArray(r)?r.forEach(f):f(r),this}};Gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Gt.prototype,({value:n},r)=>{let s=r[0].toUpperCase()+r.slice(1);return{get:()=>n,set(i){this[s]=i}}});q.freezeMethods(Gt);function ku(n,r){const s=this||bs,i=r||s,d=Gt.from(i.headers);let f=i.data;return q.forEach(n,function(x){f=x.call(s,f,d.normalize(),r?r.status:void 0)}),d.normalize(),f}function bx(n){return!!(n&&n.__CANCEL__)}let Ss=class extends ve{constructor(r,s,i){super(r??"canceled",ve.ERR_CANCELED,s,i),this.name="CanceledError",this.__CANCEL__=!0}};function Sx(n,r,s){const i=s.config.validateStatus;!s.status||!i||i(s.status)?n(s):r(new ve("Request failed with status code "+s.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function TS(n){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return r&&r[1]||""}function RS(n,r){n=n||10;const s=new Array(n),i=new Array(n);let d=0,f=0,m;return r=r!==void 0?r:1e3,function(v){const g=Date.now(),y=i[f];m||(m=g),s[d]=v,i[d]=g;let p=f,N=0;for(;p!==d;)N+=s[p++],p=p%n;if(d=(d+1)%n,d===f&&(f=(f+1)%n),g-m<r)return;const M=y&&g-y;return M?Math.round(N*1e3/M):void 0}}function CS(n,r){let s=0,i=1e3/r,d,f;const m=(g,y=Date.now())=>{s=y,d=null,f&&(clearTimeout(f),f=null),n(...g)};return[(...g)=>{const y=Date.now(),p=y-s;p>=i?m(g,y):(d=g,f||(f=setTimeout(()=>{f=null,m(d)},i-p)))},()=>d&&m(d)]}const to=(n,r,s=3)=>{let i=0;const d=RS(50,250);return CS(f=>{const m=f.loaded,x=f.lengthComputable?f.total:void 0,v=m-i,g=d(v),y=m<=x;i=m;const p={loaded:m,total:x,progress:x?m/x:void 0,bytes:v,rate:g||void 0,estimated:g&&x&&y?(x-m)/g:void 0,event:f,lengthComputable:x!=null,[r?"download":"upload"]:!0};n(p)},s)},ng=(n,r)=>{const s=n!=null;return[i=>r[0]({lengthComputable:s,total:n,loaded:i}),r[1]]},lg=n=>(...r)=>q.asap(()=>n(...r)),_S=Nt.hasStandardBrowserEnv?((n,r)=>s=>(s=new URL(s,Nt.origin),n.protocol===s.protocol&&n.host===s.host&&(r||n.port===s.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,MS=Nt.hasStandardBrowserEnv?{write(n,r,s,i,d,f,m){if(typeof document>"u")return;const x=[`${n}=${encodeURIComponent(r)}`];q.isNumber(s)&&x.push(`expires=${new Date(s).toUTCString()}`),q.isString(i)&&x.push(`path=${i}`),q.isString(d)&&x.push(`domain=${d}`),f===!0&&x.push("secure"),q.isString(m)&&x.push(`SameSite=${m}`),document.cookie=x.join("; ")},read(n){if(typeof document>"u")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function AS(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function OS(n,r){return r?n.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):n}function wx(n,r,s){let i=!AS(r);return n&&(i||s==!1)?OS(n,r):r}const rg=n=>n instanceof Gt?{...n}:n;function cl(n,r){r=r||{};const s={};function i(g,y,p,N){return q.isPlainObject(g)&&q.isPlainObject(y)?q.merge.call({caseless:N},g,y):q.isPlainObject(y)?q.merge({},y):q.isArray(y)?y.slice():y}function d(g,y,p,N){if(q.isUndefined(y)){if(!q.isUndefined(g))return i(void 0,g,p,N)}else return i(g,y,p,N)}function f(g,y){if(!q.isUndefined(y))return i(void 0,y)}function m(g,y){if(q.isUndefined(y)){if(!q.isUndefined(g))return i(void 0,g)}else return i(void 0,y)}function x(g,y,p){if(p in r)return i(g,y);if(p in n)return i(void 0,g)}const v={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:x,headers:(g,y,p)=>d(rg(g),rg(y),p,!0)};return q.forEach(Object.keys({...n,...r}),function(y){const p=v[y]||d,N=p(n[y],r[y],y);q.isUndefined(N)&&p!==x||(s[y]=N)}),s}const Nx=n=>{const r=cl({},n);let{data:s,withXSRFToken:i,xsrfHeaderName:d,xsrfCookieName:f,headers:m,auth:x}=r;if(r.headers=m=Gt.from(m),r.url=xx(wx(r.baseURL,r.url,r.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&m.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):""))),q.isFormData(s)){if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(q.isFunction(s.getHeaders)){const v=s.getHeaders(),g=["content-type","content-length"];Object.entries(v).forEach(([y,p])=>{g.includes(y.toLowerCase())&&m.set(y,p)})}}if(Nt.hasStandardBrowserEnv&&(i&&q.isFunction(i)&&(i=i(r)),i||i!==!1&&_S(r.url))){const v=d&&f&&MS.read(f);v&&m.set(d,v)}return r},zS=typeof XMLHttpRequest<"u",kS=zS&&function(n){return new Promise(function(s,i){const d=Nx(n);let f=d.data;const m=Gt.from(d.headers).normalize();let{responseType:x,onUploadProgress:v,onDownloadProgress:g}=d,y,p,N,M,w;function j(){M&&M(),w&&w(),d.cancelToken&&d.cancelToken.unsubscribe(y),d.signal&&d.signal.removeEventListener("abort",y)}let R=new XMLHttpRequest;R.open(d.method.toUpperCase(),d.url,!0),R.timeout=d.timeout;function z(){if(!R)return;const V=Gt.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),ne={data:!x||x==="text"||x==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:V,config:n,request:R};Sx(function(ee){s(ee),j()},function(ee){i(ee),j()},ne),R=null}"onloadend"in R?R.onloadend=z:R.onreadystatechange=function(){!R||R.readyState!==4||R.status===0&&!(R.responseURL&&R.responseURL.indexOf("file:")===0)||setTimeout(z)},R.onabort=function(){R&&(i(new ve("Request aborted",ve.ECONNABORTED,n,R)),R=null)},R.onerror=function(L){const ne=L&&L.message?L.message:"Network Error",I=new ve(ne,ve.ERR_NETWORK,n,R);I.event=L||null,i(I),R=null},R.ontimeout=function(){let L=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const ne=d.transitional||vx;d.timeoutErrorMessage&&(L=d.timeoutErrorMessage),i(new ve(L,ne.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,n,R)),R=null},f===void 0&&m.setContentType(null),"setRequestHeader"in R&&q.forEach(m.toJSON(),function(L,ne){R.setRequestHeader(ne,L)}),q.isUndefined(d.withCredentials)||(R.withCredentials=!!d.withCredentials),x&&x!=="json"&&(R.responseType=d.responseType),g&&([N,w]=to(g,!0),R.addEventListener("progress",N)),v&&R.upload&&([p,M]=to(v),R.upload.addEventListener("progress",p),R.upload.addEventListener("loadend",M)),(d.cancelToken||d.signal)&&(y=V=>{R&&(i(!V||V.type?new Ss(null,n,R):V),R.abort(),R=null)},d.cancelToken&&d.cancelToken.subscribe(y),d.signal&&(d.signal.aborted?y():d.signal.addEventListener("abort",y)));const _=TS(d.url);if(_&&Nt.protocols.indexOf(_)===-1){i(new ve("Unsupported protocol "+_+":",ve.ERR_BAD_REQUEST,n));return}R.send(f||null)})},DS=(n,r)=>{const{length:s}=n=n?n.filter(Boolean):[];if(r||s){let i=new AbortController,d;const f=function(g){if(!d){d=!0,x();const y=g instanceof Error?g:this.reason;i.abort(y instanceof ve?y:new Ss(y instanceof Error?y.message:y))}};let m=r&&setTimeout(()=>{m=null,f(new ve(`timeout of ${r}ms exceeded`,ve.ETIMEDOUT))},r);const x=()=>{n&&(m&&clearTimeout(m),m=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(f):g.removeEventListener("abort",f)}),n=null)};n.forEach(g=>g.addEventListener("abort",f));const{signal:v}=i;return v.unsubscribe=()=>q.asap(x),v}},US=function*(n,r){let s=n.byteLength;if(s<r){yield n;return}let i=0,d;for(;i<s;)d=i+r,yield n.slice(i,d),i=d},LS=async function*(n,r){for await(const s of BS(n))yield*US(s,r)},BS=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const r=n.getReader();try{for(;;){const{done:s,value:i}=await r.read();if(s)break;yield i}}finally{await r.cancel()}},sg=(n,r,s,i)=>{const d=LS(n,r);let f=0,m,x=v=>{m||(m=!0,i&&i(v))};return new ReadableStream({async pull(v){try{const{done:g,value:y}=await d.next();if(g){x(),v.close();return}let p=y.byteLength;if(s){let N=f+=p;s(N)}v.enqueue(new Uint8Array(y))}catch(g){throw x(g),g}},cancel(v){return x(v),d.return()}},{highWaterMark:2})},ig=64*1024,{isFunction:Hi}=q,HS=(({Request:n,Response:r})=>({Request:n,Response:r}))(q.global),{ReadableStream:og,TextEncoder:cg}=q.global,ug=(n,...r)=>{try{return!!n(...r)}catch{return!1}},qS=n=>{n=q.merge.call({skipUndefined:!0},HS,n);const{fetch:r,Request:s,Response:i}=n,d=r?Hi(r):typeof fetch=="function",f=Hi(s),m=Hi(i);if(!d)return!1;const x=d&&Hi(og),v=d&&(typeof cg=="function"?(w=>j=>w.encode(j))(new cg):async w=>new Uint8Array(await new s(w).arrayBuffer())),g=f&&x&&ug(()=>{let w=!1;const j=new s(Nt.origin,{body:new og,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!j}),y=m&&x&&ug(()=>q.isReadableStream(new i("").body)),p={stream:y&&(w=>w.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!p[w]&&(p[w]=(j,R)=>{let z=j&&j[w];if(z)return z.call(j);throw new ve(`Response type '${w}' is not supported`,ve.ERR_NOT_SUPPORT,R)})});const N=async w=>{if(w==null)return 0;if(q.isBlob(w))return w.size;if(q.isSpecCompliantForm(w))return(await new s(Nt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(q.isArrayBufferView(w)||q.isArrayBuffer(w))return w.byteLength;if(q.isURLSearchParams(w)&&(w=w+""),q.isString(w))return(await v(w)).byteLength},M=async(w,j)=>{const R=q.toFiniteNumber(w.getContentLength());return R??N(j)};return async w=>{let{url:j,method:R,data:z,signal:_,cancelToken:V,timeout:L,onDownloadProgress:ne,onUploadProgress:I,responseType:ee,headers:$,withCredentials:P="same-origin",fetchOptions:re}=Nx(w),se=r||fetch;ee=ee?(ee+"").toLowerCase():"text";let he=DS([_,V&&V.toAbortSignal()],L),Ae=null;const De=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let Be;try{if(I&&g&&R!=="get"&&R!=="head"&&(Be=await M($,z))!==0){let T=new s(j,{method:"POST",body:z,duplex:"half"}),G;if(q.isFormData(z)&&(G=T.headers.get("content-type"))&&$.setContentType(G),T.body){const[Q,J]=ng(Be,to(lg(I)));z=sg(T.body,ig,Q,J)}}q.isString(P)||(P=P?"include":"omit");const O=f&&"credentials"in s.prototype,Z={...re,signal:he,method:R.toUpperCase(),headers:$.normalize().toJSON(),body:z,duplex:"half",credentials:O?P:void 0};Ae=f&&new s(j,Z);let F=await(f?se(Ae,re):se(j,Z));const xe=y&&(ee==="stream"||ee==="response");if(y&&(ne||xe&&De)){const T={};["status","statusText","headers"].forEach(le=>{T[le]=F[le]});const G=q.toFiniteNumber(F.headers.get("content-length")),[Q,J]=ne&&ng(G,to(lg(ne),!0))||[];F=new i(sg(F.body,ig,Q,()=>{J&&J(),De&&De()}),T)}ee=ee||"text";let ge=await p[q.findKey(p,ee)||"text"](F,w);return!xe&&De&&De(),await new Promise((T,G)=>{Sx(T,G,{data:ge,headers:Gt.from(F.headers),status:F.status,statusText:F.statusText,config:w,request:Ae})})}catch(O){throw De&&De(),O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new ve("Network Error",ve.ERR_NETWORK,w,Ae),{cause:O.cause||O}):ve.from(O,O&&O.code,w,Ae)}}},GS=new Map,jx=n=>{let r=n&&n.env||{};const{fetch:s,Request:i,Response:d}=r,f=[i,d,s];let m=f.length,x=m,v,g,y=GS;for(;x--;)v=f[x],g=y.get(v),g===void 0&&y.set(v,g=x?new Map:qS(r)),y=g;return g};jx();const wd={http:lS,xhr:kS,fetch:{get:jx}};q.forEach(wd,(n,r)=>{if(n){try{Object.defineProperty(n,"name",{value:r})}catch{}Object.defineProperty(n,"adapterName",{value:r})}});const dg=n=>`- ${n}`,QS=n=>q.isFunction(n)||n===null||n===!1;function VS(n,r){n=q.isArray(n)?n:[n];const{length:s}=n;let i,d;const f={};for(let m=0;m<s;m++){i=n[m];let x;if(d=i,!QS(i)&&(d=wd[(x=String(i)).toLowerCase()],d===void 0))throw new ve(`Unknown adapter '${x}'`);if(d&&(q.isFunction(d)||(d=d.get(r))))break;f[x||"#"+m]=d}if(!d){const m=Object.entries(f).map(([v,g])=>`adapter ${v} `+(g===!1?"is not supported by the environment":"is not available in the build"));let x=s?m.length>1?`since :
14
14
  `+m.map(dg).join(`
15
- `):" "+dg(m[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return d}const Ex={getAdapter:V2,adapters:wd};function Du(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ss(null,n)}function fg(n){return Du(n),n.headers=Gt.from(n.headers),n.data=ku.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ex.getAdapter(n.adapter||bs.adapter,n)(n).then(function(i){return Du(n),i.data=ku.call(n,n.transformResponse,i),i.headers=Gt.from(i.headers),i},function(i){return bx(i)||(Du(n),i&&i.response&&(i.response.data=ku.call(n,n.transformResponse,i.response),i.response.headers=Gt.from(i.response.headers))),Promise.reject(i)})}const Rx="1.13.4",co={};["object","boolean","number","function","string","symbol"].forEach((n,r)=>{co[n]=function(i){return typeof i===n||"a"+(r<1?"n ":" ")+n}});const mg={};co.transitional=function(r,s,i){function d(f,m){return"[Axios v"+Rx+"] Transitional option '"+f+"'"+m+(i?". "+i:"")}return(f,m,x)=>{if(r===!1)throw new ve(d(m," has been removed"+(s?" in "+s:"")),ve.ERR_DEPRECATED);return s&&!mg[m]&&(mg[m]=!0,console.warn(d(m," has been deprecated since v"+s+" and will be removed in the near future"))),r?r(f,m,x):!0}};co.spelling=function(r){return(s,i)=>(console.warn(`${i} is likely a misspelling of ${r}`),!0)};function Y2(n,r,s){if(typeof n!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let d=i.length;for(;d-- >0;){const f=i[d],m=r[f];if(m){const x=n[f],v=x===void 0||m(x,f,n);if(v!==!0)throw new ve("option "+f+" must be "+v,ve.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new ve("Unknown option "+f,ve.ERR_BAD_OPTION)}}const Ji={assertOptions:Y2,validators:co},_a=Ji.validators;let sl=class{constructor(r){this.defaults=r||{},this.interceptors={request:new tg,response:new tg}}async request(r,s){try{return await this._request(r,s)}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(r,s){typeof r=="string"?(s=s||{},s.url=r):s=r||{},s=cl(this.defaults,s);const{transitional:i,paramsSerializer:d,headers:f}=s;i!==void 0&&Ji.assertOptions(i,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1),d!=null&&(q.isFunction(d)?s.paramsSerializer={serialize:d}:Ji.assertOptions(d,{encode:_a.function,serialize:_a.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Ji.assertOptions(s,{baseUrl:_a.spelling("baseURL"),withXsrfToken:_a.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let m=f&&q.merge(f.common,f[s.method]);f&&q.forEach(["delete","get","head","post","put","patch","common"],w=>{delete f[w]}),s.headers=Gt.concat(m,f);const x=[];let v=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(s)===!1||(v=v&&j.synchronous,x.unshift(j.fulfilled,j.rejected))});const g=[];this.interceptors.response.forEach(function(j){g.push(j.fulfilled,j.rejected)});let y,p=0,N;if(!v){const w=[fg.bind(this),void 0];for(w.unshift(...x),w.push(...g),N=w.length,y=Promise.resolve(s);p<N;)y=y.then(w[p++],w[p++]);return y}N=x.length;let M=s;for(;p<N;){const w=x[p++],j=x[p++];try{M=w(M)}catch(T){j.call(this,T);break}}try{y=fg.call(this,M)}catch(w){return Promise.reject(w)}for(p=0,N=g.length;p<N;)y=y.then(g[p++],g[p++]);return y}getUri(r){r=cl(this.defaults,r);const s=wx(r.baseURL,r.url,r.allowAbsoluteUrls);return xx(s,r.params,r.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(r){sl.prototype[r]=function(s,i){return this.request(cl(i||{},{method:r,url:s,data:(i||{}).data}))}});q.forEach(["post","put","patch"],function(r){function s(i){return function(f,m,x){return this.request(cl(x||{},{method:r,headers:i?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}sl.prototype[r]=s(),sl.prototype[r+"Form"]=s(!0)});let F2=class Tx{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(f){s=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(x=>{i.subscribe(x),f=x}).then(d);return m.cancel=function(){i.unsubscribe(f)},m},r(function(f,m,x){i.reason||(i.reason=new Ss(f,m,x),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const s=this._listeners.indexOf(r);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const r=new AbortController,s=i=>{r.abort(i)};return this.subscribe(s),r.signal.unsubscribe=()=>this.unsubscribe(s),r.signal}static source(){let r;return{token:new Tx(function(d){r=d}),cancel:r}}};function X2(n){return function(s){return n.apply(null,s)}}function K2(n){return q.isObject(n)&&n.isAxiosError===!0}const ed={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(ed).forEach(([n,r])=>{ed[r]=n});function Cx(n){const r=new sl(n),s=sx(sl.prototype.request,r);return q.extend(s,sl.prototype,r,{allOwnKeys:!0}),q.extend(s,r,null,{allOwnKeys:!0}),s.create=function(d){return Cx(cl(n,d))},s}const nt=Cx(bs);nt.Axios=sl;nt.CanceledError=Ss;nt.CancelToken=F2;nt.isCancel=bx;nt.VERSION=Rx;nt.toFormData=oo;nt.AxiosError=ve;nt.Cancel=nt.CanceledError;nt.all=function(r){return Promise.all(r)};nt.spread=X2;nt.isAxiosError=K2;nt.mergeConfig=cl;nt.AxiosHeaders=Gt;nt.formToJSON=n=>yx(q.isHTMLForm(n)?new FormData(n):n);nt.getAdapter=Ex.getAdapter;nt.HttpStatusCode=ed;nt.default=nt;const{Axios:GE,AxiosError:QE,CanceledError:VE,isCancel:YE,CancelToken:FE,VERSION:XE,all:KE,Cancel:ZE,isAxiosError:JE,spread:$E,toFormData:PE,AxiosHeaders:IE,HttpStatusCode:WE,formToJSON:e4,getAdapter:t4,mergeConfig:a4}=nt,Ce=nt.create({baseURL:""});function tr(n){n?Ce.defaults.headers.common.Authorization=`Bearer ${n}`:delete Ce.defaults.headers.common.Authorization}let td=null;function Z2(n){td=n}let _x=null;function J2(n){_x=n}Ce.interceptors.request.use(n=>{if(!n.headers.Authorization){const r=localStorage.getItem("access_token");r&&(n.headers.Authorization=`Bearer ${r}`)}return n});Ce.interceptors.response.use(n=>n,async n=>{const r=n.config;if(r.url?.startsWith("/api/auth/"))return Promise.reject(n);if(n.response?.status===401&&!r._retry&&td){r._retry=!0;const s=await td();if(s)return r.headers.Authorization=`Bearer ${s}`,Ce(r);_x?.()}return Promise.reject(n)});async function $2(){const{data:n}=await Ce.get("/api/auth/setup-status");return n}async function Mx(n,r,s){const{data:i}=await Ce.post("/api/auth/setup",{email:n,password:r,username:s});return i}async function P2(n,r){const{data:s}=await Ce.post("/api/auth/login",{email:n,password:r});return s}async function I2(n){const{data:r}=await Ce.post("/api/auth/refresh",{refresh_token:n});return r}const Ax=S.createContext(void 0),cs="jarvis-admin:access_token",Wl="jarvis-admin:refresh_token",qi="jarvis-admin:user",W2=600*1e3;function ew({children:n}){const[r,s]=S.useState(()=>{const v=localStorage.getItem(cs),g=localStorage.getItem(Wl),y=localStorage.getItem(qi);if(v&&g&&y)try{const p=JSON.parse(y);return tr(v),{user:p,accessToken:v,refreshToken:g,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(cs),localStorage.removeItem(Wl),localStorage.removeItem(qi),tr(null),s({user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null})},[]),d=S.useCallback(async()=>{const v=localStorage.getItem(Wl);if(!v)return null;try{const g=await I2(v),y=g.access_token,p=g.refresh_token??v;return localStorage.setItem(cs,y),localStorage.setItem(Wl,p),tr(y),s(N=>({...N,accessToken:y,refreshToken:p})),y}catch{return i(),null}},[i]);S.useEffect(()=>{Z2(d),J2(i)},[d,i]),S.useEffect(()=>{if(!r.isAuthenticated)return;const v=setInterval(()=>{d()},W2);return()=>clearInterval(v)},[r.isAuthenticated,d]);const f=S.useCallback(async(v,g)=>{s(y=>({...y,error:null,isLoading:!0}));try{const y=await P2(v,g);if(!y.user.is_superuser){s(p=>({...p,isLoading:!1,error:"Admin access required. This account is not a superuser."}));return}localStorage.setItem(cs,y.access_token),localStorage.setItem(Wl,y.refresh_token),localStorage.setItem(qi,JSON.stringify(y.user)),tr(y.access_token),s({user:y.user,accessToken:y.access_token,refreshToken:y.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(y){const p=y?.response?.data?.detail??"Login failed";s(N=>({...N,isLoading:!1,error:p}))}},[]),m=S.useCallback(async(v,g,y)=>{s(p=>({...p,error:null,isLoading:!0}));try{const p=await Mx(v,g,y);localStorage.setItem(cs,p.access_token),localStorage.setItem(Wl,p.refresh_token),localStorage.setItem(qi,JSON.stringify(p.user)),tr(p.access_token),s({user:p.user,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(p){const N=p?.response?.data?.detail??"Setup failed";s(M=>({...M,isLoading:!1,error:N}))}},[]),x=S.useMemo(()=>({state:r,login:f,setup:m,logout:i}),[r,f,m,i]);return u.jsx(Ax.Provider,{value:x,children:n})}function Nd(){const n=S.useContext(Ax);if(!n)throw new Error("useAuth must be used within AuthProvider");return n}const Ox=(...n)=>n.filter((r,s,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===s).join(" ").trim();const tw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const aw=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,i)=>i?i.toUpperCase():s.toLowerCase());const hg=n=>{const r=aw(n);return r.charAt(0).toUpperCase()+r.slice(1)};var nw={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 lw=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const rw=S.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:d="",children:f,iconNode:m,...x},v)=>S.createElement("svg",{ref:v,...nw,width:r,height:r,stroke:n,strokeWidth:i?Number(s)*24/Number(r):s,className:Ox("lucide",d),...!f&&!lw(x)&&{"aria-hidden":"true"},...x},[...m.map(([g,y])=>S.createElement(g,y)),...Array.isArray(f)?f:[f]]));const Ne=(n,r)=>{const s=S.forwardRef(({className:i,...d},f)=>S.createElement(rw,{ref:f,iconNode:r,className:Ox(`lucide-${tw(hg(n))}`,`lucide-${n}`,i),...d}));return s.displayName=hg(n),s};const sw=[["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"}]],iw=Ne("box",sw);const ow=[["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"}]],ad=Ne("brain",ow);const cw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jd=Ne("check",cw);const uw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ed=Ne("chevron-down",uw);const dw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zx=Ne("chevron-right",dw);const fw=[["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"}]],kx=Ne("circle-alert",fw);const mw=[["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"}]],Dx=Ne("circle-arrow-up",mw);const hw=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pw=Ne("circle-check-big",hw);const gw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ca=Ne("circle-check",gw);const xw=[["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"}]],$i=Ne("circle-x",xw);const vw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nd=Ne("circle",vw);const yw=[["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"}]],Ux=Ne("copy",yw);const bw=[["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"}]],hs=Ne("cpu",bw);const Sw=[["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"}]],ww=Ne("database",Sw);const Nw=[["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"}]],ds=Ne("download",Nw);const jw=[["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"}]],Ew=Ne("external-link",jw);const Rw=[["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"}]],Tw=Ne("file-text",Rw);const Cw=[["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"}]],Rd=Ne("hard-drive",Cw);const _w=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Mw=Ne("info",_w);const Aw=[["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"}]],Ow=Ne("key",Aw);const zw=[["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"}]],kw=Ne("layout-dashboard",zw);const Dw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ma=Ne("loader-circle",Dw);const Uw=[["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"}]],Td=Ne("lock",Uw);const Lw=[["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"}]],Bw=Ne("log-out",Lw);const Hw=[["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"}]],qw=Ne("monitor",Hw);const Gw=[["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"}]],Qw=Ne("moon",Gw);const Vw=[["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"}]],Yw=Ne("pencil",Vw);const Fw=[["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"}]],Xw=Ne("play",Fw);const Kw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zw=Ne("plus",Kw);const Jw=[["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"}]],va=Ne("refresh-cw",Jw);const $w=[["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"}]],uo=Ne("rotate-ccw",$w);const Pw=[["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"}]],Lx=Ne("rotate-cw",Pw);const Iw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ww=Ne("search",Iw);const eN=[["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"}]],Cd=Ne("server",eN);const tN=[["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"}]],Bx=Ne("settings",tN);const aN=[["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"}]],nN=Ne("sparkles",aN);const lN=[["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"}]],rN=Ne("sun",lN);const sN=[["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"}]],Hx=Ne("trash-2",sN);const iN=[["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"}]],Aa=Ne("triangle-alert",iN);const oN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qx=Ne("x",oN);const cN=[["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"}]],uN=Ne("zap-off",cN);const dN=[["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"}]],fN=Ne("zap",dN);function Gx(n){var r,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var d=n.length;for(r=0;r<d;r++)n[r]&&(s=Gx(n[r]))&&(i&&(i+=" "),i+=s)}else for(s in n)n[s]&&(i&&(i+=" "),i+=s);return i}function mN(){for(var n,r,s=0,i="",d=arguments.length;s<d;s++)(n=arguments[s])&&(r=Gx(n))&&(i&&(i+=" "),i+=r);return i}const hN=(n,r)=>{const s=new Array(n.length+r.length);for(let i=0;i<n.length;i++)s[i]=n[i];for(let i=0;i<r.length;i++)s[n.length+i]=r[i];return s},pN=(n,r)=>({classGroupId:n,validator:r}),Qx=(n=new Map,r=null,s)=>({nextPart:n,validators:r,classGroupId:s}),ao="-",pg=[],gN="arbitrary..",xN=n=>{const r=yN(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return vN(m);const x=m.split(ao),v=x[0]===""&&x.length>1?1:0;return Vx(x,v,r)},getConflictingClassGroupIds:(m,x)=>{if(x){const v=i[m],g=s[m];return v?g?hN(g,v):v:g||pg}return s[m]||pg}}},Vx=(n,r,s)=>{if(n.length-r===0)return s.classGroupId;const d=n[r],f=s.nextPart.get(d);if(f){const g=Vx(n,r+1,f);if(g)return g}const m=s.validators;if(m===null)return;const x=r===0?n.join(ao):n.slice(r).join(ao),v=m.length;for(let g=0;g<v;g++){const y=m[g];if(y.validator(x))return y.classGroupId}},vN=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),s=r.indexOf(":"),i=r.slice(0,s);return i?gN+i:void 0})(),yN=n=>{const{theme:r,classGroups:s}=n;return bN(s,r)},bN=(n,r)=>{const s=Qx();for(const i in n){const d=n[i];_d(d,s,i,r)}return s},_d=(n,r,s,i)=>{const d=n.length;for(let f=0;f<d;f++){const m=n[f];SN(m,r,s,i)}},SN=(n,r,s,i)=>{if(typeof n=="string"){wN(n,r,s);return}if(typeof n=="function"){NN(n,r,s,i);return}jN(n,r,s,i)},wN=(n,r,s)=>{const i=n===""?r:Yx(r,n);i.classGroupId=s},NN=(n,r,s,i)=>{if(EN(n)){_d(n(i),r,s,i);return}r.validators===null&&(r.validators=[]),r.validators.push(pN(s,n))},jN=(n,r,s,i)=>{const d=Object.entries(n),f=d.length;for(let m=0;m<f;m++){const[x,v]=d[m];_d(v,Yx(r,x),s,i)}},Yx=(n,r)=>{let s=n;const i=r.split(ao),d=i.length;for(let f=0;f<d;f++){const m=i[f];let x=s.nextPart.get(m);x||(x=Qx(),s.nextPart.set(m,x)),s=x}return s},EN=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,RN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),i=Object.create(null);const d=(f,m)=>{s[f]=m,r++,r>n&&(r=0,i=s,s=Object.create(null))};return{get(f){let m=s[f];if(m!==void 0)return m;if((m=i[f])!==void 0)return d(f,m),m},set(f,m){f in s?s[f]=m:d(f,m)}}},ld="!",gg=":",TN=[],xg=(n,r,s,i,d)=>({modifiers:n,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:i,isExternal:d}),CN=n=>{const{prefix:r,experimentalParseClassName:s}=n;let i=d=>{const f=[];let m=0,x=0,v=0,g;const y=d.length;for(let j=0;j<y;j++){const T=d[j];if(m===0&&x===0){if(T===gg){f.push(d.slice(v,j)),v=j+1;continue}if(T==="/"){g=j;continue}}T==="["?m++:T==="]"?m--:T==="("?x++:T===")"&&x--}const p=f.length===0?d:d.slice(v);let N=p,M=!1;p.endsWith(ld)?(N=p.slice(0,-1),M=!0):p.startsWith(ld)&&(N=p.slice(1),M=!0);const w=g&&g>v?g-v:void 0;return xg(f,M,N,w)};if(r){const d=r+gg,f=i;i=m=>m.startsWith(d)?f(m.slice(d.length)):xg(TN,!1,m,void 0,!0)}if(s){const d=i;i=f=>s({className:f,parseClassName:d})}return i},_N=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{r.set(s,1e6+i)}),s=>{const i=[];let d=[];for(let f=0;f<s.length;f++){const m=s[f],x=m[0]==="[",v=r.has(m);x||v?(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}},MN=n=>({cache:RN(n.cacheSize),parseClassName:CN(n),sortModifiers:_N(n),...xN(n)}),AN=/\s+/,ON=(n,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:d,sortModifiers:f}=r,m=[],x=n.trim().split(AN);let v="";for(let g=x.length-1;g>=0;g-=1){const y=x[g],{isExternal:p,modifiers:N,hasImportantModifier:M,baseClassName:w,maybePostfixModifierPosition:j}=s(y);if(p){v=y+(v.length>0?" "+v:v);continue}let T=!!j,z=i(T?w.substring(0,j):w);if(!z){if(!T){v=y+(v.length>0?" "+v:v);continue}if(z=i(w),!z){v=y+(v.length>0?" "+v:v);continue}T=!1}const _=N.length===0?"":N.length===1?N[0]:f(N).join(":"),V=M?_+ld:_,L=V+z;if(m.indexOf(L)>-1)continue;m.push(L);const ne=d(z,T);for(let I=0;I<ne.length;++I){const ee=ne[I];m.push(V+ee)}v=y+(v.length>0?" "+v:v)}return v},zN=(...n)=>{let r=0,s,i,d="";for(;r<n.length;)(s=n[r++])&&(i=Fx(s))&&(d&&(d+=" "),d+=i);return d},Fx=n=>{if(typeof n=="string")return n;let r,s="";for(let i=0;i<n.length;i++)n[i]&&(r=Fx(n[i]))&&(s&&(s+=" "),s+=r);return s},kN=(n,...r)=>{let s,i,d,f;const m=v=>{const g=r.reduce((y,p)=>p(y),n());return s=MN(g),i=s.cache.get,d=s.cache.set,f=x,x(v)},x=v=>{const g=i(v);if(g)return g;const y=ON(v,s);return d(v,y),y};return f=m,(...v)=>f(zN(...v))},DN=[],ut=n=>{const r=s=>s[n]||DN;return r.isThemeGetter=!0,r},Xx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UN=/^\d+\/\d+$/,LN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BN=/\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$/,HN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,er=n=>UN.test(n),Re=n=>!!n&&!Number.isNaN(Number(n)),_n=n=>!!n&&Number.isInteger(Number(n)),Uu=n=>n.endsWith("%")&&Re(n.slice(0,-1)),Ia=n=>LN.test(n),QN=()=>!0,VN=n=>BN.test(n)&&!HN.test(n),Zx=()=>!1,YN=n=>qN.test(n),FN=n=>GN.test(n),XN=n=>!oe(n)&&!ce(n),KN=n=>cr(n,Px,Zx),oe=n=>Xx.test(n),nl=n=>cr(n,Ix,VN),Lu=n=>cr(n,IN,Re),vg=n=>cr(n,Jx,Zx),ZN=n=>cr(n,$x,FN),Gi=n=>cr(n,Wx,YN),ce=n=>Kx.test(n),us=n=>ur(n,Ix),JN=n=>ur(n,WN),yg=n=>ur(n,Jx),$N=n=>ur(n,Px),PN=n=>ur(n,$x),Qi=n=>ur(n,Wx,!0),cr=(n,r,s)=>{const i=Xx.exec(n);return i?i[1]?r(i[1]):s(i[2]):!1},ur=(n,r,s=!1)=>{const i=Kx.exec(n);return i?i[1]?r(i[1]):s:!1},Jx=n=>n==="position"||n==="percentage",$x=n=>n==="image"||n==="url",Px=n=>n==="length"||n==="size"||n==="bg-size",Ix=n=>n==="length",IN=n=>n==="number",WN=n=>n==="family-name",Wx=n=>n==="shadow",ej=()=>{const n=ut("color"),r=ut("font"),s=ut("text"),i=ut("font-weight"),d=ut("tracking"),f=ut("leading"),m=ut("breakpoint"),x=ut("container"),v=ut("spacing"),g=ut("radius"),y=ut("shadow"),p=ut("inset-shadow"),N=ut("text-shadow"),M=ut("drop-shadow"),w=ut("blur"),j=ut("perspective"),T=ut("aspect"),z=ut("ease"),_=ut("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ne=()=>[...L(),ce,oe],I=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto","contain","none"],$=()=>[ce,oe,v],P=()=>[er,"full","auto",...$()],re=()=>[_n,"none","subgrid",ce,oe],se=()=>["auto",{span:["full",_n,ce,oe]},_n,ce,oe],he=()=>[_n,"auto",ce,oe],Ae=()=>["auto","min","max","fr",ce,oe],De=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Be=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...$()],Z=()=>[er,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],X=()=>[n,ce,oe],xe=()=>[...L(),yg,vg,{position:[ce,oe]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",$N,KN,{size:[ce,oe]}],G=()=>[Uu,us,nl],Q=()=>["","none","full",g,ce,oe],J=()=>["",Re,us,nl],le=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Re,Uu,yg,vg],be=()=>["","none",w,ce,oe],B=()=>["none",Re,ce,oe],W=()=>["none",Re,ce,oe],Ee=()=>[Re,ce,oe],Te=()=>[er,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ia],breakpoint:[Ia],color:[QN],container:[Ia],"drop-shadow":[Ia],ease:["in","out","in-out"],font:[XN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ia],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ia],shadow:[Ia],spacing:["px",Re],text:[Ia],"text-shadow":[Ia],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",er,oe,ce,T]}],container:["container"],columns:[{columns:[Re,oe,ce,x]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",ce,oe]}],basis:[{basis:[er,"full","auto",x,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,er,"auto","initial","none",oe]}],grow:[{grow:["",Re,ce,oe]}],shrink:[{shrink:["",Re,ce,oe]}],order:[{order:[_n,"first","last","none",ce,oe]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:se()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:se()}],"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":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...De(),"normal"]}],"justify-items":[{"justify-items":[...Be(),"normal"]}],"justify-self":[{"justify-self":["auto",...Be()]}],"align-content":[{content:["normal",...De()]}],"align-items":[{items:[...Be(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Be(),{baseline:["","last"]}]}],"place-content":[{"place-content":De()}],"place-items":[{"place-items":[...Be(),"baseline"]}],"place-self":[{"place-self":["auto",...Be()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[x,"screen",...Z()]}],"min-w":[{"min-w":[x,"screen","none",...Z()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[m]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",s,us,nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ce,Lu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uu,oe]}],"font-family":[{font:[JN,oe,r]}],"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,oe]}],"line-clamp":[{"line-clamp":[Re,"none",ce,Lu]}],leading:[{leading:[f,...$()]}],"list-image":[{"list-image":["none",ce,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",ce,nl]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[Re,"auto",ce,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,oe]}],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,oe]}],"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:ge()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,ce,oe],radial:["",ce,oe],conic:[_n,ce,oe]},PN,ZN]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,ce,oe]}],"outline-w":[{outline:["",Re,us,nl]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","none",y,Qi,Gi]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",p,Qi,Gi]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[Re,nl]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",N,Qi,Gi]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[Re,ce,oe]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"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":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[ce,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"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":L()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:xe()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,oe]}],filter:[{filter:["","none",ce,oe]}],blur:[{blur:be()}],brightness:[{brightness:[Re,ce,oe]}],contrast:[{contrast:[Re,ce,oe]}],"drop-shadow":[{"drop-shadow":["","none",M,Qi,Gi]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",Re,ce,oe]}],"hue-rotate":[{"hue-rotate":[Re,ce,oe]}],invert:[{invert:["",Re,ce,oe]}],saturate:[{saturate:[Re,ce,oe]}],sepia:[{sepia:["",Re,ce,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,oe]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[Re,ce,oe]}],"backdrop-contrast":[{"backdrop-contrast":[Re,ce,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,ce,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,ce,oe]}],"backdrop-invert":[{"backdrop-invert":["",Re,ce,oe]}],"backdrop-opacity":[{"backdrop-opacity":[Re,ce,oe]}],"backdrop-saturate":[{"backdrop-saturate":[Re,ce,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,ce,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",ce,oe]}],ease:[{ease:["linear","initial",z,ce,oe]}],delay:[{delay:[Re,ce,oe]}],animate:[{animate:["none",_,ce,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,ce,oe]}],"perspective-origin":[{"perspective-origin":ne()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[ce,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:ne()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"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,oe]}],"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":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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,oe]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[Re,us,nl,Lu]}],stroke:[{stroke:["none",...X()]}],"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"]}},tj=kN(ej);function ae(...n){return tj(mN(n))}async function aj(){const{data:n}=await Ce.get("/api/system/info");return n}function nj(){return Oa({queryKey:["system-info"],queryFn:aj,staleTime:6e4})}function lj(n){const r=Math.floor(n/86400),s=Math.floor(n%86400/3600);if(r>0)return`${r}d ${s}h`;const i=Math.floor(n%3600/60);return s>0?`${s}h ${i}m`:`${i}m`}function rj(){const{data:n}=nj();return n?u.jsxs("div",{className:"border-t border-[var(--color-border)] px-3 py-2 text-[10px] text-[var(--color-text-muted)]",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(hs,{size:10}),u.jsxs("span",{children:[n.cpuCount," cores"]}),u.jsx("span",{className:"mx-0.5",children:"|"}),u.jsx(Rd,{size:10}),u.jsxs("span",{children:[Math.round(n.totalMemoryMb/1024),"GB"]})]}),u.jsxs("div",{className:"mt-0.5",children:[n.hostname," · up ",lj(n.uptime)," · v",n.version]})]}):null}const sj=[{label:"Dashboard",icon:kw,path:"/dashboard"},{label:"Settings",icon:Bx,path:"/settings"},{label:"Services",icon:Cd,path:"/services"},{label:"Models",icon:iw,path:"/models"},{label:"Nodes",icon:hs,path:"/nodes"}];function ij(){return u.jsxs("aside",{className:"flex w-56 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsx("div",{className:"flex h-14 items-center border-b border-[var(--color-border)] px-4",children:u.jsx("span",{className:"text-lg font-bold text-[var(--color-primary)]",children:"Jarvis"})}),u.jsx("nav",{className:"flex-1 space-y-1 p-2",children:sj.map(n=>u.jsxs(Xg,{to:n.path,className:({isActive:r})=>ae("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",r?"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:[u.jsx(n.icon,{size:18}),n.label]},n.path))}),u.jsx(rj,{})]})}function oj(){const{state:n,logout:r}=Nd(),{theme:s,toggleTheme:i}=vS();return u.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-surface)] px-6",children:[u.jsx("h2",{className:"text-sm font-medium text-[var(--color-text-muted)]",children:"Admin Dashboard"}),u.jsxs("div",{className:"flex items-center gap-3",children:[n.user&&u.jsx("span",{className:"text-sm text-[var(--color-text-muted)]",children:n.user.email}),u.jsx("button",{onClick:i,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",title:`Switch to ${s==="dark"?"light":"dark"} mode`,children:s==="dark"?u.jsx(rN,{size:18}):u.jsx(Qw,{size:18})}),u.jsx("button",{onClick:r,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-red-500",title:"Logout",children:u.jsx(Bw,{size:18})})]})]})}function cj(){const{state:n}=Nd();return n.isLoading?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading..."})}):n.isAuthenticated?u.jsxs("div",{className:"flex h-screen bg-[var(--color-background)]",children:[u.jsx(ij,{}),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[u.jsx(oj,{}),u.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:u.jsx(jb,{})})]})]}):u.jsx(Ii,{to:"/login",replace:!0})}function uj(){const{state:n,login:r,setup:s}=Nd(),i=On(),[d,f]=S.useState("loading"),[m,x]=S.useState(""),[v,g]=S.useState(""),[y,p]=S.useState(""),[N,M]=S.useState(""),[w,j]=S.useState(null);if(S.useEffect(()=>{let L=!1;async function ne(){try{const{data:I}=await Ce.get("/api/setup/status");if(!L&&!I.configured){i("/setup",{replace:!0});return}}catch{if(!L){i("/setup",{replace:!0});return}}try{const I=await $2();L||f(I.needs_setup?"setup":"login")}catch{L||f("login")}}return ne(),()=>{L=!0}},[i]),n.isAuthenticated)return u.jsx(Ii,{to:"/settings",replace:!0});const T=L=>{L.preventDefault(),r(m,y)},z=L=>{if(L.preventDefault(),j(null),y!==N){j("Passwords do not match");return}if(y.length<8){j("Password must be at least 8 characters");return}s(m,y,v||void 0)},_=ae("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)]"),V=w??n.error;return d==="loading"?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:u.jsx("div",{className:"flex justify-center",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-border)] border-t-[var(--color-primary)]"})})})}):u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.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"?u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"mb-1 text-center text-2xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),u.jsx("p",{className:"mb-6 text-center text-sm text-[var(--color-text-muted)]",children:"Set up your first administrator account to get started."}),u.jsxs("form",{onSubmit:z,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>x(L.target.value),className:_,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Username"}),u.jsx("input",{id:"username",type:"text",required:!0,autoComplete:"username",value:v,onChange:L=>g(L.target.value),className:_,placeholder:"admin"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:y,onChange:L=>p(L.target.value),className:_})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),u.jsx("input",{id:"confirm-password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:N,onChange:L=>M(L.target.value),className:_})]}),V&&u.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:V}),u.jsx("button",{type:"submit",disabled:n.isLoading,className:ae("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:n.isLoading?"Creating account...":"Create Admin Account"})]})]}):u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"mb-6 text-center text-2xl font-bold text-[var(--color-text)]",children:"Jarvis Admin"}),u.jsxs("form",{onSubmit:T,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>x(L.target.value),className:_,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",required:!0,autoComplete:"current-password",value:y,onChange:L=>p(L.target.value),className:_})]}),V&&u.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:V}),u.jsx("button",{type:"submit",disabled:n.isLoading,className:ae("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:n.isLoading?"Signing in...":"Sign in"})]})]})})})}async function dj(){const{data:n}=await Ce.get("/api/settings/");return n}async function fj(n,r,s){const{data:i}=await Ce.put(`/api/settings/${encodeURIComponent(n)}/${r}`,{value:s});return i}function mj(){return Oa({queryKey:["settings"],queryFn:dj,staleTime:3e4})}function hj(){const n=ua();return ba({mutationFn:({serviceName:r,key:s,value:i})=>fj(r,s,i),onSuccess:()=>{n.invalidateQueries({queryKey:["settings"]})}})}function pj({setting:n,onSave:r,onCancel:s,isSaving:i}){const[d,f]=S.useState(()=>n.value_type==="json"?JSON.stringify(n.value,null,2):n.value_type==="bool"?"":String(n.value??"")),[m,x]=S.useState(()=>!!n.value),[v,g]=S.useState(null),y=!!n.options?.length,p=y&&!n.options.includes(d),[N,M]=S.useState(p),w=T=>{T.preventDefault();let z;switch(n.value_type){case"bool":z=m;break;case"int":if(z=parseInt(d,10),isNaN(z)){g("Must be a whole number");return}g(null);break;case"float":if(z=parseFloat(d),isNaN(z)){g("Must be a number");return}g(null);break;case"json":try{z=JSON.parse(d),g(null)}catch{g("Invalid JSON");return}break;default:z=d}r(z)},j=ae("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 u.jsxs("form",{onSubmit:w,className:"flex items-center gap-2",children:[y?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("select",{value:N?"__other__":d,onChange:T=>{T.target.value==="__other__"?(M(!0),f("")):(M(!1),f(T.target.value))},className:ae(j,"max-w-xs"),children:[n.options.map(T=>u.jsx("option",{value:String(T),children:String(T)},String(T))),u.jsx("option",{value:"__other__",children:"Other..."})]}),N&&u.jsx("input",{type:"text",value:d,onChange:T=>f(T.target.value),placeholder:"Custom value",className:ae(j,"max-w-xs"),autoFocus:!0})]}):n.value_type==="bool"?u.jsx("button",{type:"button",onClick:()=>x(T=>!T),className:ae("relative h-6 w-11 rounded-full transition-colors",m?"bg-[var(--color-primary)]":"bg-[var(--color-border)]"),children:u.jsx("span",{className:ae("absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition-transform",m&&"translate-x-5")})}):n.value_type==="json"?u.jsxs("div",{className:"flex-1",children:[u.jsx("textarea",{value:d,onChange:T=>{f(T.target.value),g(null)},rows:4,className:ae(j,"font-mono text-xs")}),v&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:v})]}):u.jsxs("div",{children:[u.jsx("input",{type:n.value_type==="int"||n.value_type==="float"?"number":n.is_secret?"password":"text",step:n.value_type==="float"?"any":void 0,value:d,onChange:T=>{f(T.target.value),g(null)},className:ae(j,"max-w-xs")}),v&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:v})]}),u.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"}),u.jsx("button",{type:"button",onClick:s,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 gj(n){return n.is_secret?"********":n.value===null||n.value===void 0?"(not set)":n.value_type==="json"?JSON.stringify(n.value):String(n.value)}const xj={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 vj({setting:n,serviceName:r,onRestartService:s}){const[i,d]=S.useState(!1),f=hj(),m=x=>{f.mutate({serviceName:r,key:n.key,value:x},{onSuccess:v=>{d(!1),v.requires_reload?Fe.warning(`Setting updated. ${r} requires a restart to apply.`,s?{action:{label:"Restart",onClick:s}}:void 0):Fe.success("Setting updated")},onError:v=>{Fe.error(`Failed to update: ${v.message}`)}})};return u.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-lg px-3 py-2 hover:bg-[var(--color-surface-alt)]",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"text-sm font-medium text-[var(--color-text)]",children:n.key}),u.jsx("span",{className:ae("rounded px-1.5 py-0.5 text-[10px] font-medium",xj[n.value_type]??"bg-gray-500/10 text-gray-500"),children:n.value_type}),n.from_db&&u.jsx("span",{title:"Stored in database",children:u.jsx(ww,{size:12,className:"text-[var(--color-tertiary)]"})}),n.requires_reload&&u.jsx("span",{title:"Requires service restart",children:u.jsx(Aa,{size:12,className:"text-amber-500"})})]}),n.description&&u.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:n.description}),i?u.jsx("div",{className:"mt-2",children:u.jsx(pj,{setting:n,onSave:m,onCancel:()=>d(!1),isSaving:f.isPending})}):u.jsx("p",{className:"mt-1 font-mono text-xs text-[var(--color-text-muted)]",children:gj(n)})]}),!i&&u.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:u.jsx(Yw,{size:14})})]})}function yj({category:n,settings:r,serviceName:s,onRestartService:i}){const[d,f]=S.useState(!0);return u.jsxs("div",{children:[u.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?u.jsx(Ed,{size:14}):u.jsx(zx,{size:14}),n,u.jsxs("span",{className:"font-normal",children:["(",r.length,")"]})]}),d&&u.jsx("div",{className:"space-y-0.5",children:r.map(m=>u.jsx(vj,{setting:m,serviceName:s,onRestartService:i},m.key))})]})}async function bj(){const{data:n}=await Ce.get("/api/containers");return n}async function Sj(n){const{data:r}=await Ce.post(`/api/containers/${n}/restart`);return r}function ev(){return Oa({queryKey:["containers"],queryFn:bj,staleTime:1e4,refetchInterval:1e4})}function tv(){const n=ua();return ba({mutationFn:r=>Sj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["containers"]})}})}function wj({result:n,defaultExpanded:r=!1}){const[s,i]=S.useState(r),{data:d}=ev(),f=tv(),m=S.useCallback(()=>{const v=d?.containers.find(g=>g.name.includes(n.service_name)||g.name.includes(n.service_name.replace("jarvis-","")));v?f.mutate(v.id,{onSuccess:()=>Fe.success(`${n.service_name} is restarting...`),onError:g=>Fe.error(`Restart failed: ${g.message}`)}):Fe.error(`Could not find container for ${n.service_name}`)},[d,n.service_name,f]),x=S.useMemo(()=>{const v=new Map;for(const g of n.settings){const y=v.get(g.category)??[];v.set(g.category,[...y,g])}return v},[n]);return u.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsxs("button",{onClick:()=>i(v=>!v),className:"flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-[var(--color-surface-alt)]",children:[s?u.jsx(Ed,{size:18,className:"text-[var(--color-text-muted)]"}):u.jsx(zx,{size:18,className:"text-[var(--color-text-muted)]"}),u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.service_name}),n.success?u.jsx(ca,{size:16,className:"text-[var(--color-secondary)]"}):u.jsx($i,{size:16,className:"text-red-500"}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n.success?`${n.settings.length} settings`:n.error??"Error"}),n.latency_ms!=null&&u.jsxs("span",{className:ae("ml-auto text-xs",n.latency_ms>500?"text-amber-500":"text-[var(--color-text-muted)]"),children:[Math.round(n.latency_ms),"ms"]})]}),s&&n.success&&u.jsx("div",{className:"space-y-2 border-t border-[var(--color-border)] px-2 py-3",children:[...x.entries()].map(([v,g])=>u.jsx(yj,{category:v,settings:g,serviceName:n.service_name,onRestartService:m},v))}),s&&!n.success&&u.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-3",children:u.jsx("p",{className:"text-sm text-red-500",children:n.error??"Failed to fetch settings"})})]})}function Nj(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=mj(),[m,x]=S.useState(""),v=S.useMemo(()=>{if(!n)return[];if(!m.trim())return n.services;const g=m.toLowerCase();return n.services.map(y=>({...y,settings:y.settings.filter(p=>p.key.toLowerCase().includes(g)||p.category.toLowerCase().includes(g)||(p.description?.toLowerCase().includes(g)??!1))})).filter(y=>y.settings.length>0||y.service_name.toLowerCase().includes(g))},[n,m]);return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load settings"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Settings"}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[n&&u.jsxs("span",{children:[n.successful_services,"/",n.total_services," services"]}),u.jsx("button",{onClick:()=>d(),disabled:f,className:ae("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14})})]})]}),u.jsxs("div",{className:"relative",children:[u.jsx(Ww,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"}),u.jsx("input",{type:"text",value:m,onChange:g=>x(g.target.value),placeholder:"Search settings...",className:ae("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)]")})]}),u.jsxs("div",{className:"space-y-3",children:[v.map((g,y)=>u.jsx(wj,{result:g,defaultExpanded:y===0},g.service_name)),v.length===0&&u.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 jj(){const{data:n}=await Ce.get("/api/services/registry");return n}async function Ej(n){const{data:r}=await Ce.post("/api/services/register",n);return r}async function Rj(n){const{data:r}=await Ce.post("/api/services/rotate-key",n);return r}async function Tj(n){const{data:r}=await Ce.post("/api/services/probe",n);return r}async function Cj(n){const{data:r}=await Ce.post("/api/services/register",{services:[{name:n.name,host:n.host,port:n.port,scheme:n.scheme,health_path:n.health_path,description:n.description}]});return r}async function _j(n){await Ce.delete(`/api/services/${encodeURIComponent(n)}`)}async function Mj(){const{data:n}=await Ce.get("/api/services/suggestions");return n}function Aj(){return Oa({queryKey:["service-registry"],queryFn:jj,staleTime:3e4})}function Oj(){const n=ua();return ba({mutationFn:Ej,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function zj(){const n=ua();return ba({mutationFn:Rj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function kj(){const n=ua();return ba({mutationFn:Cj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function Dj(){const n=ua();return ba({mutationFn:_j,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function Uj(){return Oa({queryKey:["service-suggestions"],queryFn:Mj,staleTime:6e4})}function bg({ok:n,label:r}){return u.jsxs("span",{className:ae("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:[n?u.jsx(jd,{size:12}):u.jsx(qx,{size:12}),r]})}function Lj({status:n,error:r,latency:s}){return n==="idle"?null:n==="probing"?u.jsx("span",{className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)]",children:u.jsx(Ma,{size:12,className:"animate-spin"})}):n==="healthy"?u.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[u.jsx(nd,{size:8,fill:"currentColor"}),s!=null&&`${s}ms`]}):u.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-500",title:r,children:[u.jsx(nd,{size:8,fill:"currentColor"}),r||"Unreachable"]})}function Bj({entry:n,checked:r,host:s,port:i,scheme:d,onToggle:f,onHostChange:m,onPortChange:x,onSchemeChange:v,onHostBlur:g,onPortBlur:y,onRotateKey:p,onDelete:N,disabled:M,rotating:w,deleting:j,healthStatus:T,healthError:z,healthLatency:_}){return u.jsxs("div",{className:ae("flex flex-wrap items-center gap-3 rounded-lg border border-[var(--color-border)] p-3","bg-[var(--color-surface)] transition-colors",r&&"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5"),children:[u.jsx("input",{type:"checkbox",checked:r,onChange:f,disabled:M,className:"h-4 w-4 rounded border-[var(--color-border)] accent-[var(--color-primary)]"}),u.jsxs("div",{className:"min-w-[180px] flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-[var(--color-text)]",children:[n.name,n.custom&&u.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"})]}),u.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:n.description})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(bg,{ok:n.config_registered,label:"Config"}),u.jsx(bg,{ok:n.auth_registered,label:"Auth"}),n.custom&&N&&u.jsxs("button",{onClick:N,disabled:M||j,className:ae("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:[u.jsx(Hx,{size:12,className:j?"animate-spin":""}),"Remove"]}),n.auth_registered&&u.jsxs("button",{onClick:p,disabled:M||w,className:ae("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:[u.jsx(Lx,{size:12,className:w?"animate-spin":""}),"Rotate Key"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{type:"button",onClick:()=>{const V=["http","https","mqtt"],L=V[(V.indexOf(d)+1)%V.length];v(L)},disabled:M,className:ae("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"?"border-purple-500/40 bg-purple-500/10 text-purple-600 dark:text-purple-400":"border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-text-muted)]","disabled:opacity-50"),title:"Toggle scheme",children:d}),u.jsx("input",{type:"text",value:s,onChange:V=>m(V.target.value),onBlur:g,disabled:M,placeholder:"host",className:ae("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")}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:":"}),u.jsx("input",{type:"number",value:i,onChange:V=>x(Number(V.target.value)),onBlur:y,disabled:M,className:ae("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")}),u.jsx(Lj,{status:T,error:z,latency:_})]})]})}const Sg={name:"",host:"localhost",port:"",scheme:"http",health_path:"/health",description:""};function Hj(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=Aj(),m=Oj(),x=zj(),v=kj(),g=Dj(),{data:y}=Uj(),[p,N]=S.useState({}),[M,w]=S.useState(null),[j,T]=S.useState(null),[z,_]=S.useState(null),[V,L]=S.useState(null),[ne,I]=S.useState(null),[ee,$]=S.useState({}),[P,re]=S.useState(!1),[se,he]=S.useState(Sg),[Ae,De]=S.useState(!1),Be=S.useRef(null),O=S.useMemo(()=>new Set(n?.services.map(B=>B.name)??[]),[n]),Z=S.useMemo(()=>{const W=(y?.suggestions??[]).filter(Te=>!O.has(Te.id));if(!se.name.trim())return W;const Ee=se.name.toLowerCase();return W.filter(Te=>Te.id.toLowerCase().includes(Ee)||Te.name.toLowerCase().includes(Ee)||Te.description.toLowerCase().includes(Ee))},[y,O,se.name]),X=S.useCallback(B=>{he({name:B.id,description:B.description,host:"localhost",port:String(B.port),scheme:"http",health_path:B.healthCheck}),De(!1)},[]);S.useEffect(()=>{const B=W=>{Be.current&&!Be.current.contains(W.target)&&De(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const xe=S.useCallback(B=>{if(p[B])return p[B];const W=n?.services.find(Ee=>Ee.name===B);return W?{checked:W.config_registered,host:W.current_host??"localhost",port:W.current_port??W.default_port,scheme:W.current_scheme??"http"}:{checked:!1,host:"localhost",port:0,scheme:"http"}},[p,n]),ge=S.useCallback((B,W)=>{N(Ee=>{const Te=Ee[B]??{checked:!1,host:"localhost",port:0};return{...Ee,[B]:{...Te,...W}}})},[]),R=S.useCallback(async(B,W,Ee,Te,da="http")=>{if(!(!W||!Ee)){$(ot=>({...ot,[B]:{status:"probing"}}));try{const ot=await Tj({host:W,port:Ee,health_path:Te,scheme:da});$(zn=>({...zn,[B]:{status:ot.healthy?"healthy":"unhealthy",error:ot.error??void 0,latency:ot.latency_ms??void 0}}))}catch{$(ot=>({...ot,[B]:{status:"unhealthy",error:"Request failed"}}))}}},[]),G=S.useCallback(()=>{if(!n)return;const B=n.services.filter(W=>xe(W.name).checked).map(W=>{const Ee=xe(W.name);return{name:W.name,host:Ee.host,port:Ee.port,scheme:Ee.scheme}});if(B.length===0){Fe.error("No services selected");return}w(null),T(null),m.mutate({services:B},{onSuccess:W=>{w(W.results);const Ee=W.results.filter(da=>da.config_ok&&da.auth_ok).length,Te=W.results.length;Ee===Te?Fe.success(`All ${Te} services registered`):Fe.warning(`${Ee}/${Te} services registered successfully`)},onError:W=>{Fe.error(`Registration failed: ${W.message}`)}})},[n,xe,m]),Q=S.useCallback(B=>{_(B),T(null),x.mutate({service_name:B},{onSuccess:W=>{T(W),_(null),Fe.success(`Key rotated for ${B}`)},onError:W=>{_(null),Fe.error(`Key rotation failed: ${W.message}`)}})},[x]),J=S.useCallback(B=>{L(B),g.mutate(B,{onSuccess:()=>{L(null),Fe.success(`Removed ${B}`)},onError:W=>{L(null),Fe.error(`Failed to remove: ${W.message}`)}})},[g]),le=S.useCallback(()=>{const B=parseInt(se.port,10);if(!se.name.trim()){Fe.error("Service name is required");return}if(!B||B<1||B>65535){Fe.error("Port must be between 1 and 65535");return}v.mutate({name:se.name.trim(),host:se.host.trim()||"localhost",port:B,scheme:se.scheme,health_path:se.health_path.trim()||"/health",description:se.description.trim()},{onSuccess:W=>{const Ee=W.results[0];Ee?.config_ok?(Fe.success(`Added ${se.name.trim()}`),he(Sg),re(!1)):Fe.error(`Failed to add: ${Ee?.error??"Unknown error"}`)},onError:W=>{Fe.error(`Failed to add service: ${W.message}`)}})},[se,v]),fe=S.useCallback(B=>{navigator.clipboard.writeText(B).then(()=>{I(B),setTimeout(()=>I(null),2e3)})},[]),de=n?.services.filter(B=>xe(B.name).checked).length??0,be=M?.some(B=>B.env_written)||j?.env_written===!0;return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load service registry"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Services"}),u.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:n?.services.length??0})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("button",{onClick:()=>re(B=>!B),className:ae("flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium",P?"bg-[var(--color-surface-alt)] text-[var(--color-text)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:[P?u.jsx(qx,{size:14}):u.jsx(Zw,{size:14}),P?"Cancel":"Add Service"]}),u.jsx("button",{onClick:()=>d(),disabled:f,className:ae("rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14})})]})]}),P&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Add Service"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{ref:Be,className:"relative",children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Service"}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:"text",value:se.name,onChange:B=>{he(W=>({...W,name:B.target.value})),De(!0)},onFocus:()=>De(!0),placeholder:"Select or type a service name...",className:ae("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)]")}),u.jsx("button",{type:"button",onClick:()=>De(B=>!B),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:u.jsx(Ed,{size:14})})]}),Ae&&Z.length>0&&u.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:Z.map(B=>u.jsxs("button",{type:"button",onClick:()=>X(B),className:"flex w-full flex-col px-3 py-2 text-left hover:bg-[var(--color-surface-alt)]",children:[u.jsxs("span",{className:"text-sm font-medium text-[var(--color-text)]",children:[B.name,u.jsxs("span",{className:"ml-2 font-normal text-[var(--color-text-muted)]",children:[":",B.port]})]}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:B.description})]},B.id))})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Description"}),u.jsx("input",{type:"text",value:se.description,onChange:B=>he(W=>({...W,description:B.target.value})),placeholder:"e.g. Camera streaming via WebRTC",className:ae("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)]")})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Host"}),u.jsx("input",{type:"text",value:se.host,onChange:B=>he(W=>({...W,host:B.target.value})),placeholder:"localhost",className:ae("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)]")})]}),u.jsxs("div",{className:"flex gap-3",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Port"}),u.jsx("input",{type:"number",value:se.port,onChange:B=>he(W=>({...W,port:B.target.value})),placeholder:"e.g. 1984",className:ae("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)]")})]}),u.jsxs("div",{className:"w-20",children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Scheme"}),u.jsxs("select",{value:se.scheme,onChange:B=>he(W=>({...W,scheme:B.target.value})),className:ae("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:[u.jsx("option",{value:"http",children:"http"}),u.jsx("option",{value:"https",children:"https"}),u.jsx("option",{value:"mqtt",children:"mqtt"})]})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Health Path"}),u.jsx("input",{type:"text",value:se.health_path,onChange:B=>he(W=>({...W,health_path:B.target.value})),placeholder:"/health",className:ae("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)]")})]})]}),u.jsx("div",{className:"mt-3 flex justify-end",children:u.jsx("button",{onClick:le,disabled:v.isPending||!se.name.trim()||!se.port,className:ae("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:v.isPending?"Adding...":"Add Service"})})]}),u.jsx("div",{className:"space-y-2",children:n?.services.map(B=>{const W=xe(B.name),Ee=ee[B.name]??{status:"idle"};return u.jsx(Bj,{entry:B,checked:W.checked,host:W.host,port:W.port,scheme:W.scheme,onToggle:()=>{const Te=!W.checked;ge(B.name,{...W,checked:Te}),Te?R(B.name,W.host,W.port,B.health_path,W.scheme):$(da=>({...da,[B.name]:{status:"idle"}}))},onHostChange:Te=>ge(B.name,{...W,host:Te}),onPortChange:Te=>ge(B.name,{...W,port:Te}),onSchemeChange:Te=>ge(B.name,{...W,scheme:Te}),onHostBlur:()=>{W.checked&&R(B.name,W.host,W.port,B.health_path,W.scheme)},onPortBlur:()=>{W.checked&&R(B.name,W.host,W.port,B.health_path,W.scheme)},onRotateKey:()=>Q(B.name),onDelete:()=>J(B.name),disabled:m.isPending,rotating:z===B.name,deleting:V===B.name,healthStatus:Ee.status,healthError:Ee.error,healthLatency:Ee.latency},B.name)})}),u.jsx("button",{onClick:G,disabled:m.isPending||de===0,className:ae("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 (${de})`}),j&&u.jsx(qj,{serviceName:j.service_name,appKey:j.app_key,envWritten:j.env_written,copiedKey:ne,onCopy:fe,label:"Rotated Key"}),M&&u.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Registration Results"}),M.map(B=>u.jsxs("div",{className:ae("flex flex-wrap items-center gap-3 rounded-lg border p-3 text-sm",B.config_ok&&B.auth_ok?"border-green-500/20 bg-green-500/5":"border-yellow-500/20 bg-yellow-500/5"),children:[u.jsx("span",{className:"min-w-[180px] font-medium text-[var(--color-text)]",children:B.name}),u.jsxs("span",{className:ae("text-xs",B.config_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Config: ",B.config_ok?"OK":"Failed"]}),u.jsxs("span",{className:ae("text-xs",B.auth_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Auth: ",B.auth_ok?B.auth_created?"Created":"Exists":"Failed"]}),B.env_written!==null&&u.jsxs("span",{className:ae("text-xs",B.env_written?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",B.env_written?"Written":"Failed"]}),B.error&&u.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-600 dark:text-yellow-400",children:[u.jsx(Aa,{size:12}),B.error]}),B.auth_created&&B.app_key&&u.jsxs("div",{className:"mt-1 w-full",children:[u.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Aa,{size:12}),"App key (shown once only):"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.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:B.app_key}),u.jsx("button",{onClick:()=>fe(B.app_key),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:ne===B.app_key?u.jsx(jd,{size:14,className:"text-green-500"}):u.jsx(Ux,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]},B.name))]}),be&&u.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",children:[u.jsx(Mw,{size:16,className:"mt-0.5 shrink-0 text-blue-500"}),u.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 qj({serviceName:n,appKey:r,envWritten:s,copiedKey:i,onCopy:d,label:f}){return u.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:[f,": ",n]}),u.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-500/5 p-3",children:[s!==null&&u.jsxs("span",{className:ae("mb-2 inline-block text-xs",s?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",s?"Written":"Failed"]}),u.jsxs("div",{children:[u.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Aa,{size:12}),"New app key (shown once only):"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.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:r}),u.jsx("button",{onClick:()=>d(r),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:i===r?u.jsx(jd,{size:14,className:"text-green-500"}):u.jsx(Ux,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]})]})}async function Gj(){const{data:n}=await Ce.get("/api/llm-setup/status");return n}async function Qj(n){const{data:r}=await Ce.post("/api/llm-setup/configure",{settings:n});return r}async function Vj(n,r,s){const{data:i}=await Ce.post("/api/llm-setup/download",{repo:n,filename:r,token:s});return i}function Yj(){return Oa({queryKey:["llm-status"],queryFn:Gj,staleTime:3e4,retry:1})}function av(){const n=ua();return ba({mutationFn:r=>Qj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["llm-status"]}),n.invalidateQueries({queryKey:["containers"]})}})}function Fj(){return ba({mutationFn:({repo:n,filename:r,token:s})=>Vj(n,r,s)})}async function Md(){const{data:n}=await Ce.get("/api/install/status");return n}async function Xj(n){const r=n?.length?{services:n.join(",")}:{},{data:s}=await Ce.get("/api/install/preflight",{params:r});return s}async function Kj(){const{data:n}=await Ce.get("/api/install/hardware");return n}async function wg(n){const{data:r}=await Ce.post("/api/install/generate",n);return r}async function nv(){const{data:n}=await Ce.get("/api/install/registry");return n}async function Zj(){const{data:n}=await Ce.get("/api/install/defaults");return n}const Jj={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 $j(n){return n.match(/^Up (.+)$/)?.[1]??null}function Ng({container:n,onRestart:r,isRestarting:s}){const i=$j(n.status),d=n.ports.find(f=>f.public)?.public;return u.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx("div",{className:ae("h-2.5 w-2.5 rounded-full",Jj[n.state]??"bg-gray-400")}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate text-sm font-medium text-[var(--color-text)]",children:n.displayName??n.name}),n.description&&u.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:n.description})]}),u.jsx("span",{className:ae("rounded-full px-2 py-0.5 text-xs font-medium",n.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:n.state})]}),u.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-2",children:u.jsxs("div",{className:"flex items-center justify-between text-xs text-[var(--color-text-muted)]",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[i&&u.jsxs("span",{children:["Up ",i]}),d&&u.jsxs("span",{children:[":",d]})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[d&&u.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:u.jsx(Ew,{size:13})}),u.jsx("button",{onClick:()=>r(n.id),disabled:s,className:ae("rounded p-1 hover:bg-[var(--color-surface-alt)]",s&&"animate-spin"),title:"Restart",children:u.jsx(Lx,{size:13})})]})]})})]})}async function Pj(){const{data:n}=await Ce.get("/api/update/check");return n}function lv(){return Oa({queryKey:["update-check"],queryFn:Pj,staleTime:300*1e3,retry:1,refetchOnWindowFocus:!1})}const jg="jarvis-update-dismissed-version";function Eg(){const n=On(),{data:r}=lv(),[s,i]=S.useState(()=>r?.latestVersion?localStorage.getItem(jg)===r.latestVersion:!1);return!r?.updateAvailable||s?null:u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Dx,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Jarvis v",r.latestVersion," available"]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["You have v",r.currentVersion]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[r.releaseUrl&&u.jsx("a",{href:r.releaseUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Release notes"}),u.jsx("button",{onClick:()=>{localStorage.setItem(jg,r.latestVersion),i(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/update"),className:"rounded-lg bg-green-600 px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Update"})]})]})}const Bu="jarvis-admin:llm-setup-dismissed";function Ij(){const n=On(),[r,s]=S.useState(!1),{data:i,isLoading:d,isError:f,error:m,refetch:x,isFetching:v}=ev(),g=tv(),y=Yj(),[p,N]=S.useState(()=>!!localStorage.getItem(Bu));S.useEffect(()=>{Md().then(_=>{_.deployMode==="compose-export"&&s(!0)}).catch(()=>{})},[]);const M=!!y.data&&!y.data.configured&&!p,w=_=>{g.mutate(_,{onSuccess:()=>Fe.success("Container restart initiated"),onError:V=>Fe.error(`Restart failed: ${V.message}`)})};if(r)return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),u.jsx(Eg,{}),M&&u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ad,{size:20,className:"text-[var(--color-primary)]"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>{localStorage.setItem(Bu,"true"),N(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/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"})]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-8 text-center",children:[u.jsx(Cd,{size:32,className:"mx-auto mb-3 text-[var(--color-text-muted)]"}),u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Running in Docker Compose mode"}),u.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 u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})});if(f)return u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load containers"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:m?.message??"Unknown error"}),u.jsx("button",{onClick:()=>x(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]});const j=i?.containers??[],T=j.filter(_=>_.state==="running"),z=j.filter(_=>_.state!=="running");return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[u.jsxs("span",{children:[T.length,"/",j.length," running"]}),u.jsx("button",{onClick:()=>x(),disabled:v,className:ae("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",v&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14})})]})]}),u.jsx(Eg,{}),M&&u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ad,{size:20,className:"text-[var(--color-primary)]"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>{localStorage.setItem(Bu,"true"),N(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/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"})]})]}),j.length===0&&u.jsx("div",{className:"py-12 text-center",children:u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:i?.error?i.error:"No Jarvis containers found. Is Docker running?"})}),T.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Running"}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:T.map(_=>u.jsx(Ng,{container:_,onRestart:w,isRestarting:g.isPending&&g.variables===_.id},_.id))})]}),z.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Stopped"}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:z.map(_=>u.jsx(Ng,{container:_,onRestart:w,isRestarting:g.isPending&&g.variables===_.id},_.id))})]})]})}async function Wj(){const{data:n}=await Ce.get("/api/nodes");return n}async function eE(n){const{data:r}=await Ce.get(`/api/nodes/${n}/nodes`);return r}async function tE(n){const{data:r}=await Ce.post(`/api/nodes/${n}/train-adapter`);return r}function aE(){return Oa({queryKey:["households"],queryFn:Wj,staleTime:3e4})}function nE(n){return Oa({queryKey:["household-nodes",n],queryFn:()=>eE(n),enabled:!!n,staleTime:3e4})}function lE(){const n=ua();return ba({mutationFn:tE,onSuccess:()=>{n.invalidateQueries({queryKey:["household-nodes"]})}})}function rE({node:n,onTrain:r,isTraining:s}){return u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(hs,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.name})]}),u.jsxs("span",{className:ae("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n.is_active?"bg-green-500/10 text-green-500":"bg-red-500/10 text-red-500"),children:[n.is_active?u.jsx(fN,{size:10}):u.jsx(uN,{size:10}),n.is_active?"Active":"Inactive"]})]}),u.jsxs("div",{className:"mt-3 space-y-1 text-xs text-[var(--color-text-muted)]",children:[u.jsxs("p",{children:[u.jsx("span",{className:"font-medium",children:"ID:"})," ",n.node_id]}),n.services.length>0&&u.jsxs("p",{children:[u.jsx("span",{className:"font-medium",children:"Services:"})," ",n.services.join(", ")]})]}),u.jsx("div",{className:"mt-4",children:u.jsx("button",{onClick:()=>r(n.node_id),disabled:s||!n.is_active,className:ae("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",s||!n.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:s?u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(va,{size:12,className:"animate-spin"}),"Training..."]}):"Train Adapter"})})]})}function sE({householdId:n,householdName:r}){const{data:s,isLoading:i,isError:d}=nE(n),f=lE(),m=x=>{f.mutate(x,{onSuccess:v=>Fe.success(`Training triggered for ${x} (request: ${v.request_id.slice(0,8)}...)`),onError:v=>Fe.error(`Training failed: ${v.message}`)})};return u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:r}),i&&u.jsx("div",{className:"flex items-center justify-center py-8",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:18})}),d&&u.jsx("p",{className:"py-4 text-center text-sm text-red-500",children:"Failed to load nodes"}),s&&s.length===0&&u.jsx("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:"No nodes registered in this household"}),s&&s.length>0&&u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:s.map(x=>u.jsx(rE,{node:x,onTrain:m,isTraining:f.isPending&&f.variables===x.node_id},x.node_id))})]})}function iE(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=aE();return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load households"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Nodes"}),u.jsx("button",{onClick:()=>d(),disabled:f,className:ae("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14,className:"text-[var(--color-text-muted)]"})})]}),(!n||n.length===0)&&u.jsx("div",{className:"py-12 text-center",children:u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No households found. Register a household in jarvis-auth first."})}),n?.map(m=>u.jsx(sE,{householdId:m.id,householdName:m.name},m.id))]})}async function oE(){const{data:n}=await Ce.get("/api/models/installed");return n.models}async function cE(n){const{data:r}=await Ce.post("/api/models/download",n);return r}async function uE(n){await Ce.delete(`/api/models/${encodeURIComponent(n)}`)}function dE(){return Oa({queryKey:["models","installed"],queryFn:oE,staleTime:1e4})}function rv(){const n=ua();return ba({mutationFn:r=>cE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}function fE(){const n=ua();return ba({mutationFn:r=>uE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}const ar=[{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:"llama3",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 mE(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,x]=S.useState(null),{data:v,isLoading:g}=dE(),y=rv(),p=fE();function N(j,T){const z=`${j}/${T??""}`;x(z),y.mutate({repo:j,filename:T||void 0,token:n||void 0},{onSuccess:_=>{Fe.success(_.message),x(null)},onError:_=>{Fe.error(_ instanceof Error?_.message:"Download failed"),x(null)}})}function M(j){confirm(`Delete ${j}?`)&&p.mutate(j,{onSuccess:()=>Fe.success(`Deleted ${j}`),onError:()=>Fe.error("Failed to delete")})}function w(){s&&N(s,d)}return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-8 p-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Models"}),u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Manage LLM models on the inference server"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[u.jsx(Ow,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Token"}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(optional, for gated models)"})]}),u.jsx("input",{type:"password",value:n,onChange:j=>r(j.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)]"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(Rd,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Installed Models"})]}),g?u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Loading..."}):v?.length?u.jsx("div",{className:"space-y-2",children:v.map(j=>u.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-3 py-2",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.name}),u.jsx("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:j.sizeFormatted})]}),u.jsx("button",{onClick:()=>M(j.name),disabled:p.isPending,className:"rounded p-1 text-[var(--color-text-muted)] hover:bg-red-500/10 hover:text-red-500",children:u.jsx(Hx,{size:14})})]},j.name))}):u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No models installed yet"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(nN,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Suggested Models"})]}),u.jsx("div",{className:"space-y-3",children:ar.map(j=>{const T=v?.some(z=>z.name===j.ggufFilename||z.name.includes(j.ggufFilename));return u.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-4 py-3",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.displayName}),u.jsxs("span",{className:"rounded bg-[var(--color-surface-alt)] px-1.5 py-0.5 text-xs text-[var(--color-text-muted)]",children:["~",j.sizeGguf]}),T&&u.jsx("span",{className:"rounded bg-green-500/10 px-1.5 py-0.5 text-xs text-green-500",children:"installed"})]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[j.hfRepoGguf," / ",j.ggufFilename]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Prompt provider: ",u.jsx("code",{className:"text-[var(--color-primary)]",children:j.promptProvider})]})]}),u.jsxs("button",{onClick:()=>N(j.hfRepoGguf,j.ggufFilename),disabled:m!==null,className:ae("ml-4 flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",T?"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:[u.jsx(ds,{size:14}),m===`${j.hfRepoGguf}/${j.ggufFilename}`?"Downloading...":T?"Re-download":"Download"]})]},j.id)})})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(ds,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Download from HuggingFace"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Repository (e.g. Qwen/Qwen3-14B-GGUF)"}),u.jsx("input",{value:s,onChange:j=>i(j.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)]"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Filename (optional — downloads specific file instead of full repo)"}),u.jsx("input",{value:d,onChange:j=>f(j.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)]"})]}),u.jsxs("button",{onClick:w,disabled:!s||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:[u.jsx(ds,{size:14}),m===`${s}/${d}`?"Downloading...":"Download"]})]})]})]})}const Hu={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 hE(){const n=On(),{data:r,isLoading:s}=lv(),[i,d]=S.useState("idle"),[f,m]=S.useState([]),[x,v]=S.useState(null),g=S.useRef(null),y=S.useCallback(M=>{m(w=>[...w,M])},[]);S.useEffect(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[f]);async function p(){d("preflight"),m([]),v(null);try{const M=localStorage.getItem("access_token"),w=await fetch("/api/update/apply",{method:"POST",headers:{Authorization:`Bearer ${M}`,"Content-Type":"application/json"}});if(!w.ok||!w.body){const _=await w.text();throw new Error(_||`HTTP ${w.status}`)}const j=w.body.getReader(),T=new TextDecoder;let z="";for(;;){const{done:_,value:V}=await j.read();if(_)break;z+=T.decode(V,{stream:!0});const L=z.split(`
17
- `);z=L.pop()??"";for(const ne of L)if(ne.startsWith("data: "))try{const I=JSON.parse(ne.slice(6));if(I.phase&&d(I.phase),I.message&&y({text:I.message,phase:I.phase}),I.stream&&I.text&&y({text:I.text.trim()}),I.restart){d("restarting"),y({text:"Admin server restarting with new version..."}),await pE(r?.latestVersion??""),d("done"),y({text:"Upgrade complete!"});return}if(I.done&&I.code!==0)throw new Error(I.error??"Upgrade failed");I.done&&I.code===0&&d("done")}catch(I){if(I instanceof SyntaxError)continue;throw I}}}catch(M){const w=M instanceof Error?M.message:String(M);v(w),d("error"),y({text:`Error: ${w}`})}}if(s)return u.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:u.jsx(Ma,{size:24,className:"animate-spin text-[var(--color-primary)]"})});const N=Object.keys(Hu).filter(M=>{const w=Object.keys(Hu),j=w.indexOf(i);return w.indexOf(M)<j});return u.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Update Jarvis"}),r?.updateAvailable?u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["v",r.currentVersion," → v",r.latestVersion]}):u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["You're running the latest version (v",r?.currentVersion??"?",")"]})]}),i!=="idle"&&u.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries(Hu).map(([M,w])=>{const j=M===i,T=N.includes(M),z=M===i&&i==="error";return u.jsxs("div",{className:"flex items-center gap-2",children:[T?u.jsx(ca,{size:16,className:"text-green-500"}):z?u.jsx(Aa,{size:16,className:"text-red-500"}):j?u.jsx(Ma,{size:16,className:"animate-spin text-[var(--color-primary)]"}):u.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),u.jsx("span",{className:ae("text-sm",j?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",T&&"text-green-500"),children:w})]},M)})}),f.length>0&&u.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:f.map((M,w)=>u.jsx("div",{children:M.text},w))}),x&&u.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[u.jsx(Aa,{size:14,className:"text-red-500"}),u.jsx("span",{className:"text-sm text-red-500",children:x})]}),u.jsxs("div",{className:"flex gap-3",children:[i==="idle"&&r?.updateAvailable&&u.jsxs("button",{onClick:p,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:[u.jsx(Dx,{size:16}),"Update to v",r.latestVersion]}),i==="done"&&u.jsxs("button",{onClick:()=>n("/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:[u.jsx(ca,{size:16}),"Go to Dashboard"]}),i==="error"&&u.jsxs("button",{onClick:p,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:[u.jsx(va,{size:16}),"Retry"]})]})]})}async function pE(n,r=6e4){const s=Date.now()+r;for(;Date.now()<s;){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")}function gE(){return u.jsxs("div",{className:"flex min-h-[60vh] flex-col items-center justify-center",children:[u.jsx("h1",{className:"mb-2 text-4xl font-bold text-[var(--color-text)]",children:"404"}),u.jsx("p",{className:"mb-4 text-[var(--color-text-muted)]",children:"Page not found"}),u.jsx(md,{to:"/settings",className:"text-[var(--color-primary)] underline hover:opacity-80",children:"Go to Settings"})]})}const xE=7,vE={currentStep:0,totalSteps:xE,enabledModules:[],portOverrides:{},infraPortOverrides:{},secrets:{},dbUser:"jarvis",whisperModel:"base.en",llmInterface:"Qwen25MediumUntrained",deploymentMode:"local",deploymentTarget:"standard",remoteLlmUrl:"",remoteWhisperUrl:"",platform:"linux",hardware:null,installRunning:!1,installComplete:!1};function yE(n,r,s){return Math.max(r,Math.min(s,n))}function bE(n,r){switch(r.type){case"SET_STEP":return{...n,currentStep:yE(r.step,0,n.totalSteps-1)};case"NEXT_STEP":return{...n,currentStep:Math.min(n.currentStep+1,n.totalSteps-1)};case"PREV_STEP":return{...n,currentStep:Math.max(n.currentStep-1,0)};case"SET_ENABLED_MODULES":return{...n,enabledModules:r.modules};case"TOGGLE_MODULE":{if(r.enabled){const s=n.enabledModules.includes(r.serviceId)?n.enabledModules:[...n.enabledModules,r.serviceId];return{...n,enabledModules:s}}return{...n,enabledModules:n.enabledModules.filter(s=>s!==r.serviceId)}}case"SET_PORT_OVERRIDE":return{...n,portOverrides:{...n.portOverrides,[r.serviceId]:r.port}};case"SET_INFRA_PORT_OVERRIDE":return{...n,infraPortOverrides:{...n.infraPortOverrides,[r.infraId]:r.port}};case"SET_SECRET":return{...n,secrets:{...n.secrets,[r.name]:r.value}};case"SET_SECRETS":return{...n,secrets:r.secrets};case"SET_DB_USER":return{...n,dbUser:r.user};case"SET_WHISPER_MODEL":return{...n,whisperModel:r.model};case"SET_LLM_INTERFACE":return{...n,llmInterface:r.interfaceId};case"SET_DEPLOYMENT_MODE":return{...n,deploymentMode:r.mode};case"SET_DEPLOYMENT_TARGET":return{...n,deploymentTarget:r.target};case"SET_REMOTE_LLM_URL":return{...n,remoteLlmUrl:r.url};case"SET_REMOTE_WHISPER_URL":return{...n,remoteWhisperUrl:r.url};case"SET_PLATFORM":return{...n,platform:r.platform};case"SET_HARDWARE":return{...n,hardware:r.hardware,platform:r.hardware.platform};case"SET_INSTALL_RUNNING":return{...n,installRunning:r.running};case"SET_INSTALL_COMPLETE":return{...n,installRunning:!1,installComplete:!0};default:return n}}const sv=S.createContext(null);function SE({children:n}){const[r,s]=S.useReducer(bE,vE);return u.jsx(sv.Provider,{value:{state:r,dispatch:s},children:n})}function ul(){const n=S.useContext(sv);if(!n)throw new Error("useWizard must be used within a WizardProvider");return n}function wE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0),[m,x]=S.useState(!1);function v(){f(!0),x(!1),Md().then(y=>{i(y);const p=y.reason==="docker_not_found";x(p),r(p?{type:"SET_INSTALL_RUNNING",running:!0}:{type:"SET_INSTALL_RUNNING",running:!1})}).catch(()=>{i({configured:!1,reason:"error"}),x(!0),r({type:"SET_INSTALL_RUNNING",running:!0})}).finally(()=>f(!1))}S.useEffect(()=>{v()},[]);const g=s&&s.reason!=="docker_not_found";return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),u.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."})]}),u.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:u.jsxs("div",{className:"flex items-center gap-3",children:[d?u.jsx(Ma,{size:20,className:"animate-spin text-[var(--color-primary)]"}):g?u.jsx(ca,{size:20,className:"text-green-500"}):u.jsx(kx,{size:20,className:"text-red-500"}),u.jsxs("div",{className:"flex-1",children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:d?"Checking Docker...":g?"Docker is running":"Docker not found"}),!d&&!g&&u.jsxs("div",{className:"mt-1 space-y-1",children:[u.jsx("p",{className:"text-xs text-red-400",children:"Docker is required to run Jarvis services."}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Install"," ",u.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&&u.jsxs("button",{type:"button",onClick:v,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:[u.jsx(uo,{size:12}),"Retry"]})]})}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-2 block text-sm font-medium text-[var(--color-text)]",children:"Deployment Mode"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"local"}),className:ae("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="local"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[u.jsx(qw,{size:24,className:"text-[var(--color-primary)]"}),u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Local"}),u.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"Everything on this machine"})]}),u.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"}),className:ae("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="remote-llm"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[u.jsx(Cd,{size:24,className:"text-[var(--color-primary)]"}),u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM"}),u.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"LLM on separate GPU machine"})]})]})]})]})}const Vi=[{label:"None / CPU only",gpu:null,vramMb:null,backends:["gguf"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4090 (24 GB)",gpu:"NVIDIA RTX 4090",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4080 (16 GB)",gpu:"NVIDIA RTX 4080",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4070 Ti (12 GB)",gpu:"NVIDIA RTX 4070 Ti",vramMb:12288,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3090 (24 GB)",gpu:"NVIDIA RTX 3090",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3080 (10 GB)",gpu:"NVIDIA RTX 3080",vramMb:10240,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3070 (8 GB)",gpu:"NVIDIA RTX 3070",vramMb:8192,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA A100 (80 GB)",gpu:"NVIDIA A100",vramMb:81920,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA A100 (40 GB)",gpu:"NVIDIA A100",vramMb:40960,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA Tesla T4 (16 GB)",gpu:"NVIDIA Tesla T4",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX (24 GB)",gpu:"AMD RX 7900 XTX",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT (20 GB)",gpu:"AMD RX 7900 XT",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT (16 GB)",gpu:"AMD RX 7800 XT",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"Apple M4 Max (128 GB unified)",gpu:"Apple M4 Max",vramMb:131072,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Max (64 GB unified)",gpu:"Apple M4 Max",vramMb:65536,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (48 GB unified)",gpu:"Apple M4 Pro",vramMb:49152,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (24 GB unified)",gpu:"Apple M4 Pro",vramMb:24576,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Max (32 GB unified)",gpu:"Apple M2 Max",vramMb:32768,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Pro (16 GB unified)",gpu:"Apple M2 Pro",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (16 GB unified)",gpu:"Apple M1",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (8 GB unified)",gpu:"Apple M1",vramMb:8192,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Other (enter VRAM manually)",gpu:"Other",vramMb:null,backends:["gguf"],defaultBackend:"gguf"}];function NE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(!n.hardware),[d,f]=S.useState(!1),[m,x]=S.useState(0),[v,g]=S.useState("");S.useEffect(()=>{n.hardware||Kj().then(N=>{r({type:"SET_HARDWARE",hardware:N}),N.recommendedBackend==="remote"&&n.deploymentMode==="local"&&r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"})}).catch(()=>{}).finally(()=>i(!1))},[]);function y(N,M){const w=Vi[N];if(!n.hardware)return;const j=w.gpu==="Other"?(parseInt(M??v,10)||0)*1024:w.vramMb,T={...n.hardware,gpuName:w.gpu,gpuVramMb:j||null,recommendedBackends:w.backends,recommendedBackend:w.defaultBackend};r({type:"SET_HARDWARE",hardware:T})}const p=n.hardware;return s?u.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[u.jsx(Ma,{size:32,className:"animate-spin text-[var(--color-primary)]"}),u.jsx("p",{className:"mt-3 text-sm text-[var(--color-text-muted)]",children:"Detecting hardware..."})]}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Hardware Detection"}),u.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."})]}),p&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(hs,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"Platform"})]}),u.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.platform==="darwin"?"macOS":"Linux"," (",p.arch,")"]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(Rd,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"Memory"})]}),u.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.totalMemoryGb," GB RAM"]})]}),u.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(hs,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"GPU"})]}),u.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:p.gpuName??"No GPU detected"}),p.gpuVramMb!=null&&p.gpuVramMb>0&&u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[Math.round(p.gpuVramMb/1024)," GB VRAM"]})]}),u.jsx("button",{type:"button",onClick:()=>f(!d),className:"text-xs font-medium text-[var(--color-primary)] hover:underline",children:d?"Cancel":"Override"})]}),d&&u.jsxs("div",{className:"mt-3 space-y-3 border-t border-[var(--color-border)] pt-3",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"gpu-select",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Select GPU"}),u.jsx("select",{id:"gpu-select",value:m,onChange:N=>{const M=parseInt(N.target.value,10);x(M),Vi[M].gpu!=="Other"&&(y(M),f(!1))},className:ae("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:Vi.map((N,M)=>u.jsx("option",{value:M,children:N.label},`${N.label}-${M}`))})]}),Vi[m].gpu==="Other"&&u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("label",{htmlFor:"custom-vram",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"VRAM (GB)"}),u.jsx("input",{id:"custom-vram",type:"number",min:1,max:512,value:v,onChange:N=>g(N.target.value),placeholder:"e.g. 24",className:ae("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)]")})]}),u.jsx("button",{type:"button",disabled:!v||parseInt(v,10)<=0,onClick:()=>{y(m,v),f(!1)},className:ae("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"})]})]})]}),u.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Recommended: ",u.jsx("span",{className:"text-[var(--color-primary)]",children:p.recommendedBackend.toUpperCase()})]}),p.recommendedBackends.length>1&&u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["Available backends: ",p.recommendedBackends.join(", ")]})]})]}),n.deploymentMode==="remote-llm"&&u.jsxs("div",{className:"space-y-3",children:[u.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote Service URLs"}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"remote-llm",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"LLM Proxy URL"}),u.jsx("input",{id:"remote-llm",type:"url",value:n.remoteLlmUrl,onChange:N=>r({type:"SET_REMOTE_LLM_URL",url:N.target.value}),placeholder:"http://192.168.1.100:7704",className:ae("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)]")})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"remote-whisper",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Whisper URL (optional)"}),u.jsx("input",{id:"remote-whisper",type:"url",value:n.remoteWhisperUrl,onChange:N=>r({type:"SET_REMOTE_WHISPER_URL",url:N.target.value}),placeholder:"http://192.168.1.100:7706",className:ae("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 jE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0);if(S.useEffect(()=>{Promise.all([nv(),Zj()]).then(([g,y])=>{i(g),n.enabledModules.length===0&&r({type:"SET_ENABLED_MODULES",modules:y.enabledModules})}).catch(()=>{}).finally(()=>f(!1))},[]),d||!s)return u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx(Ma,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const{core:m,recommended:x,optional:v}=EE(s.services);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Select Services"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Core services are always included. Toggle recommended and optional services."})]}),u.jsx(qu,{title:"Core",subtitle:"Always included",services:m,enabled:m.map(g=>g.id),locked:!0}),u.jsx(qu,{title:"Recommended",subtitle:"Enabled by default",services:x,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y}),platform:n.platform}),v.length>0&&u.jsx(qu,{title:"Optional",subtitle:"Off by default",services:v,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y})})]})}function EE(n){return{core:n.filter(r=>r.category==="core"),recommended:n.filter(r=>r.category==="recommended"),optional:n.filter(r=>r.category==="optional")}}function qu({title:n,subtitle:r,services:s,enabled:i,locked:d,onToggle:f,platform:m}){return u.jsxs("div",{children:[u.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[u.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:n}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:r})]}),u.jsx("div",{className:"space-y-1",children:s.map(x=>{const v=i.includes(x.id),g=x.nativeOnly&&m==="darwin";return u.jsxs("button",{type:"button",disabled:d,onClick:()=>f?.(x.id,!v),className:ae("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",v?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30",d&&"cursor-default"),children:[d?u.jsx(Td,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}):v?u.jsx(ca,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):u.jsx(nd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:x.name}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",x.port]}),g&&u.jsx("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-500",children:"Native"})]}),u.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:x.description})]})]},x.id)})})]})}function RE(){const{state:n}=ul(),[r,s]=S.useState(null);if(S.useEffect(()=>{nv().then(s).catch(()=>{})},[]),!r)return u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx(Ma,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const i=r.services.filter(p=>p.category==="core"),d=r.services.filter(p=>p.category!=="core"&&n.enabledModules.includes(p.id)),f=[...i,...d],m=new Map;for(const p of f){const N=n.portOverrides[p.id]??p.port,M=m.get(N)??[];m.set(N,[...M,p.name])}const x=[...m.entries()].filter(([,p])=>p.length>1),v=f.filter(p=>p.database).length,g=f.filter(p=>p.nativeOnly&&n.platform==="darwin"),y=f.filter(p=>!(p.nativeOnly&&n.platform==="darwin"));return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Review Configuration"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Review your selections before installing."})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(Gu,{label:"Docker Services",value:y.length}),u.jsx(Gu,{label:"Native Services",value:g.length}),u.jsx(Gu,{label:"Databases",value:v})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Deployment Mode"}),u.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:n.deploymentMode==="local"?"Local (all services on this machine)":"Remote LLM"}),n.deploymentMode==="remote-llm"&&n.remoteLlmUrl&&u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["LLM: ",n.remoteLlmUrl]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsxs("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:["Services (",f.length,")"]})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:f.map(p=>u.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ca,{size:14,className:"text-green-500"}),u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:p.name})]}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",n.portOverrides[p.id]??p.port]})]},p.id))})]}),x.length>0&&u.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Aa,{size:16,className:"text-amber-500"}),u.jsx("span",{className:"text-sm font-medium text-amber-500",children:"Port Conflicts"})]}),x.map(([p,N])=>u.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Port ",p,": ",N.join(", ")]},p))]})]})}function Gu({label:n,value:r}){return u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-3 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-[var(--color-primary)]",children:r}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})}function Rg(){const[n,r]=S.useState({lines:[],running:!1,done:!1,exitCode:null,error:null,redirect:null}),s=S.useRef(null),i=S.useCallback((f,m)=>(s.current?.close(),r({lines:[],running:!0,done:!1,exitCode:null,error:null,redirect:null}),new Promise((x,v)=>{const g=new EventSource(f);s.current=g,g.onmessage=y=>{try{const p=JSON.parse(y.data);if(m&&m(p),"done"in p){if(r(N=>({...N,running:!1,done:!0,exitCode:p.code,redirect:p.redirect??null})),g.close(),p.code===0)x(p.code);else{const N=p.error?String(p.error):`Process exited with code ${p.code}`;v(new Error(N))}return}if("stream"in p&&"text"in p){const N={stream:p.stream,text:p.text,timestamp:Date.now()};r(M=>({...M,lines:[...M.lines,N]}))}}catch{}},g.onerror=()=>{const y=s.current===null;r(p=>({...p,running:!1,error:p.done?null:"Connection lost"})),g.close(),y||v(new Error("Connection lost"))}})),[]),d=S.useCallback(()=>{s.current?.close(),s.current=null,r(f=>({...f,running:!1}))},[]);return{...n,run:i,stop:d}}function Tg({lines:n,running:r,title:s,className:i}){const d=S.useRef(null),f=S.useRef(!0);S.useEffect(()=>{const x=d.current;!x||!f.current||(x.scrollTop=x.scrollHeight)},[n]);function m(){const x=d.current;if(!x)return;const v=x.scrollHeight-x.scrollTop-x.clientHeight;f.current=v<50}return u.jsxs("div",{className:ae("flex flex-col rounded-lg border border-[var(--color-border)] overflow-hidden",i),children:[s&&u.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2",children:[u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:s}),r&&u.jsx("span",{className:"h-2 w-2 animate-pulse rounded-full bg-green-500"})]}),u.jsxs("div",{ref:d,onScroll:m,className:"h-64 overflow-y-auto bg-[#0d1117] p-3 font-mono text-xs leading-5",children:[n.length===0&&!r&&u.jsx("span",{className:"text-gray-500",children:"Waiting for output..."}),n.map((x,v)=>u.jsx("div",{className:ae("whitespace-pre-wrap break-all",x.stream==="stderr"?"text-yellow-400":"text-gray-300"),children:x.text},v)),r&&u.jsx("span",{className:"inline-block h-4 w-1.5 animate-pulse bg-gray-400"})]})]})}function TE(){const{state:n,dispatch:r}=ul(),s=Rg(),i=Rg(),[d,f]=S.useState("idle"),[m,x]=S.useState(null),[v,g]=S.useState(null),[y,p]=S.useState({}),[N,M]=S.useState({}),[w,j]=S.useState(null),[T,z]=S.useState(null);S.useEffect(()=>{const P=i.redirect;if(d!=="done"||!P)return;z(5);const re=setInterval(()=>{z(se=>se===null||se<=1?(clearInterval(re),window.location.href=P,0):se-1)},1e3);return()=>clearInterval(re)},[d,i.redirect]);const _=S.useCallback(async()=>{f("preflight"),g(null),x(null);try{const P=await Xj(n.enabledModules);return g(P),P.canProceed?!0:(x("Pre-flight checks failed. Fix the issues above and retry."),f("error"),j("preflight"),!1)}catch(P){return x(`Pre-flight check failed: ${P instanceof Error?P.message:String(P)}`),f("error"),j("preflight"),!1}},[n.enabledModules]);async function V(){x(null),p({}),j(null),r({type:"SET_INSTALL_RUNNING",running:!0});try{if(!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",re=>{if(re.phase==="health"&&typeof re.service=="string"&&p(se=>({...se,[re.service]:{healthy:re.healthy,error:re.error}})),re.serviceHealth&&typeof re.serviceHealth=="object"){const se=re.serviceHealth;p(he=>({...he,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(P){x(P instanceof Error?P.message:String(P)),f("error"),j(d),r({type:"SET_INSTALL_RUNNING",running:!1})}}async function L(){if(w==="preflight"){if(x(null),r({type:"SET_INSTALL_RUNNING",running:!0}),!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}try{f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",re=>{if(re.phase==="health"&&typeof re.service=="string"&&p(se=>({...se,[re.service]:{healthy:re.healthy,error:re.error}})),re.serviceHealth&&typeof re.serviceHealth=="object"){const se=re.serviceHealth;p(he=>({...he,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(re){x(re instanceof Error?re.message:String(re)),f("error"),r({type:"SET_INSTALL_RUNNING",running:!1})}}else V()}async function ne(P){try{const re=await fetch(`/api/containers/${P}/logs`);if(re.ok){const se=await re.text();M(he=>({...he,[P]:se}))}else M(se=>({...se,[P]:`Failed to fetch logs: HTTP ${re.status}`}))}catch(re){M(se=>({...se,[P]:`Failed to fetch logs: ${re instanceof Error?re.message:String(re)}`}))}}const I=[{key:"preflight",label:"Pre-flight checks"},{key:"generating",label:"Generate configuration"},{key:"pulling",label:"Pull Docker images"},{key:"starting",label:"Start services"}],$=I.map(P=>P.key).indexOf(d);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Install"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="idle"?"Ready to install. This will pull Docker images and start all services.":d==="done"?i.redirect?`Installation complete! Redirecting to your admin dashboard in ${T??"..."}s...`:"Installation complete! All services are running.":d==="error"?"Installation encountered an error.":"Installing..."})]}),v&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Pre-flight Checks"})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:v.checks.map(P=>u.jsx("div",{className:"flex items-center justify-between px-3 py-2",children:u.jsxs("div",{className:"flex items-center gap-2",children:[P.status==="pass"?u.jsx(ca,{size:14,className:"text-green-500"}):P.status==="warn"?u.jsx(Aa,{size:14,className:"text-amber-500"}):u.jsx($i,{size:14,className:"text-red-500"}),u.jsxs("div",{children:[u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:P.name}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:P.message}),P.details&&P.status!=="pass"&&u.jsx("p",{className:"text-xs text-[var(--color-text-muted)] opacity-60",children:P.details})]})]})},P.name))})]}),u.jsx("div",{className:"space-y-2",children:I.map((P,re)=>{const se=P.key===d,he=$>re||d==="done",Ae=d==="error"&&P.key===w;return u.jsxs("div",{className:"flex items-center gap-3",children:[he?u.jsx(ca,{size:18,className:"text-green-500"}):Ae?u.jsx($i,{size:18,className:"text-red-500"}):se?u.jsx(Ma,{size:18,className:"animate-spin text-[var(--color-primary)]"}):u.jsx("div",{className:"h-[18px] w-[18px] rounded-full border-2 border-[var(--color-border)]"}),u.jsx("span",{className:ae("text-sm",he?"text-green-500":se?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:P.label})]},P.key)})}),(d==="starting"||d==="done"||d==="error")&&Object.keys(y).length>0&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Service Status"})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:Object.entries(y).map(([P,re])=>u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:P}),u.jsxs("div",{className:"flex items-center gap-2",children:[!re.healthy&&u.jsxs("button",{type:"button",onClick:()=>ne(P),className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[u.jsx(Tw,{size:12}),"Logs"]}),re.healthy?u.jsx(ca,{size:14,className:"text-green-500"}):u.jsx($i,{size:14,className:"text-red-500"})]})]}),re.error&&u.jsx("p",{className:"px-3 pb-2 text-xs text-red-400",children:re.error}),N[P]&&u.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:u.jsx("pre",{className:"whitespace-pre-wrap",children:N[P]})})]},P))})]}),(s.lines.length>0||s.running)&&u.jsx(Tg,{lines:s.lines,running:s.running,title:"docker compose pull"}),(i.lines.length>0||i.running)&&u.jsx(Tg,{lines:i.lines,running:i.running,title:"docker compose up -d"}),m&&u.jsx("div",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:m}),(d==="idle"||d==="error")&&u.jsxs("button",{type:"button",onClick:d==="error"?L:V,className:ae("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:[d==="error"?u.jsx(uo,{size:18}):u.jsx(Xw,{size:18}),d==="error"?"Retry Installation":"Start Installation"]})]})}function CE(){const{state:n,dispatch:r}=ul(),s=av(),i=rv(),[d,f]=S.useState("select"),[m,x]=S.useState(null),[v,g]=S.useState("GGUF"),[y,p]=S.useState(""),[N,M]=S.useState(null);if(n.deploymentMode==="remote-llm")return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Your LLM is configured to use a remote server."})]}),u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx(ca,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n.remoteLlmUrl})]})]})]});if(n.platform==="darwin")return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),u.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."})]}),u.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 w=L=>{x(L),M(null),L.gated&&!y.trim()?f("token"):T(L,y.trim())},j=()=>{if(!y.trim()){M("HuggingFace token is required for gated models");return}m&&T(m,y)},T=async(L,ne)=>{f("downloading"),M(null);const I=v==="GGUF"?L.hfRepoGguf:L.hfRepoVllm,ee=v==="GGUF"?L.ggufFilename:void 0;try{await i.mutateAsync({repo:I,filename:ee,token:ne||void 0}),await z(L)}catch($){M(`Download failed: ${$.message}`),f("select")}},z=async L=>{f("configuring");const I={"model.main.name":v==="GGUF"?`.models/${L.ggufFilename}`:`.models/${L.hfRepoVllm.split("/").pop()}`,"model.main.backend":v,"model.main.chat_format":L.chatFormat,"model.main.context_window":L.contextWindow,"llm.interface":L.promptProvider};v==="GGUF"&&(I["inference.gguf.n_gpu_layers"]=-1),v==="VLLM"&&L.quantization&&(I["inference.vllm.quantization"]=L.quantization);try{await s.mutateAsync(I),r({type:"SET_LLM_INTERFACE",interfaceId:L.promptProvider}),f("done")}catch(ee){M(`Configuration failed: ${ee.message}`),f("select")}},_=n.hardware?.gpuVramMb,V=_?ar.filter(L=>L.vramMb<=_):ar;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),u.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&&u.jsxs("div",{className:"space-y-2",children:[u.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:[u.jsx(Aa,{size:16,className:"mt-0.5 shrink-0"}),N]}),m&&u.jsxs("button",{type:"button",onClick:()=>T(m,y),className:ae("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:[u.jsx(uo,{size:14}),"Retry Download"]})]}),d==="select"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Backend"}),u.jsx("div",{className:"flex gap-2",children:["GGUF","VLLM"].map(L=>u.jsx("button",{type:"button",onClick:()=>g(L),className:ae("rounded-md px-3 py-1 text-xs font-medium transition-colors",v===L?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:L==="VLLM"?"vLLM":L},L))})]}),u.jsxs("div",{children:[u.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)"}),u.jsx("input",{id:"hf-token",type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ae("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)]")})]}),u.jsxs("div",{className:"space-y-2",children:[V.map(L=>u.jsxs("button",{type:"button",onClick:()=>w(L),className:ae("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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:L.displayName}),L.gated&&u.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:[u.jsx(Td,{size:10}),"Gated"]})]}),u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[L.promptProvider," · ",L.contextWindow.toLocaleString()," ctx"]})]}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?L.sizeGguf:L.sizeVllm]})]},L.id)),V.length===0&&u.jsxs("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:["No models fit your available VRAM (",_?Math.round(_/1024)+" GB":"unknown","). Consider using Remote LLM mode."]}),_&&V.length<ar.length&&u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Showing ",V.length," of ",ar.length," models that fit your ",Math.round(_/1024)," GB VRAM."]})]})]}),d==="token"&&m&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[u.jsx("strong",{children:m.displayName})," is a gated model. Accept the license on HuggingFace and paste your access token below."]}),u.jsx("input",{type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ae("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)]")}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("button",{type:"button",onClick:()=>{f("select"),M(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),u.jsx("button",{type:"button",onClick:j,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Download"})]})]}),d==="downloading"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(ds,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Downloading ",m?.displayName,"..."]}),u.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?m?.sizeGguf:m?.sizeVllm," · This may take several minutes"]})]}),d==="configuring"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(Ma,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Configuring model and prompt provider..."})]}),d==="done"&&m&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx(ca,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:[m.displayName," configured"]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Backend: ",v," · Prompt provider: ",m.promptProvider]})]})]}),u.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 ",u.jsx("strong",{children:m.promptProvider})," prompt provider for optimized command parsing."]})]})]})}function _E(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,x]=S.useState(""),[v,g]=S.useState(!1),[y,p]=S.useState(!1),[N,M]=S.useState(null),w=s===d,j=n&&s&&d&&m&&w&&!v;async function T(){if(j){g(!0),M(null);try{const _=await Mx(n,s,m);tr(_.access_token),localStorage.setItem("access_token",_.access_token),localStorage.setItem("refresh_token",_.refresh_token),p(!0)}catch(_){const V=_?.response?.data?.error??(_ instanceof Error?_.message:"Failed to create account");M(V)}finally{g(!1)}}}if(y)return u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{children:u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Account Created"})}),u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx(ca,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Superuser account created"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})]}),u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:`You're logged in. Click "Next" to configure your LLM model.`})]});const z=ae("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 u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Create Account"}),u.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."})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"display-name",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Display Name"}),u.jsx("input",{id:"display-name",type:"text",value:m,onChange:_=>x(_.target.value),className:z,placeholder:"Alex"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",value:n,onChange:_=>r(_.target.value),className:z,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",value:s,onChange:_=>i(_.target.value),className:z,placeholder:"Choose a strong password"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),u.jsx("input",{id:"confirm-password",type:"password",value:d,onChange:_=>f(_.target.value),className:ae(z,d&&!w&&"ring-2 ring-red-500"),placeholder:"Confirm password"}),d&&!w&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:"Passwords don't match"})]})]}),N&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[u.jsx(kx,{size:14,className:"text-red-500 shrink-0"}),u.jsx("span",{className:"text-sm text-red-500",children:N})]}),u.jsxs("button",{type:"button",onClick:T,disabled:!j,className:ae("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:[u.jsx(uo,{size:14}),"Retry"]})]}),!N&&u.jsx("button",{type:"button",onClick:T,disabled:!j,className:ae("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:v?"Creating...":"Create Superuser Account"})]})}const Yi=[{label:"Welcome",component:wE},{label:"Hardware",component:NE},{label:"Services",component:jE},{label:"Review",component:RE},{label:"Install",component:TE},{label:"Account",component:_E},{label:"LLM",component:CE}],ME=5;function AE({skipToAccount:n}){const{state:r,dispatch:s}=ul();S.useEffect(()=>{n&&s({type:"SET_STEP",step:ME})},[n,s]);const i=On(),d=Yi[r.currentStep].component,f=r.currentStep===0,m=r.currentStep===Yi.length-1,g=r.currentStep===4&&!r.installComplete,y=r.installRunning||g;function p(){m?i("/login"):s({type:"NEXT_STEP"})}function N(){s({type:"PREV_STEP"})}return u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)] p-4",children:u.jsxs("div",{className:"w-full max-w-2xl",children:[u.jsx("div",{className:"mb-6 flex items-center justify-center gap-1",children:Yi.map((M,w)=>u.jsxs("button",{type:"button",onClick:()=>!y&&s({type:"SET_STEP",step:w}),disabled:y,className:ae("flex items-center gap-1",y&&"cursor-not-allowed"),children:[u.jsx("div",{className:ae("flex h-7 w-7 items-center justify-center rounded-full text-xs font-medium transition-colors",w===r.currentStep?"bg-[var(--color-primary)] text-white":w<r.currentStep?"bg-[var(--color-primary)]/20 text-[var(--color-primary)]":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:w+1}),u.jsx("span",{className:ae("hidden text-xs sm:inline",w===r.currentStep?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:M.label}),w<Yi.length-1&&u.jsx("div",{className:ae("mx-1 h-px w-4 sm:w-6",w<r.currentStep?"bg-[var(--color-primary)]/30":"bg-[var(--color-border)]")})]},M.label))}),u.jsx("div",{className:"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-6 shadow-lg",children:u.jsx(d,{})}),u.jsxs("div",{className:"mt-4 flex justify-between",children:[u.jsx("button",{type:"button",onClick:N,disabled:f||y,className:ae("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"}),u.jsx("button",{type:"button",onClick:p,disabled:y,className:ae("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 OE({skipToAccount:n}){return u.jsx(SE,{children:u.jsx(AE,{skipToAccount:n})})}function zE(){const n=On(),r=av(),s=Fj(),[i,d]=S.useState("select"),[f,m]=S.useState(null),[x,v]=S.useState("GGUF"),[g,y]=S.useState(""),[p,N]=S.useState(null),M=_=>{m(_),_.gated?d("token"):j(_,"")},w=()=>{if(!g.trim()){N("HuggingFace token is required for gated models");return}N(null),f&&j(f,g)},j=async(_,V)=>{d("download"),N(null);const L=x==="GGUF"?_.hfRepoGguf:_.hfRepoVllm,ne=x==="GGUF"?_.ggufFilename:void 0;try{await s.mutateAsync({repo:L,filename:ne,token:V||void 0}),T(_)}catch(I){N(`Download failed: ${I.message}`),d("select")}},T=async _=>{d("configure"),N(null);const L={"model.main.name":x==="GGUF"?`.models/${_.ggufFilename}`:`.models/${_.hfRepoVllm.split("/").pop()}`,"model.main.backend":x,"model.main.chat_format":_.chatFormat,"model.main.context_window":_.contextWindow};x==="GGUF"&&(L["inference.gguf.n_gpu_layers"]=-1),x==="VLLM"&&_.quantization&&(L["inference.vllm.quantization"]=_.quantization);try{await r.mutateAsync(L),d("done"),Fe.success("LLM configured successfully")}catch(ne){N(`Configuration failed: ${ne.message}`),d("select")}},z=()=>{n("/dashboard")};return u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-bg)] p-4",children:u.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:[u.jsxs("div",{className:"mb-8 text-center",children:[u.jsx(ad,{className:"mx-auto mb-3 text-[var(--color-primary)]",size:40}),u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Configure a local language model for Jarvis"})]}),u.jsx("div",{className:"mb-8 flex items-center justify-center gap-2",children:["select","download","configure","done"].map((_,V)=>{const L=i==="token"?"select":i,ne=["select","download","configure","done"];return u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:ae("h-2 w-2 rounded-full",L===_?"bg-[var(--color-primary)]":ne.indexOf(L)>V?"bg-green-500":"bg-[var(--color-border)]")}),V<3&&u.jsx("div",{className:"h-px w-8 bg-[var(--color-border)]"})]},_)})}),p&&u.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:[u.jsx(Aa,{size:16,className:"mt-0.5 shrink-0"}),p]}),i==="select"&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Select a model"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:()=>v("GGUF"),className:ae("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="GGUF"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"GGUF"}),u.jsx("button",{onClick:()=>v("VLLM"),className:ae("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="VLLM"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"vLLM"})]})]}),u.jsx("div",{className:"grid gap-3",children:ar.map(_=>u.jsxs("button",{onClick:()=>M(_),className:ae("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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:_.displayName}),_.gated&&u.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:[u.jsx(Td,{size:10}),"Gated"]})]}),u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[_.quantization?`${_.quantization.toUpperCase()} 4-bit`:_.chatFormat," · ",_.contextWindow.toLocaleString()," ctx"]})]}),u.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["~",x==="GGUF"?_.sizeGguf:_.sizeVllm]})]},_.id))}),u.jsx("div",{className:"flex justify-end pt-2",children:u.jsx("button",{onClick:z,className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Skip for now"})})]}),i==="token"&&f&&u.jsxs("div",{className:"space-y-4",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Access Required"}),u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[u.jsx("strong",{children:f.displayName})," is a gated model. You need to:"]}),u.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-sm text-[var(--color-text-muted)]",children:[u.jsx("li",{children:"Visit the model page on huggingface.co and accept the license agreement"}),u.jsx("li",{children:"Create an access token at huggingface.co/settings/tokens"}),u.jsx("li",{children:"Paste your token below"})]}),u.jsx("input",{type:"password",value:g,onChange:_=>y(_.target.value),placeholder:"hf_...",className:ae("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)]")}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("button",{onClick:()=>{d("select"),N(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),u.jsx("button",{onClick:w,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Continue"})]})]}),i==="download"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(ds,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Downloading model..."}),u.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," ","(~",x==="GGUF"?f?.sizeGguf:f?.sizeVllm,")"]}),u.jsx("p",{className:"mt-4 text-xs text-[var(--color-text-muted)]",children:"This may take several minutes depending on your connection"})]}),i==="configure"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(Bx,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Configuring..."}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Writing settings and restarting LLM proxy"})]}),i==="done"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(pw,{className:"mb-4 text-green-500",size:40}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"LLM Ready"}),u.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," configured on ",x]}),u.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."}),u.jsx("button",{onClick:()=>n("/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"})]}),(s.isPending||r.isPending)&&i!=="download"&&i!=="configure"&&u.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:u.jsx(Ma,{className:"animate-spin text-white",size:32})})]})})}const kE=new M1;function DE(){const[n,r]=S.useState(!0),[s,i]=S.useState(!1),[d,f]=S.useState(!1);return S.useEffect(()=>{Md().then(m=>{m.state==="deployed-needs-account"?(f(!0),i(!0)):i(!m.configured)}).catch(()=>{i(!1)}).finally(()=>r(!1))},[]),n?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-primary)] border-t-transparent"})}):u.jsxs(Rb,{children:[u.jsx($t,{path:"/setup",element:u.jsx(OE,{skipToAccount:d})}),u.jsx($t,{path:"/login",element:u.jsx(uj,{})}),u.jsx($t,{path:"/llm-setup",element:u.jsx(zE,{})}),u.jsxs($t,{element:u.jsx(cj,{}),children:[u.jsx($t,{path:"/dashboard",element:u.jsx(Ij,{})}),u.jsx($t,{path:"/settings",element:u.jsx(Nj,{})}),u.jsx($t,{path:"/services",element:u.jsx(Hj,{})}),u.jsx($t,{path:"/models",element:u.jsx(mE,{})}),u.jsx($t,{path:"/update",element:u.jsx(hE,{})}),u.jsx($t,{path:"/nodes",element:u.jsx(iE,{})}),u.jsx($t,{path:"/",element:s?u.jsx(Ii,{to:"/setup",replace:!0}):u.jsx(Ii,{to:"/dashboard",replace:!0})}),u.jsx($t,{path:"*",element:u.jsx(gE,{})})]})]})}function UE(){return u.jsx(xS,{children:u.jsx(A1,{client:kE,children:u.jsxs(ew,{children:[u.jsx($b,{children:u.jsx(DE,{})}),u.jsx(pS,{position:"bottom-right",richColors:!0})]})})})}R0.createRoot(document.getElementById("root")).render(u.jsx(S.StrictMode,{children:u.jsx(UE,{})}));
15
+ `):" "+dg(m[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return d}const Ex={getAdapter:VS,adapters:wd};function Du(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ss(null,n)}function fg(n){return Du(n),n.headers=Gt.from(n.headers),n.data=ku.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ex.getAdapter(n.adapter||bs.adapter,n)(n).then(function(i){return Du(n),i.data=ku.call(n,n.transformResponse,i),i.headers=Gt.from(i.headers),i},function(i){return bx(i)||(Du(n),i&&i.response&&(i.response.data=ku.call(n,n.transformResponse,i.response),i.response.headers=Gt.from(i.response.headers))),Promise.reject(i)})}const Tx="1.13.4",co={};["object","boolean","number","function","string","symbol"].forEach((n,r)=>{co[n]=function(i){return typeof i===n||"a"+(r<1?"n ":" ")+n}});const mg={};co.transitional=function(r,s,i){function d(f,m){return"[Axios v"+Tx+"] Transitional option '"+f+"'"+m+(i?". "+i:"")}return(f,m,x)=>{if(r===!1)throw new ve(d(m," has been removed"+(s?" in "+s:"")),ve.ERR_DEPRECATED);return s&&!mg[m]&&(mg[m]=!0,console.warn(d(m," has been deprecated since v"+s+" and will be removed in the near future"))),r?r(f,m,x):!0}};co.spelling=function(r){return(s,i)=>(console.warn(`${i} is likely a misspelling of ${r}`),!0)};function YS(n,r,s){if(typeof n!="object")throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let d=i.length;for(;d-- >0;){const f=i[d],m=r[f];if(m){const x=n[f],v=x===void 0||m(x,f,n);if(v!==!0)throw new ve("option "+f+" must be "+v,ve.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new ve("Unknown option "+f,ve.ERR_BAD_OPTION)}}const Ji={assertOptions:YS,validators:co},_a=Ji.validators;let sl=class{constructor(r){this.defaults=r||{},this.interceptors={request:new tg,response:new tg}}async request(r,s){try{return await this._request(r,s)}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(r,s){typeof r=="string"?(s=s||{},s.url=r):s=r||{},s=cl(this.defaults,s);const{transitional:i,paramsSerializer:d,headers:f}=s;i!==void 0&&Ji.assertOptions(i,{silentJSONParsing:_a.transitional(_a.boolean),forcedJSONParsing:_a.transitional(_a.boolean),clarifyTimeoutError:_a.transitional(_a.boolean)},!1),d!=null&&(q.isFunction(d)?s.paramsSerializer={serialize:d}:Ji.assertOptions(d,{encode:_a.function,serialize:_a.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Ji.assertOptions(s,{baseUrl:_a.spelling("baseURL"),withXsrfToken:_a.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let m=f&&q.merge(f.common,f[s.method]);f&&q.forEach(["delete","get","head","post","put","patch","common"],w=>{delete f[w]}),s.headers=Gt.concat(m,f);const x=[];let v=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(s)===!1||(v=v&&j.synchronous,x.unshift(j.fulfilled,j.rejected))});const g=[];this.interceptors.response.forEach(function(j){g.push(j.fulfilled,j.rejected)});let y,p=0,N;if(!v){const w=[fg.bind(this),void 0];for(w.unshift(...x),w.push(...g),N=w.length,y=Promise.resolve(s);p<N;)y=y.then(w[p++],w[p++]);return y}N=x.length;let M=s;for(;p<N;){const w=x[p++],j=x[p++];try{M=w(M)}catch(R){j.call(this,R);break}}try{y=fg.call(this,M)}catch(w){return Promise.reject(w)}for(p=0,N=g.length;p<N;)y=y.then(g[p++],g[p++]);return y}getUri(r){r=cl(this.defaults,r);const s=wx(r.baseURL,r.url,r.allowAbsoluteUrls);return xx(s,r.params,r.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(r){sl.prototype[r]=function(s,i){return this.request(cl(i||{},{method:r,url:s,data:(i||{}).data}))}});q.forEach(["post","put","patch"],function(r){function s(i){return function(f,m,x){return this.request(cl(x||{},{method:r,headers:i?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}sl.prototype[r]=s(),sl.prototype[r+"Form"]=s(!0)});let XS=class Rx{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(f){s=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(x=>{i.subscribe(x),f=x}).then(d);return m.cancel=function(){i.unsubscribe(f)},m},r(function(f,m,x){i.reason||(i.reason=new Ss(f,m,x),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const s=this._listeners.indexOf(r);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const r=new AbortController,s=i=>{r.abort(i)};return this.subscribe(s),r.signal.unsubscribe=()=>this.unsubscribe(s),r.signal}static source(){let r;return{token:new Rx(function(d){r=d}),cancel:r}}};function FS(n){return function(s){return n.apply(null,s)}}function KS(n){return q.isObject(n)&&n.isAxiosError===!0}const ed={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(ed).forEach(([n,r])=>{ed[r]=n});function Cx(n){const r=new sl(n),s=sx(sl.prototype.request,r);return q.extend(s,sl.prototype,r,{allOwnKeys:!0}),q.extend(s,r,null,{allOwnKeys:!0}),s.create=function(d){return Cx(cl(n,d))},s}const nt=Cx(bs);nt.Axios=sl;nt.CanceledError=Ss;nt.CancelToken=XS;nt.isCancel=bx;nt.VERSION=Tx;nt.toFormData=oo;nt.AxiosError=ve;nt.Cancel=nt.CanceledError;nt.all=function(r){return Promise.all(r)};nt.spread=FS;nt.isAxiosError=KS;nt.mergeConfig=cl;nt.AxiosHeaders=Gt;nt.formToJSON=n=>yx(q.isHTMLForm(n)?new FormData(n):n);nt.getAdapter=Ex.getAdapter;nt.HttpStatusCode=ed;nt.default=nt;const{Axios:GE,AxiosError:QE,CanceledError:VE,isCancel:YE,CancelToken:XE,VERSION:FE,all:KE,Cancel:ZE,isAxiosError:JE,spread:$E,toFormData:PE,AxiosHeaders:IE,HttpStatusCode:WE,formToJSON:eT,getAdapter:tT,mergeConfig:aT}=nt,Ce=nt.create({baseURL:""});function tr(n){n?Ce.defaults.headers.common.Authorization=`Bearer ${n}`:delete Ce.defaults.headers.common.Authorization}let td=null;function ZS(n){td=n}let _x=null;function JS(n){_x=n}Ce.interceptors.request.use(n=>{if(!n.headers.Authorization){const r=localStorage.getItem("access_token");r&&(n.headers.Authorization=`Bearer ${r}`)}return n});Ce.interceptors.response.use(n=>n,async n=>{const r=n.config;if(r.url?.startsWith("/api/auth/"))return Promise.reject(n);if(n.response?.status===401&&!r._retry&&td){r._retry=!0;const s=await td();if(s)return r.headers.Authorization=`Bearer ${s}`,Ce(r);_x?.()}return Promise.reject(n)});async function $S(){const{data:n}=await Ce.get("/api/auth/setup-status");return n}async function Mx(n,r,s){const{data:i}=await Ce.post("/api/auth/setup",{email:n,password:r,username:s});return i}async function PS(n,r){const{data:s}=await Ce.post("/api/auth/login",{email:n,password:r});return s}async function IS(n){const{data:r}=await Ce.post("/api/auth/refresh",{refresh_token:n});return r}const Ax=S.createContext(void 0),cs="jarvis-admin:access_token",Wl="jarvis-admin:refresh_token",qi="jarvis-admin:user",WS=600*1e3;function ew({children:n}){const[r,s]=S.useState(()=>{const v=localStorage.getItem(cs),g=localStorage.getItem(Wl),y=localStorage.getItem(qi);if(v&&g&&y)try{const p=JSON.parse(y);return tr(v),{user:p,accessToken:v,refreshToken:g,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(cs),localStorage.removeItem(Wl),localStorage.removeItem(qi),tr(null),s({user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null})},[]),d=S.useCallback(async()=>{const v=localStorage.getItem(Wl);if(!v)return null;try{const g=await IS(v),y=g.access_token,p=g.refresh_token??v;return localStorage.setItem(cs,y),localStorage.setItem(Wl,p),tr(y),s(N=>({...N,accessToken:y,refreshToken:p})),y}catch{return i(),null}},[i]);S.useEffect(()=>{ZS(d),JS(i)},[d,i]),S.useEffect(()=>{if(!r.isAuthenticated)return;const v=setInterval(()=>{d()},WS);return()=>clearInterval(v)},[r.isAuthenticated,d]);const f=S.useCallback(async(v,g)=>{s(y=>({...y,error:null,isLoading:!0}));try{const y=await PS(v,g);if(!y.user.is_superuser){s(p=>({...p,isLoading:!1,error:"Admin access required. This account is not a superuser."}));return}localStorage.setItem(cs,y.access_token),localStorage.setItem(Wl,y.refresh_token),localStorage.setItem(qi,JSON.stringify(y.user)),tr(y.access_token),s({user:y.user,accessToken:y.access_token,refreshToken:y.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(y){const p=y?.response?.data?.detail??"Login failed";s(N=>({...N,isLoading:!1,error:p}))}},[]),m=S.useCallback(async(v,g,y)=>{s(p=>({...p,error:null,isLoading:!0}));try{const p=await Mx(v,g,y);localStorage.setItem(cs,p.access_token),localStorage.setItem(Wl,p.refresh_token),localStorage.setItem(qi,JSON.stringify(p.user)),tr(p.access_token),s({user:p.user,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(p){const N=p?.response?.data?.detail??"Setup failed";s(M=>({...M,isLoading:!1,error:N}))}},[]),x=S.useMemo(()=>({state:r,login:f,setup:m,logout:i}),[r,f,m,i]);return u.jsx(Ax.Provider,{value:x,children:n})}function Nd(){const n=S.useContext(Ax);if(!n)throw new Error("useAuth must be used within AuthProvider");return n}const Ox=(...n)=>n.filter((r,s,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===s).join(" ").trim();const tw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const aw=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,i)=>i?i.toUpperCase():s.toLowerCase());const hg=n=>{const r=aw(n);return r.charAt(0).toUpperCase()+r.slice(1)};var nw={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 lw=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const rw=S.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:d="",children:f,iconNode:m,...x},v)=>S.createElement("svg",{ref:v,...nw,width:r,height:r,stroke:n,strokeWidth:i?Number(s)*24/Number(r):s,className:Ox("lucide",d),...!f&&!lw(x)&&{"aria-hidden":"true"},...x},[...m.map(([g,y])=>S.createElement(g,y)),...Array.isArray(f)?f:[f]]));const Ne=(n,r)=>{const s=S.forwardRef(({className:i,...d},f)=>S.createElement(rw,{ref:f,iconNode:r,className:Ox(`lucide-${tw(hg(n))}`,`lucide-${n}`,i),...d}));return s.displayName=hg(n),s};const sw=[["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"}]],iw=Ne("box",sw);const ow=[["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"}]],ad=Ne("brain",ow);const cw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jd=Ne("check",cw);const uw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ed=Ne("chevron-down",uw);const dw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zx=Ne("chevron-right",dw);const fw=[["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"}]],kx=Ne("circle-alert",fw);const mw=[["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"}]],Dx=Ne("circle-arrow-up",mw);const hw=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pw=Ne("circle-check-big",hw);const gw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ca=Ne("circle-check",gw);const xw=[["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"}]],$i=Ne("circle-x",xw);const vw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nd=Ne("circle",vw);const yw=[["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"}]],Ux=Ne("copy",yw);const bw=[["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"}]],hs=Ne("cpu",bw);const Sw=[["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"}]],ww=Ne("database",Sw);const Nw=[["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"}]],ds=Ne("download",Nw);const jw=[["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"}]],Ew=Ne("external-link",jw);const Tw=[["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"}]],Rw=Ne("file-text",Tw);const Cw=[["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"}]],Td=Ne("hard-drive",Cw);const _w=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Mw=Ne("info",_w);const Aw=[["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"}]],Ow=Ne("key",Aw);const zw=[["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"}]],kw=Ne("layout-dashboard",zw);const Dw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ma=Ne("loader-circle",Dw);const Uw=[["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"}]],Rd=Ne("lock",Uw);const Lw=[["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"}]],Bw=Ne("log-out",Lw);const Hw=[["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"}]],qw=Ne("monitor",Hw);const Gw=[["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"}]],Qw=Ne("moon",Gw);const Vw=[["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"}]],Yw=Ne("pencil",Vw);const Xw=[["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"}]],Fw=Ne("play",Xw);const Kw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zw=Ne("plus",Kw);const Jw=[["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"}]],va=Ne("refresh-cw",Jw);const $w=[["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"}]],uo=Ne("rotate-ccw",$w);const Pw=[["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"}]],Lx=Ne("rotate-cw",Pw);const Iw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ww=Ne("search",Iw);const eN=[["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"}]],Cd=Ne("server",eN);const tN=[["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"}]],Bx=Ne("settings",tN);const aN=[["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"}]],nN=Ne("sparkles",aN);const lN=[["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"}]],rN=Ne("sun",lN);const sN=[["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"}]],Hx=Ne("trash-2",sN);const iN=[["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"}]],Aa=Ne("triangle-alert",iN);const oN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qx=Ne("x",oN);const cN=[["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"}]],uN=Ne("zap-off",cN);const dN=[["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"}]],fN=Ne("zap",dN);function Gx(n){var r,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var d=n.length;for(r=0;r<d;r++)n[r]&&(s=Gx(n[r]))&&(i&&(i+=" "),i+=s)}else for(s in n)n[s]&&(i&&(i+=" "),i+=s);return i}function mN(){for(var n,r,s=0,i="",d=arguments.length;s<d;s++)(n=arguments[s])&&(r=Gx(n))&&(i&&(i+=" "),i+=r);return i}const hN=(n,r)=>{const s=new Array(n.length+r.length);for(let i=0;i<n.length;i++)s[i]=n[i];for(let i=0;i<r.length;i++)s[n.length+i]=r[i];return s},pN=(n,r)=>({classGroupId:n,validator:r}),Qx=(n=new Map,r=null,s)=>({nextPart:n,validators:r,classGroupId:s}),ao="-",pg=[],gN="arbitrary..",xN=n=>{const r=yN(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return vN(m);const x=m.split(ao),v=x[0]===""&&x.length>1?1:0;return Vx(x,v,r)},getConflictingClassGroupIds:(m,x)=>{if(x){const v=i[m],g=s[m];return v?g?hN(g,v):v:g||pg}return s[m]||pg}}},Vx=(n,r,s)=>{if(n.length-r===0)return s.classGroupId;const d=n[r],f=s.nextPart.get(d);if(f){const g=Vx(n,r+1,f);if(g)return g}const m=s.validators;if(m===null)return;const x=r===0?n.join(ao):n.slice(r).join(ao),v=m.length;for(let g=0;g<v;g++){const y=m[g];if(y.validator(x))return y.classGroupId}},vN=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),s=r.indexOf(":"),i=r.slice(0,s);return i?gN+i:void 0})(),yN=n=>{const{theme:r,classGroups:s}=n;return bN(s,r)},bN=(n,r)=>{const s=Qx();for(const i in n){const d=n[i];_d(d,s,i,r)}return s},_d=(n,r,s,i)=>{const d=n.length;for(let f=0;f<d;f++){const m=n[f];SN(m,r,s,i)}},SN=(n,r,s,i)=>{if(typeof n=="string"){wN(n,r,s);return}if(typeof n=="function"){NN(n,r,s,i);return}jN(n,r,s,i)},wN=(n,r,s)=>{const i=n===""?r:Yx(r,n);i.classGroupId=s},NN=(n,r,s,i)=>{if(EN(n)){_d(n(i),r,s,i);return}r.validators===null&&(r.validators=[]),r.validators.push(pN(s,n))},jN=(n,r,s,i)=>{const d=Object.entries(n),f=d.length;for(let m=0;m<f;m++){const[x,v]=d[m];_d(v,Yx(r,x),s,i)}},Yx=(n,r)=>{let s=n;const i=r.split(ao),d=i.length;for(let f=0;f<d;f++){const m=i[f];let x=s.nextPart.get(m);x||(x=Qx(),s.nextPart.set(m,x)),s=x}return s},EN=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,TN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),i=Object.create(null);const d=(f,m)=>{s[f]=m,r++,r>n&&(r=0,i=s,s=Object.create(null))};return{get(f){let m=s[f];if(m!==void 0)return m;if((m=i[f])!==void 0)return d(f,m),m},set(f,m){f in s?s[f]=m:d(f,m)}}},ld="!",gg=":",RN=[],xg=(n,r,s,i,d)=>({modifiers:n,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:i,isExternal:d}),CN=n=>{const{prefix:r,experimentalParseClassName:s}=n;let i=d=>{const f=[];let m=0,x=0,v=0,g;const y=d.length;for(let j=0;j<y;j++){const R=d[j];if(m===0&&x===0){if(R===gg){f.push(d.slice(v,j)),v=j+1;continue}if(R==="/"){g=j;continue}}R==="["?m++:R==="]"?m--:R==="("?x++:R===")"&&x--}const p=f.length===0?d:d.slice(v);let N=p,M=!1;p.endsWith(ld)?(N=p.slice(0,-1),M=!0):p.startsWith(ld)&&(N=p.slice(1),M=!0);const w=g&&g>v?g-v:void 0;return xg(f,M,N,w)};if(r){const d=r+gg,f=i;i=m=>m.startsWith(d)?f(m.slice(d.length)):xg(RN,!1,m,void 0,!0)}if(s){const d=i;i=f=>s({className:f,parseClassName:d})}return i},_N=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{r.set(s,1e6+i)}),s=>{const i=[];let d=[];for(let f=0;f<s.length;f++){const m=s[f],x=m[0]==="[",v=r.has(m);x||v?(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}},MN=n=>({cache:TN(n.cacheSize),parseClassName:CN(n),sortModifiers:_N(n),...xN(n)}),AN=/\s+/,ON=(n,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:d,sortModifiers:f}=r,m=[],x=n.trim().split(AN);let v="";for(let g=x.length-1;g>=0;g-=1){const y=x[g],{isExternal:p,modifiers:N,hasImportantModifier:M,baseClassName:w,maybePostfixModifierPosition:j}=s(y);if(p){v=y+(v.length>0?" "+v:v);continue}let R=!!j,z=i(R?w.substring(0,j):w);if(!z){if(!R){v=y+(v.length>0?" "+v:v);continue}if(z=i(w),!z){v=y+(v.length>0?" "+v:v);continue}R=!1}const _=N.length===0?"":N.length===1?N[0]:f(N).join(":"),V=M?_+ld:_,L=V+z;if(m.indexOf(L)>-1)continue;m.push(L);const ne=d(z,R);for(let I=0;I<ne.length;++I){const ee=ne[I];m.push(V+ee)}v=y+(v.length>0?" "+v:v)}return v},zN=(...n)=>{let r=0,s,i,d="";for(;r<n.length;)(s=n[r++])&&(i=Xx(s))&&(d&&(d+=" "),d+=i);return d},Xx=n=>{if(typeof n=="string")return n;let r,s="";for(let i=0;i<n.length;i++)n[i]&&(r=Xx(n[i]))&&(s&&(s+=" "),s+=r);return s},kN=(n,...r)=>{let s,i,d,f;const m=v=>{const g=r.reduce((y,p)=>p(y),n());return s=MN(g),i=s.cache.get,d=s.cache.set,f=x,x(v)},x=v=>{const g=i(v);if(g)return g;const y=ON(v,s);return d(v,y),y};return f=m,(...v)=>f(zN(...v))},DN=[],ut=n=>{const r=s=>s[n]||DN;return r.isThemeGetter=!0,r},Fx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UN=/^\d+\/\d+$/,LN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BN=/\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$/,HN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,er=n=>UN.test(n),Te=n=>!!n&&!Number.isNaN(Number(n)),_n=n=>!!n&&Number.isInteger(Number(n)),Uu=n=>n.endsWith("%")&&Te(n.slice(0,-1)),Ia=n=>LN.test(n),QN=()=>!0,VN=n=>BN.test(n)&&!HN.test(n),Zx=()=>!1,YN=n=>qN.test(n),XN=n=>GN.test(n),FN=n=>!oe(n)&&!ce(n),KN=n=>cr(n,Px,Zx),oe=n=>Fx.test(n),nl=n=>cr(n,Ix,VN),Lu=n=>cr(n,IN,Te),vg=n=>cr(n,Jx,Zx),ZN=n=>cr(n,$x,XN),Gi=n=>cr(n,Wx,YN),ce=n=>Kx.test(n),us=n=>ur(n,Ix),JN=n=>ur(n,WN),yg=n=>ur(n,Jx),$N=n=>ur(n,Px),PN=n=>ur(n,$x),Qi=n=>ur(n,Wx,!0),cr=(n,r,s)=>{const i=Fx.exec(n);return i?i[1]?r(i[1]):s(i[2]):!1},ur=(n,r,s=!1)=>{const i=Kx.exec(n);return i?i[1]?r(i[1]):s:!1},Jx=n=>n==="position"||n==="percentage",$x=n=>n==="image"||n==="url",Px=n=>n==="length"||n==="size"||n==="bg-size",Ix=n=>n==="length",IN=n=>n==="number",WN=n=>n==="family-name",Wx=n=>n==="shadow",ej=()=>{const n=ut("color"),r=ut("font"),s=ut("text"),i=ut("font-weight"),d=ut("tracking"),f=ut("leading"),m=ut("breakpoint"),x=ut("container"),v=ut("spacing"),g=ut("radius"),y=ut("shadow"),p=ut("inset-shadow"),N=ut("text-shadow"),M=ut("drop-shadow"),w=ut("blur"),j=ut("perspective"),R=ut("aspect"),z=ut("ease"),_=ut("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ne=()=>[...L(),ce,oe],I=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto","contain","none"],$=()=>[ce,oe,v],P=()=>[er,"full","auto",...$()],re=()=>[_n,"none","subgrid",ce,oe],se=()=>["auto",{span:["full",_n,ce,oe]},_n,ce,oe],he=()=>[_n,"auto",ce,oe],Ae=()=>["auto","min","max","fr",ce,oe],De=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Be=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...$()],Z=()=>[er,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],F=()=>[n,ce,oe],xe=()=>[...L(),yg,vg,{position:[ce,oe]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",$N,KN,{size:[ce,oe]}],G=()=>[Uu,us,nl],Q=()=>["","none","full",g,ce,oe],J=()=>["",Te,us,nl],le=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Te,Uu,yg,vg],be=()=>["","none",w,ce,oe],B=()=>["none",Te,ce,oe],W=()=>["none",Te,ce,oe],Ee=()=>[Te,ce,oe],Re=()=>[er,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ia],breakpoint:[Ia],color:[QN],container:[Ia],"drop-shadow":[Ia],ease:["in","out","in-out"],font:[FN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ia],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ia],shadow:[Ia],spacing:["px",Te],text:[Ia],"text-shadow":[Ia],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",er,oe,ce,R]}],container:["container"],columns:[{columns:[Te,oe,ce,x]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",ce,oe]}],basis:[{basis:[er,"full","auto",x,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,er,"auto","initial","none",oe]}],grow:[{grow:["",Te,ce,oe]}],shrink:[{shrink:["",Te,ce,oe]}],order:[{order:[_n,"first","last","none",ce,oe]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:se()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:se()}],"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":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...De(),"normal"]}],"justify-items":[{"justify-items":[...Be(),"normal"]}],"justify-self":[{"justify-self":["auto",...Be()]}],"align-content":[{content:["normal",...De()]}],"align-items":[{items:[...Be(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Be(),{baseline:["","last"]}]}],"place-content":[{"place-content":De()}],"place-items":[{"place-items":[...Be(),"baseline"]}],"place-self":[{"place-self":["auto",...Be()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[x,"screen",...Z()]}],"min-w":[{"min-w":[x,"screen","none",...Z()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[m]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",s,us,nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ce,Lu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uu,oe]}],"font-family":[{font:[JN,oe,r]}],"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,oe]}],"line-clamp":[{"line-clamp":[Te,"none",ce,Lu]}],leading:[{leading:[f,...$()]}],"list-image":[{"list-image":["none",ce,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",ce,nl]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Te,"auto",ce,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,oe]}],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,oe]}],"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:ge()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,ce,oe],radial:["",ce,oe],conic:[_n,ce,oe]},PN,ZN]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,ce,oe]}],"outline-w":[{outline:["",Te,us,nl]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",y,Qi,Gi]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,Qi,Gi]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Te,nl]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",N,Qi,Gi]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Te,ce,oe]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"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":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[ce,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":L()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:xe()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,oe]}],filter:[{filter:["","none",ce,oe]}],blur:[{blur:be()}],brightness:[{brightness:[Te,ce,oe]}],contrast:[{contrast:[Te,ce,oe]}],"drop-shadow":[{"drop-shadow":["","none",M,Qi,Gi]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Te,ce,oe]}],"hue-rotate":[{"hue-rotate":[Te,ce,oe]}],invert:[{invert:["",Te,ce,oe]}],saturate:[{saturate:[Te,ce,oe]}],sepia:[{sepia:["",Te,ce,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,oe]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[Te,ce,oe]}],"backdrop-contrast":[{"backdrop-contrast":[Te,ce,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,ce,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,ce,oe]}],"backdrop-invert":[{"backdrop-invert":["",Te,ce,oe]}],"backdrop-opacity":[{"backdrop-opacity":[Te,ce,oe]}],"backdrop-saturate":[{"backdrop-saturate":[Te,ce,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,ce,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",ce,oe]}],ease:[{ease:["linear","initial",z,ce,oe]}],delay:[{delay:[Te,ce,oe]}],animate:[{animate:["none",_,ce,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,ce,oe]}],"perspective-origin":[{"perspective-origin":ne()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[ce,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:ne()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Re()}],"translate-x":[{"translate-x":Re()}],"translate-y":[{"translate-y":Re()}],"translate-z":[{"translate-z":Re()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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,oe]}],"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":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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,oe]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Te,us,nl,Lu]}],stroke:[{stroke:["none",...F()]}],"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"]}},tj=kN(ej);function ae(...n){return tj(mN(n))}async function aj(){const{data:n}=await Ce.get("/api/system/info");return n}function nj(){return Oa({queryKey:["system-info"],queryFn:aj,staleTime:6e4})}function lj(n){const r=Math.floor(n/86400),s=Math.floor(n%86400/3600);if(r>0)return`${r}d ${s}h`;const i=Math.floor(n%3600/60);return s>0?`${s}h ${i}m`:`${i}m`}function rj(){const{data:n}=nj();return n?u.jsxs("div",{className:"border-t border-[var(--color-border)] px-3 py-2 text-[10px] text-[var(--color-text-muted)]",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(hs,{size:10}),u.jsxs("span",{children:[n.cpuCount," cores"]}),u.jsx("span",{className:"mx-0.5",children:"|"}),u.jsx(Td,{size:10}),u.jsxs("span",{children:[Math.round(n.totalMemoryMb/1024),"GB"]})]}),u.jsxs("div",{className:"mt-0.5",children:[n.hostname," · up ",lj(n.uptime)," · v",n.version]})]}):null}const sj=[{label:"Dashboard",icon:kw,path:"/dashboard"},{label:"Settings",icon:Bx,path:"/settings"},{label:"Services",icon:Cd,path:"/services"},{label:"Models",icon:iw,path:"/models"},{label:"Nodes",icon:hs,path:"/nodes"}];function ij(){return u.jsxs("aside",{className:"flex w-56 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsx("div",{className:"flex h-14 items-center border-b border-[var(--color-border)] px-4",children:u.jsx("span",{className:"text-lg font-bold text-[var(--color-primary)]",children:"Jarvis"})}),u.jsx("nav",{className:"flex-1 space-y-1 p-2",children:sj.map(n=>u.jsxs(Fg,{to:n.path,className:({isActive:r})=>ae("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",r?"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:[u.jsx(n.icon,{size:18}),n.label]},n.path))}),u.jsx(rj,{})]})}function oj(){const{state:n,logout:r}=Nd(),{theme:s,toggleTheme:i}=v2();return u.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-surface)] px-6",children:[u.jsx("h2",{className:"text-sm font-medium text-[var(--color-text-muted)]",children:"Admin Dashboard"}),u.jsxs("div",{className:"flex items-center gap-3",children:[n.user&&u.jsx("span",{className:"text-sm text-[var(--color-text-muted)]",children:n.user.email}),u.jsx("button",{onClick:i,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",title:`Switch to ${s==="dark"?"light":"dark"} mode`,children:s==="dark"?u.jsx(rN,{size:18}):u.jsx(Qw,{size:18})}),u.jsx("button",{onClick:r,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-red-500",title:"Logout",children:u.jsx(Bw,{size:18})})]})]})}function cj(){const{state:n}=Nd();return n.isLoading?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading..."})}):n.isAuthenticated?u.jsxs("div",{className:"flex h-screen bg-[var(--color-background)]",children:[u.jsx(ij,{}),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[u.jsx(oj,{}),u.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:u.jsx(jb,{})})]})]}):u.jsx(Ii,{to:"/login",replace:!0})}function uj(){const{state:n,login:r,setup:s}=Nd(),i=On(),[d,f]=S.useState("loading"),[m,x]=S.useState(""),[v,g]=S.useState(""),[y,p]=S.useState(""),[N,M]=S.useState(""),[w,j]=S.useState(null);if(S.useEffect(()=>{let L=!1;async function ne(){try{const{data:I}=await Ce.get("/api/setup/status");if(!L&&!I.configured){i("/setup",{replace:!0});return}}catch{if(!L){i("/setup",{replace:!0});return}}try{const I=await $S();L||f(I.needs_setup?"setup":"login")}catch{L||f("login")}}return ne(),()=>{L=!0}},[i]),n.isAuthenticated)return u.jsx(Ii,{to:"/settings",replace:!0});const R=L=>{L.preventDefault(),r(m,y)},z=L=>{if(L.preventDefault(),j(null),y!==N){j("Passwords do not match");return}if(y.length<8){j("Password must be at least 8 characters");return}s(m,y,v||void 0)},_=ae("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)]"),V=w??n.error;return d==="loading"?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:u.jsx("div",{className:"flex justify-center",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-border)] border-t-[var(--color-primary)]"})})})}):u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.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"?u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"mb-1 text-center text-2xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),u.jsx("p",{className:"mb-6 text-center text-sm text-[var(--color-text-muted)]",children:"Set up your first administrator account to get started."}),u.jsxs("form",{onSubmit:z,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>x(L.target.value),className:_,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Username"}),u.jsx("input",{id:"username",type:"text",required:!0,autoComplete:"username",value:v,onChange:L=>g(L.target.value),className:_,placeholder:"admin"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:y,onChange:L=>p(L.target.value),className:_})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),u.jsx("input",{id:"confirm-password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:N,onChange:L=>M(L.target.value),className:_})]}),V&&u.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:V}),u.jsx("button",{type:"submit",disabled:n.isLoading,className:ae("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:n.isLoading?"Creating account...":"Create Admin Account"})]})]}):u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"mb-6 text-center text-2xl font-bold text-[var(--color-text)]",children:"Jarvis Admin"}),u.jsxs("form",{onSubmit:R,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>x(L.target.value),className:_,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",required:!0,autoComplete:"current-password",value:y,onChange:L=>p(L.target.value),className:_})]}),V&&u.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:V}),u.jsx("button",{type:"submit",disabled:n.isLoading,className:ae("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:n.isLoading?"Signing in...":"Sign in"})]})]})})})}async function dj(){const{data:n}=await Ce.get("/api/settings/");return n}async function fj(n,r,s){const{data:i}=await Ce.put(`/api/settings/${encodeURIComponent(n)}/${r}`,{value:s});return i}function mj(){return Oa({queryKey:["settings"],queryFn:dj,staleTime:3e4})}function hj(){const n=ua();return ba({mutationFn:({serviceName:r,key:s,value:i})=>fj(r,s,i),onSuccess:()=>{n.invalidateQueries({queryKey:["settings"]})}})}function pj({setting:n,onSave:r,onCancel:s,isSaving:i}){const[d,f]=S.useState(()=>n.value_type==="json"?JSON.stringify(n.value,null,2):n.value_type==="bool"?"":String(n.value??"")),[m,x]=S.useState(()=>!!n.value),[v,g]=S.useState(null),y=!!n.options?.length,p=y&&!n.options.includes(d),[N,M]=S.useState(p),w=R=>{R.preventDefault();let z;switch(n.value_type){case"bool":z=m;break;case"int":if(z=parseInt(d,10),isNaN(z)){g("Must be a whole number");return}g(null);break;case"float":if(z=parseFloat(d),isNaN(z)){g("Must be a number");return}g(null);break;case"json":try{z=JSON.parse(d),g(null)}catch{g("Invalid JSON");return}break;default:z=d}r(z)},j=ae("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 u.jsxs("form",{onSubmit:w,className:"flex items-center gap-2",children:[y?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("select",{value:N?"__other__":d,onChange:R=>{R.target.value==="__other__"?(M(!0),f("")):(M(!1),f(R.target.value))},className:ae(j,"max-w-xs"),children:[n.options.map(R=>u.jsx("option",{value:String(R),children:String(R)},String(R))),u.jsx("option",{value:"__other__",children:"Other..."})]}),N&&u.jsx("input",{type:"text",value:d,onChange:R=>f(R.target.value),placeholder:"Custom value",className:ae(j,"max-w-xs"),autoFocus:!0})]}):n.value_type==="bool"?u.jsx("button",{type:"button",onClick:()=>x(R=>!R),className:ae("relative h-6 w-11 rounded-full transition-colors",m?"bg-[var(--color-primary)]":"bg-[var(--color-border)]"),children:u.jsx("span",{className:ae("absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition-transform",m&&"translate-x-5")})}):n.value_type==="json"?u.jsxs("div",{className:"flex-1",children:[u.jsx("textarea",{value:d,onChange:R=>{f(R.target.value),g(null)},rows:4,className:ae(j,"font-mono text-xs")}),v&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:v})]}):u.jsxs("div",{children:[u.jsx("input",{type:n.value_type==="int"||n.value_type==="float"?"number":n.is_secret?"password":"text",step:n.value_type==="float"?"any":void 0,value:d,onChange:R=>{f(R.target.value),g(null)},className:ae(j,"max-w-xs")}),v&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:v})]}),u.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"}),u.jsx("button",{type:"button",onClick:s,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 gj(n){return n.is_secret?"********":n.value===null||n.value===void 0?"(not set)":n.value_type==="json"?JSON.stringify(n.value):String(n.value)}const xj={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 vj({setting:n,serviceName:r,onRestartService:s}){const[i,d]=S.useState(!1),f=hj(),m=x=>{f.mutate({serviceName:r,key:n.key,value:x},{onSuccess:v=>{d(!1),v.requires_reload?Xe.warning(`Setting updated. ${r} requires a restart to apply.`,s?{action:{label:"Restart",onClick:s}}:void 0):Xe.success("Setting updated")},onError:v=>{Xe.error(`Failed to update: ${v.message}`)}})};return u.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-lg px-3 py-2 hover:bg-[var(--color-surface-alt)]",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"text-sm font-medium text-[var(--color-text)]",children:n.key}),u.jsx("span",{className:ae("rounded px-1.5 py-0.5 text-[10px] font-medium",xj[n.value_type]??"bg-gray-500/10 text-gray-500"),children:n.value_type}),n.from_db&&u.jsx("span",{title:"Stored in database",children:u.jsx(ww,{size:12,className:"text-[var(--color-tertiary)]"})}),n.requires_reload&&u.jsx("span",{title:"Requires service restart",children:u.jsx(Aa,{size:12,className:"text-amber-500"})})]}),n.description&&u.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:n.description}),i?u.jsx("div",{className:"mt-2",children:u.jsx(pj,{setting:n,onSave:m,onCancel:()=>d(!1),isSaving:f.isPending})}):u.jsx("p",{className:"mt-1 font-mono text-xs text-[var(--color-text-muted)]",children:gj(n)})]}),!i&&u.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:u.jsx(Yw,{size:14})})]})}function yj({category:n,settings:r,serviceName:s,onRestartService:i}){const[d,f]=S.useState(!0);return u.jsxs("div",{children:[u.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?u.jsx(Ed,{size:14}):u.jsx(zx,{size:14}),n,u.jsxs("span",{className:"font-normal",children:["(",r.length,")"]})]}),d&&u.jsx("div",{className:"space-y-0.5",children:r.map(m=>u.jsx(vj,{setting:m,serviceName:s,onRestartService:i},m.key))})]})}async function bj(){const{data:n}=await Ce.get("/api/containers");return n}async function Sj(n){const{data:r}=await Ce.post(`/api/containers/${n}/restart`);return r}function ev(){return Oa({queryKey:["containers"],queryFn:bj,staleTime:1e4,refetchInterval:1e4})}function tv(){const n=ua();return ba({mutationFn:r=>Sj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["containers"]})}})}function wj({result:n,defaultExpanded:r=!1}){const[s,i]=S.useState(r),{data:d}=ev(),f=tv(),m=S.useCallback(()=>{const v=d?.containers.find(g=>g.name.includes(n.service_name)||g.name.includes(n.service_name.replace("jarvis-","")));v?f.mutate(v.id,{onSuccess:()=>Xe.success(`${n.service_name} is restarting...`),onError:g=>Xe.error(`Restart failed: ${g.message}`)}):Xe.error(`Could not find container for ${n.service_name}`)},[d,n.service_name,f]),x=S.useMemo(()=>{const v=new Map;for(const g of n.settings){const y=v.get(g.category)??[];v.set(g.category,[...y,g])}return v},[n]);return u.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsxs("button",{onClick:()=>i(v=>!v),className:"flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-[var(--color-surface-alt)]",children:[s?u.jsx(Ed,{size:18,className:"text-[var(--color-text-muted)]"}):u.jsx(zx,{size:18,className:"text-[var(--color-text-muted)]"}),u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.service_name}),n.success?u.jsx(ca,{size:16,className:"text-[var(--color-secondary)]"}):u.jsx($i,{size:16,className:"text-red-500"}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n.success?`${n.settings.length} settings`:n.error??"Error"}),n.latency_ms!=null&&u.jsxs("span",{className:ae("ml-auto text-xs",n.latency_ms>500?"text-amber-500":"text-[var(--color-text-muted)]"),children:[Math.round(n.latency_ms),"ms"]})]}),s&&n.success&&u.jsx("div",{className:"space-y-2 border-t border-[var(--color-border)] px-2 py-3",children:[...x.entries()].map(([v,g])=>u.jsx(yj,{category:v,settings:g,serviceName:n.service_name,onRestartService:m},v))}),s&&!n.success&&u.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-3",children:u.jsx("p",{className:"text-sm text-red-500",children:n.error??"Failed to fetch settings"})})]})}function Nj(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=mj(),[m,x]=S.useState(""),v=S.useMemo(()=>{if(!n)return[];if(!m.trim())return n.services;const g=m.toLowerCase();return n.services.map(y=>({...y,settings:y.settings.filter(p=>p.key.toLowerCase().includes(g)||p.category.toLowerCase().includes(g)||(p.description?.toLowerCase().includes(g)??!1))})).filter(y=>y.settings.length>0||y.service_name.toLowerCase().includes(g))},[n,m]);return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load settings"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Settings"}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[n&&u.jsxs("span",{children:[n.successful_services,"/",n.total_services," services"]}),u.jsx("button",{onClick:()=>d(),disabled:f,className:ae("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14})})]})]}),u.jsxs("div",{className:"relative",children:[u.jsx(Ww,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"}),u.jsx("input",{type:"text",value:m,onChange:g=>x(g.target.value),placeholder:"Search settings...",className:ae("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)]")})]}),u.jsxs("div",{className:"space-y-3",children:[v.map((g,y)=>u.jsx(wj,{result:g,defaultExpanded:y===0},g.service_name)),v.length===0&&u.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 jj(){const{data:n}=await Ce.get("/api/services/registry");return n}async function Ej(n){const{data:r}=await Ce.post("/api/services/register",n);return r}async function Tj(n){const{data:r}=await Ce.post("/api/services/rotate-key",n);return r}async function Rj(n){const{data:r}=await Ce.post("/api/services/probe",n);return r}async function Cj(n){const{data:r}=await Ce.post("/api/services/register",{services:[{name:n.name,host:n.host,port:n.port,scheme:n.scheme,health_path:n.health_path,description:n.description}]});return r}async function _j(n){await Ce.delete(`/api/services/${encodeURIComponent(n)}`)}async function Mj(){const{data:n}=await Ce.get("/api/services/suggestions");return n}function Aj(){return Oa({queryKey:["service-registry"],queryFn:jj,staleTime:3e4})}function Oj(){const n=ua();return ba({mutationFn:Ej,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function zj(){const n=ua();return ba({mutationFn:Tj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function kj(){const n=ua();return ba({mutationFn:Cj,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function Dj(){const n=ua();return ba({mutationFn:_j,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function Uj(){return Oa({queryKey:["service-suggestions"],queryFn:Mj,staleTime:6e4})}function bg({ok:n,label:r}){return u.jsxs("span",{className:ae("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:[n?u.jsx(jd,{size:12}):u.jsx(qx,{size:12}),r]})}function Lj({status:n,error:r,latency:s}){return n==="idle"?null:n==="probing"?u.jsx("span",{className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)]",children:u.jsx(Ma,{size:12,className:"animate-spin"})}):n==="healthy"?u.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[u.jsx(nd,{size:8,fill:"currentColor"}),s!=null&&`${s}ms`]}):u.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-500",title:r,children:[u.jsx(nd,{size:8,fill:"currentColor"}),r||"Unreachable"]})}function Bj({entry:n,checked:r,host:s,port:i,scheme:d,onToggle:f,onHostChange:m,onPortChange:x,onSchemeChange:v,onHostBlur:g,onPortBlur:y,onRotateKey:p,onDelete:N,disabled:M,rotating:w,deleting:j,healthStatus:R,healthError:z,healthLatency:_}){return u.jsxs("div",{className:ae("flex flex-wrap items-center gap-3 rounded-lg border border-[var(--color-border)] p-3","bg-[var(--color-surface)] transition-colors",r&&"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5"),children:[u.jsx("input",{type:"checkbox",checked:r,onChange:f,disabled:M,className:"h-4 w-4 rounded border-[var(--color-border)] accent-[var(--color-primary)]"}),u.jsxs("div",{className:"min-w-[180px] flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-[var(--color-text)]",children:[n.name,n.custom&&u.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"})]}),u.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:n.description})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(bg,{ok:n.config_registered,label:"Config"}),u.jsx(bg,{ok:n.auth_registered,label:"Auth"}),n.custom&&N&&u.jsxs("button",{onClick:N,disabled:M||j,className:ae("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:[u.jsx(Hx,{size:12,className:j?"animate-spin":""}),"Remove"]}),n.auth_registered&&u.jsxs("button",{onClick:p,disabled:M||w,className:ae("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:[u.jsx(Lx,{size:12,className:w?"animate-spin":""}),"Rotate Key"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{type:"button",onClick:()=>{const V=["http","https","mqtt"],L=V[(V.indexOf(d)+1)%V.length];v(L)},disabled:M,className:ae("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"?"border-purple-500/40 bg-purple-500/10 text-purple-600 dark:text-purple-400":"border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-text-muted)]","disabled:opacity-50"),title:"Toggle scheme",children:d}),u.jsx("input",{type:"text",value:s,onChange:V=>m(V.target.value),onBlur:g,disabled:M,placeholder:"host",className:ae("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")}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:":"}),u.jsx("input",{type:"number",value:i,onChange:V=>x(Number(V.target.value)),onBlur:y,disabled:M,className:ae("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")}),u.jsx(Lj,{status:R,error:z,latency:_})]})]})}const Sg={name:"",host:"localhost",port:"",scheme:"http",health_path:"/health",description:""};function Hj(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=Aj(),m=Oj(),x=zj(),v=kj(),g=Dj(),{data:y}=Uj(),[p,N]=S.useState({}),[M,w]=S.useState(null),[j,R]=S.useState(null),[z,_]=S.useState(null),[V,L]=S.useState(null),[ne,I]=S.useState(null),[ee,$]=S.useState({}),[P,re]=S.useState(!1),[se,he]=S.useState(Sg),[Ae,De]=S.useState(!1),Be=S.useRef(null),O=S.useMemo(()=>new Set(n?.services.map(B=>B.name)??[]),[n]),Z=S.useMemo(()=>{const W=(y?.suggestions??[]).filter(Re=>!O.has(Re.id));if(!se.name.trim())return W;const Ee=se.name.toLowerCase();return W.filter(Re=>Re.id.toLowerCase().includes(Ee)||Re.name.toLowerCase().includes(Ee)||Re.description.toLowerCase().includes(Ee))},[y,O,se.name]),F=S.useCallback(B=>{he({name:B.id,description:B.description,host:"localhost",port:String(B.port),scheme:"http",health_path:B.healthCheck}),De(!1)},[]);S.useEffect(()=>{const B=W=>{Be.current&&!Be.current.contains(W.target)&&De(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const xe=S.useCallback(B=>{if(p[B])return p[B];const W=n?.services.find(Ee=>Ee.name===B);return W?{checked:W.config_registered,host:W.current_host??"localhost",port:W.current_port??W.default_port,scheme:W.current_scheme??"http"}:{checked:!1,host:"localhost",port:0,scheme:"http"}},[p,n]),ge=S.useCallback((B,W)=>{N(Ee=>{const Re=Ee[B]??{checked:!1,host:"localhost",port:0};return{...Ee,[B]:{...Re,...W}}})},[]),T=S.useCallback(async(B,W,Ee,Re,da="http")=>{if(!(!W||!Ee)){$(ot=>({...ot,[B]:{status:"probing"}}));try{const ot=await Rj({host:W,port:Ee,health_path:Re,scheme:da});$(zn=>({...zn,[B]:{status:ot.healthy?"healthy":"unhealthy",error:ot.error??void 0,latency:ot.latency_ms??void 0}}))}catch{$(ot=>({...ot,[B]:{status:"unhealthy",error:"Request failed"}}))}}},[]),G=S.useCallback(()=>{if(!n)return;const B=n.services.filter(W=>xe(W.name).checked).map(W=>{const Ee=xe(W.name);return{name:W.name,host:Ee.host,port:Ee.port,scheme:Ee.scheme}});if(B.length===0){Xe.error("No services selected");return}w(null),R(null),m.mutate({services:B},{onSuccess:W=>{w(W.results);const Ee=W.results.filter(da=>da.config_ok&&da.auth_ok).length,Re=W.results.length;Ee===Re?Xe.success(`All ${Re} services registered`):Xe.warning(`${Ee}/${Re} services registered successfully`)},onError:W=>{Xe.error(`Registration failed: ${W.message}`)}})},[n,xe,m]),Q=S.useCallback(B=>{_(B),R(null),x.mutate({service_name:B},{onSuccess:W=>{R(W),_(null),Xe.success(`Key rotated for ${B}`)},onError:W=>{_(null),Xe.error(`Key rotation failed: ${W.message}`)}})},[x]),J=S.useCallback(B=>{L(B),g.mutate(B,{onSuccess:()=>{L(null),Xe.success(`Removed ${B}`)},onError:W=>{L(null),Xe.error(`Failed to remove: ${W.message}`)}})},[g]),le=S.useCallback(()=>{const B=parseInt(se.port,10);if(!se.name.trim()){Xe.error("Service name is required");return}if(!B||B<1||B>65535){Xe.error("Port must be between 1 and 65535");return}v.mutate({name:se.name.trim(),host:se.host.trim()||"localhost",port:B,scheme:se.scheme,health_path:se.health_path.trim()||"/health",description:se.description.trim()},{onSuccess:W=>{const Ee=W.results[0];Ee?.config_ok?(Xe.success(`Added ${se.name.trim()}`),he(Sg),re(!1)):Xe.error(`Failed to add: ${Ee?.error??"Unknown error"}`)},onError:W=>{Xe.error(`Failed to add service: ${W.message}`)}})},[se,v]),fe=S.useCallback(B=>{navigator.clipboard.writeText(B).then(()=>{I(B),setTimeout(()=>I(null),2e3)})},[]),de=n?.services.filter(B=>xe(B.name).checked).length??0,be=M?.some(B=>B.env_written)||j?.env_written===!0;return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load service registry"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Services"}),u.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:n?.services.length??0})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("button",{onClick:()=>re(B=>!B),className:ae("flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium",P?"bg-[var(--color-surface-alt)] text-[var(--color-text)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:[P?u.jsx(qx,{size:14}):u.jsx(Zw,{size:14}),P?"Cancel":"Add Service"]}),u.jsx("button",{onClick:()=>d(),disabled:f,className:ae("rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14})})]})]}),P&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsx("h2",{className:"mb-3 text-sm font-semibold text-[var(--color-text)]",children:"Add Service"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{ref:Be,className:"relative",children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Service"}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:"text",value:se.name,onChange:B=>{he(W=>({...W,name:B.target.value})),De(!0)},onFocus:()=>De(!0),placeholder:"Select or type a service name...",className:ae("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)]")}),u.jsx("button",{type:"button",onClick:()=>De(B=>!B),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:u.jsx(Ed,{size:14})})]}),Ae&&Z.length>0&&u.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:Z.map(B=>u.jsxs("button",{type:"button",onClick:()=>F(B),className:"flex w-full flex-col px-3 py-2 text-left hover:bg-[var(--color-surface-alt)]",children:[u.jsxs("span",{className:"text-sm font-medium text-[var(--color-text)]",children:[B.name,u.jsxs("span",{className:"ml-2 font-normal text-[var(--color-text-muted)]",children:[":",B.port]})]}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:B.description})]},B.id))})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Description"}),u.jsx("input",{type:"text",value:se.description,onChange:B=>he(W=>({...W,description:B.target.value})),placeholder:"e.g. Camera streaming via WebRTC",className:ae("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)]")})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Host"}),u.jsx("input",{type:"text",value:se.host,onChange:B=>he(W=>({...W,host:B.target.value})),placeholder:"localhost",className:ae("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)]")})]}),u.jsxs("div",{className:"flex gap-3",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Port"}),u.jsx("input",{type:"number",value:se.port,onChange:B=>he(W=>({...W,port:B.target.value})),placeholder:"e.g. 1984",className:ae("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)]")})]}),u.jsxs("div",{className:"w-20",children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Scheme"}),u.jsxs("select",{value:se.scheme,onChange:B=>he(W=>({...W,scheme:B.target.value})),className:ae("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:[u.jsx("option",{value:"http",children:"http"}),u.jsx("option",{value:"https",children:"https"}),u.jsx("option",{value:"mqtt",children:"mqtt"})]})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Health Path"}),u.jsx("input",{type:"text",value:se.health_path,onChange:B=>he(W=>({...W,health_path:B.target.value})),placeholder:"/health",className:ae("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)]")})]})]}),u.jsx("div",{className:"mt-3 flex justify-end",children:u.jsx("button",{onClick:le,disabled:v.isPending||!se.name.trim()||!se.port,className:ae("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:v.isPending?"Adding...":"Add Service"})})]}),u.jsx("div",{className:"space-y-2",children:n?.services.map(B=>{const W=xe(B.name),Ee=ee[B.name]??{status:"idle"};return u.jsx(Bj,{entry:B,checked:W.checked,host:W.host,port:W.port,scheme:W.scheme,onToggle:()=>{const Re=!W.checked;ge(B.name,{...W,checked:Re}),Re?T(B.name,W.host,W.port,B.health_path,W.scheme):$(da=>({...da,[B.name]:{status:"idle"}}))},onHostChange:Re=>ge(B.name,{...W,host:Re}),onPortChange:Re=>ge(B.name,{...W,port:Re}),onSchemeChange:Re=>ge(B.name,{...W,scheme:Re}),onHostBlur:()=>{W.checked&&T(B.name,W.host,W.port,B.health_path,W.scheme)},onPortBlur:()=>{W.checked&&T(B.name,W.host,W.port,B.health_path,W.scheme)},onRotateKey:()=>Q(B.name),onDelete:()=>J(B.name),disabled:m.isPending,rotating:z===B.name,deleting:V===B.name,healthStatus:Ee.status,healthError:Ee.error,healthLatency:Ee.latency},B.name)})}),u.jsx("button",{onClick:G,disabled:m.isPending||de===0,className:ae("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 (${de})`}),j&&u.jsx(qj,{serviceName:j.service_name,appKey:j.app_key,envWritten:j.env_written,copiedKey:ne,onCopy:fe,label:"Rotated Key"}),M&&u.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Registration Results"}),M.map(B=>u.jsxs("div",{className:ae("flex flex-wrap items-center gap-3 rounded-lg border p-3 text-sm",B.config_ok&&B.auth_ok?"border-green-500/20 bg-green-500/5":"border-yellow-500/20 bg-yellow-500/5"),children:[u.jsx("span",{className:"min-w-[180px] font-medium text-[var(--color-text)]",children:B.name}),u.jsxs("span",{className:ae("text-xs",B.config_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Config: ",B.config_ok?"OK":"Failed"]}),u.jsxs("span",{className:ae("text-xs",B.auth_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Auth: ",B.auth_ok?B.auth_created?"Created":"Exists":"Failed"]}),B.env_written!==null&&u.jsxs("span",{className:ae("text-xs",B.env_written?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",B.env_written?"Written":"Failed"]}),B.error&&u.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-600 dark:text-yellow-400",children:[u.jsx(Aa,{size:12}),B.error]}),B.auth_created&&B.app_key&&u.jsxs("div",{className:"mt-1 w-full",children:[u.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Aa,{size:12}),"App key (shown once only):"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.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:B.app_key}),u.jsx("button",{onClick:()=>fe(B.app_key),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:ne===B.app_key?u.jsx(jd,{size:14,className:"text-green-500"}):u.jsx(Ux,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]},B.name))]}),be&&u.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",children:[u.jsx(Mw,{size:16,className:"mt-0.5 shrink-0 text-blue-500"}),u.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 qj({serviceName:n,appKey:r,envWritten:s,copiedKey:i,onCopy:d,label:f}){return u.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:[f,": ",n]}),u.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-500/5 p-3",children:[s!==null&&u.jsxs("span",{className:ae("mb-2 inline-block text-xs",s?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",s?"Written":"Failed"]}),u.jsxs("div",{children:[u.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Aa,{size:12}),"New app key (shown once only):"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.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:r}),u.jsx("button",{onClick:()=>d(r),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:i===r?u.jsx(jd,{size:14,className:"text-green-500"}):u.jsx(Ux,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]})]})}async function Gj(){const{data:n}=await Ce.get("/api/llm-setup/status");return n}async function Qj(n){const{data:r}=await Ce.post("/api/llm-setup/configure",{settings:n});return r}async function Vj(n,r,s){const{data:i}=await Ce.post("/api/llm-setup/download",{repo:n,filename:r,token:s});return i}function Yj(){return Oa({queryKey:["llm-status"],queryFn:Gj,staleTime:3e4,retry:1})}function av(){const n=ua();return ba({mutationFn:r=>Qj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["llm-status"]}),n.invalidateQueries({queryKey:["containers"]})}})}function Xj(){return ba({mutationFn:({repo:n,filename:r,token:s})=>Vj(n,r,s)})}async function Md(){const{data:n}=await Ce.get("/api/install/status");return n}async function Fj(n){const r=n?.length?{services:n.join(",")}:{},{data:s}=await Ce.get("/api/install/preflight",{params:r});return s}async function Kj(){const{data:n}=await Ce.get("/api/install/hardware");return n}async function wg(n){const{data:r}=await Ce.post("/api/install/generate",n);return r}async function nv(){const{data:n}=await Ce.get("/api/install/registry");return n}async function Zj(){const{data:n}=await Ce.get("/api/install/defaults");return n}const Jj={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 $j(n){return n.match(/^Up (.+)$/)?.[1]??null}function Ng({container:n,onRestart:r,isRestarting:s}){const i=$j(n.status),d=n.ports.find(f=>f.public)?.public;return u.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx("div",{className:ae("h-2.5 w-2.5 rounded-full",Jj[n.state]??"bg-gray-400")}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate text-sm font-medium text-[var(--color-text)]",children:n.displayName??n.name}),n.description&&u.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:n.description})]}),u.jsx("span",{className:ae("rounded-full px-2 py-0.5 text-xs font-medium",n.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:n.state})]}),u.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-2",children:u.jsxs("div",{className:"flex items-center justify-between text-xs text-[var(--color-text-muted)]",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[i&&u.jsxs("span",{children:["Up ",i]}),d&&u.jsxs("span",{children:[":",d]})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[d&&u.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:u.jsx(Ew,{size:13})}),u.jsx("button",{onClick:()=>r(n.id),disabled:s,className:ae("rounded p-1 hover:bg-[var(--color-surface-alt)]",s&&"animate-spin"),title:"Restart",children:u.jsx(Lx,{size:13})})]})]})})]})}async function Pj(){const{data:n}=await Ce.get("/api/update/check");return n}function lv(){return Oa({queryKey:["update-check"],queryFn:Pj,staleTime:300*1e3,retry:1,refetchOnWindowFocus:!1})}const jg="jarvis-update-dismissed-version";function Eg(){const n=On(),{data:r}=lv(),[s,i]=S.useState(()=>r?.latestVersion?localStorage.getItem(jg)===r.latestVersion:!1);return!r?.updateAvailable||s?null:u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Dx,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Jarvis v",r.latestVersion," available"]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["You have v",r.currentVersion]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[r.releaseUrl&&u.jsx("a",{href:r.releaseUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Release notes"}),u.jsx("button",{onClick:()=>{localStorage.setItem(jg,r.latestVersion),i(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/update"),className:"rounded-lg bg-green-600 px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Update"})]})]})}const Bu="jarvis-admin:llm-setup-dismissed";function Ij(){const n=On(),[r,s]=S.useState(!1),{data:i,isLoading:d,isError:f,error:m,refetch:x,isFetching:v}=ev(),g=tv(),y=Yj(),[p,N]=S.useState(()=>!!localStorage.getItem(Bu));S.useEffect(()=>{Md().then(_=>{_.deployMode==="compose-export"&&s(!0)}).catch(()=>{})},[]);const M=!!y.data&&!y.data.configured&&!p,w=_=>{g.mutate(_,{onSuccess:()=>Xe.success("Container restart initiated"),onError:V=>Xe.error(`Restart failed: ${V.message}`)})};if(r)return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),u.jsx(Eg,{}),M&&u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ad,{size:20,className:"text-[var(--color-primary)]"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>{localStorage.setItem(Bu,"true"),N(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/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"})]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-8 text-center",children:[u.jsx(Cd,{size:32,className:"mx-auto mb-3 text-[var(--color-text-muted)]"}),u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Running in Docker Compose mode"}),u.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 u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})});if(f)return u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load containers"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:m?.message??"Unknown error"}),u.jsx("button",{onClick:()=>x(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]});const j=i?.containers??[],R=j.filter(_=>_.state==="running"),z=j.filter(_=>_.state!=="running");return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[u.jsxs("span",{children:[R.length,"/",j.length," running"]}),u.jsx("button",{onClick:()=>x(),disabled:v,className:ae("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",v&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14})})]})]}),u.jsx(Eg,{}),M&&u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ad,{size:20,className:"text-[var(--color-primary)]"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>{localStorage.setItem(Bu,"true"),N(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/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"})]})]}),j.length===0&&u.jsx("div",{className:"py-12 text-center",children:u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:i?.error?i.error:"No Jarvis containers found. Is Docker running?"})}),R.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Running"}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:R.map(_=>u.jsx(Ng,{container:_,onRestart:w,isRestarting:g.isPending&&g.variables===_.id},_.id))})]}),z.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Stopped"}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:z.map(_=>u.jsx(Ng,{container:_,onRestart:w,isRestarting:g.isPending&&g.variables===_.id},_.id))})]})]})}async function Wj(){const{data:n}=await Ce.get("/api/nodes");return n}async function eE(n){const{data:r}=await Ce.get(`/api/nodes/${n}/nodes`);return r}async function tE(n){const{data:r}=await Ce.post(`/api/nodes/${n}/train-adapter`);return r}function aE(){return Oa({queryKey:["households"],queryFn:Wj,staleTime:3e4})}function nE(n){return Oa({queryKey:["household-nodes",n],queryFn:()=>eE(n),enabled:!!n,staleTime:3e4})}function lE(){const n=ua();return ba({mutationFn:tE,onSuccess:()=>{n.invalidateQueries({queryKey:["household-nodes"]})}})}function rE({node:n,onTrain:r,isTraining:s}){return u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(hs,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.name})]}),u.jsxs("span",{className:ae("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n.is_active?"bg-green-500/10 text-green-500":"bg-red-500/10 text-red-500"),children:[n.is_active?u.jsx(fN,{size:10}):u.jsx(uN,{size:10}),n.is_active?"Active":"Inactive"]})]}),u.jsxs("div",{className:"mt-3 space-y-1 text-xs text-[var(--color-text-muted)]",children:[u.jsxs("p",{children:[u.jsx("span",{className:"font-medium",children:"ID:"})," ",n.node_id]}),n.services.length>0&&u.jsxs("p",{children:[u.jsx("span",{className:"font-medium",children:"Services:"})," ",n.services.join(", ")]})]}),u.jsx("div",{className:"mt-4",children:u.jsx("button",{onClick:()=>r(n.node_id),disabled:s||!n.is_active,className:ae("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",s||!n.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:s?u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(va,{size:12,className:"animate-spin"}),"Training..."]}):"Train Adapter"})})]})}function sE({householdId:n,householdName:r}){const{data:s,isLoading:i,isError:d}=nE(n),f=lE(),m=x=>{f.mutate(x,{onSuccess:v=>Xe.success(`Training triggered for ${x} (request: ${v.request_id.slice(0,8)}...)`),onError:v=>Xe.error(`Training failed: ${v.message}`)})};return u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:r}),i&&u.jsx("div",{className:"flex items-center justify-center py-8",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:18})}),d&&u.jsx("p",{className:"py-4 text-center text-sm text-red-500",children:"Failed to load nodes"}),s&&s.length===0&&u.jsx("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:"No nodes registered in this household"}),s&&s.length>0&&u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:s.map(x=>u.jsx(rE,{node:x,onTrain:m,isTraining:f.isPending&&f.variables===x.node_id},x.node_id))})]})}function iE(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=aE();return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(va,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load households"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Nodes"}),u.jsx("button",{onClick:()=>d(),disabled:f,className:ae("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(va,{size:14,className:"text-[var(--color-text-muted)]"})})]}),(!n||n.length===0)&&u.jsx("div",{className:"py-12 text-center",children:u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No households found. Register a household in jarvis-auth first."})}),n?.map(m=>u.jsx(sE,{householdId:m.id,householdName:m.name},m.id))]})}async function oE(){const{data:n}=await Ce.get("/api/models/installed");return n.models}async function cE(n){const{data:r}=await Ce.post("/api/models/download",n);return r}async function uE(n){await Ce.delete(`/api/models/${encodeURIComponent(n)}`)}function dE(){return Oa({queryKey:["models","installed"],queryFn:oE,staleTime:1e4})}function rv(){const n=ua();return ba({mutationFn:r=>cE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}function fE(){const n=ua();return ba({mutationFn:r=>uE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}const ar=[{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:"llama3",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 mE(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,x]=S.useState(null),{data:v,isLoading:g}=dE(),y=rv(),p=fE();function N(j,R){const z=`${j}/${R??""}`;x(z),y.mutate({repo:j,filename:R||void 0,token:n||void 0},{onSuccess:_=>{Xe.success(_.message),x(null)},onError:_=>{Xe.error(_ instanceof Error?_.message:"Download failed"),x(null)}})}function M(j){confirm(`Delete ${j}?`)&&p.mutate(j,{onSuccess:()=>Xe.success(`Deleted ${j}`),onError:()=>Xe.error("Failed to delete")})}function w(){s&&N(s,d)}return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-8 p-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Models"}),u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Manage LLM models on the inference server"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[u.jsx(Ow,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Token"}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(optional, for gated models)"})]}),u.jsx("input",{type:"password",value:n,onChange:j=>r(j.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)]"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(Td,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Installed Models"})]}),g?u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Loading..."}):v?.length?u.jsx("div",{className:"space-y-2",children:v.map(j=>u.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-3 py-2",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.name}),u.jsx("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:j.sizeFormatted})]}),u.jsx("button",{onClick:()=>M(j.name),disabled:p.isPending,className:"rounded p-1 text-[var(--color-text-muted)] hover:bg-red-500/10 hover:text-red-500",children:u.jsx(Hx,{size:14})})]},j.name))}):u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No models installed yet"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(nN,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Suggested Models"})]}),u.jsx("div",{className:"space-y-3",children:ar.map(j=>{const R=v?.some(z=>z.name===j.ggufFilename||z.name.includes(j.ggufFilename));return u.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-4 py-3",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.displayName}),u.jsxs("span",{className:"rounded bg-[var(--color-surface-alt)] px-1.5 py-0.5 text-xs text-[var(--color-text-muted)]",children:["~",j.sizeGguf]}),R&&u.jsx("span",{className:"rounded bg-green-500/10 px-1.5 py-0.5 text-xs text-green-500",children:"installed"})]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[j.hfRepoGguf," / ",j.ggufFilename]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Prompt provider: ",u.jsx("code",{className:"text-[var(--color-primary)]",children:j.promptProvider})]})]}),u.jsxs("button",{onClick:()=>N(j.hfRepoGguf,j.ggufFilename),disabled:m!==null,className:ae("ml-4 flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",R?"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:[u.jsx(ds,{size:14}),m===`${j.hfRepoGguf}/${j.ggufFilename}`?"Downloading...":R?"Re-download":"Download"]})]},j.id)})})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(ds,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Download from HuggingFace"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Repository (e.g. Qwen/Qwen3-14B-GGUF)"}),u.jsx("input",{value:s,onChange:j=>i(j.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)]"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Filename (optional — downloads specific file instead of full repo)"}),u.jsx("input",{value:d,onChange:j=>f(j.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)]"})]}),u.jsxs("button",{onClick:w,disabled:!s||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:[u.jsx(ds,{size:14}),m===`${s}/${d}`?"Downloading...":"Download"]})]})]})]})}const Hu={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 hE(){const n=On(),{data:r,isLoading:s}=lv(),[i,d]=S.useState("idle"),[f,m]=S.useState([]),[x,v]=S.useState(null),g=S.useRef(null),y=S.useCallback(M=>{m(w=>[...w,M])},[]);S.useEffect(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[f]);async function p(){d("preflight"),m([]),v(null);try{const M=localStorage.getItem("access_token"),w=await fetch("/api/update/apply",{method:"POST",headers:{Authorization:`Bearer ${M}`,"Content-Type":"application/json"}});if(!w.ok||!w.body){const _=await w.text();throw new Error(_||`HTTP ${w.status}`)}const j=w.body.getReader(),R=new TextDecoder;let z="";for(;;){const{done:_,value:V}=await j.read();if(_)break;z+=R.decode(V,{stream:!0});const L=z.split(`
17
+ `);z=L.pop()??"";for(const ne of L)if(ne.startsWith("data: "))try{const I=JSON.parse(ne.slice(6));if(I.phase&&d(I.phase),I.message&&y({text:I.message,phase:I.phase}),I.stream&&I.text&&y({text:I.text.trim()}),I.restart){d("restarting"),y({text:"Admin server restarting with new version..."}),await pE(r?.latestVersion??""),d("done"),y({text:"Upgrade complete!"});return}if(I.done&&I.code!==0)throw new Error(I.error??"Upgrade failed");I.done&&I.code===0&&d("done")}catch(I){if(I instanceof SyntaxError)continue;throw I}}}catch(M){const w=M instanceof Error?M.message:String(M);v(w),d("error"),y({text:`Error: ${w}`})}}if(s)return u.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:u.jsx(Ma,{size:24,className:"animate-spin text-[var(--color-primary)]"})});const N=Object.keys(Hu).filter(M=>{const w=Object.keys(Hu),j=w.indexOf(i);return w.indexOf(M)<j});return u.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Update Jarvis"}),r?.updateAvailable?u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["v",r.currentVersion," → v",r.latestVersion]}):u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["You're running the latest version (v",r?.currentVersion??"?",")"]})]}),i!=="idle"&&u.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries(Hu).map(([M,w])=>{const j=M===i,R=N.includes(M),z=M===i&&i==="error";return u.jsxs("div",{className:"flex items-center gap-2",children:[R?u.jsx(ca,{size:16,className:"text-green-500"}):z?u.jsx(Aa,{size:16,className:"text-red-500"}):j?u.jsx(Ma,{size:16,className:"animate-spin text-[var(--color-primary)]"}):u.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),u.jsx("span",{className:ae("text-sm",j?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",R&&"text-green-500"),children:w})]},M)})}),f.length>0&&u.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:f.map((M,w)=>u.jsx("div",{children:M.text},w))}),x&&u.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[u.jsx(Aa,{size:14,className:"text-red-500"}),u.jsx("span",{className:"text-sm text-red-500",children:x})]}),u.jsxs("div",{className:"flex gap-3",children:[i==="idle"&&r?.updateAvailable&&u.jsxs("button",{onClick:p,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:[u.jsx(Dx,{size:16}),"Update to v",r.latestVersion]}),i==="done"&&u.jsxs("button",{onClick:()=>n("/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:[u.jsx(ca,{size:16}),"Go to Dashboard"]}),i==="error"&&u.jsxs("button",{onClick:p,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:[u.jsx(va,{size:16}),"Retry"]})]})]})}async function pE(n,r=6e4){const s=Date.now()+r;for(;Date.now()<s;){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")}function gE(){return u.jsxs("div",{className:"flex min-h-[60vh] flex-col items-center justify-center",children:[u.jsx("h1",{className:"mb-2 text-4xl font-bold text-[var(--color-text)]",children:"404"}),u.jsx("p",{className:"mb-4 text-[var(--color-text-muted)]",children:"Page not found"}),u.jsx(md,{to:"/settings",className:"text-[var(--color-primary)] underline hover:opacity-80",children:"Go to Settings"})]})}const xE=7,vE={currentStep:0,totalSteps:xE,enabledModules:[],portOverrides:{},infraPortOverrides:{},secrets:{},dbUser:"jarvis",whisperModel:"base.en",llmInterface:"Qwen25MediumUntrained",deploymentMode:"local",deploymentTarget:"standard",remoteLlmUrl:"",remoteWhisperUrl:"",platform:"linux",hardware:null,installRunning:!1,installComplete:!1};function yE(n,r,s){return Math.max(r,Math.min(s,n))}function bE(n,r){switch(r.type){case"SET_STEP":return{...n,currentStep:yE(r.step,0,n.totalSteps-1)};case"NEXT_STEP":return{...n,currentStep:Math.min(n.currentStep+1,n.totalSteps-1)};case"PREV_STEP":return{...n,currentStep:Math.max(n.currentStep-1,0)};case"SET_ENABLED_MODULES":return{...n,enabledModules:r.modules};case"TOGGLE_MODULE":{if(r.enabled){const s=n.enabledModules.includes(r.serviceId)?n.enabledModules:[...n.enabledModules,r.serviceId];return{...n,enabledModules:s}}return{...n,enabledModules:n.enabledModules.filter(s=>s!==r.serviceId)}}case"SET_PORT_OVERRIDE":return{...n,portOverrides:{...n.portOverrides,[r.serviceId]:r.port}};case"SET_INFRA_PORT_OVERRIDE":return{...n,infraPortOverrides:{...n.infraPortOverrides,[r.infraId]:r.port}};case"SET_SECRET":return{...n,secrets:{...n.secrets,[r.name]:r.value}};case"SET_SECRETS":return{...n,secrets:r.secrets};case"SET_DB_USER":return{...n,dbUser:r.user};case"SET_WHISPER_MODEL":return{...n,whisperModel:r.model};case"SET_LLM_INTERFACE":return{...n,llmInterface:r.interfaceId};case"SET_DEPLOYMENT_MODE":return{...n,deploymentMode:r.mode};case"SET_DEPLOYMENT_TARGET":return{...n,deploymentTarget:r.target};case"SET_REMOTE_LLM_URL":return{...n,remoteLlmUrl:r.url};case"SET_REMOTE_WHISPER_URL":return{...n,remoteWhisperUrl:r.url};case"SET_PLATFORM":return{...n,platform:r.platform};case"SET_HARDWARE":return{...n,hardware:r.hardware,platform:r.hardware.platform};case"SET_INSTALL_RUNNING":return{...n,installRunning:r.running};case"SET_INSTALL_COMPLETE":return{...n,installRunning:!1,installComplete:!0};default:return n}}const sv=S.createContext(null);function SE({children:n}){const[r,s]=S.useReducer(bE,vE);return u.jsx(sv.Provider,{value:{state:r,dispatch:s},children:n})}function ul(){const n=S.useContext(sv);if(!n)throw new Error("useWizard must be used within a WizardProvider");return n}function wE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0),[m,x]=S.useState(!1);function v(){f(!0),x(!1),Md().then(y=>{i(y);const p=y.reason==="docker_not_found";x(p),r(p?{type:"SET_INSTALL_RUNNING",running:!0}:{type:"SET_INSTALL_RUNNING",running:!1})}).catch(()=>{i({configured:!1,reason:"error"}),x(!0),r({type:"SET_INSTALL_RUNNING",running:!0})}).finally(()=>f(!1))}S.useEffect(()=>{v()},[]);const g=s&&s.reason!=="docker_not_found";return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),u.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."})]}),u.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:u.jsxs("div",{className:"flex items-center gap-3",children:[d?u.jsx(Ma,{size:20,className:"animate-spin text-[var(--color-primary)]"}):g?u.jsx(ca,{size:20,className:"text-green-500"}):u.jsx(kx,{size:20,className:"text-red-500"}),u.jsxs("div",{className:"flex-1",children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:d?"Checking Docker...":g?"Docker is running":"Docker not found"}),!d&&!g&&u.jsxs("div",{className:"mt-1 space-y-1",children:[u.jsx("p",{className:"text-xs text-red-400",children:"Docker is required to run Jarvis services."}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Install"," ",u.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&&u.jsxs("button",{type:"button",onClick:v,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:[u.jsx(uo,{size:12}),"Retry"]})]})}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-2 block text-sm font-medium text-[var(--color-text)]",children:"Deployment Mode"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"local"}),className:ae("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="local"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[u.jsx(qw,{size:24,className:"text-[var(--color-primary)]"}),u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Local"}),u.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"Everything on this machine"})]}),u.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"}),className:ae("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="remote-llm"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[u.jsx(Cd,{size:24,className:"text-[var(--color-primary)]"}),u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM"}),u.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"LLM on separate GPU machine"})]})]})]})]})}const Vi=[{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 NE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(!n.hardware),[d,f]=S.useState(!1),[m,x]=S.useState(0),[v,g]=S.useState("");S.useEffect(()=>{n.hardware||Kj().then(N=>{r({type:"SET_HARDWARE",hardware:N}),N.recommendedBackend==="remote"&&n.deploymentMode==="local"&&r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"})}).catch(()=>{}).finally(()=>i(!1))},[]);function y(N,M){const w=Vi[N];if(!n.hardware)return;const j=w.gpu==="Other"?(parseInt(M??v,10)||0)*1024:w.vramMb,R={...n.hardware,gpuName:w.gpu,gpuVramMb:j||null,gpuType:w.gpuType,recommendedBackends:[...w.backends],recommendedBackend:w.defaultBackend};r({type:"SET_HARDWARE",hardware:R})}const p=n.hardware;return s?u.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[u.jsx(Ma,{size:32,className:"animate-spin text-[var(--color-primary)]"}),u.jsx("p",{className:"mt-3 text-sm text-[var(--color-text-muted)]",children:"Detecting hardware..."})]}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Hardware Detection"}),u.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."})]}),p&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(hs,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"Platform"})]}),u.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.platform==="darwin"?"macOS":"Linux"," (",p.arch,")"]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(Td,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"Memory"})]}),u.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.totalMemoryGb," GB RAM"]})]}),u.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(hs,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"GPU"})]}),u.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:p.gpuName??"No GPU detected"}),p.gpuVramMb!=null&&p.gpuVramMb>0&&u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[Math.round(p.gpuVramMb/1024)," GB VRAM"]})]}),u.jsx("button",{type:"button",onClick:()=>f(!d),className:"text-xs font-medium text-[var(--color-primary)] hover:underline",children:d?"Cancel":"Override"})]}),d&&u.jsxs("div",{className:"mt-3 space-y-3 border-t border-[var(--color-border)] pt-3",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"gpu-select",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Select GPU"}),u.jsx("select",{id:"gpu-select",value:m,onChange:N=>{const M=parseInt(N.target.value,10);x(M),Vi[M].gpu!=="Other"&&(y(M),f(!1))},className:ae("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:Vi.map((N,M)=>u.jsx("option",{value:M,children:N.label},`${N.label}-${M}`))})]}),Vi[m].gpu==="Other"&&u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("label",{htmlFor:"custom-vram",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"VRAM (GB)"}),u.jsx("input",{id:"custom-vram",type:"number",min:1,max:512,value:v,onChange:N=>g(N.target.value),placeholder:"e.g. 24",className:ae("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)]")})]}),u.jsx("button",{type:"button",disabled:!v||parseInt(v,10)<=0,onClick:()=>{y(m,v),f(!1)},className:ae("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"})]})]})]}),u.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Recommended: ",u.jsx("span",{className:"text-[var(--color-primary)]",children:p.recommendedBackend.toUpperCase()})]}),p.recommendedBackends.length>1&&u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["Available backends: ",p.recommendedBackends.join(", ")]})]})]}),n.deploymentMode==="remote-llm"&&u.jsxs("div",{className:"space-y-3",children:[u.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote Service URLs"}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"remote-llm",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"LLM Proxy URL"}),u.jsx("input",{id:"remote-llm",type:"url",value:n.remoteLlmUrl,onChange:N=>r({type:"SET_REMOTE_LLM_URL",url:N.target.value}),placeholder:"http://192.168.1.100:7704",className:ae("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)]")})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"remote-whisper",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Whisper URL (optional)"}),u.jsx("input",{id:"remote-whisper",type:"url",value:n.remoteWhisperUrl,onChange:N=>r({type:"SET_REMOTE_WHISPER_URL",url:N.target.value}),placeholder:"http://192.168.1.100:7706",className:ae("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 jE(){const{state:n,dispatch:r}=ul(),[s,i]=S.useState(null),[d,f]=S.useState(!0);if(S.useEffect(()=>{Promise.all([nv(),Zj()]).then(([g,y])=>{i(g),n.enabledModules.length===0&&r({type:"SET_ENABLED_MODULES",modules:y.enabledModules})}).catch(()=>{}).finally(()=>f(!1))},[]),d||!s)return u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx(Ma,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const{core:m,recommended:x,optional:v}=EE(s.services);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Select Services"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Core services are always included. Toggle recommended and optional services."})]}),u.jsx(qu,{title:"Core",subtitle:"Always included",services:m,enabled:m.map(g=>g.id),locked:!0}),u.jsx(qu,{title:"Recommended",subtitle:"Enabled by default",services:x,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y}),platform:n.platform}),v.length>0&&u.jsx(qu,{title:"Optional",subtitle:"Off by default",services:v,enabled:n.enabledModules,onToggle:(g,y)=>r({type:"TOGGLE_MODULE",serviceId:g,enabled:y})})]})}function EE(n){return{core:n.filter(r=>r.category==="core"),recommended:n.filter(r=>r.category==="recommended"),optional:n.filter(r=>r.category==="optional")}}function qu({title:n,subtitle:r,services:s,enabled:i,locked:d,onToggle:f,platform:m}){return u.jsxs("div",{children:[u.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[u.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:n}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:r})]}),u.jsx("div",{className:"space-y-1",children:s.map(x=>{const v=i.includes(x.id),g=x.nativeOnly&&m==="darwin";return u.jsxs("button",{type:"button",disabled:d,onClick:()=>f?.(x.id,!v),className:ae("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",v?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30",d&&"cursor-default"),children:[d?u.jsx(Rd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}):v?u.jsx(ca,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):u.jsx(nd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:x.name}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",x.port]}),g&&u.jsx("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-500",children:"Native"})]}),u.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:x.description})]})]},x.id)})})]})}function TE(){const{state:n}=ul(),[r,s]=S.useState(null);if(S.useEffect(()=>{nv().then(s).catch(()=>{})},[]),!r)return u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx(Ma,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const i=r.services.filter(p=>p.category==="core"),d=r.services.filter(p=>p.category!=="core"&&n.enabledModules.includes(p.id)),f=[...i,...d],m=new Map;for(const p of f){const N=n.portOverrides[p.id]??p.port,M=m.get(N)??[];m.set(N,[...M,p.name])}const x=[...m.entries()].filter(([,p])=>p.length>1),v=f.filter(p=>p.database).length,g=f.filter(p=>p.nativeOnly&&n.platform==="darwin"),y=f.filter(p=>!(p.nativeOnly&&n.platform==="darwin"));return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Review Configuration"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Review your selections before installing."})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(Gu,{label:"Docker Services",value:y.length}),u.jsx(Gu,{label:"Native Services",value:g.length}),u.jsx(Gu,{label:"Databases",value:v})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Deployment Mode"}),u.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:n.deploymentMode==="local"?"Local (all services on this machine)":"Remote LLM"}),n.deploymentMode==="remote-llm"&&n.remoteLlmUrl&&u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["LLM: ",n.remoteLlmUrl]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsxs("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:["Services (",f.length,")"]})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:f.map(p=>u.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ca,{size:14,className:"text-green-500"}),u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:p.name})]}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",n.portOverrides[p.id]??p.port]})]},p.id))})]}),x.length>0&&u.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Aa,{size:16,className:"text-amber-500"}),u.jsx("span",{className:"text-sm font-medium text-amber-500",children:"Port Conflicts"})]}),x.map(([p,N])=>u.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Port ",p,": ",N.join(", ")]},p))]})]})}function Gu({label:n,value:r}){return u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-3 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-[var(--color-primary)]",children:r}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})}function Tg(){const[n,r]=S.useState({lines:[],running:!1,done:!1,exitCode:null,error:null,redirect:null}),s=S.useRef(null),i=S.useCallback((f,m)=>(s.current?.close(),r({lines:[],running:!0,done:!1,exitCode:null,error:null,redirect:null}),new Promise((x,v)=>{const g=new EventSource(f);s.current=g,g.onmessage=y=>{try{const p=JSON.parse(y.data);if(m&&m(p),"done"in p){if(r(N=>({...N,running:!1,done:!0,exitCode:p.code,redirect:p.redirect??null})),g.close(),p.code===0)x(p.code);else{const N=p.error?String(p.error):`Process exited with code ${p.code}`;v(new Error(N))}return}if("stream"in p&&"text"in p){const N={stream:p.stream,text:p.text,timestamp:Date.now()};r(M=>({...M,lines:[...M.lines,N]}))}}catch{}},g.onerror=()=>{const y=s.current===null;r(p=>({...p,running:!1,error:p.done?null:"Connection lost"})),g.close(),y||v(new Error("Connection lost"))}})),[]),d=S.useCallback(()=>{s.current?.close(),s.current=null,r(f=>({...f,running:!1}))},[]);return{...n,run:i,stop:d}}function Rg({lines:n,running:r,title:s,className:i}){const d=S.useRef(null),f=S.useRef(!0);S.useEffect(()=>{const x=d.current;!x||!f.current||(x.scrollTop=x.scrollHeight)},[n]);function m(){const x=d.current;if(!x)return;const v=x.scrollHeight-x.scrollTop-x.clientHeight;f.current=v<50}return u.jsxs("div",{className:ae("flex flex-col rounded-lg border border-[var(--color-border)] overflow-hidden",i),children:[s&&u.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2",children:[u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:s}),r&&u.jsx("span",{className:"h-2 w-2 animate-pulse rounded-full bg-green-500"})]}),u.jsxs("div",{ref:d,onScroll:m,className:"h-64 overflow-y-auto bg-[#0d1117] p-3 font-mono text-xs leading-5",children:[n.length===0&&!r&&u.jsx("span",{className:"text-gray-500",children:"Waiting for output..."}),n.map((x,v)=>u.jsx("div",{className:ae("whitespace-pre-wrap break-all",x.stream==="stderr"?"text-yellow-400":"text-gray-300"),children:x.text},v)),r&&u.jsx("span",{className:"inline-block h-4 w-1.5 animate-pulse bg-gray-400"})]})]})}function RE(){const{state:n,dispatch:r}=ul(),s=Tg(),i=Tg(),[d,f]=S.useState("idle"),[m,x]=S.useState(null),[v,g]=S.useState(null),[y,p]=S.useState({}),[N,M]=S.useState({}),[w,j]=S.useState(null),[R,z]=S.useState(null);S.useEffect(()=>{const P=i.redirect;if(d!=="done"||!P)return;z(5);const re=setInterval(()=>{z(se=>se===null||se<=1?(clearInterval(re),window.location.href=P,0):se-1)},1e3);return()=>clearInterval(re)},[d,i.redirect]);const _=S.useCallback(async()=>{f("preflight"),g(null),x(null);try{const P=await Fj(n.enabledModules);return g(P),P.canProceed?!0:(x("Pre-flight checks failed. Fix the issues above and retry."),f("error"),j("preflight"),!1)}catch(P){return x(`Pre-flight check failed: ${P instanceof Error?P.message:String(P)}`),f("error"),j("preflight"),!1}},[n.enabledModules]);async function V(){x(null),p({}),j(null),r({type:"SET_INSTALL_RUNNING",running:!0});try{if(!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",re=>{if(re.phase==="health"&&typeof re.service=="string"&&p(se=>({...se,[re.service]:{healthy:re.healthy,error:re.error}})),re.serviceHealth&&typeof re.serviceHealth=="object"){const se=re.serviceHealth;p(he=>({...he,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(P){x(P instanceof Error?P.message:String(P)),f("error"),j(d),r({type:"SET_INSTALL_RUNNING",running:!1})}}async function L(){if(w==="preflight"){if(x(null),r({type:"SET_INSTALL_RUNNING",running:!0}),!await _()){r({type:"SET_INSTALL_RUNNING",running:!1});return}try{f("generating"),await wg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",re=>{if(re.phase==="health"&&typeof re.service=="string"&&p(se=>({...se,[re.service]:{healthy:re.healthy,error:re.error}})),re.serviceHealth&&typeof re.serviceHealth=="object"){const se=re.serviceHealth;p(he=>({...he,...se}))}}),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(re){x(re instanceof Error?re.message:String(re)),f("error"),r({type:"SET_INSTALL_RUNNING",running:!1})}}else V()}async function ne(P){try{const re=await fetch(`/api/containers/${P}/logs`);if(re.ok){const se=await re.text();M(he=>({...he,[P]:se}))}else M(se=>({...se,[P]:`Failed to fetch logs: HTTP ${re.status}`}))}catch(re){M(se=>({...se,[P]:`Failed to fetch logs: ${re instanceof Error?re.message:String(re)}`}))}}const I=[{key:"preflight",label:"Pre-flight checks"},{key:"generating",label:"Generate configuration"},{key:"pulling",label:"Pull Docker images"},{key:"starting",label:"Start services"}],$=I.map(P=>P.key).indexOf(d);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Install"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="idle"?"Ready to install. This will pull Docker images and start all services.":d==="done"?i.redirect?`Installation complete! Redirecting to your admin dashboard in ${R??"..."}s...`:"Installation complete! All services are running.":d==="error"?"Installation encountered an error.":"Installing..."})]}),v&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Pre-flight Checks"})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:v.checks.map(P=>u.jsx("div",{className:"flex items-center justify-between px-3 py-2",children:u.jsxs("div",{className:"flex items-center gap-2",children:[P.status==="pass"?u.jsx(ca,{size:14,className:"text-green-500"}):P.status==="warn"?u.jsx(Aa,{size:14,className:"text-amber-500"}):u.jsx($i,{size:14,className:"text-red-500"}),u.jsxs("div",{children:[u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:P.name}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:P.message}),P.details&&P.status!=="pass"&&u.jsx("p",{className:"text-xs text-[var(--color-text-muted)] opacity-60",children:P.details})]})]})},P.name))})]}),u.jsx("div",{className:"space-y-2",children:I.map((P,re)=>{const se=P.key===d,he=$>re||d==="done",Ae=d==="error"&&P.key===w;return u.jsxs("div",{className:"flex items-center gap-3",children:[he?u.jsx(ca,{size:18,className:"text-green-500"}):Ae?u.jsx($i,{size:18,className:"text-red-500"}):se?u.jsx(Ma,{size:18,className:"animate-spin text-[var(--color-primary)]"}):u.jsx("div",{className:"h-[18px] w-[18px] rounded-full border-2 border-[var(--color-border)]"}),u.jsx("span",{className:ae("text-sm",he?"text-green-500":se?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:P.label})]},P.key)})}),(d==="starting"||d==="done"||d==="error")&&Object.keys(y).length>0&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Service Status"})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:Object.entries(y).map(([P,re])=>u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:P}),u.jsxs("div",{className:"flex items-center gap-2",children:[!re.healthy&&u.jsxs("button",{type:"button",onClick:()=>ne(P),className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[u.jsx(Rw,{size:12}),"Logs"]}),re.healthy?u.jsx(ca,{size:14,className:"text-green-500"}):u.jsx($i,{size:14,className:"text-red-500"})]})]}),re.error&&u.jsx("p",{className:"px-3 pb-2 text-xs text-red-400",children:re.error}),N[P]&&u.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:u.jsx("pre",{className:"whitespace-pre-wrap",children:N[P]})})]},P))})]}),(s.lines.length>0||s.running)&&u.jsx(Rg,{lines:s.lines,running:s.running,title:"docker compose pull"}),(i.lines.length>0||i.running)&&u.jsx(Rg,{lines:i.lines,running:i.running,title:"docker compose up -d"}),m&&u.jsx("div",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:m}),(d==="idle"||d==="error")&&u.jsxs("button",{type:"button",onClick:d==="error"?L:V,className:ae("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:[d==="error"?u.jsx(uo,{size:18}):u.jsx(Fw,{size:18}),d==="error"?"Retry Installation":"Start Installation"]})]})}function CE(){const{state:n,dispatch:r}=ul(),s=av(),i=rv(),[d,f]=S.useState("select"),[m,x]=S.useState(null),[v,g]=S.useState("GGUF"),[y,p]=S.useState(""),[N,M]=S.useState(null);if(n.deploymentMode==="remote-llm")return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Your LLM is configured to use a remote server."})]}),u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx(ca,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n.remoteLlmUrl})]})]})]});if(n.platform==="darwin")return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),u.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."})]}),u.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 w=L=>{x(L),M(null),L.gated&&!y.trim()?f("token"):R(L,y.trim())},j=()=>{if(!y.trim()){M("HuggingFace token is required for gated models");return}m&&R(m,y)},R=async(L,ne)=>{f("downloading"),M(null);const I=v==="GGUF"?L.hfRepoGguf:L.hfRepoVllm,ee=v==="GGUF"?L.ggufFilename:void 0;try{await i.mutateAsync({repo:I,filename:ee,token:ne||void 0}),await z(L)}catch($){M(`Download failed: ${$.message}`),f("select")}},z=async L=>{f("configuring");const I={"model.main.name":v==="GGUF"?`.models/${L.ggufFilename}`:`.models/${L.hfRepoVllm.split("/").pop()}`,"model.main.backend":v,"model.main.chat_format":L.chatFormat,"model.main.context_window":L.contextWindow,"llm.interface":L.promptProvider};v==="GGUF"&&(I["inference.gguf.n_gpu_layers"]=-1),v==="VLLM"&&L.quantization&&(I["inference.vllm.quantization"]=L.quantization);try{await s.mutateAsync(I),r({type:"SET_LLM_INTERFACE",interfaceId:L.promptProvider}),f("done")}catch(ee){M(`Configuration failed: ${ee.message}`),f("select")}},_=n.hardware?.gpuVramMb,V=_?ar.filter(L=>L.vramMb<=_):ar;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),u.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&&u.jsxs("div",{className:"space-y-2",children:[u.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:[u.jsx(Aa,{size:16,className:"mt-0.5 shrink-0"}),N]}),m&&u.jsxs("button",{type:"button",onClick:()=>R(m,y),className:ae("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:[u.jsx(uo,{size:14}),"Retry Download"]})]}),d==="select"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Backend"}),u.jsx("div",{className:"flex gap-2",children:["GGUF","VLLM"].map(L=>u.jsx("button",{type:"button",onClick:()=>g(L),className:ae("rounded-md px-3 py-1 text-xs font-medium transition-colors",v===L?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:L==="VLLM"?"vLLM":L},L))})]}),u.jsxs("div",{children:[u.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)"}),u.jsx("input",{id:"hf-token",type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ae("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)]")})]}),u.jsxs("div",{className:"space-y-2",children:[V.map(L=>u.jsxs("button",{type:"button",onClick:()=>w(L),className:ae("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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:L.displayName}),L.gated&&u.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:[u.jsx(Rd,{size:10}),"Gated"]})]}),u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[L.promptProvider," · ",L.contextWindow.toLocaleString()," ctx"]})]}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?L.sizeGguf:L.sizeVllm]})]},L.id)),V.length===0&&u.jsxs("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:["No models fit your available VRAM (",_?Math.round(_/1024)+" GB":"unknown","). Consider using Remote LLM mode."]}),_&&V.length<ar.length&&u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Showing ",V.length," of ",ar.length," models that fit your ",Math.round(_/1024)," GB VRAM."]})]})]}),d==="token"&&m&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[u.jsx("strong",{children:m.displayName})," is a gated model. Accept the license on HuggingFace and paste your access token below."]}),u.jsx("input",{type:"password",value:y,onChange:L=>p(L.target.value),placeholder:"hf_...",className:ae("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)]")}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("button",{type:"button",onClick:()=>{f("select"),M(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),u.jsx("button",{type:"button",onClick:j,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Download"})]})]}),d==="downloading"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(ds,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Downloading ",m?.displayName,"..."]}),u.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["~",v==="GGUF"?m?.sizeGguf:m?.sizeVllm," · This may take several minutes"]})]}),d==="configuring"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(Ma,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Configuring model and prompt provider..."})]}),d==="done"&&m&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx(ca,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:[m.displayName," configured"]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Backend: ",v," · Prompt provider: ",m.promptProvider]})]})]}),u.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 ",u.jsx("strong",{children:m.promptProvider})," prompt provider for optimized command parsing."]})]})]})}function _E(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,x]=S.useState(""),[v,g]=S.useState(!1),[y,p]=S.useState(!1),[N,M]=S.useState(null),w=s===d,j=n&&s&&d&&m&&w&&!v;async function R(){if(j){g(!0),M(null);try{const _=await Mx(n,s,m);tr(_.access_token),localStorage.setItem("access_token",_.access_token),localStorage.setItem("refresh_token",_.refresh_token),p(!0)}catch(_){const V=_?.response?.data?.error??(_ instanceof Error?_.message:"Failed to create account");M(V)}finally{g(!1)}}}if(y)return u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{children:u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Account Created"})}),u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx(ca,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Superuser account created"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})]}),u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:`You're logged in. Click "Next" to configure your LLM model.`})]});const z=ae("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 u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Create Account"}),u.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."})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"display-name",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Display Name"}),u.jsx("input",{id:"display-name",type:"text",value:m,onChange:_=>x(_.target.value),className:z,placeholder:"Alex"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",value:n,onChange:_=>r(_.target.value),className:z,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",value:s,onChange:_=>i(_.target.value),className:z,placeholder:"Choose a strong password"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),u.jsx("input",{id:"confirm-password",type:"password",value:d,onChange:_=>f(_.target.value),className:ae(z,d&&!w&&"ring-2 ring-red-500"),placeholder:"Confirm password"}),d&&!w&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:"Passwords don't match"})]})]}),N&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[u.jsx(kx,{size:14,className:"text-red-500 shrink-0"}),u.jsx("span",{className:"text-sm text-red-500",children:N})]}),u.jsxs("button",{type:"button",onClick:R,disabled:!j,className:ae("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:[u.jsx(uo,{size:14}),"Retry"]})]}),!N&&u.jsx("button",{type:"button",onClick:R,disabled:!j,className:ae("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:v?"Creating...":"Create Superuser Account"})]})}const Yi=[{label:"Welcome",component:wE},{label:"Hardware",component:NE},{label:"Services",component:jE},{label:"Review",component:TE},{label:"Install",component:RE},{label:"Account",component:_E},{label:"LLM",component:CE}],ME=5;function AE({skipToAccount:n}){const{state:r,dispatch:s}=ul();S.useEffect(()=>{n&&s({type:"SET_STEP",step:ME})},[n,s]);const i=On(),d=Yi[r.currentStep].component,f=r.currentStep===0,m=r.currentStep===Yi.length-1,g=r.currentStep===4&&!r.installComplete,y=r.installRunning||g;function p(){m?i("/login"):s({type:"NEXT_STEP"})}function N(){s({type:"PREV_STEP"})}return u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)] p-4",children:u.jsxs("div",{className:"w-full max-w-2xl",children:[u.jsx("div",{className:"mb-6 flex items-center justify-center gap-1",children:Yi.map((M,w)=>u.jsxs("button",{type:"button",onClick:()=>!y&&s({type:"SET_STEP",step:w}),disabled:y,className:ae("flex items-center gap-1",y&&"cursor-not-allowed"),children:[u.jsx("div",{className:ae("flex h-7 w-7 items-center justify-center rounded-full text-xs font-medium transition-colors",w===r.currentStep?"bg-[var(--color-primary)] text-white":w<r.currentStep?"bg-[var(--color-primary)]/20 text-[var(--color-primary)]":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:w+1}),u.jsx("span",{className:ae("hidden text-xs sm:inline",w===r.currentStep?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:M.label}),w<Yi.length-1&&u.jsx("div",{className:ae("mx-1 h-px w-4 sm:w-6",w<r.currentStep?"bg-[var(--color-primary)]/30":"bg-[var(--color-border)]")})]},M.label))}),u.jsx("div",{className:"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-6 shadow-lg",children:u.jsx(d,{})}),u.jsxs("div",{className:"mt-4 flex justify-between",children:[u.jsx("button",{type:"button",onClick:N,disabled:f||y,className:ae("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"}),u.jsx("button",{type:"button",onClick:p,disabled:y,className:ae("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 OE({skipToAccount:n}){return u.jsx(SE,{children:u.jsx(AE,{skipToAccount:n})})}function zE(){const n=On(),r=av(),s=Xj(),[i,d]=S.useState("select"),[f,m]=S.useState(null),[x,v]=S.useState("GGUF"),[g,y]=S.useState(""),[p,N]=S.useState(null),M=_=>{m(_),_.gated?d("token"):j(_,"")},w=()=>{if(!g.trim()){N("HuggingFace token is required for gated models");return}N(null),f&&j(f,g)},j=async(_,V)=>{d("download"),N(null);const L=x==="GGUF"?_.hfRepoGguf:_.hfRepoVllm,ne=x==="GGUF"?_.ggufFilename:void 0;try{await s.mutateAsync({repo:L,filename:ne,token:V||void 0}),R(_)}catch(I){N(`Download failed: ${I.message}`),d("select")}},R=async _=>{d("configure"),N(null);const L={"model.main.name":x==="GGUF"?`.models/${_.ggufFilename}`:`.models/${_.hfRepoVllm.split("/").pop()}`,"model.main.backend":x,"model.main.chat_format":_.chatFormat,"model.main.context_window":_.contextWindow};x==="GGUF"&&(L["inference.gguf.n_gpu_layers"]=-1),x==="VLLM"&&_.quantization&&(L["inference.vllm.quantization"]=_.quantization);try{await r.mutateAsync(L),d("done"),Xe.success("LLM configured successfully")}catch(ne){N(`Configuration failed: ${ne.message}`),d("select")}},z=()=>{n("/dashboard")};return u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-bg)] p-4",children:u.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:[u.jsxs("div",{className:"mb-8 text-center",children:[u.jsx(ad,{className:"mx-auto mb-3 text-[var(--color-primary)]",size:40}),u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Configure a local language model for Jarvis"})]}),u.jsx("div",{className:"mb-8 flex items-center justify-center gap-2",children:["select","download","configure","done"].map((_,V)=>{const L=i==="token"?"select":i,ne=["select","download","configure","done"];return u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:ae("h-2 w-2 rounded-full",L===_?"bg-[var(--color-primary)]":ne.indexOf(L)>V?"bg-green-500":"bg-[var(--color-border)]")}),V<3&&u.jsx("div",{className:"h-px w-8 bg-[var(--color-border)]"})]},_)})}),p&&u.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:[u.jsx(Aa,{size:16,className:"mt-0.5 shrink-0"}),p]}),i==="select"&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Select a model"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:()=>v("GGUF"),className:ae("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="GGUF"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"GGUF"}),u.jsx("button",{onClick:()=>v("VLLM"),className:ae("rounded-md px-3 py-1 text-xs font-medium transition-colors",x==="VLLM"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"vLLM"})]})]}),u.jsx("div",{className:"grid gap-3",children:ar.map(_=>u.jsxs("button",{onClick:()=>M(_),className:ae("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:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:_.displayName}),_.gated&&u.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:[u.jsx(Rd,{size:10}),"Gated"]})]}),u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[_.quantization?`${_.quantization.toUpperCase()} 4-bit`:_.chatFormat," · ",_.contextWindow.toLocaleString()," ctx"]})]}),u.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["~",x==="GGUF"?_.sizeGguf:_.sizeVllm]})]},_.id))}),u.jsx("div",{className:"flex justify-end pt-2",children:u.jsx("button",{onClick:z,className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Skip for now"})})]}),i==="token"&&f&&u.jsxs("div",{className:"space-y-4",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Access Required"}),u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[u.jsx("strong",{children:f.displayName})," is a gated model. You need to:"]}),u.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-sm text-[var(--color-text-muted)]",children:[u.jsx("li",{children:"Visit the model page on huggingface.co and accept the license agreement"}),u.jsx("li",{children:"Create an access token at huggingface.co/settings/tokens"}),u.jsx("li",{children:"Paste your token below"})]}),u.jsx("input",{type:"password",value:g,onChange:_=>y(_.target.value),placeholder:"hf_...",className:ae("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)]")}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("button",{onClick:()=>{d("select"),N(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),u.jsx("button",{onClick:w,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Continue"})]})]}),i==="download"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(ds,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Downloading model..."}),u.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," ","(~",x==="GGUF"?f?.sizeGguf:f?.sizeVllm,")"]}),u.jsx("p",{className:"mt-4 text-xs text-[var(--color-text-muted)]",children:"This may take several minutes depending on your connection"})]}),i==="configure"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(Bx,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Configuring..."}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Writing settings and restarting LLM proxy"})]}),i==="done"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(pw,{className:"mb-4 text-green-500",size:40}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"LLM Ready"}),u.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," configured on ",x]}),u.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."}),u.jsx("button",{onClick:()=>n("/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"})]}),(s.isPending||r.isPending)&&i!=="download"&&i!=="configure"&&u.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:u.jsx(Ma,{className:"animate-spin text-white",size:32})})]})})}const kE=new M1;function DE(){const[n,r]=S.useState(!0),[s,i]=S.useState(!1),[d,f]=S.useState(!1);return S.useEffect(()=>{Md().then(m=>{m.state==="deployed-needs-account"?(f(!0),i(!0)):i(!m.configured)}).catch(()=>{i(!1)}).finally(()=>r(!1))},[]),n?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-primary)] border-t-transparent"})}):u.jsxs(Tb,{children:[u.jsx($t,{path:"/setup",element:u.jsx(OE,{skipToAccount:d})}),u.jsx($t,{path:"/login",element:u.jsx(uj,{})}),u.jsx($t,{path:"/llm-setup",element:u.jsx(zE,{})}),u.jsxs($t,{element:u.jsx(cj,{}),children:[u.jsx($t,{path:"/dashboard",element:u.jsx(Ij,{})}),u.jsx($t,{path:"/settings",element:u.jsx(Nj,{})}),u.jsx($t,{path:"/services",element:u.jsx(Hj,{})}),u.jsx($t,{path:"/models",element:u.jsx(mE,{})}),u.jsx($t,{path:"/update",element:u.jsx(hE,{})}),u.jsx($t,{path:"/nodes",element:u.jsx(iE,{})}),u.jsx($t,{path:"/",element:s?u.jsx(Ii,{to:"/setup",replace:!0}):u.jsx(Ii,{to:"/dashboard",replace:!0})}),u.jsx($t,{path:"*",element:u.jsx(gE,{})})]})]})}function UE(){return u.jsx(x2,{children:u.jsx(A1,{client:kE,children:u.jsxs(ew,{children:[u.jsx($b,{children:u.jsx(DE,{})}),u.jsx(p2,{position:"bottom-right",richColors:!0})]})})})}T0.createRoot(document.getElementById("root")).render(u.jsx(S.StrictMode,{children:u.jsx(UE,{})}));