@samanhappy/mcphub 0.11.2 → 0.11.4
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.
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var _p;function Jx(){if(_p)return Re;_p=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),A=Symbol.iterator;function R(N){return N===null||typeof N!="object"?null:(N=A&&N[A]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,M={};function E(N,_,q){this.props=N,this.context=_,this.refs=M,this.updater=q||C}E.prototype.isReactComponent={},E.prototype.setState=function(N,_){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,_,"setState")},E.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function j(){}j.prototype=E.prototype;function w(N,_,q){this.props=N,this.context=_,this.refs=M,this.updater=q||C}var P=w.prototype=new j;P.constructor=w,T(P,E.prototype),P.isPureReactComponent=!0;var re=Array.isArray;function B(){}var Z={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function se(N,_,q){var U=q.ref;return{$$typeof:s,type:N,key:_,ref:U!==void 0?U:null,props:q}}function me(N,_){return se(N.type,_,N.props)}function F(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function z(N){var _={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(q){return _[q]})}var Y=/\/+/g;function I(N,_){return typeof N=="object"&&N!==null&&N.key!=null?z(""+N.key):_.toString(36)}function oe(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(B,B):(N.status="pending",N.then(function(_){N.status==="pending"&&(N.status="fulfilled",N.value=_)},function(_){N.status==="pending"&&(N.status="rejected",N.reason=_)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function k(N,_,q,U,te){var K=typeof N;(K==="undefined"||K==="boolean")&&(N=null);var $=!1;if(N===null)$=!0;else switch(K){case"bigint":case"string":case"number":$=!0;break;case"object":switch(N.$$typeof){case s:case l:$=!0;break;case b:return $=N._init,k($(N._payload),_,q,U,te)}}if($)return te=te(N),$=U===""?"."+I(N,0):U,re(te)?(q="",$!=null&&(q=$.replace(Y,"$&/")+"/"),k(te,_,q,"",function(Ne){return Ne})):te!=null&&(F(te)&&(te=me(te,q+(te.key==null||N&&N.key===te.key?"":(""+te.key).replace(Y,"$&/")+"/")+$)),_.push(te)),1;$=0;var fe=U===""?".":U+":";if(re(N))for(var pe=0;pe<N.length;pe++)U=N[pe],K=fe+I(U,pe),$+=k(U,_,q,K,te);else if(pe=R(N),typeof pe=="function")for(N=pe.call(N),pe=0;!(U=N.next()).done;)U=U.value,K=fe+I(U,pe++),$+=k(U,_,q,K,te);else if(K==="object"){if(typeof N.then=="function")return k(oe(N),_,q,U,te);throw _=String(N),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return $}function L(N,_,q){if(N==null)return N;var U=[],te=0;return k(N,U,"","",function(K){return _.call(q,K,te++)}),U}function D(N){if(N._status===-1){var _=N._result;_=_(),_.then(function(q){(N._status===0||N._status===-1)&&(N._status=1,N._result=q)},function(q){(N._status===0||N._status===-1)&&(N._status=2,N._result=q)}),N._status===-1&&(N._status=0,N._result=_)}if(N._status===1)return N._result.default;throw N._result}var W=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},G={map:L,forEach:function(N,_,q){L(N,function(){_.apply(this,arguments)},q)},count:function(N){var _=0;return L(N,function(){_++}),_},toArray:function(N){return L(N,function(_){return _})||[]},only:function(N){if(!F(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Re.Activity=v,Re.Children=G,Re.Component=E,Re.Fragment=i,Re.Profiler=u,Re.PureComponent=w,Re.StrictMode=o,Re.Suspense=g,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,Re.__COMPILER_RUNTIME={__proto__:null,c:function(N){return Z.H.useMemoCache(N)}},Re.cache=function(N){return function(){return N.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(N,_,q){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var U=T({},N.props),te=N.key;if(_!=null)for(K in _.key!==void 0&&(te=""+_.key),_)!J.call(_,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&_.ref===void 0||(U[K]=_[K]);var K=arguments.length-2;if(K===1)U.children=q;else if(1<K){for(var $=Array(K),fe=0;fe<K;fe++)$[fe]=arguments[fe+2];U.children=$}return se(N.type,te,U)},Re.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:m,_context:N},N},Re.createElement=function(N,_,q){var U,te={},K=null;if(_!=null)for(U in _.key!==void 0&&(K=""+_.key),_)J.call(_,U)&&U!=="key"&&U!=="__self"&&U!=="__source"&&(te[U]=_[U]);var $=arguments.length-2;if($===1)te.children=q;else if(1<$){for(var fe=Array($),pe=0;pe<$;pe++)fe[pe]=arguments[pe+2];te.children=fe}if(N&&N.defaultProps)for(U in $=N.defaultProps,$)te[U]===void 0&&(te[U]=$[U]);return se(N,K,te)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(N){return{$$typeof:p,render:N}},Re.isValidElement=F,Re.lazy=function(N){return{$$typeof:b,_payload:{_status:-1,_result:N},_init:D}},Re.memo=function(N,_){return{$$typeof:h,type:N,compare:_===void 0?null:_}},Re.startTransition=function(N){var _=Z.T,q={};Z.T=q;try{var U=N(),te=Z.S;te!==null&&te(q,U),typeof U=="object"&&U!==null&&typeof U.then=="function"&&U.then(B,W)}catch(K){W(K)}finally{_!==null&&q.types!==null&&(_.types=q.types),Z.T=_}},Re.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},Re.use=function(N){return Z.H.use(N)},Re.useActionState=function(N,_,q){return Z.H.useActionState(N,_,q)},Re.useCallback=function(N,_){return Z.H.useCallback(N,_)},Re.useContext=function(N){return Z.H.useContext(N)},Re.useDebugValue=function(){},Re.useDeferredValue=function(N,_){return Z.H.useDeferredValue(N,_)},Re.useEffect=function(N,_){return Z.H.useEffect(N,_)},Re.useEffectEvent=function(N){return Z.H.useEffectEvent(N)},Re.useId=function(){return Z.H.useId()},Re.useImperativeHandle=function(N,_,q){return Z.H.useImperativeHandle(N,_,q)},Re.useInsertionEffect=function(N,_){return Z.H.useInsertionEffect(N,_)},Re.useLayoutEffect=function(N,_){return Z.H.useLayoutEffect(N,_)},Re.useMemo=function(N,_){return Z.H.useMemo(N,_)},Re.useOptimistic=function(N,_){return Z.H.useOptimistic(N,_)},Re.useReducer=function(N,_,q){return Z.H.useReducer(N,_,q)},Re.useRef=function(N){return Z.H.useRef(N)},Re.useState=function(N){return Z.H.useState(N)},Re.useSyncExternalStore=function(N,_,q){return Z.H.useSyncExternalStore(N,_,q)},Re.useTransition=function(){return Z.H.useTransition()},Re.version="19.2.
|
|
17
|
+
*/var _p;function Jx(){if(_p)return Re;_p=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),A=Symbol.iterator;function R(N){return N===null||typeof N!="object"?null:(N=A&&N[A]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,M={};function E(N,_,q){this.props=N,this.context=_,this.refs=M,this.updater=q||C}E.prototype.isReactComponent={},E.prototype.setState=function(N,_){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,_,"setState")},E.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function j(){}j.prototype=E.prototype;function w(N,_,q){this.props=N,this.context=_,this.refs=M,this.updater=q||C}var P=w.prototype=new j;P.constructor=w,T(P,E.prototype),P.isPureReactComponent=!0;var re=Array.isArray;function B(){}var Z={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function se(N,_,q){var U=q.ref;return{$$typeof:s,type:N,key:_,ref:U!==void 0?U:null,props:q}}function me(N,_){return se(N.type,_,N.props)}function F(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function z(N){var _={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(q){return _[q]})}var Y=/\/+/g;function I(N,_){return typeof N=="object"&&N!==null&&N.key!=null?z(""+N.key):_.toString(36)}function oe(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(B,B):(N.status="pending",N.then(function(_){N.status==="pending"&&(N.status="fulfilled",N.value=_)},function(_){N.status==="pending"&&(N.status="rejected",N.reason=_)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function k(N,_,q,U,te){var K=typeof N;(K==="undefined"||K==="boolean")&&(N=null);var $=!1;if(N===null)$=!0;else switch(K){case"bigint":case"string":case"number":$=!0;break;case"object":switch(N.$$typeof){case s:case l:$=!0;break;case b:return $=N._init,k($(N._payload),_,q,U,te)}}if($)return te=te(N),$=U===""?"."+I(N,0):U,re(te)?(q="",$!=null&&(q=$.replace(Y,"$&/")+"/"),k(te,_,q,"",function(Ne){return Ne})):te!=null&&(F(te)&&(te=me(te,q+(te.key==null||N&&N.key===te.key?"":(""+te.key).replace(Y,"$&/")+"/")+$)),_.push(te)),1;$=0;var fe=U===""?".":U+":";if(re(N))for(var pe=0;pe<N.length;pe++)U=N[pe],K=fe+I(U,pe),$+=k(U,_,q,K,te);else if(pe=R(N),typeof pe=="function")for(N=pe.call(N),pe=0;!(U=N.next()).done;)U=U.value,K=fe+I(U,pe++),$+=k(U,_,q,K,te);else if(K==="object"){if(typeof N.then=="function")return k(oe(N),_,q,U,te);throw _=String(N),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return $}function L(N,_,q){if(N==null)return N;var U=[],te=0;return k(N,U,"","",function(K){return _.call(q,K,te++)}),U}function D(N){if(N._status===-1){var _=N._result;_=_(),_.then(function(q){(N._status===0||N._status===-1)&&(N._status=1,N._result=q)},function(q){(N._status===0||N._status===-1)&&(N._status=2,N._result=q)}),N._status===-1&&(N._status=0,N._result=_)}if(N._status===1)return N._result.default;throw N._result}var W=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},G={map:L,forEach:function(N,_,q){L(N,function(){_.apply(this,arguments)},q)},count:function(N){var _=0;return L(N,function(){_++}),_},toArray:function(N){return L(N,function(_){return _})||[]},only:function(N){if(!F(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Re.Activity=v,Re.Children=G,Re.Component=E,Re.Fragment=i,Re.Profiler=u,Re.PureComponent=w,Re.StrictMode=o,Re.Suspense=g,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,Re.__COMPILER_RUNTIME={__proto__:null,c:function(N){return Z.H.useMemoCache(N)}},Re.cache=function(N){return function(){return N.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(N,_,q){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var U=T({},N.props),te=N.key;if(_!=null)for(K in _.key!==void 0&&(te=""+_.key),_)!J.call(_,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&_.ref===void 0||(U[K]=_[K]);var K=arguments.length-2;if(K===1)U.children=q;else if(1<K){for(var $=Array(K),fe=0;fe<K;fe++)$[fe]=arguments[fe+2];U.children=$}return se(N.type,te,U)},Re.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:m,_context:N},N},Re.createElement=function(N,_,q){var U,te={},K=null;if(_!=null)for(U in _.key!==void 0&&(K=""+_.key),_)J.call(_,U)&&U!=="key"&&U!=="__self"&&U!=="__source"&&(te[U]=_[U]);var $=arguments.length-2;if($===1)te.children=q;else if(1<$){for(var fe=Array($),pe=0;pe<$;pe++)fe[pe]=arguments[pe+2];te.children=fe}if(N&&N.defaultProps)for(U in $=N.defaultProps,$)te[U]===void 0&&(te[U]=$[U]);return se(N,K,te)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(N){return{$$typeof:p,render:N}},Re.isValidElement=F,Re.lazy=function(N){return{$$typeof:b,_payload:{_status:-1,_result:N},_init:D}},Re.memo=function(N,_){return{$$typeof:h,type:N,compare:_===void 0?null:_}},Re.startTransition=function(N){var _=Z.T,q={};Z.T=q;try{var U=N(),te=Z.S;te!==null&&te(q,U),typeof U=="object"&&U!==null&&typeof U.then=="function"&&U.then(B,W)}catch(K){W(K)}finally{_!==null&&q.types!==null&&(_.types=q.types),Z.T=_}},Re.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},Re.use=function(N){return Z.H.use(N)},Re.useActionState=function(N,_,q){return Z.H.useActionState(N,_,q)},Re.useCallback=function(N,_){return Z.H.useCallback(N,_)},Re.useContext=function(N){return Z.H.useContext(N)},Re.useDebugValue=function(){},Re.useDeferredValue=function(N,_){return Z.H.useDeferredValue(N,_)},Re.useEffect=function(N,_){return Z.H.useEffect(N,_)},Re.useEffectEvent=function(N){return Z.H.useEffectEvent(N)},Re.useId=function(){return Z.H.useId()},Re.useImperativeHandle=function(N,_,q){return Z.H.useImperativeHandle(N,_,q)},Re.useInsertionEffect=function(N,_){return Z.H.useInsertionEffect(N,_)},Re.useLayoutEffect=function(N,_){return Z.H.useLayoutEffect(N,_)},Re.useMemo=function(N,_){return Z.H.useMemo(N,_)},Re.useOptimistic=function(N,_){return Z.H.useOptimistic(N,_)},Re.useReducer=function(N,_,q){return Z.H.useReducer(N,_,q)},Re.useRef=function(N){return Z.H.useRef(N)},Re.useState=function(N){return Z.H.useState(N)},Re.useSyncExternalStore=function(N,_,q){return Z.H.useSyncExternalStore(N,_,q)},Re.useTransition=function(){return Z.H.useTransition()},Re.version="19.2.1",Re}var Bp;function Eu(){return Bp||(Bp=1,su.exports=Jx()),su.exports}var y=Eu();const nn=Eh(y);var nu={exports:{}},tl={},lu={exports:{}},iu={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Gp;function Zx(){if(Gp)return Ft;Gp=1;var s=Eu();function l(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function m(g,h,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:g,containerInfo:h,implementation:b}}var f=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ft.createPortal=function(g,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(l(299));return m(g,h,null,b)},Ft.flushSync=function(g){var h=f.T,b=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=h,o.p=b,o.d.f()}},Ft.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(g,h))},Ft.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},Ft.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var b=h.as,v=p(b,h.crossOrigin),A=typeof h.integrity=="string"?h.integrity:void 0,R=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:A,fetchPriority:R}):b==="script"&&o.d.X(g,{crossOrigin:v,integrity:A,fetchPriority:R,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ft.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=p(h.as,h.crossOrigin);o.d.M(g,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(g)},Ft.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,v=p(b,h.crossOrigin);o.d.L(g,b,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ft.preloadModule=function(g,h){if(typeof g=="string")if(h){var b=p(h.as,h.crossOrigin);o.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(g)},Ft.requestFormReset=function(g){o.d.r(g)},Ft.unstable_batchedUpdates=function(g,h){return g(h)},Ft.useFormState=function(g,h,b){return f.H.useFormState(g,h,b)},Ft.useFormStatus=function(){return f.H.useHostTransitionStatus()},Ft.version="19.2.
|
|
33
|
+
*/var Gp;function Zx(){if(Gp)return Ft;Gp=1;var s=Eu();function l(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function m(g,h,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:g,containerInfo:h,implementation:b}}var f=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ft.createPortal=function(g,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(l(299));return m(g,h,null,b)},Ft.flushSync=function(g){var h=f.T,b=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=h,o.p=b,o.d.f()}},Ft.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(g,h))},Ft.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},Ft.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var b=h.as,v=p(b,h.crossOrigin),A=typeof h.integrity=="string"?h.integrity:void 0,R=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:A,fetchPriority:R}):b==="script"&&o.d.X(g,{crossOrigin:v,integrity:A,fetchPriority:R,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ft.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=p(h.as,h.crossOrigin);o.d.M(g,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(g)},Ft.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,v=p(b,h.crossOrigin);o.d.L(g,b,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ft.preloadModule=function(g,h){if(typeof g=="string")if(h){var b=p(h.as,h.crossOrigin);o.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(g)},Ft.requestFormReset=function(g){o.d.r(g)},Ft.unstable_batchedUpdates=function(g,h){return g(h)},Ft.useFormState=function(g,h,b){return f.H.useFormState(g,h,b)},Ft.useFormStatus=function(){return f.H.useHostTransitionStatus()},Ft.version="19.2.1",Ft}var Fp;function Wx(){if(Fp)return ou.exports;Fp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(l){console.error(l)}}return s(),ou.exports=Zx(),ou.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
`+O[n].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=n&&0<=c);break}}}finally{Dt=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?Ye(r):""}function rt(e,t){switch(e.tag){case 26:case 27:case 5:return Ye(e.type);case 16:return Ye("Lazy");case 13:return e.child!==t&&t!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return Ht(e.type,!1);case 11:return Ht(e.type.render,!1);case 1:return Ht(e.type,!0);case 31:return Ye("Activity");default:return""}}function ft(e){try{var t="",r=null;do t+=rt(e,r),r=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
47
|
Error generating stack: `+n.message+`
|
|
48
48
|
`+n.stack}}var Lt=Object.prototype.hasOwnProperty,xt=s.unstable_scheduleCallback,Se=s.unstable_cancelCallback,at=s.unstable_shouldYield,Rt=s.unstable_requestPaint,lt=s.unstable_now,Ar=s.unstable_getCurrentPriorityLevel,le=s.unstable_ImmediatePriority,ke=s.unstable_UserBlockingPriority,Fe=s.unstable_NormalPriority,Jt=s.unstable_LowPriority,Kt=s.unstable_IdlePriority,Er=s.log,xs=s.unstable_setDisableYieldValue,Lr=null,Mt=null;function ar(e){if(typeof Er=="function"&&xs(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Lr,e)}catch{}}var St=Math.clz32?Math.clz32:bs,ys=Math.log,vs=Math.LN2;function bs(e){return e>>>=0,e===0?32:31-(ys(e)/vs|0)|0}var Tr=256,Rr=262144,$r=4194304;function pr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Yr(e,t,r){var n=e.pendingLanes;if(n===0)return 0;var c=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var S=n&134217727;return S!==0?(n=S&~d,n!==0?c=pr(n):(x&=S,x!==0?c=pr(x):r||(r=S&~e,r!==0&&(c=pr(r))))):(S=n&~d,S!==0?c=pr(S):x!==0?c=pr(x):r||(r=n&~e,r!==0&&(c=pr(r)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,r=t&-t,d>=r||d===32&&(r&4194048)!==0)?t:c}function Ur(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fa(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 Ia(){var e=$r;return $r<<=1,($r&62914560)===0&&($r=4194304),e}function ya(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,r,n,c,d){var x=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var S=e.entanglements,O=e.expirationTimes,Q=e.hiddenUpdates;for(r=x&~r;0<r;){var ie=31-St(r),ue=1<<ie;S[ie]=0,O[ie]=-1;var ee=Q[ie];if(ee!==null)for(Q[ie]=null,ie=0;ie<ee.length;ie++){var ae=ee[ie];ae!==null&&(ae.lane&=-536870913)}r&=~ue}n!==0&&de(e,n,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~t))}function de(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-St(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|r&261930}function ne(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-St(r),c=1<<n;c&t|e[n]&t&&(e[n]|=t),r&=~c}}function he(e,t){var r=t&-t;return r=(r&42)!==0?1:Vt(r),(r&(e.suspendedLanes|t))!==0?0:r}function Vt(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 Pr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ka(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:Tp(e.type))}function Xt(e,t){var r=L.p;try{return L.p=e,t()}finally{L.p=r}}var qt=Math.random().toString(36).slice(2),Ie="__reactFiber$"+qt,kt="__reactProps$"+qt,Gt="__reactContainer$"+qt,ge="__reactEvents$"+qt,Ee="__reactListeners$"+qt,Ge="__reactHandles$"+qt,qe="__reactResources$"+qt,it="__reactMarker$"+qt;function _r(e){delete e[Ie],delete e[kt],delete e[ge],delete e[Ee],delete e[Ge]}function sr(e){var t=e[Ie];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Gt]||r[Ie]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=fp(e);e!==null;){if(r=e[Ie])return r;e=fp(e)}return t}e=r,r=e.parentNode}return null}function nr(e){if(e=e[Ie]||e[Gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Jr(e){var t=e[qe];return t||(t=e[qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[it]=!0}var Vu=new Set,$u={};function Va(e,t){Ss(e,t),Ss(e+"Capture",t)}function Ss(e,t){for($u[e]=t,e=0;e<t.length;e++)Vu.add(t[e])}var _g=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]*$"),Yu={},Ju={};function Bg(e){return Lt.call(Ju,e)?!0:Lt.call(Yu,e)?!1:_g.test(e)?Ju[e]=!0:(Yu[e]=!0,!1)}function gl(e,t,r){if(Bg(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function xl(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Xr(e,t,r,n){if(n===null)e.removeAttribute(r);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+n)}}function hr(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hg(e,t,r){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var c=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(x){r=""+x,d.call(this,x)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(x){r=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ji(e){if(!e._valueTracker){var t=Xu(e)?"checked":"value";e._valueTracker=Hg(e,t,""+e[t])}}function Qu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Xu(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function yl(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 qg=/[\n"\\]/g;function gr(e){return e.replace(qg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xi(e,t,r,n,c,d,x,S){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hr(t)):e.value!==""+hr(t)&&(e.value=""+hr(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Qi(e,x,hr(t)):r!=null?Qi(e,x,hr(r)):n!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+hr(S):e.removeAttribute("name")}function Zu(e,t,r,n,c,d,x,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||r!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Ji(e);return}r=r!=null?""+hr(r):"",t=t!=null?""+hr(t):r,S||t===e.value||(e.value=t),e.defaultValue=t}n=n??c,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=S?e.checked:!!n,e.defaultChecked=!!n,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Ji(e)}function Qi(e,t,r){t==="number"&&yl(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ws(e,t,r,n){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&n&&(e[r].defaultSelected=!0)}else{for(r=""+hr(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,n&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Wu(e,t,r){if(t!=null&&(t=""+hr(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+hr(r):""}function ed(e,t,r,n){if(t==null){if(n!=null){if(r!=null)throw Error(o(92));if(oe(n)){if(1<n.length)throw Error(o(93));n=n[0]}r=n}r==null&&(r=""),t=r}r=hr(t),e.defaultValue=r,n=e.textContent,n===r&&n!==""&&n!==null&&(e.value=n),Ji(e)}function js(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Gg=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 td(e,t,r){var n=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,r):typeof r!="number"||r===0||Gg.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function rd(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var n in r)!r.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var c in t)n=t[c],t.hasOwnProperty(c)&&r[c]!==n&&td(e,c,n)}else for(var d in t)t.hasOwnProperty(d)&&td(e,d,t[d])}function Zi(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 Fg=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"]]),Ig=/^[\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 vl(e){return Ig.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qr(){}var Wi=null;function eo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ns=null,Cs=null;function ad(e){var t=nr(e);if(t&&(e=t.stateNode)){var r=e[kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xi(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+gr(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var c=n[kt]||null;if(!c)throw Error(o(90));Xi(n,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<r.length;t++)n=r[t],n.form===e.form&&Qu(n)}break e;case"textarea":Wu(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&ws(e,!!r.multiple,t,!1)}}}var to=!1;function sd(e,t,r){if(to)return e(t,r);to=!0;try{var n=e(t);return n}finally{if(to=!1,(Ns!==null||Cs!==null)&&(li(),Ns&&(t=Ns,e=Cs,Cs=Ns=null,ad(t),e)))for(t=0;t<e.length;t++)ad(e[t])}}function fn(e,t){var r=e.stateNode;if(r===null)return null;var n=r[kt]||null;if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var Zr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ro=!1;if(Zr)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){ro=!0}}),window.addEventListener("test",pn,pn),window.removeEventListener("test",pn,pn)}catch{ro=!1}var va=null,ao=null,bl=null;function nd(){if(bl)return bl;var e,t=ao,r=t.length,n,c="value"in va?va.value:va.textContent,d=c.length;for(e=0;e<r&&t[e]===c[e];e++);var x=r-e;for(n=1;n<=x&&t[r-n]===c[d-n];n++);return bl=c.slice(e,1<n?1-n:void 0)}function Sl(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 wl(){return!0}function ld(){return!1}function Qt(e){function t(r,n,c,d,x){this._reactName=r,this._targetInst=c,this.type=n,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(r=e[S],this[S]=r?r(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?wl:ld,this.isPropagationStopped=ld,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jl=Qt($a),hn=v({},$a,{view:0,detail:0}),Kg=Qt(hn),so,no,gn,Nl=v({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:io,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!==gn&&(gn&&e.type==="mousemove"?(so=e.screenX-gn.screenX,no=e.screenY-gn.screenY):no=so=0,gn=e),so)},movementY:function(e){return"movementY"in e?e.movementY:no}}),id=Qt(Nl),Vg=v({},Nl,{dataTransfer:0}),$g=Qt(Vg),Yg=v({},hn,{relatedTarget:0}),lo=Qt(Yg),Jg=v({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),Xg=Qt(Jg),Qg=v({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zg=Qt(Qg),Wg=v({},$a,{data:0}),od=Qt(Wg),e0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t0={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"},r0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function a0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=r0[e])?!!t[e]:!1}function io(){return a0}var s0=v({},hn,{key:function(e){if(e.key){var t=e0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Sl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:io,charCode:function(e){return e.type==="keypress"?Sl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),n0=Qt(s0),l0=v({},Nl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cd=Qt(l0),i0=v({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:io}),o0=Qt(i0),c0=v({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),u0=Qt(c0),d0=v({},Nl,{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}),m0=Qt(d0),f0=v({},$a,{newState:0,oldState:0}),p0=Qt(f0),h0=[9,13,27,32],oo=Zr&&"CompositionEvent"in window,xn=null;Zr&&"documentMode"in document&&(xn=document.documentMode);var g0=Zr&&"TextEvent"in window&&!xn,ud=Zr&&(!oo||xn&&8<xn&&11>=xn),dd=" ",md=!1;function fd(e,t){switch(e){case"keyup":return h0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ks=!1;function x0(e,t){switch(e){case"compositionend":return pd(t);case"keypress":return t.which!==32?null:(md=!0,dd);case"textInput":return e=t.data,e===dd&&md?null:e;default:return null}}function y0(e,t){if(ks)return e==="compositionend"||!oo&&fd(e,t)?(e=nd(),bl=ao=va=null,ks=!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 ud&&t.locale!=="ko"?null:t.data;default:return null}}var v0={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 hd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v0[e.type]:t==="textarea"}function gd(e,t,r,n){Ns?Cs?Cs.push(n):Cs=[n]:Ns=n,t=fi(t,"onChange"),0<t.length&&(r=new jl("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var yn=null,vn=null;function b0(e){Wf(e,0)}function Cl(e){var t=yt(e);if(Qu(t))return e}function xd(e,t){if(e==="change")return t}var yd=!1;if(Zr){var co;if(Zr){var uo="oninput"in document;if(!uo){var vd=document.createElement("div");vd.setAttribute("oninput","return;"),uo=typeof vd.oninput=="function"}co=uo}else co=!1;yd=co&&(!document.documentMode||9<document.documentMode)}function bd(){yn&&(yn.detachEvent("onpropertychange",Sd),vn=yn=null)}function Sd(e){if(e.propertyName==="value"&&Cl(vn)){var t=[];gd(t,vn,e,eo(e)),sd(b0,t)}}function S0(e,t,r){e==="focusin"?(bd(),yn=t,vn=r,yn.attachEvent("onpropertychange",Sd)):e==="focusout"&&bd()}function w0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Cl(vn)}function j0(e,t){if(e==="click")return Cl(t)}function N0(e,t){if(e==="input"||e==="change")return Cl(t)}function C0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lr=typeof Object.is=="function"?Object.is:C0;function bn(e,t){if(lr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var c=r[n];if(!Lt.call(t,c)||!lr(e[c],t[c]))return!1}return!0}function wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jd(e,t){var r=wd(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=wd(r)}}function Nd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yl(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=yl(e.document)}return t}function mo(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 k0=Zr&&"documentMode"in document&&11>=document.documentMode,As=null,fo=null,Sn=null,po=!1;function kd(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;po||As==null||As!==yl(n)||(n=As,"selectionStart"in n&&mo(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Sn&&bn(Sn,n)||(Sn=n,n=fi(fo,"onSelect"),0<n.length&&(t=new jl("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=As)))}function Ya(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Es={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionrun:Ya("Transition","TransitionRun"),transitionstart:Ya("Transition","TransitionStart"),transitioncancel:Ya("Transition","TransitionCancel"),transitionend:Ya("Transition","TransitionEnd")},ho={},Ad={};Zr&&(Ad=document.createElement("div").style,"AnimationEvent"in window||(delete Es.animationend.animation,delete Es.animationiteration.animation,delete Es.animationstart.animation),"TransitionEvent"in window||delete Es.transitionend.transition);function Ja(e){if(ho[e])return ho[e];if(!Es[e])return e;var t=Es[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ad)return ho[e]=t[r];return e}var Ed=Ja("animationend"),Td=Ja("animationiteration"),Rd=Ja("animationstart"),A0=Ja("transitionrun"),E0=Ja("transitionstart"),T0=Ja("transitioncancel"),Md=Ja("transitionend"),zd=new Map,go="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(" ");go.push("scrollEnd");function Mr(e,t){zd.set(e,t),Va(t,[e])}var kl=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)},xr=[],Ts=0,xo=0;function Al(){for(var e=Ts,t=xo=Ts=0;t<e;){var r=xr[t];xr[t++]=null;var n=xr[t];xr[t++]=null;var c=xr[t];xr[t++]=null;var d=xr[t];if(xr[t++]=null,n!==null&&c!==null){var x=n.pending;x===null?c.next=c:(c.next=x.next,x.next=c),n.pending=c}d!==0&&Od(r,c,d)}}function El(e,t,r,n){xr[Ts++]=e,xr[Ts++]=t,xr[Ts++]=r,xr[Ts++]=n,xo|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function yo(e,t,r,n){return El(e,t,r,n),Tl(e)}function Xa(e,t){return El(e,null,null,t),Tl(e)}function Od(e,t,r){e.lanes|=r;var n=e.alternate;n!==null&&(n.lanes|=r);for(var c=!1,d=e.return;d!==null;)d.childLanes|=r,n=d.alternate,n!==null&&(n.childLanes|=r),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-St(r),e=d.hiddenUpdates,n=e[c],n===null?e[c]=[t]:n.push(t),t.lane=r|536870912),d):null}function Tl(e){if(50<Fn)throw Fn=0,Ac=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rs={};function R0(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(e,t,r,n){return new R0(e,t,r,n)}function vo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wr(e,t){var r=e.alternate;return r===null?(r=ir(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Dd(e,t){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Rl(e,t,r,n,c,d){var x=0;if(n=e,typeof e=="function")vo(e)&&(x=1);else if(typeof e=="string")x=Lx(e,r,U.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=ir(31,r,t,c),e.elementType=se,e.lanes=d,e;case T:return Qa(r.children,c,d,t);case M:x=8,c|=24;break;case E:return e=ir(12,r,t,c|2),e.elementType=E,e.lanes=d,e;case re:return e=ir(13,r,t,c),e.elementType=re,e.lanes=d,e;case B:return e=ir(19,r,t,c),e.elementType=B,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w:x=10;break e;case j:x=9;break e;case P:x=11;break e;case Z:x=14;break e;case J:x=16,n=null;break e}x=29,r=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=ir(x,r,t,c),t.elementType=e,t.type=n,t.lanes=d,t}function Qa(e,t,r,n){return e=ir(7,e,n,t),e.lanes=r,e}function bo(e,t,r){return e=ir(6,e,null,t),e.lanes=r,e}function Ld(e){var t=ir(18,null,null,0);return t.stateNode=e,t}function So(e,t,r){return t=ir(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ud=new WeakMap;function yr(e,t){if(typeof e=="object"&&e!==null){var r=Ud.get(e);return r!==void 0?r:(t={value:e,source:t,stack:ft(t)},Ud.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var Ms=[],zs=0,Ml=null,wn=0,vr=[],br=0,ba=null,Br=1,Hr="";function ea(e,t){Ms[zs++]=wn,Ms[zs++]=Ml,Ml=e,wn=t}function Pd(e,t,r){vr[br++]=Br,vr[br++]=Hr,vr[br++]=ba,ba=e;var n=Br;e=Hr;var c=32-St(n)-1;n&=~(1<<c),r+=1;var d=32-St(t)+c;if(30<d){var x=c-c%5;d=(n&(1<<x)-1).toString(32),n>>=x,c-=x,Br=1<<32-St(t)+c|r<<c|n,Hr=d+e}else Br=1<<d|r<<c|n,Hr=e}function wo(e){e.return!==null&&(ea(e,1),Pd(e,1,0))}function jo(e){for(;e===Ml;)Ml=Ms[--zs],Ms[zs]=null,wn=Ms[--zs],Ms[zs]=null;for(;e===ba;)ba=vr[--br],vr[br]=null,Hr=vr[--br],vr[br]=null,Br=vr[--br],vr[br]=null}function _d(e,t){vr[br++]=Br,vr[br++]=Hr,vr[br++]=ba,Br=t.id,Hr=t.overflow,ba=e}var Ut=null,ot=null,Be=!1,Sa=null,Sr=!1,No=Error(o(519));function wa(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw jn(yr(t,e)),No}function Bd(e){var t=e.stateNode,r=e.type,n=e.memoizedProps;switch(t[Ie]=e,t[kt]=n,r){case"dialog":Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":case"embed":Ue("load",t);break;case"video":case"audio":for(r=0;r<Kn.length;r++)Ue(Kn[r],t);break;case"source":Ue("error",t);break;case"img":case"image":case"link":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"input":Ue("invalid",t),Zu(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ue("invalid",t);break;case"textarea":Ue("invalid",t),ed(t,n.value,n.defaultValue,n.children)}r=n.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||n.suppressHydrationWarning===!0||ap(t.textContent,r)?(n.popover!=null&&(Ue("beforetoggle",t),Ue("toggle",t)),n.onScroll!=null&&Ue("scroll",t),n.onScrollEnd!=null&&Ue("scrollend",t),n.onClick!=null&&(t.onclick=Qr),t=!0):t=!1,t||wa(e,!0)}function Hd(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:Sr=!1;return;case 27:case 3:Sr=!0;return;default:Ut=Ut.return}}function Os(e){if(e!==Ut)return!1;if(!Be)return Hd(e),Be=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Gc(e.type,e.memoizedProps)),r=!r),r&&ot&&wa(e),Hd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=mp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=mp(e)}else t===27?(t=ot,Ua(e.type)?(e=$c,$c=null,ot=e):ot=t):ot=Ut?jr(e.stateNode.nextSibling):null;return!0}function Za(){ot=Ut=null,Be=!1}function Co(){var e=Sa;return e!==null&&(tr===null?tr=e:tr.push.apply(tr,e),Sa=null),e}function jn(e){Sa===null?Sa=[e]:Sa.push(e)}var ko=N(null),Wa=null,ta=null;function ja(e,t,r){q(ko,t._currentValue),t._currentValue=r}function ra(e){e._currentValue=ko.current,_(ko)}function Ao(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Eo(e,t,r,n){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var x=c.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=c;for(var O=0;O<t.length;O++)if(S.context===t[O]){d.lanes|=r,S=d.alternate,S!==null&&(S.lanes|=r),Ao(d.return,r,e),n||(x=null);break e}d=S.next}}else if(c.tag===18){if(x=c.return,x===null)throw Error(o(341));x.lanes|=r,d=x.alternate,d!==null&&(d.lanes|=r),Ao(x,r,e),x=null}else x=c.child;if(x!==null)x.return=c;else for(x=c;x!==null;){if(x===e){x=null;break}if(c=x.sibling,c!==null){c.return=x.return,x=c;break}x=x.return}c=x}}function Ds(e,t,r,n){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var x=c.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var S=c.type;lr(c.pendingProps.value,x.value)||(e!==null?e.push(S):e=[S])}}else if(c===$.current){if(x=c.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Xn):e=[Xn])}c=c.return}e!==null&&Eo(t,e,r,n),t.flags|=262144}function zl(e){for(e=e.firstContext;e!==null;){if(!lr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function es(e){Wa=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pt(e){return qd(Wa,e)}function Ol(e,t){return Wa===null&&es(e),qd(e,t)}function qd(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},ta===null){if(e===null)throw Error(o(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return r}var M0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},z0=s.unstable_scheduleCallback,O0=s.unstable_NormalPriority,wt={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function To(){return{controller:new M0,data:new Map,refCount:0}}function Nn(e){e.refCount--,e.refCount===0&&z0(O0,function(){e.controller.abort()})}var Cn=null,Ro=0,Ls=0,Us=null;function D0(e,t){if(Cn===null){var r=Cn=[];Ro=0,Ls=Oc(),Us={status:"pending",value:void 0,then:function(n){r.push(n)}}}return Ro++,t.then(Gd,Gd),t}function Gd(){if(--Ro===0&&Cn!==null){Us!==null&&(Us.status="fulfilled");var e=Cn;Cn=null,Ls=0,Us=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function L0(e,t){var r=[],n={status:"pending",value:null,reason:null,then:function(c){r.push(c)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var c=0;c<r.length;c++)(0,r[c])(t)},function(c){for(n.status="rejected",n.reason=c,c=0;c<r.length;c++)(0,r[c])(void 0)}),n}var Fd=k.S;k.S=function(e,t){Af=lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&D0(e,t),Fd!==null&&Fd(e,t)};var ts=N(null);function Mo(){var e=ts.current;return e!==null?e:nt.pooledCache}function Dl(e,t){t===null?q(ts,ts.current):q(ts,t.pool)}function Id(){var e=Mo();return e===null?null:{parent:wt._currentValue,pool:e}}var Ps=Error(o(460)),zo=Error(o(474)),Ll=Error(o(542)),Ul={then:function(){}};function Kd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vd(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Qr,Qr),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yd(e),e;default:if(typeof t.status=="string")t.then(Qr,Qr);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=n}},function(n){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yd(e),e}throw as=t,Ps}}function rs(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(as=r,Ps):r}}var as=null;function $d(){if(as===null)throw Error(o(459));var e=as;return as=null,e}function Yd(e){if(e===Ps||e===Ll)throw Error(o(483))}var _s=null,kn=0;function Pl(e){var t=kn;return kn+=1,_s===null&&(_s=[]),Vd(_s,e,t)}function An(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _l(e,t){throw t.$$typeof===A?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jd(e){function t(V,H){if(e){var X=V.deletions;X===null?(V.deletions=[H],V.flags|=16):X.push(H)}}function r(V,H){if(!e)return null;for(;H!==null;)t(V,H),H=H.sibling;return null}function n(V){for(var H=new Map;V!==null;)V.key!==null?H.set(V.key,V):H.set(V.index,V),V=V.sibling;return H}function c(V,H){return V=Wr(V,H),V.index=0,V.sibling=null,V}function d(V,H,X){return V.index=X,e?(X=V.alternate,X!==null?(X=X.index,X<H?(V.flags|=67108866,H):X):(V.flags|=67108866,H)):(V.flags|=1048576,H)}function x(V){return e&&V.alternate===null&&(V.flags|=67108866),V}function S(V,H,X,ce){return H===null||H.tag!==6?(H=bo(X,V.mode,ce),H.return=V,H):(H=c(H,X),H.return=V,H)}function O(V,H,X,ce){var Ce=X.type;return Ce===T?ie(V,H,X.props.children,ce,X.key):H!==null&&(H.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&rs(Ce)===H.type)?(H=c(H,X.props),An(H,X),H.return=V,H):(H=Rl(X.type,X.key,X.props,null,V.mode,ce),An(H,X),H.return=V,H)}function Q(V,H,X,ce){return H===null||H.tag!==4||H.stateNode.containerInfo!==X.containerInfo||H.stateNode.implementation!==X.implementation?(H=So(X,V.mode,ce),H.return=V,H):(H=c(H,X.children||[]),H.return=V,H)}function ie(V,H,X,ce,Ce){return H===null||H.tag!==7?(H=Qa(X,V.mode,ce,Ce),H.return=V,H):(H=c(H,X),H.return=V,H)}function ue(V,H,X){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=bo(""+H,V.mode,X),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case R:return X=Rl(H.type,H.key,H.props,null,V.mode,X),An(X,H),X.return=V,X;case C:return H=So(H,V.mode,X),H.return=V,H;case J:return H=rs(H),ue(V,H,X)}if(oe(H)||z(H))return H=Qa(H,V.mode,X,null),H.return=V,H;if(typeof H.then=="function")return ue(V,Pl(H),X);if(H.$$typeof===w)return ue(V,Ol(V,H),X);_l(V,H)}return null}function ee(V,H,X,ce){var Ce=H!==null?H.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Ce!==null?null:S(V,H,""+X,ce);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case R:return X.key===Ce?O(V,H,X,ce):null;case C:return X.key===Ce?Q(V,H,X,ce):null;case J:return X=rs(X),ee(V,H,X,ce)}if(oe(X)||z(X))return Ce!==null?null:ie(V,H,X,ce,null);if(typeof X.then=="function")return ee(V,H,Pl(X),ce);if(X.$$typeof===w)return ee(V,H,Ol(V,X),ce);_l(V,X)}return null}function ae(V,H,X,ce,Ce){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return V=V.get(X)||null,S(H,V,""+ce,Ce);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case R:return V=V.get(ce.key===null?X:ce.key)||null,O(H,V,ce,Ce);case C:return V=V.get(ce.key===null?X:ce.key)||null,Q(H,V,ce,Ce);case J:return ce=rs(ce),ae(V,H,X,ce,Ce)}if(oe(ce)||z(ce))return V=V.get(X)||null,ie(H,V,ce,Ce,null);if(typeof ce.then=="function")return ae(V,H,X,Pl(ce),Ce);if(ce.$$typeof===w)return ae(V,H,X,Ol(H,ce),Ce);_l(H,ce)}return null}function xe(V,H,X,ce){for(var Ce=null,Ke=null,we=H,Oe=H=0,_e=null;we!==null&&Oe<X.length;Oe++){we.index>Oe?(_e=we,we=null):_e=we.sibling;var Ve=ee(V,we,X[Oe],ce);if(Ve===null){we===null&&(we=_e);break}e&&we&&Ve.alternate===null&&t(V,we),H=d(Ve,H,Oe),Ke===null?Ce=Ve:Ke.sibling=Ve,Ke=Ve,we=_e}if(Oe===X.length)return r(V,we),Be&&ea(V,Oe),Ce;if(we===null){for(;Oe<X.length;Oe++)we=ue(V,X[Oe],ce),we!==null&&(H=d(we,H,Oe),Ke===null?Ce=we:Ke.sibling=we,Ke=we);return Be&&ea(V,Oe),Ce}for(we=n(we);Oe<X.length;Oe++)_e=ae(we,V,Oe,X[Oe],ce),_e!==null&&(e&&_e.alternate!==null&&we.delete(_e.key===null?Oe:_e.key),H=d(_e,H,Oe),Ke===null?Ce=_e:Ke.sibling=_e,Ke=_e);return e&&we.forEach(function(qa){return t(V,qa)}),Be&&ea(V,Oe),Ce}function Ae(V,H,X,ce){if(X==null)throw Error(o(151));for(var Ce=null,Ke=null,we=H,Oe=H=0,_e=null,Ve=X.next();we!==null&&!Ve.done;Oe++,Ve=X.next()){we.index>Oe?(_e=we,we=null):_e=we.sibling;var qa=ee(V,we,Ve.value,ce);if(qa===null){we===null&&(we=_e);break}e&&we&&qa.alternate===null&&t(V,we),H=d(qa,H,Oe),Ke===null?Ce=qa:Ke.sibling=qa,Ke=qa,we=_e}if(Ve.done)return r(V,we),Be&&ea(V,Oe),Ce;if(we===null){for(;!Ve.done;Oe++,Ve=X.next())Ve=ue(V,Ve.value,ce),Ve!==null&&(H=d(Ve,H,Oe),Ke===null?Ce=Ve:Ke.sibling=Ve,Ke=Ve);return Be&&ea(V,Oe),Ce}for(we=n(we);!Ve.done;Oe++,Ve=X.next())Ve=ae(we,V,Oe,Ve.value,ce),Ve!==null&&(e&&Ve.alternate!==null&&we.delete(Ve.key===null?Oe:Ve.key),H=d(Ve,H,Oe),Ke===null?Ce=Ve:Ke.sibling=Ve,Ke=Ve);return e&&we.forEach(function(Vx){return t(V,Vx)}),Be&&ea(V,Oe),Ce}function tt(V,H,X,ce){if(typeof X=="object"&&X!==null&&X.type===T&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case R:e:{for(var Ce=X.key;H!==null;){if(H.key===Ce){if(Ce=X.type,Ce===T){if(H.tag===7){r(V,H.sibling),ce=c(H,X.props.children),ce.return=V,V=ce;break e}}else if(H.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&rs(Ce)===H.type){r(V,H.sibling),ce=c(H,X.props),An(ce,X),ce.return=V,V=ce;break e}r(V,H);break}else t(V,H);H=H.sibling}X.type===T?(ce=Qa(X.props.children,V.mode,ce,X.key),ce.return=V,V=ce):(ce=Rl(X.type,X.key,X.props,null,V.mode,ce),An(ce,X),ce.return=V,V=ce)}return x(V);case C:e:{for(Ce=X.key;H!==null;){if(H.key===Ce)if(H.tag===4&&H.stateNode.containerInfo===X.containerInfo&&H.stateNode.implementation===X.implementation){r(V,H.sibling),ce=c(H,X.children||[]),ce.return=V,V=ce;break e}else{r(V,H);break}else t(V,H);H=H.sibling}ce=So(X,V.mode,ce),ce.return=V,V=ce}return x(V);case J:return X=rs(X),tt(V,H,X,ce)}if(oe(X))return xe(V,H,X,ce);if(z(X)){if(Ce=z(X),typeof Ce!="function")throw Error(o(150));return X=Ce.call(X),Ae(V,H,X,ce)}if(typeof X.then=="function")return tt(V,H,Pl(X),ce);if(X.$$typeof===w)return tt(V,H,Ol(V,X),ce);_l(V,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,H!==null&&H.tag===6?(r(V,H.sibling),ce=c(H,X),ce.return=V,V=ce):(r(V,H),ce=bo(X,V.mode,ce),ce.return=V,V=ce),x(V)):r(V,H)}return function(V,H,X,ce){try{kn=0;var Ce=tt(V,H,X,ce);return _s=null,Ce}catch(we){if(we===Ps||we===Ll)throw we;var Ke=ir(29,we,null,V.mode);return Ke.lanes=ce,Ke.return=V,Ke}finally{}}}var ss=Jd(!0),Xd=Jd(!1),Na=!1;function Oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Do(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 Ca(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ka(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,($e&2)!==0){var c=n.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),n.pending=t,t=Tl(e),Od(e,null,r),t}return El(e,n,t,r),Tl(e)}function En(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ne(e,r)}}function Lo(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var c=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};d===null?c=d=x:d=d.next=x,r=r.next}while(r!==null);d===null?c=d=t:d=d.next=t}else c=d=t;r={baseState:n.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:n.shared,callbacks:n.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var Uo=!1;function Tn(){if(Uo){var e=Us;if(e!==null)throw e}}function Rn(e,t,r,n){Uo=!1;var c=e.updateQueue;Na=!1;var d=c.firstBaseUpdate,x=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var O=S,Q=O.next;O.next=null,x===null?d=Q:x.next=Q,x=O;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,S=ie.lastBaseUpdate,S!==x&&(S===null?ie.firstBaseUpdate=Q:S.next=Q,ie.lastBaseUpdate=O))}if(d!==null){var ue=c.baseState;x=0,ie=Q=O=null,S=d;do{var ee=S.lane&-536870913,ae=ee!==S.lane;if(ae?(Pe&ee)===ee:(n&ee)===ee){ee!==0&&ee===Ls&&(Uo=!0),ie!==null&&(ie=ie.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var xe=e,Ae=S;ee=t;var tt=r;switch(Ae.tag){case 1:if(xe=Ae.payload,typeof xe=="function"){ue=xe.call(tt,ue,ee);break e}ue=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ae.payload,ee=typeof xe=="function"?xe.call(tt,ue,ee):xe,ee==null)break e;ue=v({},ue,ee);break e;case 2:Na=!0}}ee=S.callback,ee!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=c.callbacks,ae===null?c.callbacks=[ee]:ae.push(ee))}else ae={lane:ee,tag:S.tag,payload:S.payload,callback:S.callback,next:null},ie===null?(Q=ie=ae,O=ue):ie=ie.next=ae,x|=ee;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;ae=S,S=ae.next,ae.next=null,c.lastBaseUpdate=ae,c.shared.pending=null}}while(!0);ie===null&&(O=ue),c.baseState=O,c.firstBaseUpdate=Q,c.lastBaseUpdate=ie,d===null&&(c.shared.lanes=0),Ma|=x,e.lanes=x,e.memoizedState=ue}}function Qd(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Zd(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Qd(r[e],t)}var Bs=N(null),Bl=N(0);function Wd(e,t){e=da,q(Bl,e),q(Bs,t),da=e|t.baseLanes}function Po(){q(Bl,da),q(Bs,Bs.current)}function _o(){da=Bl.current,_(Bs),_(Bl)}var or=N(null),wr=null;function Aa(e){var t=e.alternate;q(vt,vt.current&1),q(or,e),wr===null&&(t===null||Bs.current!==null||t.memoizedState!==null)&&(wr=e)}function Bo(e){q(vt,vt.current),q(or,e),wr===null&&(wr=e)}function em(e){e.tag===22?(q(vt,vt.current),q(or,e),wr===null&&(wr=e)):Ea()}function Ea(){q(vt,vt.current),q(or,or.current)}function cr(e){_(or),wr===e&&(wr=null),_(vt)}var vt=N(0);function Hl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Kc(r)||Vc(r)))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 aa=0,ze=null,We=null,jt=null,ql=!1,Hs=!1,ns=!1,Gl=0,Mn=0,qs=null,U0=0;function ht(){throw Error(o(321))}function Ho(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!lr(e[r],t[r]))return!1;return!0}function qo(e,t,r,n,c,d){return aa=d,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Pm:rc,ns=!1,d=r(n,c),ns=!1,Hs&&(d=rm(t,r,n,c)),tm(e),d}function tm(e){k.H=Dn;var t=We!==null&&We.next!==null;if(aa=0,jt=We=ze=null,ql=!1,Mn=0,qs=null,t)throw Error(o(300));e===null||Nt||(e=e.dependencies,e!==null&&zl(e)&&(Nt=!0))}function rm(e,t,r,n){ze=e;var c=0;do{if(Hs&&(qs=null),Mn=0,Hs=!1,25<=c)throw Error(o(301));if(c+=1,jt=We=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}k.H=_m,d=t(r,n)}while(Hs);return d}function P0(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?zn(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(ze.flags|=1024),t}function Go(){var e=Gl!==0;return Gl=0,e}function Fo(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function Io(e){if(ql){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ql=!1}aa=0,jt=We=ze=null,Hs=!1,Mn=Gl=0,qs=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?ze.memoizedState=jt=e:jt=jt.next=e,jt}function bt(){if(We===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=jt===null?ze.memoizedState:jt.next;if(t!==null)jt=t,We=e;else{if(e===null)throw ze.alternate===null?Error(o(467)):Error(o(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},jt===null?ze.memoizedState=jt=e:jt=jt.next=e}return jt}function Fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zn(e){var t=Mn;return Mn+=1,qs===null&&(qs=[]),e=Vd(qs,e,t),t=ze,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Pm:rc),e}function Il(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zn(e);if(e.$$typeof===w)return Pt(e)}throw Error(o(438,String(e)))}function Ko(e){var t=null,r=ze.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var n=ze.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Fl(),ze.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),n=0;n<e;n++)r[n]=me;return t.index++,r}function sa(e,t){return typeof t=="function"?t(e):t}function Kl(e){var t=bt();return Vo(t,We,e)}function Vo(e,t,r){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=r;var c=e.baseQueue,d=n.pending;if(d!==null){if(c!==null){var x=c.next;c.next=d.next,d.next=x}t.baseQueue=c=d,n.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var S=x=null,O=null,Q=t,ie=!1;do{var ue=Q.lane&-536870913;if(ue!==Q.lane?(Pe&ue)===ue:(aa&ue)===ue){var ee=Q.revertLane;if(ee===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ue===Ls&&(ie=!0);else if((aa&ee)===ee){Q=Q.next,ee===Ls&&(ie=!0);continue}else ue={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},O===null?(S=O=ue,x=d):O=O.next=ue,ze.lanes|=ee,Ma|=ee;ue=Q.action,ns&&r(d,ue),d=Q.hasEagerState?Q.eagerState:r(d,ue)}else ee={lane:ue,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},O===null?(S=O=ee,x=d):O=O.next=ee,ze.lanes|=ue,Ma|=ue;Q=Q.next}while(Q!==null&&Q!==t);if(O===null?x=d:O.next=S,!lr(d,e.memoizedState)&&(Nt=!0,ie&&(r=Us,r!==null)))throw r;e.memoizedState=d,e.baseState=x,e.baseQueue=O,n.lastRenderedState=d}return c===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function $o(e){var t=bt(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var n=r.dispatch,c=r.pending,d=t.memoizedState;if(c!==null){r.pending=null;var x=c=c.next;do d=e(d,x.action),x=x.next;while(x!==c);lr(d,t.memoizedState)||(Nt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,n]}function am(e,t,r){var n=ze,c=bt(),d=Be;if(d){if(r===void 0)throw Error(o(407));r=r()}else r=t();var x=!lr((We||c).memoizedState,r);if(x&&(c.memoizedState=r,Nt=!0),c=c.queue,Xo(lm.bind(null,n,c,e),[e]),c.getSnapshot!==t||x||jt!==null&&jt.memoizedState.tag&1){if(n.flags|=2048,Gs(9,{destroy:void 0},nm.bind(null,n,c,r,t),null),nt===null)throw Error(o(349));d||(aa&127)!==0||sm(n,t,r)}return r}function sm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ze.updateQueue,t===null?(t=Fl(),ze.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function nm(e,t,r,n){t.value=r,t.getSnapshot=n,im(t)&&om(e)}function lm(e,t,r){return r(function(){im(t)&&om(e)})}function im(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!lr(e,r)}catch{return!0}}function om(e){var t=Xa(e,2);t!==null&&rr(t,e,2)}function Yo(e){var t=$t();if(typeof e=="function"){var r=e;if(e=r(),ns){ar(!0);try{r()}finally{ar(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},t}function cm(e,t,r,n){return e.baseState=r,Vo(e,We,typeof n=="function"?n:sa)}function _0(e,t,r,n,c){if(Yl(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};k.T!==null?r(!0):d.isTransition=!1,n(d),r=t.pending,r===null?(d.next=t.pending=d,um(t,d)):(d.next=r.next,t.pending=r.next=d)}}function um(e,t){var r=t.action,n=t.payload,c=e.state;if(t.isTransition){var d=k.T,x={};k.T=x;try{var S=r(c,n),O=k.S;O!==null&&O(x,S),dm(e,t,S)}catch(Q){Jo(e,t,Q)}finally{d!==null&&x.types!==null&&(d.types=x.types),k.T=d}}else try{d=r(c,n),dm(e,t,d)}catch(Q){Jo(e,t,Q)}}function dm(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(n){mm(e,t,n)},function(n){return Jo(e,t,n)}):mm(e,t,r)}function mm(e,t,r){t.status="fulfilled",t.value=r,fm(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,um(e,r)))}function Jo(e,t,r){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=r,fm(t),t=t.next;while(t!==n)}e.action=null}function fm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function pm(e,t){return t}function hm(e,t){if(Be){var r=nt.formState;if(r!==null){e:{var n=ze;if(Be){if(ot){t:{for(var c=ot,d=Sr;c.nodeType!==8;){if(!d){c=null;break t}if(c=jr(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){ot=jr(c.nextSibling),n=c.data==="F!";break e}}wa(n)}n=!1}n&&(t=r[0])}}return r=$t(),r.memoizedState=r.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pm,lastRenderedState:t},r.queue=n,r=Dm.bind(null,ze,n),n.dispatch=r,n=Yo(!1),d=tc.bind(null,ze,!1,n.queue),n=$t(),c={state:t,dispatch:null,action:e,pending:null},n.queue=c,r=_0.bind(null,ze,c,d,r),c.dispatch=r,n.memoizedState=e,[t,r,!1]}function gm(e){var t=bt();return xm(t,We,e)}function xm(e,t,r){if(t=Vo(e,t,pm)[0],e=Kl(sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=zn(t)}catch(x){throw x===Ps?Ll:x}else n=t;t=bt();var c=t.queue,d=c.dispatch;return r!==t.memoizedState&&(ze.flags|=2048,Gs(9,{destroy:void 0},B0.bind(null,c,r),null)),[n,d,e]}function B0(e,t){e.action=t}function ym(e){var t=bt(),r=We;if(r!==null)return xm(t,r,e);bt(),t=t.memoizedState,r=bt();var n=r.queue.dispatch;return r.memoizedState=e,[t,n,!1]}function Gs(e,t,r,n){return e={tag:e,create:r,deps:n,inst:t,next:null},t=ze.updateQueue,t===null&&(t=Fl(),ze.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function vm(){return bt().memoizedState}function Vl(e,t,r,n){var c=$t();ze.flags|=e,c.memoizedState=Gs(1|t,{destroy:void 0},r,n===void 0?null:n)}function $l(e,t,r,n){var c=bt();n=n===void 0?null:n;var d=c.memoizedState.inst;We!==null&&n!==null&&Ho(n,We.memoizedState.deps)?c.memoizedState=Gs(t,d,r,n):(ze.flags|=e,c.memoizedState=Gs(1|t,d,r,n))}function bm(e,t){Vl(8390656,8,e,t)}function Xo(e,t){$l(2048,8,e,t)}function H0(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=Fl(),ze.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function Sm(e){var t=bt().memoizedState;return H0({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function wm(e,t){return $l(4,2,e,t)}function jm(e,t){return $l(4,4,e,t)}function Nm(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Cm(e,t,r){r=r!=null?r.concat([e]):null,$l(4,4,Nm.bind(null,t,e),r)}function Qo(){}function km(e,t){var r=bt();t=t===void 0?null:t;var n=r.memoizedState;return t!==null&&Ho(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Am(e,t){var r=bt();t=t===void 0?null:t;var n=r.memoizedState;if(t!==null&&Ho(t,n[1]))return n[0];if(n=e(),ns){ar(!0);try{e()}finally{ar(!1)}}return r.memoizedState=[n,t],n}function Zo(e,t,r){return r===void 0||(aa&1073741824)!==0&&(Pe&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=Tf(),ze.lanes|=e,Ma|=e,r)}function Em(e,t,r,n){return lr(r,t)?r:Bs.current!==null?(e=Zo(e,r,n),lr(e,t)||(Nt=!0),e):(aa&42)===0||(aa&1073741824)!==0&&(Pe&261930)===0?(Nt=!0,e.memoizedState=r):(e=Tf(),ze.lanes|=e,Ma|=e,t)}function Tm(e,t,r,n,c){var d=L.p;L.p=d!==0&&8>d?d:8;var x=k.T,S={};k.T=S,tc(e,!1,t,r);try{var O=c(),Q=k.S;if(Q!==null&&Q(S,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var ie=L0(O,n);On(e,t,ie,mr(e))}else On(e,t,n,mr(e))}catch(ue){On(e,t,{then:function(){},status:"rejected",reason:ue},mr())}finally{L.p=d,x!==null&&S.types!==null&&(x.types=S.types),k.T=x}}function q0(){}function Wo(e,t,r,n){if(e.tag!==5)throw Error(o(476));var c=Rm(e).queue;Tm(e,c,t,D,r===null?q0:function(){return Mm(e),r(n)})}function Rm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:D,baseState:D,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:D},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Mm(e){var t=Rm(e);t.next===null&&(t=e.alternate.memoizedState),On(e,t.next.queue,{},mr())}function ec(){return Pt(Xn)}function zm(){return bt().memoizedState}function Om(){return bt().memoizedState}function G0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=mr();e=Ca(r);var n=ka(t,e,r);n!==null&&(rr(n,t,r),En(n,t,r)),t={cache:To()},e.payload=t;return}t=t.return}}function F0(e,t,r){var n=mr();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Yl(e)?Lm(t,r):(r=yo(e,t,r,n),r!==null&&(rr(r,e,n),Um(r,t,n)))}function Dm(e,t,r){var n=mr();On(e,t,r,n)}function On(e,t,r,n){var c={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Yl(e))Lm(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var x=t.lastRenderedState,S=d(x,r);if(c.hasEagerState=!0,c.eagerState=S,lr(S,x))return El(e,t,c,0),nt===null&&Al(),!1}catch{}finally{}if(r=yo(e,t,c,n),r!==null)return rr(r,e,n),Um(r,t,n),!0}return!1}function tc(e,t,r,n){if(n={lane:2,revertLane:Oc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Yl(e)){if(t)throw Error(o(479))}else t=yo(e,r,n,2),t!==null&&rr(t,e,2)}function Yl(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Lm(e,t){Hs=ql=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Um(e,t,r){if((r&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ne(e,r)}}var Dn={readContext:Pt,use:Il,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};Dn.useEffectEvent=ht;var Pm={readContext:Pt,use:Il,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:bm,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Vl(4194308,4,Nm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Vl(4194308,4,e,t)},useInsertionEffect:function(e,t){Vl(4,2,e,t)},useMemo:function(e,t){var r=$t();t=t===void 0?null:t;var n=e();if(ns){ar(!0);try{e()}finally{ar(!1)}}return r.memoizedState=[n,t],n},useReducer:function(e,t,r){var n=$t();if(r!==void 0){var c=r(t);if(ns){ar(!0);try{r(t)}finally{ar(!1)}}}else c=t;return n.memoizedState=n.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},n.queue=e,e=e.dispatch=F0.bind(null,ze,e),[n.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,r=Dm.bind(null,ze,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Qo,useDeferredValue:function(e,t){var r=$t();return Zo(r,e,t)},useTransition:function(){var e=Yo(!1);return e=Tm.bind(null,ze,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var n=ze,c=$t();if(Be){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),nt===null)throw Error(o(349));(Pe&127)!==0||sm(n,t,r)}c.memoizedState=r;var d={value:r,getSnapshot:t};return c.queue=d,bm(lm.bind(null,n,d,e),[e]),n.flags|=2048,Gs(9,{destroy:void 0},nm.bind(null,n,d,r,t),null),r},useId:function(){var e=$t(),t=nt.identifierPrefix;if(Be){var r=Hr,n=Br;r=(n&~(1<<32-St(n)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Gl++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=U0++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ec,useFormState:hm,useActionState:hm,useOptimistic:function(e){var t=$t();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=tc.bind(null,ze,!0,r),r.dispatch=t,[e,t]},useMemoCache:Ko,useCacheRefresh:function(){return $t().memoizedState=G0.bind(null,ze)},useEffectEvent:function(e){var t=$t(),r={impl:e};return t.memoizedState=r,function(){if(($e&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},rc={readContext:Pt,use:Il,useCallback:km,useContext:Pt,useEffect:Xo,useImperativeHandle:Cm,useInsertionEffect:wm,useLayoutEffect:jm,useMemo:Am,useReducer:Kl,useRef:vm,useState:function(){return Kl(sa)},useDebugValue:Qo,useDeferredValue:function(e,t){var r=bt();return Em(r,We.memoizedState,e,t)},useTransition:function(){var e=Kl(sa)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:zn(e),t]},useSyncExternalStore:am,useId:zm,useHostTransitionStatus:ec,useFormState:gm,useActionState:gm,useOptimistic:function(e,t){var r=bt();return cm(r,We,e,t)},useMemoCache:Ko,useCacheRefresh:Om};rc.useEffectEvent=Sm;var _m={readContext:Pt,use:Il,useCallback:km,useContext:Pt,useEffect:Xo,useImperativeHandle:Cm,useInsertionEffect:wm,useLayoutEffect:jm,useMemo:Am,useReducer:$o,useRef:vm,useState:function(){return $o(sa)},useDebugValue:Qo,useDeferredValue:function(e,t){var r=bt();return We===null?Zo(r,e,t):Em(r,We.memoizedState,e,t)},useTransition:function(){var e=$o(sa)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:zn(e),t]},useSyncExternalStore:am,useId:zm,useHostTransitionStatus:ec,useFormState:ym,useActionState:ym,useOptimistic:function(e,t){var r=bt();return We!==null?cm(r,We,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Ko,useCacheRefresh:Om};_m.useEffectEvent=Sm;function ac(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:v({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var sc={enqueueSetState:function(e,t,r){e=e._reactInternals;var n=mr(),c=Ca(n);c.payload=t,r!=null&&(c.callback=r),t=ka(e,c,n),t!==null&&(rr(t,e,n),En(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=mr(),c=Ca(n);c.tag=1,c.payload=t,r!=null&&(c.callback=r),t=ka(e,c,n),t!==null&&(rr(t,e,n),En(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=mr(),n=Ca(r);n.tag=2,t!=null&&(n.callback=t),t=ka(e,n,r),t!==null&&(rr(t,e,r),En(t,e,r))}};function Bm(e,t,r,n,c,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,d,x):t.prototype&&t.prototype.isPureReactComponent?!bn(r,n)||!bn(c,d):!0}function Hm(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&sc.enqueueReplaceState(t,t.state,null)}function ls(e,t){var r=t;if("ref"in t){r={};for(var n in t)n!=="ref"&&(r[n]=t[n])}if(e=e.defaultProps){r===t&&(r=v({},r));for(var c in e)r[c]===void 0&&(r[c]=e[c])}return r}function qm(e){kl(e)}function Gm(e){console.error(e)}function Fm(e){kl(e)}function Jl(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Im(e,t,r){try{var n=e.onCaughtError;n(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function nc(e,t,r){return r=Ca(r),r.tag=3,r.payload={element:null},r.callback=function(){Jl(e,t)},r}function Km(e){return e=Ca(e),e.tag=3,e}function Vm(e,t,r,n){var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var d=n.value;e.payload=function(){return c(d)},e.callback=function(){Im(t,r,n)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Im(t,r,n),typeof c!="function"&&(za===null?za=new Set([this]):za.add(this));var S=n.stack;this.componentDidCatch(n.value,{componentStack:S!==null?S:""})})}function I0(e,t,r,n,c){if(r.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=r.alternate,t!==null&&Ds(t,r,c,!0),r=or.current,r!==null){switch(r.tag){case 31:case 13:return wr===null?ii():r.alternate===null&>===0&&(gt=3),r.flags&=-257,r.flags|=65536,r.lanes=c,n===Ul?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([n]):t.add(n),Rc(e,n,c)),!1;case 22:return r.flags|=65536,n===Ul?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([n]):r.add(n)),Rc(e,n,c)),!1}throw Error(o(435,r.tag))}return Rc(e,n,c),ii(),!1}if(Be)return t=or.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,n!==No&&(e=Error(o(422),{cause:n}),jn(yr(e,r)))):(n!==No&&(t=Error(o(423),{cause:n}),jn(yr(t,r))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,n=yr(n,r),c=nc(e.stateNode,n,c),Lo(e,c),gt!==4&&(gt=2)),!1;var d=Error(o(520),{cause:n});if(d=yr(d,r),Gn===null?Gn=[d]:Gn.push(d),gt!==4&&(gt=2),t===null)return!0;n=yr(n,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=c&-c,r.lanes|=e,e=nc(r.stateNode,n,e),Lo(r,e),!1;case 1:if(t=r.type,d=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(za===null||!za.has(d))))return r.flags|=65536,c&=-c,r.lanes|=c,c=Km(c),Vm(c,e,r,n),Lo(r,c),!1}r=r.return}while(r!==null);return!1}var lc=Error(o(461)),Nt=!1;function _t(e,t,r,n){t.child=e===null?Xd(t,null,r,n):ss(t,e.child,r,n)}function $m(e,t,r,n,c){r=r.render;var d=t.ref;if("ref"in n){var x={};for(var S in n)S!=="ref"&&(x[S]=n[S])}else x=n;return es(t),n=qo(e,t,r,x,d,c),S=Go(),e!==null&&!Nt?(Fo(e,t,c),na(e,t,c)):(Be&&S&&wo(t),t.flags|=1,_t(e,t,n,c),t.child)}function Ym(e,t,r,n,c){if(e===null){var d=r.type;return typeof d=="function"&&!vo(d)&&d.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=d,Jm(e,t,d,n,c)):(e=Rl(r.type,null,n,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!pc(e,c)){var x=d.memoizedProps;if(r=r.compare,r=r!==null?r:bn,r(x,n)&&e.ref===t.ref)return na(e,t,c)}return t.flags|=1,e=Wr(d,n),e.ref=t.ref,e.return=t,t.child=e}function Jm(e,t,r,n,c){if(e!==null){var d=e.memoizedProps;if(bn(d,n)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=n=d,pc(e,c))(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,na(e,t,c)}return ic(e,t,r,n,c)}function Xm(e,t,r,n){var c=n.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|r:r,e!==null){for(n=t.child=e.child,c=0;n!==null;)c=c|n.lanes|n.childLanes,n=n.sibling;n=c&~d}else n=0,t.child=null;return Qm(e,t,d,r,n)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Dl(t,d!==null?d.cachePool:null),d!==null?Wd(t,d):Po(),em(t);else return n=t.lanes=536870912,Qm(e,t,d!==null?d.baseLanes|r:r,r,n)}else d!==null?(Dl(t,d.cachePool),Wd(t,d),Ea(),t.memoizedState=null):(e!==null&&Dl(t,null),Po(),Ea());return _t(e,t,c,r),t.child}function Ln(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qm(e,t,r,n,c){var d=Mo();return d=d===null?null:{parent:wt._currentValue,pool:d},t.memoizedState={baseLanes:r,cachePool:d},e!==null&&Dl(t,null),Po(),em(t),e!==null&&Ds(e,t,n,!0),t.childLanes=c,null}function Xl(e,t){return t=Zl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Zm(e,t,r){return ss(t,e.child,null,r),e=Xl(t,t.pendingProps),e.flags|=2,cr(t),t.memoizedState=null,e}function K0(e,t,r){var n=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(n.mode==="hidden")return e=Xl(t,n),t.lanes=536870912,Ln(null,e);if(Bo(t),(e=ot)?(e=dp(e,Sr),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Br,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},r=Ld(e),r.return=t,t.child=r,Ut=t,ot=null)):e=null,e===null)throw wa(t);return t.lanes=536870912,null}return Xl(t,n)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(Bo(t),c)if(t.flags&256)t.flags&=-257,t=Zm(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Nt||Ds(e,t,r,!1),c=(r&e.childLanes)!==0,Nt||c){if(n=nt,n!==null&&(x=he(n,r),x!==0&&x!==d.retryLane))throw d.retryLane=x,Xa(e,x),rr(n,e,x),lc;ii(),t=Zm(e,t,r)}else e=d.treeContext,ot=jr(x.nextSibling),Ut=t,Be=!0,Sa=null,Sr=!1,e!==null&&_d(t,e),t=Xl(t,n),t.flags|=4096;return t}return e=Wr(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ql(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function ic(e,t,r,n,c){return es(t),r=qo(e,t,r,n,void 0,c),n=Go(),e!==null&&!Nt?(Fo(e,t,c),na(e,t,c)):(Be&&n&&wo(t),t.flags|=1,_t(e,t,r,c),t.child)}function Wm(e,t,r,n,c,d){return es(t),t.updateQueue=null,r=rm(t,n,r,c),tm(e),n=Go(),e!==null&&!Nt?(Fo(e,t,d),na(e,t,d)):(Be&&n&&wo(t),t.flags|=1,_t(e,t,r,d),t.child)}function ef(e,t,r,n,c){if(es(t),t.stateNode===null){var d=Rs,x=r.contextType;typeof x=="object"&&x!==null&&(d=Pt(x)),d=new r(n,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=sc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=n,d.state=t.memoizedState,d.refs={},Oo(t),x=r.contextType,d.context=typeof x=="object"&&x!==null?Pt(x):Rs,d.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(ac(t,r,x,n),d.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&sc.enqueueReplaceState(d,d.state,null),Rn(t,n,d,c),Tn(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){d=t.stateNode;var S=t.memoizedProps,O=ls(r,S);d.props=O;var Q=d.context,ie=r.contextType;x=Rs,typeof ie=="object"&&ie!==null&&(x=Pt(ie));var ue=r.getDerivedStateFromProps;ie=typeof ue=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,ie||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||Q!==x)&&Hm(t,d,n,x),Na=!1;var ee=t.memoizedState;d.state=ee,Rn(t,n,d,c),Tn(),Q=t.memoizedState,S||ee!==Q||Na?(typeof ue=="function"&&(ac(t,r,ue,n),Q=t.memoizedState),(O=Na||Bm(t,r,O,n,ee,Q,x))?(ie||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=Q),d.props=n,d.state=Q,d.context=x,n=O):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{d=t.stateNode,Do(e,t),x=t.memoizedProps,ie=ls(r,x),d.props=ie,ue=t.pendingProps,ee=d.context,Q=r.contextType,O=Rs,typeof Q=="object"&&Q!==null&&(O=Pt(Q)),S=r.getDerivedStateFromProps,(Q=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==ue||ee!==O)&&Hm(t,d,n,O),Na=!1,ee=t.memoizedState,d.state=ee,Rn(t,n,d,c),Tn();var ae=t.memoizedState;x!==ue||ee!==ae||Na||e!==null&&e.dependencies!==null&&zl(e.dependencies)?(typeof S=="function"&&(ac(t,r,S,n),ae=t.memoizedState),(ie=Na||Bm(t,r,ie,n,ee,ae,O)||e!==null&&e.dependencies!==null&&zl(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(n,ae,O),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(n,ae,O)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ae),d.props=n,d.state=ae,d.context=O,n=ie):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),n=!1)}return d=n,Ql(e,t),n=(t.flags&128)!==0,d||n?(d=t.stateNode,r=n&&typeof r.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&n?(t.child=ss(t,e.child,null,c),t.child=ss(t,null,r,c)):_t(e,t,r,c),t.memoizedState=d.state,e=t.child):e=na(e,t,c),e}function tf(e,t,r,n){return Za(),t.flags|=256,_t(e,t,r,n),t.child}var oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cc(e){return{baseLanes:e,cachePool:Id()}}function uc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=dr),e}function rf(e,t,r){var n=t.pendingProps,c=!1,d=(t.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(vt.current&2)!==0),x&&(c=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(c?Aa(t):Ea(),(e=ot)?(e=dp(e,Sr),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Br,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},r=Ld(e),r.return=t,t.child=r,Ut=t,ot=null)):e=null,e===null)throw wa(t);return Vc(e)?t.lanes=32:t.lanes=536870912,null}var S=n.children;return n=n.fallback,c?(Ea(),c=t.mode,S=Zl({mode:"hidden",children:S},c),n=Qa(n,c,r,null),S.return=t,n.return=t,S.sibling=n,t.child=S,n=t.child,n.memoizedState=cc(r),n.childLanes=uc(e,x,r),t.memoizedState=oc,Ln(null,n)):(Aa(t),dc(t,S))}var O=e.memoizedState;if(O!==null&&(S=O.dehydrated,S!==null)){if(d)t.flags&256?(Aa(t),t.flags&=-257,t=mc(e,t,r)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),S=n.fallback,c=t.mode,n=Zl({mode:"visible",children:n.children},c),S=Qa(S,c,r,null),S.flags|=2,n.return=t,S.return=t,n.sibling=S,t.child=n,ss(t,e.child,null,r),n=t.child,n.memoizedState=cc(r),n.childLanes=uc(e,x,r),t.memoizedState=oc,t=Ln(null,n));else if(Aa(t),Vc(S)){if(x=S.nextSibling&&S.nextSibling.dataset,x)var Q=x.dgst;x=Q,n=Error(o(419)),n.stack="",n.digest=x,jn({value:n,source:null,stack:null}),t=mc(e,t,r)}else if(Nt||Ds(e,t,r,!1),x=(r&e.childLanes)!==0,Nt||x){if(x=nt,x!==null&&(n=he(x,r),n!==0&&n!==O.retryLane))throw O.retryLane=n,Xa(e,n),rr(x,e,n),lc;Kc(S)||ii(),t=mc(e,t,r)}else Kc(S)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,ot=jr(S.nextSibling),Ut=t,Be=!0,Sa=null,Sr=!1,e!==null&&_d(t,e),t=dc(t,n.children),t.flags|=4096);return t}return c?(Ea(),S=n.fallback,c=t.mode,O=e.child,Q=O.sibling,n=Wr(O,{mode:"hidden",children:n.children}),n.subtreeFlags=O.subtreeFlags&65011712,Q!==null?S=Wr(Q,S):(S=Qa(S,c,r,null),S.flags|=2),S.return=t,n.return=t,n.sibling=S,t.child=n,Ln(null,n),n=t.child,S=e.child.memoizedState,S===null?S=cc(r):(c=S.cachePool,c!==null?(O=wt._currentValue,c=c.parent!==O?{parent:O,pool:O}:c):c=Id(),S={baseLanes:S.baseLanes|r,cachePool:c}),n.memoizedState=S,n.childLanes=uc(e,x,r),t.memoizedState=oc,Ln(e.child,n)):(Aa(t),r=e.child,e=r.sibling,r=Wr(r,{mode:"visible",children:n.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function dc(e,t){return t=Zl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zl(e,t){return e=ir(22,e,null,t),e.lanes=0,e}function mc(e,t,r){return ss(t,e.child,null,r),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function af(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ao(e.return,t,r)}function fc(e,t,r,n,c,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:c,treeForkCount:d}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=r,x.tailMode=c,x.treeForkCount=d)}function sf(e,t,r){var n=t.pendingProps,c=n.revealOrder,d=n.tail;n=n.children;var x=vt.current,S=(x&2)!==0;if(S?(x=x&1|2,t.flags|=128):x&=1,q(vt,x),_t(e,t,n,r),n=Be?wn:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&af(e,r,t);else if(e.tag===19)af(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&Hl(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),fc(t,!1,c,r,d,n);break;case"backwards":case"unstable_legacy-backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Hl(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}fc(t,!0,r,null,d,n);break;case"together":fc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function na(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ma|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Ds(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,r=Wr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Wr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zl(e)))}function V0(e,t,r){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),ja(t,wt,e.memoizedState.cache),Za();break;case 27:case 5:Ne(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:ja(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Bo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Aa(t),t.flags|=128,null):(r&t.child.childLanes)!==0?rf(e,t,r):(Aa(t),e=na(e,t,r),e!==null?e.sibling:null);Aa(t);break;case 19:var c=(e.flags&128)!==0;if(n=(r&t.childLanes)!==0,n||(Ds(e,t,r,!1),n=(r&t.childLanes)!==0),c){if(n)return sf(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),q(vt,vt.current),n)break;return null;case 22:return t.lanes=0,Xm(e,t,r,t.pendingProps);case 24:ja(t,wt,e.memoizedState.cache)}return na(e,t,r)}function nf(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Nt=!0;else{if(!pc(e,r)&&(t.flags&128)===0)return Nt=!1,V0(e,t,r);Nt=(e.flags&131072)!==0}else Nt=!1,Be&&(t.flags&1048576)!==0&&Pd(t,wn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=rs(t.elementType),t.type=e,typeof e=="function")vo(e)?(n=ls(e,n),t.tag=1,t=ef(null,t,e,n,r)):(t.tag=0,t=ic(null,t,e,n,r));else{if(e!=null){var c=e.$$typeof;if(c===P){t.tag=11,t=$m(null,t,e,n,r);break e}else if(c===Z){t.tag=14,t=Ym(null,t,e,n,r);break e}}throw t=I(e)||e,Error(o(306,t,""))}}return t;case 0:return ic(e,t,t.type,t.pendingProps,r);case 1:return n=t.type,c=ls(n,t.pendingProps),ef(e,t,n,c,r);case 3:e:{if(fe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var d=t.memoizedState;c=d.element,Do(e,t),Rn(t,n,null,r);var x=t.memoizedState;if(n=x.cache,ja(t,wt,n),n!==d.cache&&Eo(t,[wt],r,!0),Tn(),n=x.element,d.isDehydrated)if(d={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=tf(e,t,n,r);break e}else if(n!==c){c=yr(Error(o(424)),t),jn(c),t=tf(e,t,n,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ot=jr(e.firstChild),Ut=t,Be=!0,Sa=null,Sr=!0,r=Xd(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Za(),n===c){t=na(e,t,r);break e}_t(e,t,n,r)}t=t.child}return t;case 26:return Ql(e,t),e===null?(r=xp(t.type,null,t.pendingProps,null))?t.memoizedState=r:Be||(r=t.type,e=t.pendingProps,n=pi(K.current).createElement(r),n[Ie]=t,n[kt]=e,Bt(n,r,e),pt(n),t.stateNode=n):t.memoizedState=xp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ne(t),e===null&&Be&&(n=t.stateNode=pp(t.type,t.pendingProps,K.current),Ut=t,Sr=!0,c=ot,Ua(t.type)?($c=c,ot=jr(n.firstChild)):ot=c),_t(e,t,t.pendingProps.children,r),Ql(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((c=n=ot)&&(n=wx(n,t.type,t.pendingProps,Sr),n!==null?(t.stateNode=n,Ut=t,ot=jr(n.firstChild),Sr=!1,c=!0):c=!1),c||wa(t)),Ne(t),c=t.type,d=t.pendingProps,x=e!==null?e.memoizedProps:null,n=d.children,Gc(c,d)?n=null:x!==null&&Gc(c,x)&&(t.flags|=32),t.memoizedState!==null&&(c=qo(e,t,P0,null,null,r),Xn._currentValue=c),Ql(e,t),_t(e,t,n,r),t.child;case 6:return e===null&&Be&&((e=r=ot)&&(r=jx(r,t.pendingProps,Sr),r!==null?(t.stateNode=r,Ut=t,ot=null,e=!0):e=!1),e||wa(t)),null;case 13:return rf(e,t,r);case 4:return fe(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ss(t,null,n,r):_t(e,t,n,r),t.child;case 11:return $m(e,t,t.type,t.pendingProps,r);case 7:return _t(e,t,t.pendingProps,r),t.child;case 8:return _t(e,t,t.pendingProps.children,r),t.child;case 12:return _t(e,t,t.pendingProps.children,r),t.child;case 10:return n=t.pendingProps,ja(t,t.type,n.value),_t(e,t,n.children,r),t.child;case 9:return c=t.type._context,n=t.pendingProps.children,es(t),c=Pt(c),n=n(c),t.flags|=1,_t(e,t,n,r),t.child;case 14:return Ym(e,t,t.type,t.pendingProps,r);case 15:return Jm(e,t,t.type,t.pendingProps,r);case 19:return sf(e,t,r);case 31:return K0(e,t,r);case 22:return Xm(e,t,r,t.pendingProps);case 24:return es(t),n=Pt(wt),e===null?(c=Mo(),c===null&&(c=nt,d=To(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=r),c=d),t.memoizedState={parent:n,cache:c},Oo(t),ja(t,wt,c)):((e.lanes&r)!==0&&(Do(e,t),Rn(t,null,null,r),Tn()),c=e.memoizedState,d=t.memoizedState,c.parent!==n?(c={parent:n,cache:n},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),ja(t,wt,n)):(n=d.cache,ja(t,wt,n),n!==c.cache&&Eo(t,[wt],r,!0))),_t(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function la(e){e.flags|=4}function hc(e,t,r,n,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Of())e.flags|=8192;else throw as=Ul,zo}else e.flags&=-16777217}function lf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wp(t))if(Of())e.flags|=8192;else throw as=Ul,zo}function Wl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ia():536870912,e.lanes|=t,Vs|=t)}function Un(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,n|=c.subtreeFlags&65011712,n|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,n|=c.subtreeFlags,n|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function $0(e,t,r){var n=t.pendingProps;switch(jo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return r=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ra(wt),pe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Os(t)?la(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Co())),ct(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(la(t),d!==null?(ct(t),lf(t,d)):(ct(t),hc(t,c,null,n,r))):d?d!==e.memoizedState?(la(t),ct(t),lf(t,d)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&la(t),ct(t),hc(t,c,e,n,r)),null;case 27:if(ye(t),r=K.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&la(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ct(t),null}e=U.current,Os(t)?Bd(t):(e=pp(c,n,r),t.stateNode=e,la(t))}return ct(t),null;case 5:if(ye(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&la(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ct(t),null}if(d=U.current,Os(t))Bd(t);else{var x=pi(K.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?d.multiple=!0:n.size&&(d.size=n.size);break;default:d=typeof n.is=="string"?x.createElement(c,{is:n.is}):x.createElement(c)}}d[Ie]=t,d[kt]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=d;e:switch(Bt(d,c,n),c){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&la(t)}}return ct(t),hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&la(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=K.current,Os(t)){if(e=t.stateNode,r=t.memoizedProps,n=null,c=Ut,c!==null)switch(c.tag){case 27:case 5:n=c.memoizedProps}e[Ie]=t,e=!!(e.nodeValue===r||n!==null&&n.suppressHydrationWarning===!0||ap(e.nodeValue,r)),e||wa(t,!0)}else e=pi(e).createTextNode(n),e[Ie]=t,t.stateNode=e}return ct(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(n=Os(t),r!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ie]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else r=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(cr(t),t):(cr(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ct(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Os(t),n!==null&&n.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Ie]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),c=!1}else c=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(cr(t),t):(cr(t),null)}return cr(t),(t.flags&128)!==0?(t.lanes=r,t):(r=n!==null,e=e!==null&&e.memoizedState!==null,r&&(n=t.child,c=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(c=n.alternate.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==c&&(n.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Wl(t,t.updateQueue),ct(t),null);case 4:return pe(),e===null&&Pc(t.stateNode.containerInfo),ct(t),null;case 10:return ra(t.type),ct(t),null;case 19:if(_(vt),n=t.memoizedState,n===null)return ct(t),null;if(c=(t.flags&128)!==0,d=n.rendering,d===null)if(c)Un(n,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Hl(e),d!==null){for(t.flags|=128,Un(n,!1),e=d.updateQueue,t.updateQueue=e,Wl(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)Dd(r,e),r=r.sibling;return q(vt,vt.current&1|2),Be&&ea(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&<()>si&&(t.flags|=128,c=!0,Un(n,!1),t.lanes=4194304)}else{if(!c)if(e=Hl(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Wl(t,e),Un(n,!0),n.tail===null&&n.tailMode==="hidden"&&!d.alternate&&!Be)return ct(t),null}else 2*lt()-n.renderingStartTime>si&&r!==536870912&&(t.flags|=128,c=!0,Un(n,!1),t.lanes=4194304);n.isBackwards?(d.sibling=t.child,t.child=d):(e=n.last,e!==null?e.sibling=d:t.child=d,n.last=d)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=lt(),e.sibling=null,r=vt.current,q(vt,c?r&1|2:r&1),Be&&ea(t,n.treeForkCount),e):(ct(t),null);case 22:case 23:return cr(t),_o(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(r&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),r=t.updateQueue,r!==null&&Wl(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==r&&(t.flags|=2048),e!==null&&_(ts),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ra(wt),ct(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Y0(e,t){switch(jo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(wt),pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(cr(t),t.alternate===null)throw Error(o(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(cr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(vt),null;case 4:return pe(),null;case 10:return ra(t.type),null;case 22:case 23:return cr(t),_o(),e!==null&&_(ts),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(wt),null;case 25:return null;default:return null}}function of(e,t){switch(jo(t),t.tag){case 3:ra(wt),pe();break;case 26:case 27:case 5:ye(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&cr(t);break;case 13:cr(t);break;case 19:_(vt);break;case 10:ra(t.type);break;case 22:case 23:cr(t),_o(),e!==null&&_(ts);break;case 24:ra(wt)}}function Pn(e,t){try{var r=t.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var c=n.next;r=c;do{if((r.tag&e)===e){n=void 0;var d=r.create,x=r.inst;n=d(),x.destroy=n}r=r.next}while(r!==c)}}catch(S){Ze(t,t.return,S)}}function Ta(e,t,r){try{var n=t.updateQueue,c=n!==null?n.lastEffect:null;if(c!==null){var d=c.next;n=d;do{if((n.tag&e)===e){var x=n.inst,S=x.destroy;if(S!==void 0){x.destroy=void 0,c=t;var O=r,Q=S;try{Q()}catch(ie){Ze(c,O,ie)}}}n=n.next}while(n!==d)}}catch(ie){Ze(t,t.return,ie)}}function cf(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Zd(t,r)}catch(n){Ze(e,e.return,n)}}}function uf(e,t,r){r.props=ls(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(n){Ze(e,t,n)}}function _n(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof r=="function"?e.refCleanup=r(n):r.current=n}}catch(c){Ze(e,t,c)}}function qr(e,t){var r=e.ref,n=e.refCleanup;if(r!==null)if(typeof n=="function")try{n()}catch(c){Ze(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(c){Ze(e,t,c)}else r.current=null}function df(e){var t=e.type,r=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&n.focus();break e;case"img":r.src?n.src=r.src:r.srcSet&&(n.srcset=r.srcSet)}}catch(c){Ze(e,e.return,c)}}function gc(e,t,r){try{var n=e.stateNode;gx(n,e.type,r,t),n[kt]=t}catch(c){Ze(e,e.return,c)}}function mf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mf(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&&Ua(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 yc(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Qr));else if(n!==4&&(n===27&&Ua(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(yc(e,t,r),e=e.sibling;e!==null;)yc(e,t,r),e=e.sibling}function ei(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(n===27&&Ua(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(ei(e,t,r),e=e.sibling;e!==null;)ei(e,t,r),e=e.sibling}function ff(e){var t=e.stateNode,r=e.memoizedProps;try{for(var n=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Bt(t,n,r),t[Ie]=e,t[kt]=r}catch(d){Ze(e,e.return,d)}}var ia=!1,Ct=!1,vc=!1,pf=typeof WeakSet=="function"?WeakSet:Set,zt=null;function J0(e,t){if(e=e.containerInfo,Hc=Si,e=Cd(e),mo(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var c=n.anchorOffset,d=n.focusNode;n=n.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var x=0,S=-1,O=-1,Q=0,ie=0,ue=e,ee=null;t:for(;;){for(var ae;ue!==r||c!==0&&ue.nodeType!==3||(S=x+c),ue!==d||n!==0&&ue.nodeType!==3||(O=x+n),ue.nodeType===3&&(x+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)ee=ue,ue=ae;for(;;){if(ue===e)break t;if(ee===r&&++Q===c&&(S=x),ee===d&&++ie===n&&(O=x),(ae=ue.nextSibling)!==null)break;ue=ee,ee=ue.parentNode}ue=ae}r=S===-1||O===-1?null:{start:S,end:O}}else r=null}r=r||{start:0,end:0}}else r=null;for(qc={focusedElem:e,selectionRange:r},Si=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,d=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(r=0;r<e.length;r++)c=e[r],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,r=t,c=d.memoizedProps,d=d.memoizedState,n=r.stateNode;try{var xe=ls(r.type,c);e=n.getSnapshotBeforeUpdate(xe,d),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){Ze(r,r.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Ic(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ic(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function hf(e,t,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:ca(e,r),n&4&&Pn(5,r);break;case 1:if(ca(e,r),n&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){Ze(r,r.return,x)}else{var c=ls(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Ze(r,r.return,x)}}n&64&&cf(r),n&512&&_n(r,r.return);break;case 3:if(ca(e,r),n&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{Zd(e,t)}catch(x){Ze(r,r.return,x)}}break;case 27:t===null&&n&4&&ff(r);case 26:case 5:ca(e,r),t===null&&n&4&&df(r),n&512&&_n(r,r.return);break;case 12:ca(e,r);break;case 31:ca(e,r),n&4&&yf(e,r);break;case 13:ca(e,r),n&4&&vf(e,r),n&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=sx.bind(null,r),Nx(e,r))));break;case 22:if(n=r.memoizedState!==null||ia,!n){t=t!==null&&t.memoizedState!==null||Ct,c=ia;var d=Ct;ia=n,(Ct=t)&&!d?ua(e,r,(r.subtreeFlags&8772)!==0):ca(e,r),ia=c,Ct=d}break;case 30:break;default:ca(e,r)}}function gf(e){var t=e.alternate;t!==null&&(e.alternate=null,gf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_r(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 ut=null,Zt=!1;function oa(e,t,r){for(r=r.child;r!==null;)xf(e,t,r),r=r.sibling}function xf(e,t,r){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Lr,r)}catch{}switch(r.tag){case 26:Ct||qr(r,t),oa(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Ct||qr(r,t);var n=ut,c=Zt;Ua(r.type)&&(ut=r.stateNode,Zt=!1),oa(e,t,r),$n(r.stateNode),ut=n,Zt=c;break;case 5:Ct||qr(r,t);case 6:if(n=ut,c=Zt,ut=null,oa(e,t,r),ut=n,Zt=c,ut!==null)if(Zt)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(r.stateNode)}catch(d){Ze(r,t,d)}else try{ut.removeChild(r.stateNode)}catch(d){Ze(r,t,d)}break;case 18:ut!==null&&(Zt?(e=ut,cp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),en(e)):cp(ut,r.stateNode));break;case 4:n=ut,c=Zt,ut=r.stateNode.containerInfo,Zt=!0,oa(e,t,r),ut=n,Zt=c;break;case 0:case 11:case 14:case 15:Ta(2,r,t),Ct||Ta(4,r,t),oa(e,t,r);break;case 1:Ct||(qr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"&&uf(r,t,n)),oa(e,t,r);break;case 21:oa(e,t,r);break;case 22:Ct=(n=Ct)||r.memoizedState!==null,oa(e,t,r),Ct=n;break;default:oa(e,t,r)}}function yf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{en(e)}catch(r){Ze(t,t.return,r)}}}function vf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{en(e)}catch(r){Ze(t,t.return,r)}}function X0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pf),t;default:throw Error(o(435,e.tag))}}function ti(e,t){var r=X0(e);t.forEach(function(n){if(!r.has(n)){r.add(n);var c=nx.bind(null,e,n);n.then(c,c)}})}function Wt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var c=r[n],d=e,x=t,S=x;e:for(;S!==null;){switch(S.tag){case 27:if(Ua(S.type)){ut=S.stateNode,Zt=!1;break e}break;case 5:ut=S.stateNode,Zt=!1;break e;case 3:case 4:ut=S.stateNode.containerInfo,Zt=!0;break e}S=S.return}if(ut===null)throw Error(o(160));xf(d,x,c),ut=null,Zt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bf(t,e),t=t.sibling}var zr=null;function bf(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wt(t,e),er(e),n&4&&(Ta(3,e,e.return),Pn(3,e),Ta(5,e,e.return));break;case 1:Wt(t,e),er(e),n&512&&(Ct||r===null||qr(r,r.return)),n&64&&ia&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?n:r.concat(n))));break;case 26:var c=zr;if(Wt(t,e),er(e),n&512&&(Ct||r===null||qr(r,r.return)),n&4){var d=r!==null?r.memoizedState:null;if(n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null){e:{n=e.type,r=e.memoizedProps,c=c.ownerDocument||c;t:switch(n){case"title":d=c.getElementsByTagName("title")[0],(!d||d[it]||d[Ie]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(n),c.head.insertBefore(d,c.querySelector("head > title"))),Bt(d,n,r),d[Ie]=e,pt(d),n=d;break e;case"link":var x=bp("link","href",c).get(n+(r.href||""));if(x){for(var S=0;S<x.length;S++)if(d=x[S],d.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&d.getAttribute("rel")===(r.rel==null?null:r.rel)&&d.getAttribute("title")===(r.title==null?null:r.title)&&d.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(S,1);break t}}d=c.createElement(n),Bt(d,n,r),c.head.appendChild(d);break;case"meta":if(x=bp("meta","content",c).get(n+(r.content||""))){for(S=0;S<x.length;S++)if(d=x[S],d.getAttribute("content")===(r.content==null?null:""+r.content)&&d.getAttribute("name")===(r.name==null?null:r.name)&&d.getAttribute("property")===(r.property==null?null:r.property)&&d.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&d.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(S,1);break t}}d=c.createElement(n),Bt(d,n,r),c.head.appendChild(d);break;default:throw Error(o(468,n))}d[Ie]=e,pt(d),n=d}e.stateNode=n}else Sp(c,e.type,e.stateNode);else e.stateNode=vp(c,n,e.memoizedProps);else d!==n?(d===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):d.count--,n===null?Sp(c,e.type,e.stateNode):vp(c,n,e.memoizedProps)):n===null&&e.stateNode!==null&&gc(e,e.memoizedProps,r.memoizedProps)}break;case 27:Wt(t,e),er(e),n&512&&(Ct||r===null||qr(r,r.return)),r!==null&&n&4&&gc(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Wt(t,e),er(e),n&512&&(Ct||r===null||qr(r,r.return)),e.flags&32){c=e.stateNode;try{js(c,"")}catch(xe){Ze(e,e.return,xe)}}n&4&&e.stateNode!=null&&(c=e.memoizedProps,gc(e,c,r!==null?r.memoizedProps:c)),n&1024&&(vc=!0);break;case 6:if(Wt(t,e),er(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,r=e.stateNode;try{r.nodeValue=n}catch(xe){Ze(e,e.return,xe)}}break;case 3:if(xi=null,c=zr,zr=hi(t.containerInfo),Wt(t,e),zr=c,er(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{en(t.containerInfo)}catch(xe){Ze(e,e.return,xe)}vc&&(vc=!1,Sf(e));break;case 4:n=zr,zr=hi(e.stateNode.containerInfo),Wt(t,e),er(e),zr=n;break;case 12:Wt(t,e),er(e);break;case 31:Wt(t,e),er(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ti(e,n)));break;case 13:Wt(t,e),er(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ai=lt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ti(e,n)));break;case 22:c=e.memoizedState!==null;var O=r!==null&&r.memoizedState!==null,Q=ia,ie=Ct;if(ia=Q||c,Ct=ie||O,Wt(t,e),Ct=ie,ia=Q,er(e),n&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(r===null||O||ia||Ct||is(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){O=r=t;try{if(d=O.stateNode,c)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{S=O.stateNode;var ue=O.memoizedProps.style,ee=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;S.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(xe){Ze(O,O.return,xe)}}}else if(t.tag===6){if(r===null){O=t;try{O.stateNode.nodeValue=c?"":O.memoizedProps}catch(xe){Ze(O,O.return,xe)}}}else if(t.tag===18){if(r===null){O=t;try{var ae=O.stateNode;c?up(ae,!0):up(O.stateNode,!1)}catch(xe){Ze(O,O.return,xe)}}}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;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(r=n.retryQueue,r!==null&&(n.retryQueue=null,ti(e,r))));break;case 19:Wt(t,e),er(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ti(e,n)));break;case 30:break;case 21:break;default:Wt(t,e),er(e)}}function er(e){var t=e.flags;if(t&2){try{for(var r,n=e.return;n!==null;){if(mf(n)){r=n;break}n=n.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var c=r.stateNode,d=xc(e);ei(e,d,c);break;case 5:var x=r.stateNode;r.flags&32&&(js(x,""),r.flags&=-33);var S=xc(e);ei(e,S,x);break;case 3:case 4:var O=r.stateNode.containerInfo,Q=xc(e);yc(e,Q,O);break;default:throw Error(o(161))}}catch(ie){Ze(e,e.return,ie)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ca(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hf(e,t.alternate,t),t=t.sibling}function is(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ta(4,t,t.return),is(t);break;case 1:qr(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&uf(t,t.return,r),is(t);break;case 27:$n(t.stateNode);case 26:case 5:qr(t,t.return),is(t);break;case 22:t.memoizedState===null&&is(t);break;case 30:is(t);break;default:is(t)}e=e.sibling}}function ua(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,c=e,d=t,x=d.flags;switch(d.tag){case 0:case 11:case 15:ua(c,d,r),Pn(4,d);break;case 1:if(ua(c,d,r),n=d,c=n.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){Ze(n,n.return,Q)}if(n=d,c=n.updateQueue,c!==null){var S=n.stateNode;try{var O=c.shared.hiddenCallbacks;if(O!==null)for(c.shared.hiddenCallbacks=null,c=0;c<O.length;c++)Qd(O[c],S)}catch(Q){Ze(n,n.return,Q)}}r&&x&64&&cf(d),_n(d,d.return);break;case 27:ff(d);case 26:case 5:ua(c,d,r),r&&n===null&&x&4&&df(d),_n(d,d.return);break;case 12:ua(c,d,r);break;case 31:ua(c,d,r),r&&x&4&&yf(c,d);break;case 13:ua(c,d,r),r&&x&4&&vf(c,d);break;case 22:d.memoizedState===null&&ua(c,d,r),_n(d,d.return);break;case 30:break;default:ua(c,d,r)}t=t.sibling}}function bc(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Nn(r))}function Sc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nn(e))}function Or(e,t,r,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wf(e,t,r,n),t=t.sibling}function wf(e,t,r,n){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Or(e,t,r,n),c&2048&&Pn(9,t);break;case 1:Or(e,t,r,n);break;case 3:Or(e,t,r,n),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nn(e)));break;case 12:if(c&2048){Or(e,t,r,n),e=t.stateNode;try{var d=t.memoizedProps,x=d.id,S=d.onPostCommit;typeof S=="function"&&S(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Ze(t,t.return,O)}}else Or(e,t,r,n);break;case 31:Or(e,t,r,n);break;case 13:Or(e,t,r,n);break;case 23:break;case 22:d=t.stateNode,x=t.alternate,t.memoizedState!==null?d._visibility&2?Or(e,t,r,n):Bn(e,t):d._visibility&2?Or(e,t,r,n):(d._visibility|=2,Fs(e,t,r,n,(t.subtreeFlags&10256)!==0||!1)),c&2048&&bc(x,t);break;case 24:Or(e,t,r,n),c&2048&&Sc(t.alternate,t);break;default:Or(e,t,r,n)}}function Fs(e,t,r,n,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,x=t,S=r,O=n,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Fs(d,x,S,O,c),Pn(8,x);break;case 23:break;case 22:var ie=x.stateNode;x.memoizedState!==null?ie._visibility&2?Fs(d,x,S,O,c):Bn(d,x):(ie._visibility|=2,Fs(d,x,S,O,c)),c&&Q&2048&&bc(x.alternate,x);break;case 24:Fs(d,x,S,O,c),c&&Q&2048&&Sc(x.alternate,x);break;default:Fs(d,x,S,O,c)}t=t.sibling}}function Bn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,n=t,c=n.flags;switch(n.tag){case 22:Bn(r,n),c&2048&&bc(n.alternate,n);break;case 24:Bn(r,n),c&2048&&Sc(n.alternate,n);break;default:Bn(r,n)}t=t.sibling}}var Hn=8192;function Is(e,t,r){if(e.subtreeFlags&Hn)for(e=e.child;e!==null;)jf(e,t,r),e=e.sibling}function jf(e,t,r){switch(e.tag){case 26:Is(e,t,r),e.flags&Hn&&e.memoizedState!==null&&Ux(r,zr,e.memoizedState,e.memoizedProps);break;case 5:Is(e,t,r);break;case 3:case 4:var n=zr;zr=hi(e.stateNode.containerInfo),Is(e,t,r),zr=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Hn,Hn=16777216,Is(e,t,r),Hn=n):Is(e,t,r));break;default:Is(e,t,r)}}function Nf(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 qn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];zt=n,kf(n,e)}Nf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Cf(e),e=e.sibling}function Cf(e){switch(e.tag){case 0:case 11:case 15:qn(e),e.flags&2048&&Ta(9,e,e.return);break;case 3:qn(e);break;case 12:qn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ri(e)):qn(e);break;default:qn(e)}}function ri(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];zt=n,kf(n,e)}Nf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ta(8,t,t.return),ri(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,ri(t));break;default:ri(t)}e=e.sibling}}function kf(e,t){for(;zt!==null;){var r=zt;switch(r.tag){case 0:case 11:case 15:Ta(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var n=r.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Nn(r.memoizedState.cache)}if(n=r.child,n!==null)n.return=r,zt=n;else e:for(r=e;zt!==null;){n=zt;var c=n.sibling,d=n.return;if(gf(n),n===r){zt=null;break e}if(c!==null){c.return=d,zt=c;break e}zt=d}}}var Q0={getCacheForType:function(e){var t=Pt(wt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Pt(wt).controller.signal}},Z0=typeof WeakMap=="function"?WeakMap:Map,$e=0,nt=null,Le=null,Pe=0,Qe=0,ur=null,Ra=!1,Ks=!1,wc=!1,da=0,gt=0,Ma=0,os=0,jc=0,dr=0,Vs=0,Gn=null,tr=null,Nc=!1,ai=0,Af=0,si=1/0,ni=null,za=null,At=0,Oa=null,$s=null,ma=0,Cc=0,kc=null,Ef=null,Fn=0,Ac=null;function mr(){return($e&2)!==0&&Pe!==0?Pe&-Pe:k.T!==null?Oc():Ka()}function Tf(){if(dr===0)if((Pe&536870912)===0||Be){var e=Rr;Rr<<=1,(Rr&3932160)===0&&(Rr=262144),dr=e}else dr=536870912;return e=or.current,e!==null&&(e.flags|=32),dr}function rr(e,t,r){(e===nt&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),Da(e,Pe,dr,!1)),Je(e,r),(($e&2)===0||e!==nt)&&(e===nt&&(($e&2)===0&&(os|=r),gt===4&&Da(e,Pe,dr,!1)),Gr(e))}function Rf(e,t,r){if(($e&6)!==0)throw Error(o(327));var n=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Ur(e,t),c=n?tx(e,t):Tc(e,t,!0),d=n;do{if(c===0){Ks&&!n&&Da(e,t,0,!1);break}else{if(r=e.current.alternate,d&&!W0(r)){c=Tc(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var S=e;c=Gn;var O=S.current.memoizedState.isDehydrated;if(O&&(Ys(S,x).flags|=256),x=Tc(S,x,!1),x!==2){if(wc&&!O){S.errorRecoveryDisabledLanes|=d,os|=d,c=4;break e}d=tr,tr=c,d!==null&&(tr===null?tr=d:tr.push.apply(tr,d))}c=x}if(d=!1,c!==2)continue}}if(c===1){Ys(e,0),Da(e,t,0,!0);break}e:{switch(n=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Da(n,t,dr,!Ra);break e;case 2:tr=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=ai+300-lt(),10<c)){if(Da(n,t,dr,!Ra),Yr(n,0,!0)!==0)break e;ma=t,n.timeoutHandle=ip(Mf.bind(null,n,r,tr,ni,Nc,t,dr,os,Vs,Ra,d,"Throttled",-0,0),c);break e}Mf(n,r,tr,ni,Nc,t,dr,os,Vs,Ra,d,null,-0,0)}}break}while(!0);Gr(e)}function Mf(e,t,r,n,c,d,x,S,O,Q,ie,ue,ee,ae){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qr},jf(t,d,ue);var xe=(d&62914560)===d?ai-lt():(d&4194048)===d?Af-lt():0;if(xe=Px(ue,xe),xe!==null){ma=d,e.cancelPendingCommit=xe(Bf.bind(null,e,t,d,r,n,c,x,S,O,ie,ue,null,ee,ae)),Da(e,d,x,!Q);return}}Bf(e,t,d,r,n,c,x,S,O)}function W0(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var n=0;n<r.length;n++){var c=r[n],d=c.getSnapshot;c=c.value;try{if(!lr(d(),c))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Da(e,t,r,n){t&=~jc,t&=~os,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var c=t;0<c;){var d=31-St(c),x=1<<d;n[d]=-1,c&=~x}r!==0&&de(e,r,t)}function li(){return($e&6)===0?(In(0),!1):!0}function Ec(){if(Le!==null){if(Qe===0)var e=Le.return;else e=Le,ta=Wa=null,Io(e),_s=null,kn=0,e=Le;for(;e!==null;)of(e.alternate,e),e=e.return;Le=null}}function Ys(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,vx(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),ma=0,Ec(),nt=e,Le=r=Wr(e.current,null),Pe=t,Qe=0,ur=null,Ra=!1,Ks=Ur(e,t),wc=!1,Vs=dr=jc=os=Ma=gt=0,tr=Gn=null,Nc=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var c=31-St(n),d=1<<c;t|=e[c],n&=~d}return da=t,Al(),r}function zf(e,t){ze=null,k.H=Dn,t===Ps||t===Ll?(t=$d(),Qe=3):t===zo?(t=$d(),Qe=4):Qe=t===lc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ur=t,Le===null&&(gt=1,Jl(e,yr(t,e.current)))}function Of(){var e=or.current;return e===null?!0:(Pe&4194048)===Pe?wr===null:(Pe&62914560)===Pe||(Pe&536870912)!==0?e===wr:!1}function Df(){var e=k.H;return k.H=Dn,e===null?Dn:e}function Lf(){var e=k.A;return k.A=Q0,e}function ii(){gt=4,Ra||(Pe&4194048)!==Pe&&or.current!==null||(Ks=!0),(Ma&134217727)===0&&(os&134217727)===0||nt===null||Da(nt,Pe,dr,!1)}function Tc(e,t,r){var n=$e;$e|=2;var c=Df(),d=Lf();(nt!==e||Pe!==t)&&(ni=null,Ys(e,t)),t=!1;var x=gt;e:do try{if(Qe!==0&&Le!==null){var S=Le,O=ur;switch(Qe){case 8:Ec(),x=6;break e;case 3:case 2:case 9:case 6:or.current===null&&(t=!0);var Q=Qe;if(Qe=0,ur=null,Js(e,S,O,Q),r&&Ks){x=0;break e}break;default:Q=Qe,Qe=0,ur=null,Js(e,S,O,Q)}}ex(),x=gt;break}catch(ie){zf(e,ie)}while(!0);return t&&e.shellSuspendCounter++,ta=Wa=null,$e=n,k.H=c,k.A=d,Le===null&&(nt=null,Pe=0,Al()),x}function ex(){for(;Le!==null;)Uf(Le)}function tx(e,t){var r=$e;$e|=2;var n=Df(),c=Lf();nt!==e||Pe!==t?(ni=null,si=lt()+500,Ys(e,t)):Ks=Ur(e,t);e:do try{if(Qe!==0&&Le!==null){t=Le;var d=ur;t:switch(Qe){case 1:Qe=0,ur=null,Js(e,t,d,1);break;case 2:case 9:if(Kd(d)){Qe=0,ur=null,Pf(t);break}t=function(){Qe!==2&&Qe!==9||nt!==e||(Qe=7),Gr(e)},d.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Kd(d)?(Qe=0,ur=null,Pf(t)):(Qe=0,ur=null,Js(e,t,d,7));break;case 5:var x=null;switch(Le.tag){case 26:x=Le.memoizedState;case 5:case 27:var S=Le;if(x?wp(x):S.stateNode.complete){Qe=0,ur=null;var O=S.sibling;if(O!==null)Le=O;else{var Q=S.return;Q!==null?(Le=Q,oi(Q)):Le=null}break t}}Qe=0,ur=null,Js(e,t,d,5);break;case 6:Qe=0,ur=null,Js(e,t,d,6);break;case 8:Ec(),gt=6;break e;default:throw Error(o(462))}}rx();break}catch(ie){zf(e,ie)}while(!0);return ta=Wa=null,k.H=n,k.A=c,$e=r,Le!==null?0:(nt=null,Pe=0,Al(),gt)}function rx(){for(;Le!==null&&!at();)Uf(Le)}function Uf(e){var t=nf(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?oi(e):Le=t}function Pf(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Wm(r,t,t.pendingProps,t.type,void 0,Pe);break;case 11:t=Wm(r,t,t.pendingProps,t.type.render,t.ref,Pe);break;case 5:Io(t);default:of(r,t),t=Le=Dd(t,da),t=nf(r,t,da)}e.memoizedProps=e.pendingProps,t===null?oi(e):Le=t}function Js(e,t,r,n){ta=Wa=null,Io(t),_s=null,kn=0;var c=t.return;try{if(I0(e,c,t,r,Pe)){gt=1,Jl(e,yr(r,e.current)),Le=null;return}}catch(d){if(c!==null)throw Le=c,d;gt=1,Jl(e,yr(r,e.current)),Le=null;return}t.flags&32768?(Be||n===1?e=!0:Ks||(Pe&536870912)!==0?e=!1:(Ra=e=!0,(n===2||n===9||n===3||n===6)&&(n=or.current,n!==null&&n.tag===13&&(n.flags|=16384))),_f(t,e)):oi(t)}function oi(e){var t=e;do{if((t.flags&32768)!==0){_f(t,Ra);return}e=t.return;var r=$0(t.alternate,t,da);if(r!==null){Le=r;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);gt===0&&(gt=5)}function _f(e,t){do{var r=Y0(e.alternate,e);if(r!==null){r.flags&=32767,Le=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Le=e;return}Le=e=r}while(e!==null);gt=6,Le=null}function Bf(e,t,r,n,c,d,x,S,O){e.cancelPendingCommit=null;do ci();while(At!==0);if(($e&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=xo,st(e,r,d,x,S,O),e===nt&&(Le=nt=null,Pe=0),$s=t,Oa=e,ma=r,Cc=d,kc=c,Ef=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,lx(Fe,function(){return If(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null,c=L.p,L.p=2,x=$e,$e|=4;try{J0(e,t,r)}finally{$e=x,L.p=c,k.T=n}}At=1,Hf(),qf(),Gf()}}function Hf(){if(At===1){At=0;var e=Oa,t=$s,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=k.T,k.T=null;var n=L.p;L.p=2;var c=$e;$e|=4;try{bf(t,e);var d=qc,x=Cd(e.containerInfo),S=d.focusedElem,O=d.selectionRange;if(x!==S&&S&&S.ownerDocument&&Nd(S.ownerDocument.documentElement,S)){if(O!==null&&mo(S)){var Q=O.start,ie=O.end;if(ie===void 0&&(ie=Q),"selectionStart"in S)S.selectionStart=Q,S.selectionEnd=Math.min(ie,S.value.length);else{var ue=S.ownerDocument||document,ee=ue&&ue.defaultView||window;if(ee.getSelection){var ae=ee.getSelection(),xe=S.textContent.length,Ae=Math.min(O.start,xe),tt=O.end===void 0?Ae:Math.min(O.end,xe);!ae.extend&&Ae>tt&&(x=tt,tt=Ae,Ae=x);var V=jd(S,Ae),H=jd(S,tt);if(V&&H&&(ae.rangeCount!==1||ae.anchorNode!==V.node||ae.anchorOffset!==V.offset||ae.focusNode!==H.node||ae.focusOffset!==H.offset)){var X=ue.createRange();X.setStart(V.node,V.offset),ae.removeAllRanges(),Ae>tt?(ae.addRange(X),ae.extend(H.node,H.offset)):(X.setEnd(H.node,H.offset),ae.addRange(X))}}}}for(ue=[],ae=S;ae=ae.parentNode;)ae.nodeType===1&&ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ue.length;S++){var ce=ue[S];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Si=!!Hc,qc=Hc=null}finally{$e=c,L.p=n,k.T=r}}e.current=t,At=2}}function qf(){if(At===2){At=0;var e=Oa,t=$s,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=k.T,k.T=null;var n=L.p;L.p=2;var c=$e;$e|=4;try{hf(e,t.alternate,t)}finally{$e=c,L.p=n,k.T=r}}At=3}}function Gf(){if(At===4||At===3){At=0,Rt();var e=Oa,t=$s,r=ma,n=Ef;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,$s=Oa=null,Ff(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(za=null),Pr(r),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Lr,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=k.T,c=L.p,L.p=2,k.T=null;try{for(var d=e.onRecoverableError,x=0;x<n.length;x++){var S=n[x];d(S.value,{componentStack:S.stack})}}finally{k.T=t,L.p=c}}(ma&3)!==0&&ci(),Gr(e),c=e.pendingLanes,(r&261930)!==0&&(c&42)!==0?e===Ac?Fn++:(Fn=0,Ac=e):Fn=0,In(0)}}function Ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Nn(t)))}function ci(){return Hf(),qf(),Gf(),If()}function If(){if(At!==5)return!1;var e=Oa,t=Cc;Cc=0;var r=Pr(ma),n=k.T,c=L.p;try{L.p=32>r?32:r,k.T=null,r=kc,kc=null;var d=Oa,x=ma;if(At=0,$s=Oa=null,ma=0,($e&6)!==0)throw Error(o(331));var S=$e;if($e|=4,Cf(d.current),wf(d,d.current,x,r),$e=S,In(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Lr,d)}catch{}return!0}finally{L.p=c,k.T=n,Ff(e,t)}}function Kf(e,t,r){t=yr(r,t),t=nc(e.stateNode,t,2),e=ka(e,t,2),e!==null&&(Je(e,2),Gr(e))}function Ze(e,t,r){if(e.tag===3)Kf(e,e,r);else for(;t!==null;){if(t.tag===3){Kf(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(za===null||!za.has(n))){e=yr(r,e),r=Km(2),n=ka(t,r,2),n!==null&&(Vm(r,n,t,e),Je(n,2),Gr(n));break}}t=t.return}}function Rc(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Z0;var c=new Set;n.set(t,c)}else c=n.get(t),c===void 0&&(c=new Set,n.set(t,c));c.has(r)||(wc=!0,c.add(r),e=ax.bind(null,e,t,r),t.then(e,e))}function ax(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,nt===e&&(Pe&r)===r&&(gt===4||gt===3&&(Pe&62914560)===Pe&&300>lt()-ai?($e&2)===0&&Ys(e,0):jc|=r,Vs===Pe&&(Vs=0)),Gr(e)}function Vf(e,t){t===0&&(t=Ia()),e=Xa(e,t),e!==null&&(Je(e,t),Gr(e))}function sx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Vf(e,r)}function nx(e,t){var r=0;switch(e.tag){case 31:case 13:var n=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Vf(e,r)}function lx(e,t){return xt(e,t)}var ui=null,Xs=null,Mc=!1,di=!1,zc=!1,La=0;function Gr(e){e!==Xs&&e.next===null&&(Xs===null?ui=Xs=e:Xs=Xs.next=e),di=!0,Mc||(Mc=!0,ox())}function In(e,t){if(!zc&&di){zc=!0;do for(var r=!1,n=ui;n!==null;){if(e!==0){var c=n.pendingLanes;if(c===0)var d=0;else{var x=n.suspendedLanes,S=n.pingedLanes;d=(1<<31-St(42|e)+1)-1,d&=c&~(x&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(r=!0,Xf(n,d))}else d=Pe,d=Yr(n,n===nt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(d&3)===0||Ur(n,d)||(r=!0,Xf(n,d));n=n.next}while(r);zc=!1}}function ix(){$f()}function $f(){di=Mc=!1;var e=0;La!==0&&yx()&&(e=La);for(var t=lt(),r=null,n=ui;n!==null;){var c=n.next,d=Yf(n,t);d===0?(n.next=null,r===null?ui=c:r.next=c,c===null&&(Xs=r)):(r=n,(e!==0||(d&3)!==0)&&(di=!0)),n=c}At!==0&&At!==5||In(e),La!==0&&(La=0)}function Yf(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-St(d),S=1<<x,O=c[x];O===-1?((S&r)===0||(S&n)!==0)&&(c[x]=Fa(S,t)):O<=t&&(e.expiredLanes|=S),d&=~S}if(t=nt,r=Pe,r=Yr(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,r===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Se(n),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Ur(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(n!==null&&Se(n),Pr(r)){case 2:case 8:r=ke;break;case 32:r=Fe;break;case 268435456:r=Kt;break;default:r=Fe}return n=Jf.bind(null,e),r=xt(r,n),e.callbackPriority=t,e.callbackNode=r,t}return n!==null&&n!==null&&Se(n),e.callbackPriority=2,e.callbackNode=null,2}function Jf(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(ci()&&e.callbackNode!==r)return null;var n=Pe;return n=Yr(e,e===nt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Rf(e,n,t),Yf(e,lt()),e.callbackNode!=null&&e.callbackNode===r?Jf.bind(null,e):null)}function Xf(e,t){if(ci())return null;Rf(e,t,!0)}function ox(){bx(function(){($e&6)!==0?xt(le,ix):$f()})}function Oc(){if(La===0){var e=Ls;e===0&&(e=Tr,Tr<<=1,(Tr&261888)===0&&(Tr=256)),La=e}return La}function Qf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:vl(""+e)}function Zf(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function cx(e,t,r,n,c){if(t==="submit"&&r&&r.stateNode===c){var d=Qf((c[kt]||null).action),x=n.submitter;x&&(t=(t=x[kt]||null)?Qf(t.formAction):x.getAttribute("formAction"),t!==null&&(d=t,x=null));var S=new jl("action","action",null,n,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(La!==0){var O=x?Zf(c,x):new FormData(c);Wo(r,{pending:!0,data:O,method:c.method,action:d},null,O)}}else typeof d=="function"&&(S.preventDefault(),O=x?Zf(c,x):new FormData(c),Wo(r,{pending:!0,data:O,method:c.method,action:d},d,O))},currentTarget:c}]})}}for(var Dc=0;Dc<go.length;Dc++){var Lc=go[Dc],ux=Lc.toLowerCase(),dx=Lc[0].toUpperCase()+Lc.slice(1);Mr(ux,"on"+dx)}Mr(Ed,"onAnimationEnd"),Mr(Td,"onAnimationIteration"),Mr(Rd,"onAnimationStart"),Mr("dblclick","onDoubleClick"),Mr("focusin","onFocus"),Mr("focusout","onBlur"),Mr(A0,"onTransitionRun"),Mr(E0,"onTransitionStart"),Mr(T0,"onTransitionCancel"),Mr(Md,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),Va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Va("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Va("onBeforeInput",["compositionend","keypress","textInput","paste"]),Va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kn="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(" "),mx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kn));function Wf(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],c=n.event;n=n.listeners;e:{var d=void 0;if(t)for(var x=n.length-1;0<=x;x--){var S=n[x],O=S.instance,Q=S.currentTarget;if(S=S.listener,O!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=Q;try{d(c)}catch(ie){kl(ie)}c.currentTarget=null,d=O}else for(x=0;x<n.length;x++){if(S=n[x],O=S.instance,Q=S.currentTarget,S=S.listener,O!==d&&c.isPropagationStopped())break e;d=S,c.currentTarget=Q;try{d(c)}catch(ie){kl(ie)}c.currentTarget=null,d=O}}}}function Ue(e,t){var r=t[ge];r===void 0&&(r=t[ge]=new Set);var n=e+"__bubble";r.has(n)||(ep(t,e,2,!1),r.add(n))}function Uc(e,t,r){var n=0;t&&(n|=4),ep(r,e,n,t)}var mi="_reactListening"+Math.random().toString(36).slice(2);function Pc(e){if(!e[mi]){e[mi]=!0,Vu.forEach(function(r){r!=="selectionchange"&&(mx.has(r)||Uc(r,!1,e),Uc(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mi]||(t[mi]=!0,Uc("selectionchange",!1,t))}}function ep(e,t,r,n){switch(Tp(t)){case 2:var c=Hx;break;case 8:c=qx;break;default:c=Zc}r=c.bind(null,t,r,e),c=void 0,!ro||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),n?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function _c(e,t,r,n,c){var d=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var S=n.stateNode.containerInfo;if(S===c)break;if(x===4)for(x=n.return;x!==null;){var O=x.tag;if((O===3||O===4)&&x.stateNode.containerInfo===c)return;x=x.return}for(;S!==null;){if(x=sr(S),x===null)return;if(O=x.tag,O===5||O===6||O===26||O===27){n=d=x;continue e}S=S.parentNode}}n=n.return}sd(function(){var Q=d,ie=eo(r),ue=[];e:{var ee=zd.get(e);if(ee!==void 0){var ae=jl,xe=e;switch(e){case"keypress":if(Sl(r)===0)break e;case"keydown":case"keyup":ae=n0;break;case"focusin":xe="focus",ae=lo;break;case"focusout":xe="blur",ae=lo;break;case"beforeblur":case"afterblur":ae=lo;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=id;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=$g;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=o0;break;case Ed:case Td:case Rd:ae=Xg;break;case Md:ae=u0;break;case"scroll":case"scrollend":ae=Kg;break;case"wheel":ae=m0;break;case"copy":case"cut":case"paste":ae=Zg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=cd;break;case"toggle":case"beforetoggle":ae=p0}var Ae=(t&4)!==0,tt=!Ae&&(e==="scroll"||e==="scrollend"),V=Ae?ee!==null?ee+"Capture":null:ee;Ae=[];for(var H=Q,X;H!==null;){var ce=H;if(X=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||X===null||V===null||(ce=fn(H,V),ce!=null&&Ae.push(Vn(H,ce,X))),tt)break;H=H.return}0<Ae.length&&(ee=new ae(ee,xe,null,r,ie),ue.push({event:ee,listeners:Ae}))}}if((t&7)===0){e:{if(ee=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",ee&&r!==Wi&&(xe=r.relatedTarget||r.fromElement)&&(sr(xe)||xe[Gt]))break e;if((ae||ee)&&(ee=ie.window===ie?ie:(ee=ie.ownerDocument)?ee.defaultView||ee.parentWindow:window,ae?(xe=r.relatedTarget||r.toElement,ae=Q,xe=xe?sr(xe):null,xe!==null&&(tt=m(xe),Ae=xe.tag,xe!==tt||Ae!==5&&Ae!==27&&Ae!==6)&&(xe=null)):(ae=null,xe=Q),ae!==xe)){if(Ae=id,ce="onMouseLeave",V="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=cd,ce="onPointerLeave",V="onPointerEnter",H="pointer"),tt=ae==null?ee:yt(ae),X=xe==null?ee:yt(xe),ee=new Ae(ce,H+"leave",ae,r,ie),ee.target=tt,ee.relatedTarget=X,ce=null,sr(ie)===Q&&(Ae=new Ae(V,H+"enter",xe,r,ie),Ae.target=X,Ae.relatedTarget=tt,ce=Ae),tt=ce,ae&&xe)t:{for(Ae=fx,V=ae,H=xe,X=0,ce=V;ce;ce=Ae(ce))X++;ce=0;for(var Ce=H;Ce;Ce=Ae(Ce))ce++;for(;0<X-ce;)V=Ae(V),X--;for(;0<ce-X;)H=Ae(H),ce--;for(;X--;){if(V===H||H!==null&&V===H.alternate){Ae=V;break t}V=Ae(V),H=Ae(H)}Ae=null}else Ae=null;ae!==null&&tp(ue,ee,ae,Ae,!1),xe!==null&&tt!==null&&tp(ue,tt,xe,Ae,!0)}}e:{if(ee=Q?yt(Q):window,ae=ee.nodeName&&ee.nodeName.toLowerCase(),ae==="select"||ae==="input"&&ee.type==="file")var Ke=xd;else if(hd(ee))if(yd)Ke=N0;else{Ke=w0;var we=S0}else ae=ee.nodeName,!ae||ae.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?Q&&Zi(Q.elementType)&&(Ke=xd):Ke=j0;if(Ke&&(Ke=Ke(e,Q))){gd(ue,Ke,r,ie);break e}we&&we(e,ee,Q),e==="focusout"&&Q&&ee.type==="number"&&Q.memoizedProps.value!=null&&Qi(ee,"number",ee.value)}switch(we=Q?yt(Q):window,e){case"focusin":(hd(we)||we.contentEditable==="true")&&(As=we,fo=Q,Sn=null);break;case"focusout":Sn=fo=As=null;break;case"mousedown":po=!0;break;case"contextmenu":case"mouseup":case"dragend":po=!1,kd(ue,r,ie);break;case"selectionchange":if(k0)break;case"keydown":case"keyup":kd(ue,r,ie)}var Oe;if(oo)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else ks?fd(e,r)&&(_e="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(_e="onCompositionStart");_e&&(ud&&r.locale!=="ko"&&(ks||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&ks&&(Oe=nd()):(va=ie,ao="value"in va?va.value:va.textContent,ks=!0)),we=fi(Q,_e),0<we.length&&(_e=new od(_e,e,null,r,ie),ue.push({event:_e,listeners:we}),Oe?_e.data=Oe:(Oe=pd(r),Oe!==null&&(_e.data=Oe)))),(Oe=g0?x0(e,r):y0(e,r))&&(_e=fi(Q,"onBeforeInput"),0<_e.length&&(we=new od("onBeforeInput","beforeinput",null,r,ie),ue.push({event:we,listeners:_e}),we.data=Oe)),cx(ue,e,Q,r,ie)}Wf(ue,t)})}function Vn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function fi(e,t){for(var r=t+"Capture",n=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=fn(e,r),c!=null&&n.unshift(Vn(e,c,d)),c=fn(e,t),c!=null&&n.push(Vn(e,c,d))),e.tag===3)return n;e=e.return}return[]}function fx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tp(e,t,r,n,c){for(var d=t._reactName,x=[];r!==null&&r!==n;){var S=r,O=S.alternate,Q=S.stateNode;if(S=S.tag,O!==null&&O===n)break;S!==5&&S!==26&&S!==27||Q===null||(O=Q,c?(Q=fn(r,d),Q!=null&&x.unshift(Vn(r,Q,O))):c||(Q=fn(r,d),Q!=null&&x.push(Vn(r,Q,O)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var px=/\r\n?/g,hx=/\u0000|\uFFFD/g;function rp(e){return(typeof e=="string"?e:""+e).replace(px,`
|
|
49
|
-
`).replace(hx,"")}function ap(e,t){return t=rp(t),rp(e)===t}function et(e,t,r,n,c,d){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||js(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&js(e,""+n);break;case"className":xl(e,"class",n);break;case"tabIndex":xl(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":xl(e,r,n);break;case"style":rd(e,n,d);break;case"data":if(t!=="object"){xl(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=vl(""+n),e.setAttribute(r,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(r,"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 d=="function"&&(r==="formAction"?(t!=="input"&&et(e,t,"name",c.name,c,null),et(e,t,"formEncType",c.formEncType,c,null),et(e,t,"formMethod",c.formMethod,c,null),et(e,t,"formTarget",c.formTarget,c,null)):(et(e,t,"encType",c.encType,c,null),et(e,t,"method",c.method,c,null),et(e,t,"target",c.target,c,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=vl(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=Qr);break;case"onScroll":n!=null&&Ue("scroll",e);break;case"onScrollEnd":n!=null&&Ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(r=n.__html,r!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=vl(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""+n):e.removeAttribute(r);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":n===!0?e.setAttribute(r,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":Ue("beforetoggle",e),Ue("toggle",e),gl(e,"popover",n);break;case"xlinkActuate":Xr(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Xr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Xr(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Xr(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Xr(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Xr(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Xr(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Xr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Xr(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":gl(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Fg.get(r)||r,gl(e,r,n))}}function Bc(e,t,r,n,c,d){switch(r){case"style":rd(e,n,d);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(r=n.__html,r!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof n=="string"?js(e,n):(typeof n=="number"||typeof n=="bigint")&&js(e,""+n);break;case"onScroll":n!=null&&Ue("scroll",e);break;case"onScrollEnd":n!=null&&Ue("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$u.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(c=r.endsWith("Capture"),t=r.slice(2,c?r.length-7:void 0),d=e[kt]||null,d=d!=null?d[r]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof n=="function")){typeof d!="function"&&d!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,n,c);break e}r in e?e[r]=n:n===!0?e.setAttribute(r,""):gl(e,r,n)}}}function Bt(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",e),Ue("load",e);var n=!1,c=!1,d;for(d in r)if(r.hasOwnProperty(d)){var x=r[d];if(x!=null)switch(d){case"src":n=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:et(e,t,d,x,r,null)}}c&&et(e,t,"srcSet",r.srcSet,r,null),n&&et(e,t,"src",r.src,r,null);return;case"input":Ue("invalid",e);var S=d=x=c=null,O=null,Q=null;for(n in r)if(r.hasOwnProperty(n)){var ie=r[n];if(ie!=null)switch(n){case"name":c=ie;break;case"type":x=ie;break;case"checked":O=ie;break;case"defaultChecked":Q=ie;break;case"value":d=ie;break;case"defaultValue":S=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(o(137,t));break;default:et(e,t,n,ie,r,null)}}Zu(e,d,S,O,Q,x,c,!1);return;case"select":Ue("invalid",e),n=x=d=null;for(c in r)if(r.hasOwnProperty(c)&&(S=r[c],S!=null))switch(c){case"value":d=S;break;case"defaultValue":x=S;break;case"multiple":n=S;default:et(e,t,c,S,r,null)}t=d,r=x,e.multiple=!!n,t!=null?ws(e,!!n,t,!1):r!=null&&ws(e,!!n,r,!0);return;case"textarea":Ue("invalid",e),d=c=n=null;for(x in r)if(r.hasOwnProperty(x)&&(S=r[x],S!=null))switch(x){case"value":n=S;break;case"defaultValue":c=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(o(91));break;default:et(e,t,x,S,r,null)}ed(e,n,c,d);return;case"option":for(O in r)if(r.hasOwnProperty(O)&&(n=r[O],n!=null))switch(O){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:et(e,t,O,n,r,null)}return;case"dialog":Ue("beforetoggle",e),Ue("toggle",e),Ue("cancel",e),Ue("close",e);break;case"iframe":case"object":Ue("load",e);break;case"video":case"audio":for(n=0;n<Kn.length;n++)Ue(Kn[n],e);break;case"image":Ue("error",e),Ue("load",e);break;case"details":Ue("toggle",e);break;case"embed":case"source":case"link":Ue("error",e),Ue("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(Q in r)if(r.hasOwnProperty(Q)&&(n=r[Q],n!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:et(e,t,Q,n,r,null)}return;default:if(Zi(t)){for(ie in r)r.hasOwnProperty(ie)&&(n=r[ie],n!==void 0&&Bc(e,t,ie,n,r,void 0));return}}for(S in r)r.hasOwnProperty(S)&&(n=r[S],n!=null&&et(e,t,S,n,r,null))}function gx(e,t,r,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,x=null,S=null,O=null,Q=null,ie=null;for(ae in r){var ue=r[ae];if(r.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":O=ue;default:n.hasOwnProperty(ae)||et(e,t,ae,null,n,ue)}}for(var ee in n){var ae=n[ee];if(ue=r[ee],n.hasOwnProperty(ee)&&(ae!=null||ue!=null))switch(ee){case"type":d=ae;break;case"name":c=ae;break;case"checked":Q=ae;break;case"defaultChecked":ie=ae;break;case"value":x=ae;break;case"defaultValue":S=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==ue&&et(e,t,ee,ae,n,ue)}}Xi(e,x,S,O,Q,ie,d,c);return;case"select":ae=x=S=ee=null;for(d in r)if(O=r[d],r.hasOwnProperty(d)&&O!=null)switch(d){case"value":break;case"multiple":ae=O;default:n.hasOwnProperty(d)||et(e,t,d,null,n,O)}for(c in n)if(d=n[c],O=r[c],n.hasOwnProperty(c)&&(d!=null||O!=null))switch(c){case"value":ee=d;break;case"defaultValue":S=d;break;case"multiple":x=d;default:d!==O&&et(e,t,c,d,n,O)}t=S,r=x,n=ae,ee!=null?ws(e,!!r,ee,!1):!!n!=!!r&&(t!=null?ws(e,!!r,t,!0):ws(e,!!r,r?[]:"",!1));return;case"textarea":ae=ee=null;for(S in r)if(c=r[S],r.hasOwnProperty(S)&&c!=null&&!n.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:et(e,t,S,null,n,c)}for(x in n)if(c=n[x],d=r[x],n.hasOwnProperty(x)&&(c!=null||d!=null))switch(x){case"value":ee=c;break;case"defaultValue":ae=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&et(e,t,x,c,n,d)}Wu(e,ee,ae);return;case"option":for(var xe in r)if(ee=r[xe],r.hasOwnProperty(xe)&&ee!=null&&!n.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:et(e,t,xe,null,n,ee)}for(O in n)if(ee=n[O],ae=r[O],n.hasOwnProperty(O)&&ee!==ae&&(ee!=null||ae!=null))switch(O){case"selected":e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:et(e,t,O,ee,n,ae)}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 Ae in r)ee=r[Ae],r.hasOwnProperty(Ae)&&ee!=null&&!n.hasOwnProperty(Ae)&&et(e,t,Ae,null,n,ee);for(Q in n)if(ee=n[Q],ae=r[Q],n.hasOwnProperty(Q)&&ee!==ae&&(ee!=null||ae!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(o(137,t));break;default:et(e,t,Q,ee,n,ae)}return;default:if(Zi(t)){for(var tt in r)ee=r[tt],r.hasOwnProperty(tt)&&ee!==void 0&&!n.hasOwnProperty(tt)&&Bc(e,t,tt,void 0,n,ee);for(ie in n)ee=n[ie],ae=r[ie],!n.hasOwnProperty(ie)||ee===ae||ee===void 0&&ae===void 0||Bc(e,t,ie,ee,n,ae);return}}for(var V in r)ee=r[V],r.hasOwnProperty(V)&&ee!=null&&!n.hasOwnProperty(V)&&et(e,t,V,null,n,ee);for(ue in n)ee=n[ue],ae=r[ue],!n.hasOwnProperty(ue)||ee===ae||ee==null&&ae==null||et(e,t,ue,ee,n,ae)}function sp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),n=0;n<r.length;n++){var c=r[n],d=c.transferSize,x=c.initiatorType,S=c.duration;if(d&&S&&sp(x)){for(x=0,S=c.responseEnd,n+=1;n<r.length;n++){var O=r[n],Q=O.startTime;if(Q>S)break;var ie=O.transferSize,ue=O.initiatorType;ie&&sp(ue)&&(O=O.responseEnd,x+=ie*(O<S?1:(S-Q)/(O-Q)))}if(--n,t+=8*(d+x)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hc=null,qc=null;function pi(e){return e.nodeType===9?e:e.ownerDocument}function np(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 lp(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 Gc(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 Fc=null;function yx(){var e=window.event;return e&&e.type==="popstate"?e===Fc?!1:(Fc=e,!0):(Fc=null,!1)}var ip=typeof setTimeout=="function"?setTimeout:void 0,vx=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,bx=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(e){return op.resolve(null).then(e).catch(Sx)}:ip;function Sx(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function cp(e,t){var r=t,n=0;do{var c=r.nextSibling;if(e.removeChild(r),c&&c.nodeType===8)if(r=c.data,r==="/$"||r==="/&"){if(n===0){e.removeChild(c),en(t);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")$n(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,$n(r);for(var d=r.firstChild;d;){var x=d.nextSibling,S=d.nodeName;d[it]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||r.removeChild(d),d=x}}else r==="body"&&$n(e.ownerDocument.body);r=c}while(r);en(t)}function up(e,t){var r=e;e=0;do{var n=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=n}while(r)}function Ic(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Ic(r),_r(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function wx(e,t,r,n){for(;e.nodeType===1;){var c=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[it])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=jr(e.nextSibling),e===null)break}return null}function jx(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=jr(e.nextSibling),e===null))return null;return e}function dp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=jr(e.nextSibling),e===null))return null;return e}function Kc(e){return e.data==="$?"||e.data==="$~"}function Vc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Nx(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var n=function(){t(),r.removeEventListener("DOMContentLoaded",n)};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function jr(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 $c=null;function mp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return jr(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function fp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function pp(e,t,r){switch(t=pi(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function $n(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_r(e)}var Nr=new Map,hp=new Set;function hi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=L.d;L.d={f:Cx,r:kx,D:Ax,C:Ex,L:Tx,m:Rx,X:zx,S:Mx,M:Ox};function Cx(){var e=fa.f(),t=li();return e||t}function kx(e){var t=nr(e);t!==null&&t.tag===5&&t.type==="form"?Mm(t):fa.r(e)}var Qs=typeof document>"u"?null:document;function gp(e,t,r){var n=Qs;if(n&&typeof t=="string"&&t){var c=gr(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),hp.has(c)||(hp.add(c),e={rel:e,crossOrigin:r,href:t},n.querySelector(c)===null&&(t=n.createElement("link"),Bt(t,"link",e),pt(t),n.head.appendChild(t)))}}function Ax(e){fa.D(e),gp("dns-prefetch",e,null)}function Ex(e,t){fa.C(e,t),gp("preconnect",e,t)}function Tx(e,t,r){fa.L(e,t,r);var n=Qs;if(n&&e&&t){var c='link[rel="preload"][as="'+gr(t)+'"]';t==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+gr(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+gr(r.imageSizes)+'"]')):c+='[href="'+gr(e)+'"]';var d=c;switch(t){case"style":d=Zs(e);break;case"script":d=Ws(e)}Nr.has(d)||(e=v({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Nr.set(d,e),n.querySelector(c)!==null||t==="style"&&n.querySelector(Yn(d))||t==="script"&&n.querySelector(Jn(d))||(t=n.createElement("link"),Bt(t,"link",e),pt(t),n.head.appendChild(t)))}}function Rx(e,t){fa.m(e,t);var r=Qs;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+gr(n)+'"][href="'+gr(e)+'"]',d=c;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ws(e)}if(!Nr.has(d)&&(e=v({rel:"modulepreload",href:e},t),Nr.set(d,e),r.querySelector(c)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Jn(d)))return}n=r.createElement("link"),Bt(n,"link",e),pt(n),r.head.appendChild(n)}}}function Mx(e,t,r){fa.S(e,t,r);var n=Qs;if(n&&e){var c=Jr(n).hoistableStyles,d=Zs(e);t=t||"default";var x=c.get(d);if(!x){var S={loading:0,preload:null};if(x=n.querySelector(Yn(d)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Nr.get(d))&&Yc(e,r);var O=x=n.createElement("link");pt(O),Bt(O,"link",e),O._p=new Promise(function(Q,ie){O.onload=Q,O.onerror=ie}),O.addEventListener("load",function(){S.loading|=1}),O.addEventListener("error",function(){S.loading|=2}),S.loading|=4,gi(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:S},c.set(d,x)}}}function zx(e,t){fa.X(e,t);var r=Qs;if(r&&e){var n=Jr(r).hoistableScripts,c=Ws(e),d=n.get(c);d||(d=r.querySelector(Jn(c)),d||(e=v({src:e,async:!0},t),(t=Nr.get(c))&&Jc(e,t),d=r.createElement("script"),pt(d),Bt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(c,d))}}function Ox(e,t){fa.M(e,t);var r=Qs;if(r&&e){var n=Jr(r).hoistableScripts,c=Ws(e),d=n.get(c);d||(d=r.querySelector(Jn(c)),d||(e=v({src:e,async:!0,type:"module"},t),(t=Nr.get(c))&&Jc(e,t),d=r.createElement("script"),pt(d),Bt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(c,d))}}function xp(e,t,r,n){var c=(c=K.current)?hi(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Zs(r.href),r=Jr(c).hoistableStyles,n=r.get(t),n||(n={type:"style",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Zs(r.href);var d=Jr(c).hoistableStyles,x=d.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=c.querySelector(Yn(e)))&&!d._p&&(x.instance=d,x.state.loading=5),Nr.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Nr.set(e,r),d||Dx(c,e,r,x.state))),t&&n===null)throw Error(o(528,""));return x}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ws(r),r=Jr(c).hoistableScripts,n=r.get(t),n||(n={type:"script",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Zs(e){return'href="'+gr(e)+'"'}function Yn(e){return'link[rel="stylesheet"]['+e+"]"}function yp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Dx(e,t,r,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Bt(t,"link",r),pt(t),e.head.appendChild(t))}function Ws(e){return'[src="'+gr(e)+'"]'}function Jn(e){return"script[async]"+e}function vp(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+gr(r.href)+'"]');if(n)return t.instance=n,pt(n),n;var c=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),pt(n),Bt(n,"style",c),gi(n,r.precedence,e),t.instance=n;case"stylesheet":c=Zs(r.href);var d=e.querySelector(Yn(c));if(d)return t.state.loading|=4,t.instance=d,pt(d),d;n=yp(r),(c=Nr.get(c))&&Yc(n,c),d=(e.ownerDocument||e).createElement("link"),pt(d);var x=d;return x._p=new Promise(function(S,O){x.onload=S,x.onerror=O}),Bt(d,"link",n),t.state.loading|=4,gi(d,r.precedence,e),t.instance=d;case"script":return d=Ws(r.src),(c=e.querySelector(Jn(d)))?(t.instance=c,pt(c),c):(n=r,(c=Nr.get(d))&&(n=v({},r),Jc(n,c)),e=e.ownerDocument||e,c=e.createElement("script"),pt(c),Bt(c,"link",n),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,gi(n,r.precedence,e));return t.instance}function gi(e,t,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=n.length?n[n.length-1]:null,d=c,x=0;x<n.length;x++){var S=n[x];if(S.dataset.precedence===t)d=S;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xi=null;function bp(e,t,r){if(xi===null){var n=new Map,c=xi=new Map;c.set(r,n)}else c=xi,n=c.get(r),n||(n=new Map,c.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),c=0;c<r.length;c++){var d=r[c];if(!(d[it]||d[Ie]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var S=n.get(x);S?S.push(d):n.set(x,[d])}}return n}function Sp(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function Lx(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ux(e,t,r,n){if(r.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var c=Zs(n.href),d=t.querySelector(Yn(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=yi.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=d,pt(d);return}d=t.ownerDocument||t,n=yp(n),(c=Nr.get(c))&&Yc(n,c),d=d.createElement("link"),pt(d);var x=d;x._p=new Promise(function(S,O){x.onload=S,x.onerror=O}),Bt(d,"link",n),r.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=yi.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Xc=0;function Px(e,t){return e.stylesheets&&e.count===0&&bi(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&bi(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Xc===0&&(Xc=62500*xx());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&bi(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Xc?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(c)}}:null}function yi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var vi=null;function bi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vi=new Map,t.forEach(_x,e),vi=null,yi.call(e))}function _x(e,t){if(!(t.state.loading&4)){var r=vi.get(e);if(r)var n=r.get(null);else{r=new Map,vi.set(e,r);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var x=c[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),n=x)}n&&r.set(null,n)}c=t.instance,x=c.getAttribute("data-precedence"),d=r.get(x)||n,d===n&&r.set(null,c),r.set(x,c),this.count++,n=yi.bind(this),c.addEventListener("load",n),c.addEventListener("error",n),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Xn={$$typeof:w,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function Bx(e,t,r,n,c,d,x,S,O){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=ya(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ya(0),this.hiddenUpdates=ya(null),this.identifierPrefix=n,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function jp(e,t,r,n,c,d,x,S,O,Q,ie,ue){return e=new Bx(e,t,r,x,O,Q,ie,ue,S),t=1,d===!0&&(t|=24),d=ir(3,null,null,t),e.current=d,d.stateNode=e,t=To(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:r,cache:t},Oo(d),e}function Np(e){return e?(e=Rs,e):Rs}function Cp(e,t,r,n,c,d){c=Np(c),n.context===null?n.context=c:n.pendingContext=c,n=Ca(t),n.payload={element:r},d=d===void 0?null:d,d!==null&&(n.callback=d),r=ka(e,n,t),r!==null&&(rr(r,e,t),En(r,e,t))}function kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Qc(e,t){kp(e,t),(e=e.alternate)&&kp(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=Xa(e,67108864);t!==null&&rr(t,e,67108864),Qc(e,67108864)}}function Ep(e){if(e.tag===13||e.tag===31){var t=mr();t=Vt(t);var r=Xa(e,t);r!==null&&rr(r,e,t),Qc(e,t)}}var Si=!0;function Hx(e,t,r,n){var c=k.T;k.T=null;var d=L.p;try{L.p=2,Zc(e,t,r,n)}finally{L.p=d,k.T=c}}function qx(e,t,r,n){var c=k.T;k.T=null;var d=L.p;try{L.p=8,Zc(e,t,r,n)}finally{L.p=d,k.T=c}}function Zc(e,t,r,n){if(Si){var c=Wc(n);if(c===null)_c(e,t,n,wi,r),Rp(e,n);else if(Fx(c,e,t,r,n))n.stopPropagation();else if(Rp(e,n),t&4&&-1<Gx.indexOf(e)){for(;c!==null;){var d=nr(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=pr(d.pendingLanes);if(x!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var O=1<<31-St(x);S.entanglements[1]|=O,x&=~O}Gr(d),($e&6)===0&&(si=lt()+500,In(0))}}break;case 31:case 13:S=Xa(d,2),S!==null&&rr(S,d,2),li(),Qc(d,2)}if(d=Wc(n),d===null&&_c(e,t,n,wi,r),d===c)break;c=d}c!==null&&n.stopPropagation()}else _c(e,t,n,null,r)}}function Wc(e){return e=eo(e),eu(e)}var wi=null;function eu(e){if(wi=null,e=sr(e),e!==null){var t=m(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===31){if(e=p(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wi=e,null}function Tp(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(Ar()){case le:return 2;case ke:return 8;case Fe:case Jt:return 32;case Kt:return 268435456;default:return 32}default:return 32}}var tu=!1,Pa=null,_a=null,Ba=null,Qn=new Map,Zn=new Map,Ha=[],Gx="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 Rp(e,t){switch(e){case"focusin":case"focusout":Pa=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":Ba=null;break;case"pointerover":case"pointerout":Qn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zn.delete(t.pointerId)}}function Wn(e,t,r,n,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:d,targetContainers:[c]},t!==null&&(t=nr(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Fx(e,t,r,n,c){switch(t){case"focusin":return Pa=Wn(Pa,e,t,r,n,c),!0;case"dragenter":return _a=Wn(_a,e,t,r,n,c),!0;case"mouseover":return Ba=Wn(Ba,e,t,r,n,c),!0;case"pointerover":var d=c.pointerId;return Qn.set(d,Wn(Qn.get(d)||null,e,t,r,n,c)),!0;case"gotpointercapture":return d=c.pointerId,Zn.set(d,Wn(Zn.get(d)||null,e,t,r,n,c)),!0}return!1}function Mp(e){var t=sr(e.target);if(t!==null){var r=m(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,Xt(e.priority,function(){Ep(r)});return}}else if(t===31){if(t=p(r),t!==null){e.blockedOn=t,Xt(e.priority,function(){Ep(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ji(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Wc(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Wi=n,r.target.dispatchEvent(n),Wi=null}else return t=nr(r),t!==null&&Ap(t),e.blockedOn=r,!1;t.shift()}return!0}function zp(e,t,r){ji(e)&&r.delete(t)}function Ix(){tu=!1,Pa!==null&&ji(Pa)&&(Pa=null),_a!==null&&ji(_a)&&(_a=null),Ba!==null&&ji(Ba)&&(Ba=null),Qn.forEach(zp),Zn.forEach(zp)}function Ni(e,t){e.blockedOn===t&&(e.blockedOn=null,tu||(tu=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ix)))}var Ci=null;function Op(e){Ci!==e&&(Ci=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Ci===e&&(Ci=null);for(var t=0;t<e.length;t+=3){var r=e[t],n=e[t+1],c=e[t+2];if(typeof n!="function"){if(eu(n||r)===null)continue;break}var d=nr(r);d!==null&&(e.splice(t,3),t-=3,Wo(d,{pending:!0,data:c,method:r.method,action:n},n,c))}}))}function en(e){function t(O){return Ni(O,e)}Pa!==null&&Ni(Pa,e),_a!==null&&Ni(_a,e),Ba!==null&&Ni(Ba,e),Qn.forEach(t),Zn.forEach(t);for(var r=0;r<Ha.length;r++){var n=Ha[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ha.length&&(r=Ha[0],r.blockedOn===null);)Mp(r),r.blockedOn===null&&Ha.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var c=r[n],d=r[n+1],x=c[kt]||null;if(typeof d=="function")x||Op(r);else if(x){var S=null;if(d&&d.hasAttribute("formAction")){if(c=d,x=d[kt]||null)S=x.formAction;else if(eu(c)!==null)continue}else S=x.action;typeof S=="function"?r[n+1]=S:(r.splice(n,3),n-=3),Op(r)}}}function Dp(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return c=x})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),n||setTimeout(r,20)}function r(){if(!n&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function ru(e){this._internalRoot=e}ki.prototype.render=ru.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,n=mr();Cp(r,n,e,t,null,null)},ki.prototype.unmount=ru.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cp(e.current,2,null,e,null,null),li(),t[Gt]=null}};function ki(e){this._internalRoot=e}ki.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ka();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ha.length&&t!==0&&t<Ha[r].priority;r++);Ha.splice(r,0,e),r===0&&Mp(e)}};var Lp=l.version;if(Lp!=="19.2.0")throw Error(o(527,Lp,"19.2.0"));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Kx={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ai=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ai.isDisabled&&Ai.supportsFiber)try{Lr=Ai.inject(Kx),Mt=Ai}catch{}}return tl.createRoot=function(e,t){if(!u(e))throw Error(o(299));var r=!1,n="",c=qm,d=Gm,x=Fm;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=jp(e,1,!1,null,null,r,n,null,c,d,x,Dp),e[Gt]=t.current,Pc(e),new ru(t)},tl.hydrateRoot=function(e,t,r){if(!u(e))throw Error(o(299));var n=!1,c="",d=qm,x=Gm,S=Fm,O=null;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError),r.formState!==void 0&&(O=r.formState)),t=jp(e,1,!0,t,r??null,n,c,O,d,x,S,Dp),t.context=Np(null),r=t.current,n=mr(),n=Vt(n),c=Ca(n),c.callback=null,ka(r,c,n),r=n,t.current.lanes=r,Je(t,r),Gr(t),e[Gt]=t.current,Pc(e),new ki(t)},tl.version="19.2.0",tl}var Kp;function ty(){if(Kp)return nu.exports;Kp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(l){console.error(l)}}return s(),nu.exports=ey(),nu.exports}var ry=ty();const Vp=Eh(ry);/**
|
|
49
|
+
`).replace(hx,"")}function ap(e,t){return t=rp(t),rp(e)===t}function et(e,t,r,n,c,d){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||js(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&js(e,""+n);break;case"className":xl(e,"class",n);break;case"tabIndex":xl(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":xl(e,r,n);break;case"style":rd(e,n,d);break;case"data":if(t!=="object"){xl(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=vl(""+n),e.setAttribute(r,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(r,"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 d=="function"&&(r==="formAction"?(t!=="input"&&et(e,t,"name",c.name,c,null),et(e,t,"formEncType",c.formEncType,c,null),et(e,t,"formMethod",c.formMethod,c,null),et(e,t,"formTarget",c.formTarget,c,null)):(et(e,t,"encType",c.encType,c,null),et(e,t,"method",c.method,c,null),et(e,t,"target",c.target,c,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=vl(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=Qr);break;case"onScroll":n!=null&&Ue("scroll",e);break;case"onScrollEnd":n!=null&&Ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(r=n.__html,r!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=vl(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""+n):e.removeAttribute(r);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":n===!0?e.setAttribute(r,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":Ue("beforetoggle",e),Ue("toggle",e),gl(e,"popover",n);break;case"xlinkActuate":Xr(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Xr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Xr(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Xr(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Xr(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Xr(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Xr(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Xr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Xr(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":gl(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Fg.get(r)||r,gl(e,r,n))}}function Bc(e,t,r,n,c,d){switch(r){case"style":rd(e,n,d);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(r=n.__html,r!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof n=="string"?js(e,n):(typeof n=="number"||typeof n=="bigint")&&js(e,""+n);break;case"onScroll":n!=null&&Ue("scroll",e);break;case"onScrollEnd":n!=null&&Ue("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$u.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(c=r.endsWith("Capture"),t=r.slice(2,c?r.length-7:void 0),d=e[kt]||null,d=d!=null?d[r]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof n=="function")){typeof d!="function"&&d!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,n,c);break e}r in e?e[r]=n:n===!0?e.setAttribute(r,""):gl(e,r,n)}}}function Bt(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",e),Ue("load",e);var n=!1,c=!1,d;for(d in r)if(r.hasOwnProperty(d)){var x=r[d];if(x!=null)switch(d){case"src":n=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:et(e,t,d,x,r,null)}}c&&et(e,t,"srcSet",r.srcSet,r,null),n&&et(e,t,"src",r.src,r,null);return;case"input":Ue("invalid",e);var S=d=x=c=null,O=null,Q=null;for(n in r)if(r.hasOwnProperty(n)){var ie=r[n];if(ie!=null)switch(n){case"name":c=ie;break;case"type":x=ie;break;case"checked":O=ie;break;case"defaultChecked":Q=ie;break;case"value":d=ie;break;case"defaultValue":S=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(o(137,t));break;default:et(e,t,n,ie,r,null)}}Zu(e,d,S,O,Q,x,c,!1);return;case"select":Ue("invalid",e),n=x=d=null;for(c in r)if(r.hasOwnProperty(c)&&(S=r[c],S!=null))switch(c){case"value":d=S;break;case"defaultValue":x=S;break;case"multiple":n=S;default:et(e,t,c,S,r,null)}t=d,r=x,e.multiple=!!n,t!=null?ws(e,!!n,t,!1):r!=null&&ws(e,!!n,r,!0);return;case"textarea":Ue("invalid",e),d=c=n=null;for(x in r)if(r.hasOwnProperty(x)&&(S=r[x],S!=null))switch(x){case"value":n=S;break;case"defaultValue":c=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(o(91));break;default:et(e,t,x,S,r,null)}ed(e,n,c,d);return;case"option":for(O in r)if(r.hasOwnProperty(O)&&(n=r[O],n!=null))switch(O){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:et(e,t,O,n,r,null)}return;case"dialog":Ue("beforetoggle",e),Ue("toggle",e),Ue("cancel",e),Ue("close",e);break;case"iframe":case"object":Ue("load",e);break;case"video":case"audio":for(n=0;n<Kn.length;n++)Ue(Kn[n],e);break;case"image":Ue("error",e),Ue("load",e);break;case"details":Ue("toggle",e);break;case"embed":case"source":case"link":Ue("error",e),Ue("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(Q in r)if(r.hasOwnProperty(Q)&&(n=r[Q],n!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:et(e,t,Q,n,r,null)}return;default:if(Zi(t)){for(ie in r)r.hasOwnProperty(ie)&&(n=r[ie],n!==void 0&&Bc(e,t,ie,n,r,void 0));return}}for(S in r)r.hasOwnProperty(S)&&(n=r[S],n!=null&&et(e,t,S,n,r,null))}function gx(e,t,r,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,x=null,S=null,O=null,Q=null,ie=null;for(ae in r){var ue=r[ae];if(r.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":O=ue;default:n.hasOwnProperty(ae)||et(e,t,ae,null,n,ue)}}for(var ee in n){var ae=n[ee];if(ue=r[ee],n.hasOwnProperty(ee)&&(ae!=null||ue!=null))switch(ee){case"type":d=ae;break;case"name":c=ae;break;case"checked":Q=ae;break;case"defaultChecked":ie=ae;break;case"value":x=ae;break;case"defaultValue":S=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==ue&&et(e,t,ee,ae,n,ue)}}Xi(e,x,S,O,Q,ie,d,c);return;case"select":ae=x=S=ee=null;for(d in r)if(O=r[d],r.hasOwnProperty(d)&&O!=null)switch(d){case"value":break;case"multiple":ae=O;default:n.hasOwnProperty(d)||et(e,t,d,null,n,O)}for(c in n)if(d=n[c],O=r[c],n.hasOwnProperty(c)&&(d!=null||O!=null))switch(c){case"value":ee=d;break;case"defaultValue":S=d;break;case"multiple":x=d;default:d!==O&&et(e,t,c,d,n,O)}t=S,r=x,n=ae,ee!=null?ws(e,!!r,ee,!1):!!n!=!!r&&(t!=null?ws(e,!!r,t,!0):ws(e,!!r,r?[]:"",!1));return;case"textarea":ae=ee=null;for(S in r)if(c=r[S],r.hasOwnProperty(S)&&c!=null&&!n.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:et(e,t,S,null,n,c)}for(x in n)if(c=n[x],d=r[x],n.hasOwnProperty(x)&&(c!=null||d!=null))switch(x){case"value":ee=c;break;case"defaultValue":ae=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&et(e,t,x,c,n,d)}Wu(e,ee,ae);return;case"option":for(var xe in r)if(ee=r[xe],r.hasOwnProperty(xe)&&ee!=null&&!n.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:et(e,t,xe,null,n,ee)}for(O in n)if(ee=n[O],ae=r[O],n.hasOwnProperty(O)&&ee!==ae&&(ee!=null||ae!=null))switch(O){case"selected":e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:et(e,t,O,ee,n,ae)}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 Ae in r)ee=r[Ae],r.hasOwnProperty(Ae)&&ee!=null&&!n.hasOwnProperty(Ae)&&et(e,t,Ae,null,n,ee);for(Q in n)if(ee=n[Q],ae=r[Q],n.hasOwnProperty(Q)&&ee!==ae&&(ee!=null||ae!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(o(137,t));break;default:et(e,t,Q,ee,n,ae)}return;default:if(Zi(t)){for(var tt in r)ee=r[tt],r.hasOwnProperty(tt)&&ee!==void 0&&!n.hasOwnProperty(tt)&&Bc(e,t,tt,void 0,n,ee);for(ie in n)ee=n[ie],ae=r[ie],!n.hasOwnProperty(ie)||ee===ae||ee===void 0&&ae===void 0||Bc(e,t,ie,ee,n,ae);return}}for(var V in r)ee=r[V],r.hasOwnProperty(V)&&ee!=null&&!n.hasOwnProperty(V)&&et(e,t,V,null,n,ee);for(ue in n)ee=n[ue],ae=r[ue],!n.hasOwnProperty(ue)||ee===ae||ee==null&&ae==null||et(e,t,ue,ee,n,ae)}function sp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),n=0;n<r.length;n++){var c=r[n],d=c.transferSize,x=c.initiatorType,S=c.duration;if(d&&S&&sp(x)){for(x=0,S=c.responseEnd,n+=1;n<r.length;n++){var O=r[n],Q=O.startTime;if(Q>S)break;var ie=O.transferSize,ue=O.initiatorType;ie&&sp(ue)&&(O=O.responseEnd,x+=ie*(O<S?1:(S-Q)/(O-Q)))}if(--n,t+=8*(d+x)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hc=null,qc=null;function pi(e){return e.nodeType===9?e:e.ownerDocument}function np(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 lp(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 Gc(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 Fc=null;function yx(){var e=window.event;return e&&e.type==="popstate"?e===Fc?!1:(Fc=e,!0):(Fc=null,!1)}var ip=typeof setTimeout=="function"?setTimeout:void 0,vx=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,bx=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(e){return op.resolve(null).then(e).catch(Sx)}:ip;function Sx(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function cp(e,t){var r=t,n=0;do{var c=r.nextSibling;if(e.removeChild(r),c&&c.nodeType===8)if(r=c.data,r==="/$"||r==="/&"){if(n===0){e.removeChild(c),en(t);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")$n(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,$n(r);for(var d=r.firstChild;d;){var x=d.nextSibling,S=d.nodeName;d[it]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||r.removeChild(d),d=x}}else r==="body"&&$n(e.ownerDocument.body);r=c}while(r);en(t)}function up(e,t){var r=e;e=0;do{var n=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=n}while(r)}function Ic(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Ic(r),_r(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function wx(e,t,r,n){for(;e.nodeType===1;){var c=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[it])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=jr(e.nextSibling),e===null)break}return null}function jx(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=jr(e.nextSibling),e===null))return null;return e}function dp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=jr(e.nextSibling),e===null))return null;return e}function Kc(e){return e.data==="$?"||e.data==="$~"}function Vc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Nx(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var n=function(){t(),r.removeEventListener("DOMContentLoaded",n)};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function jr(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 $c=null;function mp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return jr(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function fp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function pp(e,t,r){switch(t=pi(r),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function $n(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_r(e)}var Nr=new Map,hp=new Set;function hi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=L.d;L.d={f:Cx,r:kx,D:Ax,C:Ex,L:Tx,m:Rx,X:zx,S:Mx,M:Ox};function Cx(){var e=fa.f(),t=li();return e||t}function kx(e){var t=nr(e);t!==null&&t.tag===5&&t.type==="form"?Mm(t):fa.r(e)}var Qs=typeof document>"u"?null:document;function gp(e,t,r){var n=Qs;if(n&&typeof t=="string"&&t){var c=gr(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof r=="string"&&(c+='[crossorigin="'+r+'"]'),hp.has(c)||(hp.add(c),e={rel:e,crossOrigin:r,href:t},n.querySelector(c)===null&&(t=n.createElement("link"),Bt(t,"link",e),pt(t),n.head.appendChild(t)))}}function Ax(e){fa.D(e),gp("dns-prefetch",e,null)}function Ex(e,t){fa.C(e,t),gp("preconnect",e,t)}function Tx(e,t,r){fa.L(e,t,r);var n=Qs;if(n&&e&&t){var c='link[rel="preload"][as="'+gr(t)+'"]';t==="image"&&r&&r.imageSrcSet?(c+='[imagesrcset="'+gr(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(c+='[imagesizes="'+gr(r.imageSizes)+'"]')):c+='[href="'+gr(e)+'"]';var d=c;switch(t){case"style":d=Zs(e);break;case"script":d=Ws(e)}Nr.has(d)||(e=v({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Nr.set(d,e),n.querySelector(c)!==null||t==="style"&&n.querySelector(Yn(d))||t==="script"&&n.querySelector(Jn(d))||(t=n.createElement("link"),Bt(t,"link",e),pt(t),n.head.appendChild(t)))}}function Rx(e,t){fa.m(e,t);var r=Qs;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+gr(n)+'"][href="'+gr(e)+'"]',d=c;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ws(e)}if(!Nr.has(d)&&(e=v({rel:"modulepreload",href:e},t),Nr.set(d,e),r.querySelector(c)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Jn(d)))return}n=r.createElement("link"),Bt(n,"link",e),pt(n),r.head.appendChild(n)}}}function Mx(e,t,r){fa.S(e,t,r);var n=Qs;if(n&&e){var c=Jr(n).hoistableStyles,d=Zs(e);t=t||"default";var x=c.get(d);if(!x){var S={loading:0,preload:null};if(x=n.querySelector(Yn(d)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Nr.get(d))&&Yc(e,r);var O=x=n.createElement("link");pt(O),Bt(O,"link",e),O._p=new Promise(function(Q,ie){O.onload=Q,O.onerror=ie}),O.addEventListener("load",function(){S.loading|=1}),O.addEventListener("error",function(){S.loading|=2}),S.loading|=4,gi(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:S},c.set(d,x)}}}function zx(e,t){fa.X(e,t);var r=Qs;if(r&&e){var n=Jr(r).hoistableScripts,c=Ws(e),d=n.get(c);d||(d=r.querySelector(Jn(c)),d||(e=v({src:e,async:!0},t),(t=Nr.get(c))&&Jc(e,t),d=r.createElement("script"),pt(d),Bt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(c,d))}}function Ox(e,t){fa.M(e,t);var r=Qs;if(r&&e){var n=Jr(r).hoistableScripts,c=Ws(e),d=n.get(c);d||(d=r.querySelector(Jn(c)),d||(e=v({src:e,async:!0,type:"module"},t),(t=Nr.get(c))&&Jc(e,t),d=r.createElement("script"),pt(d),Bt(d,"link",e),r.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(c,d))}}function xp(e,t,r,n){var c=(c=K.current)?hi(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Zs(r.href),r=Jr(c).hoistableStyles,n=r.get(t),n||(n={type:"style",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Zs(r.href);var d=Jr(c).hoistableStyles,x=d.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=c.querySelector(Yn(e)))&&!d._p&&(x.instance=d,x.state.loading=5),Nr.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Nr.set(e,r),d||Dx(c,e,r,x.state))),t&&n===null)throw Error(o(528,""));return x}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ws(r),r=Jr(c).hoistableScripts,n=r.get(t),n||(n={type:"script",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Zs(e){return'href="'+gr(e)+'"'}function Yn(e){return'link[rel="stylesheet"]['+e+"]"}function yp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Dx(e,t,r,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Bt(t,"link",r),pt(t),e.head.appendChild(t))}function Ws(e){return'[src="'+gr(e)+'"]'}function Jn(e){return"script[async]"+e}function vp(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+gr(r.href)+'"]');if(n)return t.instance=n,pt(n),n;var c=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),pt(n),Bt(n,"style",c),gi(n,r.precedence,e),t.instance=n;case"stylesheet":c=Zs(r.href);var d=e.querySelector(Yn(c));if(d)return t.state.loading|=4,t.instance=d,pt(d),d;n=yp(r),(c=Nr.get(c))&&Yc(n,c),d=(e.ownerDocument||e).createElement("link"),pt(d);var x=d;return x._p=new Promise(function(S,O){x.onload=S,x.onerror=O}),Bt(d,"link",n),t.state.loading|=4,gi(d,r.precedence,e),t.instance=d;case"script":return d=Ws(r.src),(c=e.querySelector(Jn(d)))?(t.instance=c,pt(c),c):(n=r,(c=Nr.get(d))&&(n=v({},r),Jc(n,c)),e=e.ownerDocument||e,c=e.createElement("script"),pt(c),Bt(c,"link",n),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,gi(n,r.precedence,e));return t.instance}function gi(e,t,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=n.length?n[n.length-1]:null,d=c,x=0;x<n.length;x++){var S=n[x];if(S.dataset.precedence===t)d=S;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xi=null;function bp(e,t,r){if(xi===null){var n=new Map,c=xi=new Map;c.set(r,n)}else c=xi,n=c.get(r),n||(n=new Map,c.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),c=0;c<r.length;c++){var d=r[c];if(!(d[it]||d[Ie]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var S=n.get(x);S?S.push(d):n.set(x,[d])}}return n}function Sp(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function Lx(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ux(e,t,r,n){if(r.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var c=Zs(n.href),d=t.querySelector(Yn(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=yi.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=d,pt(d);return}d=t.ownerDocument||t,n=yp(n),(c=Nr.get(c))&&Yc(n,c),d=d.createElement("link"),pt(d);var x=d;x._p=new Promise(function(S,O){x.onload=S,x.onerror=O}),Bt(d,"link",n),r.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=yi.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Xc=0;function Px(e,t){return e.stylesheets&&e.count===0&&bi(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&bi(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Xc===0&&(Xc=62500*xx());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&bi(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Xc?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(c)}}:null}function yi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var vi=null;function bi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vi=new Map,t.forEach(_x,e),vi=null,yi.call(e))}function _x(e,t){if(!(t.state.loading&4)){var r=vi.get(e);if(r)var n=r.get(null);else{r=new Map,vi.set(e,r);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var x=c[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),n=x)}n&&r.set(null,n)}c=t.instance,x=c.getAttribute("data-precedence"),d=r.get(x)||n,d===n&&r.set(null,c),r.set(x,c),this.count++,n=yi.bind(this),c.addEventListener("load",n),c.addEventListener("error",n),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Xn={$$typeof:w,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function Bx(e,t,r,n,c,d,x,S,O){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=ya(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ya(0),this.hiddenUpdates=ya(null),this.identifierPrefix=n,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function jp(e,t,r,n,c,d,x,S,O,Q,ie,ue){return e=new Bx(e,t,r,x,O,Q,ie,ue,S),t=1,d===!0&&(t|=24),d=ir(3,null,null,t),e.current=d,d.stateNode=e,t=To(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:r,cache:t},Oo(d),e}function Np(e){return e?(e=Rs,e):Rs}function Cp(e,t,r,n,c,d){c=Np(c),n.context===null?n.context=c:n.pendingContext=c,n=Ca(t),n.payload={element:r},d=d===void 0?null:d,d!==null&&(n.callback=d),r=ka(e,n,t),r!==null&&(rr(r,e,t),En(r,e,t))}function kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Qc(e,t){kp(e,t),(e=e.alternate)&&kp(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=Xa(e,67108864);t!==null&&rr(t,e,67108864),Qc(e,67108864)}}function Ep(e){if(e.tag===13||e.tag===31){var t=mr();t=Vt(t);var r=Xa(e,t);r!==null&&rr(r,e,t),Qc(e,t)}}var Si=!0;function Hx(e,t,r,n){var c=k.T;k.T=null;var d=L.p;try{L.p=2,Zc(e,t,r,n)}finally{L.p=d,k.T=c}}function qx(e,t,r,n){var c=k.T;k.T=null;var d=L.p;try{L.p=8,Zc(e,t,r,n)}finally{L.p=d,k.T=c}}function Zc(e,t,r,n){if(Si){var c=Wc(n);if(c===null)_c(e,t,n,wi,r),Rp(e,n);else if(Fx(c,e,t,r,n))n.stopPropagation();else if(Rp(e,n),t&4&&-1<Gx.indexOf(e)){for(;c!==null;){var d=nr(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=pr(d.pendingLanes);if(x!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var O=1<<31-St(x);S.entanglements[1]|=O,x&=~O}Gr(d),($e&6)===0&&(si=lt()+500,In(0))}}break;case 31:case 13:S=Xa(d,2),S!==null&&rr(S,d,2),li(),Qc(d,2)}if(d=Wc(n),d===null&&_c(e,t,n,wi,r),d===c)break;c=d}c!==null&&n.stopPropagation()}else _c(e,t,n,null,r)}}function Wc(e){return e=eo(e),eu(e)}var wi=null;function eu(e){if(wi=null,e=sr(e),e!==null){var t=m(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===31){if(e=p(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wi=e,null}function Tp(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(Ar()){case le:return 2;case ke:return 8;case Fe:case Jt:return 32;case Kt:return 268435456;default:return 32}default:return 32}}var tu=!1,Pa=null,_a=null,Ba=null,Qn=new Map,Zn=new Map,Ha=[],Gx="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 Rp(e,t){switch(e){case"focusin":case"focusout":Pa=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":Ba=null;break;case"pointerover":case"pointerout":Qn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zn.delete(t.pointerId)}}function Wn(e,t,r,n,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:d,targetContainers:[c]},t!==null&&(t=nr(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Fx(e,t,r,n,c){switch(t){case"focusin":return Pa=Wn(Pa,e,t,r,n,c),!0;case"dragenter":return _a=Wn(_a,e,t,r,n,c),!0;case"mouseover":return Ba=Wn(Ba,e,t,r,n,c),!0;case"pointerover":var d=c.pointerId;return Qn.set(d,Wn(Qn.get(d)||null,e,t,r,n,c)),!0;case"gotpointercapture":return d=c.pointerId,Zn.set(d,Wn(Zn.get(d)||null,e,t,r,n,c)),!0}return!1}function Mp(e){var t=sr(e.target);if(t!==null){var r=m(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,Xt(e.priority,function(){Ep(r)});return}}else if(t===31){if(t=p(r),t!==null){e.blockedOn=t,Xt(e.priority,function(){Ep(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ji(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Wc(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Wi=n,r.target.dispatchEvent(n),Wi=null}else return t=nr(r),t!==null&&Ap(t),e.blockedOn=r,!1;t.shift()}return!0}function zp(e,t,r){ji(e)&&r.delete(t)}function Ix(){tu=!1,Pa!==null&&ji(Pa)&&(Pa=null),_a!==null&&ji(_a)&&(_a=null),Ba!==null&&ji(Ba)&&(Ba=null),Qn.forEach(zp),Zn.forEach(zp)}function Ni(e,t){e.blockedOn===t&&(e.blockedOn=null,tu||(tu=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ix)))}var Ci=null;function Op(e){Ci!==e&&(Ci=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Ci===e&&(Ci=null);for(var t=0;t<e.length;t+=3){var r=e[t],n=e[t+1],c=e[t+2];if(typeof n!="function"){if(eu(n||r)===null)continue;break}var d=nr(r);d!==null&&(e.splice(t,3),t-=3,Wo(d,{pending:!0,data:c,method:r.method,action:n},n,c))}}))}function en(e){function t(O){return Ni(O,e)}Pa!==null&&Ni(Pa,e),_a!==null&&Ni(_a,e),Ba!==null&&Ni(Ba,e),Qn.forEach(t),Zn.forEach(t);for(var r=0;r<Ha.length;r++){var n=Ha[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ha.length&&(r=Ha[0],r.blockedOn===null);)Mp(r),r.blockedOn===null&&Ha.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var c=r[n],d=r[n+1],x=c[kt]||null;if(typeof d=="function")x||Op(r);else if(x){var S=null;if(d&&d.hasAttribute("formAction")){if(c=d,x=d[kt]||null)S=x.formAction;else if(eu(c)!==null)continue}else S=x.action;typeof S=="function"?r[n+1]=S:(r.splice(n,3),n-=3),Op(r)}}}function Dp(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return c=x})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),n||setTimeout(r,20)}function r(){if(!n&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function ru(e){this._internalRoot=e}ki.prototype.render=ru.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,n=mr();Cp(r,n,e,t,null,null)},ki.prototype.unmount=ru.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cp(e.current,2,null,e,null,null),li(),t[Gt]=null}};function ki(e){this._internalRoot=e}ki.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ka();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ha.length&&t!==0&&t<Ha[r].priority;r++);Ha.splice(r,0,e),r===0&&Mp(e)}};var Lp=l.version;if(Lp!=="19.2.1")throw Error(o(527,Lp,"19.2.1"));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Kx={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ai=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ai.isDisabled&&Ai.supportsFiber)try{Lr=Ai.inject(Kx),Mt=Ai}catch{}}return tl.createRoot=function(e,t){if(!u(e))throw Error(o(299));var r=!1,n="",c=qm,d=Gm,x=Fm;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=jp(e,1,!1,null,null,r,n,null,c,d,x,Dp),e[Gt]=t.current,Pc(e),new ru(t)},tl.hydrateRoot=function(e,t,r){if(!u(e))throw Error(o(299));var n=!1,c="",d=qm,x=Gm,S=Fm,O=null;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError),r.formState!==void 0&&(O=r.formState)),t=jp(e,1,!0,t,r??null,n,c,O,d,x,S,Dp),t.context=Np(null),r=t.current,n=mr(),n=Vt(n),c=Ca(n),c.callback=null,ka(r,c,n),r=n,t.current.lanes=r,Je(t,r),Gr(t),e[Gt]=t.current,Pc(e),new ki(t)},tl.version="19.2.1",tl}var Kp;function ty(){if(Kp)return nu.exports;Kp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(l){console.error(l)}}return s(),nu.exports=ey(),nu.exports}var ry=ty();const Vp=Eh(ry);/**
|
|
50
50
|
* react-router v7.8.2
|
|
51
51
|
*
|
|
52
52
|
* Copyright (c) Remix Software Inc.
|
|
@@ -192,8 +192,8 @@ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}
|
|
|
192
192
|
*
|
|
193
193
|
* This source code is licensed under the ISC license.
|
|
194
194
|
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const Hb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cl=mt("x",Hb);function ng(s){var l,i,o="";if(typeof s=="string"||typeof s=="number")o+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(l=0;l<u;l++)s[l]&&(i=ng(s[l]))&&(o&&(o+=" "),o+=i)}else for(i in s)s[i]&&(o&&(o+=" "),o+=i);return o}function qb(){for(var s,l,i=0,o="",u=arguments.length;i<u;i++)(s=arguments[i])&&(l=ng(s))&&(o&&(o+=" "),o+=l);return o}const Gu="-",Gb=s=>{const l=Ib(s),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=s;return{getClassGroupId:f=>{const p=f.split(Gu);return p[0]===""&&p.length!==1&&p.shift(),lg(p,l)||Fb(f)},getConflictingClassGroupIds:(f,p)=>{const g=i[f]||[];return p&&o[f]?[...g,...o[f]]:g}}},lg=(s,l)=>{var f;if(s.length===0)return l.classGroupId;const i=s[0],o=l.nextPart.get(i),u=o?lg(s.slice(1),o):void 0;if(u)return u;if(l.validators.length===0)return;const m=s.join(Gu);return(f=l.validators.find(({validator:p})=>p(m)))==null?void 0:f.classGroupId},th=/^\[(.+)\]$/,Fb=s=>{if(th.test(s)){const l=th.exec(s)[1],i=l==null?void 0:l.substring(0,l.indexOf(":"));if(i)return"arbitrary.."+i}},Ib=s=>{const{theme:l,classGroups:i}=s,o={nextPart:new Map,validators:[]};for(const u in i)wu(i[u],o,u,l);return o},wu=(s,l,i,o)=>{s.forEach(u=>{if(typeof u=="string"){const m=u===""?l:rh(l,u);m.classGroupId=i;return}if(typeof u=="function"){if(Kb(u)){wu(u(o),l,i,o);return}l.validators.push({validator:u,classGroupId:i});return}Object.entries(u).forEach(([m,f])=>{wu(f,rh(l,m),i,o)})})},rh=(s,l)=>{let i=s;return l.split(Gu).forEach(o=>{i.nextPart.has(o)||i.nextPart.set(o,{nextPart:new Map,validators:[]}),i=i.nextPart.get(o)}),i},Kb=s=>s.isThemeGetter,Vb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let l=0,i=new Map,o=new Map;const u=(m,f)=>{i.set(m,f),l++,l>s&&(l=0,o=i,i=new Map)};return{get(m){let f=i.get(m);if(f!==void 0)return f;if((f=o.get(m))!==void 0)return u(m,f),f},set(m,f){i.has(m)?i.set(m,f):u(m,f)}}},ju="!",Nu=":",$b=Nu.length,Yb=s=>{const{prefix:l,experimentalParseClassName:i}=s;let o=u=>{const m=[];let f=0,p=0,g=0,h;for(let C=0;C<u.length;C++){let T=u[C];if(f===0&&p===0){if(T===Nu){m.push(u.slice(g,C)),g=C+$b;continue}if(T==="/"){h=C;continue}}T==="["?f++:T==="]"?f--:T==="("?p++:T===")"&&p--}const b=m.length===0?u:u.substring(g),v=Jb(b),A=v!==b,R=h&&h>g?h-g:void 0;return{modifiers:m,hasImportantModifier:A,baseClassName:v,maybePostfixModifierPosition:R}};if(l){const u=l+Nu,m=o;o=f=>f.startsWith(u)?m(f.substring(u.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(i){const u=o;o=m=>i({className:m,parseClassName:u})}return o},Jb=s=>s.endsWith(ju)?s.substring(0,s.length-1):s.startsWith(ju)?s.substring(1):s,Xb=s=>{const l=Object.fromEntries(s.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const u=[];let m=[];return o.forEach(f=>{f[0]==="["||l[f]?(u.push(...m.sort(),f),m=[]):m.push(f)}),u.push(...m.sort()),u}},Qb=s=>({cache:Vb(s.cacheSize),parseClassName:Yb(s),sortModifiers:Xb(s),...Gb(s)}),Zb=/\s+/,Wb=(s,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:m}=l,f=[],p=s.trim().split(Zb);let g="";for(let h=p.length-1;h>=0;h-=1){const b=p[h],{isExternal:v,modifiers:A,hasImportantModifier:R,baseClassName:C,maybePostfixModifierPosition:T}=i(b);if(v){g=b+(g.length>0?" "+g:g);continue}let M=!!T,E=o(M?C.substring(0,T):C);if(!E){if(!M){g=b+(g.length>0?" "+g:g);continue}if(E=o(C),!E){g=b+(g.length>0?" "+g:g);continue}M=!1}const j=m(A).join(":"),w=R?j+ju:j,P=w+E;if(f.includes(P))continue;f.push(P);const re=u(E,M);for(let B=0;B<re.length;++B){const Z=re[B];f.push(w+Z)}g=b+(g.length>0?" "+g:g)}return g};function e1(){let s=0,l,i,o="";for(;s<arguments.length;)(l=arguments[s++])&&(i=ig(l))&&(o&&(o+=" "),o+=i);return o}const ig=s=>{if(typeof s=="string")return s;let l,i="";for(let o=0;o<s.length;o++)s[o]&&(l=ig(s[o]))&&(i&&(i+=" "),i+=l);return i};function t1(s,...l){let i,o,u,m=f;function f(g){const h=l.reduce((b,v)=>v(b),s());return i=Qb(h),o=i.cache.get,u=i.cache.set,m=p,p(g)}function p(g){const h=o(g);if(h)return h;const b=Wb(g,i);return u(g,b),b}return function(){return m(e1.apply(null,arguments))}}const Et=s=>{const l=i=>i[s]||[];return l.isThemeGetter=!0,l},og=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r1=/^\d+\/\d+$/,a1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s1=/\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$/,n1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,i1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tn=s=>r1.test(s),De=s=>!!s&&!Number.isNaN(Number(s)),Ga=s=>!!s&&Number.isInteger(Number(s)),du=s=>s.endsWith("%")&&De(s.slice(0,-1)),pa=s=>a1.test(s),o1=()=>!0,c1=s=>s1.test(s)&&!n1.test(s),ug=()=>!1,u1=s=>l1.test(s),d1=s=>i1.test(s),m1=s=>!ve(s)&&!be(s),f1=s=>dn(s,fg,ug),ve=s=>og.test(s),cs=s=>dn(s,pg,c1),mu=s=>dn(s,y1,De),ah=s=>dn(s,dg,ug),p1=s=>dn(s,mg,d1),Ti=s=>dn(s,hg,u1),be=s=>cg.test(s),al=s=>mn(s,pg),h1=s=>mn(s,v1),sh=s=>mn(s,dg),g1=s=>mn(s,fg),x1=s=>mn(s,mg),Ri=s=>mn(s,hg,!0),dn=(s,l,i)=>{const o=og.exec(s);return o?o[1]?l(o[1]):i(o[2]):!1},mn=(s,l,i=!1)=>{const o=cg.exec(s);return o?o[1]?l(o[1]):i:!1},dg=s=>s==="position"||s==="percentage",mg=s=>s==="image"||s==="url",fg=s=>s==="length"||s==="size"||s==="bg-size",pg=s=>s==="length",y1=s=>s==="number",v1=s=>s==="family-name",hg=s=>s==="shadow",b1=()=>{const s=Et("color"),l=Et("font"),i=Et("text"),o=Et("font-weight"),u=Et("tracking"),m=Et("leading"),f=Et("breakpoint"),p=Et("container"),g=Et("spacing"),h=Et("radius"),b=Et("shadow"),v=Et("inset-shadow"),A=Et("text-shadow"),R=Et("drop-shadow"),C=Et("blur"),T=Et("perspective"),M=Et("aspect"),E=Et("ease"),j=Et("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],re=()=>[...P(),be,ve],B=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],J=()=>[be,ve,g],se=()=>[tn,"full","auto",...J()],me=()=>[Ga,"none","subgrid",be,ve],F=()=>["auto",{span:["full",Ga,be,ve]},Ga,be,ve],z=()=>[Ga,"auto",be,ve],Y=()=>["auto","min","max","fr",be,ve],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...J()],L=()=>[tn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...J()],D=()=>[s,be,ve],W=()=>[...P(),sh,ah,{position:[be,ve]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",g1,f1,{size:[be,ve]}],_=()=>[du,al,cs],q=()=>["","none","full",h,be,ve],U=()=>["",De,al,cs],te=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[De,du,sh,ah],fe=()=>["","none",C,be,ve],pe=()=>["none",De,be,ve],Ne=()=>["none",De,be,ve],ye=()=>[De,be,ve],Me=()=>[tn,"full",...J()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pa],breakpoint:[pa],color:[o1],container:[pa],"drop-shadow":[pa],ease:["in","out","in-out"],font:[m1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pa],shadow:[pa],spacing:["px",De],text:[pa],"text-shadow":[pa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tn,ve,be,M]}],container:["container"],columns:[{columns:[De,ve,be,p]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:re()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:se()}],"inset-x":[{"inset-x":se()}],"inset-y":[{"inset-y":se()}],start:[{start:se()}],end:[{end:se()}],top:[{top:se()}],right:[{right:se()}],bottom:[{bottom:se()}],left:[{left:se()}],visibility:["visible","invisible","collapse"],z:[{z:[Ga,"auto",be,ve]}],basis:[{basis:[tn,"full","auto",p,...J()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,tn,"auto","initial","none",ve]}],grow:[{grow:["",De,be,ve]}],shrink:[{shrink:["",De,be,ve]}],order:[{order:[Ga,"first","last","none",be,ve]}],"grid-cols":[{"grid-cols":me()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":me()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:J()}],"gap-x":[{"gap-x":J()}],"gap-y":[{"gap-y":J()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:J()}],px:[{px:J()}],py:[{py:J()}],ps:[{ps:J()}],pe:[{pe:J()}],pt:[{pt:J()}],pr:[{pr:J()}],pb:[{pb:J()}],pl:[{pl:J()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":J()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":J()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[p,"screen",...L()]}],"min-w":[{"min-w":[p,"screen","none",...L()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[f]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",i,al,cs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,be,mu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",du,ve]}],"font-family":[{font:[h1,ve,l]}],"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:[u,be,ve]}],"line-clamp":[{"line-clamp":[De,"none",be,mu]}],leading:[{leading:[m,...J()]}],"list-image":[{"list-image":["none",be,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",be,cs]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[De,"auto",be,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ve]}],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",be,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ga,be,ve],radial:["",be,ve],conic:[Ga,be,ve]},x1,p1]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],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:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,be,ve]}],"outline-w":[{outline:["",De,al,cs]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",b,Ri,Ti]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",v,Ri,Ti]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[De,cs]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",A,Ri,Ti]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[De,be,ve]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[be,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ve]}],filter:[{filter:["","none",be,ve]}],blur:[{blur:fe()}],brightness:[{brightness:[De,be,ve]}],contrast:[{contrast:[De,be,ve]}],"drop-shadow":[{"drop-shadow":["","none",R,Ri,Ti]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",De,be,ve]}],"hue-rotate":[{"hue-rotate":[De,be,ve]}],invert:[{invert:["",De,be,ve]}],saturate:[{saturate:[De,be,ve]}],sepia:[{sepia:["",De,be,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ve]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[De,be,ve]}],"backdrop-contrast":[{"backdrop-contrast":[De,be,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,be,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,be,ve]}],"backdrop-invert":[{"backdrop-invert":["",De,be,ve]}],"backdrop-opacity":[{"backdrop-opacity":[De,be,ve]}],"backdrop-saturate":[{"backdrop-saturate":[De,be,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",De,be,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":J()}],"border-spacing-x":[{"border-spacing-x":J()}],"border-spacing-y":[{"border-spacing-y":J()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",be,ve]}],ease:[{ease:["linear","initial",E,be,ve]}],delay:[{delay:[De,be,ve]}],animate:[{animate:["none",j,be,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,be,ve]}],"perspective-origin":[{"perspective-origin":re()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:Ne()}],"scale-x":[{"scale-x":Ne()}],"scale-y":[{"scale-y":Ne()}],"scale-z":[{"scale-z":Ne()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[be,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:re()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Me()}],"translate-x":[{"translate-x":Me()}],"translate-y":[{"translate-y":Me()}],"translate-z":[{"translate-z":Me()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",be,ve]}],"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":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"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",be,ve]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[De,al,cs,mu]}],stroke:[{stroke:["none",...D()]}],"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"]}},S1=t1(b1);function ga(...s){return S1(qb(s))}const w1=({message:s,type:l="info",duration:i=3e3,onClose:o,visible:u})=>{const{t:m}=je();y.useEffect(()=>{if(u){const h=setTimeout(()=>{o()},i);return()=>clearTimeout(h)}},[u,i,o]);const f={success:a.jsx(fs,{className:"w-5 h-5 text-green-500"}),error:a.jsx(cl,{className:"w-5 h-5 text-red-500"}),info:a.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),warning:a.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})},p={success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",info:"bg-blue-50 border-blue-200",warning:"bg-yellow-50 border-yellow-200"},g={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return a.jsx("div",{className:ga("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",p[l],"transform transition-all duration-300 ease-in-out",u?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:a.jsxs("div",{className:"flex items-start",children:[a.jsx("div",{className:"flex-shrink-0",children:f[l]}),a.jsx("div",{className:"ml-3",children:a.jsx("p",{className:ga("text-sm font-medium",g[l]),children:s})}),a.jsx("div",{className:"ml-auto pl-3",children:a.jsx("div",{className:"-mx-1.5 -my-1.5",children:a.jsxs("button",{onClick:o,className:ga("inline-flex rounded-md p-1.5",`hover:bg-${l}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${l}-500`),children:[a.jsx("span",{className:"sr-only",children:m("common.dismiss")}),a.jsx(cl,{className:"h-5 w-5"})]})})})]})})},gg=y.createContext(void 0),hs=()=>{const s=y.useContext(gg);if(!s)throw new Error("useToast must be used within a ToastProvider");return s},j1=({children:s})=>{const[l,i]=y.useState({message:"",type:"info",visible:!1,duration:3e3}),o=y.useCallback((m,f="info",p=3e3)=>{i({message:m,type:f,visible:!0,duration:p})},[]),u=y.useCallback(()=>{i(m=>({...m,visible:!1}))},[]);return a.jsxs(gg.Provider,{value:{showToast:o},children:[s,a.jsx(w1,{message:l.message,type:l.type,duration:l.duration,onClose:u,visible:l.visible})]})},xg=y.createContext(void 0),N1=()=>{const s=y.useContext(xg);if(!s)throw new Error("useTheme must be used within a ThemeProvider");return s},C1=({children:s})=>{const[l,i]=y.useState(()=>localStorage.getItem("theme")||"system"),[o,u]=y.useState("light"),m=f=>{i(f),localStorage.setItem("theme",f)};return y.useEffect(()=>{const f=()=>{const g=window.document.documentElement,h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",b=l==="system"?h:l;u(b),b==="dark"?(console.log("Applying dark mode to HTML root element"),g.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),g.classList.remove("dark"),document.body.style.backgroundColor="")},p=window.matchMedia("(prefers-color-scheme: dark)");return p.addEventListener("change",f),f(),()=>{p.removeEventListener("change",f)}},[l]),a.jsx(xg.Provider,{value:{theme:l,setTheme:m,resolvedTheme:o},children:s})},Mi={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},yg=y.createContext(void 0),k1=({children:s})=>{const{t:l}=je(),{auth:i}=ps(),[o,u]=y.useState([]),[m,f]=y.useState(null),[p,g]=y.useState(0),[h,b]=y.useState(!0),[v,A]=y.useState(0),R=y.useRef(null),C=y.useRef(0),T=y.useRef(0),M=3e3,E=()=>{R.current&&(clearInterval(R.current),R.current=null)},j=y.useCallback(F=>{const z=(F==null?void 0:F.immediate)??!0;E();const Y=async()=>{try{console.log("[ServerContext] Fetching servers from API...");const I=await Xe("/servers");T.current=Date.now(),I&&I.success&&Array.isArray(I.data)?u(I.data):I&&Array.isArray(I)?u(I):(console.error("Invalid server data format:",I),u([])),f(null)}catch(I){console.error("Error fetching servers during normal polling:",I),navigator.onLine?I instanceof TypeError&&(I.message.includes("NetworkError")||I.message.includes("Failed to fetch"))?f(l("errors.serverConnection")):f(l("errors.serverFetch")):f(l("errors.network"))}};z&&Y(),R.current=setInterval(Y,Mi.normal.pollingInterval)},[l]);y.useEffect(()=>{i.isAuthenticated?(console.log("[ServerContext] User authenticated, triggering refresh"),g(F=>F+1)):(console.log("[ServerContext] User not authenticated, clearing data and stopping polling"),E(),u([]),b(!1),f(null))},[i.isAuthenticated]),y.useEffect(()=>{if(!i.isAuthenticated){console.log("[ServerContext] User not authenticated, skipping polling setup");return}p>0&&(C.current=0,A(0));const F=async()=>{try{console.log("[ServerContext] Initial fetch - attempt",C.current+1);const z=await Xe("/servers");return T.current=Date.now(),z&&z.success&&Array.isArray(z.data)?(u(z.data),b(!1),j({immediate:!1}),!0):z&&Array.isArray(z)?(u(z),b(!1),j({immediate:!1}),!0):(console.error("Invalid server data format:",z),u([]),b(!1),j({immediate:!1}),!0)}catch(z){return C.current+=1,console.error(`Initial loading attempt ${C.current} failed:`,z),A(C.current),navigator.onLine?f(l("errors.initialStartup")):f(l("errors.network")),C.current>=Mi.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),b(!1),E(),j()),!1}};return h?(E(),F(),R.current=setInterval(F,Mi.startup.pollingInterval),console.log(`Started initial polling with interval: ${Mi.startup.pollingInterval}ms`)):j(),()=>{E()}},[p,l,h,j]);const w=y.useCallback(()=>{E(),h&&(b(!0),C.current=0,A(0)),g(F=>F+1)},[h]),P=y.useCallback(()=>{const z=Date.now()-T.current;console.log("[ServerContext] refreshIfNeeded called, time since last fetch:",z,"ms"),z>=M?(console.log("[ServerContext] Triggering refresh (exceeded MIN_REFRESH_INTERVAL:",M,"ms)"),w()):console.log("[ServerContext] Skipping refresh (MIN_REFRESH_INTERVAL:",M,"ms, time since last:",z,"ms)")},[w]),re=y.useCallback(()=>{g(F=>F+1)},[]),B=y.useCallback(async F=>{try{const z=encodeURIComponent(F.name),Y=await Xe(`/servers/${z}`);return Y&&Y.success&&Y.data?{name:Y.data.name,status:Y.data.status,tools:Y.data.tools||[],config:Y.data.config}:(console.error("Failed to get server config:",Y),f(l("server.invalidConfig",{serverName:F.name})),null)}catch(z){return console.error("Error fetching server config:",z),f(z instanceof Error?z.message:String(z)),null}},[l]),Z=y.useCallback(async F=>{try{const z=encodeURIComponent(F),Y=await il(`/servers/${z}`);return!Y||!Y.success?(f((Y==null?void 0:Y.message)||l("server.deleteError",{serverName:F})),!1):(g(I=>I+1),!0)}catch(z){return f(l("errors.general")+": "+(z instanceof Error?z.message:String(z))),!1}},[l]),J=y.useCallback(async(F,z)=>{try{const Y=encodeURIComponent(F.name),I=await Tt(`/servers/${Y}/toggle`,{enabled:z});return!I||!I.success?(console.error("Failed to toggle server:",I),f((I==null?void 0:I.message)||l("server.toggleError",{serverName:F.name})),!1):(g(oe=>oe+1),!0)}catch(Y){return console.error("Error toggling server:",Y),f(Y instanceof Error?Y.message:String(Y)),!1}},[l]),se=y.useCallback(async F=>{try{const z=encodeURIComponent(F.name),Y=await Tt(`/servers/${z}/reload`,{});return!Y||!Y.success?(console.error("Failed to reload server:",Y),f(l("server.reloadError",{serverName:F.name})),!1):(w(),!0)}catch(z){return console.error("Error reloading server:",z),f(z instanceof Error?z.message:String(z)),!1}},[l,w]),me={servers:o,error:m,setError:f,isLoading:h,fetchAttempts:v,triggerRefresh:w,refreshIfNeeded:P,handleServerAdd:re,handleServerEdit:B,handleServerRemove:Z,handleServerToggle:J,handleServerReload:se};return a.jsx(yg.Provider,{value:me,children:s})},A1=()=>{const s=y.useContext(yg);if(s===void 0)throw new Error("useServerContext must be used within a ServerProvider");return s},fu=()=>({enabled:!0,accessTokenLifetime:3600,refreshTokenLifetime:1209600,authorizationCodeLifetime:300,requireClientSecret:!1,allowedScopes:["read","write"],requireState:!1,dynamicRegistration:{enabled:!0,allowedGrantTypes:["authorization_code","refresh_token"],requiresAuthentication:!1}}),vg=y.createContext(void 0),E1=()=>{const s=y.useContext(vg);if(!s)throw new Error("useSettings must be used within a SettingsProvider");return s},T1=({children:s})=>{const{t:l}=je(),{showToast:i}=hs(),[o,u]=y.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:"",skipAuth:!1}),[m,f]=y.useState({bearerAuthKey:""}),[p,g]=y.useState({pythonIndexUrl:"",npmRegistry:"",baseUrl:"http://localhost:3000"}),[h,b]=y.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[v,A]=y.useState({apiKey:"",referer:"https://www.mcphubx.com",title:"MCPHub",baseUrl:"https://api.mcprouter.to/v1"}),[R,C]=y.useState(fu()),[T,M]=y.useState("-"),[E,j]=y.useState(!1),[w,P]=y.useState(!1),[re,B]=y.useState(null),[Z,J]=y.useState(0),se=y.useCallback(()=>{J(U=>U+1)},[]),me=y.useCallback(async()=>{var U,te,K,$,fe,pe,Ne,ye,Me,He,Ye,Dt,Ht,rt,ft,Lt,xt;P(!0),B(null);try{const Se=await Xe("/settings");if(Se.success&&((te=(U=Se.data)==null?void 0:U.systemConfig)!=null&&te.routing)&&u({enableGlobalRoute:Se.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:Se.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:Se.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:Se.data.systemConfig.routing.bearerAuthKey||"",skipAuth:Se.data.systemConfig.routing.skipAuth??!1}),Se.success&&(($=(K=Se.data)==null?void 0:K.systemConfig)!=null&&$.install)&&g({pythonIndexUrl:Se.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:Se.data.systemConfig.install.npmRegistry||"",baseUrl:Se.data.systemConfig.install.baseUrl||"http://localhost:3000"}),Se.success&&((pe=(fe=Se.data)==null?void 0:fe.systemConfig)!=null&&pe.smartRouting)&&b({enabled:Se.data.systemConfig.smartRouting.enabled??!1,dbUrl:Se.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:Se.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:Se.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:Se.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""}),Se.success&&((ye=(Ne=Se.data)==null?void 0:Ne.systemConfig)!=null&&ye.mcpRouter)&&A({apiKey:Se.data.systemConfig.mcpRouter.apiKey||"",referer:Se.data.systemConfig.mcpRouter.referer||"https://www.mcphubx.com",title:Se.data.systemConfig.mcpRouter.title||"MCPHub",baseUrl:Se.data.systemConfig.mcpRouter.baseUrl||"https://api.mcprouter.to/v1"}),Se.success)if((He=(Me=Se.data)==null?void 0:Me.systemConfig)!=null&&He.oauthServer){const at=Se.data.systemConfig.oauthServer,Rt=fu(),lt=Rt.dynamicRegistration,Ar=Array.isArray(at.allowedScopes)?[...at.allowedScopes]:[...Rt.allowedScopes],le=Array.isArray((Ye=at.dynamicRegistration)==null?void 0:Ye.allowedGrantTypes)?[...at.dynamicRegistration.allowedGrantTypes]:[...lt.allowedGrantTypes];C({enabled:at.enabled??Rt.enabled,accessTokenLifetime:at.accessTokenLifetime??Rt.accessTokenLifetime,refreshTokenLifetime:at.refreshTokenLifetime??Rt.refreshTokenLifetime,authorizationCodeLifetime:at.authorizationCodeLifetime??Rt.authorizationCodeLifetime,requireClientSecret:at.requireClientSecret??Rt.requireClientSecret,requireState:at.requireState??Rt.requireState,allowedScopes:Ar,dynamicRegistration:{enabled:((Dt=at.dynamicRegistration)==null?void 0:Dt.enabled)??lt.enabled,allowedGrantTypes:le,requiresAuthentication:((Ht=at.dynamicRegistration)==null?void 0:Ht.requiresAuthentication)??lt.requiresAuthentication}})}else C(fu());Se.success&&((ft=(rt=Se.data)==null?void 0:rt.systemConfig)==null?void 0:ft.nameSeparator)!==void 0&&M(Se.data.systemConfig.nameSeparator),Se.success&&((xt=(Lt=Se.data)==null?void 0:Lt.systemConfig)==null?void 0:xt.enableSessionRebuild)!==void 0&&j(Se.data.systemConfig.enableSessionRebuild)}catch(Se){console.error("Failed to fetch settings:",Se),B(Se instanceof Error?Se.message:"Failed to fetch settings"),i(l("errors.failedToFetchSettings"))}finally{P(!1)}},[l,i]),F=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{routing:{[U]:te}});return K.success?(u({...o,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update routing config"),i(K.error||l("errors.failedToUpdateRoutingConfig")),!1)}catch(K){return console.error("Failed to update routing config:",K),B(K instanceof Error?K.message:"Failed to update routing config"),i(l("errors.failedToUpdateRoutingConfig")),!1}finally{P(!1)}},z=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{install:{[U]:te}});return K.success?(g({...p,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update install config"),i(K.error||l("errors.failedToUpdateInstallConfig")),!1)}catch(K){return console.error("Failed to update install config:",K),B(K instanceof Error?K.message:"Failed to update install config"),i(l("errors.failedToUpdateInstallConfig")),!1}finally{P(!1)}},Y=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{smartRouting:{[U]:te}});return K.success?(b({...h,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update smart routing config"),i(K.error||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(K){return console.error("Failed to update smart routing config:",K),B(K instanceof Error?K.message:"Failed to update smart routing config"),i(l("errors.failedToUpdateSmartRoutingConfig")),!1}finally{P(!1)}},I=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{smartRouting:U});return te.success?(b({...h,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update smart routing config"),i(te.error||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(te){return console.error("Failed to update smart routing config:",te),B(te instanceof Error?te.message:"Failed to update smart routing config"),i(l("errors.failedToUpdateSmartRoutingConfig")),!1}finally{P(!1)}},oe=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{routing:U});return te.success?(u({...o,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update routing config"),i(te.error||l("errors.failedToUpdateRoutingConfig")),!1)}catch(te){return console.error("Failed to update routing config:",te),B(te instanceof Error?te.message:"Failed to update routing config"),i(l("errors.failedToUpdateRoutingConfig")),!1}finally{P(!1)}},k=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{mcpRouter:{[U]:te}});return K.success?(A({...v,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update MCP Router config"),i(K.error||l("errors.failedToUpdateMCPRouterConfig")),!1)}catch(K){return console.error("Failed to update MCP Router config:",K),B(K instanceof Error?K.message:"Failed to update MCP Router config"),i(l("errors.failedToUpdateMCPRouterConfig")),!1}finally{P(!1)}},L=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{mcpRouter:U});return te.success?(A({...v,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update MCP Router config"),i(te.error||l("errors.failedToUpdateMCPRouterConfig")),!1)}catch(te){return console.error("Failed to update MCP Router config:",te),B(te instanceof Error?te.message:"Failed to update MCP Router config"),i(l("errors.failedToUpdateMCPRouterConfig")),!1}finally{P(!1)}},D=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{oauthServer:{[U]:te}});return K.success?(C({...R,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update OAuth server config"),i(K.error||l("errors.failedToUpdateOAuthServerConfig")),!1)}catch(K){return console.error("Failed to update OAuth server config:",K),B(K instanceof Error?K.message:"Failed to update OAuth server config"),i(l("errors.failedToUpdateOAuthServerConfig")),!1}finally{P(!1)}},W=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{oauthServer:U});return te.success?(C({...R,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update OAuth server config"),i(te.error||l("errors.failedToUpdateOAuthServerConfig")),!1)}catch(te){return console.error("Failed to update OAuth server config:",te),B(te instanceof Error?te.message:"Failed to update OAuth server config"),i(l("errors.failedToUpdateOAuthServerConfig")),!1}finally{P(!1)}},G=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{nameSeparator:U});return te.success?(M(U),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update name separator"),i(te.error||l("errors.failedToUpdateNameSeparator")),!1)}catch(te){return console.error("Failed to update name separator:",te),B(te instanceof Error?te.message:"Failed to update name separator"),i(l("errors.failedToUpdateNameSeparator")),!1}finally{P(!1)}},N=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{enableSessionRebuild:U});return te.success?(j(U),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update session rebuild setting"),i(te.error||l("errors.failedToUpdateSessionRebuild")),!1)}catch(te){return console.error("Failed to update session rebuild setting:",te),B(te instanceof Error?te.message:"Failed to update session rebuild setting"),i(l("errors.failedToUpdateSessionRebuild")),!1}finally{P(!1)}},_=async U=>{P(!0),B(null);try{return await Xe(`/mcp-settings/export?serverName=${U||""}`)}catch(te){console.error("Failed to export MCP settings:",te);const K=te instanceof Error?te.message:"Failed to export MCP settings";B(K),i(K)}finally{P(!1)}};y.useEffect(()=>{me()},[me,Z]),y.useEffect(()=>{o&&f({bearerAuthKey:o.bearerAuthKey})},[o]);const q={routingConfig:o,tempRoutingConfig:m,setTempRoutingConfig:f,installConfig:p,smartRoutingConfig:h,mcpRouterConfig:v,oauthServerConfig:R,nameSeparator:T,enableSessionRebuild:E,loading:w,error:re,setError:B,triggerRefresh:se,fetchSettings:me,updateRoutingConfig:F,updateInstallConfig:z,updateSmartRoutingConfig:Y,updateSmartRoutingConfigBatch:I,updateRoutingConfigBatch:oe,updateMCPRouterConfig:k,updateMCPRouterConfigBatch:L,updateOAuthServerConfig:D,updateOAuthServerConfigBatch:W,updateNameSeparator:G,updateSessionRebuild:N,exportMCPSettings:_};return a.jsx(vg.Provider,{value:q,children:s})},bg=()=>{const{t:s}=je(),{theme:l,setTheme:i}=N1(),o=()=>{i(l==="light"?"dark":"light")};return a.jsx("button",{onClick:o,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none",title:s(l==="light"?"theme.dark":"theme.light"),"aria-label":s(l==="light"?"theme.dark":"theme.light"),children:l==="light"?a.jsx(Ab,{className:"h-5 w-5"}):a.jsx(Lb,{className:"h-5 w-5"})})},R1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:2,...s,children:[a.jsx("title",{children:l("common.language")}),a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2 12h20"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"})]})},Sg=()=>{const{i18n:s}=je(),[l,i]=y.useState(!1),[o,u]=y.useState(s.language),m=[{code:"en",label:"English"},{code:"zh",label:"中文"},{code:"fr",label:"Français"},{code:"tr",label:"Türkçe"}];y.useEffect(()=>{u(s.language)},[s.language]),y.useEffect(()=>{const g=h=>{h.target.closest(".language-dropdown")||i(!1)};return l&&document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[l]);const f=g=>{localStorage.setItem("i18nextLng",g),i(!1),window.location.reload()},p=()=>{i(!l)};return a.jsxs("div",{className:"relative language-dropdown",children:[a.jsx("button",{onClick:p,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":"Language Switcher",children:a.jsx(R1,{className:"h-5 w-5"})}),l&&a.jsx("div",{className:"absolute right-0 mt-2 w-24 bg-white dark:bg-gray-800 rounded-md shadow-lg border border-gray-200 dark:border-gray-700 z-50",children:a.jsx("div",{children:m.map(g=>a.jsx("button",{onClick:()=>f(g.code),className:`flex items-center w-full px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${o.startsWith(g.code)?"bg-blue-50 text-blue-700":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-100"}`,children:g.label},g.code))})})]})},M1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("common.github")}),a.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})},z1=({onToggleSidebar:s})=>{const{t:l}=je();return a.jsx("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:a.jsxs("div",{className:"flex justify-between items-center px-3 py-3",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("button",{onClick:s,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":l("app.toggleSidebar"),children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),a.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:l("app.title")})]}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 mr-2",children:"v0.11.2"}),a.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700","aria-label":"GitHub Repository",children:a.jsx(M1,{className:"h-5 w-5"})}),a.jsx(bg,{}),a.jsx(Sg,{})]})]})})},us=({permissions:s,fallback:l=null,children:i})=>wg(s)?a.jsx(a.Fragment,{children:i}):a.jsx(a.Fragment,{children:l}),wg=s=>{const{auth:l}=ps();if(!l.isAuthenticated||!l.user)return!1;const i=l.user.permissions||[];return s==="x"&&!i.includes("x")?!1:i.includes("*")||l.user.isAdmin?!0:(Array.isArray(s)?s:[s]).some(u=>i.includes(u))},O1="https://registry.npmjs.org",D1="@samanhappy/mcphub",jg=async()=>{try{const s=await fetch(`${O1}/${D1}/latest`);if(!s.ok)throw new Error(`Failed to fetch latest version: ${s.status}`);return(await s.json()).version||null}catch(s){return console.error("Error checking for latest version:",s),null}},Ng=(s,l)=>{if(s==="dev")return-1;const i=s.split(".").map(Number),o=l.split(".").map(Number);for(let u=0;u<3;u++){const m=i[u]||0,f=o[u]||0;if(m>f)return-1;if(m<f)return 1}return 0},L1=({isOpen:s,onClose:l,version:i})=>{const{t:o}=je(),[u,m]=y.useState(!1),[f,p]=y.useState(""),[g,h]=y.useState(!1),b=async()=>{h(!0);try{const v=await jg();v&&(p(v),m(Ng(i,v)>0))}catch(v){console.error("Failed to check for updates:",v)}finally{h(!1)}};return y.useEffect(()=>{s&&b()},[s,i]),s?a.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:a.jsxs("div",{className:"p-6 relative",children:[a.jsx("button",{onClick:l,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:a.jsx(cl,{className:"h-5 w-5"})}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("about.title")}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[o("about.currentVersion"),":"]}),a.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:i})]}),u&&f&&a.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:a.jsxs("div",{className:"flex items-start",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),a.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[a.jsx("p",{children:o("about.newVersionAvailable",{version:f})}),a.jsx("p",{className:"mt-1",children:a.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:o("about.viewOnGitHub")})})]})]})}),a.jsxs("button",{onClick:b,disabled:g,className:`mt-4 inline-flex items-center px-4 py-2 border border-gray-200 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium btn-secondary
|
|
196
|
-
${g?"text-gray-400 dark:text-gray-500 bg-gray-100 dark:bg-gray-800":"text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500`,children:[a.jsx(Rb,{className:`h-4 w-4 mr-2 ${g?"animate-spin":""}`}),o(g?"about.checking":"about.checkForUpdates")]})]})]})})}):null},U1=({open:s,onOpenChange:l})=>{const{i18n:i,t:o}=je();return s?a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:a.jsxs("div",{className:"p-6 relative",children:[a.jsx("button",{onClick:()=>l(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:a.jsx(cl,{className:"h-5 w-5"})}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("sponsor.title")}),a.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:i.language==="zh"?a.jsx("img",{src:"./assets/reward.png",alt:o("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):a.jsxs("div",{className:"text-center",children:[a.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:o("sponsor.supportMessage")}),a.jsx("a",{href:"https://ko-fi.com/samanhappy",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center bg-[#13C3FF] text-white px-4 py-2 rounded-md hover:bg-[#00A5E5] transition-colors",children:o("sponsor.supportButton")})]})})]})})}):null},P1=({open:s,onOpenChange:l})=>{const{t:i}=je();return s?a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:a.jsxs("div",{className:"p-6 relative",children:[a.jsx("button",{onClick:()=>l(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":i("common.close"),children:a.jsx(cl,{className:"h-5 w-5"})}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:i("wechat.title")}),a.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[a.jsx("img",{src:"./assets/wexin.png",alt:i("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),a.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:i("wechat.scanMessage")})]})]})})}):null},_1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("common.wechat")}),a.jsx("path",{d:"M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z"})]})},B1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("common.discord")}),a.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})]})},H1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("sponsor.label")}),a.jsx("path",{d:"M17.625 1.499c-2.32 0-4.354 1.203-5.625 3.03-1.271-1.827-3.305-3.03-5.625-3.03C3.129 1.499 0 4.253 0 8.249c0 4.275 3.068 7.847 5.828 10.227a33.14 33.14 0 0 0 5.616 3.876l.028.017.008.003-.001.003c.163.085.342.126.521.125.179.001.358-.041.521-.125l-.001-.003.008-.003.028-.017a33.14 33.14 0 0 0 5.616-3.876C20.932 16.096 24 12.524 24 8.249c0-3.996-3.129-6.75-6.375-6.75zm-.919 15.275a30.766 30.766 0 0 1-4.703 3.316l-.004-.002-.004.002a30.955 30.955 0 0 1-4.703-3.316c-2.677-2.307-5.047-5.298-5.047-8.523 0-2.754 2.121-4.5 4.125-4.5 2.06 0 3.914 1.479 4.544 3.684.143.495.596.797 1.086.796.49.001.943-.302 1.085-.796.63-2.205 2.484-3.684 4.544-3.684 2.004 0 4.125 1.746 4.125 4.5 0 3.225-2.37 6.216-5.048 8.523z"})]})},q1=({collapsed:s,version:l})=>{var Z;const{t:i,i18n:o}=je(),u=Vr(),{auth:m,logout:f}=ps(),[p,g]=y.useState(!1),[h,b]=y.useState(!1),[v,A]=y.useState(!1),[R,C]=y.useState(!1),[T,M]=y.useState(!1),E=y.useRef(null);y.useEffect(()=>{(async()=>{try{const se=await jg();se&&b(Ng(l,se)>0)}catch(se){console.error("Error checking for new version:",se)}})()},[l]),y.useEffect(()=>{const J=se=>{E.current&&!E.current.contains(se.target)&&g(!1)};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[]);const j=()=>{u("/settings"),g(!1)},w=()=>{f(),u("/login")},P=()=>{A(!0),g(!1)},re=()=>{C(!0),g(!1)},B=()=>{M(!0),g(!1)};return a.jsxs("div",{ref:E,className:"relative",children:[a.jsxs("button",{onClick:()=>g(!p),className:`flex ${s?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${p?"bg-gray-100 dark:bg-gray-700":""}`,children:[a.jsxs("div",{className:"flex-shrink-0 relative",children:[a.jsx("div",{className:"w-5 h-5 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700",children:a.jsx(sg,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),h&&a.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!s&&a.jsx("div",{className:"ml-3 flex flex-col items-start",children:a.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((Z=m.user)==null?void 0:Z.username)||i("auth.user")})})]}),p&&a.jsxs("div",{className:"absolute top-0 transform -translate-y-full left-0 w-full min-w-max bg-white border border-gray-200 dark:bg-gray-800 z-50",children:[a.jsxs("button",{onClick:re,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(H1,{className:"h-4 w-4 mr-2"}),i("sponsor.label")]}),o.language==="zh"?a.jsxs("button",{onClick:B,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(_1,{className:"h-4 w-4 mr-2"}),i("wechat.label")]}):a.jsxs("a",{href:"https://discord.gg/qMKNsn5Q",target:"_blank",rel:"noopener noreferrer",className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(B1,{className:"h-4 w-4 mr-2"}),i("discord.label")]}),a.jsxs("button",{onClick:j,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(zb,{className:"h-4 w-4 mr-2"}),i("nav.settings")]}),a.jsxs("button",{onClick:P,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 relative",children:[a.jsx(bb,{className:"h-4 w-4 mr-2"}),i("about.title"),h&&a.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),a.jsx("div",{className:"border-t border-gray-200 dark:border-gray-600"}),a.jsxs("button",{onClick:w,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(Cb,{className:"h-4 w-4 mr-2"}),i("app.logout")]})]}),a.jsx(L1,{isOpen:v,onClose:()=>A(!1),version:l}),a.jsx(U1,{open:R,onOpenChange:C}),a.jsx(P1,{open:T,onOpenChange:M})]})},G1=({collapsed:s})=>{var m;const{t:l}=je(),{auth:i}=ps(),o="0.11.2",u=[{path:"/",label:l("nav.dashboard"),icon:a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[a.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),a.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:l("nav.servers"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"})})},{path:"/groups",label:l("nav.groups"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"})})},...(m=i.user)!=null&&m.isAdmin&&wg("x")?[{path:"/users",label:l("nav.users"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"})})}]:[],{path:"/market",label:l("nav.market"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})})},{path:"/logs",label:l("nav.logs"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}];return a.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${s?"w-16":"w-64"}`,children:[a.jsx("div",{className:"overflow-y-auto flex-grow",children:a.jsx("nav",{className:"p-3 space-y-1",children:u.map(f=>a.jsxs(Kh,{to:f.path,className:({isActive:p})=>`flex items-center px-2.5 py-2 rounded-lg transition-colors duration-200
|
|
195
|
+
*/const Hb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cl=mt("x",Hb);function ng(s){var l,i,o="";if(typeof s=="string"||typeof s=="number")o+=s;else if(typeof s=="object")if(Array.isArray(s)){var u=s.length;for(l=0;l<u;l++)s[l]&&(i=ng(s[l]))&&(o&&(o+=" "),o+=i)}else for(i in s)s[i]&&(o&&(o+=" "),o+=i);return o}function qb(){for(var s,l,i=0,o="",u=arguments.length;i<u;i++)(s=arguments[i])&&(l=ng(s))&&(o&&(o+=" "),o+=l);return o}const Gu="-",Gb=s=>{const l=Ib(s),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=s;return{getClassGroupId:f=>{const p=f.split(Gu);return p[0]===""&&p.length!==1&&p.shift(),lg(p,l)||Fb(f)},getConflictingClassGroupIds:(f,p)=>{const g=i[f]||[];return p&&o[f]?[...g,...o[f]]:g}}},lg=(s,l)=>{var f;if(s.length===0)return l.classGroupId;const i=s[0],o=l.nextPart.get(i),u=o?lg(s.slice(1),o):void 0;if(u)return u;if(l.validators.length===0)return;const m=s.join(Gu);return(f=l.validators.find(({validator:p})=>p(m)))==null?void 0:f.classGroupId},th=/^\[(.+)\]$/,Fb=s=>{if(th.test(s)){const l=th.exec(s)[1],i=l==null?void 0:l.substring(0,l.indexOf(":"));if(i)return"arbitrary.."+i}},Ib=s=>{const{theme:l,classGroups:i}=s,o={nextPart:new Map,validators:[]};for(const u in i)wu(i[u],o,u,l);return o},wu=(s,l,i,o)=>{s.forEach(u=>{if(typeof u=="string"){const m=u===""?l:rh(l,u);m.classGroupId=i;return}if(typeof u=="function"){if(Kb(u)){wu(u(o),l,i,o);return}l.validators.push({validator:u,classGroupId:i});return}Object.entries(u).forEach(([m,f])=>{wu(f,rh(l,m),i,o)})})},rh=(s,l)=>{let i=s;return l.split(Gu).forEach(o=>{i.nextPart.has(o)||i.nextPart.set(o,{nextPart:new Map,validators:[]}),i=i.nextPart.get(o)}),i},Kb=s=>s.isThemeGetter,Vb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let l=0,i=new Map,o=new Map;const u=(m,f)=>{i.set(m,f),l++,l>s&&(l=0,o=i,i=new Map)};return{get(m){let f=i.get(m);if(f!==void 0)return f;if((f=o.get(m))!==void 0)return u(m,f),f},set(m,f){i.has(m)?i.set(m,f):u(m,f)}}},ju="!",Nu=":",$b=Nu.length,Yb=s=>{const{prefix:l,experimentalParseClassName:i}=s;let o=u=>{const m=[];let f=0,p=0,g=0,h;for(let C=0;C<u.length;C++){let T=u[C];if(f===0&&p===0){if(T===Nu){m.push(u.slice(g,C)),g=C+$b;continue}if(T==="/"){h=C;continue}}T==="["?f++:T==="]"?f--:T==="("?p++:T===")"&&p--}const b=m.length===0?u:u.substring(g),v=Jb(b),A=v!==b,R=h&&h>g?h-g:void 0;return{modifiers:m,hasImportantModifier:A,baseClassName:v,maybePostfixModifierPosition:R}};if(l){const u=l+Nu,m=o;o=f=>f.startsWith(u)?m(f.substring(u.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(i){const u=o;o=m=>i({className:m,parseClassName:u})}return o},Jb=s=>s.endsWith(ju)?s.substring(0,s.length-1):s.startsWith(ju)?s.substring(1):s,Xb=s=>{const l=Object.fromEntries(s.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const u=[];let m=[];return o.forEach(f=>{f[0]==="["||l[f]?(u.push(...m.sort(),f),m=[]):m.push(f)}),u.push(...m.sort()),u}},Qb=s=>({cache:Vb(s.cacheSize),parseClassName:Yb(s),sortModifiers:Xb(s),...Gb(s)}),Zb=/\s+/,Wb=(s,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:m}=l,f=[],p=s.trim().split(Zb);let g="";for(let h=p.length-1;h>=0;h-=1){const b=p[h],{isExternal:v,modifiers:A,hasImportantModifier:R,baseClassName:C,maybePostfixModifierPosition:T}=i(b);if(v){g=b+(g.length>0?" "+g:g);continue}let M=!!T,E=o(M?C.substring(0,T):C);if(!E){if(!M){g=b+(g.length>0?" "+g:g);continue}if(E=o(C),!E){g=b+(g.length>0?" "+g:g);continue}M=!1}const j=m(A).join(":"),w=R?j+ju:j,P=w+E;if(f.includes(P))continue;f.push(P);const re=u(E,M);for(let B=0;B<re.length;++B){const Z=re[B];f.push(w+Z)}g=b+(g.length>0?" "+g:g)}return g};function e1(){let s=0,l,i,o="";for(;s<arguments.length;)(l=arguments[s++])&&(i=ig(l))&&(o&&(o+=" "),o+=i);return o}const ig=s=>{if(typeof s=="string")return s;let l,i="";for(let o=0;o<s.length;o++)s[o]&&(l=ig(s[o]))&&(i&&(i+=" "),i+=l);return i};function t1(s,...l){let i,o,u,m=f;function f(g){const h=l.reduce((b,v)=>v(b),s());return i=Qb(h),o=i.cache.get,u=i.cache.set,m=p,p(g)}function p(g){const h=o(g);if(h)return h;const b=Wb(g,i);return u(g,b),b}return function(){return m(e1.apply(null,arguments))}}const Et=s=>{const l=i=>i[s]||[];return l.isThemeGetter=!0,l},og=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r1=/^\d+\/\d+$/,a1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s1=/\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$/,n1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,i1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tn=s=>r1.test(s),De=s=>!!s&&!Number.isNaN(Number(s)),Ga=s=>!!s&&Number.isInteger(Number(s)),du=s=>s.endsWith("%")&&De(s.slice(0,-1)),pa=s=>a1.test(s),o1=()=>!0,c1=s=>s1.test(s)&&!n1.test(s),ug=()=>!1,u1=s=>l1.test(s),d1=s=>i1.test(s),m1=s=>!ve(s)&&!be(s),f1=s=>dn(s,fg,ug),ve=s=>og.test(s),cs=s=>dn(s,pg,c1),mu=s=>dn(s,y1,De),ah=s=>dn(s,dg,ug),p1=s=>dn(s,mg,d1),Ti=s=>dn(s,hg,u1),be=s=>cg.test(s),al=s=>mn(s,pg),h1=s=>mn(s,v1),sh=s=>mn(s,dg),g1=s=>mn(s,fg),x1=s=>mn(s,mg),Ri=s=>mn(s,hg,!0),dn=(s,l,i)=>{const o=og.exec(s);return o?o[1]?l(o[1]):i(o[2]):!1},mn=(s,l,i=!1)=>{const o=cg.exec(s);return o?o[1]?l(o[1]):i:!1},dg=s=>s==="position"||s==="percentage",mg=s=>s==="image"||s==="url",fg=s=>s==="length"||s==="size"||s==="bg-size",pg=s=>s==="length",y1=s=>s==="number",v1=s=>s==="family-name",hg=s=>s==="shadow",b1=()=>{const s=Et("color"),l=Et("font"),i=Et("text"),o=Et("font-weight"),u=Et("tracking"),m=Et("leading"),f=Et("breakpoint"),p=Et("container"),g=Et("spacing"),h=Et("radius"),b=Et("shadow"),v=Et("inset-shadow"),A=Et("text-shadow"),R=Et("drop-shadow"),C=Et("blur"),T=Et("perspective"),M=Et("aspect"),E=Et("ease"),j=Et("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],re=()=>[...P(),be,ve],B=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],J=()=>[be,ve,g],se=()=>[tn,"full","auto",...J()],me=()=>[Ga,"none","subgrid",be,ve],F=()=>["auto",{span:["full",Ga,be,ve]},Ga,be,ve],z=()=>[Ga,"auto",be,ve],Y=()=>["auto","min","max","fr",be,ve],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...J()],L=()=>[tn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...J()],D=()=>[s,be,ve],W=()=>[...P(),sh,ah,{position:[be,ve]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",g1,f1,{size:[be,ve]}],_=()=>[du,al,cs],q=()=>["","none","full",h,be,ve],U=()=>["",De,al,cs],te=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[De,du,sh,ah],fe=()=>["","none",C,be,ve],pe=()=>["none",De,be,ve],Ne=()=>["none",De,be,ve],ye=()=>[De,be,ve],Me=()=>[tn,"full",...J()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pa],breakpoint:[pa],color:[o1],container:[pa],"drop-shadow":[pa],ease:["in","out","in-out"],font:[m1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pa],shadow:[pa],spacing:["px",De],text:[pa],"text-shadow":[pa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tn,ve,be,M]}],container:["container"],columns:[{columns:[De,ve,be,p]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:re()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:se()}],"inset-x":[{"inset-x":se()}],"inset-y":[{"inset-y":se()}],start:[{start:se()}],end:[{end:se()}],top:[{top:se()}],right:[{right:se()}],bottom:[{bottom:se()}],left:[{left:se()}],visibility:["visible","invisible","collapse"],z:[{z:[Ga,"auto",be,ve]}],basis:[{basis:[tn,"full","auto",p,...J()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,tn,"auto","initial","none",ve]}],grow:[{grow:["",De,be,ve]}],shrink:[{shrink:["",De,be,ve]}],order:[{order:[Ga,"first","last","none",be,ve]}],"grid-cols":[{"grid-cols":me()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":me()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:J()}],"gap-x":[{"gap-x":J()}],"gap-y":[{"gap-y":J()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:J()}],px:[{px:J()}],py:[{py:J()}],ps:[{ps:J()}],pe:[{pe:J()}],pt:[{pt:J()}],pr:[{pr:J()}],pb:[{pb:J()}],pl:[{pl:J()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":J()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":J()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[p,"screen",...L()]}],"min-w":[{"min-w":[p,"screen","none",...L()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[f]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",i,al,cs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,be,mu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",du,ve]}],"font-family":[{font:[h1,ve,l]}],"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:[u,be,ve]}],"line-clamp":[{"line-clamp":[De,"none",be,mu]}],leading:[{leading:[m,...J()]}],"list-image":[{"list-image":["none",be,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",be,cs]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[De,"auto",be,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ve]}],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",be,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ga,be,ve],radial:["",be,ve],conic:[Ga,be,ve]},x1,p1]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],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:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,be,ve]}],"outline-w":[{outline:["",De,al,cs]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",b,Ri,Ti]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",v,Ri,Ti]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[De,cs]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",A,Ri,Ti]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[De,be,ve]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[be,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ve]}],filter:[{filter:["","none",be,ve]}],blur:[{blur:fe()}],brightness:[{brightness:[De,be,ve]}],contrast:[{contrast:[De,be,ve]}],"drop-shadow":[{"drop-shadow":["","none",R,Ri,Ti]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",De,be,ve]}],"hue-rotate":[{"hue-rotate":[De,be,ve]}],invert:[{invert:["",De,be,ve]}],saturate:[{saturate:[De,be,ve]}],sepia:[{sepia:["",De,be,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ve]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[De,be,ve]}],"backdrop-contrast":[{"backdrop-contrast":[De,be,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,be,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,be,ve]}],"backdrop-invert":[{"backdrop-invert":["",De,be,ve]}],"backdrop-opacity":[{"backdrop-opacity":[De,be,ve]}],"backdrop-saturate":[{"backdrop-saturate":[De,be,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",De,be,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":J()}],"border-spacing-x":[{"border-spacing-x":J()}],"border-spacing-y":[{"border-spacing-y":J()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",be,ve]}],ease:[{ease:["linear","initial",E,be,ve]}],delay:[{delay:[De,be,ve]}],animate:[{animate:["none",j,be,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,be,ve]}],"perspective-origin":[{"perspective-origin":re()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:Ne()}],"scale-x":[{"scale-x":Ne()}],"scale-y":[{"scale-y":Ne()}],"scale-z":[{"scale-z":Ne()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[be,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:re()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Me()}],"translate-x":[{"translate-x":Me()}],"translate-y":[{"translate-y":Me()}],"translate-z":[{"translate-z":Me()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",be,ve]}],"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":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"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",be,ve]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[De,al,cs,mu]}],stroke:[{stroke:["none",...D()]}],"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"]}},S1=t1(b1);function ga(...s){return S1(qb(s))}const w1=({message:s,type:l="info",duration:i=3e3,onClose:o,visible:u})=>{const{t:m}=je();y.useEffect(()=>{if(u){const h=setTimeout(()=>{o()},i);return()=>clearTimeout(h)}},[u,i,o]);const f={success:a.jsx(fs,{className:"w-5 h-5 text-green-500"}),error:a.jsx(cl,{className:"w-5 h-5 text-red-500"}),info:a.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),warning:a.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})},p={success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",info:"bg-blue-50 border-blue-200",warning:"bg-yellow-50 border-yellow-200"},g={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return a.jsx("div",{className:ga("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",p[l],"transform transition-all duration-300 ease-in-out",u?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:a.jsxs("div",{className:"flex items-start",children:[a.jsx("div",{className:"flex-shrink-0",children:f[l]}),a.jsx("div",{className:"ml-3",children:a.jsx("p",{className:ga("text-sm font-medium",g[l]),children:s})}),a.jsx("div",{className:"ml-auto pl-3",children:a.jsx("div",{className:"-mx-1.5 -my-1.5",children:a.jsxs("button",{onClick:o,className:ga("inline-flex rounded-md p-1.5",`hover:bg-${l}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${l}-500`),children:[a.jsx("span",{className:"sr-only",children:m("common.dismiss")}),a.jsx(cl,{className:"h-5 w-5"})]})})})]})})},gg=y.createContext(void 0),hs=()=>{const s=y.useContext(gg);if(!s)throw new Error("useToast must be used within a ToastProvider");return s},j1=({children:s})=>{const[l,i]=y.useState({message:"",type:"info",visible:!1,duration:3e3}),o=y.useCallback((m,f="info",p=3e3)=>{i({message:m,type:f,visible:!0,duration:p})},[]),u=y.useCallback(()=>{i(m=>({...m,visible:!1}))},[]);return a.jsxs(gg.Provider,{value:{showToast:o},children:[s,a.jsx(w1,{message:l.message,type:l.type,duration:l.duration,onClose:u,visible:l.visible})]})},xg=y.createContext(void 0),N1=()=>{const s=y.useContext(xg);if(!s)throw new Error("useTheme must be used within a ThemeProvider");return s},C1=({children:s})=>{const[l,i]=y.useState(()=>localStorage.getItem("theme")||"system"),[o,u]=y.useState("light"),m=f=>{i(f),localStorage.setItem("theme",f)};return y.useEffect(()=>{const f=()=>{const g=window.document.documentElement,h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",b=l==="system"?h:l;u(b),b==="dark"?(console.log("Applying dark mode to HTML root element"),g.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),g.classList.remove("dark"),document.body.style.backgroundColor="")},p=window.matchMedia("(prefers-color-scheme: dark)");return p.addEventListener("change",f),f(),()=>{p.removeEventListener("change",f)}},[l]),a.jsx(xg.Provider,{value:{theme:l,setTheme:m,resolvedTheme:o},children:s})},Mi={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},yg=y.createContext(void 0),k1=({children:s})=>{const{t:l}=je(),{auth:i}=ps(),[o,u]=y.useState([]),[m,f]=y.useState(null),[p,g]=y.useState(0),[h,b]=y.useState(!0),[v,A]=y.useState(0),R=y.useRef(null),C=y.useRef(0),T=y.useRef(0),M=3e3,E=()=>{R.current&&(clearInterval(R.current),R.current=null)},j=y.useCallback(F=>{const z=(F==null?void 0:F.immediate)??!0;E();const Y=async()=>{try{console.log("[ServerContext] Fetching servers from API...");const I=await Xe("/servers");T.current=Date.now(),I&&I.success&&Array.isArray(I.data)?u(I.data):I&&Array.isArray(I)?u(I):(console.error("Invalid server data format:",I),u([])),f(null)}catch(I){console.error("Error fetching servers during normal polling:",I),navigator.onLine?I instanceof TypeError&&(I.message.includes("NetworkError")||I.message.includes("Failed to fetch"))?f(l("errors.serverConnection")):f(l("errors.serverFetch")):f(l("errors.network"))}};z&&Y(),R.current=setInterval(Y,Mi.normal.pollingInterval)},[l]);y.useEffect(()=>{i.isAuthenticated?(console.log("[ServerContext] User authenticated, triggering refresh"),g(F=>F+1)):(console.log("[ServerContext] User not authenticated, clearing data and stopping polling"),E(),u([]),b(!1),f(null))},[i.isAuthenticated]),y.useEffect(()=>{if(!i.isAuthenticated){console.log("[ServerContext] User not authenticated, skipping polling setup");return}p>0&&(C.current=0,A(0));const F=async()=>{try{console.log("[ServerContext] Initial fetch - attempt",C.current+1);const z=await Xe("/servers");return T.current=Date.now(),z&&z.success&&Array.isArray(z.data)?(u(z.data),b(!1),j({immediate:!1}),!0):z&&Array.isArray(z)?(u(z),b(!1),j({immediate:!1}),!0):(console.error("Invalid server data format:",z),u([]),b(!1),j({immediate:!1}),!0)}catch(z){return C.current+=1,console.error(`Initial loading attempt ${C.current} failed:`,z),A(C.current),navigator.onLine?f(l("errors.initialStartup")):f(l("errors.network")),C.current>=Mi.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),b(!1),E(),j()),!1}};return h?(E(),F(),R.current=setInterval(F,Mi.startup.pollingInterval),console.log(`Started initial polling with interval: ${Mi.startup.pollingInterval}ms`)):j(),()=>{E()}},[p,l,h,j]);const w=y.useCallback(()=>{E(),h&&(b(!0),C.current=0,A(0)),g(F=>F+1)},[h]),P=y.useCallback(()=>{const z=Date.now()-T.current;console.log("[ServerContext] refreshIfNeeded called, time since last fetch:",z,"ms"),z>=M?(console.log("[ServerContext] Triggering refresh (exceeded MIN_REFRESH_INTERVAL:",M,"ms)"),w()):console.log("[ServerContext] Skipping refresh (MIN_REFRESH_INTERVAL:",M,"ms, time since last:",z,"ms)")},[w]),re=y.useCallback(()=>{g(F=>F+1)},[]),B=y.useCallback(async F=>{try{const z=encodeURIComponent(F.name),Y=await Xe(`/servers/${z}`);return Y&&Y.success&&Y.data?{name:Y.data.name,status:Y.data.status,tools:Y.data.tools||[],config:Y.data.config}:(console.error("Failed to get server config:",Y),f(l("server.invalidConfig",{serverName:F.name})),null)}catch(z){return console.error("Error fetching server config:",z),f(z instanceof Error?z.message:String(z)),null}},[l]),Z=y.useCallback(async F=>{try{const z=encodeURIComponent(F),Y=await il(`/servers/${z}`);return!Y||!Y.success?(f((Y==null?void 0:Y.message)||l("server.deleteError",{serverName:F})),!1):(g(I=>I+1),!0)}catch(z){return f(l("errors.general")+": "+(z instanceof Error?z.message:String(z))),!1}},[l]),J=y.useCallback(async(F,z)=>{try{const Y=encodeURIComponent(F.name),I=await Tt(`/servers/${Y}/toggle`,{enabled:z});return!I||!I.success?(console.error("Failed to toggle server:",I),f((I==null?void 0:I.message)||l("server.toggleError",{serverName:F.name})),!1):(g(oe=>oe+1),!0)}catch(Y){return console.error("Error toggling server:",Y),f(Y instanceof Error?Y.message:String(Y)),!1}},[l]),se=y.useCallback(async F=>{try{const z=encodeURIComponent(F.name),Y=await Tt(`/servers/${z}/reload`,{});return!Y||!Y.success?(console.error("Failed to reload server:",Y),f(l("server.reloadError",{serverName:F.name})),!1):(w(),!0)}catch(z){return console.error("Error reloading server:",z),f(z instanceof Error?z.message:String(z)),!1}},[l,w]),me={servers:o,error:m,setError:f,isLoading:h,fetchAttempts:v,triggerRefresh:w,refreshIfNeeded:P,handleServerAdd:re,handleServerEdit:B,handleServerRemove:Z,handleServerToggle:J,handleServerReload:se};return a.jsx(yg.Provider,{value:me,children:s})},A1=()=>{const s=y.useContext(yg);if(s===void 0)throw new Error("useServerContext must be used within a ServerProvider");return s},fu=()=>({enabled:!0,accessTokenLifetime:3600,refreshTokenLifetime:1209600,authorizationCodeLifetime:300,requireClientSecret:!1,allowedScopes:["read","write"],requireState:!1,dynamicRegistration:{enabled:!0,allowedGrantTypes:["authorization_code","refresh_token"],requiresAuthentication:!1}}),vg=y.createContext(void 0),E1=()=>{const s=y.useContext(vg);if(!s)throw new Error("useSettings must be used within a SettingsProvider");return s},T1=({children:s})=>{const{t:l}=je(),{showToast:i}=hs(),[o,u]=y.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:"",skipAuth:!1}),[m,f]=y.useState({bearerAuthKey:""}),[p,g]=y.useState({pythonIndexUrl:"",npmRegistry:"",baseUrl:"http://localhost:3000"}),[h,b]=y.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[v,A]=y.useState({apiKey:"",referer:"https://www.mcphubx.com",title:"MCPHub",baseUrl:"https://api.mcprouter.to/v1"}),[R,C]=y.useState(fu()),[T,M]=y.useState("-"),[E,j]=y.useState(!1),[w,P]=y.useState(!1),[re,B]=y.useState(null),[Z,J]=y.useState(0),se=y.useCallback(()=>{J(U=>U+1)},[]),me=y.useCallback(async()=>{var U,te,K,$,fe,pe,Ne,ye,Me,He,Ye,Dt,Ht,rt,ft,Lt,xt;P(!0),B(null);try{const Se=await Xe("/settings");if(Se.success&&((te=(U=Se.data)==null?void 0:U.systemConfig)!=null&&te.routing)&&u({enableGlobalRoute:Se.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:Se.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:Se.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:Se.data.systemConfig.routing.bearerAuthKey||"",skipAuth:Se.data.systemConfig.routing.skipAuth??!1}),Se.success&&(($=(K=Se.data)==null?void 0:K.systemConfig)!=null&&$.install)&&g({pythonIndexUrl:Se.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:Se.data.systemConfig.install.npmRegistry||"",baseUrl:Se.data.systemConfig.install.baseUrl||"http://localhost:3000"}),Se.success&&((pe=(fe=Se.data)==null?void 0:fe.systemConfig)!=null&&pe.smartRouting)&&b({enabled:Se.data.systemConfig.smartRouting.enabled??!1,dbUrl:Se.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:Se.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:Se.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:Se.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""}),Se.success&&((ye=(Ne=Se.data)==null?void 0:Ne.systemConfig)!=null&&ye.mcpRouter)&&A({apiKey:Se.data.systemConfig.mcpRouter.apiKey||"",referer:Se.data.systemConfig.mcpRouter.referer||"https://www.mcphubx.com",title:Se.data.systemConfig.mcpRouter.title||"MCPHub",baseUrl:Se.data.systemConfig.mcpRouter.baseUrl||"https://api.mcprouter.to/v1"}),Se.success)if((He=(Me=Se.data)==null?void 0:Me.systemConfig)!=null&&He.oauthServer){const at=Se.data.systemConfig.oauthServer,Rt=fu(),lt=Rt.dynamicRegistration,Ar=Array.isArray(at.allowedScopes)?[...at.allowedScopes]:[...Rt.allowedScopes],le=Array.isArray((Ye=at.dynamicRegistration)==null?void 0:Ye.allowedGrantTypes)?[...at.dynamicRegistration.allowedGrantTypes]:[...lt.allowedGrantTypes];C({enabled:at.enabled??Rt.enabled,accessTokenLifetime:at.accessTokenLifetime??Rt.accessTokenLifetime,refreshTokenLifetime:at.refreshTokenLifetime??Rt.refreshTokenLifetime,authorizationCodeLifetime:at.authorizationCodeLifetime??Rt.authorizationCodeLifetime,requireClientSecret:at.requireClientSecret??Rt.requireClientSecret,requireState:at.requireState??Rt.requireState,allowedScopes:Ar,dynamicRegistration:{enabled:((Dt=at.dynamicRegistration)==null?void 0:Dt.enabled)??lt.enabled,allowedGrantTypes:le,requiresAuthentication:((Ht=at.dynamicRegistration)==null?void 0:Ht.requiresAuthentication)??lt.requiresAuthentication}})}else C(fu());Se.success&&((ft=(rt=Se.data)==null?void 0:rt.systemConfig)==null?void 0:ft.nameSeparator)!==void 0&&M(Se.data.systemConfig.nameSeparator),Se.success&&((xt=(Lt=Se.data)==null?void 0:Lt.systemConfig)==null?void 0:xt.enableSessionRebuild)!==void 0&&j(Se.data.systemConfig.enableSessionRebuild)}catch(Se){console.error("Failed to fetch settings:",Se),B(Se instanceof Error?Se.message:"Failed to fetch settings"),i(l("errors.failedToFetchSettings"))}finally{P(!1)}},[l,i]),F=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{routing:{[U]:te}});return K.success?(u({...o,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update routing config"),i(K.error||l("errors.failedToUpdateRoutingConfig")),!1)}catch(K){return console.error("Failed to update routing config:",K),B(K instanceof Error?K.message:"Failed to update routing config"),i(l("errors.failedToUpdateRoutingConfig")),!1}finally{P(!1)}},z=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{install:{[U]:te}});return K.success?(g({...p,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update install config"),i(K.error||l("errors.failedToUpdateInstallConfig")),!1)}catch(K){return console.error("Failed to update install config:",K),B(K instanceof Error?K.message:"Failed to update install config"),i(l("errors.failedToUpdateInstallConfig")),!1}finally{P(!1)}},Y=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{smartRouting:{[U]:te}});return K.success?(b({...h,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update smart routing config"),i(K.error||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(K){return console.error("Failed to update smart routing config:",K),B(K instanceof Error?K.message:"Failed to update smart routing config"),i(l("errors.failedToUpdateSmartRoutingConfig")),!1}finally{P(!1)}},I=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{smartRouting:U});return te.success?(b({...h,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update smart routing config"),i(te.error||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(te){return console.error("Failed to update smart routing config:",te),B(te instanceof Error?te.message:"Failed to update smart routing config"),i(l("errors.failedToUpdateSmartRoutingConfig")),!1}finally{P(!1)}},oe=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{routing:U});return te.success?(u({...o,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update routing config"),i(te.error||l("errors.failedToUpdateRoutingConfig")),!1)}catch(te){return console.error("Failed to update routing config:",te),B(te instanceof Error?te.message:"Failed to update routing config"),i(l("errors.failedToUpdateRoutingConfig")),!1}finally{P(!1)}},k=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{mcpRouter:{[U]:te}});return K.success?(A({...v,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update MCP Router config"),i(K.error||l("errors.failedToUpdateMCPRouterConfig")),!1)}catch(K){return console.error("Failed to update MCP Router config:",K),B(K instanceof Error?K.message:"Failed to update MCP Router config"),i(l("errors.failedToUpdateMCPRouterConfig")),!1}finally{P(!1)}},L=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{mcpRouter:U});return te.success?(A({...v,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update MCP Router config"),i(te.error||l("errors.failedToUpdateMCPRouterConfig")),!1)}catch(te){return console.error("Failed to update MCP Router config:",te),B(te instanceof Error?te.message:"Failed to update MCP Router config"),i(l("errors.failedToUpdateMCPRouterConfig")),!1}finally{P(!1)}},D=async(U,te)=>{P(!0),B(null);try{const K=await Ot("/system-config",{oauthServer:{[U]:te}});return K.success?(C({...R,[U]:te}),i(l("settings.systemConfigUpdated")),!0):(B(K.error||"Failed to update OAuth server config"),i(K.error||l("errors.failedToUpdateOAuthServerConfig")),!1)}catch(K){return console.error("Failed to update OAuth server config:",K),B(K instanceof Error?K.message:"Failed to update OAuth server config"),i(l("errors.failedToUpdateOAuthServerConfig")),!1}finally{P(!1)}},W=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{oauthServer:U});return te.success?(C({...R,...U}),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update OAuth server config"),i(te.error||l("errors.failedToUpdateOAuthServerConfig")),!1)}catch(te){return console.error("Failed to update OAuth server config:",te),B(te instanceof Error?te.message:"Failed to update OAuth server config"),i(l("errors.failedToUpdateOAuthServerConfig")),!1}finally{P(!1)}},G=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{nameSeparator:U});return te.success?(M(U),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update name separator"),i(te.error||l("errors.failedToUpdateNameSeparator")),!1)}catch(te){return console.error("Failed to update name separator:",te),B(te instanceof Error?te.message:"Failed to update name separator"),i(l("errors.failedToUpdateNameSeparator")),!1}finally{P(!1)}},N=async U=>{P(!0),B(null);try{const te=await Ot("/system-config",{enableSessionRebuild:U});return te.success?(j(U),i(l("settings.systemConfigUpdated")),!0):(B(te.error||"Failed to update session rebuild setting"),i(te.error||l("errors.failedToUpdateSessionRebuild")),!1)}catch(te){return console.error("Failed to update session rebuild setting:",te),B(te instanceof Error?te.message:"Failed to update session rebuild setting"),i(l("errors.failedToUpdateSessionRebuild")),!1}finally{P(!1)}},_=async U=>{P(!0),B(null);try{return await Xe(`/mcp-settings/export?serverName=${U||""}`)}catch(te){console.error("Failed to export MCP settings:",te);const K=te instanceof Error?te.message:"Failed to export MCP settings";B(K),i(K)}finally{P(!1)}};y.useEffect(()=>{me()},[me,Z]),y.useEffect(()=>{o&&f({bearerAuthKey:o.bearerAuthKey})},[o]);const q={routingConfig:o,tempRoutingConfig:m,setTempRoutingConfig:f,installConfig:p,smartRoutingConfig:h,mcpRouterConfig:v,oauthServerConfig:R,nameSeparator:T,enableSessionRebuild:E,loading:w,error:re,setError:B,triggerRefresh:se,fetchSettings:me,updateRoutingConfig:F,updateInstallConfig:z,updateSmartRoutingConfig:Y,updateSmartRoutingConfigBatch:I,updateRoutingConfigBatch:oe,updateMCPRouterConfig:k,updateMCPRouterConfigBatch:L,updateOAuthServerConfig:D,updateOAuthServerConfigBatch:W,updateNameSeparator:G,updateSessionRebuild:N,exportMCPSettings:_};return a.jsx(vg.Provider,{value:q,children:s})},bg=()=>{const{t:s}=je(),{theme:l,setTheme:i}=N1(),o=()=>{i(l==="light"?"dark":"light")};return a.jsx("button",{onClick:o,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none",title:s(l==="light"?"theme.dark":"theme.light"),"aria-label":s(l==="light"?"theme.dark":"theme.light"),children:l==="light"?a.jsx(Ab,{className:"h-5 w-5"}):a.jsx(Lb,{className:"h-5 w-5"})})},R1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:2,...s,children:[a.jsx("title",{children:l("common.language")}),a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2 12h20"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"})]})},Sg=()=>{const{i18n:s}=je(),[l,i]=y.useState(!1),[o,u]=y.useState(s.language),m=[{code:"en",label:"English"},{code:"zh",label:"中文"},{code:"fr",label:"Français"},{code:"tr",label:"Türkçe"}];y.useEffect(()=>{u(s.language)},[s.language]),y.useEffect(()=>{const g=h=>{h.target.closest(".language-dropdown")||i(!1)};return l&&document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[l]);const f=g=>{localStorage.setItem("i18nextLng",g),i(!1),window.location.reload()},p=()=>{i(!l)};return a.jsxs("div",{className:"relative language-dropdown",children:[a.jsx("button",{onClick:p,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":"Language Switcher",children:a.jsx(R1,{className:"h-5 w-5"})}),l&&a.jsx("div",{className:"absolute right-0 mt-2 w-24 bg-white dark:bg-gray-800 rounded-md shadow-lg border border-gray-200 dark:border-gray-700 z-50",children:a.jsx("div",{children:m.map(g=>a.jsx("button",{onClick:()=>f(g.code),className:`flex items-center w-full px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${o.startsWith(g.code)?"bg-blue-50 text-blue-700":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-100"}`,children:g.label},g.code))})})]})},M1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("common.github")}),a.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})},z1=({onToggleSidebar:s})=>{const{t:l}=je();return a.jsx("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:a.jsxs("div",{className:"flex justify-between items-center px-3 py-3",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("button",{onClick:s,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":l("app.toggleSidebar"),children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),a.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:l("app.title")})]}),a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 mr-2",children:"v0.11.4"}),a.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700","aria-label":"GitHub Repository",children:a.jsx(M1,{className:"h-5 w-5"})}),a.jsx(bg,{}),a.jsx(Sg,{})]})]})})},us=({permissions:s,fallback:l=null,children:i})=>wg(s)?a.jsx(a.Fragment,{children:i}):a.jsx(a.Fragment,{children:l}),wg=s=>{const{auth:l}=ps();if(!l.isAuthenticated||!l.user)return!1;const i=l.user.permissions||[];return s==="x"&&!i.includes("x")?!1:i.includes("*")||l.user.isAdmin?!0:(Array.isArray(s)?s:[s]).some(u=>i.includes(u))},O1="https://registry.npmjs.org",D1="@samanhappy/mcphub",jg=async()=>{try{const s=await fetch(`${O1}/${D1}/latest`);if(!s.ok)throw new Error(`Failed to fetch latest version: ${s.status}`);return(await s.json()).version||null}catch(s){return console.error("Error checking for latest version:",s),null}},Ng=(s,l)=>{if(s==="dev")return-1;const i=s.split(".").map(Number),o=l.split(".").map(Number);for(let u=0;u<3;u++){const m=i[u]||0,f=o[u]||0;if(m>f)return-1;if(m<f)return 1}return 0},L1=({isOpen:s,onClose:l,version:i})=>{const{t:o}=je(),[u,m]=y.useState(!1),[f,p]=y.useState(""),[g,h]=y.useState(!1),b=async()=>{h(!0);try{const v=await jg();v&&(p(v),m(Ng(i,v)>0))}catch(v){console.error("Failed to check for updates:",v)}finally{h(!1)}};return y.useEffect(()=>{s&&b()},[s,i]),s?a.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:a.jsxs("div",{className:"p-6 relative",children:[a.jsx("button",{onClick:l,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:a.jsx(cl,{className:"h-5 w-5"})}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("about.title")}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[o("about.currentVersion"),":"]}),a.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:i})]}),u&&f&&a.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:a.jsxs("div",{className:"flex items-start",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),a.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[a.jsx("p",{children:o("about.newVersionAvailable",{version:f})}),a.jsx("p",{className:"mt-1",children:a.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:o("about.viewOnGitHub")})})]})]})}),a.jsxs("button",{onClick:b,disabled:g,className:`mt-4 inline-flex items-center px-4 py-2 border border-gray-200 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium btn-secondary
|
|
196
|
+
${g?"text-gray-400 dark:text-gray-500 bg-gray-100 dark:bg-gray-800":"text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500`,children:[a.jsx(Rb,{className:`h-4 w-4 mr-2 ${g?"animate-spin":""}`}),o(g?"about.checking":"about.checkForUpdates")]})]})]})})}):null},U1=({open:s,onOpenChange:l})=>{const{i18n:i,t:o}=je();return s?a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:a.jsxs("div",{className:"p-6 relative",children:[a.jsx("button",{onClick:()=>l(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:a.jsx(cl,{className:"h-5 w-5"})}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("sponsor.title")}),a.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:i.language==="zh"?a.jsx("img",{src:"./assets/reward.png",alt:o("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):a.jsxs("div",{className:"text-center",children:[a.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:o("sponsor.supportMessage")}),a.jsx("a",{href:"https://ko-fi.com/samanhappy",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center bg-[#13C3FF] text-white px-4 py-2 rounded-md hover:bg-[#00A5E5] transition-colors",children:o("sponsor.supportButton")})]})})]})})}):null},P1=({open:s,onOpenChange:l})=>{const{t:i}=je();return s?a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:a.jsxs("div",{className:"p-6 relative",children:[a.jsx("button",{onClick:()=>l(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":i("common.close"),children:a.jsx(cl,{className:"h-5 w-5"})}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:i("wechat.title")}),a.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[a.jsx("img",{src:"./assets/wexin.png",alt:i("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),a.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:i("wechat.scanMessage")})]})]})})}):null},_1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("common.wechat")}),a.jsx("path",{d:"M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z"})]})},B1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("common.discord")}),a.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})]})},H1=s=>{const{t:l}=je();return a.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[a.jsx("title",{children:l("sponsor.label")}),a.jsx("path",{d:"M17.625 1.499c-2.32 0-4.354 1.203-5.625 3.03-1.271-1.827-3.305-3.03-5.625-3.03C3.129 1.499 0 4.253 0 8.249c0 4.275 3.068 7.847 5.828 10.227a33.14 33.14 0 0 0 5.616 3.876l.028.017.008.003-.001.003c.163.085.342.126.521.125.179.001.358-.041.521-.125l-.001-.003.008-.003.028-.017a33.14 33.14 0 0 0 5.616-3.876C20.932 16.096 24 12.524 24 8.249c0-3.996-3.129-6.75-6.375-6.75zm-.919 15.275a30.766 30.766 0 0 1-4.703 3.316l-.004-.002-.004.002a30.955 30.955 0 0 1-4.703-3.316c-2.677-2.307-5.047-5.298-5.047-8.523 0-2.754 2.121-4.5 4.125-4.5 2.06 0 3.914 1.479 4.544 3.684.143.495.596.797 1.086.796.49.001.943-.302 1.085-.796.63-2.205 2.484-3.684 4.544-3.684 2.004 0 4.125 1.746 4.125 4.5 0 3.225-2.37 6.216-5.048 8.523z"})]})},q1=({collapsed:s,version:l})=>{var Z;const{t:i,i18n:o}=je(),u=Vr(),{auth:m,logout:f}=ps(),[p,g]=y.useState(!1),[h,b]=y.useState(!1),[v,A]=y.useState(!1),[R,C]=y.useState(!1),[T,M]=y.useState(!1),E=y.useRef(null);y.useEffect(()=>{(async()=>{try{const se=await jg();se&&b(Ng(l,se)>0)}catch(se){console.error("Error checking for new version:",se)}})()},[l]),y.useEffect(()=>{const J=se=>{E.current&&!E.current.contains(se.target)&&g(!1)};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[]);const j=()=>{u("/settings"),g(!1)},w=()=>{f(),u("/login")},P=()=>{A(!0),g(!1)},re=()=>{C(!0),g(!1)},B=()=>{M(!0),g(!1)};return a.jsxs("div",{ref:E,className:"relative",children:[a.jsxs("button",{onClick:()=>g(!p),className:`flex ${s?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${p?"bg-gray-100 dark:bg-gray-700":""}`,children:[a.jsxs("div",{className:"flex-shrink-0 relative",children:[a.jsx("div",{className:"w-5 h-5 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700",children:a.jsx(sg,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),h&&a.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!s&&a.jsx("div",{className:"ml-3 flex flex-col items-start",children:a.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((Z=m.user)==null?void 0:Z.username)||i("auth.user")})})]}),p&&a.jsxs("div",{className:"absolute top-0 transform -translate-y-full left-0 w-full min-w-max bg-white border border-gray-200 dark:bg-gray-800 z-50",children:[a.jsxs("button",{onClick:re,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(H1,{className:"h-4 w-4 mr-2"}),i("sponsor.label")]}),o.language==="zh"?a.jsxs("button",{onClick:B,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(_1,{className:"h-4 w-4 mr-2"}),i("wechat.label")]}):a.jsxs("a",{href:"https://discord.gg/qMKNsn5Q",target:"_blank",rel:"noopener noreferrer",className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(B1,{className:"h-4 w-4 mr-2"}),i("discord.label")]}),a.jsxs("button",{onClick:j,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(zb,{className:"h-4 w-4 mr-2"}),i("nav.settings")]}),a.jsxs("button",{onClick:P,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 relative",children:[a.jsx(bb,{className:"h-4 w-4 mr-2"}),i("about.title"),h&&a.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),a.jsx("div",{className:"border-t border-gray-200 dark:border-gray-600"}),a.jsxs("button",{onClick:w,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[a.jsx(Cb,{className:"h-4 w-4 mr-2"}),i("app.logout")]})]}),a.jsx(L1,{isOpen:v,onClose:()=>A(!1),version:l}),a.jsx(U1,{open:R,onOpenChange:C}),a.jsx(P1,{open:T,onOpenChange:M})]})},G1=({collapsed:s})=>{var m;const{t:l}=je(),{auth:i}=ps(),o="0.11.4",u=[{path:"/",label:l("nav.dashboard"),icon:a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[a.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),a.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:l("nav.servers"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"})})},{path:"/groups",label:l("nav.groups"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"})})},...(m=i.user)!=null&&m.isAdmin&&wg("x")?[{path:"/users",label:l("nav.users"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"})})}]:[],{path:"/market",label:l("nav.market"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})})},{path:"/logs",label:l("nav.logs"),icon:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}];return a.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${s?"w-16":"w-64"}`,children:[a.jsx("div",{className:"overflow-y-auto flex-grow",children:a.jsx("nav",{className:"p-3 space-y-1",children:u.map(f=>a.jsxs(Kh,{to:f.path,className:({isActive:p})=>`flex items-center px-2.5 py-2 rounded-lg transition-colors duration-200
|
|
197
197
|
${p?"bg-blue-50 text-blue-700":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-100"}`,end:f.path==="/",children:[a.jsx("span",{className:"flex-shrink-0",children:f.icon}),!s&&a.jsx("span",{className:"ml-3",children:f.label})]},f.path))})}),a.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:a.jsx(q1,{collapsed:s,version:o})})]})},F1=({children:s})=>a.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:a.jsx("div",{className:"container mx-auto",children:s})}),I1=()=>{const[s,l]=nn.useState(!1),i=()=>{l(!s)};return a.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[a.jsx(z1,{onToggleSidebar:i}),a.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[a.jsx(G1,{collapsed:s}),a.jsx(F1,{children:a.jsx(Bh,{})})]})]})},K1=({redirectPath:s="/login"})=>{const{t:l}=je(),{auth:i}=ps();return i.loading?a.jsx("div",{className:"flex items-center justify-center h-screen",children:l("app.loading")}):i.isAuthenticated?a.jsx(Bh,{}):a.jsx(_i,{to:s,replace:!0})},V1=({isOpen:s,onClose:l})=>{const{t:i}=je(),o=Vr();if(!s)return null;const u=()=>{l(),o("/settings"),setTimeout(()=>{const p=document.querySelector('[data-section="password"]');if(p){p.scrollIntoView({behavior:"smooth",block:"start"});const g=p.querySelector('[role="button"]');g&&!p.querySelector(".mt-4")&&g.click()}},100)},m=p=>{p.target===p.currentTarget&&l()},f=p=>{p.key==="Escape"&&l()};return a.jsx("div",{className:"fixed inset-0 bg-black/50 z-[100] flex items-center justify-center p-4",onClick:m,onKeyDown:f,tabIndex:-1,children:a.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-md w-full transform transition-all duration-200 ease-out",role:"dialog","aria-modal":"true","aria-labelledby":"password-warning-title","aria-describedby":"password-warning-message",children:a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("svg",{className:"w-6 h-6 text-yellow-600 dark:text-yellow-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h3",{id:"password-warning-title",className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:i("auth.defaultPasswordWarning")}),a.jsx("p",{id:"password-warning-message",className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:i("auth.defaultPasswordMessage")})]})]}),a.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[a.jsx("button",{onClick:l,className:"px-4 py-2 text-gray-600 dark:text-gray-300 hover:text-gray-800 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors duration-150 btn-secondary",children:i("common.cancel")}),a.jsx("button",{onClick:u,className:"px-4 py-2 bg-yellow-600 hover:bg-yellow-700 text-white rounded-md transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-500 btn-warning",autoFocus:!0,children:i("auth.goToSettings")})]})]})})})},$1=s=>{if(!s)return null;try{const l=typeof window<"u"?window.location.origin:"http://localhost",i=new URL(s,l);return i.origin!==l?null:`${i.pathname}${i.search}${i.hash}`||"/"}catch{return s.startsWith("/")&&!s.startsWith("//")?s:null}},Y1=()=>{const{t:s}=je(),[l,i]=y.useState(""),[o,u]=y.useState(""),[m,f]=y.useState(null),[p,g]=y.useState(!1),[h,b]=y.useState(!1),{login:v}=ps(),A=Kr(),R=Vr(),C=y.useMemo(()=>{const w=new URLSearchParams(A.search);return $1(w.get("returnUrl"))},[A.search]),T=y.useCallback(()=>{if(!C)return"/";if(!C.startsWith("/oauth/authorize"))return C;const w=un();if(!w)return C;try{const P=window.location.origin,re=new URL(C,P);return re.searchParams.set("token",w),`${re.pathname}${re.search}${re.hash}`}catch{const P=C.includes("?")?"&":"?";return`${C}${P}token=${encodeURIComponent(w)}`}},[C]),M=y.useCallback(()=>{C?window.location.assign(T()):R("/")},[T,R,C]),E=async w=>{w.preventDefault(),f(null),g(!0);try{if(!l||!o){f(s("auth.emptyFields")),g(!1);return}const P=await v(l,o);P.success?P.isUsingDefaultPassword?b(!0):M():f(s("auth.loginFailed"))}catch{f(s("auth.loginError"))}finally{g(!1)}},j=()=>{b(!1),M()};return a.jsxs("div",{className:"relative min-h-screen w-full overflow-hidden bg-gray-50 dark:bg-gray-950",children:[a.jsxs("div",{className:"absolute top-4 right-4 z-20 flex items-center gap-2",children:[a.jsx(bg,{}),a.jsx(Sg,{})]}),a.jsx("div",{className:"pointer-events-none absolute inset-0 -z-10 opacity-60 dark:opacity-70",style:{backgroundImage:"radial-gradient(60rem 60rem at 20% -10%, rgba(99,102,241,0.25), transparent), radial-gradient(50rem 50rem at 120% 10%, rgba(168,85,247,0.15), transparent)"}}),a.jsx("div",{className:"pointer-events-none absolute inset-0 -z-10",children:a.jsxs("svg",{className:"h-full w-full opacity-[0.08] dark:opacity-[0.12]",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("defs",{children:a.jsx("pattern",{id:"grid",width:"32",height:"32",patternUnits:"userSpaceOnUse",children:a.jsx("path",{d:"M 32 0 L 0 0 0 32",fill:"none",stroke:"currentColor",strokeWidth:"0.5"})})}),a.jsx("rect",{width:"100%",height:"100%",fill:"url(#grid)",className:"text-gray-400 dark:text-gray-300"})]})}),a.jsx("div",{className:"relative mx-auto flex min-h-screen w-full max-w-md items-center justify-center px-6 py-16",children:a.jsxs("div",{className:"w-full space-y-16",children:[a.jsx("div",{className:"flex justify-center w-full",children:a.jsx("h1",{className:"text-5xl sm:text-5xl font-extrabold leading-tight tracking-tight text-gray-900 dark:text-white whitespace-nowrap",children:a.jsx("span",{className:"bg-gradient-to-r from-indigo-400 via-cyan-400 to-emerald-400 bg-clip-text text-transparent",children:s("auth.slogan")})})}),a.jsxs("div",{className:"login-card relative w-full rounded-2xl border border-white/10 bg-white/60 p-8 shadow-xl backdrop-blur-md transition dark:border-white/10 dark:bg-gray-900/60",children:[a.jsx("div",{className:"absolute -top-24 right-12 h-40 w-40 -translate-y-6 rounded-full bg-indigo-500/30 blur-3xl"}),a.jsx("div",{className:"absolute -bottom-24 -left-12 h-40 w-40 translate-y-6 rounded-full bg-cyan-500/20 blur-3xl"}),a.jsxs("form",{className:"mt-4 space-y-4",onSubmit:E,children:[a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"username",className:"sr-only",children:s("auth.username")}),a.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,className:"login-input appearance-none relative block w-full rounded-md border border-gray-300/60 bg-white/70 px-3 py-3 text-gray-900 shadow-sm outline-none ring-0 transition-all placeholder:text-gray-500 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500 dark:border-gray-700/60 dark:bg-gray-800/70 dark:text-white dark:placeholder:text-gray-400",placeholder:s("auth.username"),value:l,onChange:w=>i(w.target.value)})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"sr-only",children:s("auth.password")}),a.jsx("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:"login-input appearance-none relative block w-full rounded-md border border-gray-300/60 bg-white/70 px-3 py-3 text-gray-900 shadow-sm outline-none ring-0 transition-all placeholder:text-gray-500 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500 dark:border-gray-700/60 dark:bg-gray-800/70 dark:text-white dark:placeholder:text-gray-400",placeholder:s("auth.password"),value:o,onChange:w=>u(w.target.value)})]})]}),m&&a.jsx("div",{className:"error-box rounded border border-red-500/20 bg-red-500/10 p-2 text-center text-sm text-red-600 dark:text-red-400",children:m}),a.jsx("div",{children:a.jsx("button",{type:"submit",disabled:p,className:"login-button btn-primary group relative flex w-full items-center justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-all hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-70",children:s(p?"auth.loggingIn":"auth.login")})})]})]})]})}),a.jsx(V1,{isOpen:h,onClose:j})]})},pl=s=>{const l=A1(),{refreshIfNeeded:i}=l;return y.useEffect(()=>{s!=null&&s.refreshOnMount&&i()},[s==null?void 0:s.refreshOnMount,i]),l},J1=()=>{const{t:s}=je(),{servers:l,error:i,setError:o,isLoading:u}=pl({refreshOnMount:!0}),m={total:l.length,online:l.filter(p=>p.status==="connected").length,offline:l.filter(p=>p.status==="disconnected").length,connecting:l.filter(p=>p.status==="connecting").length,oauthRequired:l.filter(p=>p.status==="oauth_required").length},f={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting",oauth_required:"status.oauthRequired"};return a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:s("pages.dashboard.title")}),i&&a.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm error-box",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-status-red text-lg font-medium",children:s("app.error")}),a.jsx("p",{className:"text-gray-600 mt-1",children:i})]}),a.jsx("button",{onClick:()=>o(null),className:"ml-4 text-gray-500 hover:text-gray-700 transition-colors duration-200","aria-label":s("app.closeButton"),children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),u&&a.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center loading-container",children:a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}),!u&&a.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[a.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800 icon-container status-icon-blue",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})})}),a.jsxs("div",{className:"ml-4",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.totalServers")}),a.jsx("p",{className:"text-3xl font-bold text-gray-900",children:m.total})]})]})}),a.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800 icon-container status-icon-green",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),a.jsxs("div",{className:"ml-4",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.onlineServers")}),a.jsx("p",{className:"text-3xl font-bold text-gray-900",children:m.online})]})]})}),a.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800 icon-container status-icon-red",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),a.jsxs("div",{className:"ml-4",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.offlineServers")}),a.jsx("p",{className:"text-3xl font-bold text-gray-900",children:m.offline})]})]})}),a.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800 icon-container status-icon-yellow",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),a.jsxs("div",{className:"ml-4",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.connectingServers")}),a.jsx("p",{className:"text-3xl font-bold text-gray-900",children:m.connecting})]})]})})]}),l.length>0&&!u&&a.jsxs("div",{className:"mt-8",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:s("pages.dashboard.recentServers")}),a.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden table-container",children:a.jsxs("table",{className:"min-w-full",children:[a.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.name")}),a.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.status")}),a.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.tools")}),a.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.prompts")}),a.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.enabled")})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:l.slice(0,5).map((p,g)=>{var h,b;return a.jsxs("tr",{children:[a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:p.name}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:a.jsxs("span",{className:`px-2 py-1 inline-flex text-xs leading-5 font-semibold rounded-full ${p.status==="connected"?"status-badge-online":p.status==="disconnected"?"status-badge-offline":p.status==="oauth_required"?"status-badge-oauth-required":"status-badge-connecting"}`,children:[p.status==="oauth_required"&&"🔐 ",s(f[p.status]||p.status)]})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((h=p.tools)==null?void 0:h.length)||0}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((b=p.prompts)==null?void 0:b.length)||0}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:p.enabled!==!1?a.jsx("span",{className:"text-green-600",children:"✓"}):a.jsx("span",{className:"text-status-red",children:"✗"})})]},g)})})]})})]})]})},X1="modulepreload",Q1=function(s,l){return new URL(s,l).href},nh={},lh=function(l,i,o){let u=Promise.resolve();if(i&&i.length>0){let f=function(b){return Promise.all(b.map(v=>Promise.resolve(v).then(A=>({status:"fulfilled",value:A}),A=>({status:"rejected",reason:A}))))};const p=document.getElementsByTagName("link"),g=document.querySelector("meta[property=csp-nonce]"),h=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));u=f(i.map(b=>{if(b=Q1(b,o),b in nh)return;nh[b]=!0;const v=b.endsWith(".css"),A=v?'[rel="stylesheet"]':"";if(!!o)for(let T=p.length-1;T>=0;T--){const M=p[T];if(M.href===b&&(!v||M.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${A}`))return;const C=document.createElement("link");if(C.rel=v?"stylesheet":X1,v||(C.as="script"),C.crossOrigin="",C.href=b,h&&C.setAttribute("nonce",h),document.head.appendChild(C),v)return new Promise((T,M)=>{C.addEventListener("load",T),C.addEventListener("error",()=>M(new Error(`Unable to preload CSS for ${b}`)))})}))}function m(f){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=f,window.dispatchEvent(p),!p.defaultPrevented)throw f}return u.then(f=>{for(const p of f||[])p.status==="rejected"&&m(p.reason);return l().catch(m)})},Z1={default:"bg-blue-500 text-white hover:bg-blue-600",secondary:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600",outline:"bg-transparent border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800",destructive:"bg-red-500 text-white hover:bg-red-600"};function zi({children:s,variant:l="default",className:i,onClick:o}){return a.jsx("span",{className:ga("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",Z1[l],o?"cursor-pointer":"",i),onClick:o,children:s})}const W1=({status:s,onAuthClick:l})=>{const{t:i}=je(),o={connecting:"status-badge-connecting",connected:"status-badge-online",disconnected:"status-badge-offline",oauth_required:"status-badge-oauth-required"},u={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting",oauth_required:"status.oauthRequired"},m=s==="oauth_required";return a.jsxs("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${o[s]} ${m&&l?"cursor-pointer hover:opacity-80":""}`,onClick:m&&l?f=>l(f):void 0,title:m?i("status.clickToAuthorize"):void 0,children:[m&&"🔐 ",i(u[s]||s)]})},Cg=async(s,l)=>{try{const i=l?`/tools/${encodeURIComponent(l)}/${encodeURIComponent(s.toolName)}`:"/tools/call",o=await Tt(i,s.arguments,{headers:{Authorization:`Bearer ${localStorage.getItem("mcphub_token")}`}});return o.success===!1?{success:!1,error:o.message||"Tool call failed"}:{success:!0,content:(o==null?void 0:o.content)||[]}}catch(i){return console.error("Error calling tool:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}},e2=async(s,l,i)=>{try{const o=await Tt(`/servers/${encodeURIComponent(s)}/tools/${encodeURIComponent(l)}/toggle`,{enabled:i},{headers:{Authorization:`Bearer ${localStorage.getItem("mcphub_token")}`}});return{success:o.success,error:o.success?void 0:o.message}}catch(o){return console.error("Error toggling tool:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error occurred"}}},kg=async(s,l,i)=>{try{const o=await Ot(`/servers/${encodeURIComponent(s)}/tools/${encodeURIComponent(l)}/description`,{description:i},{headers:{Authorization:`Bearer ${localStorage.getItem("mcphub_token")}`}});return{success:o.success,error:o.success?void 0:o.message}}catch(o){return console.error("Error updating tool description:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error occurred"}}},t2=Object.freeze(Object.defineProperty({__proto__:null,callTool:Cg,toggleTool:e2,updateToolDescription:kg},Symbol.toStringTag,{value:"Module"})),gs=()=>E1(),fr=({checked:s,onCheckedChange:l,disabled:i=!1})=>a.jsx("button",{type:"button",role:"switch","aria-checked":s,disabled:i,className:ga("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",s?"bg-blue-200":"bg-gray-100",i?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!i&&l(!s),children:a.jsx("span",{className:ga("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",s?"translate-x-6":"translate-x-1")})}),Ag=({schema:s,onSubmit:l,onCancel:i,loading:o=!1,storageKey:u,title:m})=>{const{t:f}=je(),[p,g]=y.useState({}),[h,b]=y.useState({}),[v,A]=y.useState(!1),[R,C]=y.useState(""),[T,M]=y.useState(""),E=y.useMemo(()=>(z=>{const Y=I=>{if(typeof I=="object"&&I!==null){const oe=I;return{type:oe.type||"string",description:oe.description,enum:oe.enum,default:oe.default,properties:oe.properties?Object.fromEntries(Object.entries(oe.properties).map(([k,L])=>[k,Y(L)])):void 0,required:oe.required,items:oe.items?Y(oe.items):void 0}}return{type:"string"}};return{type:z.type,properties:z.properties?Object.fromEntries(Object.entries(z.properties).map(([I,oe])=>[I,Y(oe)])):void 0,required:z.required}})(s),[s]);y.useEffect(()=>{const F=(Y,I="")=>{const oe={};return Y.type==="object"&&Y.properties&&Object.entries(Y.properties).forEach(([k,L])=>{const D=I?`${I}.${k}`:k;L.default!==void 0?oe[k]=L.default:L.type==="string"?oe[k]="":L.type==="number"||L.type==="integer"?oe[k]=0:L.type==="boolean"?oe[k]=!1:L.type==="array"?oe[k]=[]:L.type==="object"&&(L.properties?oe[k]=F(L,D):oe[k]={})}),oe};let z=F(E);if(u)try{const Y=localStorage.getItem(u);if(Y){const I=JSON.parse(Y);z={...z,...I}}}catch(Y){console.warn("Failed to load saved form data:",Y)}g(z)},[E,u]),y.useEffect(()=>{v&&Object.keys(p).length>0&&(C(JSON.stringify(p,null,2)),M(""))},[v,p]);const j=F=>{C(F),M("");try{const z=JSON.parse(F);if(g(z),u)try{localStorage.setItem(u,JSON.stringify(z))}catch(Y){console.warn("Failed to save form data to localStorage:",Y)}}catch{M(f("tool.invalidJsonFormat"))}},w=()=>{C(JSON.stringify(p,null,2)),M(""),A(!0)},P=()=>{if(R.trim())try{const F=JSON.parse(R);g(F),M(""),A(!1)}catch{M(f("tool.fixJsonBeforeSwitching"));return}else A(!1)},re=(F,z)=>{g(Y=>{const I={...Y},oe=F.split(".");let k=I;for(let L=0;L<oe.length-1;L++)k[oe[L]]||(k[oe[L]]={}),k=k[oe[L]];if(k[oe[oe.length-1]]=z,u)try{localStorage.setItem(u,JSON.stringify(I))}catch(L){console.warn("Failed to save form data to localStorage:",L)}return I}),h[F]&&b(Y=>{const I={...Y};return delete I[F],I})},B=()=>{const F={},z=(Y,I,oe="")=>{Y.type==="object"&&Y.properties&&Object.entries(Y.properties).forEach(([k,L])=>{var G;const D=oe?`${oe}.${k}`:k,W=J(I,D);if((G=Y.required)!=null&&G.includes(k)&&(W==null||W==="")){F[D]=`${k} is required`;return}W!=null&&W!==""&&(L.type==="string"&&typeof W!="string"?F[D]=`${k} must be a string`:L.type==="number"&&typeof W!="number"?F[D]=`${k} must be a number`:L.type==="integer"&&(!Number.isInteger(W)||typeof W!="number")?F[D]=`${k} must be an integer`:L.type==="boolean"&&typeof W!="boolean"?F[D]=`${k} must be a boolean`:L.type==="array"&&Array.isArray(W)?L.items&&W.forEach((N,_)=>{var q;((q=L.items)==null?void 0:q.type)==="object"&&L.items.properties&&z(L.items,N,`${D}.${_}`)}):L.type==="object"&&typeof W=="object"&&z(L,W,D))})};return z(E,p),b(F),Object.keys(F).length===0},Z=F=>{F.preventDefault(),B()&&l(p)},J=(F,z)=>z.split(".").reduce((Y,I)=>Y==null?void 0:Y[I],F),se=(F,z,Y,I)=>{const oe=Y==null?void 0:Y[F];return z.type==="string"?z.enum?a.jsxs("select",{value:oe||"",onChange:k=>I(k.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[a.jsx("option",{value:"",children:f("tool.selectOption")}),z.enum.map((k,L)=>a.jsx("option",{value:k,children:k},L))]}):a.jsx("input",{type:"text",value:oe||"",onChange:k=>I(k.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500 form-input",placeholder:z.description||f("tool.enterKey",{key:F})}):z.type==="number"||z.type==="integer"?a.jsx("input",{type:"number",step:z.type==="integer"?"1":"any",value:oe??"",onChange:k=>{const L=k.target.value===""?"":z.type==="integer"?parseInt(k.target.value):parseFloat(k.target.value);I(L)},className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500 form-input"}):z.type==="boolean"?a.jsx("input",{type:"checkbox",checked:oe||!1,onChange:k=>I(k.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}):a.jsx("input",{type:"text",value:oe||"",onChange:k=>I(k.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500 form-input",placeholder:z.description||f("tool.enterKey",{key:F})})},me=(F,z,Y="")=>{var L,D,W,G,N,_,q,U,te,K,$,fe,pe,Ne;const I=Y?`${Y}.${F}`:F,oe=J(p,I),k=h[I];if(z.type==="array"){const ye=J(p,I)||[];return a.jsxs("div",{className:"mb-6",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[F,(Y?(D=(L=J(E,Y))==null?void 0:L.required)==null?void 0:D.includes(F):(W=E.required)==null?void 0:W.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:z.description}),a.jsxs("div",{className:"border border-gray-200 rounded-md p-3 bg-gray-50",children:[ye.map((Me,He)=>{var Ye,Dt,Ht;return a.jsxs("div",{className:"mb-3 p-3 bg-white border rounded-md",children:[a.jsxs("div",{className:"flex justify-between items-center mb-2",children:[a.jsx("span",{className:"text-sm font-medium text-gray-600",children:f("tool.item",{index:He+1})}),a.jsx("button",{type:"button",onClick:()=>{const rt=[...ye];rt.splice(He,1),re(I,rt)},className:"text-status-red hover:text-red-700 text-sm",children:f("common.remove")})]}),((Ye=z.items)==null?void 0:Ye.type)==="string"&&z.items.enum?a.jsxs("select",{value:Me||"",onChange:rt=>{const ft=[...ye];ft[He]=rt.target.value,re(I,ft)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[a.jsx("option",{value:"",children:f("tool.selectOption")}),z.items.enum.map((rt,ft)=>a.jsx("option",{value:rt,children:rt},ft))]}):((Dt=z.items)==null?void 0:Dt.type)==="object"&&z.items.properties?a.jsx("div",{className:"space-y-3",children:Object.entries(z.items.properties).map(([rt,ft])=>{var Lt,xt;return a.jsxs("div",{children:[a.jsxs("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:[rt,((xt=(Lt=z.items)==null?void 0:Lt.required)==null?void 0:xt.includes(rt))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),se(rt,ft,Me,Se=>{const at=[...ye];at[He]={...at[He],[rt]:Se},re(I,at)})]},rt)})}):a.jsx("input",{type:"text",value:Me||"",onChange:rt=>{const ft=[...ye];ft[He]=rt.target.value,re(I,ft)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",placeholder:f("tool.enterValue",{type:((Ht=z.items)==null?void 0:Ht.type)||"value"})})]},He)}),a.jsx("button",{type:"button",onClick:()=>{var He;const Me=((He=z.items)==null?void 0:He.type)==="object"?{}:"";re(I,[...ye,Me])},className:"w-full mt-2 px-3 py-2 text-sm text-blue-600 border border-blue-300 rounded-md hover:bg-blue-50",children:f("tool.addItem",{key:F})})]}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I)}return z.type==="object"?z.properties?a.jsxs("div",{className:"mb-6",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[F,(Y?(N=(G=J(E,Y))==null?void 0:G.required)==null?void 0:N.includes(F):(_=E.required)==null?void 0:_.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:z.description}),a.jsx("div",{className:"border border-gray-200 rounded-md p-4 bg-gray-50",children:Object.entries(z.properties).map(([ye,Me])=>me(ye,Me,I))}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I):a.jsxs("div",{className:"mb-4",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[F,(Y?(U=(q=J(E,Y))==null?void 0:q.required)==null?void 0:U.includes(F):(te=E.required)==null?void 0:te.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"}),a.jsx("span",{className:"text-xs text-gray-500 ml-1",children:"(JSON object)"})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:z.description}),a.jsx("textarea",{value:typeof oe=="object"?JSON.stringify(oe,null,2):oe||"{}",onChange:ye=>{try{const Me=JSON.parse(ye.target.value);re(I,Me)}catch{re(I,ye.target.value)}},placeholder:`{
|
|
198
198
|
"key": "value"
|
|
199
199
|
}`,className:`w-full border rounded-md px-3 py-2 font-mono text-sm ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,rows:4}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I):z.type==="string"?z.enum?a.jsxs("div",{className:"mb-4",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[F,(Y?!1:(K=E.required)==null?void 0:K.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:z.description}),a.jsxs("select",{value:oe||"",onChange:ye=>re(I,ye.target.value),className:`w-full border rounded-md px-3 py-2 ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[a.jsx("option",{value:"",children:f("tool.selectOption")}),z.enum.map((ye,Me)=>a.jsx("option",{value:ye,children:ye},Me))]}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I):a.jsxs("div",{className:"mb-4",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[F,(Y?!1:($=E.required)==null?void 0:$.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:z.description}),a.jsx("input",{type:"text",value:oe||"",onChange:ye=>re(I,ye.target.value),className:`w-full border rounded-md px-3 py-2 ${k?"border-red":"border-gray-200"} focus:outline-none form-input`}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I):z.type==="number"||z.type==="integer"?a.jsxs("div",{className:"mb-4",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[F,(Y?!1:(fe=E.required)==null?void 0:fe.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:z.description}),a.jsx("input",{type:"number",step:z.type==="integer"?"1":"any",value:oe??"",onChange:ye=>{const Me=ye.target.value===""?"":z.type==="integer"?parseInt(ye.target.value):parseFloat(ye.target.value);re(I,Me)},className:`w-full border rounded-md px-3 py-2 form-input ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I):z.type==="boolean"?a.jsxs("div",{className:"mb-4",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("input",{type:"checkbox",checked:oe||!1,onChange:ye=>re(I,ye.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),a.jsxs("label",{className:"ml-2 block text-sm text-gray-700",children:[F,(Y?!1:(pe=E.required)==null?void 0:pe.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"})]})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:z.description}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I):a.jsxs("div",{className:"mb-4",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[F,(Y?!1:(Ne=E.required)==null?void 0:Ne.includes(F))&&a.jsx("span",{className:"text-status-red ml-1",children:"*"}),a.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",z.type,")"]})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:z.description}),a.jsx("input",{type:"text",value:oe||"",onChange:ye=>re(I,ye.target.value),placeholder:f("tool.enterValue",{type:z.type}),className:`w-full border rounded-md px-3 py-2 ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500 form-input`}),k&&a.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},I)};return E.properties?a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-center pb-3",children:[a.jsx("h6",{className:"text-md font-medium text-gray-900",children:m}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsx("button",{type:"button",onClick:P,className:`px-3 py-1 text-sm rounded-md transition-colors ${v?"text-sm text-gray-600 bg-gray-200 rounded hover:bg-gray-300 btn-secondary":"bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm btn-primary"}`,children:f("tool.formMode")}),a.jsx("button",{type:"button",onClick:w,className:`px-3 py-1 text-sm rounded-md transition-colors ${v?"px-4 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm btn-primary":"text-sm text-gray-600 bg-gray-200 rounded hover:bg-gray-300 btn-secondary"}`,children:f("tool.jsonMode")})]})]}),v?a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:f("tool.jsonConfiguration")}),a.jsx("textarea",{value:R,onChange:F=>j(F.target.value),placeholder:`{
|
|
@@ -248,4 +248,4 @@ HTTP example:
|
|
|
248
248
|
`+M.join(`
|
|
249
249
|
`)),T>0&&s()}catch(T){console.error("Import error:",T),f(i("jsonImport.importFailed"))}finally{g(!1)}}};return a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[a.jsxs("div",{className:"flex justify-between items-center mb-6",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:i("jsonImport.title")}),a.jsx("button",{onClick:l,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),m&&a.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:a.jsx("p",{className:"text-red-700 whitespace-pre-wrap",children:m})}),h?a.jsxs("div",{children:[a.jsxs("div",{className:"mb-4",children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:i("jsonImport.previewTitle")}),a.jsx("div",{className:"space-y-3",children:h.map((T,M)=>a.jsx("div",{className:"bg-gray-50 p-4 rounded-lg border border-gray-200",children:a.jsx("div",{className:"flex items-start justify-between",children:a.jsxs("div",{className:"flex-1",children:[a.jsx("h4",{className:"font-medium text-gray-900",children:T.name}),a.jsxs("div",{className:"mt-2 space-y-1 text-sm text-gray-600",children:[a.jsxs("div",{children:[a.jsxs("strong",{children:[i("server.type"),":"]})," ",T.config.type||"stdio"]}),T.config.command&&a.jsxs("div",{children:[a.jsxs("strong",{children:[i("server.command"),":"]})," ",T.config.command]}),T.config.args&&T.config.args.length>0&&a.jsxs("div",{children:[a.jsxs("strong",{children:[i("server.arguments"),":"]})," ",T.config.args.join(" ")]}),T.config.url&&a.jsxs("div",{children:[a.jsxs("strong",{children:[i("server.url"),":"]})," ",T.config.url]}),T.config.env&&Object.keys(T.config.env).length>0&&a.jsxs("div",{children:[a.jsxs("strong",{children:[i("server.envVars"),":"]})," ",Object.keys(T.config.env).join(", ")]}),T.config.headers&&Object.keys(T.config.headers).length>0&&a.jsxs("div",{children:[a.jsxs("strong",{children:[i("server.headers"),":"]})," ",Object.keys(T.config.headers).join(", ")]})]})]})})},M))})]}),a.jsxs("div",{className:"flex justify-end space-x-4",children:[a.jsx("button",{onClick:()=>b(null),disabled:p,className:"px-4 py-2 text-gray-700 bg-gray-200 rounded hover:bg-gray-300 disabled:opacity-50 btn-secondary",children:i("common.back")}),a.jsx("button",{onClick:C,disabled:p,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 flex items-center btn-primary",children:p?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i("jsonImport.importing")]}):i("jsonImport.import")})]})]}):a.jsxs("div",{children:[a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:i("jsonImport.inputLabel")}),a.jsx("textarea",{value:o,onChange:T=>u(T.target.value),className:"w-full h-96 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono text-sm",placeholder:v}),a.jsx("p",{className:"text-xs text-gray-500 mt-2",children:i("jsonImport.inputHelp")})]}),a.jsxs("div",{className:"flex justify-end space-x-4",children:[a.jsx("button",{onClick:l,className:"px-4 py-2 text-gray-700 bg-gray-200 rounded hover:bg-gray-300 btn-secondary",children:i("common.cancel")}),a.jsx("button",{onClick:R,disabled:!o.trim(),className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 btn-primary",children:i("jsonImport.preview")})]})]})]})})},p2=()=>{const{t:s}=je(),l=Vr(),{servers:i,error:o,setError:u,isLoading:m,handleServerAdd:f,handleServerEdit:p,handleServerRemove:g,handleServerToggle:h,handleServerReload:b,triggerRefresh:v}=pl({refreshOnMount:!0}),[A,R]=y.useState(null),[C,T]=y.useState(!1),[M,E]=y.useState(!1),[j,w]=y.useState(!1),P=async se=>{const me=await p(se);me&&R(me)},re=()=>{R(null),v()},B=async()=>{T(!0);try{v(),await new Promise(se=>setTimeout(se,500))}finally{T(!1)}},Z=se=>{E(!1),v()},J=()=>{w(!1),v()};return a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between items-center mb-8",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.servers.title")}),a.jsxs("div",{className:"flex space-x-4",children:[a.jsxs("button",{onClick:()=>l("/market"),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3z"})}),s("nav.market")]}),a.jsx(c2,{onAdd:f}),a.jsxs("button",{onClick:()=>w(!0),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM6.293 6.707a1 1 0 010-1.414l3-3a1 1 0 011.414 0l3 3a1 1 0 01-1.414 1.414L11 5.414V13a1 1 0 11-2 0V5.414L7.707 6.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}),s("jsonImport.button")]}),a.jsxs("button",{onClick:()=>E(!0),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M5.5 13a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 13H11V9.413l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.413V13H5.5z"})}),s("dxt.upload")]}),a.jsxs("button",{onClick:B,disabled:C,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200 ${C?"opacity-70 cursor-not-allowed":""}`,children:[C?a.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})}),s("common.refresh")]})]})]}),o&&a.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm error-box",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{children:a.jsx("p",{className:"text-gray-600 mt-1",children:o})}),a.jsx("button",{onClick:()=>u(null),className:"ml-4 text-gray-500 hover:text-gray-700 transition-colors duration-200 btn-secondary","aria-label":s("app.closeButton"),children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),m?a.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center loading-container",children:a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):i.length===0?a.jsx("div",{className:"bg-white shadow rounded-lg p-6 empty-state",children:a.jsx("p",{className:"text-gray-600",children:s("app.noServers")})}):a.jsx("div",{className:"space-y-6",children:i.map((se,me)=>a.jsx(o2,{server:se,onRemove:g,onEdit:P,onToggle:h,onRefresh:v,onReload:b},me))}),A&&a.jsx(u2,{server:A,onEdit:re,onCancel:()=>R(null)}),M&&a.jsx(m2,{onSuccess:Z,onCancel:()=>E(!1)}),j&&a.jsx(f2,{onSuccess:J,onCancel:()=>w(!1)})]})},Iu=()=>{const{t:s}=je(),[l,i]=y.useState([]),[o,u]=y.useState(!0),[m,f]=y.useState(null),[p,g]=y.useState(0),h=y.useCallback(async()=>{try{u(!0);const E=await Xe("/groups");E&&E.success&&Array.isArray(E.data)?i(E.data):(console.error("Invalid group data format:",E),i([])),f(null)}catch(E){console.error("Error fetching groups:",E),f(E instanceof Error?E.message:"Failed to fetch groups"),i([])}finally{u(!1)}},[]),b=y.useCallback(()=>{g(E=>E+1)},[]),v=async(E,j,w=[])=>{try{const P=await Tt("/groups",{name:E,description:j,servers:w});return console.log("Group created successfully:",P),!P||!P.success?(f((P==null?void 0:P.message)||s("groups.createError")),P):(b(),P||null)}catch(P){return f(P instanceof Error?P.message:"Failed to create group"),null}},A=async(E,j)=>{try{const w=await Ot(`/groups/${E}`,j);return!w||!w.success?(f((w==null?void 0:w.message)||s("groups.updateError")),w):(b(),w||null)}catch(w){return f(w instanceof Error?w.message:"Failed to update group"),null}},R=async(E,j)=>{try{const w=await Ot(`/groups/${E}/servers/batch`,{servers:j});return!w||!w.success?(f((w==null?void 0:w.message)||s("groups.updateError")),null):(b(),w.data||null)}catch(w){return f(w instanceof Error?w.message:"Failed to update group servers"),null}},C=async E=>{try{const j=await il(`/groups/${E}`);return!j||!j.success?(f((j==null?void 0:j.message)||s("groups.deleteError")),j):(b(),j)}catch(j){return f(j instanceof Error?j.message:"Failed to delete group"),null}},T=async(E,j)=>{try{const w=await Tt(`/groups/${E}/servers`,{serverName:j});return!w||!w.success?(f((w==null?void 0:w.message)||s("groups.serverAddError")),null):(b(),w.data||null)}catch(w){return f(w instanceof Error?w.message:"Failed to add server to group"),null}},M=async(E,j)=>{try{const w=await il(`/groups/${E}/servers/${j}`);return!w||!w.success?(f((w==null?void 0:w.message)||s("groups.serverRemoveError")),null):(b(),w.data||null)}catch(w){return f(w instanceof Error?w.message:"Failed to remove server from group"),null}};return y.useEffect(()=>{h()},[h,p]),{groups:l,loading:o,error:m,setError:f,triggerRefresh:b,createGroup:v,updateGroup:A,updateGroupServers:R,deleteGroup:C,addServerToGroup:T,removeServerFromGroup:M}},Mg=({servers:s,value:l,onChange:i,className:o})=>{const{t:u}=je(),{nameSeparator:m}=gs(),[f,p]=y.useState(new Set),g=nn.useMemo(()=>l.map(j=>typeof j=="string"?{name:j,tools:"all"}:{...j,tools:j.tools||"all"}),[l]),h=nn.useMemo(()=>s.filter(j=>j.enabled!==!1),[s]);nn.useEffect(()=>{const j=new Set(g.map(P=>P.name)),w=new Set(h.map(P=>P.name));p(P=>{const re=new Set;return P.forEach(B=>{(j.has(B)||w.has(B))&&re.add(B)}),re})},[g,h]);const b=j=>{if(g.findIndex(P=>P.name===j)>=0){const P=g.filter(re=>re.name!==j);i(P)}else{const P=[...g,{name:j,tools:"all"}];i(P)}},v=j=>{p(w=>{const P=new Set(w);return P.has(j)?P.delete(j):P.add(j),P})},A=(j,w,P=!1)=>{if(Array.isArray(w)&&w.length===0){const re=g.filter(B=>B.name!==j);i(re),P||p(B=>{const Z=new Set(B);return Z.delete(j),Z})}else if(g.findIndex(B=>B.name===j)>=0){const B=g.map(Z=>Z.name===j?{...Z,tools:w}:Z);i(B)}else{const B=[...g,{name:j,tools:w}];i(B)}},R=(j,w)=>{var Z;const P=h.find(J=>J.name===j);if(!P)return;const re=((Z=P.tools)==null?void 0:Z.map(J=>J.name.replace(`${j}${m}`,"")))||[],B=g.find(J=>J.name===j);if(!B){const J=[...g,{name:j,tools:[w]}];i(J);return}if(B.tools==="all"){const J=re.filter(se=>se!==w);A(j,J)}else if(Array.isArray(B.tools)){const J=B.tools;if(J.includes(w)){const se=J.filter(me=>me!==w);A(j,se)}else{const se=[...J,w];se.length===re.length?A(j,"all"):A(j,se)}}},C=j=>{const w=g.find(P=>P.name===j);return w?w.tools==="all":!1},T=j=>{const w=g.find(P=>P.name===j);return w?Array.isArray(w.tools)&&w.tools.length>0:!1},M=(j,w)=>{const P=g.find(re=>re.name===j);return P?P.tools==="all"?!0:Array.isArray(P.tools)?P.tools.includes(w):!1:!1},E=j=>{const w=h.find(P=>P.name===j);return(w==null?void 0:w.tools)||[]};return a.jsxs("div",{className:ga("space-y-4",o),children:[a.jsx("div",{className:"space-y-3",children:h.map(j=>{const w=C(j.name),P=T(j.name),re=f.has(j.name),B=E(j.name),Z=g.find(J=>J.name===j.name);return a.jsxs("div",{className:"border border-gray-200 rounded-lg hover:border-gray-300 hover:bg-gray-50 transition-colors",children:[a.jsxs("div",{className:"flex items-center justify-between p-3 cursor-pointer rounded-lg transition-colors",onClick:()=>v(j.name),children:[a.jsxs("div",{className:"flex items-center space-x-3",onClick:J=>{J.stopPropagation(),b(j.name)},children:[a.jsx("input",{type:"checkbox",checked:w||P,onChange:()=>b(j.name),className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"}),a.jsx("span",{className:"font-medium text-gray-900 cursor-pointer select-none",children:j.name})]}),a.jsxs("div",{className:"flex items-center space-x-3",children:[Z&&Z.tools!=="all"&&Array.isArray(Z.tools)&&a.jsxs("span",{className:"text-sm text-green-600",children:["(",u("groups.toolsSelected")," ",Z.tools.length,"/",B.length,")"]}),Z&&Z.tools==="all"&&a.jsxs("span",{className:"text-sm text-green-600",children:["(",u("groups.allTools")," ",B.length,"/",B.length,")"]}),B.length>0&&a.jsx("button",{type:"button",className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",children:a.jsx("svg",{className:ga("w-5 h-5 transition-transform",re&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),re&&B.length>0&&a.jsxs("div",{className:"border-t border-gray-200 bg-gray-50 p-3",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx("span",{className:"text-sm font-medium text-gray-700",children:u("groups.toolSelection")}),a.jsx("button",{type:"button",onClick:()=>{(Z==null?void 0:Z.tools)==="all"||Array.isArray(Z==null?void 0:Z.tools)&&Z.tools.length===B.length?A(j.name,[],!0):A(j.name,"all")},className:"text-sm text-blue-600 hover:text-blue-800 transition-colors",children:(Z==null?void 0:Z.tools)==="all"||Array.isArray(Z==null?void 0:Z.tools)&&Z.tools.length===B.length?u("groups.selectNone"):u("groups.selectAll")})]}),a.jsx("div",{className:"grid grid-cols-1 gap-2 max-h-32 overflow-y-auto",children:B.map(J=>{const se=J.name.replace(`${j.name}${m}`,""),me=M(j.name,se);return a.jsxs("label",{className:"flex items-center space-x-2 text-sm",children:[a.jsx("input",{type:"checkbox",checked:me,onChange:()=>R(j.name,se),className:"w-3 h-3 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"}),a.jsx("span",{className:"text-gray-700",children:se}),J.description&&a.jsx("span",{className:"text-gray-400 text-xs truncate",children:J.description})]},J.name)})})]})]},j.name)})}),h.length===0&&a.jsx("p",{className:"text-gray-500 text-sm",children:u("groups.noServerOptions")})]})},h2=({onAdd:s,onCancel:l})=>{const{t:i}=je(),{createGroup:o}=Iu(),{servers:u}=pl(),[m,f]=y.useState([]),[p,g]=y.useState(null),[h,b]=y.useState(!1),[v,A]=y.useState({name:"",description:"",servers:[]});y.useEffect(()=>{f(u.filter(T=>T.enabled!==!1))},[u]);const R=T=>{const{name:M,value:E}=T.target;A(j=>({...j,[M]:E}))},C=async T=>{T.preventDefault(),b(!0),g(null);try{if(!v.name.trim()){g(i("groups.nameRequired")),b(!1);return}const M=await o(v.name,v.description,v.servers);if(!M||!M.success){g((M==null?void 0:M.message)||i("groups.createError")),b(!1);return}s()}catch(M){g(M instanceof Error?M.message:String(M)),b(!1)}};return a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-white rounded-lg shadow-lg max-w-2xl w-full max-h-[90vh] flex flex-col",children:[a.jsxs("div",{className:"p-6 flex-shrink-0",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:i("groups.addNew")}),p&&a.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded-md border border-gray-200",children:p})]}),a.jsxs("form",{onSubmit:C,className:"flex flex-col flex-1 min-h-0",children:[a.jsx("div",{className:"flex-1 overflow-y-auto px-6",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[i("groups.name")," *"]}),a.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:R,className:"w-full border border-gray-300 rounded-md px-3 py-2 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:i("groups.namePlaceholder"),required:!0})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:i("groups.configureTools")}),a.jsx(Mg,{servers:m,value:v.servers,onChange:T=>A(M=>({...M,servers:T})),className:"border border-gray-200 rounded-lg p-4 bg-gray-50"})]})]})}),a.jsxs("div",{className:"flex justify-end space-x-3 p-6 pt-4 border-t border-gray-200 flex-shrink-0",children:[a.jsx("button",{type:"button",onClick:l,className:"px-4 py-2 text-gray-600 hover:text-gray-800 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",disabled:h,children:i("common.cancel")}),a.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 disabled:opacity-50 transition-colors",disabled:h,children:i(h?"common.submitting":"common.create")})]})]})]})})},g2=({group:s,onEdit:l,onCancel:i})=>{const{t:o}=je(),{updateGroup:u}=Iu(),{servers:m}=pl(),[f,p]=y.useState([]),[g,h]=y.useState(null),[b,v]=y.useState(!1),[A,R]=y.useState({name:s.name,description:s.description||"",servers:s.servers||[]});y.useEffect(()=>{p(m.filter(M=>M.enabled!==!1))},[m]);const C=M=>{const{name:E,value:j}=M.target;R(w=>({...w,[E]:j}))},T=async M=>{M.preventDefault(),v(!0),h(null);try{if(!A.name.trim()){h(o("groups.nameRequired")),v(!1);return}const E=await u(s.id,{name:A.name,description:A.description,servers:A.servers});if(!E||!E.success){h((E==null?void 0:E.message)||o("groups.updateError")),v(!1);return}l()}catch(E){h(E instanceof Error?E.message:String(E)),v(!1)}};return a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-white rounded-lg shadow-lg max-w-2xl w-full max-h-[90vh] flex flex-col",children:[a.jsxs("div",{className:"p-6 flex-shrink-0",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:o("groups.edit")}),g&&a.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded-md border border-gray-200",children:g})]}),a.jsxs("form",{onSubmit:T,className:"flex flex-col flex-1 min-h-0",children:[a.jsx("div",{className:"flex-1 overflow-y-auto px-6",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[o("groups.name")," *"]}),a.jsx("input",{type:"text",id:"name",name:"name",value:A.name,onChange:C,className:"w-full border border-gray-300 rounded-md px-3 py-2 text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:o("groups.namePlaceholder"),required:!0})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:o("groups.configureTools")}),a.jsx(Mg,{servers:f,value:A.servers,onChange:M=>R(E=>({...E,servers:M})),className:"border border-gray-200 rounded-lg p-4 bg-gray-50"})]})]})}),a.jsxs("div",{className:"flex justify-end space-x-3 p-6 pt-4 border-t border-gray-200 flex-shrink-0",children:[a.jsx("button",{type:"button",onClick:i,className:"px-4 py-2 text-gray-600 hover:text-gray-800 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",disabled:b,children:o("common.cancel")}),a.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 disabled:opacity-50 transition-colors",disabled:b,children:o(b?"common.submitting":"common.save")})]})]})]})})},x2=({group:s,servers:l,onEdit:i,onDelete:o})=>{const{t:u}=je(),{showToast:m}=hs(),{installConfig:f}=gs(),[p,g]=y.useState(!1),[h,b]=y.useState(!1),[v,A]=y.useState(!1),[R,C]=y.useState(null),T=y.useRef(null);y.useEffect(()=>{const F=z=>{T.current&&!T.current.contains(z.target)&&A(!1)};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[]);const M=()=>{i(s)},E=()=>{g(!0)},j=()=>{o(s.id),g(!1)},w=F=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(F).then(()=>{b(!0),A(!1),m(u("common.copySuccess"),"success"),setTimeout(()=>b(!1),2e3)});else{const z=document.createElement("textarea");z.value=F,z.style.position="fixed",z.style.left="-9999px",document.body.appendChild(z),z.focus(),z.select();try{document.execCommand("copy"),b(!0),A(!1),m(u("common.copySuccess"),"success"),setTimeout(()=>b(!1),2e3)}catch(Y){m(u("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",Y)}document.body.removeChild(z)}},P=()=>{w(s.id)},re=()=>{w(`${f.baseUrl}/mcp/${s.id}`)},B=()=>{const F={mcpServers:{mcphub:{url:`${f.baseUrl}/mcp/${s.id}`,headers:{Authorization:"Bearer <your-access-token>"}}}};w(JSON.stringify(F,null,2))},Z=F=>F.map(z=>typeof z=="string"?z:z.name),J=F=>{const z=s.servers.find(Y=>typeof Y=="string"?Y===F:Y.name===F);return typeof z=="string"?{name:z,tools:"all"}:z},se=Z(s.servers),me=l.filter(F=>se.includes(F.name));return a.jsxs("div",{className:"bg-white shadow rounded-lg p-6 ",children:[a.jsxs("div",{className:"flex justify-between items-center mb-4",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:s.name}),a.jsxs("div",{className:"flex items-center ml-3",children:[a.jsx("span",{className:"text-xs text-gray-500 mr-1",children:s.id}),a.jsxs("div",{className:"relative",ref:T,children:[a.jsxs("button",{onClick:()=>A(!v),className:"p-1 text-gray-400 hover:text-gray-600 transition-colors flex items-center",title:u("common.copy"),children:[h?a.jsx(fs,{size:14,className:"text-green-500"}):a.jsx(ol,{size:14}),a.jsx(Vi,{size:12,className:"ml-1"})]}),v&&a.jsxs("div",{className:"absolute top-full left-0 mt-1 bg-white shadow-lg rounded-md border border-gray-200 py-1 z-10 min-w-[140px]",children:[a.jsxs("button",{onClick:P,className:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 flex items-center",children:[a.jsx(ol,{size:12,className:"mr-2"}),u("common.copyId")]}),a.jsxs("button",{onClick:re,className:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 flex items-center",children:[a.jsx(wb,{size:12,className:"mr-2"}),u("common.copyUrl")]}),a.jsxs("button",{onClick:B,className:"w-full px-3 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 flex items-center",children:[a.jsx(yb,{size:12,className:"mr-2"}),u("common.copyJson")]})]})]})]})]}),s.description&&a.jsx("p",{className:"text-gray-600 text-sm mt-1",children:s.description})]}),a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm btn-secondary",children:u("groups.serverCount",{count:s.servers.length})}),a.jsx("button",{onClick:M,className:"text-gray-500 hover:text-gray-700",title:u("groups.edit"),children:a.jsx($i,{size:18})}),a.jsx("button",{onClick:E,className:"text-gray-500 hover:text-red-600",title:u("groups.delete"),children:a.jsx(ag,{size:18})})]})]}),a.jsx("div",{className:"mt-4",children:me.length===0?a.jsx("p",{className:"text-gray-500 italic",children:u("groups.noServers")}):a.jsx("div",{className:"flex flex-wrap gap-2",children:me.map(F=>{var D;const z=J(F.name),Y=z&&z.tools!=="all"&&Array.isArray(z.tools),I=Y&&Array.isArray(z==null?void 0:z.tools)?z.tools.length:((D=F.tools)==null?void 0:D.length)||0,oe=R===F.name,k=()=>Y&&Array.isArray(z==null?void 0:z.tools)?z.tools:F.tools&&F.tools.length>0?F.tools.map(W=>W.name):[],L=()=>{C(oe?null:F.name)};return a.jsxs("div",{className:"relative",children:[a.jsxs("div",{className:"flex items-center space-x-2 bg-gray-50 rounded-lg px-3 py-2 cursor-pointer hover:bg-gray-100 transition-colors",onClick:L,children:[a.jsx("span",{className:"font-medium text-gray-700 text-sm",children:F.name}),a.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${F.status==="connected"?"bg-green-500":F.status==="connecting"?"bg-yellow-500":"bg-red-500"}`}),I>0&&a.jsxs("span",{className:"text-xs text-blue-600 bg-blue-100 px-2 py-0.5 rounded flex items-center gap-1",children:[a.jsx(Bb,{size:12}),I]})]}),oe&&a.jsxs("div",{className:"absolute top-full left-0 mt-1 bg-white shadow-lg rounded-md border border-gray-200 p-3 z-10 min-w-[300px] max-w-[400px]",children:[a.jsxs("div",{className:"text-gray-600 text-xs mb-2",children:[u(Y?"groups.selectedTools":"groups.allTools"),":"]}),a.jsx("div",{className:"flex flex-wrap gap-1",children:k().map((W,G)=>a.jsx("span",{className:"inline-block bg-gray-100 text-gray-700 px-2 py-1 rounded text-xs",children:W},G))})]})]},F.name)})})}),a.jsx(Fu,{isOpen:p,onClose:()=>g(!1),onConfirm:j,serverName:s.name,isGroup:!0})]})},y2=()=>{const{t:s}=je(),{groups:l,loading:i,error:o,setError:u,deleteGroup:m,triggerRefresh:f}=Iu(),{servers:p}=pl({refreshOnMount:!0}),[g,h]=y.useState(null),[b,v]=y.useState(!1),A=E=>{h(E)},R=()=>{h(null),f()},C=async E=>{const j=await m(E);(!j||!j.success)&&u((j==null?void 0:j.message)||s("groups.deleteError"))},T=()=>{v(!0)},M=()=>{v(!1),f()};return a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between items-center mb-8",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.groups.title")}),a.jsx("div",{className:"flex space-x-4",children:a.jsxs("button",{onClick:T,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 00-1 1v5H4a1 1 0 100 2h5v5a1 1 0 102 0v-5h5a1 1 0 100-2h-5V4a1 1 0 00-1-1z",clipRule:"evenodd"})}),s("groups.add")]})})]}),o&&a.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6 error-box rounded-lg",children:a.jsx("p",{children:o})}),i?a.jsx("div",{className:"bg-white shadow rounded-lg p-6 loading-container",children:a.jsxs("div",{className:"flex flex-col items-center justify-center",children:[a.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):l.length===0?a.jsx("div",{className:"bg-white shadow rounded-lg p-6 empty-state",children:a.jsx("p",{className:"text-gray-600",children:s("groups.noGroups")})}):a.jsx("div",{className:"space-y-6",children:l.map(E=>a.jsx(x2,{group:E,servers:p,onEdit:A,onDelete:C},E.id))}),b&&a.jsx(h2,{onAdd:M,onCancel:M}),g&&a.jsx(g2,{group:g,onEdit:R,onCancel:()=>h(null)})]})},Ku=()=>{const{t:s}=je(),[l,i]=y.useState([]),[o,u]=y.useState(!0),[m,f]=y.useState(null),[p,g]=y.useState(0),h=y.useCallback(async()=>{try{u(!0);const C=await Xe("/users");if(!C.success){f(C.message||s("users.fetchError"));return}C&&C.success&&Array.isArray(C.data)?i(C.data):(console.error("Invalid user data format:",C),i([])),f(null)}catch(C){console.error("Error fetching users:",C),f(C instanceof Error?C.message:"Failed to fetch users"),i([])}finally{u(!1)}},[]),b=y.useCallback(()=>{g(C=>C+1)},[]),v=async C=>{try{const T=await Tt("/users",C);return b(),T}catch(T){return f(T instanceof Error?T.message:"Failed to create user"),null}},A=async(C,T)=>{try{const M=await Ot(`/users/${C}`,T);return b(),M||null}catch(M){return f(M instanceof Error?M.message:"Failed to update user"),null}},R=async C=>{try{const T=await il(`/users/${C}`);return T!=null&&T.success?(b(),T):(f((T==null?void 0:T.message)||s("users.deleteError")),T)}catch(T){return f(T instanceof Error?T.message:"Failed to delete user"),!1}};return y.useEffect(()=>{h()},[h,p]),{users:l,loading:o,error:m,setError:f,triggerRefresh:b,createUser:v,updateUser:A,deleteUser:R}},v2=({onAdd:s,onCancel:l})=>{const{t:i}=je(),{createUser:o}=Ku(),[u,m]=y.useState(null),[f,p]=y.useState(!1),[g,h]=y.useState({username:"",password:"",isAdmin:!1}),b=async A=>{if(A.preventDefault(),m(null),!g.username.trim()){m(i("users.usernameRequired"));return}if(!g.password.trim()){m(i("users.passwordRequired"));return}if(g.password.length<6){m(i("users.passwordTooShort"));return}p(!0);try{const R=await o(g);R!=null&&R.success?s():m((R==null?void 0:R.message)||i("users.createError"))}catch(R){m(R instanceof Error?R.message:i("users.createError"))}finally{p(!1)}},v=A=>{const{name:R,value:C,type:T,checked:M}=A.target;h(E=>({...E,[R]:T==="checkbox"?M:C}))};return a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white p-8 rounded-xl shadow-2xl max-w-md w-full mx-4 border border-gray-100",children:a.jsxs("form",{onSubmit:b,children:[a.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-6",children:i("users.addNew")}),u&&a.jsx("div",{className:"bg-red-50 border-l-4 border-red-500 text-red-700 p-4 mb-6 rounded-md",children:a.jsx("p",{className:"text-sm font-medium",children:u})}),a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"username",className:"block text-sm font-medium text-gray-700 mb-1",children:[i("users.username")," ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"text",id:"username",name:"username",value:g.username,onChange:v,placeholder:i("users.usernamePlaceholder"),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent form-input transition-all duration-200",required:!0,disabled:f})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:[i("users.password")," ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"password",id:"password",name:"password",value:g.password,onChange:v,placeholder:i("users.passwordPlaceholder"),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent form-input transition-all duration-200",required:!0,disabled:f,minLength:6})]}),a.jsxs("div",{className:"flex items-center pt-2",children:[a.jsx("input",{type:"checkbox",id:"isAdmin",name:"isAdmin",checked:g.isAdmin,onChange:v,className:"h-5 w-5 text-blue-600 focus:ring-blue-500 border-gray-300 rounded transition-colors duration-200",disabled:f}),a.jsx("label",{htmlFor:"isAdmin",className:"ml-3 block text-sm font-medium text-gray-700 cursor-pointer select-none",children:i("users.adminRole")})]})]}),a.jsxs("div",{className:"flex justify-end space-x-3 mt-8",children:[a.jsx("button",{type:"button",onClick:l,className:"px-5 py-2.5 text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-all duration-200 font-medium btn-secondary shadow-sm",disabled:f,children:i("common.cancel")}),a.jsxs("button",{type:"submit",className:"px-5 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all duration-200 font-medium btn-primary shadow-md disabled:opacity-70 disabled:cursor-not-allowed flex items-center",disabled:f,children:[f&&a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i(f?"common.creating":"users.create")]})]})]})})})},b2=({user:s,onEdit:l,onCancel:i})=>{const{t:o}=je(),{updateUser:u}=Ku(),[m,f]=y.useState(null),[p,g]=y.useState(!1),[h,b]=y.useState({isAdmin:s.isAdmin,newPassword:"",confirmPassword:""}),v=async R=>{if(R.preventDefault(),f(null),h.newPassword&&h.newPassword!==h.confirmPassword){f(o("users.passwordMismatch"));return}if(h.newPassword&&h.newPassword.length<6){f(o("users.passwordTooShort"));return}g(!0);try{const C={isAdmin:h.isAdmin};h.newPassword&&(C.newPassword=h.newPassword);const T=await u(s.username,C);T!=null&&T.success?l():f((T==null?void 0:T.message)||o("users.updateError"))}catch(C){f(C instanceof Error?C.message:o("users.updateError"))}finally{g(!1)}},A=R=>{const{name:C,value:T,type:M,checked:E}=R.target;b(j=>({...j,[C]:M==="checkbox"?E:T}))};return a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx("div",{className:"bg-white p-8 rounded-xl shadow-2xl max-w-md w-full mx-4 border border-gray-100",children:a.jsxs("form",{onSubmit:v,children:[a.jsxs("h2",{className:"text-xl font-bold text-gray-900 mb-6",children:[o("users.edit")," - ",a.jsx("span",{className:"text-blue-600",children:s.username})]}),m&&a.jsx("div",{className:"bg-red-50 border-l-4 border-red-500 text-red-700 p-4 mb-6 rounded-md",children:a.jsx("p",{className:"text-sm font-medium",children:m})}),a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"flex items-center pt-2",children:[a.jsx("input",{type:"checkbox",id:"isAdmin",name:"isAdmin",checked:h.isAdmin,onChange:A,className:"h-5 w-5 text-blue-600 focus:ring-blue-500 border-gray-300 rounded transition-colors duration-200",disabled:p}),a.jsx("label",{htmlFor:"isAdmin",className:"ml-3 block text-sm font-medium text-gray-700 cursor-pointer select-none",children:o("users.adminRole")})]}),a.jsxs("div",{className:"border-t border-gray-100 pt-4 mt-2",children:[a.jsx("p",{className:"text-xs text-gray-500 uppercase font-semibold tracking-wider mb-3",children:o("users.changePassword")}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"newPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:o("users.newPassword")}),a.jsx("input",{type:"password",id:"newPassword",name:"newPassword",value:h.newPassword,onChange:A,placeholder:o("users.newPasswordPlaceholder"),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent form-input transition-all duration-200",disabled:p,minLength:6})]}),h.newPassword&&a.jsxs("div",{className:"animate-fadeIn",children:[a.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:o("users.confirmPassword")}),a.jsx("input",{type:"password",id:"confirmPassword",name:"confirmPassword",value:h.confirmPassword,onChange:A,placeholder:o("users.confirmPasswordPlaceholder"),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent form-input transition-all duration-200",disabled:p,minLength:6})]})]})]})]}),a.jsxs("div",{className:"flex justify-end space-x-3 mt-8",children:[a.jsx("button",{type:"button",onClick:i,className:"px-5 py-2.5 text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-all duration-200 font-medium btn-secondary shadow-sm",disabled:p,children:o("common.cancel")}),a.jsxs("button",{type:"submit",className:"px-5 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all duration-200 font-medium btn-primary shadow-md disabled:opacity-70 disabled:cursor-not-allowed flex items-center",disabled:p,children:[p&&a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),o(p?"common.updating":"users.update")]})]})]})})})},S2=()=>{const{t:s}=je(),{auth:l}=ps(),i=l.user,{users:o,loading:u,error:m,setError:f,deleteUser:p,triggerRefresh:g}=Ku(),[h,b]=y.useState(null),[v,A]=y.useState(!1),[R,C]=y.useState(null);if(!(i!=null&&i.isAdmin))return a.jsx("div",{className:"bg-white shadow rounded-lg p-6 dashboard-card",children:a.jsx("p",{className:"text-red-600",children:s("users.adminRequired")})});const T=re=>{b(re)},M=()=>{b(null),g()},E=re=>{C(re)},j=async()=>{if(R){const re=await p(R);re!=null&&re.success||f((re==null?void 0:re.message)||s("users.deleteError")),C(null)}},w=()=>{A(!0)},P=()=>{A(!1),g()};return a.jsxs("div",{className:"container mx-auto",children:[a.jsxs("div",{className:"flex justify-between items-center mb-8",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.users.title")}),a.jsx("div",{className:"flex space-x-4",children:a.jsxs("button",{onClick:w,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 flex items-center btn-primary transition-all duration-200 shadow-sm",children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 00-1 1v5H4a1 1 0 100 2h5v5a1 1 0 102 0v-5h5a1 1 0 100-2h-5V4a1 1 0 00-1-1z",clipRule:"evenodd"})}),s("users.add")]})})]}),m&&a.jsx("div",{className:"bg-red-50 border-l-4 border-red-500 text-red-700 p-4 mb-6 error-box rounded-lg shadow-sm",children:a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("p",{children:m}),a.jsx("button",{onClick:()=>f(null),className:"text-red-500 hover:text-red-700",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),u?a.jsx("div",{className:"bg-white shadow rounded-lg p-6 loading-container flex justify-center items-center h-64",children:a.jsxs("div",{className:"flex flex-col items-center justify-center",children:[a.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):o.length===0?a.jsx("div",{className:"bg-white shadow rounded-lg p-6 empty-state dashboard-card",children:a.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[a.jsx("div",{className:"p-4 bg-gray-100 rounded-full mb-4",children:a.jsx(sg,{className:"h-8 w-8 text-gray-400"})}),a.jsx("p",{className:"text-gray-600 text-lg font-medium",children:s("users.noUsers")}),a.jsx("button",{onClick:w,className:"mt-4 text-blue-600 hover:text-blue-800 font-medium",children:s("users.addFirst")})]})}):a.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden table-container dashboard-card",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("users.username")}),a.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("users.role")}),a.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("users.actions")})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:o.map(re=>{const B=(i==null?void 0:i.username)===re.username;return a.jsxs("tr",{className:"hover:bg-gray-50 transition-colors duration-150",children:[a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"flex-shrink-0 h-10 w-10",children:a.jsx("div",{className:"h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-bold text-lg",children:re.username.charAt(0).toUpperCase()})}),a.jsx("div",{className:"ml-4",children:a.jsxs("div",{className:"text-sm font-medium text-gray-900 flex items-center",children:[re.username,B&&a.jsx("span",{className:"ml-2 px-2 py-0.5 text-xs bg-blue-100 text-blue-800 rounded-full border border-blue-200",children:s("users.currentUser")})]})})]})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("span",{className:`px-2 py-1 inline-flex text-xs leading-5 font-semibold rounded-full ${re.isAdmin?"bg-purple-100 text-purple-800 border border-purple-200":"bg-gray-100 text-gray-800 border border-gray-200"}`,children:re.isAdmin?s("users.admin"):s("users.user")})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:a.jsxs("div",{className:"flex justify-end space-x-3",children:[a.jsx("button",{onClick:()=>T(re),className:"text-blue-600 hover:text-blue-900 p-1 rounded hover:bg-blue-50 transition-colors",title:s("users.edit"),children:a.jsx($i,{size:18})}),!B&&a.jsx("button",{onClick:()=>E(re.username),className:"text-red-600 hover:text-red-900 p-1 rounded hover:bg-red-50 transition-colors",title:s("users.delete"),children:a.jsx(ag,{size:18})})]})})]},re.username)})})]})}),v&&a.jsx(v2,{onAdd:P,onCancel:P}),h&&a.jsx(b2,{user:h,onEdit:M,onCancel:()=>b(null)}),a.jsx(Fu,{isOpen:!!R,onClose:()=>C(null),onConfirm:j,serverName:R||"",isGroup:!1,isUser:!0})]})},oh=s=>{const l=[];return s.length<8&&l.push("passwordMinLength"),/[a-zA-Z]/.test(s)||l.push("passwordRequireLetter"),/\d/.test(s)||l.push("passwordRequireNumber"),/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(s)||l.push("passwordRequireSpecial"),{isValid:l.length===0,errors:l}},w2=({onSuccess:s,onCancel:l})=>{const{t:i}=je(),[o,u]=y.useState({currentPassword:"",newPassword:""}),[m,f]=y.useState(""),[p,g]=y.useState(!1),[h,b]=y.useState(null),[v,A]=y.useState(!1),[R,C]=y.useState([]),T=E=>{const{name:j,value:w}=E.target;if(j==="confirmPassword")f(w);else if(u(P=>({...P,[j]:w})),j==="newPassword"){const P=oh(w);C(P.errors)}},M=async E=>{E.preventDefault(),b(null);const j=oh(o.newPassword);if(!j.isValid){b(i("auth.passwordStrengthError")),C(j.errors);return}if(o.newPassword!==m){b(i("auth.passwordsNotMatch"));return}g(!0);try{const w=await Pv(o);w.success?(A(!0),s&&s()):b(w.message||i("auth.changePasswordError"))}catch{b(i("auth.changePasswordError"))}finally{g(!1)}};return a.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[a.jsx("h2",{className:"text-xl font-bold mb-4",children:i("auth.changePassword")}),v?a.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:i("auth.changePasswordSuccess")}):a.jsxs("form",{onSubmit:M,children:[h&&a.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:h}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:i("auth.currentPassword")}),a.jsx("input",{type:"password",id:"currentPassword",name:"currentPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",value:o.currentPassword,onChange:T,required:!0})]}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:i("auth.newPassword")}),a.jsx("input",{type:"password",id:"newPassword",name:"newPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",value:o.newPassword,onChange:T,required:!0,minLength:8}),o.newPassword&&R.length>0&&a.jsxs("div",{className:"mt-2 text-sm text-gray-600",children:[a.jsx("p",{className:"font-semibold mb-1",children:i("auth.passwordStrengthHint")}),a.jsx("ul",{className:"list-disc list-inside space-y-1",children:R.map(E=>a.jsx("li",{className:"text-red-600",children:i(`auth.${E}`)},E))})]}),o.newPassword&&R.length===0&&a.jsxs("p",{className:"mt-2 text-sm text-green-600",children:["✓ ",i("auth.passwordStrengthHint")]})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:i("auth.confirmPassword")}),a.jsx("input",{type:"password",id:"confirmPassword",name:"confirmPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",value:m,onChange:T,required:!0,minLength:8})]}),a.jsxs("div",{className:"flex justify-end space-x-2",children:[l&&a.jsx("button",{type:"button",onClick:l,disabled:p,className:"py-2 px-4 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:i("common.cancel")}),a.jsx("button",{type:"submit",disabled:p,className:"py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 btn-primary",children:p?a.jsxs("span",{className:"flex items-center",children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i("common.save")]}):i("common.save")})]})]})]})};function j2(s=32){const l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=new Uint8Array(s);return crypto.getRandomValues(i),Array.from(i).map(o=>l.charAt(o%l.length)).join("")}const ds={SETTINGS_SMART_ROUTING:"settings:smart_routing",SETTINGS_ROUTE_CONFIG:"settings:route_config",SETTINGS_INSTALL_CONFIG:"settings:install_config",SETTINGS_SYSTEM_CONFIG:"settings:system_config",SETTINGS_OAUTH_SERVER:"settings:oauth_server",SETTINGS_EXPORT_CONFIG:"settings:export_config"},N2=()=>{const{t:s}=je(),l=Vr(),{showToast:i}=hs(),[o,u]=y.useState({pythonIndexUrl:"",npmRegistry:"",baseUrl:"http://localhost:3000"}),[m,f]=y.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[p,g]=y.useState({apiKey:"",referer:"https://www.mcphubx.com",title:"MCPHub",baseUrl:"https://api.mcprouter.to/v1"}),[h,b]=y.useState({accessTokenLifetime:"3600",refreshTokenLifetime:"1209600",authorizationCodeLifetime:"300",allowedScopes:"read, write",dynamicRegistrationAllowedGrantTypes:"authorization_code, refresh_token"}),[v,A]=y.useState("-"),{routingConfig:R,tempRoutingConfig:C,setTempRoutingConfig:T,installConfig:M,smartRoutingConfig:E,mcpRouterConfig:j,oauthServerConfig:w,nameSeparator:P,enableSessionRebuild:re,loading:B,updateRoutingConfig:Z,updateRoutingConfigBatch:J,updateInstallConfig:se,updateSmartRoutingConfig:me,updateSmartRoutingConfigBatch:F,updateMCPRouterConfig:z,updateOAuthServerConfig:Y,updateNameSeparator:I,updateSessionRebuild:oe,exportMCPSettings:k}=gs();y.useEffect(()=>{M&&u(M)},[M]),y.useEffect(()=>{E&&f({dbUrl:E.dbUrl||"",openaiApiBaseUrl:E.openaiApiBaseUrl||"",openaiApiKey:E.openaiApiKey||"",openaiApiEmbeddingModel:E.openaiApiEmbeddingModel||""})},[E]),y.useEffect(()=>{j&&g({apiKey:j.apiKey||"",referer:j.referer||"https://www.mcphubx.com",title:j.title||"MCPHub",baseUrl:j.baseUrl||"https://api.mcprouter.to/v1"})},[j]),y.useEffect(()=>{var le,ke;w&&b({accessTokenLifetime:w.accessTokenLifetime!==void 0?String(w.accessTokenLifetime):"",refreshTokenLifetime:w.refreshTokenLifetime!==void 0?String(w.refreshTokenLifetime):"",authorizationCodeLifetime:w.authorizationCodeLifetime!==void 0?String(w.authorizationCodeLifetime):"",allowedScopes:w.allowedScopes&&w.allowedScopes.length>0?w.allowedScopes.join(", "):"",dynamicRegistrationAllowedGrantTypes:(ke=(le=w.dynamicRegistration)==null?void 0:le.allowedGrantTypes)!=null&&ke.length?w.dynamicRegistration.allowedGrantTypes.join(", "):""})},[w]),y.useEffect(()=>{A(P)},[P]);const[L,D]=y.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,oauthServerConfig:!1,mcpRouterConfig:!1,nameSeparator:!1,password:!1,exportConfig:!1}),W=le=>{D(ke=>({...ke,[le]:!ke[le]}))},G=async(le,ke)=>{if(le==="enableBearerAuth"&&ke===!0&&!C.bearerAuthKey&&!R.bearerAuthKey){const Fe=j2();N(Fe),await J({enableBearerAuth:!0,bearerAuthKey:Fe})&&T(Kt=>({...Kt,bearerAuthKey:Fe}));return}await Z(le,ke)},N=le=>{T(ke=>({...ke,bearerAuthKey:le}))},_=async()=>{await Z("bearerAuthKey",C.bearerAuthKey)},q=(le,ke)=>{u({...o,[le]:ke})},U=async le=>{await se(le,o[le])},te=(le,ke)=>{f({...m,[le]:ke})},K=async le=>{await me(le,m[le])},$=(le,ke)=>{g({...p,[le]:ke})},fe=async le=>{await z(le,p[le])},pe=(le,ke)=>{b(Fe=>({...Fe,[le]:ke}))},Ne=(le,ke)=>{b(Fe=>({...Fe,[le]:ke}))},ye=async le=>{const ke=h[le];if(!ke||ke.trim()===""){i(s("settings.invalidNumberInput")||"Please enter a valid number","error");return}const Fe=Number(ke);if(Number.isNaN(Fe)||Fe<0){i(s("settings.invalidNumberInput")||"Please enter a valid number","error");return}await Y(le,Fe)},Me=async()=>{const le=h.allowedScopes.split(",").map(ke=>ke.trim()).filter(ke=>ke.length>0);await Y("allowedScopes",le)},He=async()=>{const le=h.dynamicRegistrationAllowedGrantTypes.split(",").map(ke=>ke.trim()).filter(ke=>ke.length>0);await Y("dynamicRegistration",{...w.dynamicRegistration,allowedGrantTypes:le})},Ye=async(le,ke)=>{await Y(le,ke)},Dt=async le=>{await Y("dynamicRegistration",{...w.dynamicRegistration,...le})},Ht=async()=>{await I(v)},rt=async le=>{if(le){const ke=m.dbUrl||E.dbUrl,Fe=m.openaiApiKey||E.openaiApiKey;if(!ke||!Fe){const Kt=[];ke||Kt.push(s("settings.dbUrl")),Fe||Kt.push(s("settings.openaiApiKey")),i(s("settings.smartRoutingValidationError",{fields:Kt.join(", ")}));return}const Jt={enabled:le};m.dbUrl!==E.dbUrl&&(Jt.dbUrl=m.dbUrl),m.openaiApiBaseUrl!==E.openaiApiBaseUrl&&(Jt.openaiApiBaseUrl=m.openaiApiBaseUrl),m.openaiApiKey!==E.openaiApiKey&&(Jt.openaiApiKey=m.openaiApiKey),m.openaiApiEmbeddingModel!==E.openaiApiEmbeddingModel&&(Jt.openaiApiEmbeddingModel=m.openaiApiEmbeddingModel),await F(Jt)}else await me("enabled",le)},ft=()=>{setTimeout(()=>{l("/")},2e3)},[Lt,xt]=y.useState(!1),[Se,at]=y.useState(""),Rt=async()=>{try{const le=await k();console.log("Fetched MCP settings:",le);const ke=JSON.stringify(le.data,null,2);at(ke)}catch(le){console.error("Error fetching MCP settings:",le),i(s("settings.exportError")||"Failed to fetch settings","error")}};y.useEffect(()=>{L.exportConfig&&!Se&&Rt()},[L.exportConfig]);const lt=async()=>{if(Se)try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(Se),xt(!0),i(s("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>xt(!1),2e3);else{const le=document.createElement("textarea");le.value=Se,le.style.position="fixed",le.style.left="-9999px",document.body.appendChild(le),le.focus(),le.select();try{document.execCommand("copy"),xt(!0),i(s("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>xt(!1),2e3)}catch(ke){i(s("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",ke)}document.body.removeChild(le)}}catch(le){console.error("Error copying configuration:",le),i(s("common.copyFailed")||"Copy failed","error")}},Ar=()=>{if(!Se)return;const le=new Blob([Se],{type:"application/json"}),ke=URL.createObjectURL(le),Fe=document.createElement("a");Fe.href=ke,Fe.download="mcp_settings.json",document.body.appendChild(Fe),Fe.click(),document.body.removeChild(Fe),URL.revokeObjectURL(ke),i(s("settings.exportSuccess")||"Settings exported successfully","success")};return a.jsxs("div",{className:"container mx-auto",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:s("pages.settings.title")}),a.jsx(us,{permissions:ds.SETTINGS_SMART_ROUTING,children:a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 page-card dashboard-card",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer transition-colors duration-200 hover:text-blue-600",onClick:()=>W("smartRoutingConfig"),children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.smartRouting")}),a.jsx("span",{className:"text-gray-500 transition-transform duration-200",children:L.smartRoutingConfig?"▼":"►"})]}),L.smartRoutingConfig&&a.jsxs("div",{className:"space-y-4 mt-4",children:[a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableSmartRouting")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableSmartRoutingDescription")})]}),a.jsx(fr,{disabled:B,checked:E.enabled,onCheckedChange:le=>rt(le)})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsx("div",{className:"mb-2",children:a.jsxs("h3",{className:"font-medium text-gray-700",children:[a.jsx("span",{className:"text-red-500 px-1",children:"*"}),s("settings.dbUrl")]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:m.dbUrl,onChange:le=>te("dbUrl",le.target.value),placeholder:s("settings.dbUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300 form-input",disabled:B}),a.jsx("button",{onClick:()=>K("dbUrl"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsx("div",{className:"mb-2",children:a.jsxs("h3",{className:"font-medium text-gray-700",children:[a.jsx("span",{className:"text-red-500 px-1",children:"*"}),s("settings.openaiApiKey")]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"password",value:m.openaiApiKey,onChange:le=>te("openaiApiKey",le.target.value),placeholder:s("settings.openaiApiKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:B}),a.jsx("button",{onClick:()=>K("openaiApiKey"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsx("div",{className:"mb-2",children:a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.openaiApiBaseUrl")})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:m.openaiApiBaseUrl,onChange:le=>te("openaiApiBaseUrl",le.target.value),placeholder:s("settings.openaiApiBaseUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>K("openaiApiBaseUrl"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsx("div",{className:"mb-2",children:a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.openaiApiEmbeddingModel")})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:m.openaiApiEmbeddingModel,onChange:le=>te("openaiApiEmbeddingModel",le.target.value),placeholder:s("settings.openaiApiEmbeddingModelPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>K("openaiApiEmbeddingModel"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]})]})]})}),a.jsx(us,{permissions:ds.SETTINGS_OAUTH_SERVER,children:a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 dashboard-card",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("oauthServerConfig"),children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.oauthServer")}),a.jsx("span",{className:"text-gray-500",children:L.oauthServerConfig?"▼":"►"})]}),L.oauthServerConfig&&a.jsxs("div",{className:"space-y-4 mt-4",children:[a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableOauthServer")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableOauthServerDescription")})]}),a.jsx(fr,{disabled:B,checked:w.enabled,onCheckedChange:le=>Ye("enabled",le)})]}),a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.requireClientSecret")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.requireClientSecretDescription")})]}),a.jsx(fr,{disabled:B||!w.enabled,checked:w.requireClientSecret,onCheckedChange:le=>Ye("requireClientSecret",le)})]}),a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.requireState")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.requireStateDescription")})]}),a.jsx(fr,{disabled:B||!w.enabled,checked:w.requireState,onCheckedChange:le=>Ye("requireState",le)})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.accessTokenLifetime")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.accessTokenLifetimeDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"number",value:h.accessTokenLifetime,onChange:le=>pe("accessTokenLifetime",le.target.value),placeholder:s("settings.accessTokenLifetimePlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>ye("accessTokenLifetime"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.refreshTokenLifetime")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.refreshTokenLifetimeDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"number",value:h.refreshTokenLifetime,onChange:le=>pe("refreshTokenLifetime",le.target.value),placeholder:s("settings.refreshTokenLifetimePlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>ye("refreshTokenLifetime"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.authorizationCodeLifetime")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.authorizationCodeLifetimeDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"number",value:h.authorizationCodeLifetime,onChange:le=>pe("authorizationCodeLifetime",le.target.value),placeholder:s("settings.authorizationCodeLifetimePlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>ye("authorizationCodeLifetime"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.allowedScopes")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.allowedScopesDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:h.allowedScopes,onChange:le=>Ne("allowedScopes",le.target.value),placeholder:s("settings.allowedScopesPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:Me,disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md space-y-4",children:[a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableDynamicRegistration")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.dynamicRegistrationDescription")})]}),a.jsx(fr,{disabled:B||!w.enabled,checked:w.dynamicRegistration.enabled,onCheckedChange:le=>Dt({enabled:le})})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.dynamicRegistrationAllowedGrantTypes")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.dynamicRegistrationAllowedGrantTypesDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:h.dynamicRegistrationAllowedGrantTypes,onChange:le=>Ne("dynamicRegistrationAllowedGrantTypes",le.target.value),placeholder:s("settings.dynamicRegistrationAllowedGrantTypesPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B||!w.enabled||!w.dynamicRegistration.enabled}),a.jsx("button",{onClick:He,disabled:B||!w.enabled||!w.dynamicRegistration.enabled,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.dynamicRegistrationAuth")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.dynamicRegistrationAuthDescription")})]}),a.jsx(fr,{disabled:B||!w.enabled||!w.dynamicRegistration.enabled,checked:w.dynamicRegistration.requiresAuthentication,onCheckedChange:le=>Dt({requiresAuthentication:le})})]})]})]})]})}),a.jsx(us,{permissions:ds.SETTINGS_INSTALL_CONFIG,children:a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 page-card dashboard-card",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer transition-colors duration-200 hover:text-blue-600",onClick:()=>W("mcpRouterConfig"),children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("settings.mcpRouterConfig")}),a.jsx("span",{className:"text-gray-500 transition-transform duration-200",children:L.mcpRouterConfig?"▼":"►"})]}),L.mcpRouterConfig&&a.jsxs("div",{className:"space-y-4 mt-4",children:[a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.mcpRouterApiKey")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.mcpRouterApiKeyDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"password",value:p.apiKey,onChange:le=>$("apiKey",le.target.value),placeholder:s("settings.mcpRouterApiKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300 form-input",disabled:B}),a.jsx("button",{onClick:()=>fe("apiKey"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.mcpRouterBaseUrl")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.mcpRouterBaseUrlDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:p.baseUrl,onChange:le=>$("baseUrl",le.target.value),placeholder:s("settings.mcpRouterBaseUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>fe("baseUrl"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]})]})]})}),a.jsx(us,{permissions:ds.SETTINGS_SYSTEM_CONFIG,children:a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 dashboard-card",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("nameSeparator"),children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("settings.systemSettings")}),a.jsx("span",{className:"text-gray-500",children:L.nameSeparator?"▼":"►"})]}),L.nameSeparator&&a.jsxs("div",{className:"space-y-4 mt-4",children:[a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.nameSeparatorLabel")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.nameSeparatorDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:v,onChange:le=>A(le.target.value),placeholder:"-",className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B,maxLength:5}),a.jsx("button",{onClick:Ht,disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableSessionRebuild")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableSessionRebuildDescription")})]}),a.jsx(fr,{disabled:B,checked:re,onCheckedChange:le=>oe(le)})]})]})]})}),a.jsx(us,{permissions:ds.SETTINGS_ROUTE_CONFIG,children:a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 dashboard-card",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("routingConfig"),children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.routeConfig")}),a.jsx("span",{className:"text-gray-500",children:L.routingConfig?"▼":"►"})]}),L.routingConfig&&a.jsxs("div",{className:"space-y-4 mt-4",children:[a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableBearerAuth")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableBearerAuthDescription")})]}),a.jsx(fr,{disabled:B,checked:R.enableBearerAuth,onCheckedChange:le=>G("enableBearerAuth",le)})]}),R.enableBearerAuth&&a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.bearerAuthKey")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.bearerAuthKeyDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:C.bearerAuthKey,onChange:le=>N(le.target.value),placeholder:s("settings.bearerAuthKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B||!R.enableBearerAuth}),a.jsx("button",{onClick:_,disabled:B||!R.enableBearerAuth,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableGlobalRoute")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableGlobalRouteDescription")})]}),a.jsx(fr,{disabled:B,checked:R.enableGlobalRoute,onCheckedChange:le=>G("enableGlobalRoute",le)})]}),a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableGroupNameRoute")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableGroupNameRouteDescription")})]}),a.jsx(fr,{disabled:B,checked:R.enableGroupNameRoute,onCheckedChange:le=>G("enableGroupNameRoute",le)})]}),a.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.skipAuth")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.skipAuthDescription")})]}),a.jsx(fr,{disabled:B,checked:R.skipAuth,onCheckedChange:le=>G("skipAuth",le)})]})]})]})}),a.jsx(us,{permissions:ds.SETTINGS_INSTALL_CONFIG,children:a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 dashboard-card",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("installConfig"),children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("settings.installConfig")}),a.jsx("span",{className:"text-gray-500",children:L.installConfig?"▼":"►"})]}),L.installConfig&&a.jsxs("div",{className:"space-y-4 mt-4",children:[a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.baseUrl")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.baseUrlDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:o.baseUrl,onChange:le=>q("baseUrl",le.target.value),placeholder:s("settings.baseUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>U("baseUrl"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.pythonIndexUrl")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.pythonIndexUrlDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:o.pythonIndexUrl,onChange:le=>q("pythonIndexUrl",le.target.value),placeholder:s("settings.pythonIndexUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>U("pythonIndexUrl"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-2",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.npmRegistry")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.npmRegistryDescription")})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:o.npmRegistry,onChange:le=>q("npmRegistry",le.target.value),placeholder:s("settings.npmRegistryPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:B}),a.jsx("button",{onClick:()=>U("npmRegistry"),disabled:B,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]})]})]})}),a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 dashboard-card","data-section":"password",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("password"),role:"button",children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("auth.changePassword")}),a.jsx("span",{className:"text-gray-500",children:L.password?"▼":"►"})]}),L.password&&a.jsx("div",{className:"max-w-lg mt-4",children:a.jsx(w2,{onSuccess:ft})})]}),a.jsx(us,{permissions:ds.SETTINGS_EXPORT_CONFIG,children:a.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 dashboard-card",children:[a.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("exportConfig"),children:[a.jsx("h2",{className:"font-semibold text-gray-800",children:s("settings.exportMcpSettings")}),a.jsx("span",{className:"text-gray-500",children:L.exportConfig?"▼":"►"})]}),L.exportConfig&&a.jsx("div",{className:"space-y-4 mt-4",children:a.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[a.jsxs("div",{className:"mb-4",children:[a.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.mcpSettingsJson")}),a.jsx("p",{className:"text-sm text-gray-500",children:s("settings.mcpSettingsJsonDescription")})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("button",{onClick:lt,disabled:!Se,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:[Lt?a.jsx(fs,{size:16}):a.jsx(ol,{size:16}),s(Lt?"common.copied":"settings.copyToClipboard")]}),a.jsxs("button",{onClick:Ar,disabled:!Se,className:"flex items-center gap-2 px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:[a.jsx(gb,{size:16}),s("settings.downloadJson")]})]}),Se&&a.jsx("div",{className:"mt-3",children:a.jsx("pre",{className:"bg-gray-900 text-gray-100 p-4 rounded-md overflow-x-auto text-xs max-h-96",children:Se})})]})]})})]})})]})},C2=()=>{const{t:s}=je(),[l,i]=y.useState([]),[o,u]=y.useState([]),[m,f]=y.useState([]),[p,g]=y.useState([]),[h,b]=y.useState(""),[v,A]=y.useState(""),[R,C]=y.useState(""),[T,M]=y.useState(!0),[E,j]=y.useState(null),[w,P]=y.useState(null),[re,B]=y.useState([]),[Z,J]=y.useState(1),[se,me]=y.useState(9),[F,z]=y.useState(1),Y=y.useCallback(async()=>{try{M(!0);const K=await Xe("/market/servers");K&&K.success&&Array.isArray(K.data)?(u(K.data),I(K.data,Z)):(console.error("Invalid market servers data format:",K),j(s("market.fetchError")))}catch(K){console.error("Error fetching market servers:",K),j(K instanceof Error?K.message:String(K))}finally{M(!1)}},[s]),I=y.useCallback((K,$,fe=se)=>{const pe=K.length,Ne=Math.ceil(pe/fe);z(Ne);const ye=Math.max(1,Math.min($,Ne));ye!==$&&J(ye);const Me=(ye-1)*fe,He=K.slice(Me,Me+fe);i(He)},[se]),oe=y.useCallback(K=>{J(K),I(o,K,se)},[o,I,se]),k=y.useCallback(async()=>{try{const K=await Xe("/market/categories");K&&K.success&&Array.isArray(K.data)?f(K.data):console.error("Invalid categories data format:",K)}catch(K){console.error("Error fetching categories:",K)}},[]),L=y.useCallback(async()=>{try{const K=await Xe("/market/tags");K&&K.success&&Array.isArray(K.data)?g(K.data):console.error("Invalid tags data format:",K)}catch(K){console.error("Error fetching tags:",K)}},[]),D=y.useCallback(async K=>{try{M(!0);const $=await Xe(`/market/servers/${K}`);return $&&$.success&&$.data?(P($.data),$.data):(console.error("Invalid server data format:",$),j(s("market.serverNotFound")),null)}catch($){return console.error(`Error fetching server ${K}:`,$),j($ instanceof Error?$.message:String($)),null}finally{M(!1)}},[s]),W=y.useCallback(async K=>{try{if(M(!0),C(K),!K.trim()){Y();return}const $=await Xe(`/market/servers/search?query=${encodeURIComponent(K)}`);$&&$.success&&Array.isArray($.data)?(u($.data),J(1),I($.data,1)):(console.error("Invalid search results format:",$),j(s("market.searchError")))}catch($){console.error("Error searching servers:",$),j($ instanceof Error?$.message:String($))}finally{M(!1)}},[s,o,I,Y]),G=y.useCallback(async K=>{try{if(M(!0),b(K),A(""),!K){Y();return}const $=await Xe(`/market/categories/${encodeURIComponent(K)}`);$&&$.success&&Array.isArray($.data)?(u($.data),J(1),I($.data,1)):(console.error("Invalid category filter results format:",$),j(s("market.filterError")))}catch($){console.error("Error filtering servers by category:",$),j($ instanceof Error?$.message:String($))}finally{M(!1)}},[s,Y,I]),N=y.useCallback(async K=>{try{if(M(!0),A(K),b(""),!K){Y();return}const $=await Xe(`/market/tags/${encodeURIComponent(K)}`);$&&$.success&&Array.isArray($.data)?(u($.data),J(1),I($.data,1)):(console.error("Invalid tag filter results format:",$),j(s("market.tagFilterError")))}catch($){console.error("Error filtering servers by tag:",$),j($ instanceof Error?$.message:String($))}finally{M(!1)}},[s,Y,I]),_=y.useCallback(async()=>{try{const K=await Xe("/servers");if(K&&K.success&&Array.isArray(K.data)){const $=K.data.map(fe=>fe.name);B($)}}catch(K){console.error("Error fetching installed servers:",K)}},[]),q=y.useCallback(K=>re.includes(K),[re]),U=y.useCallback(async(K,$)=>{var fe,pe;try{const Ne=(fe=K.installations)!=null&&fe.npm?"npm":Object.keys(K.installations||{}).length>0?Object.keys(K.installations)[0]:null;if(!Ne||!((pe=K.installations)!=null&&pe[Ne]))return j(s("market.noInstallationMethod")),!1;const ye=K.installations[Ne],Me={name:K.name,config:$.type==="stdio"?{command:$.command||ye.command||"",args:$.args||ye.args||[],env:{...ye.env,...$.env}}:$},He=await Tt("/servers",Me);if(!He.success)throw new Error(He.message||"Failed to install server");return await _(),!0}catch(Ne){return console.error("Error installing server:",Ne),j(Ne instanceof Error?Ne.message:String(Ne)),!1}},[s,_]),te=y.useCallback(K=>{me(K),J(1),I(o,1,K)},[o,I]);return y.useEffect(()=>{Y(),k(),L(),_()},[Y,k,L,_]),{servers:l,allServers:o,categories:m,tags:p,selectedCategory:h,selectedTag:v,searchQuery:R,loading:T,error:E,setError:j,currentServer:w,fetchMarketServers:Y,fetchServerByName:D,searchServers:W,filterByCategory:G,filterByTag:N,installServer:U,currentPage:Z,totalPages:F,serversPerPage:se,changePage:oe,changeServersPerPage:te,isServerInstalled:q}},k2=()=>{const{t:s}=je(),[l,i]=y.useState([]),[o,u]=y.useState([]),[m,f]=y.useState([]),[p,g]=y.useState([]),[h,b]=y.useState(""),[v,A]=y.useState(""),[R,C]=y.useState(""),[T,M]=y.useState(!0),[E,j]=y.useState(null),[w,P]=y.useState(null),[re,B]=y.useState(1),[Z,J]=y.useState(9),[se,me]=y.useState(1),F=y.useCallback(async()=>{try{M(!0);const q=await Xe("/cloud/servers");q&&q.success&&Array.isArray(q.data)?(u(q.data),z(q.data,re)):(console.error("Invalid cloud market servers data format:",q),j(s("cloud.fetchError")))}catch(q){console.error("Error fetching cloud market servers:",q);const U=q instanceof Error?q.message:String(q);U==="MCPROUTER_API_KEY_NOT_CONFIGURED"||U.toLowerCase().includes("mcprouter api key not configured"),j(U)}finally{M(!1)}},[s]),z=y.useCallback((q,U,te=Z)=>{const K=q.length,$=Math.ceil(K/te);me($);const fe=Math.max(1,Math.min(U,$));fe!==U&&B(fe);const pe=(fe-1)*te,Ne=q.slice(pe,pe+te);i(Ne)},[Z]),Y=y.useCallback(q=>{B(q),z(o,q,Z)},[o,z,Z]),I=y.useCallback(async()=>{try{const q=await Xe("/cloud/categories");q&&q.success&&Array.isArray(q.data)?f(q.data):console.error("Invalid cloud market categories data format:",q)}catch(q){console.error("Error fetching cloud market categories:",q)}},[]),oe=y.useCallback(async()=>{try{const q=await Xe("/cloud/tags");q&&q.success&&Array.isArray(q.data)?g(q.data):console.error("Invalid cloud market tags data format:",q)}catch(q){console.error("Error fetching cloud market tags:",q)}},[]),k=y.useCallback(async q=>{try{M(!0);const U=await Xe(`/cloud/servers/${q}`);return U&&U.success&&U.data?(P(U.data),U.data):(console.error("Invalid cloud server data format:",U),j(s("cloud.serverNotFound")),null)}catch(U){console.error(`Error fetching cloud server ${q}:`,U);const te=U instanceof Error?U.message:String(U);return te==="MCPROUTER_API_KEY_NOT_CONFIGURED"||te.toLowerCase().includes("mcprouter api key not configured"),j(te),null}finally{M(!1)}},[s]),L=y.useCallback(async q=>{try{if(M(!0),C(q),!q.trim()){F();return}const U=await Xe(`/cloud/servers/search?query=${encodeURIComponent(q)}`);U&&U.success&&Array.isArray(U.data)?(u(U.data),B(1),z(U.data,1)):(console.error("Invalid cloud search results format:",U),j(s("cloud.searchError")))}catch(U){console.error("Error searching cloud servers:",U),j(U instanceof Error?U.message:String(U))}finally{M(!1)}},[s,o,z,F]),D=y.useCallback(async q=>{try{if(M(!0),b(q),A(""),!q){F();return}const U=await Xe(`/cloud/categories/${encodeURIComponent(q)}`);U&&U.success&&Array.isArray(U.data)?(u(U.data),B(1),z(U.data,1)):(console.error("Invalid cloud category filter results format:",U),j(s("cloud.filterError")))}catch(U){console.error("Error filtering cloud servers by category:",U),j(U instanceof Error?U.message:String(U))}finally{M(!1)}},[s,F,z]),W=y.useCallback(async q=>{try{if(M(!0),A(q),b(""),!q){F();return}const U=await Xe(`/cloud/tags/${encodeURIComponent(q)}`);U&&U.success&&Array.isArray(U.data)?(u(U.data),B(1),z(U.data,1)):(console.error("Invalid cloud tag filter results format:",U),j(s("cloud.tagFilterError")))}catch(U){console.error("Error filtering cloud servers by tag:",U),j(U instanceof Error?U.message:String(U))}finally{M(!1)}},[s,F,z]),G=y.useCallback(async q=>{try{const U=await Xe(`/cloud/servers/${q}/tools`);if(!U.success)throw console.error("Failed to fetch cloud server tools:",U),new Error(U.message||"Failed to fetch cloud server tools");return U&&U.success&&Array.isArray(U.data)?U.data:(console.error("Invalid cloud server tools data format:",U),[])}catch(U){console.error(`Error fetching tools for cloud server ${q}:`,U);const te=U instanceof Error?U.message:String(U);if(te==="MCPROUTER_API_KEY_NOT_CONFIGURED"||te.toLowerCase().includes("mcprouter api key not configured"))throw U;return[]}},[]),N=y.useCallback(async(q,U,te)=>{try{const K=await Tt(`/cloud/servers/${encodeURIComponent(q)}/tools/${encodeURIComponent(U)}/call`,{arguments:te});if(K&&K.success)return K.data;throw new Error(K.message||"Failed to call tool")}catch(K){throw console.error(`Error calling tool ${U} on cloud server ${q}:`,K),K}},[]),_=y.useCallback(q=>{J(q),B(1),z(o,1,q)},[o,z]);return y.useEffect(()=>{F(),I(),oe()},[F,I,oe]),{servers:l,allServers:o,categories:m,tags:p,selectedCategory:h,selectedTag:v,searchQuery:R,loading:T,error:E,setError:j,currentServer:w,fetchCloudServers:F,fetchServerByName:k,searchServers:L,filterByCategory:D,filterByTag:W,fetchServerTools:G,callServerTool:N,currentPage:re,totalPages:se,serversPerPage:Z,changePage:Y,changeServersPerPage:_}},A2=()=>{const{t:s}=je(),[l,i]=y.useState([]),[o,u]=y.useState([]),[m,f]=y.useState(!0),[p,g]=y.useState(null),[h,b]=y.useState(""),[v,A]=y.useState(1),[R,C]=y.useState(9),[T,M]=y.useState(null),[E,j]=y.useState(!1),[w,P]=y.useState([]),[re]=y.useState(1),B=y.useCallback(async(k,L)=>{try{f(!0),g(null);const D=new URLSearchParams;D.append("limit",R.toString()),k&&D.append("cursor",k);const W=L!==void 0?L:h;W.trim()&&D.append("search",W.trim());const G=await Xe(`/registry/servers?${D.toString()}`);if(G&&G.success&&G.data){const N=G.data;if(N.servers&&Array.isArray(N.servers)){i(N.servers);const _=N.metadata.count===R&&!!N.metadata.nextCursor;j(_),M(N.metadata.nextCursor||null),u(k?q=>[...q,...N.servers]:N.servers)}else console.error("Invalid registry servers data format:",N),g(s("registry.fetchError"))}else g(s("registry.fetchError"))}catch(D){console.error("Error fetching registry servers:",D);const W=D instanceof Error?D.message:String(D);g(W)}finally{f(!1)}},[s,R]),Z=y.useCallback(async()=>{if(!E||!T)return;const k=w[w.length-1]||"";P(L=>[...L,k]),A(L=>L+1),await B(T,h)},[E,T,w,h,B]),J=y.useCallback(async()=>{if(v<=1)return;const k=[...w];k.pop();const L=k[k.length-1];P(k),A(D=>D-1),await B(L||void 0,h)},[v,w,h,B]),se=y.useCallback(async k=>{k!==v&&(k>v&&E?await Z():k<v&&v>1&&await J())},[v,E,Z,J]),me=y.useCallback(async k=>{C(k),A(1),P([]),u([]),await B(void 0,h)},[h,B]),F=y.useCallback(async k=>{try{f(!0),g(null);const L=encodeURIComponent(k),D=await Xe(`/registry/servers/${L}/versions`);if(D&&D.success&&D.data){const W=D.data;return W.servers&&Array.isArray(W.servers)&&W.servers.length>0?W.servers[0]:(console.error("Invalid registry server data format:",W),g(s("registry.serverNotFound")),null)}else return g(s("registry.serverNotFound")),null}catch(L){console.error(`Error fetching registry server ${k}:`,L);const D=L instanceof Error?L.message:String(L);return g(D),null}finally{f(!1)}},[s]),z=y.useCallback(async k=>{try{g(null);const L=encodeURIComponent(k),D=await Xe(`/registry/servers/${L}/versions`);if(D&&D.success&&D.data){const W=D.data;return W.servers&&Array.isArray(W.servers)?W.servers:(console.error("Invalid registry server versions data format:",W),[])}else return[]}catch(L){console.error(`Error fetching versions for server ${k}:`,L);const D=L instanceof Error?L.message:String(L);return g(D),[]}},[]),Y=y.useCallback(async(k,L)=>{try{g(null);const D=encodeURIComponent(k),W=encodeURIComponent(L),G=await Xe(`/registry/servers/${D}/versions/${W}`);if(G&&G.success&&G.data){const N=G.data;return N&&N.server?N:(console.error("Invalid registry server version data format:",N),null)}else return null}catch(D){console.error(`Error fetching version ${L} for server ${k}:`,D);const W=D instanceof Error?D.message:String(D);return g(W),null}},[]),I=y.useCallback(async k=>{console.log("Searching registry servers with query:",k),b(k),A(1),P([]),u([]),await B(void 0,k)},[B]),oe=y.useCallback(async()=>{b(""),A(1),P([]),u([]),await B(void 0,"")},[B]);return y.useEffect(()=>{B(void 0,h)},[]),{servers:l,allServers:o,loading:m,error:p,setError:g,searchQuery:h,searchServers:I,clearSearch:oe,fetchServerByName:F,fetchServerVersions:z,fetchServerVersion:Y,currentPage:v,totalPages:re,hasNextPage:E,hasPreviousPage:v>1,changePage:se,goToNextPage:Z,goToPreviousPage:J,serversPerPage:R,changeServersPerPage:me}},E2=({server:s,onClick:l})=>{var g,h,b,v;const{t:i}=je(),o=A=>A.split(" ").map(R=>R.charAt(0)).join("").toUpperCase().slice(0,2),u=()=>{if(!s.tags||s.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const A=28,R=w=>w.length+3;let C=0,T=0;const M=[...s.tags].sort((w,P)=>w.length-P.length);for(T=0;T<M.length;T++){const w=R(M[T]);if(C+w>A)break;if(C+=w,T===M.length-1)return{tagsToShow:M,hasMore:!1,moreCount:0}}T===0&&M.length>0&&(T=1);const E=M.length-T,j=3+String(E).length+i("market.moreTags").length;return C+j<=A||T<1?{tagsToShow:M.slice(0,T),hasMore:!0,moreCount:E}:{tagsToShow:M.slice(0,Math.max(1,T-1)),hasMore:!0,moreCount:E+1}},{tagsToShow:m,hasMore:f,moreCount:p}=u();return a.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-4 hover:shadow-lg hover:border-blue-400 hover:-translate-y-1 transition-all duration-300 cursor-pointer group relative overflow-hidden h-full flex flex-col",onClick:()=>l(s),children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-50/0 to-purple-50/0 group-hover:from-blue-50/30 group-hover:to-purple-50/30 transition-all duration-300 pointer-events-none"}),a.jsxs("div",{className:"relative z-10 flex-1 flex flex-col",children:[a.jsxs("div",{className:"flex items-start justify-between mb-2",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("h3",{className:"text-lg font-bold text-gray-900 group-hover:text-blue-600 transition-colors duration-200 mb-1 line-clamp-1 mr-2",children:s.display_name}),a.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[a.jsx("div",{className:"w-6 h-6 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center text-white text-xs font-semibold",children:o(((g=s.author)==null?void 0:g.name)||i("market.unknown"))}),a.jsx("div",{children:a.jsx("p",{className:"text-xs font-medium text-gray-700",children:((h=s.author)==null?void 0:h.name)||i("market.unknown")})})]})]}),a.jsx("div",{className:"flex flex-col items-end space-y-2",children:s.is_official&&a.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:i("market.official")})})]}),a.jsx("div",{className:"mb-2 flex-1",children:a.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-2 min-h-[36px]",children:s.description})}),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:"flex flex-wrap gap-1 min-h-[24px]",children:((b=s.categories)==null?void 0:b.length)>0?s.categories.map((A,R)=>a.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:A},R)):a.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})})}),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:"relative min-h-[24px] overflow-x-auto",children:((v=s.tags)==null?void 0:v.length)>0?a.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[m.map((A,R)=>a.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",A]},R)),f&&a.jsxs("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-1 rounded flex-shrink-0",children:["+",p," ",i("market.moreTags")]})]}):a.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})})})]})]})},T2=({server:s,onBack:l,onInstall:i,installing:o=!1,isInstalled:u=!1})=>{var se,me,F;const{t:m}=je(),[f,p]=y.useState(!1),[g,h]=y.useState(null),[b,v]=y.useState(!1),[A,R]=y.useState(null),[C,T]=y.useState([]),M=()=>u?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:m("market.installed")}:o?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:m("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white btn-primary",disabled:!1,text:m("market.install")},E=()=>{p(!f),h(null),v(!1),R(null)},j=async()=>{A&&(await w(A),v(!1),R(null))},w=async z=>{try{h(null),i(s,z.config),p(!1)}catch(Y){console.error("Error installing server:",Y),h(m("errors.serverInstall"))}},P=()=>{u||E()},re=()=>{if(!s.installations)return;if(s.installations.npm)return s.installations.npm;if(s.installations.uvx)return s.installations.uvx;if(s.installations.default)return s.installations.default;const z=Object.keys(s.installations);if(z.length>0)return s.installations[z[0]]},B=async z=>{try{const Y=Rg(z);Y.length>0?(T(Y),R(z),v(!0)):await w(z)}catch(Y){console.error("Error processing server installation:",Y),h(m("errors.serverInstall"))}},Z=M(),J=re();return a.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[a.jsx("div",{className:"mb-4",children:a.jsxs("button",{onClick:l,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[a.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),m("market.backToList")]})}),a.jsxs("div",{className:"flex justify-between items-start mb-4",children:[a.jsx("div",{children:a.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[s.display_name,a.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",s.name,")"]}),a.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[m("market.author"),": ",((se=s.author)==null?void 0:se.name)||m("market.unknown")," •"," ",m("market.license"),": ",s.license," •",a.jsx("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline ml-1",children:m("market.repository")})]})]})}),a.jsxs("div",{className:"flex items-center",children:[s.is_official&&a.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-normal px-4 py-2 rounded mr-2 flex items-center label-primary",children:m("market.official")}),a.jsx("button",{onClick:P,disabled:Z.disabled,className:Z.className,children:Z.text})]})]}),a.jsx("p",{className:"text-gray-700 mb-6",children:s.description}),a.jsxs("div",{className:"mb-6",children:[a.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[m("market.categories")," & ",m("market.tags")]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[(me=s.categories)==null?void 0:me.map((z,Y)=>a.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:z},`cat-${Y}`)),s.tags&&s.tags.map((z,Y)=>a.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",z]},`tag-${Y}`))]})]}),s.arguments&&Object.keys(s.arguments).length>0&&a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-lg font-semibold mb-3",children:m("market.arguments")}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:m("market.argumentName")}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:m("market.description")}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:m("market.required")}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:m("market.example")})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(s.arguments).map(([z,Y],I)=>a.jsxs("tr",{children:[a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:z}),a.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:Y.description}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Y.required?a.jsx("span",{className:"text-green-600",children:"✓"}):a.jsx("span",{className:"text-gray-600",children:"✗"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:a.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:Y.example})})]},I))})]})})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-lg font-semibold mb-3",children:m("market.tools")}),a.jsx("div",{className:"space-y-4",children:(F=s.tools)==null?void 0:F.map((z,Y)=>a.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[a.jsxs("h4",{className:"font-medium mb-2",children:[z.name,a.jsx("button",{type:"button",onClick:()=>{const I=document.getElementById(`schema-${Y}`);I&&I.classList.toggle("hidden")},className:"text-sm text-blue-500 font-normal hover:underline focus:outline-none ml-2",children:m("market.viewSchema")})]}),a.jsx("p",{className:"text-gray-600 mb-2",children:z.description}),a.jsx("div",{className:"mt-2",children:a.jsx("pre",{id:`schema-${Y}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(z.inputSchema,null,2)})})]},Y))})]}),s.examples&&s.examples.length>0&&a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-lg font-semibold mb-3",children:m("market.examples")}),a.jsx("div",{className:"space-y-4",children:s.examples.map((z,Y)=>a.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[a.jsx("h4",{className:"font-medium mb-2",children:z.title}),a.jsx("p",{className:"text-gray-600 mb-2",children:z.description}),a.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:z.prompt})]},Y))})]}),a.jsx("div",{className:"mt-6 flex justify-end",children:a.jsx("button",{onClick:P,disabled:Z.disabled,className:Z.className,children:Z.text})}),f&&a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx(hl,{onSubmit:B,onCancel:E,modalTitle:m("market.installServer",{name:s.display_name}),formError:g,initialData:{name:s.name,status:"disconnected",config:J?{command:J.command||"",args:J.args||[],env:J.env||{}}:void 0}})}),b&&a.jsx("div",{className:"fixed inset-0 bg-black/50 z-[60] flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:m("server.confirmVariables")}),a.jsx("p",{className:"text-gray-600 mb-4",children:m("server.variablesDetected")}),a.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded p-3 mb-4",children:a.jsxs("div",{className:"flex items-start",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("svg",{className:"h-5 w-5 text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),a.jsxs("div",{className:"ml-3",children:[a.jsxs("h4",{className:"text-sm font-medium text-yellow-800",children:[m("server.detectedVariables"),":"]}),a.jsx("ul",{className:"mt-1 text-sm text-yellow-700",children:C.map((z,Y)=>a.jsxs("li",{className:"font-mono",children:["$",`{${z}}`]},Y))})]})]})}),a.jsx("p",{className:"text-gray-600 text-sm mb-6",children:m("market.confirmVariablesMessage")}),a.jsxs("div",{className:"flex justify-end space-x-3",children:[a.jsx("button",{onClick:()=>{v(!1),R(null)},className:"px-4 py-2 text-gray-600 border border-gray-300 rounded hover:bg-gray-50 btn-secondary",children:m("common.cancel")}),a.jsx("button",{onClick:j,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 btn-primary",children:m("market.confirmAndInstall")})]})]})})]})},R2=({server:s,onClick:l})=>{const{t:i}=je(),o=()=>{l(s)},u=()=>{if(s.description&&s.description.length<=150)return s.description;if(s.content){const p=s.content.split(`
|
|
250
250
|
`).filter(g=>g.trim());for(const g of p)if(g.length>50&&g.length<=150)return g}return s.description?s.description.slice(0,150)+"...":i("cloud.noDescription")},m=p=>{try{const g=new Date(p),h=g.getFullYear(),b=(g.getMonth()+1).toString().padStart(2,"0"),v=g.getDate().toString().padStart(2,"0");return`${h}/${b}/${v}`}catch{return""}},f=p=>p.split(" ").map(g=>g.charAt(0)).join("").toUpperCase().slice(0,2);return a.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-4 hover:shadow-lg hover:border-blue-400 hover:-translate-y-1 transition-all duration-300 cursor-pointer group relative overflow-hidden h-full flex flex-col",onClick:o,children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-50/0 to-purple-50/0 group-hover:from-blue-50/30 group-hover:to-purple-50/30 transition-all duration-300 pointer-events-none"}),a.jsxs("div",{className:"relative z-10 flex-1 flex flex-col",children:[a.jsxs("div",{className:"flex items-start justify-between mb-3",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("h3",{className:"text-lg font-bold text-gray-900 group-hover:text-blue-600 transition-colors duration-200 mb-2 line-clamp-2",children:s.title||s.name}),a.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[a.jsx("div",{className:"w-7 h-7 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center text-white text-xs font-semibold",children:f(s.author_name)}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-gray-700",children:s.author_name}),s.updated_at&&a.jsxs("p",{className:"text-xs text-gray-500",children:[i("cloud.updated")," ",m(s.updated_at)]})]})]})]}),a.jsx("div",{className:"flex flex-col items-end space-y-2",children:a.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:"MCP Server"})})]}),a.jsx("div",{className:"mb-3 flex-1",children:a.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-2",children:u()})}),s.tools&&s.tools.length>0&&a.jsx("div",{className:"mb-3",children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsxs("svg",{className:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),a.jsxs("span",{className:"text-sm text-gray-600 font-medium",children:[s.tools.length," ",s.tools.length===1?i("cloud.tool"):i("cloud.tools")]})]})}),a.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-gray-100 mt-auto",children:[a.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500",children:[a.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"})}),a.jsx("span",{children:m(s.created_at)})]}),a.jsxs("div",{className:"flex items-center text-blue-600 text-sm font-medium group-hover:text-blue-700 transition-colors",children:[a.jsx("span",{children:i("cloud.viewDetails")}),a.jsx("svg",{className:"w-4 h-4 ml-1 transform group-hover:translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})]})]})},Cu=()=>{const{t:s}=je(),l=Vr(),i=()=>{l("/settings")},o=()=>{window.open("https://mcprouter.co","_blank","noopener,noreferrer")};return a.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-6 mb-6",children:a.jsxs("div",{className:"flex items-start",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("svg",{className:"h-5 w-5 text-amber-400",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),a.jsxs("div",{className:"ml-3 flex-1",children:[a.jsx("h3",{className:"text-sm font-medium text-amber-800",children:s("cloud.apiKeyNotConfigured")}),a.jsx("div",{className:"mt-2 text-sm text-amber-700",children:a.jsx("p",{children:s("cloud.apiKeyNotConfiguredDescription")})}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsxs("button",{onClick:o,className:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-200",children:[a.jsx("svg",{className:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),s("cloud.getApiKey")]}),a.jsxs("button",{onClick:i,className:"inline-flex items-center px-3 py-2 text-sm font-medium text-amber-800 bg-amber-100 border border-amber-300 rounded-md hover:bg-amber-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-amber-500 transition-colors duration-200",children:[a.jsxs("svg",{className:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),s("cloud.configureInSettings")]})]})]})]})})},M2=({serverName:s,onBack:l,onCallTool:i,fetchServerTools:o,onInstall:u,installing:m=!1,isInstalled:f=!1})=>{const{t:p}=je(),{mcpRouterConfig:g}=gs(),[h,b]=y.useState(null),[v,A]=y.useState(!0),[R,C]=y.useState(null),[T,M]=y.useState([]),[E,j]=y.useState(!1),[w,P]=y.useState(!1),[re,B]=y.useState(null),[Z,J]=y.useState({}),[se,me]=y.useState({}),[F,z]=y.useState({}),[Y,I]=y.useState(!1),[oe,k]=y.useState(null),L=$=>(console.error("Checking for MCPRouter API key error:",$),$==="MCPROUTER_API_KEY_NOT_CONFIGURED"||$.toLowerCase().includes("mcprouter api key not configured")),D=()=>f?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:p("market.installed")}:m?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:p("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white transition-colors",disabled:!1,text:p("market.install")},W=()=>{!f&&u&&(I(!0),k(null))},G=()=>{I(!1),k(null)},N=async $=>{try{if(!h||!u)return;k(null),u(h,$.config),I(!1)}catch(fe){console.error("Error installing server:",fe),k(p("errors.serverInstall"))}};y.useEffect(()=>{(async()=>{try{A(!0),C(null);const fe=await Xe(`/cloud/servers/${s}`);fe&&fe.success&&fe.data?(b(fe.data),M(fe.data.tools||[])):C(p("cloud.serverNotFound"))}catch(fe){console.error("Failed to load server details:",fe),C(fe instanceof Error?fe.message:String(fe))}finally{A(!1)}})()},[s,p]),y.useEffect(()=>{(async()=>{if(h&&(!h.tools||h.tools.length===0)&&o){j(!0),P(!1);try{const fe=await o(h.name);M(fe)}catch(fe){console.error("Failed to load tools:",fe);const pe=fe instanceof Error?fe.message:String(fe);L(pe)&&P(!0)}finally{j(!1)}}})()},[h==null?void 0:h.name,h==null?void 0:h.tools,o]);const _=$=>{try{const fe=new Date($),pe=fe.getFullYear(),Ne=String(fe.getMonth()+1).padStart(2,"0"),ye=String(fe.getDate()).padStart(2,"0"),Me=String(fe.getHours()).padStart(2,"0"),He=String(fe.getMinutes()).padStart(2,"0"),Ye=String(fe.getSeconds()).padStart(2,"0");return`${pe}-${Ne}-${ye} ${Me}:${He}:${Ye}`}catch{return $}},q=($,fe,pe)=>{me(Ne=>({...Ne,[$]:{...Ne[$],[fe]:pe}}))},U=async $=>{if(!(!i||!h)){B($);try{const fe=se[$]||{},pe=await i(h.server_key,$,fe);J(Ne=>({...Ne,[$]:pe}))}catch(fe){console.error("Tool call failed:",fe);const pe=fe instanceof Error?fe.message:String(fe);J(Ne=>({...Ne,[$]:{error:pe}}))}finally{B(null)}}},te=$=>{z(fe=>({...fe,[$]:!fe[$]}))},K=($,fe,pe)=>{var Me;const Ne=((Me=se[$.name])==null?void 0:Me[fe])||"",ye=He=>{let Ye=He.target.value;pe.type==="number"||pe.type==="integer"?Ye=Ye===""?void 0:Number(Ye):pe.type==="boolean"&&(Ye=He.target.value==="true"),q($.name,fe,Ye)};return pe.type==="boolean"?a.jsxs("select",{value:Ne===!0?"true":Ne===!1?"false":"",onChange:ye,className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",children:[a.jsx("option",{value:""}),a.jsx("option",{value:"true",children:p("common.true")}),a.jsx("option",{value:"false",children:p("common.false")})]}):pe.type==="number"||pe.type==="integer"?a.jsx("input",{type:"number",step:pe.type==="integer"?"1":"any",value:Ne||"",onChange:ye,className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 form-input"}):a.jsx("input",{type:"text",value:Ne||"",onChange:ye,className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 form-input"})};return a.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[a.jsx("div",{className:"mb-6",children:a.jsxs("button",{onClick:l,className:"inline-flex items-center text-gray-600 hover:text-gray-900 transition-colors group",children:[a.jsx("svg",{className:"h-5 w-5 mr-2 transform group-hover:-translate-x-1 transition-transform",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),p("cloud.backToList")]})}),v?a.jsx("div",{className:"bg-white rounded-xl shadow-sm p-12",children:a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsxs("svg",{className:"animate-spin h-12 w-12 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("p",{className:"text-gray-600 text-lg",children:p("app.loading")})]})}):R&&!L(R)?a.jsx("div",{className:"bg-white rounded-xl shadow-sm p-6",children:a.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("svg",{className:"h-5 w-5 text-red-400 mr-3",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),a.jsx("p",{className:"text-red-700",children:R})]})})}):h?a.jsxs("div",{className:"space-y-6",children:[a.jsx("div",{className:"bg-white rounded-xl shadow-sm overflow-hidden",children:a.jsx("div",{className:"bg-gradient-to-r from-gray-100 to-gray-200 px-6 py-4",children:a.jsxs("div",{className:"flex justify-between items-end",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-2",children:h.title||h.name}),a.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-gray-600",children:[a.jsx("span",{className:"text-sm bg-white/60 text-gray-700 px-3 py-1 rounded-full",children:h.name}),a.jsxs("div",{className:"flex items-center",children:[a.jsx("svg",{className:"h-4 w-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})}),p("cloud.by")," ",h.author_name]})]})]}),a.jsxs("div",{className:"text-right flex flex-col items-end gap-3",children:[a.jsxs("div",{className:"text-xs text-gray-500",children:[p("cloud.updated"),": ",_(h.updated_at)]}),u&&!L(R||"")&&!w&&a.jsx("button",{onClick:W,disabled:D().disabled,className:D().className,children:D().text})]})]})})}),a.jsxs("div",{className:"bg-white rounded-xl shadow-sm p-6",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 mb-4 flex items-center",children:[a.jsx("svg",{className:"h-5 w-5 text-gray-500 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),p("cloud.description")]}),a.jsx("p",{className:"text-gray-700 leading-relaxed",children:h.description})]}),h.content&&a.jsxs("div",{className:"bg-white rounded-xl shadow-sm p-6",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 mb-4 flex items-center",children:[a.jsx("svg",{className:"h-5 w-5 text-gray-500 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})}),p("cloud.details")]}),a.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:a.jsx("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:h.content})})]}),a.jsxs("div",{className:"bg-white rounded-xl shadow-sm p-6",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 mb-4 flex items-center",children:[a.jsxs("svg",{className:"h-5 w-5 text-gray-500 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),p("cloud.tools"),T.length>0&&a.jsx("span",{className:"ml-2 bg-blue-100 text-blue-800 text-sm font-medium px-2.5 py-0.5 rounded-full",children:T.length})]}),w&&a.jsx(Cu,{}),E?a.jsxs("div",{className:"flex items-center justify-center py-12",children:[a.jsxs("svg",{className:"animate-spin h-8 w-8 text-blue-500 mr-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("span",{className:"text-gray-600",children:p("cloud.loadingTools")})]}):T.length===0&&!w?a.jsxs("div",{className:"text-center py-12",children:[a.jsx("svg",{className:"h-12 w-12 text-gray-400 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})}),a.jsx("p",{className:"text-gray-600",children:p("cloud.noTools")})]}):T.length>0?a.jsx("div",{className:"space-y-4",children:T.map(($,fe)=>a.jsxs("div",{className:"border border-gray-200 rounded-lg p-6 hover:border-gray-300 transition-colors",children:[a.jsxs("div",{className:"flex justify-between items-start mb-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-2 flex items-center",children:[a.jsx("span",{className:"bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded mr-3",children:"TOOL"}),$.name]}),a.jsx("p",{className:"text-gray-600 leading-relaxed whitespace-pre-wrap",children:$.description})]}),i&&a.jsx("button",{onClick:()=>U($.name),disabled:re===$.name,className:"ml-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center min-w-[100px] justify-center",children:re===$.name?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),p("cloud.calling")]}):a.jsxs(a.Fragment,{children:[a.jsx("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.828 14.828a4 4 0 01-5.656 0M9 10h6m2 8l4-4H7l4 4z"})}),p("cloud.callTool")]})})]}),$.inputSchema&&$.inputSchema.properties&&Object.keys($.inputSchema.properties).length>0&&a.jsxs("div",{className:"border-t border-gray-100 pt-4",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-700",children:p("cloud.parameters")}),a.jsxs("button",{onClick:()=>te($.name),className:"text-sm text-blue-600 hover:text-blue-800 focus:outline-none flex items-center gap-1 transition-colors",children:[p("cloud.viewSchema"),a.jsx("svg",{className:`h-3 w-3 transition-transform duration-200 ${F[$.name]?"rotate-90":"rotate-0"}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})]})]}),F[$.name]&&a.jsx("div",{className:"mb-4",children:a.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-3 overflow-auto",children:a.jsx("pre",{className:"text-sm text-gray-800",children:JSON.stringify($.inputSchema,null,2)})})}),a.jsx("div",{className:"space-y-4",children:Object.entries($.inputSchema.properties).map(([pe,Ne])=>{var ye;return a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700",children:[pe,((ye=$.inputSchema.required)==null?void 0:ye.includes(pe))&&a.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),Ne.description&&a.jsx("p",{className:"text-xs text-gray-500",children:Ne.description}),K($,pe,Ne)]},pe)})})]}),Z[$.name]&&a.jsx("div",{className:"border-t border-gray-100 pt-4 mt-4",children:Z[$.name].error?a.jsx(a.Fragment,{children:L(Z[$.name].error)?a.jsx(Cu,{}):a.jsxs(a.Fragment,{children:[a.jsxs("h4",{className:"text-sm font-medium text-red-600 mb-3 flex items-center",children:[a.jsx("svg",{className:"h-4 w-4 text-red-500 mr-2",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),p("cloud.error")]}),a.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:a.jsx("pre",{className:"text-sm text-red-800 whitespace-pre-wrap overflow-auto",children:Z[$.name].error})})]})}):a.jsxs(a.Fragment,{children:[a.jsxs("h4",{className:"text-sm font-medium text-gray-700 mb-3 flex items-center",children:[a.jsx("svg",{className:"h-4 w-4 text-green-500 mr-2",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),p("cloud.result")]}),a.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:a.jsx("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap overflow-auto",children:JSON.stringify(Z[$.name],null,2)})})]})})]},fe))}):null]})]}):a.jsx("div",{className:"bg-white rounded-xl shadow-sm p-12",children:a.jsxs("div",{className:"text-center",children:[a.jsx("svg",{className:"h-12 w-12 text-gray-400 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})}),a.jsx("p",{className:"text-gray-600 text-lg",children:p("cloud.serverNotFound")})]})}),Y&&h&&a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx(hl,{onSubmit:N,onCancel:G,modalTitle:p("cloud.installServer",{name:h.title||h.name}),formError:oe,initialData:{name:h.name,status:"disconnected",config:{type:"streamable-http",url:h.server_url,headers:{Authorization:`Bearer ${g.apiKey||"<MCPROUTER_API_KEY>"}`,"HTTP-Referer":g.referer||"<YOUR_APP_URL>","X-Title":g.title||"<YOUR_APP_NAME>"}}}})})]})},z2=({serverEntry:s,onClick:l})=>{var E,j;const{t:i}=je(),{server:o,_meta:u}=s,m=()=>{l(s)},f=()=>o.description&&o.description.length<=150?o.description:o.description?o.description.slice(0,150)+"...":i("registry.noDescription"),p=w=>{if(!w)return"";try{const P=new Date(w),re=P.getFullYear(),B=(P.getMonth()+1).toString().padStart(2,"0"),Z=P.getDate().toString().padStart(2,"0");return`${re}/${B}/${Z}`}catch{return""}},h=o.icons&&o.icons.length>0?o.icons.find(P=>!P.theme||P.theme==="light")||o.icons[0]:null,b=u==null?void 0:u["io.modelcontextprotocol.registry/official"],v=b==null?void 0:b.isLatest,A=b==null?void 0:b.publishedAt,R=b==null?void 0:b.updatedAt,C=((E=o.packages)==null?void 0:E.length)||0,T=((j=o.remotes)==null?void 0:j.length)||0,M=C+T;return a.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-4 hover:shadow-lg hover:border-blue-400 hover:-translate-y-1 transition-all duration-300 cursor-pointer group relative overflow-hidden h-full flex flex-col",onClick:m,children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-50/0 to-purple-50/0 group-hover:from-blue-50/30 group-hover:to-purple-50/30 transition-all duration-300 pointer-events-none"}),a.jsxs("div",{className:"relative z-10 flex-1 flex flex-col",children:[a.jsx("div",{className:"flex items-start justify-between mb-3",children:a.jsxs("div",{className:"flex items-start space-x-3 flex-1",children:[h?a.jsx("img",{src:h.src,alt:o.title,className:"w-12 h-12 rounded-lg object-cover flex-shrink-0",onError:w=>{w.currentTarget.style.display="none"}}):a.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg flex items-center justify-center text-white text-xl font-semibold flex-shrink-0",children:"M"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:"text-lg font-bold text-gray-900 group-hover:text-blue-600 transition-colors duration-200 mb-1 line-clamp-2",children:o.name}),a.jsxs("div",{className:"flex flex-wrap gap-1 mb-1",children:[v&&a.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800",children:i("registry.latest")}),a.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:["v",o.version]})]})]})]})}),a.jsx("div",{className:"mb-3 flex-1",children:a.jsx("p",{className:"text-gray-600 text-sm leading-relaxed line-clamp-3",children:f()})}),M>0&&a.jsx("div",{className:"mb-3",children:a.jsxs("div",{className:"flex items-center space-x-4",children:[C>0&&a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})}),a.jsxs("span",{className:"text-sm text-gray-600",children:[C," ",i(C===1?"registry.package":"registry.packages")]})]}),T>0&&a.jsxs("div",{className:"flex items-center space-x-1",children:[a.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),a.jsxs("span",{className:"text-sm text-gray-600",children:[T," ",i(T===1?"registry.remote":"registry.remotes")]})]})]})}),a.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-gray-100 mt-auto",children:[a.jsx("div",{className:"flex items-center space-x-2 text-xs text-gray-500",children:(A||R)&&a.jsxs(a.Fragment,{children:[a.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"})}),a.jsx("span",{children:p(R||A)})]})}),a.jsxs("div",{className:"flex items-center text-blue-600 text-sm font-medium group-hover:text-blue-700 transition-colors",children:[a.jsx("span",{children:i("registry.viewDetails")}),a.jsx("svg",{className:"w-4 h-4 ml-1 transform group-hover:translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})]})]})},O2=({serverEntry:s,onBack:l,onInstall:i,installing:o=!1,isInstalled:u=!1,fetchVersions:m})=>{const{t:f}=je(),{server:p,_meta:g}=s,[h,b]=y.useState(p.version),[v,A]=y.useState([]),[R,C]=y.useState(!1),[T,M]=y.useState(!1),[E,j]=y.useState(null),[w,P]=y.useState(null),[re,B]=y.useState(null),[Z,J]=y.useState({packages:!0,remotes:!0,repository:!0}),se=g==null?void 0:g["io.modelcontextprotocol.registry/official"];y.useEffect(()=>{(async()=>{if(m){C(!0);try{const N=await m(p.name);A(N)}catch(N){console.error("Failed to load versions:",N)}finally{C(!1)}}})()},[p.name,m]);const F=p.icons&&p.icons.length>0?p.icons.find(N=>!N.theme||N.theme==="light")||p.icons[0]:null,z=G=>{if(!G)return"";try{return new Date(G).toLocaleDateString()}catch{return""}},Y=G=>{J(N=>({...N,[G]:!N[G]}))},I=(G,N)=>{j(G),P(N),B(null),M(!0)},oe=()=>{M(!1),B(null)},k=async G=>{try{if(!i||!w||!E)return;B(null);const N=G.config;i(p,N),M(!1)}catch(N){console.error("Error installing server:",N),B(f("errors.serverInstall"))}},L=()=>{if(!w||!E)return null;if(console.log("Building initial form data for:",w),E==="package"&&"identifier"in w){const G=w,N={};G.environmentVariables&&G.environmentVariables.forEach(q=>{N[q.name]=q.default||""});const _=D2(G.registryType);return{name:p.name,status:"disconnected",config:{type:"stdio",command:_,args:L2(_,G),env:Object.keys(N).length>0?N:void 0}}}else if(E==="remote"&&"url"in w){const G=w,N={};G.headers&&G.headers.forEach(q=>{N[q.name]=q.default||q.value||""});const _=G.type==="sse"?"sse":"streamable-http";return{name:p.name,status:"disconnected",config:{type:_,url:G.url,headers:Object.keys(N).length>0?N:void 0}}}return null},D=(G,N)=>a.jsxs("div",{className:"border border-gray-200 rounded-lg p-4 mb-3 hover:border-blue-400 transition-colors",children:[a.jsxs("div",{className:"flex items-start justify-between mb-3",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("h4",{className:"font-medium text-gray-900",children:G.identifier}),G.version&&a.jsxs("p",{className:"text-sm text-gray-500",children:["Version: ",G.version]}),G.runtimeHint&&a.jsx("p",{className:"text-sm text-gray-600 mt-1",children:G.runtimeHint})]}),a.jsx("button",{onClick:()=>I("package",G),disabled:u||o,className:`px-4 py-2 rounded text-sm font-medium transition-colors ${u?"bg-green-600 text-white cursor-default":o?"bg-gray-400 text-white cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-700"}`,children:f(u?"registry.installed":o?"registry.installing":"registry.install")})]}),G.registryType&&a.jsxs("div",{className:"text-sm text-gray-600 mb-2",children:[a.jsx("span",{className:"font-medium",children:"Registry:"})," ",G.registryType]}),G.transport&&a.jsxs("div",{className:"text-sm text-gray-600 mb-2",children:[a.jsx("span",{className:"font-medium",children:"Transport:"})," ",G.transport.type,G.transport.url&&a.jsxs("span",{className:"ml-2 text-gray-500",children:["(",G.transport.url,")"]})]}),G.environmentVariables&&G.environmentVariables.length>0&&a.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3",children:[a.jsxs("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:[f("registry.environmentVariables"),":"]}),a.jsx("div",{className:"space-y-2",children:G.environmentVariables.map((_,q)=>a.jsxs("div",{className:"text-sm",children:[a.jsxs("div",{className:"flex items-start",children:[a.jsx("span",{className:"font-mono text-gray-900 font-medium",children:_.name}),_.isRequired&&a.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800",children:f("common.required")}),_.isSecret&&a.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:f("common.secret")})]}),_.description&&a.jsx("p",{className:"text-gray-600 mt-1",children:_.description}),_.default&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.default"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.default})]})]},q))})]}),G.packageArguments&&G.packageArguments.length>0&&a.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3",children:[a.jsxs("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:[f("registry.packageArguments"),":"]}),a.jsx("div",{className:"space-y-2",children:G.packageArguments.map((_,q)=>a.jsxs("div",{className:"text-sm",children:[a.jsxs("div",{className:"flex items-start",children:[a.jsx("span",{className:"font-mono text-gray-900 font-medium",children:_.name}),_.isRequired&&a.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800",children:f("common.required")}),_.isSecret&&a.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:f("common.secret")}),_.isRepeated&&a.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800",children:f("common.repeated")})]}),_.description&&a.jsx("p",{className:"text-gray-600 mt-1",children:_.description}),_.type&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.type"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.type})]}),_.default&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.default"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.default})]}),_.value&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.value"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.value})]}),_.valueHint&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.valueHint"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.valueHint})]}),_.choices&&_.choices.length>0&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.choices"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.choices.join(", ")})]})]},q))})]})]},N),W=(G,N)=>a.jsxs("div",{className:"border border-gray-200 rounded-lg p-4 mb-3 hover:border-blue-400 transition-colors",children:[a.jsxs("div",{className:"flex items-start justify-between mb-3",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("h4",{className:"font-medium text-gray-900",children:G.type}),a.jsx("p",{className:"text-sm text-gray-600 mt-1 break-all",children:G.url})]}),a.jsx("button",{onClick:()=>I("remote",G),disabled:u||o,className:`px-4 py-2 rounded text-sm font-medium transition-colors ${u?"bg-green-600 text-white cursor-default":o?"bg-gray-400 text-white cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-700"}`,children:f(u?"registry.installed":o?"registry.installing":"registry.install")})]}),G.headers&&G.headers.length>0&&a.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3",children:[a.jsxs("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:[f("registry.headers"),":"]}),a.jsx("div",{className:"space-y-2",children:G.headers.map((_,q)=>a.jsxs("div",{className:"text-sm",children:[a.jsxs("div",{className:"flex items-start",children:[a.jsx("span",{className:"font-mono text-gray-900 font-medium",children:_.name}),_.isRequired&&a.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-red-100 text-red-800",children:f("common.required")}),_.isSecret&&a.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:f("common.secret")})]}),_.description&&a.jsx("p",{className:"text-gray-600 mt-1",children:_.description}),_.value&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.value"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.value})]}),_.default&&a.jsxs("p",{className:"text-gray-500 mt-1",children:[a.jsxs("span",{className:"font-medium",children:[f("common.default"),":"]})," ",a.jsx("span",{className:"font-mono",children:_.default})]})]},q))})]})]},N);return a.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[a.jsxs("div",{className:"mb-6",children:[a.jsxs("button",{onClick:l,className:"flex items-center text-blue-600 hover:text-blue-800 mb-4 transition-colors",children:[a.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),f("registry.backToList")]}),a.jsxs("div",{className:"flex items-start space-x-4",children:[F?a.jsx("img",{src:F.src,alt:p.title,className:"w-20 h-20 rounded-lg object-cover flex-shrink-0",onError:G=>{G.currentTarget.style.display="none"}}):a.jsx("div",{className:"w-20 h-20 bg-gradient-to-br from-blue-500 to-purple-600 rounded-lg flex items-center justify-center text-white text-3xl font-semibold flex-shrink-0",children:"M"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:p.name}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[(se==null?void 0:se.isLatest)&&a.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-green-100 text-green-800",children:f("registry.latest")}),a.jsxs("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-blue-100 text-blue-800",children:["v",p.version]}),(se==null?void 0:se.status)&&a.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-gray-100 text-gray-800",children:se.status}),a.jsxs("span",{className:"flex flex-wrap items-center gap-4 text-sm text-gray-600",children:[(se==null?void 0:se.publishedAt)&&a.jsxs("div",{children:[a.jsxs("span",{className:"font-medium",children:[f("registry.published"),":"]})," ",z(se.publishedAt)]}),(se==null?void 0:se.updatedAt)&&a.jsxs("div",{children:[a.jsxs("span",{className:"font-medium",children:[f("registry.updated"),":"]})," ",z(se.updatedAt)]})]})]})]})]})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-3",children:f("registry.description")}),a.jsx("p",{className:"text-gray-700 leading-relaxed whitespace-pre-wrap",children:p.description})]}),p.websiteUrl&&a.jsxs("div",{className:"mb-6",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-3",children:f("registry.website")}),a.jsx("a",{href:p.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 hover:underline",children:p.websiteUrl})]}),p.packages&&p.packages.length>0&&a.jsxs("div",{className:"mb-6",children:[a.jsxs("button",{onClick:()=>Y("packages"),className:"flex items-center justify-between w-full text-xl font-semibold text-gray-900 mb-3 hover:text-blue-600 transition-colors",children:[a.jsxs("span",{children:[f("registry.packages")," (",p.packages.length,")"]}),a.jsx("svg",{className:`w-5 h-5 transform transition-transform ${Z.packages?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Z.packages&&a.jsx("div",{className:"space-y-3",children:p.packages.map(D)})]}),p.remotes&&p.remotes.length>0&&a.jsxs("div",{className:"mb-6",children:[a.jsxs("button",{onClick:()=>Y("remotes"),className:"flex items-center justify-between w-full text-xl font-semibold text-gray-900 mb-3 hover:text-blue-600 transition-colors",children:[a.jsxs("span",{children:[f("registry.remotes")," (",p.remotes.length,")"]}),a.jsx("svg",{className:`w-5 h-5 transform transition-transform ${Z.remotes?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Z.remotes&&a.jsx("div",{className:"space-y-3",children:p.remotes.map(W)})]}),p.repository&&a.jsxs("div",{className:"mb-6",children:[a.jsxs("button",{onClick:()=>Y("repository"),className:"flex items-center justify-between w-full text-xl font-semibold text-gray-900 mb-3 hover:text-blue-600 transition-colors",children:[a.jsx("span",{children:f("registry.repository")}),a.jsx("svg",{className:`w-5 h-5 transform transition-transform ${Z.repository?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Z.repository&&a.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[p.repository.url&&a.jsxs("div",{className:"mb-2",children:[a.jsx("span",{className:"font-medium text-gray-700",children:"URL:"})," ",a.jsx("a",{href:p.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 hover:underline break-all",children:p.repository.url})]}),p.repository.source&&a.jsxs("div",{className:"mb-2",children:[a.jsx("span",{className:"font-medium text-gray-700",children:"Source:"})," ",p.repository.source]}),p.repository.subfolder&&a.jsxs("div",{className:"mb-2",children:[a.jsx("span",{className:"font-medium text-gray-700",children:"Subfolder:"})," ",p.repository.subfolder]}),p.repository.id&&a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-gray-700",children:"ID:"})," ",p.repository.id]})]})]}),T&&w&&E&&a.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:a.jsx(hl,{onSubmit:k,onCancel:oe,modalTitle:f("registry.installServer",{name:p.title||p.name}),formError:re,initialData:L()})})]})};function D2(s){switch(s.toLowerCase()){case"pypi":case"python":return"uvx";case"npm":case"node":return"npx";case"oci":case"docker":return"docker";default:return""}}function L2(s,l){const i=[l.identifier+(l.version?`@${l.version}`:"")],o=[];switch(l.packageArguments&&l.packageArguments.length>0&&l.packageArguments.forEach(u=>{if(u.isRequired||u.default||u.value){const m=`--${u.name}`,f=u.value||u.default||`\${${u.name.toUpperCase()}}`;o.push(m,f)}}),s.toLowerCase()){case"uvx":return[...i,...o];case"npx":return[...i,...o];case"docker":{const u=[];return l.environmentVariables&&l.environmentVariables.forEach(m=>{u.push("-e",`${m.name}`)}),["run","-i","--rm",...u,...i,...o]}default:return[...i,...o]}}const U2=({currentPage:s,totalPages:l,onPageChange:i})=>{const o=()=>{const u=[];u.push(a.jsx("button",{onClick:()=>i(1),className:`px-3 py-1 mx-1 rounded ${s===1?"bg-blue-500 text-white btn-primary":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:"1"},"first"));const f=Math.max(2,s-Math.floor(5/2));f>2&&u.push(a.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let p=f;p<=Math.min(l-1,f+5-3);p++)u.push(a.jsx("button",{onClick:()=>i(p),className:`px-3 py-1 mx-1 rounded ${s===p?"bg-blue-500 text-white btn-primary":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:p},p));return f+5-3<l-1&&u.push(a.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),l>1&&u.push(a.jsx("button",{onClick:()=>i(l),className:`px-3 py-1 mx-1 rounded ${s===l?"bg-blue-500 text-white btn-primary":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:l},"last")),u};return l<=1?null:a.jsxs("div",{className:"flex justify-center items-center my-6",children:[a.jsx("button",{onClick:()=>i(Math.max(1,s-1)),disabled:s===1,className:`px-3 py-1 rounded mr-2 ${s===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:"« Prev"}),a.jsx("div",{className:"flex",children:o()}),a.jsx("button",{onClick:()=>i(Math.min(l,s+1)),disabled:s===l,className:`px-3 py-1 rounded ml-2 ${s===l?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:"Next »"})]})},P2=({currentPage:s,hasNextPage:l,hasPreviousPage:i,onNextPage:o,onPreviousPage:u})=>a.jsxs("div",{className:"flex items-center justify-center space-x-2 my-6",children:[a.jsxs("button",{onClick:u,disabled:!i,className:`px-4 py-2 rounded transition-all duration-200 ${i?"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 inline-block mr-1",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Prev"]}),a.jsxs("span",{className:"px-4 py-2 bg-blue-500 text-white rounded btn-primary",children:["Page ",s]}),a.jsxs("button",{onClick:o,disabled:!l,className:`px-4 py-2 rounded transition-all duration-200 ${l?"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:["Next",a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 inline-block ml-1",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})]})]}),ch=()=>{const{t:s}=je(),l=Vr(),{serverName:i}=Uh(),{showToast:o}=hs(),[u,m]=wv(),f=u.get("tab")||"cloud",{servers:p,allServers:g,categories:h,loading:b,error:v,setError:A,searchServers:R,filterByCategory:C,filterByTag:T,selectedCategory:M,selectedTag:E,installServer:j,fetchServerByName:w,isServerInstalled:P,currentPage:re,totalPages:B,changePage:Z,serversPerPage:J,changeServersPerPage:se}=C2(),{servers:me,allServers:F,loading:z,error:Y,setError:I,fetchServerTools:oe,callServerTool:k,currentPage:L,totalPages:D,changePage:W,serversPerPage:G,changeServersPerPage:N}=k2(),{servers:_,allServers:q,loading:U,error:te,setError:K,searchServers:$,clearSearch:fe,fetchServerByName:pe,fetchServerVersions:Ne,currentPage:ye,totalPages:Me,hasNextPage:He,hasPreviousPage:Ye,changePage:Dt,goToNextPage:Ht,goToPreviousPage:rt,serversPerPage:ft,changeServersPerPage:Lt}=A2(),[xt,Se]=y.useState(null),[at,Rt]=y.useState(null),[lt,Ar]=y.useState(null),[le,ke]=y.useState(""),[Fe,Jt]=y.useState(""),[Kt,Er]=y.useState(!1),[xs,Lr]=y.useState(new Set),[Mt,ar]=y.useState(new Set);y.useEffect(()=>{(async()=>{if(i)if(f==="cloud"){const Ee=me.find(Ge=>Ge.name===i);Ee?Rt(Ee):l("/market?tab=cloud")}else if(f==="registry"){console.log("Loading registry server details for:",i);const Ee=await pe(i);Ee?Ar(Ee):l("/market?tab=registry")}else{const Ee=await w(i);Ee?Se(Ee):l("/market?tab=local")}else Se(null),Rt(null),Ar(null)})()},[i,f,me,w,pe,l]);const St=ge=>{const Ee=new URLSearchParams(u);Ee.set("tab",ge),m(Ee),i&&l("/market?"+Ee.toString())},ys=ge=>{ge.preventDefault(),f==="local"?R(le):f==="registry"&&$(Fe)},vs=ge=>{f==="local"&&C(ge)},bs=()=>{f==="local"?(ke(""),C(""),T("")):f==="registry"&&(Jt(""),fe())},Tr=ge=>{var Ee;if(f==="cloud")l(`/market/${ge.name}?tab=cloud`);else if(f==="registry"){const Ge=ge;console.log("Registry server clicked:",Ge);const qe=(Ee=Ge.server)==null?void 0:Ee.name;if(console.log("Server name extracted:",qe),qe){const it=`/market/${encodeURIComponent(qe)}?tab=registry`;console.log("Navigating to:",it),l(it)}else console.error("Server name is undefined in registry server:",Ge)}else l(`/market/${ge.name}?tab=local`)},Rr=()=>{l(`/market?tab=${f}`)},$r=async(ge,Ee)=>{try{Er(!0),await j(ge,Ee)&&o(s("market.installSuccess",{serverName:ge.display_name}),"success")}finally{Er(!1)}},pr=async(ge,Ee)=>{try{Er(!0);const Ge={name:ge.name,config:Ee},qe=await Tt("/servers",Ge);if(!qe.success){const it=(qe==null?void 0:qe.message)||s("server.addError");o(it,"error");return}Lr(it=>new Set(it).add(ge.name)),o(s("cloud.installSuccess",{name:ge.title||ge.name}),"success")}catch(Ge){console.error("Error installing cloud server:",Ge);const qe=Ge instanceof Error?Ge.message:String(Ge);o(s("cloud.installError",{error:qe}),"error")}finally{Er(!1)}},Yr=async(ge,Ee)=>{try{Er(!0);const Ge={name:ge.name,config:Ee},qe=await Tt("/servers",Ge);if(!qe.success){const it=(qe==null?void 0:qe.message)||s("server.addError");o(it,"error");return}ar(it=>new Set(it).add(ge.name)),o(s("registry.installSuccess",{name:ge.title||ge.name}),"success")}catch(Ge){console.error("Error installing registry server:",Ge);const qe=Ge instanceof Error?Ge.message:String(Ge);o(s("registry.installError",{error:qe}),"error")}finally{Er(!1)}},Ur=async(ge,Ee,Ge)=>{try{const qe=await k(ge,Ee,Ge);return o(s("cloud.toolCallSuccess",{toolName:Ee}),"success"),qe}catch(qe){const it=qe instanceof Error?qe.message:String(qe);throw Fa(it)||o(s("cloud.toolCallError",{toolName:Ee,error:it}),"error"),qe}},Fa=ge=>ge==="MCPROUTER_API_KEY_NOT_CONFIGURED"||ge.toLowerCase().includes("mcprouter api key not configured"),Ia=ge=>{f==="local"?Z(ge):f==="registry"?Dt(ge):W(ge),window.scrollTo({top:0,behavior:"smooth"})},ya=ge=>{const Ee=parseInt(ge.target.value,10);f==="local"?se(Ee):f==="registry"?Lt(Ee):N(Ee)};if(xt)return a.jsx(T2,{server:xt,onBack:Rr,onInstall:$r,installing:Kt,isInstalled:P(xt.name)});if(at)return a.jsx(M2,{serverName:at.name,onBack:Rr,onCallTool:Ur,fetchServerTools:oe,onInstall:pr,installing:Kt,isInstalled:xs.has(at.name)});if(lt)return a.jsx(O2,{serverEntry:lt,onBack:Rr,onInstall:Yr,installing:Kt,isInstalled:Mt.has(lt.server.name),fetchVersions:Ne});const Je=f==="local",st=f==="registry",de=Je?p:st?_:me,ne=Je?g:st?q:F,he=Je?h:[],Vt=Je?b:st?U:z,Pr=Je?v:st?te:Y,Ka=Je?A:st?K:I,Xt=Je?M:"",qt=Je?E:"",Ie=Je?re:st?ye:L,kt=Je?B:st?Me:D,Gt=Je?J:st?ft:G;return a.jsxs("div",{children:[a.jsx("div",{className:"mb-6",children:a.jsx("div",{className:"border-b border-gray-200",children:a.jsxs("nav",{className:"-mb-px flex space-x-3",children:[a.jsxs("button",{onClick:()=>St("cloud"),className:`py-2 px-1 border-b-2 font-medium text-lg hover:cursor-pointer transition-colors duration-200 ${!Je&&!st?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[s("cloud.title"),a.jsxs("span",{className:"text-xs text-gray-400 font-normal ml-1",children:["(",a.jsx("a",{href:"https://mcprouter.co",target:"_blank",rel:"noopener noreferrer",className:"external-link",children:"MCPRouter"}),")"]})]}),a.jsxs("button",{onClick:()=>St("local"),className:`py-2 px-1 border-b-2 font-medium text-lg hover:cursor-pointer transition-colors duration-200 ${Je?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[s("market.title"),a.jsxs("span",{className:"text-xs text-gray-400 font-normal ml-1",children:["(",a.jsx("a",{href:"https://mcpm.sh",target:"_blank",rel:"noopener noreferrer",className:"external-link",children:"MCPM"}),")"]})]}),a.jsxs("button",{onClick:()=>St("registry"),className:`py-2 px-1 border-b-2 font-medium text-lg hover:cursor-pointer transition-colors duration-200 ${st?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[s("registry.title"),a.jsxs("span",{className:"text-xs text-gray-400 font-normal ml-1",children:["(",a.jsx("a",{href:"https://registry.modelcontextprotocol.io",target:"_blank",rel:"noopener noreferrer",className:"external-link",children:s("registry.official")}),")"]})]})]})})}),Pr&&a.jsx(a.Fragment,{children:!Je&&Fa(Pr)?a.jsx(Cu,{}):a.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6 error-box rounded-lg",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("p",{children:Pr}),a.jsx("button",{onClick:()=>Ka(null),className:"text-red-700 hover:text-red-900 transition-colors duration-200",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 01.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})})}),(Je||st)&&a.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6 page-card",children:a.jsxs("form",{onSubmit:ys,className:"flex space-x-4 mb-0",children:[a.jsx("div",{className:"flex-grow",children:a.jsx("input",{type:"text",value:st?Fe:le,onChange:ge=>{st?Jt(ge.target.value):ke(ge.target.value)},placeholder:s(st?"registry.searchPlaceholder":"market.searchPlaceholder"),className:"shadow appearance-none border border-gray-200 rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input"})}),a.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:s(st?"registry.search":"market.search")}),(Je&&(le||Xt||qt)||st&&Fe)&&a.jsx("button",{type:"button",onClick:bs,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50 btn-secondary transition-all duration-200",children:s(st?"registry.clearFilters":"market.clearFilters")})]})}),a.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[Je&&a.jsx("div",{className:"md:w-48 flex-shrink-0",children:a.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4 page-card",children:he.length>0?a.jsxs("div",{className:"mb-6",children:[a.jsxs("div",{className:"flex justify-between items-center mb-3",children:[a.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")}),Xt&&a.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline transition-colors duration-200",onClick:()=>C(""),children:s("market.clearCategoryFilter")})]}),a.jsx("div",{className:"flex flex-col gap-2",children:he.map(ge=>a.jsx("button",{onClick:()=>vs(ge),className:`px-3 py-2 rounded text-sm text-left transition-all duration-200 ${Xt===ge?"bg-blue-100 text-blue-800 font-medium btn-primary":"bg-gray-100 text-gray-800 hover:bg-gray-200 btn-secondary"}`,children:ge},ge))})]}):Vt?a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-3",children:a.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")})}),a.jsxs("div",{className:"flex flex-col gap-2 items-center py-4 loading-container",children:[a.jsxs("svg",{className:"animate-spin h-6 w-6 text-blue-500 mb-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("p",{className:"text-sm text-gray-600",children:s("app.loading")})]})]}):a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-3",children:a.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")})}),a.jsx("p",{className:"text-sm text-gray-600 py-2",children:s("market.noCategories")})]})})}),a.jsx("div",{className:"flex-grow",children:Vt?a.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):de.length===0?a.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:a.jsx("p",{className:"text-gray-600",children:s(Je?"market.noServers":st?"registry.noServers":"cloud.noServers")})}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:de.map((ge,Ee)=>Je?a.jsx(E2,{server:ge,onClick:Tr},Ee):st?a.jsx(z2,{serverEntry:ge,onClick:Tr},Ee):a.jsx(R2,{server:ge,onClick:Tr},Ee))}),a.jsxs("div",{className:"flex items-center mb-4",children:[a.jsx("div",{className:"flex-[2] text-sm text-gray-500",children:Je?s("market.showing",{from:(Ie-1)*Gt+1,to:Math.min(Ie*Gt,ne.length),total:ne.length}):st?s("registry.showing",{from:(Ie-1)*Gt+1,to:(Ie-1)*Gt+de.length,total:ne.length+(He?"+":"")}):s("cloud.showing",{from:(Ie-1)*Gt+1,to:Math.min(Ie*Gt,ne.length),total:ne.length})}),a.jsx("div",{className:"flex-[4] flex justify-center",children:st?a.jsx(P2,{currentPage:Ie,hasNextPage:He,hasPreviousPage:Ye,onNextPage:Ht,onPreviousPage:rt}):a.jsx(U2,{currentPage:Ie,totalPages:kt,onPageChange:Ia})}),a.jsxs("div",{className:"flex-[2] flex items-center justify-end space-x-2",children:[a.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[s(Je?"market.perPage":st?"registry.perPage":"cloud.perPage"),":"]}),a.jsxs("select",{id:"perPage",value:Gt,onChange:ya,className:"border rounded p-1 text-sm btn-secondary outline-none",children:[a.jsx("option",{value:"6",children:"6"}),a.jsx("option",{value:"9",children:"9"}),a.jsx("option",{value:"12",children:"12"}),a.jsx("option",{value:"24",children:"24"})]})]})]})]})})]})]})},_2={default:"bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-500",outline:"border border-gray-300 dark:border-gray-700 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",ghost:"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",link:"bg-transparent underline-offset-4 hover:underline text-blue-500 hover:text-blue-600",destructive:"bg-red-500 text-white hover:bg-red-600 focus:ring-red-500"},B2={default:"h-10 py-2 px-4",sm:"h-8 px-3 text-sm",lg:"h-12 px-6",icon:"h-10 w-10 p-0"};function H2({variant:s="default",size:l="default",className:i,disabled:o,children:u,...m}){return a.jsx("button",{className:ga("rounded-md inline-flex items-center justify-center font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",_2[s],B2[l],i),disabled:o,...m,children:u})}const q2=({logs:s,isLoading:l=!1,error:i=null,onClear:o})=>{const{t:u}=je(),m=y.useRef(null),[f,p]=y.useState(!0),[g,h]=y.useState(""),[b,v]=y.useState(["info","error","warn","debug"]),[A,R]=y.useState(["main","child"]);y.useEffect(()=>{f&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[s,f]);const C=s.filter(j=>{const w=g?j.message.toLowerCase().includes(g.toLowerCase()):!0,P=b.includes(j.type),re=A.includes(j.source);return w&&P&&re}),T=j=>new Date(j).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),M=j=>{switch(j){case"error":return"bg-red-400/80 text-white";case"warn":return"bg-yellow-400/80 text-gray-900";case"debug":return"bg-purple-400/80 text-white";case"info":return"bg-blue-400/80 text-white";default:return"bg-blue-400/80 text-white"}},E=j=>{switch(j){case"main":return"bg-green-400/80 text-white";case"child":return"bg-orange-400/80 text-white";default:return"bg-gray-400/80 text-white"}};return a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"bg-card p-3 rounded-t-md flex flex-wrap items-center justify-between gap-2",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("span",{className:"font-semibold text-sm",children:[u("logs.filters"),":"]}),a.jsx("input",{type:"text",placeholder:u("logs.search"),className:"shadow appearance-none border border-gray-200 rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",value:g,onChange:j=>h(j.target.value)}),a.jsx("div",{className:"flex gap-1 items-center",children:["debug","info","error","warn"].map(j=>a.jsx(zi,{variant:b.includes(j)?"default":"outline",className:`cursor-pointer ${b.includes(j)?M(j):""}`,onClick:()=>{b.includes(j)?v(w=>w.filter(P=>P!==j)):v(w=>[...w,j])},children:j},j))}),a.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(j=>a.jsx(zi,{variant:A.includes(j)?"default":"outline",className:`cursor-pointer ${A.includes(j)?E(j):""}`,onClick:()=>{A.includes(j)?R(w=>w.filter(P=>P!==j)):R(w=>[...w,j])},children:u(j==="main"?"logs.mainProcess":"logs.childProcess")},j))})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[a.jsx("input",{type:"checkbox",checked:f,onChange:()=>p(!f),className:"form-checkbox h-4 w-4"}),u("logs.autoScroll")]}),a.jsx(H2,{variant:"outline",size:"sm",onClick:o,className:"btn-secondary",disabled:l||s.length===0,children:u("logs.clearLogs")})]})]}),a.jsx("div",{ref:m,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:l?a.jsx("div",{className:"flex justify-center items-center h-full",children:a.jsx("span",{children:u("logs.loading")})}):i?a.jsx("div",{className:"text-red-500 p-2",children:i.message}):C.length===0?a.jsx("div",{className:"text-center text-muted-foreground p-8",children:g||b.length<4||A.length<2?u("logs.noMatch"):u("logs.noLogs")}):C.map((j,w)=>a.jsxs("div",{className:`py-1 ${j.type==="error"?"text-red-500":j.type==="warn"?"text-yellow-500":""}`,children:[a.jsxs("span",{className:"text-gray-400",children:["[",T(j.timestamp),"]"]}),a.jsx(zi,{className:`ml-2 mr-1 ${M(j.type)}`,children:j.type}),a.jsxs(zi,{variant:"default",className:`mr-2 ${E(j.source)}`,children:[j.source==="main"?u("logs.main"):u("logs.child"),j.processId?` (${j.processId})`:""]}),a.jsx("span",{className:"whitespace-pre-wrap",children:j.message})]},`${j.timestamp}-${w}`))})]})},G2=async()=>{try{const s=await il("/logs");if(!s.success)throw new Error(s.error||"Failed to clear logs")}catch(s){throw console.error("Error clearing logs:",s),s}},F2=()=>{const[s,l]=y.useState([]),[i,o]=y.useState(!0),[u,m]=y.useState(null);return y.useEffect(()=>{let p=null,g=!0;const h=()=>{try{p&&p.close();const b=un();p=new EventSource(Pu(`/logs/stream?token=${b}`)),p.onmessage=v=>{if(g)try{const A=JSON.parse(v.data);A.type==="initial"?(l(A.logs),o(!1)):A.type==="log"&&l(R=>[...R,A.log])}catch(A){console.error("Error parsing SSE message:",A)}},p.onerror=()=>{g&&(p&&(p.close(),setTimeout(h,5e3)),m(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(b){if(!g)return;m(b instanceof Error?b:new Error("Failed to connect to log stream")),o(!1)}};return h(),()=>{g=!1,p&&p.close()}},[]),{logs:s,loading:i,error:u,clearLogs:async()=>{try{await G2(),l([])}catch(p){m(p instanceof Error?p:new Error("Failed to clear logs"))}}}},I2=()=>{const{t:s}=je(),{logs:l,loading:i,error:o,clearLogs:u}=F2();return a.jsxs("div",{className:"container mx-auto p-4",children:[a.jsx("div",{className:"flex justify-between items-center mb-4",children:a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.logs.title")})}),a.jsx("div",{className:"bg-card rounded-md shadow-sm border border-gray-200 page-card",children:a.jsx(q2,{logs:l,isLoading:i,error:o,onClear:u})})]})},K2=()=>{const{serverName:s}=Uh();return a.jsx(_i,{to:`/market/${s}?tab=cloud`,replace:!0})};function uh(){const s=Uu();return a.jsx(C1,{children:a.jsx(Hv,{children:a.jsx(k1,{children:a.jsx(j1,{children:a.jsx(T1,{children:a.jsx(yv,{basename:s,children:a.jsxs(Yy,{children:[a.jsx(Yt,{path:"/login",element:a.jsx(Y1,{})}),a.jsx(Yt,{element:a.jsx(K1,{}),children:a.jsxs(Yt,{element:a.jsx(I1,{}),children:[a.jsx(Yt,{path:"/",element:a.jsx(J1,{})}),a.jsx(Yt,{path:"/servers",element:a.jsx(p2,{})}),a.jsx(Yt,{path:"/groups",element:a.jsx(y2,{})}),a.jsx(Yt,{path:"/users",element:a.jsx(S2,{})}),a.jsx(Yt,{path:"/market",element:a.jsx(ch,{})}),a.jsx(Yt,{path:"/market/:serverName",element:a.jsx(ch,{})}),a.jsx(Yt,{path:"/cloud",element:a.jsx(_i,{to:"/market?tab=cloud",replace:!0})}),a.jsx(Yt,{path:"/cloud/:serverName",element:a.jsx(K2,{})}),a.jsx(Yt,{path:"/logs",element:a.jsx(I2,{})}),a.jsx(Yt,{path:"/settings",element:a.jsx(N2,{})})]})}),a.jsx(Yt,{path:"*",element:a.jsx(_i,{to:"/"})})]})})})})})})})}const Te=s=>typeof s=="string",sl=()=>{let s,l;const i=new Promise((o,u)=>{s=o,l=u});return i.resolve=s,i.reject=l,i},dh=s=>s==null?"":""+s,V2=(s,l,i)=>{s.forEach(o=>{l[o]&&(i[o]=l[o])})},$2=/###/g,mh=s=>s&&s.indexOf("###")>-1?s.replace($2,"."):s,fh=s=>!s||Te(s),nl=(s,l,i)=>{const o=Te(l)?l.split("."):l;let u=0;for(;u<o.length-1;){if(fh(s))return{};const m=mh(o[u]);!s[m]&&i&&(s[m]=new i),Object.prototype.hasOwnProperty.call(s,m)?s=s[m]:s={},++u}return fh(s)?{}:{obj:s,k:mh(o[u])}},ph=(s,l,i)=>{const{obj:o,k:u}=nl(s,l,Object);if(o!==void 0||l.length===1){o[u]=i;return}let m=l[l.length-1],f=l.slice(0,l.length-1),p=nl(s,f,Object);for(;p.obj===void 0&&f.length;)m=`${f[f.length-1]}.${m}`,f=f.slice(0,f.length-1),p=nl(s,f,Object),p!=null&&p.obj&&typeof p.obj[`${p.k}.${m}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${m}`]=i},Y2=(s,l,i,o)=>{const{obj:u,k:m}=nl(s,l,Object);u[m]=u[m]||[],u[m].push(i)},Hi=(s,l)=>{const{obj:i,k:o}=nl(s,l);if(i&&Object.prototype.hasOwnProperty.call(i,o))return i[o]},J2=(s,l,i)=>{const o=Hi(s,i);return o!==void 0?o:Hi(l,i)},zg=(s,l,i)=>{for(const o in l)o!=="__proto__"&&o!=="constructor"&&(o in s?Te(s[o])||s[o]instanceof String||Te(l[o])||l[o]instanceof String?i&&(s[o]=l[o]):zg(s[o],l[o],i):s[o]=l[o]);return s},rn=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var X2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Q2=s=>Te(s)?s.replace(/[&<>"'\/]/g,l=>X2[l]):s;class Z2{constructor(l){this.capacity=l,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(l){const i=this.regExpMap.get(l);if(i!==void 0)return i;const o=new RegExp(l);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(l,o),this.regExpQueue.push(l),o}}const W2=[" ",",","?","!",";"],eS=new Z2(20),tS=(s,l,i)=>{l=l||"",i=i||"";const o=W2.filter(f=>l.indexOf(f)<0&&i.indexOf(f)<0);if(o.length===0)return!0;const u=eS.getRegExp(`(${o.map(f=>f==="?"?"\\?":f).join("|")})`);let m=!u.test(s);if(!m){const f=s.indexOf(i);f>0&&!u.test(s.substring(0,f))&&(m=!0)}return m},ku=(s,l,i=".")=>{if(!s)return;if(s[l])return Object.prototype.hasOwnProperty.call(s,l)?s[l]:void 0;const o=l.split(i);let u=s;for(let m=0;m<o.length;){if(!u||typeof u!="object")return;let f,p="";for(let g=m;g<o.length;++g)if(g!==m&&(p+=i),p+=o[g],f=u[p],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&g<o.length-1)continue;m+=g-m+1;break}u=f}return u},ul=s=>s==null?void 0:s.replace("_","-"),rS={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,l){var i,o;(o=(i=console==null?void 0:console[s])==null?void 0:i.apply)==null||o.call(i,console,l)}};class qi{constructor(l,i={}){this.init(l,i)}init(l,i={}){this.prefix=i.prefix||"i18next:",this.logger=l||rS,this.options=i,this.debug=i.debug}log(...l){return this.forward(l,"log","",!0)}warn(...l){return this.forward(l,"warn","",!0)}error(...l){return this.forward(l,"error","")}deprecate(...l){return this.forward(l,"warn","WARNING DEPRECATED: ",!0)}forward(l,i,o,u){return u&&!this.debug?null:(Te(l[0])&&(l[0]=`${o}${this.prefix} ${l[0]}`),this.logger[i](l))}create(l){return new qi(this.logger,{prefix:`${this.prefix}:${l}:`,...this.options})}clone(l){return l=l||this.options,l.prefix=l.prefix||this.prefix,new qi(this.logger,l)}}var Ir=new qi;class Yi{constructor(){this.observers={}}on(l,i){return l.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const u=this.observers[o].get(i)||0;this.observers[o].set(i,u+1)}),this}off(l,i){if(this.observers[l]){if(!i){delete this.observers[l];return}this.observers[l].delete(i)}}emit(l,...i){this.observers[l]&&Array.from(this.observers[l].entries()).forEach(([u,m])=>{for(let f=0;f<m;f++)u(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([u,m])=>{for(let f=0;f<m;f++)u.apply(u,[l,...i])})}}class hh extends Yi{constructor(l,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=l||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(l){this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}removeNamespaces(l){const i=this.options.ns.indexOf(l);i>-1&&this.options.ns.splice(i,1)}getResource(l,i,o,u={}){var h,b;const m=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,f=u.ignoreJSONStructure!==void 0?u.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;l.indexOf(".")>-1?p=l.split("."):(p=[l,i],o&&(Array.isArray(o)?p.push(...o):Te(o)&&m?p.push(...o.split(m)):p.push(o)));const g=Hi(this.data,p);return!g&&!i&&!o&&l.indexOf(".")>-1&&(l=p[0],i=p[1],o=p.slice(2).join(".")),g||!f||!Te(o)?g:ku((b=(h=this.data)==null?void 0:h[l])==null?void 0:b[i],o,m)}addResource(l,i,o,u,m={silent:!1}){const f=m.keySeparator!==void 0?m.keySeparator:this.options.keySeparator;let p=[l,i];o&&(p=p.concat(f?o.split(f):o)),l.indexOf(".")>-1&&(p=l.split("."),u=i,i=p[1]),this.addNamespaces(i),ph(this.data,p,u),m.silent||this.emit("added",l,i,o,u)}addResources(l,i,o,u={silent:!1}){for(const m in o)(Te(o[m])||Array.isArray(o[m]))&&this.addResource(l,i,m,o[m],{silent:!0});u.silent||this.emit("added",l,i,o)}addResourceBundle(l,i,o,u,m,f={silent:!1,skipCopy:!1}){let p=[l,i];l.indexOf(".")>-1&&(p=l.split("."),u=o,o=i,i=p[1]),this.addNamespaces(i);let g=Hi(this.data,p)||{};f.skipCopy||(o=JSON.parse(JSON.stringify(o))),u?zg(g,o,m):g={...g,...o},ph(this.data,p,g),f.silent||this.emit("added",l,i,o)}removeResourceBundle(l,i){this.hasResourceBundle(l,i)&&delete this.data[l][i],this.removeNamespaces(i),this.emit("removed",l,i)}hasResourceBundle(l,i){return this.getResource(l,i)!==void 0}getResourceBundle(l,i){return i||(i=this.options.defaultNS),this.getResource(l,i)}getDataByLanguage(l){return this.data[l]}hasLanguageSomeTranslations(l){const i=this.getDataByLanguage(l);return!!(i&&Object.keys(i)||[]).find(u=>i[u]&&Object.keys(i[u]).length>0)}toJSON(){return this.data}}var Og={processors:{},addPostProcessor(s){this.processors[s.name]=s},handle(s,l,i,o,u){return s.forEach(m=>{var f;l=((f=this.processors[m])==null?void 0:f.process(l,i,o,u))??l}),l}};const Dg=Symbol("i18next/PATH_KEY");function aS(){const s=[],l=Object.create(null);let i;return l.get=(o,u)=>{var m;return(m=i==null?void 0:i.revoke)==null||m.call(i),u===Dg?s:(s.push(u),i=Proxy.revocable(o,l),i.proxy)},Proxy.revocable(Object.create(null),l).proxy}function Au(s,l){const{[Dg]:i}=s(aS());return i.join((l==null?void 0:l.keySeparator)??".")}const gh={},pu=s=>!Te(s)&&typeof s!="boolean"&&typeof s!="number";class Gi extends Yi{constructor(l,i={}){super(),V2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],l,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ir.create("translator")}changeLanguage(l){l&&(this.language=l)}exists(l,i={interpolation:{}}){const o={...i};if(l==null)return!1;const u=this.resolve(l,o);if((u==null?void 0:u.res)===void 0)return!1;const m=pu(u.res);return!(o.returnObjects===!1&&m)}extractFromKey(l,i){let o=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let m=i.ns||this.options.defaultNS||[];const f=o&&l.indexOf(o)>-1,p=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!tS(l,o,u);if(f&&!p){const g=l.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:l,namespaces:Te(m)?[m]:m};const h=l.split(o);(o!==u||o===u&&this.options.ns.indexOf(h[0])>-1)&&(m=h.shift()),l=h.join(u)}return{key:l,namespaces:Te(m)?[m]:m}}translate(l,i,o){let u=typeof i=="object"?{...i}:i;if(typeof u!="object"&&this.options.overloadTranslationOptionHandler&&(u=this.options.overloadTranslationOptionHandler(arguments)),typeof u=="object"&&(u={...u}),u||(u={}),l==null)return"";typeof l=="function"&&(l=Au(l,{...this.options,...u})),Array.isArray(l)||(l=[String(l)]);const m=u.returnDetails!==void 0?u.returnDetails:this.options.returnDetails,f=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,{key:p,namespaces:g}=this.extractFromKey(l[l.length-1],u),h=g[g.length-1];let b=u.nsSeparator!==void 0?u.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const v=u.lng||this.language,A=u.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((v==null?void 0:v.toLowerCase())==="cimode")return A?m?{res:`${h}${b}${p}`,usedKey:p,exactUsedKey:p,usedLng:v,usedNS:h,usedParams:this.getUsedParamsDetails(u)}:`${h}${b}${p}`:m?{res:p,usedKey:p,exactUsedKey:p,usedLng:v,usedNS:h,usedParams:this.getUsedParamsDetails(u)}:p;const R=this.resolve(l,u);let C=R==null?void 0:R.res;const T=(R==null?void 0:R.usedKey)||p,M=(R==null?void 0:R.exactUsedKey)||p,E=["[object Number]","[object Function]","[object RegExp]"],j=u.joinArrays!==void 0?u.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,P=u.count!==void 0&&!Te(u.count),re=Gi.hasDefaultValue(u),B=P?this.pluralResolver.getSuffix(v,u.count,u):"",Z=u.ordinal&&P?this.pluralResolver.getSuffix(v,u.count,{ordinal:!1}):"",J=P&&!u.ordinal&&u.count===0,se=J&&u[`defaultValue${this.options.pluralSeparator}zero`]||u[`defaultValue${B}`]||u[`defaultValue${Z}`]||u.defaultValue;let me=C;w&&!C&&re&&(me=se);const F=pu(me),z=Object.prototype.toString.apply(me);if(w&&me&&F&&E.indexOf(z)<0&&!(Te(j)&&Array.isArray(me))){if(!u.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,me,{...u,ns:g}):`key '${p} (${this.language})' returned an object instead of string.`;return m?(R.res=Y,R.usedParams=this.getUsedParamsDetails(u),R):Y}if(f){const Y=Array.isArray(me),I=Y?[]:{},oe=Y?M:T;for(const k in me)if(Object.prototype.hasOwnProperty.call(me,k)){const L=`${oe}${f}${k}`;re&&!C?I[k]=this.translate(L,{...u,defaultValue:pu(se)?se[k]:void 0,joinArrays:!1,ns:g}):I[k]=this.translate(L,{...u,joinArrays:!1,ns:g}),I[k]===L&&(I[k]=me[k])}C=I}}else if(w&&Te(j)&&Array.isArray(C))C=C.join(j),C&&(C=this.extendTranslation(C,l,u,o));else{let Y=!1,I=!1;!this.isValidLookup(C)&&re&&(Y=!0,C=se),this.isValidLookup(C)||(I=!0,C=p);const k=(u.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&I?void 0:C,L=re&&se!==C&&this.options.updateMissing;if(I||Y||L){if(this.logger.log(L?"updateKey":"missingKey",v,h,p,L?se:C),f){const N=this.resolve(p,{...u,keySeparator:!1});N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let D=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,u.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let N=0;N<W.length;N++)D.push(W[N]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(u.lng||this.language):D.push(u.lng||this.language);const G=(N,_,q)=>{var te;const U=re&&q!==C?q:k;this.options.missingKeyHandler?this.options.missingKeyHandler(N,h,_,U,L,u):(te=this.backendConnector)!=null&&te.saveMissing&&this.backendConnector.saveMissing(N,h,_,U,L,u),this.emit("missingKey",N,h,_,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?D.forEach(N=>{const _=this.pluralResolver.getSuffixes(N,u);J&&u[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(q=>{G([N],p+q,u[`defaultValue${q}`]||se)})}):G(D,p,se))}C=this.extendTranslation(C,l,u,R,o),I&&C===p&&this.options.appendNamespaceToMissingKey&&(C=`${h}${b}${p}`),(I||Y)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${b}${p}`:p,Y?C:void 0,u))}return m?(R.res=C,R.usedParams=this.getUsedParamsDetails(u),R):C}extendTranslation(l,i,o,u,m){var g,h;if((g=this.i18nFormat)!=null&&g.parse)l=this.i18nFormat.parse(l,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||u.usedLng,u.usedNS,u.usedKey,{resolved:u});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const b=Te(l)&&(((h=o==null?void 0:o.interpolation)==null?void 0:h.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(b){const R=l.match(this.interpolator.nestingRegexp);v=R&&R.length}let A=o.replace&&!Te(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(A={...this.options.interpolation.defaultVariables,...A}),l=this.interpolator.interpolate(l,A,o.lng||this.language||u.usedLng,o),b){const R=l.match(this.interpolator.nestingRegexp),C=R&&R.length;v<C&&(o.nest=!1)}!o.lng&&u&&u.res&&(o.lng=this.language||u.usedLng),o.nest!==!1&&(l=this.interpolator.nest(l,(...R)=>(m==null?void 0:m[0])===R[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${R[0]} in key: ${i[0]}`),null):this.translate(...R,i),o)),o.interpolation&&this.interpolator.reset()}const f=o.postProcess||this.options.postProcess,p=Te(f)?[f]:f;return l!=null&&(p!=null&&p.length)&&o.applyPostProcessor!==!1&&(l=Og.handle(p,l,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...u,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),l}resolve(l,i={}){let o,u,m,f,p;return Te(l)&&(l=[l]),l.forEach(g=>{if(this.isValidLookup(o))return;const h=this.extractFromKey(g,i),b=h.key;u=b;let v=h.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const A=i.count!==void 0&&!Te(i.count),R=A&&!i.ordinal&&i.count===0,C=i.context!==void 0&&(Te(i.context)||typeof i.context=="number")&&i.context!=="",T=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);v.forEach(M=>{var E,j;this.isValidLookup(o)||(p=M,!gh[`${T[0]}-${M}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(p))&&(gh[`${T[0]}-${M}`]=!0,this.logger.warn(`key "${u}" for languages "${T.join(", ")}" won't get resolved as namespace "${p}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(w=>{var B;if(this.isValidLookup(o))return;f=w;const P=[b];if((B=this.i18nFormat)!=null&&B.addLookupKeys)this.i18nFormat.addLookupKeys(P,b,w,M,i);else{let Z;A&&(Z=this.pluralResolver.getSuffix(w,i.count,i));const J=`${this.options.pluralSeparator}zero`,se=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(A&&(i.ordinal&&Z.indexOf(se)===0&&P.push(b+Z.replace(se,this.options.pluralSeparator)),P.push(b+Z),R&&P.push(b+J)),C){const me=`${b}${this.options.contextSeparator||"_"}${i.context}`;P.push(me),A&&(i.ordinal&&Z.indexOf(se)===0&&P.push(me+Z.replace(se,this.options.pluralSeparator)),P.push(me+Z),R&&P.push(me+J))}}let re;for(;re=P.pop();)this.isValidLookup(o)||(m=re,o=this.getResource(w,M,re,i))}))})}),{res:o,usedKey:u,exactUsedKey:m,usedLng:f,usedNS:p}}isValidLookup(l){return l!==void 0&&!(!this.options.returnNull&&l===null)&&!(!this.options.returnEmptyString&&l==="")}getResource(l,i,o,u={}){var m;return(m=this.i18nFormat)!=null&&m.getResource?this.i18nFormat.getResource(l,i,o,u):this.resourceStore.getResource(l,i,o,u)}getUsedParamsDetails(l={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=l.replace&&!Te(l.replace);let u=o?l.replace:l;if(o&&typeof l.count<"u"&&(u.count=l.count),this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),!o){u={...u};for(const m of i)delete u[m]}return u}static hasDefaultValue(l){const i="defaultValue";for(const o in l)if(Object.prototype.hasOwnProperty.call(l,o)&&i===o.substring(0,i.length)&&l[o]!==void 0)return!0;return!1}}class xh{constructor(l){this.options=l,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ir.create("languageUtils")}getScriptPartFromCode(l){if(l=ul(l),!l||l.indexOf("-")<0)return null;const i=l.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(l){if(l=ul(l),!l||l.indexOf("-")<0)return l;const i=l.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(l){if(Te(l)&&l.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(l)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?l.toLowerCase():l)}return this.options.cleanCode||this.options.lowerCaseLng?l.toLowerCase():l}isSupportedCode(l){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(l=this.getLanguagePartFromCode(l)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(l)>-1}getBestMatchFromCodes(l){if(!l)return null;let i;return l.forEach(o=>{if(i)return;const u=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(u))&&(i=u)}),!i&&this.options.supportedLngs&&l.forEach(o=>{if(i)return;const u=this.getScriptPartFromCode(o);if(this.isSupportedCode(u))return i=u;const m=this.getLanguagePartFromCode(o);if(this.isSupportedCode(m))return i=m;i=this.options.supportedLngs.find(f=>{if(f===m)return f;if(!(f.indexOf("-")<0&&m.indexOf("-")<0)&&(f.indexOf("-")>0&&m.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===m||f.indexOf(m)===0&&m.length>1))return f})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(l,i){if(!l)return[];if(typeof l=="function"&&(l=l(i)),Te(l)&&(l=[l]),Array.isArray(l))return l;if(!i)return l.default||[];let o=l[i];return o||(o=l[this.getScriptPartFromCode(i)]),o||(o=l[this.formatLanguageCode(i)]),o||(o=l[this.getLanguagePartFromCode(i)]),o||(o=l.default),o||[]}toResolveHierarchy(l,i){const o=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],l),u=[],m=f=>{f&&(this.isSupportedCode(f)?u.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return Te(l)&&(l.indexOf("-")>-1||l.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&m(this.formatLanguageCode(l)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&m(this.getScriptPartFromCode(l)),this.options.load!=="currentOnly"&&m(this.getLanguagePartFromCode(l))):Te(l)&&m(this.formatLanguageCode(l)),o.forEach(f=>{u.indexOf(f)<0&&m(this.formatLanguageCode(f))}),u}}const yh={zero:0,one:1,two:2,few:3,many:4,other:5},vh={select:s=>s===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sS{constructor(l,i={}){this.languageUtils=l,this.options=i,this.logger=Ir.create("pluralResolver"),this.pluralRulesCache={}}addRule(l,i){this.rules[l]=i}clearCache(){this.pluralRulesCache={}}getRule(l,i={}){const o=ul(l==="dev"?"en":l),u=i.ordinal?"ordinal":"cardinal",m=JSON.stringify({cleanedCode:o,type:u});if(m in this.pluralRulesCache)return this.pluralRulesCache[m];let f;try{f=new Intl.PluralRules(o,{type:u})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vh;if(!l.match(/-|_/))return vh;const g=this.languageUtils.getLanguagePartFromCode(l);f=this.getRule(g,i)}return this.pluralRulesCache[m]=f,f}needsPlural(l,i={}){let o=this.getRule(l,i);return o||(o=this.getRule("dev",i)),(o==null?void 0:o.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(l,i,o={}){return this.getSuffixes(l,o).map(u=>`${i}${u}`)}getSuffixes(l,i={}){let o=this.getRule(l,i);return o||(o=this.getRule("dev",i)),o?o.resolvedOptions().pluralCategories.sort((u,m)=>yh[u]-yh[m]).map(u=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${u}`):[]}getSuffix(l,i,o={}){const u=this.getRule(l,o);return u?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${u.select(i)}`:(this.logger.warn(`no plural rule found for: ${l}`),this.getSuffix("dev",i,o))}}const bh=(s,l,i,o=".",u=!0)=>{let m=J2(s,l,i);return!m&&u&&Te(i)&&(m=ku(s,i,o),m===void 0&&(m=ku(l,i,o))),m},hu=s=>s.replace(/\$/g,"$$$$");class nS{constructor(l={}){var i;this.logger=Ir.create("interpolator"),this.options=l,this.format=((i=l==null?void 0:l.interpolation)==null?void 0:i.format)||(o=>o),this.init(l)}init(l={}){l.interpolation||(l.interpolation={escapeValue:!0});const{escape:i,escapeValue:o,useRawValueToEscape:u,prefix:m,prefixEscaped:f,suffix:p,suffixEscaped:g,formatSeparator:h,unescapeSuffix:b,unescapePrefix:v,nestingPrefix:A,nestingPrefixEscaped:R,nestingSuffix:C,nestingSuffixEscaped:T,nestingOptionsSeparator:M,maxReplaces:E,alwaysFormat:j}=l.interpolation;this.escape=i!==void 0?i:Q2,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=u!==void 0?u:!1,this.prefix=m?rn(m):f||"{{",this.suffix=p?rn(p):g||"}}",this.formatSeparator=h||",",this.unescapePrefix=b?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=A?rn(A):R||rn("$t("),this.nestingSuffix=C?rn(C):T||rn(")"),this.nestingOptionsSeparator=M||",",this.maxReplaces=E||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const l=(i,o)=>(i==null?void 0:i.source)===o?(i.lastIndex=0,i):new RegExp(o,"g");this.regexp=l(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=l(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=l(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(l,i,o,u){var R;let m,f,p;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=C=>{if(C.indexOf(this.formatSeparator)<0){const j=bh(i,g,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,o,{...u,...i,interpolationkey:C}):j}const T=C.split(this.formatSeparator),M=T.shift().trim(),E=T.join(this.formatSeparator).trim();return this.format(bh(i,g,M,this.options.keySeparator,this.options.ignoreJSONStructure),E,o,{...u,...i,interpolationkey:M})};this.resetRegExp();const b=(u==null?void 0:u.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((R=u==null?void 0:u.interpolation)==null?void 0:R.skipOnVariables)!==void 0?u.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:C=>hu(C)},{regex:this.regexp,safeValue:C=>this.escapeValue?hu(this.escape(C)):hu(C)}].forEach(C=>{for(p=0;m=C.regex.exec(l);){const T=m[1].trim();if(f=h(T),f===void 0)if(typeof b=="function"){const E=b(l,m,u);f=Te(E)?E:""}else if(u&&Object.prototype.hasOwnProperty.call(u,T))f="";else if(v){f=m[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${l}`),f="";else!Te(f)&&!this.useRawValueToEscape&&(f=dh(f));const M=C.safeValue(f);if(l=l.replace(m[0],M),v?(C.regex.lastIndex+=f.length,C.regex.lastIndex-=m[0].length):C.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),l}nest(l,i,o={}){let u,m,f;const p=(g,h)=>{const b=this.nestingOptionsSeparator;if(g.indexOf(b)<0)return g;const v=g.split(new RegExp(`${b}[ ]*{`));let A=`{${v[1]}`;g=v[0],A=this.interpolate(A,f);const R=A.match(/'/g),C=A.match(/"/g);(((R==null?void 0:R.length)??0)%2===0&&!C||C.length%2!==0)&&(A=A.replace(/'/g,'"'));try{f=JSON.parse(A),h&&(f={...h,...f})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,T),`${g}${b}${A}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,g};for(;u=this.nestingRegexp.exec(l);){let g=[];f={...o},f=f.replace&&!Te(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const h=/{.*}/.test(u[1])?u[1].lastIndexOf("}")+1:u[1].indexOf(this.formatSeparator);if(h!==-1&&(g=u[1].slice(h).split(this.formatSeparator).map(b=>b.trim()).filter(Boolean),u[1]=u[1].slice(0,h)),m=i(p.call(this,u[1].trim(),f),f),m&&u[0]===l&&!Te(m))return m;Te(m)||(m=dh(m)),m||(this.logger.warn(`missed to resolve ${u[1]} for nesting ${l}`),m=""),g.length&&(m=g.reduce((b,v)=>this.format(b,v,o.lng,{...o,interpolationkey:u[1].trim()}),m.trim())),l=l.replace(u[0],m),this.regexp.lastIndex=0}return l}}const lS=s=>{let l=s.toLowerCase().trim();const i={};if(s.indexOf("(")>-1){const o=s.split("(");l=o[0].toLowerCase().trim();const u=o[1].substring(0,o[1].length-1);l==="currency"&&u.indexOf(":")<0?i.currency||(i.currency=u.trim()):l==="relativetime"&&u.indexOf(":")<0?i.range||(i.range=u.trim()):u.split(";").forEach(f=>{if(f){const[p,...g]=f.split(":"),h=g.join(":").trim().replace(/^'+|'+$/g,""),b=p.trim();i[b]||(i[b]=h),h==="false"&&(i[b]=!1),h==="true"&&(i[b]=!0),isNaN(h)||(i[b]=parseInt(h,10))}})}return{formatName:l,formatOptions:i}},Sh=s=>{const l={};return(i,o,u)=>{let m=u;u&&u.interpolationkey&&u.formatParams&&u.formatParams[u.interpolationkey]&&u[u.interpolationkey]&&(m={...m,[u.interpolationkey]:void 0});const f=o+JSON.stringify(m);let p=l[f];return p||(p=s(ul(o),u),l[f]=p),p(i)}},iS=s=>(l,i,o)=>s(ul(i),o)(l);class oS{constructor(l={}){this.logger=Ir.create("formatter"),this.options=l,this.init(l)}init(l,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const o=i.cacheInBuiltFormats?Sh:iS;this.formats={number:o((u,m)=>{const f=new Intl.NumberFormat(u,{...m});return p=>f.format(p)}),currency:o((u,m)=>{const f=new Intl.NumberFormat(u,{...m,style:"currency"});return p=>f.format(p)}),datetime:o((u,m)=>{const f=new Intl.DateTimeFormat(u,{...m});return p=>f.format(p)}),relativetime:o((u,m)=>{const f=new Intl.RelativeTimeFormat(u,{...m});return p=>f.format(p,m.range||"day")}),list:o((u,m)=>{const f=new Intl.ListFormat(u,{...m});return p=>f.format(p)})}}add(l,i){this.formats[l.toLowerCase().trim()]=i}addCached(l,i){this.formats[l.toLowerCase().trim()]=Sh(i)}format(l,i,o,u={}){const m=i.split(this.formatSeparator);if(m.length>1&&m[0].indexOf("(")>1&&m[0].indexOf(")")<0&&m.find(p=>p.indexOf(")")>-1)){const p=m.findIndex(g=>g.indexOf(")")>-1);m[0]=[m[0],...m.splice(1,p)].join(this.formatSeparator)}return m.reduce((p,g)=>{var v;const{formatName:h,formatOptions:b}=lS(g);if(this.formats[h]){let A=p;try{const R=((v=u==null?void 0:u.formatParams)==null?void 0:v[u.interpolationkey])||{},C=R.locale||R.lng||u.locale||u.lng||o;A=this.formats[h](p,C,{...b,...u,...R})}catch(R){this.logger.warn(R)}return A}else this.logger.warn(`there was no format function for ${h}`);return p},l)}}const cS=(s,l)=>{s.pending[l]!==void 0&&(delete s.pending[l],s.pendingCount--)};class uS extends Yi{constructor(l,i,o,u={}){var m,f;super(),this.backend=l,this.store=i,this.services=o,this.languageUtils=o.languageUtils,this.options=u,this.logger=Ir.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=u.maxParallelReads||10,this.readingCalls=0,this.maxRetries=u.maxRetries>=0?u.maxRetries:5,this.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,this.state={},this.queue=[],(f=(m=this.backend)==null?void 0:m.init)==null||f.call(m,o,u.backend,u)}queueLoad(l,i,o,u){const m={},f={},p={},g={};return l.forEach(h=>{let b=!0;i.forEach(v=>{const A=`${h}|${v}`;!o.reload&&this.store.hasResourceBundle(h,v)?this.state[A]=2:this.state[A]<0||(this.state[A]===1?f[A]===void 0&&(f[A]=!0):(this.state[A]=1,b=!1,f[A]===void 0&&(f[A]=!0),m[A]===void 0&&(m[A]=!0),g[v]===void 0&&(g[v]=!0)))}),b||(p[h]=!0)}),(Object.keys(m).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:u}),{toLoad:Object.keys(m),pending:Object.keys(f),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}loaded(l,i,o){const u=l.split("|"),m=u[0],f=u[1];i&&this.emit("failedLoading",m,f,i),!i&&o&&this.store.addResourceBundle(m,f,o,void 0,void 0,{skipCopy:!0}),this.state[l]=i?-1:2,i&&o&&(this.state[l]=0);const p={};this.queue.forEach(g=>{Y2(g.loaded,[m],f),cS(g,l),i&&g.errors.push(i),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(h=>{p[h]||(p[h]={});const b=g.loaded[h];b.length&&b.forEach(v=>{p[h][v]===void 0&&(p[h][v]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(g=>!g.done)}read(l,i,o,u=0,m=this.retryTimeout,f){if(!l.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:l,ns:i,fcName:o,tried:u,wait:m,callback:f});return}this.readingCalls++;const p=(h,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(h&&b&&u<this.maxRetries){setTimeout(()=>{this.read.call(this,l,i,o,u+1,m*2,f)},m);return}f(h,b)},g=this.backend[o].bind(this.backend);if(g.length===2){try{const h=g(l,i);h&&typeof h.then=="function"?h.then(b=>p(null,b)).catch(p):p(null,h)}catch(h){p(h)}return}return g(l,i,p)}prepareLoading(l,i,o={},u){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();Te(l)&&(l=this.languageUtils.toResolveHierarchy(l)),Te(i)&&(i=[i]);const m=this.queueLoad(l,i,o,u);if(!m.toLoad.length)return m.pending.length||u(),null;m.toLoad.forEach(f=>{this.loadOne(f)})}load(l,i,o){this.prepareLoading(l,i,{},o)}reload(l,i,o){this.prepareLoading(l,i,{reload:!0},o)}loadOne(l,i=""){const o=l.split("|"),u=o[0],m=o[1];this.read(u,m,"read",void 0,void 0,(f,p)=>{f&&this.logger.warn(`${i}loading namespace ${m} for language ${u} failed`,f),!f&&p&&this.logger.log(`${i}loaded namespace ${m} for language ${u}`,p),this.loaded(l,f,p)})}saveMissing(l,i,o,u,m,f={},p=()=>{}){var g,h,b,v,A;if((h=(g=this.services)==null?void 0:g.utils)!=null&&h.hasLoadedNamespace&&!((v=(b=this.services)==null?void 0:b.utils)!=null&&v.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${o}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if((A=this.backend)!=null&&A.create){const R={...f,isUpdate:m},C=this.backend.create.bind(this.backend);if(C.length<6)try{let T;C.length===5?T=C(l,i,o,u,R):T=C(l,i,o,u),T&&typeof T.then=="function"?T.then(M=>p(null,M)).catch(p):p(null,T)}catch(T){p(T)}else C(l,i,o,u,p,R)}!l||!l[0]||this.store.addResource(l[0],i,o,u)}}}const wh=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:s=>{let l={};if(typeof s[1]=="object"&&(l=s[1]),Te(s[1])&&(l.defaultValue=s[1]),Te(s[2])&&(l.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const i=s[3]||s[2];Object.keys(i).forEach(o=>{l[o]=i[o]})}return l},interpolation:{escapeValue:!0,format:s=>s,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),jh=s=>{var l,i;return Te(s.ns)&&(s.ns=[s.ns]),Te(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),Te(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),((i=(l=s.supportedLngs)==null?void 0:l.indexOf)==null?void 0:i.call(l,"cimode"))<0&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),typeof s.initImmediate=="boolean"&&(s.initAsync=s.initImmediate),s},Oi=()=>{},dS=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(i=>{typeof s[i]=="function"&&(s[i]=s[i].bind(s))})};class dl extends Yi{constructor(l={},i){if(super(),this.options=jh(l),this.services={},this.logger=Ir,this.modules={external:[]},dS(this),i&&!this.isInitialized&&!l.isClone){if(!this.options.initAsync)return this.init(l,i),this;setTimeout(()=>{this.init(l,i)},0)}}init(l={},i){this.isInitializing=!0,typeof l=="function"&&(i=l,l={}),l.defaultNS==null&&l.ns&&(Te(l.ns)?l.defaultNS=l.ns:l.ns.indexOf("translation")<0&&(l.defaultNS=l.ns[0]));const o=wh();this.options={...o,...this.options,...jh(l)},this.options.interpolation={...o.interpolation,...this.options.interpolation},l.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=l.keySeparator),l.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=l.nsSeparator);const u=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Ir.init(u(this.modules.logger),this.options):Ir.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=oS;const b=new xh(this.options);this.store=new hh(this.options.resources,this.options);const v=this.services;v.logger=Ir,v.resourceStore=this.store,v.languageUtils=b,v.pluralResolver=new sS(b,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(v.formatter=u(h),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new nS(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new uS(u(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(R,...C)=>{this.emit(R,...C)}),this.modules.languageDetector&&(v.languageDetector=u(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=u(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new Gi(this.services,this.options),this.translator.on("*",(R,...C)=>{this.emit(R,...C)}),this.modules.external.forEach(R=>{R.init&&R.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Oi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=(...b)=>this.store[h](...b)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...b)=>(this.store[h](...b),this)});const p=sl(),g=()=>{const h=(b,v)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),p.resolve(v),i(b,v)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),p}loadResources(l,i=Oi){var m,f;let o=i;const u=Te(l)?l:this.language;if(typeof l=="function"&&(o=l),!this.options.resources||this.options.partialBundledLanguages){if((u==null?void 0:u.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const p=[],g=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(v=>{v!=="cimode"&&p.indexOf(v)<0&&p.push(v)})};u?g(u):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(b=>g(b)),(f=(m=this.options.preload)==null?void 0:m.forEach)==null||f.call(m,h=>g(h)),this.services.backendConnector.load(p,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(h)})}else o(null)}reloadResources(l,i,o){const u=sl();return typeof l=="function"&&(o=l,l=void 0),typeof i=="function"&&(o=i,i=void 0),l||(l=this.languages),i||(i=this.options.ns),o||(o=Oi),this.services.backendConnector.reload(l,i,m=>{u.resolve(),o(m)}),u}use(l){if(!l)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!l.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return l.type==="backend"&&(this.modules.backend=l),(l.type==="logger"||l.log&&l.warn&&l.error)&&(this.modules.logger=l),l.type==="languageDetector"&&(this.modules.languageDetector=l),l.type==="i18nFormat"&&(this.modules.i18nFormat=l),l.type==="postProcessor"&&Og.addPostProcessor(l),l.type==="formatter"&&(this.modules.formatter=l),l.type==="3rdParty"&&this.modules.external.push(l),this}setResolvedLanguage(l){if(!(!l||!this.languages)&&!(["cimode","dev"].indexOf(l)>-1)){for(let i=0;i<this.languages.length;i++){const o=this.languages[i];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&this.languages.indexOf(l)<0&&this.store.hasLanguageSomeTranslations(l)&&(this.resolvedLanguage=l,this.languages.unshift(l))}}changeLanguage(l,i){this.isLanguageChangingTo=l;const o=sl();this.emit("languageChanging",l);const u=p=>{this.language=p,this.languages=this.services.languageUtils.toResolveHierarchy(p),this.resolvedLanguage=void 0,this.setResolvedLanguage(p)},m=(p,g)=>{g?this.isLanguageChangingTo===l&&(u(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,o.resolve((...h)=>this.t(...h)),i&&i(p,(...h)=>this.t(...h))},f=p=>{var b,v;!l&&!p&&this.services.languageDetector&&(p=[]);const g=Te(p)?p:p&&p[0],h=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(Te(p)?[p]:p);h&&(this.language||u(h),this.translator.language||this.translator.changeLanguage(h),(v=(b=this.services.languageDetector)==null?void 0:b.cacheUserLanguage)==null||v.call(b,h)),this.loadResources(h,A=>{m(A,h)})};return!l&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!l&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(l),o}getFixedT(l,i,o){const u=(m,f,...p)=>{let g;typeof f!="object"?g=this.options.overloadTranslationOptionHandler([m,f].concat(p)):g={...f},g.lng=g.lng||u.lng,g.lngs=g.lngs||u.lngs,g.ns=g.ns||u.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||o||u.keyPrefix);const h=this.options.keySeparator||".";let b;return g.keyPrefix&&Array.isArray(m)?b=m.map(v=>(typeof v=="function"&&(v=Au(v,{...this.options,...f})),`${g.keyPrefix}${h}${v}`)):(typeof m=="function"&&(m=Au(m,{...this.options,...f})),b=g.keyPrefix?`${g.keyPrefix}${h}${m}`:m),this.t(b,g)};return Te(l)?u.lng=l:u.lngs=l,u.ns=i,u.keyPrefix=o,u}t(...l){var i;return(i=this.translator)==null?void 0:i.translate(...l)}exists(...l){var i;return(i=this.translator)==null?void 0:i.exists(...l)}setDefaultNamespace(l){this.options.defaultNS=l}hasLoadedNamespace(l,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=i.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,m=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const f=(p,g)=>{const h=this.services.backendConnector.state[`${p}|${g}`];return h===-1||h===0||h===2};if(i.precheck){const p=i.precheck(this,f);if(p!==void 0)return p}return!!(this.hasResourceBundle(o,l)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(o,l)&&(!u||f(m,l)))}loadNamespaces(l,i){const o=sl();return this.options.ns?(Te(l)&&(l=[l]),l.forEach(u=>{this.options.ns.indexOf(u)<0&&this.options.ns.push(u)}),this.loadResources(u=>{o.resolve(),i&&i(u)}),o):(i&&i(),Promise.resolve())}loadLanguages(l,i){const o=sl();Te(l)&&(l=[l]);const u=this.options.preload||[],m=l.filter(f=>u.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return m.length?(this.options.preload=u.concat(m),this.loadResources(f=>{o.resolve(),i&&i(f)}),o):(i&&i(),Promise.resolve())}dir(l){var u,m;if(l||(l=this.resolvedLanguage||(((u=this.languages)==null?void 0:u.length)>0?this.languages[0]:this.language)),!l)return"rtl";try{const f=new Intl.Locale(l);if(f&&f.getTextInfo){const p=f.getTextInfo();if(p&&p.direction)return p.direction}}catch{}const i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=((m=this.services)==null?void 0:m.languageUtils)||new xh(wh());return l.toLowerCase().indexOf("-latn")>1?"ltr":i.indexOf(o.getLanguagePartFromCode(l))>-1||l.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(l={},i){return new dl(l,i)}cloneInstance(l={},i=Oi){const o=l.forkResourceStore;o&&delete l.forkResourceStore;const u={...this.options,...l,isClone:!0},m=new dl(u);if((l.debug!==void 0||l.prefix!==void 0)&&(m.logger=m.logger.clone(l)),["store","services","language"].forEach(p=>{m[p]=this[p]}),m.services={...this.services},m.services.utils={hasLoadedNamespace:m.hasLoadedNamespace.bind(m)},o){const p=Object.keys(this.store.data).reduce((g,h)=>(g[h]={...this.store.data[h]},g[h]=Object.keys(g[h]).reduce((b,v)=>(b[v]={...g[h][v]},b),g[h]),g),{});m.store=new hh(p,u),m.services.resourceStore=m.store}return m.translator=new Gi(m.services,u),m.translator.on("*",(p,...g)=>{m.emit(p,...g)}),m.init(u,i),m.translator.options=u,m.translator.backendConnector.services.utils={hasLoadedNamespace:m.hasLoadedNamespace.bind(m)},m}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const It=dl.createInstance();It.createInstance=dl.createInstance;It.createInstance;It.dir;It.init;It.loadResources;It.reloadResources;It.use;It.changeLanguage;It.getFixedT;It.t;It.exists;It.setDefaultNamespace;It.hasLoadedNamespace;It.loadNamespaces;It.loadLanguages;const{slice:mS,forEach:fS}=[];function pS(s){return fS.call(mS.call(arguments,1),l=>{if(l)for(const i in l)s[i]===void 0&&(s[i]=l[i])}),s}function hS(s){return typeof s!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(i=>i.test(s))}const Nh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,gS=function(s,l){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},u=encodeURIComponent(l);let m=`${s}=${u}`;if(o.maxAge>0){const f=o.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");m+=`; Max-Age=${Math.floor(f)}`}if(o.domain){if(!Nh.test(o.domain))throw new TypeError("option domain is invalid");m+=`; Domain=${o.domain}`}if(o.path){if(!Nh.test(o.path))throw new TypeError("option path is invalid");m+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");m+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(m+="; HttpOnly"),o.secure&&(m+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:m+="; SameSite=Strict";break;case"lax":m+="; SameSite=Lax";break;case"strict":m+="; SameSite=Strict";break;case"none":m+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(m+="; Partitioned"),m},Ch={create(s,l,i,o){let u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(u.expires=new Date,u.expires.setTime(u.expires.getTime()+i*60*1e3)),o&&(u.domain=o),document.cookie=gS(s,l,u)},read(s){const l=`${s}=`,i=document.cookie.split(";");for(let o=0;o<i.length;o++){let u=i[o];for(;u.charAt(0)===" ";)u=u.substring(1,u.length);if(u.indexOf(l)===0)return u.substring(l.length,u.length)}return null},remove(s,l){this.create(s,"",-1,l)}};var xS={name:"cookie",lookup(s){let{lookupCookie:l}=s;if(l&&typeof document<"u")return Ch.read(l)||void 0},cacheUserLanguage(s,l){let{lookupCookie:i,cookieMinutes:o,cookieDomain:u,cookieOptions:m}=l;i&&typeof document<"u"&&Ch.create(i,s,o,u,m)}},yS={name:"querystring",lookup(s){var o;let{lookupQuerystring:l}=s,i;if(typeof window<"u"){let{search:u}=window.location;!window.location.search&&((o=window.location.hash)==null?void 0:o.indexOf("?"))>-1&&(u=window.location.hash.substring(window.location.hash.indexOf("?")));const f=u.substring(1).split("&");for(let p=0;p<f.length;p++){const g=f[p].indexOf("=");g>0&&f[p].substring(0,g)===l&&(i=f[p].substring(g+1))}}return i}},vS={name:"hash",lookup(s){var u;let{lookupHash:l,lookupFromHashIndex:i}=s,o;if(typeof window<"u"){const{hash:m}=window.location;if(m&&m.length>2){const f=m.substring(1);if(l){const p=f.split("&");for(let g=0;g<p.length;g++){const h=p[g].indexOf("=");h>0&&p[g].substring(0,h)===l&&(o=p[g].substring(h+1))}}if(o)return o;if(!o&&i>-1){const p=m.match(/\/([a-zA-Z-]*)/g);return Array.isArray(p)?(u=p[typeof i=="number"?i:0])==null?void 0:u.replace("/",""):void 0}}}return o}};let an=null;const kh=()=>{if(an!==null)return an;try{if(an=typeof window<"u"&&window.localStorage!==null,!an)return!1;const s="i18next.translate.boo";window.localStorage.setItem(s,"foo"),window.localStorage.removeItem(s)}catch{an=!1}return an};var bS={name:"localStorage",lookup(s){let{lookupLocalStorage:l}=s;if(l&&kh())return window.localStorage.getItem(l)||void 0},cacheUserLanguage(s,l){let{lookupLocalStorage:i}=l;i&&kh()&&window.localStorage.setItem(i,s)}};let sn=null;const Ah=()=>{if(sn!==null)return sn;try{if(sn=typeof window<"u"&&window.sessionStorage!==null,!sn)return!1;const s="i18next.translate.boo";window.sessionStorage.setItem(s,"foo"),window.sessionStorage.removeItem(s)}catch{sn=!1}return sn};var SS={name:"sessionStorage",lookup(s){let{lookupSessionStorage:l}=s;if(l&&Ah())return window.sessionStorage.getItem(l)||void 0},cacheUserLanguage(s,l){let{lookupSessionStorage:i}=l;i&&Ah()&&window.sessionStorage.setItem(i,s)}},wS={name:"navigator",lookup(s){const l=[];if(typeof navigator<"u"){const{languages:i,userLanguage:o,language:u}=navigator;if(i)for(let m=0;m<i.length;m++)l.push(i[m]);o&&l.push(o),u&&l.push(u)}return l.length>0?l:void 0}},jS={name:"htmlTag",lookup(s){let{htmlTag:l}=s,i;const o=l||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(i=o.getAttribute("lang")),i}},NS={name:"path",lookup(s){var u;let{lookupFromPathIndex:l}=s;if(typeof window>"u")return;const i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(i)?(u=i[typeof l=="number"?l:0])==null?void 0:u.replace("/",""):void 0}},CS={name:"subdomain",lookup(s){var u,m;let{lookupFromSubdomainIndex:l}=s;const i=typeof l=="number"?l+1:1,o=typeof window<"u"&&((m=(u=window.location)==null?void 0:u.hostname)==null?void 0:m.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[i]}};let Lg=!1;try{document.cookie,Lg=!0}catch{}const Ug=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Lg||Ug.splice(1,1);const kS=()=>({order:Ug,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:s=>s});class Pg{constructor(l){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(l,i)}init(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=l,this.options=pS(i,this.options||{},kS()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=u=>u.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(xS),this.addDetector(yS),this.addDetector(bS),this.addDetector(SS),this.addDetector(wS),this.addDetector(jS),this.addDetector(NS),this.addDetector(CS),this.addDetector(vS)}addDetector(l){return this.detectors[l.name]=l,this}detect(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,i=[];return l.forEach(o=>{if(this.detectors[o]){let u=this.detectors[o].lookup(this.options);u&&typeof u=="string"&&(u=[u]),u&&(i=i.concat(u))}}),i=i.filter(o=>o!=null&&!hS(o)).map(o=>this.options.convertDetectedLanguage(o)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}cacheUserLanguage(l){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(l)>-1||i.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(l,this.options)}))}}Pg.type="languageDetector";const AS={title:"MCPHub Dashboard",error:"Error",closeButton:"Close",noServers:"No MCP servers available",loading:"Loading...",logout:"Logout",profile:"Profile",changePassword:"Change Password",toggleSidebar:"Toggle Sidebar",welcomeUser:"Welcome, {{username}}",name:"MCPHub"},ES={title:"About",versionInfo:"MCPHub Version: {{version}}",newVersion:"New version available!",currentVersion:"Current version",newVersionAvailable:"New version {{version}} is available",viewOnGitHub:"View on GitHub",checkForUpdates:"Check for Updates",checking:"Checking for updates..."},TS={viewProfile:"View profile",userCenter:"User Center"},RS={label:"Sponsor",title:"Support the Project",rewardAlt:"Reward QR Code",supportMessage:"Support the development of MCPHub by buying me a coffee!",supportButton:"Support on Ko-fi"},MS={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},zS={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},OS={title:"Theme",light:"Light",dark:"Dark",system:"System"},DS={login:"Login",loginTitle:"Login to MCPHub",slogan:"The Unified Hub for MCP Servers",subtitle:"Centralized management platform for Model Context Protocol servers. Organize, monitor, and scale multiple MCP servers with flexible routing strategies.",username:"Username",password:"Password",loggingIn:"Logging in...",emptyFields:"Username and password cannot be empty",loginFailed:"Login failed, please check your username and password",loginError:"An error occurred during login",currentPassword:"Current Password",newPassword:"New Password",confirmPassword:"Confirm Password",passwordsNotMatch:"New password and confirmation do not match",changePasswordSuccess:"Password changed successfully",changePasswordError:"Failed to change password",changePassword:"Change Password",passwordChanged:"Password changed successfully",passwordChangeError:"Failed to change password",defaultPasswordWarning:"Default Password Security Warning",defaultPasswordMessage:"You are using the default password (admin123), which poses a security risk. Please change your password immediately to protect your account.",goToSettings:"Go to Settings",passwordStrengthError:"Password does not meet security requirements",passwordMinLength:"Password must be at least 8 characters long",passwordRequireLetter:"Password must contain at least one letter",passwordRequireNumber:"Password must contain at least one number",passwordRequireSpecial:"Password must contain at least one special character",passwordStrengthHint:"Password must be at least 8 characters and contain letters, numbers, and special characters"},LS={addServer:"Add Server",add:"Add",edit:"Edit",copy:"Copy",delete:"Delete",confirmDelete:"Are you sure you want to delete this server?",deleteWarning:"Deleting server '{{name}}' will remove it and all its data. This action cannot be undone.",status:"Status",tools:"Tools",prompts:"Prompts",name:"Server Name",url:"Server URL",apiKey:"API Key",save:"Save",cancel:"Cancel",invalidConfig:"Could not find configuration data for {{serverName}}",addError:"Failed to add server",editError:"Failed to edit server {{serverName}}",deleteError:"Failed to delete server {{serverName}}",updateError:"Failed to update server",editTitle:"Edit Server: {{serverName}}",type:"Server Type",typeStdio:"STDIO",typeSse:"SSE",typeStreamableHttp:"Streamable HTTP",typeOpenapi:"OpenAPI",command:"Command",arguments:"Arguments",envVars:"Environment Variables",headers:"HTTP Headers",key:"key",value:"value",enabled:"Enabled",enable:"Enable",disable:"Disable",reload:"Reload",reloadSuccess:"Server reloaded successfully",reloadError:"Failed to reload server {{serverName}}",requestOptions:"Connection Configuration",timeout:"Request Timeout",timeoutDescription:"Timeout for requests to the MCP server (ms)",maxTotalTimeout:"Maximum Total Timeout",maxTotalTimeoutDescription:"Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",resetTimeoutOnProgress:"Reset Timeout on Progress",resetTimeoutOnProgressDescription:"Reset timeout on progress notifications",keepAlive:"Keep-Alive Configuration",enableKeepAlive:"Enable Keep-Alive",keepAliveDescription:"Send periodic ping requests to maintain the connection. Useful for long-running connections that may timeout.",keepAliveInterval:"Interval (ms)",keepAliveIntervalDescription:"Time between keep-alive pings in milliseconds (default: 60000ms = 1 minute)",remove:"Remove",toggleError:"Failed to toggle server {{serverName}}",alreadyExists:"Server {{serverName}} already exists",invalidData:"Invalid server data provided",notFound:"Server {{serverName}} not found",namePlaceholder:"Enter server name",urlPlaceholder:"Enter server URL",commandPlaceholder:"Enter command",argumentsPlaceholder:"Enter arguments",errorDetails:"Error Details",viewErrorDetails:"View error details",copyConfig:"Copy Configuration",confirmVariables:"Confirm Variable Configuration",variablesDetected:"Variables detected in configuration. Please confirm these variables are properly configured:",detectedVariables:"Detected Variables",confirmVariablesMessage:"Please ensure these variables are properly defined in your runtime environment. Continue adding server?",confirmAndAdd:"Confirm and Add",openapi:{inputMode:"Input Mode",inputModeUrl:"Specification URL",inputModeSchema:"JSON Schema",specUrl:"OpenAPI Specification URL",schema:"OpenAPI JSON Schema",schemaHelp:"Paste your complete OpenAPI JSON schema here",security:"Security Type",securityNone:"None",securityApiKey:"API Key",securityHttp:"HTTP Authentication",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"API Key Configuration",apiKeyName:"Header/Parameter Name",apiKeyIn:"Location",apiKeyValue:"API Key Value",httpAuthConfig:"HTTP Authentication Configuration",httpScheme:"Authentication Scheme",httpCredentials:"Credentials",httpSchemeBasic:"Basic",httpSchemeBearer:"Bearer",httpSchemeDigest:"Digest",oauth2Config:"OAuth 2.0 Configuration",oauth2Token:"Access Token",openIdConnectConfig:"OpenID Connect Configuration",openIdConnectUrl:"Discovery URL",openIdConnectToken:"ID Token",apiKeyInHeader:"Header",apiKeyInQuery:"Query",apiKeyInCookie:"Cookie",passthroughHeaders:"Passthrough Headers",passthroughHeadersHelp:"Comma-separated list of header names to pass through from tool call requests to upstream OpenAPI endpoints (e.g., Authorization, X-API-Key)"},oauth:{sectionTitle:"OAuth Configuration",sectionDescription:"Configure client credentials for OAuth-protected servers (optional).",clientId:"Client ID",clientSecret:"Client Secret",authorizationEndpoint:"Authorization Endpoint",tokenEndpoint:"Token Endpoint",scopes:"Scopes",scopesPlaceholder:"scope1 scope2",resource:"Resource / Audience",accessToken:"Access Token",refreshToken:"Refresh Token"}},US={online:"Online",offline:"Offline",connecting:"Connecting",oauthRequired:"OAuth Required",clickToAuthorize:"Click to authorize with OAuth",oauthWindowOpened:"OAuth authorization window opened. Please complete the authorization."},PS={general:"Something went wrong",network:"Network connection error. Please check your internet connection",serverConnection:"Unable to connect to the server. Please check if the server is running",serverAdd:"Failed to add server. Please check the server status",serverUpdate:"Failed to edit server {{serverName}}. Please check the server status",serverFetch:"Failed to retrieve server data. Please try again later",initialStartup:"The server might be starting up. Please wait a moment as this process can take some time on first launch...",serverInstall:"Failed to install server",failedToFetchSettings:"Failed to fetch settings",failedToUpdateRouteConfig:"Failed to update route configuration",failedToUpdateSmartRoutingConfig:"Failed to update smart routing configuration"},_S={processing:"Processing...",save:"Save",cancel:"Cancel",back:"Back",refresh:"Refresh",create:"Create",creating:"Creating...",update:"Update",updating:"Updating...",submitting:"Submitting...",delete:"Delete",remove:"Remove",copy:"Copy",copyId:"Copy ID",copyUrl:"Copy URL",copyJson:"Copy JSON",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",copied:"Copied",close:"Close",confirm:"Confirm",language:"Language",true:"True",false:"False",dismiss:"Dismiss",github:"GitHub",wechat:"WeChat",discord:"Discord",required:"Required",secret:"Secret",default:"Default",value:"Value",type:"Type",repeated:"Repeated",valueHint:"Value Hint",choices:"Choices"},BS={dashboard:"Dashboard",servers:"Servers",groups:"Groups",users:"Users",settings:"Settings",changePassword:"Change Password",market:"Market",cloud:"Cloud Market",logs:"Logs"},HS={dashboard:{title:"Dashboard",totalServers:"Total",onlineServers:"Online",offlineServers:"Offline",connectingServers:"Connecting",recentServers:"Recent Servers"},servers:{title:"Servers Management"},groups:{title:"Group Management"},users:{title:"User Management"},settings:{title:"Settings",language:"Language",account:"Account Settings",password:"Change Password",appearance:"Appearance",routeConfig:"Security",installConfig:"Installation",smartRouting:"Smart Routing",oauthServer:"OAuth Server"},market:{title:"Market Hub - Local and Cloud Markets"},logs:{title:"System Logs"}},qS={filters:"Filters",search:"Search logs...",autoScroll:"Auto-scroll",clearLogs:"Clear logs",loading:"Loading logs...",noLogs:"No logs available.",noMatch:"No logs match the current filters.",mainProcess:"Main Process",childProcess:"Child Process",main:"Main",child:"Child"},GS={add:"Add",addNew:"Add New Group",edit:"Edit Group",delete:"Delete",confirmDelete:"Are you sure you want to delete this group?",deleteWarning:"Deleting group '{{name}}' will remove it and all its server associations. This action cannot be undone.",name:"Group Name",namePlaceholder:"Enter group name",nameRequired:"Group name is required",description:"Description",descriptionPlaceholder:"Enter group description (optional)",createError:"Failed to create group",updateError:"Failed to update group",deleteError:"Failed to delete group",serverAddError:"Failed to add server to group",serverRemoveError:"Failed to remove server from group",addServer:"Add Server to Group",selectServer:"Select a server to add",servers:"Servers in Group",remove:"Remove",noGroups:"No groups available. Create a new group to get started.",noServers:"No servers in this group.",noServerOptions:"No servers available",serverCount:"{{count}} Servers",toolSelection:"Tool Selection",toolsSelected:"Selected",allTools:"All",selectedTools:"Selected tools",selectAll:"Select All",selectNone:"Select None",configureTools:"Configure Tools"},FS={title:"Local Installation",official:"Official",by:"By",unknown:"Unknown",tools:"tools",search:"Search",searchPlaceholder:"Search for servers by name, category, or tags",clearFilters:"Clear",clearCategoryFilter:"",clearTagFilter:"",categories:"Categories",tags:"Tags",showTags:"Show tags",hideTags:"Hide tags",moreTags:"",noServers:"No servers found matching your search",backToList:"Back to list",install:"Install",installing:"Installing...",installed:"Installed",installServer:"Install Server: {{name}}",installSuccess:"Server {{serverName}} installed successfully",author:"Author",license:"License",repository:"Repository",examples:"Examples",arguments:"Arguments",argumentName:"Name",description:"Description",required:"Required",example:"Example",viewSchema:"View schema",fetchError:"Error fetching market servers",serverNotFound:"Server not found",searchError:"Error searching servers",filterError:"Error filtering servers by category",tagFilterError:"Error filtering servers by tag",noInstallationMethod:"No installation method available for this server",showing:"Showing {{from}}-{{to}} of {{total}} servers",perPage:"Per page",confirmVariablesMessage:"Please ensure these variables are properly defined in your runtime environment. Continue installing server?",confirmAndInstall:"Confirm and Install"},IS={authorizeTitle:"Authorize Application",authorizeSubtitle:"Allow this application to access your MCPHub account.",buttons:{approve:"Allow access",deny:"Deny",approveSubtitle:"Recommended if you trust this application.",denySubtitle:"You can always grant access later."}},KS={title:"Cloud Support",subtitle:"Powered by MCPRouter",by:"By",server:"Server",config:"Config",created:"Created",updated:"Updated",available:"Available",description:"Description",details:"Details",tools:"Tools",tool:"tool",toolsAvailable:"{{count}} tool available||{{count}} tools available",loadingTools:"Loading tools...",noTools:"No tools available for this server",noDescription:"No description available",viewDetails:"View Details",parameters:"Parameters",result:"Result",error:"Error",callTool:"Call",calling:"Calling...",toolCallSuccess:"Tool {{toolName}} executed successfully",toolCallError:"Failed to call tool {{toolName}}: {{error}}",viewSchema:"View Schema",backToList:"Back to Cloud Market",search:"Search",searchPlaceholder:"Search cloud servers by name, title, or author",clearFilters:"Clear Filters",clearCategoryFilter:"Clear",clearTagFilter:"Clear",categories:"Categories",tags:"Tags",noCategories:"No categories found",noTags:"No tags found",noServers:"No cloud servers found",fetchError:"Error fetching cloud servers",serverNotFound:"Cloud server not found",searchError:"Error searching cloud servers",filterError:"Error filtering cloud servers by category",tagFilterError:"Error filtering cloud servers by tag",showing:"Showing {{from}}-{{to}} of {{total}} cloud servers",perPage:"Per page",apiKeyNotConfigured:"MCPRouter API key not configured",apiKeyNotConfiguredDescription:"To use cloud servers, you need to configure your MCPRouter API key.",getApiKey:"Get API Key",configureInSettings:"Configure in Settings",installServer:"Install {{name}}",installSuccess:"Server {{name}} installed successfully",installError:"Failed to install server: {{error}}"},VS={title:"Registry",official:"Official",latest:"Latest",description:"Description",website:"Website",repository:"Repository",packages:"Packages",package:"package",remotes:"Remotes",remote:"remote",published:"Published",updated:"Updated",install:"Install",installing:"Installing...",installed:"Installed",installServer:"Install {{name}}",installSuccess:"Server {{name}} installed successfully",installError:"Failed to install server: {{error}}",noDescription:"No description available",viewDetails:"View Details",backToList:"Back to Registry",search:"Search",searchPlaceholder:"Search registry servers by name",clearFilters:"Clear",noServers:"No registry servers found",fetchError:"Error fetching registry servers",serverNotFound:"Registry server not found",showing:"Showing {{from}}-{{to}} of {{total}} registry servers",perPage:"Per page",environmentVariables:"Environment Variables",packageArguments:"Package Arguments",runtimeArguments:"Runtime Arguments",headers:"Headers"},$S={run:"Run",running:"Running...",runTool:"Run Tool",cancel:"Cancel",noDescription:"No description available",inputSchema:"Input Schema:",runToolWithName:"Run Tool: {{name}}",execution:"Tool Execution",successful:"Successful",failed:"Failed",result:"Result:",error:"Error",errorDetails:"Error Details:",noContent:"Tool executed successfully but returned no content.",unknownError:"Unknown error occurred",jsonResponse:"JSON Response:",toolResult:"Tool result",noParameters:"This tool does not require any parameters.",selectOption:"Select an option",enterValue:"Enter {{type}} value",enabled:"Enabled",enableSuccess:"Tool {{name}} enabled successfully",disableSuccess:"Tool {{name}} disabled successfully",toggleFailed:"Failed to toggle tool status",parameters:"Tool Parameters",formMode:"Form Mode",jsonMode:"JSON Mode",jsonConfiguration:"JSON Configuration",invalidJsonFormat:"Invalid JSON format",fixJsonBeforeSwitching:"Please fix JSON format before switching to form mode",item:"Item {{index}}",addItem:"Add {{key}} item",enterKey:"Enter {{key}}"},YS={run:"Get",running:"Getting...",result:"Prompt Result",error:"Prompt Error",execution:"Prompt Execution",successful:"Successful",failed:"Failed",errorDetails:"Error Details:",noContent:"Prompt executed successfully but returned no content.",unknownError:"Unknown error occurred",jsonResponse:"JSON Response:",description:"Description",messages:"Messages",noDescription:"No description available",runPromptWithName:"Get Prompt: {{name}}",descriptionUpdateSuccess:"Prompt description updated successfully",descriptionUpdateFailed:"Failed to update prompt description"},JS={enableGlobalRoute:"Enable Global Route",enableGlobalRouteDescription:"Allow connections to /sse endpoint without specifying a group ID",enableGroupNameRoute:"Enable Group Name Route",enableGroupNameRouteDescription:"Allow connections to /sse endpoint using group names instead of just group IDs",enableBearerAuth:"Enable Bearer Authentication",enableBearerAuthDescription:"Require bearer token authentication for MCP requests",bearerAuthKey:"Bearer Authentication Key",bearerAuthKeyDescription:"The authentication key that will be required in the Bearer token",bearerAuthKeyPlaceholder:"Enter bearer authentication key",skipAuth:"Skip Authentication",skipAuthDescription:"Bypass login requirement for frontend and API access (DEFAULT OFF for security)",pythonIndexUrl:"Python Package Repository URL",pythonIndexUrlDescription:"Set UV_DEFAULT_INDEX environment variable for Python package installation",pythonIndexUrlPlaceholder:"e.g. https://pypi.org/simple",npmRegistry:"NPM Registry URL",npmRegistryDescription:"Set npm_config_registry environment variable for NPM package installation",npmRegistryPlaceholder:"e.g. https://registry.npmjs.org/",baseUrl:"Base URL",baseUrlDescription:"Base URL for MCP requests",baseUrlPlaceholder:"e.g. http://localhost:3000",installConfig:"Installation",systemConfigUpdated:"System configuration updated successfully",enableSmartRouting:"Enable Smart Routing",enableSmartRoutingDescription:"Enable smart routing feature to search the most suitable tool based on input (using $smart group name)",dbUrl:"PostgreSQL URL (requires pgvector support)",dbUrlPlaceholder:"e.g. postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API Base URL",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API Key",openaiApiKeyPlaceholder:"Enter OpenAI API key",openaiApiEmbeddingModel:"OpenAI Embedding Model",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"Smart routing configuration updated successfully",smartRoutingRequiredFields:"Database URL and OpenAI API Key are required to enable smart routing",smartRoutingValidationError:"Please fill in the required fields before enabling Smart Routing: {{fields}}",mcpRouterConfig:"Cloud Market",mcpRouterApiKey:"MCPRouter API Key",mcpRouterApiKeyDescription:"API key for accessing MCPRouter cloud market services",mcpRouterApiKeyPlaceholder:"Enter MCPRouter API key",mcpRouterReferer:"Referer",mcpRouterRefererDescription:"Referer header for MCPRouter API requests",mcpRouterRefererPlaceholder:"https://www.mcphubx.com",mcpRouterTitle:"Title",mcpRouterTitleDescription:"Title header for MCPRouter API requests",mcpRouterTitlePlaceholder:"MCPHub",mcpRouterBaseUrl:"Base URL",mcpRouterBaseUrlDescription:"Base URL for MCPRouter API",mcpRouterBaseUrlPlaceholder:"https://api.mcprouter.to/v1",systemSettings:"System Settings",nameSeparatorLabel:"Name Separator",nameSeparatorDescription:"Character used to separate server name and tool/prompt name (default: -)",enableSessionRebuild:"Enable Server Session Rebuild",enableSessionRebuildDescription:"When enabled, applies the improved server session rebuild code for better session management experience",restartRequired:"Configuration saved. It is recommended to restart the application to ensure all services load the new settings correctly.",exportMcpSettings:"Export Settings",mcpSettingsJson:"MCP Settings JSON",mcpSettingsJsonDescription:"View, copy, or download your current mcp_settings.json configuration for backup or migration to other tools",copyToClipboard:"Copy to Clipboard",downloadJson:"Download JSON",exportSuccess:"Settings exported successfully",exportError:"Failed to fetch settings",enableOauthServer:"Enable OAuth Server",enableOauthServerDescription:"Allow MCPHub to issue OAuth tokens for external clients",requireClientSecret:"Require Client Secret",requireClientSecretDescription:"When enabled, confidential clients must present a client secret (disable for PKCE-only clients)",requireState:"Require State Parameter",requireStateDescription:"Reject authorization requests that omit the OAuth state parameter",accessTokenLifetime:"Access Token Lifetime (seconds)",accessTokenLifetimeDescription:"How long issued access tokens remain valid",accessTokenLifetimePlaceholder:"e.g. 3600",refreshTokenLifetime:"Refresh Token Lifetime (seconds)",refreshTokenLifetimeDescription:"How long refresh tokens remain valid",refreshTokenLifetimePlaceholder:"e.g. 1209600",authorizationCodeLifetime:"Authorization Code Lifetime (seconds)",authorizationCodeLifetimeDescription:"How long authorization codes remain valid before they can be exchanged",authorizationCodeLifetimePlaceholder:"e.g. 300",allowedScopes:"Allowed Scopes",allowedScopesDescription:"Comma-separated list of scopes users can approve during authorization",allowedScopesPlaceholder:"e.g. read, write",enableDynamicRegistration:"Enable Dynamic Client Registration",dynamicRegistrationDescription:"Allow RFC 7591 compliant clients to self-register using the public endpoint",dynamicRegistrationAllowedGrantTypes:"Allowed Grant Types",dynamicRegistrationAllowedGrantTypesDescription:"Comma-separated list of grants permitted for dynamically registered clients",dynamicRegistrationAllowedGrantTypesPlaceholder:"e.g. authorization_code, refresh_token",dynamicRegistrationAuth:"Require Authentication",dynamicRegistrationAuthDescription:"Protect the registration endpoint so only authenticated requests can register clients",invalidNumberInput:"Please enter a valid non-negative number"},XS={upload:"Upload",uploadTitle:"Upload DXT Extension",dropFileHere:"Drop your .dxt file here",orClickToSelect:"or click to select from your computer",invalidFileType:"Please select a valid .dxt file",noFileSelected:"Please select a .dxt file to upload",uploading:"Uploading...",uploadFailed:"Failed to upload DXT file",installServer:"Install MCP Server from DXT",extensionInfo:"Extension Information",name:"Name",version:"Version",description:"Description",author:"Author",tools:"Tools",serverName:"Server Name",serverNamePlaceholder:"Enter a name for this server",install:"Install",installing:"Installing...",installFailed:"Failed to install server from DXT",serverExistsTitle:"Server Already Exists",serverExistsConfirm:"Server '{{serverName}}' already exists. Do you want to override it with the new version?",override:"Override"},QS={button:"Import",title:"Import Servers from JSON",inputLabel:"Server Configuration JSON",inputHelp:"Paste your server configuration JSON. Supports STDIO, SSE, and HTTP (streamable-http) server types.",preview:"Preview",previewTitle:"Preview Servers to Import",import:"Import",importing:"Importing...",invalidFormat:"Invalid JSON format. The JSON must contain an 'mcpServers' object.",parseError:"Failed to parse JSON. Please check the format and try again.",addFailed:"Failed to add server",importFailed:"Failed to import servers",partialSuccess:"Imported {{count}} of {{total}} servers successfully. Some servers failed:"},ZS={add:"Add User",addNew:"Add New User",edit:"Edit User",delete:"Delete User",create:"Create User",update:"Update User",username:"Username",password:"Password",newPassword:"New Password",confirmPassword:"Confirm Password",changePassword:"Change Password",adminRole:"Administrator",admin:"Admin",user:"User",role:"Role",actions:"Actions",addFirst:"Add your first user",permissions:"Permissions",adminPermissions:"Full system access",userPermissions:"Limited access",currentUser:"You",noUsers:"No users found",adminRequired:"Administrator access required to manage users",usernameRequired:"Username is required",passwordRequired:"Password is required",passwordTooShort:"Password must be at least 6 characters long",passwordMismatch:"Passwords do not match",usernamePlaceholder:"Enter username",passwordPlaceholder:"Enter password",newPasswordPlaceholder:"Leave empty to keep current password",confirmPasswordPlaceholder:"Confirm new password",createError:"Failed to create user",updateError:"Failed to update user",deleteError:"Failed to delete user",statsError:"Failed to fetch user statistics",deleteConfirmation:"Are you sure you want to delete user '{{username}}'? This action cannot be undone.",confirmDelete:"Delete User",deleteWarning:"Are you sure you want to delete user '{{username}}'? This action cannot be undone."},WS={errors:{readonly:"Readonly for demo environment",invalid_credentials:"Invalid username or password",serverNameRequired:"Server name is required",serverConfigRequired:"Server configuration is required",serverConfigInvalid:"Server configuration must include either a URL, OpenAPI specification URL or schema, or command with arguments",serverTypeInvalid:"Server type must be one of: stdio, sse, streamable-http, openapi",urlRequiredForType:"URL is required for {{type}} server type",openapiSpecRequired:"OpenAPI specification URL or schema is required for openapi server type",headersInvalidFormat:"Headers must be an object",headersNotSupportedForStdio:"Headers are not supported for stdio server type",serverNotFound:"Server not found",failedToRemoveServer:"Server not found or failed to remove",internalServerError:"Internal server error",failedToGetServers:"Failed to get servers information",failedToReloadServer:"Failed to reload server",failedToGetServerSettings:"Failed to get server settings",failedToGetServerConfig:"Failed to get server configuration",failedToSaveSettings:"Failed to save settings",toolNameRequired:"Server name and tool name are required",descriptionMustBeString:"Description must be a string",groupIdRequired:"Group ID is required",groupNameRequired:"Group name is required",groupNotFound:"Group not found",groupIdAndServerNameRequired:"Group ID and server name are required",groupOrServerNotFound:"Group or server not found",toolsMustBeAllOrArray:'Tools must be "all" or an array of strings',serverNameAndToolNameRequired:"Server name and tool name are required",usernameRequired:"Username is required",userNotFound:"User not found",failedToGetUsers:"Failed to get users information",failedToGetUserInfo:"Failed to get user information",failedToGetUserStats:"Failed to get user statistics",marketServerNameRequired:"Server name is required",marketServerNotFound:"Market server not found",failedToGetMarketServers:"Failed to get market servers information",failedToGetMarketServer:"Failed to get market server information",failedToGetMarketCategories:"Failed to get market categories",failedToGetMarketTags:"Failed to get market tags",failedToSearchMarketServers:"Failed to search market servers",failedToFilterMarketServers:"Failed to filter market servers",failedToProcessDxtFile:"Failed to process DXT file"},success:{serverCreated:"Server created successfully",serverUpdated:"Server updated successfully",serverRemoved:"Server removed successfully",serverToggled:"Server status toggled successfully",toolToggled:"Tool {{name}} {{action}} successfully",toolDescriptionUpdated:"Tool {{name}} description updated successfully",systemConfigUpdated:"System configuration updated successfully",groupCreated:"Group created successfully",groupUpdated:"Group updated successfully",groupDeleted:"Group deleted successfully",serverAddedToGroup:"Server added to group successfully",serverRemovedFromGroup:"Server removed from group successfully",serverToolsUpdated:"Server tools updated successfully"}},ew={authorizationFailed:"Authorization Failed",authorizationFailedError:"Error",authorizationFailedDetails:"Details",invalidRequest:"Invalid Request",missingStateParameter:"Missing required OAuth state parameter.",missingCodeParameter:"Missing required authorization code parameter.",serverNotFound:"Server Not Found",serverNotFoundMessage:"Could not find server associated with this authorization request.",sessionExpiredMessage:"The authorization session may have expired. Please try authorizing again.",authorizationSuccessful:"Authorization Successful",server:"Server",status:"Status",connected:"Connected",successMessage:"The server has been successfully authorized and connected.",autoCloseMessage:"This window will close automatically in 3 seconds...",closeNow:"Close Now",connectionError:"Connection Error",connectionErrorMessage:"Authorization was successful, but failed to connect to the server.",reconnectMessage:"Please try reconnecting from the dashboard.",configurationError:"Configuration Error",configurationErrorMessage:"Server transport does not support OAuth finishAuth(). Please ensure the server is configured with streamable-http transport.",internalError:"Internal Error",internalErrorMessage:"An unexpected error occurred while processing the OAuth callback.",closeWindow:"Close Window"},tw={app:AS,about:ES,profile:TS,sponsor:RS,wechat:MS,discord:zS,theme:OS,auth:DS,server:LS,status:US,errors:PS,common:_S,nav:BS,pages:HS,logs:qS,groups:GS,market:FS,oauthServer:IS,cloud:KS,registry:VS,tool:$S,prompt:YS,settings:JS,dxt:XS,jsonImport:QS,users:ZS,api:WS,oauthCallback:ew},rw={title:"MCPHub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCPHub"},aw={title:"关于",versionInfo:"MCPHub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},sw={viewProfile:"查看个人中心",userCenter:"个人中心"},nw={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCPHub 的开发!",supportButton:"在 Ko-fi 上支持"},lw={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},iw={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},ow={title:"主题",light:"浅色",dark:"深色",system:"系统"},cw={login:"登录",loginTitle:"登录 MCPHub",slogan:"统一的 MCP 服务器管理平台",subtitle:"模型上下文协议服务器的集中管理平台,通过灵活的路由策略组织、监控和扩展多个 MCP 服务器。",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败",defaultPasswordWarning:"默认密码安全警告",defaultPasswordMessage:"您正在使用默认密码(admin123),这存在安全风险。为了保护您的账户安全,请立即修改密码。",goToSettings:"前往修改",passwordStrengthError:"密码不符合安全要求",passwordMinLength:"密码长度至少为 8 个字符",passwordRequireLetter:"密码必须包含至少一个字母",passwordRequireNumber:"密码必须包含至少一个数字",passwordRequireSpecial:"密码必须包含至少一个特殊字符",passwordStrengthHint:"密码必须至少 8 个字符,且包含字母、数字和特殊字符"},uw={addServer:"添加服务器",add:"添加",edit:"编辑",copy:"复制",delete:"删除",confirmDelete:"您确定要删除此服务器吗?",deleteWarning:"删除服务器 '{{name}}' 将会移除该服务器及其所有数据。此操作无法撤销。",status:"状态",tools:"工具",prompts:"提示词",name:"服务器名称",url:"服务器 URL",apiKey:"API 密钥",save:"保存",cancel:"取消",addError:"添加服务器失败",editError:"编辑服务器 {{serverName}} 失败",invalidConfig:"无法找到 {{serverName}} 的配置数据",deleteError:"删除服务器 {{serverName}} 失败",updateError:"更新服务器失败",editTitle:"编辑服务器: {{serverName}}",type:"服务器类型",typeStdio:"STDIO",typeSse:"SSE",typeStreamableHttp:"流式 HTTP",typeOpenapi:"OpenAPI",command:"命令",arguments:"参数",envVars:"环境变量",headers:"HTTP 请求头",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",reload:"重载",reloadSuccess:"服务器重载成功",reloadError:"重载服务器 {{serverName}} 失败",requestOptions:"连接配置",timeout:"请求超时",timeoutDescription:"请求超时时间(毫秒)",maxTotalTimeout:"最大总超时",maxTotalTimeoutDescription:"无论是否有进度通知的最大总超时时间(毫秒)",resetTimeoutOnProgress:"收到进度通知时重置超时",resetTimeoutOnProgressDescription:"适用于发送周期性进度更新的长时间运行操作",keepAlive:"保活配置",enableKeepAlive:"启用保活",keepAliveDescription:"定期发送 ping 请求以维持连接。适用于可能超时的长期连接。",keepAliveInterval:"间隔时间(毫秒)",keepAliveIntervalDescription:"保活 ping 的时间间隔(默认:60000毫秒 = 1分钟)",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情",copyConfig:"复制配置",confirmVariables:"确认变量配置",variablesDetected:"检测到配置中包含变量,请确认这些变量是否已正确配置:",detectedVariables:"检测到的变量",confirmVariablesMessage:"请确保这些变量在运行环境中已正确定义。是否继续添加服务器?",confirmAndAdd:"确认并添加",openapi:{inputMode:"输入模式",inputModeUrl:"规范 URL",inputModeSchema:"JSON 模式",specUrl:"OpenAPI 规范 URL",schema:"OpenAPI JSON 模式",schemaHelp:"请在此处粘贴完整的 OpenAPI JSON 模式",security:"安全类型",securityNone:"无",securityApiKey:"API 密钥",securityHttp:"HTTP 认证",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"API 密钥配置",apiKeyName:"请求头/参数名称",apiKeyIn:"位置",apiKeyValue:"API 密钥值",httpAuthConfig:"HTTP 认证配置",httpScheme:"认证方案",httpCredentials:"凭据",httpSchemeBasic:"Basic",httpSchemeBearer:"Bearer",httpSchemeDigest:"Digest",oauth2Config:"OAuth 2.0 配置",oauth2Token:"访问令牌",openIdConnectConfig:"OpenID Connect 配置",openIdConnectUrl:"发现 URL",openIdConnectToken:"ID 令牌",apiKeyInHeader:"请求头",apiKeyInQuery:"查询",apiKeyInCookie:"Cookie",passthroughHeaders:"透传请求头",passthroughHeadersHelp:"要从工具调用请求透传到上游OpenAPI接口的请求头名称列表,用逗号分隔(如:Authorization, X-API-Key)"},oauth:{sectionTitle:"OAuth 配置",sectionDescription:"为需要 OAuth 的服务器配置客户端凭据(可选)。",clientId:"客户端 ID",clientSecret:"客户端密钥",authorizationEndpoint:"授权端点",tokenEndpoint:"令牌端点",scopes:"权限范围(Scopes)",scopesPlaceholder:"scope1 scope2",resource:"资源 / 受众",accessToken:"访问令牌",refreshToken:"刷新令牌"}},dw={online:"在线",offline:"离线",connecting:"连接中",oauthRequired:"需要OAuth授权",clickToAuthorize:"点击进行OAuth授权",oauthWindowOpened:"OAuth授权窗口已打开,请完成授权。"},mw={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",failedToReloadServer:"重载服务器失败",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},fw={processing:"处理中...",save:"保存",cancel:"取消",back:"返回",refresh:"刷新",create:"创建",creating:"创建中...",update:"更新",updating:"更新中...",submitting:"提交中...",delete:"删除",remove:"移除",copy:"复制",copyId:"复制ID",copyUrl:"复制URL",copyJson:"复制JSON",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",copied:"已复制",close:"关闭",confirm:"确认",language:"语言",true:"是",false:"否",dismiss:"忽略",github:"GitHub",wechat:"微信",discord:"Discord",required:"必填",secret:"敏感",default:"默认值",value:"值",type:"类型",repeated:"可重复",valueHint:"值提示",choices:"可选值"},pw={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",users:"用户",market:"市场",cloud:"云端市场",logs:"日志"},hw={dashboard:{title:"仪表盘",totalServers:"总数",onlineServers:"在线",offlineServers:"离线",connectingServers:"连接中",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"安全配置",installConfig:"安装",smartRouting:"智能路由",oauthServer:"OAuth 服务器"},groups:{title:"分组管理"},users:{title:"用户管理"},market:{title:"市场中心 - 本地市场和云端市场"},logs:{title:"系统日志"}},gw={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},xw={add:"添加",addNew:"添加新分组",edit:"编辑分组",delete:"删除",confirmDelete:"您确定要删除此分组吗?",deleteWarning:"删除分组 '{{name}}' 将会移除该分组及其所有服务器关联。此操作无法撤销。",name:"分组名称",namePlaceholder:"请输入分组名称",nameRequired:"分组名称不能为空",description:"描述",descriptionPlaceholder:"请输入分组描述(可选)",createError:"创建分组失败",updateError:"更新分组失败",deleteError:"删除分组失败",serverAddError:"向分组添加服务器失败",serverRemoveError:"从分组移除服务器失败",addServer:"添加服务器到分组",selectServer:"选择要添加的服务器",servers:"分组中的服务器",remove:"移除",noGroups:"暂无可用分组。创建一个新分组以开始使用。",noServers:"此分组中没有服务器。",noServerOptions:"没有可用的服务器",serverCount:"{{count}} 台服务器",toolSelection:"工具选择",toolsSelected:"选择",allTools:"全部",selectedTools:"选中的工具",selectAll:"全选",selectNone:"全不选",configureTools:"配置工具"},yw={title:"本地安装",official:"官方",by:"作者",unknown:"未知",tools:"工具",search:"搜索",searchPlaceholder:"搜索服务器名称、分类或标签",clearFilters:"清除",clearCategoryFilter:"",clearTagFilter:"",categories:"分类",tags:"标签",showTags:"显示标签",hideTags:"隐藏标签",moreTags:"",noServers:"未找到匹配的服务器",backToList:"返回列表",install:"安装",installing:"安装中...",installed:"已安装",installServer:"安装服务器: {{name}}",installSuccess:"服务器 {{serverName}} 安装成功",author:"作者",license:"许可证",repository:"代码仓库",examples:"示例",arguments:"参数",argumentName:"名称",description:"描述",required:"必填",example:"示例",viewSchema:"查看结构",fetchError:"获取本地市场服务器数据失败",serverNotFound:"未找到服务器",searchError:"搜索服务器失败",filterError:"按分类筛选服务器失败",tagFilterError:"按标签筛选服务器失败",noInstallationMethod:"该服务器没有可用的安装方法",showing:"显示 {{from}}-{{to}}/{{total}} 个服务器",perPage:"每页显示",confirmVariablesMessage:"请确保这些变量在运行环境中已正确定义。是否继续安装服务器?",confirmAndInstall:"确认并安装"},vw={authorizeTitle:"授权应用",authorizeSubtitle:"允许此应用访问您的 MCPHub 账号。",buttons:{approve:"允许访问",deny:"拒绝",approveSubtitle:"如果您信任此应用,建议选择允许。",denySubtitle:"您可以在之后随时再次授权。"}},bw={title:"云端支持",subtitle:"由 MCPRouter 提供支持",by:"作者",server:"服务器",config:"配置",created:"创建时间",updated:"更新时间",available:"可用",description:"描述",details:"详细信息",tools:"工具",tool:"个工具",toolsAvailable:"{{count}} 个工具可用",loadingTools:"加载工具中...",noTools:"该服务器没有可用工具",noDescription:"无描述信息",viewDetails:"查看详情",parameters:"参数",result:"结果",error:"错误",callTool:"调用",calling:"调用中...",toolCallSuccess:"工具 {{toolName}} 执行成功",toolCallError:"调用工具 {{toolName}} 失败:{{error}}",viewSchema:"查看结构",backToList:"返回云端市场",search:"搜索",searchPlaceholder:"搜索云端服务器名称、标题或作者",clearFilters:"清除筛选",clearCategoryFilter:"清除",clearTagFilter:"清除",categories:"分类",tags:"标签",noCategories:"未找到分类",noTags:"未找到标签",noServers:"未找到云端服务器",fetchError:"获取云端服务器失败",serverNotFound:"未找到云端服务器",searchError:"搜索云端服务器失败",filterError:"按分类筛选云端服务器失败",tagFilterError:"按标签筛选云端服务器失败",showing:"显示 {{from}}-{{to}}/{{total}} 个云端服务器",perPage:"每页显示",apiKeyNotConfigured:"MCPRouter API 密钥未配置",apiKeyNotConfiguredDescription:"要使用云端服务器,您需要配置 MCPRouter API 密钥。",getApiKey:"获取 API 密钥",configureInSettings:"在设置中配置",installServer:"安装 {{name}}",installSuccess:"服务器 {{name}} 安装成功",installError:"安装服务器失败:{{error}}"},Sw={title:"注册中心",official:"官方",latest:"最新版本",description:"描述",website:"网站",repository:"代码仓库",packages:"安装包",package:"安装包",remotes:"远程服务",remote:"远程服务",published:"发布时间",updated:"更新时间",install:"安装",installing:"安装中...",installed:"已安装",installServer:"安装 {{name}}",installSuccess:"服务器 {{name}} 安装成功",installError:"安装服务器失败:{{error}}",noDescription:"无描述信息",viewDetails:"查看详情",backToList:"返回注册中心",search:"搜索",searchPlaceholder:"按名称搜索注册中心服务器",clearFilters:"清除",noServers:"未找到注册中心服务器",fetchError:"获取注册中心服务器失败",serverNotFound:"未找到注册中心服务器",showing:"显示 {{from}}-{{to}}/{{total}} 个注册中心服务器",perPage:"每页显示",environmentVariables:"环境变量",packageArguments:"安装包参数",runtimeArguments:"运行时参数",headers:"请求头"},ww={run:"运行",running:"运行中...",runTool:"运行",cancel:"取消",noDescription:"无描述信息",inputSchema:"输入模式:",runToolWithName:"运行工具:{{name}}",execution:"工具执行",successful:"成功",failed:"失败",result:"结果:",error:"错误",errorDetails:"错误详情:",noContent:"工具执行成功但未返回内容。",unknownError:"发生未知错误",jsonResponse:"JSON 响应:",toolResult:"工具结果",noParameters:"此工具不需要任何参数。",selectOption:"选择一个选项",enterValue:"输入{{type}}值",enabled:"已启用",enableSuccess:"工具 {{name}} 启用成功",disableSuccess:"工具 {{name}} 禁用成功",toggleFailed:"切换工具状态失败",parameters:"工具参数",formMode:"表单模式",jsonMode:"JSON 模式",jsonConfiguration:"JSON 配置",invalidJsonFormat:"无效的 JSON 格式",fixJsonBeforeSwitching:"请修复 JSON 格式后再切换到表单模式",item:"项目 {{index}}",addItem:"添加 {{key}} 项目",enterKey:"输入 {{key}}"},jw={run:"获取",running:"获取中...",result:"提示词结果",error:"提示词错误",execution:"提示词执行",successful:"成功",failed:"失败",errorDetails:"错误详情:",noContent:"提示词执行成功但未返回内容。",unknownError:"发生未知错误",jsonResponse:"JSON 响应:",description:"描述",messages:"消息",noDescription:"无描述信息",runPromptWithName:"获取提示词: {{name}}",descriptionUpdateSuccess:"提示词描述更新成功",descriptionUpdateFailed:"更新提示词描述失败"},Nw={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",skipAuth:"免登录开关",skipAuthDescription:"跳过前端和 API 访问的登录要求(默认关闭确保安全性)",pythonIndexUrl:"Python 包仓库地址",pythonIndexUrlDescription:"设置 UV_DEFAULT_INDEX 环境变量,用于 Python 包安装",pythonIndexUrlPlaceholder:"例如: https://mirrors.aliyun.com/pypi/simple",npmRegistry:"NPM 仓库地址",npmRegistryDescription:"设置 npm_config_registry 环境变量,用于 NPM 包安装",npmRegistryPlaceholder:"例如: https://registry.npmmirror.com/",baseUrl:"基础地址",baseUrlDescription:"用于 MCP 请求的基础地址",baseUrlPlaceholder:"例如: http://localhost:3000",installConfig:"安装配置",systemConfigUpdated:"系统配置更新成功",enableSmartRouting:"启用智能路由",enableSmartRoutingDescription:"开启智能路由功能,根据输入自动搜索最合适的工具(使用 $smart 分组)",dbUrl:"PostgreSQL 连接地址(必须支持 pgvector)",dbUrlPlaceholder:"例如: postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API 基础地址",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API 密钥",openaiApiKeyDescription:"用于访问 OpenAI API 的密钥",openaiApiKeyPlaceholder:"请输入 OpenAI API 密钥",openaiApiEmbeddingModel:"OpenAI 嵌入模型",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"智能路由配置更新成功",smartRoutingRequiredFields:"启用智能路由需要填写数据库连接地址和 OpenAI API 密钥",smartRoutingValidationError:"启用智能路由前请先填写必要字段:{{fields}}",mcpRouterConfig:"云端市场",mcpRouterApiKey:"MCPRouter API 密钥",mcpRouterApiKeyDescription:"用于访问 MCPRouter 云端市场服务的 API 密钥",mcpRouterApiKeyPlaceholder:"请输入 MCPRouter API 密钥",mcpRouterReferer:"引用地址",mcpRouterRefererDescription:"MCPRouter API 请求的引用地址头",mcpRouterRefererPlaceholder:"https://www.mcphubx.com",mcpRouterTitle:"标题",mcpRouterTitleDescription:"MCPRouter API 请求的标题头",mcpRouterTitlePlaceholder:"MCPHub",mcpRouterBaseUrl:"基础地址",mcpRouterBaseUrlDescription:"MCPRouter API 的基础地址",mcpRouterBaseUrlPlaceholder:"https://api.mcprouter.to/v1",systemSettings:"系统设置",nameSeparatorLabel:"名称分隔符",nameSeparatorDescription:"用于分隔服务器名称和工具/提示名称(默认:-)",enableSessionRebuild:"启用服务端会话重建",enableSessionRebuildDescription:"开启后会应用服务端会话重建的改进代码,提供更好的会话管理体验",restartRequired:"配置已保存。为确保所有服务正确加载新设置,建议重启应用。",exportMcpSettings:"导出配置",mcpSettingsJson:"MCP 配置 JSON",mcpSettingsJsonDescription:"查看、复制或下载当前的 mcp_settings.json 配置,可用于备份或迁移到其他工具",copyToClipboard:"复制到剪贴板",downloadJson:"下载 JSON",exportSuccess:"配置导出成功",exportError:"获取配置失败",enableOauthServer:"启用 OAuth 服务器",enableOauthServerDescription:"允许 MCPHub 作为 OAuth 2.0 授权服务器向外部客户端签发令牌",requireClientSecret:"需要客户端密钥",requireClientSecretDescription:"开启后,保密客户端必须携带 client secret(如需仅使用 PKCE 的公共客户端可关闭)",requireState:"要求 state 参数",requireStateDescription:"拒绝未携带 state 参数的授权请求",accessTokenLifetime:"访问令牌有效期(秒)",accessTokenLifetimeDescription:"控制访问令牌可使用的时长",accessTokenLifetimePlaceholder:"例如:3600",refreshTokenLifetime:"刷新令牌有效期(秒)",refreshTokenLifetimeDescription:"控制刷新令牌的过期时间",refreshTokenLifetimePlaceholder:"例如:1209600",authorizationCodeLifetime:"授权码有效期(秒)",authorizationCodeLifetimeDescription:"授权码在被兑换前可保持有效的时间",authorizationCodeLifetimePlaceholder:"例如:300",allowedScopes:"允许的作用域",allowedScopesDescription:"使用逗号分隔的作用域列表,在授权时展示给用户",allowedScopesPlaceholder:"例如:read, write",enableDynamicRegistration:"启用动态客户端注册",dynamicRegistrationDescription:"允许遵循 RFC 7591 的客户端通过公共端点自行注册",dynamicRegistrationAllowedGrantTypes:"允许的授权类型",dynamicRegistrationAllowedGrantTypesDescription:"使用逗号分隔动态注册客户端可以使用的授权类型",dynamicRegistrationAllowedGrantTypesPlaceholder:"例如:authorization_code, refresh_token",dynamicRegistrationAuth:"注册需要认证",dynamicRegistrationAuthDescription:"开启后,注册端点需要认证请求才能创建客户端",invalidNumberInput:"请输入合法的非负数字"},Cw={upload:"上传",uploadTitle:"上传 DXT 扩展",dropFileHere:"将 .dxt 文件拖拽到此处",orClickToSelect:"或点击从计算机选择",invalidFileType:"请选择有效的 .dxt 文件",noFileSelected:"请选择要上传的 .dxt 文件",uploading:"上传中...",uploadFailed:"上传 DXT 文件失败",installServer:"从 DXT 安装 MCP 服务器",extensionInfo:"扩展信息",name:"名称",version:"版本",description:"描述",author:"作者",tools:"工具",serverName:"服务器名称",serverNamePlaceholder:"为此服务器输入名称",install:"安装",installing:"安装中...",installFailed:"从 DXT 安装服务器失败",serverExistsTitle:"服务器已存在",serverExistsConfirm:"服务器 '{{serverName}}' 已存在。是否要用新版本覆盖它?",override:"覆盖"},kw={button:"导入",title:"从 JSON 导入服务器",inputLabel:"服务器配置 JSON",inputHelp:"粘贴您的服务器配置 JSON。支持 STDIO、SSE 和 HTTP (streamable-http) 服务器类型。",preview:"预览",previewTitle:"预览要导入的服务器",import:"导入",importing:"导入中...",invalidFormat:"无效的 JSON 格式。JSON 必须包含 'mcpServers' 对象。",parseError:"解析 JSON 失败。请检查格式后重试。",addFailed:"添加服务器失败",importFailed:"导入服务器失败",partialSuccess:"成功导入 {{count}} / {{total}} 个服务器。部分服务器失败:"},Aw={add:"添加",addNew:"添加新用户",edit:"编辑用户",delete:"删除用户",create:"创建",update:"更新",username:"用户名",password:"密码",newPassword:"新密码",confirmPassword:"确认密码",changePassword:"修改密码",adminRole:"管理员",admin:"管理员",user:"用户",role:"角色",actions:"操作",addFirst:"添加第一个用户",permissions:"权限",adminPermissions:"完全系统访问权限",userPermissions:"受限访问权限",currentUser:"当前用户",noUsers:"没有找到用户",adminRequired:"需要管理员权限才能管理用户",usernameRequired:"用户名是必需的",passwordRequired:"密码是必需的",passwordTooShort:"密码至少需要6个字符",passwordMismatch:"密码不匹配",usernamePlaceholder:"输入用户名",passwordPlaceholder:"输入密码",newPasswordPlaceholder:"留空保持当前密码",confirmPasswordPlaceholder:"确认新密码",createError:"创建用户失败",updateError:"更新用户失败",deleteError:"删除用户失败",statsError:"获取用户统计失败",deleteConfirmation:"您确定要删除用户 '{{username}}' 吗?此操作无法撤消。",confirmDelete:"删除用户",deleteWarning:"您确定要删除用户 '{{username}}' 吗?此操作无法撤消。"},Ew={errors:{readonly:"演示环境无法修改数据",invalid_credentials:"用户名或密码错误",serverNameRequired:"服务器名称是必需的",serverConfigRequired:"服务器配置是必需的",serverConfigInvalid:"服务器配置必须包含 URL、OpenAPI 规范 URL 或模式,或者带参数的命令",serverTypeInvalid:"服务器类型必须是以下之一:stdio、sse、streamable-http、openapi",urlRequiredForType:"{{type}} 服务器类型需要 URL",openapiSpecRequired:"openapi 服务器类型需要 OpenAPI 规范 URL 或模式",headersInvalidFormat:"请求头必须是对象格式",headersNotSupportedForStdio:"stdio 服务器类型不支持请求头",serverNotFound:"找不到服务器",failedToRemoveServer:"找不到服务器或删除失败",internalServerError:"服务器内部错误",failedToGetServers:"获取服务器信息失败",failedToGetServerSettings:"获取服务器设置失败",failedToGetServerConfig:"获取服务器配置失败",failedToSaveSettings:"保存设置失败",toolNameRequired:"服务器名称和工具名称是必需的",descriptionMustBeString:"描述必须是字符串",groupIdRequired:"分组 ID 是必需的",groupNameRequired:"分组名称是必需的",groupNotFound:"找不到分组",groupIdAndServerNameRequired:"分组 ID 和服务器名称是必需的",groupOrServerNotFound:"找不到分组或服务器",toolsMustBeAllOrArray:'工具必须是 "all" 或字符串数组',serverNameAndToolNameRequired:"服务器名称和工具名称是必需的",usernameRequired:"用户名是必需的",userNotFound:"找不到用户",failedToGetUsers:"获取用户信息失败",failedToGetUserInfo:"获取用户信息失败",failedToGetUserStats:"获取用户统计信息失败",marketServerNameRequired:"服务器名称是必需的",marketServerNotFound:"找不到市场服务器",failedToGetMarketServers:"获取市场服务器信息失败",failedToGetMarketServer:"获取市场服务器信息失败",failedToGetMarketCategories:"获取市场类别失败",failedToGetMarketTags:"获取市场标签失败",failedToSearchMarketServers:"搜索市场服务器失败",failedToFilterMarketServers:"过滤市场服务器失败",failedToProcessDxtFile:"处理 DXT 文件失败"},success:{serverCreated:"服务器创建成功",serverUpdated:"服务器更新成功",serverRemoved:"服务器删除成功",serverToggled:"服务器状态切换成功",toolToggled:"工具 {{name}} {{action}} 成功",toolDescriptionUpdated:"工具 {{name}} 描述更新成功",systemConfigUpdated:"系统配置更新成功",groupCreated:"分组创建成功",groupUpdated:"分组更新成功",groupDeleted:"分组删除成功",serverAddedToGroup:"服务器添加到分组成功",serverRemovedFromGroup:"服务器从分组移除成功",serverToolsUpdated:"服务器工具更新成功"}},Tw={authorizationFailed:"授权失败",authorizationFailedError:"错误",authorizationFailedDetails:"详情",invalidRequest:"无效请求",missingStateParameter:"缺少必需的 OAuth 状态参数。",missingCodeParameter:"缺少必需的授权码参数。",serverNotFound:"服务器未找到",serverNotFoundMessage:"无法找到与此授权请求关联的服务器。",sessionExpiredMessage:"授权会话可能已过期。请重新进行授权。",authorizationSuccessful:"授权成功",server:"服务器",status:"状态",connected:"已连接",successMessage:"服务器已成功授权并连接。",autoCloseMessage:"此窗口将在 3 秒后自动关闭...",closeNow:"立即关闭",connectionError:"连接错误",connectionErrorMessage:"授权成功,但连接服务器失败。",reconnectMessage:"请尝试从控制面板重新连接。",configurationError:"配置错误",configurationErrorMessage:"服务器传输不支持 OAuth finishAuth()。请确保服务器配置为 streamable-http 传输。",internalError:"内部错误",internalErrorMessage:"处理 OAuth 回调时发生意外错误。",closeWindow:"关闭窗口"},Rw={app:rw,about:aw,profile:sw,sponsor:nw,wechat:lw,discord:iw,theme:ow,auth:cw,server:uw,status:dw,errors:mw,common:fw,nav:pw,pages:hw,logs:gw,groups:xw,market:yw,oauthServer:vw,cloud:bw,registry:Sw,tool:ww,prompt:jw,settings:Nw,dxt:Cw,jsonImport:kw,users:Aw,api:Ew,oauthCallback:Tw},Mw={title:"Tableau de bord MCPHub",error:"Erreur",closeButton:"Fermer",noServers:"Aucun serveur MCP disponible",loading:"Chargement...",logout:"Déconnexion",profile:"Profil",changePassword:"Changer le mot de passe",toggleSidebar:"Basculer la barre latérale",welcomeUser:"Bienvenue, {{username}}",name:"MCPHub"},zw={title:"À propos",versionInfo:"Version MCPHub : {{version}}",newVersion:"Nouvelle version disponible !",currentVersion:"Version actuelle",newVersionAvailable:"La nouvelle version {{version}} est disponible",viewOnGitHub:"Voir sur GitHub",checkForUpdates:"Vérifier les mises à jour",checking:"Vérification des mises à jour..."},Ow={viewProfile:"Voir le profil",userCenter:"Centre utilisateur"},Dw={label:"Sponsor",title:"Soutenir le projet",rewardAlt:"QR Code de récompense",supportMessage:"Soutenez le développement de MCPHub en m'offrant un café !",supportButton:"Soutenir sur Ko-fi"},Lw={label:"WeChat",title:"Se connecter via WeChat",qrCodeAlt:"QR Code WeChat",scanMessage:"Scannez ce QR code pour nous contacter sur WeChat"},Uw={label:"Discord",title:"Rejoignez notre serveur Discord",community:"Rejoignez notre communauté grandissante sur Discord pour du support, des discussions et des mises à jour !"},Pw={title:"Thème",light:"Clair",dark:"Sombre",system:"Système"},_w={login:"Connexion",loginTitle:"Se connecter à MCPHub",slogan:"Le Hub unifié pour les serveurs MCP",subtitle:"Plateforme de gestion centralisée pour les serveurs Model Context Protocol. Organisez, surveillez et mettez à l'échelle plusieurs serveurs MCP avec des stratégies de routage flexibles.",username:"Nom d'utilisateur",password:"Mot de passe",loggingIn:"Connexion en cours...",emptyFields:"Le nom d'utilisateur et le mot de passe ne peuvent pas être vides",loginFailed:"Échec de la connexion, veuillez vérifier votre nom d'utilisateur et votre mot de passe",loginError:"Une erreur est survenue lors de la connexion",currentPassword:"Mot de passe actuel",newPassword:"Nouveau mot de passe",confirmPassword:"Confirmer le mot de passe",passwordsNotMatch:"Le nouveau mot de passe et la confirmation ne correspondent pas",changePasswordSuccess:"Mot de passe changé avec succès",changePasswordError:"Échec du changement de mot de passe",changePassword:"Changer le mot de passe",passwordChanged:"Mot de passe changé avec succès",passwordChangeError:"Échec du changement de mot de passe",defaultPasswordWarning:"Avertissement de sécurité du mot de passe par défaut",defaultPasswordMessage:"Vous utilisez le mot de passe par défaut (admin123), ce qui présente un risque de sécurité. Veuillez changer votre mot de passe immédiatement pour protéger votre compte.",goToSettings:"Aller aux paramètres",passwordStrengthError:"Le mot de passe ne répond pas aux exigences de sécurité",passwordMinLength:"Le mot de passe doit contenir au moins 8 caractères",passwordRequireLetter:"Le mot de passe doit contenir au moins une lettre",passwordRequireNumber:"Le mot de passe doit contenir au moins un chiffre",passwordRequireSpecial:"Le mot de passe doit contenir au moins un caractère spécial",passwordStrengthHint:"Le mot de passe doit contenir au moins 8 caractères et inclure des lettres, des chiffres et des caractères spéciaux"},Bw={addServer:"Ajouter un serveur",add:"Ajouter",edit:"Modifier",copy:"Copier",delete:"Supprimer",confirmDelete:"Êtes-vous sûr de vouloir supprimer ce serveur ?",deleteWarning:"La suppression du serveur '{{name}}' le supprimera ainsi que toutes ses données. Cette action est irréversible.",status:"Statut",tools:"Outils",prompts:"Invites",name:"Nom du serveur",url:"URL du serveur",apiKey:"Clé API",save:"Enregistrer",cancel:"Annuler",invalidConfig:"Impossible de trouver les données de configuration pour {{serverName}}",addError:"Échec de l'ajout du serveur",editError:"Échec de la modification du serveur {{serverName}}",deleteError:"Échec de la suppression du serveur {{serverName}}",updateError:"Échec de la mise à jour du serveur",editTitle:"Modifier le serveur : {{serverName}}",type:"Type de serveur",typeStdio:"STDIO",typeSse:"SSE",typeStreamableHttp:"HTTP diffusable",typeOpenapi:"OpenAPI",command:"Commande",arguments:"Arguments",envVars:"Variables d'environnement",headers:"En-têtes HTTP",key:"clé",value:"valeur",enabled:"Activé",enable:"Activer",disable:"Désactiver",reload:"Recharger",reloadSuccess:"Serveur rechargé avec succès",reloadError:"Échec du rechargement du serveur {{serverName}}",requestOptions:"Configuration de la connexion",timeout:"Délai d'attente de la requête",timeoutDescription:"Délai d'attente pour les requêtes vers le serveur MCP (ms)",maxTotalTimeout:"Délai d'attente total maximum",maxTotalTimeoutDescription:"Délai d'attente total maximum pour les requêtes envoyées au serveur MCP (ms) (à utiliser avec les notifications de progression)",resetTimeoutOnProgress:"Réinitialiser le délai d'attente en cas de progression",resetTimeoutOnProgressDescription:"Réinitialiser le délai d'attente lors des notifications de progression",keepAlive:"Configuration du maintien de connexion",enableKeepAlive:"Activer le maintien de connexion",keepAliveDescription:"Envoyer des requêtes ping périodiques pour maintenir la connexion. Utile pour les connexions de longue durée qui peuvent expirer.",keepAliveInterval:"Intervalle (ms)",keepAliveIntervalDescription:"Temps entre les pings de maintien de connexion en millisecondes (par défaut : 60000ms = 1 minute)",remove:"Retirer",toggleError:"Échec du basculement du serveur {{serverName}}",alreadyExists:"Le serveur {{serverName}} existe déjà",invalidData:"Données de serveur invalides fournies",notFound:"Serveur {{serverName}} non trouvé",namePlaceholder:"Entrez le nom du serveur",urlPlaceholder:"Entrez l'URL du serveur",commandPlaceholder:"Entrez la commande",argumentsPlaceholder:"Entrez les arguments",errorDetails:"Détails de l'erreur",viewErrorDetails:"Voir les détails de l'erreur",copyConfig:"Copier la configuration",confirmVariables:"Confirmer la configuration des variables",variablesDetected:"Variables détectées dans la configuration. Veuillez confirmer que ces variables sont correctement configurées :",detectedVariables:"Variables détectées",confirmVariablesMessage:"Veuillez vous assurer que ces variables sont correctement définies dans votre environnement d'exécution. Continuer l'ajout du serveur ?",confirmAndAdd:"Confirmer et ajouter",openapi:{inputMode:"Mode de saisie",inputModeUrl:"URL de la spécification",inputModeSchema:"Schéma JSON",specUrl:"URL de la spécification OpenAPI",schema:"Schéma JSON OpenAPI",schemaHelp:"Collez votre schéma JSON OpenAPI complet ici",security:"Type de sécurité",securityNone:"Aucun",securityApiKey:"Clé API",securityHttp:"Authentification HTTP",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"Configuration de la clé API",apiKeyName:"Nom de l'en-tête/paramètre",apiKeyIn:"Emplacement",apiKeyValue:"Valeur de la clé API",httpAuthConfig:"Configuration de l'authentification HTTP",httpScheme:"Schéma d'authentification",httpCredentials:"Identifiants",httpSchemeBasic:"Basic",httpSchemeBearer:"Bearer",httpSchemeDigest:"Digest",oauth2Config:"Configuration OAuth 2.0",oauth2Token:"Jeton d'accès",openIdConnectConfig:"Configuration OpenID Connect",openIdConnectUrl:"URL de découverte",openIdConnectToken:"Jeton d'identification",apiKeyInHeader:"En-tête",apiKeyInQuery:"Requête",apiKeyInCookie:"Cookie",passthroughHeaders:"En-têtes de transmission",passthroughHeadersHelp:"Liste séparée par des virgules des noms d'en-têtes à transmettre des requêtes d'appel d'outils vers les points de terminaison OpenAPI en amont (par ex. : Authorization, X-API-Key)"},oauth:{sectionTitle:"Configuration OAuth",sectionDescription:"Configurez les identifiants client pour les serveurs protégés par OAuth (optionnel).",clientId:"Identifiant client",clientSecret:"Secret client",authorizationEndpoint:"Point de terminaison d'autorisation",tokenEndpoint:"Point de terminaison de jeton",scopes:"Scopes",scopesPlaceholder:"scope1 scope2",resource:"Ressource / Audience",accessToken:"Jeton d'accès",refreshToken:"Jeton d'actualisation"}},Hw={online:"En ligne",offline:"Hors ligne",connecting:"Connexion en cours",oauthRequired:"OAuth requis",clickToAuthorize:"Cliquez pour autoriser avec OAuth",oauthWindowOpened:"Fenêtre d'autorisation OAuth ouverte. Veuillez compléter l'autorisation."},qw={general:"Une erreur est survenue",network:"Erreur de connexion réseau. Veuillez vérifier votre connexion Internet",serverConnection:"Impossible de se connecter au serveur. Veuillez vérifier si le serveur est en cours d'exécution",serverAdd:"Échec de l'ajout du serveur. Veuillez vérifier l'état du serveur",serverUpdate:"Échec de la modification du serveur {{serverName}}. Veuillez vérifier l'état du serveur",serverFetch:"Échec de la récupération des données du serveur. Veuillez réessayer plus tard",failedToReloadServer:"Échec du rechargement du serveur",initialStartup:"Le serveur est peut-être en cours de démarrage. Veuillez patienter un instant car ce processus peut prendre du temps au premier lancement...",serverInstall:"Échec de l'installation du serveur",failedToFetchSettings:"Échec de la récupération des paramètres",failedToUpdateRouteConfig:"Échec de la mise à jour de la configuration de routage",failedToUpdateSmartRoutingConfig:"Échec de la mise à jour de la configuration du routage intelligent"},Gw={processing:"En cours de traitement...",save:"Enregistrer",cancel:"Annuler",back:"Retour",refresh:"Actualiser",create:"Créer",creating:"Création en cours...",update:"Mettre à jour",updating:"Mise à jour en cours...",submitting:"Envoi en cours...",delete:"Supprimer",remove:"Retirer",copy:"Copier",copyId:"Copier l'ID",copyUrl:"Copier l'URL",copyJson:"Copier le JSON",copySuccess:"Copié dans le presse-papiers",copyFailed:"Échec de la copie",copied:"Copié",close:"Fermer",confirm:"Confirmer",language:"Langue",true:"Vrai",false:"Faux",dismiss:"Rejeter",github:"GitHub",wechat:"WeChat",discord:"Discord",required:"Requis",secret:"Secret",default:"Défaut",value:"Valeur",type:"Type",repeated:"Répété",valueHint:"Indice de valeur",choices:"Choix"},Fw={dashboard:"Tableau de bord",servers:"Serveurs",groups:"Groupes",users:"Utilisateurs",settings:"Paramètres",changePassword:"Changer le mot de passe",market:"Marché",cloud:"Marché Cloud",logs:"Journaux"},Iw={dashboard:{title:"Tableau de bord",totalServers:"Total",onlineServers:"En ligne",offlineServers:"Hors ligne",connectingServers:"En connexion",recentServers:"Serveurs récents"},servers:{title:"Gestion des serveurs"},groups:{title:"Gestion des groupes"},users:{title:"Gestion des utilisateurs"},settings:{title:"Paramètres",language:"Langue",account:"Paramètres du compte",password:"Changer le mot de passe",appearance:"Apparence",routeConfig:"Sécurité",installConfig:"Installation",smartRouting:"Routage intelligent",oauthServer:"Serveur OAuth"},market:{title:"Marché Hub - Marchés locaux et Cloud"},logs:{title:"Journaux système"}},Kw={filters:"Filtres",search:"Rechercher dans les journaux...",autoScroll:"Défilement automatique",clearLogs:"Effacer les journaux",loading:"Chargement des journaux...",noLogs:"Aucun journal disponible.",noMatch:"Aucun journal ne correspond aux filtres actuels.",mainProcess:"Processus principal",childProcess:"Processus enfant",main:"Principal",child:"Enfant"},Vw={add:"Ajouter",addNew:"Ajouter un nouveau groupe",edit:"Modifier le groupe",delete:"Supprimer",confirmDelete:"Êtes-vous sûr de vouloir supprimer ce groupe ?",deleteWarning:"La suppression du groupe '{{name}}' le supprimera ainsi que toutes ses associations de serveurs. Cette action est irréversible.",name:"Nom du groupe",namePlaceholder:"Entrez le nom du groupe",nameRequired:"Le nom du groupe est requis",description:"Description",descriptionPlaceholder:"Entrez la description du groupe (facultatif)",createError:"Échec de la création du groupe",updateError:"Échec de la mise à jour du groupe",deleteError:"Échec de la suppression du groupe",serverAddError:"Échec de l'ajout du serveur au groupe",serverRemoveError:"Échec de la suppression du serveur du groupe",addServer:"Ajouter un serveur au groupe",selectServer:"Sélectionnez un serveur à ajouter",servers:"Serveurs dans le groupe",remove:"Retirer",noGroups:"Aucun groupe disponible. Créez un nouveau groupe pour commencer.",noServers:"Aucun serveur dans ce groupe.",noServerOptions:"Aucun serveur disponible",serverCount:"{{count}} serveurs",toolSelection:"Sélection d'outils",toolsSelected:"Sélectionné",allTools:"Tous",selectedTools:"Outils sélectionnés",selectAll:"Tout sélectionner",selectNone:"Ne rien sélectionner",configureTools:"Configurer les outils"},$w={title:"Installation locale",official:"Officiel",by:"Par",unknown:"Inconnu",tools:"outils",search:"Rechercher",searchPlaceholder:"Rechercher des serveurs par nom, catégorie ou tags",clearFilters:"Effacer",clearCategoryFilter:"",clearTagFilter:"",categories:"Catégories",tags:"Tags",showTags:"Afficher les tags",hideTags:"Masquer les tags",moreTags:"",noServers:"Aucun serveur trouvé correspondant à votre recherche",backToList:"Retour à la liste",install:"Installer",installing:"Installation en cours...",installed:"Installé",installServer:"Installer le serveur : {{name}}",installSuccess:"Serveur {{serverName}} installé avec succès",author:"Auteur",license:"Licence",repository:"Dépôt",examples:"Exemples",arguments:"Arguments",argumentName:"Nom",description:"Description",required:"Requis",example:"Exemple",viewSchema:"Voir le schéma",fetchError:"Erreur lors de la récupération des serveurs du marché",serverNotFound:"Serveur non trouvé",searchError:"Erreur lors de la recherche de serveurs",filterError:"Erreur lors du filtrage des serveurs par catégorie",tagFilterError:"Erreur lors du filtrage des serveurs par tag",noInstallationMethod:"Aucune méthode d'installation disponible pour ce serveur",showing:"Affichage de {{from}}-{{to}} sur {{total}} serveurs",perPage:"Par page",confirmVariablesMessage:"Veuillez vous assurer que ces variables sont correctement définies dans votre environnement d'exécution. Continuer l'installation du serveur ?",confirmAndInstall:"Confirmer et installer"},Yw={authorizeTitle:"Autoriser l'application",authorizeSubtitle:"Autorisez cette application à accéder à votre compte MCPHub.",buttons:{approve:"Autoriser l'accès",deny:"Refuser",approveSubtitle:"Recommandé si vous faites confiance à cette application.",denySubtitle:"Vous pourrez toujours accorder l'accès plus tard."}},Jw={title:"Support Cloud",subtitle:"Propulsé par MCPRouter",by:"Par",server:"Serveur",config:"Config",created:"Créé",updated:"Mis à jour",available:"Disponible",description:"Description",details:"Détails",tools:"Outils",tool:"outil",toolsAvailable:"{{count}} outil disponible||{{count}} outils disponibles",loadingTools:"Chargement des outils...",noTools:"Aucun outil disponible pour ce serveur",noDescription:"Aucune description disponible",viewDetails:"Voir les détails",parameters:"Paramètres",result:"Résultat",error:"Erreur",callTool:"Appeler",calling:"Appel en cours...",toolCallSuccess:"L'outil {{toolName}} a été exécuté avec succès",toolCallError:"Échec de l'appel de l'outil {{toolName}} : {{error}}",viewSchema:"Voir le schéma",backToList:"Retour au marché Cloud",search:"Rechercher",searchPlaceholder:"Rechercher des serveurs cloud par nom, titre ou auteur",clearFilters:"Effacer les filtres",clearCategoryFilter:"Effacer",clearTagFilter:"Effacer",categories:"Catégories",tags:"Tags",noCategories:"Aucune catégorie trouvée",noTags:"Aucun tag trouvé",noServers:"Aucun serveur cloud trouvé",fetchError:"Erreur lors de la récupération des serveurs cloud",serverNotFound:"Serveur cloud non trouvé",searchError:"Erreur lors de la recherche de serveurs cloud",filterError:"Erreur lors du filtrage des serveurs cloud par catégorie",tagFilterError:"Erreur lors du filtrage des serveurs cloud par tag",showing:"Affichage de {{from}}-{{to}} sur {{total}} serveurs cloud",perPage:"Par page",apiKeyNotConfigured:"Clé API MCPRouter non configurée",apiKeyNotConfiguredDescription:"Pour utiliser les serveurs cloud, vous devez configurer votre clé API MCPRouter.",getApiKey:"Obtenir une clé API",configureInSettings:"Configurer dans les paramètres",installServer:"Installer {{name}}",installSuccess:"Serveur {{name}} installé avec succès",installError:"Échec de l'installation du serveur : {{error}}"},Xw={title:"Registre",official:"Officiel",latest:"Dernière version",description:"Description",website:"Site web",repository:"Dépôt",packages:"Paquets",package:"paquet",remotes:"Services distants",remote:"service distant",published:"Publié",updated:"Mis à jour",install:"Installer",installing:"Installation...",installed:"Installé",installServer:"Installer {{name}}",installSuccess:"Serveur {{name}} installé avec succès",installError:"Échec de l'installation du serveur : {{error}}",noDescription:"Aucune description disponible",viewDetails:"Voir les détails",backToList:"Retour au registre",search:"Rechercher",searchPlaceholder:"Rechercher des serveurs par nom",clearFilters:"Effacer",noServers:"Aucun serveur trouvé dans le registre",fetchError:"Erreur lors de la récupération des serveurs du registre",serverNotFound:"Serveur du registre non trouvé",showing:"Affichage de {{from}}-{{to}} sur {{total}} serveurs du registre",perPage:"Par page",environmentVariables:"Variables d'environnement",packageArguments:"Arguments du paquet",runtimeArguments:"Arguments d'exécution",headers:"En-têtes"},Qw={run:"Exécuter",running:"Exécution en cours...",runTool:"Exécuter l'outil",cancel:"Annuler",noDescription:"Aucune description disponible",inputSchema:"Schéma d'entrée :",runToolWithName:"Exécuter l'outil : {{name}}",execution:"Exécution de l'outil",successful:"Réussi",failed:"Échoué",result:"Résultat :",error:"Erreur",errorDetails:"Détails de l'erreur :",noContent:"L'outil a été exécuté avec succès mais n'a renvoyé aucun contenu.",unknownError:"Une erreur inconnue est survenue",jsonResponse:"Réponse JSON :",toolResult:"Résultat de l'outil",noParameters:"Cet outil ne nécessite aucun paramètre.",selectOption:"Sélectionnez une option",enterValue:"Entrez la valeur {{type}}",enabled:"Activé",enableSuccess:"Outil {{name}} activé avec succès",disableSuccess:"Outil {{name}} désactivé avec succès",toggleFailed:"Échec du basculement de l'état de l'outil",parameters:"Paramètres de l'outil",formMode:"Mode formulaire",jsonMode:"Mode JSON",jsonConfiguration:"Configuration JSON",invalidJsonFormat:"Format JSON invalide",fixJsonBeforeSwitching:"Veuillez corriger le format JSON avant de passer en mode formulaire",item:"Élément {{index}}",addItem:"Ajouter un élément {{key}}",enterKey:"Entrez {{key}}"},Zw={run:"Obtenir",running:"Obtention en cours...",result:"Résultat de l'invite",error:"Erreur de l'invite",execution:"Exécution de l'invite",successful:"Réussi",failed:"Échoué",errorDetails:"Détails de l'erreur :",noContent:"L'invite a été exécutée avec succès mais n'a renvoyé aucun contenu.",unknownError:"Une erreur inconnue est survenue",jsonResponse:"Réponse JSON :",description:"Description",messages:"Messages",noDescription:"Aucune description disponible",runPromptWithName:"Obtenir l'invite : {{name}}",descriptionUpdateSuccess:"Description de l'invite mise à jour avec succès",descriptionUpdateFailed:"Échec de la mise à jour de la description de l'invite"},Ww={enableGlobalRoute:"Activer la route globale",enableGlobalRouteDescription:"Autoriser les connexions au point de terminaison /sse sans spécifier d'ID de groupe",enableGroupNameRoute:"Activer la route par nom de groupe",enableGroupNameRouteDescription:"Autoriser les connexions au point de terminaison /sse en utilisant les noms de groupe au lieu des ID de groupe",enableBearerAuth:"Activer l'authentification Bearer",enableBearerAuthDescription:"Exiger une authentification par jeton Bearer pour les requêtes MCP",bearerAuthKey:"Clé d'authentification Bearer",bearerAuthKeyDescription:"La clé d'authentification qui sera requise dans le jeton Bearer",bearerAuthKeyPlaceholder:"Entrez la clé d'authentification Bearer",skipAuth:"Ignorer l'authentification",skipAuthDescription:"Contourner l'exigence de connexion pour l'accès au frontend et à l'API (DÉSACTIVÉ PAR DÉFAUT pour des raisons de sécurité)",pythonIndexUrl:"URL du dépôt de paquets Python",pythonIndexUrlDescription:"Définir la variable d'environnement UV_DEFAULT_INDEX pour l'installation de paquets Python",pythonIndexUrlPlaceholder:"ex. https://pypi.org/simple",npmRegistry:"URL du registre NPM",npmRegistryDescription:"Définir la variable d'environnement npm_config_registry pour l'installation de paquets NPM",npmRegistryPlaceholder:"ex. https://registry.npmjs.org/",baseUrl:"URL de base",baseUrlDescription:"URL de base pour les requêtes MCP",baseUrlPlaceholder:"ex. http://localhost:3000",installConfig:"Installation",systemConfigUpdated:"Configuration système mise à jour avec succès",enableSmartRouting:"Activer le routage intelligent",enableSmartRoutingDescription:"Activer la fonctionnalité de routage intelligent pour rechercher l'outil le plus approprié en fonction de l'entrée (en utilisant le nom de groupe $smart)",dbUrl:"URL PostgreSQL (nécessite le support de pgvector)",dbUrlPlaceholder:"ex. postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"URL de base de l'API OpenAI",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"Clé API OpenAI",openaiApiKeyPlaceholder:"Entrez la clé API OpenAI",openaiApiEmbeddingModel:"Modèle d'intégration OpenAI",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"Configuration du routage intelligent mise à jour avec succès",smartRoutingRequiredFields:"L'URL de la base de données et la clé API OpenAI sont requises pour activer le routage intelligent",smartRoutingValidationError:"Veuillez remplir les champs obligatoires avant d'activer le routage intelligent : {{fields}}",mcpRouterConfig:"Marché Cloud",mcpRouterApiKey:"Clé API MCPRouter",mcpRouterApiKeyDescription:"Clé API pour accéder aux services du marché cloud MCPRouter",mcpRouterApiKeyPlaceholder:"Entrez la clé API MCPRouter",mcpRouterReferer:"Référent",mcpRouterRefererDescription:"En-tête Referer pour les requêtes API MCPRouter",mcpRouterRefererPlaceholder:"https://www.mcphubx.com",mcpRouterTitle:"Titre",mcpRouterTitleDescription:"En-tête Title pour les requêtes API MCPRouter",mcpRouterTitlePlaceholder:"MCPHub",mcpRouterBaseUrl:"URL de base",mcpRouterBaseUrlDescription:"URL de base pour l'API MCPRouter",mcpRouterBaseUrlPlaceholder:"https://api.mcprouter.to/v1",systemSettings:"Paramètres système",nameSeparatorLabel:"Séparateur de noms",nameSeparatorDescription:"Caractère utilisé pour séparer le nom du serveur et le nom de l'outil/prompt (par défaut : -)",enableSessionRebuild:"Activer la reconstruction de session serveur",enableSessionRebuildDescription:"Lorsqu'il est activé, applique le code de reconstruction de session serveur amélioré pour une meilleure expérience de gestion de session",restartRequired:"Configuration enregistrée. Il est recommandé de redémarrer l'application pour s'assurer que tous les services chargent correctement les nouveaux paramètres.",exportMcpSettings:"Exporter les paramètres",mcpSettingsJson:"JSON des paramètres MCP",mcpSettingsJsonDescription:"Afficher, copier ou télécharger votre configuration mcp_settings.json actuelle pour la sauvegarde ou la migration vers d'autres outils",copyToClipboard:"Copier dans le presse-papiers",downloadJson:"Télécharger JSON",exportSuccess:"Paramètres exportés avec succès",exportError:"Échec de la récupération des paramètres",enableOauthServer:"Activer le serveur OAuth",enableOauthServerDescription:"Permet à MCPHub d'émettre des jetons OAuth pour les clients externes",requireClientSecret:"Exiger un secret client",requireClientSecretDescription:"Lorsque activé, les clients confidentiels doivent présenter un client secret (désactivez-le pour les clients PKCE publics)",requireState:"Exiger le paramètre state",requireStateDescription:"Refuser les demandes d'autorisation qui n'incluent pas le paramètre state",accessTokenLifetime:"Durée de vie du jeton d'accès (secondes)",accessTokenLifetimeDescription:"Durée pendant laquelle les jetons d'accès émis restent valides",accessTokenLifetimePlaceholder:"ex. 3600",refreshTokenLifetime:"Durée de vie du jeton d'actualisation (secondes)",refreshTokenLifetimeDescription:"Durée pendant laquelle les jetons d'actualisation restent valides",refreshTokenLifetimePlaceholder:"ex. 1209600",authorizationCodeLifetime:"Durée de vie du code d'autorisation (secondes)",authorizationCodeLifetimeDescription:"Temps pendant lequel les codes d'autorisation peuvent être échangés",authorizationCodeLifetimePlaceholder:"ex. 300",allowedScopes:"Scopes autorisés",allowedScopesDescription:"Liste séparée par des virgules des scopes que les utilisateurs peuvent approuver",allowedScopesPlaceholder:"ex. read, write",enableDynamicRegistration:"Activer l'enregistrement dynamique",dynamicRegistrationDescription:"Autoriser les clients conformes RFC 7591 à s'enregistrer via l'endpoint public",dynamicRegistrationAllowedGrantTypes:"Types de flux autorisés",dynamicRegistrationAllowedGrantTypesDescription:"Liste séparée par des virgules des types de flux disponibles pour les clients enregistrés dynamiquement",dynamicRegistrationAllowedGrantTypesPlaceholder:"ex. authorization_code, refresh_token",dynamicRegistrationAuth:"Exiger une authentification",dynamicRegistrationAuthDescription:"Protège l'endpoint d'enregistrement afin que seules les requêtes authentifiées puissent créer des clients",invalidNumberInput:"Veuillez saisir un nombre valide supérieur ou égal à zéro"},ej={upload:"Télécharger",uploadTitle:"Télécharger l'extension DXT",dropFileHere:"Déposez votre fichier .dxt ici",orClickToSelect:"ou cliquez pour sélectionner depuis votre ordinateur",invalidFileType:"Veuillez sélectionner un fichier .dxt valide",noFileSelected:"Veuillez sélectionner un fichier .dxt à télécharger",uploading:"Téléchargement en cours...",uploadFailed:"Échec du téléchargement du fichier DXT",installServer:"Installer le serveur MCP depuis DXT",extensionInfo:"Informations sur l'extension",name:"Nom",version:"Version",description:"Description",author:"Auteur",tools:"Outils",serverName:"Nom du serveur",serverNamePlaceholder:"Entrez un nom pour ce serveur",install:"Installer",installing:"Installation en cours...",installFailed:"Échec de l'installation du serveur depuis DXT",serverExistsTitle:"Le serveur existe déjà",serverExistsConfirm:"Le serveur '{{serverName}}' existe déjà. Voulez-vous le remplacer par la nouvelle version ?",override:"Remplacer"},tj={button:"Importer",title:"Importer des serveurs depuis JSON",inputLabel:"Configuration JSON du serveur",inputHelp:"Collez votre configuration JSON de serveur. Prend en charge les types de serveurs STDIO, SSE et HTTP (streamable-http).",preview:"Aperçu",previewTitle:"Aperçu des serveurs à importer",import:"Importer",importing:"Importation en cours...",invalidFormat:"Format JSON invalide. Le JSON doit contenir un objet 'mcpServers'.",parseError:"Échec de l'analyse du JSON. Veuillez vérifier le format et réessayer.",addFailed:"Échec de l'ajout du serveur",importFailed:"Échec de l'importation des serveurs",partialSuccess:"{{count}} serveur(s) sur {{total}} importé(s) avec succès. Certains serveurs ont échoué :"},rj={add:"Ajouter un utilisateur",addNew:"Ajouter un nouvel utilisateur",edit:"Modifier l'utilisateur",delete:"Supprimer l'utilisateur",create:"Créer un utilisateur",update:"Mettre à jour l'utilisateur",username:"Nom d'utilisateur",password:"Mot de passe",newPassword:"Nouveau mot de passe",confirmPassword:"Confirmer le mot de passe",changePassword:"Changer le mot de passe",adminRole:"Administrateur",admin:"Admin",user:"Utilisateur",role:"Rôle",actions:"Actions",addFirst:"Ajoutez votre premier utilisateur",permissions:"Permissions",adminPermissions:"Accès complet au système",userPermissions:"Accès limité",currentUser:"Vous",noUsers:"Aucun utilisateur trouvé",adminRequired:"Un accès administrateur est requis pour gérer les utilisateurs",usernameRequired:"Le nom d'utilisateur est requis",passwordRequired:"Le mot de passe est requis",passwordTooShort:"Le mot de passe doit comporter au moins 6 caractères",passwordMismatch:"Les mots de passe ne correspondent pas",usernamePlaceholder:"Entrez le nom d'utilisateur",passwordPlaceholder:"Entrez le mot de passe",newPasswordPlaceholder:"Laissez vide pour conserver le mot de passe actuel",confirmPasswordPlaceholder:"Confirmez le nouveau mot de passe",createError:"Échec de la création de l'utilisateur",updateError:"Échec de la mise à jour de l'utilisateur",deleteError:"Échec de la suppression de l'utilisateur",statsError:"Échec de la récupération des statistiques utilisateur",deleteConfirmation:"Êtes-vous sûr de vouloir supprimer l'utilisateur '{{username}}' ? Cette action est irréversible.",confirmDelete:"Supprimer l'utilisateur",deleteWarning:"Êtes-vous sûr de vouloir supprimer l'utilisateur '{{username}}' ? Cette action est irréversible."},aj={errors:{readonly:"Lecture seule pour l'environnement de démonstration",invalid_credentials:"Nom d'utilisateur ou mot de passe invalide",serverNameRequired:"Le nom du serveur est requis",serverConfigRequired:"La configuration du serveur est requise",serverConfigInvalid:"La configuration du serveur doit inclure une URL, une URL de spécification OpenAPI ou un schéma, ou une commande avec des arguments",serverTypeInvalid:"Le type de serveur doit être l'un des suivants : stdio, sse, streamable-http, openapi",urlRequiredForType:"L'URL est requise pour le type de serveur {{type}}",openapiSpecRequired:"L'URL de la spécification OpenAPI ou le schéma est requis pour le type de serveur openapi",headersInvalidFormat:"Les en-têtes doivent être un objet",headersNotSupportedForStdio:"Les en-têtes ne sont pas pris en charge pour le type de serveur stdio",serverNotFound:"Serveur non trouvé",failedToRemoveServer:"Serveur non trouvé ou échec de la suppression",internalServerError:"Erreur interne du serveur",failedToGetServers:"Échec de la récupération des informations sur les serveurs",failedToGetServerSettings:"Échec de la récupération des paramètres du serveur",failedToGetServerConfig:"Échec de la récupération de la configuration du serveur",failedToSaveSettings:"Échec de l'enregistrement des paramètres",toolNameRequired:"Le nom du serveur et le nom de l'outil sont requis",descriptionMustBeString:"La description doit être une chaîne de caractères",groupIdRequired:"L'ID de groupe est requis",groupNameRequired:"Le nom du groupe est requis",groupNotFound:"Groupe non trouvé",groupIdAndServerNameRequired:"L'ID de groupe和le nom du serveur sont requis",groupOrServerNotFound:"Groupe ou serveur non trouvé",toolsMustBeAllOrArray:'Les outils doivent être "all" ou un tableau de chaînes de caractères',serverNameAndToolNameRequired:"Le nom du serveur et le nom de l'outil sont requis",usernameRequired:"Le nom d'utilisateur est requis",userNotFound:"Utilisateur non trouvé",failedToGetUsers:"Échec de la récupération des informations sur les utilisateurs",failedToGetUserInfo:"Échec de la récupération des informations sur l'utilisateur",failedToGetUserStats:"Échec de la récupération des statistiques de l'utilisateur",marketServerNameRequired:"Le nom du serveur du marché est requis",marketServerNotFound:"Serveur du marché non trouvé",failedToGetMarketServers:"Échec de la récupération des informations sur les serveurs du marché",failedToGetMarketServer:"Échec de la récupération des informations sur le serveur du marché",failedToGetMarketCategories:"Échec de la récupération des catégories du marché",failedToGetMarketTags:"Échec de la récupération des tags du marché",failedToSearchMarketServers:"Échec de la recherche des serveurs du marché",failedToFilterMarketServers:"Échec du filtrage des serveurs du marché",failedToProcessDxtFile:"Échec du traitement du fichier DXT"},success:{serverCreated:"Serveur créé avec succès",serverUpdated:"Serveur mis à jour avec succès",serverRemoved:"Serveur supprimé avec succès",serverToggled:"État du serveur basculé avec succès",toolToggled:"Outil {{name}} {{action}} avec succès",toolDescriptionUpdated:"Description de l'outil {{name}} mise à jour avec succès",systemConfigUpdated:"Configuration système mise à jour avec succès",groupCreated:"Groupe créé avec succès",groupUpdated:"Groupe mis à jour avec succès",groupDeleted:"Groupe supprimé avec succès",serverAddedToGroup:"Serveur ajouté au groupe avec succès",serverRemovedFromGroup:"Serveur supprimé du groupe avec succès",serverToolsUpdated:"Outils du serveur mis à jour avec succès"}},sj={authorizationFailed:"Échec de l'autorisation",authorizationFailedError:"Erreur",authorizationFailedDetails:"Détails",invalidRequest:"Requête invalide",missingStateParameter:"Paramètre d'état OAuth requis manquant.",missingCodeParameter:"Paramètre de code d'autorisation requis manquant.",serverNotFound:"Serveur introuvable",serverNotFoundMessage:"Impossible de trouver le serveur associé à cette demande d'autorisation.",sessionExpiredMessage:"La session d'autorisation a peut-être expiré. Veuillez réessayer l'autorisation.",authorizationSuccessful:"Autorisation réussie",server:"Serveur",status:"État",connected:"Connecté",successMessage:"Le serveur a été autorisé et connecté avec succès.",autoCloseMessage:"Cette fenêtre se fermera automatiquement dans 3 secondes...",closeNow:"Fermer maintenant",connectionError:"Erreur de connexion",connectionErrorMessage:"L'autorisation a réussi, mais la connexion au serveur a échoué.",reconnectMessage:"Veuillez essayer de vous reconnecter à partir du tableau de bord.",configurationError:"Erreur de configuration",configurationErrorMessage:"Le transport du serveur ne prend pas en charge OAuth finishAuth(). Veuillez vous assurer que le serveur est configuré avec le transport streamable-http.",internalError:"Erreur interne",internalErrorMessage:"Une erreur inattendue s'est produite lors du traitement du callback OAuth.",closeWindow:"Fermer la fenêtre"},nj={app:Mw,about:zw,profile:Ow,sponsor:Dw,wechat:Lw,discord:Uw,theme:Pw,auth:_w,server:Bw,status:Hw,errors:qw,common:Gw,nav:Fw,pages:Iw,logs:Kw,groups:Vw,market:$w,oauthServer:Yw,cloud:Jw,registry:Xw,tool:Qw,prompt:Zw,settings:Ww,dxt:ej,jsonImport:tj,users:rj,api:aj,oauthCallback:sj},lj={title:"MCPHub Kontrol Paneli",error:"Hata",closeButton:"Kapat",noServers:"Kullanılabilir MCP sunucusu yok",loading:"Yükleniyor...",logout:"Çıkış Yap",profile:"Profil",changePassword:"Şifre Değiştir",toggleSidebar:"Kenar Çubuğunu Aç/Kapat",welcomeUser:"Hoş geldin, {{username}}",name:"MCPHub"},ij={title:"Hakkında",versionInfo:"MCPHub Sürümü: {{version}}",newVersion:"Yeni sürüm mevcut!",currentVersion:"Mevcut sürüm",newVersionAvailable:"Yeni sürüm {{version}} mevcut",viewOnGitHub:"GitHub'da Görüntüle",checkForUpdates:"Güncellemeleri Kontrol Et",checking:"Güncellemeler kontrol ediliyor..."},oj={viewProfile:"Profili görüntüle",userCenter:"Kullanıcı Merkezi"},cj={label:"Sponsor",title:"Projeyi Destekle",rewardAlt:"Ödül QR Kodu",supportMessage:"Bana bir kahve ısmarlayarak MCPHub'ın geliştirilmesini destekleyin!",supportButton:"Ko-fi'de Destek Ol"},uj={label:"WeChat",title:"WeChat ile Bağlan",qrCodeAlt:"WeChat QR Kodu",scanMessage:"WeChat'te bizimle bağlantı kurmak için bu QR kodunu tarayın"},dj={label:"Discord",title:"Discord sunucumuza katılın",community:"Destek, tartışmalar ve güncellemeler için büyüyen Discord topluluğumuza katılın!"},mj={title:"Tema",light:"Açık",dark:"Koyu",system:"Sistem"},fj={login:"Giriş Yap",loginTitle:"MCPHub'a Giriş Yap",slogan:"Birleşik MCP sunucu yönetim platformu",subtitle:"Model Context Protocol sunucuları için merkezi yönetim platformu. Esnek yönlendirme stratejileri ile birden fazla MCP sunucusunu organize edin, izleyin ve ölçeklendirin.",username:"Kullanıcı Adı",password:"Şifre",loggingIn:"Giriş yapılıyor...",emptyFields:"Kullanıcı adı ve şifre boş olamaz",loginFailed:"Giriş başarısız, lütfen kullanıcı adınızı ve şifrenizi kontrol edin",loginError:"Giriş sırasında bir hata oluştu",currentPassword:"Mevcut Şifre",newPassword:"Yeni Şifre",confirmPassword:"Şifreyi Onayla",passwordsNotMatch:"Yeni şifre ve onay eşleşmiyor",changePasswordSuccess:"Şifre başarıyla değiştirildi",changePasswordError:"Şifre değişikliği başarısız oldu",changePassword:"Şifre Değiştir",passwordChanged:"Şifre başarıyla değiştirildi",passwordChangeError:"Şifre değişikliği başarısız oldu",defaultPasswordWarning:"Varsayılan Şifre Güvenlik Uyarısı",defaultPasswordMessage:"Varsayılan şifreyi (admin123) kullanıyorsunuz, bu bir güvenlik riski oluşturur. Hesabınızı korumak için lütfen şifrenizi hemen değiştirin.",goToSettings:"Ayarlara Git",passwordStrengthError:"Şifre güvenlik gereksinimlerini karşılamıyor",passwordMinLength:"Şifre en az 8 karakter uzunluğunda olmalıdır",passwordRequireLetter:"Şifre en az bir harf içermelidir",passwordRequireNumber:"Şifre en az bir rakam içermelidir",passwordRequireSpecial:"Şifre en az bir özel karakter içermelidir",passwordStrengthHint:"Şifre en az 8 karakter olmalı ve harf, rakam ve özel karakter içermelidir"},pj={addServer:"Sunucu Ekle",add:"Ekle",edit:"Düzenle",copy:"Kopyala",delete:"Sil",confirmDelete:"Bu sunucuyu silmek istediğinizden emin misiniz?",deleteWarning:"'{{name}}' sunucusunu silmek, onu ve tüm verilerini kaldıracaktır. Bu işlem geri alınamaz.",status:"Durum",tools:"Araçlar",prompts:"İstekler",name:"Sunucu Adı",url:"Sunucu URL'si",apiKey:"API Anahtarı",save:"Kaydet",cancel:"İptal",invalidConfig:"{{serverName}} için yapılandırma verisi bulunamadı",addError:"Sunucu eklenemedi",editError:"{{serverName}} sunucusu düzenlenemedi",deleteError:"{{serverName}} sunucusu silinemedi",updateError:"Sunucu güncellenemedi",editTitle:"Sunucuyu Düzenle: {{serverName}}",type:"Sunucu Türü",typeStdio:"STDIO",typeSse:"SSE",typeStreamableHttp:"Akış Yapılabilir HTTP",typeOpenapi:"OpenAPI",command:"Komut",arguments:"Argümanlar",envVars:"Ortam Değişkenleri",headers:"HTTP Başlıkları",key:"anahtar",value:"değer",enabled:"Etkin",enable:"Etkinleştir",disable:"Devre Dışı Bırak",reload:"Yeniden Yükle",reloadSuccess:"Sunucu başarıyla yeniden yüklendi",reloadError:"Sunucu {{serverName}} yeniden yüklenemedi",requestOptions:"Bağlantı Yapılandırması",timeout:"İstek Zaman Aşımı",timeoutDescription:"MCP sunucusuna yapılan istekler için zaman aşımı (ms)",maxTotalTimeout:"Maksimum Toplam Zaman Aşımı",maxTotalTimeoutDescription:"MCP sunucusuna gönderilen istekler için maksimum toplam zaman aşımı (ms) (İlerleme bildirimleriyle kullanın)",resetTimeoutOnProgress:"İlerlemede Zaman Aşımını Sıfırla",resetTimeoutOnProgressDescription:"İlerleme bildirimlerinde zaman aşımını sıfırla",keepAlive:"Bağlantı Canlı Tutma Yapılandırması",enableKeepAlive:"Bağlantı Canlı Tutmayı Etkinleştir",keepAliveDescription:"Bağlantıyı korumak için periyodik ping istekleri gönderin. Zaman aşımına uğrayabilecek uzun süreli bağlantılar için yararlıdır.",keepAliveInterval:"Aralık (ms)",keepAliveIntervalDescription:"Canlı tutma pingleri arasındaki süre milisaniye cinsinden (varsayılan: 60000ms = 1 dakika)",remove:"Kaldır",toggleError:"{{serverName}} sunucusu açılamadı/kapatılamadı",alreadyExists:"{{serverName}} sunucusu zaten mevcut",invalidData:"Geçersiz sunucu verisi sağlandı",notFound:"{{serverName}} sunucusu bulunamadı",namePlaceholder:"Sunucu adını girin",urlPlaceholder:"Sunucu URL'sini girin",commandPlaceholder:"Komutu girin",argumentsPlaceholder:"Argümanları girin",errorDetails:"Hata Detayları",viewErrorDetails:"Hata detaylarını görüntüle",copyConfig:"Yapılandırmayı Kopyala",confirmVariables:"Değişken Yapılandırmasını Onayla",variablesDetected:"Yapılandırmada değişkenler algılandı. Lütfen bu değişkenlerin düzgün yapılandırıldığını onaylayın:",detectedVariables:"Algılanan Değişkenler",confirmVariablesMessage:"Lütfen bu değişkenlerin çalışma ortamınızda düzgün tanımlandığından emin olun. Sunucu eklemeye devam edilsin mi?",confirmAndAdd:"Onayla ve Ekle",openapi:{inputMode:"Giriş Modu",inputModeUrl:"Şartname URL'si",inputModeSchema:"JSON Şeması",specUrl:"OpenAPI Şartname URL'si",schema:"OpenAPI JSON Şeması",schemaHelp:"Eksiksiz OpenAPI JSON şemanızı buraya yapıştırın",security:"Güvenlik Türü",securityNone:"Yok",securityApiKey:"API Anahtarı",securityHttp:"HTTP Kimlik Doğrulaması",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"API Anahtarı Yapılandırması",apiKeyName:"Başlık/Parametre Adı",apiKeyIn:"Konum",apiKeyValue:"API Anahtarı Değeri",httpAuthConfig:"HTTP Kimlik Doğrulama Yapılandırması",httpScheme:"Kimlik Doğrulama Şeması",httpCredentials:"Kimlik Bilgileri",httpSchemeBasic:"Basit",httpSchemeBearer:"Bearer",httpSchemeDigest:"Digest",oauth2Config:"OAuth 2.0 Yapılandırması",oauth2Token:"Erişim Anahtarı",openIdConnectConfig:"OpenID Connect Yapılandırması",openIdConnectUrl:"URL'yi Keşfet",openIdConnectToken:"ID Token",apiKeyInHeader:"Başlık",apiKeyInQuery:"Sorgu",apiKeyInCookie:"Çerez",passthroughHeaders:"Geçiş Başlıkları",passthroughHeadersHelp:"Araç çağrısı isteklerinden yukarı akış OpenAPI uç noktalarına geçirilecek başlık adlarının virgülle ayrılmış listesi (örn. Authorization, X-API-Key)"},oauth:{sectionTitle:"OAuth Yapılandırması",sectionDescription:"OAuth korumalı sunucular için istemci kimlik bilgilerini yapılandırın (isteğe bağlı).",clientId:"İstemci ID",clientSecret:"İstemci Gizli Anahtarı",authorizationEndpoint:"Yetkilendirme Uç Noktası",tokenEndpoint:"Token Uç Noktası",scopes:"Kapsamlar",scopesPlaceholder:"scope1 scope2",resource:"Kaynak / Hedef Kitle",accessToken:"Erişim Tokeni",refreshToken:"Yenileme Tokeni"}},hj={online:"Çevrimiçi",offline:"Çevrimdışı",connecting:"Bağlanıyor",oauthRequired:"OAuth Gerekli",clickToAuthorize:"OAuth ile yetkilendirmek için tıklayın",oauthWindowOpened:"OAuth yetkilendirme penceresi açıldı. Lütfen yetkilendirmeyi tamamlayın."},gj={general:"Bir şeyler yanlış gitti",network:"Ağ bağlantı hatası. Lütfen internet bağlantınızı kontrol edin",serverConnection:"Sunucuya bağlanılamıyor. Lütfen sunucunun çalışıp çalışmadığını kontrol edin",serverAdd:"Sunucu eklenemedi. Lütfen sunucu durumunu kontrol edin",serverUpdate:"{{serverName}} sunucusu düzenlenemedi. Lütfen sunucu durumunu kontrol edin",serverFetch:"Sunucu verileri alınamadı. Lütfen daha sonra tekrar deneyin",failedToReloadServer:"Sunucu yeniden yüklenemedi",initialStartup:"Sunucu başlatılıyor olabilir. İlk başlatmada bu işlem biraz zaman alabileceğinden lütfen bekleyin...",serverInstall:"Sunucu yüklenemedi",failedToFetchSettings:"Ayarlar getirilemedi",failedToUpdateRouteConfig:"Route yapılandırması güncellenemedi",failedToUpdateSmartRoutingConfig:"Akıllı yönlendirme yapılandırması güncellenemedi"},xj={processing:"İşleniyor...",save:"Kaydet",cancel:"İptal",back:"Geri",refresh:"Yenile",create:"Oluştur",creating:"Oluşturuluyor...",update:"Güncelle",updating:"Güncelleniyor...",submitting:"Gönderiliyor...",delete:"Sil",remove:"Kaldır",copy:"Kopyala",copyId:"ID'yi Kopyala",copyUrl:"URL'yi Kopyala",copyJson:"JSON'u Kopyala",copySuccess:"Panoya kopyalandı",copyFailed:"Kopyalama başarısız",copied:"Kopyalandı",close:"Kapat",confirm:"Onayla",language:"Dil",true:"Doğru",false:"Yanlış",dismiss:"Anımsatma",github:"GitHub",wechat:"WeChat",discord:"Discord",required:"Gerekli",secret:"Gizli",default:"Varsayılan",value:"Değer",type:"Tür",repeated:"Tekrarlanan",valueHint:"Değer İpucu",choices:"Seçenekler"},yj={dashboard:"Kontrol Paneli",servers:"Sunucular",groups:"Gruplar",users:"Kullanıcılar",settings:"Ayarlar",changePassword:"Şifre Değiştir",market:"Market",cloud:"Bulut Market",logs:"Günlükler"},vj={dashboard:{title:"Kontrol Paneli",totalServers:"Toplam",onlineServers:"Çevrimiçi",offlineServers:"Çevrimdışı",connectingServers:"Bağlanıyor",recentServers:"Son Sunucular"},servers:{title:"Sunucu Yönetimi"},groups:{title:"Grup Yönetimi"},users:{title:"Kullanıcı Yönetimi"},settings:{title:"Ayarlar",language:"Dil",account:"Hesap Ayarları",password:"Şifre Değiştir",appearance:"Görünüm",routeConfig:"Güvenlik",installConfig:"Kurulum",smartRouting:"Akıllı Yönlendirme",oauthServer:"OAuth Sunucusu"},market:{title:"Market Yönetimi - Yerel ve Bulut Marketler"},logs:{title:"Sistem Günlükleri"}},bj={filters:"Filtreler",search:"Günlüklerde ara...",autoScroll:"Otomatik kaydır",clearLogs:"Günlükleri temizle",loading:"Günlükler yükleniyor...",noLogs:"Kullanılabilir günlük yok.",noMatch:"Mevcut filtrelerle eşleşen günlük yok.",mainProcess:"Ana İşlem",childProcess:"Alt İşlem",main:"Ana",child:"Alt"},Sj={add:"Ekle",addNew:"Yeni Grup Ekle",edit:"Grubu Düzenle",delete:"Sil",confirmDelete:"Bu grubu silmek istediğinizden emin misiniz?",deleteWarning:"'{{name}}' grubunu silmek, onu ve tüm sunucu ilişkilerini kaldıracaktır. Bu işlem geri alınamaz.",name:"Grup Adı",namePlaceholder:"Grup adını girin",nameRequired:"Grup adı gereklidir",description:"Açıklama",descriptionPlaceholder:"Grup açıklamasını girin (isteğe bağlı)",createError:"Grup oluşturulamadı",updateError:"Grup güncellenemedi",deleteError:"Grup silinemedi",serverAddError:"Sunucu gruba eklenemedi",serverRemoveError:"Sunucu gruptan kaldırılamadı",addServer:"Gruba Sunucu Ekle",selectServer:"Eklenecek bir sunucu seçin",servers:"Gruptaki Sunucular",remove:"Kaldır",noGroups:"Kullanılabilir grup yok. Başlamak için yeni bir grup oluşturun.",noServers:"Bu grupta sunucu yok.",noServerOptions:"Kullanılabilir sunucu yok",serverCount:"{{count}} Sunucu",toolSelection:"Araç Seçimi",toolsSelected:"Seçildi",allTools:"Tümü",selectedTools:"Seçili araçlar",selectAll:"Tümünü Seç",selectNone:"Hiçbirini Seçme",configureTools:"Araçları Yapılandır"},wj={title:"Yerel Kurulum",official:"Resmi",by:"Geliştirici",unknown:"Bilinmeyen",tools:"araçlar",search:"Ara",searchPlaceholder:"Sunucuları isme, kategoriye veya etiketlere göre ara",clearFilters:"Temizle",clearCategoryFilter:"",clearTagFilter:"",categories:"Kategoriler",tags:"Etiketler",showTags:"Etiketleri göster",hideTags:"Etiketleri gizle",moreTags:"",noServers:"Aramanızla eşleşen sunucu bulunamadı",backToList:"Listeye dön",install:"Yükle",installing:"Yükleniyor...",installed:"Yüklendi",installServer:"Sunucu Yükle: {{name}}",installSuccess:"{{serverName}} sunucusu başarıyla yüklendi",author:"Yazar",license:"Lisans",repository:"Depo",examples:"Örnekler",arguments:"Argümanlar",argumentName:"Ad",description:"Açıklama",required:"Gerekli",example:"Örnek",viewSchema:"Şemayı görüntüle",fetchError:"Market sunucuları getirilirken hata",serverNotFound:"Sunucu bulunamadı",searchError:"Sunucular aranırken hata",filterError:"Sunucular kategoriye göre filtrelenirken hata",tagFilterError:"Sunucular etikete göre filtrelenirken hata",noInstallationMethod:"Bu sunucu için kullanılabilir kurulum yöntemi yok",showing:"{{total}} sunucudan {{from}}-{{to}} arası gösteriliyor",perPage:"Sayfa başına",confirmVariablesMessage:"Lütfen bu değişkenlerin çalışma ortamınızda düzgün tanımlandığından emin olun. Sunucu yüklemeye devam edilsin mi?",confirmAndInstall:"Onayla ve Yükle"},jj={authorizeTitle:"Uygulamayı Yetkilendir",authorizeSubtitle:"Bu uygulamanın MCPHub hesabınıza erişmesine izin verin.",buttons:{approve:"Erişime izin ver",deny:"Reddet",approveSubtitle:"Bu uygulamaya güveniyorsanız izin vermeniz önerilir.",denySubtitle:"İstediğiniz zaman daha sonra erişim verebilirsiniz."}},Nj={title:"Bulut Desteği",subtitle:"MCPRouter tarafından desteklenmektedir",by:"Geliştirici",server:"Sunucu",config:"Yapılandırma",created:"Oluşturuldu",updated:"Güncellendi",available:"Kullanılabilir",description:"Açıklama",details:"Detaylar",tools:"Araçlar",tool:"araç",toolsAvailable:"{{count}} araç mevcut",loadingTools:"Araçlar yükleniyor...",noTools:"Bu sunucu için kullanılabilir araç yok",noDescription:"Kullanılabilir açıklama yok",viewDetails:"Detayları Görüntüle",parameters:"Parametreler",result:"Sonuç",error:"Hata",callTool:"Çalıştır",calling:"Çalıştırılıyor...",toolCallSuccess:"{{toolName}} aracı başarıyla çalıştırıldı",toolCallError:"{{toolName}} aracı çalıştırılamadı: {{error}}",viewSchema:"Şemayı Görüntüle",backToList:"Bulut Market'e Dön",search:"Ara",searchPlaceholder:"Bulut sunucularını isme, başlığa veya geliştiriciye göre ara",clearFilters:"Filtreleri Temizle",clearCategoryFilter:"Temizle",clearTagFilter:"Temizle",categories:"Kategoriler",tags:"Etiketler",noCategories:"Kategori bulunamadı",noTags:"Etiket bulunamadı",noServers:"Bulut sunucusu bulunamadı",fetchError:"Bulut sunucuları getirilirken hata",serverNotFound:"Bulut sunucusu bulunamadı",searchError:"Bulut sunucuları aranırken hata",filterError:"Bulut sunucuları kategoriye göre filtrelenirken hata",tagFilterError:"Bulut sunucuları etikete göre filtrelenirken hata",showing:"{{total}} bulut sunucusundan {{from}}-{{to}} arası gösteriliyor",perPage:"Sayfa başına",apiKeyNotConfigured:"MCPRouter API anahtarı yapılandırılmamış",apiKeyNotConfiguredDescription:"Bulut sunucularını kullanmak için MCPRouter API anahtarınızı yapılandırmanız gerekir.",getApiKey:"API Anahtarı Al",configureInSettings:"Ayarlarda Yapılandır",installServer:"{{name}} Yükle",installSuccess:"{{name}} sunucusu başarıyla yüklendi",installError:"Sunucu yüklenemedi: {{error}}"},Cj={title:"Kayıt",official:"Resmi",latest:"En Son",description:"Açıklama",website:"Web Sitesi",repository:"Depo",packages:"Paketler",package:"paket",remotes:"Uzak Sunucular",remote:"uzak sunucu",published:"Yayınlandı",updated:"Güncellendi",install:"Yükle",installing:"Yükleniyor...",installed:"Yüklendi",installServer:"{{name}} Yükle",installSuccess:"{{name}} sunucusu başarıyla yüklendi",installError:"Sunucu yüklenemedi: {{error}}",noDescription:"Kullanılabilir açıklama yok",viewDetails:"Detayları Görüntüle",backToList:"Kayda Dön",search:"Ara",searchPlaceholder:"Kayıt sunucularını isme göre ara",clearFilters:"Temizle",noServers:"Kayıt sunucusu bulunamadı",fetchError:"Kayıt sunucuları getirilirken hata",serverNotFound:"Kayıt sunucusu bulunamadı",showing:"{{total}} kayıt sunucusundan {{from}}-{{to}} arası gösteriliyor",perPage:"Sayfa başına",environmentVariables:"Ortam Değişkenleri",packageArguments:"Paket Argümanları",runtimeArguments:"Çalışma Zamanı Argümanları",headers:"Başlıklar"},kj={run:"Çalıştır",running:"Çalıştırılıyor...",runTool:"Aracı Çalıştır",cancel:"İptal",noDescription:"Kullanılabilir açıklama yok",inputSchema:"Giriş Şeması:",runToolWithName:"Aracı Çalıştır: {{name}}",execution:"Araç Çalıştırma",successful:"Başarılı",failed:"Başarısız",result:"Sonuç:",error:"Hata",errorDetails:"Hata Detayları:",noContent:"Araç başarıyla çalıştırıldı ancak içerik döndürmedi.",unknownError:"Bilinmeyen hata oluştu",jsonResponse:"JSON Yanıtı:",toolResult:"Araç sonucu",noParameters:"Bu araç herhangi bir parametre gerektirmez.",selectOption:"Bir seçenek seçin",enterValue:"{{type}} değeri girin",enabled:"Etkin",enableSuccess:"{{name}} aracı başarıyla etkinleştirildi",disableSuccess:"{{name}} aracı başarıyla devre dışı bırakıldı",toggleFailed:"Araç durumu değiştirilemedi",parameters:"Araç Parametreleri",formMode:"Form Modu",jsonMode:"JSON Modu",jsonConfiguration:"JSON Yapılandırması",invalidJsonFormat:"Geçersiz JSON formatı",fixJsonBeforeSwitching:"Form moduna geçmeden önce lütfen JSON formatını düzeltin",item:"Öğe {{index}}",addItem:"{{key}} öğesi ekle",enterKey:"{{key}} girin"},Aj={run:"Getir",running:"Getiriliyor...",result:"İstek Sonucu",error:"İstek Hatası",execution:"İstek Çalıştırma",successful:"Başarılı",failed:"Başarısız",errorDetails:"Hata Detayları:",noContent:"İstek başarıyla çalıştırıldı ancak içerik döndürmedi.",unknownError:"Bilinmeyen hata oluştu",jsonResponse:"JSON Yanıtı:",description:"Açıklama",messages:"Mesajlar",noDescription:"Kullanılabilir açıklama yok",runPromptWithName:"İsteği Getir: {{name}}",descriptionUpdateSuccess:"İstek açıklaması başarıyla güncellendi",descriptionUpdateFailed:"İstek açıklaması güncellenemedi"},Ej={enableGlobalRoute:"Global Yönlendirmeyi Etkinleştir",enableGlobalRouteDescription:"Grup ID'si belirtmeden /sse uç noktasına bağlantıya izin ver",enableGroupNameRoute:"Grup Adı Yönlendirmeyi Etkinleştir",enableGroupNameRouteDescription:"Sadece grup ID'leri yerine grup adları kullanarak /sse uç noktasına bağlantıya izin ver",enableBearerAuth:"Bearer Kimlik Doğrulamasını Etkinleştir",enableBearerAuthDescription:"MCP istekleri için bearer token kimlik doğrulaması gerektir",bearerAuthKey:"Bearer Kimlik Doğrulama Anahtarı",bearerAuthKeyDescription:"Bearer token'da gerekli olacak kimlik doğrulama anahtarı",bearerAuthKeyPlaceholder:"Bearer kimlik doğrulama anahtarını girin",skipAuth:"Kimlik Doğrulamayı Atla",skipAuthDescription:"Arayüz ve API erişimi için giriş gereksinimini atla (Güvenlik için VARSAYILAN KAPALI)",pythonIndexUrl:"Python Paket Deposu URL'si",pythonIndexUrlDescription:"Python paket kurulumu için UV_DEFAULT_INDEX ortam değişkenini ayarla",pythonIndexUrlPlaceholder:"örn. https://pypi.org/simple",npmRegistry:"NPM Kayıt URL'si",npmRegistryDescription:"NPM paket kurulumu için npm_config_registry ortam değişkenini ayarla",npmRegistryPlaceholder:"örn. https://registry.npmjs.org/",baseUrl:"Temel URL",baseUrlDescription:"MCP istekleri için temel URL",baseUrlPlaceholder:"örn. http://localhost:3000",installConfig:"Kurulum",systemConfigUpdated:"Sistem yapılandırması başarıyla güncellendi",enableSmartRouting:"Akıllı Yönlendirmeyi Etkinleştir",enableSmartRoutingDescription:"Girdiye göre en uygun aracı aramak için akıllı yönlendirme özelliğini etkinleştir ($smart grup adını kullanarak)",dbUrl:"PostgreSQL URL'si (pgvector desteği gerektirir)",dbUrlPlaceholder:"örn. postgresql://kullanıcı:şifre@localhost:5432/veritabanıadı",openaiApiBaseUrl:"OpenAI API Temel URL'si",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API Anahtarı",openaiApiKeyPlaceholder:"OpenAI API anahtarını girin",openaiApiEmbeddingModel:"OpenAI Entegrasyon Modeli",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"Akıllı yönlendirme yapılandırması başarıyla güncellendi",smartRoutingRequiredFields:"Akıllı yönlendirmeyi etkinleştirmek için Veritabanı URL'si ve OpenAI API Anahtarı gereklidir",smartRoutingValidationError:"Akıllı Yönlendirmeyi etkinleştirmeden önce lütfen gerekli alanları doldurun: {{fields}}",mcpRouterConfig:"Bulut Market",mcpRouterApiKey:"MCPRouter API Anahtarı",mcpRouterApiKeyDescription:"MCPRouter bulut market hizmetlerine erişim için API anahtarı",mcpRouterApiKeyPlaceholder:"MCPRouter API anahtarını girin",mcpRouterReferer:"Yönlendiren",mcpRouterRefererDescription:"MCPRouter API istekleri için Referer başlığı",mcpRouterRefererPlaceholder:"https://www.mcphubx.com",mcpRouterTitle:"Başlık",mcpRouterTitleDescription:"MCPRouter API istekleri için Başlık başlığı",mcpRouterTitlePlaceholder:"MCPHub",mcpRouterBaseUrl:"Temel URL",mcpRouterBaseUrlDescription:"MCPRouter API için temel URL",mcpRouterBaseUrlPlaceholder:"https://api.mcprouter.to/v1",systemSettings:"Sistem Ayarları",nameSeparatorLabel:"İsim Ayırıcı",nameSeparatorDescription:"Sunucu adı ile araç/istek adını ayırmak için kullanılan karakter (varsayılan: -)",enableSessionRebuild:"Sunucu Oturum Yeniden Oluşturmayı Etkinleştir",enableSessionRebuildDescription:"Etkinleştirildiğinde, daha iyi oturum yönetimi deneyimi için geliştirilmiş sunucu oturum yeniden oluşturma kodunu uygular",restartRequired:"Yapılandırma kaydedildi. Tüm hizmetlerin yeni ayarları doğru şekilde yüklemesini sağlamak için uygulamayı yeniden başlatmanız önerilir.",exportMcpSettings:"Ayarları Dışa Aktar",mcpSettingsJson:"MCP Ayarları JSON",mcpSettingsJsonDescription:"Yedekleme veya diğer araçlara taşıma için mevcut mcp_settings.json yapılandırmanızı görüntüleyin, kopyalayın veya indirin",copyToClipboard:"Panoya Kopyala",downloadJson:"JSON Olarak İndir",exportSuccess:"Ayarlar başarıyla dışa aktarıldı",exportError:"Ayarlar getirilemedi",enableOauthServer:"OAuth Sunucusunu Etkinleştir",enableOauthServerDescription:"MCPHub'ın harici istemciler için OAuth jetonları vermesine izin ver",requireClientSecret:"İstemci Sırrı Zorunlu",requireClientSecretDescription:"Etkin olduğunda gizli istemciler client secret sunmalıdır (yalnızca PKCE kullanan istemciler için kapatabilirsiniz)",requireState:"State parametresi zorunlu",requireStateDescription:"State parametresi olmayan yetkilendirme isteklerini reddeder",accessTokenLifetime:"Erişim jetonu süresi (saniye)",accessTokenLifetimeDescription:"Verilen erişim jetonlarının geçerli kalacağı süre",accessTokenLifetimePlaceholder:"örn. 3600",refreshTokenLifetime:"Yenileme jetonu süresi (saniye)",refreshTokenLifetimeDescription:"Yenileme jetonlarının geçerli kalacağı süre",refreshTokenLifetimePlaceholder:"örn. 1209600",authorizationCodeLifetime:"Yetkilendirme kodu süresi (saniye)",authorizationCodeLifetimeDescription:"Yetkilendirme kodlarının takas edilebileceği süre",authorizationCodeLifetimePlaceholder:"örn. 300",allowedScopes:"İzin verilen kapsamlar",allowedScopesDescription:"Kullanıcıların onaylayabileceği kapsamların virgülle ayrılmış listesi",allowedScopesPlaceholder:"örn. read, write",enableDynamicRegistration:"Dinamik istemci kaydını etkinleştir",dynamicRegistrationDescription:"RFC 7591 uyumlu istemcilerin herkese açık uç nokta üzerinden kayıt olmasına izin ver",dynamicRegistrationAllowedGrantTypes:"İzin verilen grant türleri",dynamicRegistrationAllowedGrantTypesDescription:"Dinamik olarak kaydedilen istemciler için kullanılabilecek grant türlerinin virgülle ayrılmış listesi",dynamicRegistrationAllowedGrantTypesPlaceholder:"örn. authorization_code, refresh_token",dynamicRegistrationAuth:"Kayıt için kimlik doğrulaması iste",dynamicRegistrationAuthDescription:"Kayıt uç noktasını korur, yalnızca kimliği doğrulanmış istekler yeni istemci oluşturabilir",invalidNumberInput:"Lütfen sıfırdan küçük olmayan geçerli bir sayı girin"},Tj={upload:"Yükle",uploadTitle:"DXT Uzantısı Yükle",dropFileHere:".dxt dosyanızı buraya bırakın",orClickToSelect:"veya bilgisayarınızdan seçmek için tıklayın",invalidFileType:"Lütfen geçerli bir .dxt dosyası seçin",noFileSelected:"Lütfen yüklemek için bir .dxt dosyası seçin",uploading:"Yükleniyor...",uploadFailed:"DXT dosyası yüklenemedi",installServer:"DXT'den MCP Sunucusu Yükle",extensionInfo:"Uzantı Bilgisi",name:"Ad",version:"Sürüm",description:"Açıklama",author:"Geliştirici",tools:"Araçlar",serverName:"Sunucu Adı",serverNamePlaceholder:"Bu sunucu için bir ad girin",install:"Yükle",installing:"Yükleniyor...",installFailed:"DXT'den sunucu yüklenemedi",serverExistsTitle:"Sunucu Zaten Mevcut",serverExistsConfirm:"'{{serverName}}' sunucusu zaten mevcut. Yeni sürümle geçersiz kılmak istiyor musunuz?",override:"Geçersiz Kıl"},Rj={button:"İçe Aktar",title:"JSON'dan Sunucuları İçe Aktar",inputLabel:"Sunucu Yapılandırma JSON",inputHelp:"Sunucu yapılandırma JSON'unuzu yapıştırın. STDIO, SSE ve HTTP (streamable-http) sunucu türlerini destekler.",preview:"Önizle",previewTitle:"İçe Aktarılacak Sunucuları Önizle",import:"İçe Aktar",importing:"İçe aktarılıyor...",invalidFormat:"Geçersiz JSON formatı. JSON bir 'mcpServers' nesnesi içermelidir.",parseError:"JSON ayrıştırılamadı. Lütfen formatı kontrol edip tekrar deneyin.",addFailed:"Sunucu eklenemedi",importFailed:"Sunucular içe aktarılamadı",partialSuccess:"{{total}} sunucudan {{count}} tanesi başarıyla içe aktarıldı. Bazı sunucular başarısız oldu:"},Mj={add:"Kullanıcı Ekle",addNew:"Yeni Kullanıcı Ekle",edit:"Kullanıcıyı Düzenle",delete:"Kullanıcıyı Sil",create:"Kullanıcı Oluştur",update:"Kullanıcıyı Güncelle",username:"Kullanıcı Adı",password:"Şifre",newPassword:"Yeni Şifre",confirmPassword:"Şifreyi Onayla",changePassword:"Şifre Değiştir",adminRole:"Yönetici",admin:"Yönetici",user:"Kullanıcı",role:"Rol",actions:"Eylemler",addFirst:"İlk kullanıcınızı ekleyin",permissions:"İzinler",adminPermissions:"Tam sistem erişimi",userPermissions:"Sınırlı erişim",currentUser:"Siz",noUsers:"Kullanıcı bulunamadı",adminRequired:"Kullanıcıları yönetmek için yönetici erişimi gereklidir",usernameRequired:"Kullanıcı adı gereklidir",passwordRequired:"Şifre gereklidir",passwordTooShort:"Şifre en az 6 karakter uzunluğunda olmalıdır",passwordMismatch:"Şifreler eşleşmiyor",usernamePlaceholder:"Kullanıcı adını girin",passwordPlaceholder:"Şifreyi girin",newPasswordPlaceholder:"Mevcut şifreyi korumak için boş bırakın",confirmPasswordPlaceholder:"Yeni şifreyi onaylayın",createError:"Kullanıcı oluşturulamadı",updateError:"Kullanıcı güncellenemedi",deleteError:"Kullanıcı silinemedi",statsError:"Kullanıcı istatistikleri getirilemedi",deleteConfirmation:"'{{username}}' kullanıcısını silmek istediğinizden emin misiniz? Bu işlem geri alınamaz.",confirmDelete:"Kullanıcıyı Sil",deleteWarning:"'{{username}}' kullanıcısını silmek istediğinizden emin misiniz? Bu işlem geri alınamaz."},zj={errors:{readonly:"Demo ortamı için salt okunur",invalid_credentials:"Geçersiz kullanıcı adı veya şifre",serverNameRequired:"Sunucu adı gereklidir",serverConfigRequired:"Sunucu yapılandırması gereklidir",serverConfigInvalid:"Sunucu yapılandırması bir URL, OpenAPI şartname URL'si veya şema, ya da argümanlı komut içermelidir",serverTypeInvalid:"Sunucu türü şunlardan biri olmalıdır: stdio, sse, streamable-http, openapi",urlRequiredForType:"{{type}} sunucu türü için URL gereklidir",openapiSpecRequired:"OpenAPI sunucu türü için OpenAPI şartname URL'si veya şema gereklidir",headersInvalidFormat:"Başlıklar bir nesne olmalıdır",headersNotSupportedForStdio:"Başlıklar stdio sunucu türü için desteklenmez",serverNotFound:"Sunucu bulunamadı",failedToRemoveServer:"Sunucu bulunamadı veya kaldırılamadı",internalServerError:"Dahili sunucu hatası",failedToGetServers:"Sunucu bilgileri alınamadı",failedToGetServerSettings:"Sunucu ayarları alınamadı",failedToGetServerConfig:"Sunucu yapılandırması alınamadı",failedToSaveSettings:"Ayarlar kaydedilemedi",toolNameRequired:"Sunucu adı ve araç adı gereklidir",descriptionMustBeString:"Açıklama bir string olmalıdır",groupIdRequired:"Grup ID gereklidir",groupNameRequired:"Grup adı gereklidir",groupNotFound:"Grup bulunamadı",groupIdAndServerNameRequired:"Grup ID ve sunucu adı gereklidir",groupOrServerNotFound:"Grup veya sunucu bulunamadı",toolsMustBeAllOrArray:'Araçlar "all" veya bir string dizisi olmalıdır',serverNameAndToolNameRequired:"Sunucu adı ve araç adı gereklidir",usernameRequired:"Kullanıcı adı gereklidir",userNotFound:"Kullanıcı bulunamadı",failedToGetUsers:"Kullanıcı bilgileri alınamadı",failedToGetUserInfo:"Kullanıcı bilgisi alınamadı",failedToGetUserStats:"Kullanıcı istatistikleri alınamadı",marketServerNameRequired:"Sunucu adı gereklidir",marketServerNotFound:"Market sunucusu bulunamadı",failedToGetMarketServers:"Market sunucuları bilgisi alınamadı",failedToGetMarketServer:"Market sunucusu bilgisi alınamadı",failedToGetMarketCategories:"Market kategorileri alınamadı",failedToGetMarketTags:"Market etiketleri alınamadı",failedToSearchMarketServers:"Market sunucuları aranamadı",failedToFilterMarketServers:"Market sunucuları filtrelenemedi",failedToProcessDxtFile:"DXT dosyası işlenemedi"},success:{serverCreated:"Sunucu başarıyla oluşturuldu",serverUpdated:"Sunucu başarıyla güncellendi",serverRemoved:"Sunucu başarıyla kaldırıldı",serverToggled:"Sunucu durumu başarıyla değiştirildi",toolToggled:"{{name}} aracı başarıyla {{action}}",toolDescriptionUpdated:"{{name}} aracının açıklaması başarıyla güncellendi",systemConfigUpdated:"Sistem yapılandırması başarıyla güncellendi",groupCreated:"Grup başarıyla oluşturuldu",groupUpdated:"Grup başarıyla güncellendi",groupDeleted:"Grup başarıyla silindi",serverAddedToGroup:"Sunucu başarıyla gruba eklendi",serverRemovedFromGroup:"Sunucu başarıyla gruptan kaldırıldı",serverToolsUpdated:"Sunucu araçları başarıyla güncellendi"}},Oj={authorizationFailed:"Yetkilendirme Başarısız",authorizationFailedError:"Hata",authorizationFailedDetails:"Detaylar",invalidRequest:"Geçersiz İstek",missingStateParameter:"Gerekli OAuth durum parametresi eksik.",missingCodeParameter:"Gerekli yetkilendirme kodu parametresi eksik.",serverNotFound:"Sunucu Bulunamadı",serverNotFoundMessage:"Bu yetkilendirme isteğiyle ilişkili sunucu bulunamadı.",sessionExpiredMessage:"Yetkilendirme oturumunun süresi dolmuş olabilir. Lütfen tekrar yetkilendirmeyi deneyin.",authorizationSuccessful:"Yetkilendirme Başarılı",server:"Sunucu",status:"Durum",connected:"Bağlandı",successMessage:"Sunucu başarıyla yetkilendirildi ve bağlandı.",autoCloseMessage:"Bu pencere 3 saniye içinde otomatik olarak kapanacak...",closeNow:"Şimdi Kapat",connectionError:"Bağlantı Hatası",connectionErrorMessage:"Yetkilendirme başarılı oldu, ancak sunucuya bağlanılamadı.",reconnectMessage:"Lütfen kontrol panelinden yeniden bağlanmayı deneyin.",configurationError:"Yapılandırma Hatası",configurationErrorMessage:"Sunucu aktarımı OAuth finishAuth() desteklemiyor. Lütfen sunucunun streamable-http aktarımıyla yapılandırıldığından emin olun.",internalError:"İçsel Hata",internalErrorMessage:"OAuth geri araması işlenirken beklenmeyen bir hata oluştu.",closeWindow:"Pencereyi Kapat"},Dj={app:lj,about:ij,profile:oj,sponsor:cj,wechat:uj,discord:dj,theme:mj,auth:fj,server:pj,status:hj,errors:gj,common:xj,nav:yj,pages:vj,logs:bj,groups:Sj,market:wj,oauthServer:jj,cloud:Nj,registry:Cj,tool:kj,prompt:Aj,settings:Ej,dxt:Tj,jsonImport:Rj,users:Mj,api:zj,oauthCallback:Oj};It.use(Pg).use(Zv).init({resources:{en:{translation:tw},zh:{translation:Rw},fr:{translation:nj},tr:{translation:Dj}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});const Lj=()=>{Ov()};Lj();async function Uj(){try{console.log("Loading runtime configuration...");const s=await Rv();console.log("Runtime configuration loaded:",s),window.__MCPHUB_CONFIG__=s,Vp.createRoot(document.getElementById("root")).render(a.jsx(nn.StrictMode,{children:a.jsx(uh,{})}))}catch(s){console.error("Failed to initialize app:",s),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},Vp.createRoot(document.getElementById("root")).render(a.jsx(nn.StrictMode,{children:a.jsx(uh,{})}))}}Uj();
|
|
251
|
-
//# sourceMappingURL=index-
|
|
251
|
+
//# sourceMappingURL=index-YuXmBVno.js.map
|