@samanhappy/mcphub 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/controllers/configController.js +27 -0
- package/dist/controllers/configController.js.map +1 -1
- package/dist/controllers/dxtController.js +139 -0
- package/dist/controllers/dxtController.js.map +1 -0
- package/dist/controllers/groupController.js +1 -1
- package/dist/controllers/groupController.js.map +1 -1
- package/dist/controllers/serverController.js +9 -3
- package/dist/controllers/serverController.js.map +1 -1
- package/dist/middlewares/auth.js +28 -0
- package/dist/middlewares/auth.js.map +1 -1
- package/dist/models/User.js +5 -5
- package/dist/models/User.js.map +1 -1
- package/dist/routes/index.js +6 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/services/logService.js +2 -1
- package/dist/services/logService.js.map +1 -1
- package/dist/services/mcpService.js +28 -0
- package/dist/services/mcpService.js.map +1 -1
- package/dist/services/vectorSearchService.js +1 -1
- package/dist/services/vectorSearchService.js.map +1 -1
- package/dist/utils/smartRouting.js +1 -1
- package/dist/utils/smartRouting.js.map +1 -1
- package/frontend/dist/assets/index-BS_54XZ9.js +186 -0
- package/frontend/dist/assets/index-BS_54XZ9.js.map +1 -0
- package/frontend/dist/assets/index-DVcFHJ6u.css +1 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +13 -1
- package/frontend/dist/assets/index-BTlOGwgN.css +0 -1
- package/frontend/dist/assets/index-BmFb5olQ.js +0 -186
- package/frontend/dist/assets/index-BmFb5olQ.js.map +0 -1
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();function Hh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Ac={exports:{}},js={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Pm;function J0(){if(Pm)return js;Pm=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(c,f,d){var h=null;if(d!==void 0&&(h=""+d),f.key!==void 0&&(h=""+f.key),"key"in f){d={};for(var x in f)x!=="key"&&(d[x]=f[x])}else d=f;return f=d.ref,{$$typeof:l,type:c,key:h,ref:f!==void 0?f:null,props:d}}return js.Fragment=r,js.jsx=s,js.jsxs=s,js}var Zm;function F0(){return Zm||(Zm=1,Ac.exports=J0()),Ac.exports}var i=F0(),Rc={exports:{}},Ne={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Jm;function I0(){if(Jm)return Ne;Jm=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),S=Symbol.iterator;function v(E){return E===null||typeof E!="object"?null:(E=S&&E[S]||E["@@iterator"],typeof E=="function"?E:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,C={};function T(E,Q,le){this.props=E,this.context=Q,this.refs=C,this.updater=le||R}T.prototype.isReactComponent={},T.prototype.setState=function(E,Q){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,Q,"setState")},T.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function M(){}M.prototype=T.prototype;function k(E,Q,le){this.props=E,this.context=Q,this.refs=C,this.updater=le||R}var U=k.prototype=new M;U.constructor=k,j(U,T.prototype),U.isPureReactComponent=!0;var K=Array.isArray,Y={H:null,A:null,T:null,S:null,V:null},ce=Object.prototype.hasOwnProperty;function X(E,Q,le,P,re,Se){return le=Se.ref,{$$typeof:l,type:E,key:Q,ref:le!==void 0?le:null,props:Se}}function $(E,Q){return X(E.type,Q,void 0,void 0,void 0,E.props)}function I(E){return typeof E=="object"&&E!==null&&E.$$typeof===l}function H(E){var Q={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(le){return Q[le]})}var q=/\/+/g;function te(E,Q){return typeof E=="object"&&E!==null&&E.key!=null?H(""+E.key):Q.toString(36)}function ae(){}function ne(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ae,ae):(E.status="pending",E.then(function(Q){E.status==="pending"&&(E.status="fulfilled",E.value=Q)},function(Q){E.status==="pending"&&(E.status="rejected",E.reason=Q)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function V(E,Q,le,P,re){var Se=typeof E;(Se==="undefined"||Se==="boolean")&&(E=null);var ee=!1;if(E===null)ee=!0;else switch(Se){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(E.$$typeof){case l:case r:ee=!0;break;case y:return ee=E._init,V(ee(E._payload),Q,le,P,re)}}if(ee)return re=re(E),ee=P===""?"."+te(E,0):P,K(re)?(le="",ee!=null&&(le=ee.replace(q,"$&/")+"/"),V(re,Q,le,"",function(pe){return pe})):re!=null&&(I(re)&&(re=$(re,le+(re.key==null||E&&E.key===re.key?"":(""+re.key).replace(q,"$&/")+"/")+ee)),Q.push(re)),1;ee=0;var se=P===""?".":P+":";if(K(E))for(var ie=0;ie<E.length;ie++)P=E[ie],Se=se+te(P,ie),ee+=V(P,Q,le,Se,re);else if(ie=v(E),typeof ie=="function")for(E=ie.call(E),ie=0;!(P=E.next()).done;)P=P.value,Se=se+te(P,ie++),ee+=V(P,Q,le,Se,re);else if(Se==="object"){if(typeof E.then=="function")return V(ne(E),Q,le,P,re);throw Q=String(E),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ee}function O(E,Q,le){if(E==null)return E;var P=[],re=0;return V(E,P,"","",function(Se){return Q.call(le,Se,re++)}),P}function W(E){if(E._status===-1){var Q=E._result;Q=Q(),Q.then(function(le){(E._status===0||E._status===-1)&&(E._status=1,E._result=le)},function(le){(E._status===0||E._status===-1)&&(E._status=2,E._result=le)}),E._status===-1&&(E._status=0,E._result=Q)}if(E._status===1)return E._result.default;throw E._result}var D=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=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(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)};function ue(){}return Ne.Children={map:O,forEach:function(E,Q,le){O(E,function(){Q.apply(this,arguments)},le)},count:function(E){var Q=0;return O(E,function(){Q++}),Q},toArray:function(E){return O(E,function(Q){return Q})||[]},only:function(E){if(!I(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},Ne.Component=T,Ne.Fragment=s,Ne.Profiler=f,Ne.PureComponent=k,Ne.StrictMode=c,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(E){return Y.H.useMemoCache(E)}},Ne.cache=function(E){return function(){return E.apply(null,arguments)}},Ne.cloneElement=function(E,Q,le){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var P=j({},E.props),re=E.key,Se=void 0;if(Q!=null)for(ee in Q.ref!==void 0&&(Se=void 0),Q.key!==void 0&&(re=""+Q.key),Q)!ce.call(Q,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&Q.ref===void 0||(P[ee]=Q[ee]);var ee=arguments.length-2;if(ee===1)P.children=le;else if(1<ee){for(var se=Array(ee),ie=0;ie<ee;ie++)se[ie]=arguments[ie+2];P.children=se}return X(E.type,re,void 0,void 0,Se,P)},Ne.createContext=function(E){return E={$$typeof:h,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:d,_context:E},E},Ne.createElement=function(E,Q,le){var P,re={},Se=null;if(Q!=null)for(P in Q.key!==void 0&&(Se=""+Q.key),Q)ce.call(Q,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(re[P]=Q[P]);var ee=arguments.length-2;if(ee===1)re.children=le;else if(1<ee){for(var se=Array(ee),ie=0;ie<ee;ie++)se[ie]=arguments[ie+2];re.children=se}if(E&&E.defaultProps)for(P in ee=E.defaultProps,ee)re[P]===void 0&&(re[P]=ee[P]);return X(E,Se,void 0,void 0,null,re)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(E){return{$$typeof:x,render:E}},Ne.isValidElement=I,Ne.lazy=function(E){return{$$typeof:y,_payload:{_status:-1,_result:E},_init:W}},Ne.memo=function(E,Q){return{$$typeof:m,type:E,compare:Q===void 0?null:Q}},Ne.startTransition=function(E){var Q=Y.T,le={};Y.T=le;try{var P=E(),re=Y.S;re!==null&&re(le,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(ue,D)}catch(Se){D(Se)}finally{Y.T=Q}},Ne.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},Ne.use=function(E){return Y.H.use(E)},Ne.useActionState=function(E,Q,le){return Y.H.useActionState(E,Q,le)},Ne.useCallback=function(E,Q){return Y.H.useCallback(E,Q)},Ne.useContext=function(E){return Y.H.useContext(E)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(E,Q){return Y.H.useDeferredValue(E,Q)},Ne.useEffect=function(E,Q,le){var P=Y.H;if(typeof le=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return P.useEffect(E,Q)},Ne.useId=function(){return Y.H.useId()},Ne.useImperativeHandle=function(E,Q,le){return Y.H.useImperativeHandle(E,Q,le)},Ne.useInsertionEffect=function(E,Q){return Y.H.useInsertionEffect(E,Q)},Ne.useLayoutEffect=function(E,Q){return Y.H.useLayoutEffect(E,Q)},Ne.useMemo=function(E,Q){return Y.H.useMemo(E,Q)},Ne.useOptimistic=function(E,Q){return Y.H.useOptimistic(E,Q)},Ne.useReducer=function(E,Q,le){return Y.H.useReducer(E,Q,le)},Ne.useRef=function(E){return Y.H.useRef(E)},Ne.useState=function(E){return Y.H.useState(E)},Ne.useSyncExternalStore=function(E,Q,le){return Y.H.useSyncExternalStore(E,Q,le)},Ne.useTransition=function(){return Y.H.useTransition()},Ne.version="19.1.0",Ne}var Fm;function Fc(){return Fm||(Fm=1,Rc.exports=I0()),Rc.exports}var w=Fc();const qc=Hh(w);var Oc={exports:{}},Ns={},Mc={exports:{}},zc={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Im;function W0(){return Im||(Im=1,function(l){function r(O,W){var D=O.length;O.push(W);e:for(;0<D;){var ue=D-1>>>1,E=O[ue];if(0<f(E,W))O[ue]=W,O[D]=E,D=ue;else break e}}function s(O){return O.length===0?null:O[0]}function c(O){if(O.length===0)return null;var W=O[0],D=O.pop();if(D!==W){O[0]=D;e:for(var ue=0,E=O.length,Q=E>>>1;ue<Q;){var le=2*(ue+1)-1,P=O[le],re=le+1,Se=O[re];if(0>f(P,D))re<E&&0>f(Se,P)?(O[ue]=Se,O[re]=D,ue=re):(O[ue]=P,O[le]=D,ue=le);else if(re<E&&0>f(Se,D))O[ue]=Se,O[re]=D,ue=re;else break e}}return W}function f(O,W){var D=O.sortIndex-W.sortIndex;return D!==0?D:O.id-W.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var h=Date,x=h.now();l.unstable_now=function(){return h.now()-x}}var g=[],m=[],y=1,S=null,v=3,R=!1,j=!1,C=!1,T=!1,M=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function K(O){for(var W=s(m);W!==null;){if(W.callback===null)c(m);else if(W.startTime<=O)c(m),W.sortIndex=W.expirationTime,r(g,W);else break;W=s(m)}}function Y(O){if(C=!1,K(O),!j)if(s(g)!==null)j=!0,ce||(ce=!0,te());else{var W=s(m);W!==null&&V(Y,W.startTime-O)}}var ce=!1,X=-1,$=5,I=-1;function H(){return T?!0:!(l.unstable_now()-I<$)}function q(){if(T=!1,ce){var O=l.unstable_now();I=O;var W=!0;try{e:{j=!1,C&&(C=!1,k(X),X=-1),R=!0;var D=v;try{t:{for(K(O),S=s(g);S!==null&&!(S.expirationTime>O&&H());){var ue=S.callback;if(typeof ue=="function"){S.callback=null,v=S.priorityLevel;var E=ue(S.expirationTime<=O);if(O=l.unstable_now(),typeof E=="function"){S.callback=E,K(O),W=!0;break t}S===s(g)&&c(g),K(O)}else c(g);S=s(g)}if(S!==null)W=!0;else{var Q=s(m);Q!==null&&V(Y,Q.startTime-O),W=!1}}break e}finally{S=null,v=D,R=!1}W=void 0}}finally{W?te():ce=!1}}}var te;if(typeof U=="function")te=function(){U(q)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,ne=ae.port2;ae.port1.onmessage=q,te=function(){ne.postMessage(null)}}else te=function(){M(q,0)};function V(O,W){X=M(function(){O(l.unstable_now())},W)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(O){O.callback=null},l.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<O?Math.floor(1e3/O):5},l.unstable_getCurrentPriorityLevel=function(){return v},l.unstable_next=function(O){switch(v){case 1:case 2:case 3:var W=3;break;default:W=v}var D=v;v=W;try{return O()}finally{v=D}},l.unstable_requestPaint=function(){T=!0},l.unstable_runWithPriority=function(O,W){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var D=v;v=O;try{return W()}finally{v=D}},l.unstable_scheduleCallback=function(O,W,D){var ue=l.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?ue+D:ue):D=ue,O){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=D+E,O={id:y++,callback:W,priorityLevel:O,startTime:D,expirationTime:E,sortIndex:-1},D>ue?(O.sortIndex=D,r(m,O),s(g)===null&&O===s(m)&&(C?(k(X),X=-1):C=!0,V(Y,D-ue))):(O.sortIndex=E,r(g,O),j||R||(j=!0,ce||(ce=!0,te()))),O},l.unstable_shouldYield=H,l.unstable_wrapCallback=function(O){var W=v;return function(){var D=v;v=W;try{return O.apply(this,arguments)}finally{v=D}}}}(zc)),zc}var Wm;function ex(){return Wm||(Wm=1,Mc.exports=W0()),Mc.exports}var Dc={exports:{}},pt={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var eh;function tx(){if(eh)return pt;eh=1;var l=Fc();function r(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var c={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(g,m,y){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:g,containerInfo:m,implementation:y}}var h=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,pt.createPortal=function(g,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(r(299));return d(g,m,null,y)},pt.flushSync=function(g){var m=h.T,y=c.p;try{if(h.T=null,c.p=2,g)return g()}finally{h.T=m,c.p=y,c.d.f()}},pt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,c.d.C(g,m))},pt.prefetchDNS=function(g){typeof g=="string"&&c.d.D(g)},pt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var y=m.as,S=x(y,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,R=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?c.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:S,integrity:v,fetchPriority:R}):y==="script"&&c.d.X(g,{crossOrigin:S,integrity:v,fetchPriority:R,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},pt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=x(m.as,m.crossOrigin);c.d.M(g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&c.d.M(g)},pt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,S=x(y,m.crossOrigin);c.d.L(g,y,{crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},pt.preloadModule=function(g,m){if(typeof g=="string")if(m){var y=x(m.as,m.crossOrigin);c.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else c.d.m(g)},pt.requestFormReset=function(g){c.d.r(g)},pt.unstable_batchedUpdates=function(g,m){return g(m)},pt.useFormState=function(g,m,y){return h.H.useFormState(g,m,y)},pt.useFormStatus=function(){return h.H.useHostTransitionStatus()},pt.version="19.1.0",pt}var th;function ax(){if(th)return Dc.exports;th=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),Dc.exports=tx(),Dc.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var ah;function nx(){if(ah)return Ns;ah=1;var l=ex(),r=Fc(),s=ax();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(d(e)!==e)throw Error(c(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,n=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(n=o.return,n!==null){a=n;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return x(o),e;if(u===n)return x(o),t;u=u.sibling}throw Error(c(188))}if(a.return!==n.return)a=o,n=u;else{for(var p=!1,b=o.child;b;){if(b===a){p=!0,a=o,n=u;break}if(b===n){p=!0,n=o,a=u;break}b=b.sibling}if(!p){for(b=u.child;b;){if(b===a){p=!0,a=u,n=o;break}if(b===n){p=!0,n=u,a=o;break}b=b.sibling}if(!p)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),U=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case T:return"Profiler";case C:return"StrictMode";case Y:return"Suspense";case ce:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case U:return(e.displayName||"Context")+".Provider";case k:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var V=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D={pending:!1,data:null,method:null,action:null},ue=[],E=-1;function Q(e){return{current:e}}function le(e){0>E||(e.current=ue[E],ue[E]=null,E--)}function P(e,t){E++,ue[E]=e.current,e.current=t}var re=Q(null),Se=Q(null),ee=Q(null),se=Q(null);function ie(e,t){switch(P(ee,t),P(Se,e),P(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sm(t),e=jm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}le(re),P(re,e)}function pe(){le(re),le(Se),le(ee)}function xe(e){e.memoizedState!==null&&P(se,e);var t=re.current,a=jm(t,e.type);t!==a&&(P(Se,e),P(re,a))}function Me(e){Se.current===e&&(le(re),le(Se)),se.current===e&&(le(se),ys._currentValue=D)}var Ve=Object.prototype.hasOwnProperty,Nt=l.unstable_scheduleCallback,Ct=l.unstable_cancelCallback,fa=l.unstable_shouldYield,Ie=l.unstable_requestPaint,Qe=l.unstable_now,ln=l.unstable_getCurrentPriorityLevel,Oa=l.unstable_ImmediatePriority,sn=l.unstable_UserBlockingPriority,Yt=l.unstable_NormalPriority,Hs=l.unstable_LowPriority,kl=l.unstable_IdlePriority,Bs=l.log,qs=l.unstable_setDisableYieldValue,Ma=null,mt=null;function Qt(e){if(typeof Bs=="function"&&qs(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Ma,e)}catch{}}var ht=Math.clz32?Math.clz32:Ks,Vs=Math.log,Gs=Math.LN2;function Ks(e){return e>>>=0,e===0?32:31-(Vs(e)/Gs|0)|0}var rn=256,on=4194304;function aa(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 cn(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var o=0,u=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~u,n!==0?o=aa(n):(p&=b,p!==0?o=aa(p):a||(a=b&~e,a!==0&&(o=aa(a))))):(b=n&~u,b!==0?o=aa(b):p!==0?o=aa(p):a||(a=n&~e,a!==0&&(o=aa(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function de(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function oe(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 ye(){var e=rn;return rn<<=1,(rn&4194048)===0&&(rn=256),e}function Xt(){var e=on;return on<<=1,(on&62914560)===0&&(on=4194304),e}function Pt(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Zt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function un(e,t,a,n,o,u){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,N=e.expirationTimes,_=e.hiddenUpdates;for(a=p&~a;0<a;){var Z=31-ht(a),F=1<<Z;b[Z]=0,N[Z]=-1;var B=_[Z];if(B!==null)for(_[Z]=null,Z=0;Z<B.length;Z++){var G=B[Z];G!==null&&(G.lane&=-536870913)}a&=~F}n!==0&&$s(e,n,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(p&~t))}function $s(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-ht(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function Et(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-ht(a),o=1<<n;o&t|e[n]&t&&(e[n]|=t),a&=~o}}function na(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 On(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Tl(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Gm(e.type))}function Ys(e,t){var a=W.p;try{return W.p=e,t()}finally{W.p=a}}var Jt=Math.random().toString(36).slice(2),tt="__reactFiber$"+Jt,yt="__reactProps$"+Jt,Mn="__reactContainer$"+Jt,vi="__reactEvents$"+Jt,qg="__reactListeners$"+Jt,Vg="__reactHandles$"+Jt,cu="__reactResources$"+Jt,Al="__reactMarker$"+Jt;function wi(e){delete e[tt],delete e[yt],delete e[vi],delete e[qg],delete e[Vg]}function zn(e){var t=e[tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Mn]||a[tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=km(e);e!==null;){if(a=e[tt])return a;e=km(e)}return t}e=a,a=e.parentNode}return null}function Dn(e){if(e=e[tt]||e[Mn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Rl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Un(e){var t=e[cu];return t||(t=e[cu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function rt(e){e[Al]=!0}var uu=new Set,du={};function dn(e,t){Ln(e,t),Ln(e+"Capture",t)}function Ln(e,t){for(du[e]=t,e=0;e<t.length;e++)uu.add(t[e])}var Gg=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]*$"),fu={},mu={};function Kg(e){return Ve.call(mu,e)?!0:Ve.call(fu,e)?!1:Gg.test(e)?mu[e]=!0:(fu[e]=!0,!1)}function Qs(e,t,a){if(Kg(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){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,""+a)}}function Xs(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ma(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}var Si,hu;function _n(e){if(Si===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Si=t&&t[1]||"",hu=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Si+e+hu}var ji=!1;function Ni(e,t){if(!e||ji)return"";ji=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(G){var B=G}Reflect.construct(e,[],F)}else{try{F.call()}catch(G){B=G}e.call(F.prototype)}}else{try{throw Error()}catch(G){B=G}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(G){if(G&&B&&typeof G.stack=="string")return[G.stack,B.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),p=u[0],b=u[1];if(p&&b){var N=p.split(`
|
|
44
|
-
`),_=b.split(`
|
|
45
|
-
`);for(o=n=0;n<N.length&&!N[n].includes("DetermineComponentFrameRoot");)n++;for(;o<_.length&&!_[o].includes("DetermineComponentFrameRoot");)o++;if(n===N.length||o===_.length)for(n=N.length-1,o=_.length-1;1<=n&&0<=o&&N[n]!==_[o];)o--;for(;1<=n&&0<=o;n--,o--)if(N[n]!==_[o]){if(n!==1||o!==1)do if(n--,o--,0>o||N[n]!==_[o]){var Z=`
|
|
46
|
-
`+N[n].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),Z}while(1<=n&&0<=o);break}}}finally{ji=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?_n(a):""}function $g(e){switch(e.tag){case 26:case 27:case 5:return _n(e.type);case 16:return _n("Lazy");case 13:return _n("Suspense");case 19:return _n("SuspenseList");case 0:case 15:return Ni(e.type,!1);case 11:return Ni(e.type.render,!1);case 1:return Ni(e.type,!0);case 31:return _n("Activity");default:return""}}function gu(e){try{var t="";do t+=$g(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}function Dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yg(e){var t=pu(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){n=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ps(e){e._valueTracker||(e._valueTracker=Yg(e))}function xu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=pu(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Zs(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 Ut(e){return e.replace(Qg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ci(e,t,a,n,o,u,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Dt(t)):e.value!==""+Dt(t)&&(e.value=""+Dt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?Ei(e,p,Dt(t)):a!=null?Ei(e,p,Dt(a)):n!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Dt(b):e.removeAttribute("name")}function yu(e,t,a,n,o,u,p,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null))return;a=a!=null?""+Dt(a):"",t=t!=null?""+Dt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??o,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=b?e.checked:!!n,e.defaultChecked=!!n,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p)}function Ei(e,t,a){t==="number"&&Zs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hn(e,t,a,n){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Dt(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function bu(e,t,a){if(t!=null&&(t=""+Dt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Dt(a):""}function vu(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(V(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Dt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function Bn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Xg=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 wu(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Xg.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Su(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var o in t)n=t[o],t.hasOwnProperty(o)&&a[o]!==n&&wu(e,o,n)}else for(var u in t)t.hasOwnProperty(u)&&wu(e,u,t[u])}function ki(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 Pg=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"]]),Zg=/^[\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 Js(e){return Zg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Ti=null;function Ai(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qn=null,Vn=null;function ju(e){var t=Dn(e);if(t&&(e=t.stateNode)){var a=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ci(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ut(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var o=n[yt]||null;if(!o)throw Error(c(90));Ci(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&xu(n)}break e;case"textarea":bu(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Hn(e,!!a.multiple,t,!1)}}}var Ri=!1;function Nu(e,t,a){if(Ri)return e(t,a);Ri=!0;try{var n=e(t);return n}finally{if(Ri=!1,(qn!==null||Vn!==null)&&(Ur(),qn&&(t=qn,e=Vn,Vn=qn=null,ju(t),e)))for(t=0;t<e.length;t++)ju(e[t])}}function Ol(e,t){var a=e.stateNode;if(a===null)return null;var n=a[yt]||null;if(n===null)return null;a=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(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oi=!1;if(ha)try{var Ml={};Object.defineProperty(Ml,"passive",{get:function(){Oi=!0}}),window.addEventListener("test",Ml,Ml),window.removeEventListener("test",Ml,Ml)}catch{Oi=!1}var za=null,Mi=null,Fs=null;function Cu(){if(Fs)return Fs;var e,t=Mi,a=t.length,n,o="value"in za?za.value:za.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var p=a-e;for(n=1;n<=p&&t[a-n]===o[u-n];n++);return Fs=o.slice(e,1<n?1-n:void 0)}function Is(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 Ws(){return!0}function Eu(){return!1}function vt(e){function t(a,n,o,u,p){this._reactName=a,this._targetInst=o,this.type=n,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ws:Eu,this.isPropagationStopped=Eu,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ws)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},er=vt(fn),zl=y({},fn,{view:0,detail:0}),Jg=vt(zl),zi,Di,Dl,tr=y({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Li,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!==Dl&&(Dl&&e.type==="mousemove"?(zi=e.screenX-Dl.screenX,Di=e.screenY-Dl.screenY):Di=zi=0,Dl=e),zi)},movementY:function(e){return"movementY"in e?e.movementY:Di}}),ku=vt(tr),Fg=y({},tr,{dataTransfer:0}),Ig=vt(Fg),Wg=y({},zl,{relatedTarget:0}),Ui=vt(Wg),ep=y({},fn,{animationName:0,elapsedTime:0,pseudoElement:0}),tp=vt(ep),ap=y({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),np=vt(ap),lp=y({},fn,{data:0}),Tu=vt(lp),sp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rp={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"},ip={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function op(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ip[e])?!!t[e]:!1}function Li(){return op}var cp=y({},zl,{key:function(e){if(e.key){var t=sp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Li,charCode:function(e){return e.type==="keypress"?Is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),up=vt(cp),dp=y({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Au=vt(dp),fp=y({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Li}),mp=vt(fp),hp=y({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),gp=vt(hp),pp=y({},tr,{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}),xp=vt(pp),yp=y({},fn,{newState:0,oldState:0}),bp=vt(yp),vp=[9,13,27,32],_i=ha&&"CompositionEvent"in window,Ul=null;ha&&"documentMode"in document&&(Ul=document.documentMode);var wp=ha&&"TextEvent"in window&&!Ul,Ru=ha&&(!_i||Ul&&8<Ul&&11>=Ul),Ou=" ",Mu=!1;function zu(e,t){switch(e){case"keyup":return vp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Du(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function Sp(e,t){switch(e){case"compositionend":return Du(t);case"keypress":return t.which!==32?null:(Mu=!0,Ou);case"textInput":return e=t.data,e===Ou&&Mu?null:e;default:return null}}function jp(e,t){if(Gn)return e==="compositionend"||!_i&&zu(e,t)?(e=Cu(),Fs=Mi=za=null,Gn=!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 Ru&&t.locale!=="ko"?null:t.data;default:return null}}var Np={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 Uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Np[e.type]:t==="textarea"}function Lu(e,t,a,n){qn?Vn?Vn.push(n):Vn=[n]:qn=n,t=Vr(t,"onChange"),0<t.length&&(a=new er("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Ll=null,_l=null;function Cp(e){xm(e,0)}function ar(e){var t=Rl(e);if(xu(t))return e}function _u(e,t){if(e==="change")return t}var Hu=!1;if(ha){var Hi;if(ha){var Bi="oninput"in document;if(!Bi){var Bu=document.createElement("div");Bu.setAttribute("oninput","return;"),Bi=typeof Bu.oninput=="function"}Hi=Bi}else Hi=!1;Hu=Hi&&(!document.documentMode||9<document.documentMode)}function qu(){Ll&&(Ll.detachEvent("onpropertychange",Vu),_l=Ll=null)}function Vu(e){if(e.propertyName==="value"&&ar(_l)){var t=[];Lu(t,_l,e,Ai(e)),Nu(Cp,t)}}function Ep(e,t,a){e==="focusin"?(qu(),Ll=t,_l=a,Ll.attachEvent("onpropertychange",Vu)):e==="focusout"&&qu()}function kp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ar(_l)}function Tp(e,t){if(e==="click")return ar(t)}function Ap(e,t){if(e==="input"||e==="change")return ar(t)}function Rp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Rp;function Hl(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var o=a[n];if(!Ve.call(t,o)||!kt(e[o],t[o]))return!1}return!0}function Gu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ku(e,t){var a=Gu(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Gu(a)}}function $u(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$u(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Zs(e.document)}return t}function qi(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 Op=ha&&"documentMode"in document&&11>=document.documentMode,Kn=null,Vi=null,Bl=null,Gi=!1;function Qu(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Gi||Kn==null||Kn!==Zs(n)||(n=Kn,"selectionStart"in n&&qi(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}),Bl&&Hl(Bl,n)||(Bl=n,n=Vr(Vi,"onSelect"),0<n.length&&(t=new er("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Kn)))}function mn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var $n={animationend:mn("Animation","AnimationEnd"),animationiteration:mn("Animation","AnimationIteration"),animationstart:mn("Animation","AnimationStart"),transitionrun:mn("Transition","TransitionRun"),transitionstart:mn("Transition","TransitionStart"),transitioncancel:mn("Transition","TransitionCancel"),transitionend:mn("Transition","TransitionEnd")},Ki={},Xu={};ha&&(Xu=document.createElement("div").style,"AnimationEvent"in window||(delete $n.animationend.animation,delete $n.animationiteration.animation,delete $n.animationstart.animation),"TransitionEvent"in window||delete $n.transitionend.transition);function hn(e){if(Ki[e])return Ki[e];if(!$n[e])return e;var t=$n[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Xu)return Ki[e]=t[a];return e}var Pu=hn("animationend"),Zu=hn("animationiteration"),Ju=hn("animationstart"),Mp=hn("transitionrun"),zp=hn("transitionstart"),Dp=hn("transitioncancel"),Fu=hn("transitionend"),Iu=new Map,$i="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(" ");$i.push("scrollEnd");function Ft(e,t){Iu.set(e,t),dn(t,[e])}var Wu=new WeakMap;function Lt(e,t){if(typeof e=="object"&&e!==null){var a=Wu.get(e);return a!==void 0?a:(t={value:e,source:t,stack:gu(t)},Wu.set(e,t),t)}return{value:e,source:t,stack:gu(t)}}var _t=[],Yn=0,Yi=0;function nr(){for(var e=Yn,t=Yi=Yn=0;t<e;){var a=_t[t];_t[t++]=null;var n=_t[t];_t[t++]=null;var o=_t[t];_t[t++]=null;var u=_t[t];if(_t[t++]=null,n!==null&&o!==null){var p=n.pending;p===null?o.next=o:(o.next=p.next,p.next=o),n.pending=o}u!==0&&ed(a,o,u)}}function lr(e,t,a,n){_t[Yn++]=e,_t[Yn++]=t,_t[Yn++]=a,_t[Yn++]=n,Yi|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Qi(e,t,a,n){return lr(e,t,a,n),sr(e)}function Qn(e,t){return lr(e,null,null,t),sr(e)}function ed(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,n=u.alternate,n!==null&&(n.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-ht(a),e=u.hiddenUpdates,n=e[o],n===null?e[o]=[t]:n.push(t),t.lane=a|536870912),u):null}function sr(e){if(50<us)throw us=0,Wo=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Xn={};function Up(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tt(e,t,a,n){return new Up(e,t,a,n)}function Xi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ga(e,t){var a=e.alternate;return a===null?(a=Tt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function td(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function rr(e,t,a,n,o,u){var p=0;if(n=e,typeof e=="function")Xi(e)&&(p=1);else if(typeof e=="string")p=_0(e,a,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case I:return e=Tt(31,a,t,o),e.elementType=I,e.lanes=u,e;case j:return gn(a.children,o,u,t);case C:p=8,o|=24;break;case T:return e=Tt(12,a,t,o|2),e.elementType=T,e.lanes=u,e;case Y:return e=Tt(13,a,t,o),e.elementType=Y,e.lanes=u,e;case ce:return e=Tt(19,a,t,o),e.elementType=ce,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:case U:p=10;break e;case k:p=9;break e;case K:p=11;break e;case X:p=14;break e;case $:p=16,n=null;break e}p=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Tt(p,a,t,o),t.elementType=e,t.type=n,t.lanes=u,t}function gn(e,t,a,n){return e=Tt(7,e,n,t),e.lanes=a,e}function Pi(e,t,a){return e=Tt(6,e,null,t),e.lanes=a,e}function Zi(e,t,a){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pn=[],Zn=0,ir=null,or=0,Ht=[],Bt=0,pn=null,pa=1,xa="";function xn(e,t){Pn[Zn++]=or,Pn[Zn++]=ir,ir=e,or=t}function ad(e,t,a){Ht[Bt++]=pa,Ht[Bt++]=xa,Ht[Bt++]=pn,pn=e;var n=pa;e=xa;var o=32-ht(n)-1;n&=~(1<<o),a+=1;var u=32-ht(t)+o;if(30<u){var p=o-o%5;u=(n&(1<<p)-1).toString(32),n>>=p,o-=p,pa=1<<32-ht(t)+o|a<<o|n,xa=u+e}else pa=1<<u|a<<o|n,xa=e}function Ji(e){e.return!==null&&(xn(e,1),ad(e,1,0))}function Fi(e){for(;e===ir;)ir=Pn[--Zn],Pn[Zn]=null,or=Pn[--Zn],Pn[Zn]=null;for(;e===pn;)pn=Ht[--Bt],Ht[Bt]=null,xa=Ht[--Bt],Ht[Bt]=null,pa=Ht[--Bt],Ht[Bt]=null}var bt=null,Pe=null,Ue=!1,yn=null,la=!1,Ii=Error(c(519));function bn(e){var t=Error(c(418,""));throw Gl(Lt(t,e)),Ii}function nd(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[tt]=e,t[yt]=n,a){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(a=0;a<fs.length;a++)Re(fs[a],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),yu(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Ps(t);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),vu(t,n.value,n.defaultValue,n.children),Ps(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||wm(t.textContent,a)?(n.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),n.onScroll!=null&&Re("scroll",t),n.onScrollEnd!=null&&Re("scrollend",t),n.onClick!=null&&(t.onclick=Gr),t=!0):t=!1,t||bn(e)}function ld(e){for(bt=e.return;bt;)switch(bt.tag){case 5:case 13:la=!1;return;case 27:case 3:la=!0;return;default:bt=bt.return}}function ql(e){if(e!==bt)return!1;if(!Ue)return ld(e),Ue=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||gc(e.type,e.memoizedProps)),a=!a),a&&Pe&&bn(e),ld(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Pe=Wt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Pe=null}}else t===27?(t=Pe,Za(e.type)?(e=bc,bc=null,Pe=e):Pe=t):Pe=bt?Wt(e.stateNode.nextSibling):null;return!0}function Vl(){Pe=bt=null,Ue=!1}function sd(){var e=yn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),yn=null),e}function Gl(e){yn===null?yn=[e]:yn.push(e)}var Wi=Q(null),vn=null,ya=null;function Da(e,t,a){P(Wi,t._currentValue),t._currentValue=a}function ba(e){e._currentValue=Wi.current,le(Wi)}function eo(e,t,a){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===a)break;e=e.return}}function to(e,t,a,n){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var p=o.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=o;for(var N=0;N<t.length;N++)if(b.context===t[N]){u.lanes|=a,b=u.alternate,b!==null&&(b.lanes|=a),eo(u.return,a,e),n||(p=null);break e}u=b.next}}else if(o.tag===18){if(p=o.return,p===null)throw Error(c(341));p.lanes|=a,u=p.alternate,u!==null&&(u.lanes|=a),eo(p,a,e),p=null}else p=o.child;if(p!==null)p.return=o;else for(p=o;p!==null;){if(p===e){p=null;break}if(o=p.sibling,o!==null){o.return=p.return,p=o;break}p=p.return}o=p}}function Kl(e,t,a,n){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var p=o.alternate;if(p===null)throw Error(c(387));if(p=p.memoizedProps,p!==null){var b=o.type;kt(o.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(o===se.current){if(p=o.alternate,p===null)throw Error(c(387));p.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ys):e=[ys])}o=o.return}e!==null&&to(t,e,a,n),t.flags|=262144}function cr(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wn(e){vn=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return rd(vn,e)}function ur(e,t){return vn===null&&wn(e),rd(e,t)}function rd(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ya===null){if(e===null)throw Error(c(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return a}var Lp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},_p=l.unstable_scheduleCallback,Hp=l.unstable_NormalPriority,at={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ao(){return{controller:new Lp,data:new Map,refCount:0}}function $l(e){e.refCount--,e.refCount===0&&_p(Hp,function(){e.controller.abort()})}var Yl=null,no=0,Jn=0,Fn=null;function Bp(e,t){if(Yl===null){var a=Yl=[];no=0,Jn=rc(),Fn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return no++,t.then(id,id),t}function id(){if(--no===0&&Yl!==null){Fn!==null&&(Fn.status="fulfilled");var e=Yl;Yl=null,Jn=0,Fn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qp(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(n.status="rejected",n.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),n}var od=O.S;O.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bp(e,t),od!==null&&od(e,t)};var Sn=Q(null);function lo(){var e=Sn.current;return e!==null?e:Ke.pooledCache}function dr(e,t){t===null?P(Sn,Sn.current):P(Sn,t.pool)}function cd(){var e=lo();return e===null?null:{parent:at._currentValue,pool:e}}var Ql=Error(c(460)),ud=Error(c(474)),fr=Error(c(542)),so={then:function(){}};function dd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mr(){}function fd(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(mr,mr),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e;default:if(typeof t.status=="string")t.then(mr,mr);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=n}},function(n){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e}throw Xl=t,Ql}}var Xl=null;function md(){if(Xl===null)throw Error(c(459));var e=Xl;return Xl=null,e}function hd(e){if(e===Ql||e===fr)throw Error(c(483))}var Ua=!1;function ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function io(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 La(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _a(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Le&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,t=sr(e),ed(e,null,a),t}return lr(e,n,t,a),sr(e)}function Pl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Et(e,a)}}function oo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=p:u=u.next=p,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var co=!1;function Zl(){if(co){var e=Fn;if(e!==null)throw e}}function Jl(e,t,a,n){co=!1;var o=e.updateQueue;Ua=!1;var u=o.firstBaseUpdate,p=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var N=b,_=N.next;N.next=null,p===null?u=_:p.next=_,p=N;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,b=Z.lastBaseUpdate,b!==p&&(b===null?Z.firstBaseUpdate=_:b.next=_,Z.lastBaseUpdate=N))}if(u!==null){var F=o.baseState;p=0,Z=_=N=null,b=u;do{var B=b.lane&-536870913,G=B!==b.lane;if(G?(ze&B)===B:(n&B)===B){B!==0&&B===Jn&&(co=!0),Z!==null&&(Z=Z.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var we=e,be=b;B=t;var qe=a;switch(be.tag){case 1:if(we=be.payload,typeof we=="function"){F=we.call(qe,F,B);break e}F=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=be.payload,B=typeof we=="function"?we.call(qe,F,B):we,B==null)break e;F=y({},F,B);break e;case 2:Ua=!0}}B=b.callback,B!==null&&(e.flags|=64,G&&(e.flags|=8192),G=o.callbacks,G===null?o.callbacks=[B]:G.push(B))}else G={lane:B,tag:b.tag,payload:b.payload,callback:b.callback,next:null},Z===null?(_=Z=G,N=F):Z=Z.next=G,p|=B;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;G=b,b=G.next,G.next=null,o.lastBaseUpdate=G,o.shared.pending=null}}while(!0);Z===null&&(N=F),o.baseState=N,o.firstBaseUpdate=_,o.lastBaseUpdate=Z,u===null&&(o.shared.lanes=0),Ya|=p,e.lanes=p,e.memoizedState=F}}function gd(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function pd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)gd(a[e],t)}var In=Q(null),hr=Q(0);function xd(e,t){e=Ea,P(hr,e),P(In,t),Ea=e|t.baseLanes}function uo(){P(hr,Ea),P(In,In.current)}function fo(){Ea=hr.current,le(In),le(hr)}var Ha=0,Ce=null,He=null,We=null,gr=!1,Wn=!1,jn=!1,pr=0,Fl=0,el=null,Vp=0;function Je(){throw Error(c(321))}function mo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!kt(e[a],t[a]))return!1;return!0}function ho(e,t,a,n,o,u){return Ha=u,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?ef:tf,jn=!1,u=a(n,o),jn=!1,Wn&&(u=bd(t,a,n,o)),yd(e),u}function yd(e){O.H=Sr;var t=He!==null&&He.next!==null;if(Ha=0,We=He=Ce=null,gr=!1,Fl=0,el=null,t)throw Error(c(300));e===null||it||(e=e.dependencies,e!==null&&cr(e)&&(it=!0))}function bd(e,t,a,n){Ce=e;var o=0;do{if(Wn&&(el=null),Fl=0,Wn=!1,25<=o)throw Error(c(301));if(o+=1,We=He=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}O.H=Pp,u=t(a,n)}while(Wn);return u}function Gp(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?Il(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(Ce.flags|=1024),t}function go(){var e=pr!==0;return pr=0,e}function po(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function xo(e){if(gr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}gr=!1}Ha=0,We=He=Ce=null,Wn=!1,Fl=pr=0,el=null}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Ce.memoizedState=We=e:We=We.next=e,We}function et(){if(He===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=We===null?Ce.memoizedState:We.next;if(t!==null)We=t,He=e;else{if(e===null)throw Ce.alternate===null?Error(c(467)):Error(c(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},We===null?Ce.memoizedState=We=e:We=We.next=e}return We}function yo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Il(e){var t=Fl;return Fl+=1,el===null&&(el=[]),e=fd(el,e,t),t=Ce,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?ef:tf),e}function xr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Il(e);if(e.$$typeof===U)return gt(e)}throw Error(c(438,String(e)))}function bo(e){var t=null,a=Ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ce.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=yo(),Ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=H;return t.index++,a}function va(e,t){return typeof t=="function"?t(e):t}function yr(e){var t=et();return vo(t,He,e)}function vo(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var o=e.baseQueue,u=n.pending;if(u!==null){if(o!==null){var p=o.next;o.next=u.next,u.next=p}t.baseQueue=o=u,n.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var b=p=null,N=null,_=t,Z=!1;do{var F=_.lane&-536870913;if(F!==_.lane?(ze&F)===F:(Ha&F)===F){var B=_.revertLane;if(B===0)N!==null&&(N=N.next={lane:0,revertLane:0,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),F===Jn&&(Z=!0);else if((Ha&B)===B){_=_.next,B===Jn&&(Z=!0);continue}else F={lane:0,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},N===null?(b=N=F,p=u):N=N.next=F,Ce.lanes|=B,Ya|=B;F=_.action,jn&&a(u,F),u=_.hasEagerState?_.eagerState:a(u,F)}else B={lane:F,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},N===null?(b=N=B,p=u):N=N.next=B,Ce.lanes|=F,Ya|=F;_=_.next}while(_!==null&&_!==t);if(N===null?p=u:N.next=b,!kt(u,e.memoizedState)&&(it=!0,Z&&(a=Fn,a!==null)))throw a;e.memoizedState=u,e.baseState=p,e.baseQueue=N,n.lastRenderedState=u}return o===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function wo(e){var t=et(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var p=o=o.next;do u=e(u,p.action),p=p.next;while(p!==o);kt(u,t.memoizedState)||(it=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function vd(e,t,a){var n=Ce,o=et(),u=Ue;if(u){if(a===void 0)throw Error(c(407));a=a()}else a=t();var p=!kt((He||o).memoizedState,a);p&&(o.memoizedState=a,it=!0),o=o.queue;var b=jd.bind(null,n,o,e);if(Wl(2048,8,b,[e]),o.getSnapshot!==t||p||We!==null&&We.memoizedState.tag&1){if(n.flags|=2048,tl(9,br(),Sd.bind(null,n,o,a,t),null),Ke===null)throw Error(c(349));u||(Ha&124)!==0||wd(n,t,a)}return a}function wd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ce.updateQueue,t===null?(t=yo(),Ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Sd(e,t,a,n){t.value=a,t.getSnapshot=n,Nd(t)&&Cd(e)}function jd(e,t,a){return a(function(){Nd(t)&&Cd(e)})}function Nd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!kt(e,a)}catch{return!0}}function Cd(e){var t=Qn(e,2);t!==null&&zt(t,e,2)}function So(e){var t=wt();if(typeof e=="function"){var a=e;if(e=a(),jn){Qt(!0);try{a()}finally{Qt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function Ed(e,t,a,n){return e.baseState=a,vo(e,He,typeof n=="function"?n:va)}function Kp(e,t,a,n,o){if(wr(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){u.listeners.push(p)}};O.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,kd(t,u)):(u.next=a.next,t.pending=a.next=u)}}function kd(e,t){var a=t.action,n=t.payload,o=e.state;if(t.isTransition){var u=O.T,p={};O.T=p;try{var b=a(o,n),N=O.S;N!==null&&N(p,b),Td(e,t,b)}catch(_){jo(e,t,_)}finally{O.T=u}}else try{u=a(o,n),Td(e,t,u)}catch(_){jo(e,t,_)}}function Td(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Ad(e,t,n)},function(n){return jo(e,t,n)}):Ad(e,t,a)}function Ad(e,t,a){t.status="fulfilled",t.value=a,Rd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,kd(e,a)))}function jo(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Rd(t),t=t.next;while(t!==n)}e.action=null}function Rd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Od(e,t){return t}function Md(e,t){if(Ue){var a=Ke.formState;if(a!==null){e:{var n=Ce;if(Ue){if(Pe){t:{for(var o=Pe,u=la;o.nodeType!==8;){if(!u){o=null;break t}if(o=Wt(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Pe=Wt(o.nextSibling),n=o.data==="F!";break e}}bn(n)}n=!1}n&&(t=a[0])}}return a=wt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Od,lastRenderedState:t},a.queue=n,a=Fd.bind(null,Ce,n),n.dispatch=a,n=So(!1),u=To.bind(null,Ce,!1,n.queue),n=wt(),o={state:t,dispatch:null,action:e,pending:null},n.queue=o,a=Kp.bind(null,Ce,o,u,a),o.dispatch=a,n.memoizedState=e,[t,a,!1]}function zd(e){var t=et();return Dd(t,He,e)}function Dd(e,t,a){if(t=vo(e,t,Od)[0],e=yr(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Il(t)}catch(p){throw p===Ql?fr:p}else n=t;t=et();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Ce.flags|=2048,tl(9,br(),$p.bind(null,o,a),null)),[n,u,e]}function $p(e,t){e.action=t}function Ud(e){var t=et(),a=He;if(a!==null)return Dd(t,a,e);et(),t=t.memoizedState,a=et();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function tl(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=yo(),Ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function br(){return{destroy:void 0,resource:void 0}}function Ld(){return et().memoizedState}function vr(e,t,a,n){var o=wt();n=n===void 0?null:n,Ce.flags|=e,o.memoizedState=tl(1|t,br(),a,n)}function Wl(e,t,a,n){var o=et();n=n===void 0?null:n;var u=o.memoizedState.inst;He!==null&&n!==null&&mo(n,He.memoizedState.deps)?o.memoizedState=tl(t,u,a,n):(Ce.flags|=e,o.memoizedState=tl(1|t,u,a,n))}function _d(e,t){vr(8390656,8,e,t)}function Hd(e,t){Wl(2048,8,e,t)}function Bd(e,t){return Wl(4,2,e,t)}function qd(e,t){return Wl(4,4,e,t)}function Vd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gd(e,t,a){a=a!=null?a.concat([e]):null,Wl(4,4,Vd.bind(null,t,e),a)}function No(){}function Kd(e,t){var a=et();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&mo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function $d(e,t){var a=et();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&mo(t,n[1]))return n[0];if(n=e(),jn){Qt(!0);try{e()}finally{Qt(!1)}}return a.memoizedState=[n,t],n}function Co(e,t,a){return a===void 0||(Ha&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Pf(),Ce.lanes|=e,Ya|=e,a)}function Yd(e,t,a,n){return kt(a,t)?a:In.current!==null?(e=Co(e,a,n),kt(e,t)||(it=!0),e):(Ha&42)===0?(it=!0,e.memoizedState=a):(e=Pf(),Ce.lanes|=e,Ya|=e,t)}function Qd(e,t,a,n,o){var u=W.p;W.p=u!==0&&8>u?u:8;var p=O.T,b={};O.T=b,To(e,!1,t,a);try{var N=o(),_=O.S;if(_!==null&&_(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Z=qp(N,n);es(e,t,Z,Mt(e))}else es(e,t,n,Mt(e))}catch(F){es(e,t,{then:function(){},status:"rejected",reason:F},Mt())}finally{W.p=u,O.T=p}}function Yp(){}function Eo(e,t,a,n){if(e.tag!==5)throw Error(c(476));var o=Xd(e).queue;Qd(e,o,t,D,a===null?Yp:function(){return Pd(e),a(n)})}function Xd(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:va,lastRenderedState:D},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pd(e){var t=Xd(e).next.queue;es(e,t,{},Mt())}function ko(){return gt(ys)}function Zd(){return et().memoizedState}function Jd(){return et().memoizedState}function Qp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Mt();e=La(a);var n=_a(t,e,a);n!==null&&(zt(n,t,a),Pl(n,t,a)),t={cache:ao()},e.payload=t;return}t=t.return}}function Xp(e,t,a){var n=Mt();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},wr(e)?Id(t,a):(a=Qi(e,t,a,n),a!==null&&(zt(a,e,n),Wd(a,t,n)))}function Fd(e,t,a){var n=Mt();es(e,t,a,n)}function es(e,t,a,n){var o={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(wr(e))Id(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,b=u(p,a);if(o.hasEagerState=!0,o.eagerState=b,kt(b,p))return lr(e,t,o,0),Ke===null&&nr(),!1}catch{}finally{}if(a=Qi(e,t,o,n),a!==null)return zt(a,e,n),Wd(a,t,n),!0}return!1}function To(e,t,a,n){if(n={lane:2,revertLane:rc(),action:n,hasEagerState:!1,eagerState:null,next:null},wr(e)){if(t)throw Error(c(479))}else t=Qi(e,a,n,2),t!==null&&zt(t,e,2)}function wr(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Id(e,t){Wn=gr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Et(e,a)}}var Sr={readContext:gt,use:xr,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je},ef={readContext:gt,use:xr,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:_d,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,vr(4194308,4,Vd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return vr(4194308,4,e,t)},useInsertionEffect:function(e,t){vr(4,2,e,t)},useMemo:function(e,t){var a=wt();t=t===void 0?null:t;var n=e();if(jn){Qt(!0);try{e()}finally{Qt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=wt();if(a!==void 0){var o=a(t);if(jn){Qt(!0);try{a(t)}finally{Qt(!1)}}}else o=t;return n.memoizedState=n.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},n.queue=e,e=e.dispatch=Xp.bind(null,Ce,e),[n.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:function(e){e=So(e);var t=e.queue,a=Fd.bind(null,Ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:No,useDeferredValue:function(e,t){var a=wt();return Co(a,e,t)},useTransition:function(){var e=So(!1);return e=Qd.bind(null,Ce,e.queue,!0,!1),wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ce,o=wt();if(Ue){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Ke===null)throw Error(c(349));(ze&124)!==0||wd(n,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,_d(jd.bind(null,n,u,e),[e]),n.flags|=2048,tl(9,br(),Sd.bind(null,n,u,a,t),null),a},useId:function(){var e=wt(),t=Ke.identifierPrefix;if(Ue){var a=xa,n=pa;a=(n&~(1<<32-ht(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=pr++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=Vp++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:ko,useFormState:Md,useActionState:Md,useOptimistic:function(e){var t=wt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=To.bind(null,Ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:bo,useCacheRefresh:function(){return wt().memoizedState=Qp.bind(null,Ce)}},tf={readContext:gt,use:xr,useCallback:Kd,useContext:gt,useEffect:Hd,useImperativeHandle:Gd,useInsertionEffect:Bd,useLayoutEffect:qd,useMemo:$d,useReducer:yr,useRef:Ld,useState:function(){return yr(va)},useDebugValue:No,useDeferredValue:function(e,t){var a=et();return Yd(a,He.memoizedState,e,t)},useTransition:function(){var e=yr(va)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Il(e),t]},useSyncExternalStore:vd,useId:Zd,useHostTransitionStatus:ko,useFormState:zd,useActionState:zd,useOptimistic:function(e,t){var a=et();return Ed(a,He,e,t)},useMemoCache:bo,useCacheRefresh:Jd},Pp={readContext:gt,use:xr,useCallback:Kd,useContext:gt,useEffect:Hd,useImperativeHandle:Gd,useInsertionEffect:Bd,useLayoutEffect:qd,useMemo:$d,useReducer:wo,useRef:Ld,useState:function(){return wo(va)},useDebugValue:No,useDeferredValue:function(e,t){var a=et();return He===null?Co(a,e,t):Yd(a,He.memoizedState,e,t)},useTransition:function(){var e=wo(va)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Il(e),t]},useSyncExternalStore:vd,useId:Zd,useHostTransitionStatus:ko,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var a=et();return He!==null?Ed(a,He,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:bo,useCacheRefresh:Jd},al=null,ts=0;function jr(e){var t=ts;return ts+=1,al===null&&(al=[]),fd(al,e,t)}function as(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nr(e,t){throw t.$$typeof===S?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function af(e){var t=e._init;return t(e._payload)}function nf(e){function t(z,A){if(e){var L=z.deletions;L===null?(z.deletions=[A],z.flags|=16):L.push(A)}}function a(z,A){if(!e)return null;for(;A!==null;)t(z,A),A=A.sibling;return null}function n(z){for(var A=new Map;z!==null;)z.key!==null?A.set(z.key,z):A.set(z.index,z),z=z.sibling;return A}function o(z,A){return z=ga(z,A),z.index=0,z.sibling=null,z}function u(z,A,L){return z.index=L,e?(L=z.alternate,L!==null?(L=L.index,L<A?(z.flags|=67108866,A):L):(z.flags|=67108866,A)):(z.flags|=1048576,A)}function p(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function b(z,A,L,J){return A===null||A.tag!==6?(A=Pi(L,z.mode,J),A.return=z,A):(A=o(A,L),A.return=z,A)}function N(z,A,L,J){var fe=L.type;return fe===j?Z(z,A,L.props.children,J,L.key):A!==null&&(A.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===$&&af(fe)===A.type)?(A=o(A,L.props),as(A,L),A.return=z,A):(A=rr(L.type,L.key,L.props,null,z.mode,J),as(A,L),A.return=z,A)}function _(z,A,L,J){return A===null||A.tag!==4||A.stateNode.containerInfo!==L.containerInfo||A.stateNode.implementation!==L.implementation?(A=Zi(L,z.mode,J),A.return=z,A):(A=o(A,L.children||[]),A.return=z,A)}function Z(z,A,L,J,fe){return A===null||A.tag!==7?(A=gn(L,z.mode,J,fe),A.return=z,A):(A=o(A,L),A.return=z,A)}function F(z,A,L){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Pi(""+A,z.mode,L),A.return=z,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case v:return L=rr(A.type,A.key,A.props,null,z.mode,L),as(L,A),L.return=z,L;case R:return A=Zi(A,z.mode,L),A.return=z,A;case $:var J=A._init;return A=J(A._payload),F(z,A,L)}if(V(A)||te(A))return A=gn(A,z.mode,L,null),A.return=z,A;if(typeof A.then=="function")return F(z,jr(A),L);if(A.$$typeof===U)return F(z,ur(z,A),L);Nr(z,A)}return null}function B(z,A,L,J){var fe=A!==null?A.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return fe!==null?null:b(z,A,""+L,J);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===fe?N(z,A,L,J):null;case R:return L.key===fe?_(z,A,L,J):null;case $:return fe=L._init,L=fe(L._payload),B(z,A,L,J)}if(V(L)||te(L))return fe!==null?null:Z(z,A,L,J,null);if(typeof L.then=="function")return B(z,A,jr(L),J);if(L.$$typeof===U)return B(z,A,ur(z,L),J);Nr(z,L)}return null}function G(z,A,L,J,fe){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return z=z.get(L)||null,b(A,z,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case v:return z=z.get(J.key===null?L:J.key)||null,N(A,z,J,fe);case R:return z=z.get(J.key===null?L:J.key)||null,_(A,z,J,fe);case $:var Te=J._init;return J=Te(J._payload),G(z,A,L,J,fe)}if(V(J)||te(J))return z=z.get(L)||null,Z(A,z,J,fe,null);if(typeof J.then=="function")return G(z,A,L,jr(J),fe);if(J.$$typeof===U)return G(z,A,L,ur(A,J),fe);Nr(A,J)}return null}function we(z,A,L,J){for(var fe=null,Te=null,ge=A,ve=A=0,ct=null;ge!==null&&ve<L.length;ve++){ge.index>ve?(ct=ge,ge=null):ct=ge.sibling;var De=B(z,ge,L[ve],J);if(De===null){ge===null&&(ge=ct);break}e&&ge&&De.alternate===null&&t(z,ge),A=u(De,A,ve),Te===null?fe=De:Te.sibling=De,Te=De,ge=ct}if(ve===L.length)return a(z,ge),Ue&&xn(z,ve),fe;if(ge===null){for(;ve<L.length;ve++)ge=F(z,L[ve],J),ge!==null&&(A=u(ge,A,ve),Te===null?fe=ge:Te.sibling=ge,Te=ge);return Ue&&xn(z,ve),fe}for(ge=n(ge);ve<L.length;ve++)ct=G(ge,z,ve,L[ve],J),ct!==null&&(e&&ct.alternate!==null&&ge.delete(ct.key===null?ve:ct.key),A=u(ct,A,ve),Te===null?fe=ct:Te.sibling=ct,Te=ct);return e&&ge.forEach(function(en){return t(z,en)}),Ue&&xn(z,ve),fe}function be(z,A,L,J){if(L==null)throw Error(c(151));for(var fe=null,Te=null,ge=A,ve=A=0,ct=null,De=L.next();ge!==null&&!De.done;ve++,De=L.next()){ge.index>ve?(ct=ge,ge=null):ct=ge.sibling;var en=B(z,ge,De.value,J);if(en===null){ge===null&&(ge=ct);break}e&&ge&&en.alternate===null&&t(z,ge),A=u(en,A,ve),Te===null?fe=en:Te.sibling=en,Te=en,ge=ct}if(De.done)return a(z,ge),Ue&&xn(z,ve),fe;if(ge===null){for(;!De.done;ve++,De=L.next())De=F(z,De.value,J),De!==null&&(A=u(De,A,ve),Te===null?fe=De:Te.sibling=De,Te=De);return Ue&&xn(z,ve),fe}for(ge=n(ge);!De.done;ve++,De=L.next())De=G(ge,z,ve,De.value,J),De!==null&&(e&&De.alternate!==null&&ge.delete(De.key===null?ve:De.key),A=u(De,A,ve),Te===null?fe=De:Te.sibling=De,Te=De);return e&&ge.forEach(function(Z0){return t(z,Z0)}),Ue&&xn(z,ve),fe}function qe(z,A,L,J){if(typeof L=="object"&&L!==null&&L.type===j&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var fe=L.key;A!==null;){if(A.key===fe){if(fe=L.type,fe===j){if(A.tag===7){a(z,A.sibling),J=o(A,L.props.children),J.return=z,z=J;break e}}else if(A.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===$&&af(fe)===A.type){a(z,A.sibling),J=o(A,L.props),as(J,L),J.return=z,z=J;break e}a(z,A);break}else t(z,A);A=A.sibling}L.type===j?(J=gn(L.props.children,z.mode,J,L.key),J.return=z,z=J):(J=rr(L.type,L.key,L.props,null,z.mode,J),as(J,L),J.return=z,z=J)}return p(z);case R:e:{for(fe=L.key;A!==null;){if(A.key===fe)if(A.tag===4&&A.stateNode.containerInfo===L.containerInfo&&A.stateNode.implementation===L.implementation){a(z,A.sibling),J=o(A,L.children||[]),J.return=z,z=J;break e}else{a(z,A);break}else t(z,A);A=A.sibling}J=Zi(L,z.mode,J),J.return=z,z=J}return p(z);case $:return fe=L._init,L=fe(L._payload),qe(z,A,L,J)}if(V(L))return we(z,A,L,J);if(te(L)){if(fe=te(L),typeof fe!="function")throw Error(c(150));return L=fe.call(L),be(z,A,L,J)}if(typeof L.then=="function")return qe(z,A,jr(L),J);if(L.$$typeof===U)return qe(z,A,ur(z,L),J);Nr(z,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,A!==null&&A.tag===6?(a(z,A.sibling),J=o(A,L),J.return=z,z=J):(a(z,A),J=Pi(L,z.mode,J),J.return=z,z=J),p(z)):a(z,A)}return function(z,A,L,J){try{ts=0;var fe=qe(z,A,L,J);return al=null,fe}catch(ge){if(ge===Ql||ge===fr)throw ge;var Te=Tt(29,ge,null,z.mode);return Te.lanes=J,Te.return=z,Te}finally{}}}var nl=nf(!0),lf=nf(!1),qt=Q(null),sa=null;function Ba(e){var t=e.alternate;P(nt,nt.current&1),P(qt,e),sa===null&&(t===null||In.current!==null||t.memoizedState!==null)&&(sa=e)}function sf(e){if(e.tag===22){if(P(nt,nt.current),P(qt,e),sa===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(sa=e)}}else qa()}function qa(){P(nt,nt.current),P(qt,qt.current)}function wa(e){le(qt),sa===e&&(sa=null),le(nt)}var nt=Q(0);function Cr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||yc(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function Ao(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ro={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Mt(),o=La(n);o.payload=t,a!=null&&(o.callback=a),t=_a(e,o,n),t!==null&&(zt(t,e,n),Pl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Mt(),o=La(n);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=_a(e,o,n),t!==null&&(zt(t,e,n),Pl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Mt(),n=La(a);n.tag=2,t!=null&&(n.callback=t),t=_a(e,n,a),t!==null&&(zt(t,e,a),Pl(t,e,a))}};function rf(e,t,a,n,o,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,p):t.prototype&&t.prototype.isPureReactComponent?!Hl(a,n)||!Hl(o,u):!0}function of(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&Ro.enqueueReplaceState(t,t.state,null)}function Nn(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}var Er=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)};function cf(e){Er(e)}function uf(e){console.error(e)}function df(e){Er(e)}function kr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function ff(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Oo(e,t,a){return a=La(a),a.tag=3,a.payload={element:null},a.callback=function(){kr(e,t)},a}function mf(e){return e=La(e),e.tag=3,e}function hf(e,t,a,n){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=n.value;e.payload=function(){return o(u)},e.callback=function(){ff(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){ff(t,a,n),typeof o!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})})}function Zp(e,t,a,n,o){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Kl(t,a,o,!0),a=qt.current,a!==null){switch(a.tag){case 13:return sa===null?tc():a.alternate===null&&Ze===0&&(Ze=3),a.flags&=-257,a.flags|=65536,a.lanes=o,n===so?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),nc(e,n,o)),!1;case 22:return a.flags|=65536,n===so?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),nc(e,n,o)),!1}throw Error(c(435,a.tag))}return nc(e,n,o),tc(),!1}if(Ue)return t=qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,n!==Ii&&(e=Error(c(422),{cause:n}),Gl(Lt(e,a)))):(n!==Ii&&(t=Error(c(423),{cause:n}),Gl(Lt(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,n=Lt(n,a),o=Oo(e.stateNode,n,o),oo(e,o),Ze!==4&&(Ze=2)),!1;var u=Error(c(520),{cause:n});if(u=Lt(u,a),cs===null?cs=[u]:cs.push(u),Ze!==4&&(Ze=2),t===null)return!0;n=Lt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Oo(a.stateNode,n,e),oo(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Qa===null||!Qa.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=mf(o),hf(o,e,a,n),oo(a,o),!1}a=a.return}while(a!==null);return!1}var gf=Error(c(461)),it=!1;function ut(e,t,a,n){t.child=e===null?lf(t,null,a,n):nl(t,e.child,a,n)}function pf(e,t,a,n,o){a=a.render;var u=t.ref;if("ref"in n){var p={};for(var b in n)b!=="ref"&&(p[b]=n[b])}else p=n;return wn(t),n=ho(e,t,a,p,u,o),b=go(),e!==null&&!it?(po(e,t,o),Sa(e,t,o)):(Ue&&b&&Ji(t),t.flags|=1,ut(e,t,n,o),t.child)}function xf(e,t,a,n,o){if(e===null){var u=a.type;return typeof u=="function"&&!Xi(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,yf(e,t,u,n,o)):(e=rr(a.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Bo(e,o)){var p=u.memoizedProps;if(a=a.compare,a=a!==null?a:Hl,a(p,n)&&e.ref===t.ref)return Sa(e,t,o)}return t.flags|=1,e=ga(u,n),e.ref=t.ref,e.return=t,t.child=e}function yf(e,t,a,n,o){if(e!==null){var u=e.memoizedProps;if(Hl(u,n)&&e.ref===t.ref)if(it=!1,t.pendingProps=n=u,Bo(e,o))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,Sa(e,t,o)}return Mo(e,t,a,n,o)}function bf(e,t,a){var n=t.pendingProps,o=n.children,u=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if((t.flags&128)!==0){if(n=u!==null?u.baseLanes|a:a,e!==null){for(o=t.child=e.child,u=0;o!==null;)u=u|o.lanes|o.childLanes,o=o.sibling;t.childLanes=u&~n}else t.childLanes=0,t.child=null;return vf(e,t,n,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&dr(t,u!==null?u.cachePool:null),u!==null?xd(t,u):uo(),sf(t);else return t.lanes=t.childLanes=536870912,vf(e,t,u!==null?u.baseLanes|a:a,a)}else u!==null?(dr(t,u.cachePool),xd(t,u),qa(),t.memoizedState=null):(e!==null&&dr(t,null),uo(),qa());return ut(e,t,o,a),t.child}function vf(e,t,a,n){var o=lo();return o=o===null?null:{parent:at._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&dr(t,null),uo(),sf(t),e!==null&&Kl(e,t,n,!0),null}function Tr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Mo(e,t,a,n,o){return wn(t),a=ho(e,t,a,n,void 0,o),n=go(),e!==null&&!it?(po(e,t,o),Sa(e,t,o)):(Ue&&n&&Ji(t),t.flags|=1,ut(e,t,a,o),t.child)}function wf(e,t,a,n,o,u){return wn(t),t.updateQueue=null,a=bd(t,n,a,o),yd(e),n=go(),e!==null&&!it?(po(e,t,u),Sa(e,t,u)):(Ue&&n&&Ji(t),t.flags|=1,ut(e,t,a,u),t.child)}function Sf(e,t,a,n,o){if(wn(t),t.stateNode===null){var u=Xn,p=a.contextType;typeof p=="object"&&p!==null&&(u=gt(p)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ro,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},ro(t),p=a.contextType,u.context=typeof p=="object"&&p!==null?gt(p):Xn,u.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(Ao(t,a,p,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(p=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),p!==u.state&&Ro.enqueueReplaceState(u,u.state,null),Jl(t,n,u,o),Zl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,N=Nn(a,b);u.props=N;var _=u.context,Z=a.contextType;p=Xn,typeof Z=="object"&&Z!==null&&(p=gt(Z));var F=a.getDerivedStateFromProps;Z=typeof F=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,Z||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||_!==p)&&of(t,u,n,p),Ua=!1;var B=t.memoizedState;u.state=B,Jl(t,n,u,o),Zl(),_=t.memoizedState,b||B!==_||Ua?(typeof F=="function"&&(Ao(t,a,F,n),_=t.memoizedState),(N=Ua||rf(t,a,N,n,B,_,p))?(Z||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=_),u.props=n,u.state=_,u.context=p,n=N):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,io(e,t),p=t.memoizedProps,Z=Nn(a,p),u.props=Z,F=t.pendingProps,B=u.context,_=a.contextType,N=Xn,typeof _=="object"&&_!==null&&(N=gt(_)),b=a.getDerivedStateFromProps,(_=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==F||B!==N)&&of(t,u,n,N),Ua=!1,B=t.memoizedState,u.state=B,Jl(t,n,u,o),Zl();var G=t.memoizedState;p!==F||B!==G||Ua||e!==null&&e.dependencies!==null&&cr(e.dependencies)?(typeof b=="function"&&(Ao(t,a,b,n),G=t.memoizedState),(Z=Ua||rf(t,a,Z,n,B,G,N)||e!==null&&e.dependencies!==null&&cr(e.dependencies))?(_||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,G,N),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,G,N)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=G),u.props=n,u.state=G,u.context=N,n=Z):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,Tr(e,t),n=(t.flags&128)!==0,u||n?(u=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&n?(t.child=nl(t,e.child,null,o),t.child=nl(t,null,a,o)):ut(e,t,a,o),t.memoizedState=u.state,e=t.child):e=Sa(e,t,o),e}function jf(e,t,a,n){return Vl(),t.flags|=256,ut(e,t,a,n),t.child}var zo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Do(e){return{baseLanes:e,cachePool:cd()}}function Uo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Vt),e}function Nf(e,t,a){var n=t.pendingProps,o=!1,u=(t.flags&128)!==0,p;if((p=u)||(p=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),p&&(o=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(o?Ba(t):qa(),Ue){var b=Pe,N;if(N=b){e:{for(N=b,b=la;N.nodeType!==8;){if(!b){b=null;break e}if(N=Wt(N.nextSibling),N===null){b=null;break e}}b=N}b!==null?(t.memoizedState={dehydrated:b,treeContext:pn!==null?{id:pa,overflow:xa}:null,retryLane:536870912,hydrationErrors:null},N=Tt(18,null,null,0),N.stateNode=b,N.return=t,t.child=N,bt=t,Pe=null,N=!0):N=!1}N||bn(t)}if(b=t.memoizedState,b!==null&&(b=b.dehydrated,b!==null))return yc(b)?t.lanes=32:t.lanes=536870912,null;wa(t)}return b=n.children,n=n.fallback,o?(qa(),o=t.mode,b=Ar({mode:"hidden",children:b},o),n=gn(n,o,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,o=t.child,o.memoizedState=Do(a),o.childLanes=Uo(e,p,a),t.memoizedState=zo,n):(Ba(t),Lo(t,b))}if(N=e.memoizedState,N!==null&&(b=N.dehydrated,b!==null)){if(u)t.flags&256?(Ba(t),t.flags&=-257,t=_o(e,t,a)):t.memoizedState!==null?(qa(),t.child=e.child,t.flags|=128,t=null):(qa(),o=n.fallback,b=t.mode,n=Ar({mode:"visible",children:n.children},b),o=gn(o,b,a,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,nl(t,e.child,null,a),n=t.child,n.memoizedState=Do(a),n.childLanes=Uo(e,p,a),t.memoizedState=zo,t=o);else if(Ba(t),yc(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var _=p.dgst;p=_,n=Error(c(419)),n.stack="",n.digest=p,Gl({value:n,source:null,stack:null}),t=_o(e,t,a)}else if(it||Kl(e,t,a,!1),p=(a&e.childLanes)!==0,it||p){if(p=Ke,p!==null&&(n=a&-a,n=(n&42)!==0?1:na(n),n=(n&(p.suspendedLanes|a))!==0?0:n,n!==0&&n!==N.retryLane))throw N.retryLane=n,Qn(e,n),zt(p,e,n),gf;b.data==="$?"||tc(),t=_o(e,t,a)}else b.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Pe=Wt(b.nextSibling),bt=t,Ue=!0,yn=null,la=!1,e!==null&&(Ht[Bt++]=pa,Ht[Bt++]=xa,Ht[Bt++]=pn,pa=e.id,xa=e.overflow,pn=t),t=Lo(t,n.children),t.flags|=4096);return t}return o?(qa(),o=n.fallback,b=t.mode,N=e.child,_=N.sibling,n=ga(N,{mode:"hidden",children:n.children}),n.subtreeFlags=N.subtreeFlags&65011712,_!==null?o=ga(_,o):(o=gn(o,b,a,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,b=e.child.memoizedState,b===null?b=Do(a):(N=b.cachePool,N!==null?(_=at._currentValue,N=N.parent!==_?{parent:_,pool:_}:N):N=cd(),b={baseLanes:b.baseLanes|a,cachePool:N}),o.memoizedState=b,o.childLanes=Uo(e,p,a),t.memoizedState=zo,n):(Ba(t),a=e.child,e=a.sibling,a=ga(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function Lo(e,t){return t=Ar({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ar(e,t){return e=Tt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function _o(e,t,a){return nl(t,e.child,null,a),e=Lo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cf(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),eo(e.return,t,a)}function Ho(e,t,a,n,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=n,u.tail=a,u.tailMode=o)}function Ef(e,t,a){var n=t.pendingProps,o=n.revealOrder,u=n.tail;if(ut(e,t,n.children,a),n=nt.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cf(e,a,t);else if(e.tag===19)Cf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}switch(P(nt,n),o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Cr(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Ho(t,!1,o,a,u);break;case"backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Cr(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Ho(t,!0,a,null,u);break;case"together":Ho(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Sa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ya|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Kl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=ga(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ga(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Bo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&cr(e)))}function Jp(e,t,a){switch(t.tag){case 3:ie(t,t.stateNode.containerInfo),Da(t,at,e.memoizedState.cache),Vl();break;case 27:case 5:xe(t);break;case 4:ie(t,t.stateNode.containerInfo);break;case 10:Da(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Ba(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Nf(e,t,a):(Ba(t),e=Sa(e,t,a),e!==null?e.sibling:null);Ba(t);break;case 19:var o=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Kl(e,t,a,!1),n=(a&t.childLanes)!==0),o){if(n)return Ef(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),P(nt,nt.current),n)break;return null;case 22:case 23:return t.lanes=0,bf(e,t,a);case 24:Da(t,at,e.memoizedState.cache)}return Sa(e,t,a)}function kf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!Bo(e,a)&&(t.flags&128)===0)return it=!1,Jp(e,t,a);it=(e.flags&131072)!==0}else it=!1,Ue&&(t.flags&1048576)!==0&&ad(t,or,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,o=n._init;if(n=o(n._payload),t.type=n,typeof n=="function")Xi(n)?(e=Nn(n,e),t.tag=1,t=Sf(null,t,n,e,a)):(t.tag=0,t=Mo(null,t,n,e,a));else{if(n!=null){if(o=n.$$typeof,o===K){t.tag=11,t=pf(null,t,n,e,a);break e}else if(o===X){t.tag=14,t=xf(null,t,n,e,a);break e}}throw t=ne(n)||n,Error(c(306,t,""))}}return t;case 0:return Mo(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,o=Nn(n,t.pendingProps),Sf(e,t,n,o,a);case 3:e:{if(ie(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var u=t.memoizedState;o=u.element,io(e,t),Jl(t,n,null,a);var p=t.memoizedState;if(n=p.cache,Da(t,at,n),n!==u.cache&&to(t,[at],a,!0),Zl(),n=p.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=jf(e,t,n,a);break e}else if(n!==o){o=Lt(Error(c(424)),t),Gl(o),t=jf(e,t,n,a);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(Pe=Wt(e.firstChild),bt=t,Ue=!0,yn=null,la=!0,a=lf(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vl(),n===o){t=Sa(e,t,a);break e}ut(e,t,n,a)}t=t.child}return t;case 26:return Tr(e,t),e===null?(a=Om(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ue||(a=t.type,e=t.pendingProps,n=Kr(ee.current).createElement(a),n[tt]=t,n[yt]=e,ft(n,a,e),rt(n),t.stateNode=n):t.memoizedState=Om(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&Ue&&(n=t.stateNode=Tm(t.type,t.pendingProps,ee.current),bt=t,la=!0,o=Pe,Za(t.type)?(bc=o,Pe=Wt(n.firstChild)):Pe=o),ut(e,t,t.pendingProps.children,a),Tr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((o=n=Pe)&&(n=N0(n,t.type,t.pendingProps,la),n!==null?(t.stateNode=n,bt=t,Pe=Wt(n.firstChild),la=!1,o=!0):o=!1),o||bn(t)),xe(t),o=t.type,u=t.pendingProps,p=e!==null?e.memoizedProps:null,n=u.children,gc(o,u)?n=null:p!==null&&gc(o,p)&&(t.flags|=32),t.memoizedState!==null&&(o=ho(e,t,Gp,null,null,a),ys._currentValue=o),Tr(e,t),ut(e,t,n,a),t.child;case 6:return e===null&&Ue&&((e=a=Pe)&&(a=C0(a,t.pendingProps,la),a!==null?(t.stateNode=a,bt=t,Pe=null,e=!0):e=!1),e||bn(t)),null;case 13:return Nf(e,t,a);case 4:return ie(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=nl(t,null,n,a):ut(e,t,n,a),t.child;case 11:return pf(e,t,t.type,t.pendingProps,a);case 7:return ut(e,t,t.pendingProps,a),t.child;case 8:return ut(e,t,t.pendingProps.children,a),t.child;case 12:return ut(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Da(t,t.type,n.value),ut(e,t,n.children,a),t.child;case 9:return o=t.type._context,n=t.pendingProps.children,wn(t),o=gt(o),n=n(o),t.flags|=1,ut(e,t,n,a),t.child;case 14:return xf(e,t,t.type,t.pendingProps,a);case 15:return yf(e,t,t.type,t.pendingProps,a);case 19:return Ef(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=Ar(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ga(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return bf(e,t,a);case 24:return wn(t),n=gt(at),e===null?(o=lo(),o===null&&(o=Ke,u=ao(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:n,cache:o},ro(t),Da(t,at,o)):((e.lanes&a)!==0&&(io(e,t),Jl(t,null,null,a),Zl()),o=e.memoizedState,u=t.memoizedState,o.parent!==n?(o={parent:n,cache:n},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Da(t,at,n)):(n=u.cache,Da(t,at,n),n!==o.cache&&to(t,[at],a,!0))),ut(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ja(e){e.flags|=4}function Tf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lm(t)){if(t=qt.current,t!==null&&((ze&4194048)===ze?sa!==null:(ze&62914560)!==ze&&(ze&536870912)===0||t!==sa))throw Xl=so,ud;e.flags|=8192}}function Rr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xt():536870912,e.lanes|=t,il|=t)}function ns(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags&65011712,n|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Fp(e,t,a){var n=t.pendingProps;switch(Fi(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ba(at),pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ql(t)?ja(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sd())),Xe(t),null;case 26:return a=t.memoizedState,e===null?(ja(t),a!==null?(Xe(t),Tf(t,a)):(Xe(t),t.flags&=-16777217)):a?a!==e.memoizedState?(ja(t),Xe(t),Tf(t,a)):(Xe(t),t.flags&=-16777217):(e.memoizedProps!==n&&ja(t),Xe(t),t.flags&=-16777217),null;case 27:Me(t),a=ee.current;var o=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ja(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return Xe(t),null}e=re.current,ql(t)?nd(t):(e=Tm(o,n,a),t.stateNode=e,ja(t))}return Xe(t),null;case 5:if(Me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ja(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return Xe(t),null}if(e=re.current,ql(t))nd(t);else{switch(o=Kr(ee.current),e){case 1:e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?o.createElement(a,{is:n.is}):o.createElement(a)}}e[tt]=t,e[yt]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(ft(e,a,n),a){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ja(t)}}return Xe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ja(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=ee.current,ql(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,o=bt,o!==null)switch(o.tag){case 27:case 5:n=o.memoizedProps}e[tt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||wm(e.nodeValue,a)),e||bn(t)}else e=Kr(e).createTextNode(n),e[tt]=t,t.stateNode=e}return Xe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ql(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(c(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(c(317));o[tt]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),o=!1}else o=sd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(wa(t),t):(wa(t),null)}if(wa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,o=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(o=n.alternate.memoizedState.cachePool.pool);var u=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==o&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Rr(t,t.updateQueue),Xe(t),null;case 4:return pe(),e===null&&uc(t.stateNode.containerInfo),Xe(t),null;case 10:return ba(t.type),Xe(t),null;case 19:if(le(nt),o=t.memoizedState,o===null)return Xe(t),null;if(n=(t.flags&128)!==0,u=o.rendering,u===null)if(n)ns(o,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Cr(e),u!==null){for(t.flags|=128,ns(o,!1),e=u.updateQueue,t.updateQueue=e,Rr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)td(a,e),a=a.sibling;return P(nt,nt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qe()>zr&&(t.flags|=128,n=!0,ns(o,!1),t.lanes=4194304)}else{if(!n)if(e=Cr(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Rr(t,e),ns(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!Ue)return Xe(t),null}else 2*Qe()-o.renderingStartTime>zr&&a!==536870912&&(t.flags|=128,n=!0,ns(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(e=o.last,e!==null?e.sibling=u:t.child=u,o.last=u)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,e=nt.current,P(nt,n?e&1|2:e&1),t):(Xe(t),null);case 22:case 23:return wa(t),fo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),a=t.updateQueue,a!==null&&Rr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&le(Sn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ba(at),Xe(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Ip(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(at),pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 13:if(wa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(nt),null;case 4:return pe(),null;case 10:return ba(t.type),null;case 22:case 23:return wa(t),fo(),e!==null&&le(Sn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(at),null;case 25:return null;default:return null}}function Af(e,t){switch(Fi(t),t.tag){case 3:ba(at),pe();break;case 26:case 27:case 5:Me(t);break;case 4:pe();break;case 13:wa(t);break;case 19:le(nt);break;case 10:ba(t.type);break;case 22:case 23:wa(t),fo(),e!==null&&le(Sn);break;case 24:ba(at)}}function ls(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var o=n.next;a=o;do{if((a.tag&e)===e){n=void 0;var u=a.create,p=a.inst;n=u(),p.destroy=n}a=a.next}while(a!==o)}}catch(b){Ge(t,t.return,b)}}function Va(e,t,a){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var u=o.next;n=u;do{if((n.tag&e)===e){var p=n.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,o=t;var N=a,_=b;try{_()}catch(Z){Ge(o,N,Z)}}}n=n.next}while(n!==u)}}catch(Z){Ge(t,t.return,Z)}}function Rf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{pd(t,a)}catch(n){Ge(e,e.return,n)}}}function Of(e,t,a){a.props=Nn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ge(e,t,n)}}function ss(e,t){try{var a=e.ref;if(a!==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 a=="function"?e.refCleanup=a(n):a.current=n}}catch(o){Ge(e,t,o)}}function ra(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(o){Ge(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ge(e,t,o)}else a.current=null}function Mf(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(o){Ge(e,e.return,o)}}function qo(e,t,a){try{var n=e.stateNode;b0(n,e.type,a,t),n[yt]=t}catch(o){Ge(e,e.return,o)}}function zf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Za(e.type)||e.tag===4}function Vo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zf(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&&Za(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 Go(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Gr));else if(n!==4&&(n===27&&Za(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Go(e,t,a),e=e.sibling;e!==null;)Go(e,t,a),e=e.sibling}function Or(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Za(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Or(e,t,a),e=e.sibling;e!==null;)Or(e,t,a),e=e.sibling}function Df(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);ft(t,n,a),t[tt]=e,t[yt]=a}catch(u){Ge(e,e.return,u)}}var Na=!1,Fe=!1,Ko=!1,Uf=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Wp(e,t){if(e=e.containerInfo,mc=Zr,e=Yu(e),qi(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var o=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var p=0,b=-1,N=-1,_=0,Z=0,F=e,B=null;t:for(;;){for(var G;F!==a||o!==0&&F.nodeType!==3||(b=p+o),F!==u||n!==0&&F.nodeType!==3||(N=p+n),F.nodeType===3&&(p+=F.nodeValue.length),(G=F.firstChild)!==null;)B=F,F=G;for(;;){if(F===e)break t;if(B===a&&++_===o&&(b=p),B===u&&++Z===n&&(N=p),(G=F.nextSibling)!==null)break;F=B,B=F.parentNode}F=G}a=b===-1||N===-1?null:{start:b,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(hc={focusedElem:e,selectionRange:a},Zr=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){switch(t=ot,u=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var we=Nn(a.type,o,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(we,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(be){Ge(a,a.return,be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)xc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":xc(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}}function Lf(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ga(e,a),n&4&&ls(5,a);break;case 1:if(Ga(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Ge(a,a.return,p)}else{var o=Nn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Ge(a,a.return,p)}}n&64&&Rf(a),n&512&&ss(a,a.return);break;case 3:if(Ga(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{pd(e,t)}catch(p){Ge(a,a.return,p)}}break;case 27:t===null&&n&4&&Df(a);case 26:case 5:Ga(e,a),t===null&&n&4&&Mf(a),n&512&&ss(a,a.return);break;case 12:Ga(e,a);break;case 13:Ga(e,a),n&4&&Bf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=o0.bind(null,a),E0(e,a))));break;case 22:if(n=a.memoizedState!==null||Na,!n){t=t!==null&&t.memoizedState!==null||Fe,o=Na;var u=Fe;Na=n,(Fe=t)&&!u?Ka(e,a,(a.subtreeFlags&8772)!==0):Ga(e,a),Na=o,Fe=u}break;case 30:break;default:Ga(e,a)}}function _f(e){var t=e.alternate;t!==null&&(e.alternate=null,_f(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var $e=null,St=!1;function Ca(e,t,a){for(a=a.child;a!==null;)Hf(e,t,a),a=a.sibling}function Hf(e,t,a){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Ma,a)}catch{}switch(a.tag){case 26:Fe||ra(a,t),Ca(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Fe||ra(a,t);var n=$e,o=St;Za(a.type)&&($e=a.stateNode,St=!1),Ca(e,t,a),hs(a.stateNode),$e=n,St=o;break;case 5:Fe||ra(a,t);case 6:if(n=$e,o=St,$e=null,Ca(e,t,a),$e=n,St=o,$e!==null)if(St)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(u){Ge(a,t,u)}else try{$e.removeChild(a.stateNode)}catch(u){Ge(a,t,u)}break;case 18:$e!==null&&(St?(e=$e,Em(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ss(e)):Em($e,a.stateNode));break;case 4:n=$e,o=St,$e=a.stateNode.containerInfo,St=!0,Ca(e,t,a),$e=n,St=o;break;case 0:case 11:case 14:case 15:Fe||Va(2,a,t),Fe||Va(4,a,t),Ca(e,t,a);break;case 1:Fe||(ra(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Of(a,t,n)),Ca(e,t,a);break;case 21:Ca(e,t,a);break;case 22:Fe=(n=Fe)||a.memoizedState!==null,Ca(e,t,a),Fe=n;break;default:Ca(e,t,a)}}function Bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ss(e)}catch(a){Ge(t,t.return,a)}}function e0(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Uf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Uf),t;default:throw Error(c(435,e.tag))}}function $o(e,t){var a=e0(e);t.forEach(function(n){var o=c0.bind(null,e,n);a.has(n)||(a.add(n),n.then(o,o))})}function At(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var o=a[n],u=e,p=t,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(Za(b.type)){$e=b.stateNode,St=!1;break e}break;case 5:$e=b.stateNode,St=!1;break e;case 3:case 4:$e=b.stateNode.containerInfo,St=!0;break e}b=b.return}if($e===null)throw Error(c(160));Hf(u,p,o),$e=null,St=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)qf(t,e),t=t.sibling}var It=null;function qf(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:At(t,e),Rt(e),n&4&&(Va(3,e,e.return),ls(3,e),Va(5,e,e.return));break;case 1:At(t,e),Rt(e),n&512&&(Fe||a===null||ra(a,a.return)),n&64&&Na&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var o=It;if(At(t,e),Rt(e),n&512&&(Fe||a===null||ra(a,a.return)),n&4){var u=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(n){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Al]||u[tt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(n),o.head.insertBefore(u,o.querySelector("head > title"))),ft(u,n,a),u[tt]=e,rt(u),n=u;break e;case"link":var p=Dm("link","href",o).get(n+(a.href||""));if(p){for(var b=0;b<p.length;b++)if(u=p[b],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(b,1);break t}}u=o.createElement(n),ft(u,n,a),o.head.appendChild(u);break;case"meta":if(p=Dm("meta","content",o).get(n+(a.content||""))){for(b=0;b<p.length;b++)if(u=p[b],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(b,1);break t}}u=o.createElement(n),ft(u,n,a),o.head.appendChild(u);break;default:throw Error(c(468,n))}u[tt]=e,rt(u),n=u}e.stateNode=n}else Um(o,e.type,e.stateNode);else e.stateNode=zm(o,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?Um(o,e.type,e.stateNode):zm(o,n,e.memoizedProps)):n===null&&e.stateNode!==null&&qo(e,e.memoizedProps,a.memoizedProps)}break;case 27:At(t,e),Rt(e),n&512&&(Fe||a===null||ra(a,a.return)),a!==null&&n&4&&qo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(At(t,e),Rt(e),n&512&&(Fe||a===null||ra(a,a.return)),e.flags&32){o=e.stateNode;try{Bn(o,"")}catch(G){Ge(e,e.return,G)}}n&4&&e.stateNode!=null&&(o=e.memoizedProps,qo(e,o,a!==null?a.memoizedProps:o)),n&1024&&(Ko=!0);break;case 6:if(At(t,e),Rt(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(G){Ge(e,e.return,G)}}break;case 3:if(Qr=null,o=It,It=$r(t.containerInfo),At(t,e),It=o,Rt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Ss(t.containerInfo)}catch(G){Ge(e,e.return,G)}Ko&&(Ko=!1,Vf(e));break;case 4:n=It,It=$r(e.stateNode.containerInfo),At(t,e),Rt(e),It=n;break;case 12:At(t,e),Rt(e);break;case 13:At(t,e),Rt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Jo=Qe()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,$o(e,n)));break;case 22:o=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,_=Na,Z=Fe;if(Na=_||o,Fe=Z||N,At(t,e),Fe=Z,Na=_,Rt(e),n&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||N||Na||Fe||Cn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){N=a=t;try{if(u=N.stateNode,o)p=u.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=N.stateNode;var F=N.memoizedProps.style,B=F!=null&&F.hasOwnProperty("display")?F.display:null;b.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(G){Ge(N,N.return,G)}}}else if(t.tag===6){if(a===null){N=t;try{N.stateNode.nodeValue=o?"":N.memoizedProps}catch(G){Ge(N,N.return,G)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,$o(e,a))));break;case 19:At(t,e),Rt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,$o(e,n)));break;case 30:break;case 21:break;default:At(t,e),Rt(e)}}function Rt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(zf(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var o=a.stateNode,u=Vo(e);Or(e,u,o);break;case 5:var p=a.stateNode;a.flags&32&&(Bn(p,""),a.flags&=-33);var b=Vo(e);Or(e,b,p);break;case 3:case 4:var N=a.stateNode.containerInfo,_=Vo(e);Go(e,_,N);break;default:throw Error(c(161))}}catch(Z){Ge(e,e.return,Z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ga(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Lf(e,t.alternate,t),t=t.sibling}function Cn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Va(4,t,t.return),Cn(t);break;case 1:ra(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Of(t,t.return,a),Cn(t);break;case 27:hs(t.stateNode);case 26:case 5:ra(t,t.return),Cn(t);break;case 22:t.memoizedState===null&&Cn(t);break;case 30:Cn(t);break;default:Cn(t)}e=e.sibling}}function Ka(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,o=e,u=t,p=u.flags;switch(u.tag){case 0:case 11:case 15:Ka(o,u,a),ls(4,u);break;case 1:if(Ka(o,u,a),n=u,o=n.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(_){Ge(n,n.return,_)}if(n=u,o=n.updateQueue,o!==null){var b=n.stateNode;try{var N=o.shared.hiddenCallbacks;if(N!==null)for(o.shared.hiddenCallbacks=null,o=0;o<N.length;o++)gd(N[o],b)}catch(_){Ge(n,n.return,_)}}a&&p&64&&Rf(u),ss(u,u.return);break;case 27:Df(u);case 26:case 5:Ka(o,u,a),a&&n===null&&p&4&&Mf(u),ss(u,u.return);break;case 12:Ka(o,u,a);break;case 13:Ka(o,u,a),a&&p&4&&Bf(o,u);break;case 22:u.memoizedState===null&&Ka(o,u,a),ss(u,u.return);break;case 30:break;default:Ka(o,u,a)}t=t.sibling}}function Yo(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&$l(a))}function Qo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$l(e))}function ia(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gf(e,t,a,n),t=t.sibling}function Gf(e,t,a,n){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ia(e,t,a,n),o&2048&&ls(9,t);break;case 1:ia(e,t,a,n);break;case 3:ia(e,t,a,n),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$l(e)));break;case 12:if(o&2048){ia(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,p=u.id,b=u.onPostCommit;typeof b=="function"&&b(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ge(t,t.return,N)}}else ia(e,t,a,n);break;case 13:ia(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,p=t.alternate,t.memoizedState!==null?u._visibility&2?ia(e,t,a,n):rs(e,t):u._visibility&2?ia(e,t,a,n):(u._visibility|=2,ll(e,t,a,n,(t.subtreeFlags&10256)!==0)),o&2048&&Yo(p,t);break;case 24:ia(e,t,a,n),o&2048&&Qo(t.alternate,t);break;default:ia(e,t,a,n)}}function ll(e,t,a,n,o){for(o=o&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,p=t,b=a,N=n,_=p.flags;switch(p.tag){case 0:case 11:case 15:ll(u,p,b,N,o),ls(8,p);break;case 23:break;case 22:var Z=p.stateNode;p.memoizedState!==null?Z._visibility&2?ll(u,p,b,N,o):rs(u,p):(Z._visibility|=2,ll(u,p,b,N,o)),o&&_&2048&&Yo(p.alternate,p);break;case 24:ll(u,p,b,N,o),o&&_&2048&&Qo(p.alternate,p);break;default:ll(u,p,b,N,o)}t=t.sibling}}function rs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,o=n.flags;switch(n.tag){case 22:rs(a,n),o&2048&&Yo(n.alternate,n);break;case 24:rs(a,n),o&2048&&Qo(n.alternate,n);break;default:rs(a,n)}t=t.sibling}}var is=8192;function sl(e){if(e.subtreeFlags&is)for(e=e.child;e!==null;)Kf(e),e=e.sibling}function Kf(e){switch(e.tag){case 26:sl(e),e.flags&is&&e.memoizedState!==null&&B0(It,e.memoizedState,e.memoizedProps);break;case 5:sl(e);break;case 3:case 4:var t=It;It=$r(e.stateNode.containerInfo),sl(e),It=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=is,is=16777216,sl(e),is=t):sl(e));break;default:sl(e)}}function $f(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 os(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];ot=n,Qf(n,e)}$f(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yf(e),e=e.sibling}function Yf(e){switch(e.tag){case 0:case 11:case 15:os(e),e.flags&2048&&Va(9,e,e.return);break;case 3:os(e);break;case 12:os(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Mr(e)):os(e);break;default:os(e)}}function Mr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];ot=n,Qf(n,e)}$f(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Va(8,t,t.return),Mr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Mr(t));break;default:Mr(t)}e=e.sibling}}function Qf(e,t){for(;ot!==null;){var a=ot;switch(a.tag){case 0:case 11:case 15:Va(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:$l(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,ot=n;else e:for(a=e;ot!==null;){n=ot;var o=n.sibling,u=n.return;if(_f(n),n===a){ot=null;break e}if(o!==null){o.return=u,ot=o;break e}ot=u}}}var t0={getCacheForType:function(e){var t=gt(at),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},a0=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ke=null,Ae=null,ze=0,_e=0,Ot=null,$a=!1,rl=!1,Xo=!1,Ea=0,Ze=0,Ya=0,En=0,Po=0,Vt=0,il=0,cs=null,jt=null,Zo=!1,Jo=0,zr=1/0,Dr=null,Qa=null,dt=0,Xa=null,ol=null,cl=0,Fo=0,Io=null,Xf=null,us=0,Wo=null;function Mt(){if((Le&2)!==0&&ze!==0)return ze&-ze;if(O.T!==null){var e=Jn;return e!==0?e:rc()}return Tl()}function Pf(){Vt===0&&(Vt=(ze&536870912)===0||Ue?ye():536870912);var e=qt.current;return e!==null&&(e.flags|=32),Vt}function zt(e,t,a){(e===Ke&&(_e===2||_e===9)||e.cancelPendingCommit!==null)&&(ul(e,0),Pa(e,ze,Vt,!1)),Zt(e,a),((Le&2)===0||e!==Ke)&&(e===Ke&&((Le&2)===0&&(En|=a),Ze===4&&Pa(e,ze,Vt,!1)),oa(e))}function Zf(e,t,a){if((Le&6)!==0)throw Error(c(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||de(e,t),o=n?s0(e,t):ac(e,t,!0),u=n;do{if(o===0){rl&&!n&&Pa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!n0(a)){o=ac(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;o=cs;var N=b.current.memoizedState.isDehydrated;if(N&&(ul(b,p).flags|=256),p=ac(b,p,!1),p!==2){if(Xo&&!N){b.errorRecoveryDisabledLanes|=u,En|=u,o=4;break e}u=jt,jt=o,u!==null&&(jt===null?jt=u:jt.push.apply(jt,u))}o=p}if(u=!1,o!==2)continue}}if(o===1){ul(e,0),Pa(e,t,0,!0);break}e:{switch(n=e,u=o,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Pa(n,t,Vt,!$a);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(o=Jo+300-Qe(),10<o)){if(Pa(n,t,Vt,!$a),cn(n,0,!0)!==0)break e;n.timeoutHandle=Nm(Jf.bind(null,n,a,jt,Dr,Zo,t,Vt,En,il,$a,u,2,-0,0),o);break e}Jf(n,a,jt,Dr,Zo,t,Vt,En,il,$a,u,0,-0,0)}}break}while(!0);oa(e)}function Jf(e,t,a,n,o,u,p,b,N,_,Z,F,B,G){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(xs={stylesheets:null,count:0,unsuspend:H0},Kf(t),F=q0(),F!==null)){e.cancelPendingCommit=F(nm.bind(null,e,t,u,a,n,o,p,b,N,Z,1,B,G)),Pa(e,u,p,!_);return}nm(e,t,u,a,n,o,p,b,N)}function n0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var o=a[n],u=o.getSnapshot;o=o.value;try{if(!kt(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pa(e,t,a,n){t&=~Po,t&=~En,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var o=t;0<o;){var u=31-ht(o),p=1<<u;n[u]=-1,o&=~p}a!==0&&$s(e,a,t)}function Ur(){return(Le&6)===0?(ds(0),!1):!0}function ec(){if(Ae!==null){if(_e===0)var e=Ae.return;else e=Ae,ya=vn=null,xo(e),al=null,ts=0,e=Ae;for(;e!==null;)Af(e.alternate,e),e=e.return;Ae=null}}function ul(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,w0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ec(),Ke=e,Ae=a=ga(e.current,null),ze=t,_e=0,Ot=null,$a=!1,rl=de(e,t),Xo=!1,il=Vt=Po=En=Ya=Ze=0,jt=cs=null,Zo=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var o=31-ht(n),u=1<<o;t|=e[o],n&=~u}return Ea=t,nr(),a}function Ff(e,t){Ce=null,O.H=Sr,t===Ql||t===fr?(t=md(),_e=3):t===ud?(t=md(),_e=4):_e=t===gf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ot=t,Ae===null&&(Ze=1,kr(e,Lt(t,e.current)))}function If(){var e=O.H;return O.H=Sr,e===null?Sr:e}function Wf(){var e=O.A;return O.A=t0,e}function tc(){Ze=4,$a||(ze&4194048)!==ze&&qt.current!==null||(rl=!0),(Ya&134217727)===0&&(En&134217727)===0||Ke===null||Pa(Ke,ze,Vt,!1)}function ac(e,t,a){var n=Le;Le|=2;var o=If(),u=Wf();(Ke!==e||ze!==t)&&(Dr=null,ul(e,t)),t=!1;var p=Ze;e:do try{if(_e!==0&&Ae!==null){var b=Ae,N=Ot;switch(_e){case 8:ec(),p=6;break e;case 3:case 2:case 9:case 6:qt.current===null&&(t=!0);var _=_e;if(_e=0,Ot=null,dl(e,b,N,_),a&&rl){p=0;break e}break;default:_=_e,_e=0,Ot=null,dl(e,b,N,_)}}l0(),p=Ze;break}catch(Z){Ff(e,Z)}while(!0);return t&&e.shellSuspendCounter++,ya=vn=null,Le=n,O.H=o,O.A=u,Ae===null&&(Ke=null,ze=0,nr()),p}function l0(){for(;Ae!==null;)em(Ae)}function s0(e,t){var a=Le;Le|=2;var n=If(),o=Wf();Ke!==e||ze!==t?(Dr=null,zr=Qe()+500,ul(e,t)):rl=de(e,t);e:do try{if(_e!==0&&Ae!==null){t=Ae;var u=Ot;t:switch(_e){case 1:_e=0,Ot=null,dl(e,t,u,1);break;case 2:case 9:if(dd(u)){_e=0,Ot=null,tm(t);break}t=function(){_e!==2&&_e!==9||Ke!==e||(_e=7),oa(e)},u.then(t,t);break e;case 3:_e=7;break e;case 4:_e=5;break e;case 7:dd(u)?(_e=0,Ot=null,tm(t)):(_e=0,Ot=null,dl(e,t,u,7));break;case 5:var p=null;switch(Ae.tag){case 26:p=Ae.memoizedState;case 5:case 27:var b=Ae;if(!p||Lm(p)){_e=0,Ot=null;var N=b.sibling;if(N!==null)Ae=N;else{var _=b.return;_!==null?(Ae=_,Lr(_)):Ae=null}break t}}_e=0,Ot=null,dl(e,t,u,5);break;case 6:_e=0,Ot=null,dl(e,t,u,6);break;case 8:ec(),Ze=6;break e;default:throw Error(c(462))}}r0();break}catch(Z){Ff(e,Z)}while(!0);return ya=vn=null,O.H=n,O.A=o,Le=a,Ae!==null?0:(Ke=null,ze=0,nr(),Ze)}function r0(){for(;Ae!==null&&!fa();)em(Ae)}function em(e){var t=kf(e.alternate,e,Ea);e.memoizedProps=e.pendingProps,t===null?Lr(e):Ae=t}function tm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wf(a,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=wf(a,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:xo(t);default:Af(a,t),t=Ae=td(t,Ea),t=kf(a,t,Ea)}e.memoizedProps=e.pendingProps,t===null?Lr(e):Ae=t}function dl(e,t,a,n){ya=vn=null,xo(t),al=null,ts=0;var o=t.return;try{if(Zp(e,o,t,a,ze)){Ze=1,kr(e,Lt(a,e.current)),Ae=null;return}}catch(u){if(o!==null)throw Ae=o,u;Ze=1,kr(e,Lt(a,e.current)),Ae=null;return}t.flags&32768?(Ue||n===1?e=!0:rl||(ze&536870912)!==0?e=!1:($a=e=!0,(n===2||n===9||n===3||n===6)&&(n=qt.current,n!==null&&n.tag===13&&(n.flags|=16384))),am(t,e)):Lr(t)}function Lr(e){var t=e;do{if((t.flags&32768)!==0){am(t,$a);return}e=t.return;var a=Fp(t.alternate,t,Ea);if(a!==null){Ae=a;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Ze===0&&(Ze=5)}function am(e,t){do{var a=Ip(e.alternate,e);if(a!==null){a.flags&=32767,Ae=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=a}while(e!==null);Ze=6,Ae=null}function nm(e,t,a,n,o,u,p,b,N){e.cancelPendingCommit=null;do _r();while(dt!==0);if((Le&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Yi,un(e,a,u,p,b,N),e===Ke&&(Ae=Ke=null,ze=0),ol=t,Xa=e,cl=a,Fo=u,Io=o,Xf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,u0(Yt,function(){return om(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=O.T,O.T=null,o=W.p,W.p=2,p=Le,Le|=4;try{Wp(e,t,a)}finally{Le=p,W.p=o,O.T=n}}dt=1,lm(),sm(),rm()}}function lm(){if(dt===1){dt=0;var e=Xa,t=ol,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var n=W.p;W.p=2;var o=Le;Le|=4;try{qf(t,e);var u=hc,p=Yu(e.containerInfo),b=u.focusedElem,N=u.selectionRange;if(p!==b&&b&&b.ownerDocument&&$u(b.ownerDocument.documentElement,b)){if(N!==null&&qi(b)){var _=N.start,Z=N.end;if(Z===void 0&&(Z=_),"selectionStart"in b)b.selectionStart=_,b.selectionEnd=Math.min(Z,b.value.length);else{var F=b.ownerDocument||document,B=F&&F.defaultView||window;if(B.getSelection){var G=B.getSelection(),we=b.textContent.length,be=Math.min(N.start,we),qe=N.end===void 0?be:Math.min(N.end,we);!G.extend&&be>qe&&(p=qe,qe=be,be=p);var z=Ku(b,be),A=Ku(b,qe);if(z&&A&&(G.rangeCount!==1||G.anchorNode!==z.node||G.anchorOffset!==z.offset||G.focusNode!==A.node||G.focusOffset!==A.offset)){var L=F.createRange();L.setStart(z.node,z.offset),G.removeAllRanges(),be>qe?(G.addRange(L),G.extend(A.node,A.offset)):(L.setEnd(A.node,A.offset),G.addRange(L))}}}}for(F=[],G=b;G=G.parentNode;)G.nodeType===1&&F.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<F.length;b++){var J=F[b];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Zr=!!mc,hc=mc=null}finally{Le=o,W.p=n,O.T=a}}e.current=t,dt=2}}function sm(){if(dt===2){dt=0;var e=Xa,t=ol,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var n=W.p;W.p=2;var o=Le;Le|=4;try{Lf(e,t.alternate,t)}finally{Le=o,W.p=n,O.T=a}}dt=3}}function rm(){if(dt===4||dt===3){dt=0,Ie();var e=Xa,t=ol,a=cl,n=Xf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,ol=Xa=null,im(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Qa=null),On(a),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Ma,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=O.T,o=W.p,W.p=2,O.T=null;try{for(var u=e.onRecoverableError,p=0;p<n.length;p++){var b=n[p];u(b.value,{componentStack:b.stack})}}finally{O.T=t,W.p=o}}(cl&3)!==0&&_r(),oa(e),o=e.pendingLanes,(a&4194090)!==0&&(o&42)!==0?e===Wo?us++:(us=0,Wo=e):us=0,ds(0)}}function im(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$l(t)))}function _r(e){return lm(),sm(),rm(),om()}function om(){if(dt!==5)return!1;var e=Xa,t=Fo;Fo=0;var a=On(cl),n=O.T,o=W.p;try{W.p=32>a?32:a,O.T=null,a=Io,Io=null;var u=Xa,p=cl;if(dt=0,ol=Xa=null,cl=0,(Le&6)!==0)throw Error(c(331));var b=Le;if(Le|=4,Yf(u.current),Gf(u,u.current,p,a),Le=b,ds(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Ma,u)}catch{}return!0}finally{W.p=o,O.T=n,im(e,t)}}function cm(e,t,a){t=Lt(a,t),t=Oo(e.stateNode,t,2),e=_a(e,t,2),e!==null&&(Zt(e,2),oa(e))}function Ge(e,t,a){if(e.tag===3)cm(e,e,a);else for(;t!==null;){if(t.tag===3){cm(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Qa===null||!Qa.has(n))){e=Lt(a,e),a=mf(2),n=_a(t,a,2),n!==null&&(hf(a,n,t,e),Zt(n,2),oa(n));break}}t=t.return}}function nc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new a0;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(a)||(Xo=!0,o.add(a),e=i0.bind(null,e,t,a),t.then(e,e))}function i0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ke===e&&(ze&a)===a&&(Ze===4||Ze===3&&(ze&62914560)===ze&&300>Qe()-Jo?(Le&2)===0&&ul(e,0):Po|=a,il===ze&&(il=0)),oa(e)}function um(e,t){t===0&&(t=Xt()),e=Qn(e,t),e!==null&&(Zt(e,t),oa(e))}function o0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),um(e,a)}function c0(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),um(e,a)}function u0(e,t){return Nt(e,t)}var Hr=null,fl=null,lc=!1,Br=!1,sc=!1,kn=0;function oa(e){e!==fl&&e.next===null&&(fl===null?Hr=fl=e:fl=fl.next=e),Br=!0,lc||(lc=!0,f0())}function ds(e,t){if(!sc&&Br){sc=!0;do for(var a=!1,n=Hr;n!==null;){if(e!==0){var o=n.pendingLanes;if(o===0)var u=0;else{var p=n.suspendedLanes,b=n.pingedLanes;u=(1<<31-ht(42|e)+1)-1,u&=o&~(p&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,hm(n,u))}else u=ze,u=cn(n,n===Ke?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||de(n,u)||(a=!0,hm(n,u));n=n.next}while(a);sc=!1}}function d0(){dm()}function dm(){Br=lc=!1;var e=0;kn!==0&&(v0()&&(e=kn),kn=0);for(var t=Qe(),a=null,n=Hr;n!==null;){var o=n.next,u=fm(n,t);u===0?(n.next=null,a===null?Hr=o:a.next=o,o===null&&(fl=a)):(a=n,(e!==0||(u&3)!==0)&&(Br=!0)),n=o}ds(e)}function fm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var p=31-ht(u),b=1<<p,N=o[p];N===-1?((b&a)===0||(b&n)!==0)&&(o[p]=oe(b,t)):N<=t&&(e.expiredLanes|=b),u&=~b}if(t=Ke,a=ze,a=cn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(_e===2||_e===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Ct(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||de(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Ct(n),On(a)){case 2:case 8:a=sn;break;case 32:a=Yt;break;case 268435456:a=kl;break;default:a=Yt}return n=mm.bind(null,e),a=Nt(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Ct(n),e.callbackPriority=2,e.callbackNode=null,2}function mm(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_r()&&e.callbackNode!==a)return null;var n=ze;return n=cn(e,e===Ke?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Zf(e,n,t),fm(e,Qe()),e.callbackNode!=null&&e.callbackNode===a?mm.bind(null,e):null)}function hm(e,t){if(_r())return null;Zf(e,t,!0)}function f0(){S0(function(){(Le&6)!==0?Nt(Oa,d0):dm()})}function rc(){return kn===0&&(kn=ye()),kn}function gm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Js(""+e)}function pm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function m0(e,t,a,n,o){if(t==="submit"&&a&&a.stateNode===o){var u=gm((o[yt]||null).action),p=n.submitter;p&&(t=(t=p[yt]||null)?gm(t.formAction):p.getAttribute("formAction"),t!==null&&(u=t,p=null));var b=new er("action","action",null,n,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(kn!==0){var N=p?pm(o,p):new FormData(o);Eo(a,{pending:!0,data:N,method:o.method,action:u},null,N)}}else typeof u=="function"&&(b.preventDefault(),N=p?pm(o,p):new FormData(o),Eo(a,{pending:!0,data:N,method:o.method,action:u},u,N))},currentTarget:o}]})}}for(var ic=0;ic<$i.length;ic++){var oc=$i[ic],h0=oc.toLowerCase(),g0=oc[0].toUpperCase()+oc.slice(1);Ft(h0,"on"+g0)}Ft(Pu,"onAnimationEnd"),Ft(Zu,"onAnimationIteration"),Ft(Ju,"onAnimationStart"),Ft("dblclick","onDoubleClick"),Ft("focusin","onFocus"),Ft("focusout","onBlur"),Ft(Mp,"onTransitionRun"),Ft(zp,"onTransitionStart"),Ft(Dp,"onTransitionCancel"),Ft(Fu,"onTransitionEnd"),Ln("onMouseEnter",["mouseout","mouseover"]),Ln("onMouseLeave",["mouseout","mouseover"]),Ln("onPointerEnter",["pointerout","pointerover"]),Ln("onPointerLeave",["pointerout","pointerover"]),dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),p0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fs));function xm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],o=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var p=n.length-1;0<=p;p--){var b=n[p],N=b.instance,_=b.currentTarget;if(b=b.listener,N!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=_;try{u(o)}catch(Z){Er(Z)}o.currentTarget=null,u=N}else for(p=0;p<n.length;p++){if(b=n[p],N=b.instance,_=b.currentTarget,b=b.listener,N!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=_;try{u(o)}catch(Z){Er(Z)}o.currentTarget=null,u=N}}}}function Re(e,t){var a=t[vi];a===void 0&&(a=t[vi]=new Set);var n=e+"__bubble";a.has(n)||(ym(t,e,2,!1),a.add(n))}function cc(e,t,a){var n=0;t&&(n|=4),ym(a,e,n,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function uc(e){if(!e[qr]){e[qr]=!0,uu.forEach(function(a){a!=="selectionchange"&&(p0.has(a)||cc(a,!1,e),cc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,cc("selectionchange",!1,t))}}function ym(e,t,a,n){switch(Gm(t)){case 2:var o=K0;break;case 8:o=$0;break;default:o=Nc}a=o.bind(null,t,a,e),o=void 0,!Oi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function dc(e,t,a,n,o){var u=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var p=n.tag;if(p===3||p===4){var b=n.stateNode.containerInfo;if(b===o)break;if(p===4)for(p=n.return;p!==null;){var N=p.tag;if((N===3||N===4)&&p.stateNode.containerInfo===o)return;p=p.return}for(;b!==null;){if(p=zn(b),p===null)return;if(N=p.tag,N===5||N===6||N===26||N===27){n=u=p;continue e}b=b.parentNode}}n=n.return}Nu(function(){var _=u,Z=Ai(a),F=[];e:{var B=Iu.get(e);if(B!==void 0){var G=er,we=e;switch(e){case"keypress":if(Is(a)===0)break e;case"keydown":case"keyup":G=up;break;case"focusin":we="focus",G=Ui;break;case"focusout":we="blur",G=Ui;break;case"beforeblur":case"afterblur":G=Ui;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=ku;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=Ig;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=mp;break;case Pu:case Zu:case Ju:G=tp;break;case Fu:G=gp;break;case"scroll":case"scrollend":G=Jg;break;case"wheel":G=xp;break;case"copy":case"cut":case"paste":G=np;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Au;break;case"toggle":case"beforetoggle":G=bp}var be=(t&4)!==0,qe=!be&&(e==="scroll"||e==="scrollend"),z=be?B!==null?B+"Capture":null:B;be=[];for(var A=_,L;A!==null;){var J=A;if(L=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||L===null||z===null||(J=Ol(A,z),J!=null&&be.push(ms(A,J,L))),qe)break;A=A.return}0<be.length&&(B=new G(B,we,null,a,Z),F.push({event:B,listeners:be}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",B&&a!==Ti&&(we=a.relatedTarget||a.fromElement)&&(zn(we)||we[Mn]))break e;if((G||B)&&(B=Z.window===Z?Z:(B=Z.ownerDocument)?B.defaultView||B.parentWindow:window,G?(we=a.relatedTarget||a.toElement,G=_,we=we?zn(we):null,we!==null&&(qe=d(we),be=we.tag,we!==qe||be!==5&&be!==27&&be!==6)&&(we=null)):(G=null,we=_),G!==we)){if(be=ku,J="onMouseLeave",z="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(be=Au,J="onPointerLeave",z="onPointerEnter",A="pointer"),qe=G==null?B:Rl(G),L=we==null?B:Rl(we),B=new be(J,A+"leave",G,a,Z),B.target=qe,B.relatedTarget=L,J=null,zn(Z)===_&&(be=new be(z,A+"enter",we,a,Z),be.target=L,be.relatedTarget=qe,J=be),qe=J,G&&we)t:{for(be=G,z=we,A=0,L=be;L;L=ml(L))A++;for(L=0,J=z;J;J=ml(J))L++;for(;0<A-L;)be=ml(be),A--;for(;0<L-A;)z=ml(z),L--;for(;A--;){if(be===z||z!==null&&be===z.alternate)break t;be=ml(be),z=ml(z)}be=null}else be=null;G!==null&&bm(F,B,G,be,!1),we!==null&&qe!==null&&bm(F,qe,we,be,!0)}}e:{if(B=_?Rl(_):window,G=B.nodeName&&B.nodeName.toLowerCase(),G==="select"||G==="input"&&B.type==="file")var fe=_u;else if(Uu(B))if(Hu)fe=Ap;else{fe=kp;var Te=Ep}else G=B.nodeName,!G||G.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?_&&ki(_.elementType)&&(fe=_u):fe=Tp;if(fe&&(fe=fe(e,_))){Lu(F,fe,a,Z);break e}Te&&Te(e,B,_),e==="focusout"&&_&&B.type==="number"&&_.memoizedProps.value!=null&&Ei(B,"number",B.value)}switch(Te=_?Rl(_):window,e){case"focusin":(Uu(Te)||Te.contentEditable==="true")&&(Kn=Te,Vi=_,Bl=null);break;case"focusout":Bl=Vi=Kn=null;break;case"mousedown":Gi=!0;break;case"contextmenu":case"mouseup":case"dragend":Gi=!1,Qu(F,a,Z);break;case"selectionchange":if(Op)break;case"keydown":case"keyup":Qu(F,a,Z)}var ge;if(_i)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else Gn?zu(e,a)&&(ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ve="onCompositionStart");ve&&(Ru&&a.locale!=="ko"&&(Gn||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&Gn&&(ge=Cu()):(za=Z,Mi="value"in za?za.value:za.textContent,Gn=!0)),Te=Vr(_,ve),0<Te.length&&(ve=new Tu(ve,e,null,a,Z),F.push({event:ve,listeners:Te}),ge?ve.data=ge:(ge=Du(a),ge!==null&&(ve.data=ge)))),(ge=wp?Sp(e,a):jp(e,a))&&(ve=Vr(_,"onBeforeInput"),0<ve.length&&(Te=new Tu("onBeforeInput","beforeinput",null,a,Z),F.push({event:Te,listeners:ve}),Te.data=ge)),m0(F,e,_,a,Z)}xm(F,t)})}function ms(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Vr(e,t){for(var a=t+"Capture",n=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Ol(e,a),o!=null&&n.unshift(ms(e,o,u)),o=Ol(e,t),o!=null&&n.push(ms(e,o,u))),e.tag===3)return n;e=e.return}return[]}function ml(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bm(e,t,a,n,o){for(var u=t._reactName,p=[];a!==null&&a!==n;){var b=a,N=b.alternate,_=b.stateNode;if(b=b.tag,N!==null&&N===n)break;b!==5&&b!==26&&b!==27||_===null||(N=_,o?(_=Ol(a,u),_!=null&&p.unshift(ms(a,_,N))):o||(_=Ol(a,u),_!=null&&p.push(ms(a,_,N)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var x0=/\r\n?/g,y0=/\u0000|\uFFFD/g;function vm(e){return(typeof e=="string"?e:""+e).replace(x0,`
|
|
49
|
-
`).replace(y0,"")}function wm(e,t){return t=vm(t),vm(e)===t}function Gr(){}function Be(e,t,a,n,o,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Bn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Bn(e,""+n);break;case"className":Xs(e,"class",n);break;case"tabIndex":Xs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Xs(e,a,n);break;case"style":Su(e,n,u);break;case"data":if(t!=="object"){Xs(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Js(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&Be(e,t,"name",o.name,o,null),Be(e,t,"formEncType",o.formEncType,o,null),Be(e,t,"formMethod",o.formMethod,o,null),Be(e,t,"formTarget",o.formTarget,o,null)):(Be(e,t,"encType",o.encType,o,null),Be(e,t,"method",o.method,o,null),Be(e,t,"target",o.target,o,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Js(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Gr);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(c(60));e.innerHTML=a}}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}a=Js(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Re("beforetoggle",e),Re("toggle",e),Qs(e,"popover",n);break;case"xlinkActuate":ma(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":ma(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":ma(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":ma(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":ma(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":ma(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":ma(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":ma(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":ma(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Qs(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Pg.get(a)||a,Qs(e,a,n))}}function fc(e,t,a,n,o,u){switch(a){case"style":Su(e,n,u);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof n=="string"?Bn(e,n):(typeof n=="number"||typeof n=="bigint")&&Bn(e,""+n);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Gr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!du.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[yt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,o);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Qs(e,a,n)}}}function ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var n=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var p=a[u];if(p!=null)switch(u){case"src":n=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Be(e,t,u,p,a,null)}}o&&Be(e,t,"srcSet",a.srcSet,a,null),n&&Be(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var b=u=p=o=null,N=null,_=null;for(n in a)if(a.hasOwnProperty(n)){var Z=a[n];if(Z!=null)switch(n){case"name":o=Z;break;case"type":p=Z;break;case"checked":N=Z;break;case"defaultChecked":_=Z;break;case"value":u=Z;break;case"defaultValue":b=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(c(137,t));break;default:Be(e,t,n,Z,a,null)}}yu(e,u,b,N,_,p,o,!1),Ps(e);return;case"select":Re("invalid",e),n=p=u=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":u=b;break;case"defaultValue":p=b;break;case"multiple":n=b;default:Be(e,t,o,b,a,null)}t=u,a=p,e.multiple=!!n,t!=null?Hn(e,!!n,t,!1):a!=null&&Hn(e,!!n,a,!0);return;case"textarea":Re("invalid",e),u=o=n=null;for(p in a)if(a.hasOwnProperty(p)&&(b=a[p],b!=null))switch(p){case"value":n=b;break;case"defaultValue":o=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(c(91));break;default:Be(e,t,p,b,a,null)}vu(e,n,o,u),Ps(e);return;case"option":for(N in a)if(a.hasOwnProperty(N)&&(n=a[N],n!=null))switch(N){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Be(e,t,N,n,a,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(n=0;n<fs.length;n++)Re(fs[n],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(_ in a)if(a.hasOwnProperty(_)&&(n=a[_],n!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Be(e,t,_,n,a,null)}return;default:if(ki(t)){for(Z in a)a.hasOwnProperty(Z)&&(n=a[Z],n!==void 0&&fc(e,t,Z,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&Be(e,t,b,n,a,null))}function b0(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,p=null,b=null,N=null,_=null,Z=null;for(G in a){var F=a[G];if(a.hasOwnProperty(G)&&F!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":N=F;default:n.hasOwnProperty(G)||Be(e,t,G,null,n,F)}}for(var B in n){var G=n[B];if(F=a[B],n.hasOwnProperty(B)&&(G!=null||F!=null))switch(B){case"type":u=G;break;case"name":o=G;break;case"checked":_=G;break;case"defaultChecked":Z=G;break;case"value":p=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(c(137,t));break;default:G!==F&&Be(e,t,B,G,n,F)}}Ci(e,p,b,N,_,Z,u,o);return;case"select":G=p=b=B=null;for(u in a)if(N=a[u],a.hasOwnProperty(u)&&N!=null)switch(u){case"value":break;case"multiple":G=N;default:n.hasOwnProperty(u)||Be(e,t,u,null,n,N)}for(o in n)if(u=n[o],N=a[o],n.hasOwnProperty(o)&&(u!=null||N!=null))switch(o){case"value":B=u;break;case"defaultValue":b=u;break;case"multiple":p=u;default:u!==N&&Be(e,t,o,u,n,N)}t=b,a=p,n=G,B!=null?Hn(e,!!a,B,!1):!!n!=!!a&&(t!=null?Hn(e,!!a,t,!0):Hn(e,!!a,a?[]:"",!1));return;case"textarea":G=B=null;for(b in a)if(o=a[b],a.hasOwnProperty(b)&&o!=null&&!n.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Be(e,t,b,null,n,o)}for(p in n)if(o=n[p],u=a[p],n.hasOwnProperty(p)&&(o!=null||u!=null))switch(p){case"value":B=o;break;case"defaultValue":G=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(c(91));break;default:o!==u&&Be(e,t,p,o,n,u)}bu(e,B,G);return;case"option":for(var we in a)if(B=a[we],a.hasOwnProperty(we)&&B!=null&&!n.hasOwnProperty(we))switch(we){case"selected":e.selected=!1;break;default:Be(e,t,we,null,n,B)}for(N in n)if(B=n[N],G=a[N],n.hasOwnProperty(N)&&B!==G&&(B!=null||G!=null))switch(N){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Be(e,t,N,B,n,G)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in a)B=a[be],a.hasOwnProperty(be)&&B!=null&&!n.hasOwnProperty(be)&&Be(e,t,be,null,n,B);for(_ in n)if(B=n[_],G=a[_],n.hasOwnProperty(_)&&B!==G&&(B!=null||G!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(c(137,t));break;default:Be(e,t,_,B,n,G)}return;default:if(ki(t)){for(var qe in a)B=a[qe],a.hasOwnProperty(qe)&&B!==void 0&&!n.hasOwnProperty(qe)&&fc(e,t,qe,void 0,n,B);for(Z in n)B=n[Z],G=a[Z],!n.hasOwnProperty(Z)||B===G||B===void 0&&G===void 0||fc(e,t,Z,B,n,G);return}}for(var z in a)B=a[z],a.hasOwnProperty(z)&&B!=null&&!n.hasOwnProperty(z)&&Be(e,t,z,null,n,B);for(F in n)B=n[F],G=a[F],!n.hasOwnProperty(F)||B===G||B==null&&G==null||Be(e,t,F,B,n,G)}var mc=null,hc=null;function Kr(e){return e.nodeType===9?e:e.ownerDocument}function Sm(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 jm(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 pc=null;function v0(){var e=window.event;return e&&e.type==="popstate"?e===pc?!1:(pc=e,!0):(pc=null,!1)}var Nm=typeof setTimeout=="function"?setTimeout:void 0,w0=typeof clearTimeout=="function"?clearTimeout:void 0,Cm=typeof Promise=="function"?Promise:void 0,S0=typeof queueMicrotask=="function"?queueMicrotask:typeof Cm<"u"?function(e){return Cm.resolve(null).then(e).catch(j0)}:Nm;function j0(e){setTimeout(function(){throw e})}function Za(e){return e==="head"}function Em(e,t){var a=t,n=0,o=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(0<n&&8>n){a=n;var p=e.ownerDocument;if(a&1&&hs(p.documentElement),a&2&&hs(p.body),a&4)for(a=p.head,hs(a),p=a.firstChild;p;){var b=p.nextSibling,N=p.nodeName;p[Al]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=b}}if(o===0){e.removeChild(u),Ss(t);return}o--}else a==="$"||a==="$?"||a==="$!"?o++:n=a.charCodeAt(0)-48;else n=0;a=u}while(a);Ss(t)}function xc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":xc(a),wi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function N0(e,t,a,n){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Al])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Wt(e.nextSibling),e===null)break}return null}function C0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Wt(e.nextSibling),e===null))return null;return e}function yc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function E0(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Wt(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var bc=null;function km(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function Tm(e,t,a){switch(t=Kr(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function hs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wi(e)}var Gt=new Map,Am=new Set;function $r(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ka=W.d;W.d={f:k0,r:T0,D:A0,C:R0,L:O0,m:M0,X:D0,S:z0,M:U0};function k0(){var e=ka.f(),t=Ur();return e||t}function T0(e){var t=Dn(e);t!==null&&t.tag===5&&t.type==="form"?Pd(t):ka.r(e)}var hl=typeof document>"u"?null:document;function Rm(e,t,a){var n=hl;if(n&&typeof t=="string"&&t){var o=Ut(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Am.has(o)||(Am.add(o),e={rel:e,crossOrigin:a,href:t},n.querySelector(o)===null&&(t=n.createElement("link"),ft(t,"link",e),rt(t),n.head.appendChild(t)))}}function A0(e){ka.D(e),Rm("dns-prefetch",e,null)}function R0(e,t){ka.C(e,t),Rm("preconnect",e,t)}function O0(e,t,a){ka.L(e,t,a);var n=hl;if(n&&e&&t){var o='link[rel="preload"][as="'+Ut(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Ut(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Ut(a.imageSizes)+'"]')):o+='[href="'+Ut(e)+'"]';var u=o;switch(t){case"style":u=gl(e);break;case"script":u=pl(e)}Gt.has(u)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Gt.set(u,e),n.querySelector(o)!==null||t==="style"&&n.querySelector(gs(u))||t==="script"&&n.querySelector(ps(u))||(t=n.createElement("link"),ft(t,"link",e),rt(t),n.head.appendChild(t)))}}function M0(e,t){ka.m(e,t);var a=hl;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Ut(n)+'"][href="'+Ut(e)+'"]',u=o;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=pl(e)}if(!Gt.has(u)&&(e=y({rel:"modulepreload",href:e},t),Gt.set(u,e),a.querySelector(o)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ps(u)))return}n=a.createElement("link"),ft(n,"link",e),rt(n),a.head.appendChild(n)}}}function z0(e,t,a){ka.S(e,t,a);var n=hl;if(n&&e){var o=Un(n).hoistableStyles,u=gl(e);t=t||"default";var p=o.get(u);if(!p){var b={loading:0,preload:null};if(p=n.querySelector(gs(u)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Gt.get(u))&&vc(e,a);var N=p=n.createElement("link");rt(N),ft(N,"link",e),N._p=new Promise(function(_,Z){N.onload=_,N.onerror=Z}),N.addEventListener("load",function(){b.loading|=1}),N.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Yr(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:b},o.set(u,p)}}}function D0(e,t){ka.X(e,t);var a=hl;if(a&&e){var n=Un(a).hoistableScripts,o=pl(e),u=n.get(o);u||(u=a.querySelector(ps(o)),u||(e=y({src:e,async:!0},t),(t=Gt.get(o))&&wc(e,t),u=a.createElement("script"),rt(u),ft(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(o,u))}}function U0(e,t){ka.M(e,t);var a=hl;if(a&&e){var n=Un(a).hoistableScripts,o=pl(e),u=n.get(o);u||(u=a.querySelector(ps(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Gt.get(o))&&wc(e,t),u=a.createElement("script"),rt(u),ft(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(o,u))}}function Om(e,t,a,n){var o=(o=ee.current)?$r(o):null;if(!o)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=gl(a.href),a=Un(o).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=gl(a.href);var u=Un(o).hoistableStyles,p=u.get(e);if(p||(o=o.ownerDocument||o,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,p),(u=o.querySelector(gs(e)))&&!u._p&&(p.instance=u,p.state.loading=5),Gt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Gt.set(e,a),u||L0(o,e,a,p.state))),t&&n===null)throw Error(c(528,""));return p}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=pl(a),a=Un(o).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function gl(e){return'href="'+Ut(e)+'"'}function gs(e){return'link[rel="stylesheet"]['+e+"]"}function Mm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function L0(e,t,a,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}),ft(t,"link",a),rt(t),e.head.appendChild(t))}function pl(e){return'[src="'+Ut(e)+'"]'}function ps(e){return"script[async]"+e}function zm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Ut(a.href)+'"]');if(n)return t.instance=n,rt(n),n;var o=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),rt(n),ft(n,"style",o),Yr(n,a.precedence,e),t.instance=n;case"stylesheet":o=gl(a.href);var u=e.querySelector(gs(o));if(u)return t.state.loading|=4,t.instance=u,rt(u),u;n=Mm(a),(o=Gt.get(o))&&vc(n,o),u=(e.ownerDocument||e).createElement("link"),rt(u);var p=u;return p._p=new Promise(function(b,N){p.onload=b,p.onerror=N}),ft(u,"link",n),t.state.loading|=4,Yr(u,a.precedence,e),t.instance=u;case"script":return u=pl(a.src),(o=e.querySelector(ps(u)))?(t.instance=o,rt(o),o):(n=a,(o=Gt.get(u))&&(n=y({},a),wc(n,o)),e=e.ownerDocument||e,o=e.createElement("script"),rt(o),ft(o,"link",n),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Yr(n,a.precedence,e));return t.instance}function Yr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=n.length?n[n.length-1]:null,u=o,p=0;p<n.length;p++){var b=n[p];if(b.dataset.precedence===t)u=b;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Qr=null;function Dm(e,t,a){if(Qr===null){var n=new Map,o=Qr=new Map;o.set(a,n)}else o=Qr,n=o.get(a),n||(n=new Map,o.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[Al]||u[tt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var p=u.getAttribute(t)||"";p=e+p;var b=n.get(p);b?b.push(u):n.set(p,[u])}}return n}function Um(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function _0(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;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 Lm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var xs=null;function H0(){}function B0(e,t,a){if(xs===null)throw Error(c(475));var n=xs;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=gl(a.href),u=e.querySelector(gs(o));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=Xr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=u,rt(u);return}u=e.ownerDocument||e,a=Mm(a),(o=Gt.get(o))&&vc(a,o),u=u.createElement("link"),rt(u);var p=u;p._p=new Promise(function(b,N){p.onload=b,p.onerror=N}),ft(u,"link",a),t.instance=u}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(n.count++,t=Xr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function q0(){if(xs===null)throw Error(c(475));var e=xs;return e.stylesheets&&e.count===0&&Sc(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&Sc(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Xr(){if(this.count--,this.count===0){if(this.stylesheets)Sc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Pr=null;function Sc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Pr=new Map,t.forEach(V0,e),Pr=null,Xr.call(e))}function V0(e,t){if(!(t.state.loading&4)){var a=Pr.get(e);if(a)var n=a.get(null);else{a=new Map,Pr.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var p=o[u];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),n=p)}n&&a.set(null,n)}o=t.instance,p=o.getAttribute("data-precedence"),u=a.get(p)||n,u===n&&a.set(null,o),a.set(p,o),this.count++,n=Xr.bind(this),o.addEventListener("load",n),o.addEventListener("error",n),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ys={$$typeof:U,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function G0(e,t,a,n,o,u,p,b){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=Pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pt(0),this.hiddenUpdates=Pt(null),this.identifierPrefix=n,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function _m(e,t,a,n,o,u,p,b,N,_,Z,F){return e=new G0(e,t,a,p,b,N,_,F),t=1,u===!0&&(t|=24),u=Tt(3,null,null,t),e.current=u,u.stateNode=e,t=ao(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},ro(u),e}function Hm(e){return e?(e=Xn,e):Xn}function Bm(e,t,a,n,o,u){o=Hm(o),n.context===null?n.context=o:n.pendingContext=o,n=La(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=_a(e,n,t),a!==null&&(zt(a,e,t),Pl(a,e,t))}function qm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function jc(e,t){qm(e,t),(e=e.alternate)&&qm(e,t)}function Vm(e){if(e.tag===13){var t=Qn(e,67108864);t!==null&&zt(t,e,67108864),jc(e,67108864)}}var Zr=!0;function K0(e,t,a,n){var o=O.T;O.T=null;var u=W.p;try{W.p=2,Nc(e,t,a,n)}finally{W.p=u,O.T=o}}function $0(e,t,a,n){var o=O.T;O.T=null;var u=W.p;try{W.p=8,Nc(e,t,a,n)}finally{W.p=u,O.T=o}}function Nc(e,t,a,n){if(Zr){var o=Cc(n);if(o===null)dc(e,t,n,Jr,a),Km(e,n);else if(Q0(o,e,t,a,n))n.stopPropagation();else if(Km(e,n),t&4&&-1<Y0.indexOf(e)){for(;o!==null;){var u=Dn(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var p=aa(u.pendingLanes);if(p!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var N=1<<31-ht(p);b.entanglements[1]|=N,p&=~N}oa(u),(Le&6)===0&&(zr=Qe()+500,ds(0))}}break;case 13:b=Qn(u,2),b!==null&&zt(b,u,2),Ur(),jc(u,2)}if(u=Cc(n),u===null&&dc(e,t,n,Jr,a),u===o)break;o=u}o!==null&&n.stopPropagation()}else dc(e,t,n,null,a)}}function Cc(e){return e=Ai(e),Ec(e)}var Jr=null;function Ec(e){if(Jr=null,e=zn(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Jr=e,null}function Gm(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(ln()){case Oa:return 2;case sn:return 8;case Yt:case Hs:return 32;case kl:return 268435456;default:return 32}default:return 32}}var kc=!1,Ja=null,Fa=null,Ia=null,bs=new Map,vs=new Map,Wa=[],Y0="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 Km(e,t){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":Fa=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":bs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vs.delete(t.pointerId)}}function ws(e,t,a,n,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Dn(t),t!==null&&Vm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Q0(e,t,a,n,o){switch(t){case"focusin":return Ja=ws(Ja,e,t,a,n,o),!0;case"dragenter":return Fa=ws(Fa,e,t,a,n,o),!0;case"mouseover":return Ia=ws(Ia,e,t,a,n,o),!0;case"pointerover":var u=o.pointerId;return bs.set(u,ws(bs.get(u)||null,e,t,a,n,o)),!0;case"gotpointercapture":return u=o.pointerId,vs.set(u,ws(vs.get(u)||null,e,t,a,n,o)),!0}return!1}function $m(e){var t=zn(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Ys(e.priority,function(){if(a.tag===13){var n=Mt();n=na(n);var o=Qn(a,n);o!==null&&zt(o,a,n),jc(a,n)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Cc(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Ti=n,a.target.dispatchEvent(n),Ti=null}else return t=Dn(a),t!==null&&Vm(t),e.blockedOn=a,!1;t.shift()}return!0}function Ym(e,t,a){Fr(e)&&a.delete(t)}function X0(){kc=!1,Ja!==null&&Fr(Ja)&&(Ja=null),Fa!==null&&Fr(Fa)&&(Fa=null),Ia!==null&&Fr(Ia)&&(Ia=null),bs.forEach(Ym),vs.forEach(Ym)}function Ir(e,t){e.blockedOn===t&&(e.blockedOn=null,kc||(kc=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,X0)))}var Wr=null;function Qm(e){Wr!==e&&(Wr=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Wr===e&&(Wr=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],o=e[t+2];if(typeof n!="function"){if(Ec(n||a)===null)continue;break}var u=Dn(a);u!==null&&(e.splice(t,3),t-=3,Eo(u,{pending:!0,data:o,method:a.method,action:n},n,o))}}))}function Ss(e){function t(N){return Ir(N,e)}Ja!==null&&Ir(Ja,e),Fa!==null&&Ir(Fa,e),Ia!==null&&Ir(Ia,e),bs.forEach(t),vs.forEach(t);for(var a=0;a<Wa.length;a++){var n=Wa[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Wa.length&&(a=Wa[0],a.blockedOn===null);)$m(a),a.blockedOn===null&&Wa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var o=a[n],u=a[n+1],p=o[yt]||null;if(typeof u=="function")p||Qm(a);else if(p){var b=null;if(u&&u.hasAttribute("formAction")){if(o=u,p=u[yt]||null)b=p.formAction;else if(Ec(o)!==null)continue}else b=p.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),Qm(a)}}}function Tc(e){this._internalRoot=e}ei.prototype.render=Tc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Mt();Bm(a,n,e,t,null,null)},ei.prototype.unmount=Tc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bm(e.current,2,null,e,null,null),Ur(),t[Mn]=null}};function ei(e){this._internalRoot=e}ei.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tl();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Wa.length&&t!==0&&t<Wa[a].priority;a++);Wa.splice(a,0,e),a===0&&$m(e)}};var Xm=r.version;if(Xm!=="19.1.0")throw Error(c(527,Xm,"19.1.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=g(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var P0={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ti=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ti.isDisabled&&ti.supportsFiber)try{Ma=ti.inject(P0),mt=ti}catch{}}return Ns.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",o=cf,u=uf,p=df,b=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(b=t.unstable_transitionCallbacks)),t=_m(e,1,!1,null,null,a,n,o,u,p,b,null),e[Mn]=t.current,uc(e),new Tc(t)},Ns.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,o="",u=cf,p=uf,b=df,N=null,_=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(N=a.unstable_transitionCallbacks),a.formState!==void 0&&(_=a.formState)),t=_m(e,1,!0,t,a??null,n,o,u,p,b,N,_),t.context=Hm(null),a=t.current,n=Mt(),n=na(n),o=La(n),o.callback=null,_a(a,o,n),a=n,t.current.lanes=a,Zt(t,a),oa(t),e[Mn]=t.current,uc(e),new ei(t)},Ns.version="19.1.0",Ns}var nh;function lx(){if(nh)return Oc.exports;nh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),Oc.exports=nx(),Oc.exports}var sx=lx();const lh=Hh(sx);var Cs={},sh;function rx(){if(sh)return Cs;sh=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.parse=h,Cs.serialize=m;const l=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,r=/^[\u0021-\u003A\u003C-\u007E]*$/,s=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,c=/^[\u0020-\u003A\u003D-\u007E]*$/,f=Object.prototype.toString,d=(()=>{const v=function(){};return v.prototype=Object.create(null),v})();function h(v,R){const j=new d,C=v.length;if(C<2)return j;const T=(R==null?void 0:R.decode)||y;let M=0;do{const k=v.indexOf("=",M);if(k===-1)break;const U=v.indexOf(";",M),K=U===-1?C:U;if(k>K){M=v.lastIndexOf(";",k-1)+1;continue}const Y=x(v,M,k),ce=g(v,k,Y),X=v.slice(Y,ce);if(j[X]===void 0){let $=x(v,k+1,K),I=g(v,K,$);const H=T(v.slice($,I));j[X]=H}M=K+1}while(M<C);return j}function x(v,R,j){do{const C=v.charCodeAt(R);if(C!==32&&C!==9)return R}while(++R<j);return j}function g(v,R,j){for(;R>j;){const C=v.charCodeAt(--R);if(C!==32&&C!==9)return R+1}return j}function m(v,R,j){const C=(j==null?void 0:j.encode)||encodeURIComponent;if(!l.test(v))throw new TypeError(`argument name is invalid: ${v}`);const T=C(R);if(!r.test(T))throw new TypeError(`argument val is invalid: ${R}`);let M=v+"="+T;if(!j)return M;if(j.maxAge!==void 0){if(!Number.isInteger(j.maxAge))throw new TypeError(`option maxAge is invalid: ${j.maxAge}`);M+="; Max-Age="+j.maxAge}if(j.domain){if(!s.test(j.domain))throw new TypeError(`option domain is invalid: ${j.domain}`);M+="; Domain="+j.domain}if(j.path){if(!c.test(j.path))throw new TypeError(`option path is invalid: ${j.path}`);M+="; Path="+j.path}if(j.expires){if(!S(j.expires)||!Number.isFinite(j.expires.valueOf()))throw new TypeError(`option expires is invalid: ${j.expires}`);M+="; Expires="+j.expires.toUTCString()}if(j.httpOnly&&(M+="; HttpOnly"),j.secure&&(M+="; Secure"),j.partitioned&&(M+="; Partitioned"),j.priority)switch(typeof j.priority=="string"?j.priority.toLowerCase():void 0){case"low":M+="; Priority=Low";break;case"medium":M+="; Priority=Medium";break;case"high":M+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${j.priority}`)}if(j.sameSite)switch(typeof j.sameSite=="string"?j.sameSite.toLowerCase():j.sameSite){case!0:case"strict":M+="; SameSite=Strict";break;case"lax":M+="; SameSite=Lax";break;case"none":M+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${j.sameSite}`)}return M}function y(v){if(v.indexOf("%")===-1)return v;try{return decodeURIComponent(v)}catch{return v}}function S(v){return f.call(v)==="[object Date]"}return Cs}rx();var rh="popstate";function ix(l={}){function r(c,f){let{pathname:d,search:h,hash:x}=c.location;return Vc("",{pathname:d,search:h,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function s(c,f){return typeof f=="string"?f:Os(f)}return cx(r,s,null,l)}function Ye(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function ea(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function ox(){return Math.random().toString(36).substring(2,10)}function ih(l,r){return{usr:l.state,key:l.key,idx:r}}function Vc(l,r,s=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Sl(r):r,state:s,key:r&&r.key||c||ox()}}function Os({pathname:l="/",search:r="",hash:s=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(l+=s.charAt(0)==="#"?s:"#"+s),l}function Sl(l){let r={};if(l){let s=l.indexOf("#");s>=0&&(r.hash=l.substring(s),l=l.substring(0,s));let c=l.indexOf("?");c>=0&&(r.search=l.substring(c),l=l.substring(0,c)),l&&(r.pathname=l)}return r}function cx(l,r,s,c={}){let{window:f=document.defaultView,v5Compat:d=!1}=c,h=f.history,x="POP",g=null,m=y();m==null&&(m=0,h.replaceState({...h.state,idx:m},""));function y(){return(h.state||{idx:null}).idx}function S(){x="POP";let T=y(),M=T==null?null:T-m;m=T,g&&g({action:x,location:C.location,delta:M})}function v(T,M){x="PUSH";let k=Vc(C.location,T,M);m=y()+1;let U=ih(k,m),K=C.createHref(k);try{h.pushState(U,"",K)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;f.location.assign(K)}d&&g&&g({action:x,location:C.location,delta:1})}function R(T,M){x="REPLACE";let k=Vc(C.location,T,M);m=y();let U=ih(k,m),K=C.createHref(k);h.replaceState(U,"",K),d&&g&&g({action:x,location:C.location,delta:0})}function j(T){return ux(T)}let C={get action(){return x},get location(){return l(f,h)},listen(T){if(g)throw new Error("A history only accepts one active listener");return f.addEventListener(rh,S),g=T,()=>{f.removeEventListener(rh,S),g=null}},createHref(T){return r(f,T)},createURL:j,encodeLocation(T){let M=j(T);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:v,replace:R,go(T){return h.go(T)}};return C}function ux(l,r=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(s,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:Os(l);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=s+c),new URL(c,s)}function Bh(l,r,s="/"){return dx(l,r,s,!1)}function dx(l,r,s,c){let f=typeof r=="string"?Sl(r):r,d=Ra(f.pathname||"/",s);if(d==null)return null;let h=qh(l);fx(h);let x=null;for(let g=0;x==null&&g<h.length;++g){let m=jx(d);x=wx(h[g],m,c)}return x}function qh(l,r=[],s=[],c=""){let f=(d,h,x)=>{let g={relativePath:x===void 0?d.path||"":x,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};g.relativePath.startsWith("/")&&(Ye(g.relativePath.startsWith(c),`Absolute route path "${g.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(c.length));let m=Aa([c,g.relativePath]),y=s.concat(g);d.children&&d.children.length>0&&(Ye(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),qh(d.children,r,y,m)),!(d.path==null&&!d.index)&&r.push({path:m,score:bx(m,d.index),routesMeta:y})};return l.forEach((d,h)=>{var x;if(d.path===""||!((x=d.path)!=null&&x.includes("?")))f(d,h);else for(let g of Vh(d.path))f(d,h,g)}),r}function Vh(l){let r=l.split("/");if(r.length===0)return[];let[s,...c]=r,f=s.endsWith("?"),d=s.replace(/\?$/,"");if(c.length===0)return f?[d,""]:[d];let h=Vh(c.join("/")),x=[];return x.push(...h.map(g=>g===""?d:[d,g].join("/"))),f&&x.push(...h),x.map(g=>l.startsWith("/")&&g===""?"/":g)}function fx(l){l.sort((r,s)=>r.score!==s.score?s.score-r.score:vx(r.routesMeta.map(c=>c.childrenIndex),s.routesMeta.map(c=>c.childrenIndex)))}var mx=/^:[\w-]+$/,hx=3,gx=2,px=1,xx=10,yx=-2,oh=l=>l==="*";function bx(l,r){let s=l.split("/"),c=s.length;return s.some(oh)&&(c+=yx),r&&(c+=gx),s.filter(f=>!oh(f)).reduce((f,d)=>f+(mx.test(d)?hx:d===""?px:xx),c)}function vx(l,r){return l.length===r.length&&l.slice(0,-1).every((c,f)=>c===r[f])?l[l.length-1]-r[r.length-1]:0}function wx(l,r,s=!1){let{routesMeta:c}=l,f={},d="/",h=[];for(let x=0;x<c.length;++x){let g=c[x],m=x===c.length-1,y=d==="/"?r:r.slice(d.length)||"/",S=ui({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},y),v=g.route;if(!S&&m&&s&&!c[c.length-1].route.index&&(S=ui({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!S)return null;Object.assign(f,S.params),h.push({params:f,pathname:Aa([d,S.pathname]),pathnameBase:kx(Aa([d,S.pathnameBase])),route:v}),S.pathnameBase!=="/"&&(d=Aa([d,S.pathnameBase]))}return h}function ui(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[s,c]=Sx(l.path,l.caseSensitive,l.end),f=r.match(s);if(!f)return null;let d=f[0],h=d.replace(/(.)\/+$/,"$1"),x=f.slice(1);return{params:c.reduce((m,{paramName:y,isOptional:S},v)=>{if(y==="*"){let j=x[v]||"";h=d.slice(0,d.length-j.length).replace(/(.)\/+$/,"$1")}const R=x[v];return S&&!R?m[y]=void 0:m[y]=(R||"").replace(/%2F/g,"/"),m},{}),pathname:d,pathnameBase:h,pattern:l}}function Sx(l,r=!1,s=!0){ea(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,x,g)=>(c.push({paramName:x,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function jx(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return ea(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function Ra(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,c=l.charAt(s);return c&&c!=="/"?null:l.slice(s)||"/"}function Nx(l,r="/"){let{pathname:s,search:c="",hash:f=""}=typeof l=="string"?Sl(l):l;return{pathname:s?s.startsWith("/")?s:Cx(s,r):r,search:Tx(c),hash:Ax(f)}}function Cx(l,r){let s=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function Uc(l,r,s,c){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ex(l){return l.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function Ic(l){let r=Ex(l);return r.map((s,c)=>c===r.length-1?s.pathname:s.pathnameBase)}function Wc(l,r,s,c=!1){let f;typeof l=="string"?f=Sl(l):(f={...l},Ye(!f.pathname||!f.pathname.includes("?"),Uc("?","pathname","search",f)),Ye(!f.pathname||!f.pathname.includes("#"),Uc("#","pathname","hash",f)),Ye(!f.search||!f.search.includes("#"),Uc("#","search","hash",f)));let d=l===""||f.pathname==="",h=d?"/":f.pathname,x;if(h==null)x=s;else{let S=r.length-1;if(!c&&h.startsWith("..")){let v=h.split("/");for(;v[0]==="..";)v.shift(),S-=1;f.pathname=v.join("/")}x=S>=0?r[S]:"/"}let g=Nx(f,x),m=h&&h!=="/"&&h.endsWith("/"),y=(d||h===".")&&s.endsWith("/");return!g.pathname.endsWith("/")&&(m||y)&&(g.pathname+="/"),g}var Aa=l=>l.join("/").replace(/\/\/+/g,"/"),kx=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Ax=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function Rx(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}var Gh=["POST","PUT","PATCH","DELETE"];new Set(Gh);var Ox=["GET",...Gh];new Set(Ox);var jl=w.createContext(null);jl.displayName="DataRouter";var gi=w.createContext(null);gi.displayName="DataRouterState";var Kh=w.createContext({isTransitioning:!1});Kh.displayName="ViewTransition";var Mx=w.createContext(new Map);Mx.displayName="Fetchers";var zx=w.createContext(null);zx.displayName="Await";var ta=w.createContext(null);ta.displayName="Navigation";var Ds=w.createContext(null);Ds.displayName="Location";var $t=w.createContext({outlet:null,matches:[],isDataRoute:!1});$t.displayName="Route";var eu=w.createContext(null);eu.displayName="RouteError";function Dx(l,{relative:r}={}){Ye(Nl(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:c}=w.useContext(ta),{hash:f,pathname:d,search:h}=Us(l,{relative:r}),x=d;return s!=="/"&&(x=d==="/"?s:Aa([s,d])),c.createHref({pathname:x,search:h,hash:f})}function Nl(){return w.useContext(Ds)!=null}function da(){return Ye(Nl(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Ds).location}var $h="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yh(l){w.useContext(ta).static||w.useLayoutEffect(l)}function Rn(){let{isDataRoute:l}=w.useContext($t);return l?Jx():Ux()}function Ux(){Ye(Nl(),"useNavigate() may be used only in the context of a <Router> component.");let l=w.useContext(jl),{basename:r,navigator:s}=w.useContext(ta),{matches:c}=w.useContext($t),{pathname:f}=da(),d=JSON.stringify(Ic(c)),h=w.useRef(!1);return Yh(()=>{h.current=!0}),w.useCallback((g,m={})=>{if(ea(h.current,$h),!h.current)return;if(typeof g=="number"){s.go(g);return}let y=Wc(g,JSON.parse(d),f,m.relative==="path");l==null&&r!=="/"&&(y.pathname=y.pathname==="/"?r:Aa([r,y.pathname])),(m.replace?s.replace:s.push)(y,m.state,m)},[r,s,d,f,l])}var Lx=w.createContext(null);function _x(l){let r=w.useContext($t).outlet;return r&&w.createElement(Lx.Provider,{value:l},r)}function Hx(){let{matches:l}=w.useContext($t),r=l[l.length-1];return r?r.params:{}}function Us(l,{relative:r}={}){let{matches:s}=w.useContext($t),{pathname:c}=da(),f=JSON.stringify(Ic(s));return w.useMemo(()=>Wc(l,JSON.parse(f),c,r==="path"),[l,f,c,r])}function Bx(l,r){return Qh(l,r)}function Qh(l,r,s,c){var M;Ye(Nl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=w.useContext(ta),{matches:d}=w.useContext($t),h=d[d.length-1],x=h?h.params:{},g=h?h.pathname:"/",m=h?h.pathnameBase:"/",y=h&&h.route;{let k=y&&y.path||"";Xh(g,!y||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let S=da(),v;if(r){let k=typeof r=="string"?Sl(r):r;Ye(m==="/"||((M=k.pathname)==null?void 0:M.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${k.pathname}" was given in the \`location\` prop.`),v=k}else v=S;let R=v.pathname||"/",j=R;if(m!=="/"){let k=m.replace(/^\//,"").split("/");j="/"+R.replace(/^\//,"").split("/").slice(k.length).join("/")}let C=Bh(l,{pathname:j});ea(y||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),ea(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=$x(C&&C.map(k=>Object.assign({},k,{params:Object.assign({},x,k.params),pathname:Aa([m,f.encodeLocation?f.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?m:Aa([m,f.encodeLocation?f.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),d,s,c);return r&&T?w.createElement(Ds.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},T):T}function qx(){let l=Zx(),r=Rx(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),s=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},h=null;return console.error("Error handled by React Router default ErrorBoundary:",l),h=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:d},"ErrorBoundary")," or"," ",w.createElement("code",{style:d},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},r),s?w.createElement("pre",{style:f},s):null,h)}var Vx=w.createElement(qx,null),Gx=class extends w.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){console.error("React Router caught the following error during render",l,r)}render(){return this.state.error!==void 0?w.createElement($t.Provider,{value:this.props.routeContext},w.createElement(eu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Kx({routeContext:l,match:r,children:s}){let c=w.useContext(jl);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement($t.Provider,{value:l},s)}function $x(l,r=[],s=null,c=null){if(l==null){if(!s)return null;if(s.errors)l=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)l=s.matches;else return null}let f=l,d=s==null?void 0:s.errors;if(d!=null){let g=f.findIndex(m=>m.route.id&&(d==null?void 0:d[m.route.id])!==void 0);Ye(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,g+1))}let h=!1,x=-1;if(s)for(let g=0;g<f.length;g++){let m=f[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(x=g),m.route.id){let{loaderData:y,errors:S}=s,v=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!S||S[m.route.id]===void 0);if(m.route.lazy||v){h=!0,x>=0?f=f.slice(0,x+1):f=[f[0]];break}}}return f.reduceRight((g,m,y)=>{let S,v=!1,R=null,j=null;s&&(S=d&&m.route.id?d[m.route.id]:void 0,R=m.route.errorElement||Vx,h&&(x<0&&y===0?(Xh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,j=null):x===y&&(v=!0,j=m.route.hydrateFallbackElement||null)));let C=r.concat(f.slice(0,y+1)),T=()=>{let M;return S?M=R:v?M=j:m.route.Component?M=w.createElement(m.route.Component,null):m.route.element?M=m.route.element:M=g,w.createElement(Kx,{match:m,routeContext:{outlet:g,matches:C,isDataRoute:s!=null},children:M})};return s&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?w.createElement(Gx,{location:s.location,revalidation:s.revalidation,component:R,error:S,children:T(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):T()},null)}function tu(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yx(l){let r=w.useContext(jl);return Ye(r,tu(l)),r}function Qx(l){let r=w.useContext(gi);return Ye(r,tu(l)),r}function Xx(l){let r=w.useContext($t);return Ye(r,tu(l)),r}function au(l){let r=Xx(l),s=r.matches[r.matches.length-1];return Ye(s.route.id,`${l} can only be used on routes that contain a unique "id"`),s.route.id}function Px(){return au("useRouteId")}function Zx(){var c;let l=w.useContext(eu),r=Qx("useRouteError"),s=au("useRouteError");return l!==void 0?l:(c=r.errors)==null?void 0:c[s]}function Jx(){let{router:l}=Yx("useNavigate"),r=au("useNavigate"),s=w.useRef(!1);return Yh(()=>{s.current=!0}),w.useCallback(async(f,d={})=>{ea(s.current,$h),s.current&&(typeof f=="number"?l.navigate(f):await l.navigate(f,{fromRouteId:r,...d}))},[l,r])}var ch={};function Xh(l,r,s){!r&&!ch[l]&&(ch[l]=!0,ea(!1,s))}w.memo(Fx);function Fx({routes:l,future:r,state:s}){return Qh(l,void 0,s,r)}function Ph({to:l,replace:r,state:s,relative:c}){Ye(Nl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=w.useContext(ta);ea(!f,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=w.useContext($t),{pathname:h}=da(),x=Rn(),g=Wc(l,Ic(d),h,c==="path"),m=JSON.stringify(g);return w.useEffect(()=>{x(JSON.parse(m),{replace:r,state:s,relative:c})},[x,m,c,r,s]),null}function Zh(l){return _x(l.context)}function Kt(l){Ye(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ix({basename:l="/",children:r=null,location:s,navigationType:c="POP",navigator:f,static:d=!1}){Ye(!Nl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=l.replace(/^\/*/,"/"),x=w.useMemo(()=>({basename:h,navigator:f,static:d,future:{}}),[h,f,d]);typeof s=="string"&&(s=Sl(s));let{pathname:g="/",search:m="",hash:y="",state:S=null,key:v="default"}=s,R=w.useMemo(()=>{let j=Ra(g,h);return j==null?null:{location:{pathname:j,search:m,hash:y,state:S,key:v},navigationType:c}},[h,g,m,y,S,v,c]);return ea(R!=null,`<Router basename="${h}"> is not able to match the URL "${g}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:w.createElement(ta.Provider,{value:x},w.createElement(Ds.Provider,{children:r,value:R}))}function Wx({children:l,location:r}){return Bx(Gc(l),r)}function Gc(l,r=[]){let s=[];return w.Children.forEach(l,(c,f)=>{if(!w.isValidElement(c))return;let d=[...r,f];if(c.type===w.Fragment){s.push.apply(s,Gc(c.props.children,d));return}Ye(c.type===Kt,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!c.props.index||!c.props.children,"An index route cannot have child routes.");let h={id:c.props.id||d.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(h.children=Gc(c.props.children,d)),s.push(h)}),s}var oi="get",ci="application/x-www-form-urlencoded";function pi(l){return l!=null&&typeof l.tagName=="string"}function ey(l){return pi(l)&&l.tagName.toLowerCase()==="button"}function ty(l){return pi(l)&&l.tagName.toLowerCase()==="form"}function ay(l){return pi(l)&&l.tagName.toLowerCase()==="input"}function ny(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function ly(l,r){return l.button===0&&(!r||r==="_self")&&!ny(l)}var ai=null;function sy(){if(ai===null)try{new FormData(document.createElement("form"),0),ai=!1}catch{ai=!0}return ai}var ry=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lc(l){return l!=null&&!ry.has(l)?(ea(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ci}"`),null):l}function iy(l,r){let s,c,f,d,h;if(ty(l)){let x=l.getAttribute("action");c=x?Ra(x,r):null,s=l.getAttribute("method")||oi,f=Lc(l.getAttribute("enctype"))||ci,d=new FormData(l)}else if(ey(l)||ay(l)&&(l.type==="submit"||l.type==="image")){let x=l.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=l.getAttribute("formaction")||x.getAttribute("action");if(c=g?Ra(g,r):null,s=l.getAttribute("formmethod")||x.getAttribute("method")||oi,f=Lc(l.getAttribute("formenctype"))||Lc(x.getAttribute("enctype"))||ci,d=new FormData(x,l),!sy()){let{name:m,type:y,value:S}=l;if(y==="image"){let v=m?`${m}.`:"";d.append(`${v}x`,"0"),d.append(`${v}y`,"0")}else m&&d.append(m,S)}}else{if(pi(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=oi,c=null,f=ci,h=l}return d&&f==="text/plain"&&(h=d,d=void 0),{action:c,method:s.toLowerCase(),encType:f,formData:d,body:h}}function nu(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}async function oy(l,r){if(l.id in r)return r[l.id];try{let s=await import(l.module);return r[l.id]=s,s}catch(s){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function cy(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function uy(l,r,s){let c=await Promise.all(l.map(async f=>{let d=r.routes[f.route.id];if(d){let h=await oy(d,s);return h.links?h.links():[]}return[]}));return hy(c.flat(1).filter(cy).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function uh(l,r,s,c,f,d){let h=(g,m)=>s[m]?g.route.id!==s[m].route.id:!0,x=(g,m)=>{var y;return s[m].pathname!==g.pathname||((y=s[m].route.path)==null?void 0:y.endsWith("*"))&&s[m].params["*"]!==g.params["*"]};return d==="assets"?r.filter((g,m)=>h(g,m)||x(g,m)):d==="data"?r.filter((g,m)=>{var S;let y=c.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(h(g,m)||x(g,m))return!0;if(g.route.shouldRevalidate){let v=g.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((S=s[0])==null?void 0:S.params)||{},nextUrl:new URL(l,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function dy(l,r,{includeHydrateFallback:s}={}){return fy(l.map(c=>{let f=r.routes[c.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function fy(l){return[...new Set(l)]}function my(l){let r={},s=Object.keys(l).sort();for(let c of s)r[c]=l[c];return r}function hy(l,r){let s=new Set;return new Set(r),l.reduce((c,f)=>{let d=JSON.stringify(my(f));return s.has(d)||(s.add(d),c.push({key:d,link:f})),c},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var gy=new Set([100,101,204,205]);function py(l,r){let s=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return s.pathname==="/"?s.pathname="_root.data":r&&Ra(s.pathname,r)==="/"?s.pathname=`${r.replace(/\/$/,"")}/_root.data`:s.pathname=`${s.pathname.replace(/\/$/,"")}.data`,s}function Jh(){let l=w.useContext(jl);return nu(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function xy(){let l=w.useContext(gi);return nu(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var lu=w.createContext(void 0);lu.displayName="FrameworkContext";function Fh(){let l=w.useContext(lu);return nu(l,"You must render this element inside a <HydratedRouter> element"),l}function yy(l,r){let s=w.useContext(lu),[c,f]=w.useState(!1),[d,h]=w.useState(!1),{onFocus:x,onBlur:g,onMouseEnter:m,onMouseLeave:y,onTouchStart:S}=r,v=w.useRef(null);w.useEffect(()=>{if(l==="render"&&h(!0),l==="viewport"){let C=M=>{M.forEach(k=>{h(k.isIntersecting)})},T=new IntersectionObserver(C,{threshold:.5});return v.current&&T.observe(v.current),()=>{T.disconnect()}}},[l]),w.useEffect(()=>{if(c){let C=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(C)}}},[c]);let R=()=>{f(!0)},j=()=>{f(!1),h(!1)};return s?l!=="intent"?[d,v,{}]:[d,v,{onFocus:Es(x,R),onBlur:Es(g,j),onMouseEnter:Es(m,R),onMouseLeave:Es(y,j),onTouchStart:Es(S,R)}]:[!1,v,{}]}function Es(l,r){return s=>{l&&l(s),s.defaultPrevented||r(s)}}function by({page:l,...r}){let{router:s}=Jh(),c=w.useMemo(()=>Bh(s.routes,l,s.basename),[s.routes,l,s.basename]);return c?w.createElement(wy,{page:l,matches:c,...r}):null}function vy(l){let{manifest:r,routeModules:s}=Fh(),[c,f]=w.useState([]);return w.useEffect(()=>{let d=!1;return uy(l,r,s).then(h=>{d||f(h)}),()=>{d=!0}},[l,r,s]),c}function wy({page:l,matches:r,...s}){let c=da(),{manifest:f,routeModules:d}=Fh(),{basename:h}=Jh(),{loaderData:x,matches:g}=xy(),m=w.useMemo(()=>uh(l,r,g,f,c,"data"),[l,r,g,f,c]),y=w.useMemo(()=>uh(l,r,g,f,c,"assets"),[l,r,g,f,c]),S=w.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let j=new Set,C=!1;if(r.forEach(M=>{var U;let k=f.routes[M.route.id];!k||!k.hasLoader||(!m.some(K=>K.route.id===M.route.id)&&M.route.id in x&&((U=d[M.route.id])!=null&&U.shouldRevalidate)||k.hasClientLoader?C=!0:j.add(M.route.id))}),j.size===0)return[];let T=py(l,h);return C&&j.size>0&&T.searchParams.set("_routes",r.filter(M=>j.has(M.route.id)).map(M=>M.route.id).join(",")),[T.pathname+T.search]},[h,x,c,f,m,r,l,d]),v=w.useMemo(()=>dy(y,f),[y,f]),R=vy(y);return w.createElement(w.Fragment,null,S.map(j=>w.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...s})),v.map(j=>w.createElement("link",{key:j,rel:"modulepreload",href:j,...s})),R.map(({key:j,link:C})=>w.createElement("link",{key:j,...C})))}function Sy(...l){return r=>{l.forEach(s=>{typeof s=="function"?s(r):s!=null&&(s.current=r)})}}var Ih=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ih&&(window.__reactRouterVersion="7.6.1")}catch{}function jy({basename:l,children:r,window:s}){let c=w.useRef();c.current==null&&(c.current=ix({window:s,v5Compat:!0}));let f=c.current,[d,h]=w.useState({action:f.action,location:f.location}),x=w.useCallback(g=>{w.startTransition(()=>h(g))},[h]);return w.useLayoutEffect(()=>f.listen(x),[f,x]),w.createElement(Ix,{basename:l,children:r,location:d.location,navigationType:d.action,navigator:f})}var Wh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eg=w.forwardRef(function({onClick:r,discover:s="render",prefetch:c="none",relative:f,reloadDocument:d,replace:h,state:x,target:g,to:m,preventScrollReset:y,viewTransition:S,...v},R){let{basename:j}=w.useContext(ta),C=typeof m=="string"&&Wh.test(m),T,M=!1;if(typeof m=="string"&&C&&(T=m,Ih))try{let I=new URL(window.location.href),H=m.startsWith("//")?new URL(I.protocol+m):new URL(m),q=Ra(H.pathname,j);H.origin===I.origin&&q!=null?m=q+H.search+H.hash:M=!0}catch{ea(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let k=Dx(m,{relative:f}),[U,K,Y]=yy(c,v),ce=Ey(m,{replace:h,state:x,target:g,preventScrollReset:y,relative:f,viewTransition:S});function X(I){r&&r(I),I.defaultPrevented||ce(I)}let $=w.createElement("a",{...v,...Y,href:T||k,onClick:M||d?r:X,ref:Sy(R,K),target:g,"data-discover":!C&&s==="render"?"true":void 0});return U&&!C?w.createElement(w.Fragment,null,$,w.createElement(by,{page:k})):$});eg.displayName="Link";var tg=w.forwardRef(function({"aria-current":r="page",caseSensitive:s=!1,className:c="",end:f=!1,style:d,to:h,viewTransition:x,children:g,...m},y){let S=Us(h,{relative:m.relative}),v=da(),R=w.useContext(gi),{navigator:j,basename:C}=w.useContext(ta),T=R!=null&&Oy(S)&&x===!0,M=j.encodeLocation?j.encodeLocation(S).pathname:S.pathname,k=v.pathname,U=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;s||(k=k.toLowerCase(),U=U?U.toLowerCase():null,M=M.toLowerCase()),U&&C&&(U=Ra(U,C)||U);const K=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let Y=k===M||!f&&k.startsWith(M)&&k.charAt(K)==="/",ce=U!=null&&(U===M||!f&&U.startsWith(M)&&U.charAt(M.length)==="/"),X={isActive:Y,isPending:ce,isTransitioning:T},$=Y?r:void 0,I;typeof c=="function"?I=c(X):I=[c,Y?"active":null,ce?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let H=typeof d=="function"?d(X):d;return w.createElement(eg,{...m,"aria-current":$,className:I,ref:y,style:H,to:h,viewTransition:x},typeof g=="function"?g(X):g)});tg.displayName="NavLink";var Ny=w.forwardRef(({discover:l="render",fetcherKey:r,navigate:s,reloadDocument:c,replace:f,state:d,method:h=oi,action:x,onSubmit:g,relative:m,preventScrollReset:y,viewTransition:S,...v},R)=>{let j=Ay(),C=Ry(x,{relative:m}),T=h.toLowerCase()==="get"?"get":"post",M=typeof x=="string"&&Wh.test(x),k=U=>{if(g&&g(U),U.defaultPrevented)return;U.preventDefault();let K=U.nativeEvent.submitter,Y=(K==null?void 0:K.getAttribute("formmethod"))||h;j(K||U.currentTarget,{fetcherKey:r,method:Y,navigate:s,replace:f,state:d,relative:m,preventScrollReset:y,viewTransition:S})};return w.createElement("form",{ref:R,method:T,action:C,onSubmit:c?g:k,...v,"data-discover":!M&&l==="render"?"true":void 0})});Ny.displayName="Form";function Cy(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ag(l){let r=w.useContext(jl);return Ye(r,Cy(l)),r}function Ey(l,{target:r,replace:s,state:c,preventScrollReset:f,relative:d,viewTransition:h}={}){let x=Rn(),g=da(),m=Us(l,{relative:d});return w.useCallback(y=>{if(ly(y,r)){y.preventDefault();let S=s!==void 0?s:Os(g)===Os(m);x(l,{replace:S,state:c,preventScrollReset:f,relative:d,viewTransition:h})}},[g,x,m,s,c,r,l,f,d,h])}var ky=0,Ty=()=>`__${String(++ky)}__`;function Ay(){let{router:l}=ag("useSubmit"),{basename:r}=w.useContext(ta),s=Px();return w.useCallback(async(c,f={})=>{let{action:d,method:h,encType:x,formData:g,body:m}=iy(c,r);if(f.navigate===!1){let y=f.fetcherKey||Ty();await l.fetch(y,s,f.action||d,{preventScrollReset:f.preventScrollReset,formData:g,body:m,formMethod:f.method||h,formEncType:f.encType||x,flushSync:f.flushSync})}else await l.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:g,body:m,formMethod:f.method||h,formEncType:f.encType||x,replace:f.replace,state:f.state,fromRouteId:s,flushSync:f.flushSync,viewTransition:f.viewTransition})},[l,r,s])}function Ry(l,{relative:r}={}){let{basename:s}=w.useContext(ta),c=w.useContext($t);Ye(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),d={...Us(l||".",{relative:r})},h=da();if(l==null){d.search=h.search;let x=new URLSearchParams(d.search),g=x.getAll("index");if(g.some(y=>y==="")){x.delete("index"),g.filter(S=>S).forEach(S=>x.append("index",S));let y=x.toString();d.search=y?`?${y}`:""}}return(!l||l===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:Aa([s,d.pathname])),Os(d)}function Oy(l,r={}){let s=w.useContext(Kh);Ye(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=ag("useViewTransitionState"),f=Us(l,{relative:r.relative});if(!s.isTransitioning)return!1;let d=Ra(s.currentLocation.pathname,c)||s.currentLocation.pathname,h=Ra(s.nextLocation.pathname,c)||s.nextLocation.pathname;return ui(f.pathname,h)!=null||ui(f.pathname,d)!=null}[...gy];const My=()=>window.__MCPHUB_CONFIG__||{basePath:"",version:"dev",name:"mcphub"},ng=()=>{const r=My().basePath||"";return r&&!r.startsWith("/")?"/"+r:r},zy=()=>ng()+"/api",ke=l=>{const r=zy(),s=l.startsWith("/")?l:"/"+l;return r+s},Dy=async()=>{try{const l=window.location.pathname,r=[l.replace(/\/[^\/]*$/,"")+"/config","/config",...l.includes("/")?[l.split("/")[1]?`/${l.split("/")[1]}/config`:"/config"]:["/config"]];for(const s of r)try{const c=await fetch(s,{method:"GET",headers:{Accept:"application/json","Cache-Control":"no-cache"}});if(c.ok){const f=await c.json();if(f.success&&f.data)return f.data}}catch(c){console.debug(`Failed to load config from ${s}:`,c)}return console.warn("Could not load runtime config from server, using defaults"),{basePath:"",version:"dev",name:"mcphub"}}catch(l){return console.error("Error loading runtime config:",l),{basePath:"",version:"dev",name:"mcphub"}}},su="mcphub_token",nn=()=>localStorage.getItem(su),lg=l=>{localStorage.setItem(su,l)},Kc=()=>{localStorage.removeItem(su)},Uy=async l=>{try{console.log(ke("/auth/login"));const s=await(await fetch(ke("/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return s.success&&s.token&&lg(s.token),s}catch(r){return console.error("Login error:",r),{success:!1,message:"An error occurred during login"}}},Ly=async l=>{try{const s=await(await fetch(ke("/auth/register"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return s.success&&s.token&&lg(s.token),s}catch(r){return console.error("Register error:",r),{success:!1,message:"An error occurred during registration"}}},_y=async()=>{const l=nn();if(!l)return{success:!1,message:"No authentication token"};try{return await(await fetch(ke("/auth/user"),{method:"GET",headers:{"x-auth-token":l}})).json()}catch(r){return console.error("Get current user error:",r),{success:!1,message:"An error occurred while fetching user data"}}},Hy=async l=>{const r=nn();if(!r)return{success:!1,message:"No authentication token"};try{return await(await fetch(ke("/auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":r},body:JSON.stringify(l)})).json()}catch(s){return console.error("Change password error:",s),{success:!1,message:"An error occurred while changing password"}}},By=()=>{Kc()},ca={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},sg=w.createContext({auth:ca,login:async()=>!1,register:async()=>!1,logout:()=>{}}),qy=({children:l})=>{const[r,s]=w.useState(ca);w.useEffect(()=>{(async()=>{const x=nn();if(!x){s({...ca,loading:!1});return}try{const g=await _y();g.success&&g.user?s({token:x,isAuthenticated:!0,loading:!1,user:g.user,error:null}):(Kc(),s({...ca,loading:!1}))}catch{Kc(),s({...ca,loading:!1})}})()},[]);const c=async(h,x)=>{try{const g=await Uy({username:h,password:x});return g.success&&g.token&&g.user?(s({token:g.token,isAuthenticated:!0,loading:!1,user:g.user,error:null}),!0):(s({...ca,loading:!1,error:g.message||"Authentication failed"}),!1)}catch{return s({...ca,loading:!1,error:"Authentication failed"}),!1}},f=async(h,x,g=!1)=>{try{const m=await Ly({username:h,password:x,isAdmin:g});return m.success&&m.token&&m.user?(s({token:m.token,isAuthenticated:!0,loading:!1,user:m.user,error:null}),!0):(s({...ca,loading:!1,error:m.message||"Registration failed"}),!1)}catch{return s({...ca,loading:!1,error:"Registration failed"}),!1}},d=()=>{By(),s({...ca,loading:!1})};return i.jsx(sg.Provider,{value:{auth:r,login:c,register:f,logout:d},children:l})},xi=()=>w.useContext(sg);/**
|
|
52
|
-
* @license lucide-react v0.486.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Vy=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gy=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,c)=>c?c.toUpperCase():s.toLowerCase()),dh=l=>{const r=Gy(l);return r.charAt(0).toUpperCase()+r.slice(1)},rg=(...l)=>l.filter((r,s,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===s).join(" ").trim();/**
|
|
57
|
-
* @license lucide-react v0.486.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/var Ky={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
62
|
-
* @license lucide-react v0.486.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const $y=w.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:c,className:f="",children:d,iconNode:h,...x},g)=>w.createElement("svg",{ref:g,...Ky,width:r,height:r,stroke:l,strokeWidth:c?Number(s)*24/Number(r):s,className:rg("lucide",f),...x},[...h.map(([m,y])=>w.createElement(m,y)),...Array.isArray(d)?d:[d]]));/**
|
|
67
|
-
* @license lucide-react v0.486.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const st=(l,r)=>{const s=w.forwardRef(({className:c,...f},d)=>w.createElement($y,{ref:d,iconNode:r,className:rg(`lucide-${Vy(dh(l))}`,`lucide-${l}`,c),...f}));return s.displayName=dh(l),s};/**
|
|
72
|
-
* @license lucide-react v0.486.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const Yy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yi=st("check",Yy);/**
|
|
77
|
-
* @license lucide-react v0.486.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Qy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ig=st("chevron-down",Qy);/**
|
|
82
|
-
* @license lucide-react v0.486.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Xy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],og=st("chevron-right",Xy);/**
|
|
87
|
-
* @license lucide-react v0.486.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Py=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],cg=st("circle-alert",Py);/**
|
|
92
|
-
* @license lucide-react v0.486.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const Zy=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Jy=st("circle-check-big",Zy);/**
|
|
97
|
-
* @license lucide-react v0.486.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Iy=st("circle-x",Fy);/**
|
|
102
|
-
* @license lucide-react v0.486.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const Wy=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ug=st("copy",Wy);/**
|
|
107
|
-
* @license lucide-react v0.486.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const eb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],tb=st("info",eb);/**
|
|
112
|
-
* @license lucide-react v0.486.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const ab=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],nb=st("loader",ab);/**
|
|
117
|
-
* @license lucide-react v0.486.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const lb=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],sb=st("log-out",lb);/**
|
|
122
|
-
* @license lucide-react v0.486.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const rb=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],ib=st("moon",rb);/**
|
|
127
|
-
* @license lucide-react v0.486.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const ob=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],cb=st("play",ob);/**
|
|
132
|
-
* @license lucide-react v0.486.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const ub=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],db=st("refresh-cw",ub);/**
|
|
137
|
-
* @license lucide-react v0.486.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const fb=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],mb=st("settings",fb);/**
|
|
142
|
-
* @license lucide-react v0.486.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const hb=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],dg=st("square-pen",hb);/**
|
|
147
|
-
* @license lucide-react v0.486.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const gb=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pb=st("sun",gb);/**
|
|
152
|
-
* @license lucide-react v0.486.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const xb=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],yb=st("trash",xb);/**
|
|
157
|
-
* @license lucide-react v0.486.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const bb=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],vb=st("user",bb);/**
|
|
162
|
-
* @license lucide-react v0.486.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const wb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ms=st("x",wb);function fg(l){var r,s,c="";if(typeof l=="string"||typeof l=="number")c+=l;else if(typeof l=="object")if(Array.isArray(l)){var f=l.length;for(r=0;r<f;r++)l[r]&&(s=fg(l[r]))&&(c&&(c+=" "),c+=s)}else for(s in l)l[s]&&(c&&(c+=" "),c+=s);return c}function Sb(){for(var l,r,s=0,c="",f=arguments.length;s<f;s++)(l=arguments[s])&&(r=fg(l))&&(c&&(c+=" "),c+=r);return c}const ru="-",jb=l=>{const r=Cb(l),{conflictingClassGroups:s,conflictingClassGroupModifiers:c}=l;return{getClassGroupId:h=>{const x=h.split(ru);return x[0]===""&&x.length!==1&&x.shift(),mg(x,r)||Nb(h)},getConflictingClassGroupIds:(h,x)=>{const g=s[h]||[];return x&&c[h]?[...g,...c[h]]:g}}},mg=(l,r)=>{var h;if(l.length===0)return r.classGroupId;const s=l[0],c=r.nextPart.get(s),f=c?mg(l.slice(1),c):void 0;if(f)return f;if(r.validators.length===0)return;const d=l.join(ru);return(h=r.validators.find(({validator:x})=>x(d)))==null?void 0:h.classGroupId},fh=/^\[(.+)\]$/,Nb=l=>{if(fh.test(l)){const r=fh.exec(l)[1],s=r==null?void 0:r.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},Cb=l=>{const{theme:r,classGroups:s}=l,c={nextPart:new Map,validators:[]};for(const f in s)$c(s[f],c,f,r);return c},$c=(l,r,s,c)=>{l.forEach(f=>{if(typeof f=="string"){const d=f===""?r:mh(r,f);d.classGroupId=s;return}if(typeof f=="function"){if(Eb(f)){$c(f(c),r,s,c);return}r.validators.push({validator:f,classGroupId:s});return}Object.entries(f).forEach(([d,h])=>{$c(h,mh(r,d),s,c)})})},mh=(l,r)=>{let s=l;return r.split(ru).forEach(c=>{s.nextPart.has(c)||s.nextPart.set(c,{nextPart:new Map,validators:[]}),s=s.nextPart.get(c)}),s},Eb=l=>l.isThemeGetter,kb=l=>{if(l<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,c=new Map;const f=(d,h)=>{s.set(d,h),r++,r>l&&(r=0,c=s,s=new Map)};return{get(d){let h=s.get(d);if(h!==void 0)return h;if((h=c.get(d))!==void 0)return f(d,h),h},set(d,h){s.has(d)?s.set(d,h):f(d,h)}}},Yc="!",Qc=":",Tb=Qc.length,Ab=l=>{const{prefix:r,experimentalParseClassName:s}=l;let c=f=>{const d=[];let h=0,x=0,g=0,m;for(let j=0;j<f.length;j++){let C=f[j];if(h===0&&x===0){if(C===Qc){d.push(f.slice(g,j)),g=j+Tb;continue}if(C==="/"){m=j;continue}}C==="["?h++:C==="]"?h--:C==="("?x++:C===")"&&x--}const y=d.length===0?f:f.substring(g),S=Rb(y),v=S!==y,R=m&&m>g?m-g:void 0;return{modifiers:d,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:R}};if(r){const f=r+Qc,d=c;c=h=>h.startsWith(f)?d(h.substring(f.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:h,maybePostfixModifierPosition:void 0}}if(s){const f=c;c=d=>s({className:d,parseClassName:f})}return c},Rb=l=>l.endsWith(Yc)?l.substring(0,l.length-1):l.startsWith(Yc)?l.substring(1):l,Ob=l=>{const r=Object.fromEntries(l.orderSensitiveModifiers.map(c=>[c,!0]));return c=>{if(c.length<=1)return c;const f=[];let d=[];return c.forEach(h=>{h[0]==="["||r[h]?(f.push(...d.sort(),h),d=[]):d.push(h)}),f.push(...d.sort()),f}},Mb=l=>({cache:kb(l.cacheSize),parseClassName:Ab(l),sortModifiers:Ob(l),...jb(l)}),zb=/\s+/,Db=(l,r)=>{const{parseClassName:s,getClassGroupId:c,getConflictingClassGroupIds:f,sortModifiers:d}=r,h=[],x=l.trim().split(zb);let g="";for(let m=x.length-1;m>=0;m-=1){const y=x[m],{isExternal:S,modifiers:v,hasImportantModifier:R,baseClassName:j,maybePostfixModifierPosition:C}=s(y);if(S){g=y+(g.length>0?" "+g:g);continue}let T=!!C,M=c(T?j.substring(0,C):j);if(!M){if(!T){g=y+(g.length>0?" "+g:g);continue}if(M=c(j),!M){g=y+(g.length>0?" "+g:g);continue}T=!1}const k=d(v).join(":"),U=R?k+Yc:k,K=U+M;if(h.includes(K))continue;h.push(K);const Y=f(M,T);for(let ce=0;ce<Y.length;++ce){const X=Y[ce];h.push(U+X)}g=y+(g.length>0?" "+g:g)}return g};function Ub(){let l=0,r,s,c="";for(;l<arguments.length;)(r=arguments[l++])&&(s=hg(r))&&(c&&(c+=" "),c+=s);return c}const hg=l=>{if(typeof l=="string")return l;let r,s="";for(let c=0;c<l.length;c++)l[c]&&(r=hg(l[c]))&&(s&&(s+=" "),s+=r);return s};function Lb(l,...r){let s,c,f,d=h;function h(g){const m=r.reduce((y,S)=>S(y),l());return s=Mb(m),c=s.cache.get,f=s.cache.set,d=x,x(g)}function x(g){const m=c(g);if(m)return m;const y=Db(g,s);return f(g,y),y}return function(){return d(Ub.apply(null,arguments))}}const lt=l=>{const r=s=>s[l]||[];return r.isThemeGetter=!0,r},gg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,pg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_b=/^\d+\/\d+$/,Hb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bb=/\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$/,qb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xl=l=>_b.test(l),Ee=l=>!!l&&!Number.isNaN(Number(l)),tn=l=>!!l&&Number.isInteger(Number(l)),_c=l=>l.endsWith("%")&&Ee(l.slice(0,-1)),Ta=l=>Hb.test(l),Kb=()=>!0,$b=l=>Bb.test(l)&&!qb.test(l),xg=()=>!1,Yb=l=>Vb.test(l),Qb=l=>Gb.test(l),Xb=l=>!me(l)&&!he(l),Pb=l=>Cl(l,vg,xg),me=l=>gg.test(l),Tn=l=>Cl(l,wg,$b),Hc=l=>Cl(l,Wb,Ee),hh=l=>Cl(l,yg,xg),Zb=l=>Cl(l,bg,Qb),ni=l=>Cl(l,Sg,Yb),he=l=>pg.test(l),ks=l=>El(l,wg),Jb=l=>El(l,ev),gh=l=>El(l,yg),Fb=l=>El(l,vg),Ib=l=>El(l,bg),li=l=>El(l,Sg,!0),Cl=(l,r,s)=>{const c=gg.exec(l);return c?c[1]?r(c[1]):s(c[2]):!1},El=(l,r,s=!1)=>{const c=pg.exec(l);return c?c[1]?r(c[1]):s:!1},yg=l=>l==="position"||l==="percentage",bg=l=>l==="image"||l==="url",vg=l=>l==="length"||l==="size"||l==="bg-size",wg=l=>l==="length",Wb=l=>l==="number",ev=l=>l==="family-name",Sg=l=>l==="shadow",tv=()=>{const l=lt("color"),r=lt("font"),s=lt("text"),c=lt("font-weight"),f=lt("tracking"),d=lt("leading"),h=lt("breakpoint"),x=lt("container"),g=lt("spacing"),m=lt("radius"),y=lt("shadow"),S=lt("inset-shadow"),v=lt("text-shadow"),R=lt("drop-shadow"),j=lt("blur"),C=lt("perspective"),T=lt("aspect"),M=lt("ease"),k=lt("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...K(),he,me],ce=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],$=()=>[he,me,g],I=()=>[xl,"full","auto",...$()],H=()=>[tn,"none","subgrid",he,me],q=()=>["auto",{span:["full",tn,he,me]},tn,he,me],te=()=>[tn,"auto",he,me],ae=()=>["auto","min","max","fr",he,me],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...$()],W=()=>[xl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],D=()=>[l,he,me],ue=()=>[...K(),gh,hh,{position:[he,me]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Fb,Pb,{size:[he,me]}],le=()=>[_c,ks,Tn],P=()=>["","none","full",m,he,me],re=()=>["",Ee,ks,Tn],Se=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Ee,_c,gh,hh],ie=()=>["","none",j,he,me],pe=()=>["none",Ee,he,me],xe=()=>["none",Ee,he,me],Me=()=>[Ee,he,me],Ve=()=>[xl,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ta],breakpoint:[Ta],color:[Kb],container:[Ta],"drop-shadow":[Ta],ease:["in","out","in-out"],font:[Xb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ta],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ta],shadow:[Ta],spacing:["px",Ee],text:[Ta],"text-shadow":[Ta],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xl,me,he,T]}],container:["container"],columns:[{columns:[Ee,me,he,x]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:Y()}],overflow:[{overflow:ce()}],"overflow-x":[{"overflow-x":ce()}],"overflow-y":[{"overflow-y":ce()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[tn,"auto",he,me]}],basis:[{basis:[xl,"full","auto",x,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ee,xl,"auto","initial","none",me]}],grow:[{grow:["",Ee,he,me]}],shrink:[{shrink:["",Ee,he,me]}],order:[{order:[tn,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[x,"screen",...W()]}],"min-w":[{"min-w":[x,"screen","none",...W()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[h]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,ks,Tn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[c,he,Hc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_c,me]}],"font-family":[{font:[Jb,me,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[f,he,me]}],"line-clamp":[{"line-clamp":[Ee,"none",he,Hc]}],leading:[{leading:[d,...$()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"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:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ee,"from-font","auto",he,Tn]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Ee,"auto",he,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,me]}],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",he,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tn,he,me],radial:["",he,me],conic:[tn,he,me]},Ib,Zb]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"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:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ee,he,me]}],"outline-w":[{outline:["",Ee,ks,Tn]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",y,li,ni]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",S,li,ni]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Ee,Tn]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",v,li,ni]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Ee,he,me]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"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":[Ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"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":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"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":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"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":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"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":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"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":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"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":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"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":K()}],"mask-image-conic-pos":[{"mask-conic":[Ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"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:ue()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:ie()}],brightness:[{brightness:[Ee,he,me]}],contrast:[{contrast:[Ee,he,me]}],"drop-shadow":[{"drop-shadow":["","none",R,li,ni]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Ee,he,me]}],"hue-rotate":[{"hue-rotate":[Ee,he,me]}],invert:[{invert:["",Ee,he,me]}],saturate:[{saturate:[Ee,he,me]}],sepia:[{sepia:["",Ee,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[Ee,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ee,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ee,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ee,he,me]}],"backdrop-invert":[{"backdrop-invert":["",Ee,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ee,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ee,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ee,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ee,"initial",he,me]}],ease:[{ease:["linear","initial",M,he,me]}],delay:[{delay:[Ee,he,me]}],animate:[{animate:["none",k,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,he,me]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"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",he,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,me]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Ee,ks,Tn,Hc]}],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"]}},av=Lb(tv);function an(...l){return av(Sb(l))}const nv=({message:l,type:r="info",duration:s=3e3,onClose:c,visible:f})=>{w.useEffect(()=>{if(f){const g=setTimeout(()=>{c()},s);return()=>clearTimeout(g)}},[f,s,c]);const d={success:i.jsx(yi,{className:"w-5 h-5 text-green-500"}),error:i.jsx(Ms,{className:"w-5 h-5 text-red-500"}),info:i.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.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:i.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.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"})})},h={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"},x={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return i.jsx("div",{className:an("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",h[r],"transform transition-all duration-300 ease-in-out",f?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:i.jsxs("div",{className:"flex items-start",children:[i.jsx("div",{className:"flex-shrink-0",children:d[r]}),i.jsx("div",{className:"ml-3",children:i.jsx("p",{className:an("text-sm font-medium",x[r]),children:l})}),i.jsx("div",{className:"ml-auto pl-3",children:i.jsx("div",{className:"-mx-1.5 -my-1.5",children:i.jsxs("button",{onClick:c,className:an("inline-flex rounded-md p-1.5",`hover:bg-${r}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${r}-500`),children:[i.jsx("span",{className:"sr-only",children:"Dismiss"}),i.jsx(Ms,{className:"h-5 w-5"})]})})})]})})},jg=w.createContext(void 0),Ls=()=>{const l=w.useContext(jg);if(!l)throw new Error("useToast must be used within a ToastProvider");return l},lv=({children:l})=>{const[r,s]=w.useState({message:"",type:"info",visible:!1,duration:3e3}),c=w.useCallback((d,h="info",x=3e3)=>{s({message:d,type:h,visible:!0,duration:x})},[]),f=w.useCallback(()=>{s(d=>({...d,visible:!1}))},[]);return i.jsxs(jg.Provider,{value:{showToast:c},children:[l,i.jsx(nv,{message:r.message,type:r.type,duration:r.duration,onClose:f,visible:r.visible})]})},Ng=w.createContext(void 0),sv=()=>{const l=w.useContext(Ng);if(!l)throw new Error("useTheme must be used within a ThemeProvider");return l},rv=({children:l})=>{const[r,s]=w.useState(()=>localStorage.getItem("theme")||"system"),[c,f]=w.useState("light"),d=h=>{s(h),localStorage.setItem("theme",h)};return w.useEffect(()=>{const h=()=>{const g=window.document.documentElement,m=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",y=r==="system"?m:r;f(y),y==="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="")},x=window.matchMedia("(prefers-color-scheme: dark)");return x.addEventListener("change",h),h(),()=>{x.removeEventListener("change",h)}},[r]),i.jsx(Ng.Provider,{value:{theme:r,setTheme:d,resolvedTheme:c},children:l})},iv=(l,r,s,c)=>{var d,h,x,g;const f=[s,{code:r,...c||{}}];if((h=(d=l==null?void 0:l.services)==null?void 0:d.logger)!=null&&h.forward)return l.services.logger.forward(f,"warn","react-i18next::",!0);An(f[0])&&(f[0]=`react-i18next:: ${f[0]}`),(g=(x=l==null?void 0:l.services)==null?void 0:x.logger)!=null&&g.warn?l.services.logger.warn(...f):console!=null&&console.warn&&console.warn(...f)},ph={},Xc=(l,r,s,c)=>{An(s)&&ph[s]||(An(s)&&(ph[s]=new Date),iv(l,r,s,c))},Cg=(l,r)=>()=>{if(l.isInitialized)r();else{const s=()=>{setTimeout(()=>{l.off("initialized",s)},0),r()};l.on("initialized",s)}},Pc=(l,r,s)=>{l.loadNamespaces(r,Cg(l,s))},xh=(l,r,s,c)=>{if(An(s)&&(s=[s]),l.options.preload&&l.options.preload.indexOf(r)>-1)return Pc(l,s,c);s.forEach(f=>{l.options.ns.indexOf(f)<0&&l.options.ns.push(f)}),l.loadLanguages(r,Cg(l,c))},ov=(l,r,s={})=>!r.languages||!r.languages.length?(Xc(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(l,{lng:s.lng,precheck:(c,f)=>{var d;if(((d=s.bindI18n)==null?void 0:d.indexOf("languageChanging"))>-1&&c.services.backendConnector.backend&&c.isLanguageChangingTo&&!f(c.isLanguageChangingTo,l))return!1}}),An=l=>typeof l=="string",cv=l=>typeof l=="object"&&l!==null,uv=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,dv={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},fv=l=>dv[l],mv=l=>l.replace(uv,fv);let Zc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:mv};const hv=(l={})=>{Zc={...Zc,...l}},gv=()=>Zc;let Eg;const pv=l=>{Eg=l},xv=()=>Eg,yv={type:"3rdParty",init(l){hv(l.options.react),pv(l)}},bv=w.createContext();class vv{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const wv=(l,r)=>{const s=w.useRef();return w.useEffect(()=>{s.current=l},[l,r]),s.current},kg=(l,r,s,c)=>l.getFixedT(r,s,c),Sv=(l,r,s,c)=>w.useCallback(kg(l,r,s,c),[l,r,s,c]),Oe=(l,r={})=>{var K,Y,ce,X;const{i18n:s}=r,{i18n:c,defaultNS:f}=w.useContext(bv)||{},d=s||c||xv();if(d&&!d.reportNamespaces&&(d.reportNamespaces=new vv),!d){Xc(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const $=(H,q)=>An(q)?q:cv(q)&&An(q.defaultValue)?q.defaultValue:Array.isArray(H)?H[H.length-1]:H,I=[$,{},!1];return I.t=$,I.i18n={},I.ready=!1,I}(K=d.options.react)!=null&&K.wait&&Xc(d,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...gv(),...d.options.react,...r},{useSuspense:x,keyPrefix:g}=h;let m=f||((Y=d.options)==null?void 0:Y.defaultNS);m=An(m)?[m]:m||["translation"],(X=(ce=d.reportNamespaces).addUsedNamespaces)==null||X.call(ce,m);const y=(d.isInitialized||d.initializedStoreOnce)&&m.every($=>ov($,d,h)),S=Sv(d,r.lng||null,h.nsMode==="fallback"?m:m[0],g),v=()=>S,R=()=>kg(d,r.lng||null,h.nsMode==="fallback"?m:m[0],g),[j,C]=w.useState(v);let T=m.join();r.lng&&(T=`${r.lng}${T}`);const M=wv(T),k=w.useRef(!0);w.useEffect(()=>{const{bindI18n:$,bindI18nStore:I}=h;k.current=!0,!y&&!x&&(r.lng?xh(d,r.lng,m,()=>{k.current&&C(R)}):Pc(d,m,()=>{k.current&&C(R)})),y&&M&&M!==T&&k.current&&C(R);const H=()=>{k.current&&C(R)};return $&&(d==null||d.on($,H)),I&&(d==null||d.store.on(I,H)),()=>{k.current=!1,d&&($==null||$.split(" ").forEach(q=>d.off(q,H))),I&&d&&I.split(" ").forEach(q=>d.store.off(q,H))}},[d,T]),w.useEffect(()=>{k.current&&y&&C(v)},[d,g,y]);const U=[j,d,y];if(U.t=j,U.i18n=d,U.ready=y,y||!y&&!x)return U;throw new Promise($=>{r.lng?xh(d,r.lng,m,()=>$()):Pc(d,m,()=>$())})},Tg=()=>{const{t:l}=Oe(),{theme:r,setTheme:s}=sv();return i.jsx("div",{className:"flex items-center space-x-2",children:i.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[i.jsx("button",{onClick:()=>s("light"),className:`flex items-center justify-center rounded-md p-1.5 ${r==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:l("theme.light"),"aria-label":l("theme.light"),children:i.jsx(pb,{size:18})}),i.jsx("button",{onClick:()=>s("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${r==="dark"?"bg-gray-800 text-blue-400 shadow":"text-gray-600 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400"}`,title:l("theme.dark"),"aria-label":l("theme.dark"),children:i.jsx(ib,{size:18})})]})})},jv=l=>i.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[i.jsx("title",{children:"GitHub"}),i.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"})]}),Nv=l=>i.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[i.jsx("title",{children:"Sponsor"}),i.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"})]}),Cv=l=>i.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[i.jsx("title",{children:"WeChat"}),i.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"})]}),Ev=l=>i.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[i.jsx("title",{children:"Discord"}),i.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"})]}),kv=({open:l,onOpenChange:r})=>{const{i18n:s,t:c}=Oe();return l?i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:i.jsxs("div",{className:"p-6 relative",children:[i.jsx("button",{onClick:()=>r(!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":c("common.close"),children:i.jsx(Ms,{className:"h-5 w-5"})}),i.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:c("sponsor.title")}),i.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:s.language==="zh"?i.jsx("img",{src:"./assets/reward.png",alt:c("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:c("sponsor.supportMessage")}),i.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:c("sponsor.supportButton")})]})})]})})}):null},Tv=({open:l,onOpenChange:r})=>{const{t:s}=Oe();return l?i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:i.jsxs("div",{className:"p-6 relative",children:[i.jsx("button",{onClick:()=>r(!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":s("common.close"),children:i.jsx(Ms,{className:"h-5 w-5"})}),i.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:s("wechat.title")}),i.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[i.jsx("img",{src:"./assets/wexin.png",alt:s("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),i.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:s("wechat.scanMessage")})]})]})})}):null},Av=({onToggleSidebar:l})=>{const{t:r,i18n:s}=Oe(),{auth:c}=xi(),[f,d]=w.useState(!1),[h,x]=w.useState(!1);return i.jsxs("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:[i.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("button",{onClick:l,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":r("app.toggleSidebar"),children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),i.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:r("app.title")})]}),i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.8.0"}),i.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200","aria-label":"GitHub Repository",children:i.jsx(jv,{className:"h-5 w-5"})}),s.language==="zh"?i.jsx("button",{onClick:()=>x(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":r("wechat.label"),children:i.jsx(Cv,{className:"h-5 w-5"})}):i.jsx("a",{href:"https://discord.gg/qMKNsn5Q",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200","aria-label":r("discord.label"),children:i.jsx(Ev,{className:"h-5 w-5"})}),i.jsx("button",{onClick:()=>d(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":r("sponsor.label"),children:i.jsx(Nv,{className:"h-5 w-5"})}),i.jsx(Tg,{})]})]}),i.jsx(kv,{open:f,onOpenChange:d}),i.jsx(Tv,{open:h,onOpenChange:x})]})},Rv="https://registry.npmjs.org",Ov="@samanhappy/mcphub",Ag=async()=>{try{const l=await fetch(`${Rv}/${Ov}/latest`);if(!l.ok)throw new Error(`Failed to fetch latest version: ${l.status}`);return(await l.json()).version||null}catch(l){return console.error("Error checking for latest version:",l),null}},Rg=(l,r)=>{if(l==="dev")return-1;const s=l.split(".").map(Number),c=r.split(".").map(Number);for(let f=0;f<3;f++){const d=s[f]||0,h=c[f]||0;if(d>h)return-1;if(d<h)return 1}return 0},Mv=({isOpen:l,onClose:r,version:s})=>{const{t:c}=Oe(),[f,d]=w.useState(!1),[h,x]=w.useState(""),[g,m]=w.useState(!1),y=async()=>{m(!0);try{const S=await Ag();S&&(x(S),d(Rg(s,S)>0))}catch(S){console.error("Failed to check for updates:",S)}finally{m(!1)}};return w.useEffect(()=>{l&&y()},[l,s]),l?i.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:i.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:i.jsxs("div",{className:"p-6 relative",children:[i.jsx("button",{onClick:r,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":c("common.close"),children:i.jsx(Ms,{className:"h-5 w-5"})}),i.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:c("about.title")}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[c("about.currentVersion"),":"]}),i.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:s})]}),f&&h&&i.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:i.jsxs("div",{className:"flex items-start",children:[i.jsx("div",{className:"flex-shrink-0",children:i.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.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"})})}),i.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[i.jsx("p",{children:c("about.newVersionAvailable",{version:h})}),i.jsx("p",{className:"mt-1",children:i.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:c("about.viewOnGitHub")})})]})]})}),i.jsxs("button",{onClick:y,disabled:g,className:`mt-4 inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium
|
|
167
|
-
${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:[i.jsx(db,{className:`h-4 w-4 mr-2 ${g?"animate-spin":""}`}),c(g?"about.checking":"about.checkForUpdates")]})]})]})})}):null},zv=({collapsed:l,version:r})=>{var T;const{t:s}=Oe(),c=Rn(),{auth:f,logout:d}=xi(),[h,x]=w.useState(!1),[g,m]=w.useState(!1),[y,S]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{(async()=>{try{const k=await Ag();k&&m(Rg(r,k)>0)}catch(k){console.error("Error checking for new version:",k)}})()},[r]),w.useEffect(()=>{const M=k=>{v.current&&!v.current.contains(k.target)&&x(!1)};return document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}},[]);const R=()=>{c("/settings"),x(!1)},j=()=>{d(),c("/login")},C=()=>{S(!0),x(!1)};return i.jsxs("div",{ref:v,className:"relative",children:[i.jsxs("button",{onClick:()=>x(!h),className:`flex ${l?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${h?"bg-gray-100 dark:bg-gray-700":""}`,children:[i.jsxs("div",{className:"flex-shrink-0 relative",children:[i.jsx("div",{className:"w-7 h-7 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700",children:i.jsx(vb,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),g&&i.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!l&&i.jsx("div",{className:"ml-3 flex flex-col items-start",children:i.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((T=f.user)==null?void 0:T.username)||s("auth.user")})})]}),h&&i.jsxs("div",{className:"absolute top-0 transform -translate-y-full left-0 w-48 bg-white dark:bg-gray-800 shadow-lg rounded-md py-1 z-50",children:[i.jsxs("button",{onClick:R,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:[i.jsx(mb,{className:"h-4 w-4 mr-2"}),s("nav.settings")]}),i.jsxs("button",{onClick:C,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:[i.jsx(tb,{className:"h-4 w-4 mr-2"}),s("about.title"),g&&i.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),i.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:[i.jsx(sb,{className:"h-4 w-4 mr-2"}),s("app.logout")]})]}),i.jsx(Mv,{isOpen:y,onClose:()=>S(!1),version:r})]})},Dv=({collapsed:l})=>{const{t:r}=Oe();da();const s="0.8.0",c=[{path:"/",label:r("nav.dashboard"),icon:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[i.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),i.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:r("nav.servers"),icon:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:r("nav.groups"),icon:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})})},{path:"/market",label:r("nav.market"),icon:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:r("nav.logs"),icon:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:i.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 i.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${l?"w-16":"w-64"}`,children:[i.jsx("div",{className:"overflow-y-auto flex-grow",children:i.jsx("nav",{className:"p-3 space-y-1",children:c.map(f=>i.jsxs(tg,{to:f.path,className:({isActive:d})=>`flex items-center px-3 py-2 rounded-md transition-colors ${d?"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,end:f.path==="/",children:[i.jsx("span",{className:"flex-shrink-0",children:f.icon}),!l&&i.jsx("span",{className:"ml-3",children:f.label})]},f.path))})}),i.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:i.jsx(zv,{collapsed:l,version:s})})]})},Uv=({children:l})=>i.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:i.jsx("div",{className:"container mx-auto",children:l})}),Lv=()=>{const[l,r]=qc.useState(!1),s=()=>{r(!l)};return i.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[i.jsx(Av,{onToggleSidebar:s}),i.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[i.jsx(Dv,{collapsed:l}),i.jsx(Uv,{children:i.jsx(Zh,{})})]})]})},_v=({redirectPath:l="/login"})=>{const{t:r}=Oe(),{auth:s}=xi();return s.loading?i.jsx("div",{className:"flex items-center justify-center h-screen",children:r("app.loading")}):s.isAuthenticated?i.jsx(Zh,{}):i.jsx(Ph,{to:l,replace:!0})},Hv=()=>{const{t:l}=Oe(),[r,s]=w.useState(""),[c,f]=w.useState(""),[d,h]=w.useState(null),[x,g]=w.useState(!1),{login:m}=xi(),y=Rn(),S=async v=>{v.preventDefault(),h(null),g(!0);try{if(!r||!c){h(l("auth.emptyFields")),g(!1);return}await m(r,c)?y("/"):h(l("auth.loginFailed"))}catch{h(l("auth.loginError"))}finally{g(!1)}};return i.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8",children:[i.jsx("div",{className:"absolute top-4 right-4",children:i.jsx(Tg,{})}),i.jsxs("div",{className:"max-w-md w-full space-y-8",children:[i.jsx("div",{children:i.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:l("auth.loginTitle")})}),i.jsxs("form",{className:"mt-8 space-y-6",onSubmit:S,children:[i.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[i.jsxs("div",{children:[i.jsx("label",{htmlFor:"username",className:"sr-only",children:l("auth.username")}),i.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:l("auth.username"),value:r,onChange:v=>s(v.target.value)})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"password",className:"sr-only",children:l("auth.password")}),i.jsx("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:l("auth.password"),value:c,onChange:v=>f(v.target.value)})]})]}),d&&i.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:d}),i.jsx("div",{children:i.jsx("button",{type:"submit",disabled:x,className:"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:l(x?"auth.loggingIn":"auth.login")})})]})]})]})},si={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},_s=()=>{const{t:l}=Oe(),[r,s]=w.useState([]),[c,f]=w.useState(null),[d,h]=w.useState(0),[x,g]=w.useState(!0),[m,y]=w.useState(0),S=w.useRef(null),v=w.useRef(0),R=()=>{S.current&&(clearInterval(S.current),S.current=null)},j=w.useCallback(()=>{R();const K=async()=>{try{const Y=localStorage.getItem("mcphub_token"),X=await(await fetch(ke("/servers"),{headers:{"x-auth-token":Y||""}})).json();X&&X.success&&Array.isArray(X.data)?s(X.data):X&&Array.isArray(X)?s(X):(console.error("Invalid server data format:",X),s([])),f(null)}catch(Y){console.error("Error fetching servers during normal polling:",Y),navigator.onLine?Y instanceof TypeError&&(Y.message.includes("NetworkError")||Y.message.includes("Failed to fetch"))?f(l("errors.serverConnection")):f(l("errors.serverFetch")):f(l("errors.network"))}};K(),S.current=setInterval(K,si.normal.pollingInterval)},[l]);return w.useEffect(()=>{d>0&&(v.current=0,y(0));const K=async()=>{try{const Y=localStorage.getItem("mcphub_token"),X=await(await fetch(ke("/servers"),{headers:{"x-auth-token":Y||""}})).json();return X&&X.success&&Array.isArray(X.data)?(s(X.data),g(!1),j(),!0):X&&Array.isArray(X)?(s(X),g(!1),j(),!0):(console.error("Invalid server data format:",X),s([]),g(!1),j(),!0)}catch(Y){return v.current+=1,console.error(`Initial loading attempt ${v.current} failed:`,Y),y(v.current),navigator.onLine?f(l("errors.initialStartup")):f(l("errors.network")),v.current>=si.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),g(!1),R(),j()),!1}};return x?(R(),K(),S.current=setInterval(K,si.startup.pollingInterval),console.log(`Started initial polling with interval: ${si.startup.pollingInterval}ms`)):j(),()=>{R()}},[d,l,x,j]),{servers:r,error:c,setError:f,isLoading:x,fetchAttempts:m,triggerRefresh:()=>{R(),x&&(g(!0),v.current=0,y(0)),h(K=>K+1)},handleServerAdd:()=>{h(K=>K+1)},handleServerEdit:async K=>{try{const Y=localStorage.getItem("mcphub_token"),X=await(await fetch(ke("/settings"),{headers:{"x-auth-token":Y||""}})).json();if(X&&X.success&&X.data&&X.data.mcpServers&&X.data.mcpServers[K.name]){const $=X.data.mcpServers[K.name];return{name:K.name,status:K.status,tools:K.tools||[],config:$}}else return console.error("Failed to get server config from settings:",X),f(l("server.invalidConfig",{serverName:K.name})),null}catch(Y){return console.error("Error fetching server settings:",Y),f(Y instanceof Error?Y.message:String(Y)),null}},handleServerRemove:async K=>{try{const Y=localStorage.getItem("mcphub_token"),ce=await fetch(ke(`/servers/${K}`),{method:"DELETE",headers:{"x-auth-token":Y||""}}),X=await ce.json();return ce.ok?(h($=>$+1),!0):(f(X.message||l("server.deleteError",{serverName:K})),!1)}catch(Y){return f(l("errors.general")+": "+(Y instanceof Error?Y.message:String(Y))),!1}},handleServerToggle:async(K,Y)=>{try{const ce=localStorage.getItem("mcphub_token"),X=await fetch(ke(`/servers/${K.name}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":ce||""},body:JSON.stringify({enabled:Y})}),$=await X.json();return X.ok?(h(I=>I+1),!0):(console.error("Failed to toggle server:",$),f(l("server.toggleError",{serverName:K.name})),!1)}catch(ce){return console.error("Error toggling server:",ce),f(ce instanceof Error?ce.message:String(ce)),!1}}}},Bv=()=>{const{t:l}=Oe(),{servers:r,error:s,setError:c,isLoading:f}=_s(),d={total:r.length,online:r.filter(g=>g.status==="connected").length,offline:r.filter(g=>g.status==="disconnected").length,connecting:r.filter(g=>g.status==="connecting").length},h={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},x=g=>r.length===0?0:Math.round(r.filter(m=>m.status===g).length/r.length*100);return i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.dashboard.title")}),s&&i.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),i.jsx("p",{className:"text-gray-600 mt-1",children:s})]}),i.jsx("button",{onClick:()=>c(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})})})]})}),f?i.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:i.jsxs("div",{className:"flex flex-col items-center",children:[i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):i.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[i.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.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"})})}),i.jsxs("div",{className:"ml-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.totalServers")}),i.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.total})]})]})}),i.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.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"})})}),i.jsxs("div",{className:"ml-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.onlineServers")}),i.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.online})]})]}),i.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:i.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${x("connected")}%`}})})]}),i.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.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"})})}),i.jsxs("div",{className:"ml-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.offlineServers")}),i.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.offline})]})]}),i.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:i.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${x("disconnected")}%`}})})]}),i.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),i.jsxs("div",{className:"ml-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.connectingServers")}),i.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.connecting})]})]}),i.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:i.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${x("connecting")}%`}})})]})]}),r.length>0&&!f&&i.jsxs("div",{className:"mt-8",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:l("pages.dashboard.recentServers")}),i.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.name")}),i.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.status")}),i.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.tools")}),i.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.enabled")})]})}),i.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.slice(0,5).map((g,m)=>{var y;return i.jsxs("tr",{children:[i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:g.name}),i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:i.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${g.status==="connected"?"bg-green-100 text-green-800":g.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:l(h[g.status]||g.status)})}),i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((y=g.tools)==null?void 0:y.length)||0}),i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:g.enabled!==!1?i.jsx("span",{className:"text-green-600",children:"✓"}):i.jsx("span",{className:"text-red-600",children:"✗"})})]},m)})})]})})]})]})},qv="modulepreload",Vv=function(l,r){return new URL(l,r).href},yh={},Gv=function(r,s,c){let f=Promise.resolve();if(s&&s.length>0){let h=function(y){return Promise.all(y.map(S=>Promise.resolve(S).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const x=document.getElementsByTagName("link"),g=document.querySelector("meta[property=csp-nonce]"),m=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));f=h(s.map(y=>{if(y=Vv(y,c),y in yh)return;yh[y]=!0;const S=y.endsWith(".css"),v=S?'[rel="stylesheet"]':"";if(!!c)for(let C=x.length-1;C>=0;C--){const T=x[C];if(T.href===y&&(!S||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${v}`))return;const j=document.createElement("link");if(j.rel=S?"stylesheet":qv,S||(j.as="script"),j.crossOrigin="",j.href=y,m&&j.setAttribute("nonce",m),document.head.appendChild(j),S)return new Promise((C,T)=>{j.addEventListener("load",C),j.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${y}`)))})}))}function d(h){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=h,window.dispatchEvent(x),!x.defaultPrevented)throw h}return f.then(h=>{for(const x of h||[])x.status==="rejected"&&d(x.reason);return r().catch(d)})},Kv={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 ri({children:l,variant:r="default",className:s,onClick:c}){return i.jsx("span",{className:an("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",Kv[r],c?"cursor-pointer":"",s),onClick:c,children:l})}const $v=({status:l})=>{const{t:r}=Oe(),s={connecting:"bg-yellow-100 text-yellow-800",connected:"bg-green-100 text-green-800",disconnected:"bg-red-100 text-red-800"},c={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return i.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${s[l]}`,children:r(c[l]||l)})},Og=async(l,r)=>{try{const s=nn();if(!s)throw new Error("Authentication token not found. Please log in.");const c=r?`/tools/call/${r}`:"/tools/call",f=await fetch(ke(c),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":s,Authorization:`Bearer ${s}`},body:JSON.stringify({toolName:l.toolName,arguments:l.arguments})});if(!f.ok)throw new Error(`HTTP ${f.status}: ${f.statusText}`);const d=await f.json();return d.success?{success:!0,content:d.data.content||[]}:{success:!1,error:d.message||"Tool call failed"}}catch(s){return console.error("Error calling tool:",s),{success:!1,error:s instanceof Error?s.message:"Unknown error occurred"}}},Yv=async(l,r,s)=>{try{const c=nn();if(!c)throw new Error("Authentication token not found. Please log in.");const f=await fetch(ke(`/servers/${l}/tools/${r}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":c,Authorization:`Bearer ${c}`},body:JSON.stringify({enabled:s})});if(!f.ok)throw new Error(`HTTP ${f.status}: ${f.statusText}`);const d=await f.json();return{success:d.success,error:d.success?void 0:d.message}}catch(c){return console.error("Error toggling tool:",c),{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}},Mg=async(l,r,s)=>{try{const c=nn();if(!c)throw new Error("Authentication token not found. Please log in.");const f=await fetch(ke(`/servers/${l}/tools/${r}/description`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":c,Authorization:`Bearer ${c}`},body:JSON.stringify({description:s})});if(!f.ok)throw new Error(`HTTP ${f.status}: ${f.statusText}`);const d=await f.json();return{success:d.success,error:d.success?void 0:d.message}}catch(c){return console.error("Error updating tool description:",c),{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}},Qv=Object.freeze(Object.defineProperty({__proto__:null,callTool:Og,toggleTool:Yv,updateToolDescription:Mg},Symbol.toStringTag,{value:"Module"})),Xv=({value:l,isSelected:r,onClick:s,children:c})=>i.jsxs("button",{type:"button",role:"checkbox","aria-checked":r,className:an("flex w-full items-center justify-between p-2 rounded transition-colors cursor-pointer",r?"bg-blue-50 text-blue-700 hover:bg-blue-100 border-l-4 border-blue-500":"hover:bg-gray-50 text-gray-700"),onClick:s,children:[i.jsx("span",{className:"flex items-center",children:c}),r&&i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5 text-blue-500",children:i.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]}),zg=({label:l,helpText:r,noOptionsText:s="No options available",values:c,options:f,onChange:d,className:h})=>{const x=g=>{const m=c.includes(g);d(m?c.filter(y=>y!==g):[...c,g])};return i.jsxs("div",{className:h,children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:l}),i.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:f.length===0?i.jsx("p",{className:"text-gray-500 text-sm p-3",children:s}):i.jsx("div",{className:"space-y-1 p-1",children:f.map(g=>i.jsx(Xv,{value:g.value,isSelected:c.includes(g.value),onClick:()=>x(g.value),children:g.label},g.value))})}),r&&i.jsx("p",{className:"text-xs text-gray-500 mt-1",children:r})]})},As=({checked:l,onCheckedChange:r,disabled:s=!1})=>i.jsx("button",{type:"button",role:"switch","aria-checked":l,disabled:s,className:an("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",l?"bg-blue-600":"bg-gray-200",s?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!s&&r(!l),children:i.jsx("span",{className:an("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",l?"translate-x-6":"translate-x-1")})}),Pv=({schema:l,onSubmit:r,onCancel:s,loading:c=!1,storageKey:f})=>{const{t:d}=Oe(),[h,x]=w.useState({}),[g,m]=w.useState({}),[y,S]=w.useState(!1),[v,R]=w.useState(""),[j,C]=w.useState(""),T=w.useMemo(()=>(q=>{const te=ae=>{if(typeof ae=="object"&&ae!==null){const ne=ae;return{type:ne.type||"string",description:ne.description,enum:ne.enum,default:ne.default,properties:ne.properties?Object.fromEntries(Object.entries(ne.properties).map(([V,O])=>[V,te(O)])):void 0,required:ne.required,items:ne.items?te(ne.items):void 0}}return{type:"string"}};return{type:q.type,properties:q.properties?Object.fromEntries(Object.entries(q.properties).map(([ae,ne])=>[ae,te(ne)])):void 0,required:q.required}})(l),[l]);w.useEffect(()=>{const H=(te,ae="")=>{const ne={};return te.type==="object"&&te.properties&&Object.entries(te.properties).forEach(([V,O])=>{const W=ae?`${ae}.${V}`:V;O.default!==void 0?ne[V]=O.default:O.type==="string"?ne[V]="":O.type==="number"||O.type==="integer"?ne[V]=0:O.type==="boolean"?ne[V]=!1:O.type==="array"?ne[V]=[]:O.type==="object"&&(O.properties?ne[V]=H(O,W):ne[V]={})}),ne};let q=H(T);if(f)try{const te=localStorage.getItem(f);if(te){const ae=JSON.parse(te);q={...q,...ae}}}catch(te){console.warn("Failed to load saved form data:",te)}x(q)},[T,f]),w.useEffect(()=>{y&&Object.keys(h).length>0&&(R(JSON.stringify(h,null,2)),C(""))},[y,h]);const M=H=>{R(H),C("");try{const q=JSON.parse(H);if(x(q),f)try{localStorage.setItem(f,JSON.stringify(q))}catch(te){console.warn("Failed to save form data to localStorage:",te)}}catch{C(d("tool.invalidJsonFormat"))}},k=()=>{R(JSON.stringify(h,null,2)),C(""),S(!0)},U=()=>{if(v.trim())try{const H=JSON.parse(v);x(H),C(""),S(!1)}catch{C(d("tool.fixJsonBeforeSwitching"));return}else S(!1)},K=(H,q)=>{x(te=>{const ae={...te},ne=H.split(".");let V=ae;for(let O=0;O<ne.length-1;O++)V[ne[O]]||(V[ne[O]]={}),V=V[ne[O]];if(V[ne[ne.length-1]]=q,f)try{localStorage.setItem(f,JSON.stringify(ae))}catch(O){console.warn("Failed to save form data to localStorage:",O)}return ae}),g[H]&&m(te=>{const ae={...te};return delete ae[H],ae})},Y=()=>{const H={},q=(te,ae,ne="")=>{te.type==="object"&&te.properties&&Object.entries(te.properties).forEach(([V,O])=>{var ue;const W=ne?`${ne}.${V}`:V,D=X(ae,W);if((ue=te.required)!=null&&ue.includes(V)&&(D==null||D==="")){H[W]=`${V} is required`;return}D!=null&&D!==""&&(O.type==="string"&&typeof D!="string"?H[W]=`${V} must be a string`:O.type==="number"&&typeof D!="number"?H[W]=`${V} must be a number`:O.type==="integer"&&(!Number.isInteger(D)||typeof D!="number")?H[W]=`${V} must be an integer`:O.type==="boolean"&&typeof D!="boolean"?H[W]=`${V} must be a boolean`:O.type==="array"&&Array.isArray(D)?O.items&&D.forEach((E,Q)=>{var le;((le=O.items)==null?void 0:le.type)==="object"&&O.items.properties&&q(O.items,E,`${W}.${Q}`)}):O.type==="object"&&typeof D=="object"&&q(O,D,W))})};return q(T,h),m(H),Object.keys(H).length===0},ce=H=>{H.preventDefault(),Y()&&r(h)},X=(H,q)=>q.split(".").reduce((te,ae)=>te==null?void 0:te[ae],H),$=(H,q,te,ae)=>{const ne=te==null?void 0:te[H];return q.type==="string"?q.enum?i.jsxs("select",{value:ne||"",onChange:V=>ae(V.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:[i.jsx("option",{value:"",children:d("tool.selectOption")}),q.enum.map((V,O)=>i.jsx("option",{value:V,children:V},O))]}):i.jsx("input",{type:"text",value:ne||"",onChange:V=>ae(V.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",placeholder:q.description||d("tool.enterKey",{key:H})}):q.type==="number"||q.type==="integer"?i.jsx("input",{type:"number",step:q.type==="integer"?"1":"any",value:ne||"",onChange:V=>{const O=V.target.value===""?"":q.type==="integer"?parseInt(V.target.value):parseFloat(V.target.value);ae(O)},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"}):q.type==="boolean"?i.jsx("input",{type:"checkbox",checked:ne||!1,onChange:V=>ae(V.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}):i.jsx("input",{type:"text",value:ne||"",onChange:V=>ae(V.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",placeholder:q.description||d("tool.enterKey",{key:H})})},I=(H,q,te="")=>{var O,W,D,ue,E,Q,le,P,re,Se,ee,se,ie,pe;const ae=te?`${te}.${H}`:H,ne=X(h,ae),V=g[ae];if(q.type==="array"){const xe=X(h,ae)||[];return i.jsxs("div",{className:"mb-6",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(te?(W=(O=X(T,te))==null?void 0:O.required)==null?void 0:W.includes(H):(D=T.required)==null?void 0:D.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),i.jsxs("div",{className:"border border-gray-200 rounded-md p-3 bg-gray-50",children:[xe.map((Me,Ve)=>{var Nt,Ct,fa;return i.jsxs("div",{className:"mb-3 p-3 bg-white border rounded-md",children:[i.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i.jsx("span",{className:"text-sm font-medium text-gray-600",children:d("tool.item",{index:Ve+1})}),i.jsx("button",{type:"button",onClick:()=>{const Ie=[...xe];Ie.splice(Ve,1),K(ae,Ie)},className:"text-red-500 hover:text-red-700 text-sm",children:d("common.remove")})]}),((Nt=q.items)==null?void 0:Nt.type)==="string"&&q.items.enum?i.jsxs("select",{value:Me||"",onChange:Ie=>{const Qe=[...xe];Qe[Ve]=Ie.target.value,K(ae,Qe)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[i.jsx("option",{value:"",children:d("tool.selectOption")}),q.items.enum.map((Ie,Qe)=>i.jsx("option",{value:Ie,children:Ie},Qe))]}):((Ct=q.items)==null?void 0:Ct.type)==="object"&&q.items.properties?i.jsx("div",{className:"space-y-3",children:Object.entries(q.items.properties).map(([Ie,Qe])=>{var ln,Oa;return i.jsxs("div",{children:[i.jsxs("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:[Ie,((Oa=(ln=q.items)==null?void 0:ln.required)==null?void 0:Oa.includes(Ie))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),$(Ie,Qe,Me,sn=>{const Yt=[...xe];Yt[Ve]={...Yt[Ve],[Ie]:sn},K(ae,Yt)})]},Ie)})}):i.jsx("input",{type:"text",value:Me||"",onChange:Ie=>{const Qe=[...xe];Qe[Ve]=Ie.target.value,K(ae,Qe)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:d("tool.enterValue",{type:((fa=q.items)==null?void 0:fa.type)||"value"})})]},Ve)}),i.jsx("button",{type:"button",onClick:()=>{var Ve;const Me=((Ve=q.items)==null?void 0:Ve.type)==="object"?{}:"";K(ae,[...xe,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:d("tool.addItem",{key:H})})]}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae)}return q.type==="object"?q.properties?i.jsxs("div",{className:"mb-6",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(te?(E=(ue=X(T,te))==null?void 0:ue.required)==null?void 0:E.includes(H):(Q=T.required)==null?void 0:Q.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),i.jsx("div",{className:"border border-gray-200 rounded-md p-4 bg-gray-50",children:Object.entries(q.properties).map(([xe,Me])=>I(xe,Me,ae))}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae):i.jsxs("div",{className:"mb-4",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(te?(P=(le=X(T,te))==null?void 0:le.required)==null?void 0:P.includes(H):(re=T.required)==null?void 0:re.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"}),i.jsx("span",{className:"text-xs text-gray-500 ml-1",children:"(JSON object)"})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),i.jsx("textarea",{value:typeof ne=="object"?JSON.stringify(ne,null,2):ne||"{}",onChange:xe=>{try{const Me=JSON.parse(xe.target.value);K(ae,Me)}catch{K(ae,xe.target.value)}},placeholder:`{
|
|
168
|
-
"key": "value"
|
|
169
|
-
}`,className:`w-full border rounded-md px-3 py-2 font-mono text-sm ${V?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,rows:4}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae):q.type==="string"?q.enum?i.jsxs("div",{className:"mb-4",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(te?!1:(Se=T.required)==null?void 0:Se.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),i.jsxs("select",{value:ne||"",onChange:xe=>K(ae,xe.target.value),className:`w-full border rounded-md px-3 py-2 ${V?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[i.jsx("option",{value:"",children:d("tool.selectOption")}),q.enum.map((xe,Me)=>i.jsx("option",{value:xe,children:xe},Me))]}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae):i.jsxs("div",{className:"mb-4",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(te?!1:(ee=T.required)==null?void 0:ee.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),i.jsx("input",{type:"text",value:ne||"",onChange:xe=>K(ae,xe.target.value),className:`w-full border rounded-md px-3 py-2 ${V?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae):q.type==="number"||q.type==="integer"?i.jsxs("div",{className:"mb-4",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(te?!1:(se=T.required)==null?void 0:se.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),i.jsx("input",{type:"number",step:q.type==="integer"?"1":"any",value:ne||"",onChange:xe=>{const Me=xe.target.value===""?"":q.type==="integer"?parseInt(xe.target.value):parseFloat(xe.target.value);K(ae,Me)},className:`w-full border rounded-md px-3 py-2 ${V?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae):q.type==="boolean"?i.jsxs("div",{className:"mb-4",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("input",{type:"checkbox",checked:ne||!1,onChange:xe=>K(ae,xe.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),i.jsxs("label",{className:"ml-2 block text-sm text-gray-700",children:[H,(te?!1:(ie=T.required)==null?void 0:ie.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mt-1",children:q.description}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae):i.jsxs("div",{className:"mb-4",children:[i.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(te?!1:(pe=T.required)==null?void 0:pe.includes(H))&&i.jsx("span",{className:"text-red-500 ml-1",children:"*"}),i.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",q.type,")"]})]}),q.description&&i.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),i.jsx("input",{type:"text",value:ne||"",onChange:xe=>K(ae,xe.target.value),placeholder:d("tool.enterValue",{type:q.type}),className:`w-full border rounded-md px-3 py-2 ${V?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),V&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:V})]},ae)};return T.properties?i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex justify-between items-center border-b pb-3",children:[i.jsx("h3",{className:"text-lg font-medium text-gray-900",children:d("tool.parameters")}),i.jsxs("div",{className:"flex space-x-2",children:[i.jsx("button",{type:"button",onClick:U,className:`px-3 py-1 text-sm rounded-md transition-colors ${y?"bg-gray-100 text-gray-600 hover:bg-gray-200":"bg-blue-600 text-white"}`,children:d("tool.formMode")}),i.jsx("button",{type:"button",onClick:k,className:`px-3 py-1 text-sm rounded-md transition-colors ${y?"bg-blue-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:d("tool.jsonMode")})]})]}),y?i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:d("tool.jsonConfiguration")}),i.jsx("textarea",{value:v,onChange:H=>M(H.target.value),placeholder:`{
|
|
170
|
-
"key": "value"
|
|
171
|
-
}`,className:`w-full h-64 border rounded-md px-3 py-2 font-mono text-sm resize-y ${j?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),j&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:j})]}),i.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[i.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:d("tool.cancel")}),i.jsx("button",{onClick:()=>{try{const H=JSON.parse(v);r(H)}catch{C(d("tool.invalidJsonFormat"))}},disabled:c||!!j,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:d(c?"tool.running":"tool.runTool")})]})]}):i.jsxs("form",{onSubmit:ce,className:"space-y-4",children:[Object.entries(T.properties||{}).map(([H,q])=>I(H,q)),i.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[i.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:d("tool.cancel")}),i.jsx("button",{type:"submit",disabled:c,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:d(c?"tool.running":"tool.runTool")})]})]})]}):i.jsxs("div",{className:"p-4 bg-gray-50 rounded-md",children:[i.jsx("p",{className:"text-sm text-gray-600",children:d("tool.noParameters")}),i.jsxs("div",{className:"flex justify-end space-x-2 mt-4",children:[i.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:d("tool.cancel")}),i.jsx("button",{onClick:()=>r({}),disabled:c,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:d(c?"tool.running":"tool.runTool")})]})]})},Zv=({result:l,onClose:r})=>{const{t:s}=Oe(),c=l.content,f=h=>Array.isArray(h)?h.map((x,g)=>i.jsx("div",{className:"mb-3 last:mb-0",children:d(x)},g)):d(h),d=h=>{if(typeof h=="string")return i.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:i.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:h})});if(typeof h=="object"&&h!==null){if(h.type==="text"&&h.text)return i.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:i.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:h.text})});if(h.type==="image"&&h.data)return i.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:i.jsx("img",{src:`data:${h.mimeType||"image/png"};base64,${h.data}`,alt:s("tool.toolResult"),className:"max-w-full h-auto rounded-md"})});try{const x=typeof h=="string"?h:JSON.stringify(h,null,2),g=typeof h=="string"?JSON.parse(h):h;return i.jsxs("div",{className:"bg-gray-50 rounded-md p-3",children:[i.jsx("div",{className:"text-xs text-gray-500 mb-2",children:s("tool.jsonResponse")}),i.jsx("pre",{className:"text-sm text-gray-800 overflow-auto",children:JSON.stringify(g,null,2)})]})}catch{return i.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:i.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})}}return i.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:i.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})};return i.jsxs("div",{className:"border border-gray-300 rounded-lg bg-white shadow-sm",children:[i.jsx("div",{className:"border-b border-gray-300 px-4 py-3 bg-gray-50 rounded-t-lg",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[l.success?i.jsx(Jy,{size:20,className:"text-green-500"}):i.jsx(Iy,{size:20,className:"text-red-500"}),i.jsx("div",{children:i.jsxs("h4",{className:"text-sm font-medium text-gray-900",children:[s("tool.execution")," ",l.success?s("tool.successful"):s("tool.failed")]})})]}),i.jsx("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 text-sm",children:"✕"})]})}),i.jsx("div",{className:"p-4",children:l.success?i.jsx("div",{children:l.content&&l.content.length>0?i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-gray-600 mb-3",children:s("tool.result")}),f(l.content)]}):i.jsx("div",{className:"text-sm text-gray-500 italic",children:s("tool.noContent")})}):i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[i.jsx(cg,{size:16,className:"text-red-500"}),i.jsx("span",{className:"text-sm font-medium text-red-700",children:s("tool.error")})]}),c&&c.length>0?i.jsxs("div",{children:[i.jsx("div",{className:"text-sm text-gray-600 mb-3",children:s("tool.errorDetails")}),f(c)]}):i.jsx("div",{className:"bg-red-50 border border-red-300 rounded-md p-3",children:i.jsx("pre",{className:"text-sm text-red-800 whitespace-pre-wrap",children:l.error||l.message||s("tool.unknownError")})})]})})]})},Jv=({tool:l,server:r,onToggle:s,onDescriptionUpdate:c})=>{const{t:f}=Oe(),[d,h]=w.useState(!1),[x,g]=w.useState(!1),[m,y]=w.useState(!1),[S,v]=w.useState(null),[R,j]=w.useState(!1),[C,T]=w.useState(l.description||""),M=w.useRef(null),k=w.useRef(null),[U,K]=w.useState(0);w.useEffect(()=>{R&&M.current&&(M.current.focus(),U>0&&(M.current.style.width=`${U+20}px`))},[R,U]),w.useEffect(()=>{!R&&k.current&&K(k.current.offsetWidth)},[R,C]);const Y=w.useCallback(()=>`mcphub_tool_form_${r?`${r}_`:""}${l.name}`,[l.name,r]),ce=w.useCallback(()=>{localStorage.removeItem(Y())},[Y]),X=V=>{s&&s(l.name,V)},$=()=>{j(!0)},I=async()=>{try{const V=await Mg(r,l.name,C);V.success?(j(!1),c&&c(l.name,C)):(T(l.description||""),console.error("Failed to update tool description:",V.error))}catch(V){console.error("Error updating tool description:",V),T(l.description||""),j(!1)}},H=V=>{T(V.target.value)},q=V=>{V.key==="Enter"?I():V.key==="Escape"&&(T(l.description||""),j(!1))},te=async V=>{y(!0);try{const O=await Og({toolName:l.name,arguments:V},r);v(O)}catch(O){v({success:!1,error:O instanceof Error?O.message:"Unknown error occurred"})}finally{y(!1)}},ae=()=>{g(!1),ce(),v(null)},ne=()=>{v(null)};return i.jsxs("div",{className:"bg-white border border-gray-300 shadow rounded-lg p-4 mb-4",children:[i.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>h(!d),children:[i.jsx("div",{className:"flex-1",children:i.jsxs("h3",{className:"text-lg font-medium text-gray-900",children:[l.name.replace(r+"-",""),i.jsx("span",{className:"ml-2 text-sm font-normal text-gray-600 inline-flex items-center",children:R?i.jsxs(i.Fragment,{children:[i.jsx("input",{ref:M,type:"text",className:"px-2 py-1 border border-blue-300 rounded bg-white text-sm",value:C,onChange:H,onKeyDown:q,onClick:V=>V.stopPropagation(),style:{minWidth:"100px",width:U>0?`${U+20}px`:"auto"}}),i.jsx("button",{className:"ml-2 p-1 text-green-600 hover:text-green-800",onClick:V=>{V.stopPropagation(),I()},children:i.jsx(yi,{size:16})})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{ref:k,children:C||f("tool.noDescription")}),i.jsx("button",{className:"ml-2 p-1 text-gray-500 hover:text-blue-600 transition-colors",onClick:V=>{V.stopPropagation(),$()},children:i.jsx(dg,{size:14})})]})})]})}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"flex items-center space-x-2",onClick:V=>V.stopPropagation(),children:i.jsx(As,{checked:l.enabled??!0,onCheckedChange:X,disabled:m})}),i.jsxs("button",{onClick:V=>{V.stopPropagation(),h(!0),g(!0)},className:"flex items-center space-x-1 px-3 py-1 text-sm text-blue-600 bg-blue-50 hover:bg-blue-100 rounded-md transition-colors",disabled:m||!l.enabled,children:[m?i.jsx(nb,{size:14,className:"animate-spin"}):i.jsx(cb,{size:14}),i.jsx("span",{children:f(m?"tool.running":"tool.run")})]}),i.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:d?i.jsx(ig,{size:18}):i.jsx(og,{size:18})})]})]}),d&&i.jsxs("div",{className:"mt-4 space-y-4",children:[!x&&i.jsxs("div",{className:"bg-gray-50 rounded p-3 border border-gray-300",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:f("tool.inputSchema")}),i.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(l.inputSchema,null,2)})]}),x&&i.jsxs("div",{className:"border border-gray-300 rounded-lg p-4 bg-blue-50",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:f("tool.runToolWithName",{name:l.name.replace(r+"-","")})}),i.jsx(Pv,{schema:l.inputSchema||{type:"object"},onSubmit:te,onCancel:ae,loading:m,storageKey:Y()}),S&&i.jsx("div",{className:"mt-4",children:i.jsx(Zv,{result:S,onClose:ne})})]})]})]})},Dg=({isOpen:l,onClose:r,onConfirm:s,serverName:c,isGroup:f=!1})=>{const{t:d}=Oe();return l?i.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:i.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:i.jsxs("div",{className:"p-6",children:[i.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:d(f?"groups.confirmDelete":"server.confirmDelete")}),i.jsx("p",{className:"text-gray-500 mb-6",children:f?d("groups.deleteWarning",{name:c}):d("server.deleteWarning",{name:c})}),i.jsxs("div",{className:"flex justify-end space-x-3",children:[i.jsx("button",{onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:d("common.cancel")}),i.jsx("button",{onClick:s,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:d("common.delete")})]})]})})}):null},Fv=({server:l,onRemove:r,onEdit:s,onToggle:c,onRefresh:f})=>{var I;const{t:d}=Oe(),{showToast:h}=Ls(),[x,g]=w.useState(!1),[m,y]=w.useState(!1),[S,v]=w.useState(!1),[R,j]=w.useState(!1),[C,T]=w.useState(!1),M=w.useRef(null);w.useEffect(()=>{const H=q=>{M.current&&!M.current.contains(q.target)&&j(!1)};return document.addEventListener("mousedown",H),()=>{document.removeEventListener("mousedown",H)}},[]);const k=H=>{H.stopPropagation(),y(!0)},U=H=>{H.stopPropagation(),s(l)},K=async H=>{if(H.stopPropagation(),!(S||!c)){v(!0);try{await c(l,l.enabled===!1)}finally{v(!1)}}},Y=H=>{H.stopPropagation(),j(!R)},ce=H=>{if(H.stopPropagation(),!!l.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.error).then(()=>{T(!0),h(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>T(!1),2e3)});else{const q=document.createElement("textarea");q.value=l.error,q.style.position="fixed",q.style.left="-9999px",document.body.appendChild(q),q.focus(),q.select();try{document.execCommand("copy"),T(!0),h(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>T(!1),2e3)}catch(te){h(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",te)}document.body.removeChild(q)}},X=()=>{r(l.name),y(!1)},$=async(H,q)=>{try{const{toggleTool:te}=await Gv(async()=>{const{toggleTool:ne}=await Promise.resolve().then(()=>Qv);return{toggleTool:ne}},[],import.meta.url),ae=await te(l.name,H,q);ae.success?(h(d(q?"tool.enableSuccess":"tool.disableSuccess",{name:H}),"success"),f&&f()):h(ae.error||d("tool.toggleFailed"),"error")}catch(te){console.error("Error toggling tool:",te),h(d("tool.toggleFailed"),"error")}};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${l.enabled===!1?"opacity-60":""}`,children:[i.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>g(!x),children:[i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx("h2",{className:`text-xl font-semibold ${l.enabled===!1?"text-gray-600":"text-gray-900"}`,children:l.name}),i.jsx($v,{status:l.status}),i.jsxs("div",{className:"flex items-center px-2 py-1 bg-blue-50 text-blue-700 rounded-full text-sm",children:[i.jsx("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:i.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"})}),i.jsxs("span",{children:[((I=l.tools)==null?void 0:I.length)||0," ",d("server.tools")]})]}),l.error&&i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"cursor-pointer",onClick:Y,"aria-label":d("server.viewErrorDetails"),children:i.jsx(cg,{className:"text-red-500 hover:text-red-600",size:18})}),R&&i.jsxs("div",{ref:M,className:"absolute z-10 mt-2 bg-white border border-gray-200 rounded-md shadow-lg p-0 w-120",style:{left:"-231px",top:"24px",maxHeight:"300px",overflowY:"auto",width:"480px",transform:"translateX(50%)"},onClick:H=>H.stopPropagation(),children:[i.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white py-2 px-4 border-b border-gray-200 z-20 shadow-sm",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("h4",{className:"text-sm font-medium text-red-600",children:d("server.errorDetails")}),i.jsx("button",{onClick:ce,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:C?i.jsx(yi,{size:14,className:"text-green-500"}):i.jsx(ug,{size:14})})]}),i.jsx("button",{onClick:H=>{H.stopPropagation(),j(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),i.jsx("div",{className:"p-4 pt-2",children:i.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:l.error})})]})]})]}),i.jsxs("div",{className:"flex space-x-2",children:[i.jsx("button",{onClick:U,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:d("server.edit")}),i.jsx("div",{className:"flex items-center",children:i.jsx("button",{onClick:K,className:`px-3 py-1 text-sm rounded transition-colors ${S?"bg-gray-200 text-gray-500":l.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:S,children:S?d("common.processing"):l.enabled!==!1?d("server.disable"):d("server.enable")})}),i.jsx("button",{onClick:k,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:d("server.delete")}),i.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:x?i.jsx(ig,{size:18}):i.jsx(og,{size:18})})]})]}),x&&l.tools&&i.jsxs("div",{className:"mt-6",children:[i.jsx("h6",{className:`font-medium ${l.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:d("server.tools")}),i.jsx("div",{className:"space-y-4",children:l.tools.map((H,q)=>i.jsx(Jv,{server:l.name,tool:H,onToggle:$},q))})]})]}),i.jsx(Dg,{isOpen:m,onClose:()=>y(!1),onConfirm:X,serverName:l.name})]})},iu=({onSubmit:l,onCancel:r,initialData:s=null,modalTitle:c,formError:f=null})=>{var V,O,W,D,ue,E,Q,le,P,re,Se,ee,se,ie,pe,xe,Me,Ve,Nt,Ct,fa,Ie,Qe,ln,Oa,sn,Yt,Hs,kl,Bs,qs,Ma,mt,Qt,ht,Vs,Gs,Ks,rn,on,aa,cn;const{t:d}=Oe(),h=()=>!s||!s.config?"stdio":s.config.type?s.config.type:s.config.url?"sse":"stdio",[x,g]=w.useState(h()),[m,y]=w.useState({name:s&&s.name||"",url:s&&s.config&&s.config.url||"",command:s&&s.config&&s.config.command||"",arguments:s&&s.config&&s.config.args?Array.isArray(s.config.args)?s.config.args.join(" "):String(s.config.args):"",args:s&&s.config&&s.config.args||[],type:h(),env:[],headers:[],options:{timeout:s&&s.config&&s.config.options&&s.config.options.timeout||6e4,resetTimeoutOnProgress:s&&s.config&&s.config.options&&s.config.options.resetTimeoutOnProgress||!1,maxTotalTimeout:s&&s.config&&s.config.options&&s.config.options.maxTotalTimeout||void 0},openapi:s&&s.config&&s.config.openapi?{url:s.config.openapi.url||"",schema:s.config.openapi.schema?JSON.stringify(s.config.openapi.schema,null,2):"",inputMode:s.config.openapi.url?"url":s.config.openapi.schema?"schema":"url",version:s.config.openapi.version||"3.1.0",securityType:((V=s.config.openapi.security)==null?void 0:V.type)||"none",apiKeyName:((W=(O=s.config.openapi.security)==null?void 0:O.apiKey)==null?void 0:W.name)||"",apiKeyIn:((ue=(D=s.config.openapi.security)==null?void 0:D.apiKey)==null?void 0:ue.in)||"header",apiKeyValue:((Q=(E=s.config.openapi.security)==null?void 0:E.apiKey)==null?void 0:Q.value)||"",httpScheme:((P=(le=s.config.openapi.security)==null?void 0:le.http)==null?void 0:P.scheme)||"bearer",httpCredentials:((Se=(re=s.config.openapi.security)==null?void 0:re.http)==null?void 0:Se.credentials)||"",oauth2Token:((se=(ee=s.config.openapi.security)==null?void 0:ee.oauth2)==null?void 0:se.token)||"",openIdConnectUrl:((pe=(ie=s.config.openapi.security)==null?void 0:ie.openIdConnect)==null?void 0:pe.url)||"",openIdConnectToken:((Me=(xe=s.config.openapi.security)==null?void 0:xe.openIdConnect)==null?void 0:Me.token)||""}:{inputMode:"url",url:"",schema:"",version:"3.1.0",securityType:"none"}}),[S,v]=w.useState(s&&s.config&&s.config.env?Object.entries(s.config.env).map(([de,oe])=>({key:de,value:oe})):[]),[R,j]=w.useState(s&&s.config&&s.config.headers?Object.entries(s.config.headers).map(([de,oe])=>({key:de,value:oe})):[]),[C,T]=w.useState(!1),[M,k]=w.useState(null),U=!!s,K=de=>{const{name:oe,value:ye}=de.target;y({...m,[oe]:ye})},Y=de=>{const oe=de.split(" ").filter(ye=>ye.trim()!=="");y({...m,arguments:de,args:oe})},ce=de=>{g(de),y(oe=>({...oe,type:de}))},X=(de,oe,ye)=>{const Xt=[...S];Xt[de][oe]=ye,v(Xt)},$=()=>{v([...S,{key:"",value:""}])},I=de=>{const oe=[...S];oe.splice(de,1),v(oe)},H=(de,oe,ye)=>{const Xt=[...R];Xt[de][oe]=ye,j(Xt)},q=()=>{j([...R,{key:"",value:""}])},te=de=>{const oe=[...R];oe.splice(de,1),j(oe)},ae=(de,oe)=>{y(ye=>({...ye,options:{...ye.options,[de]:oe}}))},ne=async de=>{var oe,ye,Xt;de.preventDefault(),k(null);try{const Pt={};S.forEach(({key:Et,value:na})=>{Et.trim()&&(Pt[Et.trim()]=na)});const Zt={};R.forEach(({key:Et,value:na})=>{Et.trim()&&(Zt[Et.trim()]=na)});const un={};(oe=m.options)!=null&&oe.timeout&&m.options.timeout!==6e4&&(un.timeout=m.options.timeout),(ye=m.options)!=null&&ye.resetTimeoutOnProgress&&(un.resetTimeoutOnProgress=m.options.resetTimeoutOnProgress),(Xt=m.options)!=null&&Xt.maxTotalTimeout&&(un.maxTotalTimeout=m.options.maxTotalTimeout);const $s={name:m.name,config:{type:x,...x==="openapi"?{openapi:(()=>{var na,On,Tl,Ys,Jt,tt;const Et={version:((na=m.openapi)==null?void 0:na.version)||"3.1.0"};if(((On=m.openapi)==null?void 0:On.inputMode)==="url")Et.url=((Tl=m.openapi)==null?void 0:Tl.url)||"";else if(((Ys=m.openapi)==null?void 0:Ys.inputMode)==="schema"&&((Jt=m.openapi)!=null&&Jt.schema))try{Et.schema=JSON.parse(m.openapi.schema)}catch{throw new Error("Invalid JSON schema format")}return(tt=m.openapi)!=null&&tt.securityType&&m.openapi.securityType!=="none"&&(Et.security={type:m.openapi.securityType,...m.openapi.securityType==="apiKey"&&{apiKey:{name:m.openapi.apiKeyName||"",in:m.openapi.apiKeyIn||"header",value:m.openapi.apiKeyValue||""}},...m.openapi.securityType==="http"&&{http:{scheme:m.openapi.httpScheme||"bearer",credentials:m.openapi.httpCredentials||""}},...m.openapi.securityType==="oauth2"&&{oauth2:{token:m.openapi.oauth2Token||""}},...m.openapi.securityType==="openIdConnect"&&{openIdConnect:{url:m.openapi.openIdConnectUrl||"",token:m.openapi.openIdConnectToken||""}}}),Et})(),...Object.keys(Zt).length>0?{headers:Zt}:{}}:x==="sse"||x==="streamable-http"?{url:m.url,...Object.keys(Zt).length>0?{headers:Zt}:{}}:{command:m.command,args:m.args,env:Object.keys(Pt).length>0?Pt:void 0},...Object.keys(un).length>0?{options:un}:{}}};l($s)}catch(Pt){k(`Error: ${Pt instanceof Error?Pt.message:String(Pt)}`)}};return i.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:c}),i.jsx("button",{onClick:r,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(M||f)&&i.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:f||M}),i.jsxs("form",{onSubmit:ne,children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:d("server.name")}),i.jsx("input",{type:"text",name:"name",id:"name",value:m.name,onChange:K,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: time-mcp",required:!0,disabled:U})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("server.type")}),i.jsxs("div",{className:"flex space-x-4",children:[i.jsxs("div",{children:[i.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:x==="stdio",onChange:()=>ce("stdio"),className:"mr-1"}),i.jsx("label",{htmlFor:"command",children:"STDIO"})]}),i.jsxs("div",{children:[i.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:x==="sse",onChange:()=>ce("sse"),className:"mr-1"}),i.jsx("label",{htmlFor:"url",children:"SSE"})]}),i.jsxs("div",{children:[i.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:x==="streamable-http",onChange:()=>ce("streamable-http"),className:"mr-1"}),i.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]}),i.jsxs("div",{children:[i.jsx("input",{type:"radio",id:"openapi",name:"serverType",value:"openapi",checked:x==="openapi",onChange:()=>ce("openapi"),className:"mr-1"}),i.jsx("label",{htmlFor:"openapi",children:"OpenAPI"})]})]})]}),x==="openapi"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("server.openapi.inputMode")}),i.jsxs("div",{className:"flex space-x-4",children:[i.jsxs("div",{children:[i.jsx("input",{type:"radio",id:"input-mode-url",name:"inputMode",value:"url",checked:((Ve=m.openapi)==null?void 0:Ve.inputMode)==="url",onChange:()=>y(de=>({...de,openapi:{...de.openapi,inputMode:"url"}})),className:"mr-1"}),i.jsx("label",{htmlFor:"input-mode-url",children:d("server.openapi.inputModeUrl")})]}),i.jsxs("div",{children:[i.jsx("input",{type:"radio",id:"input-mode-schema",name:"inputMode",value:"schema",checked:((Nt=m.openapi)==null?void 0:Nt.inputMode)==="schema",onChange:()=>y(de=>({...de,openapi:{...de.openapi,inputMode:"schema"}})),className:"mr-1"}),i.jsx("label",{htmlFor:"input-mode-schema",children:d("server.openapi.inputModeSchema")})]})]})]}),((Ct=m.openapi)==null?void 0:Ct.inputMode)==="url"&&i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"openapi-url",children:d("server.openapi.specUrl")}),i.jsx("input",{type:"url",name:"openapi-url",id:"openapi-url",value:((fa=m.openapi)==null?void 0:fa.url)||"",onChange:de=>y(oe=>({...oe,openapi:{...oe.openapi,url:de.target.value}})),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: https://api.example.com/openapi.json",required:x==="openapi"&&((Ie=m.openapi)==null?void 0:Ie.inputMode)==="url"})]}),((Qe=m.openapi)==null?void 0:Qe.inputMode)==="schema"&&i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"openapi-schema",children:d("server.openapi.schema")}),i.jsx("textarea",{name:"openapi-schema",id:"openapi-schema",rows:10,value:((ln=m.openapi)==null?void 0:ln.schema)||"",onChange:de=>y(oe=>({...oe,openapi:{...oe.openapi,schema:de.target.value}})),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline font-mono text-sm",placeholder:`{
|
|
172
|
-
"openapi": "3.1.0",
|
|
173
|
-
"info": {
|
|
174
|
-
"title": "API",
|
|
175
|
-
"version": "1.0.0"
|
|
176
|
-
},
|
|
177
|
-
"servers": [
|
|
178
|
-
{
|
|
179
|
-
"url": "https://api.example.com"
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
|
-
"paths": {
|
|
183
|
-
...
|
|
184
|
-
}
|
|
185
|
-
}`,required:x==="openapi"&&((Oa=m.openapi)==null?void 0:Oa.inputMode)==="schema"}),i.jsx("p",{className:"text-xs text-gray-500 mt-1",children:d("server.openapi.schemaHelp")})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("server.openapi.security")}),i.jsxs("select",{value:((sn=m.openapi)==null?void 0:sn.securityType)||"none",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,securityType:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",children:[i.jsx("option",{value:"none",children:d("server.openapi.securityNone")}),i.jsx("option",{value:"apiKey",children:d("server.openapi.securityApiKey")}),i.jsx("option",{value:"http",children:d("server.openapi.securityHttp")}),i.jsx("option",{value:"oauth2",children:d("server.openapi.securityOAuth2")}),i.jsx("option",{value:"openIdConnect",children:d("server.openapi.securityOpenIdConnect")})]})]}),((Yt=m.openapi)==null?void 0:Yt.securityType)==="apiKey"&&i.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.apiKeyConfig")}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.apiKeyName")}),i.jsx("input",{type:"text",value:((Hs=m.openapi)==null?void 0:Hs.apiKeyName)||"",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,apiKeyName:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"Authorization"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.apiKeyIn")}),i.jsxs("select",{value:((kl=m.openapi)==null?void 0:kl.apiKeyIn)||"header",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,apiKeyIn:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",children:[i.jsx("option",{value:"header",children:"Header"}),i.jsx("option",{value:"query",children:"Query"}),i.jsx("option",{value:"cookie",children:"Cookie"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.apiKeyValue")}),i.jsx("input",{type:"password",value:((Bs=m.openapi)==null?void 0:Bs.apiKeyValue)||"",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,apiKeyValue:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"your-api-key"})]})]})]}),((qs=m.openapi)==null?void 0:qs.securityType)==="http"&&i.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.httpAuthConfig")}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.httpScheme")}),i.jsxs("select",{value:((Ma=m.openapi)==null?void 0:Ma.httpScheme)||"bearer",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,httpScheme:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",children:[i.jsx("option",{value:"basic",children:"Basic"}),i.jsx("option",{value:"bearer",children:"Bearer"}),i.jsx("option",{value:"digest",children:"Digest"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.httpCredentials")}),i.jsx("input",{type:"password",value:((mt=m.openapi)==null?void 0:mt.httpCredentials)||"",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,httpCredentials:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:((Qt=m.openapi)==null?void 0:Qt.httpScheme)==="basic"?"base64-encoded-credentials":"bearer-token"})]})]})]}),((ht=m.openapi)==null?void 0:ht.securityType)==="oauth2"&&i.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.oauth2Config")}),i.jsx("div",{className:"grid grid-cols-1 gap-3",children:i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.oauth2Token")}),i.jsx("input",{type:"password",value:((Vs=m.openapi)==null?void 0:Vs.oauth2Token)||"",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,oauth2Token:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"access-token"})]})})]}),((Gs=m.openapi)==null?void 0:Gs.securityType)==="openIdConnect"&&i.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[i.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.openIdConnectConfig")}),i.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.openIdConnectUrl")}),i.jsx("input",{type:"url",value:((Ks=m.openapi)==null?void 0:Ks.openIdConnectUrl)||"",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,openIdConnectUrl:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"https://example.com/.well-known/openid_configuration"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.openIdConnectToken")}),i.jsx("input",{type:"password",value:((rn=m.openapi)==null?void 0:rn.openIdConnectToken)||"",onChange:de=>y(oe=>{var ye;return{...oe,openapi:{...oe.openapi,openIdConnectToken:de.target.value,url:((ye=oe.openapi)==null?void 0:ye.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"id-token"})]})]})]})]}):x==="sse"||x==="streamable-http"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:d("server.url")}),i.jsx("input",{type:"url",name:"url",id:"url",value:m.url,onChange:K,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:x==="streamable-http"?"e.g.: http://localhost:3000/mcp":"e.g.: http://localhost:3000/sse",required:x==="sse"||x==="streamable-http"})]}),i.jsxs("div",{className:"mb-4",children:[i.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:d("server.headers")}),i.jsxs("button",{type:"button",onClick:q,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",d("server.add")]})]}),R.map((de,oe)=>i.jsxs("div",{className:"flex items-center mb-2",children:[i.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[i.jsx("input",{type:"text",value:de.key,onChange:ye=>H(oe,"key",ye.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:"Authorization"}),i.jsx("span",{className:"flex items-center",children:":"}),i.jsx("input",{type:"text",value:de.value,onChange:ye=>H(oe,"value",ye.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:"Bearer token..."})]}),i.jsxs("button",{type:"button",onClick:()=>te(oe),className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center justify-center min-w-[56px] ml-2",children:["- ",d("server.remove")]})]},oe))]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:d("server.command")}),i.jsx("input",{type:"text",name:"command",id:"command",value:m.command,onChange:K,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: npx",required:x==="stdio"})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:d("server.arguments")}),i.jsx("input",{type:"text",name:"arguments",id:"arguments",value:m.arguments,onChange:de=>Y(de.target.value),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: -y time-mcp",required:x==="stdio"})]}),i.jsxs("div",{className:"mb-4",children:[i.jsxs("div",{className:"flex justify-between items-center mb-2",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:d("server.envVars")}),i.jsxs("button",{type:"button",onClick:$,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",d("server.add")]})]}),S.map((de,oe)=>i.jsxs("div",{className:"flex items-center mb-2",children:[i.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[i.jsx("input",{type:"text",value:de.key,onChange:ye=>X(oe,"key",ye.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:d("server.key")}),i.jsx("span",{className:"flex items-center",children:":"}),i.jsx("input",{type:"text",value:de.value,onChange:ye=>X(oe,"value",ye.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:d("server.value")})]}),i.jsxs("button",{type:"button",onClick:()=>I(oe),className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center justify-center min-w-[56px] ml-2",children:["- ",d("server.remove")]})]},oe))]})]}),x!=="openapi"&&i.jsxs("div",{className:"mb-4",children:[i.jsxs("div",{className:"flex items-center justify-between cursor-pointer bg-gray-50 hover:bg-gray-100 p-3 rounded border",onClick:()=>T(!C),children:[i.jsx("label",{className:"text-gray-700 text-sm font-bold",children:d("server.requestOptions")}),i.jsx("span",{className:"text-gray-500 text-sm",children:C?"▼":"▶"})]}),C&&i.jsxs("div",{className:"border rounded-b p-4 bg-gray-50 border-t-0",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"timeout",children:d("server.timeout")}),i.jsx("input",{type:"number",id:"timeout",value:((on=m.options)==null?void 0:on.timeout)||6e4,onChange:de=>ae("timeout",parseInt(de.target.value)||6e4),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"30000",min:"1000",max:"300000"}),i.jsx("p",{className:"text-xs text-gray-500 mt-1",children:d("server.timeoutDescription")})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"maxTotalTimeout",children:d("server.maxTotalTimeout")}),i.jsx("input",{type:"number",id:"maxTotalTimeout",value:((aa=m.options)==null?void 0:aa.maxTotalTimeout)||"",onChange:de=>ae("maxTotalTimeout",de.target.value?parseInt(de.target.value):void 0),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"Optional",min:"1000"}),i.jsx("p",{className:"text-xs text-gray-500 mt-1",children:d("server.maxTotalTimeoutDescription")})]})]}),i.jsxs("div",{className:"mt-3",children:[i.jsxs("label",{className:"flex items-center",children:[i.jsx("input",{type:"checkbox",checked:((cn=m.options)==null?void 0:cn.resetTimeoutOnProgress)||!1,onChange:de=>ae("resetTimeoutOnProgress",de.target.checked),className:"mr-2"}),i.jsx("span",{className:"text-gray-600 text-sm",children:d("server.resetTimeoutOnProgress")})]}),i.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6",children:d("server.resetTimeoutOnProgressDescription")})]})]})]}),i.jsxs("div",{className:"flex justify-end mt-6",children:[i.jsx("button",{type:"button",onClick:r,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2",children:d("server.cancel")}),i.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:d(U?"server.save":"server.add")})]})]})]})},Iv=({onAdd:l})=>{const{t:r}=Oe(),[s,c]=w.useState(!1),[f,d]=w.useState(null),h=()=>{c(!s),d(null)},x=async g=>{try{d(null);const m=localStorage.getItem("mcphub_token"),y=await fetch(ke("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":m||""},body:JSON.stringify(g)}),S=await y.json();if(!y.ok){S&&S.message?d(S.message):y.status===400?d(r("server.invalidData")):y.status===409?d(r("server.alreadyExists",{serverName:g.name})):d(r("server.addError"));return}c(!1),l()}catch(m){console.error("Error adding server:",m),navigator.onLine?m instanceof TypeError&&(m.message.includes("NetworkError")||m.message.includes("Failed to fetch"))?d(r("errors.serverConnection")):d(r("errors.serverAdd")):d(r("errors.network"))}};return i.jsxs("div",{children:[i.jsxs("button",{onClick:h,className:"w-full bg-blue-100 text-blue-800 rounded hover:bg-blue-200 py-2 px-4 flex items-center justify-center",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:i.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),r("server.add")]}),s&&i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsx(iu,{onSubmit:x,onCancel:h,modalTitle:r("server.addServer"),formError:f})})]})},Wv=({server:l,onEdit:r,onCancel:s})=>{const{t:c}=Oe(),[f,d]=w.useState(null),h=async x=>{try{d(null);const g=localStorage.getItem("mcphub_token"),m=await fetch(ke(`/servers/${l.name}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(x)}),y=await m.json();if(!m.ok){y&&y.message?d(y.message):m.status===404?d(c("server.notFound",{serverName:l.name})):m.status===400?d(c("server.invalidData")):d(c("server.updateError",{serverName:l.name}));return}r()}catch(g){console.error("Error updating server:",g),navigator.onLine?g instanceof TypeError&&(g.message.includes("NetworkError")||g.message.includes("Failed to fetch"))?d(c("errors.serverConnection")):d(c("errors.serverUpdate",{serverName:l.name})):d(c("errors.network"))}};return i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsx(iu,{onSubmit:h,onCancel:s,initialData:l,modalTitle:c("server.editTitle",{serverName:l.name}),formError:f})})},e1=()=>{const{t:l}=Oe(),r=Rn(),{servers:s,error:c,setError:f,isLoading:d,handleServerAdd:h,handleServerEdit:x,handleServerRemove:g,handleServerToggle:m,triggerRefresh:y}=_s(),[S,v]=w.useState(null),[R,j]=w.useState(!1),C=async k=>{const U=await x(k);U&&v(U)},T=()=>{v(null),y()},M=async()=>{j(!0);try{y(),await new Promise(k=>setTimeout(k,500))}finally{j(!1)}};return i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between items-center mb-8",children:[i.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.servers.title")}),i.jsxs("div",{className:"flex space-x-4",children:[i.jsxs("button",{onClick:()=>r("/market"),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})}),l("nav.market")]}),i.jsx(Iv,{onAdd:h}),i.jsxs("button",{onClick:M,disabled:R,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${R?"opacity-70 cursor-not-allowed":""}`,children:[R?i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})}),l("common.refresh")]})]})]}),c&&i.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),i.jsx("p",{className:"text-gray-600 mt-1",children:c})]}),i.jsx("button",{onClick:()=>f(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})})})]})}),d?i.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:i.jsxs("div",{className:"flex flex-col items-center",children:[i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):s.length===0?i.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:i.jsx("p",{className:"text-gray-600",children:l("app.noServers")})}):i.jsx("div",{className:"space-y-6",children:s.map((k,U)=>i.jsx(Fv,{server:k,onRemove:g,onEdit:C,onToggle:m,onRefresh:y},U))}),S&&i.jsx(Wv,{server:S,onEdit:T,onCancel:()=>v(null)})]})},ou=()=>{const{t:l}=Oe(),[r,s]=w.useState([]),[c,f]=w.useState(!0),[d,h]=w.useState(null),[x,g]=w.useState(0),m=w.useCallback(async()=>{try{f(!0);const M=localStorage.getItem("mcphub_token"),k=await fetch(ke("/groups"),{headers:{"x-auth-token":M||""}});if(!k.ok)throw new Error(`Status: ${k.status}`);const U=await k.json();U&&U.success&&Array.isArray(U.data)?s(U.data):(console.error("Invalid group data format:",U),s([])),h(null)}catch(M){console.error("Error fetching groups:",M),h(M instanceof Error?M.message:"Failed to fetch groups"),s([])}finally{f(!1)}},[]),y=w.useCallback(()=>{g(M=>M+1)},[]),S=async(M,k,U=[])=>{try{const K=localStorage.getItem("mcphub_token"),Y=await fetch(ke("/groups"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":K||""},body:JSON.stringify({name:M,description:k,servers:U})}),ce=await Y.json();return Y.ok?(y(),ce.data||null):(h(ce.message||l("groups.createError")),null)}catch(K){return h(K instanceof Error?K.message:"Failed to create group"),null}},v=async(M,k)=>{try{const U=localStorage.getItem("mcphub_token"),K=await fetch(ke(`/groups/${M}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":U||""},body:JSON.stringify(k)}),Y=await K.json();return K.ok?(y(),Y.data||null):(h(Y.message||l("groups.updateError")),null)}catch(U){return h(U instanceof Error?U.message:"Failed to update group"),null}},R=async(M,k)=>{try{const U=localStorage.getItem("mcphub_token"),K=await fetch(ke(`/groups/${M}/servers/batch`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":U||""},body:JSON.stringify({servers:k})}),Y=await K.json();return K.ok?(y(),Y.data||null):(h(Y.message||l("groups.updateError")),null)}catch(U){return h(U instanceof Error?U.message:"Failed to update group servers"),null}},j=async M=>{try{const k=localStorage.getItem("mcphub_token"),U=await fetch(ke(`/groups/${M}`),{method:"DELETE",headers:{"x-auth-token":k||""}}),K=await U.json();return U.ok?(y(),!0):(h(K.message||l("groups.deleteError")),!1)}catch(k){return h(k instanceof Error?k.message:"Failed to delete group"),!1}},C=async(M,k)=>{try{const U=localStorage.getItem("mcphub_token"),K=await fetch(ke(`/groups/${M}/servers`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":U||""},body:JSON.stringify({serverName:k})}),Y=await K.json();return K.ok?(y(),Y.data||null):(h(Y.message||l("groups.serverAddError")),null)}catch(U){return h(U instanceof Error?U.message:"Failed to add server to group"),null}},T=async(M,k)=>{try{const U=localStorage.getItem("mcphub_token"),K=await fetch(ke(`/groups/${M}/servers/${k}`),{method:"DELETE",headers:{"x-auth-token":U||""}}),Y=await K.json();return K.ok?(y(),Y.data||null):(h(Y.message||l("groups.serverRemoveError")),null)}catch(U){return h(U instanceof Error?U.message:"Failed to remove server from group"),null}};return w.useEffect(()=>{m()},[m,x]),{groups:r,loading:c,error:d,setError:h,triggerRefresh:y,createGroup:S,updateGroup:v,updateGroupServers:R,deleteGroup:j,addServerToGroup:C,removeServerFromGroup:T}},t1=({onAdd:l,onCancel:r})=>{const{t:s}=Oe(),{createGroup:c}=ou(),{servers:f}=_s(),[d,h]=w.useState([]),[x,g]=w.useState(null),[m,y]=w.useState(!1),[S,v]=w.useState({name:"",description:"",servers:[]});w.useEffect(()=>{h(f.filter(C=>C.enabled!==!1))},[f]);const R=C=>{const{name:T,value:M}=C.target;v(k=>({...k,[T]:M}))},j=async C=>{C.preventDefault(),y(!0),g(null);try{if(!S.name.trim()){g(s("groups.nameRequired")),y(!1);return}if(!await c(S.name,S.description,S.servers)){g(s("groups.createError")),y(!1);return}l()}catch(T){g(T instanceof Error?T.message:String(T)),y(!1)}};return i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:i.jsxs("div",{className:"p-6",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:s("groups.addNew")}),x&&i.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:x}),i.jsxs("form",{onSubmit:j,children:[i.jsxs("div",{className:"mb-4",children:[i.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[s("groups.name")," *"]}),i.jsx("input",{type:"text",id:"name",name:"name",value:S.name,onChange:R,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:s("groups.namePlaceholder"),required:!0})]}),i.jsx(zg,{className:"mb-6",label:s("groups.servers"),noOptionsText:s("groups.noServerOptions"),values:S.servers,options:d.map(C=>({value:C.name,label:C.name})),onChange:C=>v(T=>({...T,servers:C}))}),i.jsxs("div",{className:"flex justify-end space-x-3",children:[i.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:m,children:s("common.cancel")}),i.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:m,children:s(m?"common.submitting":"common.create")})]})]})]})})})},a1=({group:l,onEdit:r,onCancel:s})=>{const{t:c}=Oe(),{updateGroup:f}=ou(),{servers:d}=_s(),[h,x]=w.useState([]),[g,m]=w.useState(null),[y,S]=w.useState(!1),[v,R]=w.useState({name:l.name,description:l.description||"",servers:l.servers||[]});w.useEffect(()=>{x(d.filter(T=>T.enabled!==!1))},[d]);const j=T=>{const{name:M,value:k}=T.target;R(U=>({...U,[M]:k}))},C=async T=>{T.preventDefault(),S(!0),m(null);try{if(!v.name.trim()){m(c("groups.nameRequired")),S(!1);return}if(!await f(l.id,{name:v.name,description:v.description,servers:v.servers})){m(c("groups.updateError")),S(!1);return}r()}catch(M){m(M instanceof Error?M.message:String(M)),S(!1)}};return i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:i.jsxs("div",{className:"p-6",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:c("groups.edit")}),g&&i.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:g}),i.jsxs("form",{onSubmit:C,children:[i.jsxs("div",{className:"mb-4",children:[i.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[c("groups.name")," *"]}),i.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:j,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:c("groups.namePlaceholder"),required:!0})]}),i.jsx(zg,{className:"mb-6",label:c("groups.servers"),noOptionsText:c("groups.noServerOptions"),values:v.servers,options:h.map(T=>({value:T.name,label:T.name})),onChange:T=>R(M=>({...M,servers:T}))}),i.jsxs("div",{className:"flex justify-end space-x-3",children:[i.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:y,children:c("common.cancel")}),i.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:y,children:c(y?"common.submitting":"common.save")})]})]})]})})})},n1=({group:l,servers:r,onEdit:s,onDelete:c})=>{const{t:f}=Oe(),{showToast:d}=Ls(),[h,x]=w.useState(!1),[g,m]=w.useState(!1),y=()=>{s(l)},S=()=>{x(!0)},v=()=>{c(l.id),x(!1)},R=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.id).then(()=>{m(!0),setTimeout(()=>m(!1),2e3)});else{const C=document.createElement("textarea");C.value=l.id,C.style.position="fixed",C.style.left="-9999px",document.body.appendChild(C),C.focus(),C.select();try{document.execCommand("copy"),m(!0),setTimeout(()=>m(!1),2e3)}catch(T){d(f("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",T)}document.body.removeChild(C)}},j=r.filter(C=>l.servers.includes(C.name));return i.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:l.name}),i.jsxs("div",{className:"flex items-center ml-3",children:[i.jsx("span",{className:"text-xs text-gray-500 mr-1",children:l.id}),i.jsx("button",{onClick:R,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:f("common.copy"),children:g?i.jsx(yi,{size:14,className:"text-green-500"}):i.jsx(ug,{size:14})})]})]}),l.description&&i.jsx("p",{className:"text-gray-600 text-sm mt-1",children:l.description})]}),i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm",children:f("groups.serverCount",{count:l.servers.length})}),i.jsx("button",{onClick:y,className:"text-gray-500 hover:text-gray-700",title:f("groups.edit"),children:i.jsx(dg,{size:18})}),i.jsx("button",{onClick:S,className:"text-gray-500 hover:text-red-600",title:f("groups.delete"),children:i.jsx(yb,{size:18})})]})]}),i.jsx("div",{className:"mt-4",children:j.length===0?i.jsx("p",{className:"text-gray-500 italic",children:f("groups.noServers")}):i.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:j.map(C=>i.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[i.jsx("span",{className:"font-medium text-gray-700 text-sm",children:C.name}),i.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${C.status==="connected"?"bg-green-500":C.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},C.name))})}),i.jsx(Dg,{isOpen:h,onClose:()=>x(!1),onConfirm:v,serverName:l.name,isGroup:!0})]})},l1=()=>{const{t:l}=Oe(),{groups:r,loading:s,error:c,setError:f,deleteGroup:d,triggerRefresh:h}=ou(),{servers:x}=_s(),[g,m]=w.useState(null),[y,S]=w.useState(!1),v=M=>{m(M)},R=()=>{m(null),h()},j=async M=>{await d(M)||f(l("groups.deleteError"))},C=()=>{S(!0)},T=()=>{S(!1),h()};return i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between items-center mb-8",children:[i.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.groups.title")}),i.jsx("div",{className:"flex space-x-4",children:i.jsxs("button",{onClick:C,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})}),l("groups.add")]})})]}),c&&i.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:i.jsx("p",{children:c})}),s?i.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:i.jsxs("div",{className:"flex flex-col items-center justify-center",children:[i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):r.length===0?i.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:i.jsx("p",{className:"text-gray-600",children:l("groups.noGroups")})}):i.jsx("div",{className:"space-y-6",children:r.map(M=>i.jsx(n1,{group:M,servers:x,onEdit:v,onDelete:j},M.id))}),y&&i.jsx(t1,{onAdd:T,onCancel:T}),g&&i.jsx(a1,{group:g,onEdit:R,onCancel:()=>m(null)})]})},s1=({onSuccess:l,onCancel:r})=>{const{t:s}=Oe(),[c,f]=w.useState({currentPassword:"",newPassword:""}),[d,h]=w.useState(""),[x,g]=w.useState(!1),[m,y]=w.useState(null),[S,v]=w.useState(!1),R=C=>{const{name:T,value:M}=C.target;T==="confirmPassword"?h(M):f(k=>({...k,[T]:M}))},j=async C=>{if(C.preventDefault(),y(null),c.newPassword!==d){y(s("auth.passwordsNotMatch"));return}g(!0);try{const T=await Hy(c);T.success?(v(!0),l&&l()):y(T.message||s("auth.changePasswordError"))}catch{y(s("auth.changePasswordError"))}finally{g(!1)}};return i.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[i.jsx("h2",{className:"text-xl font-bold mb-4",children:s("auth.changePassword")}),S?i.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:s("auth.changePasswordSuccess")}):i.jsxs("form",{onSubmit:j,children:[m&&i.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:m}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:s("auth.currentPassword")}),i.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",value:c.currentPassword,onChange:R,required:!0})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:s("auth.newPassword")}),i.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",value:c.newPassword,onChange:R,required:!0,minLength:6})]}),i.jsxs("div",{className:"mb-6",children:[i.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:s("auth.confirmPassword")}),i.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",value:d,onChange:R,required:!0,minLength:6})]}),i.jsxs("div",{className:"flex justify-end space-x-2",children:[r&&i.jsx("button",{type:"button",onClick:r,disabled:x,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:s("common.cancel")}),i.jsx("button",{type:"submit",disabled:x,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",children:x?i.jsxs("span",{className:"flex items-center",children:[i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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"})]}),s("common.save")]}):s("common.save")})]})]})]})},r1=()=>{const{t:l}=Oe(),{showToast:r}=Ls(),[s,c]=w.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:""}),[f,d]=w.useState({bearerAuthKey:""}),[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[g,m]=w.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[y,S]=w.useState(!1),[v,R]=w.useState(null),[j,C]=w.useState(0),T=w.useCallback(()=>{C(X=>X+1)},[]),M=w.useCallback(async()=>{var X,$,I,H,q,te;S(!0),R(null);try{const ae=localStorage.getItem("mcphub_token"),ne=await fetch(ke("/settings"),{headers:{"x-auth-token":ae||""}});if(!ne.ok)throw new Error(`HTTP error! Status: ${ne.status}`);const V=await ne.json();V.success&&(($=(X=V.data)==null?void 0:X.systemConfig)!=null&&$.routing)&&c({enableGlobalRoute:V.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:V.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:V.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:V.data.systemConfig.routing.bearerAuthKey||""}),V.success&&((H=(I=V.data)==null?void 0:I.systemConfig)!=null&&H.install)&&x({pythonIndexUrl:V.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:V.data.systemConfig.install.npmRegistry||""}),V.success&&((te=(q=V.data)==null?void 0:q.systemConfig)!=null&&te.smartRouting)&&m({enabled:V.data.systemConfig.smartRouting.enabled??!1,dbUrl:V.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:V.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:V.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:V.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""})}catch(ae){console.error("Failed to fetch settings:",ae),R(ae instanceof Error?ae.message:"Failed to fetch settings"),r(l("errors.failedToFetchSettings"))}finally{S(!1)}},[l]),k=async(X,$)=>{S(!0),R(null);try{const I=localStorage.getItem("mcphub_token"),H=await fetch(ke("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({routing:{[X]:$}})});if(!H.ok)throw new Error(`HTTP error! Status: ${H.status}`);return(await H.json()).success?(c({...s,[X]:$}),r(l("settings.systemConfigUpdated")),!0):(r(l("errors.failedToUpdateRouteConfig")),!1)}catch(I){return console.error("Failed to update routing config:",I),R(I instanceof Error?I.message:"Failed to update routing config"),r(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}},U=async(X,$)=>{S(!0),R(null);try{const I=localStorage.getItem("mcphub_token"),H=await fetch(ke("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({install:{[X]:$}})});if(!H.ok)throw new Error(`HTTP error! Status: ${H.status}`);return(await H.json()).success?(x({...h,[X]:$}),r(l("settings.systemConfigUpdated")),!0):(r(l("errors.failedToUpdateSystemConfig")),!1)}catch(I){return console.error("Failed to update system config:",I),R(I instanceof Error?I.message:"Failed to update system config"),r(l("errors.failedToUpdateSystemConfig")),!1}finally{S(!1)}},K=async(X,$)=>{S(!0),R(null);try{const I=localStorage.getItem("mcphub_token"),H=await fetch(ke("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({smartRouting:{[X]:$}})});if(!H.ok){const te=await H.json();throw new Error(te.message||`HTTP error! Status: ${H.status}`)}const q=await H.json();return q.success?(m({...g,[X]:$}),r(l("settings.systemConfigUpdated")),!0):(r(q.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(I){console.error("Failed to update smart routing config:",I);const H=I instanceof Error?I.message:"Failed to update smart routing config";return R(H),r(H),!1}finally{S(!1)}},Y=async X=>{S(!0),R(null);try{const $=localStorage.getItem("mcphub_token"),I=await fetch(ke("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":$||""},body:JSON.stringify({smartRouting:X})});if(!I.ok){const q=await I.json();throw new Error(q.message||`HTTP error! Status: ${I.status}`)}const H=await I.json();return H.success?(m({...g,...X}),r(l("settings.systemConfigUpdated")),!0):(r(H.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch($){console.error("Failed to update smart routing config:",$);const I=$ instanceof Error?$.message:"Failed to update smart routing config";return R(I),r(I),!1}finally{S(!1)}},ce=async X=>{S(!0),R(null);try{const $=localStorage.getItem("mcphub_token"),I=await fetch(ke("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":$||""},body:JSON.stringify({routing:X})});if(!I.ok)throw new Error(`HTTP error! Status: ${I.status}`);return(await I.json()).success?(c({...s,...X}),r(l("settings.systemConfigUpdated")),!0):(r(l("errors.failedToUpdateRouteConfig")),!1)}catch($){return console.error("Failed to update routing config:",$),R($ instanceof Error?$.message:"Failed to update routing config"),r(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}};return w.useEffect(()=>{M()},[M,j]),w.useEffect(()=>{s&&d({bearerAuthKey:s.bearerAuthKey})},[s]),{routingConfig:s,tempRoutingConfig:f,setTempRoutingConfig:d,installConfig:h,smartRoutingConfig:g,loading:y,error:v,setError:R,triggerRefresh:T,fetchSettings:M,updateRoutingConfig:k,updateInstallConfig:U,updateSmartRoutingConfig:K,updateSmartRoutingConfigBatch:Y,updateRoutingConfigBatch:ce}};function i1(l=32){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=new Uint8Array(l);return crypto.getRandomValues(s),Array.from(s).map(c=>r.charAt(c%r.length)).join("")}const o1=()=>{const{t:l,i18n:r}=Oe(),s=Rn(),{showToast:c}=Ls(),[f,d]=w.useState(r.language);w.useEffect(()=>{d(r.language)},[r.language]);const[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[g,m]=w.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),{routingConfig:y,tempRoutingConfig:S,setTempRoutingConfig:v,installConfig:R,smartRoutingConfig:j,loading:C,updateRoutingConfig:T,updateRoutingConfigBatch:M,updateInstallConfig:k,updateSmartRoutingConfig:U,updateSmartRoutingConfigBatch:K}=r1();w.useEffect(()=>{R&&x(R)},[R]),w.useEffect(()=>{j&&m({dbUrl:j.dbUrl||"",openaiApiBaseUrl:j.openaiApiBaseUrl||"",openaiApiKey:j.openaiApiKey||"",openaiApiEmbeddingModel:j.openaiApiEmbeddingModel||""})},[j]);const[Y,ce]=w.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,password:!1}),X=D=>{ce(ue=>({...ue,[D]:!ue[D]}))},$=async(D,ue)=>{if(D==="enableBearerAuth"&&ue===!0&&!S.bearerAuthKey&&!y.bearerAuthKey){const E=i1();I(E),await M({enableBearerAuth:!0,bearerAuthKey:E})&&v(le=>({...le,bearerAuthKey:E}));return}await T(D,ue)},I=D=>{v(ue=>({...ue,bearerAuthKey:D}))},H=async()=>{await T("bearerAuthKey",S.bearerAuthKey)},q=(D,ue)=>{x({...h,[D]:ue})},te=async D=>{await k(D,h[D])},ae=(D,ue)=>{m({...g,[D]:ue})},ne=async D=>{await U(D,g[D])},V=async D=>{if(D){const ue=g.dbUrl||j.dbUrl,E=g.openaiApiKey||j.openaiApiKey;if(!ue||!E){const le=[];ue||le.push(l("settings.dbUrl")),E||le.push(l("settings.openaiApiKey")),c(l("settings.smartRoutingValidationError",{fields:le.join(", ")}));return}const Q={enabled:D};g.dbUrl!==j.dbUrl&&(Q.dbUrl=g.dbUrl),g.openaiApiBaseUrl!==j.openaiApiBaseUrl&&(Q.openaiApiBaseUrl=g.openaiApiBaseUrl),g.openaiApiKey!==j.openaiApiKey&&(Q.openaiApiKey=g.openaiApiKey),g.openaiApiEmbeddingModel!==j.openaiApiEmbeddingModel&&(Q.openaiApiEmbeddingModel=g.openaiApiEmbeddingModel),await K(Q)}else await U("enabled",D)},O=()=>{setTimeout(()=>{s("/")},2e3)},W=D=>{localStorage.setItem("i18nextLng",D),window.location.reload()};return i.jsxs("div",{className:"container mx-auto",children:[i.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.settings.title")}),i.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.language")}),i.jsxs("div",{className:"flex space-x-3",children:[i.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${f.startsWith("en")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>W("en"),children:"English"}),i.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${f.startsWith("zh")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>W("zh"),children:"中文"})]})]})}),i.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[i.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("smartRoutingConfig"),children:[i.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.smartRouting")}),i.jsx("span",{className:"text-gray-500",children:Y.smartRoutingConfig?"▼":"►"})]}),Y.smartRoutingConfig&&i.jsxs("div",{className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableSmartRouting")}),i.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableSmartRoutingDescription")})]}),i.jsx(As,{disabled:C,checked:j.enabled,onCheckedChange:D=>V(D)})]}),i.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[i.jsx("div",{className:"mb-2",children:i.jsxs("h3",{className:"font-medium text-gray-700",children:[i.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.dbUrl")]})}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("input",{type:"text",value:g.dbUrl,onChange:D=>ae("dbUrl",D.target.value),placeholder:l("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",disabled:C}),i.jsx("button",{onClick:()=>ne("dbUrl"),disabled:C,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",children:l("common.save")})]})]}),i.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[i.jsx("div",{className:"mb-2",children:i.jsxs("h3",{className:"font-medium text-gray-700",children:[i.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.openaiApiKey")]})}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("input",{type:"password",value:g.openaiApiKey,onChange:D=>ae("openaiApiKey",D.target.value),placeholder:l("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:C}),i.jsx("button",{onClick:()=>ne("openaiApiKey"),disabled:C,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",children:l("common.save")})]})]}),i.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[i.jsx("div",{className:"mb-2",children:i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiBaseUrl")})}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("input",{type:"text",value:g.openaiApiBaseUrl,onChange:D=>ae("openaiApiBaseUrl",D.target.value),placeholder:l("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",disabled:C}),i.jsx("button",{onClick:()=>ne("openaiApiBaseUrl"),disabled:C,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",children:l("common.save")})]})]}),i.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[i.jsx("div",{className:"mb-2",children:i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiEmbeddingModel")})}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("input",{type:"text",value:g.openaiApiEmbeddingModel,onChange:D=>ae("openaiApiEmbeddingModel",D.target.value),placeholder:l("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",disabled:C}),i.jsx("button",{onClick:()=>ne("openaiApiEmbeddingModel"),disabled:C,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",children:l("common.save")})]})]})]})]}),i.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[i.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("routingConfig"),children:[i.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.routeConfig")}),i.jsx("span",{className:"text-gray-500",children:Y.routingConfig?"▼":"►"})]}),Y.routingConfig&&i.jsxs("div",{className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableBearerAuth")}),i.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableBearerAuthDescription")})]}),i.jsx(As,{disabled:C,checked:y.enableBearerAuth,onCheckedChange:D=>$("enableBearerAuth",D)})]}),y.enableBearerAuth&&i.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[i.jsxs("div",{className:"mb-2",children:[i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.bearerAuthKey")}),i.jsx("p",{className:"text-sm text-gray-500",children:l("settings.bearerAuthKeyDescription")})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("input",{type:"text",value:S.bearerAuthKey,onChange:D=>I(D.target.value),placeholder:l("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",disabled:C||!y.enableBearerAuth}),i.jsx("button",{onClick:H,disabled:C||!y.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",children:l("common.save")})]})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGlobalRoute")}),i.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGlobalRouteDescription")})]}),i.jsx(As,{disabled:C,checked:y.enableGlobalRoute,onCheckedChange:D=>$("enableGlobalRoute",D)})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGroupNameRoute")}),i.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGroupNameRouteDescription")})]}),i.jsx(As,{disabled:C,checked:y.enableGroupNameRoute,onCheckedChange:D=>$("enableGroupNameRoute",D)})]})]})]}),i.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[i.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("installConfig"),children:[i.jsx("h2",{className:"font-semibold text-gray-800",children:l("settings.installConfig")}),i.jsx("span",{className:"text-gray-500",children:Y.installConfig?"▼":"►"})]}),Y.installConfig&&i.jsxs("div",{className:"space-y-4 mt-4",children:[i.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[i.jsxs("div",{className:"mb-2",children:[i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.pythonIndexUrl")}),i.jsx("p",{className:"text-sm text-gray-500",children:l("settings.pythonIndexUrlDescription")})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("input",{type:"text",value:h.pythonIndexUrl,onChange:D=>q("pythonIndexUrl",D.target.value),placeholder:l("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",disabled:C}),i.jsx("button",{onClick:()=>te("pythonIndexUrl"),disabled:C,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",children:l("common.save")})]})]}),i.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[i.jsxs("div",{className:"mb-2",children:[i.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.npmRegistry")}),i.jsx("p",{className:"text-sm text-gray-500",children:l("settings.npmRegistryDescription")})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("input",{type:"text",value:h.npmRegistry,onChange:D=>q("npmRegistry",D.target.value),placeholder:l("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",disabled:C}),i.jsx("button",{onClick:()=>te("npmRegistry"),disabled:C,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",children:l("common.save")})]})]})]})]}),i.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[i.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("password"),children:[i.jsx("h2",{className:"font-semibold text-gray-800",children:l("auth.changePassword")}),i.jsx("span",{className:"text-gray-500",children:Y.password?"▼":"►"})]}),Y.password&&i.jsx("div",{className:"max-w-lg mt-4",children:i.jsx(s1,{onSuccess:O})})]})]})},c1=()=>{const{t:l}=Oe(),[r,s]=w.useState([]),[c,f]=w.useState([]),[d,h]=w.useState([]),[x,g]=w.useState([]),[m,y]=w.useState(""),[S,v]=w.useState(""),[R,j]=w.useState(""),[C,T]=w.useState(!0),[M,k]=w.useState(null),[U,K]=w.useState(null),[Y,ce]=w.useState([]),[X,$]=w.useState(1),[I,H]=w.useState(9),[q,te]=w.useState(1),ae=w.useCallback(async()=>{try{T(!0);const ee=localStorage.getItem("mcphub_token"),se=await fetch(ke("/market/servers"),{headers:{"x-auth-token":ee||""}});if(!se.ok)throw new Error(`Status: ${se.status}`);const ie=await se.json();ie&&ie.success&&Array.isArray(ie.data)?(f(ie.data),ne(ie.data,X)):(console.error("Invalid market servers data format:",ie),k(l("market.fetchError")))}catch(ee){console.error("Error fetching market servers:",ee),k(ee instanceof Error?ee.message:String(ee))}finally{T(!1)}},[l]),ne=w.useCallback((ee,se,ie=I)=>{const pe=ee.length,xe=Math.ceil(pe/ie);te(xe);const Me=Math.max(1,Math.min(se,xe));Me!==se&&$(Me);const Ve=(Me-1)*ie,Nt=ee.slice(Ve,Ve+ie);s(Nt)},[I]),V=w.useCallback(ee=>{$(ee),ne(c,ee,I)},[c,ne,I]),O=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),se=await fetch(ke("/market/categories"),{headers:{"x-auth-token":ee||""}});if(!se.ok)throw new Error(`Status: ${se.status}`);const ie=await se.json();ie&&ie.success&&Array.isArray(ie.data)?h(ie.data):console.error("Invalid categories data format:",ie)}catch(ee){console.error("Error fetching categories:",ee)}},[]),W=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),se=await fetch(ke("/market/tags"),{headers:{"x-auth-token":ee||""}});if(!se.ok)throw new Error(`Status: ${se.status}`);const ie=await se.json();ie&&ie.success&&Array.isArray(ie.data)?g(ie.data):console.error("Invalid tags data format:",ie)}catch(ee){console.error("Error fetching tags:",ee)}},[]),D=w.useCallback(async ee=>{try{T(!0);const se=localStorage.getItem("mcphub_token"),ie=await fetch(ke(`/market/servers/${ee}`),{headers:{"x-auth-token":se||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();return pe&&pe.success&&pe.data?(K(pe.data),pe.data):(console.error("Invalid server data format:",pe),k(l("market.serverNotFound")),null)}catch(se){return console.error(`Error fetching server ${ee}:`,se),k(se instanceof Error?se.message:String(se)),null}finally{T(!1)}},[l]),ue=w.useCallback(async ee=>{try{if(T(!0),j(ee),!ee.trim()){ae();return}const se=localStorage.getItem("mcphub_token"),ie=await fetch(ke(`/market/servers/search?query=${encodeURIComponent(ee)}`),{headers:{"x-auth-token":se||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();pe&&pe.success&&Array.isArray(pe.data)?(f(pe.data),$(1),ne(pe.data,1)):(console.error("Invalid search results format:",pe),k(l("market.searchError")))}catch(se){console.error("Error searching servers:",se),k(se instanceof Error?se.message:String(se))}finally{T(!1)}},[l,c,ne,ae]),E=w.useCallback(async ee=>{try{if(T(!0),y(ee),v(""),!ee){ae();return}const se=localStorage.getItem("mcphub_token"),ie=await fetch(ke(`/market/categories/${encodeURIComponent(ee)}`),{headers:{"x-auth-token":se||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();pe&&pe.success&&Array.isArray(pe.data)?(f(pe.data),$(1),ne(pe.data,1)):(console.error("Invalid category filter results format:",pe),k(l("market.filterError")))}catch(se){console.error("Error filtering servers by category:",se),k(se instanceof Error?se.message:String(se))}finally{T(!1)}},[l,ae,ne]),Q=w.useCallback(async ee=>{try{if(T(!0),v(ee),y(""),!ee){ae();return}const se=localStorage.getItem("mcphub_token"),ie=await fetch(ke(`/market/tags/${encodeURIComponent(ee)}`),{headers:{"x-auth-token":se||""}});if(!ie.ok)throw new Error(`Status: ${ie.status}`);const pe=await ie.json();pe&&pe.success&&Array.isArray(pe.data)?(f(pe.data),$(1),ne(pe.data,1)):(console.error("Invalid tag filter results format:",pe),k(l("market.tagFilterError")))}catch(se){console.error("Error filtering servers by tag:",se),k(se instanceof Error?se.message:String(se))}finally{T(!1)}},[l,ae,ne]),le=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),se=await fetch(ke("/servers"),{headers:{"x-auth-token":ee||""}});if(!se.ok)throw new Error(`Status: ${se.status}`);const ie=await se.json();if(ie&&ie.success&&Array.isArray(ie.data)){const pe=ie.data.map(xe=>xe.name);ce(pe)}}catch(ee){console.error("Error fetching installed servers:",ee)}},[]),P=w.useCallback(ee=>Y.includes(ee),[Y]),re=w.useCallback(async(ee,se)=>{var ie,pe;try{const xe=(ie=ee.installations)!=null&&ie.npm?"npm":Object.keys(ee.installations||{}).length>0?Object.keys(ee.installations)[0]:null;if(!xe||!((pe=ee.installations)!=null&&pe[xe]))return k(l("market.noInstallationMethod")),!1;const Me=ee.installations[xe],Ve={name:ee.name,config:se.type==="stdio"?{command:se.command||Me.command||"",args:se.args||Me.args||[],env:{...Me.env,...se.env}}:se},Nt=localStorage.getItem("mcphub_token"),Ct=await fetch(ke("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":Nt||""},body:JSON.stringify(Ve)});if(!Ct.ok){const fa=await Ct.json();throw new Error(fa.message||`Status: ${Ct.status}`)}return await le(),!0}catch(xe){return console.error("Error installing server:",xe),k(xe instanceof Error?xe.message:String(xe)),!1}},[l,le]),Se=w.useCallback(ee=>{H(ee),$(1),ne(c,1,ee)},[c,ne]);return w.useEffect(()=>{ae(),O(),W(),le()},[ae,O,W,le]),{servers:r,allServers:c,categories:d,tags:x,selectedCategory:m,selectedTag:S,searchQuery:R,loading:C,error:M,setError:k,currentServer:U,fetchMarketServers:ae,fetchServerByName:D,searchServers:ue,filterByCategory:E,filterByTag:Q,installServer:re,currentPage:X,totalPages:q,serversPerPage:I,changePage:V,changeServersPerPage:Se,isServerInstalled:P}},u1=({server:l,onClick:r})=>{var x,g,m,y;const{t:s}=Oe(),c=()=>{if(!l.tags||l.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const S=28,v=k=>k.length+3;let R=0,j=0;const C=[...l.tags].sort((k,U)=>k.length-U.length);for(j=0;j<C.length;j++){const k=v(C[j]);if(R+k>S)break;if(R+=k,j===C.length-1)return{tagsToShow:C,hasMore:!1,moreCount:0}}j===0&&C.length>0&&(j=1);const T=C.length-j,M=3+String(T).length+s("market.moreTags").length;return R+M<=S||j<1?{tagsToShow:C.slice(0,j),hasMore:!0,moreCount:T}:{tagsToShow:C.slice(0,Math.max(1,j-1)),hasMore:!0,moreCount:T+1}},{tagsToShow:f,hasMore:d,moreCount:h}=c();return i.jsxs("div",{className:"bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow cursor-pointer flex flex-col h-full",onClick:()=>r(l),children:[i.jsxs("div",{className:"flex justify-between items-start mb-3",children:[i.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:l.display_name}),l.is_official&&i.jsx("span",{className:"bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded flex-shrink-0",children:s("market.official")})]}),i.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:l.description}),i.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((x=l.categories)==null?void 0:x.length)>0?l.categories.map((S,v)=>i.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:S},v)):i.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),i.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((g=l.tags)==null?void 0:g.length)>0?i.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[f.map((S,v)=>i.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",S]},v)),d&&i.jsxs("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-1 rounded flex-shrink-0",children:["+",h," ",s("market.moreTags")]})]}):i.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),i.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[i.jsxs("div",{className:"overflow-hidden",children:[i.jsxs("span",{className:"whitespace-nowrap",children:[s("market.by")," "]}),i.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((m=l.author)==null?void 0:m.name)||s("market.unknown")})]}),i.jsxs("div",{className:"flex items-center flex-shrink-0",children:[i.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:i.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"})}),i.jsxs("span",{children:[((y=l.tools)==null?void 0:y.length)||0," ",s("market.tools")]})]})]})]})},d1=({server:l,onBack:r,onInstall:s,installing:c=!1,isInstalled:f=!1})=>{var M,k;const{t:d}=Oe(),[h,x]=w.useState(!1),[g,m]=w.useState(null),y=()=>f?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:d("market.installed")}:c?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:d("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white",disabled:!1,text:d("market.install")},S=()=>{x(!h),m(null)},v=()=>{f||S()},R=()=>{if(!l.installations)return;if(l.installations.npm)return l.installations.npm;if(l.installations.uvx)return l.installations.uvx;if(l.installations.default)return l.installations.default;const U=Object.keys(l.installations);if(U.length>0)return l.installations[U[0]]},j=async U=>{try{m(null),s(l,U.config),x(!1)}catch(K){console.error("Error installing server:",K),m(d("errors.serverInstall"))}},C=y(),T=R();return i.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[i.jsx("div",{className:"mb-4",children:i.jsxs("button",{onClick:r,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[i.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})}),d("market.backToList")]})}),i.jsxs("div",{className:"flex justify-between items-start mb-4",children:[i.jsx("div",{children:i.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[l.display_name,i.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",l.name,")"]}),i.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[d("market.author"),": ",l.author.name," • ",d("market.license"),": ",l.license," •",i.jsx("a",{href:l.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:d("market.repository")})]})]})}),i.jsxs("div",{className:"flex items-center",children:[l.is_official&&i.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-medium px-4 py-2 rounded mr-2 flex items-center",children:d("market.official")}),i.jsx("button",{onClick:v,disabled:C.disabled,className:C.className,children:C.text})]})]}),i.jsx("p",{className:"text-gray-700 mb-6",children:l.description}),i.jsxs("div",{className:"mb-6",children:[i.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[d("market.categories")," & ",d("market.tags")]}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[(M=l.categories)==null?void 0:M.map((U,K)=>i.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:U},`cat-${K}`)),l.tags&&l.tags.map((U,K)=>i.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",U]},`tag-${K}`))]})]}),l.arguments&&Object.keys(l.arguments).length>0&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold mb-3",children:d("market.arguments")}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.argumentName")}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.description")}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.required")}),i.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.example")})]})}),i.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(l.arguments).map(([U,K],Y)=>i.jsxs("tr",{children:[i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:U}),i.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:K.description}),i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:K.required?i.jsx("span",{className:"text-green-600",children:"✓"}):i.jsx("span",{className:"text-red-600",children:"✗"})}),i.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:i.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:K.example})})]},Y))})]})})]}),i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold mb-3",children:d("market.tools")}),i.jsx("div",{className:"space-y-4",children:(k=l.tools)==null?void 0:k.map((U,K)=>i.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[i.jsxs("h4",{className:"font-medium mb-2",children:[U.name,i.jsx("button",{type:"button",onClick:()=>{const Y=document.getElementById(`schema-${K}`);Y&&Y.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:d("market.viewSchema")})]}),i.jsx("p",{className:"text-gray-600 mb-2",children:U.description}),i.jsx("div",{className:"mt-2",children:i.jsx("pre",{id:`schema-${K}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(U.inputSchema,null,2)})})]},K))})]}),l.examples&&l.examples.length>0&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-lg font-semibold mb-3",children:d("market.examples")}),i.jsx("div",{className:"space-y-4",children:l.examples.map((U,K)=>i.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[i.jsx("h4",{className:"font-medium mb-2",children:U.title}),i.jsx("p",{className:"text-gray-600 mb-2",children:U.description}),i.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:U.prompt})]},K))})]}),i.jsx("div",{className:"mt-6 flex justify-end",children:i.jsx("button",{onClick:v,disabled:C.disabled,className:C.className,children:C.text})}),h&&i.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:i.jsx(iu,{onSubmit:j,onCancel:S,modalTitle:d("market.installServer",{name:l.display_name}),formError:g,initialData:{name:l.name,status:"disconnected",config:T?{command:T.command||"",args:T.args||[],env:T.env||{}}:void 0}})})]})},f1=({currentPage:l,totalPages:r,onPageChange:s})=>{const c=()=>{const f=[];f.push(i.jsx("button",{onClick:()=>s(1),className:`px-3 py-1 mx-1 rounded ${l===1?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"1"},"first"));let h=Math.max(2,l-Math.floor(5/2));h>2&&f.push(i.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let x=h;x<=Math.min(r-1,h+5-3);x++)f.push(i.jsx("button",{onClick:()=>s(x),className:`px-3 py-1 mx-1 rounded ${l===x?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:x},x));return h+5-3<r-1&&f.push(i.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),r>1&&f.push(i.jsx("button",{onClick:()=>s(r),className:`px-3 py-1 mx-1 rounded ${l===r?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:r},"last")),f};return r<=1?null:i.jsxs("div",{className:"flex justify-center items-center my-6",children:[i.jsx("button",{onClick:()=>s(Math.max(1,l-1)),disabled:l===1,className:`px-3 py-1 rounded mr-2 ${l===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"« Prev"}),i.jsx("div",{className:"flex",children:c()}),i.jsx("button",{onClick:()=>s(Math.min(r,l+1)),disabled:l===r,className:`px-3 py-1 rounded ml-2 ${l===r?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"Next »"})]})},bh=()=>{const{t:l}=Oe(),r=Rn();da();const{serverName:s}=Hx(),{showToast:c}=Ls(),{servers:f,allServers:d,categories:h,loading:x,error:g,setError:m,searchServers:y,filterByCategory:S,filterByTag:v,selectedCategory:R,selectedTag:j,installServer:C,fetchServerByName:T,isServerInstalled:M,currentPage:k,totalPages:U,changePage:K,serversPerPage:Y,changeServersPerPage:ce}=c1(),[X,$]=w.useState(null),[I,H]=w.useState(""),[q,te]=w.useState(!1),[ae,ne]=w.useState(!1);w.useEffect(()=>{(async()=>{if(s){const re=await T(s);re?$(re):r("/market")}else $(null)})()},[s,T,r]);const V=P=>{P.preventDefault(),y(I)},O=P=>{S(P)},W=()=>{H(""),S(""),v("")},D=P=>{r(`/market/${P.name}`)},ue=()=>{r("/market")},E=async(P,re)=>{try{te(!0),await C(P,re)&&c(l("market.installSuccess",{serverName:P.display_name}),"success")}finally{te(!1)}},Q=P=>{K(P),window.scrollTo({top:0,behavior:"smooth"})},le=P=>{const re=parseInt(P.target.value,10);ce(re)};return X?i.jsx(d1,{server:X,onBack:ue,onInstall:E,installing:q,isInstalled:M(X.name)}):i.jsxs("div",{children:[i.jsx("div",{className:"flex justify-between items-center mb-8",children:i.jsx("div",{children:i.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[l("market.title"),i.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:l("pages.market.title").split(" - ")[1]})]})})}),g&&i.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("p",{children:g}),i.jsx("button",{onClick:()=>m(null),className:"text-red-700 hover:text-red-900",children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:i.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"})})})]})}),i.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:i.jsxs("form",{onSubmit:V,className:"flex space-x-4 mb-0",children:[i.jsx("div",{className:"flex-grow",children:i.jsx("input",{type:"text",value:I,onChange:P=>H(P.target.value),placeholder:l("market.searchPlaceholder"),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"})}),i.jsx("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded",children:l("market.search")}),(I||R||j)&&i.jsx("button",{type:"button",onClick:W,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:l("market.clearFilters")})]})}),i.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[i.jsx("div",{className:"md:w-48 flex-shrink-0",children:i.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:h.length>0?i.jsxs("div",{className:"mb-6",children:[i.jsxs("div",{className:"flex justify-between items-center mb-3",children:[i.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")}),R&&i.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>S(""),children:l("market.clearCategoryFilter")})]}),i.jsx("div",{className:"flex flex-col gap-2",children:h.map(P=>i.jsx("button",{onClick:()=>O(P),className:`px-3 py-2 rounded text-sm text-left ${R===P?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:P},P))})]}):x?i.jsxs("div",{className:"mb-6",children:[i.jsx("div",{className:"mb-3",children:i.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),i.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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.jsx("p",{className:"text-sm text-gray-600",children:l("app.loading")})]})]}):i.jsxs("div",{className:"mb-6",children:[i.jsx("div",{className:"mb-3",children:i.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),i.jsx("p",{className:"text-sm text-gray-600 py-2",children:l("market.noCategories")})]})})}),i.jsx("div",{className:"flex-grow",children:x?i.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:i.jsxs("div",{className:"flex flex-col items-center",children:[i.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:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.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.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):f.length===0?i.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:i.jsx("p",{className:"text-gray-600",children:l("market.noServers")})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:f.map((P,re)=>i.jsx(u1,{server:P,onClick:D},re))}),i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("div",{className:"text-sm text-gray-500",children:l("market.showing",{from:(k-1)*Y+1,to:Math.min(k*Y,d.length),total:d.length})}),i.jsx(f1,{currentPage:k,totalPages:U,onPageChange:Q}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[l("market.perPage"),":"]}),i.jsxs("select",{id:"perPage",value:Y,onChange:le,className:"border rounded p-1 text-sm",children:[i.jsx("option",{value:"6",children:"6"}),i.jsx("option",{value:"9",children:"9"}),i.jsx("option",{value:"12",children:"12"}),i.jsx("option",{value:"24",children:"24"})]})]})]}),i.jsx("div",{className:"mt-6"})]})})]})]})},m1={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"},h1={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 g1({variant:l="default",size:r="default",className:s,disabled:c,children:f,...d}){return i.jsx("button",{className:an("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",m1[l],h1[r],s),disabled:c,...d,children:f})}const p1=({logs:l,isLoading:r=!1,error:s=null,onClear:c})=>{const{t:f}=Oe(),d=w.useRef(null),[h,x]=w.useState(!0),[g,m]=w.useState(""),[y,S]=w.useState(["info","error","warn","debug"]),[v,R]=w.useState(["main","child"]);w.useEffect(()=>{h&&d.current&&(d.current.scrollTop=d.current.scrollHeight)},[l,h]);const j=l.filter(k=>{const U=g?k.message.toLowerCase().includes(g.toLowerCase()):!0,K=y.includes(k.type),Y=v.includes(k.source);return U&&K&&Y}),C=k=>new Date(k).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),T=k=>{switch(k){case"error":return"bg-red-400";case"warn":return"bg-yellow-400";case"debug":return"bg-purple-400";default:return"bg-blue-400"}},M=k=>{switch(k){case"main":return"bg-green-400";case"child":return"bg-orange-400";default:return"bg-gray-400"}};return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"bg-card p-3 rounded-t-md border-b flex flex-wrap items-center justify-between gap-2",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsxs("span",{className:"font-semibold text-sm",children:[f("logs.filters"),":"]}),i.jsx("input",{type:"text",placeholder:f("logs.search"),className:"px-2 py-1 text-sm border rounded",value:g,onChange:k=>m(k.target.value)}),i.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(k=>i.jsx(ri,{variant:y.includes(k)?"default":"outline",className:`cursor-pointer ${y.includes(k)?T(k):""}`,onClick:()=>{y.includes(k)?S(U=>U.filter(K=>K!==k)):S(U=>[...U,k])},children:k},k))}),i.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(k=>i.jsx(ri,{variant:v.includes(k)?"default":"outline",className:`cursor-pointer ${v.includes(k)?M(k):""}`,onClick:()=>{v.includes(k)?R(U=>U.filter(K=>K!==k)):R(U=>[...U,k])},children:f(k==="main"?"logs.mainProcess":"logs.childProcess")},k))})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[i.jsx("input",{type:"checkbox",checked:h,onChange:()=>x(!h),className:"form-checkbox h-4 w-4"}),f("logs.autoScroll")]}),i.jsx(g1,{variant:"outline",size:"sm",onClick:c,disabled:r||l.length===0,children:f("logs.clearLogs")})]})]}),i.jsx("div",{ref:d,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:r?i.jsx("div",{className:"flex justify-center items-center h-full",children:i.jsx("span",{children:f("logs.loading")})}):s?i.jsx("div",{className:"text-red-500 p-2",children:s.message}):j.length===0?i.jsx("div",{className:"text-center text-muted-foreground p-8",children:g||y.length<4||v.length<2?f("logs.noMatch"):f("logs.noLogs")}):j.map((k,U)=>i.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${k.type==="error"?"text-red-500":k.type==="warn"?"text-yellow-500":""}`,children:[i.jsxs("span",{className:"text-gray-400",children:["[",C(k.timestamp),"]"]}),i.jsx(ri,{className:`ml-2 mr-1 ${T(k.type)}`,children:k.type}),i.jsxs(ri,{variant:"default",className:`mr-2 ${M(k.source)}`,children:[k.source==="main"?f("logs.main"):f("logs.child"),k.processId?` (${k.processId})`:""]}),i.jsx("span",{className:"whitespace-pre-wrap",children:k.message})]},`${k.timestamp}-${U}`))})]})},x1=async()=>{try{const l=nn();if(!l)throw new Error("Authentication token not found. Please log in.");const s=await(await fetch(ke("/logs"),{method:"DELETE",headers:{"x-auth-token":l}})).json();if(!s.success)throw new Error(s.error||"Failed to clear logs")}catch(l){throw console.error("Error clearing logs:",l),l}},y1=()=>{const[l,r]=w.useState([]),[s,c]=w.useState(!0),[f,d]=w.useState(null);return w.useEffect(()=>{let x=null,g=!0;const m=()=>{try{x&&x.close();const y=nn();if(!y){d(new Error("Authentication token not found. Please log in.")),c(!1);return}x=new EventSource(ke(`/logs/stream?token=${y}`)),x.onmessage=S=>{if(g)try{const v=JSON.parse(S.data);v.type==="initial"?(r(v.logs),c(!1)):v.type==="log"&&r(R=>[...R,v.log])}catch(v){console.error("Error parsing SSE message:",v)}},x.onerror=()=>{g&&(x&&(x.close(),setTimeout(m,5e3)),d(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(y){if(!g)return;d(y instanceof Error?y:new Error("Failed to connect to log stream")),c(!1)}};return m(),()=>{g=!1,x&&x.close()}},[]),{logs:l,loading:s,error:f,clearLogs:async()=>{try{await x1(),r([])}catch(x){d(x instanceof Error?x:new Error("Failed to clear logs"))}}}},b1=()=>{const{t:l}=Oe(),{logs:r,loading:s,error:c,clearLogs:f}=y1();return i.jsxs("div",{className:"container mx-auto p-4",children:[i.jsx("div",{className:"flex justify-between items-center mb-4",children:i.jsx("h1",{className:"text-2xl font-bold",children:l("pages.logs.title")})}),i.jsx("div",{className:"bg-card rounded-md shadow-sm",children:i.jsx(p1,{logs:r,isLoading:s,error:c,onClear:f})})]})};function vh(){const l=ng();return i.jsx(rv,{children:i.jsx(qy,{children:i.jsx(lv,{children:i.jsx(jy,{basename:l,children:i.jsxs(Wx,{children:[i.jsx(Kt,{path:"/login",element:i.jsx(Hv,{})}),i.jsx(Kt,{element:i.jsx(_v,{}),children:i.jsxs(Kt,{element:i.jsx(Lv,{}),children:[i.jsx(Kt,{path:"/",element:i.jsx(Bv,{})}),i.jsx(Kt,{path:"/servers",element:i.jsx(e1,{})}),i.jsx(Kt,{path:"/groups",element:i.jsx(l1,{})}),i.jsx(Kt,{path:"/market",element:i.jsx(bh,{})}),i.jsx(Kt,{path:"/market/:serverName",element:i.jsx(bh,{})}),i.jsx(Kt,{path:"/logs",element:i.jsx(b1,{})}),i.jsx(Kt,{path:"/settings",element:i.jsx(o1,{})})]})}),i.jsx(Kt,{path:"*",element:i.jsx(Ph,{to:"/"})})]})})})})})}const je=l=>typeof l=="string",Ts=()=>{let l,r;const s=new Promise((c,f)=>{l=c,r=f});return s.resolve=l,s.reject=r,s},wh=l=>l==null?"":""+l,v1=(l,r,s)=>{l.forEach(c=>{r[c]&&(s[c]=r[c])})},w1=/###/g,Sh=l=>l&&l.indexOf("###")>-1?l.replace(w1,"."):l,jh=l=>!l||je(l),Rs=(l,r,s)=>{const c=je(r)?r.split("."):r;let f=0;for(;f<c.length-1;){if(jh(l))return{};const d=Sh(c[f]);!l[d]&&s&&(l[d]=new s),Object.prototype.hasOwnProperty.call(l,d)?l=l[d]:l={},++f}return jh(l)?{}:{obj:l,k:Sh(c[f])}},Nh=(l,r,s)=>{const{obj:c,k:f}=Rs(l,r,Object);if(c!==void 0||r.length===1){c[f]=s;return}let d=r[r.length-1],h=r.slice(0,r.length-1),x=Rs(l,h,Object);for(;x.obj===void 0&&h.length;)d=`${h[h.length-1]}.${d}`,h=h.slice(0,h.length-1),x=Rs(l,h,Object),x!=null&&x.obj&&typeof x.obj[`${x.k}.${d}`]<"u"&&(x.obj=void 0);x.obj[`${x.k}.${d}`]=s},S1=(l,r,s,c)=>{const{obj:f,k:d}=Rs(l,r,Object);f[d]=f[d]||[],f[d].push(s)},di=(l,r)=>{const{obj:s,k:c}=Rs(l,r);if(s&&Object.prototype.hasOwnProperty.call(s,c))return s[c]},j1=(l,r,s)=>{const c=di(l,s);return c!==void 0?c:di(r,s)},Ug=(l,r,s)=>{for(const c in r)c!=="__proto__"&&c!=="constructor"&&(c in l?je(l[c])||l[c]instanceof String||je(r[c])||r[c]instanceof String?s&&(l[c]=r[c]):Ug(l[c],r[c],s):l[c]=r[c]);return l},yl=l=>l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var N1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const C1=l=>je(l)?l.replace(/[&<>"'\/]/g,r=>N1[r]):l;class E1{constructor(r){this.capacity=r,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(r){const s=this.regExpMap.get(r);if(s!==void 0)return s;const c=new RegExp(r);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(r,c),this.regExpQueue.push(r),c}}const k1=[" ",",","?","!",";"],T1=new E1(20),A1=(l,r,s)=>{r=r||"",s=s||"";const c=k1.filter(h=>r.indexOf(h)<0&&s.indexOf(h)<0);if(c.length===0)return!0;const f=T1.getRegExp(`(${c.map(h=>h==="?"?"\\?":h).join("|")})`);let d=!f.test(l);if(!d){const h=l.indexOf(s);h>0&&!f.test(l.substring(0,h))&&(d=!0)}return d},Jc=function(l,r){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!l)return;if(l[r])return Object.prototype.hasOwnProperty.call(l,r)?l[r]:void 0;const c=r.split(s);let f=l;for(let d=0;d<c.length;){if(!f||typeof f!="object")return;let h,x="";for(let g=d;g<c.length;++g)if(g!==d&&(x+=s),x+=c[g],h=f[x],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&g<c.length-1)continue;d+=g-d+1;break}f=h}return f},fi=l=>l==null?void 0:l.replace("_","-"),R1={type:"logger",log(l){this.output("log",l)},warn(l){this.output("warn",l)},error(l){this.output("error",l)},output(l,r){var s,c;(c=(s=console==null?void 0:console[l])==null?void 0:s.apply)==null||c.call(s,console,r)}};class mi{constructor(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(r,s)}init(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=s.prefix||"i18next:",this.logger=r||R1,this.options=s,this.debug=s.debug}log(){for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return this.forward(s,"log","",!0)}warn(){for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return this.forward(s,"warn","",!0)}error(){for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return this.forward(s,"error","")}deprecate(){for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return this.forward(s,"warn","WARNING DEPRECATED: ",!0)}forward(r,s,c,f){return f&&!this.debug?null:(je(r[0])&&(r[0]=`${c}${this.prefix} ${r[0]}`),this.logger[s](r))}create(r){return new mi(this.logger,{prefix:`${this.prefix}:${r}:`,...this.options})}clone(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new mi(this.logger,r)}}var ua=new mi;class bi{constructor(){this.observers={}}on(r,s){return r.split(" ").forEach(c=>{this.observers[c]||(this.observers[c]=new Map);const f=this.observers[c].get(s)||0;this.observers[c].set(s,f+1)}),this}off(r,s){if(this.observers[r]){if(!s){delete this.observers[r];return}this.observers[r].delete(s)}}emit(r){for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];this.observers[r]&&Array.from(this.observers[r].entries()).forEach(h=>{let[x,g]=h;for(let m=0;m<g;m++)x(...c)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(h=>{let[x,g]=h;for(let m=0;m<g;m++)x.apply(x,[r,...c])})}}class Ch extends bi{constructor(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=r||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}removeNamespaces(r){const s=this.options.ns.indexOf(r);s>-1&&this.options.ns.splice(s,1)}getResource(r,s,c){var m,y;let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const d=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,h=f.ignoreJSONStructure!==void 0?f.ignoreJSONStructure:this.options.ignoreJSONStructure;let x;r.indexOf(".")>-1?x=r.split("."):(x=[r,s],c&&(Array.isArray(c)?x.push(...c):je(c)&&d?x.push(...c.split(d)):x.push(c)));const g=di(this.data,x);return!g&&!s&&!c&&r.indexOf(".")>-1&&(r=x[0],s=x[1],c=x.slice(2).join(".")),g||!h||!je(c)?g:Jc((y=(m=this.data)==null?void 0:m[r])==null?void 0:y[s],c,d)}addResource(r,s,c,f){let d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const h=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let x=[r,s];c&&(x=x.concat(h?c.split(h):c)),r.indexOf(".")>-1&&(x=r.split("."),f=s,s=x[1]),this.addNamespaces(s),Nh(this.data,x,f),d.silent||this.emit("added",r,s,c,f)}addResources(r,s,c){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const d in c)(je(c[d])||Array.isArray(c[d]))&&this.addResource(r,s,d,c[d],{silent:!0});f.silent||this.emit("added",r,s,c)}addResourceBundle(r,s,c,f,d){let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},x=[r,s];r.indexOf(".")>-1&&(x=r.split("."),f=c,c=s,s=x[1]),this.addNamespaces(s);let g=di(this.data,x)||{};h.skipCopy||(c=JSON.parse(JSON.stringify(c))),f?Ug(g,c,d):g={...g,...c},Nh(this.data,x,g),h.silent||this.emit("added",r,s,c)}removeResourceBundle(r,s){this.hasResourceBundle(r,s)&&delete this.data[r][s],this.removeNamespaces(s),this.emit("removed",r,s)}hasResourceBundle(r,s){return this.getResource(r,s)!==void 0}getResourceBundle(r,s){return s||(s=this.options.defaultNS),this.getResource(r,s)}getDataByLanguage(r){return this.data[r]}hasLanguageSomeTranslations(r){const s=this.getDataByLanguage(r);return!!(s&&Object.keys(s)||[]).find(f=>s[f]&&Object.keys(s[f]).length>0)}toJSON(){return this.data}}var Lg={processors:{},addPostProcessor(l){this.processors[l.name]=l},handle(l,r,s,c,f){return l.forEach(d=>{var h;r=((h=this.processors[d])==null?void 0:h.process(r,s,c,f))??r}),r}};const Eh={},kh=l=>!je(l)&&typeof l!="boolean"&&typeof l!="number";class hi extends bi{constructor(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),v1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ua.create("translator")}changeLanguage(r){r&&(this.language=r)}exists(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(r==null)return!1;const c=this.resolve(r,s);return(c==null?void 0:c.res)!==void 0}extractFromKey(r,s){let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let d=s.ns||this.options.defaultNS||[];const h=c&&r.indexOf(c)>-1,x=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!A1(r,c,f);if(h&&!x){const g=r.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:r,namespaces:je(d)?[d]:d};const m=r.split(c);(c!==f||c===f&&this.options.ns.indexOf(m[0])>-1)&&(d=m.shift()),r=m.join(f)}return{key:r,namespaces:je(d)?[d]:d}}translate(r,s,c){if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);const f=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,d=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:h,namespaces:x}=this.extractFromKey(r[r.length-1],s),g=x[x.length-1],m=s.lng||this.language,y=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((m==null?void 0:m.toLowerCase())==="cimode"){if(y){const q=s.nsSeparator||this.options.nsSeparator;return f?{res:`${g}${q}${h}`,usedKey:h,exactUsedKey:h,usedLng:m,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${q}${h}`}return f?{res:h,usedKey:h,exactUsedKey:h,usedLng:m,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:h}const S=this.resolve(r,s);let v=S==null?void 0:S.res;const R=(S==null?void 0:S.usedKey)||h,j=(S==null?void 0:S.exactUsedKey)||h,C=["[object Number]","[object Function]","[object RegExp]"],T=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,k=s.count!==void 0&&!je(s.count),U=hi.hasDefaultValue(s),K=k?this.pluralResolver.getSuffix(m,s.count,s):"",Y=s.ordinal&&k?this.pluralResolver.getSuffix(m,s.count,{ordinal:!1}):"",ce=k&&!s.ordinal&&s.count===0,X=ce&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${K}`]||s[`defaultValue${Y}`]||s.defaultValue;let $=v;M&&!v&&U&&($=X);const I=kh($),H=Object.prototype.toString.apply($);if(M&&$&&I&&C.indexOf(H)<0&&!(je(T)&&Array.isArray($))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,$,{...s,ns:x}):`key '${h} (${this.language})' returned an object instead of string.`;return f?(S.res=q,S.usedParams=this.getUsedParamsDetails(s),S):q}if(d){const q=Array.isArray($),te=q?[]:{},ae=q?j:R;for(const ne in $)if(Object.prototype.hasOwnProperty.call($,ne)){const V=`${ae}${d}${ne}`;U&&!v?te[ne]=this.translate(V,{...s,defaultValue:kh(X)?X[ne]:void 0,joinArrays:!1,ns:x}):te[ne]=this.translate(V,{...s,joinArrays:!1,ns:x}),te[ne]===V&&(te[ne]=$[ne])}v=te}}else if(M&&je(T)&&Array.isArray(v))v=v.join(T),v&&(v=this.extendTranslation(v,r,s,c));else{let q=!1,te=!1;!this.isValidLookup(v)&&U&&(q=!0,v=X),this.isValidLookup(v)||(te=!0,v=h);const ne=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:v,V=U&&X!==v&&this.options.updateMissing;if(te||q||V){if(this.logger.log(V?"updateKey":"missingKey",m,g,h,V?X:v),d){const ue=this.resolve(h,{...s,keySeparator:!1});ue&&ue.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 O=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let ue=0;ue<W.length;ue++)O.push(W[ue]);else this.options.saveMissingTo==="all"?O=this.languageUtils.toResolveHierarchy(s.lng||this.language):O.push(s.lng||this.language);const D=(ue,E,Q)=>{var P;const le=U&&Q!==v?Q:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(ue,g,E,le,V,s):(P=this.backendConnector)!=null&&P.saveMissing&&this.backendConnector.saveMissing(ue,g,E,le,V,s),this.emit("missingKey",ue,g,E,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?O.forEach(ue=>{const E=this.pluralResolver.getSuffixes(ue,s);ce&&s[`defaultValue${this.options.pluralSeparator}zero`]&&E.indexOf(`${this.options.pluralSeparator}zero`)<0&&E.push(`${this.options.pluralSeparator}zero`),E.forEach(Q=>{D([ue],h+Q,s[`defaultValue${Q}`]||X)})}):D(O,h,X))}v=this.extendTranslation(v,r,s,S,c),te&&v===h&&this.options.appendNamespaceToMissingKey&&(v=`${g}:${h}`),(te||q)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}:${h}`:h,q?v:void 0))}return f?(S.res=v,S.usedParams=this.getUsedParamsDetails(s),S):v}extendTranslation(r,s,c,f,d){var m,y;var h=this;if((m=this.i18nFormat)!=null&&m.parse)r=this.i18nFormat.parse(r,{...this.options.interpolation.defaultVariables,...c},c.lng||this.language||f.usedLng,f.usedNS,f.usedKey,{resolved:f});else if(!c.skipInterpolation){c.interpolation&&this.interpolator.init({...c,interpolation:{...this.options.interpolation,...c.interpolation}});const S=je(r)&&(((y=c==null?void 0:c.interpolation)==null?void 0:y.skipOnVariables)!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(S){const j=r.match(this.interpolator.nestingRegexp);v=j&&j.length}let R=c.replace&&!je(c.replace)?c.replace:c;if(this.options.interpolation.defaultVariables&&(R={...this.options.interpolation.defaultVariables,...R}),r=this.interpolator.interpolate(r,R,c.lng||this.language||f.usedLng,c),S){const j=r.match(this.interpolator.nestingRegexp),C=j&&j.length;v<C&&(c.nest=!1)}!c.lng&&f&&f.res&&(c.lng=this.language||f.usedLng),c.nest!==!1&&(r=this.interpolator.nest(r,function(){for(var j=arguments.length,C=new Array(j),T=0;T<j;T++)C[T]=arguments[T];return(d==null?void 0:d[0])===C[0]&&!c.context?(h.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${s[0]}`),null):h.translate(...C,s)},c)),c.interpolation&&this.interpolator.reset()}const x=c.postProcess||this.options.postProcess,g=je(x)?[x]:x;return r!=null&&(g!=null&&g.length)&&c.applyPostProcessor!==!1&&(r=Lg.handle(g,r,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...f,usedParams:this.getUsedParamsDetails(c)},...c}:c,this)),r}resolve(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,f,d,h,x;return je(r)&&(r=[r]),r.forEach(g=>{if(this.isValidLookup(c))return;const m=this.extractFromKey(g,s),y=m.key;f=y;let S=m.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const v=s.count!==void 0&&!je(s.count),R=v&&!s.ordinal&&s.count===0,j=s.context!==void 0&&(je(s.context)||typeof s.context=="number")&&s.context!=="",C=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);S.forEach(T=>{var M,k;this.isValidLookup(c)||(x=T,!Eh[`${C[0]}-${T}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(x))&&(Eh[`${C[0]}-${T}`]=!0,this.logger.warn(`key "${f}" for languages "${C.join(", ")}" won't get resolved as namespace "${x}" 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!!!")),C.forEach(U=>{var ce;if(this.isValidLookup(c))return;h=U;const K=[y];if((ce=this.i18nFormat)!=null&&ce.addLookupKeys)this.i18nFormat.addLookupKeys(K,y,U,T,s);else{let X;v&&(X=this.pluralResolver.getSuffix(U,s.count,s));const $=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(K.push(y+X),s.ordinal&&X.indexOf(I)===0&&K.push(y+X.replace(I,this.options.pluralSeparator)),R&&K.push(y+$)),j){const H=`${y}${this.options.contextSeparator}${s.context}`;K.push(H),v&&(K.push(H+X),s.ordinal&&X.indexOf(I)===0&&K.push(H+X.replace(I,this.options.pluralSeparator)),R&&K.push(H+$))}}let Y;for(;Y=K.pop();)this.isValidLookup(c)||(d=Y,c=this.getResource(U,T,Y,s))}))})}),{res:c,usedKey:f,exactUsedKey:d,usedLng:h,usedNS:x}}isValidLookup(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}getResource(r,s,c){var d;let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(d=this.i18nFormat)!=null&&d.getResource?this.i18nFormat.getResource(r,s,c,f):this.resourceStore.getResource(r,s,c,f)}getUsedParamsDetails(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],c=r.replace&&!je(r.replace);let f=c?r.replace:r;if(c&&typeof r.count<"u"&&(f.count=r.count),this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),!c){f={...f};for(const d of s)delete f[d]}return f}static hasDefaultValue(r){const s="defaultValue";for(const c in r)if(Object.prototype.hasOwnProperty.call(r,c)&&s===c.substring(0,s.length)&&r[c]!==void 0)return!0;return!1}}class Th{constructor(r){this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ua.create("languageUtils")}getScriptPartFromCode(r){if(r=fi(r),!r||r.indexOf("-")<0)return null;const s=r.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(r){if(r=fi(r),!r||r.indexOf("-")<0)return r;const s=r.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(r){if(je(r)&&r.indexOf("-")>-1){let s;try{s=Intl.getCanonicalLocales(r)[0]}catch{}return s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s||(this.options.lowerCaseLng?r.toLowerCase():r)}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}isSupportedCode(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}getBestMatchFromCodes(r){if(!r)return null;let s;return r.forEach(c=>{if(s)return;const f=this.formatLanguageCode(c);(!this.options.supportedLngs||this.isSupportedCode(f))&&(s=f)}),!s&&this.options.supportedLngs&&r.forEach(c=>{if(s)return;const f=this.getLanguagePartFromCode(c);if(this.isSupportedCode(f))return s=f;s=this.options.supportedLngs.find(d=>{if(d===f)return d;if(!(d.indexOf("-")<0&&f.indexOf("-")<0)&&(d.indexOf("-")>0&&f.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===f||d.indexOf(f)===0&&f.length>1))return d})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(r,s){if(!r)return[];if(typeof r=="function"&&(r=r(s)),je(r)&&(r=[r]),Array.isArray(r))return r;if(!s)return r.default||[];let c=r[s];return c||(c=r[this.getScriptPartFromCode(s)]),c||(c=r[this.formatLanguageCode(s)]),c||(c=r[this.getLanguagePartFromCode(s)]),c||(c=r.default),c||[]}toResolveHierarchy(r,s){const c=this.getFallbackCodes(s||this.options.fallbackLng||[],r),f=[],d=h=>{h&&(this.isSupportedCode(h)?f.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return je(r)&&(r.indexOf("-")>-1||r.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(r))):je(r)&&d(this.formatLanguageCode(r)),c.forEach(h=>{f.indexOf(h)<0&&d(this.formatLanguageCode(h))}),f}}const Ah={zero:0,one:1,two:2,few:3,many:4,other:5},Rh={select:l=>l===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class O1{constructor(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=r,this.options=s,this.logger=ua.create("pluralResolver"),this.pluralRulesCache={}}addRule(r,s){this.rules[r]=s}clearCache(){this.pluralRulesCache={}}getRule(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const c=fi(r==="dev"?"en":r),f=s.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:c,type:f});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];let h;try{h=new Intl.PluralRules(c,{type:f})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Rh;if(!r.match(/-|_/))return Rh;const g=this.languageUtils.getLanguagePartFromCode(r);h=this.getRule(g,s)}return this.pluralRulesCache[d]=h,h}needsPlural(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(r,s);return c||(c=this.getRule("dev",s)),(c==null?void 0:c.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(r,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,c).map(f=>`${s}${f}`)}getSuffixes(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(r,s);return c||(c=this.getRule("dev",s)),c?c.resolvedOptions().pluralCategories.sort((f,d)=>Ah[f]-Ah[d]).map(f=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${f}`):[]}getSuffix(r,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const f=this.getRule(r,c);return f?`${this.options.prepend}${c.ordinal?`ordinal${this.options.prepend}`:""}${f.select(s)}`:(this.logger.warn(`no plural rule found for: ${r}`),this.getSuffix("dev",s,c))}}const Oh=function(l,r,s){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,d=j1(l,r,s);return!d&&f&&je(s)&&(d=Jc(l,s,c),d===void 0&&(d=Jc(r,s,c))),d},Bc=l=>l.replace(/\$/g,"$$$$");class M1{constructor(){var s;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ua.create("interpolator"),this.options=r,this.format=((s=r==null?void 0:r.interpolation)==null?void 0:s.format)||(c=>c),this.init(r)}init(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});const{escape:s,escapeValue:c,useRawValueToEscape:f,prefix:d,prefixEscaped:h,suffix:x,suffixEscaped:g,formatSeparator:m,unescapeSuffix:y,unescapePrefix:S,nestingPrefix:v,nestingPrefixEscaped:R,nestingSuffix:j,nestingSuffixEscaped:C,nestingOptionsSeparator:T,maxReplaces:M,alwaysFormat:k}=r.interpolation;this.escape=s!==void 0?s:C1,this.escapeValue=c!==void 0?c:!0,this.useRawValueToEscape=f!==void 0?f:!1,this.prefix=d?yl(d):h||"{{",this.suffix=x?yl(x):g||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=v?yl(v):R||yl("$t("),this.nestingSuffix=j?yl(j):C||yl(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=M||1e3,this.alwaysFormat=k!==void 0?k:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const r=(s,c)=>(s==null?void 0:s.source)===c?(s.lastIndex=0,s):new RegExp(c,"g");this.regexp=r(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=r(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=r(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(r,s,c,f){var R;let d,h,x;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=j=>{if(j.indexOf(this.formatSeparator)<0){const k=Oh(s,g,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,c,{...f,...s,interpolationkey:j}):k}const C=j.split(this.formatSeparator),T=C.shift().trim(),M=C.join(this.formatSeparator).trim();return this.format(Oh(s,g,T,this.options.keySeparator,this.options.ignoreJSONStructure),M,c,{...f,...s,interpolationkey:T})};this.resetRegExp();const y=(f==null?void 0:f.missingInterpolationHandler)||this.options.missingInterpolationHandler,S=((R=f==null?void 0:f.interpolation)==null?void 0:R.skipOnVariables)!==void 0?f.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>Bc(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?Bc(this.escape(j)):Bc(j)}].forEach(j=>{for(x=0;d=j.regex.exec(r);){const C=d[1].trim();if(h=m(C),h===void 0)if(typeof y=="function"){const M=y(r,d,f);h=je(M)?M:""}else if(f&&Object.prototype.hasOwnProperty.call(f,C))h="";else if(S){h=d[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${r}`),h="";else!je(h)&&!this.useRawValueToEscape&&(h=wh(h));const T=j.safeValue(h);if(r=r.replace(d[0],T),S?(j.regex.lastIndex+=h.length,j.regex.lastIndex-=d[0].length):j.regex.lastIndex=0,x++,x>=this.maxReplaces)break}}),r}nest(r,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,d,h;const x=(g,m)=>{const y=this.nestingOptionsSeparator;if(g.indexOf(y)<0)return g;const S=g.split(new RegExp(`${y}[ ]*{`));let v=`{${S[1]}`;g=S[0],v=this.interpolate(v,h);const R=v.match(/'/g),j=v.match(/"/g);(((R==null?void 0:R.length)??0)%2===0&&!j||j.length%2!==0)&&(v=v.replace(/'/g,'"'));try{h=JSON.parse(v),m&&(h={...m,...h})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,C),`${g}${y}${v}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,g};for(;f=this.nestingRegexp.exec(r);){let g=[];h={...c},h=h.replace&&!je(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;let m=!1;if(f[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(f[1])){const y=f[1].split(this.formatSeparator).map(S=>S.trim());f[1]=y.shift(),g=y,m=!0}if(d=s(x.call(this,f[1].trim(),h),h),d&&f[0]===r&&!je(d))return d;je(d)||(d=wh(d)),d||(this.logger.warn(`missed to resolve ${f[1]} for nesting ${r}`),d=""),m&&(d=g.reduce((y,S)=>this.format(y,S,c.lng,{...c,interpolationkey:f[1].trim()}),d.trim())),r=r.replace(f[0],d),this.regexp.lastIndex=0}return r}}const z1=l=>{let r=l.toLowerCase().trim();const s={};if(l.indexOf("(")>-1){const c=l.split("(");r=c[0].toLowerCase().trim();const f=c[1].substring(0,c[1].length-1);r==="currency"&&f.indexOf(":")<0?s.currency||(s.currency=f.trim()):r==="relativetime"&&f.indexOf(":")<0?s.range||(s.range=f.trim()):f.split(";").forEach(h=>{if(h){const[x,...g]=h.split(":"),m=g.join(":").trim().replace(/^'+|'+$/g,""),y=x.trim();s[y]||(s[y]=m),m==="false"&&(s[y]=!1),m==="true"&&(s[y]=!0),isNaN(m)||(s[y]=parseInt(m,10))}})}return{formatName:r,formatOptions:s}},bl=l=>{const r={};return(s,c,f)=>{let d=f;f&&f.interpolationkey&&f.formatParams&&f.formatParams[f.interpolationkey]&&f[f.interpolationkey]&&(d={...d,[f.interpolationkey]:void 0});const h=c+JSON.stringify(d);let x=r[h];return x||(x=l(fi(c),f),r[h]=x),x(s)}};class D1{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ua.create("formatter"),this.options=r,this.formats={number:bl((s,c)=>{const f=new Intl.NumberFormat(s,{...c});return d=>f.format(d)}),currency:bl((s,c)=>{const f=new Intl.NumberFormat(s,{...c,style:"currency"});return d=>f.format(d)}),datetime:bl((s,c)=>{const f=new Intl.DateTimeFormat(s,{...c});return d=>f.format(d)}),relativetime:bl((s,c)=>{const f=new Intl.RelativeTimeFormat(s,{...c});return d=>f.format(d,c.range||"day")}),list:bl((s,c)=>{const f=new Intl.ListFormat(s,{...c});return d=>f.format(d)})},this.init(r)}init(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=s.interpolation.formatSeparator||","}add(r,s){this.formats[r.toLowerCase().trim()]=s}addCached(r,s){this.formats[r.toLowerCase().trim()]=bl(s)}format(r,s,c){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const d=s.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(x=>x.indexOf(")")>-1)){const x=d.findIndex(g=>g.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,x)].join(this.formatSeparator)}return d.reduce((x,g)=>{var S;const{formatName:m,formatOptions:y}=z1(g);if(this.formats[m]){let v=x;try{const R=((S=f==null?void 0:f.formatParams)==null?void 0:S[f.interpolationkey])||{},j=R.locale||R.lng||f.locale||f.lng||c;v=this.formats[m](x,j,{...y,...f,...R})}catch(R){this.logger.warn(R)}return v}else this.logger.warn(`there was no format function for ${m}`);return x},r)}}const U1=(l,r)=>{l.pending[r]!==void 0&&(delete l.pending[r],l.pendingCount--)};class L1 extends bi{constructor(r,s,c){var d,h;let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=r,this.store=s,this.services=c,this.languageUtils=c.languageUtils,this.options=f,this.logger=ua.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=f.maxParallelReads||10,this.readingCalls=0,this.maxRetries=f.maxRetries>=0?f.maxRetries:5,this.retryTimeout=f.retryTimeout>=1?f.retryTimeout:350,this.state={},this.queue=[],(h=(d=this.backend)==null?void 0:d.init)==null||h.call(d,c,f.backend,f)}queueLoad(r,s,c,f){const d={},h={},x={},g={};return r.forEach(m=>{let y=!0;s.forEach(S=>{const v=`${m}|${S}`;!c.reload&&this.store.hasResourceBundle(m,S)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?h[v]===void 0&&(h[v]=!0):(this.state[v]=1,y=!1,h[v]===void 0&&(h[v]=!0),d[v]===void 0&&(d[v]=!0),g[S]===void 0&&(g[S]=!0)))}),y||(x[m]=!0)}),(Object.keys(d).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:f}),{toLoad:Object.keys(d),pending:Object.keys(h),toLoadLanguages:Object.keys(x),toLoadNamespaces:Object.keys(g)}}loaded(r,s,c){const f=r.split("|"),d=f[0],h=f[1];s&&this.emit("failedLoading",d,h,s),!s&&c&&this.store.addResourceBundle(d,h,c,void 0,void 0,{skipCopy:!0}),this.state[r]=s?-1:2,s&&c&&(this.state[r]=0);const x={};this.queue.forEach(g=>{S1(g.loaded,[d],h),U1(g,r),s&&g.errors.push(s),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(m=>{x[m]||(x[m]={});const y=g.loaded[m];y.length&&y.forEach(S=>{x[m][S]===void 0&&(x[m][S]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",x),this.queue=this.queue.filter(g=>!g.done)}read(r,s,c){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!r.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:r,ns:s,fcName:c,tried:f,wait:d,callback:h});return}this.readingCalls++;const x=(m,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(m&&y&&f<this.maxRetries){setTimeout(()=>{this.read.call(this,r,s,c,f+1,d*2,h)},d);return}h(m,y)},g=this.backend[c].bind(this.backend);if(g.length===2){try{const m=g(r,s);m&&typeof m.then=="function"?m.then(y=>x(null,y)).catch(x):x(null,m)}catch(m){x(m)}return}return g(r,s,x)}prepareLoading(r,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),f&&f();je(r)&&(r=this.languageUtils.toResolveHierarchy(r)),je(s)&&(s=[s]);const d=this.queueLoad(r,s,c,f);if(!d.toLoad.length)return d.pending.length||f(),null;d.toLoad.forEach(h=>{this.loadOne(h)})}load(r,s,c){this.prepareLoading(r,s,{},c)}reload(r,s,c){this.prepareLoading(r,s,{reload:!0},c)}loadOne(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const c=r.split("|"),f=c[0],d=c[1];this.read(f,d,"read",void 0,void 0,(h,x)=>{h&&this.logger.warn(`${s}loading namespace ${d} for language ${f} failed`,h),!h&&x&&this.logger.log(`${s}loaded namespace ${d} for language ${f}`,x),this.loaded(r,h,x)})}saveMissing(r,s,c,f,d){var g,m,y,S,v;let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},x=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((m=(g=this.services)==null?void 0:g.utils)!=null&&m.hasLoadedNamespace&&!((S=(y=this.services)==null?void 0:y.utils)!=null&&S.hasLoadedNamespace(s))){this.logger.warn(`did not save key "${c}" as the namespace "${s}" 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(!(c==null||c==="")){if((v=this.backend)!=null&&v.create){const R={...h,isUpdate:d},j=this.backend.create.bind(this.backend);if(j.length<6)try{let C;j.length===5?C=j(r,s,c,f,R):C=j(r,s,c,f),C&&typeof C.then=="function"?C.then(T=>x(null,T)).catch(x):x(null,C)}catch(C){x(C)}else j(r,s,c,f,x,R)}!r||!r[0]||this.store.addResource(r[0],s,c,f)}}}const Mh=()=>({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:l=>{let r={};if(typeof l[1]=="object"&&(r=l[1]),je(l[1])&&(r.defaultValue=l[1]),je(l[2])&&(r.tDescription=l[2]),typeof l[2]=="object"||typeof l[3]=="object"){const s=l[3]||l[2];Object.keys(s).forEach(c=>{r[c]=s[c]})}return r},interpolation:{escapeValue:!0,format:l=>l,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),zh=l=>{var r,s;return je(l.ns)&&(l.ns=[l.ns]),je(l.fallbackLng)&&(l.fallbackLng=[l.fallbackLng]),je(l.fallbackNS)&&(l.fallbackNS=[l.fallbackNS]),((s=(r=l.supportedLngs)==null?void 0:r.indexOf)==null?void 0:s.call(r,"cimode"))<0&&(l.supportedLngs=l.supportedLngs.concat(["cimode"])),typeof l.initImmediate=="boolean"&&(l.initAsync=l.initImmediate),l},ii=()=>{},_1=l=>{Object.getOwnPropertyNames(Object.getPrototypeOf(l)).forEach(s=>{typeof l[s]=="function"&&(l[s]=l[s].bind(l))})};class zs extends bi{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(super(),this.options=zh(r),this.services={},this.logger=ua,this.modules={external:[]},_1(this),s&&!this.isInitialized&&!r.isClone){if(!this.options.initAsync)return this.init(r,s),this;setTimeout(()=>{this.init(r,s)},0)}}init(){var r=this;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof s=="function"&&(c=s,s={}),s.defaultNS==null&&s.ns&&(je(s.ns)?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));const f=Mh();this.options={...f,...this.options,...zh(s)},this.options.interpolation={...f.interpolation,...this.options.interpolation},s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);const d=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?ua.init(d(this.modules.logger),this.options):ua.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=D1;const S=new Th(this.options);this.store=new Ch(this.options.resources,this.options);const v=this.services;v.logger=ua,v.resourceStore=this.store,v.languageUtils=S,v.pluralResolver=new O1(S,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===f.interpolation.format)&&(v.formatter=d(y),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new M1(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new L1(d(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(R){for(var j=arguments.length,C=new Array(j>1?j-1:0),T=1;T<j;T++)C[T-1]=arguments[T];r.emit(R,...C)}),this.modules.languageDetector&&(v.languageDetector=d(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=d(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new hi(this.services,this.options),this.translator.on("*",function(R){for(var j=arguments.length,C=new Array(j>1?j-1:0),T=1;T<j;T++)C[T-1]=arguments[T];r.emit(R,...C)}),this.modules.external.forEach(R=>{R.init&&R.init(this)})}if(this.format=this.options.interpolation.format,c||(c=ii),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[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(y=>{this[y]=function(){return r.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return r.store[y](...arguments),r}});const g=Ts(),m=()=>{const y=(S,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),g.resolve(v),c(S,v)};if(this.languages&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?m():setTimeout(m,0),g}loadResources(r){var d,h;let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const f=je(r)?r:this.language;if(typeof r=="function"&&(c=r),!this.options.resources||this.options.partialBundledLanguages){if((f==null?void 0:f.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return c();const x=[],g=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(S=>{S!=="cimode"&&x.indexOf(S)<0&&x.push(S)})};f?g(f):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>g(y)),(h=(d=this.options.preload)==null?void 0:d.forEach)==null||h.call(d,m=>g(m)),this.services.backendConnector.load(x,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),c(m)})}else c(null)}reloadResources(r,s,c){const f=Ts();return typeof r=="function"&&(c=r,r=void 0),typeof s=="function"&&(c=s,s=void 0),r||(r=this.languages),s||(s=this.options.ns),c||(c=ii),this.services.backendConnector.reload(r,s,d=>{f.resolve(),c(d)}),f}use(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&Lg.addPostProcessor(r),r.type==="formatter"&&(this.modules.formatter=r),r.type==="3rdParty"&&this.modules.external.push(r),this}setResolvedLanguage(r){if(!(!r||!this.languages)&&!(["cimode","dev"].indexOf(r)>-1))for(let s=0;s<this.languages.length;s++){const c=this.languages[s];if(!(["cimode","dev"].indexOf(c)>-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}changeLanguage(r,s){var c=this;this.isLanguageChangingTo=r;const f=Ts();this.emit("languageChanging",r);const d=g=>{this.language=g,this.languages=this.services.languageUtils.toResolveHierarchy(g),this.resolvedLanguage=void 0,this.setResolvedLanguage(g)},h=(g,m)=>{m?(d(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,f.resolve(function(){return c.t(...arguments)}),s&&s(g,function(){return c.t(...arguments)})},x=g=>{var y,S;!r&&!g&&this.services.languageDetector&&(g=[]);const m=je(g)?g:this.services.languageUtils.getBestMatchFromCodes(g);m&&(this.language||d(m),this.translator.language||this.translator.changeLanguage(m),(S=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||S.call(y,m)),this.loadResources(m,v=>{h(v,m)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?x(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(x):this.services.languageDetector.detect(x):x(r),f}getFixedT(r,s,c){var f=this;const d=function(h,x){let g;if(typeof x!="object"){for(var m=arguments.length,y=new Array(m>2?m-2:0),S=2;S<m;S++)y[S-2]=arguments[S];g=f.options.overloadTranslationOptionHandler([h,x].concat(y))}else g={...x};g.lng=g.lng||d.lng,g.lngs=g.lngs||d.lngs,g.ns=g.ns||d.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||c||d.keyPrefix);const v=f.options.keySeparator||".";let R;return g.keyPrefix&&Array.isArray(h)?R=h.map(j=>`${g.keyPrefix}${v}${j}`):R=g.keyPrefix?`${g.keyPrefix}${v}${h}`:h,f.t(R,g)};return je(r)?d.lng=r:d.lngs=r,d.ns=s,d.keyPrefix=c,d}t(){var f;for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return(f=this.translator)==null?void 0:f.translate(...s)}exists(){var f;for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return(f=this.translator)==null?void 0:f.exists(...s)}setDefaultNamespace(r){this.options.defaultNS=r}hasLoadedNamespace(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};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 c=s.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(c.toLowerCase()==="cimode")return!0;const h=(x,g)=>{const m=this.services.backendConnector.state[`${x}|${g}`];return m===-1||m===0||m===2};if(s.precheck){const x=s.precheck(this,h);if(x!==void 0)return x}return!!(this.hasResourceBundle(c,r)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(c,r)&&(!f||h(d,r)))}loadNamespaces(r,s){const c=Ts();return this.options.ns?(je(r)&&(r=[r]),r.forEach(f=>{this.options.ns.indexOf(f)<0&&this.options.ns.push(f)}),this.loadResources(f=>{c.resolve(),s&&s(f)}),c):(s&&s(),Promise.resolve())}loadLanguages(r,s){const c=Ts();je(r)&&(r=[r]);const f=this.options.preload||[],d=r.filter(h=>f.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return d.length?(this.options.preload=f.concat(d),this.loadResources(h=>{c.resolve(),s&&s(h)}),c):(s&&s(),Promise.resolve())}dir(r){var f,d;if(r||(r=this.resolvedLanguage||(((f=this.languages)==null?void 0:f.length)>0?this.languages[0]:this.language)),!r)return"rtl";const s=["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"],c=((d=this.services)==null?void 0:d.languageUtils)||new Th(Mh());return s.indexOf(c.getLanguagePartFromCode(r))>-1||r.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;return new zs(r,s)}cloneInstance(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const c=r.forkResourceStore;c&&delete r.forkResourceStore;const f={...this.options,...r,isClone:!0},d=new zs(f);if((r.debug!==void 0||r.prefix!==void 0)&&(d.logger=d.logger.clone(r)),["store","services","language"].forEach(x=>{d[x]=this[x]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},c){const x=Object.keys(this.store.data).reduce((g,m)=>(g[m]={...this.store.data[m]},Object.keys(g[m]).reduce((y,S)=>(y[S]={...g[m][S]},y),{})),{});d.store=new Ch(x,f),d.services.resourceStore=d.store}return d.translator=new hi(d.services,f),d.translator.on("*",function(x){for(var g=arguments.length,m=new Array(g>1?g-1:0),y=1;y<g;y++)m[y-1]=arguments[y];d.emit(x,...m)}),d.init(f,s),d.translator.options=f,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const xt=zs.createInstance();xt.createInstance=zs.createInstance;xt.createInstance;xt.dir;xt.init;xt.loadResources;xt.reloadResources;xt.use;xt.changeLanguage;xt.getFixedT;xt.t;xt.exists;xt.setDefaultNamespace;xt.hasLoadedNamespace;xt.loadNamespaces;xt.loadLanguages;const{slice:H1,forEach:B1}=[];function q1(l){return B1.call(H1.call(arguments,1),r=>{if(r)for(const s in r)l[s]===void 0&&(l[s]=r[s])}),l}function V1(l){return typeof l!="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(s=>s.test(l))}const Dh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,G1=function(l,r){const c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},f=encodeURIComponent(r);let d=`${l}=${f}`;if(c.maxAge>0){const h=c.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");d+=`; Max-Age=${Math.floor(h)}`}if(c.domain){if(!Dh.test(c.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${c.domain}`}if(c.path){if(!Dh.test(c.path))throw new TypeError("option path is invalid");d+=`; Path=${c.path}`}if(c.expires){if(typeof c.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+=`; Expires=${c.expires.toUTCString()}`}if(c.httpOnly&&(d+="; HttpOnly"),c.secure&&(d+="; Secure"),c.sameSite)switch(typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c.partitioned&&(d+="; Partitioned"),d},Uh={create(l,r,s,c){let f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};s&&(f.expires=new Date,f.expires.setTime(f.expires.getTime()+s*60*1e3)),c&&(f.domain=c),document.cookie=G1(l,encodeURIComponent(r),f)},read(l){const r=`${l}=`,s=document.cookie.split(";");for(let c=0;c<s.length;c++){let f=s[c];for(;f.charAt(0)===" ";)f=f.substring(1,f.length);if(f.indexOf(r)===0)return f.substring(r.length,f.length)}return null},remove(l){this.create(l,"",-1)}};var K1={name:"cookie",lookup(l){let{lookupCookie:r}=l;if(r&&typeof document<"u")return Uh.read(r)||void 0},cacheUserLanguage(l,r){let{lookupCookie:s,cookieMinutes:c,cookieDomain:f,cookieOptions:d}=r;s&&typeof document<"u"&&Uh.create(s,l,c,f,d)}},$1={name:"querystring",lookup(l){var c;let{lookupQuerystring:r}=l,s;if(typeof window<"u"){let{search:f}=window.location;!window.location.search&&((c=window.location.hash)==null?void 0:c.indexOf("?"))>-1&&(f=window.location.hash.substring(window.location.hash.indexOf("?")));const h=f.substring(1).split("&");for(let x=0;x<h.length;x++){const g=h[x].indexOf("=");g>0&&h[x].substring(0,g)===r&&(s=h[x].substring(g+1))}}return s}};let vl=null;const Lh=()=>{if(vl!==null)return vl;try{if(vl=typeof window<"u"&&window.localStorage!==null,!vl)return!1;const l="i18next.translate.boo";window.localStorage.setItem(l,"foo"),window.localStorage.removeItem(l)}catch{vl=!1}return vl};var Y1={name:"localStorage",lookup(l){let{lookupLocalStorage:r}=l;if(r&&Lh())return window.localStorage.getItem(r)||void 0},cacheUserLanguage(l,r){let{lookupLocalStorage:s}=r;s&&Lh()&&window.localStorage.setItem(s,l)}};let wl=null;const _h=()=>{if(wl!==null)return wl;try{if(wl=typeof window<"u"&&window.sessionStorage!==null,!wl)return!1;const l="i18next.translate.boo";window.sessionStorage.setItem(l,"foo"),window.sessionStorage.removeItem(l)}catch{wl=!1}return wl};var Q1={name:"sessionStorage",lookup(l){let{lookupSessionStorage:r}=l;if(r&&_h())return window.sessionStorage.getItem(r)||void 0},cacheUserLanguage(l,r){let{lookupSessionStorage:s}=r;s&&_h()&&window.sessionStorage.setItem(s,l)}},X1={name:"navigator",lookup(l){const r=[];if(typeof navigator<"u"){const{languages:s,userLanguage:c,language:f}=navigator;if(s)for(let d=0;d<s.length;d++)r.push(s[d]);c&&r.push(c),f&&r.push(f)}return r.length>0?r:void 0}},P1={name:"htmlTag",lookup(l){let{htmlTag:r}=l,s;const c=r||(typeof document<"u"?document.documentElement:null);return c&&typeof c.getAttribute=="function"&&(s=c.getAttribute("lang")),s}},Z1={name:"path",lookup(l){var f;let{lookupFromPathIndex:r}=l;if(typeof window>"u")return;const s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?(f=s[typeof r=="number"?r:0])==null?void 0:f.replace("/",""):void 0}},J1={name:"subdomain",lookup(l){var f,d;let{lookupFromSubdomainIndex:r}=l;const s=typeof r=="number"?r+1:1,c=typeof window<"u"&&((d=(f=window.location)==null?void 0:f.hostname)==null?void 0:d.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(c)return c[s]}};let _g=!1;try{document.cookie,_g=!0}catch{}const Hg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];_g||Hg.splice(1,1);const F1=()=>({order:Hg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:l=>l});class Bg{constructor(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(r,s)}init(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=r,this.options=q1(s,this.options||{},F1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=f=>f.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=c,this.addDetector(K1),this.addDetector($1),this.addDetector(Y1),this.addDetector(Q1),this.addDetector(X1),this.addDetector(P1),this.addDetector(Z1),this.addDetector(J1)}addDetector(r){return this.detectors[r.name]=r,this}detect(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,s=[];return r.forEach(c=>{if(this.detectors[c]){let f=this.detectors[c].lookup(this.options);f&&typeof f=="string"&&(f=[f]),f&&(s=s.concat(f))}}),s=s.filter(c=>c!=null&&!V1(c)).map(c=>this.options.convertDetectedLanguage(c)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}cacheUserLanguage(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;s&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(r)>-1||s.forEach(c=>{this.detectors[c]&&this.detectors[c].cacheUserLanguage(r,this.options)}))}}Bg.type="languageDetector";const I1={title:"MCP Hub 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:"MCP Hub"},W1={title:"About",versionInfo:"MCP Hub 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..."},e2={viewProfile:"View profile",userCenter:"User Center"},t2={label:"Sponsor",title:"Support the Project",rewardAlt:"Reward QR Code",supportMessage:"Support the development of MCP Hub by buying me a coffee!",supportButton:"Support on Ko-fi"},a2={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},n2={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},l2={title:"Theme",light:"Light",dark:"Dark",system:"System"},s2={login:"Login",loginTitle:"Login to MCP Hub",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"},r2={addServer:"Add Server",add:"Add",edit:"Edit",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",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",command:"Command",arguments:"Arguments",envVars:"Environment Variables",headers:"HTTP Headers",key:"key",value:"value",enabled:"Enabled",enable:"Enable",disable:"Disable",requestOptions:"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",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",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",oauth2Config:"OAuth 2.0 Configuration",oauth2Token:"Access Token",openIdConnectConfig:"OpenID Connect Configuration",openIdConnectUrl:"Discovery URL",openIdConnectToken:"ID Token"}},i2={online:"Online",offline:"Offline",connecting:"Connecting"},o2={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"},c2={processing:"Processing...",save:"Save",cancel:"Cancel",refresh:"Refresh",create:"Create",submitting:"Submitting...",delete:"Delete",remove:"Remove",copy:"Copy",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",close:"Close"},u2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},d2={dashboard:{title:"Dashboard",totalServers:"Total",onlineServers:"Online",offlineServers:"Offline",connectingServers:"Connecting",recentServers:"Recent Servers"},servers:{title:"Servers Management"},groups:{title:"Group Management"},settings:{title:"Settings",language:"Language",account:"Account Settings",password:"Change Password",appearance:"Appearance",routeConfig:"Security",installConfig:"Installation",smartRouting:"Smart Routing"},market:{title:"Server Market - (Data from mcpm.sh)"},logs:{title:"System Logs"}},f2={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"},m2={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"},h2={title:"Server Market",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"},g2={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}}"},p2={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",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/",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}}"},x2={app:I1,about:W1,profile:e2,sponsor:t2,wechat:a2,discord:n2,theme:l2,auth:s2,server:r2,status:i2,errors:o2,common:c2,nav:u2,pages:d2,logs:f2,groups:m2,market:h2,tool:g2,settings:p2},y2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},b2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},v2={viewProfile:"查看个人中心",userCenter:"个人中心"},w2={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},S2={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},j2={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},N2={title:"主题",light:"浅色",dark:"深色",system:"系统"},C2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},E2={addServer:"添加服务器",add:"添加",edit:"编辑",delete:"删除",confirmDelete:"您确定要删除此服务器吗?",deleteWarning:"删除服务器 '{{name}}' 将会移除该服务器及其所有数据。此操作无法撤销。",status:"状态",tools:"工具",name:"服务器名称",url:"服务器 URL",apiKey:"API 密钥",save:"保存",cancel:"取消",addError:"添加服务器失败",editError:"编辑服务器 {{serverName}} 失败",invalidConfig:"无法找到 {{serverName}} 的配置数据",deleteError:"删除服务器 {{serverName}} 失败",updateError:"更新服务器失败",editTitle:"编辑服务器: {{serverName}}",type:"服务器类型",command:"命令",arguments:"参数",envVars:"环境变量",headers:"HTTP 请求头",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",requestOptions:"配置",timeout:"请求超时",timeoutDescription:"请求超时时间(毫秒)",maxTotalTimeout:"最大总超时",maxTotalTimeoutDescription:"无论是否有进度通知的最大总超时时间(毫秒)",resetTimeoutOnProgress:"收到进度通知时重置超时",resetTimeoutOnProgressDescription:"适用于发送周期性进度更新的长时间运行操作",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情",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:"凭据",oauth2Config:"OAuth 2.0 配置",oauth2Token:"访问令牌",openIdConnectConfig:"OpenID Connect 配置",openIdConnectUrl:"发现 URL",openIdConnectToken:"ID 令牌"}},k2={online:"在线",offline:"离线",connecting:"连接中"},T2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},A2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",remove:"移除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭"},R2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},O2={dashboard:{title:"仪表盘",totalServers:"总数",onlineServers:"在线",offlineServers:"离线",connectingServers:"连接中",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"安全配置",installConfig:"安装",smartRouting:"智能路由"},groups:{title:"分组管理"},market:{title:"服务器市场 - (数据来源于 mcpm.sh)"},logs:{title:"系统日志"}},M2={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},z2={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}} 台服务器"},D2={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:"每页显示"},U2={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}}"},L2={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",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/",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}}"},_2={app:y2,about:b2,profile:v2,sponsor:w2,wechat:S2,discord:j2,theme:N2,auth:C2,server:E2,status:k2,errors:T2,common:A2,nav:R2,pages:O2,logs:M2,groups:z2,market:D2,tool:U2,settings:L2};xt.use(Bg).use(yv).init({resources:{en:{translation:x2},zh:{translation:_2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});async function H2(){try{console.log("Loading runtime configuration...");const l=await Dy();console.log("Runtime configuration loaded:",l),window.__MCPHUB_CONFIG__=l,lh.createRoot(document.getElementById("root")).render(i.jsx(qc.StrictMode,{children:i.jsx(vh,{})}))}catch(l){console.error("Failed to initialize app:",l),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},lh.createRoot(document.getElementById("root")).render(i.jsx(qc.StrictMode,{children:i.jsx(vh,{})}))}}H2();
|
|
186
|
-
//# sourceMappingURL=index-BmFb5olQ.js.map
|